diff --git a/assets/world/structure/natural/ribcage-small.vox b/assets/world/structure/natural/ribcage-small.vox new file mode 100644 index 0000000000..5b888ae0db Binary files /dev/null and b/assets/world/structure/natural/ribcage-small.vox differ diff --git a/assets/world/structure/natural/skull-large.vox b/assets/world/structure/natural/skull-large.vox new file mode 100644 index 0000000000..3011d3083e Binary files /dev/null and b/assets/world/structure/natural/skull-large.vox differ diff --git a/world/src/block/mod.rs b/world/src/block/mod.rs index 0fb4ab3396..b76624c0da 100644 --- a/world/src/block/mod.rs +++ b/world/src/block/mod.rs @@ -366,7 +366,7 @@ pub struct ZCache<'a> { impl<'a> ZCache<'a> { pub fn get_z_limits(&self) -> (f32, f32) { let cave_depth = if self.sample.cave_xy.abs() > 0.9 { - (self.sample.alt - self.sample.cave_alt) + 8.0 + (self.sample.alt - self.sample.cave_alt + 8.0).max(0.0) } else { 0.0 }; diff --git a/world/src/block/natural.rs b/world/src/block/natural.rs index 563f21eca0..9003c21f89 100644 --- a/world/src/block/natural.rs +++ b/world/src/block/natural.rs @@ -3,6 +3,7 @@ use crate::{ all::ForestKind, column::{ColumnGen, ColumnSample}, util::{HashCache, RandomPerm, Sampler}, + CONFIG, }; use common::{assets, terrain::Structure}; use lazy_static::lazy_static; @@ -43,11 +44,15 @@ pub fn structure_gen<'a>( let st_pos3d = Vec3::new(st_pos.x, st_pos.y, wheight as i32); let volumes: &'static [_] = if QUIRKY_RAND.get(st_seed) % 64 == 17 { - &QUIRKY + if st_sample.temp > CONFIG.tropical_temp { + &QUIRKY_DRY + } else { + &QUIRKY + } } else { match st_sample.forest_kind { ForestKind::Palm => &PALMS, - ForestKind::Savannah => &PALMS, + ForestKind::Savannah => &ACACIAS, ForestKind::Oak if QUIRKY_RAND.get(st_seed) % 16 == 7 => &OAK_STUMPS, ForestKind::Oak => &OAKS, ForestKind::Pine => &PINES, @@ -356,6 +361,16 @@ lazy_static! { st_asset("world/tree/snow_pine/7.vox", (16, 15, 12)), st_asset("world/tree/snow_pine/8.vox", (12, 10, 12)), ]; + + pub static ref ACACIAS: Vec> = vec![ + // snow pines + st_asset("world/tree/acacia/1.vox", (16, 17, 1)), + st_asset("world/tree/acacia/2.vox", (5, 6, 1)), + st_asset("world/tree/acacia/3.vox", (5, 6, 1)), + st_asset("world/tree/acacia/4.vox", (15, 16, 1)), + st_asset("world/tree/acacia/5.vox", (19, 18, 1)), + ]; + /* // snow birches -> need roots! assets::load_map("world/tree/snow_birch/1.vox", |s: Structure| s @@ -408,4 +423,9 @@ lazy_static! { st_asset("world/structure/natural/tower-ruin.vox", (11, 14, 5)), st_asset("world/structure/natural/witch-hut.vox", (10, 13, 3)), ]; + + pub static ref QUIRKY_DRY: Vec> = vec![ + st_asset("world/structure/natural/ribcage-small.vox", (7, 13, 4)), + st_asset("world/structure/natural/skull-large.vox", (15, 20, 4)), + ]; } diff --git a/world/src/lib.rs b/world/src/lib.rs index 2f0d76323c..b3dd6071c7 100644 --- a/world/src/lib.rs +++ b/world/src/lib.rs @@ -92,7 +92,7 @@ impl World { let (min_z, max_z) = z_cache.get_z_limits(); - for z in base_z..(min_z as i32).max(base_z) { + for z in base_z..min_z as i32 { let _ = chunk.set(Vec3::new(x, y, z), stone); } diff --git a/world/src/sim/mod.rs b/world/src/sim/mod.rs index 5cb20482f9..e45be1a799 100644 --- a/world/src/sim/mod.rs +++ b/world/src/sim/mod.rs @@ -439,7 +439,7 @@ impl SimChunk { forest_kind: if temp > 0.0 { if temp > CONFIG.desert_temp { ForestKind::Palm - } else if temp > CONFIG.desert_temp { + } else if temp > CONFIG.tropical_temp { ForestKind::Savannah } else { ForestKind::Oak