Files
OldThink/Content.Shared/Medical/Cryogenics/SharedInsideCryoPodSystem.cs
Remuchi 9565de0262 [Feat&Fix] Система лежания (#288)
* лежать

* лучше так сделать

* - remove: Gravity is fine.

* - add: Hit moving lying targets.

* - tweak: Lie down insted of stun on FTL.

* - fix: Fix double component.

* - remove: Disable recoil.

---------

Co-authored-by: Aviu00 <aviu00@protonmail.com>
2024-04-22 18:14:23 +03:00

31 lines
904 B
C#

using Content.Shared.Standing;
using Content.Shared.Standing.Systems;
using Robust.Shared.Containers;
namespace Content.Shared.Medical.Cryogenics;
public abstract partial class SharedCryoPodSystem
{
public virtual void InitializeInsideCryoPod()
{
SubscribeLocalEvent<InsideCryoPodComponent, DownAttemptEvent>(HandleDown);
SubscribeLocalEvent<InsideCryoPodComponent, EntGotRemovedFromContainerMessage>(OnEntGotRemovedFromContainer);
}
// Must stand in the cryo pod
private void HandleDown(EntityUid uid, InsideCryoPodComponent component, DownAttemptEvent args)
{
args.Cancel();
}
private void OnEntGotRemovedFromContainer(EntityUid uid, InsideCryoPodComponent component, EntGotRemovedFromContainerMessage args)
{
if (Terminating(uid))
{
return;
}
RemComp<InsideCryoPodComponent>(uid);
}
}