mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
Change "try .. catch" statement to "if(consoleMode)" statement for mods folder loading. (#2802)
This commit is contained in:
parent
84a06b7fcb
commit
ad89286476
@ -191,12 +191,8 @@ object RulesetCache :HashMap<String,Ruleset>() {
|
|||||||
this[ruleset.fullName] = Ruleset().apply { load(fileHandle) }
|
this[ruleset.fullName] = Ruleset().apply { load(fileHandle) }
|
||||||
}
|
}
|
||||||
|
|
||||||
var modsHandles: Array<FileHandle>
|
var modsHandles = if(consoleMode) FileHandle("mods").list()
|
||||||
try {
|
else Gdx.files.local("mods").list()
|
||||||
modsHandles = Gdx.files.local("mods").list()
|
|
||||||
} catch (ex: NullPointerException) {
|
|
||||||
modsHandles = FileHandle("mods").list()
|
|
||||||
}
|
|
||||||
|
|
||||||
for (modFolder in modsHandles) {
|
for (modFolder in modsHandles) {
|
||||||
if (modFolder.name().startsWith('.')) continue
|
if (modFolder.name().startsWith('.')) continue
|
||||||
|
Loading…
x
Reference in New Issue
Block a user