Skip to content

Commit 0137fb6

Browse files
committed
Info now properly updated on B9PartSwitch variants switching
1 parent f40c3d4 commit 0137fb6

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

src/Modules/PartInfoInPAW.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ public class ModulePartInfoInPAW: PartModule
3232
protected bool InfoUpdated = false;
3333
protected bool ShowTWR = true;
3434

35+
private void Start()
36+
{
37+
GameEvents.onEditorShipModified.Add(EditorShipModified);
38+
}
39+
40+
private void OnDestroy()
41+
{
42+
GameEvents.onEditorShipModified.Remove(EditorShipModified);
43+
}
44+
45+
private void EditorShipModified(ShipConstruct construct)
46+
{
47+
InfoUpdated = false;
48+
}
49+
3550
public void Update()
3651
{
3752
if (!InfoUpdated && HighLogic.LoadedSceneIsEditor)

0 commit comments

Comments
 (0)