Inheritance: Volume
Exemplo n.º 1
0
        public override void OnLoad(ConfigNode node)
        {
            // KSP Seems to want to make an instance of my partModule during initial load
            if (vessel == null)
            {
                return;
            }

            foreach (ConfigNode hdNode in node.GetNodes("harddisk"))
            {
                Harddisk newDisk = new Harddisk(hdNode);
                this.hardDisk = newDisk;
            }

            Debug.Log("******************************* ON LOAD ");

            initCpu();

            Debug.Log("******************************* CPU Inited ");

            if (cpu != null)
            {
                cpu.OnLoad(node);
            }

            base.OnLoad(node);
        }
Exemplo n.º 2
0
        public void InitObjects()
        {
            if (_shared == null)
            {
                _shared               = new SharedObjects();
                _shared.Vessel        = this.vessel;
                _shared.Processor     = this;
                _shared.BindingMgr    = new BindingManager(_shared);
                _shared.Interpreter   = new Interpreter(_shared);
                _shared.Screen        = _shared.Interpreter;
                _shared.ScriptHandler = new KS.KSScript();
                _shared.Logger        = new Logger(_shared);
                _shared.VolumeMgr     = new VolumeManager(_shared);
                _shared.ProcessorMgr  = new ProcessorManager(_shared);
                _shared.Cpu           = new CPU(_shared);

                // initialize the file system
                _shared.VolumeMgr.Add(new Archive());
                if (hardDisk == null)
                {
                    hardDisk = new Harddisk(MemSize);
                }
                _shared.VolumeMgr.Add(hardDisk);
                _shared.VolumeMgr.SwitchTo(hardDisk);
            }
        }
Exemplo n.º 3
0
        public override void OnLoad(ConfigNode node)
        {
            foreach (ConfigNode hdNode in node.GetNodes("harddisk"))
            {
                Harddisk newDisk = new Harddisk(hdNode);
                this.hardDisk = newDisk;
            }

            base.OnLoad(node);
        }
Exemplo n.º 4
0
        public override void OnLoad(ConfigNode node)
        {
            foreach (ConfigNode hdNode in node.GetNodes("harddisk"))
            {
                Harddisk newDisk = new Harddisk(hdNode);
                this.hardDisk = newDisk;
            }

            base.OnLoad(node);
        }
Exemplo n.º 5
0
        public override void OnStart(PartModule.StartState state)
        {
            cpu = new CPU(this, "ksp");

            if (hardDisk == null)
            {
                hardDisk = new Harddisk(MemSize);
            }

            cpu.AttachHardDisk(hardDisk);
            cpu.Boot();
        }
Exemplo n.º 6
0
        public override void OnStart(PartModule.StartState state)
        {
            //Do not start from editor and at KSP first loading
            if (state == StartState.Editor || state == StartState.None)
            {
                return;
            }

            if (hardDisk == null)
            {
                hardDisk = new Harddisk(MemSize);
            }

            initCpu();
        }
Exemplo n.º 7
0
        public override void OnStart(PartModule.StartState state)
        {
            //Do not start from editor and at KSP first loading
            if (state == StartState.Editor || state == StartState.None)
            {
                return;
            }

            cpu = new CPU(this, "ksp");

            if (hardDisk == null)
            {
                hardDisk = new Harddisk(MemSize);
            }

            cpu.AttachHardDisk(hardDisk);
            cpu.Boot();
        }
Exemplo n.º 8
0
        public override void OnLoad(ConfigNode node)
        {
            // KSP Seems to want to make an instance of my partModule during initial load
            if (vessel == null) return;

            foreach (ConfigNode hdNode in node.GetNodes("harddisk"))
            {
                Harddisk newDisk = new Harddisk(hdNode);
                this.hardDisk = newDisk;
            }

            Debug.Log("******************************* ON LOAD ");

            initCpu();

            Debug.Log("******************************* CPU Inited ");

            if (cpu != null) cpu.OnLoad(node);

            base.OnLoad(node);
        }
Exemplo n.º 9
0
        public override void OnLoad(ConfigNode node)
        {
            // KSP Seems to want to make an instance of my partModule during initial load
            if (vessel == null)
            {
                return;
            }

            if (node.HasNode("harddisk"))
            {
                Harddisk newDisk = new Harddisk(node.GetNode("harddisk"));
                hardDisk = newDisk;
            }

            InitObjects();

            if (_shared != null && _shared.Cpu != null)
            {
                _shared.Cpu.OnLoad(node);
            }

            base.OnLoad(node);
        }
Exemplo n.º 10
0
Arquivo: CPU.cs Projeto: kendrome/KOS
 public void AttachHardDisk(Harddisk hardDisk)
 {
     Volumes.Add(hardDisk);
     SelectedVolume = hardDisk;
 }
Exemplo n.º 11
0
        public override void OnStart(PartModule.StartState state)
        {
            //Do not start from editor and at KSP first loading
            if (state == StartState.Editor || state == StartState.None)
            {
                return;
            }

            cpu = new CPU(this, "ksp");

            if (hardDisk == null) hardDisk = new Harddisk(MemSize);

            cpu.AttachHardDisk(hardDisk);
            cpu.Boot();
        }
Exemplo n.º 12
0
 public void AttachHardDisk(Harddisk hardDisk)
 {
     Volumes.Add(hardDisk);
     SelectedVolume = hardDisk;
 }
Exemplo n.º 13
0
        public override void OnStart(PartModule.StartState state)
        {
            //Do not start from editor and at KSP first loading
            if (state == StartState.Editor || state == StartState.None)
            {
                return;
            }

            if (hardDisk == null) hardDisk = new Harddisk(MemSize);

            initCpu();
        }