aboutsummaryrefslogtreecommitdiff
path: root/server/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/commands.rs')
-rw-r--r--server/src/commands.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/server/src/commands.rs b/server/src/commands.rs
index 0dc8b954..d2a7da2c 100644
--- a/server/src/commands.rs
+++ b/server/src/commands.rs
@@ -22,7 +22,7 @@ use crate::{
use anyhow::Result;
use clap::{Parser, ValueEnum};
use hurrycurry_bot::algos::ALGO_CONSTRUCTORS;
-use hurrycurry_data::build_data;
+use hurrycurry_data::build_gamedata;
use hurrycurry_locale::{TrError, tre, trm};
use hurrycurry_protocol::{
Character, Hand, ItemLocation, Menu, Message, PacketC, PlayerClass, PlayerID,
@@ -175,7 +175,7 @@ impl Server {
})
.ok();
}
- let mut data = build_data(&self.config.data_path, &name, true)
+ let mut data = build_gamedata(&self.config.data_path, &name, true)
.map_err(|e| TrError::Plain(e.to_string()))?;
if let Some(hand_count) = hand_count {
@@ -206,7 +206,7 @@ impl Server {
})
.ok();
self.load(
- build_data(&self.config.data_path, &self.config.lobby, true)
+ build_gamedata(&self.config.data_path, &self.config.lobby, true)
.map_err(|e| TrError::Plain(e.to_string()))?,
None,
);
@@ -216,7 +216,7 @@ impl Server {
return Err(tre!("s.error.must_be_alone"));
}
self.load(
- build_data(&self.config.data_path, &self.game.data.current_map, true)
+ build_gamedata(&self.config.data_path, &self.game.data.current_map, true)
.map_err(|e| TrError::Plain(e.to_string()))?,
None,
);
@@ -233,7 +233,9 @@ impl Server {
}
self.update_paused();
}
- Command::Book => replies.push(PacketC::Menu(Menu::Book(self.data.book.clone()))),
+ Command::Book => {
+ replies.push(PacketC::Menu(Menu::Book(self.priv_gamedata.book.clone())))
+ }
Command::Effect { name } => {
self.broadcast
.send(PacketC::Effect2 {
@@ -289,7 +291,6 @@ impl Server {
Command::Scoreboard { map, text } => {
let mapname = map.as_ref().unwrap_or(&self.game.data.current_map);
let mapname_pretty = &self
- .game
.data
.maps
.iter()
@@ -327,7 +328,6 @@ impl Server {
Command::Info { map } => {
let mapname = map.as_ref().unwrap_or(&self.game.data.current_map);
let info = &self
- .game
.data
.maps
.iter()