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
Play Sound Instruction for World Logic #9736
base: master
Are you sure you want to change the base?
Conversation
The commit names are so real |
import arc.audio.*; | ||
import mindustry.gen.*; | ||
|
||
public enum LogicSound{ |
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 not a good idea. It's just a re-definition of Sounds, and will require maintenance any time a sound is changed or added.
A better alternative would be to have Sounds.java generate a String[]
of sound names, and a map of name to sound object.
Or, one could use Core.assets.getAll(Sound.class, ...)
for the same purpose. This would be messier, but would not require modifying codegen.
I don't know how to implement loop sounds, so leave suggestions if possible.
If your pull request is not translation or serverlist-related, read the list of requirements below and check each box: