Module:Infobox Recipe: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
(when a recipe is set to passive, display the -per-hour p and materials in brackets)
m (different variable names for Full Recipe XP and passive's per-hour recipe XP)
 
Line 109: Line 109:


-- display XP and duration totals for multi-step process
-- display XP and duration totals for multi-step process
args.displayXP = tonumber(args.exp) and searchResult.xp and searchResult.xp + tonumber(args.exp)
args.fullXP = tonumber(args.exp) and searchResult.xp and searchResult.xp + tonumber(args.exp)
args.displayDuration = tonumber(args.duration) and searchResult.duration and searchResult.duration + tonumber(args.duration)
args.displayDuration = tonumber(args.duration) and searchResult.duration and searchResult.duration + tonumber(args.duration)
Line 115: Line 115:
rawMaterials = argsMaterials
rawMaterials = argsMaterials
end
end
--If it is a passive recipe, will want to display the per-hour values for XP and materials used
--If it is a passive recipe, will want to display the per-hour values for XP and materials used
Line 243: Line 242:
:IF(showFullRecipe)
:IF(showFullRecipe)
:wikitext(' (')
:wikitext(' (')
:wikitext(hc(args.displayXP) and (formatNum(tonumber(args.displayXP))) or ("'''?'''"))
:wikitext(hc(args.fullXP) and (formatNum(tonumber(args.fullXP))) or ("'''?'''"))
:wikitext(' total)')
:wikitext(' total)')
:END()
:END()