Minecraft Wiki
Advertisement
[view | edit | history | purge]DocumentationJump to code ↴

Welcome to my module sandbox.

This is a sandbox that can be used to test module-related things.

Since it is a sandbox, do not invoke it outside of sandboxes, nor should it be edited by other users.

[view | edit | history | purge]The above documentation is transcluded from Module:Blobs2/Sandbox/doc.
local p = {}
function p.row(f)
	local args = f
	if f == mw.getCurrentFrame() then
		args = f:getParent().args
	else
		f = mw.getCurrentFrame()
	end

	local upcoming = ''
	if args.upcoming then
		upcoming = f:expandTemplate{title = 'Upcoming', args={ver=args.upcoming}}
	end

	local blocks = {}
	for block in mw.text.gsplit(mw.text.trim(args[3]), '%s*,%s*') do
	table.insert(blocks, block)
	end

	return '|-\n|' .. mw.text.trim(args[1]) .. upcoming .. '||note.block.' .. mw.text.trim(args[2]) .. '||' .. mw.text.listToText(blocks) .. '|'
end 

return p
Advertisement