Anonymous

Module:CombatAreas: Difference between revisions

From Melvor Idle
getExpansionIcon: Implement
(_getAreaRequirements: Avoid repeating the same requirement twice)
(getExpansionIcon: Implement)
Line 57: Line 57:


     return resultArray
     return resultArray
end
--Returns the expansion icon for the area if it has one
function p.getExpansionIcon(frame)
local areaName = frame.args ~= nil and frame.args[1] or frame
local area = p.getArea(areaName)
if area == nil then
return "ERROR: No area named " .. areaName .. " exists in the data module[[Category:Pages with script errors]]"
end
return Icons.getExpansionIcon(area.id)
end
end