static MyBeacon() { MyTerminalControlFactory.RemoveBaseClass <MyBeacon, MyTerminalBlock>(); var show = new MyTerminalControlOnOffSwitch <MyBeacon>("ShowInTerminal", MySpaceTexts.Terminal_ShowInTerminal, MySpaceTexts.Terminal_ShowInTerminalToolTip); show.Getter = (x) => x.ShowInTerminal; show.Setter = (x, v) => x.RequestShowInTerminal(v); MyTerminalControlFactory.AddControl(show); var showConfig = new MyTerminalControlOnOffSwitch <MyBeacon>("ShowInToolbarConfig", MySpaceTexts.Terminal_ShowInToolbarConfig, MySpaceTexts.Terminal_ShowInToolbarConfigToolTip); showConfig.Getter = (x) => x.ShowInToolbarConfig; showConfig.Setter = (x, v) => x.RequestShowInToolbarConfig(v); MyTerminalControlFactory.AddControl(showConfig); var customName = new MyTerminalControlTextbox <MyBeacon>("CustomName", MySpaceTexts.Name, MySpaceTexts.Blank); customName.Getter = (x) => x.CustomName; customName.Setter = (x, v) => MySyncBlockHelpers.SendChangeNameRequest(x, v); customName.SupportsMultipleBlocks = false; MyTerminalControlFactory.AddControl(customName); MyTerminalControlFactory.AddControl(new MyTerminalControlSeparator <MyBeacon>()); var broadcastRadius = new MyTerminalControlSlider <MyBeacon>("Radius", MySpaceTexts.BlockPropertyTitle_BroadcastRadius, MySpaceTexts.BlockPropertyDescription_BroadcastRadius); broadcastRadius.SetLogLimits(1, MyEnergyConstants.MAX_RADIO_POWER_RANGE); broadcastRadius.DefaultValue = 10000; broadcastRadius.Getter = (x) => x.RadioBroadcaster.BroadcastRadius; broadcastRadius.Setter = (x, v) => x.RadioBroadcaster.SyncObject.SendChangeRadioAntennaRequest(v, x.RadioBroadcaster.Enabled); broadcastRadius.Writer = (x, result) => result.Append(new StringBuilder().AppendDecimal(x.RadioBroadcaster.BroadcastRadius, 0).Append(" m")); broadcastRadius.EnableActions(); MyTerminalControlFactory.AddControl(broadcastRadius); }
protected override void CreateTerminalControls() { if (MyTerminalControlFactory.AreControlsCreated <MyRadioAntenna>()) { return; } base.CreateTerminalControls(); MyTerminalControlFactory.RemoveBaseClass <MyRadioAntenna, MyTerminalBlock>(); var show = new MyTerminalControlOnOffSwitch <MyRadioAntenna>("ShowInTerminal", MySpaceTexts.Terminal_ShowInTerminal, MySpaceTexts.Terminal_ShowInTerminalToolTip); show.Getter = (x) => x.ShowInTerminal; show.Setter = (x, v) => x.ShowInTerminal = v; MyTerminalControlFactory.AddControl(show); var showConfig = new MyTerminalControlOnOffSwitch <MyRadioAntenna>("ShowInToolbarConfig", MySpaceTexts.Terminal_ShowInToolbarConfig, MySpaceTexts.Terminal_ShowInToolbarConfigToolTip); showConfig.Getter = (x) => x.ShowInToolbarConfig; showConfig.Setter = (x, v) => x.ShowInToolbarConfig = v; MyTerminalControlFactory.AddControl(showConfig); var customName = new MyTerminalControlTextbox <MyRadioAntenna>("CustomName", MyCommonTexts.Name, MySpaceTexts.Blank); customName.Getter = (x) => x.CustomName; customName.Setter = (x, v) => x.SetCustomName(v); customName.SupportsMultipleBlocks = false; MyTerminalControlFactory.AddControl(customName); MyTerminalControlFactory.AddControl(new MyTerminalControlSeparator <MyRadioAntenna>()); var broadcastRadius = new MyTerminalControlSlider <MyRadioAntenna>("Radius", MySpaceTexts.BlockPropertyTitle_BroadcastRadius, MySpaceTexts.BlockPropertyDescription_BroadcastRadius); broadcastRadius.SetLogLimits((block) => 1, (block) => block.CubeGrid.GridSizeEnum == MyCubeSize.Large ? MyEnergyConstants.MAX_RADIO_POWER_RANGE : MyEnergyConstants.MAX_SMALL_RADIO_POWER_RANGE); broadcastRadius.DefaultValueGetter = (block) => block.CubeGrid.GridSizeEnum == MyCubeSize.Large ? 10000 : 500; broadcastRadius.Getter = (x) => x.RadioBroadcaster.BroadcastRadius; broadcastRadius.Setter = (x, v) => x.m_radius.Value = v; //broadcastRadius.Writer = (x, result) => result.Append(x.RadioBroadcaster.BroadcastRadius < MyEnergyConstants.MAX_RADIO_POWER_RANGE ? new StringBuilder().AppendDecimal(x.RadioBroadcaster.BroadcastRadius, 0).Append(" m") : MyTexts.Get(MySpaceTexts.ScreenTerminal_Infinite)); broadcastRadius.Writer = (x, result) => { result.Append(new StringBuilder().AppendDecimal(x.RadioBroadcaster.BroadcastRadius, 0).Append(" m")); }; broadcastRadius.EnableActions(); MyTerminalControlFactory.AddControl(broadcastRadius); var enableBroadcast = new MyTerminalControlCheckbox <MyRadioAntenna>("EnableBroadCast", MySpaceTexts.Antenna_EnableBroadcast, MySpaceTexts.Antenna_EnableBroadcast); enableBroadcast.Getter = (x) => x.RadioBroadcaster.Enabled; enableBroadcast.Setter = (x, v) => x.m_enableBroadcasting.Value = v; enableBroadcast.EnableAction(); MyTerminalControlFactory.AddControl(enableBroadcast); var showShipName = new MyTerminalControlCheckbox <MyRadioAntenna>("ShowShipName", MySpaceTexts.BlockPropertyTitle_ShowShipName, MySpaceTexts.BlockPropertyDescription_ShowShipName); showShipName.Getter = (x) => x.ShowShipName; showShipName.Setter = (x, v) => x.ShowShipName = v; showShipName.EnableAction(); MyTerminalControlFactory.AddControl(showShipName); }
protected override void CreateTerminalControls() { if (MyTerminalControlFactory.AreControlsCreated <MySpaceBall>()) { return; } base.CreateTerminalControls(); MyTerminalControlFactory.RemoveBaseClass <MySpaceBall, MyTerminalBlock>(); var mass = new MyTerminalControlSlider <MySpaceBall>("VirtualMass", MySpaceTexts.BlockPropertyDescription_SpaceBallVirtualMass, MySpaceTexts.BlockPropertyDescription_SpaceBallVirtualMass); mass.Getter = (x) => x.VirtualMass; mass.Setter = (x, v) => x.VirtualMass = v; mass.DefaultValueGetter = (x) => DEFAULT_MASS; mass.SetLimits(x => 0, x => x.BlockDefinition.MaxVirtualMass); mass.Writer = (x, result) => MyValueFormatter.AppendWeightInBestUnit(x.VirtualMass, result); mass.EnableActions(); MyTerminalControlFactory.AddControl(mass); if (MyPerGameSettings.BallFriendlyPhysics) { var friction = new MyTerminalControlSlider <MySpaceBall>("Friction", MySpaceTexts.BlockPropertyDescription_SpaceBallFriction, MySpaceTexts.BlockPropertyDescription_SpaceBallFriction); friction.Getter = (x) => x.Friction; friction.Setter = (x, v) => x.Friction = v; friction.DefaultValueGetter = (x) => DEFAULT_FRICTION; friction.SetLimits(0, 1.0f); friction.Writer = (x, result) => result.AppendInt32((int)(x.Friction * 100)).Append("%"); friction.EnableActions(); MyTerminalControlFactory.AddControl(friction); var restitution = new MyTerminalControlSlider <MySpaceBall>("Restitution", MySpaceTexts.BlockPropertyDescription_SpaceBallRestitution, MySpaceTexts.BlockPropertyDescription_SpaceBallRestitution); restitution.Getter = (x) => x.Restitution; restitution.Setter = (x, v) => x.Restitution = v; restitution.DefaultValueGetter = (x) => DEFAULT_RESTITUTION; restitution.SetLimits(0, 1.0f); restitution.Writer = (x, result) => result.AppendInt32((int)(x.Restitution * 100)).Append("%"); restitution.EnableActions(); MyTerminalControlFactory.AddControl(restitution); } var enableBroadcast = new MyTerminalControlCheckbox <MySpaceBall>("EnableBroadCast", MySpaceTexts.Antenna_EnableBroadcast, MySpaceTexts.Antenna_EnableBroadcast); enableBroadcast.Getter = (x) => x.RadioBroadcaster.Enabled; enableBroadcast.Setter = (x, v) => x.m_broadcastSync.Value = v; enableBroadcast.EnableAction(); MyTerminalControlFactory.AddControl(enableBroadcast); }
static MyRadioAntenna() { MyTerminalControlFactory.RemoveBaseClass <MyRadioAntenna, MyTerminalBlock>(); var show = new MyTerminalControlOnOffSwitch <MyRadioAntenna>("ShowInTerminal", MySpaceTexts.Terminal_ShowInTerminal, MySpaceTexts.Terminal_ShowInTerminalToolTip); show.Getter = (x) => x.ShowInTerminal; show.Setter = (x, v) => x.RequestShowInTerminal(v); MyTerminalControlFactory.AddControl(show); var customName = new MyTerminalControlTextbox <MyRadioAntenna>("CustomName", MySpaceTexts.Name, MySpaceTexts.Blank); customName.Getter = (x) => x.CustomName; customName.Setter = (x, v) => MySyncBlockHelpers.SendChangeNameRequest(x, v); customName.SupportsMultipleBlocks = false; MyTerminalControlFactory.AddControl(customName); MyTerminalControlFactory.AddControl(new MyTerminalControlSeparator <MyRadioAntenna>()); var broadcastRadius = new MyTerminalControlSlider <MyRadioAntenna>("Radius", MySpaceTexts.BlockPropertyTitle_BroadcastRadius, MySpaceTexts.BlockPropertyDescription_BroadcastRadius); broadcastRadius.SetLogLimits((block) => 1, (block) => block.CubeGrid.GridSizeEnum == MyCubeSize.Large ? MyEnergyConstants.MAX_RADIO_POWER_RANGE : MyEnergyConstants.MAX_SMALL_RADIO_POWER_RANGE); broadcastRadius.DefaultValueGetter = (block) => block.CubeGrid.GridSizeEnum == MyCubeSize.Large ? 10000 : 500; broadcastRadius.Getter = (x) => x.RadioBroadcaster.BroadcastRadius; broadcastRadius.Setter = (x, v) => x.RadioBroadcaster.SyncObject.SendChangeRadioAntennaRequest(v, x.RadioBroadcaster.Enabled); //broadcastRadius.Writer = (x, result) => result.Append(x.RadioBroadcaster.BroadcastRadius < MyEnergyConstants.MAX_RADIO_POWER_RANGE ? new StringBuilder().AppendDecimal(x.RadioBroadcaster.BroadcastRadius, 0).Append(" m") : MyTexts.Get(MySpaceTexts.ScreenTerminal_Infinite)); broadcastRadius.Writer = (x, result) => { result.Append(new StringBuilder().AppendDecimal(x.RadioBroadcaster.BroadcastRadius, 0).Append(" m")); }; broadcastRadius.EnableActions(); MyTerminalControlFactory.AddControl(broadcastRadius); var enableBroadcast = new MyTerminalControlCheckbox <MyRadioAntenna>("EnableBroadCast", MySpaceTexts.Antenna_EnableBroadcast, MySpaceTexts.Antenna_EnableBroadcast); enableBroadcast.Getter = (x) => x.RadioBroadcaster.Enabled; enableBroadcast.Setter = (x, v) => x.RadioBroadcaster.SyncObject.SendChangeRadioAntennaRequest(x.RadioBroadcaster.BroadcastRadius, v); enableBroadcast.EnableAction(); MyTerminalControlFactory.AddControl(enableBroadcast); var showShipName = new MyTerminalControlCheckbox <MyRadioAntenna>("ShowShipName", MySpaceTexts.BlockPropertyTitle_ShowShipName, MySpaceTexts.BlockPropertyDescription_ShowShipName); showShipName.Getter = (x) => x.ShowShipName; showShipName.Setter = (x, v) => x.RadioBroadcaster.SyncObject.SendChangeRadioAntennaDisplayName(v); showShipName.EnableAction(); MyTerminalControlFactory.AddControl(showShipName); }
static void CreateTerminalControls() { if (MyTerminalControlFactory.AreControlsCreated <MyBeacon>()) { return; } MyTerminalControlFactory.RemoveBaseClass <MyBeacon, MyTerminalBlock>(); var show = new MyTerminalControlOnOffSwitch <MyBeacon>("ShowInTerminal", MySpaceTexts.Terminal_ShowInTerminal, MySpaceTexts.Terminal_ShowInTerminalToolTip); show.Getter = (x) => x.ShowInTerminal; show.Setter = (x, v) => x.ShowInTerminal = v; MyTerminalControlFactory.AddControl(show); var showConfig = new MyTerminalControlOnOffSwitch <MyBeacon>("ShowInToolbarConfig", MySpaceTexts.Terminal_ShowInToolbarConfig, MySpaceTexts.Terminal_ShowInToolbarConfigToolTip); showConfig.Getter = (x) => x.ShowInToolbarConfig; showConfig.Setter = (x, v) => x.ShowInToolbarConfig = v; MyTerminalControlFactory.AddControl(showConfig); var customName = new MyTerminalControlTextbox <MyBeacon>("CustomName", MyCommonTexts.Name, MySpaceTexts.Blank); customName.Getter = (x) => x.CustomName; customName.Setter = (x, v) => x.SetCustomName(v); customName.SupportsMultipleBlocks = false; MyTerminalControlFactory.AddControl(customName); MyTerminalControlFactory.AddControl(new MyTerminalControlSeparator <MyBeacon>()); var broadcastRadius = new MyTerminalControlSlider <MyBeacon>("Radius", MySpaceTexts.BlockPropertyTitle_BroadcastRadius, MySpaceTexts.BlockPropertyDescription_BroadcastRadius); broadcastRadius.SetLogLimits(1, MyEnergyConstants.MAX_RADIO_POWER_RANGE); broadcastRadius.DefaultValue = 10000; broadcastRadius.Getter = (x) => x.RadioBroadcaster.BroadcastRadius; broadcastRadius.Setter = (x, v) => x.m_radius.Value = v; broadcastRadius.Writer = (x, result) => result.Append(new StringBuilder().AppendDecimal(x.RadioBroadcaster.BroadcastRadius, 0).Append(" m")); broadcastRadius.EnableActions(); MyTerminalControlFactory.AddControl(broadcastRadius); }
protected override void CreateTerminalControls() { if (!MyTerminalControlFactory.AreControlsCreated <MyRadioAntenna>()) { base.CreateTerminalControls(); MyTerminalControlFactory.RemoveBaseClass <MyRadioAntenna, MyTerminalBlock>(); MyStringId?on = null; on = null; MyTerminalControlOnOffSwitch <MyRadioAntenna> switch3 = new MyTerminalControlOnOffSwitch <MyRadioAntenna>("ShowInTerminal", MySpaceTexts.Terminal_ShowInTerminal, MySpaceTexts.Terminal_ShowInTerminalToolTip, on, on); MyTerminalControlOnOffSwitch <MyRadioAntenna> switch4 = new MyTerminalControlOnOffSwitch <MyRadioAntenna>("ShowInTerminal", MySpaceTexts.Terminal_ShowInTerminal, MySpaceTexts.Terminal_ShowInTerminalToolTip, on, on); switch4.Getter = x => x.ShowInTerminal; MyTerminalControlOnOffSwitch <MyRadioAntenna> local57 = switch4; MyTerminalControlOnOffSwitch <MyRadioAntenna> control = switch4; control.Setter = (x, v) => x.ShowInTerminal = v; MyTerminalControlFactory.AddControl <MyRadioAntenna>(control); on = null; on = null; MyTerminalControlOnOffSwitch <MyRadioAntenna> switch1 = new MyTerminalControlOnOffSwitch <MyRadioAntenna>("ShowInToolbarConfig", MySpaceTexts.Terminal_ShowInToolbarConfig, MySpaceTexts.Terminal_ShowInToolbarConfigToolTip, on, on); MyTerminalControlOnOffSwitch <MyRadioAntenna> switch2 = new MyTerminalControlOnOffSwitch <MyRadioAntenna>("ShowInToolbarConfig", MySpaceTexts.Terminal_ShowInToolbarConfig, MySpaceTexts.Terminal_ShowInToolbarConfigToolTip, on, on); switch2.Getter = x => x.ShowInToolbarConfig; MyTerminalControlOnOffSwitch <MyRadioAntenna> local55 = switch2; MyTerminalControlOnOffSwitch <MyRadioAntenna> local56 = switch2; local56.Setter = (x, v) => x.ShowInToolbarConfig = v; MyTerminalControlFactory.AddControl <MyRadioAntenna>(local56); MyTerminalControlButton <MyRadioAntenna> button1 = new MyTerminalControlButton <MyRadioAntenna>("CustomData", MySpaceTexts.Terminal_CustomData, MySpaceTexts.Terminal_CustomDataTooltip, new Action <MyRadioAntenna>(this.CustomDataClicked)); MyTerminalControlButton <MyRadioAntenna> button2 = new MyTerminalControlButton <MyRadioAntenna>("CustomData", MySpaceTexts.Terminal_CustomData, MySpaceTexts.Terminal_CustomDataTooltip, new Action <MyRadioAntenna>(this.CustomDataClicked)); button2.Enabled = x => !x.m_textboxOpen; MyTerminalControlButton <MyRadioAntenna> local6 = button2; local6.SupportsMultipleBlocks = false; MyTerminalControlFactory.AddControl <MyRadioAntenna>(local6); MyTerminalControlTextbox <MyRadioAntenna> textbox3 = new MyTerminalControlTextbox <MyRadioAntenna>("CustomName", MyCommonTexts.Name, MySpaceTexts.Blank); MyTerminalControlTextbox <MyRadioAntenna> textbox4 = new MyTerminalControlTextbox <MyRadioAntenna>("CustomName", MyCommonTexts.Name, MySpaceTexts.Blank); textbox4.Getter = x => x.CustomName; MyTerminalControlTextbox <MyRadioAntenna> local53 = textbox4; MyTerminalControlTextbox <MyRadioAntenna> local54 = textbox4; local54.Setter = (x, v) => x.SetCustomName(v); MyTerminalControlTextbox <MyRadioAntenna> local9 = local54; local9.SupportsMultipleBlocks = false; MyTerminalControlFactory.AddControl <MyRadioAntenna>(local9); MyTerminalControlFactory.AddControl <MyRadioAntenna>(new MyTerminalControlSeparator <MyRadioAntenna>()); MyTerminalControlTextbox <MyRadioAntenna> textbox1 = new MyTerminalControlTextbox <MyRadioAntenna>("HudText", MySpaceTexts.BlockPropertiesTitle_HudText, MySpaceTexts.BlockPropertiesTitle_HudText_Tooltip); MyTerminalControlTextbox <MyRadioAntenna> textbox2 = new MyTerminalControlTextbox <MyRadioAntenna>("HudText", MySpaceTexts.BlockPropertiesTitle_HudText, MySpaceTexts.BlockPropertiesTitle_HudText_Tooltip); textbox2.Getter = x => x.HudText; MyTerminalControlTextbox <MyRadioAntenna> local51 = textbox2; MyTerminalControlTextbox <MyRadioAntenna> local52 = textbox2; local52.Setter = (x, v) => x.SetHudText(v); MyTerminalControlTextbox <MyRadioAntenna> local12 = local52; local12.SupportsMultipleBlocks = false; MyTerminalControlFactory.AddControl <MyRadioAntenna>(local12); MyTerminalControlCombobox <MyRadioAntenna> combobox1 = new MyTerminalControlCombobox <MyRadioAntenna>("PBList", MySpaceTexts.BlockPropertyTitle_AssignedPB, MySpaceTexts.Blank); MyTerminalControlCombobox <MyRadioAntenna> combobox2 = new MyTerminalControlCombobox <MyRadioAntenna>("PBList", MySpaceTexts.BlockPropertyTitle_AssignedPB, MySpaceTexts.Blank); combobox2.ComboBoxContentWithBlock = (x, list) => x.FillPBComboBoxContent(list); MyTerminalControlCombobox <MyRadioAntenna> local49 = combobox2; MyTerminalControlCombobox <MyRadioAntenna> local50 = combobox2; local50.Getter = x => (long)x.m_attachedPB; MyTerminalControlCombobox <MyRadioAntenna> local47 = local50; MyTerminalControlCombobox <MyRadioAntenna> local48 = local50; local48.Setter = delegate(MyRadioAntenna x, long y) { x.m_attachedPB.Value = y; m_ignoreAllyCheckbox.UpdateVisual(); m_ignoreOtherCheckbox.UpdateVisual(); }; MyTerminalControlFactory.AddControl <MyRadioAntenna>(local48); MyTerminalControlFactory.AddControl <MyRadioAntenna>(new MyTerminalControlSeparator <MyRadioAntenna>()); MyTerminalControlSlider <MyRadioAntenna> slider1 = new MyTerminalControlSlider <MyRadioAntenna>("Radius", MySpaceTexts.BlockPropertyTitle_BroadcastRadius, MySpaceTexts.BlockPropertyDescription_BroadcastRadius); MyTerminalControlSlider <MyRadioAntenna> slider2 = new MyTerminalControlSlider <MyRadioAntenna>("Radius", MySpaceTexts.BlockPropertyTitle_BroadcastRadius, MySpaceTexts.BlockPropertyDescription_BroadcastRadius); slider2.SetLogLimits(block => 1f, block => (block.BlockDefinition as MyRadioAntennaDefinition).MaxBroadcastRadius); MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate local45 = (MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate)slider2; MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate local46 = (MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate)slider2; local46.DefaultValueGetter = x => (x.BlockDefinition as MyRadioAntennaDefinition).MaxBroadcastRadius / 10f; MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate local43 = local46; MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate local44 = local46; local44.Getter = x => x.RadioBroadcaster.BroadcastRadius; MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate local41 = local44; MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate local42 = local44; local42.Setter = (x, v) => x.m_radius.Value = v; MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate local39 = local42; MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate local40 = local42; local40.Writer = (x, result) => result.Append(new StringBuilder().AppendDecimal(x.RadioBroadcaster.BroadcastRadius, 0).Append(" m")); MyTerminalValueControl <MyRadioAntenna, float> .GetterDelegate local22 = local40; ((MyTerminalControlSlider <MyRadioAntenna>)local22).EnableActions <MyRadioAntenna>(0.05f, null, null); MyTerminalControlFactory.AddControl <MyRadioAntenna>((MyTerminalControl <MyRadioAntenna>)local22); on = null; on = null; MyTerminalControlCheckbox <MyRadioAntenna> checkbox3 = new MyTerminalControlCheckbox <MyRadioAntenna>("EnableBroadCast", MySpaceTexts.Antenna_EnableBroadcast, MySpaceTexts.Antenna_EnableBroadcast, on, on); MyTerminalControlCheckbox <MyRadioAntenna> checkbox4 = new MyTerminalControlCheckbox <MyRadioAntenna>("EnableBroadCast", MySpaceTexts.Antenna_EnableBroadcast, MySpaceTexts.Antenna_EnableBroadcast, on, on); checkbox4.Getter = x => x.EnableBroadcasting.Value; MyTerminalControlCheckbox <MyRadioAntenna> local37 = checkbox4; MyTerminalControlCheckbox <MyRadioAntenna> local38 = checkbox4; local38.Setter = (x, v) => x.EnableBroadcasting.Value = v; MyTerminalControlCheckbox <MyRadioAntenna> checkbox = local38; checkbox.EnableAction <MyRadioAntenna>(null); MyTerminalControlFactory.AddControl <MyRadioAntenna>(checkbox); on = null; on = null; MyTerminalControlCheckbox <MyRadioAntenna> checkbox1 = new MyTerminalControlCheckbox <MyRadioAntenna>("ShowShipName", MySpaceTexts.BlockPropertyTitle_ShowShipName, MySpaceTexts.BlockPropertyDescription_ShowShipName, on, on); MyTerminalControlCheckbox <MyRadioAntenna> checkbox2 = new MyTerminalControlCheckbox <MyRadioAntenna>("ShowShipName", MySpaceTexts.BlockPropertyTitle_ShowShipName, MySpaceTexts.BlockPropertyDescription_ShowShipName, on, on); checkbox2.Getter = x => x.ShowShipName; MyTerminalControlCheckbox <MyRadioAntenna> local35 = checkbox2; MyTerminalControlCheckbox <MyRadioAntenna> local36 = checkbox2; local36.Setter = (x, v) => x.ShowShipName = v; MyTerminalControlCheckbox <MyRadioAntenna> local28 = local36; local28.EnableAction <MyRadioAntenna>(null); MyTerminalControlFactory.AddControl <MyRadioAntenna>(local28); MyTerminalControlFactory.AddControl <MyRadioAntenna>(new MyTerminalControlSeparator <MyRadioAntenna>()); on = null; on = null; m_ignoreAllyCheckbox = new MyTerminalControlCheckbox <MyRadioAntenna>("IgnoreAlliedBroadcast", MySpaceTexts.Antenna_IgnoreAlliedBroadcast, MySpaceTexts.Antenna_IgnoreAlliedBroadcastTooltip, on, on); m_ignoreAllyCheckbox.Enabled = x => x.m_attachedPB.Value != 0L; m_ignoreAllyCheckbox.Getter = x => (bool)x.m_ignoreAlliedBroadcast; m_ignoreAllyCheckbox.Setter = (x, y) => x.m_ignoreAlliedBroadcast.Value = y; m_ignoreAllyCheckbox.EnableAction <MyRadioAntenna>(null); MyTerminalControlFactory.AddControl <MyRadioAntenna>(m_ignoreAllyCheckbox); on = null; on = null; m_ignoreOtherCheckbox = new MyTerminalControlCheckbox <MyRadioAntenna>("IgnoreOtherBroadcast", MySpaceTexts.Antenna_IgnoreOtherBroadcast, MySpaceTexts.Antenna_IgnoreOtherBroadcastTooltip, on, on); m_ignoreOtherCheckbox.Enabled = x => x.m_attachedPB.Value != 0L; m_ignoreOtherCheckbox.Getter = x => (bool)x.m_ignoreOtherBroadcast; m_ignoreOtherCheckbox.Setter = (x, y) => x.m_ignoreOtherBroadcast.Value = y; m_ignoreOtherCheckbox.EnableAction <MyRadioAntenna>(null); MyTerminalControlFactory.AddControl <MyRadioAntenna>(m_ignoreOtherCheckbox); } }