diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index 046389d750..09c9914221 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -321,9 +321,17 @@ impl ParticleMgr { |_| true, ), ( - |boi| &boi.grass, + |boi| &boi.reeds, + 3, + 0.01, + 40.0, + ParticleMode::Firefly, + |sd| sd.state.get_day_period().is_dark(), + ), + ( + |boi| &boi.flowers, 5, - 0.001, + 0.005, 40.0, ParticleMode::Firefly, |sd| sd.state.get_day_period().is_dark(), diff --git a/voxygen/src/scene/terrain/watcher.rs b/voxygen/src/scene/terrain/watcher.rs index 4fe40c0ede..016a847b62 100644 --- a/voxygen/src/scene/terrain/watcher.rs +++ b/voxygen/src/scene/terrain/watcher.rs @@ -10,6 +10,8 @@ pub struct BlocksOfInterest { pub grass: Vec>, pub embers: Vec>, pub beehives: Vec>, + pub reeds: Vec>, + pub flowers: Vec>, } impl BlocksOfInterest { @@ -18,6 +20,8 @@ impl BlocksOfInterest { let mut grass = Vec::new(); let mut embers = Vec::new(); let mut beehives = Vec::new(); + let mut reeds = Vec::new(); + let mut flowers = Vec::new(); chunk .vol_iter( @@ -28,16 +32,27 @@ impl BlocksOfInterest { chunk.get_max_z(), ), ) - .for_each(|(pos, block)| { - if block.kind() == BlockKind::Leaves && thread_rng().gen_range(0, 16) == 0 { - leaves.push(pos); - } else if block.kind() == BlockKind::Grass && thread_rng().gen_range(0, 16) == 0 { - grass.push(pos); - } else if block.kind() == BlockKind::Ember { - embers.push(pos); - } else if block.kind() == BlockKind::Beehive { - beehives.push(pos); - } + .for_each(|(pos, block)| match block.kind() { + BlockKind::Leaves => { + if thread_rng().gen_range(0, 16) == 0 { + leaves.push(pos) + } + }, + BlockKind::Grass => { + if thread_rng().gen_range(0, 16) == 0 { + grass.push(pos) + } + }, + BlockKind::Ember => embers.push(pos), + BlockKind::Beehive => beehives.push(pos), + BlockKind::Reed => reeds.push(pos), + BlockKind::PinkFlower => flowers.push(pos), + BlockKind::PurpleFlower => flowers.push(pos), + BlockKind::RedFlower => flowers.push(pos), + BlockKind::WhiteFlower => flowers.push(pos), + BlockKind::YellowFlower => flowers.push(pos), + BlockKind::Sunflower => flowers.push(pos), + _ => {}, }); Self { @@ -45,6 +60,8 @@ impl BlocksOfInterest { grass, embers, beehives, + reeds, + flowers, } } } diff --git a/world/src/layer/mod.rs b/world/src/layer/mod.rs index d1bdaf6bab..b0477e6c0d 100644 --- a/world/src/layer/mod.rs +++ b/world/src/layer/mod.rs @@ -69,6 +69,15 @@ pub fn apply_scatter_to<'a>( Some((64.0, 0.2)), ) }), + (Sunflower, false, |c, col| { + ( + close(c.temp, 0.0, 0.7).min(close(c.humidity, CONFIG.jungle_hum, 0.4)) + * col.tree_density + * MUSH_FACT + * 350.0, + Some((1024.0, 0.15)), + ) + }), (PurpleFlower, false, |c, col| { ( close(c.temp, CONFIG.temperate_temp, 0.7).min(close(