aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/data/Cargo.toml2
-rw-r--r--server/data/src/index.rs6
-rw-r--r--server/editor/Cargo.toml2
-rw-r--r--server/editor/src/save.rs4
4 files changed, 7 insertions, 7 deletions
diff --git a/server/data/Cargo.toml b/server/data/Cargo.toml
index 65064735..9233de18 100644
--- a/server/data/Cargo.toml
+++ b/server/data/Cargo.toml
@@ -11,7 +11,7 @@ serde_json = "1.0.145"
serde = { version = "1.0.225", features = ["derive"] }
shlex = "1.3.0"
clap = { version = "4.5.47", features = ["derive"] }
-serde_yml = "0.0.12"
+serde_yaml_ng = "0.10.0"
log = "0.4.28"
[features]
diff --git a/server/data/src/index.rs b/server/data/src/index.rs
index a74b283c..7eed1699 100644
--- a/server/data/src/index.rs
+++ b/server/data/src/index.rs
@@ -48,7 +48,7 @@ impl DataIndex {
}
pub fn reload(&mut self) -> Result<()> {
let path = self.path.clone();
- *self = serde_yml::from_reader(
+ *self = serde_yaml_ng::from_reader(
File::open(self.path.join("index.yaml")).context("Failed opening data index")?,
)?;
self.path = path;
@@ -72,13 +72,13 @@ impl DataIndex {
}
pub fn generate(&self, map: &str) -> Result<(Gamedata, Serverdata)> {
debug!("Loading map {map}...");
- let map_in: MapDecl = serde_yml::from_str(
+ let map_in: MapDecl = serde_yaml_ng::from_str(
&self
.read_map(map)
.context(anyhow!("Failed to read map file ({map})"))?,
)
.context(anyhow!("Failed to parse map file ({map})"))?;
- let recipes_in = serde_yml::from_str(
+ let recipes_in = serde_yaml_ng::from_str(
&self
.read_recipes(map_in.recipes.as_deref().unwrap_or("default"))
.context("Failed read recipe file")?,
diff --git a/server/editor/Cargo.toml b/server/editor/Cargo.toml
index 80b939fe..fb144215 100644
--- a/server/editor/Cargo.toml
+++ b/server/editor/Cargo.toml
@@ -17,7 +17,7 @@ rustls = { version = "0.23.31", features = ["ring"] }
clap = { version = "4.5.47", features = ["derive"] }
futures-util = "0.3.31"
shlex = "1.3.0"
-serde_yml = "0.0.12"
+serde_yaml_ng = "0.10.0"
hurrycurry-protocol = { path = "../protocol" }
hurrycurry-game-core = { path = "../game-core", features = ["sync-network"] }
diff --git a/server/editor/src/save.rs b/server/editor/src/save.rs
index c8ff350a..43a2fe93 100644
--- a/server/editor/src/save.rs
+++ b/server/editor/src/save.rs
@@ -72,11 +72,11 @@ pub fn export_state(state: &State) -> String {
customer_spawn: '!',
score_baseline: 200,
};
- serde_yml::to_string(&decl).unwrap()
+ serde_yaml_ng::to_string(&decl).unwrap()
}
pub fn import_state(state: &mut State, s: &str) -> Result<()> {
- let decl: MapDecl = serde_yml::from_str(s)?;
+ let decl: MapDecl = serde_yaml_ng::from_str(s)?;
let name_to_tile = HashMap::<_, _, RandomState>::from_iter(
TILES