Fixed warnings
parent
416b573f43
commit
9e1c263cf8
|
@ -55,10 +55,10 @@ namespace stardew_access.ScreenReader
|
||||||
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
||||||
public void Say(String text, Boolean interrupt)
|
public void Say(String text, Boolean interrupt)
|
||||||
{
|
{
|
||||||
if (MainClass.GetScreenReader() == null)
|
if (MainClass.ScreenReader == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MainClass.GetScreenReader().Say(text, interrupt);
|
MainClass.ScreenReader.Say(text, interrupt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Speaks the text via the loaded screen reader (if any).
|
/// <summary>Speaks the text via the loaded screen reader (if any).
|
||||||
|
@ -67,10 +67,10 @@ namespace stardew_access.ScreenReader
|
||||||
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
||||||
public void SayWithChecker(String text, Boolean interrupt)
|
public void SayWithChecker(String text, Boolean interrupt)
|
||||||
{
|
{
|
||||||
if (MainClass.GetScreenReader() == null)
|
if (MainClass.ScreenReader == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithChecker(text, interrupt);
|
MainClass.ScreenReader.SayWithChecker(text, interrupt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Speaks the text via the loaded screen reader (if any).
|
/// <summary>Speaks the text via the loaded screen reader (if any).
|
||||||
|
@ -80,10 +80,10 @@ namespace stardew_access.ScreenReader
|
||||||
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
||||||
public void SayWithMenuChecker(String text, Boolean interrupt)
|
public void SayWithMenuChecker(String text, Boolean interrupt)
|
||||||
{
|
{
|
||||||
if (MainClass.GetScreenReader() == null)
|
if (MainClass.ScreenReader == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker(text, interrupt);
|
MainClass.ScreenReader.SayWithMenuChecker(text, interrupt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Speaks the text via the loaded screen reader (if any).
|
/// <summary>Speaks the text via the loaded screen reader (if any).
|
||||||
|
@ -93,10 +93,10 @@ namespace stardew_access.ScreenReader
|
||||||
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
||||||
public void SayWithChatChecker(String text, Boolean interrupt)
|
public void SayWithChatChecker(String text, Boolean interrupt)
|
||||||
{
|
{
|
||||||
if (MainClass.GetScreenReader() == null)
|
if (MainClass.ScreenReader == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithChatChecker(text, interrupt);
|
MainClass.ScreenReader.SayWithChatChecker(text, interrupt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Speaks the text via the loaded screen reader (if any).
|
/// <summary>Speaks the text via the loaded screen reader (if any).
|
||||||
|
@ -108,10 +108,10 @@ namespace stardew_access.ScreenReader
|
||||||
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
/// <param name="interrupt">Whether to skip the currently speaking text or not.</param>
|
||||||
public void SayWithTileQuery(String text, int x, int y, Boolean interrupt)
|
public void SayWithTileQuery(String text, int x, int y, Boolean interrupt)
|
||||||
{
|
{
|
||||||
if (MainClass.GetScreenReader() == null)
|
if (MainClass.ScreenReader == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithTileQuery(text, x, y, interrupt);
|
MainClass.ScreenReader.SayWithTileQuery(text, x, y, interrupt);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,12 +11,14 @@ namespace stardew_access
|
||||||
{
|
{
|
||||||
internal static void Initialize()
|
internal static void Initialize()
|
||||||
{
|
{
|
||||||
IModHelper helper = MainClass.ModHelper;
|
IModHelper? helper = MainClass.ModHelper;
|
||||||
|
if (helper == null)
|
||||||
|
return;
|
||||||
|
|
||||||
helper.ConsoleCommands.Add("readtile", "Toggle read tile feature.", (string commmand, string[] args) =>
|
helper.ConsoleCommands.Add("readtile", "Toggle read tile feature.", (string commmand, string[] args) =>
|
||||||
{
|
{
|
||||||
MainClass.Config.ReadTile = !MainClass.Config.ReadTile;
|
MainClass.Config.ReadTile = !MainClass.Config.ReadTile;
|
||||||
MainClass.ModHelper.WriteConfig(MainClass.Config);
|
helper.WriteConfig(MainClass.Config);
|
||||||
|
|
||||||
MainClass.DebugLog("Read Tile is " + (MainClass.Config.ReadTile ? "on" : "off"));
|
MainClass.DebugLog("Read Tile is " + (MainClass.Config.ReadTile ? "on" : "off"));
|
||||||
});
|
});
|
||||||
|
@ -24,7 +26,7 @@ namespace stardew_access
|
||||||
helper.ConsoleCommands.Add("snapmouse", "Toggle snap mouse feature.", (string commmand, string[] args) =>
|
helper.ConsoleCommands.Add("snapmouse", "Toggle snap mouse feature.", (string commmand, string[] args) =>
|
||||||
{
|
{
|
||||||
MainClass.Config.SnapMouse = !MainClass.Config.SnapMouse;
|
MainClass.Config.SnapMouse = !MainClass.Config.SnapMouse;
|
||||||
MainClass.ModHelper.WriteConfig(MainClass.Config);
|
helper.WriteConfig(MainClass.Config);
|
||||||
|
|
||||||
MainClass.DebugLog("Snap Mouse is " + (MainClass.Config.SnapMouse ? "on" : "off"));
|
MainClass.DebugLog("Snap Mouse is " + (MainClass.Config.SnapMouse ? "on" : "off"));
|
||||||
});
|
});
|
||||||
|
@ -32,7 +34,7 @@ namespace stardew_access
|
||||||
helper.ConsoleCommands.Add("flooring", "Toggle flooring in read tile.", (string commmand, string[] args) =>
|
helper.ConsoleCommands.Add("flooring", "Toggle flooring in read tile.", (string commmand, string[] args) =>
|
||||||
{
|
{
|
||||||
MainClass.Config.ReadFlooring = !MainClass.Config.ReadFlooring;
|
MainClass.Config.ReadFlooring = !MainClass.Config.ReadFlooring;
|
||||||
MainClass.ModHelper.WriteConfig(MainClass.Config);
|
helper.WriteConfig(MainClass.Config);
|
||||||
|
|
||||||
MainClass.DebugLog("Flooring is " + (MainClass.Config.ReadFlooring ? "on" : "off"));
|
MainClass.DebugLog("Flooring is " + (MainClass.Config.ReadFlooring ? "on" : "off"));
|
||||||
});
|
});
|
||||||
|
@ -40,7 +42,7 @@ namespace stardew_access
|
||||||
helper.ConsoleCommands.Add("radar", "Toggle radar feature.", (string commmand, string[] args) =>
|
helper.ConsoleCommands.Add("radar", "Toggle radar feature.", (string commmand, string[] args) =>
|
||||||
{
|
{
|
||||||
MainClass.Config.Radar = !MainClass.Config.Radar;
|
MainClass.Config.Radar = !MainClass.Config.Radar;
|
||||||
MainClass.ModHelper.WriteConfig(MainClass.Config);
|
helper.WriteConfig(MainClass.Config);
|
||||||
|
|
||||||
MainClass.DebugLog("Radar " + (MainClass.Config.Radar ? "on" : "off"));
|
MainClass.DebugLog("Radar " + (MainClass.Config.Radar ? "on" : "off"));
|
||||||
});
|
});
|
||||||
|
@ -56,7 +58,7 @@ namespace stardew_access
|
||||||
helper.ConsoleCommands.Add("rstereo", "Toggle stereo sound in radar feature.", (string commmand, string[] args) =>
|
helper.ConsoleCommands.Add("rstereo", "Toggle stereo sound in radar feature.", (string commmand, string[] args) =>
|
||||||
{
|
{
|
||||||
MainClass.Config.RadarStereoSound = !MainClass.Config.RadarStereoSound;
|
MainClass.Config.RadarStereoSound = !MainClass.Config.RadarStereoSound;
|
||||||
MainClass.ModHelper.WriteConfig(MainClass.Config);
|
helper.WriteConfig(MainClass.Config);
|
||||||
|
|
||||||
MainClass.DebugLog("Stereo sound is " + (MainClass.Config.RadarStereoSound ? "on" : "off"));
|
MainClass.DebugLog("Stereo sound is " + (MainClass.Config.RadarStereoSound ? "on" : "off"));
|
||||||
});
|
});
|
||||||
|
@ -467,7 +469,7 @@ namespace stardew_access
|
||||||
|
|
||||||
helper.ConsoleCommands.Add("refsr", "Refresh screen reader", (string commmand, string[] args) =>
|
helper.ConsoleCommands.Add("refsr", "Refresh screen reader", (string commmand, string[] args) =>
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().InitializeScreenReader();
|
MainClass.ScreenReader.InitializeScreenReader();
|
||||||
|
|
||||||
MainClass.DebugLog("Screen Reader refreshed!");
|
MainClass.DebugLog("Screen Reader refreshed!");
|
||||||
});
|
});
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace stardew_access.Features
|
||||||
if (Game1.player == null)
|
if (Game1.player == null)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
int maxStamina = Game1.player.maxStamina;
|
int maxStamina = Game1.player.maxStamina.Value;
|
||||||
int currentStamine = (int)Game1.player.stamina;
|
int currentStamine = (int)Game1.player.stamina;
|
||||||
|
|
||||||
int staminaPercentage = (int)(currentStamine * 100) / maxStamina;
|
int staminaPercentage = (int)(currentStamine * 100) / maxStamina;
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace stardew_access.Features
|
||||||
return;
|
return;
|
||||||
|
|
||||||
previousSlotItem = currentSlotItem;
|
previousSlotItem = currentSlotItem;
|
||||||
MainClass.GetScreenReader().Say($"{currentSlotItem.DisplayName} Selected", true);
|
MainClass.ScreenReader.Say($"{currentSlotItem.DisplayName} Selected", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Narrates current location's name
|
// Narrates current location's name
|
||||||
|
@ -38,7 +38,7 @@ namespace stardew_access.Features
|
||||||
return;
|
return;
|
||||||
|
|
||||||
previousLocation = currentLocation;
|
previousLocation = currentLocation;
|
||||||
MainClass.GetScreenReader().Say($"{currentLocation.Name} Entered", true);
|
MainClass.ScreenReader.Say($"{currentLocation.Name} Entered", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SnapMouseToPlayer()
|
public static void SnapMouseToPlayer()
|
||||||
|
@ -88,7 +88,7 @@ namespace stardew_access.Features
|
||||||
{
|
{
|
||||||
MainClass.hudMessageQueryKey = searchQuery;
|
MainClass.hudMessageQueryKey = searchQuery;
|
||||||
|
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,8 +47,8 @@ namespace stardew_access.Features
|
||||||
{
|
{
|
||||||
if (!manuallyTriggered && prevTile != tile)
|
if (!manuallyTriggered && prevTile != tile)
|
||||||
{
|
{
|
||||||
if (MainClass.GetScreenReader() != null)
|
if (MainClass.ScreenReader != null)
|
||||||
MainClass.GetScreenReader().PrevTextTile = " ";
|
MainClass.ScreenReader.PrevTextTile = " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isColliding = isCollidingAtTile(x, y);
|
bool isColliding = isCollidingAtTile(x, y);
|
||||||
|
@ -57,11 +57,11 @@ namespace stardew_access.Features
|
||||||
|
|
||||||
#region Narrate toSpeak
|
#region Narrate toSpeak
|
||||||
if (toSpeak != null)
|
if (toSpeak != null)
|
||||||
if (MainClass.GetScreenReader() != null)
|
if (MainClass.ScreenReader != null)
|
||||||
if (manuallyTriggered)
|
if (manuallyTriggered)
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
else
|
else
|
||||||
MainClass.GetScreenReader().SayWithTileQuery(toSpeak, x, y, true);
|
MainClass.ScreenReader.SayWithTileQuery(toSpeak, x, y, true);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Play colliding sound effect
|
#region Play colliding sound effect
|
||||||
|
@ -202,13 +202,13 @@ namespace stardew_access.Features
|
||||||
{
|
{
|
||||||
string? toReturn = null;
|
string? toReturn = null;
|
||||||
Bush bush = (Bush)Game1.currentLocation.getLargeTerrainFeatureAt(x, y);
|
Bush bush = (Bush)Game1.currentLocation.getLargeTerrainFeatureAt(x, y);
|
||||||
int size = bush.size;
|
int size = bush.size.Value;
|
||||||
|
|
||||||
#region Check if bush is harvestable or not
|
#region Check if bush is harvestable or not
|
||||||
if (!bush.townBush && (int)bush.tileSheetOffset == 1 && bush.inBloom(Game1.GetSeasonForLocation(Game1.currentLocation), Game1.dayOfMonth))
|
if (!bush.townBush.Value && (int)bush.tileSheetOffset.Value == 1 && bush.inBloom(Game1.GetSeasonForLocation(Game1.currentLocation), Game1.dayOfMonth))
|
||||||
{
|
{
|
||||||
// Taken from the game's code
|
// Taken from the game's code
|
||||||
string season = ((int)bush.overrideSeason == -1) ? Game1.GetSeasonForLocation(Game1.currentLocation) : Utility.getSeasonNameFromNumber(bush.overrideSeason);
|
string season = ((int)bush.overrideSeason.Value == -1) ? Game1.GetSeasonForLocation(Game1.currentLocation) : Utility.getSeasonNameFromNumber(bush.overrideSeason.Value);
|
||||||
int shakeOff = -1;
|
int shakeOff = -1;
|
||||||
if (!(season == "spring"))
|
if (!(season == "spring"))
|
||||||
{
|
{
|
||||||
|
@ -238,9 +238,9 @@ namespace stardew_access.Features
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
if (bush.townBush)
|
if (bush.townBush.Value)
|
||||||
toReturn = $"{toReturn} Town Bush";
|
toReturn = $"{toReturn} Town Bush";
|
||||||
else if (bush.greenhouseBush)
|
else if (bush.greenhouseBush.Value)
|
||||||
toReturn = $"{toReturn} Greenhouse Bush";
|
toReturn = $"{toReturn} Greenhouse Bush";
|
||||||
else
|
else
|
||||||
toReturn = $"{toReturn} Bush";
|
toReturn = $"{toReturn} Bush";
|
||||||
|
@ -409,7 +409,7 @@ namespace stardew_access.Features
|
||||||
HoeDirt dirt = (HoeDirt)terrain.Get();
|
HoeDirt dirt = (HoeDirt)terrain.Get();
|
||||||
if (dirt.crop != null)
|
if (dirt.crop != null)
|
||||||
{
|
{
|
||||||
string cropName = Game1.objectInformation[dirt.crop.indexOfHarvest].Split('/')[0];
|
string cropName = Game1.objectInformation[dirt.crop.indexOfHarvest.Value].Split('/')[0];
|
||||||
toReturn = $"{cropName}";
|
toReturn = $"{cropName}";
|
||||||
|
|
||||||
bool isWatered = dirt.state.Value == HoeDirt.watered;
|
bool isWatered = dirt.state.Value == HoeDirt.watered;
|
||||||
|
@ -633,7 +633,7 @@ namespace stardew_access.Features
|
||||||
if (machine is CrabPot crabPot)
|
if (machine is CrabPot crabPot)
|
||||||
if (crabPot.bait.Value is not null && crabPot.heldObject.Value is null)
|
if (crabPot.bait.Value is not null && crabPot.heldObject.Value is null)
|
||||||
return MachineState.Busy;
|
return MachineState.Busy;
|
||||||
return GetMachineState(machine.readyForHarvest.Value, machine.MinutesUntilReady, machine.heldObject);
|
return GetMachineState(machine.readyForHarvest.Value, machine.MinutesUntilReady, machine.heldObject.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static MachineState GetMachineState(bool readyForHarvest, int minutesUntilReady, StardewValley.Object? heldObject)
|
private static MachineState GetMachineState(bool readyForHarvest, int minutesUntilReady, StardewValley.Object? heldObject)
|
||||||
|
|
|
@ -12,16 +12,16 @@ namespace stardew_access
|
||||||
{
|
{
|
||||||
public class MainClass : Mod
|
public class MainClass : Mod
|
||||||
{
|
{
|
||||||
#region Global Vars
|
#region Global Vars & Properties
|
||||||
private static ModConfig config;
|
private static ModConfig? config;
|
||||||
private Harmony? harmony;
|
private Harmony? harmony;
|
||||||
private static IMonitor? monitor;
|
private static IMonitor? monitor;
|
||||||
private static Radar? radarFeature;
|
private static Radar? radarFeature;
|
||||||
private static IScreenReader? screenReader;
|
private static IScreenReader? screenReader;
|
||||||
private static IModHelper modHelper;
|
private static IModHelper? modHelper;
|
||||||
|
|
||||||
internal static ModConfig Config { get => config; set => config = value; }
|
internal static ModConfig Config { get => config; set => config = value; }
|
||||||
public static IModHelper ModHelper { get => modHelper; }
|
public static IModHelper? ModHelper { get => modHelper; }
|
||||||
public static Radar RadarFeature
|
public static Radar RadarFeature
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -35,25 +35,21 @@ namespace stardew_access
|
||||||
public static string hudMessageQueryKey = "";
|
public static string hudMessageQueryKey = "";
|
||||||
public static bool isNarratingHudMessage = false;
|
public static bool isNarratingHudMessage = false;
|
||||||
public static bool radarDebug = false;
|
public static bool radarDebug = false;
|
||||||
|
|
||||||
|
public static IScreenReader ScreenReader
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (screenReader == null)
|
||||||
|
screenReader = new ScreenReaderController().Initialize();
|
||||||
|
|
||||||
|
return screenReader;
|
||||||
|
}
|
||||||
|
|
||||||
|
set => screenReader = value;
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public static IScreenReader GetScreenReader()
|
|
||||||
{
|
|
||||||
if (screenReader == null)
|
|
||||||
screenReader = new ScreenReaderController().Initialize();
|
|
||||||
return screenReader;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SetScreenReader(IScreenReader value)
|
|
||||||
{
|
|
||||||
screenReader = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void SetMonitor(IMonitor value)
|
|
||||||
{
|
|
||||||
monitor = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*********
|
/*********
|
||||||
** Public methods
|
** Public methods
|
||||||
*********/
|
*********/
|
||||||
|
@ -64,12 +60,12 @@ namespace stardew_access
|
||||||
#region Initializations
|
#region Initializations
|
||||||
Config = helper.ReadConfig<ModConfig>();
|
Config = helper.ReadConfig<ModConfig>();
|
||||||
|
|
||||||
SetMonitor(base.Monitor); // Inititalize monitor
|
monitor = base.Monitor; // Inititalize monitor
|
||||||
modHelper = helper;
|
modHelper = helper;
|
||||||
|
|
||||||
Game1.options.setGamepadMode("force_on");
|
Game1.options.setGamepadMode("force_on");
|
||||||
|
|
||||||
SetScreenReader(new ScreenReaderController().Initialize());
|
ScreenReader = new ScreenReaderController().Initialize();
|
||||||
|
|
||||||
CustomSoundEffects.Initialize();
|
CustomSoundEffects.Initialize();
|
||||||
|
|
||||||
|
@ -99,8 +95,8 @@ namespace stardew_access
|
||||||
public void OnExit(object? sender, EventArgs? e)
|
public void OnExit(object? sender, EventArgs? e)
|
||||||
{
|
{
|
||||||
// Don't if this ever gets called or not but, just in case if it does.
|
// Don't if this ever gets called or not but, just in case if it does.
|
||||||
if (GetScreenReader() != null)
|
if (ScreenReader != null)
|
||||||
GetScreenReader().CloseScreenReader();
|
ScreenReader.CloseScreenReader();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>Returns the Screen Reader class for other mods to use.</summary>
|
/// <summary>Returns the Screen Reader class for other mods to use.</summary>
|
||||||
|
@ -188,7 +184,7 @@ namespace stardew_access
|
||||||
if (Config.LocationKey.JustPressed())
|
if (Config.LocationKey.JustPressed())
|
||||||
{
|
{
|
||||||
string toSpeak = $"{Game1.currentLocation.Name}";
|
string toSpeak = $"{Game1.currentLocation.Name}";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -205,7 +201,7 @@ namespace stardew_access
|
||||||
toSpeak = $"{CurrentPlayer.getPositionX()}, {CurrentPlayer.getPositionY()}";
|
toSpeak = $"{CurrentPlayer.getPositionX()}, {CurrentPlayer.getPositionY()}";
|
||||||
}
|
}
|
||||||
|
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,7 +209,7 @@ namespace stardew_access
|
||||||
if (Config.HealthNStaminaKey.JustPressed())
|
if (Config.HealthNStaminaKey.JustPressed())
|
||||||
{
|
{
|
||||||
string toSpeak = $"Health is {CurrentPlayer.getHealth()} and Stamina is {CurrentPlayer.getStamina()}";
|
string toSpeak = $"Health is {CurrentPlayer.getHealth()} and Stamina is {CurrentPlayer.getStamina()}";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -221,7 +217,7 @@ namespace stardew_access
|
||||||
if (Config.MoneyKey.JustPressed())
|
if (Config.MoneyKey.JustPressed())
|
||||||
{
|
{
|
||||||
string toSpeak = $"You have {CurrentPlayer.getMoney()}g";
|
string toSpeak = $"You have {CurrentPlayer.getMoney()}g";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -229,7 +225,7 @@ namespace stardew_access
|
||||||
if (Config.TimeNSeasonKey.JustPressed())
|
if (Config.TimeNSeasonKey.JustPressed())
|
||||||
{
|
{
|
||||||
string toSpeak = $"Time is {CurrentPlayer.getTimeOfDay()} and it is {CurrentPlayer.getDay()} {CurrentPlayer.getDate()} of {CurrentPlayer.getSeason()}";
|
string toSpeak = $"Time is {CurrentPlayer.getTimeOfDay()} and it is {CurrentPlayer.getDay()} {CurrentPlayer.getDate()} of {CurrentPlayer.getSeason()}";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace stardew_access.Patches
|
||||||
firstTimeInNamingMenu = false;
|
firstTimeInNamingMenu = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (___onFarm && !___namingAnimal)
|
else if (___onFarm && !___namingAnimal)
|
||||||
|
@ -90,7 +90,7 @@ namespace stardew_access.Patches
|
||||||
if (purchaseAnimalMenuQuery != toSpeak)
|
if (purchaseAnimalMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
purchaseAnimalMenuQuery = toSpeak;
|
purchaseAnimalMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -180,7 +180,7 @@ namespace stardew_access.Patches
|
||||||
if (carpenterMenuQuery != toSpeak)
|
if (carpenterMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
carpenterMenuQuery = toSpeak;
|
carpenterMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -191,7 +191,7 @@ namespace stardew_access.Patches
|
||||||
if (carpenterMenuQuery != toSpeak)
|
if (carpenterMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
carpenterMenuQuery = toSpeak;
|
carpenterMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ namespace stardew_access.Patches
|
||||||
if (carpenterMenuQuery != toSpeak)
|
if (carpenterMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
carpenterMenuQuery = toSpeak;
|
carpenterMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -213,7 +213,7 @@ namespace stardew_access.Patches
|
||||||
if (carpenterMenuQuery != toSpeak)
|
if (carpenterMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
carpenterMenuQuery = toSpeak;
|
carpenterMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -224,7 +224,7 @@ namespace stardew_access.Patches
|
||||||
if (carpenterMenuQuery != toSpeak)
|
if (carpenterMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
carpenterMenuQuery = toSpeak;
|
carpenterMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@ namespace stardew_access.Patches
|
||||||
if (carpenterMenuQuery != toSpeak)
|
if (carpenterMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
carpenterMenuQuery = toSpeak;
|
carpenterMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -246,7 +246,7 @@ namespace stardew_access.Patches
|
||||||
if (carpenterMenuQuery != toSpeak)
|
if (carpenterMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
carpenterMenuQuery = toSpeak;
|
carpenterMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ namespace stardew_access.Patches
|
||||||
private static async void SayBlueprintInfo(string info)
|
private static async void SayBlueprintInfo(string info)
|
||||||
{
|
{
|
||||||
isSayingBlueprintInfo = true;
|
isSayingBlueprintInfo = true;
|
||||||
MainClass.GetScreenReader().Say(info, true);
|
MainClass.ScreenReader.Say(info, true);
|
||||||
await Task.Delay(300);
|
await Task.Delay(300);
|
||||||
isSayingBlueprintInfo = false;
|
isSayingBlueprintInfo = false;
|
||||||
}
|
}
|
||||||
|
@ -300,7 +300,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
if (isDemolishing && toDemolish != null && farm.buildings.Contains(toDemolish))
|
if (isDemolishing && toDemolish != null && farm.buildings.Contains(toDemolish))
|
||||||
{
|
{
|
||||||
if ((int)toDemolish.daysOfConstructionLeft > 0 || (int)toDemolish.daysUntilUpgrade > 0)
|
if ((int)toDemolish.daysOfConstructionLeft.Value > 0 || (int)toDemolish.daysUntilUpgrade.Value > 0)
|
||||||
{
|
{
|
||||||
response = Game1.content.LoadString("Strings\\UI:Carpenter_CantDemolish_DuringConstruction");
|
response = Game1.content.LoadString("Strings\\UI:Carpenter_CantDemolish_DuringConstruction");
|
||||||
}
|
}
|
||||||
|
@ -345,8 +345,8 @@ namespace stardew_access.Patches
|
||||||
}
|
}
|
||||||
if (farm.destroyStructure(toDemolish))
|
if (farm.destroyStructure(toDemolish))
|
||||||
{
|
{
|
||||||
_ = (int)toDemolish.tileY;
|
_ = (int)toDemolish.tileY.Value;
|
||||||
_ = (int)toDemolish.tilesHigh;
|
_ = (int)toDemolish.tilesHigh.Value;
|
||||||
Game1.flashAlpha = 1f;
|
Game1.flashAlpha = 1f;
|
||||||
toDemolish.showDestroyedAnimation(Game1.getFarm());
|
toDemolish.showDestroyedAnimation(Game1.getFarm());
|
||||||
Game1.playSound("explosion");
|
Game1.playSound("explosion");
|
||||||
|
@ -356,7 +356,7 @@ namespace stardew_access.Patches
|
||||||
// freeze = true;
|
// freeze = true;
|
||||||
if (chest != null)
|
if (chest != null)
|
||||||
{
|
{
|
||||||
farm.objects[new Vector2((int)toDemolish.tileX + (int)toDemolish.tilesWide / 2, (int)toDemolish.tileY + (int)toDemolish.tilesHigh / 2)] = chest;
|
farm.objects[new Vector2((int)toDemolish.tileX.Value + (int)toDemolish.tilesWide.Value / 2, (int)toDemolish.tileY.Value + (int)toDemolish.tilesHigh.Value / 2)] = chest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -385,7 +385,7 @@ namespace stardew_access.Patches
|
||||||
if (toDemolish != null && toDemolish.indoors.Value is Cabin)
|
if (toDemolish != null && toDemolish.indoors.Value is Cabin)
|
||||||
{
|
{
|
||||||
Cabin cabin = (Cabin)toDemolish.indoors.Value;
|
Cabin cabin = (Cabin)toDemolish.indoors.Value;
|
||||||
if (cabin.farmhand.Value != null && (bool)cabin.farmhand.Value.isCustomized)
|
if (cabin.farmhand.Value != null && (bool)cabin.farmhand.Value.isCustomized.Value)
|
||||||
{
|
{
|
||||||
Game1.currentLocation.createQuestionDialogue(Game1.content.LoadString("Strings\\UI:Carpenter_DemolishCabinConfirm", cabin.farmhand.Value.Name), Game1.currentLocation.createYesNoResponses(), delegate (Farmer f, string answer)
|
Game1.currentLocation.createQuestionDialogue(Game1.content.LoadString("Strings\\UI:Carpenter_DemolishCabinConfirm", cabin.farmhand.Value.Name), Game1.currentLocation.createYesNoResponses(), delegate (Farmer f, string answer)
|
||||||
{
|
{
|
||||||
|
@ -458,7 +458,7 @@ namespace stardew_access.Patches
|
||||||
Game1.playSound("axe");
|
Game1.playSound("axe");
|
||||||
DelayedAction.functionAfterDelay(carpenterMenu.returnToCarpentryMenuAfterSuccessfulBuild, 1500);
|
DelayedAction.functionAfterDelay(carpenterMenu.returnToCarpentryMenuAfterSuccessfulBuild, 1500);
|
||||||
// freeze = true;
|
// freeze = true;
|
||||||
// Game1.multiplayer.globalChatInfoMessage("BuildingBuild", Game1.player.Name, Utility.AOrAn(carpenterMenu.CurrentBlueprint.displayName), carpenterMenu.CurrentBlueprint.displayName, Game1.player.farmName);
|
// Game1.multiplayer.globalChatInfoMessage("BuildingBuild", Game1.player.Name, Utility.AOrAn(carpenterMenu.CurrentBlueprint.displayName), carpenterMenu.CurrentBlueprint.displayName, Game1.player.farmName.Value);
|
||||||
}
|
}
|
||||||
else if (toUpgrade != null)
|
else if (toUpgrade != null)
|
||||||
{
|
{
|
||||||
|
@ -517,7 +517,7 @@ namespace stardew_access.Patches
|
||||||
string? name = buildingToMove.nameOfIndoorsWithoutUnique;
|
string? name = buildingToMove.nameOfIndoorsWithoutUnique;
|
||||||
name = (name == "null") ? buildingToMove.buildingType.Value : name;
|
name = (name == "null") ? buildingToMove.buildingType.Value : name;
|
||||||
|
|
||||||
if ((int)buildingToMove.daysOfConstructionLeft > 0)
|
if ((int)buildingToMove.daysOfConstructionLeft.Value > 0)
|
||||||
{
|
{
|
||||||
buildingToMove = null;
|
buildingToMove = null;
|
||||||
return "Building under construction, cannot move";
|
return "Building under construction, cannot move";
|
||||||
|
@ -566,8 +566,8 @@ namespace stardew_access.Patches
|
||||||
if (purchaseAnimalsMenu == null)
|
if (purchaseAnimalsMenu == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int x = (selection.tileX * Game1.tileSize) - Game1.viewport.X;
|
int x = (selection.tileX.Value * Game1.tileSize) - Game1.viewport.X;
|
||||||
int y = (selection.tileY * Game1.tileSize) - Game1.viewport.Y;
|
int y = (selection.tileY.Value * Game1.tileSize) - Game1.viewport.Y;
|
||||||
purchaseAnimalsMenu.receiveLeftClick(x, y);
|
purchaseAnimalsMenu.receiveLeftClick(x, y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ namespace stardew_access.Patches
|
||||||
toSpeak += $"{message.message}, ";
|
toSpeak += $"{message.message}, ";
|
||||||
});
|
});
|
||||||
if (toSpeak != " ")
|
if (toSpeak != " ")
|
||||||
MainClass.GetScreenReader().SayWithChatChecker(toSpeak, false);
|
MainClass.ScreenReader.SayWithChatChecker(toSpeak, false);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ namespace stardew_access.Patches
|
||||||
toSpeak += $"{message.message}, ";
|
toSpeak += $"{message.message}, ";
|
||||||
});
|
});
|
||||||
|
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace stardew_access.Patches
|
||||||
else
|
else
|
||||||
toSpeak = response;
|
toSpeak = response;
|
||||||
|
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -65,7 +65,7 @@ namespace stardew_access.Patches
|
||||||
if (currentDialogue != dialogueText)
|
if (currentDialogue != dialogueText)
|
||||||
{
|
{
|
||||||
currentDialogue = dialogueText;
|
currentDialogue = dialogueText;
|
||||||
MainClass.GetScreenReader().Say(dialogueText, true);
|
MainClass.ScreenReader.Say(dialogueText, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ namespace stardew_access.Patches
|
||||||
else
|
else
|
||||||
toSpeak = response;
|
toSpeak = response;
|
||||||
|
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -114,7 +114,7 @@ namespace stardew_access.Patches
|
||||||
if (currentDialogue != dialogueText)
|
if (currentDialogue != dialogueText)
|
||||||
{
|
{
|
||||||
currentDialogue = dialogueText;
|
currentDialogue = dialogueText;
|
||||||
MainClass.GetScreenReader().Say(dialogueText, true);
|
MainClass.ScreenReader.Say(dialogueText, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ namespace stardew_access.Patches
|
||||||
if (currentDialogue != __instance.getCurrentString())
|
if (currentDialogue != __instance.getCurrentString())
|
||||||
{
|
{
|
||||||
currentDialogue = __instance.getCurrentString();
|
currentDialogue = __instance.getCurrentString();
|
||||||
MainClass.GetScreenReader().Say(__instance.getCurrentString(), true);
|
MainClass.ScreenReader.Say(__instance.getCurrentString(), true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -316,9 +316,9 @@ namespace stardew_access.Patches
|
||||||
if (toSpeak.ToString() != " ")
|
if (toSpeak.ToString() != " ")
|
||||||
{
|
{
|
||||||
if (Context.IsPlayerFree)
|
if (Context.IsPlayerFree)
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak.ToString(), true); // Normal Checker
|
MainClass.ScreenReader.SayWithChecker(toSpeak.ToString(), true); // Normal Checker
|
||||||
else
|
else
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak.ToString(), true); // Menu Checker
|
MainClass.ScreenReader.SayWithMenuChecker(toSpeak.ToString(), true); // Menu Checker
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -380,7 +380,7 @@ namespace stardew_access.Patches
|
||||||
if (__instance.mailMessage.Count > 1)
|
if (__instance.mailMessage.Count > 1)
|
||||||
toSpeak = $"Page {__instance.page + 1} of {__instance.mailMessage.Count}:\n\t{toSpeak}";
|
toSpeak = $"Page {__instance.page + 1} of {__instance.mailMessage.Count}:\n\t{toSpeak}";
|
||||||
|
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -393,17 +393,17 @@ namespace stardew_access.Patches
|
||||||
string label = c.label;
|
string label = c.label;
|
||||||
|
|
||||||
if (c.containsPoint(x, y))
|
if (c.containsPoint(x, y))
|
||||||
MainClass.GetScreenReader().SayWithChecker($"Grab: {name} \t\n {label}", false);
|
MainClass.ScreenReader.SayWithChecker($"Grab: {name} \t\n {label}", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Narrate buttons
|
#region Narrate buttons
|
||||||
if (__instance.backButton != null && __instance.backButton.visible && __instance.backButton.containsPoint(x, y))
|
if (__instance.backButton != null && __instance.backButton.visible && __instance.backButton.containsPoint(x, y))
|
||||||
MainClass.GetScreenReader().SayWithChecker($"Previous page button", false);
|
MainClass.ScreenReader.SayWithChecker($"Previous page button", false);
|
||||||
|
|
||||||
if (__instance.forwardButton != null && __instance.forwardButton.visible && __instance.forwardButton.containsPoint(x, y))
|
if (__instance.forwardButton != null && __instance.forwardButton.visible && __instance.forwardButton.containsPoint(x, y))
|
||||||
MainClass.GetScreenReader().SayWithChecker($"Next page button", false);
|
MainClass.ScreenReader.SayWithChecker($"Next page button", false);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ namespace stardew_access.Patches
|
||||||
if (junimoNoteMenuQuery != toSpeak)
|
if (junimoNoteMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
junimoNoteMenuQuery = toSpeak;
|
junimoNoteMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ namespace stardew_access.Patches
|
||||||
if (junimoNoteMenuQuery != toSpeak)
|
if (junimoNoteMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
junimoNoteMenuQuery = toSpeak;
|
junimoNoteMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,7 @@ namespace stardew_access.Patches
|
||||||
if (junimoNoteMenuQuery != toSpeak)
|
if (junimoNoteMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
junimoNoteMenuQuery = toSpeak;
|
junimoNoteMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ namespace stardew_access.Patches
|
||||||
if (junimoNoteMenuQuery != toSpeak)
|
if (junimoNoteMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
junimoNoteMenuQuery = toSpeak;
|
junimoNoteMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ namespace stardew_access.Patches
|
||||||
if (junimoNoteMenuQuery != toSpeak)
|
if (junimoNoteMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
junimoNoteMenuQuery = toSpeak;
|
junimoNoteMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -140,12 +140,12 @@ namespace stardew_access.Patches
|
||||||
else if (isBackPressed && __instance.backButton != null && !__instance.backButton.containsPoint(x, y))
|
else if (isBackPressed && __instance.backButton != null && !__instance.backButton.containsPoint(x, y))
|
||||||
{
|
{
|
||||||
__instance.backButton.snapMouseCursorToCenter();
|
__instance.backButton.snapMouseCursorToCenter();
|
||||||
MainClass.GetScreenReader().Say("Back Button", true);
|
MainClass.ScreenReader.Say("Back Button", true);
|
||||||
}
|
}
|
||||||
else if (isPPressed && __instance.purchaseButton != null && !__instance.purchaseButton.containsPoint(x, y))
|
else if (isPPressed && __instance.purchaseButton != null && !__instance.purchaseButton.containsPoint(x, y))
|
||||||
{
|
{
|
||||||
__instance.purchaseButton.snapMouseCursorToCenter();
|
__instance.purchaseButton.snapMouseCursorToCenter();
|
||||||
MainClass.GetScreenReader().Say("Purchase Button", true);
|
MainClass.ScreenReader.Say("Purchase Button", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string reward = __instance.getRewardNameForArea(___whichArea);
|
string reward = __instance.getRewardNameForArea(___whichArea);
|
||||||
|
@ -215,7 +215,7 @@ namespace stardew_access.Patches
|
||||||
toSpeak = $"Completed {toSpeak}";
|
toSpeak = $"Completed {toSpeak}";
|
||||||
|
|
||||||
c.snapMouseCursorToCenter();
|
c.snapMouseCursorToCenter();
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -250,7 +250,7 @@ namespace stardew_access.Patches
|
||||||
}
|
}
|
||||||
|
|
||||||
c.snapMouseCursorToCenter();
|
c.snapMouseCursorToCenter();
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -303,7 +303,7 @@ namespace stardew_access.Patches
|
||||||
toSpeak = "Empty Slot";
|
toSpeak = "Empty Slot";
|
||||||
}
|
}
|
||||||
c.snapMouseCursorToCenter();
|
c.snapMouseCursorToCenter();
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -401,7 +401,7 @@ namespace stardew_access.Patches
|
||||||
if (socialPageQuery != toSpeak)
|
if (socialPageQuery != toSpeak)
|
||||||
{
|
{
|
||||||
socialPageQuery = toSpeak;
|
socialPageQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -446,7 +446,7 @@ namespace stardew_access.Patches
|
||||||
if (socialPageQuery != toSpeak)
|
if (socialPageQuery != toSpeak)
|
||||||
{
|
{
|
||||||
socialPageQuery = toSpeak;
|
socialPageQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -490,7 +490,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
shopMenuQueryKey = toSpeak;
|
shopMenuQueryKey = toSpeak;
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
Game1.playSound("drop_item");
|
Game1.playSound("drop_item");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -502,7 +502,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
shopMenuQueryKey = toSpeak;
|
shopMenuQueryKey = toSpeak;
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -513,7 +513,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
shopMenuQueryKey = toSpeak;
|
shopMenuQueryKey = toSpeak;
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -560,7 +560,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
shopMenuQueryKey = toSpeak;
|
shopMenuQueryKey = toSpeak;
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -589,7 +589,7 @@ namespace stardew_access.Patches
|
||||||
if (gameMenuQueryKey != toSpeak)
|
if (gameMenuQueryKey != toSpeak)
|
||||||
{
|
{
|
||||||
gameMenuQueryKey = toSpeak;
|
gameMenuQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -618,7 +618,7 @@ namespace stardew_access.Patches
|
||||||
if (geodeMenuQueryKey != toSpeak)
|
if (geodeMenuQueryKey != toSpeak)
|
||||||
{
|
{
|
||||||
geodeMenuQueryKey = toSpeak;
|
geodeMenuQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -631,7 +631,7 @@ namespace stardew_access.Patches
|
||||||
if (geodeMenuQueryKey != toSpeak)
|
if (geodeMenuQueryKey != toSpeak)
|
||||||
{
|
{
|
||||||
geodeMenuQueryKey = toSpeak;
|
geodeMenuQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -643,7 +643,7 @@ namespace stardew_access.Patches
|
||||||
if (geodeMenuQueryKey != toSpeak)
|
if (geodeMenuQueryKey != toSpeak)
|
||||||
{
|
{
|
||||||
geodeMenuQueryKey = toSpeak;
|
geodeMenuQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
Game1.playSound("drop_item");
|
Game1.playSound("drop_item");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -656,7 +656,7 @@ namespace stardew_access.Patches
|
||||||
if (geodeMenuQueryKey != toSpeak)
|
if (geodeMenuQueryKey != toSpeak)
|
||||||
{
|
{
|
||||||
geodeMenuQueryKey = toSpeak;
|
geodeMenuQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -668,7 +668,7 @@ namespace stardew_access.Patches
|
||||||
if (geodeMenuQueryKey != toSpeak)
|
if (geodeMenuQueryKey != toSpeak)
|
||||||
{
|
{
|
||||||
geodeMenuQueryKey = toSpeak;
|
geodeMenuQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -713,7 +713,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -725,7 +725,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -738,7 +738,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -751,7 +751,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -764,7 +764,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -778,7 +778,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -792,7 +792,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -805,7 +805,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
Game1.playSound("drop_item");
|
Game1.playSound("drop_item");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -847,7 +847,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -987,7 +987,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
craftingPageQueryKey = toSpeak;
|
craftingPageQueryKey = toSpeak;
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -999,7 +999,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
craftingPageQueryKey = toSpeak;
|
craftingPageQueryKey = toSpeak;
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1011,7 +1011,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
craftingPageQueryKey = toSpeak;
|
craftingPageQueryKey = toSpeak;
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1023,7 +1023,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
craftingPageQueryKey = toSpeak;
|
craftingPageQueryKey = toSpeak;
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
Game1.playSound("drop_item");
|
Game1.playSound("drop_item");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -1057,20 +1057,22 @@ namespace stardew_access.Patches
|
||||||
|
|
||||||
#region Health & stamina and buff items (effects like +1 walking speed)
|
#region Health & stamina and buff items (effects like +1 walking speed)
|
||||||
Item producesItem = ___hoverRecipe.createItem();
|
Item producesItem = ___hoverRecipe.createItem();
|
||||||
if (producesItem is StardewValley.Object && ((StardewValley.Object)producesItem).Edibility != -300)
|
StardewValley.Object? producesItemObject = ((StardewValley.Object)producesItem);
|
||||||
|
|
||||||
|
if (producesItem is StardewValley.Object && producesItemObject.Edibility != -300)
|
||||||
{
|
{
|
||||||
int stamina_recovery = ((StardewValley.Object)producesItem).staminaRecoveredOnConsumption();
|
int stamina_recovery = producesItemObject.staminaRecoveredOnConsumption();
|
||||||
buffs += $"{stamina_recovery} Energy";
|
buffs += $"{stamina_recovery} Energy";
|
||||||
if (stamina_recovery >= 0)
|
if (stamina_recovery >= 0)
|
||||||
{
|
{
|
||||||
int health_recovery = ((StardewValley.Object)producesItem).healthRecoveredOnConsumption();
|
int health_recovery = producesItemObject.healthRecoveredOnConsumption();
|
||||||
buffs += $"\n{health_recovery} Health";
|
buffs += $"\n{health_recovery} Health";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// These variables are taken from the game's code itself (IClickableMenu.cs -> 1016 line)
|
// These variables are taken from the game's code itself (IClickableMenu.cs -> 1016 line)
|
||||||
bool edibleItem = producesItem != null && producesItem is StardewValley.Object && (int)((StardewValley.Object)producesItem).Edibility != -300;
|
bool edibleItem = producesItem != null && producesItem is StardewValley.Object && (int)producesItemObject.Edibility != -300;
|
||||||
string[]? buffIconsToDisplay = (edibleItem && Game1.objectInformation[((StardewValley.Object)producesItem).ParentSheetIndex].Split('/').Length > 7)
|
string[]? buffIconsToDisplay = (producesItem != null && edibleItem && Game1.objectInformation[producesItemObject.ParentSheetIndex].Split('/').Length > 7)
|
||||||
? producesItem.ModifyItemBuffs(Game1.objectInformation[((StardewValley.Object)producesItem).ParentSheetIndex].Split('/')[7].Split(' '))
|
? producesItem.ModifyItemBuffs(Game1.objectInformation[producesItemObject.ParentSheetIndex].Split('/')[7].Split(' '))
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
if (buffIconsToDisplay != null)
|
if (buffIconsToDisplay != null)
|
||||||
|
@ -1103,7 +1105,7 @@ namespace stardew_access.Patches
|
||||||
craftingPageQueryKey = toSpeak;
|
craftingPageQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1128,7 +1130,7 @@ namespace stardew_access.Patches
|
||||||
craftingPageQueryKey = query;
|
craftingPageQueryKey = query;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say("unknown recipe", true);
|
MainClass.ScreenReader.Say("unknown recipe", true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1195,7 +1197,7 @@ namespace stardew_access.Patches
|
||||||
inventoryPageQueryKey = toSpeak;
|
inventoryPageQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
Game1.playSound("drop_item");
|
Game1.playSound("drop_item");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -1209,7 +1211,7 @@ namespace stardew_access.Patches
|
||||||
inventoryPageQueryKey = toSpeak;
|
inventoryPageQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1222,7 +1224,7 @@ namespace stardew_access.Patches
|
||||||
inventoryPageQueryKey = toSpeak;
|
inventoryPageQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1235,7 +1237,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1249,7 +1251,7 @@ namespace stardew_access.Patches
|
||||||
itemGrabMenuQueryKey = toSpeak;
|
itemGrabMenuQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1345,7 +1347,7 @@ namespace stardew_access.Patches
|
||||||
inventoryPageQueryKey = toSpeak;
|
inventoryPageQueryKey = toSpeak;
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
hoveredItemQueryKey = "";
|
hoveredItemQueryKey = "";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1408,7 +1410,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
optionsPageQueryKey = toSpeak;
|
optionsPageQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1432,7 +1434,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
exitPageQueryKey = toSpeak;
|
exitPageQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1444,7 +1446,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
gameMenuQueryKey = "";
|
gameMenuQueryKey = "";
|
||||||
exitPageQueryKey = toSpeak;
|
exitPageQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1583,7 +1585,7 @@ namespace stardew_access.Patches
|
||||||
if (hoveredItemQueryKey != $"{toSpeak}:{i}")
|
if (hoveredItemQueryKey != $"{toSpeak}:{i}")
|
||||||
{
|
{
|
||||||
hoveredItemQueryKey = $"{toSpeak}:{i}";
|
hoveredItemQueryKey = $"{toSpeak}:{i}";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ namespace stardew_access.Patches
|
||||||
int age = (___animal.GetDaysOwned() + 1) / 28 + 1;
|
int age = (___animal.GetDaysOwned() + 1) / 28 + 1;
|
||||||
string ageText = (age <= 1) ? Game1.content.LoadString("Strings\\UI:AnimalQuery_Age1") : Game1.content.LoadString("Strings\\UI:AnimalQuery_AgeN", age);
|
string ageText = (age <= 1) ? Game1.content.LoadString("Strings\\UI:AnimalQuery_Age1") : Game1.content.LoadString("Strings\\UI:AnimalQuery_AgeN", age);
|
||||||
string parent = "";
|
string parent = "";
|
||||||
if ((int)___animal.age < (byte)___animal.ageWhenMature)
|
if ((int)___animal.age.Value < (byte)___animal.ageWhenMature.Value)
|
||||||
{
|
{
|
||||||
ageText += Game1.content.LoadString("Strings\\UI:AnimalQuery_AgeBaby");
|
ageText += Game1.content.LoadString("Strings\\UI:AnimalQuery_AgeBaby");
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,7 @@ namespace stardew_access.Patches
|
||||||
if (animalQueryMenuQuery != toSpeak)
|
if (animalQueryMenuQuery != toSpeak)
|
||||||
{
|
{
|
||||||
animalQueryMenuQuery = toSpeak;
|
animalQueryMenuQuery = toSpeak;
|
||||||
MainClass.GetScreenReader().Say($"{details} {toSpeak}", true);
|
MainClass.ScreenReader.Say($"{details} {toSpeak}", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
|
@ -123,13 +123,13 @@ namespace stardew_access.Patches
|
||||||
|
|
||||||
if (__instance.nextPageButton != null && __instance.nextPageButton.containsPoint(x, y))
|
if (__instance.nextPageButton != null && __instance.nextPageButton.containsPoint(x, y))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker($"Next Page Button", true);
|
MainClass.ScreenReader.SayWithMenuChecker($"Next Page Button", true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__instance.previousPageButton != null && __instance.previousPageButton.containsPoint(x, y))
|
if (__instance.previousPageButton != null && __instance.previousPageButton.containsPoint(x, y))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker($"Previous Page Button", true);
|
MainClass.ScreenReader.SayWithMenuChecker($"Previous Page Button", true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
if (__instance.languages[i].containsPoint(x, y))
|
if (__instance.languages[i].containsPoint(x, y))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker($"{__instance.languageList[i]} Button", true);
|
MainClass.ScreenReader.SayWithMenuChecker($"{__instance.languageList[i]} Button", true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
if (___elevators[i].containsPoint(x, y))
|
if (___elevators[i].containsPoint(x, y))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker($"{___elevators[i].name} level", true);
|
MainClass.ScreenReader.SayWithMenuChecker($"{___elevators[i].name} level", true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -179,7 +179,7 @@ namespace stardew_access.Patches
|
||||||
toSpeak = $"Paste button";
|
toSpeak = $"Paste button";
|
||||||
|
|
||||||
if (toSpeak != "")
|
if (toSpeak != "")
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
{
|
{
|
||||||
|
@ -222,7 +222,7 @@ namespace stardew_access.Patches
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toSpeak != "")
|
if (toSpeak != "")
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -236,14 +236,14 @@ namespace stardew_access.Patches
|
||||||
{
|
{
|
||||||
int x = Game1.getMouseX(true), y = Game1.getMouseY(true);
|
int x = Game1.getMouseX(true), y = Game1.getMouseY(true);
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker(___message, true);
|
MainClass.ScreenReader.SayWithMenuChecker(___message, true);
|
||||||
if (__instance.okButton.containsPoint(x, y))
|
if (__instance.okButton.containsPoint(x, y))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker("Ok Button", false);
|
MainClass.ScreenReader.SayWithMenuChecker("Ok Button", false);
|
||||||
}
|
}
|
||||||
else if (__instance.cancelButton.containsPoint(x, y))
|
else if (__instance.cancelButton.containsPoint(x, y))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker("Cancel Button", false);
|
MainClass.ScreenReader.SayWithMenuChecker("Cancel Button", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -336,10 +336,10 @@ namespace stardew_access.Patches
|
||||||
}
|
}
|
||||||
|
|
||||||
if (toSpeak != " ")
|
if (toSpeak != " ")
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithMenuChecker(toSpeak, true);
|
||||||
else if (__instance.isProfessionChooser && currentLevelUpTitle != $"{___title}. Select a new profession.")
|
else if (__instance.isProfessionChooser && currentLevelUpTitle != $"{___title}. Select a new profession.")
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker($"{___title}. Select a new profession.", true);
|
MainClass.ScreenReader.SayWithMenuChecker($"{___title}. Select a new profession.", true);
|
||||||
currentLevelUpTitle = $"{___title}. Select a new profession.";
|
currentLevelUpTitle = $"{___title}. Select a new profession.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -366,14 +366,14 @@ namespace stardew_access.Patches
|
||||||
Game1.activeClickableMenu.receiveLeftClick(Game1.getMouseX(true), Game1.getMouseY(true));
|
Game1.activeClickableMenu.receiveLeftClick(Game1.getMouseX(true), Game1.getMouseY(true));
|
||||||
}
|
}
|
||||||
toSpeak = $"{total}g in total. Press left mouse button to save.";
|
toSpeak = $"{total}g in total. Press left mouse button to save.";
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < __instance.categories.Count; i++)
|
for (int i = 0; i < __instance.categories.Count; i++)
|
||||||
{
|
{
|
||||||
if (__instance.categories[i].containsPoint(Game1.getMouseX(true), Game1.getMouseY(true)))
|
if (__instance.categories[i].containsPoint(Game1.getMouseX(true), Game1.getMouseY(true)))
|
||||||
{
|
{
|
||||||
toSpeak = $"Money recieved from {__instance.getCategoryName(i)}: {___categoryTotals[i]}g.";
|
toSpeak = $"Money recieved from {__instance.getCategoryName(i)}: {___categoryTotals[i]}g.";
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -491,8 +491,8 @@ namespace stardew_access.Patches
|
||||||
|
|
||||||
internal static void ExitEventPatch()
|
internal static void ExitEventPatch()
|
||||||
{
|
{
|
||||||
if (MainClass.GetScreenReader() != null)
|
if (MainClass.ScreenReader != null)
|
||||||
MainClass.GetScreenReader().CloseScreenReader();
|
MainClass.ScreenReader.CloseScreenReader();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ namespace stardew_access.Patches
|
||||||
if (museumQueryKey != toSpeak)
|
if (museumQueryKey != toSpeak)
|
||||||
{
|
{
|
||||||
museumQueryKey = toSpeak;
|
museumQueryKey = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -92,9 +92,9 @@ namespace stardew_access.Patches
|
||||||
|
|
||||||
if (((LibraryMuseum)Game1.currentLocation).isTileSuitableForMuseumPiece(tileX, tileY) && ((LibraryMuseum)Game1.currentLocation).isItemSuitableForDonation(__instance.inventory.actualInventory[i]))
|
if (((LibraryMuseum)Game1.currentLocation).isTileSuitableForMuseumPiece(tileX, tileY) && ((LibraryMuseum)Game1.currentLocation).isItemSuitableForDonation(__instance.inventory.actualInventory[i]))
|
||||||
{
|
{
|
||||||
int objectID = __instance.inventory.actualInventory[i].parentSheetIndex;
|
int objectID = __instance.inventory.actualInventory[i].ParentSheetIndex;
|
||||||
int rewardsCount = ((LibraryMuseum)Game1.currentLocation).getRewardsForPlayer(Game1.player).Count;
|
int rewardsCount = ((LibraryMuseum)Game1.currentLocation).getRewardsForPlayer(Game1.player).Count;
|
||||||
((LibraryMuseum)Game1.currentLocation).museumPieces.Add(new Vector2(tileX, tileY), ((StardewValley.Object)__instance.inventory.actualInventory[i]).parentSheetIndex);
|
((LibraryMuseum)Game1.currentLocation).museumPieces.Add(new Vector2(tileX, tileY), ((StardewValley.Object)__instance.inventory.actualInventory[i]).ParentSheetIndex);
|
||||||
Game1.playSound("stoneStep");
|
Game1.playSound("stoneStep");
|
||||||
if (((LibraryMuseum)Game1.currentLocation).getRewardsForPlayer(Game1.player).Count > rewardsCount)
|
if (((LibraryMuseum)Game1.currentLocation).getRewardsForPlayer(Game1.player).Count > rewardsCount)
|
||||||
{
|
{
|
||||||
|
@ -115,13 +115,13 @@ namespace stardew_access.Patches
|
||||||
switch (pieces)
|
switch (pieces)
|
||||||
{
|
{
|
||||||
case 95:
|
case 95:
|
||||||
globalChatInfoMessage("MuseumComplete", Game1.player.farmName);
|
globalChatInfoMessage("MuseumComplete", Game1.player.farmName.Value);
|
||||||
break;
|
break;
|
||||||
case 40:
|
case 40:
|
||||||
globalChatInfoMessage("Museum40", Game1.player.farmName);
|
globalChatInfoMessage("Museum40", Game1.player.farmName.Value);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
globalChatInfoMessage("donation", Game1.player.name, "object:" + objectID);
|
globalChatInfoMessage("donation", Game1.player.Name, "object:" + objectID);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -135,7 +135,7 @@ namespace stardew_access.Patches
|
||||||
if (museumQueryKey != $"ok button")
|
if (museumQueryKey != $"ok button")
|
||||||
{
|
{
|
||||||
museumQueryKey = $"ok button";
|
museumQueryKey = $"ok button";
|
||||||
MainClass.GetScreenReader().Say("ok button", true);
|
MainClass.ScreenReader.Say("ok button", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -205,7 +205,7 @@ namespace stardew_access.Patches
|
||||||
if (museumQueryKey != $"{toSpeak}:{i}")
|
if (museumQueryKey != $"{toSpeak}:{i}")
|
||||||
{
|
{
|
||||||
museumQueryKey = $"{toSpeak}:{i}";
|
museumQueryKey = $"{toSpeak}:{i}";
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace stardew_access.Patches
|
||||||
|
|
||||||
toSpeak = $"Left Quest:\n\t{toSpeak}\n\tPress left click to accept this quest.";
|
toSpeak = $"Left Quest:\n\t{toSpeak}\n\tPress left click to accept this quest.";
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithMenuChecker(toSpeak, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ namespace stardew_access.Patches
|
||||||
|
|
||||||
toSpeak = $"Right Quest:\n\t{toSpeak}\n\tPress left click to accept this quest.";
|
toSpeak = $"Right Quest:\n\t{toSpeak}\n\tPress left click to accept this quest.";
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithMenuChecker(toSpeak, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ namespace stardew_access.Patches
|
||||||
if (Game1.dayOfMonth == i + 1)
|
if (Game1.dayOfMonth == i + 1)
|
||||||
toSpeak += $", Current";
|
toSpeak += $", Current";
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -114,7 +114,7 @@ namespace stardew_access.Patches
|
||||||
if (currentDailyQuestText != toSpeak)
|
if (currentDailyQuestText != toSpeak)
|
||||||
{
|
{
|
||||||
currentDailyQuestText = toSpeak;
|
currentDailyQuestText = toSpeak;
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -134,7 +134,7 @@ namespace stardew_access.Patches
|
||||||
__instance.acceptQuestButton.snapMouseCursorToCenter();
|
__instance.acceptQuestButton.snapMouseCursorToCenter();
|
||||||
}
|
}
|
||||||
|
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -171,7 +171,7 @@ namespace stardew_access.Patches
|
||||||
toSpeak += ___pages[___currentPage][i].ShouldDisplayAsComplete() ? " completed!" : "";
|
toSpeak += ___pages[___currentPage][i].ShouldDisplayAsComplete() ? " completed!" : "";
|
||||||
if (__instance.questLogButtons[i].containsPoint(Game1.getOldMouseX(), Game1.getOldMouseY()))
|
if (__instance.questLogButtons[i].containsPoint(Game1.getOldMouseX(), Game1.getOldMouseY()))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -232,7 +232,7 @@ namespace stardew_access.Patches
|
||||||
if (snapMouseToRewardBox)
|
if (snapMouseToRewardBox)
|
||||||
__instance.rewardBox.snapMouseCursorToCenter();
|
__instance.rewardBox.snapMouseCursorToCenter();
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ namespace stardew_access.Patches
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
if (toSpeak != " ")
|
if (toSpeak != " ")
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -94,7 +94,7 @@ namespace stardew_access.Patches
|
||||||
if (TitleMenu.subMenu != null && __instance.backButton.containsPoint(Game1.getMouseX(true), Game1.getMouseY(true)))
|
if (TitleMenu.subMenu != null && __instance.backButton.containsPoint(Game1.getMouseX(true), Game1.getMouseY(true)))
|
||||||
{
|
{
|
||||||
string text = "Back Button";
|
string text = "Back Button";
|
||||||
MainClass.GetScreenReader().SayWithChecker(text, true);
|
MainClass.ScreenReader.SayWithChecker(text, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fix for back button not working using keyboard
|
// Fix for back button not working using keyboard
|
||||||
|
@ -108,7 +108,7 @@ namespace stardew_access.Patches
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TitleMenu.subMenu == null && toSpeak != "")
|
if (TitleMenu.subMenu == null && toSpeak != "")
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
@ -128,7 +128,7 @@ namespace stardew_access.Patches
|
||||||
#region Farms
|
#region Farms
|
||||||
if (___menu.deleteButtons.Count > 0 && ___menu.deleteButtons[i].containsPoint(x, y))
|
if (___menu.deleteButtons.Count > 0 && ___menu.deleteButtons[i].containsPoint(x, y))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithChecker($"Delete {__instance.Farmer.farmName} Farm", true);
|
MainClass.ScreenReader.SayWithChecker($"Delete {__instance.Farmer.farmName.Value} Farm", true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,20 +137,20 @@ namespace stardew_access.Patches
|
||||||
// Used diff. functions to narrate to prevent it from speaking the message again on selecting another button.
|
// Used diff. functions to narrate to prevent it from speaking the message again on selecting another button.
|
||||||
string message = "Really delete farm?";
|
string message = "Really delete farm?";
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithChecker(message, true);
|
MainClass.ScreenReader.SayWithChecker(message, true);
|
||||||
if (___menu.okDeleteButton.containsPoint(x, y))
|
if (___menu.okDeleteButton.containsPoint(x, y))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker("Ok Button", false);
|
MainClass.ScreenReader.SayWithMenuChecker("Ok Button", false);
|
||||||
}
|
}
|
||||||
else if (___menu.cancelDeleteButton.containsPoint(x, y))
|
else if (___menu.cancelDeleteButton.containsPoint(x, y))
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().SayWithMenuChecker("Cancel Button", false);
|
MainClass.ScreenReader.SayWithMenuChecker("Cancel Button", false);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String farmerName = __instance.Farmer.displayName;
|
String farmerName = __instance.Farmer.displayName;
|
||||||
String farmName = __instance.Farmer.farmName;
|
String farmName = __instance.Farmer.farmName.Value;
|
||||||
String money = __instance.Farmer.Money.ToString();
|
String money = __instance.Farmer.Money.ToString();
|
||||||
String hoursPlayed = Utility.getHoursMinutesStringFromMilliseconds(__instance.Farmer.millisecondsPlayed);
|
String hoursPlayed = Utility.getHoursMinutesStringFromMilliseconds(__instance.Farmer.millisecondsPlayed);
|
||||||
string dateStringForSaveGame = ((!__instance.Farmer.dayOfMonthForSaveGame.HasValue ||
|
string dateStringForSaveGame = ((!__instance.Farmer.dayOfMonthForSaveGame.HasValue ||
|
||||||
|
@ -159,7 +159,7 @@ namespace stardew_access.Patches
|
||||||
|
|
||||||
string toSpeak = $"{farmName} Farm Selected, \t\n Farmer:{farmerName}, \t\nMoney:{money}, \t\nHours Played:{hoursPlayed}, \t\nDate:{dateStringForSaveGame}";
|
string toSpeak = $"{farmName} Farm Selected, \t\n Farmer:{farmerName}, \t\nMoney:{money}, \t\nHours Played:{hoursPlayed}, \t\nDate:{dateStringForSaveGame}";
|
||||||
|
|
||||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@ namespace stardew_access.Patches
|
||||||
|
|
||||||
if (toSpeak != " ")
|
if (toSpeak != " ")
|
||||||
{
|
{
|
||||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
MainClass.ScreenReader.Say(toSpeak, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue