fix inventory escape bug (#12695)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user