Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add power metrics #14

Merged
merged 2 commits into from
Feb 20, 2022
Merged

add power metrics #14

merged 2 commits into from
Feb 20, 2022

Conversation

aritas1
Copy link
Contributor

@aritas1 aritas1 commented Feb 5, 2022

Adds power production and consumption metrics (#2).

This core code is a port form this graftorio PR.

I fixed some bugs and removed the event_handler overhaul.

Data are extracted via the electric_network_statistics api and power networks ids get tracked by observing pole build and description events.

A little caveat: If you split your power networks alot, factorio will sometimes increase the power network ids and you will end up with many labels.

@remijouannet remijouannet merged commit d20d8ab into remijouannet:master Feb 20, 2022
remijouannet added a commit that referenced this pull request Feb 20, 2022
@remijouannet
Copy link
Owner

remijouannet commented Feb 20, 2022

@aritas1 i've reworked the code so it look more like train.lua without touching the logic, i only add a check to always rescan_world on the first tick after init/load
can you please test master on your side before i release 0.0.16

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants