This commit is contained in:
ShadowCommander
2023-06-18 11:33:19 -07:00
committed by GitHub
parent 8a943fb374
commit dd7032a860
85 changed files with 1432 additions and 711 deletions

View File

@@ -8,6 +8,7 @@ using Content.Server.Disposal.Tube;
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;
@@ -53,6 +54,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();
@@ -245,7 +247,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
@@ -279,7 +286,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()
{
@@ -342,7 +349,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");