Convert suicide to ecs (#8091)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
wrexbe
2022-05-12 05:05:16 -07:00
committed by GitHub
parent 6903209a31
commit 089e40a061
15 changed files with 362 additions and 282 deletions

View File

@@ -9,6 +9,7 @@ using Content.Shared.Body.Components;
using Content.Shared.Body.Part;
using Content.Shared.Examine;
using Content.Shared.Interaction;
using Content.Shared.Interaction.Events;
using Content.Shared.Toilet;
using Content.Shared.Tools.Components;
using Robust.Shared.Audio;
@@ -35,10 +36,16 @@ namespace Content.Server.Toilet
SubscribeLocalEvent<ToiletComponent, InteractUsingEvent>(OnInteractUsing);
SubscribeLocalEvent<ToiletComponent, InteractHandEvent>(OnInteractHand);
SubscribeLocalEvent<ToiletComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<ToiletComponent, SuicideEvent>(OnSuicide);
SubscribeLocalEvent<ToiletPryFinished>(OnToiletPried);
SubscribeLocalEvent<ToiletPryInterrupted>(OnToiletInterrupt);
}
private void OnSuicide(EntityUid uid, ToiletComponent component, SuicideEvent args)
{
Suicide(component.Owner, uid, component);
}
private void OnInit(EntityUid uid, ToiletComponent component, ComponentInit args)
{
EntityManager.EnsureComponent<SecretStashComponent>(uid);