Skip to content

Commit

Permalink
Fire: Add flint and steel sound
Browse files Browse the repository at this point in the history
  • Loading branch information
paramat committed Oct 24, 2016
1 parent 9b62d8a commit f7325d2
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions mods/fire/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 5 additions & 1 deletion mods/fire/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions mods/fire/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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.
Expand Down
Binary file added mods/fire/sounds/fire_flint_and_steel.ogg
Binary file not shown.

0 comments on commit f7325d2

Please sign in to comment.