Skip to content

Commit

Permalink
Fix #18: fix RPM persistence
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyOThan committed May 4, 2023
1 parent e6aa476 commit d689828
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion plugin/ModuleIVASwitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,16 @@ public class ModuleIVASwitch : PartModule

public override void OnLoad(ConfigNode node)
{
if (!HighLogic.LoadedSceneIsFlight) return;

base.OnLoad(node);

if (!vessel.loaded)
{
UpdateInternalConfig(internalName);
return;
}

DetectIVASwitch(node);

/*
Expand Down Expand Up @@ -197,7 +206,7 @@ private string GetCurrentInternalConfigName()
// Returns null if none available
private string GetCurrentInternalModelName()
{
return this.part?.internalModel?.name;
return this.part?.internalModel?.internalName;
}

private string GetConfigValue(ConfigNode node, string id)
Expand Down

0 comments on commit d689828

Please sign in to comment.