Changed play(String,boolean) behavior to return id of audio file, 0 if not found

This commit is contained in:
Collin Smith 2019-03-01 23:05:52 -08:00
parent ca9c9be8df
commit 7ec02be171

View File

@ -84,10 +84,12 @@ public class Audio {
play(sound, global);
}
public void play(String id, boolean global) {
if (id.isEmpty()) return;
public int play(String id, boolean global) {
if (id.isEmpty()) return 0;
Sounds.Entry sound = Diablo.files.Sounds.get(id);
if (sound == null) return 0;
play(sound, global);
return sound.Index;
}
}