Circuit Power Measurement Pole deprecated

by mk-fg

[DEPRECATED] Adds Small 'Smart Meter' Electric Pole that transmits electrical network power production info to any constant combinator within its range.

Content
4 years ago
0.17
7
Circuit network

b Connecting/Disconnecting power networks

4 years ago

When connecting/disconnecting different networks via a switch, if a type of power no longer exists on a circuit the last value remains.

For example, network 1 has solar panel and network 2 has solar panel and steam power. Both networks have measurement poles. A switch between networks, initially in the OFF position, the measurement pole for Network one shows only solar, network two shows solar and steam. Turning the switch to the on position, the measurement poles for both networks show the same values showing both steam and solar. Turning the switch back to the off position, network 1 will keep the last steam value that was present before the networks were disconnected, and the current value for solar. Network 2 will show current values for both steam and solar.

Expected behavior: When turn off switch, network 1 would show 0 for steam power, as there is no longer any source of steam connected.

4 years ago

Thanks for a great report.

Indeed, pretty sure this is how it should work with current code - mod hook adds or updates signals for entities that are tracked in the grid which pole is connected to every nth tick.
If grids change and some stat disappears from there completely, its value in the combinator will be left untouched, same as any other values that one might set there manually.

Shouldn't be a problem to remember which values were last updated and zero them out or remove if there's no longer such stat in the electrical grid, will fix in a moment.

4 years ago

Should be fixed in 0.0.3.
Extra check is now made for combinator signals, and if same signal at the same index was updated last time but no longer among grid stats on the pole, it gets dropped.

4 years ago

Awesome! Works great.

Thanks for the great mod!

New response