public override void LowFrequencyUpdate()
        {
            if (!_machinePower.HasPower())
            {
                ProcessNotification(true, "Quantum Storage Controller", ref _secondsPassedFromLowPowerMission,
                                    LowPowerMissionPeriod, MissionUtils.AddLowPowerMission);
                return;
            }

            if (_anotherControllerDetected)
            {
                ProcessNetworkScan();
                return;
            }

            ProcessNotification(_machineStorage.IsFull(), "Quantum Storage", ref _secondsPassedFromStorageFullMission,
                                StorageFullMissionPeriod, MissionUtils.AddLowStorageMission);

            ProcessPowerConsumption();
            ProcessNetworkScan();
        }
Example #2
0
        public static string PowerDisplay(MachinePower machinePower)
        {
            string txt = "Desires: " + machinePower.MinOperatingPower + "PPS. Current PPS: " + machinePower.GetPps() + "PPS\n";

            if (!machinePower.HasPower())
            {
                txt += "NO POWER\n";
            }
            else
            {
                txt += "Power: " + machinePower.CurrentPower + "/" + machinePower.MaxPower + "\n";
            }

            return(txt);
        }
 public bool HasPower()
 {
     return(_machinePower.HasPower());
 }