forked from Mineclonia/Mineclonia
Fix another large chest item duplication bug
This commit is contained in:
parent
515a47e463
commit
6eaa6cde54
|
@ -304,6 +304,7 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
|
||||||
minetest.log("action", player:get_player_name()..
|
minetest.log("action", player:get_player_name()..
|
||||||
" moves stuff to chest at "..minetest.pos_to_string(pos))
|
" moves stuff to chest at "..minetest.pos_to_string(pos))
|
||||||
-- BEGIN OF LISTRING WORKAROUND
|
-- BEGIN OF LISTRING WORKAROUND
|
||||||
|
if listname == "input" then
|
||||||
local other_pos = get_chest_neighborpos(pos, minetest.get_node(pos).param2, "right")
|
local other_pos = get_chest_neighborpos(pos, minetest.get_node(pos).param2, "right")
|
||||||
local other_inv = minetest.get_inventory({type="node", pos=other_pos})
|
local other_inv = minetest.get_inventory({type="node", pos=other_pos})
|
||||||
local leftover = other_inv:add_item("main", stack)
|
local leftover = other_inv:add_item("main", stack)
|
||||||
|
@ -311,6 +312,7 @@ minetest.register_node("mcl_chests:"..basename.."_right", {
|
||||||
local inv = minetest.get_inventory({type="node", pos=pos})
|
local inv = minetest.get_inventory({type="node", pos=pos})
|
||||||
inv:add_item("main", leftover)
|
inv:add_item("main", leftover)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
-- END OF LISTRING WORKAROUND
|
-- END OF LISTRING WORKAROUND
|
||||||
end,
|
end,
|
||||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
|
Loading…
Reference in New Issue