Added current datetime properties to the Lua API
Also deprecated the IsHalloween property in favour of them.
This commit is contained in:
committed by
Matthias Mailänder
parent
13d446e27e
commit
b394e15998
@@ -43,6 +43,13 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
return seconds * ticksPerSecond;
|
||||
}
|
||||
|
||||
public int CurrentYear => DateTime.Now.Year;
|
||||
public int CurrentMonth => DateTime.Now.Month;
|
||||
public int CurrentDay => DateTime.Now.Day;
|
||||
public int CurrentHour => DateTime.Now.Hour;
|
||||
public int CurrentMinute => DateTime.Now.Minute;
|
||||
public int CurrentSecond => DateTime.Now.Second;
|
||||
|
||||
[Desc("Converts the number of minutes into game time (ticks).")]
|
||||
public int Minutes(int minutes)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user