Ejemplo n.º 1
0
 public override void OnStartFinished(StartState state)
 {
     engineModule = part.GetComponents <ModuleEnginesFX>().Where(x => x.engineID == engineID).FirstOrDefault();
     if (engineModule == null)
     {
         engineModule = part.GetComponents <ModuleEnginesFX>().FirstOrDefault();
         ROLLog.error($"ROLDeployableEngine.OnStartFinished(): Could not locate engine by ID: {engineID} on part {part}.  This will cause errors during gameplay.  Trying default: {engineModule}");
     }
     SetupEngineModuleGui();
 }
Ejemplo n.º 2
0
 public override void OnStartFinished(StartState state)
 {
     base.OnStartFinished(state);
     modAblator  = part.FindModuleImplementing <ModuleAblator>();
     modularPart = part.FindModuleImplementing <ModuleROTank>();
     if (!(modAblator is ModuleAblator && modularPart is ModuleROTank))
     {
         ROLLog.error($"{part} Unable to find ModuleAblator or ModuleROTank modules");
         isEnabled = enabled = false;
         return;
     }
     else
     {
         if (modularPart is ModuleROTank)
         {
             modularPart.Fields[nameof(modularPart.currentDiameter)].uiControlEditor.onFieldChanged += OnDiameterChange;
         }
         UpdateHeatshieldValues();
     }
 }