Sector preset display

This commit is contained in:
Anuken
2020-11-15 23:09:40 -05:00
parent b7b6ddf69a
commit bdee65e925
5 changed files with 112 additions and 8 deletions

View File

@@ -94,7 +94,6 @@ public class Scripts implements Disposable{
String name = "sounds/" + soundName;
String path = Vars.tree.get(name + ".ogg").exists() ? name + ".ogg" : name + ".mp3";
if(Core.assets.contains(path, Sound.class)) return Core.assets.get(path, Sound.class);
var sound = new Sound();
AssetDescriptor<?> desc = Core.assets.load(path, Sound.class, new SoundParameter(sound));
desc.errored = Throwable::printStackTrace;
@@ -108,7 +107,6 @@ public class Scripts implements Disposable{
String name = "music/" + soundName;
String path = Vars.tree.get(name + ".ogg").exists() ? name + ".ogg" : name + ".mp3";
if(Core.assets.contains(path, Music.class)) return Core.assets.get(path, Music.class);
var music = new Music();
AssetDescriptor<?> desc = Core.assets.load(path, Music.class, new MusicParameter(music));
desc.errored = Throwable::printStackTrace;