mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added acacia trees, desert bones, fixed minor worldgen issues
This commit is contained in:
parent
f823b0c992
commit
14ba09f96b
BIN
assets/world/structure/natural/ribcage-small.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/structure/natural/ribcage-small.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/world/structure/natural/skull-large.vox
(Stored with Git LFS)
Normal file
BIN
assets/world/structure/natural/skull-large.vox
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -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
|
||||
};
|
||||
|
@ -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<Arc<Structure>> = 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<Arc<Structure>> = vec![
|
||||
st_asset("world/structure/natural/ribcage-small.vox", (7, 13, 4)),
|
||||
st_asset("world/structure/natural/skull-large.vox", (15, 20, 4)),
|
||||
];
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user