diff options
Diffstat (limited to 'webAO/client.ts')
| -rw-r--r-- | webAO/client.ts | 33 |
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 */ |
