Compare commits

..

1 Commits
2.3.0 ... main

View File

@ -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<GUISounds>.Instance.PlayUISound(EUISoundType.MenuInspectorWindowClose);
}