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:
@@ -50,6 +50,9 @@ public sealed class PlantHolderSystem : EntitySystem
|
||||
public const float HydroponicsSpeedMultiplier = 1f;
|
||||
public const float HydroponicsConsumptionMultiplier = 2f;
|
||||
|
||||
private static readonly ProtoId<TagPrototype> HoeTag = "Hoe";
|
||||
private static readonly ProtoId<TagPrototype> PlantSampleTakerTag = "PlantSampleTaker";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -203,7 +206,7 @@ public sealed class PlantHolderSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (_tagSystem.HasTag(args.Used, "Hoe"))
|
||||
if (_tagSystem.HasTag(args.Used, HoeTag))
|
||||
{
|
||||
args.Handled = true;
|
||||
if (component.WeedLevel > 0)
|
||||
@@ -243,7 +246,7 @@ public sealed class PlantHolderSystem : EntitySystem
|
||||
return;
|
||||
}
|
||||
|
||||
if (_tagSystem.HasTag(args.Used, "PlantSampleTaker"))
|
||||
if (_tagSystem.HasTag(args.Used, PlantSampleTakerTag))
|
||||
{
|
||||
args.Handled = true;
|
||||
if (component.Seed == null)
|
||||
|
||||
Reference in New Issue
Block a user