Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Content.Shared/Stunnable/SharedStunSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@
using Content.Shared.StatusEffect;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Content.Shared.Movement.Pulling.Systems;
using Content.Shared.Pulling.Events;
using Content.Shared.Movement.Pulling.Components;
using Content.Shared.Movement.Pulling.Events;

namespace Content.Shared.Stunnable;

Expand Down Expand Up @@ -134,6 +138,7 @@ public override void Initialize()
SubscribeLocalEvent<StunnedComponent, PickupAttemptEvent>(OnAttempt);
SubscribeLocalEvent<StunnedComponent, IsEquippingAttemptEvent>(OnEquipAttempt);
SubscribeLocalEvent<StunnedComponent, IsUnequippingAttemptEvent>(OnUnequipAttempt);
SubscribeLocalEvent<StunnedComponent, AttemptStopPullingEvent>(HandleStopPull);
SubscribeLocalEvent<MobStateComponent, MobStateChangedEvent>(OnMobStateChanged);

// New Status Effect subscriptions
Expand Down Expand Up @@ -520,5 +525,20 @@ private void OnUnequipAttempt(EntityUid uid, StunnedComponent stunned, IsUnequip
args.Cancel();
}


private void HandleStopPull(EntityUid uid, StunnedComponent stunned, ref AttemptStopPullingEvent args)
{
if (args.User == null || !Exists(args.User.Value))
return;

if (args.User.Value == uid)
{
//TODO: UX feedback. Simply blocking the normal interaction feels like an interface bug

args.Cancelled = true;
}

}

#endregion
}
Loading