thunder sounds
parent
bf9ed84708
commit
cc99516eaa
18
LICENSE
18
LICENSE
|
@ -1,3 +1,5 @@
|
|||
Unless otherwise stated:
|
||||
|
||||
This is free and unencumbered software released into the public domain.
|
||||
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
|
|
17
init.lua
17
init.lua
|
@ -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)
|
||||
table.insert(on_strike, fn)
|
||||
end
|
||||
|
@ -117,6 +128,12 @@ local function do_lightning(cloudh, pos)
|
|||
p.y = p.y - 1
|
||||
end
|
||||
|
||||
minetest.sound_play(sounds.thunder[math.random(#sounds.thunder)], {
|
||||
pos = p,
|
||||
max_hear_distance = 100,
|
||||
gain = 10.0,
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue