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,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)
{