aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/updatePlayerAreas.ts
diff options
context:
space:
mode:
authorDavid Skoland <davidskoland@gmail.com>2026-02-10 23:38:17 +0100
committerDavid Skoland <davidskoland@gmail.com>2026-02-10 23:38:17 +0100
commit020dfcda00ca06b9a06e7076eaf8a0164ae1327e (patch)
tree9fe2a8d9fdf81823e48d9a3795e47d0c59964f69 /webAO/dom/updatePlayerAreas.ts
parent9c68a1afcf178a86063f094b96471fa73531bd9a (diff)
Refactor playerlist to state-driven rendering with renderPlayerList
handlePR and handlePU now only update client.playerlist state, and renderPlayerList handles all DOM rendering from that state. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'webAO/dom/updatePlayerAreas.ts')
-rw-r--r--webAO/dom/updatePlayerAreas.ts24
1 files changed, 0 insertions, 24 deletions
diff --git a/webAO/dom/updatePlayerAreas.ts b/webAO/dom/updatePlayerAreas.ts
deleted file mode 100644
index 99eccf1..0000000
--- a/webAO/dom/updatePlayerAreas.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { client } from "../client";
-import { area_click } from "./areaClick";
-/**
- * Triggered when someone switches areas
- * @param {Number} ownarea
- */
-export function updatePlayerAreas(ownarea: number) {
- for (let i = 0; i < client.areas.length; i++) {
- if (i === ownarea)
- for (let classelement of Array.from(
- document.getElementsByClassName(
- `area${i}`,
- ) as HTMLCollectionOf<HTMLElement>,
- ))
- classelement.style.display = "";
- else
- for (let classelement of Array.from(
- document.getElementsByClassName(
- `area${i}`,
- ) as HTMLCollectionOf<HTMLElement>,
- ))
- classelement.style.display = "none";
- }
-}