Модуль:CurrencyDiamondsConverter: различия между версиями

м Hloth переименовал страницу Модуль:CurrencyToDiamonds в Модуль:CurrencyDiamondsConverter
Нет описания правки
 
Строка 47: Строка 47:
   local spur = math.floor(sum / spurNominal)
   local spur = math.floor(sum / spurNominal)


   local coinTemplate = '[[Файл:%s.png|link=Валюта|class=pixelated coin16px]][[Валюта|%s]] %i'
   local coinTemplate = '{{Currency/Coin|%i|%s}}'


   local result = ''
   local result = ''


   if sun > 0 then
   if sun > 0 then
     result = result .. string.format(coinTemplate, 'Sun', 'Солнышко', sun)
     result = result .. string.format(coinTemplate, sun, 'Солнышко')
   end
   end


   if crown > 0 then
   if crown > 0 then
     result = result .. string.format(coinTemplate, 'Crown', 'Коронка', crown)
     result = result .. string.format(coinTemplate, crown, 'Коронка')
   end
   end


   if cog > 0 then
   if cog > 0 then
     result = result .. string.format(coinTemplate, 'Cog', 'Шестеренка', cog)
     result = result .. string.format(coinTemplate, cog, 'Шестеренка')
   end
   end


   if sprocket > 0 then
   if sprocket > 0 then
     result = result .. string.format(coinTemplate, 'Sprocket', 'Звездочка', sprocket)
     result = result .. string.format(coinTemplate, sprocket, 'Звездочка')
   end
   end


   if bevel > 0 then
   if bevel > 0 then
     result = result .. string.format(coinTemplate, 'Bevel', 'Фаска', bevel)
     result = result .. string.format(coinTemplate, bevel, 'Фаска')
   end
   end


   if spur > 0 then
   if spur > 0 then
     result = result .. string.format(coinTemplate, 'Spur', 'Шпора', spur)
     result = result .. string.format(coinTemplate, spur, 'Шпора')
   end
   end