imported the util core module

This commit is contained in:
Manuel Simon Hirsig
2016-08-19 17:18:04 +02:00
parent e334a444df
commit 95250002a5
24 changed files with 93 additions and 93 deletions
+4 -4
View File
@@ -23,8 +23,8 @@ function locked(slot)
end
function find_item_slot(partial)
for slot in aux.util.inventory() do
if m.matching_item(slot, partial) and not aux.util.eq(slot, m.state.target_slot) then
for slot in inventory() do
if m.matching_item(slot, partial) and not eq(slot, m.state.target_slot) then
return slot
end
end
@@ -36,7 +36,7 @@ function matching_item(slot, partial)
end
function find_empty_slot()
for slot, type in aux.util.inventory() do
for slot, type in inventory() do
if type == 1 and not GetContainerItemInfo(unpack(slot)) then
return slot
end
@@ -44,7 +44,7 @@ function find_empty_slot()
end
function find_charge_item_slot()
for slot in aux.util.inventory() do
for slot in inventory() do
if m.matching_item(slot) and m.charges(slot) == m.state.target_size then
return slot
end