From 2df723ed7e147f14396feb87758bae51e7664015 Mon Sep 17 00:00:00 2001 From: SamSWAT Date: Thu, 28 Jul 2022 23:03:58 +0300 Subject: [PATCH] =?UTF-8?q?i=20said=20it=20should=20work=20on=20any=20eft?= =?UTF-8?q?=20version=20yet=20i=20keep=20updating=20it=20=F0=9F=92=80=20(1?= =?UTF-8?q?9078=20btw)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/SamSWAT.TimeWeatherChanger/TimeWeatherPlugin.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/SamSWAT.TimeWeatherChanger/TimeWeatherPlugin.cs b/project/SamSWAT.TimeWeatherChanger/TimeWeatherPlugin.cs index 69893ee..f51df98 100644 --- a/project/SamSWAT.TimeWeatherChanger/TimeWeatherPlugin.cs +++ b/project/SamSWAT.TimeWeatherChanger/TimeWeatherPlugin.cs @@ -189,7 +189,7 @@ namespace SamSWAT.TimeWeatherChanger weatherDebug = GUI.Toggle(new Rect(33, 37, 110, 25), weatherDebug, "Weather debug"); GUI.Label(new Rect(74, 52, 110, 25), weatherDebugTex); - currentDateTime = (DateTime)calculateTime.Invoke(gameWorld.GameDateTime, null); + currentDateTime = (DateTime)calculateTime.Invoke(typeof(GameWorld).GetField("GameDateTime").GetValue(gameWorld), null); GUI.Box(new Rect(160, 23, 285, 60), "Current time: " + currentDateTime.ToString("HH:mm:ss")); GUI.Label(new Rect(190, 42, 40, 20), "Hours"); @@ -204,7 +204,7 @@ namespace SamSWAT.TimeWeatherChanger { modifiedDateTime = currentDateTime.AddHours((double)targetTimeHours - currentDateTime.Hour); modifiedDateTime = modifiedDateTime.AddMinutes((double)targetTimeMinutes - currentDateTime.Minute); - resetTime.Invoke(gameWorld.GameDateTime, new object[] { modifiedDateTime }); + resetTime.Invoke(typeof(GameWorld).GetField("GameDateTime").GetValue(gameWorld), new object[] { modifiedDateTime }); Notifier.DisplayMessageNotification("Time was set to: " + modifiedDateTime.ToString("HH:mm")); Singleton.Instance.PlayUISound(EUISoundType.MenuInspectorWindowClose); }