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

мНет описания правки
мНет описания правки
Строка 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>'
out = out .. '<div class="research__unblocks">Необходимые технологии:'
out = out .. '<ul>'
if tech.technologyPrerequisites and #tech.technologyPrerequisites > 0 then
if tech.technologyPrerequisites and #tech.technologyPrerequisites > 0 then
for _, prerequisite in ipairs(tech.technologyPrerequisites) do
out = out .. '<div class="research__prerequisites">Необходимые технологии:'
out = out .. frame:preprocess('<li>{{#invoke:Entity Lookup|createimagetooltip|Файл:' .. prerequisite .. '.png|' .. prerequisite .. '|Мета=32x32px,link=}} {{#invoke:Entity Lookup|getname|' .. prerequisite .. '}}</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
out = out .. '</ul>'
out = out .. '</div>'
out = out .. '<div class="research__unblocks">Разблокирует:'
out = out .. '<ul>'


-- Используем кастомные рецепты, если они есть
-- Используем кастомные рецепты, если они есть