dodo0822 / LocoSwap

Train Simulator utility to swap rolling stock of scenarios
4 stars 8 forks source link

Extract vehicle preview images from .ap files #3

Closed dodo0822 closed 3 years ago

dodo0822 commented 3 years ago

One possible approach:

When determining vehicle availability, hook into VehicleAvailibility.IsVehicleAvailable and when the vehicle is located in .ap file, try to locate and its preview image. If the preview image is present, extract it to temp directory, assign it a random file name and maintain a lookup table between blueprint ID and corresponding preview image path at VehicleAvailability. Now the VehicleImageSourceConverter should look for the preview images at VehicleAvailability instead of directly assuming a file name.

dodo0822 commented 3 years ago

Implemented in a634a13f2757d26374654c49e0864668e091380a.