From f2bee2286f364c8acb1f37b52a617d2d23c9216c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 17 Aug 2017 13:53:54 +0200 Subject: [PATCH] Make fire charge a normal igniter, too --- mods/ITEMS/mcl_fire/fire_charge.lua | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/mods/ITEMS/mcl_fire/fire_charge.lua b/mods/ITEMS/mcl_fire/fire_charge.lua index dc3af8dd0..83612b870 100644 --- a/mods/ITEMS/mcl_fire/fire_charge.lua +++ b/mods/ITEMS/mcl_fire/fire_charge.lua @@ -15,17 +15,16 @@ minetest.register_craftitem("mcl_fire:fire_charge", { end end + -- Ignite/light fire if pointed_thing.type == "node" then - if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then - tnt.ignite(pointed_thing.under) - if not minetest.settings:get_bool("creative_mode") then - itemstack:take_item() - end + local nodedef = minetest.registered_nodes[node.name] + if nodedef and nodedef._on_ignite then + nodedef._on_ignite(user, pointed_thing) else mcl_fire.set_fire(pointed_thing) - if not minetest.settings:get_bool("creative_mode") then - itemstack:take_item() - end + end + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() end end return itemstack