From f211f40d02685359a0628729f423a57d2beaacb8 Mon Sep 17 00:00:00 2001 From: Jage9 Date: Sat, 21 Feb 2026 04:03:49 -0500 Subject: [PATCH] Announce already here for no-op list teleports --- client/public/version.js | 2 +- client/src/main.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/public/version.js b/client/public/version.js index 6c2b89f..7760b08 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 R96"; +window.CHGRID_WEB_VERSION = "2026.02.21 R97"; // 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 2b7dfcb..b14e4fd 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -1474,6 +1474,10 @@ function handleListModeInput(code: string, key: string): void { if (code === 'Enter') { const peer = state.peers.get(state.sortedPeerIds[state.listIndex]); if (!peer) return; + if (state.player.x === peer.x && state.player.y === peer.y) { + updateStatus('Already here.'); + return; + } state.player.x = peer.x; state.player.y = peer.y; persistPlayerPosition(); @@ -1530,6 +1534,10 @@ function handleListItemsModeInput(code: string, key: string): void { if (code === 'Enter') { const item = state.items.get(state.sortedItemIds[state.itemListIndex]); if (!item) return; + if (state.player.x === item.x && state.player.y === item.y) { + updateStatus('Already here.'); + return; + } state.player.x = item.x; state.player.y = item.y; persistPlayerPosition();