432
edits
(getHexMasteryBonusTable: Added to generate table of hex mastery bonuses) |
(Adding get POI by XY function) |
||
Line 12: | Line 12: | ||
for i, POI in pairs(SkillData.Cartography.worldMaps[1].pointsOfInterest) do | for i, POI in pairs(SkillData.Cartography.worldMaps[1].pointsOfInterest) do | ||
if POI.id == id then | if POI.id == id then | ||
return POI | |||
end | |||
end | |||
return nil | |||
end | |||
function p.getPointOfInterestByXY(X, Y) | |||
local hex = p.getHexByXY(X, Y) | |||
if hex == nil then | |||
return nil | |||
end | |||
for i, POI in pairs(SkillData.Cartography.worldMaps[1].pointsOfInterest) do | |||
if (POI.coords.q == hex.coordinates.q and | |||
POI.coords.r == hex.coordinates.r) then | |||
return POI | return POI | ||
end | end |
edits