Added door name narration and fixed warnings
This commit is contained in:
@@ -61,7 +61,7 @@ namespace stardew_access.Patches
|
||||
firstTimeInNamingMenu = false;
|
||||
}
|
||||
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else if (___onFarm && !___namingAnimal)
|
||||
@@ -90,7 +90,7 @@ namespace stardew_access.Patches
|
||||
if (purchaseAnimalMenuQuery != toSpeak)
|
||||
{
|
||||
purchaseAnimalMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -213,7 +213,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -235,7 +235,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -269,14 +269,14 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
private static async void SayBlueprintInfo(string info)
|
||||
{
|
||||
isSayingBlueprintInfo = true;
|
||||
MainClass.ScreenReader.Say(info, true);
|
||||
MainClass.GetScreenReader().Say(info, true);
|
||||
await Task.Delay(300);
|
||||
isSayingBlueprintInfo = false;
|
||||
}
|
||||
@@ -288,7 +288,7 @@ namespace stardew_access.Patches
|
||||
|
||||
string? response = null;
|
||||
// This code is taken from the game's code (CarpenterMenu.cs::654)
|
||||
Farm farm = Game1.getLocationFromName("Farm") as Farm;
|
||||
Farm farm = (Farm)Game1.getLocationFromName("Farm");
|
||||
Action buildingLockFailed = delegate
|
||||
{
|
||||
if (isDemolishing)
|
||||
@@ -304,7 +304,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
response = Game1.content.LoadString("Strings\\UI:Carpenter_CantDemolish_DuringConstruction");
|
||||
}
|
||||
else if (toDemolish.indoors.Value != null && toDemolish.indoors.Value is AnimalHouse && (toDemolish.indoors.Value as AnimalHouse).animalsThatLiveHere.Count > 0)
|
||||
else if (toDemolish.indoors.Value != null && toDemolish.indoors.Value is AnimalHouse && ((AnimalHouse)toDemolish.indoors.Value).animalsThatLiveHere.Count > 0)
|
||||
{
|
||||
response = Game1.content.LoadString("Strings\\UI:Carpenter_CantDemolish_AnimalsHere");
|
||||
}
|
||||
@@ -318,24 +318,24 @@ namespace stardew_access.Patches
|
||||
{
|
||||
foreach (Farmer current in Game1.getAllFarmers())
|
||||
{
|
||||
if (current.currentLocation != null && current.currentLocation.Name == (toDemolish.indoors.Value as Cabin).GetCellarName())
|
||||
if (current.currentLocation != null && current.currentLocation.Name == ((Cabin)toDemolish.indoors.Value).GetCellarName())
|
||||
{
|
||||
response = Game1.content.LoadString("Strings\\UI:Carpenter_CantDemolish_PlayerHere");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (toDemolish.indoors.Value is Cabin && (toDemolish.indoors.Value as Cabin).farmhand.Value.isActive())
|
||||
if (toDemolish.indoors.Value is Cabin && ((Cabin)toDemolish.indoors.Value).farmhand.Value.isActive())
|
||||
{
|
||||
response = Game1.content.LoadString("Strings\\UI:Carpenter_CantDemolish_FarmhandOnline");
|
||||
}
|
||||
else
|
||||
{
|
||||
toDemolish.BeforeDemolish();
|
||||
Chest chest = null;
|
||||
Chest? chest = null;
|
||||
if (toDemolish.indoors.Value is Cabin)
|
||||
{
|
||||
List<Item> list = (toDemolish.indoors.Value as Cabin).demolish();
|
||||
List<Item> list = ((Cabin)toDemolish.indoors.Value).demolish();
|
||||
if (list.Count > 0)
|
||||
{
|
||||
chest = new Chest(playerChest: true);
|
||||
@@ -351,7 +351,8 @@ namespace stardew_access.Patches
|
||||
toDemolish.showDestroyedAnimation(Game1.getFarm());
|
||||
Game1.playSound("explosion");
|
||||
Utility.spreadAnimalsAround(toDemolish, farm);
|
||||
DelayedAction.functionAfterDelay(carpenterMenu.returnToCarpentryMenu, 1500);
|
||||
if (carpenterMenu != null)
|
||||
DelayedAction.functionAfterDelay(carpenterMenu.returnToCarpentryMenu, 1500);
|
||||
// freeze = true;
|
||||
if (chest != null)
|
||||
{
|
||||
@@ -370,12 +371,12 @@ namespace stardew_access.Patches
|
||||
toDemolish = null;
|
||||
return response;
|
||||
}
|
||||
if (!carpenterMenu.CanDemolishThis(toDemolish))
|
||||
if (carpenterMenu != null && !carpenterMenu.CanDemolishThis(toDemolish))
|
||||
{
|
||||
toDemolish = null;
|
||||
return response;
|
||||
}
|
||||
if (!Game1.IsMasterGame && !carpenterMenu.hasPermissionsToDemolish(toDemolish))
|
||||
if (carpenterMenu != null && !Game1.IsMasterGame && !carpenterMenu.hasPermissionsToDemolish(toDemolish))
|
||||
{
|
||||
toDemolish = null;
|
||||
return response;
|
||||
@@ -383,7 +384,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
if (toDemolish != null && toDemolish.indoors.Value is Cabin)
|
||||
{
|
||||
Cabin cabin = toDemolish.indoors.Value as Cabin;
|
||||
Cabin cabin = (Cabin)toDemolish.indoors.Value;
|
||||
if (cabin.farmhand.Value != null && (bool)cabin.farmhand.Value.isCustomized)
|
||||
{
|
||||
Game1.currentLocation.createQuestionDialogue(Game1.content.LoadString("Strings\\UI:Carpenter_DemolishCabinConfirm", cabin.farmhand.Value.Name), Game1.currentLocation.createYesNoResponses(), delegate (Farmer f, string answer)
|
||||
@@ -395,7 +396,8 @@ namespace stardew_access.Patches
|
||||
}
|
||||
else
|
||||
{
|
||||
DelayedAction.functionAfterDelay(carpenterMenu.returnToCarpentryMenu, 1000);
|
||||
if (carpenterMenu != null)
|
||||
DelayedAction.functionAfterDelay(carpenterMenu.returnToCarpentryMenu, 1000);
|
||||
}
|
||||
});
|
||||
return response;
|
||||
@@ -419,8 +421,11 @@ namespace stardew_access.Patches
|
||||
{
|
||||
if (tryToBuild(position))
|
||||
{
|
||||
carpenterMenu.CurrentBlueprint.consumeResources();
|
||||
DelayedAction.functionAfterDelay(carpenterMenu.returnToCarpentryMenuAfterSuccessfulBuild, 2000);
|
||||
if (carpenterMenu != null)
|
||||
{
|
||||
carpenterMenu.CurrentBlueprint.consumeResources();
|
||||
DelayedAction.functionAfterDelay(carpenterMenu.returnToCarpentryMenuAfterSuccessfulBuild, 2000);
|
||||
}
|
||||
// freeze = true;
|
||||
}
|
||||
else
|
||||
@@ -436,6 +441,8 @@ namespace stardew_access.Patches
|
||||
|
||||
public static bool tryToBuild(Vector2 position)
|
||||
{
|
||||
if (carpenterMenu == null)
|
||||
return false;
|
||||
return ((Farm)Game1.getLocationFromName("Farm")).buildStructure(carpenterMenu.CurrentBlueprint, position, Game1.player, isMagicalConstruction);
|
||||
}
|
||||
|
||||
@@ -443,7 +450,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
string? response = null;
|
||||
// This code is taken from the game's code (CarpenterMenu.cs::775)
|
||||
if (toUpgrade != null && carpenterMenu.CurrentBlueprint.name != null && toUpgrade.buildingType.Equals(carpenterMenu.CurrentBlueprint.nameOfBuildingToUpgrade))
|
||||
if (carpenterMenu != null && toUpgrade != null && carpenterMenu.CurrentBlueprint.name != null && toUpgrade.buildingType.Equals(carpenterMenu.CurrentBlueprint.nameOfBuildingToUpgrade))
|
||||
{
|
||||
carpenterMenu.CurrentBlueprint.consumeResources();
|
||||
toUpgrade.daysUntilUpgrade.Value = 2;
|
||||
@@ -472,13 +479,15 @@ namespace stardew_access.Patches
|
||||
response = Game1.content.LoadString("Strings\\UI:Carpenter_CannotPaint");
|
||||
return response;
|
||||
}
|
||||
if (!carpenterMenu.HasPermissionsToPaint(toPaint))
|
||||
if (carpenterMenu != null && !carpenterMenu.HasPermissionsToPaint(toPaint))
|
||||
{
|
||||
response = Game1.content.LoadString("Strings\\UI:Carpenter_CannotPaint_Permission");
|
||||
return response;
|
||||
}
|
||||
toPaint.color.Value = Color.White;
|
||||
carpenterMenu.SetChildMenu(new BuildingPaintMenu(toPaint));
|
||||
|
||||
if (carpenterMenu != null)
|
||||
carpenterMenu.SetChildMenu(new BuildingPaintMenu(toPaint));
|
||||
}
|
||||
/* TODO Add painting of farm house
|
||||
else if (farm_location.GetHouseRect().Contains(Utility.Vector2ToPoint(new Vector2(toPaint.tileX, toPaint.tileY))))
|
||||
@@ -513,7 +522,7 @@ namespace stardew_access.Patches
|
||||
buildingToMove = null;
|
||||
return "Building under construction, cannot move";
|
||||
}
|
||||
if (!carpenterMenu.hasPermissionsToMove(buildingToMove))
|
||||
if (carpenterMenu != null && !carpenterMenu.hasPermissionsToMove(buildingToMove))
|
||||
{
|
||||
buildingToMove = null;
|
||||
return "You don't have permission to move this building";
|
||||
@@ -524,7 +533,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
if (buildingToMove is ShippingBin)
|
||||
{
|
||||
(buildingToMove as ShippingBin).initLid();
|
||||
((ShippingBin)buildingToMove).initLid();
|
||||
}
|
||||
if (buildingToMove is GreenhouseBuilding)
|
||||
{
|
||||
|
@@ -42,13 +42,13 @@ namespace stardew_access.Patches
|
||||
toSpeak += $"{message.message}, ";
|
||||
});
|
||||
if (toSpeak != " ")
|
||||
MainClass.ScreenReader.SayWithChatChecker(toSpeak, false);
|
||||
MainClass.GetScreenReader().SayWithChatChecker(toSpeak, false);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace stardew_access.Patches
|
||||
toSpeak += $"{message.message}, ";
|
||||
});
|
||||
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
await Task.Delay(200);
|
||||
isChatRunning = false;
|
||||
}
|
||||
|
@@ -49,9 +49,9 @@ namespace stardew_access.Patches
|
||||
if (toSpeak != " ")
|
||||
{
|
||||
if (hasResponses)
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, false);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, false);
|
||||
else
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else if (__instance.isQuestion)
|
||||
@@ -80,9 +80,9 @@ namespace stardew_access.Patches
|
||||
if (toSpeak != " ")
|
||||
{
|
||||
if (hasResponses)
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, false);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, false);
|
||||
else
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else if (Game1.activeClickableMenu is DialogueBox)
|
||||
@@ -91,13 +91,13 @@ namespace stardew_access.Patches
|
||||
if (currentDialogue != __instance.getCurrentString())
|
||||
{
|
||||
currentDialogue = __instance.getCurrentString();
|
||||
MainClass.ScreenReader.Say(__instance.getCurrentString(), true);
|
||||
MainClass.GetScreenReader().Say(__instance.getCurrentString(), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate dialog:\n{e.StackTrace}\n{e.Message}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate dialog:\n{e.StackTrace}\n{e.Message}", LogLevel.Error);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -273,15 +273,15 @@ namespace stardew_access.Patches
|
||||
if (toSpeak.ToString() != " ")
|
||||
{
|
||||
if (Context.IsPlayerFree)
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak.ToString(), true); // Normal Checker
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak.ToString(), true); // Normal Checker
|
||||
else
|
||||
MainClass.ScreenReader.SayWithMenuChecker(toSpeak.ToString(), true); // Menu Checker
|
||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak.ToString(), true); // Menu Checker
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate dialog:\n{e.StackTrace}\n{e.Message}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate dialog:\n{e.StackTrace}\n{e.Message}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -77,7 +77,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -117,19 +117,19 @@ namespace stardew_access.Patches
|
||||
else if (isBackPressed && __instance.backButton != null && !__instance.backButton.containsPoint(x, y))
|
||||
{
|
||||
__instance.backButton.snapMouseCursorToCenter();
|
||||
MainClass.ScreenReader.Say("Back Button", true);
|
||||
MainClass.GetScreenReader().Say("Back Button", true);
|
||||
}
|
||||
else if (isPPressed && __instance.purchaseButton != null && !__instance.purchaseButton.containsPoint(x, y))
|
||||
{
|
||||
__instance.purchaseButton.snapMouseCursorToCenter();
|
||||
MainClass.ScreenReader.Say("Purchase Button", true);
|
||||
MainClass.GetScreenReader().Say("Purchase Button", true);
|
||||
}
|
||||
}
|
||||
string reward = __instance.getRewardNameForArea(___whichArea);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace stardew_access.Patches
|
||||
toSpeak = $"Completed {toSpeak}";
|
||||
|
||||
c.snapMouseCursorToCenter();
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -228,7 +228,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
|
||||
c.snapMouseCursorToCenter();
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -281,7 +281,7 @@ namespace stardew_access.Patches
|
||||
toSpeak = "Empty Slot";
|
||||
}
|
||||
c.snapMouseCursorToCenter();
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -289,15 +289,15 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
|
||||
await Task.Delay(200);
|
||||
isUsingCustomButtons = false;
|
||||
}
|
||||
|
||||
|
||||
internal static void SocialPagePatch(SocialPage __instance, List<ClickableTextureComponent> ___sprites, int ___slotPosition, List<string> ___kidsNames)
|
||||
{
|
||||
{
|
||||
try
|
||||
{
|
||||
int x = Game1.getMouseX(), y = Game1.getMouseY(); // Mouse x and y position
|
||||
@@ -335,54 +335,54 @@ namespace stardew_access.Patches
|
||||
{
|
||||
toSpeak = $"{toSpeak}, not talked yet";
|
||||
}
|
||||
|
||||
|
||||
if (datable | housemate)
|
||||
{
|
||||
string text2 = (LocalizedContentManager.CurrentLanguageCode != LocalizedContentManager.LanguageCode.pt) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11635") : ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11635").Split('/').First() : Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11635").Split('/').Last());
|
||||
if (housemate)
|
||||
{
|
||||
text2 = Game1.content.LoadString("Strings\\StringsFromCSFiles:Housemate");
|
||||
}
|
||||
else if (spouse)
|
||||
{
|
||||
text2 = ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11636") : Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11637"));
|
||||
}
|
||||
else if (__instance.isMarriedToAnyone(name))
|
||||
{
|
||||
text2 = ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\UI:SocialPage_MarriedToOtherPlayer_MaleNPC") : Game1.content.LoadString("Strings\\UI:SocialPage_MarriedToOtherPlayer_FemaleNPC"));
|
||||
}
|
||||
else if (!Game1.player.isMarried() && friendship.IsDating())
|
||||
{
|
||||
text2 = ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11639") : Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11640"));
|
||||
}
|
||||
else if (__instance.getFriendship(name).IsDivorced())
|
||||
{
|
||||
text2 = ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11642") : Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11643"));
|
||||
}
|
||||
|
||||
toSpeak = $"{toSpeak}, {text2}";
|
||||
|
||||
if (datable | housemate)
|
||||
{
|
||||
string text2 = (LocalizedContentManager.CurrentLanguageCode != LocalizedContentManager.LanguageCode.pt) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11635") : ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11635").Split('/').First() : Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11635").Split('/').Last());
|
||||
if (housemate)
|
||||
{
|
||||
text2 = Game1.content.LoadString("Strings\\StringsFromCSFiles:Housemate");
|
||||
}
|
||||
if (!__instance.getFriendship(name).IsMarried() && ___kidsNames.Contains(name))
|
||||
else if (spouse)
|
||||
{
|
||||
toSpeak = $"{toSpeak}, married";
|
||||
}
|
||||
if (spouse)
|
||||
{
|
||||
toSpeak = $"{toSpeak}, spouse";
|
||||
text2 = ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11636") : Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11637"));
|
||||
}
|
||||
else if (friendship.IsDating())
|
||||
else if (__instance.isMarriedToAnyone(name))
|
||||
{
|
||||
toSpeak = $"{toSpeak}, dating";
|
||||
text2 = ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\UI:SocialPage_MarriedToOtherPlayer_MaleNPC") : Game1.content.LoadString("Strings\\UI:SocialPage_MarriedToOtherPlayer_FemaleNPC"));
|
||||
}
|
||||
else if (!Game1.player.isMarried() && friendship.IsDating())
|
||||
{
|
||||
text2 = ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11639") : Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11640"));
|
||||
}
|
||||
else if (__instance.getFriendship(name).IsDivorced())
|
||||
{
|
||||
text2 = ((__instance.getGender(name) == 0) ? Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11642") : Game1.content.LoadString("Strings\\StringsFromCSFiles:SocialPage.cs.11643"));
|
||||
}
|
||||
|
||||
toSpeak = $"{toSpeak}, {heartLevel} hearts, {giftsThisWeek} gifts given this week.";
|
||||
|
||||
toSpeak = $"{toSpeak}, {text2}";
|
||||
}
|
||||
if (!__instance.getFriendship(name).IsMarried() && ___kidsNames.Contains(name))
|
||||
{
|
||||
toSpeak = $"{toSpeak}, married";
|
||||
}
|
||||
if (spouse)
|
||||
{
|
||||
toSpeak = $"{toSpeak}, spouse";
|
||||
}
|
||||
else if (friendship.IsDating())
|
||||
{
|
||||
toSpeak = $"{toSpeak}, dating";
|
||||
}
|
||||
|
||||
toSpeak = $"{toSpeak}, {heartLevel} hearts, {giftsThisWeek} gifts given this week.";
|
||||
|
||||
|
||||
if (socialPageQuery != toSpeak)
|
||||
{
|
||||
socialPageQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -427,7 +427,7 @@ namespace stardew_access.Patches
|
||||
if (socialPageQuery != toSpeak)
|
||||
{
|
||||
socialPageQuery = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -440,7 +440,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -471,7 +471,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
shopMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -483,7 +483,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
shopMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -494,7 +494,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
shopMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -541,14 +541,14 @@ namespace stardew_access.Patches
|
||||
{
|
||||
shopMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,7 +570,7 @@ namespace stardew_access.Patches
|
||||
if (gameMenuQueryKey != toSpeak)
|
||||
{
|
||||
gameMenuQueryKey = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -578,7 +578,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -599,7 +599,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -612,7 +612,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -624,7 +624,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -637,7 +637,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -649,7 +649,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -662,7 +662,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -694,7 +694,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
gameMenuQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -706,7 +706,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -719,7 +719,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -732,7 +732,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -745,7 +745,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -759,7 +759,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -773,7 +773,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -786,7 +786,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -828,7 +828,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -853,7 +853,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -966,7 +966,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
craftingPageQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -978,7 +978,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
craftingPageQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -990,7 +990,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
craftingPageQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1002,7 +1002,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
craftingPageQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -1082,7 +1082,7 @@ namespace stardew_access.Patches
|
||||
craftingPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1099,7 +1099,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1120,7 +1120,7 @@ namespace stardew_access.Patches
|
||||
|
||||
// This method is used to get the inventory items to check if the player has enough ingredients for a recipe
|
||||
// Taken from CraftingPage.cs -> 169 line
|
||||
internal static IList<Item> getContainerContents(List<Chest> materialContainers)
|
||||
internal static IList<Item>? getContainerContents(List<Chest> materialContainers)
|
||||
{
|
||||
if (materialContainers == null)
|
||||
{
|
||||
@@ -1149,7 +1149,7 @@ namespace stardew_access.Patches
|
||||
inventoryPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -1163,7 +1163,7 @@ namespace stardew_access.Patches
|
||||
inventoryPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1176,7 +1176,7 @@ namespace stardew_access.Patches
|
||||
inventoryPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1189,7 +1189,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1203,7 +1203,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1299,7 +1299,7 @@ namespace stardew_access.Patches
|
||||
inventoryPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1317,7 +1317,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1337,17 +1337,17 @@ namespace stardew_access.Patches
|
||||
if (optionsElement is OptionsButton)
|
||||
toSpeak = $" {toSpeak} Button";
|
||||
else if (optionsElement is OptionsCheckbox)
|
||||
toSpeak = ((optionsElement as OptionsCheckbox).isChecked ? "Enabled" : "Disabled") + $" {toSpeak} Checkbox";
|
||||
toSpeak = (((OptionsCheckbox)optionsElement).isChecked ? "Enabled" : "Disabled") + $" {toSpeak} Checkbox";
|
||||
else if (optionsElement is OptionsDropDown)
|
||||
toSpeak = $"{toSpeak} Dropdown, option {(optionsElement as OptionsDropDown).dropDownDisplayOptions[(optionsElement as OptionsDropDown).selectedOption]} selected";
|
||||
toSpeak = $"{toSpeak} Dropdown, option {((OptionsDropDown)optionsElement).dropDownDisplayOptions[((OptionsDropDown)optionsElement).selectedOption]} selected";
|
||||
else if (optionsElement is OptionsSlider)
|
||||
toSpeak = $"{(optionsElement as OptionsSlider).value}% {toSpeak} Slider";
|
||||
toSpeak = $"{((OptionsSlider)optionsElement).value}% {toSpeak} Slider";
|
||||
else if (optionsElement is OptionsPlusMinus)
|
||||
toSpeak = $"{(optionsElement as OptionsPlusMinus).displayOptions[(optionsElement as OptionsPlusMinus).selected]} selected of {toSpeak}";
|
||||
toSpeak = $"{((OptionsPlusMinus)optionsElement).displayOptions[((OptionsPlusMinus)optionsElement).selected]} selected of {toSpeak}";
|
||||
else if (optionsElement is OptionsInputListener)
|
||||
{
|
||||
string buttons = "";
|
||||
(optionsElement as OptionsInputListener).buttonNames.ForEach(name => { buttons += $", {name}"; });
|
||||
((OptionsInputListener)optionsElement).buttonNames.ForEach(name => { buttons += $", {name}"; });
|
||||
toSpeak = $"{toSpeak} is bound to {buttons}. Left click to change.";
|
||||
}
|
||||
else
|
||||
@@ -1362,7 +1362,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
gameMenuQueryKey = "";
|
||||
optionsPageQueryKey = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1370,7 +1370,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1386,7 +1386,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
gameMenuQueryKey = "";
|
||||
exitPageQueryKey = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1398,14 +1398,14 @@ namespace stardew_access.Patches
|
||||
{
|
||||
gameMenuQueryKey = "";
|
||||
exitPageQueryKey = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1431,9 +1431,9 @@ namespace stardew_access.Patches
|
||||
string requirements = "";
|
||||
|
||||
#region Add quality of item
|
||||
if (actualInventory[i] is StardewValley.Object && (actualInventory[i] as StardewValley.Object).quality > 0)
|
||||
if (actualInventory[i] is StardewValley.Object && ((StardewValley.Object)actualInventory[i]).quality > 0)
|
||||
{
|
||||
int qualityIndex = (actualInventory[i] as StardewValley.Object).quality;
|
||||
int qualityIndex = ((StardewValley.Object)actualInventory[i]).quality;
|
||||
if (qualityIndex == 1)
|
||||
{
|
||||
quality = "Silver quality";
|
||||
@@ -1453,13 +1453,13 @@ namespace stardew_access.Patches
|
||||
{
|
||||
description = actualInventory[i].getDescription();
|
||||
#region Add health & stamina provided by the item
|
||||
if (actualInventory[i] is StardewValley.Object && (actualInventory[i] as StardewValley.Object).Edibility != -300)
|
||||
if (actualInventory[i] is StardewValley.Object && ((StardewValley.Object)actualInventory[i]).Edibility != -300)
|
||||
{
|
||||
int stamina_recovery = (actualInventory[i] as StardewValley.Object).staminaRecoveredOnConsumption();
|
||||
int stamina_recovery = ((StardewValley.Object)actualInventory[i]).staminaRecoveredOnConsumption();
|
||||
healthNStamine += $"{stamina_recovery} Energy";
|
||||
if (stamina_recovery >= 0)
|
||||
{
|
||||
int health_recovery = (actualInventory[i] as StardewValley.Object).healthRecoveredOnConsumption();
|
||||
int health_recovery = ((StardewValley.Object)actualInventory[i]).healthRecoveredOnConsumption();
|
||||
healthNStamine += $"\n\t{health_recovery} Health";
|
||||
}
|
||||
}
|
||||
@@ -1467,8 +1467,8 @@ namespace stardew_access.Patches
|
||||
|
||||
#region Add buff items (effects like +1 walking speed)
|
||||
// These variables are taken from the game's code itself (IClickableMenu.cs -> 1016 line)
|
||||
bool edibleItem = actualInventory[i] != null && actualInventory[i] is StardewValley.Object && (int)(actualInventory[i] as StardewValley.Object).edibility != -300;
|
||||
string[] buffIconsToDisplay = (edibleItem && Game1.objectInformation[(actualInventory[i] as StardewValley.Object).parentSheetIndex].Split('/').Length > 7) ? actualInventory[i].ModifyItemBuffs(Game1.objectInformation[(actualInventory[i] as StardewValley.Object).parentSheetIndex].Split('/')[7].Split(' ')) : null;
|
||||
bool edibleItem = actualInventory[i] != null && actualInventory[i] is StardewValley.Object && (int)((StardewValley.Object)actualInventory[i]).edibility != -300;
|
||||
string[]? buffIconsToDisplay = (edibleItem && Game1.objectInformation[((StardewValley.Object)actualInventory[i]).parentSheetIndex].Split('/').Length > 7) ? actualInventory[i].ModifyItemBuffs(Game1.objectInformation[((StardewValley.Object)actualInventory[i]).parentSheetIndex].Split('/')[7].Split(' ')) : null;
|
||||
if (buffIconsToDisplay != null)
|
||||
{
|
||||
for (int j = 0; j < buffIconsToDisplay.Length; j++)
|
||||
@@ -1537,7 +1537,7 @@ namespace stardew_access.Patches
|
||||
if (hoveredItemQueryKey != $"{toSpeak}:{i}")
|
||||
{
|
||||
hoveredItemQueryKey = $"{toSpeak}:{i}";
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -38,7 +38,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -52,13 +52,13 @@ namespace stardew_access.Patches
|
||||
|
||||
if (__instance.nextPageButton != null && __instance.nextPageButton.containsPoint(x, y))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithMenuChecker($"Next Page Button", true);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker($"Next Page Button", true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (__instance.previousPageButton != null && __instance.previousPageButton.containsPoint(x, y))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithMenuChecker($"Previous Page Button", true);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker($"Previous Page Button", true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -66,14 +66,14 @@ namespace stardew_access.Patches
|
||||
{
|
||||
if (__instance.languages[i].containsPoint(x, y))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithMenuChecker($"{__instance.languageList[i]} Button", true);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker($"{__instance.languageList[i]} Button", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,14 +86,14 @@ namespace stardew_access.Patches
|
||||
{
|
||||
if (___elevators[i].containsPoint(x, y))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithMenuChecker($"{___elevators[i].name} level", true);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker($"{___elevators[i].name} level", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,11 +105,11 @@ namespace stardew_access.Patches
|
||||
___textBox.SelectMe();
|
||||
string toSpeak = $"{title}";
|
||||
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,19 +119,19 @@ namespace stardew_access.Patches
|
||||
{
|
||||
int x = Game1.getMouseX(), y = Game1.getMouseY();
|
||||
|
||||
MainClass.ScreenReader.SayWithMenuChecker(___message, true);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker(___message, true);
|
||||
if (__instance.okButton.containsPoint(x, y))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithMenuChecker("Ok Button", false);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker("Ok Button", false);
|
||||
}
|
||||
else if (__instance.cancelButton.containsPoint(x, y))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithMenuChecker("Cancel Button", false);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker("Cancel Button", false);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,16 +223,16 @@ namespace stardew_access.Patches
|
||||
}
|
||||
|
||||
if (toSpeak != " ")
|
||||
MainClass.ScreenReader.SayWithMenuChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak, true);
|
||||
else if (__instance.isProfessionChooser && currentLevelUpTitle != $"{___title}. Select a new profession.")
|
||||
{
|
||||
MainClass.ScreenReader.SayWithMenuChecker($"{___title}. Select a new profession.", true);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker($"{___title}. Select a new profession.", true);
|
||||
currentLevelUpTitle = $"{___title}. Select a new profession.";
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,21 +256,21 @@ namespace stardew_access.Patches
|
||||
Game1.activeClickableMenu.receiveLeftClick(Game1.getMouseX(true), Game1.getMouseY(true));
|
||||
}
|
||||
toSpeak = $"{total}g in total. Press left mouse button to save.";
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
}
|
||||
for (int i = 0; i < __instance.categories.Count; i++)
|
||||
{
|
||||
if (__instance.categories[i].containsPoint(Game1.getMouseX(), Game1.getMouseY()))
|
||||
{
|
||||
toSpeak = $"Money recieved from {__instance.getCategoryName(i)}: {___categoryTotals[i]}g.";
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ namespace stardew_access.Patches
|
||||
toSpeak += "\t\n Left click to accept quest.";
|
||||
__instance.acceptQuestButton.snapMouseCursorToCenter();
|
||||
}
|
||||
MainClass.ScreenReader.Say(toSpeak, false);
|
||||
MainClass.GetScreenReader().Say(toSpeak, false);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -323,7 +323,7 @@ namespace stardew_access.Patches
|
||||
string label = c.label;
|
||||
|
||||
if (c.containsPoint(Game1.getMousePosition().X, Game1.getMousePosition().Y))
|
||||
MainClass.ScreenReader.SayWithChecker($"Grab: {name} \t\n {label}", false);
|
||||
MainClass.GetScreenReader().SayWithChecker($"Grab: {name} \t\n {label}", false);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -331,7 +331,7 @@ namespace stardew_access.Patches
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -418,14 +418,14 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
internal static void ExitEventPatch()
|
||||
{
|
||||
if (MainClass.ScreenReader != null)
|
||||
MainClass.ScreenReader.CloseScreenReader();
|
||||
if (MainClass.GetScreenReader() != null)
|
||||
MainClass.GetScreenReader().CloseScreenReader();
|
||||
}
|
||||
internal static void resetGlobalVars()
|
||||
{
|
||||
|
@@ -23,7 +23,7 @@ namespace stardew_access.Patches
|
||||
|
||||
toSpeak = $"Left Quest:\n\t{toSpeak}\n\tPress left click to accept this quest.";
|
||||
|
||||
MainClass.ScreenReader.SayWithMenuChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak, true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -33,13 +33,13 @@ namespace stardew_access.Patches
|
||||
|
||||
toSpeak = $"Right Quest:\n\t{toSpeak}\n\tPress left click to accept this quest.";
|
||||
|
||||
MainClass.ScreenReader.SayWithMenuChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak, true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace stardew_access.Patches
|
||||
if (Game1.dayOfMonth == i + 1)
|
||||
toSpeak += $", Current";
|
||||
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -114,7 +114,7 @@ namespace stardew_access.Patches
|
||||
if (currentDailyQuestText != toSpeak)
|
||||
{
|
||||
currentDailyQuestText = toSpeak;
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -134,7 +134,7 @@ namespace stardew_access.Patches
|
||||
__instance.acceptQuestButton.snapMouseCursorToCenter();
|
||||
}
|
||||
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -142,7 +142,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -171,7 +171,7 @@ namespace stardew_access.Patches
|
||||
toSpeak += ___pages[___currentPage][i].ShouldDisplayAsComplete() ? " completed!" : "";
|
||||
if (__instance.questLogButtons[i].containsPoint(Game1.getOldMouseX(), Game1.getOldMouseY()))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,13 +232,13 @@ namespace stardew_access.Patches
|
||||
if (snapMouseToRewardBox)
|
||||
__instance.rewardBox.snapMouseCursorToCenter();
|
||||
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
@@ -45,11 +45,11 @@ namespace stardew_access.Patches
|
||||
#endregion
|
||||
|
||||
if (toSpeak != " ")
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,15 +95,15 @@ namespace stardew_access.Patches
|
||||
if (TitleMenu.subMenu != null && __instance.backButton.containsPoint(Game1.getMouseX(), Game1.getMouseY()))
|
||||
{
|
||||
string text = "Back Button";
|
||||
MainClass.ScreenReader.SayWithChecker(text, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(text, true);
|
||||
}
|
||||
|
||||
if (TitleMenu.subMenu == null && toSpeak != "")
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace stardew_access.Patches
|
||||
#region Farms
|
||||
if (___menu.deleteButtons.Count > 0 && ___menu.deleteButtons[i].containsPoint(x, y))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithChecker($"Delete {__instance.Farmer.farmName} Farm", true);
|
||||
MainClass.GetScreenReader().SayWithChecker($"Delete {__instance.Farmer.farmName} Farm", true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -128,14 +128,14 @@ namespace stardew_access.Patches
|
||||
// Used diff. functions to narrate to prevent it from speaking the message again on selecting another button.
|
||||
string message = "Really delete farm?";
|
||||
|
||||
MainClass.ScreenReader.SayWithChecker(message, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(message, true);
|
||||
if (___menu.okDeleteButton.containsPoint(x, y))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithMenuChecker("Ok Button", false);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker("Ok Button", false);
|
||||
}
|
||||
else if (___menu.cancelDeleteButton.containsPoint(x, y))
|
||||
{
|
||||
MainClass.ScreenReader.SayWithMenuChecker("Cancel Button", false);
|
||||
MainClass.GetScreenReader().SayWithMenuChecker("Cancel Button", false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -150,14 +150,14 @@ namespace stardew_access.Patches
|
||||
|
||||
string toSpeak = $"{farmName} Farm Selected, \t\n Farmer:{farmerName}, \t\nMoney:{money}, \t\nHours Played:{hoursPlayed}, \t\nDate:{dateStringForSaveGame}";
|
||||
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
MainClass.Monitor.Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
MainClass.GetMonitor().Log($"Unable to narrate Text:\n{e.Message}\n{e.StackTrace}", LogLevel.Error);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -640,7 +640,7 @@ namespace stardew_access.Patches
|
||||
|
||||
if (toSpeak != " ")
|
||||
{
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
}
|
||||
|
||||
await Task.Delay(200);
|
||||
|
Reference in New Issue
Block a user