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

@@ -2,7 +2,6 @@ using Content.Server.Actions;
using Content.Server.Buckle.Systems;
using Content.Server.Humanoid;
using Content.Server.Inventory;
using Content.Server.Mind;
using Content.Server.Mind.Commands;
using Content.Server.Mind.Components;
using Content.Server.Polymorph.Components;
@@ -41,7 +40,6 @@ namespace Content.Server.Polymorph.Systems
[Dependency] private readonly SharedHandsSystem _hands = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
private readonly ISawmill _saw = default!;
@@ -197,8 +195,8 @@ namespace Content.Server.Polymorph.Systems
_humanoid.CloneAppearance(uid, child);
}
if (_mindSystem.TryGetMind(uid, out var mind))
_mindSystem.TransferTo(mind, child);
if (TryComp<MindComponent>(uid, out var mind) && mind.Mind != null)
mind.Mind.TransferTo(child);
//Ensures a map to banish the entity to
EnsurePausesdMap();
@@ -274,8 +272,10 @@ namespace Content.Server.Polymorph.Systems
}
}
if (_mindSystem.TryGetMind(uid, out var mind))
_mindSystem.TransferTo(mind, parent);
if (TryComp<MindComponent>(uid, out var mind) && mind.Mind != null)
{
mind.Mind.TransferTo(parent);
}
_popup.PopupEntity(Loc.GetString("polymorph-revert-popup-generic",
("parent", Identity.Entity(uid, EntityManager)),