From e71bdf0e09136e20ad7975798e93dfb932841cdc Mon Sep 17 00:00:00 2001 From: shoaib11120 <shoaib.khan20@outlook.com> Date: Sat, 25 Dec 2021 13:42:47 +0530 Subject: [PATCH] Added date and day to time and day narrator --- stardew-access/Game/CurrentPlayer.cs | 7 ++++++- stardew-access/ModEntry.cs | 2 +- stardew-access/Patches/DialoguePatcher.cs | 1 - 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/stardew-access/Game/CurrentPlayer.cs b/stardew-access/Game/CurrentPlayer.cs index ba54ab4..f825b0e 100644 --- a/stardew-access/Game/CurrentPlayer.cs +++ b/stardew-access/Game/CurrentPlayer.cs @@ -71,11 +71,16 @@ namespace stardew_access.Game return Game1.CurrentSeasonDisplayName; } - public static int getDay() + public static int getDate() { return Game1.dayOfMonth; } + public static string getDay() + { + return Game1.Date.DayOfWeek.ToString(); + } + public static int getMoney() { if(Game1.player == null) diff --git a/stardew-access/ModEntry.cs b/stardew-access/ModEntry.cs index 83b5d57..db76671 100644 --- a/stardew-access/ModEntry.cs +++ b/stardew-access/ModEntry.cs @@ -181,7 +181,7 @@ namespace stardew_access // Narrate time and season if (Equals(e.Button, SButton.Q)) { - string toSpeak = $"Time is {CurrentPlayer.getTimeOfDay()} and it is {CurrentPlayer.getDay()} of {CurrentPlayer.getSeason()}"; + string toSpeak = $"Time is {CurrentPlayer.getTimeOfDay()} and it is {CurrentPlayer.getDay()} {CurrentPlayer.getDate()} of {CurrentPlayer.getSeason()}"; ScreenReader.say(toSpeak, true); } } diff --git a/stardew-access/Patches/DialoguePatcher.cs b/stardew-access/Patches/DialoguePatcher.cs index 61d9b2b..dd454f8 100644 --- a/stardew-access/Patches/DialoguePatcher.cs +++ b/stardew-access/Patches/DialoguePatcher.cs @@ -17,7 +17,6 @@ namespace stardew_access.Patches if (__instance.transitioning) return; - if (__instance.characterDialogue != null) { // For Normal Character dialogues