mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Play sound when using flint and steel
This commit is contained in:
parent
fa9f081770
commit
9d737e32d0
3 changed files with 7 additions and 2 deletions
|
@ -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:
|
||||
-----------------------
|
||||
|
|
|
@ -7,6 +7,10 @@ minetest.register_tool("mcl_fire:flint_and_steel", {
|
|||
groups = { tool = 1 },
|
||||
on_use = function(itemstack, user, pointed_thing)
|
||||
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 minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then
|
||||
tnt.ignite(pointed_thing.under)
|
||||
|
|
BIN
mods/ITEMS/mcl_fire/sounds/fire_flint_and_steel.ogg
Normal file
BIN
mods/ITEMS/mcl_fire/sounds/fire_flint_and_steel.ogg
Normal file
Binary file not shown.
Loading…
Reference in a new issue