From 314e66812bbc136a366ab3e15fb5da13ea4f369d Mon Sep 17 00:00:00 2001 From: Manuel Simon Hirsig Date: Fri, 14 Oct 2016 02:31:45 +0200 Subject: [PATCH] module refactoring --- core/cache.lua | 2 +- core/slash.lua | 16 ++++++++-------- gui/auction_listing.lua | 12 ++++++------ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/core/cache.lua b/core/cache.lua index 56e3282..cfaa9e8 100644 --- a/core/cache.lua +++ b/core/cache.lua @@ -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 diff --git a/core/slash.lua b/core/slash.lua index 769c13c..35e369d 100644 --- a/core/slash.lua +++ b/core/slash.lua @@ -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 diff --git a/gui/auction_listing.lua b/gui/auction_listing.lua index 2407f05..ab0c7c4 100644 --- a/gui/auction_listing.lua +++ b/gui/auction_listing.lua @@ -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,