Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 8 additions & 0 deletions Content.Shared/Cuffs/Components/HandcuffComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ public sealed partial class HandcuffComponent : Component
[DataField, AutoNetworkedField]
public string? BodyIconState = "body-overlay";

/// Den Edit
/// <summary>
/// Whenever or not the person cuffed can perform the uncuff do after while being Hard Grabbed.
/// By default, no.
/// </summary>
[DataField]
public bool UncuffDuringHardGrab = false;

/// <summary>
/// An opptional color specification for <see cref="BodyIconState"/>
/// </summary>
Expand Down
4 changes: 4 additions & 0 deletions Content.Shared/Cuffs/SharedCuffableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -640,6 +640,10 @@ public void TryUncuff(EntityUid target, EntityUid user, EntityUid? cuffsToRemove
if (!Resolve(cuffsToRemove.Value, ref cuff))
return;

// Den edit, checks if target is being hardgrabbed and if they the cuffs can be broken out of during a hard grab.
if (TryComp<PullableComponent>(target, out var pullable) && pullable.GrabStage == GrabStage.Hard && !cuff.UncuffDuringHardGrab)
return;

var attempt = new UncuffAttemptEvent(user, target);
RaiseLocalEvent(user, ref attempt, true);

Expand Down
2 changes: 2 additions & 0 deletions Resources/Prototypes/Entities/Objects/Misc/handcuffs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
startBreakoutSound:
path: /Audio/Items/Handcuffs/rope_takeoff.ogg
uncuffEasierWhenLarge: true
uncuffDuringHardGrab: true #Den Edit
- type: Construction
graph: makeshifthandcuffs
node: cuffscable
Expand Down Expand Up @@ -124,6 +125,7 @@
startBreakoutSound:
path: /Audio/Items/Handcuffs/rope_takeoff.ogg
uncuffEasierWhenLarge: true
uncuffDuringHardGrab: true #Den Edit
- type: Sprite
sprite: Objects/Misc/zipties.rsi
state: cuff
Expand Down
Loading