From 589854449b24016519b113c6c61cb3cc5ac96c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joel=20Hedtj=C3=A4rn?= Date: Fri, 27 Jan 2023 17:25:07 +0100 Subject: [PATCH] Fix ambiguous Dumpable behaviour (#13736) --- Content.Server/Storage/EntitySystems/DumpableSystem.cs | 4 ++-- Content.Server/Storage/EntitySystems/StorageSystem.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Content.Server/Storage/EntitySystems/DumpableSystem.cs b/Content.Server/Storage/EntitySystems/DumpableSystem.cs index 4d2bac4d19..806900e7a0 100644 --- a/Content.Server/Storage/EntitySystems/DumpableSystem.cs +++ b/Content.Server/Storage/EntitySystems/DumpableSystem.cs @@ -21,7 +21,7 @@ namespace Content.Server.Storage.EntitySystems public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnAfterInteract); + SubscribeLocalEvent(OnAfterInteract, after: new[]{ typeof(StorageSystem) }); SubscribeLocalEvent>(AddDumpVerb); SubscribeLocalEvent>(AddUtilityVerbs); SubscribeLocalEvent(OnDumpCompleted); @@ -36,7 +36,7 @@ namespace Content.Server.Storage.EntitySystems if (!TryComp(args.Used, out var storage)) return; - if (storage.StoredEntities == null || storage.StoredEntities.Count == 0) + if (storage.StoredEntities == null || storage.StoredEntities.Count == 0 || storage.CancelToken != null) return; if (HasComp(args.Target) || HasComp(args.Target)) diff --git a/Content.Server/Storage/EntitySystems/StorageSystem.cs b/Content.Server/Storage/EntitySystems/StorageSystem.cs index 3951d15f4d..6cef4726b0 100644 --- a/Content.Server/Storage/EntitySystems/StorageSystem.cs +++ b/Content.Server/Storage/EntitySystems/StorageSystem.cs @@ -316,6 +316,7 @@ namespace Content.Server.Storage.EntitySystems { if (entity == args.User || !itemQuery.HasComponent(entity) + || !CanInsert(uid, entity, out _, storageComp) || !_interactionSystem.InRangeUnobstructed(args.User, entity)) continue;