support for external mods

This commit is contained in:
minjaesong
2022-02-24 11:03:03 +09:00
parent 598d0514ff
commit b3940d96b8
3 changed files with 26 additions and 11 deletions

View File

@@ -37,7 +37,7 @@ object CommandDict {
printdbg(this, ModMgr.loadOrder.reversed().map { ModMgr.moduleInfo[it]?.packageName })
((listOf("$" to "net.torvald.terrarum")) + ModMgr.loadOrder.reversed().map { it to ModMgr.moduleInfo[it]?.packageName }).forEach { (modName, packageRoot) ->
if (modName != "$" && ModMgr.hasFile(modName, "commands.csv")) {
if (modName == "$" || modName != "$" && ModMgr.hasFile(modName, "commands.csv")) {
val commandsList = if (modName == "$") engineCommandList else ModMgr.getFile(modName, "commands.csv").readLines()
val packageConsole = "$packageRoot.console"