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

Add alarms to GTCEu #2077

Merged
merged 8 commits into from
Nov 18, 2023
Merged

Add alarms to GTCEu #2077

merged 8 commits into from
Nov 18, 2023

Conversation

bruberu
Copy link
Member

@bruberu bruberu commented Sep 11, 2023

What

Adds an alarm to GTCEu, which emits a selectable noise when given redstone power and EU. Currently, there are no great ways in the mod to give off timely alerts when something goes wrong (low power, low resources, etc.) until the Central Monitor.

Implementation Details

The selection of sounds included could be tweaked slightly. Furthermore, I do have to stop the sound each time it's switched, since otherwise the internal sound map in GTCEu's sound manager overrides the sound associated with the block position; perhaps this could be fixed more directly? In the process of making this, I also added a getVolume() function to MTE, as to hook into the sound update cycle.

Outcome

Adds a redstone-controlled alarm.

Potential Compatibility Issues

The alarm recipe may override other addons.

@bruberu bruberu requested a review from a team as a code owner September 11, 2023 00:14
@bruberu bruberu added the type: feature New feature or request label Sep 11, 2023
Comment on lines +81 to +83
return Arrays.asList(GTSoundEvents.DEFAULT_ALARM, GTSoundEvents.ARC, SoundEvents.ENTITY_WOLF_HOWL,
SoundEvents.ENTITY_ENDERMEN_DEATH);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an interesting set of defaults. I don't really get the selection, except for our default alarm sound.

It might be interesting to allow for a selection from all registered sounds though, that way we don't have to worry about providing a set of default sounds.

Copy link
Member Author

Choose a reason for hiding this comment

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

The arc sound sounds decently like an toned-down alarm, and the other two are other easily-recognizable sounds that can be traced to an alarm quickly. Given that we don't have any nice widgets for searching through large lists at the moment, it's better to just use a small default list. Some suggestions were brought up to potentially add other custom alert sounds here (potentially some variation on the EAS double-tone), but I'll hold on that.

@serenibyss serenibyss added this to the 2.8 milestone Nov 11, 2023
@serenibyss serenibyss enabled auto-merge (squash) November 18, 2023 04:55
@serenibyss serenibyss merged commit 1e0b4b7 into master Nov 18, 2023
@serenibyss serenibyss deleted the bru-alarms branch November 18, 2023 04:57
MrKono added a commit to GTModpackTeam/GregTech that referenced this pull request Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants