8,290
edits
(support population item sets) |
mNo edit summary |
||
Line 89: | Line 89: | ||
--[logic for population tables]-- | --[logic for population tables]-- | ||
local descprefix = 'Item from ' | local descprefix = 'Item from ' | ||
if | if quantity == '*' then | ||
descprefix = 'Set of items from ' | descprefix = 'Set of items from ' | ||
end | end | ||
Line 101: | Line 101: | ||
end | end | ||
local | local quantitystr = '*' | ||
if | if quantity ~= '*' then | ||
quantitystr = 'x' .. quantity | |||
end | end | ||
local inventoryhtml = mw.html.create('div') | local inventoryhtml = mw.html.create('div') | ||
Line 111: | Line 111: | ||
:node(mw.html.create('span') | :node(mw.html.create('span') | ||
:addClass('qud-item-qty') | :addClass('qud-item-qty') | ||
:wikitext( | :wikitext(quantitystr) | ||
:node(mw.html.create('span') | :node(mw.html.create('span') | ||
:addClass('qud-item-chance chance-' .. chance) | :addClass('qud-item-chance chance-' .. chance) | ||
:wikitext( | :wikitext('(' .. chance .. '%)'))) | ||