1
0
mirror of https://github.com/SmallJoker/exchange_shop.git synced 2025-07-04 17:20:29 +02:00
This commit is contained in:
Maksim
2022-03-23 23:37:58 +01:00
parent 1d91873150
commit 3b86d9a7d5
6 changed files with 99 additions and 78 deletions

View File

@ -66,7 +66,7 @@ function exchange_shop.list_remove_item(inv, listname, stack)
return removed_stack
end
function exchange_shop.exchange_action(player_inv, shop_inv)
function exchange_shop.exchange_action(player_inv, shop_inv, pos)
if not shop_inv:is_empty("cust_ej")
or not shop_inv:is_empty("custm_ej") then
return S("One or multiple ejection fields are filled.") .. " " ..
@ -153,9 +153,10 @@ function exchange_shop.exchange_action(player_inv, shop_inv)
if player_inv:room_for_item("main", stack) then
player_inv:add_item("main", stack)
else
minetest.item_drop(stack, nil, pos)
-- Move to ejection field
shop_inv:add_item("cust_ej", stack)
fully_exchanged = false
-- shop_inv:add_item("cust_ej", stack)
-- fully_exchanged = false
end
end
if not fully_exchanged then