Mind ecs (#14412)
This commit is contained in:
@@ -3,6 +3,7 @@ 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;
|
||||
@@ -30,6 +31,7 @@ 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;
|
||||
@@ -204,14 +206,12 @@ namespace Content.Server.Ghost.Roles
|
||||
|
||||
DebugTools.AssertNotNull(contentData);
|
||||
|
||||
var newMind = new Mind.Mind(player.UserId)
|
||||
{
|
||||
CharacterName = EntityManager.GetComponent<MetaDataComponent>(mob).EntityName
|
||||
};
|
||||
newMind.AddRole(new GhostRoleMarkerRole(newMind, role.RoleName));
|
||||
var newMind = _mindSystem.CreateMind(player.UserId,
|
||||
EntityManager.GetComponent<MetaDataComponent>(mob).EntityName);
|
||||
_mindSystem.AddRole(newMind, new GhostRoleMarkerRole(newMind, role.RoleName));
|
||||
|
||||
newMind.ChangeOwningPlayer(player.UserId);
|
||||
newMind.TransferTo(mob);
|
||||
_mindSystem.ChangeOwningPlayer(newMind, player.UserId);
|
||||
_mindSystem.TransferTo(newMind, mob);
|
||||
}
|
||||
|
||||
public GhostRoleInfo[] GetGhostRolesInfo()
|
||||
|
||||
Reference in New Issue
Block a user