mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-12-28 11:40:36 +01:00
Merge pull request #65 from everamzah/fixbones
Try harder to add armor to bones
This commit is contained in:
commit
456c84e93e
@ -498,7 +498,14 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
|||||||
minetest.after(ARMOR_BONES_DELAY, function()
|
minetest.after(ARMOR_BONES_DELAY, function()
|
||||||
local node = minetest.get_node(vector.round(pos))
|
local node = minetest.get_node(vector.round(pos))
|
||||||
if node then
|
if node then
|
||||||
if node.name == "bones:bones" then
|
if node.name ~= "bones:bones" then
|
||||||
|
pos.y = pos.y+1
|
||||||
|
node = minetest.get_node(vector.round(pos))
|
||||||
|
if node.name ~= "bones:bones" then
|
||||||
|
minetest.log("warning", "Failed to add armor to bones node.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
local meta = minetest.get_meta(vector.round(pos))
|
local meta = minetest.get_meta(vector.round(pos))
|
||||||
local owner = meta:get_string("owner")
|
local owner = meta:get_string("owner")
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
@ -509,7 +516,6 @@ if ARMOR_DROP == true or ARMOR_DESTROY == true then
|
|||||||
armor.drop_armor(pos, stack)
|
armor.drop_armor(pos, stack)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
else
|
else
|
||||||
for _,stack in ipairs(drop) do
|
for _,stack in ipairs(drop) do
|
||||||
armor.drop_armor(pos, stack)
|
armor.drop_armor(pos, stack)
|
||||||
|
Loading…
Reference in New Issue
Block a user