Модуль:Prototypes/Механика/Исследование: различия между версиями
Pok (обсуждение | вклад) мНет описания правки |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 34: | Строка 34: | ||
local tech = nil | local tech = nil | ||
for _, research in ipairs(dataCache) do | for _, research in ipairs(dataCache) do | ||
if research | if research and research.id == researchId then | ||
tech = research | tech = research | ||
break | break | ||
end | end | ||
| Строка 56: | Строка 56: | ||
local prerequisiteName = "" | local prerequisiteName = "" | ||
for _, research in ipairs(dataCache) do | for _, research in ipairs(dataCache) do | ||
if research | if research and research.id == prerequisiteId then | ||
prerequisiteName = research | prerequisiteName = research.name | ||
break | break | ||
end | end | ||