public override IEnumerable <Gizmo> GetGizmos() { var armGizmo = new Command_Toggle { toggleAction = ArmGizmoAction, isActive = () => desiredArmState, icon = Resources.Textures.rxUIArm, defaultLabel = ArmButtonLabel, defaultDesc = ArmButtonDesc, hotKey = Resources.KeyBinging.rxArm }; yield return(armGizmo); if (channelsComp != null) { channelsComp.Configure(true, false, false, RemoteTechUtility.GetChannelsUnlockLevel()); var gz = channelsComp.GetChannelGizmo(); if (gz != null) { yield return(gz); } } if (replaceComp != null) { yield return(replaceComp.MakeGizmo()); } if (DebugSettings.godMode) { yield return(new Command_Action { action = () => { if (isArmed) { Disarm(); } else { Arm(); } }, icon = Resources.Textures.rxUIArm, defaultLabel = "DEV: Toggle armed" }); yield return(new Command_Action { action = () => { Arm(); LightFuse(); }, icon = Resources.Textures.rxUIDetonate, defaultLabel = "DEV: Detonate now" }); } foreach (var g in base.GetGizmos()) { yield return(g); } }
public override string GetInspectString() { var stringBuilder = new StringBuilder(); stringBuilder.Append(base.GetInspectString()); if (IsArmed) { stringBuilder.Append("RemoteExplosive_armed".Translate()); } else { stringBuilder.Append("RemoteExplosive_notArmed".Translate()); } if (channelsComp != null && RemoteTechUtility.GetChannelsUnlockLevel() > RemoteTechUtility.ChannelType.None) { stringBuilder.AppendLine(); stringBuilder.Append(RemoteTechUtility.GetCurrentChannelInspectString(channelsComp.Channel)); } return(stringBuilder.ToString()); }
public override string GetInspectString() { if (!Spawned) { return(string.Empty); } var stringBuilder = new StringBuilder(base.GetInspectString()); if (channels != null) { channels.ChannelPopulation.TryGetValue(channels.Channel, out List <IWirelessDetonationReceiver> list); stringBuilder.AppendLine(); stringBuilder.Append("DetonatorTable_inrange".Translate()); stringBuilder.Append(": " + (list != null?list.Count:0)); if (RemoteTechUtility.GetChannelsUnlockLevel() > RemoteTechUtility.ChannelType.None) { stringBuilder.AppendLine(); stringBuilder.Append(RemoteTechUtility.GetCurrentChannelInspectString(channels.Channel)); } } return(stringBuilder.ToString()); }