|
|
|
@ -232,7 +232,7 @@ bool Vehicle::NeedsServicing() const
|
|
|
|
|
if ((this->ServiceIntervalIsPercent() ?
|
|
|
|
|
(this->reliability >= this->GetEngine()->reliability * (100 - this->service_interval) / 100) :
|
|
|
|
|
(this->date_of_last_service + this->service_interval >= _date))
|
|
|
|
|
&& !(this->type == VEH_TRAIN && HasBit(Train::From(this)->flags, VRF_NEED_REPAIR))
|
|
|
|
|
&& !(this->type == VEH_TRAIN && HasBit(Train::From(this)->flags, VRF_CONSIST_BREAKDOWN) && Train::From(this)->ConsistNeedsRepair())
|
|
|
|
|
&& !(this->type == VEH_ROAD && RoadVehicle::From(this)->critical_breakdown_count > 0)
|
|
|
|
|
&& !(this->type == VEH_SHIP && Ship::From(this)->critical_breakdown_count > 0)) {
|
|
|
|
|
return false;
|
|
|
|
|