Issue#56 Other currency narration

This commit is contained in:
Mohammad Shoaib Khan
2022-10-23 12:00:30 +05:30
parent 9d1c6f95dd
commit 950ab21d61

View File

@@ -917,7 +917,6 @@ namespace stardew_access.Patches
MainClass.ScreenReader.Say(toSpeak, true);
Game1.playSound("drop_item");
}
return;
}
if (__instance.organizeButton != null && __instance.organizeButton.containsPoint(x, y))
@@ -930,7 +929,6 @@ namespace stardew_access.Patches
hoveredItemQueryKey = "";
MainClass.ScreenReader.Say(toSpeak, true);
}
return;
}
if (__instance.trashCan != null && __instance.trashCan.containsPoint(x, y))
@@ -943,7 +941,6 @@ namespace stardew_access.Patches
hoveredItemQueryKey = "";
MainClass.ScreenReader.Say(toSpeak, true);
}
return;
}
if (__instance.organizeButton != null && __instance.organizeButton.containsPoint(x, y))
@@ -956,7 +953,6 @@ namespace stardew_access.Patches
hoveredItemQueryKey = "";
MainClass.ScreenReader.Say(toSpeak, true);
}
return;
}
if (__instance.junimoNoteIcon != null && __instance.junimoNoteIcon.containsPoint(x, y))
@@ -970,7 +966,6 @@ namespace stardew_access.Patches
hoveredItemQueryKey = "";
MainClass.ScreenReader.Say(toSpeak, true);
}
return;
}
#endregion
@@ -1066,7 +1061,6 @@ namespace stardew_access.Patches
hoveredItemQueryKey = "";
MainClass.ScreenReader.Say(toSpeak, true);
}
return;
}
}
#endregion
@@ -1076,9 +1070,35 @@ namespace stardew_access.Patches
{
gameMenuQueryKey = "";
inventoryPageQueryKey = "";
return;
}
#endregion
if (MainClass.Config.MoneyKey.JustPressed())
{
string farmName = Game1.content.LoadString("Strings\\UI:Inventory_FarmName", Game1.player.farmName.Value);
string currentFunds = Game1.content.LoadString("Strings\\UI:Inventory_CurrentFunds" + (Game1.player.useSeparateWallets ? "_Separate" : ""), Utility.getNumberWithCommas(Game1.player.Money));
string totalEarnings = Game1.content.LoadString("Strings\\UI:Inventory_TotalEarnings" + (Game1.player.useSeparateWallets ? "_Separate" : ""), Utility.getNumberWithCommas((int)Game1.player.totalMoneyEarned));
int festivalScore = Game1.player.festivalScore;
int walnut = Game1.netWorldState.Value.GoldenWalnuts.Value;
int qiGems = Game1.player.QiGems;
int qiCoins = Game1.player.clubCoins;
string toSpeak = $"{farmName}\n{currentFunds}\n{totalEarnings}";
if (festivalScore > 0)
toSpeak = $"{toSpeak}\nFestival Score: {festivalScore}";
if (walnut > 0)
toSpeak = $"{toSpeak}\nGolden Walnut: {walnut}";
if (qiGems > 0)
toSpeak = $"{toSpeak}\nQi Gems: {qiGems}";
if (qiCoins > 0)
toSpeak = $"{toSpeak}\nQi Club Coins: {qiCoins}";
MainClass.ScreenReader.Say(toSpeak, true);
}
}
catch (Exception e)
{