Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added current datetime properties to the Lua API #21125

Merged
merged 2 commits into from Oct 17, 2023

Conversation

penev92
Copy link
Member

@penev92 penev92 commented Oct 17, 2023

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
Member

Can you please replace

if DateTime.IsHalloween then

Also deprecated the IsHalloween property in favour of them.
@penev92
Copy link
Member Author

penev92 commented Oct 17, 2023

Oops, sure, done.

@Mailaender Mailaender merged commit 806eebd into OpenRA:bleed Oct 17, 2023
3 checks passed
@penev92 penev92 deleted the luaDateTime branch October 17, 2023 12:05
@Mailaender
Copy link
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.

None yet

2 participants