Features:
- It basically does the same thing as BackupVehicleOrders()/RestoreVehicleOrders() but with cargo.
- When a vehicle is sold at a depot, its cargo is saved. If the user then creates a new compatible vehicle, the cargo is restored to it.
- Works for all "inseparable" vehicles and vehicle sets, for example dual-headed trains, aircrafts and articulated vehicles.
- Works between different vehicles, as long as they can use the same depot. For example, sell a dual-headed train engine which carries cargo, and restore that cargo to a new wagon.
- Automatic refitting of the new vehicle for the backed up cargo if possible.
- 2 new settings in the Vehicles tab, one for enabling the cargo backup/restore and the other for automatic refitting.
- Only one backup in each depot per player (not per company) at a time.
- Doesn't work for entire trains, only the first vehicle that is built will receive cargo from the backup (see 2nd question below for whether this should be changed).
- The "Sell all" button doesn't back up any vehicle's cargo.
- Backup state is not stored in save games.
- Should the automatic refitting cause the normal refitting cost to be charged? In the case of trains the refitting cost is sometimes even over half the value of the engine.
- In my opinion no, because it's like the vehicle is built with the new cargo type from the start. Value of the vehicle when sold is the same regardless of having been refitted or not, so it makes sense that it would also cost the same to originally build regardless of cargo type.
- If all the backed up cargo doesn't fit into the new vehicle, should the rest be left for restore to subsequent vehicles? You could sell some big old vehicle and restore its cargo to multiple smaller ones, or sell multiple vehicles and restore to multiple new ones. This would make the patch slightly more general-purpose and go a bit beyond the scope of just restoring cargo to renewed vehicles.
As before, I would appreciate any further comments.