comparison Core.lua @ 157:e136c99fe5bb

You can now select which guilds to include in the item count when selecting an item count supporting this. Renamed DataStore (with guilds) to ?all accounts?. Removed DataStore (without guilds) option.
author Zerotorescue
date Sat, 22 Jan 2011 19:24:48 +0100
parents 314943963155
children d367da49a490
comparison
equal deleted inserted replaced
156:314943963155 157:e136c99fe5bb
34 global = { 34 global = {
35 version = nil, 35 version = nil,
36 }, 36 },
37 profile = { 37 profile = {
38 defaults = { 38 defaults = {
39 -- General
39 auctionPricingAddon = "Auctioneer", 40 auctionPricingAddon = "Auctioneer",
40 itemCountAddon = "Altoholic", 41 itemCountAddon = "Altoholic",
41 craftingAddon = "AdvancedTradeSkillWindow", 42 craftingAddon = "AdvancedTradeSkillWindow",
43 trackAtCharacters = { },
44 localItemData = {
45 ["Bag"] = true,
46 ["Auction House"] = true,
47 },
48
49 -- Minimumm stock
42 minLocalStock = 20, 50 minLocalStock = 20,
43 alertBelowLocalMinimum = true, 51 alertBelowLocalMinimum = true,
44 autoRefill = true, 52 autoRefill = true,
45 autoRefillSkipConfirm = false, 53 autoRefillSkipConfirm = false,
46 minGlobalStock = 60, 54 minGlobalStock = 60,
47 alertBelowGlobalMinimum = true, 55 alertBelowGlobalMinimum = true,
48 summaryThresholdShow = 10, 56
57 -- Queueing
49 restockTarget = 60, 58 restockTarget = 60,
50 minCraftingQueue = 0.05, 59 minCraftingQueue = 0.05,
51 bonusQueue = 0.1, 60 bonusQueue = 0.1,
52 priceThreshold = 0, 61 priceThreshold = 0,
62
63 -- Summary
64 summaryThresholdShow = 10,
53 summaryHidePriceThreshold = false, 65 summaryHidePriceThreshold = false,
66
67 -- Global (can't be overridden)
54 hideHelp = false, 68 hideHelp = false,
55 trackAtCharacters = {
56 },
57 localItemData = {
58 ["Bag"] = true,
59 ["Auction House"] = true,
60 },
61 summary = { 69 summary = {
62 speed = 5, 70 speed = 5,
63 width = 700, 71 width = 700,
64 height = 600, 72 height = 600,
65 }, 73 },
67 red = 0, 75 red = 0,
68 orange = 0.3, 76 orange = 0.3,
69 yellow = 0.6, 77 yellow = 0.6,
70 green = 0.95, 78 green = 0.95,
71 }, 79 },
80 itemCountGuildsExcluded = { },
72 }, 81 },
73 groups = { 82 groups = {
74 -- items = {}, 83 -- items = {},
75 -- isVirtual = nil, 84 -- isVirtual = nil,
76 }, 85 },
220 local selectedExternalAddon = self:GetOptionByKey(group, "itemCountAddon"); 229 local selectedExternalAddon = self:GetOptionByKey(group, "itemCountAddon");
221 230
222 if self.supportedAddons.itemCount[selectedExternalAddon] and self.supportedAddons.itemCount[selectedExternalAddon].IsEnabled() then 231 if self.supportedAddons.itemCount[selectedExternalAddon] and self.supportedAddons.itemCount[selectedExternalAddon].IsEnabled() then
223 -- Try to use the default item count addon 232 -- Try to use the default item count addon
224 233
234 if self.supportedAddons.itemCount[selectedExternalAddon].SetGuildState then
235 self.supportedAddons.itemCount[selectedExternalAddon].SetGuildState(self.db.profile.defaults.itemCountGuildsExcluded);
236 end
237
225 return self.supportedAddons.itemCount[selectedExternalAddon], selectedExternalAddon; 238 return self.supportedAddons.itemCount[selectedExternalAddon], selectedExternalAddon;
226 else 239 else
227 -- Default not available, get the first one then 240 -- Default not available, get the first one then
228 241
229 for name, value in pairs(self.supportedAddons.itemCount) do 242 for name, value in pairs(self.supportedAddons.itemCount) do
230 if value.IsEnabled() then 243 if value.IsEnabled() then
244 if value.SetGuildState then
245 value.SetGuildState(self.db.profile.defaults.itemCountGuildsExcluded);
246 end
247
231 return value, name; 248 return value, name;
232 end 249 end
233 end 250 end
234 end 251 end
235 252
462 479
463 480
464 -- General 481 -- General
465 482
466 addon.Colors = { 483 addon.Colors = {
467 Red = { 1, 0, 0 }, 484 ["Red"] = { 1, 0, 0 },
468 Orange = { 1, .46, .1 }, 485 ["Orange"] = { 1, .46, .1 },
469 Green = { 0, 1, 0 }, 486 ["Green"] = { 0, 1, 0 },
470 Blue = { 0, 0, 1 }, 487 ["Blue"] = { 0, 0, 1 },
471 Yellow = { 1, 1, 0 }, 488 ["Yellow"] = { 1, 1, 0 },
472 Cyan = { 0, 1, 1 }, 489 ["Cyan"] = { 0, 1, 1 },
473 }; -- easy to extend if more colors are needed 490 }; -- easy to extend if more colors are needed
474 function addon:Print(text, color) 491 function addon:Print(text, color)
475 local red, green, blue; 492 local red, green, blue;
476 493
477 if color then 494 if color then