FANDOM


local p = {}
 
local data_tables = require('Module:Sandbox/ThePsionic/data').main
 
function p.main(frame)
	local args = frame:getParent().args
	local type = args[1]
	local data_set = data_tables(type)
	return p._main(data_set)
end
 
function p._main(items)
	local ret_table = mw.html.create('table')
			:addClass('wikitable')
			:addClass('sortable')
			:css('width','100%')
			:tag('tr')
				:tag('th')
					:css('width','7%')
					:wikitext('ID')
				:done()
				:tag('th')
					:css('width','93%')
					:wikitext('Item')
				:done()
			:done()
	for i, v in ipairs(items) do
		local item_tr = mw.html.create('tr')
		if v[3] then
			item_tr:css('background','#ff6961')
		end
		item_tr:tag('td')
				:wikitext(v[1])
			:done()
			:tag('td')
				:wikitext('[['..v[2]..']]')
			:done()
		:done()
		ret_table:node(item_tr)
	end
	ret_table:done()
	return ret_table
end
 
return p

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.