From e50167a8077b0ada769cdf785971972c3ad865f7 Mon Sep 17 00:00:00 2001 From: Caleb Date: Fri, 9 Sep 2022 18:30:07 -0400 Subject: Pulled out everything I wanted --- webAO/client/fixLastArea.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 webAO/client/fixLastArea.ts (limited to 'webAO/client/fixLastArea.ts') 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 -- cgit From 93979636fb5d1c60f0da3290e80eb3ca9ead992f Mon Sep 17 00:00:00 2001 From: Caleb Date: Fri, 9 Sep 2022 18:46:42 -0400 Subject: Migrated functions --- webAO/client/fixLastArea.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'webAO/client/fixLastArea.ts') diff --git a/webAO/client/fixLastArea.ts b/webAO/client/fixLastArea.ts index e4d8725..f1aa99f 100644 --- a/webAO/client/fixLastArea.ts +++ b/webAO/client/fixLastArea.ts @@ -1,4 +1,5 @@ import { client } from "../client"; +import { addTrack } from "./addTrack"; /** @@ -9,6 +10,6 @@ export const fix_last_area = () => { const malplaced = client.areas.pop().name; const areas = document.getElementById("areas")!; areas.removeChild(areas.lastChild); - client.addTrack(malplaced); + addTrack(malplaced); } } \ No newline at end of file -- cgit