big refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-08-19 11:57:12 +02:00
parent 667990f7d8
commit 7740ba2f7a
28 changed files with 271 additions and 266 deletions
+5 -5
View File
@@ -1,7 +1,7 @@
aux.module 'bids_tab'
aux.tab(4, 'Bids')
private.auction_records = nil
auction_records = nil
function m.LOAD()
m.create_frames()
@@ -16,7 +16,7 @@ function m.CLOSE()
m.frame:Hide()
end
function private.update_listing()
function update_listing()
if not m:ACTIVE() then
return
end
@@ -53,7 +53,7 @@ function public.scan_bids()
}
end
function private.test(record)
function test(record)
return function(index)
local auction_info = aux.info.auction(index, 'bidder')
return auction_info and auction_info.search_signature == record.search_signature
@@ -66,7 +66,7 @@ do
local state = IDLE
local found_index
function private.find_auction(record)
function find_auction(record)
if not m.listing:ContainsRecord(record) then
return
end
@@ -111,7 +111,7 @@ do
)
end
function private.on_update()
function on_update()
if state == IDLE or state == SEARCHING then
m.buyout_button:Disable()
m.bid_button:Disable()