0
0
Fork 0

Play sound when using flint and steel

This commit is contained in:
Wuzzy 2017-02-19 22:58:51 +01:00
parent fa9f081770
commit 9d737e32d0
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,6 @@
Minetest 0.4 mod: fire mcl_fire: Fire mod for MineClone 2
====================== Based on fire from Minetest Game
==================================
License of source code: License of source code:
----------------------- -----------------------

View File

@ -7,6 +7,10 @@ minetest.register_tool("mcl_fire:flint_and_steel", {
groups = { tool = 1 }, groups = { tool = 1 },
on_use = function(itemstack, user, pointed_thing) on_use = function(itemstack, user, pointed_thing)
local idef = itemstack:get_definition() local idef = itemstack:get_definition()
minetest.sound_play(
"fire_flint_and_steel",
{pos = pointed_thing.above, gain = 0.5, max_hear_distance = 8}
)
if pointed_thing.type == "node" then if pointed_thing.type == "node" then
if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then
tnt.ignite(pointed_thing.under) tnt.ignite(pointed_thing.under)

Binary file not shown.