Module:StonemasonPassiveList: Difference between revisions
No need to hide broken image file links. Should encourage people to upload them.
(Created page with "require('strict') require('Module:Mw.html extension') local recipe = require('Module:Infobox Recipe') -- to make use of its extensive material searching function local param = require( 'Module:Paramtest' ) local currency = require('Module:Currency') local discount = require('Module:MerchantHideDiscount') local lang = mw.getContentLanguage() local p = {} -- non dynamic module, no inputs function p.main() -- returns only directly needed parameter needed for the row, -...") |
(No need to hide broken image file links. Should encourage people to upload them.) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1:
require('strict')
require('Module:Mw.html extension')
local param = require( 'Module:Paramtest' )
local currency = require('Module:Currency')
local lang = mw.getContentLanguage()
Line 79 ⟶ 77:
local unpackJSON = mw.text.jsonDecode(item.recipeJSON)
item.outputQuantity = unpackJSON.output[1].quantity
-- SECTION REMOVED
-- do not need to extensively search for subrecipes, as passive recipe
-- passive recipes only ever have one step
▲ item.materials = Materials.rawMaterials
-- iterate through materials, adding buy price to running total (individuals not needed)
item.buy = 0
Line 106 ⟶ 100:
item.buy = item.buy and item.buy + shopPrice * material.quantity
end
Line 234 ⟶ 189:
:tag('td')
:addClass('plinkt-image no-border')
:css{ ['border-left'] = '0', ['padding-left'] = '0' }
:wikitext('[[File:' .. item.name .. '.png|link=' .. item.name .. '|30px]]')
:done()
Line 247 ⟶ 202:
for i, _ in ipairs(item.materials) do
materialCell:wikitext(item.materials[i].quantity .. '× [[File:' .. item.materials[i].name .. '.png|
end
|