Minor cleanup of cuffablesystem (#26434)

* Fix cuffs breaking after they stop being pulled

* Do proper interaction check for UncuffAttempt

* Minor cleanup

Take as much out as possible from _net.IsServer() if blocks.
Misc cleanup
This commit is contained in:
nikthechampiongr
2024-03-26 21:15:08 +02:00
committed by GitHub
parent bf7fb53ae5
commit 4630e94c66
2 changed files with 61 additions and 54 deletions

View File

@@ -52,6 +52,14 @@ public sealed partial class HandcuffComponent : Component
[DataField]
public bool Removing;
/// <summary>
/// Whether the cuffs are currently being used to cuff someone.
/// We need the extra information for when the virtual item is deleted because that can happen when you simply stop
/// pulling them on the ground.
/// </summary>
[DataField]
public bool Used;
/// <summary>
/// The path of the RSI file used for the player cuffed overlay.
/// </summary>
@@ -87,7 +95,7 @@ public sealed partial class HandcuffComponent : Component
}
/// <summary>
/// Event fired on the User when the User attempts to cuff the Target.
/// Event fired on the User when the User attempts to uncuff the Target.
/// Should generate popups on the User.
/// </summary>
[ByRefEvent]