Fire: Add flint and steel sound
authorparamat <mat.gregory@virginmedia.com>
Sun, 23 Oct 2016 05:16:19 +0000 (06:16 +0100)
committerparamat <mat.gregory@virginmedia.com>
Mon, 24 Oct 2016 03:55:08 +0000 (04:55 +0100)
mods/fire/README.txt
mods/fire/init.lua
mods/fire/license.txt
mods/fire/sounds/fire_flint_and_steel.ogg [new file with mode: 0644]

index a0f298ce570e80f1b533b36de74586e9d208a711..35affc264032080dfda818a8e83b00d4561a08b8 100644 (file)
@@ -23,3 +23,6 @@ fire_small.ogg sampled from:
 
 fire_large.ogg sampled from:
   http://www.freesound.org/people/Dynamicell/sounds/17548/ (CC BY 3.0)
+
+fire_flint_and_steel.ogg
+  https://www.freesound.org/people/Benboncan/sounds/66457/ (CC BY 3.0)
index 6543ceef18ffccc250b445fe3bbc738351da9f97..731505f2ee7e2da49933941255da2874fde61d61 100644 (file)
@@ -87,8 +87,12 @@ minetest.register_tool("fire:flint_and_steel", {
        description = "Flint and Steel",
        inventory_image = "fire_flint_steel.png",
        on_use = function(itemstack, user, pointed_thing)
-               itemstack:add_wear(1000)
                local pt = pointed_thing
+               minetest.sound_play(
+                       "fire_flint_and_steel",
+                       {pos = pt.above, gain = 0.8, max_hear_distance = 8}
+               )
+               itemstack:add_wear(1000)
                if pt.type == "node" then
                        local node_under = minetest.get_node(pt.under).name
                        local is_coalblock = node_under == "default:coalblock"
index 87ade6b34e057363b404bcd1d746bc1f6e1b3b4b..43f9cd7ff49f0b8bd2b12e25af97a5b3a8abaf67 100644 (file)
@@ -15,8 +15,8 @@ See the GNU Lesser General Public License for more details:
 https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
 
 
-Licenses of media (textures)
-----------------------------
+Licenses of media (textures and sounds)
+---------------------------------------
 
 Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
 Copyright (C) 2012-2016 Perttu Ahola (celeron55) <celeron55@gmail.com>
@@ -56,6 +56,7 @@ http://creativecommons.org/licenses/by-sa/3.0/
 Attribution 3.0 Unported (CC BY 3.0)
 Copyright (C) 2005 dobroide
 Copyright (C) 2006 Dynamicell
+Copyright (C) 2009 Benboncan
 
 You are free to:
 Share — copy and redistribute the material in any medium or format.
diff --git a/mods/fire/sounds/fire_flint_and_steel.ogg b/mods/fire/sounds/fire_flint_and_steel.ogg
new file mode 100644 (file)
index 0000000..6996e16
Binary files /dev/null and b/mods/fire/sounds/fire_flint_and_steel.ogg differ