add mushrooms, temporary disable snowy grass

This commit is contained in:
Monty Marz 2020-08-13 03:56:02 +02:00
parent 0bd0de613b
commit 54cba3e7f9
3 changed files with 13 additions and 6 deletions

View File

@ -5,7 +5,7 @@ Item(
(
kind: Neck("Neck0"),
stats: (
protection: Normal(0.0),
protection: Normal(0.5),
),
)
),

View File

@ -5,7 +5,7 @@ Item(
(
kind: Neck("Neck1"),
stats: (
protection: Normal(0.5),
protection: Normal(1.0),
),
)
),

View File

@ -39,6 +39,7 @@ pub fn apply_scatter_to<'a>(
) {
use BlockKind::*;
#[allow(clippy::type_complexity)]
// TODO: Add back all sprites we had before
let scatter: &[(_, bool, fn(&SimChunk) -> (f32, Option<(f32, f32)>))] = &[
// (density, Option<(wavelen, threshold)>)
(BlueFlower, false, |c| {
@ -60,10 +61,10 @@ pub fn apply_scatter_to<'a>(
)
}),
(Twigs, false, |c| {
((c.tree_density - 0.5).max(0.0) * 0.0025, None)
((c.tree_density - 0.5).max(0.0) * 0.001, None)
}),
(Stones, false, |c| {
((c.rockiness - 0.5).max(0.0) * 0.005, None)
((c.rockiness - 0.5).max(0.0) * 0.0008, None)
}),
(ShortGrass, false, |c| {
(
@ -71,6 +72,12 @@ pub fn apply_scatter_to<'a>(
Some((48.0, 0.4)),
)
}),
(Mushroom, false, |c| {
(
close(c.temp, 0.3, 0.4).min(close(c.humidity, 0.6, 0.35)) * 0.04,
None,
)
}),
(MediumGrass, false, |c| {
(
close(c.temp, 0.0, 0.6).min(close(c.humidity, 0.6, 0.35)) * 0.05,
@ -83,12 +90,12 @@ pub fn apply_scatter_to<'a>(
Some((48.0, 0.1)),
)
}),
(GrassSnow, false, |c| {
/*(GrassSnow, false, |c| {
(
close(c.temp, -0.4, 0.4).min(close(c.rockiness, 0.0, 0.5)) * 0.1,
Some((48.0, 0.6)),
)
}),
}),*/
];
for y in 0..vol.size_xy().y as i32 {