Content added Content deleted
mNo edit summary |
mNo edit summary |
||
(11 intermediate revisions by 2 users not shown) | |||
Line 242: | Line 242: | ||
[240]="The Away Mission Test: Part 36", |
[240]="The Away Mission Test: Part 36", |
||
[241]="The Away Mission Test: Part 37", |
[241]="The Away Mission Test: Part 37", |
||
[242]="The Away Mission Test: Part 38" |
[242]="The Away Mission Test: Part 38", |
||
[243]="The Away Mission Test: Part 39" |
|||
} |
} |
||
Line 255: | Line 256: | ||
end |
end |
||
local |
local util = require("Module:Util") |
||
local mod = { |
|||
chapters = chapters |
|||
} |
|||
--- Usage {{#invoke:Which Chapter|where_chapter|number}} |
|||
function mod.where_chapter(frame) |
function mod.where_chapter(frame) |
||
local args = frame.args |
local args = frame.args |
||
Line 265: | Line 269: | ||
local n = args[1] or pargs[1] or "" |
local n = args[1] or pargs[1] or "" |
||
if n == "89+" then return "Chapter 89+" end |
if n == "89+" then return "Chapter 89+" end |
||
local num = tonumber(n) or |
local num = tonumber(n) or #chapters + 1 |
||
local resolve = args[2] or pargs[2] or nil |
|||
local res = frame:preprocess(get_chapter(num)) |
|||
if resolve ~= nil then |
|||
if res == "TBA" then return res end |
|||
return util.resolve_text(res) |
|||
else |
|||
return res |
|||
end |
|||
end |
end |
||
Latest revision as of 12:18, July 3, 2024
Usage: {{#invoke:Which Chapter|where_chapter|number}}
For Chapter 89+ specifically, use {{#invoke:Which Chapter|where_chapter|89+}}
--- Every single chapter (except for 89+), edit as new chapters are released.
local chapters = {
[1]="Osamu Mikumo (chapter){{!}}Osamu Mikumo",
[2]="Yūma Kuga (chapter){{!}}Yūma Kuga",
[3]="Yūma Kuga 2",
[4]="Osamu Mikumo 2",
[5]="Yūma Kuga 3",
[6]="Arashiyama Squad (chapter){{!}}Arashiyama Squad",
[7]="Ai Kitora (chapter){{!}}Ai Kitora",
[8]="Ai Kitora 2",
[9]="Ai Kitora 3",
[10]="Border's Upper Echelons ",
[11]="Yūichi Jin (chapter){{!}}Yūichi Jin",
[12]="Chika Amatori (chapter){{!}}Chika Amatori",
[13]="Chika Amatori 2",
[14]="Miwa Squad (chapter){{!}}Miwa Squad",
[15]="Miwa Squad 2",
[16]="Miwa Squad 3",
[17]="Yūichi Jin 2",
[18]="Yūgo Kuga (chapter){{!}}Yūgo Kuga",
[19]="Tamakoma Branch (chapter){{!}}Tamakoma Branch",
[20]="Yūma Kuga 4",
[21]="Osamu Mikumo 3",
[22]="Tamakoma Branch 2",
[23]="Tamakoma Branch 3",
[24]="HQ's Top Teams",
[25]="Yūichi Jin 3",
[26]="Arashiyama Squad 2",
[27]="Kei Tachikawa (chapter){{!}}Kei Tachikawa",
[28]="Yūichi Jin 4",
[29]="Arashiyama Squad 3",
[30]="Arashiyama Squad 4",
[31]="Yūichi Jin 5",
[32]="Yūichi Jin 6",
[33]="Yūma Kuga 5",
[34]="Chika Amatori 3",
[35]="Osamu Mikumo 4",
[36]="Osamu Mikumo 5",
[37]="Osamu Mikumo 6",
[38]="Yūma Kuga 6",
[39]="Yūma Kuga 7",
[40]="Yūma Kuga 8",
[41]="Replica (chapter){{!}}Replica",
[42]="Replica 2",
[43]="Yūichi Jin 7",
[44]="Large-Scale Invasion ",
[45]="Large-Scale Invasion 2",
[46]="Large-Scale Invasion 3",
[47]="Large-Scale Invasion 4",
[48]="Large-Scale Invasion 5",
[49]="Large-Scale Invasion 6",
[50]="Osamu Mikumo 7",
[51]="Ai Kitora 4",
[52]="Chika Amatori 4",
[53]="Tamakoma First (chapter){{!}}Tamakoma First",
[54]="Aftokrator (chapter){{!}}Aftokrator",
[55]="Tamakoma First 2",
[56]="Kazama Squad (chapter){{!}}Kazama Squad",
[57]="Large-Scale Invasion 7",
[58]="Large-Scale Invasion 8",
[59]="Large-Scale Invasion 9",
[60]="Large-Scale Invasion 10",
[61]="Large-Scale Invasion 11",
[62]="Aftokrator 2",
[63]="Large-Scale Invasion 12",
[64]="Large-Scale Invasion 13",
[65]="Large-Scale Invasion 14",
[66]="Large-Scale Invasion 15",
[67]="Large-Scale Invasion 16",
[68]="Aftokrator 3",
[69]="Osamu Mikumo 8",
[70]="Large-Scale Invasion 17",
[71]="Large-Scale Invasion 18",
[72]="Large-Scale Invasion 19",
[73]="Large-Scale Invasion 20",
[74]="Kyōsuke Karasuma (chapter){{!}}Kyōsuke Karasuma",
[75]="Large-Scale Invasion 21",
[76]="Shūji Miwa (chapter){{!}}Shūji Miwa",
[77]="Large-Scale Invasion 22",
[78]="Yūma Kuga 9",
[79]="Large-Scale Invasion 23",
[80]="Replica 3",
[81]="Large-Scale Invasion 24",
[82]="Osamu Mikumo 9",
[83]="Yūma Kuga 10",
[84]="Osamu Mikumo 10",
[85]="Osamu Mikumo 11",
[86]="Tamakoma Second (chapter){{!}}Tamakoma Second",
[87]="Tamakoma Second 2",
[88]="Tamakoma Second 3",
[89]="Tamakoma Second 4",
[90]="Tamakoma Second 5",
[91]="Tamakoma Second 6",
[92]="Shiori Usami (chapter){{!}}Shiori Usami",
[93]="Kō Murakami (chapter){{!}}Kō Murakami",
[94]="Yūma Kuga 11",
[95]="Suzunari First (chapter){{!}}Suzunari First",
[96]="Nasu Squad (chapter){{!}}Nasu Squad",
[97]="Nasu Squad 2",
[98]="Nasu Squad 3",
[99]="Nasu Squad 4",
[100]="Kō Murakami 2",
[101]="Yūma Kuga 12",
[102]="Rei Nasu (chapter){{!}}Rei Nasu",
[103]="Tamakoma Second 7",
[104]="Tamakoma Second 8",
[105]="Aftokrator 4",
[106]="Masataka Ninomiya (chapter){{!}}Masataka Ninomiya",
[107]="Osamu Mikumo 12",
[108]="Yuzuru Ema (chapter){{!}}Yuzuru Ema",
[109]="Masato Kageura (chapter){{!}}Masato Kageura",
[110]="Haruaki Azuma (chapter){{!}}Haruaki Azuma",
[111]="Yūichi Jin 8",
[112]="Haruaki Azuma 2",
[113]="Kageura Squad (chapter){{!}}Kageura Squad",
[114]="Masataka Ninomiya 2",
[115]="Osamu Mikumo 13",
[116]="Yūichi Jin 9",
[117]="Yōtarō Rindō (chapter){{!}}Yōtarō Rindō",
[118]="Chika Amatori 5 ",
[119]="Aftokrator 5 ",
[120]="Aftokrator 6 ",
[121]="Galopoula (chapter){{!}}Galopoula",
[122]="Ai Kitora 5 ",
[123]="Galopoula 2 ",
[124]="Galopoula 3",
[125]="Galopoula 4",
[126]="Galopoula 5",
[127]="Galopoula 6",
[128]="Galopoula 7",
[129]="Galopoula 8",
[130]="Galopoula 9",
[131]="Galopoula 10",
[132]="Galopoula 11",
[133]="Galopoula 12",
[134]="Yōtarō Rindō 2",
[135]="Hyuse (chapter){{!}}Hyuse",
[136]="Galopoula 13",
[137]="Katori Squad (chapter){{!}}Katori Squad",
[138]="Tamakoma Second 9",
[139]="Tamakoma Second 10",
[140]="Tamakoma Second 11",
[141]="Tamakoma Second 12",
[142]="Kuniharu Kakizaki (chapter){{!}}Kuniharu Kakizaki",
[143]="Osamu Mikumo 14",
[144]="Yōko Katori (chapter){{!}}Yōko Katori",
[145]="Tamakoma Second 13",
[146]="Tamakoma Second 14",
[147]="Hyuse 2",
[148]="Osamu Mikumo 15",
[149]="Chika Amatori 6",
[150]="Tamakoma Second 15",
[151]="Tamakoma Second 16",
[152]="Tamakoma Second 17",
[153]="Tatsuhito Ikoma (chapter){{!}}Tatsuhito Ikoma",
[154]="Tatsuhito Ikoma 2",
[155]="Ōji Squad (chapter){{!}}Ōji Squad",
[156]="Kazuaki Ōji (chapter){{!}}Kazuaki Ōji",
[157]="Tamakoma Second 18",
[158]="Tamakoma Second 19",
[159]="Hyuse 3",
[160]="Hyuse 4",
[161]="Tamakoma Branch 4",
[162]="Tamakoma Branch 5",
[163]="Yuzuru Ema 2",
[164]="Tamakoma Second 20",
[165]="Osamu Mikumo 16",
[166]="Tamakoma Second 21",
[167]="Suzunari First 2",
[168]="Suzunari First 3",
[169]="Tamakoma Second 22",
[170]="Tamakoma Second 23",
[171]="Hyuse 5",
[172]="Hyuse 6",
[173]="Azuma Squad (chapter){{!}}Azuma Squad",
[174]="Azuma Squad 2",
[175]="Hyuse 7",
[176]="Eizō Netsuki (chapter){{!}}Eizō Netsuki",
[177]="Osamu Mikumo 17",
[178]="Ninomiya Squad (chapter){{!}}Ninomiya Squad",
[179]="Chika Amatori 7",
[180]="Kazuma Satomi (chapter){{!}}Kazuma Satomi",
[181]="Takuma Yuba (chapter){{!}}Takuma Yuba",
[182]="Tamakoma Branch 6",
[183]="Tamakoma Branch 7",
[184]="Yuba Squad (chapter){{!}}Yuba Squad",
[185]="Ninomiya Squad 2",
[186]="Hyuse 8",
[187]="Yuba Squad 2",
[188]="Hyuse 9",
[189]="Chika Amatori 8",
[190]="Yuba Squad 3",
[191]="Yuba Squad 4",
[192]="Masataka Ninomiya 3",
[193]="Masataka Ninomiya 4",
[194]="Osamu Mikumo 18",
[195]="Chika Amatori 9",
[196]="Tamakoma Second 24",
[197]="B-Rank Middle Group Final Round",
[198]="B-Rank Middle Group Final Round 2",
[199]="B-Rank War's End",
[200]="Ruka Shinoda (chapter){{!}}Ruka Shinoda",
[201]="Yōtarō Rindō 3",
[202]="Galopoula 14",
[203]="The Away Mission Test (chapter){{!}}The Away Mission Test",
[204]="The Away Mission Test: Part 2",
[205]="The Away Mission Test: Part 3",
[206]="The Away Mission Test: Part 4",
[207]="The Away Mission Test: Part 5",
[208]="The Away Mission Test: Part 6",
[209]="The Away Mission Test: Part 7",
[210]="The Away Mission Test: Part 8",
[211]="The Away Mission Test: Part 9",
[212]="The Away Mission Test: Part 10",
[213]="The Away Mission Test: Part 11",
[214]="The Away Mission Test: Part 12",
[215]="The Away Mission Test: Part 13",
[216]="The Away Mission Test: Part 14",
[217]="The Away Mission Test: Part 15",
[218]="The Away Mission Test: Part 16",
[219]="The Away Mission Test: Part 17",
[220]="The Away Mission Test: Part 18",
[221]="The Away Mission Test: Part 19",
[222]="The Away Mission Test: Part 20",
[223]="The Away Mission Test: Part 21",
[224]="The Away Mission Test: Part 22",
[225]="Katori Squad 2",
[226]="The Away Mission Test: Part 23",
[227]="The Away Mission Test: Part 24",
[228]="The Away Mission Test: Part 25",
[229]="The Away Mission Test: Part 26",
[230]="The Away Mission Test: Part 27",
[231]="The Away Mission Test: Part 28",
[232]="The Away Mission Test: Part 29",
[233]="The Away Mission Test: Part 30",
[234]="The Away Mission Test: Part 31",
[235]="The Away Mission Test: Part 32",
[236]="Mirai Hatohara (chapter){{!}}Mirai Hatohara",
[237]="The Away Mission Test: Part 33",
[238]="The Away Mission Test: Part 34",
[239]="The Away Mission Test: Part 35",
[240]="The Away Mission Test: Part 36",
[241]="The Away Mission Test: Part 37",
[242]="The Away Mission Test: Part 38",
[243]="The Away Mission Test: Part 39"
}
---@param num integer
local function get_chapter(num)
for i, v in ipairs(chapters) do
if i == num then
return v
end
end
return "TBA"
end
local util = require("Module:Util")
local mod = {
chapters = chapters
}
function mod.where_chapter(frame)
local args = frame.args
local parent = frame:getParent()
local pargs={}
if parent then pargs=parent.args end
local n = args[1] or pargs[1] or ""
if n == "89+" then return "Chapter 89+" end
local num = tonumber(n) or #chapters + 1
local resolve = args[2] or pargs[2] or nil
local res = frame:preprocess(get_chapter(num))
if resolve ~= nil then
if res == "TBA" then return res end
return util.resolve_text(res)
else
return res
end
end
return mod