Fix ambiguous Dumpable behaviour (#13736)

This commit is contained in:
Joel Hedtjärn
2023-01-27 17:25:07 +01:00
committed by GitHub
parent 21db92547f
commit 589854449b
2 changed files with 3 additions and 2 deletions

View File

@@ -21,7 +21,7 @@ namespace Content.Server.Storage.EntitySystems
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<DumpableComponent, AfterInteractEvent>(OnAfterInteract);
SubscribeLocalEvent<DumpableComponent, AfterInteractEvent>(OnAfterInteract, after: new[]{ typeof(StorageSystem) });
SubscribeLocalEvent<DumpableComponent, GetVerbsEvent<AlternativeVerb>>(AddDumpVerb);
SubscribeLocalEvent<DumpableComponent, GetVerbsEvent<UtilityVerb>>(AddUtilityVerbs);
SubscribeLocalEvent<DumpCompletedEvent>(OnDumpCompleted);
@@ -36,7 +36,7 @@ namespace Content.Server.Storage.EntitySystems
if (!TryComp<ServerStorageComponent>(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<DisposalUnitComponent>(args.Target) || HasComp<PlaceableSurfaceComponent>(args.Target))