-
Notifications
You must be signed in to change notification settings - Fork 181
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
Add alarms to GTCEu #2077
Conversation
src/main/java/gregtech/common/metatileentities/electric/MetaTileEntityAlarm.java
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/electric/MetaTileEntityAlarm.java
Outdated
Show resolved
Hide resolved
src/main/java/gregtech/common/metatileentities/electric/MetaTileEntityAlarm.java
Outdated
Show resolved
Hide resolved
return Arrays.asList(GTSoundEvents.DEFAULT_ALARM, GTSoundEvents.ARC, SoundEvents.ENTITY_WOLF_HOWL, | ||
SoundEvents.ENTITY_ENDERMEN_DEATH); | ||
} |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.