Accumulator buffer_capacity changes don't update on load
Posted: Thu Jul 20, 2017 7:57 pm
I've been tinkering with RailPowerSystem, which uses ghost accumulators in the tracks. I changed
from buffer_capacity = "11kJ", and reloaded ( I changed it a lot ) and during on_tick event had this logging statement which shows the buffer capcity. No matter when/how I changed the buffer capacity, it would always print 11000. I had added a logging in data-final-updates.lua to see that the value was change, and it was... but still it said 110000. I searched for '11k', =11, a few other things and could not find any reason that the value was not updated.
Finally I decided to deconstruct the track and rebuild it, and then it got the updated values. So; changing buffer_capacity for an accumulator type object does not update what electric_buffer_size reports; or indeed that energy that it is able to store.
Code: Select all
data.raw["electric-energy-interface"]["rail-accu"].energy_source.buffer_capacity="2500kJ";
Code: Select all
log( "required Power:".. requiredPower .. " ee:".. entity.energy.. " ga:".. ghostAccu.energy .. " gbs:"..ghostAccu.electric_buffer_size);
Finally I decided to deconstruct the track and rebuild it, and then it got the updated values. So; changing buffer_capacity for an accumulator type object does not update what electric_buffer_size reports; or indeed that energy that it is able to store.