TBTR: Refactor template replacement code
Adjust conditions for re-using existing engines in depot Reduce cost of searching for existing engines in depot Reduce cost of vehicle chain membership tests Improve replacement command error handling Tidy up code in general
This commit is contained in:
@@ -68,9 +68,9 @@ void TemplateVehicleImageDimensions::SetFromTrain(const Train *t)
|
||||
}
|
||||
}
|
||||
|
||||
TemplateVehicle::TemplateVehicle(VehicleType ty, EngineID eid, byte subtypeflag, Owner current_owner)
|
||||
TemplateVehicle::TemplateVehicle(VehicleType type, EngineID eid, Owner current_owner)
|
||||
{
|
||||
this->type = ty;
|
||||
this->type = type;
|
||||
this->engine_type = eid;
|
||||
|
||||
this->reuse_depot_vehicles = false;
|
||||
|
Reference in New Issue
Block a user