Forbid string literals for NpcFactionSystem methods (#38140)
* Add ForbidLiteral attribute to NpcFactionSystem methods * Cleanup resulting warnings
This commit is contained in:
@@ -38,6 +38,7 @@ using Content.Shared.Ghost.Roles.Components;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Content.Shared.NPC.Prototypes;
|
||||
|
||||
namespace Content.Server.Zombies;
|
||||
|
||||
@@ -66,6 +67,8 @@ public sealed partial class ZombieSystem
|
||||
|
||||
private static readonly ProtoId<TagPrototype> InvalidForGlobalSpawnSpellTag = "InvalidForGlobalSpawnSpell";
|
||||
private static readonly ProtoId<TagPrototype> CannotSuicideTag = "CannotSuicide";
|
||||
private static readonly ProtoId<NpcFactionPrototype> ZombieFaction = "Zombie";
|
||||
|
||||
/// <summary>
|
||||
/// Handles an entity turning into a zombie when they die or go into crit
|
||||
/// </summary>
|
||||
@@ -223,7 +226,7 @@ public sealed partial class ZombieSystem
|
||||
_mobState.ChangeMobState(target, MobState.Alive);
|
||||
|
||||
_faction.ClearFactions(target, dirty: false);
|
||||
_faction.AddFaction(target, "Zombie");
|
||||
_faction.AddFaction(target, ZombieFaction);
|
||||
|
||||
//gives it the funny "Zombie ___" name.
|
||||
_nameMod.RefreshNameModifiers(target);
|
||||
|
||||
Reference in New Issue
Block a user