Module:Infobox Recipe: Difference between revisions
change behavior for hiding album xp: looks for parameter "hideAlbum" on the page and replaces album xp with "N/A" if it is true
(quest items will link to the quest instead of displaying xp or kp) |
(change behavior for hiding album xp: looks for parameter "hideAlbum" on the page and replaces album xp with "N/A" if it is true) |
||
Line 27:
--If set to true, will check if any of the items passed as a rawmaterialparam are actually intermediate materials. Will then change the display order of the infobox.
local showFullRecipe = yn(args.showFull or 'no', false)
--If set to true, will check hide the album xp section as the item does not give album xp.
local hideAlbum = yn(args.hideAlbum or 'no', false)
--Get each of the rawmatX parameters from params and store their values in a new table
local argsMaterials = p._extractRawMaterials(args)
Line 204 ⟶ 207:
:done()
:done()
:
:tag('
:
:attr{ colspan = '2' }▼
▲ :wikitext('[[Experience]]')
:done()▼
:tag('td')▼
: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('tr')
:tag('th')
Line 246 ⟶ 247:
:wikitext('Level')
:done()
:
:
▲ :wikitext('[[Knowledge|KP]]')
:
▲ :wikitext('[[Album|Album XP]]')
▲ :done()
:ELSE()▼
:tag('th')▼
▲ :done()
:done()
:tag('tr')
Line 272 ⟶ 266:
:wikitext(hc(args.level) and (args.level) or editButton("'''?''' (edit)").. '[[Category:Needs level recipe]]')
:done()
:
:
▲ :wikitext(hc(args.kp) and ('%s%%'):format(args.kp) or editButton("'''?''' (edit)").. '[[Category:Needs knowledge recipe]]')
:
:IF(hideAlbum)
:wikitext(album_xp or 'Unknown')
:
:
:done()
|