TREMBLE, freeplaySonglist IS NOW INSIDE CONFIGS

This commit is contained in:
⍚~Nex
2025-08-04 06:39:21 +02:00
parent 49260f28e7
commit 6b5e417aec
2 changed files with 7 additions and 2 deletions
+7 -2
View File
@@ -473,9 +473,14 @@ class FreeplaySonglist {
public function new() {}
public function getSongsFromSource(source:funkin.backend.assets.AssetSource, useTxt:Bool = true) {
var path:String = Paths.txt('freeplaySonglist');
var songsFound:Array<String> = useTxt && Paths.assetsTree.existsSpecific(path, "TEXT", source) ? CoolUtil.coolTextFile(path) : Paths.getFolderDirectories('songs', false, source);
var oldPath = Paths.txt("freeplaySonglist");
var newPath = Paths.txt("config/freeplaySonglist");
var path:String = useTxt && !Paths.assetsTree.existsSpecific(newPath, "TEXT", source) && Paths.assetsTree.existsSpecific(oldPath, "TEXT", source) ? {
Logs.warn("data/freeplaySonglist.txt is deprecated and will be removed in the future. Please move the file to data/config/", DARKYELLOW, "FreeplaySonglist");
oldPath;
} : newPath;
var songsFound:Array<String> = useTxt && Paths.assetsTree.existsSpecific(path, "TEXT", source) ? CoolUtil.coolTextFile(path): Paths.getFolderDirectories("songs", false, source);
if (songsFound.length > 0) {
for (s in songsFound) songs.push(Chart.loadChartMeta(s, Flags.DEFAULT_DIFFICULTY, source == MODS));
return false;