Mercurial > wow > inventory
diff Core.lua @ 57:03c0610e9c1e
Added a minimum local stock option. I reckon people will want to keep maybe a stack in their bags/AH and another stack in their bank.
Added a seperate alert option for the local stock option.
When your selected item count addon isn?t enabled the options help text will now display the reason for this. No more debugging of something that ain?t broken.
The minimum stock will now be displayed next to the current stock values rather than as a seperate column.
author | Zerotorescue |
---|---|
date | Tue, 21 Dec 2010 14:24:15 +0100 |
parents | 9607b3251655 |
children | d903b0a151d3 |
line wrap: on
line diff
--- a/Core.lua Mon Dec 20 14:32:21 2010 +0100 +++ b/Core.lua Tue Dec 21 14:24:15 2010 +0100 @@ -27,8 +27,10 @@ auctionPricingAddon = "Auctioneer", itemCountAddon = "Altoholic", craftingAddon = "AdvancedTradeSkillWindow", - minimumStock = 60, - alertBelowMinimum = true, + minimumLocalStock = 20, + alertBelowLocalMinimum = true, + minimumStock = 60, -- global stock + alertBelowMinimum = true, -- global stock summaryThresholdShow = 10, restockTarget = 60, minCraftingQueue = 0.05, @@ -590,6 +592,7 @@ local 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"; local currentAddon, selectedAddonName = addon:GetItemCountAddon(); + local preferedAddon = self.db.global.defaults.itemCountAddon; if currentAddon then --GetCharacterCount @@ -603,6 +606,10 @@ 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; @@ -712,20 +719,48 @@ type = "header", name = "", }, - minimumStock = { + minLocalStock = { order = 10, type = "range", min = 0, max = 100000, softMax = 100, step = 1, - name = "Minimum stock", + 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 self.db.global.defaults.minimumLocalStock; end, + set = function(i, v) self.db.global.defaults.minimumLocalStock = 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 self.db.global.defaults.alertBelowLocalMinimum; end, + set = function(i, v) self.db.global.defaults.alertBelowLocalMinimum = 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 self.db.global.defaults.minimumStock; end, set = function(i, v) self.db.global.defaults.minimumStock = 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 self.db.global.defaults.alertBelowMinimum; end, + set = function(i, v) self.db.global.defaults.alertBelowMinimum = v; end, + }, summaryThresholdShow = { - order = 20, + order = 30, type = "range", min = 0, max = 10, @@ -733,18 +768,10 @@ 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.\n\nYou can manually enter a value between 1.000% and 10.000% in the edit box if the provided range is insufficient.", + 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.\n\nYou can manually enter a value between 1.000% and 10.000% in the edit box if the provided range is insufficient.", get = function() return self.db.global.defaults.summaryThresholdShow; end, set = function(i, v) self.db.global.defaults.summaryThresholdShow = v; end, }, - alertBelowMinimum = { - order = 30, - type = "toggle", - name = "NYI | Alert when below minimum", - desc = "Show an alert when this item gets below this threshold.", - get = function() return self.db.global.defaults.alertBelowMinimum; end, - set = function(i, v) self.db.global.defaults.alertBelowMinimum = v; end, - }, trackAtCharacters = { order = 40, type = "multiselect", @@ -1217,6 +1244,7 @@ local 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"; local currentAddon, selectedAddonName = addon:GetItemCountAddon(groupName); + local preferedAddon = addon:GetOptionByKey(groupName, "itemCountAddon"); if currentAddon then --GetCharacterCount @@ -1230,6 +1258,10 @@ 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; @@ -1406,33 +1438,82 @@ type = "header", name = "", }, - overrideMinimumStock = { - order = 9, + + overrideMinLocalStock = { + order = 10, type = "toggle", - name = "Override min stock", - desc = "Allows you to override the minimum stock setting for this group.", - arg = "minimumStock", + name = "Override min local stock", + desc = "Allows you to override the minimum local stock setting for this group.", + arg = "minLocalStock", }, - minimumStock = { - order = 10, + minLocalStock = { + order = 11, type = "range", min = 0, max = 100000, softMax = 100, step = 1, - name = "Minimum stock", + 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.", - arg = "overrideMinimumStock", + arg = "overrideMinLocalStock", }, + overrideAlertBelowLocalMinimum = { + order = 15, + type = "toggle", + name = "Override local minimum alert", + desc = "Allows you to override wether an alert should be shown when an item in this group gets below the local minimum stock threshold.", + arg = "alertBelowLocalMinimum", + }, + alertBelowLocalMinimum = { + order = 16, + type = "toggle", + name = "Alert when below local minimum (NYI)", + desc = "Show an alert when an item in this group gets below the local minimum stock threshold.", + arg = "overrideAlertBelowLocalMinimum", + }, + + overrideMinGlobalStock = { + order = 20, + type = "toggle", + name = "Override min global stock", + desc = "Allows you to override the minimum global stock setting for this group.", + arg = "minGlobalStock", + }, + minGlobalStock = { + order = 21, + 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.", + arg = "overrideMinGlobalStock", + }, + overrideAlertBelowGlobalMinimum = { + order = 25, + type = "toggle", + name = "Override global minimum alert", + desc = "Allows you to override wether an alert should be shown when an item in this group gets below the global minimum stock threshold.", + arg = "alertBelowGlobalMinimum", + }, + alertBelowGlobalMinimum = { + order = 26, + type = "toggle", + name = "Alert when below global minimum (NYI)", + desc = "Show an alert when an item in this group gets below the global minimum stock threshold.", + arg = "overrideAlertBelowGlobalMinimum", + }, + overrideSummaryThresholdShow = { - order = 19, + order = 34, type = "toggle", name = "Override summary showing", desc = "Allows you to override when this group should appear in the summary.", arg = "summaryThresholdShow", }, summaryThresholdShow = { - order = 20, + order = 35, type = "range", min = 0, max = 10, @@ -1443,20 +1524,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", }, - overrideAlertBelowMinimum = { - order = 29, - type = "toggle", - name = "Override minimum alert", - desc = "Allows you to override wether an alert should be shown when an item in this group gets below the minimum stock threshold.", - arg = "alertBelowMinimum", - }, - alertBelowMinimum = { - order = 30, - type = "toggle", - name = "NYI | Alert when below minimum", - desc = "Show an alert when an item in this group gets below the minimum stock threshold.", - arg = "overrideAlertBelowMinimum", - }, overrideTrackAtCharacters = { order = 39, type = "toggle",