17,101
edits
(Remove 'Type' columns from layouts (building type is no longer a thing)) |
(getSeasonTable: Hide Easter egg season) |
||
Line 275: | Line 275: | ||
-- 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) | ||
-- Exclude Easter egg seasons | |||
local hideSeasons = { | |||
'melvorAoD:Lemon' | |||
} | |||
-- Manual data specifying the worship requirement for those rare seasons | -- Manual data specifying the worship requirement for those rare seasons | ||
local seasonReqs = { | local seasonReqs = { | ||
Line 290: | Line 294: | ||
for i, season in ipairs(seasons) do | for i, season in ipairs(seasons) do | ||
local ns, localSeasonID = Shared.getLocalID(season.id) | if not Shared.contains(hideSeasons, season.id) then | ||
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 | |||
table.insert(resultPart, '\n| ' .. Constants.getModifiersText(season.modifiers)) | |||
end | end | ||
end | end | ||
table.insert(resultPart, '\n|}') | table.insert(resultPart, '\n|}') |