Extracts magic strings from Tag calls (#36305)
* Extracts magic strings from Tag calls When #36281 gets merged, the `TagSystem` methods will all give warnings. Let's fix those warnings before they even happen! * Adds missing libraries * Remove not yet implemented TagSystem changes * Fix tag spelling error Genuinely surprised there was only 1! * Styling and proper type changes * Styling Co-authored-by: Tayrtahn <tayrtahn@gmail.com> --------- Co-authored-by: Tayrtahn <tayrtahn@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Shared.Damage;
|
||||
using Content.Shared.Hands.Components;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -23,6 +24,8 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
|
||||
/// </summary>
|
||||
private static readonly TimeSpan ExcessTime = TimeSpan.FromSeconds(0.5f);
|
||||
|
||||
private static readonly ProtoId<TagPrototype> InstantDoAftersTag = "InstantDoAfters";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -233,7 +236,7 @@ public abstract partial class SharedDoAfterSystem : EntitySystem
|
||||
|
||||
// TODO DO AFTER
|
||||
// Why does this tag exist? Just make this a bool on the component?
|
||||
if (args.Delay <= TimeSpan.Zero || _tag.HasTag(args.User, "InstantDoAfters"))
|
||||
if (args.Delay <= TimeSpan.Zero || _tag.HasTag(args.User, InstantDoAftersTag))
|
||||
{
|
||||
RaiseDoAfterEvents(doAfter, comp);
|
||||
// We don't store instant do-afters. This is just a lazy way of hiding them from client-side visuals.
|
||||
|
||||
Reference in New Issue
Block a user