public override void ProcessAction(ulong currentTick, ClientProcessorContext context)
        {
            Player?simulationOwner = context.Client.SimulationManager.GetSimulationOwner();

            if (simulationOwner == null || simulationOwner.Value != context.Client.LocalPlayer)
            {
                return;
            }

            DisasterManager disasterManager = context.Client.DisasterManager;

            if (!disasterManager.AnyDisasterInProgress())
            {
                return;
            }

            // Pull the current time from our disaster proxy
            IDisasterProxy disasterProxy = disasterManager.GetCurrentDisasterProxy();

            disasterManager.UpdateDisaster(disasterProxy.Time);
        }
        public void OnCreateDisaster(Disaster disaster)
        {
            this.disaster = disaster;
            Planetbase.DisasterManager disasterManager = Planetbase.DisasterManager.getInstance();

            switch (disaster.Type)
            {
            case DisasterType.Sandstorm:
                disasterProxy = new SandstormProxy(disaster.CurrentTime, disaster.DisasterLength, disasterManager.getSandstorm());
                break;

            case DisasterType.Blizzard:
                disasterProxy = new BlizzardProxy(disaster.CurrentTime, disaster.DisasterLength, disasterManager.getBlizzard());
                break;

            case DisasterType.SolarFlare:
                disasterProxy = new SolarFlareProxy(disaster.CurrentTime, disaster.DisasterLength, disasterManager.getSolarFlare());
                break;

            default:
                throw new ArgumentException("Unknown disaster type");
            }
            disasterProxy.StartDisaster();
        }
 public void OnEndDisaster()
 {
     disasterProxy.EndDisaster();
     disaster      = null;
     disasterProxy = null;
 }