Suppress duplicate property row echo after quick adjust

This commit is contained in:
Jage9
2026-02-22 20:50:04 -05:00
parent acca054fae
commit ecef4832fc
4 changed files with 12 additions and 2 deletions

View File

@@ -221,6 +221,7 @@ let lastSubscriptionRefreshTileX = Math.round(state.player.x);
let lastSubscriptionRefreshTileY = Math.round(state.player.y);
let subscriptionRefreshInFlight = false;
let subscriptionRefreshPending = false;
let suppressItemPropertyEchoUntilMs = 0;
let activeTeleportLoopStop: (() => void) | null = null;
let activeTeleportLoopToken = 0;
let activeTeleport:
@@ -1491,6 +1492,7 @@ const onAppMessage = createOnMessageHandler({
itemPropertyLabel,
getItemPropertyValue,
getItemById: (itemId) => state.items.get(itemId),
shouldAnnounceItemPropertyEcho: () => Date.now() >= suppressItemPropertyEchoUntilMs,
playLocateToneAt: (x, y) => audio.sfxLocate({ x: x - state.player.x, y: y - state.player.y }),
resolveIncomingSoundUrl,
playIncomingItemUseSound: (url, x, y) => {
@@ -2251,6 +2253,9 @@ const itemPropertyEditor = createItemPropertyEditor({
setReplaceTextOnNextType: (value) => {
replaceTextOnNextType = value;
},
suppressItemPropertyEchoMs: (ms) => {
suppressItemPropertyEchoUntilMs = Math.max(suppressItemPropertyEchoUntilMs, Date.now() + Math.max(0, ms));
},
updateStatus,
sfxUiBlip: () => audio.sfxUiBlip(),
sfxUiCancel: () => audio.sfxUiCancel(),