private static void SetLooseArea(IMyTerminalBlock block, bool value) { InstantProjector gl = block.GameLogic.GetAs <InstantProjector>(); gl.LooseArea = value; if (Constants.IsServer) { gl.SaveStorage(); } }
// Context: Terminal private static void SetSpeed(IMyTerminalBlock block, float value) { InstantProjector ip = block.GameLogic.GetAs <InstantProjector>(); ip.Speed = (float)MathHelper.Clamp(Math.Round(value, 2), 1, 1000); ip.RefreshUI(); if (Constants.IsServer) { ip.SaveStorage(); } }