Module:Township: Difference between revisions

getSeasonTable: Hide Easter egg season
(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 reqs = seasonReqs[localSeasonID]
local ns, localSeasonID = Shared.getLocalID(season.id)
table.insert(resultPart, '\n|-')
local reqs = seasonReqs[localSeasonID]
table.insert(resultPart, '\n|class="table-img"| ' .. Icons.Icon({season.name, type='township', size=50, nolink=true, notext=true}))
table.insert(resultPart, '\n|-')
table.insert(resultPart, '\n| ' .. Icons.Icon({season.name, type='township', nolink=true, noicon=true}))
table.insert(resultPart, '\n|class="table-img"| ' .. Icons.Icon({season.name, type='township', size=50, nolink=true, notext=true}))
table.insert(resultPart, '\n| ' .. (season.order <= 3 and 'Regular' or 'Rare'))
table.insert(resultPart, '\n| ' .. Icons.Icon({season.name, type='township', nolink=true, noicon=true}))
if reqs ~= nil then
table.insert(resultPart, '\n| ' .. (season.order <= 3 and 'Regular' or 'Rare'))
table.insert(resultPart, '<br/>Requires ' .. reqs)
if reqs ~= nil then
table.insert(resultPart, '<br/>Requires ' .. reqs)
end
table.insert(resultPart, '\n| ' .. Constants.getModifiersText(season.modifiers))
end
end
table.insert(resultPart, '\n| ' .. Constants.getModifiersText(season.modifiers))
end
end
table.insert(resultPart, '\n|}')
table.insert(resultPart, '\n|}')