@@ -65,6 +65,8 @@ enum abstract SongTimeType(String) from String to String {
6565 */
6666@:access (flixel.system.frontEnds. SoundFrontEnd .loadHelper )
6767class Conductor extends FlxBasic implements IBeat {
68+ static var list : Array <Conductor > = [];
69+
6870 @:allow (imaginative.states. EngineProcess )
6971 static function init (): Void {
7072 menu = new Conductor (' Menu' , true );
@@ -351,6 +353,7 @@ class Conductor extends FlxBasic implements IBeat {
351353 */
352354 public function new (id : String = ' Unknown' , canLoop : Bool = false ) {
353355 super ();
356+ list .push (this );
354357
355358 this .id = id ;
356359 this .canLoop = canLoop ;
@@ -615,7 +618,8 @@ class Conductor extends FlxBasic implements IBeat {
615618 var chart : imaginative.states.editors. ChartEditor . ChartData = null ;
616619 loadSong (song , variant , (_ : FlxSound ) -> {
617620 try {
618- chart = ParseUtil .chart (song , difficulty , variant );
621+ if ((chart = Assets .chart (song , difficulty , variant )) == null )
622+ throw ' NO CHART [ $song : $difficulty : $variant ]' ;
619623 var vocalSuffixes : Array <String > = [];
620624 for (base in chart .characters ) {
621625 var charVocals : String = null ;
@@ -930,6 +934,7 @@ class Conductor extends FlxBasic implements IBeat {
930934 * Unless it's a ***main*** one then don't destroy it please! 🥺🙏
931935 */
932936 override public function destroy (): Void {
937+ list .remove (this );
933938 FlxG .plugins .remove (this );
934939 reset ();
935940 FlxG .signals .focusGained .remove (onFocus );
0 commit comments