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,
|
all::ForestKind,
|
||||||
block::StructureMeta,
|
block::StructureMeta,
|
||||||
sim::{LocationInfo, SimChunk},
|
sim::{LocationInfo, SimChunk},
|
||||||
util::{Sampler, UnitChooser},
|
util::{RandomPerm, Sampler, UnitChooser},
|
||||||
World, CONFIG,
|
World, CONFIG,
|
||||||
};
|
};
|
||||||
use common::{
|
use common::{
|
||||||
@ -24,13 +24,16 @@ pub struct ColumnGen<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static UNIT_CHOOSER: UnitChooser = UnitChooser::new(0x700F4EC7);
|
static UNIT_CHOOSER: UnitChooser = UnitChooser::new(0x700F4EC7);
|
||||||
|
static DUNGEON_RAND: RandomPerm = RandomPerm::new(0x42782335);
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
pub static ref DUNGEONS: Vec<Arc<Structure>> = vec![
|
pub static ref DUNGEONS: Vec<Arc<Structure>> = vec![
|
||||||
// green oaks
|
|
||||||
assets::load_map("world/structure/dungeon/ruins.vox", |s: Structure| s
|
assets::load_map("world/structure/dungeon/ruins.vox", |s: Structure| s
|
||||||
.with_center(Vec3::new(57, 58, 62)))
|
.with_center(Vec3::new(57, 58, 62)))
|
||||||
.unwrap(),
|
.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,
|
seed,
|
||||||
meta: Some(StructureMeta::Volume {
|
meta: Some(StructureMeta::Volume {
|
||||||
units: UNIT_CHOOSER.get(seed),
|
units: UNIT_CHOOSER.get(seed),
|
||||||
volume: &DUNGEONS[0],
|
volume: &DUNGEONS[DUNGEON_RAND.get(seed) as usize % DUNGEONS.len()],
|
||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user