Search found 1 match

by modlearner234
Wed Aug 17, 2022 12:19 pm
Forum: Modding help
Topic: Detecting Electicity Disconnects - first time modder
Replies: 1
Views: 884

Detecting Electicity Disconnects - first time modder

Hi. First time modding factorio.

I'm trying to detect accidentally power disconnects when a player removes an electric pole.

My approach:

For each power_pole in LuaEntity.neighbours['copper']:
Check power_pole.electric_network_statistics
If consumption >> production, raise a warning ...

Go to advanced search