fix inventory escape bug (#12695)

This commit is contained in:
Rane
2022-11-20 22:34:53 -05:00
committed by GitHub
parent d6bfd1288d
commit a47f847659

View File

@@ -31,7 +31,6 @@ public sealed class EscapeInventorySystem : EntitySystem
base.Initialize();
SubscribeLocalEvent<CanEscapeInventoryComponent, MoveInputEvent>(OnRelayMovement);
SubscribeLocalEvent<CanEscapeInventoryComponent, UpdateCanMoveEvent>(OnMoveAttempt);
SubscribeLocalEvent<CanEscapeInventoryComponent, EscapeDoAfterComplete>(OnEscapeComplete);
SubscribeLocalEvent<CanEscapeInventoryComponent, EscapeDoAfterCancel>(OnEscapeFail);
SubscribeLocalEvent<CanEscapeInventoryComponent, DroppedEvent>(OnDropped);
@@ -68,12 +67,6 @@ public sealed class EscapeInventorySystem : EntitySystem
AttemptEscape(uid, container.Owner, component);
}
private void OnMoveAttempt(EntityUid uid, CanEscapeInventoryComponent component, UpdateCanMoveEvent args)
{
if (_containerSystem.IsEntityOrParentInContainer(uid))
args.Cancel();
}
private void AttemptEscape(EntityUid user, EntityUid container, CanEscapeInventoryComponent component, float multiplier = 1f)
{
component.CancelToken = new();