Module:Infobox Recipe: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(swap positions of XP and Album XP, replace "XP" with "Experience" where there is space, make "Experience", "KP", and "Album" be links to their own pages)
(quest items will link to the quest instead of displaying xp or kp)
Line 53: Line 53:
end
end
end
end
-- if the recipe is part of a quest
args.quest = args.quest or false


--Set SMW properties early, so latter parts can potentially use it.
--Set SMW properties early, so latter parts can potentially use it.
Line 201: Line 204:
:done()
:done()
:done()
:done()
:tag('tr')
:IF(not args.quest)
:tag('th')
:tag('tr')
:attr{ colspan = '2' }
:tag('th')
:attr{ colspan = '2' }
:wikitext('[[Experience]]')
:wikitext('[[Experience]]')
:done()
:tag('td')
:attr{ colspan = '11' }
:css{ ['text-align'] = 'center' }
:wikitext(hc(args.exp) and (formatNum(tonumber(args.exp))) or editButton("'''?''' (edit)").. '[[Category:Needs experience recipe]]')
:IF(showFullRecipe)
:wikitext(' (')
:wikitext(hc(args.displayXP) and (formatNum(tonumber(args.displayXP))) or ("'''?'''"))
:wikitext(' total)')
:END()
:done()
:done()
:done()
:tag('td')
:END()
:attr{ colspan = '11' }
:css{ ['text-align'] = 'center' }
:wikitext(hc(args.exp) and (formatNum(tonumber(args.exp))) or editButton("'''?''' (edit)").. '[[Category:Needs experience recipe]]')
:IF(showFullRecipe)
:wikitext(' (')
:wikitext(hc(args.displayXP) and (formatNum(tonumber(args.displayXP))) or ("'''?'''"))
:wikitext(' total)')
:END()
:done()
:done()
:tag('tr')
:tag('tr')
:tag('th')
:tag('th')
Line 241: Line 246:
:wikitext('Level')
:wikitext('Level')
:done()
:done()
:tag('th')
:IF(not args.quest)
:attr{ colspan = '5' }
:tag('th')
:attr{ colspan = '5' }
:wikitext('[[Knowledge|KP]]')
:wikitext('[[Knowledge|KP]]')
:done()
:tag('th')
:done()
:attr{ colspan = '5' }
:tag('th')
:attr{ colspan = '5' }
:wikitext('[[Album|Album XP]]')
:wikitext('[[Album|Album XP]]')
:done()
:done()
:ELSE()
:tag('th')
:attr{ colspan = '10' }
:wikitext('Quest Recipe')
:done()
:END()
:done()
:done()
:tag('tr')
:tag('tr')
Line 260: Line 272:
:wikitext(hc(args.level) and (args.level) or editButton("'''?''' (edit)").. '[[Category:Needs level recipe]]')
:wikitext(hc(args.level) and (args.level) or editButton("'''?''' (edit)").. '[[Category:Needs level recipe]]')
:done()
:done()
:tag('td')
:IF(not args.quest)
:attr{ colspan = '5' }
:tag('td')
:css{ ['text-align'] = 'center' }
:attr{ colspan = '5' }
:css{ ['text-align'] = 'center' }
:wikitext(hc(args.kp) and ('%s%%'):format(args.kp) or editButton("'''?''' (edit)").. '[[Category:Needs knowledge recipe]]')
:wikitext(hc(args.kp) and ('%s%%'):format(args.kp) or editButton("'''?''' (edit)").. '[[Category:Needs knowledge recipe]]')
:done()
:tag('td')
:done()
:attr{ colspan = '5' }
:tag('td')
:css{ ['text-align'] = 'center' }
:attr{ colspan = '5' }
:css{ ['text-align'] = 'center' }
:wikitext(album_xp or 'Unknown')
:wikitext(album_xp or 'Unknown')
:done()
:done()
:ELSE()
:tag('td')
:attr{ colspan = '10' }
:css{ ['text-align'] = 'center' }
:wikitext(args.quest)
:done()
:END()
:done()
:done()