Module:Dungeon Items Content

MDFW - The Mystery Dungeon Tree of Information.
Revision as of 19:31, 27 March 2023 by Adkuate (talk | contribs) (Created page with "-------------------------------------------------------------------------------- -- -- Module:Dungeon Items Content -- -------------------------------------------------------------------------------- local p = {} local mw = require('mw') function p.main(frame) local args = frame.args local output = {} table.insert(output, '<div class="dungeonItemsContent">') for i = 1, 100 do local cellArg = args["cell_" .. i] if not cellArg then break -- exit loop when n...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Dungeon Items Content/doc

--------------------------------------------------------------------------------
--
--				Module:Dungeon Items Content
--
--------------------------------------------------------------------------------

local p = {}
local mw = require('mw')

function p.main(frame)
	local args = frame.args
	local output = {}
	table.insert(output, '<div class="dungeonItemsContent">')
	for i = 1, 100 do
		local cellArg = args["cell_" .. i]
		if not cellArg then
			break -- exit loop when no more rows are found
		end
		local rowData = {}
		table.insert(rowData, '<div class="dungeonItemsContentRow">' .. (cellArg or "") .. '</div>')
		table.insert(output, table.concat(rowData))
	end
	table.insert(output, '</div>')
	return table.concat(output)
end

return p