Change "try .. catch" statement to "if(consoleMode)" statement for mods folder loading. (#2802)
This commit is contained in:
parent
84a06b7fcb
commit
ad89286476
1 changed files with 2 additions and 6 deletions
|
@ -191,12 +191,8 @@ object RulesetCache :HashMap<String,Ruleset>() {
|
|||
this[ruleset.fullName] = Ruleset().apply { load(fileHandle) }
|
||||
}
|
||||
|
||||
var modsHandles: Array<FileHandle>
|
||||
try {
|
||||
modsHandles = Gdx.files.local("mods").list()
|
||||
} catch (ex: NullPointerException) {
|
||||
modsHandles = FileHandle("mods").list()
|
||||
}
|
||||
var modsHandles = if(consoleMode) FileHandle("mods").list()
|
||||
else Gdx.files.local("mods").list()
|
||||
|
||||
for (modFolder in modsHandles) {
|
||||
if (modFolder.name().startsWith('.')) continue
|
||||
|
|
Loading…
Reference in a new issue