diff options
Diffstat (limited to 'vehicle.c')
-rw-r--r-- | vehicle.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -1742,6 +1742,11 @@ static void MaybeReplaceVehicle(Vehicle *v) continue; } + if (w->type == VEH_Train && IsTrainWagon(w) && !CanRefitTo(EngineReplacementForPlayer(p, w->engine_type), w->cargo_type)) { + // we can't replace this wagon since we can't refit the new one to the right cargo type + continue; + } + /* Now replace the vehicle */ temp_cost = ReplaceVehicle(&w, flags); |