Module:Skills/Cartography: Difference between revisions

Renamed test to getPointOfInterestTable so it can be added to the page
(Added 'Active' and "Port' types to the table)
(Renamed test to getPointOfInterestTable so it can be added to the page)
Line 61: Line 61:
end
end


function p.test()
function p.getPointOfInterestTable(frame)
--WIP for building table of Points of Interest
--TODO:
-- Handle discoveryRewards
local POIs = {}
local POIs = {}
local POI_Strings = {}
local POI_Strings = {}
Line 144: Line 141:
--TODO: Add Active Modifiers
--TODO: Add Active Modifiers
table.insert(tableStr, '\r\n|')
table.insert(tableStr, '\r\n|')
if POI.activeModifiers ~= nil then
table.insert(tableStr, Constants.getModifiersText(POI.activeModifiers))
end
end
end
table.insert(tableStr, '\r\n|}')
table.insert(tableStr, '\r\n|}')
local keyset={}
local n=0
for k,v in pairs(SkillData.Cartography.worldMaps[1]) do
  n=n+1
  keyset[n]=k
end
--mw.log(mw.text.jsonEncode(SkillData.Cartography.worldMaps[1].hexes))
return table.concat(tableStr, '')
return table.concat(tableStr, '')
end
function p.test()
return p.getPointOfInterestTable()
end
end


return p
return p