public Program() { string[] splitStorage; if (string.IsNullOrEmpty(Storage)) { splitStorage = new[] { "", "90", "90" }; } else { splitStorage = Storage.Split(';'); } var cockpitId = splitStorage[0]; _targetXAngle = float.Parse(splitStorage[1]); _targetYAngle = float.Parse(splitStorage[2]); IMyCockpit cockpit = null; if (!string.IsNullOrEmpty(cockpitId)) { long id; long.TryParse(cockpitId, out id); cockpit = GridTerminalSystem.GetBlockWithId(id) as IMyCockpit; if (!cockpit.IsMainCockpit) { cockpit = null; } } if (cockpit == null) { cockpit = GridTerminalSystem.GetMainCockpit(); } _mainCockpit = cockpit; _hinges = GridTerminalSystem.GetBlockGroupWithName("ArmHinges").GetBlocksOfType <IMyMotorStator>(); _rotors = GridTerminalSystem.GetBlockGroupWithName("ArmRotors").GetBlocksOfType <IMyMotorStator>(); Runtime.UpdateFrequency = UpdateFrequency.Update1; }