diff options
Diffstat (limited to 'src/date.cpp')
-rw-r--r-- | src/date.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/date.cpp b/src/date.cpp index 9df648321..579c0ab0c 100644 --- a/src/date.cpp +++ b/src/date.cpp @@ -19,6 +19,7 @@ #include "vehicle_base.h" #include "rail_gui.h" #include "saveload/saveload.h" +#include "cargodest_func.h" Year _cur_year; ///< Current year, starting at 0 Month _cur_month; ///< Current month (0..11) @@ -154,6 +155,15 @@ Date ConvertYMDToDate(Year year, Month month, Day day) return DAYS_TILL(year) + days; } +/** + * Converts the current day counter and date fraction into an absolute tick value. + * @returns current time as ticks + */ +Ticks GetCurrentTickCount() +{ + return _date * DAY_TICKS + _date_fract; +} + /** Functions used by the IncreaseDate function */ extern void EnginesDailyLoop(); @@ -238,6 +248,7 @@ static void OnNewMonth() IndustryMonthlyLoop(); SubsidyMonthlyLoop(); StationMonthlyLoop(); + UpdateCargoLinks(); #ifdef ENABLE_NETWORK if (_network_server) NetworkServerMonthlyLoop(); #endif /* ENABLE_NETWORK */ |