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

мНет описания правки
мНет описания правки
Строка 34: Строка 34:
         local tech = nil
         local tech = nil
         for _, research in ipairs(dataCache) do
         for _, research in ipairs(dataCache) do
             if research.technology and research.technology.id == researchId then
             if research and research.id == researchId then
                 tech = research.technology
                 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.technology and research.technology.id == prerequisiteId then
                             if research and research.id == prerequisiteId then
                                 prerequisiteName = research.technology.name
                                 prerequisiteName = research.name
                                 break
                                 break
                             end
                             end