small improvements
This commit is contained in:
+4
-4
@@ -83,7 +83,7 @@ function private.wait_for_owner_results(c)
|
|||||||
if m.th.page == Aux.current_owner_page then
|
if m.th.page == Aux.current_owner_page then
|
||||||
return c()
|
return c()
|
||||||
else
|
else
|
||||||
Aux.control.on_next_event('AUCTION_OWNED_LIST_UPDATE', c)
|
return Aux.control.on_next_event('AUCTION_OWNED_LIST_UPDATE', c)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ function private.wait_for_list_results(c)
|
|||||||
end)
|
end)
|
||||||
local type = m.th.params.type
|
local type = m.th.params.type
|
||||||
local ignore_owner = m.th.params.ignore_owner or aux_ignore_owner
|
local ignore_owner = m.th.params.ignore_owner or aux_ignore_owner
|
||||||
Aux.control.as_soon_as(function()
|
return Aux.control.as_soon_as(function()
|
||||||
-- short circuiting order important, owner_data_complete must be called iif an update has happened.
|
-- short circuiting order important, owner_data_complete must be called iif an update has happened.
|
||||||
local ok = updated and (ignore_owner or m.owner_data_complete(type)) or last_update and GetTime() - last_update > 5
|
local ok = updated and (ignore_owner or m.owner_data_complete(type)) or last_update and GetTime() - last_update > 5
|
||||||
updated = false
|
updated = false
|
||||||
@@ -146,7 +146,7 @@ function private.scan()
|
|||||||
else
|
else
|
||||||
m.th.page = nil
|
m.th.page = nil
|
||||||
end
|
end
|
||||||
m.wait_for_callback(m.th.params.on_start_query, m.th.query_index, m.process_query)
|
return m.wait_for_callback(m.th.params.on_start_query, m.th.query_index, m.process_query)
|
||||||
else
|
else
|
||||||
local on_complete = m.th.params.on_complete
|
local on_complete = m.th.params.on_complete
|
||||||
m.threads[m.th.params.type] = nil
|
m.threads[m.th.params.type] = nil
|
||||||
@@ -196,7 +196,7 @@ function private.scan_page_helper(i)
|
|||||||
if Aux.call(m.th.params.auto_buy_validator, auction_info)/false then
|
if Aux.call(m.th.params.auto_buy_validator, auction_info)/false then
|
||||||
local c = Aux.control.await(recurse)
|
local c = Aux.control.await(recurse)
|
||||||
Aux.place_bid(auction_info.query_type, auction_info.index, auction_info.buyout_price, Aux.f(c, true))
|
Aux.place_bid(auction_info.query_type, auction_info.index, auction_info.buyout_price, Aux.f(c, true))
|
||||||
Aux.control.new_thread(Aux.control.sleep, 10, Aux.f(c, false))
|
return Aux.control.new_thread(Aux.control.sleep, 10, Aux.f(c, false))
|
||||||
elseif Aux.call(m.q.validator, auction_info)/true then
|
elseif Aux.call(m.q.validator, auction_info)/true then
|
||||||
return m.wait_for_callback(m.th.params.on_auction, auction_info, function(removed)
|
return m.wait_for_callback(m.th.params.on_auction, auction_info, function(removed)
|
||||||
if removed then
|
if removed then
|
||||||
|
|||||||
Reference in New Issue
Block a user