Module:Infobox Recipe/Sandbox: Difference between revisions
set to current version of main infobox
(implement kp, put it next to xp) |
(set to current version of main infobox) |
||
Line 85:
--Set SMW properties
local smw_properties = {
for _,material in ipairs(argsMaterials) do▼
['Uses item'] = {},
}
▲ -- these are for when a recipe is called by a subsequent recipe that uses showFull
▲ for _, material in ipairs(argsMaterials) do
table.insert(smw_properties['Uses item'], material.name)
table.insert(smw_properties['Uses item and quantity'], ('%s,%s'):format(material.name, material.quantity))
▲ ["Uses facility"] = args.facility
▲ -- not implemented yet, for addin to duration if showfull is true
▲ ["has duration"] = args.duration
end
mw.smw.set(smw_properties)
--Creates a row suitable for the raw materials section of the infobox.
Line 222 ⟶ 212:
:attr{ colspan = '5' }
:css{ ['text-align'] = 'center' }
:wikitext(hc(args.kp) and ('%s%%'):format(args.kp) or editButton("'''?''' (edit)"))
:done()
:tag('td')
:attr{ colspan = '5' }
:css{ ['text-align'] = 'center' }
:wikitext(hc(args.
:done()
:done()
|