Page 1 of 1

[0.18.8] Inserters do not recalculate logistic network connection when changing forces

Posted: Fri Feb 21, 2020 5:39 am
by ceresward
What did you do?
I first observed this while debugging a bug report for my mod (https://mods.factorio.com/mod/LogiNetCh ... 000ce7b461), but I was able to reproduce it in a vanilla savegame. Repro steps:
  1. I set up a simple logistic network with a single roboport and a logistic chest containing an item stack
  2. I used "/c game.player.force.research_all_technologies()" to research all technologies (to enable the "wifi button" on inserters)
  3. I set up three inserters with the same logistic condition to enable only if the item is > 0
  4. Using '/editor', I created a force 'player2'
  5. Still in '/editor', I reassigned inserters 2 and 3 to the 'player2' force
  6. Lastly, I switched out of '/editor' and then for inserter 3 I toggled off and on the "Connect" checkbox in the inserter logistics menu
What happened?
Inserter 2 still reads its contents from the 'player' logistic network even though it has been reassigned to the 'player2' force. Inserter 3 initially has the same problem but it is fixed after toggling the "Connect" button. Inserter 1 reads the network contents as normal.
What did you expect to happen instead?
Inserters 2 and 3 should have immediately recalculated logistic network connections when the force reassignment occurred, and thus should no longer read the logistic network contents from the 'player' force. This would make it consistent with the force reassignment behavior of roboports and logistic chests.

Logfile and savefile are attached

Re: [0.18.8] Inserters do not recalculate logistic network connection when changing forces

Posted: Fri Feb 21, 2020 6:15 am
by ceresward
Update: it's not just inserters, I am observing this behavior for all entities that can be enabled/disabled based on a logistic network condition:
  • Inserter
  • Transport belt
  • Mining drill
  • Pumpjack
  • Pump
  • Offshore pump
  • Power switch
  • Lamp
  • Train stop
Updated save file attached

Re: [0.18.8] Inserters do not recalculate logistic network connection when changing forces

Posted: Mon Feb 24, 2020 1:49 pm
by Rseding91
Thanks for the report. It's now fixed for the next release.

Re: [0.18.8] Inserters do not recalculate logistic network connection when changing forces

Posted: Wed Feb 26, 2020 2:19 am
by ceresward
Thanks for the quick fix, awesome job as always! I can confirm both the vanilla save and my mod save are working properly for me now in 0.18.9 :thumbsup: