Mercurial > wow > itemauditor
comparison Modules/Crafting.lua @ 67:b6c30a5156f9
Rearranged options to go with their related features.
| author | Asa Ayers <Asa.Ayers@Gmail.com> |
|---|---|
| date | Wed, 28 Jul 2010 07:35:14 -0700 |
| parents | e92a5adf75bf |
| children | 2d65db19d3ce |
comparison
equal
deleted
inserted
replaced
| 66:b7bc0488f13b | 67:b6c30a5156f9 |
|---|---|
| 6 | 6 |
| 7 local validateMoney = ItemAuditor.validateMoney | 7 local validateMoney = ItemAuditor.validateMoney |
| 8 local parseMoney = ItemAuditor.parseMoney | 8 local parseMoney = ItemAuditor.parseMoney |
| 9 | 9 |
| 10 local realData = {} | 10 local realData = {} |
| 11 | |
| 12 | |
| 13 -- TODO: Convert this to a text field. | |
| 14 local craftingThresholds = {5000, 10000, 50000} | |
| 15 local craftingThresholdsDisplay = {} | |
| 16 | |
| 17 for key, value in pairs(craftingThresholds) do | |
| 18 craftingThresholdsDisplay[key] = ItemAuditor:FormatMoney(value, '', true) | |
| 19 -- craftingThresholdsDisplay[key] = value | |
| 20 end | |
| 21 | |
| 22 ItemAuditor.Options.args.crafting_options = { | |
| 23 name = "Crafting with Skillet", | |
| 24 desc = "/ia queue", | |
| 25 type = 'group', | |
| 26 disabled = function() return Skillet == nil end, | |
| 27 args = { | |
| 28 crafting_threshold = { | |
| 29 type = "select", | |
| 30 name = "Crafting Threshold", | |
| 31 desc = "Don't create items that will make less than this amount of profit", | |
| 32 values = craftingThresholdsDisplay, | |
| 33 get = function() return ItemAuditor.db.char.crafting_threshold end, | |
| 34 set = function(info, value) ItemAuditor.db.char.crafting_threshold = value end, | |
| 35 order = 11, | |
| 36 }, | |
| 37 }, | |
| 38 } | |
| 11 | 39 |
| 12 local function displayMoney(rowFrame, cellFrame, data, cols, row, realrow, column, fShow, table, ...) | 40 local function displayMoney(rowFrame, cellFrame, data, cols, row, realrow, column, fShow, table, ...) |
| 13 if fShow == true then | 41 if fShow == true then |
| 14 local money = data[realrow][column] | 42 local money = data[realrow][column] |
| 15 if money then | 43 if money then |
| 328 elseif realData then | 356 elseif realData then |
| 329 return realData[row] | 357 return realData[row] |
| 330 end | 358 end |
| 331 return nil | 359 return nil |
| 332 end | 360 end |
| 361 ItemAuditor.Options.args.crafting = { | |
| 362 type = "execute", | |
| 363 name = "crafting", | |
| 364 desc = "This opens a window to configure a crafting queue.", | |
| 365 func = "DisplayCrafting", | |
| 366 guiHidden = false, | |
| 367 } |
