Модуль:Prototypes/Механика/Исследование: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 116: | Строка 116: | ||
out = out .. '<div>Стоимость: <span style="color:#DA70D6;">' .. tech.cost .. '</span></div>' | out = out .. '<div>Стоимость: <span style="color:#DA70D6;">' .. tech.cost .. '</span></div>' | ||
out = out .. '</div>' | out = out .. '</div>' | ||
if tech.technologyPrerequisites and #tech.technologyPrerequisites > 0 then | if tech.technologyPrerequisites and #tech.technologyPrerequisites > 0 then | ||
for _, | out = out .. '<div class="research__prerequisites">Необходимые технологии:' | ||
out = out .. frame:preprocess('<li> | out = out .. '<ul>' | ||
for _, prerequisiteId in ipairs(tech.technologyPrerequisites) do | |||
local prerequisiteTech = findResearchById(dataCache, prerequisiteId) | |||
out = out .. frame:preprocess('<li>[Файл:' .. prerequisiteId .. '.png|32x32px|link=]] ' .. prerequisiteTech.name .. '</li>') | |||
end | end | ||
out = out .. '</ul>' | |||
out = out .. '</div>' | |||
end | end | ||
-- Используем кастомные рецепты, если они есть | -- Используем кастомные рецепты, если они есть | ||