Module:Sandbox: Difference between revisions

MDFW - The Mystery Dungeon Tree of Information.
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 10: Line 10:
p = {}
p = {}


function p.pick(name, getVar)
function p.pick(f)
local argsA = name.args[1]
local argsA = f.args[1]
local argsB = getVar.args[2]
local argsB = f.args[2]
--local list = {
--local list = {
-- ["Bulbasaur"] = { ["ja"] = "フシギダネ", ["type1"] = "Grass" },
-- ["Bulbasaur"] = { ["ja"] = "フシギダネ", ["type1"] = "Grass" },
Line 21: Line 21:
--for i, v in pairs(list) do
--for i, v in pairs(list) do
-- for j, w in pairs(v) do
-- for j, w in pairs(v) do
-- if argsA == i and argsB == j then
-- if args.name == i and args.getVar == j then
-- return list[i][j]
-- return list[i][j]
-- end
-- end
-- end
-- end
--end
--end
return name .. " / " .. getVar .. " / " .. argsA .. " / " .. argsB
return argsA.name .. " / " .. argsB.getVar


end
end


return p
return p

Revision as of 21:13, 3 October 2022



----------------------------------------------------------------------------------------------------
--
--                                        Module:Sandbox
--
-- Here you can set anything you want in this sandbox, as long as it uses the language Lua.
-- Do not forget to add {{#invoke:Sandbox|<function name>}} in your template.
-- [[Category:Sandbox]]
----------------------------------------------------------------------------------------------------

p = {}

function p.pick(f)
	local argsA = f.args[1]
	local argsB = f.args[2]
	--local list = {
	--	["Bulbasaur"]	= { ["ja"] = "フシギダネ",		["type1"] = "Grass" },
	--	["Ivysaur"]		= { ["ja"] = "フシギソウ",		["type1"] = "Grass" },
	--	["Venusaur"]	= { ["ja"] = "フシギバナ",		["type1"] = "Grass",	["type2"] = "Poison" }
	--}
	--
	--for i, v in pairs(list) do
	--	for j, w in pairs(v) do
	--		if args.name == i and args.getVar == j then
	--			return list[i][j]
	--		end
	--	end
	--end
	return argsA.name .. " / " .. argsB.getVar

end

return p