mindustry logic execution, map- and schematic- parsing and rendering
add the blocks i missed
| -rw-r--r-- | mindus/Cargo.toml | 2 | ||||
| -rw-r--r-- | mindus/src/block/mod.rs | 5 | ||||
| -rw-r--r-- | mindus/src/block/simple.rs | 2 | ||||
| -rw-r--r-- | mindus/src/data/map.rs | 1 | ||||
| -rw-r--r-- | mindus/src/data/renderer.rs | 6 |
5 files changed, 11 insertions, 5 deletions
diff --git a/mindus/Cargo.toml b/mindus/Cargo.toml index 90a6517..2c208a0 100644 --- a/mindus/Cargo.toml +++ b/mindus/Cargo.toml @@ -31,7 +31,7 @@ fimg = { version = "0.4.56", features = [ "save", ], default-features = false } atools = "0.1.11" -either = "1.16.0" +either = "1.17.0" implicit-fn = "0.1.0" lower = "0.2.1" car = "0.1.4" diff --git a/mindus/src/block/mod.rs b/mindus/src/block/mod.rs index d70979f..b633873 100644 --- a/mindus/src/block/mod.rs +++ b/mindus/src/block/mod.rs @@ -642,7 +642,7 @@ macro_rules! make_register { }; } impl content::Type { - pub const FLOOR: [Self; 94] = { + pub const FLOOR: [Self; 96] = { let mut i = 0; let mut bl = [Self::OreCopper; _]; let mut oi = 0; @@ -709,6 +709,8 @@ make_register! { "shallow-water" > 1; "space" > 1; "stone" > 1; + "stone-vent" > 1; + "basalt-vent" > 1; "arkyic-vent" > 1; "beryllic-stone" > 1; "bluemat" > 1; @@ -882,6 +884,7 @@ make_register! { "heat-router" => HeatConduit::new(3, false, cost!(Tungsten: 15, Graphite: 10)); "slag-incinerator" -> BasicBlock::new(1, true, cost!(Tungsten: 15)); "carbide-crucible" -> ProductionBlock::new(3, true, cost!(Tungsten: 110, Thorium: 150, Oxide: 60)); + "slag-centrifuge" -> ProductionBlock::new(3, true, cost!()); // slag centrifuge "surge-crucible" -> ProductionBlock::new(3, true, cost!(Silicon: 100, Graphite: 80, Tungsten: 80, Oxide: 80)); "cyanogen-synthesizer" -> ProductionBlock::new(3, true, cost!(Carbide: 50, Silicon: 80, Beryllium: 90)); diff --git a/mindus/src/block/simple.rs b/mindus/src/block/simple.rs index 602f34d..057eb7c 100644 --- a/mindus/src/block/simple.rs +++ b/mindus/src/block/simple.rs @@ -124,7 +124,7 @@ pub(crate) use make_simple; pub type BuildCost = &'static [(item::Type, u32)]; macro_rules! cost { - ($($item:ident: $cnt:expr),+) => { + ($($item:ident: $cnt:expr),*) => { &[$((crate::item::Type::$item, $cnt)),*] }; } diff --git a/mindus/src/data/map.rs b/mindus/src/data/map.rs index 2fa8197..193149b 100644 --- a/mindus/src/data/map.rs +++ b/mindus/src/data/map.rs @@ -848,6 +848,7 @@ impl MapReader { } else { false }; + let block = r .get(block_id as usize) .ok_or(ReadError::NoSuchBlock(block_id))?; diff --git a/mindus/src/data/renderer.rs b/mindus/src/data/renderer.rs index 4b257c9..a698b30 100644 --- a/mindus/src/data/renderer.rs +++ b/mindus/src/data/renderer.rs @@ -564,13 +564,15 @@ fn all_blocks() { use crate::content::Content; for t in 19..Type::WorldMessage as u16 { let t = Type::try_from(t).unwrap(); - if matches!(t, |Type::Empty| Type::SlagCentrifuge - | Type::HeatReactor + if matches!(t, |Type::Empty| Type::HeatReactor | Type::LegacyMechPad | Type::LegacyUnitFactory | Type::LegacyUnitFactoryAir | Type::LegacyUnitFactoryGround | Type::CommandCenter) + || t.get_name().starts_with("metal-tiles") + || t.get_name().starts_with("rune") + || t.get_name().starts_with("character") { continue; } |