Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Gacha tabs

From Sekaipedia
Revision as of 00:58, 13 July 2024 by MathTurtle (talk | contribs)

Documentation for this module may be created at Module:Gacha tabs/doc

local getArgs = require('Module:Arguments').getArgs
local TabsBuilder = require('Module:TabsBuilder')

local p = {}

function p.main(frame)
	local args = getArgs(frame)

	local builder = TabsBuilder.new()
	
	local gachaName = args[1]
	
	local numTabs = args[2]
	
	if gachaName == nil or gachaName == '' then
		error('Gacha name cannot be empty.')
	end
	
	if numTabs == '0' then
		error('Number of tabs cannot be less than 1.')
	end

	builder
		:addTab(gachaName, args[3])
		:addTab(gachaName .. '/Reprint', args[4])
	
	return builder:tostring()
end

return p
Cookies help us deliver our services. By using our services, you agree to our use of cookies.