[Rseding91] [0.16.7] Recharging robots freeze if their force is changed
Posted: Thu Dec 28, 2017 10:58 pm
Essentially, if you do (cell being a logistic cell):
any robots caught by this code that aren't near a roboport will freeze in mid-air, and nothing save from mining them seems to fix it (replacing roboports, forcing to swap the force of a robot once again, ...).
It's... really hard to replicate, as the bug only happens to robots within that array and not any other way I've tried so far, so I had to use a dummy mod (zzzDebug) with the code above on on_tick for it, which I attached to this post, together with two savegames where the bug is happening (with robots already frozen and some about to freeze the next tick).
Code: Select all
for _, bot in pairs(cell.to_charge_robots) do
bot.force = "neutral"
bot.force = "player"
end
It's... really hard to replicate, as the bug only happens to robots within that array and not any other way I've tried so far, so I had to use a dummy mod (zzzDebug) with the code above on on_tick for it, which I attached to this post, together with two savegames where the bug is happening (with robots already frozen and some about to freeze the next tick).