Module:AlchemistList: Difference between revisions
m
change "potion" to "product" and "reagent" to "material" so it matches all the other crafting profession tables. functionality unchanged.
Californ1a (talk | contribs) mNo edit summary |
m (change "potion" to "product" and "reagent" to "material" so it matches all the other crafting profession tables. functionality unchanged.) |
||
Line 51:
function p.formatResults(results)
-- iterate through
for _, item in ipairs(results) do
Line 63:
local Materials = recipe._getTrueRawMaterials(unpackJSON.materials)
if next(Materials) ~= nil then
item.
item.intermediates = Materials.intermediateMaterials
end
-- iterate through
item.buy = 0
for _,
--shamelessley lifted from Module:Products
local shopPriceQuery = '[[:+]][[Sold item::' ..
local shopPriceResult = mw.smw.ask(shopPriceQuery) or {}
local shopPrice = 0
Line 82:
end
item.buy = item.buy and item.buy + shopPrice *
end
Line 134:
local downtime = 40
item.duration = item.duration and item.duration + downtime/batchSize
item.
-- properties per hour
item.XPPerHour = item.XP and item.
item.profitPerHour = item.profit and item.
end
Line 154:
:tag('th')
:attr{ colspan = '3' }
:wikitext('
:done()
:tag('th')
:wikitext('
:done()
:tag('th')
Line 218:
:done()
local
for i, _ in ipairs(item.
end
|