new UI complete

This commit is contained in:
Manuel Simon Hirsig
2015-10-25 03:00:52 +01:00
parent 569d2ca8c4
commit 9bc637cd1d
7 changed files with 321 additions and 190 deletions
+20
View File
@@ -9,6 +9,26 @@ local merge, copy_array
function Aux.util.pass()
end
function Aux.util.inventory_iterator()
local inventory = {}
for bag = 0, 4 do
if GetBagName(bag) then
for bag_slot = 1, GetContainerNumSlots(bag) do
tinsert(inventory, { bag = bag, bag_slot = bag_slot })
end
end
end
local i = 0
local n = getn(inventory)
return function()
i = i + 1
if i <= n then
return inventory[i]
end
end
end
function Aux.util.safe_index(chain)
local target = chain[1]