Inheritance: Volume
Exemple #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);
        }
Exemple #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);
            }
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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();
        }
Exemple #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();
        }
Exemple #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();
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #10
0
 public void AttachHardDisk(Harddisk hardDisk)
 {
     Volumes.Add(hardDisk);
     SelectedVolume = hardDisk;
 }
Exemple #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();
        }
Exemple #12
0
 public void AttachHardDisk(Harddisk hardDisk)
 {
     Volumes.Add(hardDisk);
     SelectedVolume = hardDisk;
 }
Exemple #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();
        }