diff --git a/assets/web/tavern.js b/assets/web/tavern.js index 8e5132f..dd8bcda 100644 --- a/assets/web/tavern.js +++ b/assets/web/tavern.js @@ -100,10 +100,6 @@ class Tavern { if (!this.connected || this.loggedIn) { return false; } this.socket.send(JSON.stringify({ get_chat_history: { from: from, amount: amount } })) } - get_last_msgs = (amount) => { - if (!this.connected || this.loggedIn) { return false; } - this.socket.send(JSON.stringify({ get_last_messages: { amount: amount } })) - } get_tokens = (mapId) => { if (!this.connected || this.loggedIn) { return false; } this.socket.send(JSON.stringify({ get_tokens: { scene: mapId } })); @@ -120,10 +116,6 @@ class Tavern { if (!this.connected || this.loggedIn) { return; } this.socket.send(JSON.stringify({ get_scene: { scene: id } })) } - get_scene_list = () => { - if (!this.connected || this.loggedIn) { return; } - this.socket.send(JSON.stringify('get_scene_list')) - } spawn_token = (scene, character, x, y, img_path, visible_to_players) => { if (!this.connected || this.loggedIn) { return; } this.socket.send(JSON.stringify({ diff --git a/src/api/mod.rs b/src/api/mod.rs index e8e541c..a6cf830 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -45,10 +45,6 @@ pub enum Request { amount: usize, from: usize, }, - /// TODO: Perhaps remove it, as the client should auto get it on login and use GetChatHistory when needed - GetLastMessages { - amount: usize, - }, // Map requests CreateScene { title: String, @@ -71,8 +67,6 @@ pub enum Request { ShowScene { scene: usize, }, - /// TODO: Perhaps remove it, as the client should auto get it on login and on scene list updates - GetSceneList, GetTokens { scene: usize, }, diff --git a/src/lib.rs b/src/lib.rs index ed41961..1b98544 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -146,9 +146,6 @@ impl GameServer { api::Request::GetChatHistory { amount, from } => { _ = broadcast.send((SendTo::User(id), self.get_chat_history(amount, from))); } - api::Request::GetLastMessages { amount } => { - _ = broadcast.send((SendTo::User(id), self.get_last_messages(amount))); - } api::Request::GetTokens { scene } => { for token_id in self.game.available_tokens(scene, self.is_admin(&id)) { if let Some(ti) = self.game.token_info(0, token_id) && @@ -234,9 +231,6 @@ impl GameServer { _ = broadcast.send((SendTo::User(id), self.get_scene_list(true))); } } - api::Request::GetSceneList => { - _ = broadcast.send((SendTo::User(id.clone()), self.get_scene_list(self.is_admin(&id)))); - } api::Request::SpawnToken { map_id, character,