Fix snares (#16699)

The alert for snares will appear again. Previously it was being updated
on the snare itself and not the player.

It is no longer possible to infinitely ensnare someone; the maximum
number is dependent on the target's legs.

Only one snare at a time will be removed now.

Clarified the wording and logic around CanMoveBreakout. It was
inconsistent.

Made multiple snares impose cumulative speed penalties.

It is no longer possible to remove bolas while moving.
This commit is contained in:
Vordenburg
2023-05-22 17:49:37 -04:00
committed by GitHub
parent cb93572c72
commit 7ebe16dd3d
6 changed files with 59 additions and 20 deletions

View File

@@ -51,7 +51,7 @@ public sealed class EnsnaringComponent : Component
public EntityUid? Ensnared;
/// <summary>
/// Should movement cancel breaking out?
/// Should breaking out be possible when moving?
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField("canMoveBreakout")]
@@ -79,7 +79,14 @@ public sealed class EnsnareEvent : EntityEventArgs
/// </summary>
public sealed class EnsnareRemoveEvent : CancellableEntityEventArgs
{
public readonly float WalkSpeed;
public readonly float SprintSpeed;
public EnsnareRemoveEvent(float walkSpeed, float sprintSpeed)
{
WalkSpeed = walkSpeed;
SprintSpeed = sprintSpeed;
}
}
/// <summary>