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

@@ -47,8 +47,8 @@ public abstract class SharedEnsnareableSystem : EntitySystem
private void OnEnsnare(EntityUid uid, EnsnareableComponent component, EnsnareEvent args)
{
component.WalkSpeed = args.WalkSpeed;
component.SprintSpeed = args.SprintSpeed;
component.WalkSpeed *= args.WalkSpeed;
component.SprintSpeed *= args.SprintSpeed;
_speedModifier.RefreshMovementSpeedModifiers(uid);
@@ -58,6 +58,9 @@ public abstract class SharedEnsnareableSystem : EntitySystem
private void OnEnsnareRemove(EntityUid uid, EnsnareableComponent component, EnsnareRemoveEvent args)
{
component.WalkSpeed /= args.WalkSpeed;
component.SprintSpeed /= args.SprintSpeed;
_speedModifier.RefreshMovementSpeedModifiers(uid);
var ev = new EnsnaredChangedEvent(component.IsEnsnared);