Mind ECS (#16826)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Content.Server.Actions;
|
||||
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.Nutrition;
|
||||
@@ -41,6 +42,7 @@ 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 ISawmill _sawmill = default!;
|
||||
|
||||
@@ -230,8 +232,8 @@ namespace Content.Server.Polymorph.Systems
|
||||
_humanoid.CloneAppearance(uid, child);
|
||||
}
|
||||
|
||||
if (TryComp<MindComponent>(uid, out var mind) && mind.Mind != null)
|
||||
mind.Mind.TransferTo(child);
|
||||
if (_mindSystem.TryGetMind(uid, out var mind))
|
||||
_mindSystem.TransferTo(mind, child);
|
||||
|
||||
//Ensures a map to banish the entity to
|
||||
EnsurePausesdMap();
|
||||
@@ -304,10 +306,8 @@ namespace Content.Server.Polymorph.Systems
|
||||
}
|
||||
}
|
||||
|
||||
if (TryComp<MindComponent>(uid, out var mind) && mind.Mind != null)
|
||||
{
|
||||
mind.Mind.TransferTo(parent);
|
||||
}
|
||||
if (_mindSystem.TryGetMind(uid, out var mind))
|
||||
_mindSystem.TransferTo(mind, parent);
|
||||
|
||||
// if an item polymorph was picked up, put it back down after reverting
|
||||
Transform(parent).AttachToGridOrMap();
|
||||
|
||||
Reference in New Issue
Block a user