Esempio n. 1
0
 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;
     }
 }
Esempio n. 2
0
 private static void RainCycle_RainHit(On.RainCycle.orig_RainHit orig, RainCycle self)
 {
     if (Downpour.snow && Downpour.blizzard)
     {
         return;
     }
     orig.Invoke(self);
 }
Esempio n. 3
0
 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;
         }
     }
 }
Esempio n. 4
0
 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);
     }
 }