aboutsummaryrefslogtreecommitdiff
path: root/server/data/src/index.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/data/src/index.rs')
-rw-r--r--server/data/src/index.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/data/src/index.rs b/server/data/src/index.rs
index 9a44d202..a74b283c 100644
--- a/server/data/src/index.rs
+++ b/server/data/src/index.rs
@@ -18,6 +18,7 @@
use anyhow::{Context, Result, anyhow, bail};
use hurrycurry_protocol::{Gamedata, MapMetadata};
+use log::debug;
use serde::Deserialize;
use std::{
collections::{HashMap, HashSet},
@@ -70,6 +71,7 @@ impl DataIndex {
Ok(read_to_string(path)?)
}
pub fn generate(&self, map: &str) -> Result<(Gamedata, Serverdata)> {
+ debug!("Loading map {map}...");
let map_in: MapDecl = serde_yml::from_str(
&self
.read_map(map)
@@ -83,7 +85,9 @@ impl DataIndex {
)
.context("Failed to parse recipe file")?;
- build_data(&self.maps, map.to_string(), map_in, recipes_in)
+ let data = build_data(&self.maps, map.to_string(), map_in, recipes_in)?;
+ debug!("Done.");
+ Ok(data)
}
pub fn generate_with_book(&self, map: &str) -> Result<(Gamedata, Serverdata)> {
let (gd, mut sd) = self.generate(map)?;