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

Support enabling and disabling the low power notification via Lua #20869

Merged
merged 2 commits into from
Jun 1, 2023

Conversation

abcdefg30
Copy link
Member

And only play low power notifications in Twist of Fate when the player can build buildings. Otherwise the warning is more annoying than helpful.

Copy link
Member

@PunkPun PunkPun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@penev92
Copy link
Member

penev92 commented May 23, 2023

FWIW this looks like a job for enabling and disabling traits via conditions, not for direct Lua manipulations (but I'm not going to block it anyway).
Also name PlayNotification can be really confusing. How about IsEnabled, since it's a property?

Copy link
Contributor

@anvilvapre anvilvapre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

untested.

@@ -43,6 +43,13 @@ public void TriggerPowerOutage(int ticks)
{
pm.TriggerPowerOutage(ticks);
}

[Desc("Whether the player should receive a notification when low on power.")]
public bool PlayLowPowerNotification
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds a bit contradictionary.

PlaySound, or SendOrShowNotification.

@PunkPun PunkPun merged commit ee02af3 into OpenRA:bleed Jun 1, 2023
3 checks passed
@PunkPun
Copy link
Member

PunkPun commented Jun 1, 2023

Changelog

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

Successfully merging this pull request may close these issues.

None yet

4 participants