Run most "daily" vehicle tasks at a fixed frequency at day lengths >= 8

This includes: running costs, track sharing costs, breakdown checks,
servicing checks, order checks
This commit is contained in:
Jonathan G Rennison
2021-11-27 15:51:49 +00:00
parent 1ff03f8ee9
commit ba65a5bab5
10 changed files with 66 additions and 3 deletions

View File

@@ -248,9 +248,12 @@ void Ship::OnNewDay()
if ((++this->day_counter & 7) == 0) {
DecreaseVehicleValue(this);
}
CheckVehicleBreakdown(this);
AgeVehicle(this);
}
void Ship::OnPeriodic()
{
CheckVehicleBreakdown(this);
CheckIfShipNeedsService(this);
CheckOrders(this);