--- a/gameServer2/src/server/room.rs Fri Jul 20 00:02:52 2018 +0300
+++ b/gameServer2/src/server/room.rs Fri Jul 20 22:14:20 2018 +0300
@@ -335,6 +335,10 @@
}
}
+ pub fn save_config(&mut self, name: String, location: String) {
+ self.saves.insert(name, RoomSave { location, config: self.config.clone() });
+ }
+
pub fn load_config(&mut self, name: &str) -> Option<&str> {
if let Some(save) = self.saves.get(name) {
self.config = save.config.clone();
@@ -344,6 +348,10 @@
}
}
+ pub fn delete_config(&mut self, name: &str) -> bool {
+ self.saves.remove(name).is_some()
+ }
+
pub fn team_info(owner: &HWClient, team: &TeamInfo) -> Vec<String> {
let mut info = vec![
team.name.clone(),