mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
added sfx (thanks to @flo666)
This commit is contained in:
parent
e5e26149ed
commit
dc1756b2df
@ -1498,6 +1498,13 @@
|
|||||||
threshold: 0.8,
|
threshold: 0.8,
|
||||||
subtitle: "subtitle-attack-shovel",
|
subtitle: "subtitle-attack-shovel",
|
||||||
),
|
),
|
||||||
|
PortalActivated: (
|
||||||
|
files: [
|
||||||
|
"voxygen.audio.sfx.ambient.portal_2",
|
||||||
|
],
|
||||||
|
threshold: 0.8,
|
||||||
|
subtitle: "subtitle-portal-activated",
|
||||||
|
),
|
||||||
|
|
||||||
// Utterances (NPCs)
|
// Utterances (NPCs)
|
||||||
|
|
||||||
|
BIN
assets/voxygen/audio/sfx/ambient/portal_1.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/portal_1.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
assets/voxygen/audio/sfx/ambient/portal_2.ogg
(Stored with Git LFS)
Normal file
BIN
assets/voxygen/audio/sfx/ambient/portal_2.ogg
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -4,6 +4,7 @@ subtitle-bees = Bees buzzing
|
|||||||
subtitle-owl = Owl hooting
|
subtitle-owl = Owl hooting
|
||||||
subtitle-running_water = Water bubbling
|
subtitle-running_water = Water bubbling
|
||||||
subtitle-lightning = Thunder
|
subtitle-lightning = Thunder
|
||||||
|
subtitle-portal-activated = Portal Activated
|
||||||
|
|
||||||
subtitle-footsteps_grass = Walking on grass
|
subtitle-footsteps_grass = Walking on grass
|
||||||
subtitle-footsteps_earth = Walking on dirt
|
subtitle-footsteps_earth = Walking on dirt
|
||||||
|
@ -140,6 +140,9 @@ pub enum Outcome {
|
|||||||
GroundDig {
|
GroundDig {
|
||||||
pos: Vec3<f32>,
|
pos: Vec3<f32>,
|
||||||
},
|
},
|
||||||
|
PortalActivated {
|
||||||
|
pos: Vec3<f32>,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Outcome {
|
impl Outcome {
|
||||||
@ -170,6 +173,7 @@ impl Outcome {
|
|||||||
| Outcome::FlamethrowerCharge { pos }
|
| Outcome::FlamethrowerCharge { pos }
|
||||||
| Outcome::LaserBeam { pos }
|
| Outcome::LaserBeam { pos }
|
||||||
| Outcome::GroundDig { pos }
|
| Outcome::GroundDig { pos }
|
||||||
|
| Outcome::PortalActivated { pos }
|
||||||
| Outcome::Glider { pos, .. } => Some(*pos),
|
| Outcome::Glider { pos, .. } => Some(*pos),
|
||||||
Outcome::BreakBlock { pos, .. }
|
Outcome::BreakBlock { pos, .. }
|
||||||
| Outcome::SpriteUnlocked { pos }
|
| Outcome::SpriteUnlocked { pos }
|
||||||
|
@ -3,6 +3,7 @@ use common::{
|
|||||||
consts::TELEPORTER_RADIUS,
|
consts::TELEPORTER_RADIUS,
|
||||||
effect::Effect,
|
effect::Effect,
|
||||||
event::{EventBus, ServerEvent},
|
event::{EventBus, ServerEvent},
|
||||||
|
outcome::Outcome,
|
||||||
resources::{DeltaTime, Time},
|
resources::{DeltaTime, Time},
|
||||||
CachedSpatialGrid, Damage, DamageKind, DamageSource, Explosion, RadiusEffect,
|
CachedSpatialGrid, Damage, DamageKind, DamageSource, Explosion, RadiusEffect,
|
||||||
};
|
};
|
||||||
@ -19,6 +20,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
Read<'a, DeltaTime>,
|
Read<'a, DeltaTime>,
|
||||||
Read<'a, Time>,
|
Read<'a, Time>,
|
||||||
Read<'a, EventBus<ServerEvent>>,
|
Read<'a, EventBus<ServerEvent>>,
|
||||||
|
Read<'a, EventBus<Outcome>>,
|
||||||
Read<'a, CachedSpatialGrid>,
|
Read<'a, CachedSpatialGrid>,
|
||||||
ReadStorage<'a, Pos>,
|
ReadStorage<'a, Pos>,
|
||||||
ReadStorage<'a, Vel>,
|
ReadStorage<'a, Vel>,
|
||||||
@ -39,6 +41,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
_dt,
|
_dt,
|
||||||
time,
|
time,
|
||||||
server_bus,
|
server_bus,
|
||||||
|
outcome_bus,
|
||||||
spatial_grid,
|
spatial_grid,
|
||||||
positions,
|
positions,
|
||||||
velocities,
|
velocities,
|
||||||
@ -204,6 +207,7 @@ impl<'a> System<'a> for Sys {
|
|||||||
server_bus.emit_now(ServerEvent::ChangeBody {
|
server_bus.emit_now(ServerEvent::ChangeBody {
|
||||||
entity,
|
entity,
|
||||||
new_body: Body::Object(if is_active {
|
new_body: Body::Object(if is_active {
|
||||||
|
outcome_bus.emit_now(Outcome::PortalActivated { pos: pos.0 });
|
||||||
object::Body::PortalActive
|
object::Body::PortalActive
|
||||||
} else {
|
} else {
|
||||||
object::Body::Portal
|
object::Body::Portal
|
||||||
|
@ -183,6 +183,7 @@ pub enum SfxEvent {
|
|||||||
Whoosh,
|
Whoosh,
|
||||||
Swoosh,
|
Swoosh,
|
||||||
GroundDig,
|
GroundDig,
|
||||||
|
PortalActivated,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, PartialEq, Deserialize, Hash, Eq)]
|
#[derive(Copy, Clone, Debug, PartialEq, Deserialize, Hash, Eq)]
|
||||||
@ -493,6 +494,10 @@ impl SfxMgr {
|
|||||||
let sfx_trigger_item = triggers.get_key_value(&SfxEvent::GroundDig);
|
let sfx_trigger_item = triggers.get_key_value(&SfxEvent::GroundDig);
|
||||||
audio.emit_sfx(sfx_trigger_item, *pos, Some(2.0), underwater);
|
audio.emit_sfx(sfx_trigger_item, *pos, Some(2.0), underwater);
|
||||||
},
|
},
|
||||||
|
Outcome::PortalActivated { pos, .. } => {
|
||||||
|
let sfx_trigger_item = triggers.get_key_value(&SfxEvent::PortalActivated);
|
||||||
|
audio.emit_sfx(sfx_trigger_item, *pos, Some(2.0), underwater);
|
||||||
|
},
|
||||||
Outcome::IceSpikes { pos, .. } => {
|
Outcome::IceSpikes { pos, .. } => {
|
||||||
let sfx_trigger_item = triggers.get_key_value(&SfxEvent::IceSpikes);
|
let sfx_trigger_item = triggers.get_key_value(&SfxEvent::IceSpikes);
|
||||||
audio.emit_sfx(sfx_trigger_item, *pos, Some(2.0), underwater);
|
audio.emit_sfx(sfx_trigger_item, *pos, Some(2.0), underwater);
|
||||||
|
@ -411,6 +411,7 @@ impl ParticleMgr {
|
|||||||
| Outcome::Swoosh { .. }
|
| Outcome::Swoosh { .. }
|
||||||
| Outcome::Steam { .. }
|
| Outcome::Steam { .. }
|
||||||
| Outcome::FireShockwave { .. }
|
| Outcome::FireShockwave { .. }
|
||||||
|
| Outcome::PortalActivated { .. }
|
||||||
| Outcome::LaserBeam { .. } => {},
|
| Outcome::LaserBeam { .. } => {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user