(svn r157) -Feature: [1009708] Percent-based service intervals. Send a vehicle to depot after it has lost X% of its reliability (mivlad)

This commit is contained in:
darkvater
2004-09-04 13:06:09 +00:00
parent b4cf633f66
commit 85628544ee
13 changed files with 104 additions and 33 deletions

View File

@@ -88,7 +88,7 @@ static void CheckIfShipNeedsService(Vehicle *v)
if (_patches.servint_ships == 0)
return;
if (v->date_of_last_service + v->service_interval > _date)
if (SERVICE_INTERVAL)
return;
if (v->vehstatus & VS_STOPPED)
@@ -206,7 +206,7 @@ static void ProcessShipOrder(Vehicle *v)
}
if ((v->next_order & (OT_MASK|OF_UNLOAD|OF_FULL_LOAD)) == (OT_GOTO_DEPOT|OF_UNLOAD|OF_FULL_LOAD) &&
v->date_of_last_service+v->service_interval > _date) {
SERVICE_INTERVAL) {
v->cur_order_index++;
}