mirror of
https://codeberg.org/tenplus1/ambience.git
synced 2026-01-12 03:35:25 +01:00
add fade option for sounds
This commit is contained in:
2
api.txt
2
api.txt
@@ -38,7 +38,7 @@ ambience.add_set("windy", {
|
||||
frequency = 500,
|
||||
nodes = {"default:sand"},
|
||||
sounds = {
|
||||
{name = "wind", length = 9, gain = 0.3},
|
||||
{name = "wind", length = 9, gain = 0.3, fade = 1.0},
|
||||
{name = "desertwind", length = 8, gain = 0.3},
|
||||
{name = "crow", length = 3, ephemeral = true},
|
||||
},
|
||||
|
||||
2
init.lua
2
init.lua
@@ -281,7 +281,7 @@ core.register_globalstep(function(dtime)
|
||||
handler = core.sound_play(ambience.name, {
|
||||
to_player = pname,
|
||||
gain = ((ambience.gain or 0.3) + (MORE_GAIN or 0)) * playing[pname].svol,
|
||||
pitch = ambience.pitch or 1.0
|
||||
pitch = ambience.pitch or 1.0, fade = ambience.fade
|
||||
}, ambience.ephemeral)
|
||||
|
||||
--print ("playing... " .. ambience.name .. " (" .. chance .. " < "
|
||||
|
||||
Reference in New Issue
Block a user