summaryrefslogtreecommitdiff
path: root/src/vehicle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r--src/vehicle.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 9e2292751..30e1c477c 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -764,6 +764,16 @@ uint32 Vehicle::GetGRFID() const
}
/**
+ * Shift all dates by given interval.
+ * This is useful if the date has been modified with the cheat menu.
+ * @param interval Number of days to be added or substracted.
+ */
+void Vehicle::ShiftDates(int interval)
+{
+ this->date_of_last_service += interval;
+}
+
+/**
* Handle the pathfinding result, especially the lost status.
* If the vehicle is now lost and wasn't previously fire an
* event to the AIs and a news message to the user. If the