Editing Module:AlchemistList
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 3: | Line 3: | ||
local lang = mw.getContentLanguage() |
local lang = mw.getContentLanguage() |
||
local plist = require('Module:ProfessionList') |
local plist = require('Module:ProfessionList') |
||
local |
local rts = require('Module:RecipeTreeSearch') |
||
local p = {} |
local p = {} |
||
Line 10: | Line 10: | ||
function p.main() |
function p.main() |
||
local queryString = '[[Category:Alchemist]] AND [[Category:Pages with recipes]]' |
local queryString = '[[Category:Alchemist]] AND [[Category:Pages with recipes]] OR [[Category:Pages with activities]]' |
||
local function screenFunction(item) |
local function screenFunction(item) |
||
Line 38: | Line 38: | ||
-- iterate through products |
-- iterate through products |
||
for _, item in ipairs(results) do |
for _, item in ipairs(results) do |
||
⚫ | |||
-- list of all pages to edit, if edit is needed |
|||
item.allPageEdits = { item.pageName } |
|||
for _,intermediate in ipairs(item.intermediateMaterials) do |
|||
table.insert(item.allPageEdits,intermediate.name) |
|||
end |
|||
-- profitability |
-- profitability |
||
Line 50: | Line 44: | ||
-- 40 seconds to buy new supplies and travel and deposit and everything, per 12 potions |
-- 40 seconds to buy new supplies and travel and deposit and everything, per 12 potions |
||
local batchSize = 12 |
local batchSize = 12 |
||
if item.product=='10% Potion Healing' then |
|||
batchSize = 24 |
|||
end |
|||
local downtime = 40 |
local downtime = 40 |
||
item.duration = item.duration and item.duration + downtime/batchSize |
item.duration = item.duration and item.duration + downtime/batchSize |
||
Line 75: | Line 66: | ||
local out = mw.html.create('table') |
local out = mw.html.create('table') |
||
:addClass('wikitable sortable') |
:addClass('wikitable sortable') |
||
⚫ | |||
:wikitext('This list is updated dynamically. '..purge()) |
|||
⚫ | |||
:tag('tr') |
:tag('tr') |
||
:tag('th') |
:tag('th') |
||
Line 134: | Line 122: | ||
-- materials |
-- materials |
||
:IF(item.type=='recipe') |
|||
⚫ | |||
:node(plist. |
:node(plist.one_column_image_text(item.materials)) |
||
:node(plist.currency_cell(item. |
:node(plist.currency_cell(item.buyPrice)) |
||
⚫ | |||
:ELSE() |
|||
⚫ | |||
:addClass('table-na') |
|||
:css{ ['text-align'] = 'center' } |
|||
:attr{ colspan = '21' } |
|||
:wikitext('N/A') |
|||
⚫ | |||
:END() |
|||
⚫ | |||
:node(plist.currency_cell(item.profit)) |
:node(plist.currency_cell(item.profit)) |
||
:node(plist.currency_cell(item.profitPerHour)) |
:node(plist.currency_cell(item.profitPerHour)) |
||
Line 146: | Line 145: | ||
:done() |
:done() |
||
:ELSE() |
:ELSE() |
||
:node(plist. |
:node(plist.unknown_value_cell(1)) |
||
:END() |
:END() |
||