Keep emit sounds playing while items are carried

This commit is contained in:
Jage9
2026-02-24 21:05:37 -05:00
parent 4ea5419d30
commit 6eb83d6df4
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
// Maintainer-controlled web client version.
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
window.CHGRID_WEB_VERSION = "2026.02.25 R239";
window.CHGRID_WEB_VERSION = "2026.02.25 R240";
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
window.CHGRID_TIME_ZONE = "America/Detroit";

View File

@@ -136,7 +136,7 @@ export class ItemEmitRuntime {
const emitSound = String(item.params.emitSound ?? item.emitSound ?? '').trim();
const enabled = item.params.enabled !== false;
const soundUrl = enabled ? this.resolveSoundUrl(emitSound) : '';
if (!soundUrl || item.carrierId || !this.shouldKeepRuntime(item, listeners, this.outputs.has(item.id))) {
if (!soundUrl || !this.shouldKeepRuntime(item, listeners, this.outputs.has(item.id))) {
this.cleanup(item.id);
continue;
}
@@ -196,7 +196,7 @@ export class ItemEmitRuntime {
for (const [itemId, output] of this.outputs.entries()) {
const item = items.get(itemId);
if (!item || item.carrierId) {
if (!item) {
output.gain.gain.linearRampToValueAtTime(0, audioCtx.currentTime + 0.05);
continue;
}