mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-15 07:51:50 +00:00
fix ifs
This commit is contained in:
parent
75e15d2200
commit
a4403ee6e5
1 changed files with 10 additions and 16 deletions
|
|
@ -18,22 +18,16 @@ function on_hud_open()
|
|||
local exc_invid = hud.get_exchange_inventory()
|
||||
local exc_itemid = inventory.get(exc_invid, 0)
|
||||
local itemid = inventory.get(invid, slot)
|
||||
if itemid == 0 then
|
||||
if exc_itemid ~= 0 then
|
||||
if itemid == 0 and exc_itemid ~= 0 then
|
||||
local stack_size = item.stack_size(exc_itemid)
|
||||
inventory.set(invid, slot, exc_itemid, stack_size)
|
||||
end
|
||||
else
|
||||
if exc_itemid == 0 then
|
||||
elseif exc_itemid == 0 then
|
||||
local stack_size = item.stack_size(itemid)
|
||||
inventory.set(exc_invid, 0, itemid, stack_size)
|
||||
else
|
||||
if exc_itemid == itemid then
|
||||
elseif exc_itemid == itemid then
|
||||
local stack_size = item.stack_size(exc_itemid)
|
||||
inventory.set(invid, slot, exc_itemid, stack_size)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
input.add_callback("player.drop", function()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue