Module:AlchemistList: Difference between revisions
m
Alsang moved page Module:PotionList to Module:AlchemistList without leaving a redirect: match the naming convention of the other "List" modules
(Makes use of the Infobox Recipe function to automatically find subrecipes and determine the list of raw ingredients, previously it did this manually. Reformatted the output to look more similar to the Products table.) |
m (Alsang moved page Module:PotionList to Module:AlchemistList without leaving a redirect: match the naming convention of the other "List" modules) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1:
require('strict')
require('Module:Mw.html extension')
local
local param = require( 'Module:Paramtest' )
local currency = require('Module:Currency')
Line 51:
function p.formatResults(results)
-- iterate through
for _, item in ipairs(results) do
--
local
item.
item.XP = fullRecipe.xp
item.duration = fullRecipe.duration
▲ item.buy = 0
▲ QTYmade = QTYmade.output[1].quantity
-- direct values
Line 134 ⟶ 71:
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 ⟶ 91:
:tag('th')
:attr{ colspan = '3' }
:wikitext('
:done()
:tag('th')
:wikitext('
:done()
:tag('th')
Line 218 ⟶ 155:
:done()
local
for i, _ in ipairs(item.
end
|