aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.ts
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-08-02 18:46:09 +0200
committerstonedDiscord <Tukz@gmx.de>2022-08-02 18:46:09 +0200
commit9727cb0f120f84f1d94df7d2a6c423ebd9862997 (patch)
treeb9bfc0de135b6a13997aca912d810c9fdfd7363f /webAO/client.ts
parent319561b177d95f88c5297435371fc3f4111deddc (diff)
add new commands
Diffstat (limited to 'webAO/client.ts')
-rw-r--r--webAO/client.ts33
1 files changed, 33 insertions, 0 deletions
diff --git a/webAO/client.ts b/webAO/client.ts
index 64b8f9a..9640b8e 100644
--- a/webAO/client.ts
+++ b/webAO/client.ts
@@ -264,6 +264,10 @@ class Client extends EventEmitter {
this.on("CharsCheck", this.handleCharsCheck.bind(this));
this.on("PV", this.handlePV.bind(this));
this.on("ASS", this.handleASS.bind(this));
+ this.on("ackMS", this.handleackMS.bind(this));
+ this.on("SP", this.handleSP.bind(this));
+ this.on("JD", this.handleJD.bind(this));
+ this.on("decryptor", () => {});
this.on("CHECK", () => {});
this.on("CH", () => {});
@@ -1982,6 +1986,35 @@ class Client extends EventEmitter {
}
/**
+ * server got our message
+ */
+ handleackMS() {
+ resetICParams();
+ }
+
+ /**
+* position change
+* @param {string} pos new position
+*/
+ handleSP(pos: string) {
+ updateActionCommands(pos);
+ }
+
+ /**
+* show/hide judge controls
+* @param {number} show either a 1 or a 0
+*/
+ handleJD(show: number) {
+ if (show === 1) {
+ document.getElementById("judge_action").style.display = "inline-table";
+ document.getElementById("no_action").style.display = "none";
+ } else {
+ document.getElementById("judge_action").style.display = "none";
+ document.getElementById("no_action").style.display = "inline-table";
+ }
+ }
+
+ /**
* we are asking ourselves what characters there are
* @param {Array} args packet arguments
*/