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:
@@ -36,6 +36,7 @@ using Content.Shared.Traits.Assorted;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Content.Shared.Ghost.Roles.Components;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.Zombies;
|
||||
|
||||
@@ -61,6 +62,8 @@ public sealed partial class ZombieSystem
|
||||
[Dependency] private readonly TagSystem _tag = default!;
|
||||
[Dependency] private readonly NameModifierSystem _nameMod = default!;
|
||||
|
||||
private static readonly ProtoId<TagPrototype> InvalidForGlobalSpawnSpellTag = "InvalidForGlobalSpawnSpell";
|
||||
|
||||
/// <summary>
|
||||
/// Handles an entity turning into a zombie when they die or go into crit
|
||||
/// </summary>
|
||||
@@ -290,6 +293,6 @@ public sealed partial class ZombieSystem
|
||||
|
||||
//Need to prevent them from getting an item, they have no hands.
|
||||
// Also prevents them from becoming a Survivor. They're undead.
|
||||
_tag.AddTag(target, "InvalidForGlobalSpawnSpell");
|
||||
_tag.AddTag(target, InvalidForGlobalSpawnSpellTag);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user