Skip to content

Commit

Permalink
Deprecated DateTimeGlobal.IsHalloween
Browse files Browse the repository at this point in the history
  • Loading branch information
penev92 authored and Mailaender committed Oct 17, 2023
1 parent b394e15 commit 806eebd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions OpenRA.Mods.Common/Scripting/Global/DateTimeGlobal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public DateGlobal(ScriptContext context)
}

[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).")]
Expand Down
4 changes: 3 additions & 1 deletion mods/ra/maps/desert-shellmap/desert-shellmap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 806eebd

Please sign in to comment.