Module:Navbox fighter (Tekken 7)

From Wavu Wiki, the 🌊 wavy Tekken wiki
Revision as of 06:08, 12 February 2024 by RogerDodger (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 .. "\n* [[" .. game.fighterPage(fighter, page:lower()) .. "|" .. page .. "]]"
	end
	return mw.getCurrentFrame():expandTemplate{
		title = "Navbox", args = {
			borderWidth = "0 1px 2px 1px",
			heading1 = "[[" .. game.fighterPage(fighter) .. "|" .. fighter .. "]] (Tekken 7)",
			links1 = mw.getCurrentFrame():expandTemplate{
				title = "Dotlist",
				args = { list .. " " .. extra }
			}
		}
	}
end

return p