previously, id was always nil for depots/refuelers as it was only set in the display reset block. The updates now take place as expected. Most obvious bug this fixes is when you have a train waiting in a depot, changing the network from one with no requests to one with now sends the train on its way.
There are a few small logical changes I made that I'm only 99% sure are correct:
the call to update_stop_if_auto was previously conditional on params.second_constant ~= old_params.second_constant, but I believe the refueler.allows_all_trains ~= pre check is enough
previously stop.valid was only being checked for when the network changed and not for second_constant, I just removed the valid check entirely because we are only using unit_number
Anyway I think I've tested this pretty well and everything seems to work, though there is the chance that the old code that is only now actually being run might have it's own bugs, so you may want to give it a once over in case there is anything else obvious that needs to be done.
previously, id was always nil for depots/refuelers as it was only set in the display reset block. The updates now take place as expected. Most obvious bug this fixes is when you have a train waiting in a depot, changing the network from one with no requests to one with now sends the train on its way.
There are a few small logical changes I made that I'm only 99% sure are correct:
Anyway I think I've tested this pretty well and everything seems to work, though there is the chance that the old code that is only now actually being run might have it's own bugs, so you may want to give it a once over in case there is anything else obvious that needs to be done.