Fix defib "return to body" prompt. (#18376)
This commit is contained in:
committed by
GitHub
parent
1d1918f034
commit
7e5d03a1a8
@@ -8,13 +8,14 @@ namespace Content.Server.Ghost;
|
||||
|
||||
public sealed class ReturnToBodyEui : BaseEui
|
||||
{
|
||||
[Dependency] private readonly MindSystem _mindSystem = default!;
|
||||
private readonly MindSystem _mindSystem;
|
||||
|
||||
private readonly Mind.Mind _mind;
|
||||
|
||||
public ReturnToBodyEui(Mind.Mind mind)
|
||||
public ReturnToBodyEui(Mind.Mind mind, MindSystem mindSystem)
|
||||
{
|
||||
_mind = mind;
|
||||
_mindSystem = mindSystem;
|
||||
}
|
||||
|
||||
public override void HandleMessage(EuiMessageBase msg)
|
||||
|
||||
@@ -4,6 +4,7 @@ using Content.Server.DoAfter;
|
||||
using Content.Server.Electrocution;
|
||||
using Content.Server.EUI;
|
||||
using Content.Server.Ghost;
|
||||
using Content.Server.Mind;
|
||||
using Content.Server.Mind.Components;
|
||||
using Content.Server.Popups;
|
||||
using Content.Server.PowerCell;
|
||||
@@ -42,6 +43,7 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||
[Dependency] private readonly UseDelaySystem _useDelay = default!;
|
||||
[Dependency] private readonly MindSystem _mind = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
@@ -231,7 +233,7 @@ public sealed class DefibrillatorSystem : EntitySystem
|
||||
{
|
||||
_chatManager.TrySendInGameICMessage(uid, Loc.GetString("defibrillator-ghosted"),
|
||||
InGameICChatType.Speak, true);
|
||||
_euiManager.OpenEui(new ReturnToBodyEui(mindComp.Mind), session);
|
||||
_euiManager.OpenEui(new ReturnToBodyEui(mindComp.Mind, _mind), session);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user