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:
@@ -10,6 +10,7 @@ using Content.Shared.Verbs;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Utility;
|
||||
|
||||
namespace Content.Server.Light.EntitySystems
|
||||
@@ -24,6 +25,8 @@ namespace Content.Server.Light.EntitySystems
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly MetaDataSystem _metaData = default!;
|
||||
|
||||
private static readonly ProtoId<TagPrototype> TrashTag = "Trash";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -69,7 +72,7 @@ namespace Content.Server.Light.EntitySystems
|
||||
_metaData.SetEntityName(ent, Loc.GetString(component.SpentName), meta);
|
||||
_metaData.SetEntityDescription(ent, Loc.GetString(component.SpentDesc), meta);
|
||||
|
||||
_tagSystem.AddTag(ent, "Trash");
|
||||
_tagSystem.AddTag(ent, TrashTag);
|
||||
|
||||
UpdateSounds(ent);
|
||||
UpdateVisualizer(ent);
|
||||
|
||||
Reference in New Issue
Block a user