mirror of
https://github.com/minefaco/stripped_tree.git
synced 2025-01-08 13:57:31 +01:00
Update init.lua
This commit is contained in:
parent
882e5f08d4
commit
09712c5ffd
10
init.lua
10
init.lua
@ -65,14 +65,14 @@ for _, axe_name in ipairs(axe_types) do
|
|||||||
minetest.swap_node(pos, {name = "default:stripped_"..n, param2 = old_node.param2})
|
minetest.swap_node(pos, {name = "default:stripped_"..n, param2 = old_node.param2})
|
||||||
itemstack:add_wear(65535 / 299) -- 300 uses
|
itemstack:add_wear(65535 / 299) -- 300 uses
|
||||||
|
|
||||||
if not creative_mode then
|
if not creative_mode then
|
||||||
local inv = user:get_inventory()
|
local inv = user:get_inventory()
|
||||||
--check for room in inv, if not, drop item
|
--check for room in inv, if not, drop item
|
||||||
if inv:room_for_item("main", "default:tree_bark") then
|
if inv:room_for_item("main", "default:tree_bark") then
|
||||||
inv:add_item("main", {name="default:tree_bark"})
|
inv:add_item("main", {name="default:tree_bark"})
|
||||||
else
|
else
|
||||||
minetest.add_item(pos, "default:tree_bark")
|
minetest.add_item(pos, "default:tree_bark")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return itemstack
|
return itemstack
|
||||||
|
Loading…
Reference in New Issue
Block a user