Module:Symphogear

From Symphogear Wiki
Revision as of 03:37, 12 June 2018 by Firebingo (talk | contribs) (Created page with "local symphogear = {} -- used as the base name for all Symphogear seasons local baseNameJP = "戦姫絶唱シンフォギア" local baseNameLocal = "Senki Zesshou Symphogear"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

local symphogear = {} -- used as the base name for all Symphogear seasons local baseNameJP = "戦姫絶唱シンフォギア" local baseNameLocal = "Senki Zesshou Symphogear" -- important to keep track of number of seasons for informative errors local seasonCount = 5 local seasonsJP = {baseNameJP, baseNameJP.."G", baseNameJP.."GX", baseNameJP.."AXZ", baseNameJP.."XV"} local seasonsLocal = {baseNameLocal, baseNameLocal.." G", baseNameLocal.." GX", baseNameLocal.." AXZ", baseNameLocal.." XV"} -- likewise keep counts updated as updating shit local seasonsWithEpisodes = 4 local episodeCounts = {13, 13, 13, 13} local episodesJP = {

  {},
  {},
  {},
  {}

} local episodesLocal = {

  {},
  {},
  {},
  {}

}

-- stuff under this line is what the program actually calls to pull those arrays

function symphogear.season (frame)

  assert(frame.season <= seasons and frame.season > 0,"Invalid season number.")
  return seasonsLocal[frame.season]

end

function symphogear.seasonJP (frame)

  assert(frame.season <= seasons and frame.season > 0,"Invalid season number.")
  return seasonsJP[frame.season]

end

function symphogear.episode (frame)

  assert(frame.season <= seasonsWithEpisodes and frame.season > 0,"Invalid season number.")
  assert(frame.episode <= episodeCounts[frame.season] and frame.episode > 0,"Invalid episode number.")
  return episodesLocal[frame.season][frame.episode]

end

function symphogear.episodeJP (frame)

  assert(frame.season <= seasonsWithEpisodes and frame.season > 0,"Invalid season number.")
  assert(frame.episode <= episodeCounts[frame.season] and frame.episode > 0,"Invalid episode number.")
  return episodesJP[frame.season][frame.episode]

end

return symphogear