diff options
| author | stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> | 2020-09-07 19:43:11 +0200 |
|---|---|---|
| committer | stonedDiscord <10584181+stonedDiscord@users.noreply.github.com> | 2020-09-07 19:43:11 +0200 |
| commit | 2c3e9fa5c310e25d67b0227e849e4b98572296e5 (patch) | |
| tree | 900f413c2467b1056e9f85699f1b702e770a5290 /webAO/client.js | |
| parent | c78c998a91d57fd5c80c4ac23753ffccd931c9cd (diff) | |
stop the CH spam and have a music list
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/webAO/client.js b/webAO/client.js index 7f9b394..64bdd38 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -10,6 +10,7 @@ import { escapeChat, encodeChat, prepChat, safe_tags } from './encoding.js'; // Load some defaults for the background and evidence dropdowns import character_arr from "./characters.js"; +import music_arr from "./music.js"; import background_arr from "./backgrounds.js"; import evidence_arr from "./evidence.js"; import sfx_arr from "./sounds.js"; @@ -402,7 +403,8 @@ class Client extends EventEmitter { this.sendServer(`HI#${hdid}#%`); this.sendServer(`ID#webAO#webAO#%`); - this.checkUpdater = setInterval(() => this.sendCheck(), 5000); + if (mode !== "replay") + this.checkUpdater = setInterval(() => this.sendCheck(), 5000); } /** @@ -1383,7 +1385,7 @@ class Client extends EventEmitter { * @param {Array} args packet arguments */ handleRM(_args) { - this.sendSelf("SM#stop.mp3#%"); + this.sendSelf("SM#" + music_arr.join("#") + "#%"); } /** @@ -1391,9 +1393,14 @@ class Client extends EventEmitter { * @param {Array} args packet arguments */ handleRD(_args) { + this.sendSelf("BN#gs4#%"); this.sendSelf("DONE#%"); - document.getElementById("client_ooclog").innerHTML = ""; - + const ooclog = document.getElementById("client_ooclog"); + ooclog.innerHTML = ""; + ooclog.readOnly = false; + + document.getElementById("client_oocinput").style.display = "none"; + document.getElementById("client_replaycontrols").style.display = "inline-block"; } } |
