16,985
edits
mNo edit summary |
(_getAreaRequirements: Support ShopPurchase type) |
||
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 |