internal static void TerminalActionFitSizeDecrease(IMyTerminalBlock blk) { var comp = blk?.GameLogic?.GetAs <DefenseShields>(); if (comp == null) { return; } var currentValue = DsUi.GetFit(blk); var nextValue = currentValue - 1 >= 0 ? currentValue - 1 : currentValue; DsUi.SetFit(blk, nextValue); }
internal static void TerminalActioFitSizeIncrease(IMyTerminalBlock blk) { var comp = blk?.GameLogic?.GetAs <DefenseShields>(); if (comp == null) { return; } var currentValue = DsUi.GetFit(blk); var nextValue = currentValue + 1 < Instance.Fits.Length ? currentValue + 1 : currentValue; DsUi.SetFit(blk, nextValue); }