added if condition to prevent crash
This commit is contained in:
parent
ac25d11648
commit
7d66a29af9
1 changed files with 9 additions and 8 deletions
|
@ -169,7 +169,7 @@ function find_following_techs(tech, break_con)
|
|||
|
||||
for i,v in pairs(data.raw.technology) do
|
||||
--i = techname, v = data.raw.technology[techname]
|
||||
|
||||
if data.raw.technology[i].prerequisites then
|
||||
for j,w in ipairs(data.raw.technology[i].prerequisites) do
|
||||
--prerequisites = {'el_energy_tech'}
|
||||
--j = index, w = techname
|
||||
|
@ -181,6 +181,7 @@ function find_following_techs(tech, break_con)
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return return_table
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue