diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-08-31 20:31:54 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-08-31 20:31:54 +0200 |
| commit | d124c7466ec13dc0353edeb5fab49f03f3035b5e (patch) | |
| tree | 8f278b39e51fa5d3b738bd2d47c6f3b1d123ca9c /webAO/packets/handlers/handleFL.ts | |
| parent | 1847fcf939c4a079b2f016df212e2b6c832aa2e5 (diff) | |
| parent | da992f9b3623955ef777c343a9f2c7b81d8ca942 (diff) | |
Merge branch 'master' of https://github.com/AttorneyOnline/webAO
Diffstat (limited to 'webAO/packets/handlers/handleFL.ts')
| -rw-r--r-- | webAO/packets/handlers/handleFL.ts | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/webAO/packets/handlers/handleFL.ts b/webAO/packets/handlers/handleFL.ts index d9e67e5..378d5a9 100644 --- a/webAO/packets/handlers/handleFL.ts +++ b/webAO/packets/handlers/handleFL.ts @@ -1,48 +1,48 @@ import { setExtraFeatures } from "../../client"; - - /** - * With this the server tells us which features it supports - * @param {Array} args list of features - */ + +/** + * With this the server tells us which features it supports + * @param {Array} args list of features + */ export const handleFL = (args: string[]) => { - console.info("Server-supported features:"); - console.info(args); - setExtraFeatures(args); - - if (args.includes("yellowtext")) { - const colorselect = <HTMLSelectElement>( - document.getElementById("textcolor") - ); - - colorselect.options[colorselect.options.length] = new Option( - "Yellow", - "5" - ); - colorselect.options[colorselect.options.length] = new Option("Grey", "6"); - colorselect.options[colorselect.options.length] = new Option("Pink", "7"); - colorselect.options[colorselect.options.length] = new Option("Cyan", "8"); - } - - if (args.includes("cccc_ic_support")) { - document.getElementById("cccc")!.style.display = ""; - document.getElementById("pairing")!.style.display = ""; - } - - if (args.includes("flipping")) { - document.getElementById("button_flip")!.style.display = ""; - } - - if (args.includes("looping_sfx")) { - document.getElementById("button_shake")!.style.display = ""; - document.getElementById("2.7")!.style.display = ""; - } - - if (args.includes("effects")) { - document.getElementById("2.8")!.style.display = ""; - } - - if (args.includes("y_offset")) { - document.getElementById("y_offset")!.style.display = ""; - } + console.info("Server-supported features:"); + console.info(args); + setExtraFeatures(args); + + if (args.includes("yellowtext")) { + const colorselect = <HTMLSelectElement>( + document.getElementById("textcolor") + ); + + colorselect.options[colorselect.options.length] = new Option( + "Yellow", + "5" + ); + colorselect.options[colorselect.options.length] = new Option("Grey", "6"); + colorselect.options[colorselect.options.length] = new Option("Pink", "7"); + colorselect.options[colorselect.options.length] = new Option("Cyan", "8"); + } + + if (args.includes("cccc_ic_support")) { + document.getElementById("cccc")!.style.display = ""; + document.getElementById("pairing")!.style.display = ""; + } + + if (args.includes("flipping")) { + document.getElementById("button_flip")!.style.display = ""; + } + + if (args.includes("looping_sfx")) { + document.getElementById("button_shake")!.style.display = ""; + document.getElementById("2.7")!.style.display = ""; + } + + if (args.includes("effects")) { + document.getElementById("2.8")!.style.display = ""; + } + + if (args.includes("y_offset")) { + document.getElementById("y_offset")!.style.display = ""; } +} |
