remove 2 api calls that are technically useless and shouldnt be used

This commit is contained in:
Rusty Striker 2025-07-28 19:11:29 +03:00
parent 7c00835b1e
commit 7f87d066d3
Signed by: RustyStriker
GPG key ID: 87E4D691632DFF15
3 changed files with 0 additions and 20 deletions

View file

@ -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({

View file

@ -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,
},

View file

@ -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,