automatic update
This commit is contained in:
parent
c2ddb46247
commit
a470fbfc83
8
init.lua
8
init.lua
@ -34,7 +34,7 @@ if treecapitator.drop_items then
|
|||||||
|
|
||||||
function destroy_node(pos, node, digger)
|
function destroy_node(pos, node, digger)
|
||||||
local drops = minetest.get_node_drops(node.name)
|
local drops = minetest.get_node_drops(node.name)
|
||||||
for _,item in ipairs(drops) do
|
for _,item in pairs(drops) do
|
||||||
minetest.add_item(pos, item)
|
minetest.add_item(pos, item)
|
||||||
end
|
end
|
||||||
minetest.remove_node(pos)
|
minetest.remove_node(pos)
|
||||||
@ -57,7 +57,7 @@ end
|
|||||||
if not treecapitator.drop_leaf then
|
if not treecapitator.drop_leaf then
|
||||||
function remove_leaf(p, leaf, inv)
|
function remove_leaf(p, leaf, inv)
|
||||||
local leaves_drops = minetest.get_node_drops(leaf)
|
local leaves_drops = minetest.get_node_drops(leaf)
|
||||||
for _, itemname in ipairs(leaves_drops) do
|
for _, itemname in pairs(leaves_drops) do
|
||||||
if itemname ~= leaf then
|
if itemname ~= leaf then
|
||||||
drop_leaf(p, itemname, inv)
|
drop_leaf(p, itemname, inv)
|
||||||
end
|
end
|
||||||
@ -72,8 +72,8 @@ end
|
|||||||
|
|
||||||
|
|
||||||
table.icontains = table.icontains or function(t, v)
|
table.icontains = table.icontains or function(t, v)
|
||||||
for _,i in ipairs(t) do
|
for i = 1,#t do
|
||||||
if i == v then
|
if t[i] == v then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user