Better grass colours, made flora more common

This commit is contained in:
Joshua Barretto 2019-10-07 08:49:02 +01:00
parent 1a9408c397
commit 6fc6864e7c
2 changed files with 11 additions and 8 deletions

View File

@ -166,7 +166,7 @@ impl<'a> BlockGen<'a> {
cliff_hill,
close_cliffs,
temp,
humidity,
chunk,
..
} = sample;
@ -265,9 +265,10 @@ impl<'a> BlockGen<'a> {
} else if (wposf.z as f32) < height + 0.9
&& temp < CONFIG.desert_temp
&& (wposf.z as f32 > water_height + 3.0)
&& marble > 0.68
&& marble_small > 0.65
&& (marble * 3173.7).fract() < 0.5
&& marble > 0.6
&& marble_small > 0.55
&& (marble * 3173.7).fract() < 0.6
&& humidity > 0.4
{
let flowers = [
BlockKind::BlueFlower,
@ -287,10 +288,10 @@ impl<'a> BlockGen<'a> {
];
Some(Block::new(
if (height * 1271.0).fract() < 0.15 {
if (height * 1271.0).fract() < 0.1 {
flowers[(height * 0.2) as usize % flowers.len()]
} else {
grasses[(height * 0.3) as usize % grasses.len()]
grasses[(height * 103.3) as usize % grasses.len()]
},
Rgb::broadcast(0),
))

View File

@ -221,8 +221,8 @@ impl<'a> Sampler<'a> for ColumnGen<'a> {
// Colours
let cold_grass = Rgb::new(0.0, 0.5, 0.25);
let warm_grass = Rgb::new(0.03, 0.8, 0.0);
let dark_grass = Rgb::new(0.01, 0.3, 0.0);
let warm_grass = Rgb::new(0.4, 0.8, 0.0);
let dark_grass = Rgb::new(0.15, 0.4, 0.1);
let wet_grass = Rgb::new(0.1, 0.8, 0.2);
let cold_stone = Rgb::new(0.57, 0.67, 0.8);
let warm_stone = Rgb::new(0.77, 0.77, 0.64);
@ -513,6 +513,7 @@ impl<'a> Sampler<'a> for ColumnGen<'a> {
cliff_hill,
close_cliffs: sim.gen_ctx.cliff_gen.get(wpos),
temp,
humidity,
spawn_rate,
location: sim_chunk.location.as_ref(),
@ -548,6 +549,7 @@ pub struct ColumnSample<'a> {
pub cliff_hill: f32,
pub close_cliffs: [(Vec2<i32>, u32); 9],
pub temp: f32,
pub humidity: f32,
pub spawn_rate: f32,
pub location: Option<&'a LocationInfo>,