diff options
Diffstat (limited to 'webAO/client/fixLastArea.ts')
| -rw-r--r-- | webAO/client/fixLastArea.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/webAO/client/fixLastArea.ts b/webAO/client/fixLastArea.ts new file mode 100644 index 0000000..e4d8725 --- /dev/null +++ b/webAO/client/fixLastArea.ts @@ -0,0 +1,14 @@ +import { client } from "../client"; + + +/** + * Area list fuckery + */ +export const fix_last_area = () => { + if (client.areas.length > 0) { + const malplaced = client.areas.pop().name; + const areas = document.getElementById("areas")!; + areas.removeChild(areas.lastChild); + client.addTrack(malplaced); + } +}
\ No newline at end of file |
