From 7c6479a1fa931ec931f186e2e75c4c0dd45996c6 Mon Sep 17 00:00:00 2001 From: Joshua Barretto Date: Sun, 4 Aug 2019 10:09:51 +0100 Subject: [PATCH] More dungeons --- assets/world/structure/dungeon/ruins-2.vox | 3 +++ assets/world/structure/dungeon/ruins.vox | 4 ++-- world/src/column/mod.rs | 9 ++++++--- 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 assets/world/structure/dungeon/ruins-2.vox diff --git a/assets/world/structure/dungeon/ruins-2.vox b/assets/world/structure/dungeon/ruins-2.vox new file mode 100644 index 0000000000..76a857fdab --- /dev/null +++ b/assets/world/structure/dungeon/ruins-2.vox @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae50014e24991864db9ba049d5e509dee7c0e68c165bb24cb91225ffceb42a1c +size 762682 diff --git a/assets/world/structure/dungeon/ruins.vox b/assets/world/structure/dungeon/ruins.vox index c06fd4d539..a9a8158c26 100644 --- a/assets/world/structure/dungeon/ruins.vox +++ b/assets/world/structure/dungeon/ruins.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:df1e59df3b17fcb861dedf6bbd9363db72e55e695508e8b0997f9a05d3b42c63 -size 845603 +oid sha256:5b65e3e6b04b49adf14fadcb0f8757f1ef928a82f7f36a1d51d9b331060ae7dc +size 845947 diff --git a/world/src/column/mod.rs b/world/src/column/mod.rs index 443739b17d..b03e455d1a 100644 --- a/world/src/column/mod.rs +++ b/world/src/column/mod.rs @@ -2,7 +2,7 @@ use crate::{ all::ForestKind, block::StructureMeta, sim::{LocationInfo, SimChunk}, - util::{Sampler, UnitChooser}, + util::{RandomPerm, Sampler, UnitChooser}, World, CONFIG, }; use common::{ @@ -24,13 +24,16 @@ pub struct ColumnGen<'a> { } static UNIT_CHOOSER: UnitChooser = UnitChooser::new(0x700F4EC7); +static DUNGEON_RAND: RandomPerm = RandomPerm::new(0x42782335); lazy_static! { pub static ref DUNGEONS: Vec> = vec![ - // green oaks assets::load_map("world/structure/dungeon/ruins.vox", |s: Structure| s .with_center(Vec3::new(57, 58, 62))) .unwrap(), + assets::load_map("world/structure/dungeon/ruins-2.vox", |s: Structure| s + .with_center(Vec3::new(53, 57, 60))) + .unwrap(), ]; } @@ -68,7 +71,7 @@ impl<'a> ColumnGen<'a> { seed, meta: Some(StructureMeta::Volume { units: UNIT_CHOOSER.get(seed), - volume: &DUNGEONS[0], + volume: &DUNGEONS[DUNGEON_RAND.get(seed) as usize % DUNGEONS.len()], }), }) } else {