8,756
edits
(use expandTemplate) |
(set template = (title) to specify a template) |
||
Line 5: | Line 5: | ||
function DiceStats.diceStats(frame) | function DiceStats.diceStats(frame) | ||
local dice = Dice.fromString(frame.args.roll) | local dice = Dice.fromString(frame.args.roll) | ||
if (frame.args.template ~= nil or frame.args.template ~= '') then | |||
local templatetitle = frame.args.template | |||
else | |||
local templatetitle = 'DiceStats' | |||
end | |||
return frame:expandTemplate{ | return frame:expandTemplate{ | ||
title = | |||
title = templatetitle, | |||
args = { | args = { | ||
minimum = dice:minimum(), | minimum = dice:minimum(), |