Files
Delta-v/Content.Client/_Goobstation/Devil/UI/RevivalContractBoundUserInterface.cs
William LemonandTobias Berger f563f2c566 Ports Devils from Goobstation (#4639)
* or your debil

* Woop

* Whoops, Missed this

* Whoops, Suicide System

* Hush... Extended tests... Hush

* AAAAAA

* No-longer jaunt whilst dead

* :)

* Update Content.Shared/_Lavaland/Chasm/PreventChasmFallingSystem.cs

Co-authored-by: Tobias Berger <toby@tobot.dev>
Signed-off-by: William Lemon <William.Lemon2@gmail.com>

* Update Content.Server/_Goobstation/Possession/PossessionSystem.cs

Co-authored-by: Tobias Berger <toby@tobot.dev>
Signed-off-by: William Lemon <William.Lemon2@gmail.com>

* Please tobysenpai forgive me

---------

Signed-off-by: William Lemon <William.Lemon2@gmail.com>
Co-authored-by: Tobias Berger <toby@tobot.dev>
2025-11-20 10:11:07 +01:00

53 lines
1.3 KiB
C#

// SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
// SPDX-FileCopyrightText: 2025 SolsticeOfTheWinter <solsticeofthewinter@gmail.com>
//
// SPDX-License-Identifier: AGPL-3.0-or-later
using Content.Shared._Goobstation.Devil.UI;
using JetBrains.Annotations;
using Robust.Client.UserInterface;
namespace Content.Client._Goobstation.Devil.UI;
[UsedImplicitly]
public sealed class RevivalContractBoundUserInterface : BoundUserInterface
{
private RevivalContractMenu? _menu;
public RevivalContractBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
IoCManager.InjectDependencies(this);
}
protected override void Open()
{
base.Open();
_menu = this.CreateWindow<RevivalContractMenu>();
_menu.SetEntity(Owner);
_menu.Accepted += OnAccepted;
_menu.Rejected += OnRejected;
_menu.OnClose += OnClosed;
_menu.OpenCentered();
}
private void OnAccepted()
{
SendPredictedMessage(new RevivalContractMessage(true));
Close();
}
private void OnRejected()
{
SendPredictedMessage(new RevivalContractMessage(false));
Close();
}
private void OnClosed()
{
SendPredictedMessage(new RevivalContractMessage(false));
Close();
}
}