Модуль:Prototypes/Механика/Стоимость: различия между версиями

мНет описания правки
мНет описания правки
Строка 12: Строка 12:
     for _, item in ipairs(priceData) do
     for _, item in ipairs(priceData) do
         if item.id == id then
         if item.id == id then
             return frame:preprocess("{{ColorPalette|Other|price|" .. item.StaticPrice.price .. "}}$")
             return frame:preprocess("${{ColorPalette|Other|price|" .. item.StaticPrice.price .. "}}")
         end
         end
     end
     end
Строка 28: Строка 28:
         if numericPrice and numericPrice ~= 0 then
         if numericPrice and numericPrice ~= 0 then
             local name = frame:preprocess('{{#invoke:Entity Lookup|getname|' .. item.id .. '}}')
             local name = frame:preprocess('{{#invoke:Entity Lookup|getname|' .. item.id .. '}}')
             local priceFormatted = frame:preprocess("{{ColorPalette|Other|price|" .. item.StaticPrice.price .. "}}$")
             local priceFormatted = frame:preprocess("${{ColorPalette|Other|price|" .. item.StaticPrice.price .. "}}")
              
              
             local key = name .. "-" .. priceFormatted
             local key = name .. "-" .. priceFormatted