private void ExplodeAurora() { CrashedShipExploder main = CrashedShipExploder.main; main.timeToStartCountdown = ((Utils.ScalarMonitor)main.ReflectionGet("timeMonitor", false, false)).Get() - 25f + 1f; main.timeToStartWarning = main.timeToStartCountdown - 1f; }
private void ExplodeAurora() { CrashedShipExploder main = CrashedShipExploder.main; main.timeToStartCountdown = main.timeMonitor.Get() - 25f + 1f; main.timeToStartWarning = main.timeToStartCountdown - 1f; }
private void ExplodeAurora() { pdaManagerEntry.AuroraExplosionTriggered = true; CrashedShipExploder main = CrashedShipExploder.main; main.timeMonitor.Update(DayNightCycle.main.timePassedAsFloat); main.timeToStartCountdown = main.timeMonitor.Get(); }
public override void Process(AuroraExplodeNow packet) { pdaManagerEntry.AuroraExplosionTriggered = true; CrashedShipExploder main = CrashedShipExploder.main; main.timeMonitor.Update(DayNightCycle.main.timePassedAsFloat); // Same code as in OnConsoleCommand_explodeship, but we prefixed it so we can't call it like this main.timeToStartCountdown = main.timeMonitor.Get() - 25f + 1f; main.timeToStartWarning = main.timeToStartCountdown - 1f; Log.Debug("Exploding aurora now"); }
public override void Process(AuroraRestore packet) { pdaManagerEntry.AuroraExplosionTriggered = false; // Same code as in OnConsoleCommand_restoreship, but we prefixed it so we can't call it like this, also we don't need to SetExplodeTime as it's server stuff CrashedShipExploder main = CrashedShipExploder.main; main.SwapModels(false); main.fxControl.StopAndDestroy(0, 0f); main.fxControl.StopAndDestroy(1, 0f); Log.Debug("Restored aurora"); }
public static void Postfix(ref CrashedShipExploder __instance) { float num; if (Config.TIME_LONG.Equals(DeathRun.config.explosionTime)) { num = 4.5f; // 90 minutes from game start (80 minutes is the longest "random" time available) } else if (Config.TIME_SHORT.Equals(DeathRun.config.explosionTime)) { num = 2.25f; // Just less than shortest possible time of the original random numbber range: 45 minutes from game start // (actual shortest random value is 2.3f, but 46 minutes just... irritates me) } else if (Config.TIME_MEDIUM.Equals(DeathRun.config.explosionTime)) { num = 3f; // One hour from game start } else { return; // Just leave the original random number in place } __instance.timeToStartCountdown = __instance.timeToStartWarning + num * 1200f; }