mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-25 20:11:06 +01:00
Fix fire charge and flint and steel ignoring itemframe
This commit is contained in:
parent
e9070ee134
commit
979246a7c5
2 changed files with 16 additions and 0 deletions
|
@ -7,6 +7,14 @@ minetest.register_craftitem("mcl_fire:fire_charge", {
|
|||
liquids_pointable = false,
|
||||
stack_max = 64,
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
-- Use pointed node's on_rightclick function first, if present
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
if user and not user:get_player_control().sneak then
|
||||
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
|
||||
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, user, itemstack) or itemstack
|
||||
end
|
||||
end
|
||||
|
||||
if pointed_thing.type == "node" then
|
||||
if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then
|
||||
tnt.ignite(pointed_thing.under)
|
||||
|
|
|
@ -8,6 +8,14 @@ minetest.register_tool("mcl_fire:flint_and_steel", {
|
|||
stack_max = 1,
|
||||
groups = { tool = 1 },
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
-- Use pointed node's on_rightclick function first, if present
|
||||
local node = minetest.get_node(pointed_thing.under)
|
||||
if user and not user:get_player_control().sneak then
|
||||
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
|
||||
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, user, itemstack) or itemstack
|
||||
end
|
||||
end
|
||||
|
||||
local idef = itemstack:get_definition()
|
||||
minetest.sound_play(
|
||||
"fire_flint_and_steel",
|
||||
|
|
Loading…
Reference in a new issue