Module:Navbox fighter (Tekken 7)

From Wavu Wiki, the 🌊 wavy Tekken wiki
Revision as of 15:20, 25 January 2024 by RogerDodger (talk | contribs) (RogerDodger moved page Module:Navbox fighter7 to Module:Navbox fighter (Tekken 7) without leaving a redirect)

Documentation for this module may be created at Module:Navbox fighter (Tekken 7)/doc

local p = {}

local game = require("Module:Game").Tekken7
local pages = {
	"Movelist", "Strategy", "Punishers", "Combos",
	"Tech", "Counterplay", "Changelog"
}

p.main = function(frame)
	return p._main(frame.args[1], frame.args[2])
end

p._main = function(fighter, extra)
	extra = extra or ""
	local list = ""
	for _, page in ipairs(pages) do
		list = list .. "* [[" .. game.fighterPage(fighter, page:lower()) .. "|" .. page .. "]]\n"
	end
	return mw.getCurrentFrame():expandTemplate{
		title = "Navbox", args = {
			borderWidth = "0 1px 2px 1px",
			heading1 = "[[" .. fighter .. "]]",
			links1 = mw.getCurrentFrame():expandTemplate{
				title = "Dotlist",
				args = { list .. extra }
			}
		}
	}
end

return p