mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-11 07:39:39 +07:00
Support for mp3 without iOS
This commit is contained in:
parent
e865d17fd1
commit
6d878e33fd
@ -55,7 +55,8 @@ public class ContentParser{
|
|||||||
if(fieldOpt(Sounds.class, data) != null) return fieldOpt(Sounds.class, data);
|
if(fieldOpt(Sounds.class, data) != null) return fieldOpt(Sounds.class, data);
|
||||||
if(Vars.headless) return new MockSound();
|
if(Vars.headless) return new MockSound();
|
||||||
|
|
||||||
String path = "sounds/" + data.asString() + (Vars.ios ? ".mp3" : ".ogg");
|
String name = "sounds/" + data.asString();
|
||||||
|
String path = Vars.tree.get(name + ".ogg").exists() && !Vars.ios ? name + ".ogg" : name + ".mp3";
|
||||||
ModLoadingSound sound = new ModLoadingSound();
|
ModLoadingSound sound = new ModLoadingSound();
|
||||||
Core.assets.load(path, Sound.class).loaded = result -> {
|
Core.assets.load(path, Sound.class).loaded = result -> {
|
||||||
sound.sound = (Sound)result;
|
sound.sound = (Sound)result;
|
||||||
|
Loading…
Reference in New Issue
Block a user