Format fix

This commit is contained in:
Michal Sroczynski 2023-07-25 10:20:00 +02:00 committed by Isse
parent 28cf9bf19d
commit 50304ed54e

View File

@ -335,18 +335,12 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close( close(col.temp, CONFIG.tropical_temp + 0.1, 0.3).min(close(
col.temp, col.humidity,
CONFIG.tropical_temp + 0.1, CONFIG.jungle_hum,
0.3).min 0.4,
( )) * (col.tree_density * 1.25 - 0.25).powf(0.5).max(0.0)
close( * 0.15e-3,
col.humidity,
CONFIG.jungle_hum,
0.4,
)
)
* (col.tree_density * 1.25 - 0.25).powf(0.5).max(0.0) * 0.15e-3,
None, None,
) )
}, },
@ -357,10 +351,12 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close(col.temp, CONFIG.desert_temp, 0.25) close(col.temp, CONFIG.desert_temp, 0.25).min(close(
.min(close(col.humidity, CONFIG.desert_hum, 0.1)) col.humidity,
* MUSH_FACT CONFIG.desert_hum,
* 0.5, 0.1,
)) * MUSH_FACT
* 0.5,
None, None,
) )
}, },
@ -368,15 +364,14 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
ScatterConfig { ScatterConfig {
kind: Frostwood, kind: Frostwood,
water_mode: Ground, water_mode: Ground,
permit: |b| matches!(b, permit: |b| matches!(b, BlockKind::Snow | BlockKind::Ice),
BlockKind::Snow | BlockKind::Ice),
f: |_, col| { f: |_, col| {
( (
(col.tree_density * 1.25 - 0.25).powf(0.5).max(0.0) * 0.06e-3, (col.tree_density * 1.25 - 0.25).powf(0.5).max(0.0) * 0.06e-3,
None, None,
) )
}, },
}, },
ScatterConfig { ScatterConfig {
kind: Stones, kind: Stones,
water_mode: Ground, water_mode: Ground,
@ -606,8 +601,11 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close(col.temp, CONFIG.desert_temp, 0.25).min(close(col.humidity, CONFIG.desert_hum, 0.1)) close(col.temp, CONFIG.desert_temp, 0.25).min(close(
* MUSH_FACT col.humidity,
CONFIG.desert_hum,
0.1,
)) * MUSH_FACT
* 0.25, * 0.25,
None, None,
) )
@ -619,7 +617,12 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close(col.temp, CONFIG.desert_temp, 0.25).min(close(col.humidity, CONFIG.desert_hum, 0.1)) * MUSH_FACT * 1.5, close(col.temp, CONFIG.desert_temp, 0.25).min(close(
col.humidity,
CONFIG.desert_hum,
0.1,
)) * MUSH_FACT
* 1.5,
None, None,
) )
}, },
@ -630,7 +633,12 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close(col.temp, CONFIG.desert_temp, 0.25).min(close(col.humidity, CONFIG.desert_hum, 0.1)) * MUSH_FACT * 2.0, close(col.temp, CONFIG.desert_temp, 0.25).min(close(
col.humidity,
CONFIG.desert_hum,
0.1,
)) * MUSH_FACT
* 2.0,
None, None,
) )
}, },
@ -641,7 +649,12 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close(col.temp, CONFIG.desert_temp, 0.25).min(close(col.humidity, CONFIG.desert_hum, 0.1)) * MUSH_FACT * 1.5, close(col.temp, CONFIG.desert_temp, 0.25).min(close(
col.humidity,
CONFIG.desert_hum,
0.1,
)) * MUSH_FACT
* 1.5,
None, None,
) )
}, },
@ -652,7 +665,12 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close(col.temp, CONFIG.desert_temp, 0.25).min(close(col.humidity, CONFIG.desert_hum, 0.1)) * MUSH_FACT * 2.0, close(col.temp, CONFIG.desert_temp, 0.25).min(close(
col.humidity,
CONFIG.desert_hum,
0.1,
)) * MUSH_FACT
* 2.0,
None, None,
) )
}, },
@ -663,7 +681,12 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close(col.temp, CONFIG.desert_temp, 0.25).min(close(col.humidity, CONFIG.desert_hum, 0.1)) * MUSH_FACT * 2.0, close(col.temp, CONFIG.desert_temp, 0.25).min(close(
col.humidity,
CONFIG.desert_hum,
0.1,
)) * MUSH_FACT
* 2.0,
None, None,
) )
}, },
@ -674,7 +697,12 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close(col.temp, CONFIG.desert_temp, 0.25).min(close(col.humidity, CONFIG.desert_hum, 0.1)) * MUSH_FACT * 2.0, close(col.temp, CONFIG.desert_temp, 0.25).min(close(
col.humidity,
CONFIG.desert_hum,
0.1,
)) * MUSH_FACT
* 2.0,
None, None,
) )
}, },
@ -685,11 +713,16 @@ pub fn apply_scatter_to(canvas: &mut Canvas, _rng: &mut impl Rng, calendar: Opti
permit: |b| matches!(b, BlockKind::Grass), permit: |b| matches!(b, BlockKind::Grass),
f: |_, col| { f: |_, col| {
( (
close(col.temp, CONFIG.desert_temp, 0.25).min(close(col.humidity, CONFIG.desert_hum, 0.1)) * MUSH_FACT * 2.0, close(col.temp, CONFIG.desert_temp, 0.25).min(close(
col.humidity,
CONFIG.desert_hum,
0.1,
)) * MUSH_FACT
* 2.0,
None, None,
) )
}, },
}, },
// Underwater chests // Underwater chests
ScatterConfig { ScatterConfig {
kind: ChestBuried, kind: ChestBuried,