diff --git a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-1.vox b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-1.vox index a70df5a88b..1f48e8b0ed 100644 --- a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-1.vox +++ b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9e4dff3380b7c49247dfdb40333fbd568579b7b4a0bd8fb7e6a9e58729ca9ce8 -size 1664 +oid sha256:5ab734220939a43c468d2017e6b5d14d40c66d091d020260ea227d1ba664dd4b +size 1580 diff --git a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-2.vox b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-2.vox index 38f971c435..aff382b018 100644 --- a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-2.vox +++ b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-2.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:545c462fc7e8b8c90f74bd9db172642a3eb991bffd69e26f9a1c20fdb6db754f +oid sha256:d07fcadaf9931c6b257f2a3f9c518e494733a74ff4ef87d3089c68ce2c6d68fb size 1596 diff --git a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-3.vox b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-3.vox index 74587b12be..0787886d89 100644 --- a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-3.vox +++ b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-3.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aa8526bf720f05a2500e9c9b2fd766c879943df7dace2510f5907ea769cbf72f -size 1528 +oid sha256:8ca30a6226d3e8fd31da1b722b4d797d034f849e7dad9fa4d4b657ea0b6ad445 +size 1468 diff --git a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-4.vox b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-4.vox index 4271cf8dd8..cc4e3f2d5f 100644 --- a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-4.vox +++ b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-4.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fd34f95f95afa6fa174f48c87f7b8f5d716513c5cce01249cf0d3e526d643489 -size 1724 +oid sha256:c47a6a059955a4f881ea218c01d8025ccfb159681ec886e40154cbdeb08f29c4 +size 1720 diff --git a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-5.vox b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-5.vox index 41a075dc3e..afd4cb94ea 100644 --- a/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-5.vox +++ b/assets/voxygen/voxel/sprite/lillypads/temperate-reeds-5.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb26c34e910b65024bc08c0433b50256d01fd2fc6ef62b97a13d79a88dd5601d -size 1708 +oid sha256:d1118bbddff4aff352db8013e5418598fa3d5e5ae5813ef3cd2f9c3ac8a3aaea +size 1676 diff --git a/assets/voxygen/voxel/sprite/reed/reed-0.vox b/assets/voxygen/voxel/sprite/reed/reed-0.vox index 66808b22ff..05988dcb6e 100644 --- a/assets/voxygen/voxel/sprite/reed/reed-0.vox +++ b/assets/voxygen/voxel/sprite/reed/reed-0.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6a2539edce18e496ee022b48fd7ae006a88a000085fe47d8725d14ff72807b26 -size 1456 +oid sha256:10628fc94edc0171fa6d85f4264026d994b7b0302d077bd68100036cd6dc8c6f +size 1508 diff --git a/assets/voxygen/voxel/sprite/reed/reed-1.vox b/assets/voxygen/voxel/sprite/reed/reed-1.vox index d5772761b4..6b8f6856e0 100644 --- a/assets/voxygen/voxel/sprite/reed/reed-1.vox +++ b/assets/voxygen/voxel/sprite/reed/reed-1.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a057889e4388350c3a740ead684ee1cdbdb7613d38c34a2c3508347f976a9a66 -size 1376 +oid sha256:1e2fa2d4df279ee130c10d3be4b5518ea8d1bd1aa435325bcedfde3d4ee512ee +size 1432 diff --git a/assets/voxygen/voxel/sprite/reed/reed-2.vox b/assets/voxygen/voxel/sprite/reed/reed-2.vox index d796c519c1..d91058ef34 100644 --- a/assets/voxygen/voxel/sprite/reed/reed-2.vox +++ b/assets/voxygen/voxel/sprite/reed/reed-2.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5053d2208c25b3e350be330e428f03a4044af7ca6a6d0e14a6631fd7fee206ce -size 1512 +oid sha256:844709d06bd61854af3cb5e5321df2017fd70c5c18e050221ee509a8571da34d +size 1516 diff --git a/assets/voxygen/voxel/sprite/reed/reed-3.vox b/assets/voxygen/voxel/sprite/reed/reed-3.vox index 8fe3592b6d..55a985d52b 100644 --- a/assets/voxygen/voxel/sprite/reed/reed-3.vox +++ b/assets/voxygen/voxel/sprite/reed/reed-3.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f550f8025f5bd2640bece71fe591d9e86d4000a864673c4a7b1813879c4d9a4c -size 1456 +oid sha256:34661f4c88d67bcf9a6ba51ef952713198a216f527ac86f1a920da7cd6e4f3d4 +size 1516 diff --git a/assets/voxygen/voxel/sprite/reed/reed-4.vox b/assets/voxygen/voxel/sprite/reed/reed-4.vox index d55468ae62..2e136605f3 100644 --- a/assets/voxygen/voxel/sprite/reed/reed-4.vox +++ b/assets/voxygen/voxel/sprite/reed/reed-4.vox @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edd9796cafd53ca57cc5afdfedf4d3d30d3a4697057b37491080fed64d8cae9a -size 1644 +oid sha256:cd12300402fcbd987761627d0251dde0df0e79a53c89f3fc2f4797ad4f7f8f08 +size 1700 diff --git a/world/src/layer/scatter.rs b/world/src/layer/scatter.rs index 027e025b13..e346c53a39 100644 --- a/world/src/layer/scatter.rs +++ b/world/src/layer/scatter.rs @@ -16,7 +16,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { enum WaterMode { Underwater, Floating, - Surface, + Ground, } use WaterMode::*; @@ -30,7 +30,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { )] = &[ // (density, Option<(base_density_proportion, wavelen, threshold)>) // Flowers - (BlueFlower, Surface, |_, col| { + (BlueFlower, Ground, |_, col| { ( close(col.temp, CONFIG.temperate_temp, 0.7).min(close( col.humidity, @@ -42,7 +42,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 256.0, 0.25)), ) }), - (PinkFlower, Surface, |_, col| { + (PinkFlower, Ground, |_, col| { ( close(col.temp, 0.0, 0.7).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * col.tree_density @@ -51,7 +51,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 100.0, 0.1)), ) }), - (PurpleFlower, Surface, |_, col| { + (PurpleFlower, Ground, |_, col| { ( close(col.temp, CONFIG.temperate_temp, 0.7).min(close( col.humidity, @@ -63,7 +63,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 100.0, 0.1)), ) }), - (RedFlower, Surface, |_, col| { + (RedFlower, Ground, |_, col| { ( close(col.temp, CONFIG.tropical_temp, 0.7).min(close( col.humidity, @@ -75,7 +75,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 100.0, 0.1)), ) }), - (WhiteFlower, Surface, |_, col| { + (WhiteFlower, Ground, |_, col| { ( close(col.temp, 0.0, 0.7).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * col.tree_density @@ -84,7 +84,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 100.0, 0.1)), ) }), - (YellowFlower, Surface, |_, col| { + (YellowFlower, Ground, |_, col| { ( close(col.temp, 0.0, 0.7).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * col.tree_density @@ -93,7 +93,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 100.0, 0.1)), ) }), - (Cotton, Surface, |_, col| { + (Cotton, Ground, |_, col| { ( close(col.temp, CONFIG.temperate_temp, 0.7).min(close( col.humidity, @@ -105,7 +105,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 256.0, 0.25)), ) }), - (Sunflower, Surface, |_, col| { + (Sunflower, Ground, |_, col| { ( close(col.temp, 0.0, 0.7).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * col.tree_density @@ -114,7 +114,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 100.0, 0.15)), ) }), - (WildFlax, Surface, |_, col| { + (WildFlax, Ground, |_, col| { ( close(col.temp, 0.0, 0.7).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * col.tree_density @@ -124,7 +124,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { ) }), // Herbs and Spices - (LingonBerry, Surface, |_, col| { + (LingonBerry, Ground, |_, col| { ( close(col.temp, 0.3, 0.4).min(close(col.humidity, CONFIG.jungle_hum, 0.5)) * MUSH_FACT @@ -132,7 +132,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { None, ) }), - (LeafyPlant, Surface, |_, col| { + (LeafyPlant, Ground, |_, col| { ( close(col.temp, 0.3, 0.4).min(close(col.humidity, CONFIG.jungle_hum, 0.3)) * GRASS_FACT @@ -140,7 +140,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { None, ) }), - (JungleLeafyPlant, Surface, |_, col| { + (JungleLeafyPlant, Ground, |_, col| { ( close(col.temp, 0.3, 0.4).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * GRASS_FACT @@ -148,7 +148,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.15, 64.0, 0.2)), ) }), - (Fern, Surface, |_, col| { + (Fern, Ground, |_, col| { ( close(col.temp, 0.3, 0.4).min(close(col.humidity, CONFIG.forest_hum, 0.5)) * GRASS_FACT @@ -156,7 +156,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 64.0, 0.2)), ) }), - (JungleFern, Surface, |_, col| { + (JungleFern, Ground, |_, col| { ( close(col.temp, 0.3, 0.4).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * col.tree_density @@ -165,7 +165,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 84.0, 0.35)), ) }), - (Blueberry, Surface, |_, col| { + (Blueberry, Ground, |_, col| { ( close(col.temp, CONFIG.temperate_temp, 0.5).min(close( col.humidity, @@ -176,7 +176,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { None, ) }), - (Pumpkin, Surface, |_, col| { + (Pumpkin, Ground, |_, col| { ( close(col.temp, CONFIG.temperate_temp, 0.5).min(close( col.humidity, @@ -189,23 +189,23 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { }), // Collectable Objects // Only spawn twigs in temperate forests - (Twigs, Surface, |_, col| { + (Twigs, Ground, |_, col| { ( (col.tree_density * 1.25 - 0.25).powf(0.5).max(0.0) * 0.75e-3, None, ) }), - (Stones, Surface, |chunk, _| { + (Stones, Ground, |chunk, _| { ((chunk.rockiness - 0.5).max(0.025) * 1.0e-3, None) }), - (Copper, Surface, |chunk, _| { + (Copper, Ground, |chunk, _| { ((chunk.rockiness - 0.5).max(0.0) * 1.5e-3, None) }), - (Tin, Surface, |chunk, _| { + (Tin, Ground, |chunk, _| { ((chunk.rockiness - 0.5).max(0.0) * 1.5e-3, None) }), // Don't spawn Mushrooms in snowy regions - (Mushroom, Surface, |_, col| { + (Mushroom, Ground, |_, col| { ( close(col.temp, 0.3, 0.4).min(close(col.humidity, CONFIG.forest_hum, 0.35)) * MUSH_FACT, @@ -213,7 +213,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { ) }), // Grass - (ShortGrass, Surface, |_, col| { + (ShortGrass, Ground, |_, col| { ( close(col.temp, 0.2, 0.75).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * GRASS_FACT @@ -221,7 +221,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.3, 64.0, 0.3)), ) }), - (MediumGrass, Surface, |_, col| { + (MediumGrass, Ground, |_, col| { ( close(col.temp, 0.2, 0.6).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * GRASS_FACT @@ -229,7 +229,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.3, 64.0, 0.3)), ) }), - (LongGrass, Surface, |_, col| { + (LongGrass, Ground, |_, col| { ( close(col.temp, 0.3, 0.35).min(close(col.humidity, CONFIG.jungle_hum, 0.3)) * GRASS_FACT @@ -237,7 +237,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.1, 48.0, 0.3)), ) }), - (JungleRedGrass, Surface, |_, col| { + (JungleRedGrass, Ground, |_, col| { ( close(col.temp, 0.3, 0.4).min(close(col.humidity, CONFIG.jungle_hum, 0.4)) * col.tree_density @@ -247,7 +247,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { ) }), // Jungle Sprites - // (LongGrass, Surface, |c, col| { + // (LongGrass, Ground, |c, col| { // ( // close(col.temp, CONFIG.tropical_temp, 0.4).min(close( // col.humidity, @@ -257,7 +257,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { // Some((0.0, 60.0, 5.0)), // ) // }), - /*(WheatGreen, Surface, |c, col| { + /*(WheatGreen, Ground, |c, col| { ( close(col.temp, 0.4, 0.2).min(close(col.humidity, CONFIG.forest_hum, 0.1)) * MUSH_FACT @@ -265,7 +265,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { None, ) }),*/ - (GrassSnow, Surface, |_, col| { + (GrassSnow, Ground, |_, col| { ( close(col.temp, CONFIG.snow_temp - 0.2, 0.4).min(close( col.humidity, @@ -276,7 +276,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.0, 48.0, 0.2)), ) }), - (Moonbell, Surface, |_, col| { + (Moonbell, Ground, |_, col| { ( close(col.temp, CONFIG.snow_temp - 0.2, 0.4).min(close( col.humidity, @@ -287,7 +287,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { ) }), // Savanna Plants - (SavannaGrass, Surface, |_, col| { + (SavannaGrass, Ground, |_, col| { ( { let savanna = close(col.temp, 1.0, 0.4) * close(col.humidity, 0.2, 0.25); @@ -297,7 +297,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.15, 64.0, 0.2)), ) }), - (TallSavannaGrass, Surface, |_, col| { + (TallSavannaGrass, Ground, |_, col| { ( { let savanna = close(col.temp, 1.0, 0.4) * close(col.humidity, 0.2, 0.25); @@ -307,7 +307,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.1, 48.0, 0.2)), ) }), - (RedSavannaGrass, Surface, |_, col| { + (RedSavannaGrass, Ground, |_, col| { ( { let savanna = close(col.temp, 1.0, 0.4) * close(col.humidity, 0.2, 0.25); @@ -317,7 +317,7 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { Some((0.15, 48.0, 0.25)), ) }), - (SavannaBush, Surface, |_, col| { + (SavannaBush, Ground, |_, col| { ( { let savanna = close(col.temp, 1.0, 0.4) * close(col.humidity, 0.2, 0.25); @@ -328,43 +328,43 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { ) }), // Desert Plants - (DeadBush, Surface, |_, col| { + (DeadBush, Ground, |_, col| { ( close(col.temp, 1.0, 0.95).min(close(col.humidity, 0.0, 0.3)) * MUSH_FACT * 7.5, None, ) }), - (Pyrebloom, Surface, |_, col| { + (Pyrebloom, Ground, |_, col| { ( close(col.temp, 1.0, 0.95).min(close(col.humidity, 0.0, 0.3)) * MUSH_FACT * 0.35, None, ) }), - (LargeCactus, Surface, |_, col| { + (LargeCactus, Ground, |_, col| { ( close(col.temp, 1.0, 0.25).min(close(col.humidity, 0.0, 0.1)) * MUSH_FACT * 1.5, None, ) }), - (RoundCactus, Surface, |_, col| { + (RoundCactus, Ground, |_, col| { ( close(col.temp, 1.0, 0.25).min(close(col.humidity, 0.0, 0.1)) * MUSH_FACT * 2.5, None, ) }), - (ShortCactus, Surface, |_, col| { + (ShortCactus, Ground, |_, col| { ( close(col.temp, 1.0, 0.25).min(close(col.humidity, 0.0, 0.1)) * MUSH_FACT * 2.5, None, ) }), - (MedFlatCactus, Surface, |_, col| { + (MedFlatCactus, Ground, |_, col| { ( close(col.temp, 1.0, 0.25).min(close(col.humidity, 0.0, 0.1)) * MUSH_FACT * 2.5, None, ) }), - (ShortFlatCactus, Surface, |_, col| { + (ShortFlatCactus, Ground, |_, col| { ( close(col.temp, 1.0, 0.25).min(close(col.humidity, 0.0, 0.1)) * MUSH_FACT * 2.5, None, @@ -630,7 +630,9 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { * GRASS_FACT * 100.0 * ((col.alt - CONFIG.sea_level) / 12.0).clamped(0.0, 1.0) - * col.water_dist.map_or(0.0, |d| 1.0 / (1.0 + (d.abs() * 0.4).powi(2))), + * col + .water_dist + .map_or(0.0, |d| 1.0 / (1.0 + (d.abs() * 0.4).powi(2))), Some((0.0, 128.0, 0.35)), ) }), @@ -640,11 +642,13 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { * GRASS_FACT * 100.0 * ((col.alt - CONFIG.sea_level) / 12.0).clamped(0.0, 1.0) - * col.water_dist.map_or(0.0, |d| 1.0 / (1.0 + (d.abs() * 0.40).powi(2))), + * col + .water_dist + .map_or(0.0, |d| 1.0 / (1.0 + (d.abs() * 0.40).powi(2))), Some((0.2, 128.0, 0.5)), ) }), - (Reed, Surface, |_, col| { + (Reed, Ground, |_, col| { ( close(col.humidity, CONFIG.jungle_hum, 0.9) * col @@ -697,20 +701,18 @@ pub fn apply_scatter_to(canvas: &mut Canvas, rng: &mut impl Rng) { if let Some((kind, water_mode)) = kind { let (alt, is_under): (_, fn(Block) -> bool) = match water_mode { - Surface | Underwater => (col.alt as i32, |block| block.is_solid()), + Ground | Underwater => (col.alt as i32, |block| block.is_solid()), Floating => (col.water_level as i32, |block| !block.is_air()), }; // Find the intersection between ground and air, if there is one near the - // surface + // Ground if let Some(solid_end) = (-4..8) - .find(|z| { - is_under(canvas.get(Vec3::new(wpos2d.x, wpos2d.y, alt + z))) - }) + .find(|z| is_under(canvas.get(Vec3::new(wpos2d.x, wpos2d.y, alt + z)))) .and_then(|solid_start| { - (1..8).map(|z| solid_start + z).find(|z| { - !is_under(canvas.get(Vec3::new(wpos2d.x, wpos2d.y, alt + z))) - }) + (1..8) + .map(|z| solid_start + z) + .find(|z| !is_under(canvas.get(Vec3::new(wpos2d.x, wpos2d.y, alt + z)))) }) { canvas.map(Vec3::new(wpos2d.x, wpos2d.y, alt + solid_end), |block| {