Add a tag for immunity from shoe-required step triggers (#10660)
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
using Content.Shared.Examine;
|
||||
using Content.Shared.Inventory;
|
||||
using Content.Shared.StepTrigger.Components;
|
||||
using Content.Shared.Tag;
|
||||
|
||||
namespace Content.Shared.StepTrigger.Systems;
|
||||
|
||||
public sealed class ShoesRequiredStepTriggerSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly InventorySystem _inventory = default!;
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
@@ -17,6 +19,12 @@ public sealed class ShoesRequiredStepTriggerSystem : EntitySystem
|
||||
|
||||
private void OnStepTriggerAttempt(EntityUid uid, ShoesRequiredStepTriggerComponent component, ref StepTriggerAttemptEvent args)
|
||||
{
|
||||
if (_tagSystem.HasTag(args.Tripper, "ShoesRequiredStepTriggerImmune"))
|
||||
{
|
||||
args.Cancelled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TryComp<InventoryComponent>(args.Tripper, out var inventory))
|
||||
return;
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
- type: Tag
|
||||
tags:
|
||||
- DoorBumpOpener
|
||||
- ShoesRequiredStepTriggerImmune
|
||||
- type: MobState
|
||||
thresholds:
|
||||
0: Alive
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
safe: false
|
||||
- type: StandingState
|
||||
- type: Alerts
|
||||
- type: Tag
|
||||
tags:
|
||||
- ShoesRequiredStepTriggerImmune
|
||||
|
||||
- type: entity
|
||||
name: drone
|
||||
@@ -162,6 +165,7 @@
|
||||
autoRot: true
|
||||
- type: Tag
|
||||
tags:
|
||||
- ShoesRequiredStepTriggerImmune
|
||||
- CannotSuicide
|
||||
|
||||
- type: entity
|
||||
|
||||
@@ -408,6 +408,9 @@
|
||||
- type: Tag
|
||||
id: SecwayKeys
|
||||
|
||||
- type: Tag
|
||||
id: ShoesRequiredStepTriggerImmune
|
||||
|
||||
- type: Tag
|
||||
id: Sheet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user