public override IEnumerable <Gizmo> GetWornGizmos()
        {
            var wearer = Wearer;

            yield return(new Command_MouseOverDetector {
                action = OnGizmoActivation,
                mouseOverCallback = OnMouseOverGizmo,
                icon = Resources.Textures.rxUIDetonatorPortable,
                defaultLabel = "PortableDetonator_detonateChannel_label".Translate(Channel),
                defaultDesc = $"{DetonateButtonDesc}\n{GetInspectString()}",
                hotKey = Resources.KeyBinging.rxPortableDetonatorDetonate,
                disabled = !wearer.IsColonist || wearer.Dead || wearer.InMentalState
            });

            if (channelsUpgrade != null && channelsComp != null)
            {
                if (channelsUpgrade.Complete)
                {
                    var g = channelsComp.GetChannelGizmo();
                    if (g != null)
                    {
                        yield return(g);
                    }
                }
                else
                {
                    var gizmo = channelsUpgrade.CompGetGizmosExtra().FirstOrDefault();
                    if (gizmo != null)
                    {
                        yield return(gizmo);
                    }
                }
            }
        }
        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 IEnumerable <Gizmo> GetGizmos()
        {
            Command detonate;

            if (CanDetonateImmediately())
            {
                detonate = new Command_Action {
                    action       = DoDetonation,
                    defaultLabel = "Detonator_detonateNow_label".Translate(),
                };
            }
            else
            {
                detonate = new Command_Toggle {
                    toggleAction = DetonateToggleAction,
                    isActive     = () => wantDetonation,
                    defaultLabel = "DetonatorTable_detonate_label".Translate(),
                };
            }
            detonate.icon        = Resources.Textures.rxUIDetonate;
            detonate.defaultDesc = "DetonatorTable_detonate_desc".Translate();
            detonate.hotKey      = Resources.KeyBinging.rxRemoteTableDetonate;
            yield return(detonate);

            var c = channels?.GetChannelGizmo();

            if (c != null)
            {
                yield return(c);
            }

            foreach (var g in base.GetGizmos())
            {
                yield return(g);
            }
        }