character selection only loads mods
This commit is contained in:
@@ -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));
|
||||
|
||||
@@ -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))
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user