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); }
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); } }
public override void OnLoad(ConfigNode node) { foreach (ConfigNode hdNode in node.GetNodes("harddisk")) { Harddisk newDisk = new Harddisk(hdNode); this.hardDisk = newDisk; } base.OnLoad(node); }
public override void OnStart(PartModule.StartState state) { cpu = new CPU(this, "ksp"); if (hardDisk == null) { hardDisk = new Harddisk(MemSize); } cpu.AttachHardDisk(hardDisk); cpu.Boot(); }
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(); }
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(); }
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); }
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); }
public void AttachHardDisk(Harddisk hardDisk) { Volumes.Add(hardDisk); SelectedVolume = hardDisk; }
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(); }
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(); }