Difference between revisions of "Module:Drop"

From Curse of Aros
Jump to: navigation, search
Line 1: Line 1:
 
local export = {}
 
local export = {}
 +
local item = require('Module:Item')
  
 
function export.main(frame)
 
function export.main(frame)
Line 5: Line 6:
 
local row = mw.html.create('tr'):addClass('coa-drop-row')
 
local row = mw.html.create('tr'):addClass('coa-drop-row')
 
 
row:tag('td'):wikitext('{{Item|' .. args.Name .. '}}')
+
row:tag('td'):wikitext(item.show(args.Name))
 
row:tag('td'):wikitext(args.Quantity)
 
row:tag('td'):wikitext(args.Quantity)
 
row:tag('td'):wikitext(args.Rarity)
 
row:tag('td'):wikitext(args.Rarity)

Revision as of 12:31, 17 November 2019

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

local export = {}
local item = require('Module:Item')

function export.main(frame)
	local args = frame:getParent().args
	local row = mw.html.create('tr'):addClass('coa-drop-row')
	
	row:tag('td'):wikitext(item.show(args.Name))
	row:tag('td'):wikitext(args.Quantity)
	row:tag('td'):wikitext(args.Rarity)
	
    return tostring(row)
end

return export