internal static void WidthWriter(IMyTerminalBlock blk, StringBuilder sb) { var comp = blk?.GameLogic?.GetAs <DefenseShields>(); if (comp == null) { return; } sb.Append(DsUi.GetOffsetWidth(blk)); }
internal static void TerminalActioWidthIncrease(IMyTerminalBlock blk) { var comp = blk?.GameLogic?.GetAs <DefenseShields>(); if (comp == null) { return; } var max = comp.ShieldMode == DefenseShields.ShieldType.Station ? 70 : 39; var currentValue = DsUi.GetOffsetWidth(blk); var nextValue = currentValue + 1 < max ? currentValue + 1 : currentValue; DsUi.SetOffsetWidth(blk, nextValue); }