Anonymous

Module:CombatAreas: Difference between revisions

From Melvor Idle
_getAreaRequirements: Support ShopPurchase type (again)
(Undo revision 47609 by Auron956 (talk))
Tag: Undo
(_getAreaRequirements: Support ShopPurchase type (again))
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 116: Line 117:
             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