mindustry logic execution, map- and schematic- parsing and rendering
bendn 4 months ago
parent befad19 · commit dfe973e
-rw-r--r--mindus/Cargo.toml2
-rw-r--r--mindus/src/data/map.rs6
2 files changed, 5 insertions, 3 deletions
diff --git a/mindus/Cargo.toml b/mindus/Cargo.toml
index 67c80d0..6a97fa0 100644
--- a/mindus/Cargo.toml
+++ b/mindus/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mindus"
-version = "5.0.38"
+version = "5.0.39"
edition = "2024"
description = "A library for working with mindustry data formats (eg schematics and maps) (fork of plandustry)"
authors = [
diff --git a/mindus/src/data/map.rs b/mindus/src/data/map.rs
index df44601..7dbafa8 100644
--- a/mindus/src/data/map.rs
+++ b/mindus/src/data/map.rs
@@ -618,7 +618,7 @@ impl MapReader {
pub fn version(&mut self) -> Result<u32, ReadError> {
let x = self.buff.read_u32()?;
- (7..=10)
+ (7..=11)
.contains(&x)
.then_some(x)
.ok_or(ReadError::Version(x.try_into().unwrap_or(0)))
@@ -998,7 +998,9 @@ impl Serializable for Map {
buff.version = buff.version()?;
let tags = buff.tags_alloc()?;
let r = buff.content()?;
-
+ if buff.version >= 11 {
+ buff.skip()?;
+ }
let mut m = buff.collect_map(tags, r)?;
m.entities = buff.collect_entities()?;
if buff.version == 8 {