public void Update() { if (!compatible || !HighLogic.LoadedSceneIsEditor) { return; } UpdateTankType(); UpdateUtilization(); CalculateMass(); bool inEditorActionsScreen = (EditorLogic.fetch?.editorScreen == EditorScreen.Actions); bool partIsSelectedInActionsScreen = inEditorActionsScreen && (EditorActionGroups.Instance?.GetSelectedParts().Contains(part) ?? false); if (partIsSelectedInActionsScreen) { TankWindow.ShowGUI(this); } }
public void ShowUI() { TankWindow.ShowGUI(this); UpdateMenus(true); }