Get total power consumption and power output

Place to get help with not working mods / modding interface.
ElGaucho
Burner Inserter
Burner Inserter
Posts: 19
Joined: Mon Mar 27, 2017 9:27 pm
Contact:

Get total power consumption and power output

Post by ElGaucho »

Is there a simple way to get the current power output and current power consumption (and total power demand)? I am trying currently to iterate trough all entities, but i guess it's a bit overkill and nevertheless, i get an error that "Entity is not electric-energy-interface" when i try to access entity.power_usage or entity.power_production. Any simple way to get those numbers?
Post Reply

Return to “Modding help”