character selection only loads mods

This commit is contained in:
lunarcleint
2023-07-14 17:50:57 -07:00
parent 2633b51626
commit 81e44c782e
2 changed files with 3 additions and 3 deletions
@@ -17,7 +17,7 @@ class CharacterSelection extends EditorTreeMenu
super.create();
main = new OptionsScreen("Character Editor", "Select a character to edit", [
for (char in Character.getList())
for (char in Character.getList(true))
new IconOption(char, "Press ACCEPT to edit this character.", Character.getIconFromCharName(char),
function() {
FlxG.switchState(new CharacterEditor(char));
+2 -2
View File
@@ -457,9 +457,9 @@ class Character extends FunkinSprite implements IBeatReceiver implements IOffset
return icon;
}
public static function getList():Array<String> {
public static function getList(?mods:Bool = false):Array<String> {
return [
for (path in Paths.getFolderContent('data/characters/', true, BOTH))
for (path in Paths.getFolderContent('data/characters/', true, mods ? MODS : BOTH))
if (Path.extension(path) == "xml") Path.withoutDirectory(Path.withoutExtension(path))
];
}