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

@@ -28,7 +28,7 @@ public sealed partial class AdminVerbSystem
if (!_adminManager.HasAdminFlag(player, AdminFlags.Fun))
return;
var targetHasMind = TryComp(args.Target, out MindContainerComponent? targetMindComp);
var targetHasMind = TryComp(args.Target, out MindComponent? targetMindComp);
if (!targetHasMind || targetMindComp == null)
return;
@@ -56,7 +56,7 @@ public sealed partial class AdminVerbSystem
Icon = new SpriteSpecifier.Rsi(new ResourcePath("/Textures/Structures/Wallmounts/signs.rsi"), "bio"),
Act = () =>
{
TryComp(args.Target, out MindContainerComponent? mindComp);
TryComp(args.Target, out MindComponent? mindComp);
if (mindComp == null || mindComp.Mind == null)
return;

View File

@@ -8,7 +8,6 @@ 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;
@@ -52,7 +51,6 @@ 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();
@@ -231,12 +229,7 @@ namespace Content.Server.Administration.Systems
Act = () =>
{
MakeSentientCommand.MakeSentient(args.Target, EntityManager);
var mind = player.ContentData()?.Mind;
if (mind == null)
return;
_mindSystem.TransferTo(mind, args.Target, ghostCheckOverride: true);
player.ContentData()?.Mind?.TransferTo(args.Target, ghostCheckOverride: true);
},
Impact = LogImpact.High,
ConfirmationPopup = true
@@ -270,7 +263,7 @@ namespace Content.Server.Administration.Systems
// Make Sentient verb
if (_groupController.CanCommand(player, "makesentient") &&
args.User != args.Target &&
!EntityManager.HasComponent<MindContainerComponent>(args.Target))
!EntityManager.HasComponent<MindComponent>(args.Target))
{
Verb verb = new()
{
@@ -333,7 +326,7 @@ namespace Content.Server.Administration.Systems
// Make ghost role verb
if (_groupController.CanCommand(player, "makeghostrole") &&
!(EntityManager.GetComponentOrNull<MindContainerComponent>(args.Target)?.HasMind ?? false))
!(EntityManager.GetComponentOrNull<MindComponent>(args.Target)?.HasMind ?? false))
{
Verb verb = new();
verb.Text = Loc.GetString("make-ghost-role-verb-get-data-text");