Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --The igniter tool
- minetest.register_tool("flint_and_steel:flint_and_strike", {
- description = "Flint and Strike",
- inventory_image = "flint_and_steel.png",
- stack_max = 1,
- on_use = function(itemstack, user, pointed_thing)
- if pointed_thing.type=="node" then
- if minetest.env:get_node(pointed_thing.above).name == "air" then
- minetest.sound_play("flint", {pos=pointed_thing.under, loop=false})
- item = itemstack:to_table()
- item_wear = tonumber(item["wear"])
- item_wear = item_wear + 1000
- item["wear"]=tostring(item_wear)
- if item_wear > 63000 then
- item = ""
- end
- itemstack:replace(item)
- minetest.env:add_node(pointed_thing.above, {name="fire:basic_flame"})
- return itemstack
- end
- end
- end
- end,
- })
- minetest.register_craft({
- type = "shapeless",
- output = 'torch_plus:lighter 1',
- recipe = {
- 'default:steel_ingot',
- 'default:cobble',
- }
- })
Add Comment
Please, Sign In to add comment