public override void OnStart(PartModule.StartState state) { if (!HighLogic.LoadedSceneIsEditor && !HighLogic.LoadedSceneIsFlight) { return; } //Create the multiconverter //This will be necessary if we are in the editor. //Do this before calling base.OnStart. if (MultiConverter == null) { MultiConverter = new MultiConverterModel(this.part, this.vessel, new LogDelegate(Log)); } MultiConverter.OnStart(state); //Ok, we're mostly initialized, call the base method. base.OnStart(state); //Override part mass with the actual module's part mass (taken from the template file) if (moduleMass > 0f) { this.part.mass = moduleMass; } }
public override void OnLoad(ConfigNode node) { base.OnLoad(node); //Load node info for the MultiConverterModel MultiConverter = new MultiConverterModel(this.part, this.vessel, new LogDelegate(Log)); MultiConverter.Load(node); }
public override void OnStart(PartModule.StartState state) { if (!HighLogic.LoadedSceneIsEditor && !HighLogic.LoadedSceneIsFlight) return; //Create the multiconverter //This will be necessary if we are in the editor. //Do this before calling base.OnStart. if (MultiConverter == null) MultiConverter = new MultiConverterModel(this.part, this.vessel, new LogDelegate(Log)); MultiConverter.OnStart(state); //Ok, we're mostly initialized, call the base method. base.OnStart(state); //Override part mass with the actual module's part mass (taken from the template file) if (moduleMass > 0f) this.part.mass = moduleMass; }