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:
J
2025-04-05 00:20:19 +00:00
committed by GitHub
parent e58ab56e42
commit af9526197a
36 changed files with 156 additions and 51 deletions

View File

@@ -20,6 +20,7 @@ using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Controllers;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Prototypes;
using Robust.Shared.Timing;
using Robust.Shared.Utility;
using PullableComponent = Content.Shared.Movement.Pulling.Components.PullableComponent;
@@ -59,6 +60,8 @@ public abstract partial class SharedMoverController : VirtualController
protected EntityQuery<FootstepModifierComponent> FootstepModifierQuery;
protected EntityQuery<MapGridComponent> MapGridQuery;
private static readonly ProtoId<TagPrototype> FootstepSoundTag = "FootstepSound";
/// <summary>
/// <see cref="CCVars.StopSpeed"/>
/// </summary>
@@ -431,7 +434,7 @@ public abstract partial class SharedMoverController : VirtualController
{
sound = null;
if (!CanSound() || !_tags.HasTag(uid, "FootstepSound"))
if (!CanSound() || !_tags.HasTag(uid, FootstepSoundTag))
return false;
var coordinates = xform.Coordinates;