diff --git a/src/script/api/script_date.cpp b/src/script/api/script_date.cpp index 4d3a3866cf..cffa57fea9 100644 --- a/src/script/api/script_date.cpp +++ b/src/script/api/script_date.cpp @@ -9,7 +9,7 @@ #include "../../stdafx.h" #include "script_date.hpp" -#include "../../timer/timer_game_calendar.h" +#include "../../timer/timer_game_economy.h" #include @@ -22,14 +22,14 @@ /* static */ ScriptDate::Date ScriptDate::GetCurrentDate() { - return (ScriptDate::Date)TimerGameCalendar::date.base(); + return (ScriptDate::Date)TimerGameEconomy::date.base(); } /* static */ SQInteger ScriptDate::GetYear(ScriptDate::Date date) { if (date < 0) return DATE_INVALID; - ::TimerGameCalendar::YearMonthDay ymd = ::TimerGameCalendar::ConvertDateToYMD(date); + ::TimerGameEconomy::YearMonthDay ymd = ::TimerGameEconomy::ConvertDateToYMD(date); return ymd.year.base(); } @@ -37,7 +37,7 @@ { if (date < 0) return DATE_INVALID; - ::TimerGameCalendar::YearMonthDay ymd = ::TimerGameCalendar::ConvertDateToYMD(date); + ::TimerGameEconomy::YearMonthDay ymd = ::TimerGameEconomy::ConvertDateToYMD(date); return ymd.month + 1; } @@ -45,7 +45,7 @@ { if (date < 0) return DATE_INVALID; - ::TimerGameCalendar::YearMonthDay ymd = ::TimerGameCalendar::ConvertDateToYMD(date); + ::TimerGameEconomy::YearMonthDay ymd = ::TimerGameEconomy::ConvertDateToYMD(date); return ymd.day; } @@ -53,9 +53,9 @@ { if (month < 1 || month > 12) return DATE_INVALID; if (day_of_month < 1 || day_of_month > 31) return DATE_INVALID; - if (year < 0 || year > CalendarTime::MAX_YEAR) return DATE_INVALID; + if (year < 0 || year > EconomyTime::MAX_YEAR) return DATE_INVALID; - return (ScriptDate::Date)::TimerGameCalendar::ConvertYMDToDate(year, month - 1, day_of_month).base(); + return (ScriptDate::Date)::TimerGameEconomy::ConvertYMDToDate(year, month - 1, day_of_month).base(); } /* static */ SQInteger ScriptDate::GetSystemTime() diff --git a/src/script/api/script_date.hpp b/src/script/api/script_date.hpp index 43d197226f..5c7ddec042 100644 --- a/src/script/api/script_date.hpp +++ b/src/script/api/script_date.hpp @@ -11,7 +11,7 @@ #define SCRIPT_DATE_HPP #include "script_object.hpp" -#include "../../timer/timer_game_calendar.h" +#include "../../timer/timer_game_economy.h" /** * Class that handles all date related (calculation) functions. @@ -31,7 +31,7 @@ public: * compose valid date values for a known year, month and day. */ enum Date { - DATE_INVALID = ::CalendarTime::INVALID_DATE.base(), ///< A value representing an invalid date. + DATE_INVALID = ::EconomyTime::INVALID_DATE.base(), ///< A value representing an invalid date. }; /**