mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Many small changes to audio code, mainly sfx - changelog in MR
This commit is contained in:
parent
bb34a604a7
commit
99261bf105
@ -7,13 +7,7 @@
|
||||
files: [
|
||||
"voxygen.audio.sfx.ambient.fire",
|
||||
],
|
||||
threshold: 0.5,
|
||||
),
|
||||
Embers: (
|
||||
files: [
|
||||
"voxygen.audio.sfx.ambient.embers",
|
||||
],
|
||||
threshold: 0.5,
|
||||
threshold: 1.688,
|
||||
),
|
||||
Birdcall: (
|
||||
files: [
|
||||
|
BIN
assets/voxygen/audio/sfx/ambient/embers.wav
(Stored with Git LFS)
BIN
assets/voxygen/audio/sfx/ambient/embers.wav
(Stored with Git LFS)
Binary file not shown.
@ -18,6 +18,7 @@
|
||||
(Snowland, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "DaforLynx"
|
||||
),
|
||||
(
|
||||
@ -27,6 +28,7 @@
|
||||
timing: Some(Night),
|
||||
biomes: [],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "Ap1evideogame"
|
||||
),
|
||||
(
|
||||
@ -39,6 +41,7 @@
|
||||
(Ocean, 3),
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "Eden",
|
||||
),
|
||||
(
|
||||
@ -54,6 +57,7 @@
|
||||
(Lake, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "Eden",
|
||||
),
|
||||
(
|
||||
@ -65,6 +69,7 @@
|
||||
(Forest, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "Aeronic",
|
||||
),
|
||||
(
|
||||
@ -75,6 +80,7 @@
|
||||
timing: Some(Night),
|
||||
biomes: [],
|
||||
site: Some(Cave),
|
||||
activity: Explore,
|
||||
artist: "Aeronic",
|
||||
),
|
||||
(
|
||||
@ -87,6 +93,7 @@
|
||||
(Forest, 1)
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "Aeronic",
|
||||
),
|
||||
(
|
||||
@ -96,6 +103,7 @@
|
||||
timing: Some(Night),
|
||||
biomes: [],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "Aeronic",
|
||||
),
|
||||
(
|
||||
@ -108,6 +116,7 @@
|
||||
(Mountain, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "Aeronic",
|
||||
),
|
||||
(
|
||||
@ -117,6 +126,7 @@
|
||||
timing: None,
|
||||
biomes: [],
|
||||
site: Some(Cave),
|
||||
activity: Explore,
|
||||
artist: "Aeronic",
|
||||
),
|
||||
( //Repeat for other site
|
||||
@ -126,6 +136,7 @@
|
||||
timing: None,
|
||||
biomes: [],
|
||||
site: Some(Dungeon),
|
||||
activity: Explore,
|
||||
artist: "Aeronic",
|
||||
),
|
||||
(
|
||||
@ -135,6 +146,7 @@
|
||||
timing: Some(Night),
|
||||
biomes: [],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "Aeronic",
|
||||
),
|
||||
(
|
||||
@ -147,6 +159,7 @@
|
||||
(Forest, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "Aeronic",
|
||||
),
|
||||
//(
|
||||
@ -169,6 +182,7 @@
|
||||
(Mountain, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "badbbad",
|
||||
),
|
||||
(
|
||||
@ -178,6 +192,7 @@
|
||||
timing: Some(Night),
|
||||
biomes: [],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "badbbad",
|
||||
),
|
||||
(
|
||||
@ -190,6 +205,7 @@
|
||||
(Lake, 1)
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "badbbad",
|
||||
),
|
||||
(
|
||||
@ -199,6 +215,7 @@
|
||||
timing: None,
|
||||
biomes: [],
|
||||
site: Some(Cave),
|
||||
activity: Explore,
|
||||
artist: "badbbad",
|
||||
),
|
||||
( //Repeat for other site
|
||||
@ -208,6 +225,7 @@
|
||||
timing: None,
|
||||
biomes: [],
|
||||
site: Some(Dungeon),
|
||||
activity: Explore,
|
||||
artist: "badbbad",
|
||||
),
|
||||
(
|
||||
@ -221,6 +239,7 @@
|
||||
(Snowland, 1),
|
||||
],
|
||||
site: Some(Void),
|
||||
activity: Explore,
|
||||
artist: "badbbad",
|
||||
)
|
||||
]
|
||||
|
@ -48,14 +48,13 @@
|
||||
"To send private messages type /tell followed by a player name and your message.",
|
||||
"Keep an eye out for food, chests and other loot spread all around the world!",
|
||||
"Inventory filled with food? Try crafting better food from it!",
|
||||
"Wondering what's there to do? Try out one of the dungeons marked on the map!",
|
||||
"Wondering what there is to do? Try out one of the dungeons marked on the map!",
|
||||
"Don't forget to adjust the graphics for your system. Press 'N' to open the settings.",
|
||||
"Playing with others is fun! Press 'O' to see who is online.",
|
||||
"An NPC with a skull beneath their healthbar is quite powerful compared to yourself.",
|
||||
"Press 'J' to dance. Party!",
|
||||
"Press 'L-Shift' to open your Glider and conquer the skies.",
|
||||
"Veloren is still in Pre-Alpha. We do our best to improve it every day!",
|
||||
"If you want to join the Dev-Team or just have a chat with us join our Discord-Server.",
|
||||
"If you want to join the dev team or just have a chat with us, join our Discord server.",
|
||||
"You can toggle showing your amount of health on the healthbar in the settings.",
|
||||
"Sit near a campfire (with the 'K' key) to slowly recover from your injuries.",
|
||||
"Need more bags or better armor to continue your journey? Press 'C' to open the crafting menu!",
|
||||
|
@ -80,6 +80,15 @@ pub struct SoundtrackItem {
|
||||
biomes: Vec<(BiomeKind, u8)>,
|
||||
/// Whether this track should play in a specific site
|
||||
site: Option<SitesKind>,
|
||||
/// What the player is doing when the track is played (i.e. exploring,
|
||||
/// combat)
|
||||
activity: MusicActivity,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, PartialEq)]
|
||||
enum MusicActivity {
|
||||
Explore,
|
||||
Combat,
|
||||
}
|
||||
|
||||
/// Allows control over when a track should play based on in-game time of day
|
||||
@ -150,7 +159,7 @@ impl MusicMgr {
|
||||
let mut rng = thread_rng();
|
||||
|
||||
// Adds a bit of randomness between plays
|
||||
let silence_between_tracks_seconds: f32 = rng.gen_range(45.0..120.0);
|
||||
let silence_between_tracks_seconds: f32 = rng.gen_range(60.0..120.0);
|
||||
|
||||
let game_time = (state.get_time_of_day() as u64 % 86400) as u32;
|
||||
let current_period_of_day = Self::get_current_day_period(game_time);
|
||||
@ -162,6 +171,7 @@ impl MusicMgr {
|
||||
let maybe_tracks = soundtrack
|
||||
.tracks
|
||||
.iter()
|
||||
.filter(|track| track.activity == MusicActivity::Explore)
|
||||
.filter(|track| {
|
||||
!track.title.eq(&self.last_track)
|
||||
&& match &track.timing {
|
||||
|
@ -152,7 +152,7 @@ impl EventMapper for BlockEventMapper {
|
||||
blocks: |boi| &boi.beehives,
|
||||
range: 1,
|
||||
sfx: SfxEvent::Bees,
|
||||
volume: 1.0,
|
||||
volume: 0.5,
|
||||
cond: |st| st.get_day_period().is_light(),
|
||||
},
|
||||
];
|
||||
@ -166,7 +166,11 @@ impl EventMapper for BlockEventMapper {
|
||||
|| player_pos.0.z < (terrain_alt - 30.0)
|
||||
|| (sounds.sfx == SfxEvent::Birdcall && thread_rng().gen_bool(0.995))
|
||||
|| (sounds.sfx == SfxEvent::Owl && thread_rng().gen_bool(0.998))
|
||||
|| (sounds.sfx == SfxEvent::Frog && thread_rng().gen_bool(0.9))
|
||||
|| (sounds.sfx == SfxEvent::Frog && thread_rng().gen_bool(0.95))
|
||||
//Crickets will not chirp below 5 Celsius
|
||||
|| (sounds.sfx == SfxEvent::Cricket1 && (temp < -0.33))
|
||||
|| (sounds.sfx == SfxEvent::Cricket2 && (temp < -0.33))
|
||||
|| (sounds.sfx == SfxEvent::Cricket3 && (temp < -0.33))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@ -259,7 +263,6 @@ impl BlockEventMapper {
|
||||
//In case certain sounds need modification to their threshold,
|
||||
//use match event
|
||||
match event {
|
||||
//Crickets' threshold is 0.0 by default
|
||||
SfxEvent::Cricket1 => {
|
||||
previous_state.time.elapsed().as_secs_f32()
|
||||
>= cricket_interval + thread_rng().gen_range(-0.1..0.1)
|
||||
@ -277,7 +280,7 @@ impl BlockEventMapper {
|
||||
previous_state.time.elapsed().as_secs_f32()
|
||||
>= cricket_interval + thread_rng().gen_range(-0.1..0.1)
|
||||
},
|
||||
//Adds random factor to frogs
|
||||
//Adds random factor to frogs (probably doesn't do anything most of the time)
|
||||
SfxEvent::Frog => {
|
||||
previous_state.time.elapsed().as_secs_f32()
|
||||
>= thread_rng().gen_range(-2.0..2.0)
|
||||
|
Loading…
Reference in New Issue
Block a user