mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
setup
This commit is contained in:
parent
8babe65353
commit
cf425a09c8
@ -129,6 +129,18 @@
|
||||
threshold: 5.0,
|
||||
subtitle: "subtitle-running_water",
|
||||
),
|
||||
Lavapool: (
|
||||
files: [
|
||||
"voxygen.audio.sfx.ambient.river_sounds.running_water-003",
|
||||
"voxygen.audio.sfx.ambient.river_sounds.running_water-004",
|
||||
"voxygen.audio.sfx.ambient.river_sounds.running_water-005",
|
||||
"voxygen.audio.sfx.ambient.river_sounds.running_water-006",
|
||||
"voxygen.audio.sfx.ambient.river_sounds.running_water-012",
|
||||
"voxygen.audio.sfx.ambient.river_sounds.running_water-013",
|
||||
],
|
||||
threshold: 7.0,
|
||||
subtitle: "subtitle-lavapool",
|
||||
),
|
||||
//
|
||||
// Character States
|
||||
//
|
||||
|
@ -109,6 +109,13 @@ impl EventMapper for BlockEventMapper {
|
||||
volume: 1.5,
|
||||
cond: |_| true,
|
||||
},
|
||||
BlockSounds {
|
||||
blocks: |boi| &boi.lavapool,
|
||||
range: 1,
|
||||
sfx: SfxEvent::Lavapool,
|
||||
volume: 1.5,
|
||||
cond: |_| true,
|
||||
},
|
||||
//BlockSounds {
|
||||
// blocks: |boi| &boi.embers,
|
||||
// range: 1,
|
||||
@ -194,7 +201,7 @@ impl EventMapper for BlockEventMapper {
|
||||
|
||||
// Replace all RunningWater blocks with just one random one per tick
|
||||
let blocks = if sounds.sfx == SfxEvent::RunningWaterSlow
|
||||
|| sounds.sfx == SfxEvent::RunningWaterFast
|
||||
|| sounds.sfx == SfxEvent::RunningWaterFast || sounds.sfx == SfxEvent::Lavapool
|
||||
{
|
||||
blocks
|
||||
.choose(&mut thread_rng())
|
||||
|
@ -133,6 +133,7 @@ pub enum SfxEvent {
|
||||
Bees,
|
||||
RunningWaterSlow,
|
||||
RunningWaterFast,
|
||||
Lavapool,
|
||||
Idle,
|
||||
Swim,
|
||||
Run(BlockKind),
|
||||
|
@ -39,6 +39,7 @@ pub struct BlocksOfInterest {
|
||||
pub grass: Vec<Vec3<i32>>,
|
||||
pub slow_river: Vec<Vec3<i32>>,
|
||||
pub fast_river: Vec<Vec3<i32>>,
|
||||
pub lavapool: Vec<Vec3<i32>>,
|
||||
pub fires: Vec<Vec3<i32>>,
|
||||
pub smokers: Vec<SmokerProperties>,
|
||||
pub beehives: Vec<Vec3<i32>>,
|
||||
@ -76,6 +77,7 @@ impl BlocksOfInterest {
|
||||
let mut grass = Vec::new();
|
||||
let mut slow_river = Vec::new();
|
||||
let mut fast_river = Vec::new();
|
||||
let mut lavapool = Vec::new();
|
||||
let mut fires = Vec::new();
|
||||
let mut smokers = Vec::new();
|
||||
let mut beehives = Vec::new();
|
||||
@ -131,6 +133,7 @@ impl BlocksOfInterest {
|
||||
{
|
||||
fires.push(pos + Vec3::unit_z())
|
||||
},
|
||||
BlockKind::Lava if rng.gen_range(0..8) == 0 => lavapool.push(pos),
|
||||
BlockKind::Snow | BlockKind::Ice if rng.gen_range(0..16) == 0 => snow.push(pos),
|
||||
_ => match block.get_sprite() {
|
||||
Some(SpriteKind::Ember) => {
|
||||
@ -235,6 +238,7 @@ impl BlocksOfInterest {
|
||||
grass,
|
||||
slow_river,
|
||||
fast_river,
|
||||
lavapool,
|
||||
fires,
|
||||
smokers,
|
||||
beehives,
|
||||
|
Loading…
Reference in New Issue
Block a user