// Token: 0x060056B9 RID: 22201 RVA: 0x001D044C File Offset: 0x001CE64C
        public override bool GroupsWith(Gizmo other)
        {
            if (!base.GroupsWith(other))
            {
                return(false);
            }
            Command_ApparelWargear command_Reloadable = other as Command_ApparelWargear;

            return(command_Reloadable != null && this.comp.parent.def == command_Reloadable.comp.parent.def);
        }
Esempio n. 2
0
        private Command_ApparelWargear CreateVerbTargetCommand(Thing gear, Verb verb)
        {
            Command_ApparelWargear command_Reloadable = new Command_ApparelWargear(this)
            {
                defaultDesc  = gear.def.description,
                hotKey       = this.Props.hotKey,
                defaultLabel = verb.verbProps.label,
                verb         = verb
            };

            if (verb.verbProps.defaultProjectile != null && verb.verbProps.commandIcon == null)
            {
                command_Reloadable.icon          = verb.verbProps.defaultProjectile.uiIcon;
                command_Reloadable.iconAngle     = verb.verbProps.defaultProjectile.uiIconAngle;
                command_Reloadable.iconOffset    = verb.verbProps.defaultProjectile.uiIconOffset;
                command_Reloadable.overrideColor = new Color?(verb.verbProps.defaultProjectile.graphicData.color);
            }
            else
            {
                command_Reloadable.icon             = ((verb.UIIcon != BaseContent.BadTex) ? verb.UIIcon : gear.def.uiIcon);
                command_Reloadable.iconAngle        = gear.def.uiIconAngle;
                command_Reloadable.iconOffset       = gear.def.uiIconOffset;
                command_Reloadable.defaultIconColor = gear.DrawColor;
            }
            if (!this.Wearer.IsColonistPlayerControlled)
            {
                command_Reloadable.Disable(null);
            }
            else if (verb.verbProps.violent && this.Wearer.WorkTagIsDisabled(WorkTags.Violent))
            {
                command_Reloadable.Disable("IsIncapableOfViolenceLower".Translate(this.Wearer.LabelShort, this.Wearer).CapitalizeFirst() + ".");
            }
            else if (!this.CanBeUsed)
            {
                command_Reloadable.Disable(this.DisabledReason(1, 1));
            }
            return(command_Reloadable);
        }