From 81b562233188569b66fc2fb2a7ff952bdae0a4ec Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Thu, 28 Jul 2022 01:32:49 -0400 Subject: Sending user options to the server --- scripts/client.js | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/client.js') 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); -- cgit v1.2.3