Mind ECS (#16826)
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Linq;
|
||||
using Content.Server.Actions;
|
||||
using Content.Server.Chat.Managers;
|
||||
using Content.Server.GameTicking.Rules.Components;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Players;
|
||||
using Content.Server.Popups;
|
||||
@@ -41,6 +42,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
|
||||
[Dependency] private readonly ActionsSystem _action = default!;
|
||||
[Dependency] private readonly MobStateSystem _mobState = default!;
|
||||
[Dependency] private readonly ZombifyOnDeathSystem _zombify = default!;
|
||||
[Dependency] private readonly MindSystem _mindSystem = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -92,7 +94,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
|
||||
{
|
||||
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;
|
||||
|
||||
@@ -286,8 +288,7 @@ public sealed class ZombieRuleSystem : GameRuleSystem<ZombieRuleComponent>
|
||||
}
|
||||
|
||||
DebugTools.AssertNotNull(mind.OwnedEntity);
|
||||
|
||||
mind.AddRole(new ZombieRole(mind, _prototypeManager.Index<AntagPrototype>(component.PatientZeroPrototypeID)));
|
||||
_mindSystem.AddRole(mind, new ZombieRole(mind, _prototypeManager.Index<AntagPrototype>(component.PatientZeroPrototypeID)));
|
||||
|
||||
var inCharacterName = string.Empty;
|
||||
// Create some variation between the times of each zombie, relative to the time of the group as a whole.
|
||||
|
||||
Reference in New Issue
Block a user