Fix melee cuffs (#11602)
This commit is contained in:
@@ -21,12 +21,13 @@ namespace Content.Shared.Cuffs
|
|||||||
base.Initialize();
|
base.Initialize();
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, StopPullingEvent>(HandleStopPull);
|
SubscribeLocalEvent<SharedCuffableComponent, StopPullingEvent>(HandleStopPull);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, UpdateCanMoveEvent>(HandleMoveAttempt);
|
SubscribeLocalEvent<SharedCuffableComponent, UpdateCanMoveEvent>(HandleMoveAttempt);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, UseAttemptEvent>(OnUseAttempt);
|
SubscribeLocalEvent<SharedCuffableComponent, AttackAttemptEvent>(CheckAct);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, InteractionAttemptEvent>(OnInteractAttempt);
|
SubscribeLocalEvent<SharedCuffableComponent, UseAttemptEvent>(CheckAct);
|
||||||
|
SubscribeLocalEvent<SharedCuffableComponent, InteractionAttemptEvent>(CheckAct);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, IsEquippingAttemptEvent>(OnEquipAttempt);
|
SubscribeLocalEvent<SharedCuffableComponent, IsEquippingAttemptEvent>(OnEquipAttempt);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, IsUnequippingAttemptEvent>(OnUnequipAttempt);
|
SubscribeLocalEvent<SharedCuffableComponent, IsUnequippingAttemptEvent>(OnUnequipAttempt);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, DropAttemptEvent>(OnDropAttempt);
|
SubscribeLocalEvent<SharedCuffableComponent, DropAttemptEvent>(CheckAct);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, PickupAttemptEvent>(OnPickupAttempt);
|
SubscribeLocalEvent<SharedCuffableComponent, PickupAttemptEvent>(CheckAct);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, BeingPulledAttemptEvent>(OnBeingPulledAttempt);
|
SubscribeLocalEvent<SharedCuffableComponent, BeingPulledAttemptEvent>(OnBeingPulledAttempt);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, PullStartedMessage>(OnPull);
|
SubscribeLocalEvent<SharedCuffableComponent, PullStartedMessage>(OnPull);
|
||||||
SubscribeLocalEvent<SharedCuffableComponent, PullStoppedMessage>(OnPull);
|
SubscribeLocalEvent<SharedCuffableComponent, PullStoppedMessage>(OnPull);
|
||||||
@@ -73,16 +74,6 @@ namespace Content.Shared.Cuffs
|
|||||||
args.Cancel();
|
args.Cancel();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnUseAttempt(EntityUid uid, SharedCuffableComponent component, UseAttemptEvent args)
|
|
||||||
{
|
|
||||||
CheckAct(uid, component, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnInteractAttempt(EntityUid uid, SharedCuffableComponent component, InteractionAttemptEvent args)
|
|
||||||
{
|
|
||||||
CheckAct(uid, component, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnEquipAttempt(EntityUid uid, SharedCuffableComponent component, IsEquippingAttemptEvent args)
|
private void OnEquipAttempt(EntityUid uid, SharedCuffableComponent component, IsEquippingAttemptEvent args)
|
||||||
{
|
{
|
||||||
// is this a self-equip, or are they being stripped?
|
// is this a self-equip, or are they being stripped?
|
||||||
@@ -97,16 +88,6 @@ namespace Content.Shared.Cuffs
|
|||||||
CheckAct(uid, component, args);
|
CheckAct(uid, component, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDropAttempt(EntityUid uid, SharedCuffableComponent component, DropAttemptEvent args)
|
|
||||||
{
|
|
||||||
CheckAct(uid, component, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnPickupAttempt(EntityUid uid, SharedCuffableComponent component, PickupAttemptEvent args)
|
|
||||||
{
|
|
||||||
CheckAct(uid, component, args);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
id: CombatModeToggle
|
id: CombatModeToggle
|
||||||
name: action-name-combat
|
name: action-name-combat
|
||||||
description: action-description-combat
|
description: action-description-combat
|
||||||
|
checkCanInteract: false
|
||||||
icon: Interface/Actions/harmOff.png
|
icon: Interface/Actions/harmOff.png
|
||||||
iconOn: Interface/Actions/harm.png
|
iconOn: Interface/Actions/harm.png
|
||||||
userPopup: action-popup-combat
|
userPopup: action-popup-combat
|
||||||
|
|||||||
Reference in New Issue
Block a user