Anonymous

Module:Skills/Cartography: Difference between revisions

From Melvor Idle
Hide POI Discovery table if empty
(Added getDiscoveryRewardsTable for item sources from POIs)
(Hide POI Discovery table if empty)
Line 216: Line 216:
end
end
end
end
end
if POIs[1] == nil then
return ''
end
end
p.sortPOIByCoords(POIs)
p.sortPOIByCoords(POIs)
Line 248: Line 252:
return Shared.printError('No item named "' .. itemName .. '" exists in the data module')
return Shared.printError('No item named "' .. itemName .. '" exists in the data module')
end
end
local resultTable = p._getDiscoveryRewardsTable(item)
return '==POI Discovery Rewards==\n' .. p._getDiscoveryRewardsTable(item)
if resultTable == '' then
return ''
else
return '==POI Discovery Rewards==\n' .. resultTable
end
end
end