Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 24: | Строка 24: | ||
local image = string.format('%s.png', content.id) | local image = string.format('%s.png', content.id) | ||
local amount = content.amount and string.format(" [%d]", content.amount) or "" | local amount = content.amount and string.format(" [%d]", content.amount) or "" | ||
local prob = content.prob and string.format(" <div>%. | local prob = content.prob and string.format(" <div>%.0f%%</div>", content.prob * 100) or "" -- перевод в проценты | ||
return string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s|name=%s%s%s }}', image, name, amount, prob) | return string.format('{{LinkСard|SideStyle=1|background-color=#d7d7ff0b|image=%s|name=%s%s%s }}', image, name, amount, prob) | ||
end | end | ||