mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-24 00:49:34 +01:00
Don't wear out flintsteel+fire charges in creative
This commit is contained in:
parent
166b06e265
commit
d470472097
2 changed files with 12 additions and 4 deletions
|
@ -9,10 +9,14 @@ minetest.register_craftitem("mcl_fire:fire_charge", {
|
|||
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()
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
else
|
||||
mcl_fire.set_fire(pointed_thing)
|
||||
itemstack:take_item()
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:take_item()
|
||||
end
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
|
|
|
@ -16,10 +16,14 @@ minetest.register_tool("mcl_fire:flint_and_steel", {
|
|||
if pointed_thing.type == "node" then
|
||||
if minetest.get_node(pointed_thing.under).name == "mcl_tnt:tnt" then
|
||||
tnt.ignite(pointed_thing.under)
|
||||
itemstack:add_wear(66000/65) -- 65 uses
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(66000/65) -- 65 uses
|
||||
end
|
||||
else
|
||||
mcl_fire.set_fire(pointed_thing)
|
||||
itemstack:add_wear(66000/65) -- 65 uses
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
itemstack:add_wear(66000/65) -- 65 uses
|
||||
end
|
||||
end
|
||||
end
|
||||
return itemstack
|
||||
|
|
Loading…
Reference in a new issue