summaryrefslogtreecommitdiff
path: root/scripts/client.js
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2022-07-28 01:32:49 -0400
committerKyle Gunger <kgunger12@gmail.com>2022-07-28 01:32:49 -0400
commit81b562233188569b66fc2fb2a7ff952bdae0a4ec (patch)
tree35aa636b6d4f978a5b8c8054b145026d1cfc4b4a /scripts/client.js
parente1af055dc8bcb2676969b9d57b098e6781df2b01 (diff)
Sending user options to the server
Diffstat (limited to 'scripts/client.js')
-rw-r--r--scripts/client.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/client.js b/scripts/client.js
index dba8630..e158cef 100644
--- a/scripts/client.js
+++ b/scripts/client.js
@@ -115,6 +115,8 @@ class Client{
this.gameOptions.cleanup();
this.settings = new Settings(m.data.user);
+ this.settings.addEventListener("change", (() => {this.socket.send("options", this.settings.getSettings())}).bind(this));
+
this.gameOptions = new Settings(m.data.game);
this.gameOptions.putSettings(this.lobby.top.newGame);