internal static void DepthWriter(IMyTerminalBlock blk, StringBuilder sb) { var comp = blk?.GameLogic?.GetAs <DefenseShields>(); if (comp == null) { return; } sb.Append(DsUi.GetOffsetDepth(blk)); }
internal static void TerminalActionDepthDecrease(IMyTerminalBlock blk) { var comp = blk?.GameLogic?.GetAs <DefenseShields>(); if (comp == null) { return; } var max = comp.ShieldMode == DefenseShields.ShieldType.Station ? 70 : 39; var currentValue = DsUi.GetOffsetDepth(blk); var nextValue = currentValue - 1 > -max ? currentValue - 1 : currentValue; DsUi.SetOffsetDepth(blk, nextValue); }