static MyShipToolBase() { var useConvSystem = new MyTerminalControlOnOffSwitch <MyShipToolBase>("UseConveyor", MySpaceTexts.Terminal_UseConveyorSystem); useConvSystem.Getter = (x) => (x as IMyInventoryOwner).UseConveyorSystem; useConvSystem.Setter = (x, v) => MySyncConveyors.SendChangeUseConveyorSystemRequest(x.EntityId, v); useConvSystem.EnableToggleAction(); MyTerminalControlFactory.AddControl(useConvSystem); }
static MySmallMissileLauncher() { var useConveyor = new MyTerminalControlOnOffSwitch <MySmallMissileLauncher>("UseConveyor", MySpaceTexts.Terminal_UseConveyorSystem); useConveyor.Getter = (x) => x.m_useConveyorSystem; useConveyor.Setter = (x, v) => MySyncConveyors.SendChangeUseConveyorSystemRequest(x.EntityId, v); useConveyor.Visible = (x) => x.CubeGrid.GridSizeEnum == MyCubeSize.Large; // Only large missile launchers can use conveyor system useConveyor.EnableToggleAction(); MyTerminalControlFactory.AddControl(useConveyor); }
static MySmallMissileLauncherReload() { var useConveyor = new MyTerminalControlOnOffSwitch <MySmallMissileLauncher>("UseConveyor", MySpaceTexts.Terminal_UseConveyorSystem); useConveyor.Getter = (x) => x.UseConveyorSystem; useConveyor.Setter = (x, v) => MySyncConveyors.SendChangeUseConveyorSystemRequest(x.EntityId, v); useConveyor.Visible = (x) => (true); useConveyor.EnableToggleAction(); MyTerminalControlFactory.AddControl(useConveyor); }
static MyShipDrill() { var useConvSystem = new MyTerminalControlOnOffSwitch<MyShipDrill>("UseConveyor", MySpaceTexts.Terminal_UseConveyorSystem); useConvSystem.Getter = (x) => (x as IMyInventoryOwner).UseConveyorSystem; useConvSystem.Setter = (x, v) => MySyncConveyors.SendChangeUseConveyorSystemRequest(x.EntityId, v); useConvSystem.EnableToggleAction(); MyTerminalControlFactory.AddControl(useConvSystem); m_sounds = new MyDrillBase.Sounds() { IdleLoop = new MySoundPair("ToolShipDrillIdle"), MetalLoop = new MySoundPair("ToolShipDrillMetal"), RockLoop = new MySoundPair("ToolShipDrillRock"), }; }
static MyOxygenGenerator() { var useConveyorSystem = new MyTerminalControlOnOffSwitch <MyOxygenGenerator>("UseConveyor", MySpaceTexts.Terminal_UseConveyorSystem); useConveyorSystem.Getter = (x) => (x as IMyInventoryOwner).UseConveyorSystem; useConveyorSystem.Setter = (x, v) => MySyncConveyors.SendChangeUseConveyorSystemRequest(x.EntityId, v); useConveyorSystem.EnableToggleAction(); MyTerminalControlFactory.AddControl(useConveyorSystem); var refillButton = new MyTerminalControlButton <MyOxygenGenerator>("Refill", MySpaceTexts.BlockPropertyTitle_Refill, MySpaceTexts.BlockPropertyTitle_Refill, OnRefillButtonPressed); refillButton.Enabled = (x) => x.CanRefill(); refillButton.EnableAction(); MyTerminalControlFactory.AddControl(refillButton); var autoRefill = new MyTerminalControlCheckbox <MyOxygenGenerator>("Auto-Refill", MySpaceTexts.BlockPropertyTitle_AutoRefill, MySpaceTexts.BlockPropertyTitle_AutoRefill); autoRefill.Getter = (x) => x.m_autoRefill; autoRefill.Setter = (x, v) => x.m_autoRefill = v; autoRefill.EnableAction(); MyTerminalControlFactory.AddControl(autoRefill); }