refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-28 21:39:53 +02:00
parent cf79cfd8cd
commit 4b8b0cd9d0
7 changed files with 26 additions and 28 deletions
+2 -2
View File
@@ -88,7 +88,7 @@ end
function update_inventory_listing()
if not ACTIVE then return end
item_listing.populate(inventory_listing, values(filter(inventory_records, function(record)
item_listing.populate(inventory_listing, values(filter(copy(inventory_records), function(record)
local settings = read_settings(record.key)
return record.aux_quantity > 0 and (not settings.hidden or show_hidden_checkbox:GetChecked())
end)))
@@ -168,7 +168,7 @@ function update_auction_listing()
end
function public.select_item(item_key)
for _, inventory_record in filter(inventory_records, function(record) return record.aux_quantity > 0 end) do
for _, inventory_record in filter(copy(inventory_records), function(record) return record.aux_quantity > 0 end) do
if inventory_record.key == item_key then
set_item(inventory_record)
return