mirror of
https://github.com/minefaco/stripped_tree.git
synced 2024-12-12 00:43:25 +01:00
fix failure to respect old param2
This commit is contained in:
parent
c7512f47a7
commit
b38d2e0e3e
3
init.lua
3
init.lua
@ -46,7 +46,8 @@ minetest.register_tool("chisel_tree:chisel", {
|
|||||||
|
|
||||||
local tree = "default:"..n
|
local tree = "default:"..n
|
||||||
if tree==node then
|
if tree==node then
|
||||||
minetest.swap_node(pos, {name = "default:stripped_"..n})
|
local old_node = minetest.get_node(pos)
|
||||||
|
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
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user