diff --git a/mods/mcl_fire/fire_charge.lua b/mods/mcl_fire/fire_charge.lua new file mode 100644 index 00000000..c556653e --- /dev/null +++ b/mods/mcl_fire/fire_charge.lua @@ -0,0 +1,26 @@ +-- Fire Charge +minetest.register_craftitem("mcl_fire:fire_charge", { + description = "Fire Charge", + inventory_image = "mcl_fire_fire_charge.png", + liquids_pointable = false, + stack_max = 64, + groups = { tool = 1 }, + on_use = function(itemstack, user, pointed_thing) + if pointed_thing.type == "node" then + if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then + tnt.ignite(pointed_thing.under) + itemstack:take_item() + else + mcl_core.set_fire(pointed_thing) + itemstack:take_item() + end + end + return itemstack + end, +}) + +minetest.register_craft({ + type = 'shapeless', + output = 'mcl_fire:fire_charge 3', + recipe = { 'mcl_mobitems:blaze_powder', 'group:coal', 'mcl_core:gunpowder' }, +}) diff --git a/mods/mcl_fire/fireworks_charge.png b/mods/mcl_fire/fireworks_charge.png new file mode 100644 index 00000000..d5f508fe Binary files /dev/null and b/mods/mcl_fire/fireworks_charge.png differ diff --git a/mods/mcl_fire/flint_and_steel.lua b/mods/mcl_fire/flint_and_steel.lua index 5b8d94ed..5b0ccd51 100644 --- a/mods/mcl_fire/flint_and_steel.lua +++ b/mods/mcl_fire/flint_and_steel.lua @@ -27,6 +27,6 @@ minetest.register_tool("mcl_fire:flint_and_steel", { minetest.register_craft({ type = 'shapeless', - output = 'mcl_core:flint_and_steel', + output = 'mcl_fire:flint_and_steel', recipe = { 'mcl_core:steel_ingot', 'mcl_core:flint'}, }) diff --git a/mods/mcl_fire/init.lua b/mods/mcl_fire/init.lua index e461e7d6..d28d6f90 100644 --- a/mods/mcl_fire/init.lua +++ b/mods/mcl_fire/init.lua @@ -192,6 +192,7 @@ minetest.register_abm({ }) dofile(minetest.get_modpath(minetest.get_current_modname()).."/flint_and_steel.lua") +dofile(minetest.get_modpath(minetest.get_current_modname()).."/fire_charge.lua") local time_to_load= os.clock() - init print(string.format("[MOD] "..minetest.get_current_modname().." loaded in %.4f s", time_to_load)) diff --git a/mods/mcl_fire/textures/mcl_fire_fire_charge.png b/mods/mcl_fire/textures/mcl_fire_fire_charge.png new file mode 100644 index 00000000..ce8c7ee9 Binary files /dev/null and b/mods/mcl_fire/textures/mcl_fire_fire_charge.png differ