Adds a damage threshold property for DoAfters (#7712)

This commit is contained in:
keronshb
2022-04-23 20:41:48 -04:00
committed by GitHub
parent 64a9919c5d
commit 7896620224
3 changed files with 23 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Map;
using Robust.Shared.Serialization;
@@ -59,8 +60,10 @@ namespace Content.Shared.DoAfter
public float MovementThreshold { get; }
public FixedPoint2 DamageThreshold { get; }
public ClientDoAfter(byte id, EntityCoordinates userGrid, EntityCoordinates targetGrid, TimeSpan startTime,
float delay, bool breakOnUserMove, bool breakOnTargetMove, float movementThreshold, EntityUid? target = null)
float delay, bool breakOnUserMove, bool breakOnTargetMove, float movementThreshold, FixedPoint2 damageThreshold, EntityUid? target = null)
{
ID = id;
UserGrid = userGrid;
@@ -70,6 +73,7 @@ namespace Content.Shared.DoAfter
BreakOnUserMove = breakOnUserMove;
BreakOnTargetMove = breakOnTargetMove;
MovementThreshold = movementThreshold;
DamageThreshold = damageThreshold;
Target = target;
}
}