diff --git a/CHANGELOG.md b/CHANGELOG.md index 26dc23a..fc13b09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ Notable Game Changes: - Added Magic Wands - Added Golden Apples and Spellbooks of Healing - Added Lightning +- Added Ambient Sounds Other Game Changes: diff --git a/CREDITS.md b/CREDITS.md index ecf6501..695fe7f 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -12,6 +12,7 @@ Credit for sounds I didn't make and are not made with JFXR: - Piano F#.wav by pinkyfinger -- https://freesound.org/s/68445/ -- License: Creative Commons 0 - Thunder.wav by IllusiaProductions -- https://freesound.org/s/249950/ -- License: Attribution 4.0 +- Carpet nord wind(DR-05x,3lrs,grnlzr,fltr_frk,fltr,Eq).wav by newlocknew -- https://freesound.org/s/528810/ -- License: Attribution 4.0 ## Textures diff --git a/mods/CORE/pyutest/sounds/pyutest-wind.ogg b/mods/CORE/pyutest/sounds/pyutest-wind.ogg new file mode 100644 index 0000000..50c6c03 Binary files /dev/null and b/mods/CORE/pyutest/sounds/pyutest-wind.ogg differ diff --git a/mods/WORLD/pyutest_ambient/init.lua b/mods/WORLD/pyutest_ambient/init.lua new file mode 100644 index 0000000..3d2762f --- /dev/null +++ b/mods/WORLD/pyutest_ambient/init.lua @@ -0,0 +1,3 @@ +local modpath = core.get_modpath(core.get_current_modname()) + +dofile(modpath .. "/wind.lua") diff --git a/mods/WORLD/pyutest_ambient/wind.lua b/mods/WORLD/pyutest_ambient/wind.lua new file mode 100644 index 0000000..5d258de --- /dev/null +++ b/mods/WORLD/pyutest_ambient/wind.lua @@ -0,0 +1,19 @@ +local pl = {} + + +local function do_wind(player) + local n = player:get_player_name() + + if pl[n] == nil then + pl[n] = core.sound_play("pyutest-wind", { + player = n, + loop = true + }) + end +end + +core.register_globalstep(function(dtime) + for i, player in ipairs(core.get_connected_players()) do + do_wind(player) + end +end)