forked from mtcontrib/3d_armor
Remove redundant code
This commit is contained in:
parent
4b45f85687
commit
37b10d1cee
@ -511,18 +511,17 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
|||||||
end
|
end
|
||||||
if ARMOR_DESTROY == false then
|
if ARMOR_DESTROY == false then
|
||||||
minetest.after(ARMOR_BONES_DELAY, function()
|
minetest.after(ARMOR_BONES_DELAY, function()
|
||||||
local node, meta = nil, nil
|
local meta = nil
|
||||||
local maxp = vector.add(pos, 8)
|
local maxp = vector.add(pos, 8)
|
||||||
local minp = vector.subtract(pos, 8)
|
local minp = vector.subtract(pos, 8)
|
||||||
local bones = minetest.find_nodes_in_area(minp, maxp, {"bones:bones"})
|
local bones = minetest.find_nodes_in_area(minp, maxp, {"bones:bones"})
|
||||||
for _, p in pairs(bones) do
|
for _, p in pairs(bones) do
|
||||||
meta = minetest.get_meta(p)
|
meta = minetest.get_meta(p)
|
||||||
if meta:get_string("owner") == name then
|
if meta:get_string("owner") == name then
|
||||||
node = minetest.get_node(p)
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if node and meta then
|
if meta then
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
for _,stack in ipairs(drop) do
|
for _,stack in ipairs(drop) do
|
||||||
if inv:room_for_item("main", stack) then
|
if inv:room_for_item("main", stack) then
|
||||||
|
Loading…
Reference in New Issue
Block a user