aboutsummaryrefslogtreecommitdiff
path: root/webAO/packets/handlers/handleFL.ts
diff options
context:
space:
mode:
authorstonedDiscord <stonedDiscord@users.noreply.github.com>2024-11-20 13:31:50 +0000
committerGitHub Action <actions@github.com>2024-11-20 13:31:50 +0000
commit6684f3fce6e90fd0574d7bab63b629554ab03ef6 (patch)
treeb2a62247d17e23a77af57aea355ba621666817c2 /webAO/packets/handlers/handleFL.ts
parent95a2d1361d84c61b454ebe506e6963b93f6d8dee (diff)
Prettified Code!
Diffstat (limited to 'webAO/packets/handlers/handleFL.ts')
-rw-r--r--webAO/packets/handlers/handleFL.ts72
1 files changed, 35 insertions, 37 deletions
diff --git a/webAO/packets/handlers/handleFL.ts b/webAO/packets/handlers/handleFL.ts
index e77e968..5479f4e 100644
--- a/webAO/packets/handlers/handleFL.ts
+++ b/webAO/packets/handlers/handleFL.ts
@@ -5,40 +5,38 @@ import { setExtraFeatures } from "../../client";
* @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("Pink", "6");
- colorselect.options[colorselect.options.length] = new Option("Cyan", "7");
- colorselect.options[colorselect.options.length] = new Option("Grey", "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("Pink", "6");
+ colorselect.options[colorselect.options.length] = new Option("Cyan", "7");
+ colorselect.options[colorselect.options.length] = new Option("Grey", "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 = "";
+ }
+};