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

@@ -3,7 +3,6 @@ using Content.Server.EUI;
using Content.Server.Ghost.Components;
using Content.Server.Ghost.Roles.Components;
using Content.Server.Ghost.Roles.UI;
using Content.Server.Mind;
using Content.Server.Mind.Components;
using Content.Server.Players;
using Content.Shared.Administration;
@@ -31,7 +30,6 @@ namespace Content.Server.Ghost.Roles
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly FollowerSystem _followerSystem = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
private uint _nextRoleIdentifier;
private bool _needsUpdateGhostRoleCount = true;
@@ -206,12 +204,14 @@ namespace Content.Server.Ghost.Roles
DebugTools.AssertNotNull(contentData);
var newMind = _mindSystem.CreateMind(player.UserId,
EntityManager.GetComponent<MetaDataComponent>(mob).EntityName);
_mindSystem.AddRole(newMind, new GhostRoleMarkerRole(newMind, role.RoleName));
var newMind = new Mind.Mind(player.UserId)
{
CharacterName = EntityManager.GetComponent<MetaDataComponent>(mob).EntityName
};
newMind.AddRole(new GhostRoleMarkerRole(newMind, role.RoleName));
_mindSystem.ChangeOwningPlayer(newMind, player.UserId);
_mindSystem.TransferTo(newMind, mob);
newMind.ChangeOwningPlayer(player.UserId);
newMind.TransferTo(mob);
}
public GhostRoleInfo[] GetGhostRolesInfo()