mirror of
https://github.com/mt-mods/currency.git
synced 2024-08-20 12:34:07 +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
|
||||||
end
|
end
|
||||||
if can_exchange then
|
if can_exchange then
|
||||||
|
local it
|
||||||
for i, item in pairs(wants) do
|
for i, item in pairs(wants) do
|
||||||
pinv:remove_item("customer_gives",item)
|
it = pinv:remove_item("customer_gives",item)
|
||||||
minv:add_item("customers_gave",item)
|
minv:add_item("customers_gave",it)
|
||||||
end
|
end
|
||||||
for i, item in pairs(gives) do
|
for i, item in pairs(gives) do
|
||||||
minv:remove_item("stock",item)
|
it = minv:remove_item("stock",item)
|
||||||
pinv:add_item("customer_gets",item)
|
pinv:add_item("customer_gets",it)
|
||||||
end
|
end
|
||||||
minetest.chat_send_player(name, S("Exchanged!"))
|
minetest.chat_send_player(name, S("Exchanged!"))
|
||||||
check_stock(
|
check_stock(
|
||||||
|
Loading…
Reference in New Issue
Block a user