Module:Navbox fighter (Tekken 7): Difference between revisions

From Wavu Wiki, the 🌊 wavy Tekken wiki
m (RogerDodger moved page Module:Navbox fighter7 to Module:Navbox fighter (Tekken 7) without leaving a redirect)
No edit summary
Line 15: Line 15:
local list = ""
local list = ""
for _, page in ipairs(pages) do
for _, page in ipairs(pages) do
list = list .. "* [[" .. game.fighterPage(fighter, page:lower()) .. "|" .. page .. "]]\n"
list = list .. "\n* [[" .. game.fighterPage(fighter, page:lower()) .. "|" .. page .. "]]"
end
end
return mw.getCurrentFrame():expandTemplate{
return mw.getCurrentFrame():expandTemplate{
Line 23: Line 23:
links1 = mw.getCurrentFrame():expandTemplate{
links1 = mw.getCurrentFrame():expandTemplate{
title = "Dotlist",
title = "Dotlist",
args = { list .. extra }
args = { list .. " " .. extra }
}
}
}
}

Revision as of 15:43, 25 January 2024

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 = "[[" .. fighter .. "]]",
			links1 = mw.getCurrentFrame():expandTemplate{
				title = "Dotlist",
				args = { list .. " " .. extra }
			}
		}
	}
end

return p