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:
@@ -21,6 +21,7 @@ using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Utility;
|
||||
using Content.Shared.UserInterface;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Shuttles.Systems;
|
||||
|
||||
@@ -43,6 +44,8 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
|
||||
|
||||
private readonly HashSet<Entity<ShuttleConsoleComponent>> _consoles = new();
|
||||
|
||||
private static readonly ProtoId<TagPrototype> CanPilotTag = "CanPilot";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -168,7 +171,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
|
||||
|
||||
private bool TryPilot(EntityUid user, EntityUid uid)
|
||||
{
|
||||
if (!_tags.HasTag(user, "CanPilot") ||
|
||||
if (!_tags.HasTag(user, CanPilotTag) ||
|
||||
!TryComp<ShuttleConsoleComponent>(uid, out var component) ||
|
||||
!this.IsPowered(uid, EntityManager) ||
|
||||
!Transform(uid).Anchored ||
|
||||
|
||||
Reference in New Issue
Block a user