Added threshold to DoAfter's user and target movement checks (#2585)

* Added threshold to DoAfter user and target movement checks

* Fixed spacing

* Update Content.Server/GameObjects/EntitySystems/DoAfter/DoAfterEventArgs.cs

Co-authored-by: Manel Navola <ManelNavola@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
Manel Navola
2020-11-22 03:58:31 +01:00
committed by GitHub
parent 86c2e989e6
commit 8c81e7c767
5 changed files with 21 additions and 9 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
@@ -59,7 +59,9 @@ namespace Content.Shared.GameObjects.Components
public bool BreakOnTargetMove { get; }
public ClientDoAfter(byte id, EntityCoordinates userGrid, EntityCoordinates targetGrid, TimeSpan startTime, float delay, bool breakOnUserMove, bool breakOnTargetMove, EntityUid targetUid = default)
public float MovementThreshold { get; }
public ClientDoAfter(byte id, EntityCoordinates userGrid, EntityCoordinates targetGrid, TimeSpan startTime, float delay, bool breakOnUserMove, bool breakOnTargetMove, float movementThreshold, EntityUid targetUid = default)
{
ID = id;
UserGrid = userGrid;
@@ -68,6 +70,7 @@ namespace Content.Shared.GameObjects.Components
Delay = delay;
BreakOnUserMove = breakOnUserMove;
BreakOnTargetMove = breakOnTargetMove;
MovementThreshold = movementThreshold;
TargetUid = targetUid;
}
}