Editing Module:ProfessionList
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 154: | Line 154: | ||
-- include the price of selling the product |
-- include the price of selling the product |
||
item.sellPrice = search.getShopSellPrice(item.product) |
|||
local qty = item.output[1].quantity |
|||
item.sellPrice = sell and qty and sell * qty |
|||
item.profit = item.buyPrice and item.sellPrice and item.sellPrice - item.buyPrice |
|||
item.profitPerXP = item.profit and item.xp and item.profit / item.xp |
|||
end |
end |
||
return output |
return output |
||
end |
|||
function p.one_column_image_text(sort,materials) |
|||
local materialCell = mw.html.create('td') |
|||
for _, mat in ipairs(item.materials) do |
|||
materialCell:wikitext(mat.quantity .. ' × [[File:' .. mat.name .. '.png|18px|link=' .. mat.name .. ']] [[' .. mat.name .. ']]<br>') |
|||
end |
|||
return materialCell |
|||
end |
end |
||
Line 203: | Line 186: | ||
:addClass('plinkt-image no-border') |
:addClass('plinkt-image no-border') |
||
:css{ ['border-left'] = '0', ['padding-left'] = '0' } |
:css{ ['border-left'] = '0', ['padding-left'] = '0' } |
||
:wikitext('[[' .. image .. '|link=' .. link .. '|30px]]') |
:wikitext('[[File:' .. image .. '.png|link=' .. link .. '|30px]]') |
||
:done() |
:done() |
||
:tag('td') |
:tag('td') |