thunder sounds

master
Izzy 2019-06-06 16:01:51 -06:00
parent bf9ed84708
commit cc99516eaa
5 changed files with 35 additions and 0 deletions

18
LICENSE
View File

@ -1,3 +1,5 @@
Unless otherwise stated:
This is free and unencumbered software released into the public domain. This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or Anyone is free to copy, modify, publish, use, compile, sell, or
@ -22,3 +24,19 @@ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE. OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org> For more information, please refer to <http://unlicense.org>
--------------------------------------------------------------------------
Some audio files are licensed under CC BY 3.0, as noted in the file name.
See the file metadata for attribution.
https://creativecommons.org/licenses/by/3.0/
--------------------------------------------------------------------------
Audio files with "PD" in the file name are in the Public Domain.
See the file metadata for source information.

View File

@ -7,6 +7,17 @@ storms = {
} }
local sounds = {
thunder = {
"thunder_01_ccby_hantorio.ogg",
"thunder_02_PD.ogg",
"thunder_03_PD.ogg",
},
}
storms.register_on_lightning_strike = function(fn) storms.register_on_lightning_strike = function(fn)
table.insert(on_strike, fn) table.insert(on_strike, fn)
end end
@ -117,6 +128,12 @@ local function do_lightning(cloudh, pos)
p.y = p.y - 1 p.y = p.y - 1
end end
minetest.sound_play(sounds.thunder[math.random(#sounds.thunder)], {
pos = p,
max_hear_distance = 100,
gain = 10.0,
})
end end

Binary file not shown.

Binary file not shown.

Binary file not shown.