forked from MineClone5/MineClone5
Don't wear out flintsteel+fire charges in creative
This commit is contained in:
parent
166b06e265
commit
d470472097
|
@ -9,12 +9,16 @@ minetest.register_craftitem("mcl_fire:fire_charge", {
|
||||||
if pointed_thing.type == "node" then
|
if pointed_thing.type == "node" then
|
||||||
if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then
|
if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then
|
||||||
tnt.ignite(pointed_thing.under)
|
tnt.ignite(pointed_thing.under)
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
|
end
|
||||||
else
|
else
|
||||||
mcl_fire.set_fire(pointed_thing)
|
mcl_fire.set_fire(pointed_thing)
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:take_item()
|
itemstack:take_item()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
|
@ -16,12 +16,16 @@ minetest.register_tool("mcl_fire:flint_and_steel", {
|
||||||
if pointed_thing.type == "node" then
|
if pointed_thing.type == "node" then
|
||||||
if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then
|
if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then
|
||||||
tnt.ignite(pointed_thing.under)
|
tnt.ignite(pointed_thing.under)
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:add_wear(66000/65) -- 65 uses
|
itemstack:add_wear(66000/65) -- 65 uses
|
||||||
|
end
|
||||||
else
|
else
|
||||||
mcl_fire.set_fire(pointed_thing)
|
mcl_fire.set_fire(pointed_thing)
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
itemstack:add_wear(66000/65) -- 65 uses
|
itemstack:add_wear(66000/65) -- 65 uses
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return itemstack
|
return itemstack
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue