fix stripping (#5983)
This commit is contained in:
@@ -63,12 +63,16 @@ namespace Content.Shared.Cuffs
|
||||
|
||||
private void OnEquipAttempt(EntityUid uid, SharedCuffableComponent component, IsEquippingAttemptEvent args)
|
||||
{
|
||||
CheckAct(uid, component, args);
|
||||
// is this a self-equip, or are they being stripped?
|
||||
if (args.Equipee == uid)
|
||||
CheckAct(uid, component, args);
|
||||
}
|
||||
|
||||
private void OnUnequipAttempt(EntityUid uid, SharedCuffableComponent component, IsUnequippingAttemptEvent args)
|
||||
{
|
||||
CheckAct(uid, component, args);
|
||||
// is this a self-equip, or are they being stripped?
|
||||
if (args.Unequipee == uid)
|
||||
CheckAct(uid, component, args);
|
||||
}
|
||||
|
||||
private void OnAttackAttempt(EntityUid uid, SharedCuffableComponent component, AttackAttemptEvent args)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Shared.Inventory.Events;
|
||||
|
||||
public abstract class EquipAttemptBase : CancellableEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity equipping.
|
||||
/// The entity performing the action. NOT necessarily the one actually "receiving" the equipment.
|
||||
/// </summary>
|
||||
public readonly EntityUid Equipee;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Shared.Inventory.Events;
|
||||
|
||||
public class UnequipAttemptEventBase : CancellableEntityEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// The entity unequipping.
|
||||
/// The entity performing the action. NOT necessarily the same as the entity whose equipment is being removed..
|
||||
/// </summary>
|
||||
public readonly EntityUid Unequipee;
|
||||
|
||||
|
||||
@@ -79,7 +79,9 @@ namespace Content.Shared.MobState.EntitySystems
|
||||
|
||||
private void OnEquipAttempt(EntityUid uid, MobStateComponent component, IsEquippingAttemptEvent args)
|
||||
{
|
||||
CheckAct(uid, component, args);
|
||||
// is this a self-equip, or are they being stripped?
|
||||
if (args.Equipee == uid)
|
||||
CheckAct(uid, component, args);
|
||||
}
|
||||
|
||||
private void OnEmoteAttempt(EntityUid uid, MobStateComponent component, EmoteAttemptEvent args)
|
||||
@@ -89,7 +91,9 @@ namespace Content.Shared.MobState.EntitySystems
|
||||
|
||||
private void OnUnequipAttempt(EntityUid uid, MobStateComponent component, IsUnequippingAttemptEvent args)
|
||||
{
|
||||
CheckAct(uid, component, args);
|
||||
// is this a self-equip, or are they being stripped?
|
||||
if (args.Unequipee == uid)
|
||||
CheckAct(uid, component, args);
|
||||
}
|
||||
|
||||
private void OnAttackAttempt(EntityUid uid, MobStateComponent component, AttackAttemptEvent args)
|
||||
|
||||
@@ -258,13 +258,15 @@ namespace Content.Shared.Stunnable
|
||||
|
||||
private void OnEquipAttempt(EntityUid uid, StunnedComponent stunned, IsEquippingAttemptEvent args)
|
||||
{
|
||||
if(args.Equipee == uid)
|
||||
// is this a self-equip, or are they being stripped?
|
||||
if (args.Equipee == uid)
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
private void OnUnequipAttempt(EntityUid uid, StunnedComponent stunned, IsUnequippingAttemptEvent args)
|
||||
{
|
||||
if(args.Unequipee == uid)
|
||||
// is this a self-equip, or are they being stripped?
|
||||
if (args.Unequipee == uid)
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user