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:
@@ -37,6 +37,7 @@ using Robust.Shared.Physics;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
@@ -87,6 +88,8 @@ namespace Content.Shared.Interaction
|
||||
public const float MaxRaycastRange = 100f;
|
||||
public const string RateLimitKey = "Interaction";
|
||||
|
||||
private static readonly ProtoId<TagPrototype> BypassInteractionRangeChecksTag = "BypassInteractionRangeChecks";
|
||||
|
||||
public delegate bool Ignored(EntityUid entity);
|
||||
|
||||
public override void Initialize()
|
||||
@@ -318,7 +321,7 @@ namespace Content.Shared.Interaction
|
||||
{
|
||||
// This is for Admin/mapping convenience. If ever there are other ghosts that can still interact, this check
|
||||
// might need to be more selective.
|
||||
return !_tagSystem.HasTag(user, "BypassInteractionRangeChecks");
|
||||
return !_tagSystem.HasTag(user, BypassInteractionRangeChecksTag);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user