Show cooldown seconds, expand grid to 0-40, and announce capitals
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// Maintainer-controlled web client version.
|
// Maintainer-controlled web client version.
|
||||||
// Format: YYYY.MM.DD Rn (example: 2026.02.20 R2)
|
// 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.
|
// Optional display timezone for timestamps. Falls back to America/Detroit if unset/invalid.
|
||||||
window.CHGRID_TIME_ZONE = "America/Detroit";
|
window.CHGRID_TIME_ZONE = "America/Detroit";
|
||||||
|
|||||||
@@ -596,6 +596,7 @@ function applyTextInputEdit(code: string, key: string, maxLength: number, allowR
|
|||||||
}
|
}
|
||||||
|
|
||||||
function describeCharacter(ch: string): string {
|
function describeCharacter(ch: string): string {
|
||||||
|
if (ch.length === 1 && /[A-Z]/.test(ch)) return `capital ${ch}`;
|
||||||
if (ch === ' ') return 'space';
|
if (ch === ' ') return 'space';
|
||||||
if (ch === '\t') return 'tab';
|
if (ch === '\t') return 'tab';
|
||||||
if (ch === '.') return 'period';
|
if (ch === '.') return 'period';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export const GRID_SIZE = 40;
|
export const GRID_SIZE = 41;
|
||||||
export const HEARING_RADIUS = 15;
|
export const HEARING_RADIUS = 15;
|
||||||
export const MOVE_COOLDOWN_MS = 200;
|
export const MOVE_COOLDOWN_MS = 200;
|
||||||
|
|
||||||
|
|||||||
@@ -440,11 +440,12 @@ class SignalingServer:
|
|||||||
last_use_ms = self.item_last_use_ms.get(item.id)
|
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:
|
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_ms = cooldown_ms - (now_ms - last_use_ms)
|
||||||
|
remaining_seconds = max(0.1, round(remaining_ms / 1000, 1))
|
||||||
await self._send_item_result(
|
await self._send_item_result(
|
||||||
client,
|
client,
|
||||||
False,
|
False,
|
||||||
"use",
|
"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,
|
item.id,
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user