What can be researched?
What can be researched?
How to get this information? http://lua-api.factorio.com/latest/LuaTechnology.html
Re: What can be researched?
check if all http://lua-api.factorio.com/latest/LuaT ... requisites are http://lua-api.factorio.com/latest/LuaT ... researched .
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: What can be researched?
Code: Select all
local function get_tech_color(tech)
if tech.researched then
return 'green'
end
for _,pre in pairs(tech.prerequisites) do
if not tech.force.technologies[pre.name].researched then
return 'red'
end
end
return 'yellow'
end
local force = game.player.force --enter your force here
local color = {}
for _,tech in pairs(force.technologies) do
color[tech.name] = get_tech_color(tech)
end
print(serpent.block(color))