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:
@@ -18,6 +18,7 @@ using Robust.Shared.Network;
|
||||
using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Shared.Follower;
|
||||
@@ -32,6 +33,8 @@ public sealed class FollowerSystem : EntitySystem
|
||||
[Dependency] private readonly INetManager _netMan = default!;
|
||||
[Dependency] private readonly ISharedAdminManager _adminManager = default!;
|
||||
|
||||
private static readonly ProtoId<TagPrototype> ForceableFollowTag = "ForceableFollow";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -106,7 +109,7 @@ public sealed class FollowerSystem : EntitySystem
|
||||
ev.Verbs.Add(verb);
|
||||
}
|
||||
|
||||
if (_tagSystem.HasTag(ev.Target, "ForceableFollow"))
|
||||
if (_tagSystem.HasTag(ev.Target, ForceableFollowTag))
|
||||
{
|
||||
if (!ev.CanAccess || !ev.CanInteract)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user