savedvariables refactoring
This commit is contained in:
+25
-20
@@ -3,6 +3,11 @@ module 'aux.core.slash'
|
||||
include 'aux'
|
||||
|
||||
local cache = require 'aux.core.cache'
|
||||
local persistence = require 'aux.util.persistence'
|
||||
|
||||
function LOAD2()
|
||||
tooltip_settings = persistence.player'tooltip'
|
||||
end
|
||||
|
||||
_G.aux_ignore_owner = true
|
||||
|
||||
@@ -26,23 +31,23 @@ function SlashCmdList.AUX(command)
|
||||
_G.aux_post_bid = not aux_post_bid
|
||||
print('post bid ' .. status(aux_post_bid))
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'value' then
|
||||
_G.aux_tooltip_value = not aux_tooltip_value
|
||||
print('tooltip value ' .. status(aux_tooltip_value))
|
||||
tooltip_settings.value = not tooltip_settings.value
|
||||
print('tooltip value ' .. status(tooltip_settings.value))
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'daily' then
|
||||
_G.aux_tooltip_daily = not aux_tooltip_daily
|
||||
print('tooltip daily ' .. status(aux_tooltip_daily))
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'vendor' and arguments[3] == 'buy' then
|
||||
_G.aux_tooltip_merchant_buy = not aux_tooltip_merchant_buy
|
||||
print('tooltip vendor buy ' .. status(aux_tooltip_merchant_buy))
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'vendor' and arguments[3] == 'sell' then
|
||||
_G.aux_tooltip_merchant_sell = not aux_tooltip_merchant_sell
|
||||
print('tooltip vendor sell ' .. status(aux_tooltip_merchant_sell))
|
||||
tooltip_settings.daily = not tooltip_settings.daily
|
||||
print('tooltip daily ' .. status(tooltip_settings.daily))
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'merchant' and arguments[3] == 'buy' then
|
||||
tooltip_settings.merchant_buy = not tooltip_settings.merchant_buy
|
||||
print('tooltip merchant buy ' .. status(tooltip_settings.merchant_buy))
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'merchant' and arguments[3] == 'sell' then
|
||||
tooltip_settings.merchant_sell = not tooltip_settings.merchant_sell
|
||||
print('tooltip merchant sell ' .. status(tooltip_settings.merchant_sell))
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'disenchant' and arguments[3] == 'value' then
|
||||
_G.aux_tooltip_disenchant_value = not aux_tooltip_disenchant_value
|
||||
print('tooltip disenchant value ' .. status(aux_tooltip_disenchant_value))
|
||||
tooltip_settings.disenchant_value = not tooltip_settings.disenchant_value
|
||||
print('tooltip disenchant value ' .. status(tooltip_settings.disenchant_value))
|
||||
elseif arguments[1] == 'tooltip' and arguments[2] == 'disenchant' and arguments[3] == 'distribution' then
|
||||
_G.aux_tooltip_disenchant_distribution = not aux_tooltip_disenchant_distribution
|
||||
print('tooltip disenchant distribution ' .. status(aux_tooltip_disenchant_distribution))
|
||||
tooltip_settings.disenchant_distribution = not tooltip_settings.disenchant_distribution
|
||||
print('tooltip disenchant distribution ' .. status(tooltip_settings.disenchant_distribution))
|
||||
elseif arguments[1] == 'clear' and arguments[2] == 'item' and arguments[3] == 'cache' then
|
||||
_G.aux_items = {}
|
||||
_G.aux_item_ids = {}
|
||||
@@ -55,12 +60,12 @@ function SlashCmdList.AUX(command)
|
||||
print('- scale [' .. color.blue(aux_scale) .. ']')
|
||||
print('- ignore owner [' .. status(aux_ignore_owner) .. ']')
|
||||
print('- post bid [' .. status(aux_post_bid) .. ']')
|
||||
print('- tooltip value [' .. status(aux_tooltip_value) .. ']')
|
||||
print('- tooltip daily [' .. status(aux_tooltip_daily) .. ']')
|
||||
print('- tooltip vendor buy [' .. status(aux_tooltip_merchant_buy) .. ']')
|
||||
print('- tooltip vendor sell [' .. status(aux_tooltip_merchant_sell) .. ']')
|
||||
print('- tooltip disenchant value [' .. status(aux_tooltip_disenchant_value) .. ']')
|
||||
print('- tooltip disenchant distribution [' .. status(aux_tooltip_disenchant_distribution) .. ']')
|
||||
print('- tooltip value [' .. status(tooltip_settings.value) .. ']')
|
||||
print('- tooltip daily [' .. status(tooltip_settings.daily) .. ']')
|
||||
print('- tooltip merchant buy [' .. status(tooltip_settings.merchant_buy) .. ']')
|
||||
print('- tooltip merchant sell [' .. status(tooltip_settings.merchant_sell) .. ']')
|
||||
print('- tooltip disenchant value [' .. status(tooltip_settings.disenchant_value) .. ']')
|
||||
print('- tooltip disenchant distribution [' .. status(tooltip_settings.disenchant_distribution) .. ']')
|
||||
print('- clear item cache')
|
||||
print('- populate wdb')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user