Anonymous

Module:Skills/Cartography: Difference between revisions

From Melvor Idle
getMasteryBonuses: Initial implementation
(Allow MelvorMap to be referenced by other modules)
(getMasteryBonuses: Initial implementation)
Line 60: Line 60:
if checkFunc(POI) then
if checkFunc(POI) then
table.insert(result, POI)
table.insert(result, POI)
end
end
return result
end
function p.getMasteryBonuses(checkFunc)
local result = {}
for i, bonus in pairs(p.MelvorMap.masteryBonuses) do
if checkFunc(bonus) then
table.insert(result, bonus)
end
end
end
end