make pulled uncuffing slower & reduce uncuff spam cooldown (#29008)
* prevent people being pulled from uncuffing themselves * block -> modify duration
This commit is contained in:
@@ -105,3 +105,9 @@ public record struct UncuffAttemptEvent(EntityUid User, EntityUid Target)
|
||||
public readonly EntityUid Target = Target;
|
||||
public bool Cancelled = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Event raised on an entity being uncuffed to determine any modifiers to the amount of time it takes to uncuff them.
|
||||
/// </summary>
|
||||
[ByRefEvent]
|
||||
public record struct ModifyUncuffDurationEvent(EntityUid User, EntityUid Target, float Duration);
|
||||
|
||||
@@ -561,7 +561,10 @@ namespace Content.Shared.Cuffs
|
||||
return;
|
||||
}
|
||||
|
||||
var uncuffTime = isOwner ? cuff.BreakoutTime : cuff.UncuffTime;
|
||||
|
||||
var ev = new ModifyUncuffDurationEvent(user, target, isOwner ? cuff.BreakoutTime : cuff.UncuffTime);
|
||||
RaiseLocalEvent(user, ref ev);
|
||||
var uncuffTime = ev.Duration;
|
||||
|
||||
if (isOwner)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user