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:
@@ -73,6 +73,9 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
[ValidatePrototypeId<EntityPrototype>]
|
||||
private const string MalfunctionSpark = "Spark";
|
||||
|
||||
private static readonly ProtoId<TagPrototype> MetalTag = "Metal";
|
||||
private static readonly ProtoId<TagPrototype> PlasticTag = "Plastic";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -550,12 +553,12 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
return;
|
||||
}
|
||||
|
||||
if (_tag.HasTag(item, "Metal"))
|
||||
if (_tag.HasTag(item, MetalTag))
|
||||
{
|
||||
malfunctioning = true;
|
||||
}
|
||||
|
||||
if (_tag.HasTag(item, "Plastic"))
|
||||
if (_tag.HasTag(item, PlasticTag))
|
||||
{
|
||||
var junk = Spawn(component.BadRecipeEntityId, Transform(uid).Coordinates);
|
||||
_container.Insert(junk, component.Storage);
|
||||
|
||||
Reference in New Issue
Block a user