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:
@@ -16,6 +16,8 @@ public sealed class MagicSystem : SharedMagicSystem
|
||||
[Dependency] private readonly TagSystem _tag = default!;
|
||||
[Dependency] private readonly SharedMindSystem _mind = default!;
|
||||
|
||||
private static readonly ProtoId<TagPrototype> InvalidForSurvivorAntagTag = "InvalidForSurvivorAntag";
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -48,8 +50,8 @@ public sealed class MagicSystem : SharedMagicSystem
|
||||
if (!ev.MakeSurvivorAntagonist)
|
||||
return;
|
||||
|
||||
if (_mind.TryGetMind(ev.Performer, out var mind, out _) && !_tag.HasTag(mind, "InvalidForSurvivorAntag"))
|
||||
_tag.AddTag(mind, "InvalidForSurvivorAntag");
|
||||
if (_mind.TryGetMind(ev.Performer, out var mind, out _) && !_tag.HasTag(mind, InvalidForSurvivorAntagTag))
|
||||
_tag.AddTag(mind, InvalidForSurvivorAntagTag);
|
||||
|
||||
EntProtoId survivorRule = "Survivor";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user