1
0
mirror of https://codeberg.org/tenplus1/ambience.git synced 2025-07-13 22:10:27 +02:00

added ephemeral flag for sounds

This commit is contained in:
tenplus1
2020-06-14 15:01:59 +01:00
parent e5457003cd
commit d5ff07abe0
4 changed files with 27 additions and 26 deletions

View File

@ -29,7 +29,7 @@ ambience.add_set(set_name, def)
'feet_node' nameof node at player foot level
This will let you add a set or sounds with the frequency it's used and check
function for it to play.
function for it to play. If ephemeral is true then no handler will be used and sound will be played in background alongside other sounds.
e.g.
@ -39,6 +39,7 @@ ambience.add_set("windy", {
sounds = {
{name = "wind", length = 9, gain = 0.3},
{name = "desertwind", length = 8, gain = 0.3},
{name = "crow", length = 3, ephemeral = true},
},
sound_check = function(def)
local number = totals["default:sand"] or 0 -- yep, can also be nil