Add closing storage UIs to StorageInteractionTest (#28633)

This commit is contained in:
Leon Friedrich
2024-06-06 10:14:25 +12:00
committed by GitHub
parent 8e85bec2ce
commit ba57e3e4d9
2 changed files with 14 additions and 2 deletions

View File

@@ -298,7 +298,7 @@ public abstract class SharedStorageSystem : EntitySystem
return;
// prevent spamming bag open / honkerton honk sound
silent |= TryComp<UseDelayComponent>(uid, out var useDelay) && UseDelay.IsDelayed((uid, useDelay));
silent |= TryComp<UseDelayComponent>(uid, out var useDelay) && UseDelay.IsDelayed((uid, useDelay), id: OpenUiUseDelayID);
if (!CanInteract(entity, (uid, storageComp), silent: silent))
return;
@@ -308,7 +308,7 @@ public abstract class SharedStorageSystem : EntitySystem
Audio.PlayPredicted(storageComp.StorageOpenSound, uid, entity);
if (useDelay != null)
UseDelay.TryResetDelay((uid, useDelay));
UseDelay.TryResetDelay((uid, useDelay), id: OpenUiUseDelayID);
}
_ui.OpenUi(uid, StorageComponent.StorageUiKey.Key, entity);