Page 1 of 1

[0.14.0] Energy bar can go beyond 0% and 100%

Posted: Fri Aug 26, 2016 9:50 am
by Mooncat
Bug:
The energy production bar can go beyond 0% and 100% if free energy is given to accumulator by mod.
EnergyProductBarBugged.png
EnergyProductBarBugged.png (210.11 KiB) Viewed 2203 times
Steps to reproduce:
1) Download the following little mod. 0.13:
negativeenergyproduction_0.0.1.zip
(1.04 KiB) Downloaded 140 times
0.14:
negativeenergyproduction_0.0.2.zip
(1.04 KiB) Downloaded 147 times
2) Start a new game.
3) Place an electric pole and an accumulator next to the pole.
4) Select the electric pole to open the electric network info panel.
5) Observe the energy production bar.

Possible solution:
Clamp the progress bar to be inside 0% and 100%.

I think this is also affecting all progress bars in the game as I have seen this on the fuel bars of entities that don't use electric energy.

Re: [0.14.0] Energy bar can go beyond 0% and 100%

Posted: Tue Aug 30, 2016 1:09 pm
by Klonan
Thanks for the report,

I have reproduced the issue:


Re: [0.14.0] Energy bar can go beyond 0% and 100%

Posted: Tue Aug 30, 2016 4:18 pm
by kovarex
Thanks for the report, it is fixed for 0.14.2 (The accumulator charge has been properly capped when set from the script)