Module:StonemasonPassiveList: Difference between revisions
remove dependency on Module:Infobox Recipe, as it does not need the recursive recipe finding subroutine
(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, -...") |
(remove dependency on Module:Infobox Recipe, as it does not need the recursive recipe finding subroutine) |
||
Line 1:
require('strict')
require('Module:Mw.html extension')
local param = require( 'Module:Paramtest' )
local currency = require('Module:Currency')
Line 79 ⟶ 78:
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 ⟶ 101:
item.buy = item.buy and item.buy + shopPrice * material.quantity
end
|