4,683
edits
(_getTaskRow: Support new AoD requirements, add exception reporting for unrecognized requirements) |
(Unhide Lemon Season) |
||
Line 276: | Line 276: | ||
-- Generates a table of all seasons, their type/requirements, and modifiers | -- Generates a table of all seasons, their type/requirements, and modifiers | ||
function p.getSeasonTable(frame) | function p.getSeasonTable(frame) | ||
-- Manual data specifying the worship requirement for those rare seasons | -- Manual data specifying the worship requirement for those rare seasons | ||
local seasonReqs = { | local seasonReqs = { | ||
["Nightfall"] = Icons.Icon({'Township%23Worship', 'Bane Worship', img='Statue of Bane', type='building'}), | ["Nightfall"] = Icons.Icon({'Township%23Worship', 'Bane Worship', img='Statue of Bane', type='building'}), | ||
["SolarEclipse"] = Icons.Icon({'Township%23Worship', 'The Herald Worship', img='Statue of The Herald', type='building'}) | ["SolarEclipse"] = Icons.Icon({'Township%23Worship', 'The Herald Worship', img='Statue of The Herald', type='building'}), | ||
["Lemon"] = Icons.Icon({'Ancient_Relics', 'Ancient Relics', img='Ancient Relics'}) | |||
} | } | ||
Line 295: | Line 292: | ||
for i, season in ipairs(seasons) do | for i, season in ipairs(seasons) do | ||
local ns, localSeasonID = Shared.getLocalID(season.id) | |||
local reqs = seasonReqs[localSeasonID] | |||
table.insert(resultPart, '\n|-') | |||
table.insert(resultPart, '\n|class="table-img"| ' .. Icons.Icon({season.name, type='township', size=50, nolink=true, notext=true})) | |||
table.insert(resultPart, '\n| ' .. Icons.Icon({season.name, type='township', nolink=true, noicon=true})) | |||
table.insert(resultPart, '\n| ' .. (season.order <= 3 and 'Regular' or 'Rare')) | |||
if reqs ~= nil then | |||
table.insert(resultPart, '<br/>Requires ' .. reqs) | |||
end | end | ||
table.insert(resultPart, '\n| ' .. Constants.getModifiersText(season.modifiers)) | |||
end | end | ||
table.insert(resultPart, '\n|}') | table.insert(resultPart, '\n|}') |