Модуль:CurrencyDiamondsConverter: различия между версиями
Hloth (обсуждение | вклад) м Hloth переименовал страницу Модуль:CurrencyToDiamonds в Модуль:CurrencyDiamondsConverter |
Hloth (обсуждение | вклад) Нет описания правки |
||
| Строка 47: | Строка 47: | ||
local spur = math.floor(sum / spurNominal) | local spur = math.floor(sum / spurNominal) | ||
local coinTemplate = ' | local coinTemplate = '{{Currency/Coin|%i|%s}}' | ||
local result = '' | local result = '' | ||
if sun > 0 then | if sun > 0 then | ||
result = result .. string.format(coinTemplate, | result = result .. string.format(coinTemplate, sun, 'Солнышко') | ||
end | end | ||
if crown > 0 then | if crown > 0 then | ||
result = result .. string.format(coinTemplate, | result = result .. string.format(coinTemplate, crown, 'Коронка') | ||
end | end | ||
if cog > 0 then | if cog > 0 then | ||
result = result .. string.format(coinTemplate, | result = result .. string.format(coinTemplate, cog, 'Шестеренка') | ||
end | end | ||
if sprocket > 0 then | if sprocket > 0 then | ||
result = result .. string.format(coinTemplate, | result = result .. string.format(coinTemplate, sprocket, 'Звездочка') | ||
end | end | ||
if bevel > 0 then | if bevel > 0 then | ||
result = result .. string.format(coinTemplate, | result = result .. string.format(coinTemplate, bevel, 'Фаска') | ||
end | end | ||
if spur > 0 then | if spur > 0 then | ||
result = result .. string.format(coinTemplate, | result = result .. string.format(coinTemplate, spur, 'Шпора') | ||
end | end | ||