NyxTheShield / TrombLoader

Trombone Champ Custom Chart Loader
Other
73 stars 13 forks source link

Refactor CustomTrack #50

Closed hedgehog1029 closed 1 year ago

hedgehog1029 commented 1 year ago

hmm today i will cause problems on purpose

So while implementing "developer mode", I wasn't really happy with the state of CustomTrack and decided to just go ahead and refactor it now. I think it's much nicer! And it means the "track reloading" can never accidentally get in an infinite loop.

Currently duplicate trackrefs cause BaboonAPI to "crash" (i.e. safely stop and show the crash screen). This is intended behaviour, because if you have multiple tracks with the same trackref, there's no good answer to "which one should load?". However, it's known that there are song packs out in the wild with cloned tracks nested in subfolders, so it's highly likely that users upgrading to TrombLoader 2 for the first time would first be greeted with a message telling them they have duplicate tracks, which is bad UX for the upgrade. So I've added checking on the TrombLoader side, because at least it can report the folder path of the duplicate track, where BaboonAPI can't.

Once I've tested this works I will mark it ready for review & fix the conflicts