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

@@ -62,6 +62,7 @@ type MessageHandlerDeps = {
itemPropertyLabel: (key: string) => string;
getItemPropertyValue: (item: WorldItem, key: string) => string;
getItemById: (itemId: string) => WorldItem | undefined;
shouldAnnounceItemPropertyEcho: () => boolean;
playLocateToneAt: (x: number, y: number) => void;
resolveIncomingSoundUrl: (url: string) => string;
playIncomingItemUseSound: (url: string, x: number, y: number) => void;
@@ -204,7 +205,7 @@ export function createOnMessageHandler(deps: MessageHandlerDeps): (message: Inco
deps.state.carriedItemId = deps.getCarriedItemId();
if (deps.state.mode === 'itemProperties' && deps.state.selectedItemId === message.item.id) {
const key = deps.state.itemPropertyKeys[deps.state.itemPropertyIndex];
if (key) {
if (key && deps.shouldAnnounceItemPropertyEcho()) {
deps.updateStatus(`${deps.itemPropertyLabel(key)}: ${deps.getItemPropertyValue(message.item, key)}`);
}
}