Move cuffs to users hand when removed (#8862)
* move cuffs to users hand when removed * review Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -245,9 +245,7 @@ namespace Content.Server.Cuffs.Components
|
|||||||
SoundSystem.Play(cuff.EndUncuffSound.GetSound(), Filter.Pvs(Owner), Owner);
|
SoundSystem.Play(cuff.EndUncuffSound.GetSound(), Filter.Pvs(Owner), Owner);
|
||||||
|
|
||||||
Container.ForceRemove(cuffsToRemove.Value);
|
Container.ForceRemove(cuffsToRemove.Value);
|
||||||
var transform = _entMan.GetComponent<TransformComponent>(cuffsToRemove.Value);
|
_entMan.EntitySysManager.GetEntitySystem<SharedHandsSystem>().PickupOrDrop(user, cuffsToRemove.Value);
|
||||||
transform.AttachToGridOrMap();
|
|
||||||
transform.WorldPosition = _entMan.GetComponent<TransformComponent>(Owner).WorldPosition;
|
|
||||||
|
|
||||||
if (cuff.BreakOnRemove)
|
if (cuff.BreakOnRemove)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Content.Shared.Popups;
|
|||||||
using Content.Shared.Verbs;
|
using Content.Shared.Verbs;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Robust.Shared.Player;
|
using Robust.Shared.Player;
|
||||||
|
using Content.Shared.Hands.EntitySystems;
|
||||||
|
|
||||||
namespace Content.Server.Cuffs
|
namespace Content.Server.Cuffs
|
||||||
{
|
{
|
||||||
@@ -23,7 +24,6 @@ namespace Content.Server.Cuffs
|
|||||||
|
|
||||||
SubscribeLocalEvent<HandCountChangedEvent>(OnHandCountChanged);
|
SubscribeLocalEvent<HandCountChangedEvent>(OnHandCountChanged);
|
||||||
SubscribeLocalEvent<UncuffAttemptEvent>(OnUncuffAttempt);
|
SubscribeLocalEvent<UncuffAttemptEvent>(OnUncuffAttempt);
|
||||||
|
|
||||||
SubscribeLocalEvent<CuffableComponent, GetVerbsEvent<Verb>>(AddUncuffVerb);
|
SubscribeLocalEvent<CuffableComponent, GetVerbsEvent<Verb>>(AddUncuffVerb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user