bugfix and refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-09-04 04:18:21 +02:00
parent 10f8890e78
commit 3d14d895fa
35 changed files with 51 additions and 57 deletions
+5 -4
View File
@@ -1,17 +1,18 @@
--aux_account_settings = {} -- TODO clean up the mess of savedvariables
--aux_character_settings = {}
do
local modules = {}
do local modules = {}
local mt = {__metatable=false, __index=function(_, key) return modules[key].I end, __newindex=error}
aux = function(name)
if not modules[name] then
(function()
modules[name] = module and M
import (green_t)
private.aux = setmetatable({}, {__metatable=false, __index=function(_, key) return modules[key].I end, __newindex=error})
private.aux = setmetatable(t, mt)
end)()
end
modules[name].import (modules.core.I)
modules[name].private()
setfenv(2, modules[name])
end
end
@@ -60,7 +61,7 @@ end
-- end
--end
aux 'core' private()
aux 'core'
public.version = '5.0.0'
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'core' private()
aux 'core'
event_frame = CreateFrame('Frame')
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'cache' private() local info, persistence = aux.info, aux.persistence
aux 'cache' local info, persistence = aux.info, aux.persistence
MIN_ITEM_ID = 1
MAX_ITEM_ID = 30000
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'disenchant' private()
aux 'disenchant'
UNCOMMON, RARE, EPIC = 2, 3, 4
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'history' private() local persistence = aux.persistence
aux 'history' local persistence = aux.persistence
local history_schema = {'record', '#', {next_push='number'}, {daily_min_buyout='number'}, {daily_max_price='number'}, {data_points={'list', ';', {'record', '@', {market_value='number'}, {time='number'}}}} }
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'post' private()
aux 'post'
local state = nil
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'scan' private() local info, history = aux.info, aux.history
aux 'scan' local info, history = aux.info, aux.history
PAGE_SIZE = 50
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'slash' private() local persistence = aux.persistence
aux 'slash' local persistence = aux.persistence
_G.SLASH_AUX1 = '/aux'
function _G.SlashCmdList.AUX(command)
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'stack' private() local info = aux.info
aux 'stack' local info = aux.info
local state
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'tooltip' private() local info, disenchant, cache, money, history = aux.info, aux.disenchant, aux.cache, aux.money, aux.history
aux 'tooltip' local info, disenchant, cache, money, history = aux.info, aux.disenchant, aux.cache, aux.money, aux.history
_G.aux_tooltip_value = true
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'core' private() local gui = aux.gui
aux 'core' local gui = aux.gui
function LOAD()
for _, info in tab_info do tabs:create_tab(info.name) end
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'auction_listing' private() local gui, sorting, money, info = aux.gui, aux.sorting, aux.money, aux.info
aux 'auction_listing' local gui, sorting, money, info = aux.gui, aux.sorting, aux.money, aux.info
_G.aux_price_per_unit = false
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'gui' private()
aux 'gui'
function LOAD()
do
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'item_listing' private() local gui, info = aux.gui, aux.info
aux 'item_listing' local gui, info = aux.gui, aux.info
local ROW_HEIGHT = 39
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'listing' private() local gui = aux.gui
aux 'listing' local gui = aux.gui
local ST_COUNT = 0
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'auctions_tab' private() local scan = aux.scan
aux 'auctions_tab' local scan = aux.scan
auction_records = t
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'auctions_tab' private() local gui, auction_listing = aux.gui, aux.auction_listing
aux 'auctions_tab' local gui, auction_listing = aux.gui, aux.auction_listing
function create_frames()
frame = CreateFrame('Frame', nil, aux_frame)
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'bids_tab' private() local scan = aux.scan
aux 'bids_tab' local scan = aux.scan
auction_records = t
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'bids_tab' private() local gui, auction_listing = aux.gui, aux.auction_listing
aux 'bids_tab' local gui, auction_listing = aux.gui, aux.auction_listing
function create_frames()
frame = CreateFrame('Frame', nil, aux_frame)
+12 -15
View File
@@ -1,4 +1,4 @@
aux 'post_tab' private() local scan, scan_util, history, info, persistence, item_listing, al, sorting = aux.scan, aux.scan_util, aux.history, aux.info, aux.persistence, aux.item_listing, aux.auction_listing, aux.sorting
aux 'post_tab' local scan, scan_util, history, info, persistence, item_listing, al, sorting = aux.scan, aux.scan_util, aux.history, aux.info, aux.persistence, aux.item_listing, aux.auction_listing, aux.sorting
local DURATION_4, DURATION_8, DURATION_24 = 120, 480, 1440
@@ -32,21 +32,18 @@ end
local scan_id, inventory_records, existing_auctions = 0, t, t
do
local item
selected_item
{
get = function() return item end,
set = function(v) item = v end,
}
function refresh_button_click()
aux.scan.abort(scan_id)
refresh_entries()
refresh = true
end
do
local c = 0
refresh
{
get = function() return c end,
set = function(v) c = v end,
}
do local item
selected_item {get=function() return item end, set=function(v) item = v end}
end
do local c = 0
refresh {get=function() return c end, set=function(v) c = v end}
end
function LOAD()
+2 -6
View File
@@ -1,4 +1,4 @@
aux 'post_tab' private() local gui, listing, item_listing, money, search_tab = aux.gui, aux.listing, aux.item_listing, aux.money, aux.search_tab
aux 'post_tab' local gui, listing, item_listing, money, search_tab = aux.gui, aux.listing, aux.item_listing, aux.money, aux.search_tab
function create_frames()
frame = CreateFrame('Frame', nil, aux_frame)
@@ -103,11 +103,7 @@ function create_frames()
btn:SetWidth(80)
btn:SetHeight(24)
btn:SetText('Refresh')
btn:SetScript('OnClick', function()
aux.scan.abort(scan_id)
refresh_entries()
refresh = true
end)
btn:SetScript('OnClick', refresh_button_click)
refresh_button = btn
end
do
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'search_tab' private() local scan, scan_util = aux.scan, aux.scan_util
aux 'search_tab' local scan, scan_util = aux.scan, aux.scan_util
StaticPopupDialogs['AUX_SEARCH_TABLE_FULL'] = {
text = 'Table full!\nFurther results from this search will still be processed but no longer displayed in the table.',
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'search_tab' private() local filter_util = aux.filter_util
aux 'search_tab' local filter_util = aux.filter_util
function valid_level(str)
local level = tonumber(str)
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'search_tab' private() local gui, completion, listing, auction_listing, filter_util = aux.gui, aux.completion, aux.listing, aux.auction_listing, aux.filter_util
aux 'search_tab' local gui, completion, listing, auction_listing, filter_util = aux.gui, aux.completion, aux.listing, aux.auction_listing, aux.filter_util
FILTER_SPACING = 28.5
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'search_tab' private() local info, scan = aux.info, aux.scan
aux 'search_tab' local info, scan = aux.info, aux.scan
_G.aux_auto_buy_filter = ''
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'search_tab' private()
aux 'search_tab'
_G.aux_favorite_searches = t
_G.aux_recent_searches = t
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'core' private()
aux 'core'
COLORS = {
text = {enabled = {255, 254, 250, 1}, disabled = {147, 151, 139, 1}},
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'completion' private() local filter_util = aux.filter_util
aux 'completion' local filter_util = aux.filter_util
function public:complete_filter()
if IsControlKeyDown() then -- TODO problem is ctrl-v, maybe find a better solution
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'core' private()
aux 'core'
public.join = _G.table.concat
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'filter_util' private() local info = aux.info
aux 'filter_util' local info = aux.info
function default_filter(str)
return {
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'info' private()
aux 'info'
CreateFrame('GameTooltip', 'AuxTooltip', nil, 'GameTooltipTemplate')
AuxTooltip:SetScript('OnTooltipAddMoney', function()
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'money' private()
aux 'money'
public()
GOLD_TEXT = '|cffffd70ag|r'
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'persistence' private()
aux 'persistence'
_G.aux_datasets = t
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'scan_util' private() local info , filter_util = aux.info, aux.filter_util
aux 'scan_util' local info , filter_util = aux.info, aux.filter_util
function public.find(auction_record, status_bar, on_abort, on_failure, on_success)
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'sorting' private()
aux 'sorting'
public()