Script: Add method to get day length factor
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "../../stdafx.h"
|
||||
#include "script_date.hpp"
|
||||
#include "../../date_func.h"
|
||||
#include "../../settings_type.h"
|
||||
|
||||
#include "../../safeguards.h"
|
||||
|
||||
@@ -24,6 +25,11 @@
|
||||
return (ScriptDate::Date)_date;
|
||||
}
|
||||
|
||||
/* static */ int32 ScriptDate::GetDayLengthFactor()
|
||||
{
|
||||
return _settings_game.economy.day_length_factor;
|
||||
}
|
||||
|
||||
/* static */ int32 ScriptDate::GetYear(ScriptDate::Date date)
|
||||
{
|
||||
if (date < 0) return DATE_INVALID;
|
||||
|
Reference in New Issue
Block a user