diff --git a/client/public/version.js b/client/public/version.js index d90942f..2414bfb 100644 --- a/client/public/version.js +++ b/client/public/version.js @@ -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.21 R124"; +window.CHGRID_WEB_VERSION = "2026.02.21 R125"; // Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid. window.CHGRID_TIME_ZONE = "America/Detroit"; diff --git a/client/src/main.ts b/client/src/main.ts index dc392c3..e103731 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -754,11 +754,29 @@ function inferItemPropertyValueType(item: WorldItem, key: string): string | unde return 'text'; } +function getFallbackInspectPropertyTooltip(key: string): string | undefined { + if (key === 'type') return 'The item type identifier.'; + if (key === 'x') return 'X coordinate on the grid.'; + if (key === 'y') return 'Y coordinate on the grid.'; + if (key === 'carrierId') return 'Current carrier user id, or none when on the ground.'; + if (key === 'version') return 'Server version for this item, incremented after each update.'; + if (key === 'createdBy') return 'User id of who created this item.'; + if (key === 'createdAt') return 'Timestamp when this item was created.'; + if (key === 'updatedAt') return 'Timestamp when this item was last updated.'; + if (key === 'capabilities') return 'Server-declared actions supported by this item.'; + if (key === 'useSound') return 'One-shot sound played when use succeeds.'; + if (key === 'emitSound') return 'Looping emitted sound source for this item.'; + if (key === 'useCooldownMs') return 'Global cooldown in milliseconds between uses.'; + if (key === 'directional') return 'Whether emitted audio favors item facing direction.'; + return undefined; +} + function describeItemPropertyHelp(item: WorldItem, key: string): string { const metadata = getItemPropertyMetadata(item.type, key); const parts: string[] = []; - if (metadata?.tooltip) { - parts.push(metadata.tooltip); + const tooltip = metadata?.tooltip ?? getFallbackInspectPropertyTooltip(key); + if (tooltip) { + parts.push(tooltip); } else { parts.push('No tooltip available.'); }