public void initialize() { debug = new info.FSdebugMessages(debugMode, "FSbladeLiftSurface"); //liftTransform = part.FindModelTransform(liftTransformName); //referenceTransform = part.FindModelTransform(referenceTransformName); //debugCubeTransform = part.FindModelTransform(debugCubeName); liftTransform = findTransform(liftTransformName); referenceTransform = findTransform(referenceTransformName); if (liftTransform == null) { debug.debugMessage("FSliftSurface: Can't find lift transform " + liftTransformName); } else { originalRotation = liftTransform.localRotation; } if (referenceTransform == null) { debug.debugMessage("FSliftSurface: Can't find lift transform " + liftTransformName); } //liftSurfaces = part.GetComponents<FSbladeLiftSurface>().ToList(); initialized = true; }
public void initializeData() { if (!initialized) { debug = new info.FSdebugMessages(debugMode, "FSmeshSwitch"); // you can't have fuel switching without symmetry, it breaks the editor GUI. if (useFuelSwitchModule) { updateSymmetry = true; } parseObjectNames(); fuelTankSetupList = Tools.parseIntegers(fuelTankSetups); objectDisplayList = Tools.parseNames(objectDisplayNames); if (useFuelSwitchModule) { fuelSwitch = part.GetComponent <FSfuelSwitch>(); if (fuelSwitch == null) { useFuelSwitchModule = false; debug.debugMessage("no FSfuelSwitch module found, despite useFuelSwitchModule being true"); } } initialized = true; } }
public override void OnStart(PartModule.StartState state) { getThrottleDelegate = getThrottle; debug = new info.FSdebugMessages(debugMode, "FSengine"); this.PopulateModelTransforms(); velocityCurve = Firespitter.Tools.stringToFloatCurve(velocityLimit); atmosphericThrustCurve = Firespitter.Tools.stringToFloatCurve(atmosphericThrust); fuelConsumptionCurve = Firespitter.Tools.stringToFloatCurve(fuelConsumption); throttleThrustCurve = Firespitter.Tools.stringToFloatCurve(throttleThrust); fillResourceList(resources); }
//[KSPEvent(guiName = "Activate Full Sim", guiActive = true, guiActiveEditor = true)] //public void toggleFullSimulation() //{ // fullSimulation = !fullSimulation; // setFullSimulation(fullSimulation); //} public override void OnStart(PartModule.StartState state) { base.OnStart(state); getThrottleDelegate = getThrottle; debugB = new FSdebugMessages(debugMode, "FSengineBladed"); rotorHubTransform = part.FindModelTransform(rotorHubName); if (rotorHubTransform == null) { debugB.debugMessage("rotorHubTransform is null"); } baseTransform = part.FindModelTransform(baseTransformName); if (baseTransform == null) { debugB.debugMessage("baseTransform is null"); } if (HighLogic.LoadedSceneIsFlight) { setupBlades(); } circumeference = span * Mathf.PI * 2f; bladeMidPoint = span; if (propTweak != null) { circumeference *= propTweak.bladeLengthSlider; bladeMidPoint *= propTweak.bladeLengthSlider; } if (HighLogic.LoadedSceneIsFlight) { flightStarted = true; } Fields["maxRPM"].guiActive = true; Fields["maxRPM"].guiActiveEditor = true; Fields["maxThrust"].guiActiveEditor = false; Fields["maxThrottle"].guiActive = false; Fields["maxThrottle"].guiActiveEditor = false; if (tailRotor) { Fields["useThrottleKeys"].guiActive = false; Fields["useThrottleKeys"].guiActiveEditor = false; Fields["useThrottleState"].guiActive = false; Fields["useThrottleState"].guiActiveEditor = false; } }
public override void OnStart(PartModule.StartState state) { getThrottleDelegate = getThrottle; debug = new info.FSdebugMessages(debugMode, "FSengine"); //part.stackIcon.SetIcon(DefaultIcons.LIQUID_ENGINE); part.stagingIcon = "LIQUID_ENGINE"; thrustTransforms = part.FindModelTransforms(thrustTransformName); velocityCurve = Firespitter.Tools.stringToFloatCurve(velocityLimit); atmosphericThrustCurve = Firespitter.Tools.stringToFloatCurve(atmosphericThrust); fuelConsumptionCurve = Firespitter.Tools.stringToFloatCurve(fuelConsumption); throttleThrustCurve = Firespitter.Tools.stringToFloatCurve(throttleThrust); fillResourceList(resources); }
public void initializeData() { if (!initialized) { debug = new info.FSdebugMessages(debugMode, "FSmeshSwitch"); // you can't have fuel switching without symmetry, it breaks the editor GUI. if (useFuelSwitchModule) { updateSymmetry = true; } parseObjectNames(); fuelTankSetupList = Tools.parseIntegers(fuelTankSetups); objectDisplayList = Tools.parseNames(objectDisplayNames); initialized = true; } }
public void initializeData() { if (!initialized) { debug = new info.FSdebugMessages(debugMode, "FSmeshSwitch"); // you can't have fuel switching without symmetry, it breaks the editor GUI. if (useFuelSwitchModule) updateSymmetry = true; parseObjectNames(); fuelTankSetupList = Tools.parseIntegers(fuelTankSetups); objectDisplayList = Tools.parseNames(objectDisplayNames); if (useFuelSwitchModule) { fuelSwitch = part.GetComponent<FSfuelSwitch>(); if (fuelSwitch == null) { useFuelSwitchModule = false; debug.debugMessage("no FSfuelSwitch module found, despite useFuelSwitchModule being true"); } } initialized = true; } }
//[KSPEvent(guiName = "Activate Full Sim", guiActive = true, guiActiveEditor = true)] //public void toggleFullSimulation() //{ // fullSimulation = !fullSimulation; // setFullSimulation(fullSimulation); //} public override void OnStart(PartModule.StartState state) { base.OnStart(state); getThrottleDelegate = getThrottle; debugB = new FSdebugMessages(debugMode, "FSengineBladed"); rotorHubTransform = part.FindModelTransform(rotorHubName); if (rotorHubTransform == null) debugB.debugMessage("rotorHubTransform is null"); baseTransform = part.FindModelTransform(baseTransformName); if (baseTransform == null) debugB.debugMessage("baseTransform is null"); if (HighLogic.LoadedSceneIsFlight) { setupBlades(); } circumeference = span * Mathf.PI * 2f; bladeMidPoint = span; if (propTweak != null) { circumeference *= propTweak.bladeLengthSlider; bladeMidPoint *= propTweak.bladeLengthSlider; } if (HighLogic.LoadedSceneIsFlight) flightStarted = true; Fields["maxRPM"].guiActive = true; Fields["maxRPM"].guiActiveEditor = true; Fields["maxThrust"].guiActiveEditor = false; Fields["maxThrottle"].guiActive = false; Fields["maxThrottle"].guiActiveEditor = false; if (tailRotor) { Fields["useThrottleKeys"].guiActive = false; Fields["useThrottleKeys"].guiActiveEditor = false; Fields["useThrottleState"].guiActive = false; Fields["useThrottleState"].guiActiveEditor = false; } }