blob: d2ec07639148c3f64ef7e01ee128c454a052328a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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";
}
}
|