remove 2 api calls that are technically useless and shouldnt be used
This commit is contained in:
parent
7c00835b1e
commit
7f87d066d3
3 changed files with 0 additions and 20 deletions
|
@ -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({
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue