Files
Delta-v/Content.Shared/_Goobstation/Devour/Systems/PreventSelfRevivalSystem.cs
T
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

27 lines
822 B
C#

using Content.Shared._Goobstation.Devour;
using Content.Shared._Goobstation.Devour.Events;
using Content.Shared.Popups;
namespace Content.Shared._Goobstation.Devour.Systems;
public sealed class PreventSelfRevivalSystem : EntitySystem
{
[Dependency] private readonly SharedPopupSystem _popup = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<PreventSelfRevivalComponent, BeforeSelfRevivalEvent>(OnAttemptSelfRevive);
}
private void OnAttemptSelfRevive(Entity<PreventSelfRevivalComponent> ent, ref BeforeSelfRevivalEvent args)
{
if (args.Handled || args.Cancelled)
return;
_popup.PopupEntity(Loc.GetString(args.PopupText), args.Target, args.Target, PopupType.SmallCaution);
args.Cancelled = true;
}
}