Make a consuming EEI remember it's lifetime average satisfaction.
Why?
Making entities with custom behavior that also continuously consumes energy to execute this behavior currently requires to make one of several annoying compromises:
- Consume energy from the buffer every tick -> high UPS cost
- Use a larger buffer and only consume every n ticks -> ugly huge spikes in the energy graph and incorrect behavior if the player does not have enough accumulators to catch the spikes
- Set the EEI to consume energy per tick -> no way to tell if the EEI is getting 100% satisfaction
If the EEI remembered the total consumed energy it would be trivial to compare the expected total with the actual total, but ofc this requires storing a quite large number in the entity and is thus unlikely to happen i guess. So the second possiblity i can come up with is for the EEI to calculate an average of it's overall satisfaction. This is still extra entity data but only a simple float. The nth_tick handler could then reset the value back to 1 to get the satisfaction between nth_ticks.