Module:Entry/titles: Difference between revisions

(Lookup table needed in Module:Entry/metatable. Only GBA and Arcade titles yet. Others coming soon.)
 
No edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
local titles = setmetatable({
local p = {}
GBA = {
p.sequence = {
["1"] = { -- Stage 1
{
{"Karate Man Returns!", "Karateka"},
console = "GBA",
{"Rhythm Tweezers 2", "Rhythm Datsumō"},
name = "Rhythm Tengoku"
{"Marching Orders", "Marcher"},
{"Spaceball", nil, "Air Batter"}, -- conflicts with character
{"The Clappy Trio 2", "Pachi Pachi Sanninshū"},
{"Remix 1 (GBA)", nil, "Remix 1"}
},
["2"] = { -- Stage 2
{"Sneaky Spirits 2", "Shiroi Obake"},
{"Iai Giri"},
{"Rat Race", "Kossori Rat"},
{"Sick Beats", "Baikin Hakase"},
{"The☆Bon Odori"},
{"Remix 2 (GBA)", nil, "Remix 2"}
},
["3"] = { -- Stage 3
{"Mahō Tsukai"},
{"Showtime"},
{"Bunny Hop", "Usagi Tobi"},
{"Tram to Poline"},
{"Space Dance"},
{"Remix 3 (GBA)", nil, "Remix 3"}
},
["4"] = { -- Stage 4
{"Quiz Show", "Quiz"},
{"Night Walk"},
{"Power Calligraphy", "Rhythm o Shūji"},
{"Polyrhythm"},
{"Rap Men"},
{"Remix 4 (GBA)", nil, "Remix 4"}
},
["5"] = { -- Stage 5
{"Bouncy Road", "Hopping Road"},
{"Ninja Bodyguard", nil, "Ninja"}, -- conflicts with character
{"Toss Boys"},
{"Hanabi"},
{"Tap Trial", "Tap Dance"},
{"Remix 5 (GBA)", nil, "Remix 5"}
},
["6"] = { -- Stage 6: Revival
{"The Snappy Trio", "Bari Bari Sanninshū"},
{"Bon Dance"},
{"Cosmic Dance", "Cosmo Dance"},
{"Rap Women"},
{"Tap Trial 2", "Super Tap"},
{"Remix 6 (GBA)", nil, "Remix 6"}
},
["7"] = { -- Stage 7: Technician
{"Karateka 2"},
{"Rhythm Datsumō 2"},
{"Ninja no Shison"},
{"Night Walk 2"},
{"Marcher 2"},
{"Remix 7 (GBA)", nil, "Remix 7"}
},
["8"] = { -- Stage 8: Last Technician
{"Hopping Road 2"},
{"Toss Boys 2"},
{"Polyrhythm 2"},
{"Air Batter 2"},
{"Shiroi Obake 2"},
{"Remix 8 (GBA)", nil, "Remix 8"}
},
B = { -- Bonus Corner
{"Café", "Kissa Counsel"},
{"Rhythm Toys", "Omocha"},
{"Endless Games", "Game"},
{"Drum Lesson"},
{"Staff Credits", "Staff"},
{"Live"}
},
E = { -- Endless Games
{"Mr. Upbeat", "Ura Otoko"},
{"Sick Beats", "Baikin Hakase SP"},
{"Quiz Show", "Quiz Special"},
{"Mannequin Kōjō"}
},
T = { -- Rhythm Toys
{"Neko Machine"},
{"Uma Machine"},
{"Kokuhaku Machine"},
{"Rap Machine"}
},
EX = { -- Extra Stage
{"Karate Man Returns!", "Karateka Tempo Up!", "Karateka"},
{"Rhythm Tweezers 2", "Rhythm Datsumō Tempo Up!", "Rhythm Datsumō"},
{"Marching Orders", "Marcher Tempo Up!", "Marcher"},
{"Spaceball", "Air Batter Tempo Up!", "Air Batter"},
{"The Clappy Trio 2", "Pachi Pachi Sanninshū Tempo Up!", "Pachi Pachi Sanninshū"},
{"Remix 1 (GBA)", "Extra Remix"}
}
},
},
Arcade = {
{
["1"] = { -- Stage 1
console = "Arcade",
{"Karate Man Returns!", "Karateka 2P"},
name = "Rhythm Tengoku (Arcade)"
{"Rhythm Tweezers 2", "Rhythm Datsumō 2P"},
{"Marching Orders", "Marcher 2P"},
{"Spaceball", "Air Batter 2P"},
{"The Clappy Trio 2", "Pachi Pachi Sanninshū 2P"}
},
["2"] = { -- Stage 2
{"Sneaky Spirits 2", "Shiroi Obake 2P"},
{"Iai Giri", "Iai Giri 2P"},
{"Rat Race", "Kossori Rat 2P"},
{"Sick Beats", "Baikin Hakase 2P"},
{"The☆Bon Odori", "The☆Bon Odori 2P"}
},
["3"] = { -- Stage 3
{"Mahō Tsukai", "Mahō Tsukai 2P"},
{"Showtime", "Showtime 2P"},
{"Bunny Hop", "Usagi Tobi 2P"},
{"Tram to Poline", "Tram to Poline 2P"},
{"Space Dance", "Space Dance 2P"}
},
["4"] = { -- Stage 4
{"Quiz Show", "Quiz 2P"},
{"Night Walk", "Night Walk 2P"},
{"Power Calligraphy", "Rhythm o Shūji 2P"},
{"Polyrhythm", "Polyrhythm 2P"},
{"Rap Men", "Rap Men 2P"}
},
["5"] = { -- Stage 5
{"Bouncy Road", "Hopping Road 2P"},
{"Ninja Bodyguard", "Ninja 2P"},
{"Toss Boys", "Toss Boys 2P"},
{"Hanabi", "Hanabi 2P"},
{"Tap Trial", "Tap Dance 2P"}
},
["6"] = { -- Stage 6: Revival
{"The Snappy Trio", "Bari Bari Sanninshū 2P"},
{"Bon Dance", "Bon Dance 2P"},
{"Cosmic Dance", "Cosmo Dance 2P"},
{"Rap Women", "Rap Women 2P"},
{"Tap Trial 2", "Super Tap 2P"}
},
["7"] = { -- Stage 7: Technician
{"Karateka 2", "Karateka 2 2P"},
{"Rhythm Datsumō", "Rhythm Datsumō 2 2P"},
{"Ninja no Shison", "Ninja no Shison 2P"},
{"Night Walk 2", "Night Walk 2 2P"},
{"Marcher 2", "Marcher 2 2P"}
},
["8"] = { -- Stage 8: Last Technician
{"Hopping Road 2", "Hopping Road 2 2P"},
{"Toss Boys 2", "Toss Boys 2 2P"},
{"Polyrhythm 2", "Polyrhythm 2 2P"},
{"Air Batter 2", "Air Batter 2 2P"},
{"Shiroi Obake 2", "Shiroi Obake 2 2P"}
},
EX = { -- Extra Stage
{"Karate Man Returns!", "Karateka 2P Tempo Up!", "Karateka 2P"},
{"Rhythm Tweezers 2", "Rhythm Datsumō 2P Tempo Up!", "Rhythm Datsumō 2P"},
{"Marching Orders", "Marcher 2P Tempo Up!", "Marcher 2P"},
{"Spaceball", "Air Batter 2P Tempo Up!", "Air Batter 2P"}
}
},
},
DS = {},
{
Wii = {},
console = "DS",
["3DS"] = {},
name = "Rhythm Heaven"
Switch = {}
},
}, {
{
__index = function(t, entry)
console = "Wii",
if type(entry) == "table" then
name = "Rhythm Heaven Fever"
return t[entry.console][entry.stage][entry.number]
},
end
{
end
console = "3DS",
})
name = "Rhythm Heaven Megamix"
}
}


local stageMT = {
p.lookup = {}
__index = function(stage, n)
for _, rh in ipairs(p.sequence) do
return stage[tonumber(n)]
rh.stages = require("Module:Entry/titles/" .. rh.console)
end
local stageLookup = {}
}
for _, stage in ipairs(rh.stages) do
for _, rhtitle in pairs(titles) do
stageLookup[stage.label] = stage
for _, stage in pairs(rhtitle) do
setmetatable(stage, stageMT)
end
end
p.lookup[rh.console] = stageLookup
end
end


return titles
return p

Latest revision as of 17:35, 22 August 2025

Documentation for this module may be created at Module:Entry/titles/doc

local p = {}
p.sequence = {
	{
		console = "GBA",
		name = "Rhythm Tengoku"
	},
	{
		console = "Arcade",
		name = "Rhythm Tengoku (Arcade)"
	},
	{
		console = "DS",
		name = "Rhythm Heaven"
	},
	{
		console = "Wii",
		name = "Rhythm Heaven Fever"
	},
	{
		console = "3DS",
		name = "Rhythm Heaven Megamix"
	}
}

p.lookup = {}
for _, rh in ipairs(p.sequence) do
	rh.stages = require("Module:Entry/titles/" .. rh.console)
	local stageLookup = {}
	for _, stage in ipairs(rh.stages) do
		stageLookup[stage.label] = stage
	end
	p.lookup[rh.console] = stageLookup
end

return p