Skip to content

Added current datetime properties to the Lua API#21125

Merged
Mailaender merged 2 commits into
OpenRA:bleedfrom
penev92:luaDateTime
Oct 17, 2023
Merged

Added current datetime properties to the Lua API#21125
Mailaender merged 2 commits into
OpenRA:bleedfrom
penev92:luaDateTime

Conversation

@penev92

@penev92 penev92 commented Oct 17, 2023

Copy link
Copy Markdown
Member

A spiritual successor to #20541.

Test case:

if DateTime.GameTime % DateTime.Seconds(4) == 0 then
	Media.DisplayMessage(DateTime.CurrentYear .. "." .. DateTime.CurrentMonth .. "." .. DateTime.CurrentDay .. " - " .. DateTime.CurrentHour .. ":" .. DateTime.CurrentMinute .. ":" .. DateTime.CurrentSecond, Mentat)
end

image

@Mailaender

Copy link
Copy Markdown
Member

Can you please replace

if DateTime.IsHalloween then

Also deprecated the IsHalloween property in favour of them.
@penev92

penev92 commented Oct 17, 2023

Copy link
Copy Markdown
Member Author

Oops, sure, done.

@Mailaender Mailaender merged commit 806eebd into OpenRA:bleed Oct 17, 2023
@penev92 penev92 deleted the luaDateTime branch October 17, 2023 12:05
@Mailaender

Copy link
Copy Markdown
Member

Changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants