FANDOM


local Season = {}
 -- This module handles formatting of seasons display in infoboxes, via the [[Template:Season]]
 
 -- Current number of seasons (changing it should automatically add/remove seasons to the display)
local seasoncount = 1
 
 -- Fonction d'affichage des icônes à appeler
function Season.display(frame)
 local stringBuilder = ""
 for i = 1, seasoncount do
  found = false
  for _, code in ipairs(frame.args) do
   if tonumber(code)==i then -- If the season number is present in the arguments
    stringBuilder = stringBuilder .. "[[Season "..i.."|S"..i.."]]"
    found = true
    break
   end
  end
  if not found then
   stringBuilder = stringBuilder .. "<s>S"..i.."</s>"
  end
  if i~=seasoncount then
   stringBuilder = stringBuilder .. " - "
  end
 end
 
 return stringBuilder
end
 
return Season

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.