From 2dd38156349902128016ef105ba273f95d97e320 Mon Sep 17 00:00:00 2001 From: Jage9 Date: Sat, 21 Feb 2026 03:20:10 -0500 Subject: [PATCH] Show cooldown seconds, expand grid to 0-40, and announce capitals --- client/public/version.js | 2 +- client/src/main.ts | 1 + client/src/state/gameState.ts | 2 +- server/app/server.py | 3 ++- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/public/version.js b/client/public/version.js index 54feca3..8de91b9 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 R87"; +window.CHGRID_WEB_VERSION = "2026.02.21 R88"; // 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 60680c1..60c5fc4 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -596,6 +596,7 @@ function applyTextInputEdit(code: string, key: string, maxLength: number, allowR } function describeCharacter(ch: string): string { + if (ch.length === 1 && /[A-Z]/.test(ch)) return `capital ${ch}`; if (ch === ' ') return 'space'; if (ch === '\t') return 'tab'; if (ch === '.') return 'period'; diff --git a/client/src/state/gameState.ts b/client/src/state/gameState.ts index fb55ea8..81e5d65 100644 --- a/client/src/state/gameState.ts +++ b/client/src/state/gameState.ts @@ -1,4 +1,4 @@ -export const GRID_SIZE = 40; +export const GRID_SIZE = 41; export const HEARING_RADIUS = 15; export const MOVE_COOLDOWN_MS = 200; diff --git a/server/app/server.py b/server/app/server.py index 154f381..6c0289c 100644 --- a/server/app/server.py +++ b/server/app/server.py @@ -440,11 +440,12 @@ class SignalingServer: last_use_ms = self.item_last_use_ms.get(item.id) if last_use_ms is not None and now_ms - last_use_ms < cooldown_ms: remaining_ms = cooldown_ms - (now_ms - last_use_ms) + remaining_seconds = max(0.1, round(remaining_ms / 1000, 1)) await self._send_item_result( client, False, "use", - f"{item.title} is on cooldown for {max(1, remaining_ms)} ms.", + f"{item.title} is on cooldown for {remaining_seconds:.1f} s.", item.id, ) return