Модуль:Prototypes/Хранилище/Предмет: различия между версиями

мНет описания правки
мНет описания правки
Строка 89: Строка 89:
-- Получение содержимого через таблицу
-- Получение содержимого через таблицу
getContentsOutput = function(contents)
getContentsOutput = function(contents)
    local cacheKey = table.concat(contents, ",")
    if containedCache[cacheKey] then return containedCache[cacheKey] end
   
     local result = {}
     local result = {}
     for _, content in ipairs(contents) do
     for _, content in ipairs(contents) do
         result[#result + 1] = formatContent(content)
         result[#result + 1] = tostring(formatContent(content))
     end
     end
   
    local cacheKey = table.concat(result, ",")
    if containedCache[cacheKey] then return containedCache[cacheKey] end
      
      
     containedCache[cacheKey] = table.concat(result)
     containedCache[cacheKey] = table.concat(result)