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:
3
api.txt
3
api.txt
@ -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
|
||||
|
Reference in New Issue
Block a user