From c05212a8608e22e567d8babc5a40b7dd151beed6 Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Sat, 28 Sep 2024 22:43:41 +0200 Subject: [PATCH] Fix issue where sunrise/set is not applied for negative values --- .../InfectionFreeZone/InfectionFreeZone.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Projects/InfectionFreeZone/InfectionFreeZone/InfectionFreeZone.cs b/Projects/InfectionFreeZone/InfectionFreeZone/InfectionFreeZone.cs index 060802f..02b4e54 100644 --- a/Projects/InfectionFreeZone/InfectionFreeZone/InfectionFreeZone.cs +++ b/Projects/InfectionFreeZone/InfectionFreeZone/InfectionFreeZone.cs @@ -540,9 +540,6 @@ namespace InfectionFreeZone { [HarmonyPostfix] [HarmonyPatch(typeof(TimeController), "GetSunsetHour")] public static void PostfixGetSunsetHour(ref float __result) { - if (Main.sunsetHourOffset.Value <= 0) - return; - __result += Main.sunsetHourOffset.Value; __result = Mathf.Clamp(__result, 0f, 24f); } @@ -550,9 +547,6 @@ namespace InfectionFreeZone { [HarmonyPostfix] [HarmonyPatch(typeof(TimeController), "GetSunriseHour")] public static void PostfixGetSunriseHour(ref float __result) { - if (Main.sunriseHourOffset.Value <= 0) - return; - __result += Main.sunriseHourOffset.Value; __result = Mathf.Clamp(__result, 0f, 24f); }