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:
@@ -478,7 +478,7 @@ public:
|
||||
|
||||
virtual bool OnVehicleSelect(const Vehicle *v)
|
||||
{
|
||||
bool succeeded = DoCommandP(0, v->index, 0, CMD_CLONE_TEMPLATE_VEHICLE_FROM_TRAIN, NULL);
|
||||
bool succeeded = DoCommandP(0, v->index, 0, CMD_CLONE_TEMPLATE_VEHICLE_FROM_TRAIN | CMD_MSG(STR_TMPL_CANT_CREATE), NULL);
|
||||
|
||||
if (!succeeded) return false;
|
||||
|
||||
|
Reference in New Issue
Block a user