diff --git a/Content.Shared/StepTrigger/Components/ClothingRequiredStepTriggerComponent.cs b/Content.Shared/StepTrigger/Components/PreventableStepTriggerComponent.cs
similarity index 61%
rename from Content.Shared/StepTrigger/Components/ClothingRequiredStepTriggerComponent.cs
rename to Content.Shared/StepTrigger/Components/PreventableStepTriggerComponent.cs
index 9efd78d082..166d4ae46a 100644
--- a/Content.Shared/StepTrigger/Components/ClothingRequiredStepTriggerComponent.cs
+++ b/Content.Shared/StepTrigger/Components/PreventableStepTriggerComponent.cs
@@ -4,7 +4,7 @@ using Robust.Shared.GameStates;
namespace Content.Shared.StepTrigger.Components;
///
-/// This is used for marking step trigger events that require the user to wear shoes, such as for glass shards.
+/// This is used for marking step trigger events that require the user to wear shoes or have protection of some sort, such as for glass shards.
///
[RegisterComponent, NetworkedComponent]
-public sealed partial class ClothingRequiredStepTriggerComponent : Component;
+public sealed partial class PreventableStepTriggerComponent : Component;
diff --git a/Content.Shared/StepTrigger/Components/ClothingRequiredStepTriggerImmuneComponent.cs b/Content.Shared/StepTrigger/Components/ProtectedFromStepTriggersComponent.cs
similarity index 58%
rename from Content.Shared/StepTrigger/Components/ClothingRequiredStepTriggerImmuneComponent.cs
rename to Content.Shared/StepTrigger/Components/ProtectedFromStepTriggersComponent.cs
index dc76207828..5aa4698610 100644
--- a/Content.Shared/StepTrigger/Components/ClothingRequiredStepTriggerImmuneComponent.cs
+++ b/Content.Shared/StepTrigger/Components/ProtectedFromStepTriggersComponent.cs
@@ -5,11 +5,11 @@ using Robust.Shared.GameStates;
namespace Content.Shared.StepTrigger.Components;
///
-/// This is used for cancelling step trigger events if the user is wearing clothing in a valid slot.
+/// This is used for cancelling preventable step trigger events if the user is wearing clothing in a valid slot or if the user itself has the component.
///
[RegisterComponent, NetworkedComponent]
[Access(typeof(StepTriggerImmuneSystem))]
-public sealed partial class ClothingRequiredStepTriggerImmuneComponent : Component, IClothingSlots
+public sealed partial class ProtectedFromStepTriggersComponent : Component, IClothingSlots
{
[DataField]
public SlotFlags Slots { get; set; } = SlotFlags.FEET;
diff --git a/Content.Shared/StepTrigger/Components/StepTriggerImmuneComponent.cs b/Content.Shared/StepTrigger/Components/StepTriggerImmuneComponent.cs
deleted file mode 100644
index 74e10bafce..0000000000
--- a/Content.Shared/StepTrigger/Components/StepTriggerImmuneComponent.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Robust.Shared.GameStates;
-
-namespace Content.Shared.StepTrigger.Components;
-
-///
-/// Grants the attached entity to step triggers.
-///
-[RegisterComponent, NetworkedComponent]
-public sealed partial class StepTriggerImmuneComponent : Component;
diff --git a/Content.Shared/StepTrigger/Systems/StepTriggerImmuneSystem.cs b/Content.Shared/StepTrigger/Systems/StepTriggerImmuneSystem.cs
index ca72a20ae9..5771de60cd 100644
--- a/Content.Shared/StepTrigger/Systems/StepTriggerImmuneSystem.cs
+++ b/Content.Shared/StepTrigger/Systems/StepTriggerImmuneSystem.cs
@@ -1,7 +1,6 @@
using Content.Shared.Examine;
using Content.Shared.Inventory;
using Content.Shared.StepTrigger.Components;
-using Content.Shared.Tag;
namespace Content.Shared.StepTrigger.Systems;
@@ -12,25 +11,19 @@ public sealed class StepTriggerImmuneSystem : EntitySystem
///
public override void Initialize()
{
- SubscribeLocalEvent(OnStepTriggerAttempt);
- SubscribeLocalEvent(OnStepTriggerClothingAttempt);
- SubscribeLocalEvent(OnExamined);
+ SubscribeLocalEvent(OnStepTriggerClothingAttempt);
+ SubscribeLocalEvent(OnExamined);
}
- private void OnStepTriggerAttempt(Entity ent, ref StepTriggerAttemptEvent args)
+ private void OnStepTriggerClothingAttempt(Entity ent, ref StepTriggerAttemptEvent args)
{
- args.Cancelled = true;
- }
-
- private void OnStepTriggerClothingAttempt(EntityUid uid, ClothingRequiredStepTriggerComponent component, ref StepTriggerAttemptEvent args)
- {
- if (_inventory.TryGetInventoryEntity(args.Tripper, out _))
+ if (HasComp(args.Tripper) || _inventory.TryGetInventoryEntity(args.Tripper, out _))
{
args.Cancelled = true;
}
}
- private void OnExamined(EntityUid uid, ClothingRequiredStepTriggerComponent component, ExaminedEvent args)
+ private void OnExamined(EntityUid uid, PreventableStepTriggerComponent component, ExaminedEvent args)
{
args.PushMarkup(Loc.GetString("clothing-required-step-trigger-examine"));
}
diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml
index 49dabaddaa..56da0c3718 100644
--- a/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml
+++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/armor.yml
@@ -210,7 +210,7 @@
Radiation: 0
Caustic: 0.75
- type: GroupExamine
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
@@ -308,7 +308,7 @@
- type: ExplosionResistance
damageCoefficient: 0.5
- type: GroupExamine
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
@@ -336,7 +336,7 @@
- type: Construction
graph: BoneArmor
node: armor
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
@@ -357,6 +357,6 @@
Piercing: 0.6
Heat: 0.5
- type: GroupExamine
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml
index 66579f296b..1ee9b76588 100644
--- a/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml
+++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/base_clothingouter.yml
@@ -135,7 +135,7 @@
tags:
- Hardsuit
- WhitelistChameleon
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: DamageOnInteractProtection
damageProtection:
@@ -161,7 +161,7 @@
- type: HeldSpeedModifier
- type: Item
size: Huge
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: DamageOnInteractProtection
damageProtection:
diff --git a/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml b/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml
index 334e87ebf6..c90e0c98f5 100644
--- a/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml
+++ b/Resources/Prototypes/Entities/Clothing/OuterClothing/suits.yml
@@ -25,7 +25,7 @@
tags:
- Hardsuit
- WhitelistChameleon
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
@@ -68,7 +68,7 @@
sprintModifier: 0.7
- type: HeldSpeedModifier
- type: GroupExamine
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
@@ -100,7 +100,7 @@
sprintModifier: 0.8
- type: HeldSpeedModifier
- type: GroupExamine
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
@@ -125,7 +125,7 @@
- type: ContainerContainer
containers:
toggleable-clothing: !type:ContainerSlot {}
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
@@ -198,7 +198,7 @@
sprite: Clothing/OuterClothing/Suits/chicken.rsi
- type: Clothing
sprite: Clothing/OuterClothing/Suits/chicken.rsi
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
@@ -236,7 +236,7 @@
- type: ContainerContainer
containers:
toggleable-clothing: !type:ContainerSlot {}
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
@@ -259,7 +259,7 @@
- type: Construction
graph: ClothingOuterSuitIan
node: suit
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
slots: WITHOUT_POCKET
- type: entity
diff --git a/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml b/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml
index e9b8431707..e2733b2468 100644
--- a/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml
+++ b/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml
@@ -23,7 +23,7 @@
tags:
- ClothMade
- WhitelistChameleon
- - type: ClothingRequiredStepTriggerImmune
+ - type: ProtectedFromStepTriggers
- type: entity
abstract: true
diff --git a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml
index dcaa853c28..955ddfd2e3 100644
--- a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml
+++ b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml
@@ -233,7 +233,7 @@
guides:
- Cyborgs
- Robotics
- - type: StepTriggerImmune
+ - type: ProtectedFromStepTriggers
- type: DamageOnInteractProtection
damageProtection:
flatReductions:
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
index b11c1a50c6..629f868d7e 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/animals.yml
@@ -2927,7 +2927,7 @@
- DoorBumpOpener
- type: MovementAlwaysTouching
- type: PressureImmunity
- - type: StepTriggerImmune
+ - type: ProtectedFromStepTriggers
- type: Insulated
- type: InteractionPopup
successChance: 0.7
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/elemental.yml b/Resources/Prototypes/Entities/Mobs/NPCs/elemental.yml
index ad5d77f1c1..b67e3b520e 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/elemental.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/elemental.yml
@@ -72,8 +72,7 @@
- type: InputMover
- type: MobMover
- type: ZombieImmune
- - type: ClothingRequiredStepTriggerImmune
- slots: All
+ - type: ProtectedFromStepTriggers
- type: entity
abstract: true
diff --git a/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml b/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml
index 9aff9c59af..857115e10f 100644
--- a/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml
+++ b/Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml
@@ -108,7 +108,7 @@
- type: TypingIndicator
proto: robot
- type: ZombieImmune
- - type: StepTriggerImmune
+ - type: ProtectedFromStepTriggers
- type: NoSlip
- type: Insulated
diff --git a/Resources/Prototypes/Entities/Objects/Devices/mousetrap.yml b/Resources/Prototypes/Entities/Objects/Devices/mousetrap.yml
index 1de5037918..cde95fda6b 100644
--- a/Resources/Prototypes/Entities/Objects/Devices/mousetrap.yml
+++ b/Resources/Prototypes/Entities/Objects/Devices/mousetrap.yml
@@ -15,7 +15,7 @@
requiredTriggeredSpeed: 2
- type: Mousetrap
- type: TriggerOnStepTrigger
- - type: ClothingRequiredStepTrigger
+ - type: PreventableStepTrigger
- type: DamageUserOnTrigger
damage:
types:
diff --git a/Resources/Prototypes/Entities/Objects/Fun/dice.yml b/Resources/Prototypes/Entities/Objects/Fun/dice.yml
index 0b534f0879..433a4ebac3 100644
--- a/Resources/Prototypes/Entities/Objects/Fun/dice.yml
+++ b/Resources/Prototypes/Entities/Objects/Fun/dice.yml
@@ -121,7 +121,7 @@
- type: StepTrigger
intersectRatio: 0.2
- type: TriggerOnStepTrigger
- - type: ClothingRequiredStepTrigger
+ - type: PreventableStepTrigger
- type: Slippery
slipSound:
path: /Audio/Effects/glass_step.ogg
diff --git a/Resources/Prototypes/Entities/Objects/Materials/shards.yml b/Resources/Prototypes/Entities/Objects/Materials/shards.yml
index 5668661e08..718d1ad8e3 100644
--- a/Resources/Prototypes/Entities/Objects/Materials/shards.yml
+++ b/Resources/Prototypes/Entities/Objects/Materials/shards.yml
@@ -65,7 +65,7 @@
acts: [ "Destruction" ]
- type: StepTrigger
intersectRatio: 0.2
- - type: ClothingRequiredStepTrigger
+ - type: PreventableStepTrigger
- type: Slippery
slipSound:
path: /Audio/Effects/glass_step.ogg