Fixed warnings
This commit is contained in:
@@ -61,7 +61,7 @@ namespace stardew_access.Patches
|
||||
firstTimeInNamingMenu = false;
|
||||
}
|
||||
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else if (___onFarm && !___namingAnimal)
|
||||
@@ -90,7 +90,7 @@ namespace stardew_access.Patches
|
||||
if (purchaseAnimalMenuQuery != toSpeak)
|
||||
{
|
||||
purchaseAnimalMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -213,7 +213,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -235,7 +235,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -246,7 +246,7 @@ namespace stardew_access.Patches
|
||||
if (carpenterMenuQuery != toSpeak)
|
||||
{
|
||||
carpenterMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -276,7 +276,7 @@ namespace stardew_access.Patches
|
||||
private static async void SayBlueprintInfo(string info)
|
||||
{
|
||||
isSayingBlueprintInfo = true;
|
||||
MainClass.GetScreenReader().Say(info, true);
|
||||
MainClass.ScreenReader.Say(info, true);
|
||||
await Task.Delay(300);
|
||||
isSayingBlueprintInfo = false;
|
||||
}
|
||||
@@ -300,7 +300,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
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");
|
||||
}
|
||||
@@ -345,8 +345,8 @@ namespace stardew_access.Patches
|
||||
}
|
||||
if (farm.destroyStructure(toDemolish))
|
||||
{
|
||||
_ = (int)toDemolish.tileY;
|
||||
_ = (int)toDemolish.tilesHigh;
|
||||
_ = (int)toDemolish.tileY.Value;
|
||||
_ = (int)toDemolish.tilesHigh.Value;
|
||||
Game1.flashAlpha = 1f;
|
||||
toDemolish.showDestroyedAnimation(Game1.getFarm());
|
||||
Game1.playSound("explosion");
|
||||
@@ -356,7 +356,7 @@ namespace stardew_access.Patches
|
||||
// freeze = true;
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
@@ -458,7 +458,7 @@ namespace stardew_access.Patches
|
||||
Game1.playSound("axe");
|
||||
DelayedAction.functionAfterDelay(carpenterMenu.returnToCarpentryMenuAfterSuccessfulBuild, 1500);
|
||||
// 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)
|
||||
{
|
||||
@@ -517,7 +517,7 @@ namespace stardew_access.Patches
|
||||
string? name = buildingToMove.nameOfIndoorsWithoutUnique;
|
||||
name = (name == "null") ? buildingToMove.buildingType.Value : name;
|
||||
|
||||
if ((int)buildingToMove.daysOfConstructionLeft > 0)
|
||||
if ((int)buildingToMove.daysOfConstructionLeft.Value > 0)
|
||||
{
|
||||
buildingToMove = null;
|
||||
return "Building under construction, cannot move";
|
||||
@@ -566,8 +566,8 @@ namespace stardew_access.Patches
|
||||
if (purchaseAnimalsMenu == null)
|
||||
return;
|
||||
|
||||
int x = (selection.tileX * Game1.tileSize) - Game1.viewport.X;
|
||||
int y = (selection.tileY * Game1.tileSize) - Game1.viewport.Y;
|
||||
int x = (selection.tileX.Value * Game1.tileSize) - Game1.viewport.X;
|
||||
int y = (selection.tileY.Value * Game1.tileSize) - Game1.viewport.Y;
|
||||
purchaseAnimalsMenu.receiveLeftClick(x, y);
|
||||
}
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ namespace stardew_access.Patches
|
||||
toSpeak += $"{message.message}, ";
|
||||
});
|
||||
if (toSpeak != " ")
|
||||
MainClass.GetScreenReader().SayWithChatChecker(toSpeak, false);
|
||||
MainClass.ScreenReader.SayWithChatChecker(toSpeak, false);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,7 @@ namespace stardew_access.Patches
|
||||
toSpeak += $"{message.message}, ";
|
||||
});
|
||||
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ namespace stardew_access.Patches
|
||||
else
|
||||
toSpeak = response;
|
||||
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -65,7 +65,7 @@ namespace stardew_access.Patches
|
||||
if (currentDialogue != dialogueText)
|
||||
{
|
||||
currentDialogue = dialogueText;
|
||||
MainClass.GetScreenReader().Say(dialogueText, true);
|
||||
MainClass.ScreenReader.Say(dialogueText, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ namespace stardew_access.Patches
|
||||
else
|
||||
toSpeak = response;
|
||||
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -114,7 +114,7 @@ namespace stardew_access.Patches
|
||||
if (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())
|
||||
{
|
||||
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 (Context.IsPlayerFree)
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak.ToString(), true); // Normal Checker
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak.ToString(), true); // Normal Checker
|
||||
else
|
||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak.ToString(), true); // Menu Checker
|
||||
MainClass.ScreenReader.SayWithMenuChecker(toSpeak.ToString(), true); // Menu Checker
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
@@ -380,7 +380,7 @@ namespace stardew_access.Patches
|
||||
if (__instance.mailMessage.Count > 1)
|
||||
toSpeak = $"Page {__instance.page + 1} of {__instance.mailMessage.Count}:\n\t{toSpeak}";
|
||||
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -393,17 +393,17 @@ namespace stardew_access.Patches
|
||||
string label = c.label;
|
||||
|
||||
if (c.containsPoint(x, y))
|
||||
MainClass.GetScreenReader().SayWithChecker($"Grab: {name} \t\n {label}", false);
|
||||
MainClass.ScreenReader.SayWithChecker($"Grab: {name} \t\n {label}", false);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Narrate buttons
|
||||
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))
|
||||
MainClass.GetScreenReader().SayWithChecker($"Next page button", false);
|
||||
MainClass.ScreenReader.SayWithChecker($"Next page button", false);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -71,7 +71,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -82,7 +82,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ namespace stardew_access.Patches
|
||||
if (junimoNoteMenuQuery != toSpeak)
|
||||
{
|
||||
junimoNoteMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -140,12 +140,12 @@ namespace stardew_access.Patches
|
||||
else if (isBackPressed && __instance.backButton != null && !__instance.backButton.containsPoint(x, y))
|
||||
{
|
||||
__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))
|
||||
{
|
||||
__instance.purchaseButton.snapMouseCursorToCenter();
|
||||
MainClass.GetScreenReader().Say("Purchase Button", true);
|
||||
MainClass.ScreenReader.Say("Purchase Button", true);
|
||||
}
|
||||
}
|
||||
string reward = __instance.getRewardNameForArea(___whichArea);
|
||||
@@ -215,7 +215,7 @@ namespace stardew_access.Patches
|
||||
toSpeak = $"Completed {toSpeak}";
|
||||
|
||||
c.snapMouseCursorToCenter();
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -250,7 +250,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
|
||||
c.snapMouseCursorToCenter();
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -303,7 +303,7 @@ namespace stardew_access.Patches
|
||||
toSpeak = "Empty Slot";
|
||||
}
|
||||
c.snapMouseCursorToCenter();
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -401,7 +401,7 @@ namespace stardew_access.Patches
|
||||
if (socialPageQuery != toSpeak)
|
||||
{
|
||||
socialPageQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -446,7 +446,7 @@ namespace stardew_access.Patches
|
||||
if (socialPageQuery != toSpeak)
|
||||
{
|
||||
socialPageQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -490,7 +490,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
shopMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -502,7 +502,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
shopMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -513,7 +513,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
shopMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -560,7 +560,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
shopMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -589,7 +589,7 @@ namespace stardew_access.Patches
|
||||
if (gameMenuQueryKey != toSpeak)
|
||||
{
|
||||
gameMenuQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -618,7 +618,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -631,7 +631,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -643,7 +643,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -656,7 +656,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -668,7 +668,7 @@ namespace stardew_access.Patches
|
||||
if (geodeMenuQueryKey != toSpeak)
|
||||
{
|
||||
geodeMenuQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -713,7 +713,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
gameMenuQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -725,7 +725,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -738,7 +738,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -751,7 +751,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -764,7 +764,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -778,7 +778,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -792,7 +792,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -805,7 +805,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -847,7 +847,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -987,7 +987,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
craftingPageQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -999,7 +999,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
craftingPageQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1011,7 +1011,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
craftingPageQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1023,7 +1023,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
craftingPageQueryKey = toSpeak;
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -1057,20 +1057,22 @@ namespace stardew_access.Patches
|
||||
|
||||
#region Health & stamina and buff items (effects like +1 walking speed)
|
||||
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";
|
||||
if (stamina_recovery >= 0)
|
||||
{
|
||||
int health_recovery = ((StardewValley.Object)producesItem).healthRecoveredOnConsumption();
|
||||
int health_recovery = producesItemObject.healthRecoveredOnConsumption();
|
||||
buffs += $"\n{health_recovery} Health";
|
||||
}
|
||||
}
|
||||
// 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;
|
||||
string[]? buffIconsToDisplay = (edibleItem && Game1.objectInformation[((StardewValley.Object)producesItem).ParentSheetIndex].Split('/').Length > 7)
|
||||
? producesItem.ModifyItemBuffs(Game1.objectInformation[((StardewValley.Object)producesItem).ParentSheetIndex].Split('/')[7].Split(' '))
|
||||
bool edibleItem = producesItem != null && producesItem is StardewValley.Object && (int)producesItemObject.Edibility != -300;
|
||||
string[]? buffIconsToDisplay = (producesItem != null && edibleItem && Game1.objectInformation[producesItemObject.ParentSheetIndex].Split('/').Length > 7)
|
||||
? producesItem.ModifyItemBuffs(Game1.objectInformation[producesItemObject.ParentSheetIndex].Split('/')[7].Split(' '))
|
||||
: null;
|
||||
|
||||
if (buffIconsToDisplay != null)
|
||||
@@ -1103,7 +1105,7 @@ namespace stardew_access.Patches
|
||||
craftingPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1128,7 +1130,7 @@ namespace stardew_access.Patches
|
||||
craftingPageQueryKey = query;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say("unknown recipe", true);
|
||||
MainClass.ScreenReader.Say("unknown recipe", true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1195,7 +1197,7 @@ namespace stardew_access.Patches
|
||||
inventoryPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
Game1.playSound("drop_item");
|
||||
}
|
||||
return;
|
||||
@@ -1209,7 +1211,7 @@ namespace stardew_access.Patches
|
||||
inventoryPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1222,7 +1224,7 @@ namespace stardew_access.Patches
|
||||
inventoryPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1235,7 +1237,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1249,7 +1251,7 @@ namespace stardew_access.Patches
|
||||
itemGrabMenuQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1345,7 +1347,7 @@ namespace stardew_access.Patches
|
||||
inventoryPageQueryKey = toSpeak;
|
||||
gameMenuQueryKey = "";
|
||||
hoveredItemQueryKey = "";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1408,7 +1410,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
gameMenuQueryKey = "";
|
||||
optionsPageQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1432,7 +1434,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
gameMenuQueryKey = "";
|
||||
exitPageQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1444,7 +1446,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
gameMenuQueryKey = "";
|
||||
exitPageQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1583,7 +1585,7 @@ namespace stardew_access.Patches
|
||||
if (hoveredItemQueryKey != $"{toSpeak}:{i}")
|
||||
{
|
||||
hoveredItemQueryKey = $"{toSpeak}:{i}";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ namespace stardew_access.Patches
|
||||
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 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");
|
||||
}
|
||||
@@ -74,7 +74,7 @@ namespace stardew_access.Patches
|
||||
if (animalQueryMenuQuery != toSpeak)
|
||||
{
|
||||
animalQueryMenuQuery = toSpeak;
|
||||
MainClass.GetScreenReader().Say($"{details} {toSpeak}", true);
|
||||
MainClass.ScreenReader.Say($"{details} {toSpeak}", true);
|
||||
}
|
||||
}
|
||||
catch (System.Exception e)
|
||||
@@ -123,13 +123,13 @@ namespace stardew_access.Patches
|
||||
|
||||
if (__instance.nextPageButton != null && __instance.nextPageButton.containsPoint(x, y))
|
||||
{
|
||||
MainClass.GetScreenReader().SayWithMenuChecker($"Next Page Button", true);
|
||||
MainClass.ScreenReader.SayWithMenuChecker($"Next Page Button", true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (__instance.previousPageButton != null && __instance.previousPageButton.containsPoint(x, y))
|
||||
{
|
||||
MainClass.GetScreenReader().SayWithMenuChecker($"Previous Page Button", true);
|
||||
MainClass.ScreenReader.SayWithMenuChecker($"Previous Page Button", true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
if (__instance.languages[i].containsPoint(x, y))
|
||||
{
|
||||
MainClass.GetScreenReader().SayWithMenuChecker($"{__instance.languageList[i]} Button", true);
|
||||
MainClass.ScreenReader.SayWithMenuChecker($"{__instance.languageList[i]} Button", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ namespace stardew_access.Patches
|
||||
{
|
||||
if (___elevators[i].containsPoint(x, y))
|
||||
{
|
||||
MainClass.GetScreenReader().SayWithMenuChecker($"{___elevators[i].name} level", true);
|
||||
MainClass.ScreenReader.SayWithMenuChecker($"{___elevators[i].name} level", true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -179,7 +179,7 @@ namespace stardew_access.Patches
|
||||
toSpeak = $"Paste button";
|
||||
|
||||
if (toSpeak != "")
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
@@ -222,7 +222,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
|
||||
if (toSpeak != "")
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -236,14 +236,14 @@ namespace stardew_access.Patches
|
||||
{
|
||||
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))
|
||||
{
|
||||
MainClass.GetScreenReader().SayWithMenuChecker("Ok Button", false);
|
||||
MainClass.ScreenReader.SayWithMenuChecker("Ok Button", false);
|
||||
}
|
||||
else if (__instance.cancelButton.containsPoint(x, y))
|
||||
{
|
||||
MainClass.GetScreenReader().SayWithMenuChecker("Cancel Button", false);
|
||||
MainClass.ScreenReader.SayWithMenuChecker("Cancel Button", false);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -336,10 +336,10 @@ namespace stardew_access.Patches
|
||||
}
|
||||
|
||||
if (toSpeak != " ")
|
||||
MainClass.GetScreenReader().SayWithMenuChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithMenuChecker(toSpeak, true);
|
||||
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.";
|
||||
}
|
||||
}
|
||||
@@ -366,14 +366,14 @@ 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.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
}
|
||||
for (int i = 0; i < __instance.categories.Count; i++)
|
||||
{
|
||||
if (__instance.categories[i].containsPoint(Game1.getMouseX(true), Game1.getMouseY(true)))
|
||||
{
|
||||
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()
|
||||
{
|
||||
if (MainClass.GetScreenReader() != null)
|
||||
MainClass.GetScreenReader().CloseScreenReader();
|
||||
if (MainClass.ScreenReader != null)
|
||||
MainClass.ScreenReader.CloseScreenReader();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -71,7 +71,7 @@ namespace stardew_access.Patches
|
||||
if (museumQueryKey != toSpeak)
|
||||
{
|
||||
museumQueryKey = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -92,9 +92,9 @@ namespace stardew_access.Patches
|
||||
|
||||
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;
|
||||
((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");
|
||||
if (((LibraryMuseum)Game1.currentLocation).getRewardsForPlayer(Game1.player).Count > rewardsCount)
|
||||
{
|
||||
@@ -115,13 +115,13 @@ namespace stardew_access.Patches
|
||||
switch (pieces)
|
||||
{
|
||||
case 95:
|
||||
globalChatInfoMessage("MuseumComplete", Game1.player.farmName);
|
||||
globalChatInfoMessage("MuseumComplete", Game1.player.farmName.Value);
|
||||
break;
|
||||
case 40:
|
||||
globalChatInfoMessage("Museum40", Game1.player.farmName);
|
||||
globalChatInfoMessage("Museum40", Game1.player.farmName.Value);
|
||||
break;
|
||||
default:
|
||||
globalChatInfoMessage("donation", Game1.player.name, "object:" + objectID);
|
||||
globalChatInfoMessage("donation", Game1.player.Name, "object:" + objectID);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -135,7 +135,7 @@ namespace stardew_access.Patches
|
||||
if (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}")
|
||||
{
|
||||
museumQueryKey = $"{toSpeak}:{i}";
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@ namespace stardew_access.Patches
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace stardew_access.Patches
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ namespace stardew_access.Patches
|
||||
if (Game1.dayOfMonth == i + 1)
|
||||
toSpeak += $", Current";
|
||||
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -114,7 +114,7 @@ namespace stardew_access.Patches
|
||||
if (currentDailyQuestText != toSpeak)
|
||||
{
|
||||
currentDailyQuestText = toSpeak;
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -134,7 +134,7 @@ namespace stardew_access.Patches
|
||||
__instance.acceptQuestButton.snapMouseCursorToCenter();
|
||||
}
|
||||
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
#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.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -232,7 +232,7 @@ namespace stardew_access.Patches
|
||||
if (snapMouseToRewardBox)
|
||||
__instance.rewardBox.snapMouseCursorToCenter();
|
||||
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ namespace stardew_access.Patches
|
||||
#endregion
|
||||
|
||||
if (toSpeak != " ")
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -94,7 +94,7 @@ namespace stardew_access.Patches
|
||||
if (TitleMenu.subMenu != null && __instance.backButton.containsPoint(Game1.getMouseX(true), Game1.getMouseY(true)))
|
||||
{
|
||||
string text = "Back Button";
|
||||
MainClass.GetScreenReader().SayWithChecker(text, true);
|
||||
MainClass.ScreenReader.SayWithChecker(text, true);
|
||||
}
|
||||
|
||||
// Fix for back button not working using keyboard
|
||||
@@ -108,7 +108,7 @@ namespace stardew_access.Patches
|
||||
}
|
||||
|
||||
if (TitleMenu.subMenu == null && toSpeak != "")
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -128,7 +128,7 @@ namespace stardew_access.Patches
|
||||
#region Farms
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
string message = "Really delete farm?";
|
||||
|
||||
MainClass.GetScreenReader().SayWithChecker(message, true);
|
||||
MainClass.ScreenReader.SayWithChecker(message, true);
|
||||
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))
|
||||
{
|
||||
MainClass.GetScreenReader().SayWithMenuChecker("Cancel Button", false);
|
||||
MainClass.ScreenReader.SayWithMenuChecker("Cancel Button", false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
String farmerName = __instance.Farmer.displayName;
|
||||
String farmName = __instance.Farmer.farmName;
|
||||
String farmName = __instance.Farmer.farmName.Value;
|
||||
String money = __instance.Farmer.Money.ToString();
|
||||
String hoursPlayed = Utility.getHoursMinutesStringFromMilliseconds(__instance.Farmer.millisecondsPlayed);
|
||||
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}";
|
||||
|
||||
MainClass.GetScreenReader().SayWithChecker(toSpeak, true);
|
||||
MainClass.ScreenReader.SayWithChecker(toSpeak, true);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -318,7 +318,7 @@ namespace stardew_access.Patches
|
||||
|
||||
if (toSpeak != " ")
|
||||
{
|
||||
MainClass.GetScreenReader().Say(toSpeak, true);
|
||||
MainClass.ScreenReader.Say(toSpeak, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user