diff --git a/LICENSE b/LICENSE index cf1ab25..10800c5 100644 --- a/LICENSE +++ b/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 + + + +-------------------------------------------------------------------------- + +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. + diff --git a/init.lua b/init.lua index 09b7c41..ee2f163 100644 --- a/init.lua +++ b/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 diff --git a/sounds/storms_thunder_01_ccby_hantorio.ogg b/sounds/storms_thunder_01_ccby_hantorio.ogg new file mode 100644 index 0000000..5cb862e Binary files /dev/null and b/sounds/storms_thunder_01_ccby_hantorio.ogg differ diff --git a/sounds/storms_thunder_02_PD.ogg b/sounds/storms_thunder_02_PD.ogg new file mode 100644 index 0000000..6248a7b Binary files /dev/null and b/sounds/storms_thunder_02_PD.ogg differ diff --git a/sounds/storms_thunder_03_PD.ogg b/sounds/storms_thunder_03_PD.ogg new file mode 100644 index 0000000..42bde7c Binary files /dev/null and b/sounds/storms_thunder_03_PD.ogg differ