Модуль:Песочница/Pok: различия между версиями

Нет описания правки
мНет описания правки
Строка 10: Строка 10:
local results = {}
local results = {}
for _, research in ipairs(dataCache) do
for _, research in ipairs(dataCache) do
if research.technology.discipline == discipline then
if research.technology and research.technology.discipline == discipline then
table.insert(results, research.technology)
table.insert(results, research.technology)
end
end
Строка 52: Строка 52:


out = out .. '<div class="research" id="' .. tech.discipline .. '">'
out = out .. '<div class="research" id="' .. tech.discipline .. '">'
out = out .. '<div class="research__images">{{#invoke:Entity Sprite|main|path=' .. iconPath .. '}}</div>'
out = out .. '<div class="research__images">{{#invoke:Entity Sprite|main|path|' .. iconPath .. '}}</div>'
out = out .. '<div class="research__name">' .. tech.name .. '[[Файл:' .. tech.discipline .. '.png|16px|link=]]</div>'
out = out .. '<div class="research__name">' .. tech.name .. '[[Файл:' .. tech.discipline .. '.png|16px|link=]]</div>'
out = out .. '<div class="research__type">'
out = out .. '<div class="research__type">'