Added Ambient Sounds
This commit is contained in:
parent
9fefa0cd13
commit
c43ea0b8ff
@ -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:
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
BIN
mods/CORE/pyutest/sounds/pyutest-wind.ogg
Normal file
BIN
mods/CORE/pyutest/sounds/pyutest-wind.ogg
Normal file
Binary file not shown.
3
mods/WORLD/pyutest_ambient/init.lua
Normal file
3
mods/WORLD/pyutest_ambient/init.lua
Normal file
@ -0,0 +1,3 @@
|
||||
local modpath = core.get_modpath(core.get_current_modname())
|
||||
|
||||
dofile(modpath .. "/wind.lua")
|
19
mods/WORLD/pyutest_ambient/wind.lua
Normal file
19
mods/WORLD/pyutest_ambient/wind.lua
Normal file
@ -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)
|
Loading…
x
Reference in New Issue
Block a user