Search found 4 matches

by Crimso
Sun Jun 12, 2022 10:01 pm
Forum: Modding help
Topic: Electric Network Statistics returning empty Dictionaries
Replies: 14
Views: 4701

Re: Electric Network Statistics returning empty Dictionaries

I tried your code and it didn't work. [Moderated by Koub : Please be civil, and don't start fights on this forum]

Edit: More specifically if anyone has had luck getting the output or energy producers tab of the electrical network statistics, I would be very grateful for a push in the right ...
by Crimso
Sun Jun 12, 2022 9:48 pm
Forum: Modding help
Topic: Electric Network Statistics returning empty Dictionaries
Replies: 14
Views: 4701

Re: Electric Network Statistics returning empty Dictionaries

my code is indented heavily because it is part of 3000 lines of code. It is printing to the command line prompt I am using to debug the program. I apologize if my formatting is wrong, I am blind and cannot see it. I used pairs initially and got the same result. Thanks for the help ;)
by Crimso
Sun Jun 12, 2022 8:58 pm
Forum: Modding help
Topic: Electric Network Statistics returning empty Dictionaries
Replies: 14
Views: 4701

Re: Electric Network Statistics returning empty Dictionaries

local ent = players[pindex].tile.ents[1]
result = ent.name
result = result .. " " .. ent.type
if ent.type == "electric-pole" then
result = result .. #ent.neighbours.copper
if next(ent.electric_network_statistics.input_counts) == nil then
print("Abandon all hope ye who enter")
end

for i, v ...
by Crimso
Sun Jun 12, 2022 7:53 pm
Forum: Modding help
Topic: Electric Network Statistics returning empty Dictionaries
Replies: 14
Views: 4701

Electric Network Statistics returning empty Dictionaries

Hello Factorio Forum!

I am Crimso, author of an accessibility mod with the goal of making Factorio completely accessible to the blind.

I am running into an issue where when I get the electric_network_statistics value of an electric pole, the output_counts and input_counts attributes are returning ...

Go to advanced search