Minor bug.
I tried loading a 0.11.6 save with [base mod]+[smart circuit systems 0.3.6] into 0.11.7 with only [base mod].
This crashed the game instead of showing an error. I would expect just an error.
Loading the same save with [base mod]+[smart circuit systems 0.3.6] enabled works just fine.
[0.11.7] Crash while loading a save with mod
Re: [0.11.7] Crash while loading a save with mod
Hello, I knew about the problem of loading mods that contain electric poles compatibility problems, and I made a mental note to fix it year ago 
You finally made me to actually fix it.
So now the engine correctly reconnects electric machines to electric poles when their reach changes because of mods, and also correctly reacts to removal of electric-pole mod content due to mod removal.
So it should be fixed for 0.11.8

You finally made me to actually fix it.
So now the engine correctly reconnects electric machines to electric poles when their reach changes because of mods, and also correctly reacts to removal of electric-pole mod content due to mod removal.
So it should be fixed for 0.11.8
Re: [0.11.7] Crash while loading a save with mod
Took me a while to understand how this fixes the mod. I'm guessing that whenever a mod from a save isn't used, you simply remove all mod-generated glob values and entities that contain mod-native prototypes. I previously thought that the save would simply not load.
Re: [0.11.7] Crash while loading a save with mod
It is actually much much more complicated that this 
When you have a mod with electric pole, the game needs to load the electric pole (without knowing it's properties, because the pole is gone). Then it needs to setup the connection with the pole and all the surrounding entities. Once the connection is setup and all the other data structures prepared (electric network data structures, electric poles etc.). The game then needs to remove the remove the pole with all the necessary cleanup (splitting energy networks, disconnecting all the machines etc.).
The change I made is, that now the savegame contains the information about the supply reach of the pole, so when the game loads an electric pole, that is no longer available (because of a mod removal), or when the supply reach data changed (the mod changed the reach of the pole in new version), it needs to first disconnect all entities in the old range, update it to the new one and reconnect entities again, this way everything is in proper game state.

When you have a mod with electric pole, the game needs to load the electric pole (without knowing it's properties, because the pole is gone). Then it needs to setup the connection with the pole and all the surrounding entities. Once the connection is setup and all the other data structures prepared (electric network data structures, electric poles etc.). The game then needs to remove the remove the pole with all the necessary cleanup (splitting energy networks, disconnecting all the machines etc.).
The change I made is, that now the savegame contains the information about the supply reach of the pole, so when the game loads an electric pole, that is no longer available (because of a mod removal), or when the supply reach data changed (the mod changed the reach of the pole in new version), it needs to first disconnect all entities in the old range, update it to the new one and reconnect entities again, this way everything is in proper game state.
Re: [0.11.7] Crash while loading a save with mod
Ha, quite a bit more complicated indeed. It does explain some things, such as why every mod prototype needs to inherit behavior from a specific type, it ensures a fallback prototype.
Would be a bit strange though in this specific mod, as it creates numerous extra entities (poles, smart chests, decorations) that overlap in the same tile. But well, as long as it works
.
Would be a bit strange though in this specific mod, as it creates numerous extra entities (poles, smart chests, decorations) that overlap in the same tile. But well, as long as it works
