TBTR: Add option to replace only old vehicles
This commit is contained in:
@@ -4306,6 +4306,10 @@ CommandCost CmdTemplateReplaceVehicle(TileIndex tile, DoCommandFlag flags, uint3
|
||||
|
||||
/* first some tests on necessity and sanity */
|
||||
if (tv == NULL) return buy;
|
||||
if (tv->IsReplaceOldOnly() && !vehicle->NeedsAutorenewing(Company::Get(vehicle->owner), false)) {
|
||||
if (!stayInDepot) incoming->vehstatus &= ~VS_STOPPED;
|
||||
return buy;
|
||||
}
|
||||
bool need_replacement = !TrainMatchesTemplate(incoming, tv);
|
||||
bool need_refit = !TrainMatchesTemplateRefit(incoming, tv);
|
||||
bool use_refit = tv->refit_as_template;
|
||||
|
Reference in New Issue
Block a user