TBTR: Fix crash and issues when using a no longer available engine type.

Show error messages when cloning a vehicle to a template
or virtual vehicle fails.
Handle failed clones gracefully.
Bypass engine availability check when doing a template edit action.
Show correct error message if template replacement fails for
a non-money reason.
This commit is contained in:
Jonathan G Rennison
2016-02-15 02:31:26 +00:00
parent d9a48a2b5e
commit 5850bcf699
8 changed files with 71 additions and 40 deletions

View File

@@ -17,7 +17,7 @@
#include "tbtr_template_vehicle.h"
Train* VirtualTrainFromTemplateVehicle(TemplateVehicle* tv);
Train* VirtualTrainFromTemplateVehicle(TemplateVehicle* tv, StringID &err);
void DrawTemplateVehicle(const TemplateVehicle*, int, int, int, VehicleID, int, VehicleID);