Module:Skills/Gathering: Difference between revisions

Added p.buildAstrologyValueTable
(added Sortable class to Constellation Table)
(Added p.buildAstrologyValueTable)
Line 750: Line 750:
function p.buildAstrologyConstellationTable(frame)
function p.buildAstrologyConstellationTable(frame)
return p._buildAstrologyConstellationTable()
return p._buildAstrologyConstellationTable()
end
function p.buildAstrologyValueTable()
local result = '{|class="wikitable sortable"'
result = result..'\r\n!Value!!Chance'
local lastChance = 0
for i, chance in Shared.skpairs(SkillData.Astrology.Defaults.valueWeight) do
result = result..'\r\n|-'
result = result..'\r\n|'..i
if i == 5 then
result = result..'||'..chance..'%'
else
result = result..'||'..(chance - lastChance)..'%'
end
lastChance = chance
end
result = result..'\r\n|}'
return result
end
end


return p
return p