This commit is contained in:
ShadowCommander
2023-03-26 11:31:13 -07:00
committed by GitHub
parent 0e5dc41fe8
commit bfc4da9377
85 changed files with 1150 additions and 684 deletions

View File

@@ -5,6 +5,7 @@ using Content.Server.Chat.Managers;
using Content.Server.Disease;
using Content.Server.Disease.Components;
using Content.Server.Humanoid;
using Content.Server.Mind;
using Content.Server.Mind.Components;
using Content.Server.Players;
using Content.Server.Popups;
@@ -43,6 +44,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem
[Dependency] private readonly ActionsSystem _action = default!;
[Dependency] private readonly MobStateSystem _mobState = default!;
[Dependency] private readonly ZombifyOnDeathSystem _zombify = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
private Dictionary<string, string> _initialInfectedNames = new();
@@ -102,7 +104,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem
{
var meta = MetaData(survivor);
var username = string.Empty;
if (TryComp<MindComponent>(survivor, out var mindcomp))
if (TryComp<MindContainerComponent>(survivor, out var mindcomp))
if (mindcomp.Mind != null && mindcomp.Mind.Session != null)
username = mindcomp.Mind.Session.Name;
@@ -284,7 +286,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem
DebugTools.AssertNotNull(mind.OwnedEntity);
mind.AddRole(new TraitorRole(mind, _prototypeManager.Index<AntagPrototype>(PatientZeroPrototypeID)));
_mindSystem.AddRole(mind, new TraitorRole(mind, _prototypeManager.Index<AntagPrototype>(PatientZeroPrototypeID)));
var inCharacterName = string.Empty;
if (mind.OwnedEntity != null)