Defibrillator (#15922)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Nemanja
2023-05-02 20:10:19 -04:00
committed by GitHub
parent 32b29fb05a
commit 0604c93d50
38 changed files with 796 additions and 56 deletions

View File

@@ -0,0 +1,32 @@
using Content.Server.EUI;
using Content.Server.Players;
using Content.Shared.Eui;
using Content.Shared.Ghost;
namespace Content.Server.Ghost;
public sealed class ReturnToBodyEui : BaseEui
{
private readonly Mind.Mind _mind;
public ReturnToBodyEui(Mind.Mind mind)
{
_mind = mind;
}
public override void HandleMessage(EuiMessageBase msg)
{
base.HandleMessage(msg);
if (msg is not ReturnToBodyMessage choice ||
!choice.Accepted)
{
Close();
return;
}
if (_mind.TryGetSession(out var session))
session.ContentData()!.Mind?.UnVisit();
Close();
}
}