Module:CombatAreas: Difference between revisions

Undo revision 47609 by Auron956 (talk)
(_getAreaRequirements: Support ShopPurchase type)
(Undo revision 47609 by Auron956 (talk))
Tag: Undo
Line 8: Line 8:
local Icons = require('Module:Icons')
local Icons = require('Module:Icons')
local Items = require('Module:Items')
local Items = require('Module:Items')
local Shop = require('Module:Shop')


function processArea(area, index, type)
function processArea(area, index, type)
Line 117: Line 116:
             end
             end
           end
           end
        elseif reqDetails.type == 'ShopPurchase' then
          local shopPurchase = Shop.processPurchase(reqDetails.category, reqDetails.id)
          if shopPurchase ~= nil then
          table.insert(reqArray, Shop._getPurchaseIcon({ shopPurchase }) .. ' Purchased')
          end
        else
          table.insert(reqArray, 'ERROR: Unknown requirement type ' .. (reqDetails.type or 'nil') .. '[[Category:Pages with script errors]]')
         end
         end
       end
       end