Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public void ShowUI()
 {
     TankWindow.ShowGUI(this);
     UpdateMenus(true);
 }