diff options
| author | sD <stoned@derpymail.org> | 2020-02-09 18:05:46 +0100 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-02-09 18:05:46 +0100 |
| commit | 4e19cdf13b731426205945426d81c1f5c6485bdd (patch) | |
| tree | 5baee3e7050677a4555238ec1686be210c7a02b7 /webAO/client.js | |
| parent | cdad75b865eef3a885297f7e6d69c2462710a904 (diff) | |
add (not) guilty animations
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/webAO/client.js b/webAO/client.js index 4747406..505b165 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -137,6 +137,14 @@ class Client extends EventEmitter { "src": AO_HOST + "themes/" + THEME + "/crossexamination.gif", "duration": 1600, "sfx": AO_HOST + "sounds/general/sfx-testimony2.wav" + }, + "notguilty": { + "src": AO_HOST + "themes/" + THEME + "/notguilty.gif", + "duration": 2440 + }, + "guilty": { + "src": AO_HOST + "themes/" + THEME + "/guilty.gif", + "duration": 2870 } }; @@ -901,12 +909,20 @@ class Client extends EventEmitter { * @param {Array} args packet arguments */ handleRT(args) { - if (args[1] === "testimony1") { - //Witness Testimony - this.testimonyID = 1; - } else { - //Cross Examination - this.testimonyID = 2; + const judgeid = Number(args[2]); + switch(args[1]) { + case "testimony1": + this.testimonyID = 1; + break; + case "testimony2": + //Cross Examination + this.testimonyID = 2; + break; + case "judgeruling": + this.testimonyID = 3 + judgeid; + break; + default: + console.warn("Invalid testimony"); } viewport.initTestimonyUpdater(); } @@ -1292,7 +1308,9 @@ class Viewport { initTestimonyUpdater() { const testimonyFilenames = { 1: "witnesstestimony", - 2: "crossexamination" + 2: "crossexamination", + 3: "notguilty", + 4: "guilty" }; const testimony = testimonyFilenames[client.testimonyID]; @@ -1358,7 +1376,9 @@ class Viewport { updateTestimony() { const testimonyFilenames = { 1: "witnesstestimony", - 2: "crossexamination" + 2: "crossexamination", + 3: "notguilty", + 4: "guilty" }; // Update timer |
