diff --git a/Content.Shared/Clothing/Components/ToggleClothingComponent.cs b/Content.Shared/Clothing/Components/ToggleClothingComponent.cs
index 04bc3ed4e83..f827cbfea8d 100644
--- a/Content.Shared/Clothing/Components/ToggleClothingComponent.cs
+++ b/Content.Shared/Clothing/Components/ToggleClothingComponent.cs
@@ -33,6 +33,12 @@ public sealed partial class ToggleClothingComponent : Component
///
[DataField]
public bool DisableOnUnequip;
+
+ ///
+ /// If true, the clothes must equip for adding action.
+ ///
+ [DataField]
+ public bool MustEquip = true;
}
///
diff --git a/Content.Shared/Clothing/EntitySystems/ToggleClothingSystem.cs b/Content.Shared/Clothing/EntitySystems/ToggleClothingSystem.cs
index 9889376c9d4..8d6e3e3de65 100644
--- a/Content.Shared/Clothing/EntitySystems/ToggleClothingSystem.cs
+++ b/Content.Shared/Clothing/EntitySystems/ToggleClothingSystem.cs
@@ -39,8 +39,12 @@ public sealed class ToggleClothingSystem : EntitySystem
private void OnGetActions(Entity ent, ref GetItemActionsEvent args)
{
+ if (args.InHands && ent.Comp.MustEquip)
+ return;
+
var ev = new ToggleClothingCheckEvent(args.User);
RaiseLocalEvent(ent, ref ev);
+
if (!ev.Cancelled)
args.AddAction(ent.Comp.ActionEntity);
}
diff --git a/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml b/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml
index 16777cd6900..1dd1e0ba042 100644
--- a/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml
+++ b/Resources/Prototypes/Entities/Clothing/Hands/gloves.yml
@@ -230,6 +230,7 @@
stealthy: true
- type: ToggleClothing
action: ActionToggleNinjaGloves
+ disableOnUnequip: true
- type: NinjaGloves
abilities:
- components:
diff --git a/Resources/Prototypes/Entities/Clothing/Head/helmets.yml b/Resources/Prototypes/Entities/Clothing/Head/helmets.yml
index 67bf8275792..dd1c58eca74 100644
--- a/Resources/Prototypes/Entities/Clothing/Head/helmets.yml
+++ b/Resources/Prototypes/Entities/Clothing/Head/helmets.yml
@@ -452,6 +452,7 @@
delay: 1.0
- type: ToggleClothing
action: ActionToggleJusticeHelm
+ mustEquip: false
- type: ItemTogglePointLight
- type: ToggleableLightVisuals
clothingVisuals:
diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml
index 4417fae13d2..d2b5370ade9 100644
--- a/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml
+++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml
@@ -165,6 +165,7 @@
# phase cloak
- type: ToggleClothing
action: ActionTogglePhaseCloak
+ disableOnUnequip: true
- type: ComponentToggler
parent: true
components:
diff --git a/Resources/Prototypes/Entities/Clothing/Shoes/magboots.yml b/Resources/Prototypes/Entities/Clothing/Shoes/magboots.yml
index 0250671acfc..ab8084c91c0 100644
--- a/Resources/Prototypes/Entities/Clothing/Shoes/magboots.yml
+++ b/Resources/Prototypes/Entities/Clothing/Shoes/magboots.yml
@@ -14,6 +14,7 @@
sprite: Clothing/Shoes/Boots/magboots.rsi
- type: ToggleClothing
action: ActionToggleMagboots
+ mustEquip: false
- type: ToggleVerb
text: toggle-magboots-verb-get-data-text
- type: ComponentToggler