Module:Infobox Recipe: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(change behavior for hiding album xp: looks for parameter "hideAlbum" on the page and replaces album xp with "N/A" if it is true) |
(checks for a parameter "passive" in the template, and if it is true it displays Passive next to the experience with a tooltip) |
||
Line 30: | Line 30: | ||
--If set to true, will check hide the album xp section as the item does not give album xp. |
--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) |
local hideAlbum = yn(args.hideAlbum or 'no', false) |
||
--Checks if the recipe has been flagged as passive, defaults to no. |
|||
local passive = yn(args.passive or 'no', false) |
|||
--Get each of the rawmatX parameters from params and store their values in a new table |
--Get each of the rawmatX parameters from params and store their values in a new table |
||
Line 210: | Line 213: | ||
:tag('th') |
:tag('th') |
||
:attr{ colspan = '2' } |
:attr{ colspan = '2' } |
||
: |
:IF(passive) |
||
:wikitext('[[File:Passive small icon.png|20x20px|link=Passive Activity]] [[Passive Activity|Passive]] [[Experience]]') |
|||
:wikitext(mw.getCurrentFrame():preprocess(' {{Tooltip|passive}}{{Tooltip text|name = passive|content = Passive activities give reduced experience when a players level is high enough to perform a new passive activity for that profession. The number shown here is the full experience.}}')) |
|||
:ELSE() |
|||
:wikitext('[[Experience]]') |
|||
:END() |
|||
:done() |
:done() |
||
:tag('td') |
:tag('td') |
||
Line 413: | Line 421: | ||
return reversed |
return reversed |
||
end |
end |
||
return p |
return p |