Revert "Mind ecs" (#14881)

This commit is contained in:
Leon Friedrich
2023-03-27 10:24:00 +13:00
committed by GitHub
parent c6c8fa2075
commit 4d71b1b81e
85 changed files with 684 additions and 1150 deletions

View File

@@ -1,6 +1,5 @@
using System.Linq;
using Content.Server.Chat.Managers;
using Content.Server.Mind;
using Content.Server.Objectives.Interfaces;
using Content.Server.Players;
using Content.Server.Roles;
@@ -37,7 +36,6 @@ public sealed class TraitorRuleSystem : GameRuleSystem
[Dependency] private readonly MobStateSystem _mobStateSystem = default!;
[Dependency] private readonly UplinkSystem _uplink = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
private ISawmill _sawmill = default!;
@@ -256,7 +254,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem
var antagPrototype = _prototypeManager.Index<AntagPrototype>(TraitorPrototypeID);
var traitorRole = new TraitorRole(mind, antagPrototype);
_mindSystem.AddRole(mind, traitorRole);
mind.AddRole(traitorRole);
Traitors.Add(traitorRole);
traitorRole.GreetTraitor(Codewords);
@@ -272,7 +270,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem
{
var objective = _objectivesManager.GetRandomObjective(traitorRole.Mind, "TraitorObjectiveGroups");
if (objective == null) continue;
if (_mindSystem.TryAddObjective(traitorRole.Mind, objective))
if (traitorRole.Mind.TryAddObjective(objective))
difficulty += objective.Difficulty;
}
@@ -344,7 +342,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem
foreach (var traitor in Traitors)
{
var name = traitor.Mind.CharacterName;
_mindSystem.TryGetSession(traitor.Mind, out var session);
traitor.Mind.TryGetSession(out var session);
var username = session?.Name;
var objectives = traitor.Mind.AllObjectives.ToArray();