Reservation callbacks were being setup too late to be applied to wagons loaded from save.
Checking reservation cargo against TrainCar instances is fraught because the player may be far enough away that the equipment has despawned. Comparing against Equipment works because these records persist even if the wagon is despawned due to lack of proximity.
Empty wagons that are part of a Shunting Unload job must skip reservation force-creation if they've already been unloaded. This would otherwise create reservations with CargoType.None, which is both unexpected and breaks logic therein.
Reservation callbacks were being setup too late to be applied to wagons loaded from save.
Checking reservation cargo against
TrainCar
instances is fraught because the player may be far enough away that the equipment has despawned. Comparing againstEquipment
works because these records persist even if the wagon is despawned due to lack of proximity.Empty wagons that are part of a Shunting Unload job must skip reservation force-creation if they've already been unloaded. This would otherwise create reservations with
CargoType.None
, which is both unexpected and breaks logic therein.