mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-29 23:57:29 +00:00
stop carrying if you get downed (#2576)
Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -57,6 +57,7 @@ public sealed class CarryingSystem : EntitySystem
|
||||
SubscribeLocalEvent<CarryingComponent, BeforeThrowEvent>(OnThrow);
|
||||
SubscribeLocalEvent<CarryingComponent, EntParentChangedMessage>(OnParentChanged);
|
||||
SubscribeLocalEvent<CarryingComponent, MobStateChangedEvent>(OnMobStateChanged);
|
||||
SubscribeLocalEvent<CarryingComponent, DownedEvent>(OnDowned);
|
||||
SubscribeLocalEvent<BeingCarriedComponent, InteractionAttemptEvent>(OnInteractionAttempt);
|
||||
SubscribeLocalEvent<BeingCarriedComponent, UpdateCanMoveEvent>(OnMoveAttempt);
|
||||
SubscribeLocalEvent<BeingCarriedComponent, StandAttemptEvent>(OnStandAttempt);
|
||||
@@ -158,6 +159,11 @@ public sealed class CarryingSystem : EntitySystem
|
||||
DropCarried(ent, ent.Comp.Carried);
|
||||
}
|
||||
|
||||
private void OnDowned(Entity<CarryingComponent> ent, ref DownedEvent args)
|
||||
{
|
||||
DropCarried(ent, ent.Comp.Carried);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Only let the person being carried interact with their carrier and things on their person.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user