mirror of
https://github.com/mt-mods/currency.git
synced 2024-10-04 00:23:06 +02:00
apply fix from lifo's fork
thanks Blockhead ❤️
This commit is contained in:
parent
f74ee653b8
commit
664eec36e6
9
shop.lua
9
shop.lua
@ -344,13 +344,14 @@ minetest.register_on_player_receive_fields(function(sender, formname, fields)
|
||||
end
|
||||
end
|
||||
if can_exchange then
|
||||
local it
|
||||
for i, item in pairs(wants) do
|
||||
pinv:remove_item("customer_gives",item)
|
||||
minv:add_item("customers_gave",item)
|
||||
it = pinv:remove_item("customer_gives",item)
|
||||
minv:add_item("customers_gave",it)
|
||||
end
|
||||
for i, item in pairs(gives) do
|
||||
minv:remove_item("stock",item)
|
||||
pinv:add_item("customer_gets",item)
|
||||
it = minv:remove_item("stock",item)
|
||||
pinv:add_item("customer_gets",it)
|
||||
end
|
||||
minetest.chat_send_player(name, S("Exchanged!"))
|
||||
check_stock(
|
||||
|
Loading…
Reference in New Issue
Block a user