Модуль:Prototypes/Хранилище/Предмет: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 89: | Строка 89: | ||
-- Получение содержимого через таблицу | -- Получение содержимого через таблицу | ||
getContentsOutput = function(contents) | getContentsOutput = function(contents) | ||
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) | ||