mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
More dungeons
This commit is contained in:
parent
c7d2fbc20e
commit
7c6479a1fa
BIN
assets/world/structure/dungeon/ruins-2.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/structure/dungeon/ruins-2.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/structure/dungeon/ruins.vox
(Stored with Git LFS)
BIN
assets/world/structure/dungeon/ruins.vox
(Stored with Git LFS)
Binary file not shown.
@ -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<Arc<Structure>> = 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user