fix inventory escape bug (#12695)
This commit is contained in:
parent
d6bfd1288d
commit
a47f847659
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue