2017-02-01 16:31:27 +01:00
|
|
|
-- Flint and Steel
|
|
|
|
minetest.register_tool("mcl_fire:flint_and_steel", {
|
|
|
|
description = "Flint and Steel",
|
|
|
|
inventory_image = "mcl_fire_flint_and_steel.png",
|
|
|
|
liquids_pointable = false,
|
|
|
|
stack_max = 1,
|
|
|
|
groups = { tool = 1 },
|
|
|
|
tool_capabilities = {
|
|
|
|
full_punch_interval = 1.0,
|
|
|
|
max_drop_level=0,
|
|
|
|
groupcaps={
|
|
|
|
flamable = {uses=65, maxlevel=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)
|
2017-02-01 19:50:39 +01:00
|
|
|
if not minetest.setting_getbool("creative_mode") then
|
|
|
|
itemstack:add_wear(66000/65) -- 65 uses
|
|
|
|
end
|
2017-02-01 16:31:27 +01:00
|
|
|
else
|
2017-02-01 16:43:05 +01:00
|
|
|
mcl_fire.set_fire(pointed_thing)
|
2017-02-01 19:50:39 +01:00
|
|
|
if not minetest.setting_getbool("creative_mode") then
|
|
|
|
itemstack:add_wear(66000/65) -- 65 uses
|
|
|
|
end
|
2017-02-01 16:31:27 +01:00
|
|
|
end
|
|
|
|
end
|
2017-02-01 16:45:49 +01:00
|
|
|
return itemstack
|
2017-02-01 16:31:27 +01:00
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
|
|
|
type = 'shapeless',
|
2017-02-01 16:39:51 +01:00
|
|
|
output = 'mcl_fire:flint_and_steel',
|
2017-02-01 16:31:27 +01:00
|
|
|
recipe = { 'mcl_core:steel_ingot', 'mcl_core:flint'},
|
|
|
|
})
|