Script: Add method to get day length factor

This commit is contained in:
Jonathan G Rennison
2020-07-01 17:29:18 +01:00
parent efaf935cbf
commit 501f7458db
4 changed files with 23 additions and 13 deletions

View File

@@ -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;