Module:Infobox Recipe/Sandbox: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(time > duration)
(implement kp, put it next to xp)
Line 101: Line 101:
if args.duration then
if args.duration then
mw.smw.set({
mw.smw.set({
["Uses duration"] = args.duration
["has duration"] = args.duration
})
end
if args.kp then
mw.smw.set({
["has kp"] = args.kp
})
})
end
end


--Creates a row suitable for the raw materials section of the infobox.
--Creates a row suitable for the raw materials section of the infobox.
Line 197: Line 201:
:done()
:done()
:tag('th')
:tag('th')
:attr{ colspan = '10' }
:attr{ colspan = '5' }
:wikitext('KP')
:done()
:tag('th')
:attr{ colspan = '5' }
:wikitext('XP')
:wikitext('XP')
:done()
:done()
Line 212: Line 220:
:done()
:done()
:tag('td')
:tag('td')
:attr{ colspan = '10' }
:attr{ colspan = '5' }
:css{ ['text-align'] = 'center' }
:wikitext(hc(args.kp) and (args.kp) or editButton("'''?''' (edit)"))
:done()
:tag('td')
:attr{ colspan = '5' }
:css{ ['text-align'] = 'center' }
:css{ ['text-align'] = 'center' }
:wikitext(hc(args.exp) and (args.exp) or editButton("'''?''' (edit)"))
:wikitext(hc(args.xp) and (args.xp) or editButton("'''?''' (edit)"))
:done()
:done()
:done()
:done()