Use expression body syntax
This commit is contained in:
@@ -28,16 +28,10 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
}
|
||||
|
||||
[Desc("True on the 31st of October.")]
|
||||
public bool IsHalloween
|
||||
{
|
||||
get { return DateTime.Today.Month == 10 && DateTime.Today.Day == 31; }
|
||||
}
|
||||
public bool IsHalloween => DateTime.Today.Month == 10 && DateTime.Today.Day == 31;
|
||||
|
||||
[Desc("Get the current game time (in ticks).")]
|
||||
public int GameTime
|
||||
{
|
||||
get { return Context.World.WorldTick; }
|
||||
}
|
||||
public int GameTime => Context.World.WorldTick;
|
||||
|
||||
[Desc("Converts the number of seconds into game time (ticks).")]
|
||||
public int Seconds(int seconds)
|
||||
@@ -54,10 +48,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[Desc("Return or set the time limit (in ticks). When setting, the time limit will count from now. Setting the time limit to 0 will disable it.")]
|
||||
public int TimeLimit
|
||||
{
|
||||
get
|
||||
{
|
||||
return tlm != null ? tlm.TimeLimit : 0;
|
||||
}
|
||||
get => tlm != null ? tlm.TimeLimit : 0;
|
||||
|
||||
set
|
||||
{
|
||||
@@ -71,10 +62,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
[Desc("The notification string used for custom time limit warnings. See the TimeLimitManager trait documentation for details.")]
|
||||
public string TimeLimitNotification
|
||||
{
|
||||
get
|
||||
{
|
||||
return tlm != null ? tlm.Notification : null;
|
||||
}
|
||||
get => tlm != null ? tlm.Notification : null;
|
||||
|
||||
set
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user