Mercurial > wow > inventory
changeset 155:5081056cade1
Moved prefered addon selection to the bottom of the config frames. This really is optional and advanced; you shouldn?t pay attention to it.
author | Zerotorescue |
---|---|
date | Sat, 22 Jan 2011 01:46:17 +0100 |
parents | 39df534c9856 |
children | 314943963155 |
files | Modules/Config.lua |
diffstat | 1 files changed, 396 insertions(+), 338 deletions(-) [+] |
line wrap: on
line diff
--- a/Modules/Config.lua Fri Jan 21 09:19:46 2011 +0100 +++ b/Modules/Config.lua Sat Jan 22 01:46:17 2011 +0100 @@ -284,28 +284,7 @@ local t = ""; if not addon.db.profile.defaults.hideHelp then - t = "Here you can set general settings for the currently selected group. If you do not wish to override a setting, the default setting specified in the general group will be used.\n\n"; - end - - local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); - local preferedAddon = addon:GetOptionByKey(groupName, "itemCountAddon"); - - if currentAddon then - --GetCharacterCount - --addon.supportedAddons.itemCount[selectedExternalAddon] - t = t .. "Currently using |cfffed000" .. selectedAddonName .. "|r as your item count addon. This addon is " .. ((currentAddon.IsEnabled() and "|cff00ff00enabled|r") or "|cffff0000disabled|r") .. "."; - - if currentAddon.GetTotalCount and currentAddon.GetCharacterCount then - t = t .. " This addon supports |cfffed000both total as local|r item counts."; - elseif currentAddon.GetTotalCount then - t = t .. " This addon supports |cfffed000only total|r item counts."; - elseif currentAddon.GetCharacterCount then - t = t .. " This addon supports |cfffed000only local|r item counts."; - end - - if preferedAddon ~= selectedAddonName then - t = t .. "\n\n|cffff0000You have selected |cfffed000" .. preferedAddon .. "|r|cffff0000 as your item count addon, but this appears to be disabled and thus a random alternative was selected.|r"; - end + t = "Here you can set general settings for the currently selected group. If you do not wish to override a setting, the default setting specified in the general group will be used."; end return t; @@ -317,101 +296,29 @@ name = "", hidden = function() return addon.db.profile.defaults.hideHelp; end, }, - overrideAuctionPricingAddon = { - order = 9, + overrideTrackAtCharacters = { + order = 19, type = "toggle", - name = "Override pricing addon", - desc = "Allows you to override the pricing addon setting for this group.", - arg = "auctionPricingAddon", + name = "Override track at", + desc = "Allows you to override at which characters items in this group should appear in the summary and generate alerts.", + arg = "trackAtCharacters", }, - auctionPricingAddon = { - order = 10, - type = "select", - name = "Prefered pricing addon", - desc = "Select the addon you prefer data for this group to be retrieved from. A random supported addon will be used if the selected addon can not be found.", + trackAtCharacters = { + order = 20, + type = "multiselect", + name = "Track at", + desc = "Select at which characters this should appear in the summary and generate alerts.", values = function() local temp = {}; - for name, value in pairs(addon.supportedAddons.auctionPricing) do - temp[name] = name; + for charName in pairs(addon.db.factionrealm.characters) do + temp[charName] = charName; end return temp; end, - set = function(info, value) - local groupName = groupIdToName[info[2]]; - local optionName = info[#info]; - - addon.db.profile.groups[groupName][optionName] = value ~= "" and value; - - if addon.supportedAddons.auctionPricing[value].OnSelect then - addon.supportedAddons.auctionPricing[value].OnSelect(); - end - end, - arg = "overrideAuctionPricingAddon", - }, - overrideItemCountAddon = { - order = 19, - type = "toggle", - name = "Override item count addon", - desc = "Allows you to override the item count addon setting for this group.", - arg = "itemCountAddon", - }, - itemCountAddon = { - order = 20, - type = "select", - name = "Prefered item count addon", - desc = "Select the addon you prefer data for this group to be retrieved from. A random supported addon will be used if the selected addon can not be found.", - values = function() - local temp = {}; - for name, value in pairs(addon.supportedAddons.itemCount) do - temp[name] = name; - end - - return temp; - end, - set = function(info, value) - local groupName = groupIdToName[info[2]]; - local optionName = info[#info]; - - addon.db.profile.groups[groupName][optionName] = value ~= "" and value; - - if addon.supportedAddons.itemCount[value].OnSelect then - addon.supportedAddons.itemCount[value].OnSelect(); - end - end, - arg = "overrideItemCountAddon", - }, - overrideCraftingAddon = { - order = 29, - type = "toggle", - name = "Override crafting addon", - desc = "Allows you to override the crafting addon setting for this group.", - arg = "craftingAddon", - }, - craftingAddon = { - order = 30, - type = "select", - name = "Prefered crafting addon", - desc = "Select the addon you prefer data from this group to be queued into. A random supported addon will be used if the selected addon can not be found.", - values = function() - local temp = {}; - for name, value in pairs(addon.supportedAddons.crafting) do - temp[name] = name; - end - - return temp; - end, - set = function(info, value) - local groupName = groupIdToName[info[2]]; - local optionName = info[#info]; - - addon.db.profile.groups[groupName][optionName] = value ~= "" and value; - - if addon.supportedAddons.crafting[value].OnSelect then - addon.supportedAddons.crafting[value].OnSelect(); - end - end, - arg = "overrideCraftingAddon", + get = GetMultiOption, + dialogControl = "Dropdown", -- this is not standard, normal multiselect control gives us a list of all chars with toggle-boxes. UGLY! We want a multiselect-box instead. + arg = "overrideTrackAtCharacters", }, overrideLocalItemData = { order = 39, @@ -585,30 +492,6 @@ desc = "Show items in the summary when below the specified percentage of the minimum stock.\n\nYou can manually enter a value between 1.000% and 10.000% in the edit box if the provided range is insufficient.", arg = "overrideSummaryThresholdShow", }, - overrideTrackAtCharacters = { - order = 39, - type = "toggle", - name = "Override track at", - desc = "Allows you to override at which characters items in this group should appear in the summary and generate alerts.", - arg = "trackAtCharacters", - }, - trackAtCharacters = { - order = 40, - type = "multiselect", - name = "Track at", - desc = "Select at which characters this should appear in the summary and generate alerts.", - values = function() - local temp = {}; - for charName in pairs(addon.db.factionrealm.characters) do - temp[charName] = charName; - end - - return temp; - end, - get = GetMultiOption, - dialogControl = "Dropdown", -- this is not standard, normal multiselect control gives us a list of all chars with toggle-boxes. UGLY! We want a multiselect-box instead. - arg = "overrideTrackAtCharacters", - }, }, }, refill = { @@ -746,6 +629,154 @@ }, }, }, + addons = { + order = 30, + type = "group", + inline = true, + name = "Prefered addons", + set = SetOption, + get = GetOption, + disabled = GetDisabled, + args = { + description = { + order = 0, + type = "description", + name = function(info) + local groupName = groupIdToName[info[2]]; + + local t = ""; + if not addon.db.profile.defaults.hideHelp then + t = "Selecting your prefered addons is optional, the first working addon will be used if the selected addon doesn't exist. You only need to set this when you are running multiple addons of a kind and wish to specify which addons to use for what groups.\n\n"; + end + + local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); + local preferedAddon = addon:GetOptionByKey(groupName, "itemCountAddon"); + + if currentAddon then + --GetCharacterCount + --addon.supportedAddons.itemCount[selectedExternalAddon] + t = t .. "Currently using |cfffed000" .. selectedAddonName .. "|r as your item count addon. This addon is " .. ((currentAddon.IsEnabled() and "|cff00ff00enabled|r") or "|cffff0000disabled|r") .. "."; + + if currentAddon.GetTotalCount and currentAddon.GetCharacterCount then + t = t .. " This addon supports |cfffed000both total as local|r item counts."; + elseif currentAddon.GetTotalCount then + t = t .. " This addon supports |cfffed000only total|r item counts."; + elseif currentAddon.GetCharacterCount then + t = t .. " This addon supports |cfffed000only local|r item counts."; + end + + if preferedAddon ~= selectedAddonName then + t = t .. "\n\n|cffff0000You have selected |cfffed000" .. preferedAddon .. "|r|cffff0000 as your item count addon, but this appears to be disabled and thus a random alternative was selected.|r"; + end + end + + return t; + end, + }, + header = { + order = 5, + type = "header", + name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, + }, + overrideAuctionPricingAddon = { + order = 9, + type = "toggle", + name = "Override pricing addon", + desc = "Allows you to override the pricing addon setting for this group.", + arg = "auctionPricingAddon", + }, + auctionPricingAddon = { + order = 10, + type = "select", + name = "Prefered pricing addon", + desc = "Select the addon you prefer data for this group to be retrieved from. A random supported addon will be used if the selected addon can not be found.", + values = function() + local temp = {}; + for name, value in pairs(addon.supportedAddons.auctionPricing) do + temp[name] = name; + end + + return temp; + end, + set = function(info, value) + local groupName = groupIdToName[info[2]]; + local optionName = info[#info]; + + addon.db.profile.groups[groupName][optionName] = value ~= "" and value; + + if addon.supportedAddons.auctionPricing[value].OnSelect then + addon.supportedAddons.auctionPricing[value].OnSelect(); + end + end, + arg = "overrideAuctionPricingAddon", + }, + overrideItemCountAddon = { + order = 19, + type = "toggle", + name = "Override item count addon", + desc = "Allows you to override the item count addon setting for this group.", + arg = "itemCountAddon", + }, + itemCountAddon = { + order = 20, + type = "select", + name = "Prefered item count addon", + desc = "Select the addon you prefer data for this group to be retrieved from. A random supported addon will be used if the selected addon can not be found.", + values = function() + local temp = {}; + for name, value in pairs(addon.supportedAddons.itemCount) do + temp[name] = name; + end + + return temp; + end, + set = function(info, value) + local groupName = groupIdToName[info[2]]; + local optionName = info[#info]; + + addon.db.profile.groups[groupName][optionName] = value ~= "" and value; + + if addon.supportedAddons.itemCount[value].OnSelect then + addon.supportedAddons.itemCount[value].OnSelect(); + end + end, + arg = "overrideItemCountAddon", + }, + overrideCraftingAddon = { + order = 29, + type = "toggle", + name = "Override crafting addon", + desc = "Allows you to override the crafting addon setting for this group.", + arg = "craftingAddon", + }, + craftingAddon = { + order = 30, + type = "select", + name = "Prefered crafting addon", + desc = "Select the addon you prefer data from this group to be queued into. A random supported addon will be used if the selected addon can not be found.", + values = function() + local temp = {}; + for name, value in pairs(addon.supportedAddons.crafting) do + temp[name] = name; + end + + return temp; + end, + set = function(info, value) + local groupName = groupIdToName[info[2]]; + local optionName = info[#info]; + + addon.db.profile.groups[groupName][optionName] = value ~= "" and value; + + if addon.supportedAddons.crafting[value].OnSelect then + addon.supportedAddons.crafting[value].OnSelect(); + end + end, + arg = "overrideCraftingAddon", + }, + }, + }, }, }, group = { @@ -1352,7 +1383,238 @@ name = function() local t = ""; if not addon.db.profile.defaults.hideHelp then - t = "Here you can set general settings. The settings entered here will be used when you choose not to override the settings within an individual group.\n\n"; + t = "Here you can set general settings. The settings entered here will be used when you choose not to override the settings within an individual group."; + end + + return t; + end, + }, + header = { + order = 5, + type = "header", + name = "", + }, + trackAtCharacters = { + order = 10, + type = "multiselect", + width = "double", + name = "Track at these characters:", + desc = "Select at which characters this should appear in the summary and generate alerts.", + values = function() + local temp = {}; + for charName in pairs(addon.db.factionrealm.characters) do + temp[charName] = charName; + end + + return temp; + end, + get = function(i, v) + return addon.db.profile.defaults.trackAtCharacters[v]; + end, + set = function(i, v, e) + addon.db.profile.defaults.trackAtCharacters[v] = e or nil; + end, + dialogControl = "Dropdown", -- this is not standard, normal multiselect control gives us a list of all chars with toggle-boxes. UGLY! We want a multiselect-box instead. + }, + localItemData = { + order = 20, + type = "multiselect", + width = "double", + name = "Include in local item data", + desc = "Select which data should be included in the local item data.", + values = { + ["Bag"] = "Bag", + ["Bank"] = "Bank", + ["Auction House"] = "Auction House", + ["Mailbox"] = "Mailbox", + }, + get = function(i, v) return addon.db.profile.defaults.localItemData and addon.db.profile.defaults.localItemData[v]; end, + set = function(i, v, e) addon.db.profile.defaults.localItemData[v] = e; end, -- can't be nil or the defaults will be used + dialogControl = "Dropdown", -- this is not standard, normal multiselect control gives us a list of all chars with toggle-boxes. UGLY! We want a multiselect-box instead. + }, + }, + }, + minimumStock = { + order = 10, + type = "group", + inline = true, + name = "Minimum stock", + args = { + description = { + order = 0, + type = "description", + name = "Here you can specify the default minimum amount of items you wish to keep in stock and related settings. The settings entered here will be used when you choose not to override the settings within an individual group.", + hidden = function() return addon.db.profile.defaults.hideHelp; end, + }, + header = { + order = 5, + type = "header", + name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, + }, + minLocalStock = { + order = 10, + type = "range", + min = 0, + max = 100000, + softMax = 100, + step = 1, + name = "Minimum local stock", + desc = "You can manually enter a value between 100 and 100.000 in the text box below if the provided range is insufficient.", + get = function() return addon.db.profile.defaults.minLocalStock; end, + set = function(i, v) addon.db.profile.defaults.minLocalStock = v; end, + }, + alertBelowLocalMinimum = { + order = 11, + type = "toggle", + name = "Alert when below local minimum (NYI)", + desc = "Show an alert when this item gets below this threshold.", + get = function() return addon.db.profile.defaults.alertBelowLocalMinimum; end, + set = function(i, v) addon.db.profile.defaults.alertBelowLocalMinimum = v; end, + }, + autoRefill = { + order = 12, + type = "toggle", + name = "Auto refill from storage", + desc = "Automatically refill items from your storage (bank/mailbox - unless this is included in the local count - or the guild bank) when below the minimum local stock.", + get = function() return addon.db.profile.defaults.autoRefill; end, + set = function(i, v) addon.db.profile.defaults.autoRefill = v; end, + }, + minGlobalStock = { + order = 20, + type = "range", + min = 0, + max = 100000, + softMax = 100, + step = 1, + name = "Minimum global stock", + desc = "You can manually enter a value between 100 and 100.000 in the text box below if the provided range is insufficient.", + get = function() return addon.db.profile.defaults.minGlobalStock; end, + set = function(i, v) addon.db.profile.defaults.minGlobalStock = v; end, + }, + alertBelowGlobalMinimum = { + order = 21, + type = "toggle", + name = "Alert when below global minimum (NYI)", + desc = "Show an alert when this item gets below this threshold.", + get = function() return addon.db.profile.defaults.alertBelowGlobalMinimum; end, + set = function(i, v) addon.db.profile.defaults.alertBelowGlobalMinimum = v; end, + }, + summaryThresholdShow = { + order = 30, + type = "range", + min = 0, + max = 100, + softMax = 100, + step = 0.05, + isPercent = true, + name = "Show in summary when below", + desc = "Show items in the summary when below this percentage of the minimum stock. This can be either below the minimum or the global stock.", + get = function() return addon.db.profile.defaults.summaryThresholdShow; end, + set = function(i, v) addon.db.profile.defaults.summaryThresholdShow = v; end, + }, + }, + }, + refill = { + order = 20, + type = "group", + inline = true, + name = "Replenishing stock", + args = { + description = { + order = 0, + type = "description", + name = function() + local r = "Here you can specify the default amount of items to which you wish to restock when you are collecting new items. This may be higher than the minimum stock. The settings entered here will be used when you choose not to override the settings within an individual group.\n\n"; + + r = r .. "When restocking the target amount is |cfffed000" .. addon.db.profile.defaults.restockTarget .. "|r of every item. Not queueing craftable items when only missing |cfffed000" .. floor( addon.db.profile.defaults.minCraftingQueue * addon.db.profile.defaults.restockTarget ) .. "|r (|cfffed000" .. ( addon.db.profile.defaults.minCraftingQueue * 100 ) .. "%|r) of the restock target."; + + return r; + end, + hidden = function() return addon.db.profile.defaults.hideHelp; end, + }, + header = { + order = 5, + type = "header", + name = "", + hidden = function() return addon.db.profile.defaults.hideHelp; end, + }, + restockTarget = { + order = 10, + type = "range", + min = 0, + max = 100000, + softMax = 100, + step = 1, + name = "Restock target", + desc = "You can manually enter a value between 100 and 100.000 in the edit box if the provided range is insufficient.", + get = function() return addon.db.profile.defaults.restockTarget; end, + set = function(i, v) addon.db.profile.defaults.restockTarget = v; end, + }, + minCraftingQueue = { + order = 20, + type = "range", + min = 0, + max = 1, + step = 0.01, -- 1% + isPercent = true, + name = "Don't queue if I only miss", + desc = "Don't add a craftable item to the queue if I only miss this much or less of the restock target.\n\nExample: if your restock target is set to 60 and this is set to 5%, an item won't be queued unless you are missing more than 3 of it.", + get = function() return addon.db.profile.defaults.minCraftingQueue; end, + set = function(i, v) addon.db.profile.defaults.minCraftingQueue = v; end, + }, + bonusQueue = { + order = 30, + type = "range", + min = 0, + max = 10, -- 1000% + step = 0.01, -- 1% + isPercent = true, + name = "Bonus queue", + desc = "Get additional items when there are none left.\n\nExample: if your restock target is set to 60 and this is set to 10%, you will get 66 items instead of just 60 if you end up with none left while queueing.", + get = function() return addon.db.profile.defaults.bonusQueue; end, + set = function(i, v) addon.db.profile.defaults.bonusQueue = v; end, + }, + priceThreshold = { + order = 40, + type = "input", + name = "Price threshold", + desc = "Only queue craftable items when they are worth at least this much according to your auction house addon.\n\nSet to 0 to ignore auction prices.", + validate = function(info, value) return addon:ValidateReadableMoney(info, value); end, + get = function() return addon:ReadableMoney(addon.db.profile.defaults.priceThreshold); end, + set = function(i, v) addon.db.profile.defaults.priceThreshold = addon:ReadableMoneyToCopper(v); end, + }, + summaryHidePriceThreshold = { + order = 50, + type = "toggle", + name = "Hide when below threshold", + desc = "Hide items from the summary when their value is below the set price threshold.", + get = function() return addon.db.profile.defaults.summaryHidePriceThreshold; end, + set = function(i, v) addon.db.profile.defaults.summaryHidePriceThreshold = v; end, + }, + alwaysGetAuctionValue = { + order = 60, + type = "toggle", + name = "Always show auction value", + desc = "Always cache and show the auction value of items, even if the price threshold is set to 0|cffeda55fc|r.", + get = function() return addon.db.profile.defaults.alwaysGetAuctionValue; end, + set = function(i, v) addon.db.profile.defaults.alwaysGetAuctionValue = v; end, + }, + }, + }, + addon = { + order = 30, + type = "group", + inline = true, + name = "Prefered addons", + args = { + description = { + order = 0, + type = "description", + name = function() + local t = ""; + if not addon.db.profile.defaults.hideHelp then + t = "Selecting your prefered addons is optional, the first working addon will be used if the selected addon doesn't exist. You only need to set this when you are running multiple addons of a kind and wish to specify which addons to use for what groups.\n\n"; end local currentAddon, selectedAddonName = addon:GetItemCountAddon(); @@ -1448,210 +1710,6 @@ end end, }, - localItemData = { - order = 40, - type = "multiselect", - name = "Include in local item data", - desc = "Select which data should be included in the local item data.", - values = { - ["Bag"] = "Bag", - ["Bank"] = "Bank", - ["Auction House"] = "Auction House", - ["Mailbox"] = "Mailbox", - }, - get = function(i, v) return addon.db.profile.defaults.localItemData and addon.db.profile.defaults.localItemData[v]; end, - set = function(i, v, e) addon.db.profile.defaults.localItemData[v] = e; end, -- can't be nil or the defaults will be used - dialogControl = "Dropdown", -- this is not standard, normal multiselect control gives us a list of all chars with toggle-boxes. UGLY! We want a multiselect-box instead. - }, - }, - }, - minimumStock = { - order = 10, - type = "group", - inline = true, - name = "Minimum stock", - args = { - description = { - order = 0, - type = "description", - name = "Here you can specify the default minimum amount of items you wish to keep in stock and related settings. The settings entered here will be used when you choose not to override the settings within an individual group.", - hidden = function() return addon.db.profile.defaults.hideHelp; end, - }, - header = { - order = 5, - type = "header", - name = "", - hidden = function() return addon.db.profile.defaults.hideHelp; end, - }, - minLocalStock = { - order = 10, - type = "range", - min = 0, - max = 100000, - softMax = 100, - step = 1, - name = "Minimum local stock", - desc = "You can manually enter a value between 100 and 100.000 in the text box below if the provided range is insufficient.", - get = function() return addon.db.profile.defaults.minLocalStock; end, - set = function(i, v) addon.db.profile.defaults.minLocalStock = v; end, - }, - alertBelowLocalMinimum = { - order = 11, - type = "toggle", - name = "Alert when below local minimum (NYI)", - desc = "Show an alert when this item gets below this threshold.", - get = function() return addon.db.profile.defaults.alertBelowLocalMinimum; end, - set = function(i, v) addon.db.profile.defaults.alertBelowLocalMinimum = v; end, - }, - autoRefill = { - order = 12, - type = "toggle", - name = "Auto refill from storage", - desc = "Automatically refill items from your storage (bank/mailbox - unless this is included in the local count - or the guild bank) when below the minimum local stock.", - get = function() return addon.db.profile.defaults.autoRefill; end, - set = function(i, v) addon.db.profile.defaults.autoRefill = v; end, - }, - minGlobalStock = { - order = 20, - type = "range", - min = 0, - max = 100000, - softMax = 100, - step = 1, - name = "Minimum global stock", - desc = "You can manually enter a value between 100 and 100.000 in the text box below if the provided range is insufficient.", - get = function() return addon.db.profile.defaults.minGlobalStock; end, - set = function(i, v) addon.db.profile.defaults.minGlobalStock = v; end, - }, - alertBelowGlobalMinimum = { - order = 21, - type = "toggle", - name = "Alert when below global minimum (NYI)", - desc = "Show an alert when this item gets below this threshold.", - get = function() return addon.db.profile.defaults.alertBelowGlobalMinimum; end, - set = function(i, v) addon.db.profile.defaults.alertBelowGlobalMinimum = v; end, - }, - summaryThresholdShow = { - order = 30, - type = "range", - min = 0, - max = 100, - softMax = 100, - step = 0.05, - isPercent = true, - name = "Show in summary when below", - desc = "Show items in the summary when below this percentage of the minimum stock. This can be either below the minimum or the global stock.", - get = function() return addon.db.profile.defaults.summaryThresholdShow; end, - set = function(i, v) addon.db.profile.defaults.summaryThresholdShow = v; end, - }, - trackAtCharacters = { - order = 40, - type = "multiselect", - name = "Track at", - desc = "Select at which characters this should appear in the summary and generate alerts.", - values = function() - local temp = {}; - for charName in pairs(addon.db.factionrealm.characters) do - temp[charName] = charName; - end - - return temp; - end, - get = function(i, v) - return addon.db.profile.defaults.trackAtCharacters[v]; - end, - set = function(i, v, e) - addon.db.profile.defaults.trackAtCharacters[v] = e or nil; - end, - dialogControl = "Dropdown", -- this is not standard, normal multiselect control gives us a list of all chars with toggle-boxes. UGLY! We want a multiselect-box instead. - }, - }, - }, - refill = { - order = 20, - type = "group", - inline = true, - name = "Replenishing stock", - args = { - description = { - order = 0, - type = "description", - name = function() - local r = "Here you can specify the default amount of items to which you wish to restock when you are collecting new items. This may be higher than the minimum stock. The settings entered here will be used when you choose not to override the settings within an individual group.\n\n"; - - r = r .. "When restocking the target amount is |cfffed000" .. addon.db.profile.defaults.restockTarget .. "|r of every item. Not queueing craftable items when only missing |cfffed000" .. floor( addon.db.profile.defaults.minCraftingQueue * addon.db.profile.defaults.restockTarget ) .. "|r (|cfffed000" .. ( addon.db.profile.defaults.minCraftingQueue * 100 ) .. "%|r) of the restock target."; - - return r; - end, - hidden = function() return addon.db.profile.defaults.hideHelp; end, - }, - header = { - order = 5, - type = "header", - name = "", - hidden = function() return addon.db.profile.defaults.hideHelp; end, - }, - restockTarget = { - order = 10, - type = "range", - min = 0, - max = 100000, - softMax = 100, - step = 1, - name = "Restock target", - desc = "You can manually enter a value between 100 and 100.000 in the edit box if the provided range is insufficient.", - get = function() return addon.db.profile.defaults.restockTarget; end, - set = function(i, v) addon.db.profile.defaults.restockTarget = v; end, - }, - minCraftingQueue = { - order = 20, - type = "range", - min = 0, - max = 1, - step = 0.01, -- 1% - isPercent = true, - name = "Don't queue if I only miss", - desc = "Don't add a craftable item to the queue if I only miss this much or less of the restock target.\n\nExample: if your restock target is set to 60 and this is set to 5%, an item won't be queued unless you are missing more than 3 of it.", - get = function() return addon.db.profile.defaults.minCraftingQueue; end, - set = function(i, v) addon.db.profile.defaults.minCraftingQueue = v; end, - }, - bonusQueue = { - order = 30, - type = "range", - min = 0, - max = 10, -- 1000% - step = 0.01, -- 1% - isPercent = true, - name = "Bonus queue", - desc = "Get additional items when there are none left.\n\nExample: if your restock target is set to 60 and this is set to 10%, you will get 66 items instead of just 60 if you end up with none left while queueing.", - get = function() return addon.db.profile.defaults.bonusQueue; end, - set = function(i, v) addon.db.profile.defaults.bonusQueue = v; end, - }, - priceThreshold = { - order = 40, - type = "input", - name = "Price threshold", - desc = "Only queue craftable items when they are worth at least this much according to your auction house addon.\n\nSet to 0 to ignore auction prices.", - validate = function(info, value) return addon:ValidateReadableMoney(info, value); end, - get = function() return addon:ReadableMoney(addon.db.profile.defaults.priceThreshold); end, - set = function(i, v) addon.db.profile.defaults.priceThreshold = addon:ReadableMoneyToCopper(v); end, - }, - summaryHidePriceThreshold = { - order = 50, - type = "toggle", - name = "Hide when below threshold", - desc = "Hide items from the summary when their value is below the set price threshold.", - get = function() return addon.db.profile.defaults.summaryHidePriceThreshold; end, - set = function(i, v) addon.db.profile.defaults.summaryHidePriceThreshold = v; end, - }, - alwaysGetAuctionValue = { - order = 60, - type = "toggle", - name = "Always show auction value", - desc = "Always cache and show the auction value of items, even if the price threshold is set to 0|cffeda55fc|r.", - get = function() return addon.db.profile.defaults.alwaysGetAuctionValue; end, - set = function(i, v) addon.db.profile.defaults.alwaysGetAuctionValue = v; end, - }, }, }, },