private void RainCycle_ctor(On.RainCycle.orig_ctor orig, RainCycle self, World world, float minutes) { orig(self, world, minutes); if (config.MaxCycleTime) { self.cycleLength = 33600; } }
private static void RainCycle_RainHit(On.RainCycle.orig_RainHit orig, RainCycle self) { if (Downpour.snow && Downpour.blizzard) { return; } orig.Invoke(self); }
private static void RainCycle_Update(On.RainCycle.orig_Update orig, RainCycle self) { orig.Invoke(self); if (fixedCycle && fixedCycleLength == 61 / 2 * 60) { if (self.timer > 2500) { self.timer = 2500; } } }
private static void RainCycle_ctor(On.RainCycle.orig_ctor orig, RainCycle self, World world, float minutes) { if (customCycleLength) { float length; if (fixedCycle) { length = (float)fixedCycleLength / 60f; if (fixedCycleLength == 61 / 2 * 60) { length = 32000 / 60 / 40; } } else { length = Mathf.Lerp((float)minimumCycleLength, (float)maximumCycleLength, UnityEngine.Random.value) / 60f; } orig.Invoke(self, world, length); } else { orig.Invoke(self, world, minutes); } }