diff --git a/source/funkin/backend/assets/Paths.hx b/source/funkin/backend/assets/Paths.hx index a29d3909..771568e5 100644 --- a/source/funkin/backend/assets/Paths.hx +++ b/source/funkin/backend/assets/Paths.hx @@ -274,13 +274,13 @@ class Paths } return content; } - static public function getFolderContent(key:String, addPath:Bool = false, source:AssetsLibraryList.AssetSource = BOTH):Array { + static public function getFolderContent(key:String, addPath:Bool = false, source:AssetsLibraryList.AssetSource = BOTH, noExtension:Bool = false):Array { // designed to work both on windows and web if (!key.endsWith("/")) key += "/"; var content = assetsTree.getFiles('assets/$key', source); - if (addPath) { - for(k=>e in content) - content[k] = '$key$e'; + for (k => e in content) { + if (noExtension) e = Path.withoutExtension(e); + content[k] = addPath ? '$key$e' : e; } return content; /* @@ -363,4 +363,4 @@ class ScriptPathInfo { this.file = file; this.library = library; } -} \ No newline at end of file +}