Module:ItemTables: Difference between revisions

add bullet resist reduction, add souls icon, apply fix for negative numbers that are not red, cleanup
move icon, it is messing up sort
Line 157: Line 157:
:addClass('wikitable sortable')
:addClass('wikitable sortable')
:tag('caption'):wikitext("List of items"):done()
:tag('caption'):wikitext("List of items"):done()
local soulIcon = frame:expandTemplate{ title = 'Souls' }
local createTableHeader = mw.html.create('tr')
local createTableHeader = mw.html.create('tr')
createTableHeader
createTableHeader
:tag('th'):wikitext('Name'):done()
:tag('th'):wikitext('Name'):done()
:tag('th'):wikitext('Cost'):done()
:tag('th'):wikitext(soulIcon .. 'Cost'):done()
:tag('th'):wikitext('Category'):done()
:tag('th'):wikitext('Category'):done()
:tag('th'):wikitext('Stat change'):done()
:tag('th'):wikitext('Stat change'):done()
Line 176: Line 178:
}
}
}
}
local soulIcon = frame:expandTemplate{ title = 'Souls' }
for k, t in pairs(listofKeysTable) do
for k, t in pairs(listofKeysTable) do
Line 187: Line 188:
tableData
tableData
:tag('td'):wikitext(display):done()
:tag('td'):wikitext(display):done()
:tag('td'):wikitext(soulIcon .. commas._add(get_cost(itemName["Name"]))):done()
:tag('td'):wikitext(commas._add(get_cost(itemName["Name"]))):done()
:tag('td'):wikitext(get_type(itemName["Name"])):done()
:tag('td'):wikitext(get_type(itemName["Name"])):done()