This commit is contained in:
Manuel Simon Hirsig
2016-09-03 18:35:41 +02:00
parent 9826acf9bc
commit 05fd1587cd
37 changed files with 140 additions and 201 deletions
+7 -5
View File
@@ -5,10 +5,12 @@ do
local modules = {} local modules = {}
aux = function(name) aux = function(name)
if not modules[name] then if not modules[name] then
module() (function()
modules[name] = M _ = module
import (green_t) modules[name] = M
private.aux = setmetatable({}, {__metatable=false, __index=function(_, key) return modules[key].I end, __newindex=error}) import (green_t)
private.aux = setmetatable({}, {__metatable=false, __index=function(_, key) return modules[key].I end, __newindex=error})
end)()
end end
modules[name].import (modules.core.I) modules[name].import (modules.core.I)
setfenv(2, modules[name]) setfenv(2, modules[name])
@@ -59,7 +61,7 @@ end
-- end -- end
--end --end
aux 'core' aux 'core' private()
public.version = '5.0.0' public.version = '5.0.0'
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'core' aux 'core' private()
event_frame = CreateFrame('Frame') event_frame = CreateFrame('Frame')
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'cache' local info, persistence = aux.info, aux.persistence aux 'cache' private() local info, persistence = aux.info, aux.persistence
MIN_ITEM_ID = 1 MIN_ITEM_ID = 1
MAX_ITEM_ID = 30000 MAX_ITEM_ID = 30000
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'disenchant' aux 'disenchant' private()
UNCOMMON, RARE, EPIC = 2, 3, 4 UNCOMMON, RARE, EPIC = 2, 3, 4
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'history' local persistence = aux.persistence aux 'history' private() 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'}}}} } 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' aux 'post' private()
local state = nil local state = nil
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'scan' local info, history = aux.info, aux.history aux 'scan' private() local info, history = aux.info, aux.history
PAGE_SIZE = 50 PAGE_SIZE = 50
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'slash' local persistence = aux.persistence aux 'slash' private() local persistence = aux.persistence
_G.SLASH_AUX1 = '/aux' _G.SLASH_AUX1 = '/aux'
function _G.SlashCmdList.AUX(command) function _G.SlashCmdList.AUX(command)
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'stack' local info = aux.info aux 'stack' private() local info = aux.info
local state local state
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'tooltip' local info, disenchant, cache, money, history = aux.info, aux.disenchant, aux.cache, aux.money, aux.history aux 'tooltip' private() local info, disenchant, cache, money, history = aux.info, aux.disenchant, aux.cache, aux.money, aux.history
_G.aux_tooltip_value = true _G.aux_tooltip_value = true
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'core' local gui = aux.gui aux 'core' private() local gui = aux.gui
function LOAD() function LOAD()
for _, info in tab_info do tabs:create_tab(info.name) end for _, info in tab_info do tabs:create_tab(info.name) end
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'auction_listing' local gui, sorting, money, info = aux.gui, aux.sorting, aux.money, aux.info aux 'auction_listing' private() local gui, sorting, money, info = aux.gui, aux.sorting, aux.money, aux.info
_G.aux_price_per_unit = false _G.aux_price_per_unit = false
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'gui' aux 'gui' private()
function LOAD() function LOAD()
do do
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'item_listing' local gui, info = aux.gui, aux.info aux 'item_listing' private() local gui, info = aux.gui, aux.info
local ROW_HEIGHT = 39 local ROW_HEIGHT = 39
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'listing' local gui = aux.gui aux 'listing' private() local gui = aux.gui
local ST_COUNT = 0 local ST_COUNT = 0
+50 -97
View File
@@ -1,138 +1,91 @@
--__.green_t = function() green_t = module
if module 'green_t' then return end local next, setn, type, setmetatable = next, table.setn, type, setmetatable
local wipe, recycle, table, temp_table
local wipe_chunk = [[ local pool, pool_size, overflow_pool, tmp = {}, 0, setmetatable({}, {__mode='k'}), {}
CreateFrame('Frame'):SetScript('OnUpdate', function()
for t in tmp do recycle(t) end; wipe(tmp)
end)
function wipe(t)
setmetatable(t, nil); setn(t, 0)
for k in t do t[k] = nil end for k in t do t[k] = nil end
t.reset, t.reset = nil, 1 t.reset, t.reset = nil, 1
setn(t, 0) end
setmetatable(t, nil) public.wipe = wipe
]]
local recycle_chunk = wipe_chunk..[[ function recycle(t)
wipe(t); tmp[wipe(t)] = nil
if pool_size < 50 then if pool_size < 50 then
pool_size = pool_size + 1 pool_size = pool_size + 1
pool[pool_size] = t pool[pool_size] = t
else else
overflow_pool[t] = true overflow_pool[t] = true
end end
]] end
public.recycle = recycle
local acquire_chunk = [[ function table()
local t
if pool_size > 0 then if pool_size > 0 then
t = pool[pool_size]
pool_size = pool_size - 1 pool_size = pool_size - 1
else return pool[pool_size + 1]
t = next(overflow_pool)
if t then
overflow_pool[t] = nil
else
t = {}
end
end end
]] local t = next(overflow_pool)
if t then overflow_pool[t] = nil; return t end
return {}
end
public.t.get = table
pool, pool_size, overflow_pool, tmp = {}, 0, setmetatable({}, {__mode='k'}), {} function temp_table() local t = table(); tmp[t] = true; return t end
public.tt.get = temp_table
public.empty = setmetatable({}, {__metatable=false, __newindex=nop}) do local mt = {__metatable=false, __newindex=error}
function public.empty.get() return setmetatable(temp_table, mt) end
--select(1, 2, 3, END, kek()) -- TODO
do
local f = loadstring([[
local setmetatable, setn = setmetatable, table.setn
return function(t)
]]..wipe_chunk..'return t end')
setfenv(f, M)
public.wipe = f()
end end
do do local f, mt
local f = loadstring([[ f = function(_, v) if type(v) == 'table' then tmp[v] = true end return v end
local setmetatable, setn, pool, pool_size, overflow_pool = setmetatable, table.setn, pool, pool_size, overflow_pool mt = {__metatable=false, __call=f, __sub=f}
return function(t) public.temp {get=function() return setmetatable(temp_table(), mt) end, set=function(t) tmp[t] = true end}
]]..recycle_chunk..'end')
setfenv(f, M)
public.recycle = f()
end end
do local f, mt
do f = function(_, v) if type(v) == 'table' then tmp[v] = nil end return v end
local f = loadstring(format([[ mt = {__metatable=false, __call=f, __sub=f}
local setmetatable, setn, pool, pool_size, overflow_pool, t = setmetatable, table.setn, pool, pool_size, overflow_pool, tmp public.perm {get=function() return setmetatable(temp_table(), mt) end, set=function(t) tmp[t] = nil end}
return function() for t in t do %s end %s end
]], recycle_chunk, wipe_chunk))
setfenv(f, M)
CreateFrame'Frame':SetScript('OnUpdate', f())
end
do
local f = loadstring(format([[
local next, pool, pool_size, overflow_pool, tmp = next, pool, pool_size, overflow_pool, tmp
return function() %s; tmp[t] = true; return t end
]], acquire_chunk))
setfenv(f, M)
public.tt.get = f()
end
do local next, pool, pool_size, overflow_pool = next, pool, pool_size, overflow_pool
function public.t.get()
if pool_size > 0 then
pool_size = pool_size - 1
return pool[pool_size + 1]
end
local t = next(overflow_pool)
if t then
overflow_pool[t] = nil
return t
end
return {}
end
end
do local setmetatable, type, tmp = setmetatable, type, tmp
do local f, mt
f = function(_, v) if type(v) == 'table' then tmp[v] = true end return v end
mt = {__call=f, __sub=f}
public.temp {get=function() return setmetatable(tt, mt) end, set=function(t) tmp[t] = true end}
end
do local f, mt
f = function(_, v) if type(v) == 'table' then tmp[v] = nil end return v end
mt = {__call=f, __sub=f}
public.perm {get=function() return setmetatable(tt, mt) end, set=function(t) tmp[t] = nil end}
end
end end
do do
local SET, ARRAY, ARRAY0, TABLE = 1, 2, 3, 4 local SET, ARRAY, ARRAY0, TABLE = 1, 2, 3, 4
local function insert(type) local function insert(type)
local chunk = 'local setn, error = table.setn, error; return function(' local chunk = 'setmetatable(t, nil); local setn, error = table.setn, error; return function(t'
for i = 1, 99 do chunk = chunk..'a'..i..',' end for i = 1, 98 do chunk = chunk..',a'..i end
chunk = chunk..'overflow)'..acquire_chunk chunk = chunk..',overflow)'
if type == SET then if type == SET then
for i = 1, 99 do for i = 1, 98 do
chunk = chunk..format('if a%d == nil then return t end t[a%d] = true;', i, i) chunk = chunk..format('if a%d == nil then return t end t[a%d] = true;', i, i)
end end
elseif type == ARRAY then elseif type == ARRAY then
chunk = chunk..'setn(t, 99); if a1 == nil then return t end t[1] = a1;' chunk = chunk..'setn(t, 99); if a1 == nil then return t end t[1] = a1;'
for i = 2, 99 do for i = 2, 98 do
chunk = chunk..format('if a%d == nil then setn(t, %d); return t end t[%d] = a%d;', i, i - 1, i, i) chunk = chunk..format('if a%d == nil then setn(t, %d); return t end t[%d] = a%d;', i, i - 1, i, i)
end end
elseif type == ARRAY0 then elseif type == ARRAY0 then
chunk = chunk..'setn(t, 99);' chunk = chunk..'setn(t, 99);'
for i = 1, 99 do for i = 1, 98 do chunk = chunk..format('t[%d] = a%d;', i, i) end
chunk = chunk..format('t[%d] = a%d;', i, i)
end
elseif type == TABLE then elseif type == TABLE then
for i = 1, 97, 2 do for i = 1, 97, 2 do
chunk = chunk..format('if a%d == nil then return t end t[a%d] = a%d;', i, i, i + 1) chunk = chunk..format('if a%d == nil then return t end t[a%d] = a%d;', i, i, i + 1)
end end
end end
chunk = chunk..'return overflow ~= nil and error("Overflow.") or t end' chunk = chunk..'return overflow ~= nil and error("Overflow.") or t end'
local f = loadstring(chunk) local f = loadstring(chunk); setfenv(f, M); return f()
setfenv(f, M)
return f()
end end
public(); S, A, A0, T = insert(SET), insert(ARRAY), insert(ARRAY0), insert(TABLE) local function getter(type)
end local mt = {__metatable=false, __newindex=error, __call=insert(type)}
function mt:__index(t) recycle(self); return setmetatable(mt, t) end
--end return function() return setmetatable(t, mt) end
end
public(); S, A, A0, T = {get=getter(SET)}, {get=getter(ARRAY)}, {get=getter(ARRAY0)}, {get=getter(TABLE)}
end
+49 -65
View File
@@ -1,20 +1,19 @@
if module then return end if module then return end
local type, getmetatable, setmetatable, setfenv, unpack, next, _G = type, getmetatable, setmetatable, setfenv, unpack, next, getfenv(0) local setfenv, getmetatable, setmetatable, type, unpack, next, _G = setfenv, getmetatable, setmetatable, type, unpack, next, getfenv(0)
local PUBLIC, PRIVATE = 1, 2 local PUBLIC, PRIVATE = 1, 2
local CALL, INDEX, NEWINDEX = 1, 2, 3 local FIELD, INDEX, NEWINDEX = 1, 2, 3
do local inspect
local function print(msg) DEFAULT_CHAT_FRAME:AddMessage(RED_FONT_COLOR_CODE..msg) end do local function print(msg) DEFAULT_CHAT_FRAME:AddMessage(RED_FONT_COLOR_CODE..msg) end
p = setmetatable({}, { inspect = setmetatable({}, {
__call=function(_, ...) __call=function(_, ...)
for i = 1, arg.n do for i = 1, arg.n do
if type(arg[i]) == 'table' then print('arg'..i..' = '..(type(arg[i]) == 'string' and '"'..arg[i]..'"' or tostring(arg[i])))
print('arg'..i..' = {') if type(arg[i]) == 'table' and next(arg[i]) then
for k, v in arg[i] do print(format(' %s: %s = %s', type(k) == 'string' and k or '['..tostring(k)..']', type(v), tostring(v))) end print('{')
for k, v in arg[i] do print(' '..(type(k) == 'string' and k or '['..tostring(k)..']')..' = '..(type(v) == 'string' and '"'..v..'"' or tostring(v))) end
print('}') print('}')
else
print(format('arg%d: %s = %s', i, type(arg[i]), tostring(arg[i])))
end end
end end
return unpack(arg) return unpack(arg)
@@ -22,6 +21,7 @@ do
__pow=function(self, v) self(v); return v end, __pow=function(self, v) self(v); return v end,
}) })
end end
p = inspect -- TODO
local function error(msg, ...) return _G.error(format(msg or '', unpack(arg))..'\n'..debugstack(), 0) end local function error(msg, ...) return _G.error(format(msg or '', unpack(arg))..'\n'..debugstack(), 0) end
local function import_error() error('Import error.') end local function import_error() error('Import error.') end
@@ -29,9 +29,9 @@ local function declaration_error() error('Declaration error.') end
local function collision_error(key) error('"%s" already exists.', key) end local function collision_error(key) error('"%s" already exists.', key) end
local function nil_error(key) if key then error('"%s" is nil.', key) else error('Callee is nil') end end local function nil_error(key) if key then error('"%s" is nil.', key) else error('Callee is nil') end end
local nop, const = function() end, function(v) return function() return v end end local nop = function() end
local function prototype() local eq = const(true) local function prototype() local eq = function() return true end
return setmetatable({__metatable=false, __eq=eq}, {__metatable=false, __eq=eq, __call=function(self, t) return setmetatable(t, self) end}) return setmetatable({__metatable=false, __eq=eq}, {__metatable=false, __eq=eq, __call=function(self, t) return setmetatable(t, self) end})
end end
@@ -40,38 +40,26 @@ local INTERFACE, ENVIRONMENT, DECLARATOR = prototype(), prototype(), prototype()
local state = {} local state = {}
function INTERFACE:__index(key) self=state[self] function INTERFACE:__index(key) self=state[self]
if self.access[key] == PUBLIC then return (self.access[key] == PUBLIC or nil) and self[FIELD][key] or (self[INDEX][key] or nop)()
local getter = self[INDEX][key]
if getter then return getter() else return self[CALL][key] end
end
end end
function INTERFACE:__newindex(key, value) self=state[self] function INTERFACE:__newindex(key, value) self=state[self]
if self.access[key] == PUBLIC then (self[NEWINDEX][key] or nop)(value) end return (self.access[key] == PUBLIC or nil) and (self[NEWINDEX][key] or nop)(value)
end end
function ENVIRONMENT:__index(key) self=state[self] function ENVIRONMENT:__index(key) self=state[self] local getter = self[INDEX][key]
local getter = self[INDEX][key] return self[FIELD][key] or getter and getter() or not getter and (_G[key] or self.declarator[key])
if getter then return getter() end
return self[CALL][key] or _G[key] or self.declarator[key]
end end
function ENVIRONMENT:__newindex(key, value) self=state[self] function ENVIRONMENT:__newindex(key, value) self=state[self]
if self.access[key] then if self.access[key] then (self[NEWINDEX][key] or collision_error(key))(value) else self.declarator[key] = value end
local setter = self[NEWINDEX][key] or collision_error(key)
setter(value)
else
self.declarator[key] = value
end
end end
ENVIRONMENT.__call = nop -- TODO
do do
local ACCESS, EVENT = {public=PUBLIC, private=PRIVATE}, {call=CALL, get=INDEX, set=NEWINDEX} local ACCESS, EVENT = {public=PUBLIC, private=PRIVATE}, {value=FIELD, get=INDEX, set=NEWINDEX}
local function declare(self, access, name, handlers) local function declare(self, access, name, value)
self.access[name] = self.access[name] and collision_error(name) or access or self.default_access self.access[name] = (not self.access[name] or collision_error(name)) and access or self.default_access or declaration_error()
for event, handler in handlers do for k, v in value do
if type(handler) ~= 'function' and (event == INDEX or declaration_error()) then if v and (k == FIELD or type(v) == 'function') or declaration_error() then self[k][name] = v end
handler = const(handler)
end
self[event][name] = handler
end end
end end
function DECLARATOR:__index(key) self=state[self]; local name, access = self.declaration_name, self.declaration_access function DECLARATOR:__index(key) self=state[self]; local name, access = self.declaration_name, self.declaration_access
@@ -82,50 +70,46 @@ do
end end
return self.declarator return self.declarator
end end
function DECLARATOR:__newindex(key, value) self=state[self] function DECLARATOR:__newindex(key, value) self=state[self]; local name, access = self.declaration_name, self.declaration_access
local name, event = self.declaration_name, nil if name then declare(self, access, name, {[EVENT[key] or nil_error(name)]=value})
if name then elseif access or self.default_access then declare(self, access, key, {[FIELD]=value})
event = EVENT[key] or nil_error(name) else _G[key] = (not _G[key] or collision_error(key)) and value end -- G.error(nil) TODO silent error?
else
name, event = key, type(value) == 'function' and CALL or INDEX
end
declare(self, self.declaration_access, name, {[event]=value})
self.declaration_access, self.declaration_name = nil, nil self.declaration_access, self.declaration_name = nil, nil
end end
function DECLARATOR:__call(v) self=state[self]; local name, access = self.declaration_name, self.declaration_access function DECLARATOR:__call(v) self=state[self]; local name, access = self.declaration_name, self.declaration_access
if name then if name then
if type(v) ~= 'table' or getmetatable(v) ~= nil then (access and declaration_error() or nil_error)(name) end if type(v) ~= 'table' or getmetatable(v) ~= nil then (access and declaration_error() or nil_error)(name) end
local f, getter, setter; f, getter, setter, v.call, v.get, v.set = v.call, v.get, v.set, nil, nil, nil local value, getter, setter; value, getter, setter, v.value, v.get, v.set = v.value, v.get, v.set, nil, nil, nil
if next(v) or f ~= nil and getter ~= nil then (access and declaration_error() or nil_error)(name) end if next(v) or value ~= nil and getter ~= nil then (access and declaration_error() or nil_error)(name) end
declare(self, access, name, {[CALL]=f, [INDEX]=getter, [NEWINDEX]=setter}) declare(self, access, name, {[FIELD]=value, [INDEX]=getter, [NEWINDEX]=setter})
elseif access or nil_error() then elseif access or nil_error() then self.default_access = access end
self.default_access = access
end
self.declaration_access, self.declaration_name = nil, nil self.declaration_access, self.declaration_name = nil, nil
end end
DECLARATOR.__tostring = function() return 'NIL' end
end end
local function import(self, interface) local function import(self, interface)
local module = (interface == INTERFACE or import_error()) and state[interface] local module = (interface == INTERFACE or import_error()) and state[interface]
for k, v in module.access do for k, v in module.access do
if v == PUBLIC and not self.access[k] then if v == PUBLIC and not self.access[k] then
self.access[k], self[CALL][k], self[INDEX][k], self[NEWINDEX][k] = PRIVATE, module[CALL][k], module[INDEX][k], module[NEWINDEX][k] self.access[k], self[FIELD][k], self[INDEX][k], self[NEWINDEX][k] = PRIVATE, module[FIELD][k], module[INDEX][k], module[NEWINDEX][k]
end end
end end
end end
function module(name) setmetatable(_G, {
if name and _G[name] then return true end __index = function(_, key)
local interface, env, declarator = INTERFACE {}, ENVIRONMENT {}, DECLARATOR {} if key ~= 'module' then return nil end
local self; self = { local interface, environment, declarator = INTERFACE {}, ENVIRONMENT {}, DECLARATOR {}
access = {p=PRIVATE, _=PRIVATE, error=PRIVATE, nop=PRIVATE, _G=PRIVATE, M=PRIVATE, I=PRIVATE, public=PRIVATE, private=PRIVATE}, local self; self = {
[CALL] = {p=p, import=function(interface) import(self, interface) end, error=error, nop=nop}, access = {_G=PRIVATE, I=PRIVATE, M=PRIVATE, public=PRIVATE, private=PRIVATE, import=PRIVATE, _=PRIVATE, p=PRIVATE, error=PRIVATE, nop=PRIVATE},
[INDEX] = {_G=const(_G), M=const(env), I=const(interface), public=function() return declarator.public end, private=function() return declarator.private end}, [FIELD] = {_G=_G, I=interface, M=environment, import=function(interface) import(self, interface) end, p=inspect, error=error, nop=nop},
[NEWINDEX] = {p=p, _=nop}, [INDEX] = {public=function() return declarator.public end, private=function() return declarator.private end},
declarator = declarator, [NEWINDEX] = {p=inspect, _=nop},
default_access = PRIVATE, declarator = declarator,
} }
state[interface], state[env], state[declarator] = self, self, self state[interface], state[environment], state[declarator] = self, self, self
if name then _G[name] = interface end setfenv(2, environment)
setfenv(2, env) return interface
end end,
})
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'auctions_tab' local scan = aux.scan aux 'auctions_tab' private() local scan = aux.scan
auction_records = t auction_records = t
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'auctions_tab' local gui, auction_listing = aux.gui, aux.auction_listing aux 'auctions_tab' private() local gui, auction_listing = aux.gui, aux.auction_listing
function create_frames() function create_frames()
frame = CreateFrame('Frame', nil, aux_frame) frame = CreateFrame('Frame', nil, aux_frame)
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'bids_tab' local scan = aux.scan aux 'bids_tab' private() local scan = aux.scan
auction_records = t auction_records = t
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'bids_tab' local gui, auction_listing = aux.gui, aux.auction_listing aux 'bids_tab' private() local gui, auction_listing = aux.gui, aux.auction_listing
function create_frames() function create_frames()
frame = CreateFrame('Frame', nil, aux_frame) frame = CreateFrame('Frame', nil, aux_frame)
+1 -1
View File
@@ -1,4 +1,4 @@
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 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
local DURATION_4, DURATION_8, DURATION_24 = 120, 480, 1440 local DURATION_4, DURATION_8, DURATION_24 = 120, 480, 1440
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'post_tab' local gui, listing, item_listing, money, search_tab = aux.gui, aux.listing, aux.item_listing, aux.money, aux.search_tab aux 'post_tab' private() local gui, listing, item_listing, money, search_tab = aux.gui, aux.listing, aux.item_listing, aux.money, aux.search_tab
function create_frames() function create_frames()
frame = CreateFrame('Frame', nil, aux_frame) frame = CreateFrame('Frame', nil, aux_frame)
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'search_tab' local scan, scan_util = aux.scan, aux.scan_util aux 'search_tab' private() local scan, scan_util = aux.scan, aux.scan_util
StaticPopupDialogs['AUX_SEARCH_TABLE_FULL'] = { StaticPopupDialogs['AUX_SEARCH_TABLE_FULL'] = {
text = 'Table full!\nFurther results from this search will still be processed but no longer displayed in the table.', 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' local filter_util = aux.filter_util aux 'search_tab' private() local filter_util = aux.filter_util
function valid_level(str) function valid_level(str)
local level = tonumber(str) local level = tonumber(str)
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'search_tab' local gui, completion, listing, auction_listing, filter_util = aux.gui, aux.completion, aux.listing, aux.auction_listing, aux.filter_util aux 'search_tab' private() local gui, completion, listing, auction_listing, filter_util = aux.gui, aux.completion, aux.listing, aux.auction_listing, aux.filter_util
FILTER_SPACING = 28.5 FILTER_SPACING = 28.5
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'search_tab' local info, scan = aux.info, aux.scan aux 'search_tab' private() local info, scan = aux.info, aux.scan
_G.aux_auto_buy_filter = '' _G.aux_auto_buy_filter = ''
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'search_tab' aux 'search_tab' private()
_G.aux_favorite_searches = t _G.aux_favorite_searches = t
_G.aux_recent_searches = t _G.aux_recent_searches = t
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'core' aux 'core' private()
COLORS = { COLORS = {
text = {enabled = {255, 254, 250, 1}, disabled = {147, 151, 139, 1}}, text = {enabled = {255, 254, 250, 1}, disabled = {147, 151, 139, 1}},
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'completion' local filter_util = aux.filter_util aux 'completion' private() local filter_util = aux.filter_util
function public:complete_filter() function public:complete_filter()
if IsControlKeyDown() then -- TODO problem is ctrl-v, maybe find a better solution if IsControlKeyDown() then -- TODO problem is ctrl-v, maybe find a better solution
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'core' aux 'core' private()
public.join = _G.table.concat public.join = _G.table.concat
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'filter_util' local info = aux.info aux 'filter_util' private() local info = aux.info
function default_filter(str) function default_filter(str)
return { return {
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'info' aux 'info' private()
CreateFrame('GameTooltip', 'AuxTooltip', nil, 'GameTooltipTemplate') CreateFrame('GameTooltip', 'AuxTooltip', nil, 'GameTooltipTemplate')
AuxTooltip:SetScript('OnTooltipAddMoney', function() AuxTooltip:SetScript('OnTooltipAddMoney', function()
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'money' aux 'money' private()
public() public()
GOLD_TEXT = '|cffffd70ag|r' GOLD_TEXT = '|cffffd70ag|r'
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'persistence' aux 'persistence' private()
_G.aux_datasets = t _G.aux_datasets = t
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'scan_util' local info , filter_util = aux.info, aux.filter_util aux 'scan_util' private() local info , filter_util = aux.info, aux.filter_util
function public.find(auction_record, status_bar, on_abort, on_failure, on_success) function public.find(auction_record, status_bar, on_abort, on_failure, on_success)
+1 -1
View File
@@ -1,4 +1,4 @@
aux 'sorting' aux 'sorting' private()
public() public()