Module:Infobox Recipe/Sandbox: Difference between revisions
set to current version of main infobox
(center some cells) |
(set to current version of main infobox) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 85:
--Set SMW properties
local smw_properties = {
for _,material in ipairs(argsMaterials) do▼
['Uses item'] = {},
}▼
▲ 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))
end
mw.smw.set(smw_properties)
▲ -- these are for when a recipe is called by a subsequent recipe that uses showFull
▲ ["Uses facility"] = args.facility
▲ -- not implemented yet, for addin to time if showfull is true
▲ ["Uses duration"] = args.duration
--Creates a row suitable for the raw materials section of the infobox.
Line 179 ⟶ 173:
:tag('th')
:attr{ colspan = '2' }
:wikitext('
:done()
:tag('td')
Line 197 ⟶ 191:
:done()
:tag('th')
:attr{ colspan = '
:wikitext('KP')
:done()
:tag('th')
:attr{ colspan = '5' }
:wikitext('XP')
:done()
Line 212 ⟶ 210:
:done()
:tag('td')
:attr{ colspan = '
: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.exp) and (args.exp) or editButton("'''?''' (edit)"))
|