Module:Skills/Cartography: Difference between revisions

Added the option to get Point of Interest by ID
(added id for POI rows and added LightTable)
(Added the option to get Point of Interest by ID)
Line 8: Line 8:
local Common = require('Module:Common')
local Common = require('Module:Common')
local Icons = require('Module:Icons')
local Icons = require('Module:Icons')
function p.getPointOfInterestByID(id)
for i, POI in pairs(SkillData.Cartography.worldMaps[1].pointsOfInterest) do
if POI.id == id then
return POI
end
end
return nil
end


function p.getPointOfInterest(name)
function p.getPointOfInterest(name)
name = string.gsub(name, "%%27", "'")
name = string.gsub(name, "'", "'")
for i, POI in pairs(SkillData.Cartography.worldMaps[1].pointsOfInterest) do
for i, POI in pairs(SkillData.Cartography.worldMaps[1].pointsOfInterest) do
if POI.name == name then
if POI.name == name then