Mind ECS (#16826)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Content.Server.EUI;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Players;
|
||||
using Content.Shared.Eui;
|
||||
using Content.Shared.Ghost;
|
||||
@@ -7,6 +8,8 @@ namespace Content.Server.Ghost;
|
||||
|
||||
public sealed class ReturnToBodyEui : BaseEui
|
||||
{
|
||||
[Dependency] private readonly MindSystem _mindSystem = default!;
|
||||
|
||||
private readonly Mind.Mind _mind;
|
||||
|
||||
public ReturnToBodyEui(Mind.Mind mind)
|
||||
@@ -25,8 +28,8 @@ public sealed class ReturnToBodyEui : BaseEui
|
||||
return;
|
||||
}
|
||||
|
||||
if (_mind.TryGetSession(out var session))
|
||||
session.ContentData()!.Mind?.UnVisit();
|
||||
if (_mindSystem.TryGetSession(_mind, out var session))
|
||||
_mindSystem.UnVisit(session.ContentData()!.Mind);
|
||||
Close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user