Example #1
0
        private void reInitEngineModule()
        {
            engineModels.renameEngineThrustTransforms(engineThrustTransformName);
            ModuleEngines engine = part.GetComponent <ModuleEngines>();

            if (engine != null)
            {
                engine.thrustVectorTransformName = engineThrustTransformName;
                engineModels.updateEngineModuleThrust(engine, thrustScalePower);
                engine.OnStart(HighLogic.LoadedSceneIsEditor ? StartState.Editor : HighLogic.LoadedSceneIsFlight ? StartState.Flying : StartState.None);
                guiEngineThrust = engine.maxThrust;
            }
            else
            {
                print("Cannot update engine thrust -- no engine module found!");
                guiEngineThrust = 0;
            }
        }