diff options
Diffstat (limited to 'webAO/client/createArea.ts')
| -rw-r--r-- | webAO/client/createArea.ts | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/webAO/client/createArea.ts b/webAO/client/createArea.ts index 63af644..68406d9 100644 --- a/webAO/client/createArea.ts +++ b/webAO/client/createArea.ts @@ -2,29 +2,29 @@ import { client } from "../client"; import { area_click } from "../dom/areaClick"; export const createArea = (id: number, name: string) => { - const thisarea = { - name, - players: 0, - status: "IDLE", - cm: "", - locked: "FREE", - }; + const thisarea = { + name, + players: 0, + status: "IDLE", + cm: "", + locked: "FREE", + }; - client.areas.push(thisarea); + client.areas.push(thisarea); - // Create area button - const newarea = document.createElement("SPAN"); - newarea.className = "area-button area-default"; - newarea.id = `area${id}`; - newarea.innerText = thisarea.name; - newarea.title = - `Players: ${thisarea.players}\n` + - `Status: ${thisarea.status}\n` + - `CM: ${thisarea.cm}\n` + - `Area lock: ${thisarea.locked}`; - newarea.onclick = function () { - area_click(newarea); - }; + // Create area button + const newarea = document.createElement("SPAN"); + newarea.className = "area-button area-default"; + newarea.id = `area${id}`; + newarea.innerText = thisarea.name; + newarea.title = + `Players: ${thisarea.players}\n` + + `Status: ${thisarea.status}\n` + + `CM: ${thisarea.cm}\n` + + `Area lock: ${thisarea.locked}`; + newarea.onclick = function () { + area_click(newarea); + }; - document.getElementById("areas")!.appendChild(newarea); -}
\ No newline at end of file + document.getElementById("areas")!.appendChild(newarea); +}; |
