Module:PotionList: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
m (Remove unused vars)
m (currency_cell now returns a node)
 
Line 37: Line 37:
local function currency_cell(amount)
local function currency_cell(amount)
if not amount then
if not amount then
return tostring(mw.html.create('td')
return mw.html.create('td')
:addClass('table-bg-gray')
:addClass('table-bg-gray')
:css{ ['text-align'] = 'center' }
:css{ ['text-align'] = 'center' }
:attr{ colspan = '10' }
:attr{ colspan = '10' }
:wikitext("''unknown''")
:wikitext("''unknown''")
:done())
:done()
end
end
return currency._cell(amount, { html = 'yes' })
return currency._cell(amount, { html = 'yes' })
Line 165: Line 165:


row
row
:wikitext(currency_cell(item.buy))
:node(currency_cell(item.buy))
:wikitext(currency_cell(item.sell))
:node(currency_cell(item.sell))
:wikitext(currency_cell(item.profit))
:node(currency_cell(item.profit))
:wikitext(currency_cell(item.profitPerHour))
:node(currency_cell(item.profitPerHour))


:IF(item.XP)
:IF(item.XP)
Line 186: Line 186:
:END()
:END()


:wikitext(currency_cell(item.profitPerXP))
:node(currency_cell(item.profitPerXP))


:done()
:done()