Skip to content

Commit

Permalink
Hide confusing Sun Angle and Flow Rate fields and default breakable t…
Browse files Browse the repository at this point in the history
…o false (and hide break status if false) for ModuleROPayload
  • Loading branch information
NathanKell committed Oct 13, 2023
1 parent 1130554 commit 56e84ca
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Source/ROLib/Modules/ModuelROPayload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ public class ModuleROPayload : ModuleDeployableSolarPanel
{
protected PartModule pmROTank;

public override void OnLoad(ConfigNode node)
{
if (HighLogic.LoadedScene == GameScenes.LOADING)
isBreakable = false;
base.OnLoad(node);
}

public override void OnStart(StartState state)
{
base.OnStart(state);
Expand All @@ -22,6 +29,13 @@ public override void OnStart(StartState state)
moduleROTank.enableVScale = false;
moduleROTank.Fields[nameof(moduleROTank.currentVScale)].guiActiveEditor = false;
}

var fld = Fields[nameof(sunAOA)];
fld.guiActive = fld.guiActiveEditor = false;
fld = Fields[nameof(flowRate)];
fld.guiActive = fld.guiActiveEditor = false;
fld = Fields[nameof(brokenStatusWarning)];
fld.guiActive = fld.guiActiveEditor = isBreakable;
}

internal void OnCoreChanged(BaseField bf, object obj)
Expand Down Expand Up @@ -49,5 +63,10 @@ private void FindAnimations()
}
useAnimation = anim != null;
}

public override string GetInfo()
{
return base.GetInfo();
}
}
}

0 comments on commit 56e84ca

Please sign in to comment.