Page 1 of 1

Getting a list of all the power poles.

Posted: Thu May 25, 2017 6:19 pm
by archeious
I am really struggling with Factorio mods and LUA in general.

I want to get a list of the power poles and then read the corresponding electric_network_statistics. I am not even sure where to start.

Re: Getting a list of all the power poles.

Posted: Thu Jun 01, 2017 5:45 pm
by archeious
Anyone?

Re: Getting a list of all the power poles.

Posted: Thu Jun 01, 2017 6:01 pm
by Pandemoneus
You will want to use http://lua-api.factorio.com/latest/LuaS ... s_filtered with type = "electric-pole" and then use http://lua-api.factorio.com/latest/LuaE ... statistics.

If you need a code example, let me know.