diff --git a/assets/voxygen/audio/sfx.ron b/assets/voxygen/audio/sfx.ron index 93dca1865d..0ab17f56b2 100644 --- a/assets/voxygen/audio/sfx.ron +++ b/assets/voxygen/audio/sfx.ron @@ -1498,6 +1498,13 @@ threshold: 0.8, subtitle: "subtitle-attack-shovel", ), + PortalActivated: ( + files: [ + "voxygen.audio.sfx.ambient.portal_2", + ], + threshold: 0.8, + subtitle: "subtitle-portal-activated", + ), // Utterances (NPCs) diff --git a/assets/voxygen/audio/sfx/ambient/portal_1.ogg b/assets/voxygen/audio/sfx/ambient/portal_1.ogg new file mode 100644 index 0000000000..b98d209e4b --- /dev/null +++ b/assets/voxygen/audio/sfx/ambient/portal_1.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:496209e12bbd83e1f4de9dc519e3f626ad3dd0cc462c94f73c6abb1ac5921b80 +size 40960 diff --git a/assets/voxygen/audio/sfx/ambient/portal_2.ogg b/assets/voxygen/audio/sfx/ambient/portal_2.ogg new file mode 100644 index 0000000000..fbc1674497 --- /dev/null +++ b/assets/voxygen/audio/sfx/ambient/portal_2.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cef2ca0198aa33ba0d365b2f8440762e53406d0da43f4c9c4c77fc166f4d1e57 +size 196653 diff --git a/assets/voxygen/i18n/en/hud/subtitles.ftl b/assets/voxygen/i18n/en/hud/subtitles.ftl index c94df031e1..819cf12e8f 100644 --- a/assets/voxygen/i18n/en/hud/subtitles.ftl +++ b/assets/voxygen/i18n/en/hud/subtitles.ftl @@ -4,6 +4,7 @@ subtitle-bees = Bees buzzing subtitle-owl = Owl hooting subtitle-running_water = Water bubbling subtitle-lightning = Thunder +subtitle-portal-activated = Portal Activated subtitle-footsteps_grass = Walking on grass subtitle-footsteps_earth = Walking on dirt diff --git a/common/src/outcome.rs b/common/src/outcome.rs index 4e0b0a9a46..1f0839c473 100644 --- a/common/src/outcome.rs +++ b/common/src/outcome.rs @@ -140,6 +140,9 @@ pub enum Outcome { GroundDig { pos: Vec3, }, + PortalActivated { + pos: Vec3, + }, } impl Outcome { @@ -170,6 +173,7 @@ impl Outcome { | Outcome::FlamethrowerCharge { pos } | Outcome::LaserBeam { pos } | Outcome::GroundDig { pos } + | Outcome::PortalActivated { pos } | Outcome::Glider { pos, .. } => Some(*pos), Outcome::BreakBlock { pos, .. } | Outcome::SpriteUnlocked { pos } diff --git a/server/src/sys/object.rs b/server/src/sys/object.rs index fe2272b915..08498cebd2 100644 --- a/server/src/sys/object.rs +++ b/server/src/sys/object.rs @@ -3,6 +3,7 @@ use common::{ consts::TELEPORTER_RADIUS, effect::Effect, event::{EventBus, ServerEvent}, + outcome::Outcome, resources::{DeltaTime, Time}, CachedSpatialGrid, Damage, DamageKind, DamageSource, Explosion, RadiusEffect, }; @@ -19,6 +20,7 @@ impl<'a> System<'a> for Sys { Read<'a, DeltaTime>, Read<'a, Time>, Read<'a, EventBus>, + Read<'a, EventBus>, Read<'a, CachedSpatialGrid>, ReadStorage<'a, Pos>, ReadStorage<'a, Vel>, @@ -39,6 +41,7 @@ impl<'a> System<'a> for Sys { _dt, time, server_bus, + outcome_bus, spatial_grid, positions, velocities, @@ -204,6 +207,7 @@ impl<'a> System<'a> for Sys { server_bus.emit_now(ServerEvent::ChangeBody { entity, new_body: Body::Object(if is_active { + outcome_bus.emit_now(Outcome::PortalActivated { pos: pos.0 }); object::Body::PortalActive } else { object::Body::Portal diff --git a/voxygen/src/audio/sfx/mod.rs b/voxygen/src/audio/sfx/mod.rs index 1978e51968..8abdfd543d 100644 --- a/voxygen/src/audio/sfx/mod.rs +++ b/voxygen/src/audio/sfx/mod.rs @@ -183,6 +183,7 @@ pub enum SfxEvent { Whoosh, Swoosh, GroundDig, + PortalActivated, } #[derive(Copy, Clone, Debug, PartialEq, Deserialize, Hash, Eq)] @@ -493,6 +494,10 @@ impl SfxMgr { let sfx_trigger_item = triggers.get_key_value(&SfxEvent::GroundDig); 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, .. } => { let sfx_trigger_item = triggers.get_key_value(&SfxEvent::IceSpikes); audio.emit_sfx(sfx_trigger_item, *pos, Some(2.0), underwater); diff --git a/voxygen/src/scene/particle.rs b/voxygen/src/scene/particle.rs index dec7612e95..40189d349e 100644 --- a/voxygen/src/scene/particle.rs +++ b/voxygen/src/scene/particle.rs @@ -411,6 +411,7 @@ impl ParticleMgr { | Outcome::Swoosh { .. } | Outcome::Steam { .. } | Outcome::FireShockwave { .. } + | Outcome::PortalActivated { .. } | Outcome::LaserBeam { .. } => {}, } }