Page 1 of 1

[2.0.52] Roboport energy buffer never 100% full depending on entity placement order

Posted: Tue May 27, 2025 10:05 am
by Stringweasel
What
The energy of a modded roboport is never 100% full when connected to multiple networks, where the closest network is unpowered. It's always off by the energy drain per tick.

We ran into this with AAI Signal Tranmission where the transceivers are roboports, and we periodically check if the buffer is full and only allow circuit connections if it is. This worked fine in 1.1 but the behaviour seem to have changed in 2.0. If you are part of the Earendel Discord you can find it here.
Reproduction
1. Change a regular roboport like this:

Code: Select all

local robo = data.raw["roboport"]["roboport"]
robo.energy_source =
{
    type = "electric",
    usage_priority = "secondary-input",
    input_flow_limit = "20MW",
    buffer_capacity = "5.5MJ"
}
robo.recharge_minimum = "5MJ"
robo.energy_usage = "10MW"
robo.charging_energy = "5MW"
2. Build this setup, placing the roboport last. Note how the left network is powered, and the right isn't.
05-27-2025, 11-50-58.png
05-27-2025, 11-50-58.png (1000.29 KiB) Viewed 232 times
3. If you check the energy with `/c game.print(game.player.selected.energy)` you see
05-27-2025, 11-55-00.png
05-27-2025, 11-55-00.png (61.24 KiB) Viewed 232 times

4. And now if you pickup the medium pole and place it back down. Now the energy will read 5500000 as expected.
Probably not a bug?
Expecting this not to be a bug, and just an engine update order quirk. But made the report because it is odd that it depends on whether the closest power pole is powered or not.

Re: [2.0.52] Roboport energy buffer never 100% full depending on entity placement order

Posted: Tue May 27, 2025 10:11 am
by boskid
I am considering this a duplicate of 105074.