Mind ecs (#14412)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user