module refactoring

This commit is contained in:
Manuel Simon Hirsig
2016-10-14 02:31:45 +02:00
parent fcdbe9cb2c
commit 314e66812b
3 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -196,7 +196,7 @@ end
function public.populate_wdb(item_id)
item_id = item_id or MIN_ITEM_ID
if item_id > MAX_ITEM_ID then
print 'Cache populated.'
print'Cache populated.'
return
end
if not GetItemInfo('item:' .. item_id) then
+8 -8
View File
@@ -8,30 +8,30 @@ local cache = require 'aux.core.cache'
_G.aux_ignore_owner = true
SLASH_AUX1 = '/aux'
function SlashCmdList.AUX(command)
_G.SLASH_AUX1 = '/aux'
function _G.SlashCmdList.AUX(command)
if not command then return end
local arguments = tokenize(command)
if arguments[1] == 'clear' and arguments[2] == 'history' then
persistence.dataset = nil
print 'History cleared.'
print'History cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'post' then
persistence.dataset.post = nil
print 'Post settings cleared.'
print'Post settings cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'datasets' then
_G.aux_datasets = t
print 'Datasets cleared.'
print'Datasets cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'merchant' and arguments[3] == 'buy' then
_G.aux_merchant_buy = t
print 'Merchant buy prices cleared.'
print'Merchant buy prices cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'merchant' and arguments[3] == 'sell' then
_G.aux_merchant_sell = t
print 'Merchant sell prices cleared.'
print'Merchant sell prices cleared.'
elseif arguments[1] == 'clear' and arguments[2] == 'item' and arguments[3] == 'cache' then
_G.aux_items = t
_G.aux_item_ids = t
_G.aux_auctionable_items = t
print 'Item cache cleared.'
print'Item cache cleared.'
elseif arguments[1] == 'populate' and arguments[2] == 'wdb' then
cache.populate_wdb()
elseif arguments[1] == 'tooltip' and arguments[2] == 'value' then
+6 -6
View File
@@ -25,10 +25,10 @@ local AUCTION_PCT_COLORS = {
}
local TIME_LEFT_STRINGS = {
color.red '30m', -- Short
color.orange '2h', -- Medium
color.yellow '8h', -- Long
color.blue '24h', -- Very Long
color.red'30m', -- Short
color.orange'2h', -- Medium
color.yellow'8h', -- Long
color.blue'24h', -- Very Long
}
function item_column_init(rt, cell)
@@ -516,9 +516,9 @@ public.bids_config = {
fill = function(cell, record)
local status
if record.high_bidder then
status = color.yellow('High Bidder')
status = color.yellow'High Bidder'
else
status = color.red 'Outbid'
status = color.red'Outbid'
end
cell:SetText(status)
end,