Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 206: | Строка 206: | ||
local result = {} | local result = {} | ||
local classesRolls, classesProb | |||
if wrapped then | if wrapped then | ||
if nestedSelector.rolls and nestedSelector.rolls.range then | if nestedSelector.rolls and nestedSelector.rolls.range then | ||
classesRolls = processRolls(nestedSelector.rolls) | |||
end | end | ||
if nestedSelector.prob then | if nestedSelector.prob then | ||
classesProb = string.format(" <div>%s%%</div>", nestedSelector.prob * 100 >= 1 and math.floor(nestedSelector.prob * 100) or nestedSelector.prob * 100) | |||
end | end | ||
end | end | ||
if wrapped and classesRolls and classesProb | if wrapped and classesRolls and classesProb then | ||
result[#result + 1] = string.format('{{LinkСard/Сollapsible|name=Группа %s%s|content=', classesRolls, classesProb) | result[#result + 1] = string.format('{{LinkСard/Сollapsible|name=Группа %s%s|content=', classesRolls, classesProb) | ||
end | end | ||
| Строка 222: | Строка 224: | ||
result[#result + 1] = getTableOutput(nestedSelector.tableId) | result[#result + 1] = getTableOutput(nestedSelector.tableId) | ||
if wrapped and classesRolls and classesProb | if wrapped and classesRolls and classesProb then | ||
result[#result + 1] = "}}" | result[#result + 1] = "}}" | ||
end | end | ||