summaryrefslogtreecommitdiff
path: root/doors_chest.lua
diff options
context:
space:
mode:
Diffstat (limited to 'doors_chest.lua')
-rw-r--r--doors_chest.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/doors_chest.lua b/doors_chest.lua
index 6e1ead9..7b8a464 100644
--- a/doors_chest.lua
+++ b/doors_chest.lua
@@ -290,7 +290,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.toup then
-- copy contents of players inventory to chest
- for i, v in ipairs (player_inv:get_list("main") or {}) do
+ for i, v in pairs (player_inv:get_list("main") or {}) do
if chest_inv
and chest_inv:room_for_item('main', v) then
@@ -309,7 +309,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
elseif fields.todn then
-- copy contents of chest to players inventory
- for i, v in ipairs (chest_inv:get_list('main') or {}) do
+ for i, v in pairs (chest_inv:get_list('main') or {}) do
if player_inv:room_for_item("main", v) then