kOS.Module.kOSProcessor.ProcessorModeChanged C# (CSharp) Method

ProcessorModeChanged() private method

private ProcessorModeChanged ( ) : void
return void
        private void ProcessorModeChanged()
        {
            switch (ProcessorMode)
            {
                case ProcessorModes.READY:
                    if (SafeHouse.Config.StartOnArchive)
                    {
                        shared.VolumeMgr.SwitchTo(Archive);
                    }
                    else
                    {
                        shared.VolumeMgr.SwitchTo(HardDisk);
                    }
                    firstUpdate = true; // handle booting the cpu on the next FixedUpdate
                    if (shared.Interpreter != null) shared.Interpreter.SetInputLock(false);
                    if (shared.Window != null) shared.Window.IsPowered = true;
                    break;

                case ProcessorModes.OFF:
                case ProcessorModes.STARVED:
                    if (shared.Interpreter != null) shared.Interpreter.SetInputLock(true);
                    if (shared.Window != null) shared.Window.IsPowered = false;
                    if (shared.BindingMgr != null) shared.BindingMgr.UnBindAll();
                    if (shared.SoundMaker != null) shared.SoundMaker.StopAllVoices();
                    break;
            }
        }