Deprecated DateTimeGlobal.IsHalloween

This commit is contained in:
Pavel Penev
2023-10-17 14:07:56 +03:00
committed by Matthias Mailänder
parent b394e15998
commit 806eebd269
2 changed files with 4 additions and 1 deletions

View File

@@ -32,6 +32,7 @@ namespace OpenRA.Mods.Common.Scripting
}
[Desc("True on the 31st of October.")]
[Obsolete("Use CurrentMonth and CurrentDay instead.")]
public bool IsHalloween => DateTime.Today.Month == 10 && DateTime.Today.Day == 31;
[Desc("Get the current game time (in ticks).")]

View File

@@ -6,7 +6,9 @@
the License, or (at your option) any later version. For more
information, see COPYING.
]]
if DateTime.IsHalloween then
-- Halloween easter egg
if DateTime.CurrentMonth == 10 and DateTime.CurrentDay == 31 then
UnitTypes = { "ant", "ant", "ant" }
BeachUnitTypes = { "ant", "ant" }
ProxyType = "powerproxy.parazombies"