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:
@@ -8,6 +8,7 @@ using Content.Shared.Interaction.Components;
|
||||
using Content.Shared.Storage;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Network;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
|
||||
namespace Content.Server.Tools.Innate;
|
||||
@@ -22,6 +23,8 @@ public sealed class InnateToolSystem : EntitySystem
|
||||
[Dependency] private readonly SharedHandsSystem _sharedHandsSystem = default!;
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
|
||||
private static readonly ProtoId<TagPrototype> InnateDontDeleteTag = "InnateDontDelete";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -76,7 +79,7 @@ public sealed class InnateToolSystem : EntitySystem
|
||||
{
|
||||
foreach (var tool in component.ToolUids)
|
||||
{
|
||||
if (_tagSystem.HasTag(tool, "InnateDontDelete"))
|
||||
if (_tagSystem.HasTag(tool, InnateDontDeleteTag))
|
||||
{
|
||||
RemComp<UnremoveableComponent>(tool);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user