diff --git a/Content.Server/GameObjects/EntitySystems/DoAfter/DoAfterEventArgs.cs b/Content.Server/GameObjects/EntitySystems/DoAfter/DoAfterEventArgs.cs
index dcada9d5cd..dd89f6920b 100644
--- a/Content.Server/GameObjects/EntitySystems/DoAfter/DoAfterEventArgs.cs
+++ b/Content.Server/GameObjects/EntitySystems/DoAfter/DoAfterEventArgs.cs
@@ -2,6 +2,7 @@
using System;
using System.Threading;
using Robust.Shared.Interfaces.GameObjects;
+// ReSharper disable UnassignedReadonlyField
namespace Content.Server.GameObjects.EntitySystems
{
@@ -11,7 +12,7 @@ namespace Content.Server.GameObjects.EntitySystems
/// The entity invoking do_after
///
public IEntity User { get; }
-
+
///
/// How long does the do_after require to complete
///
@@ -21,64 +22,52 @@ namespace Content.Server.GameObjects.EntitySystems
/// Applicable target (if relevant)
///
public IEntity? Target { get; }
-
+
///
/// Manually cancel the do_after so it no longer runs
///
public CancellationToken CancelToken { get; }
-
+
// Break the chains
///
/// Whether we need to keep our active hand as is (i.e. can't change hand or change item).
/// This also covers requiring the hand to be free (if applicable).
///
- public bool NeedHand { get; }
-
+ public readonly bool NeedHand;
+
///
/// If do_after stops when the user moves
///
- public bool BreakOnUserMove { get; }
-
+ public readonly bool BreakOnUserMove;
+
///
/// If do_after stops when the target moves (if there is a target)
///
- public bool BreakOnTargetMove { get; }
- public bool BreakOnDamage { get; }
- public bool BreakOnStun { get; }
-
+ public readonly bool BreakOnTargetMove;
+
+ public readonly bool BreakOnDamage;
+ public readonly bool BreakOnStun;
+
///
/// Additional conditions that need to be met. Return false to cancel.
///
- public Func? ExtraCheck { get; }
-
+ public readonly Func? ExtraCheck;
+
public DoAfterEventArgs(
- IEntity user,
+ IEntity user,
float delay,
- CancellationToken cancelToken,
- IEntity? target = null,
- bool needHand = true,
- bool breakOnUserMove = true,
- bool breakOnTargetMove = true,
- bool breakOnDamage = true,
- bool breakOnStun = true,
- Func? extraCheck = null
- )
+ CancellationToken cancelToken = default,
+ IEntity? target = null)
{
User = user;
Delay = delay;
CancelToken = cancelToken;
Target = target;
- NeedHand = needHand;
- BreakOnUserMove = breakOnUserMove;
- BreakOnTargetMove = breakOnTargetMove;
- BreakOnDamage = breakOnDamage;
- BreakOnStun = breakOnStun;
- ExtraCheck = extraCheck;
-
+
if (Target == null)
{
BreakOnTargetMove = false;
}
}
}
-}
\ No newline at end of file
+}