Energy state awareness events

Things that we aren't going to implement
Post Reply
Dark
Long Handed Inserter
Long Handed Inserter
Posts: 83
Joined: Wed May 07, 2014 12:45 pm
Contact:

Energy state awareness events

Post by Dark »

Basically this comes to two new events - onpoweredup and onpowereddown, both provide entity object that was turned on or off and the tick value to track how many objects to process per tick from lua.
Bonus points if events will come in order of increasing distance from power source, for a nice cascading effect.

And one additional event if possible - onpowerdelta - triggered when amount of available energy changes, ex. when an inserter receives less energy than required for full operation at full speed.
This can also be done by extending onpoweredup, onpowereddown with delta value, and call them every time when available energy changes.

I searched this forum a lot and unless I missing something big here the only way to track such thing as "powered" state is to build list of entities an iterate over this list every tick (or few ticks with fragmentation), not only this complex and error prone but it's also very performance hungry if you have a lot of objects to track.

Thanks for reading.

Post Reply

Return to “Won't implement”