mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-02 09:07:27 +00:00
* 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>
27 lines
822 B
C#
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;
|
|
}
|
|
}
|