Adds a damage threshold property for DoAfters (#7712)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.DoAfter
|
||||
@@ -49,6 +50,11 @@ namespace Content.Server.DoAfter
|
||||
public float MovementThreshold { get; set; }
|
||||
|
||||
public bool BreakOnDamage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Threshold for user damage
|
||||
/// </summary>
|
||||
public FixedPoint2 DamageThreshold { get; set; }
|
||||
public bool BreakOnStun { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -105,6 +111,7 @@ namespace Content.Server.DoAfter
|
||||
CancelToken = cancelToken;
|
||||
Target = target;
|
||||
MovementThreshold = 0.1f;
|
||||
DamageThreshold = 0;
|
||||
|
||||
if (Target == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user