From e89481f3b2c70a966cc05428d8e8371c1a0f3770 Mon Sep 17 00:00:00 2001 From: Simon Hirsig Date: Wed, 28 Oct 2015 17:31:33 +0100 Subject: [PATCH] some scan changes --- scan_frame.lua | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/scan_frame.lua b/scan_frame.lua index ecb14e7..a977271 100644 --- a/scan_frame.lua +++ b/scan_frame.lua @@ -7,7 +7,7 @@ Aux.history = {} local process_auction, balanced_list, update_snapshot local get_market_price, get_usable_median, get_historical_median, get_median, get_percentile -local scanned_signatures +local price_cache function Aux.history.on_close() @@ -26,7 +26,7 @@ function Aux.history.start_scan() AuxHistoryScanButton:Hide() AuxHistoryStopButton:Show() - scanned_signatures = Aux.util.set() + price_cache = {} Aux.log('Scanning auctions ...') Aux.scan.start{ @@ -39,14 +39,12 @@ function Aux.history.start_scan() process_auction(i) end, on_complete = function() - update_snapshot() + process_scanned_prices() AuxHistoryStopButton:Hide() AuxHistoryScanButton:Show() end, on_abort = function() - update_snapshot() - AuxHistoryStopButton:Hide() AuxHistoryScanButton:Show() end, @@ -61,13 +59,9 @@ function Aux.history.start_scan() } end -function update_snapshot() - local snapshot = Aux.persistence.get_snapshot() - for _, sig in ipairs(snapshot.values()) do - if not scanned_signatures.contains(sig) then - snapshot.remove(sig) - end - end +function process_scanned_prices() + for item_key, item_data in price_cache do + end end function Aux.history.stop_scan() @@ -270,4 +264,4 @@ end function Aux.history.get_price_suggestion(key, quantity) local market_price = Aux.history.get_market_price(key) return market_price and market_price * quantity * UNDERCUT_FACTOR or 0 -end \ No newline at end of file +end