Mind ecs (#14412)
This commit is contained in:
@@ -8,6 +8,7 @@ using Content.Server.Configurable;
|
||||
using Content.Server.Disposal.Tube.Components;
|
||||
using Content.Server.EUI;
|
||||
using Content.Server.Ghost.Roles;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Mind.Commands;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Players;
|
||||
@@ -51,6 +52,7 @@ namespace Content.Server.Administration.Systems
|
||||
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
|
||||
[Dependency] private readonly PrayerSystem _prayerSystem = default!;
|
||||
[Dependency] private readonly EuiManager _eui = default!;
|
||||
[Dependency] private readonly MindSystem _mindSystem = default!;
|
||||
|
||||
private readonly Dictionary<IPlayerSession, EditSolutionsEui> _openSolutionUis = new();
|
||||
|
||||
@@ -229,7 +231,12 @@ namespace Content.Server.Administration.Systems
|
||||
Act = () =>
|
||||
{
|
||||
MakeSentientCommand.MakeSentient(args.Target, EntityManager);
|
||||
player.ContentData()?.Mind?.TransferTo(args.Target, ghostCheckOverride: true);
|
||||
|
||||
var mind = player.ContentData()?.Mind;
|
||||
if (mind == null)
|
||||
return;
|
||||
|
||||
_mindSystem.TransferTo(mind, args.Target, ghostCheckOverride: true);
|
||||
},
|
||||
Impact = LogImpact.High,
|
||||
ConfirmationPopup = true
|
||||
@@ -263,7 +270,7 @@ namespace Content.Server.Administration.Systems
|
||||
// Make Sentient verb
|
||||
if (_groupController.CanCommand(player, "makesentient") &&
|
||||
args.User != args.Target &&
|
||||
!EntityManager.HasComponent<MindComponent>(args.Target))
|
||||
!EntityManager.HasComponent<MindContainerComponent>(args.Target))
|
||||
{
|
||||
Verb verb = new()
|
||||
{
|
||||
@@ -326,7 +333,7 @@ namespace Content.Server.Administration.Systems
|
||||
|
||||
// Make ghost role verb
|
||||
if (_groupController.CanCommand(player, "makeghostrole") &&
|
||||
!(EntityManager.GetComponentOrNull<MindComponent>(args.Target)?.HasMind ?? false))
|
||||
!(EntityManager.GetComponentOrNull<MindContainerComponent>(args.Target)?.HasMind ?? false))
|
||||
{
|
||||
Verb verb = new();
|
||||
verb.Text = Loc.GetString("make-ghost-role-verb-get-data-text");
|
||||
|
||||
Reference in New Issue
Block a user