support for texture packs

This commit is contained in:
minjaesong
2022-02-23 17:59:38 +09:00
parent 841a77403b
commit 7c966b0da8
36 changed files with 2818 additions and 142 deletions

View File

@@ -44,17 +44,15 @@ object Lang {
init {
// load base langs
load("./assets/locales/")
load(File("./assets/locales/"))
}
@JvmStatic operator fun invoke() { /* dummy method for manual initialisation */ }
fun load(localesDir: String) {
fun load(localesDir: File) {
printdbg(this, "Loading languages from $localesDir")
val localesDir = File(localesDir)
// get all of the languages installed
localesDir.listFiles().filter { it.isDirectory }.forEach { languageList.add(it.name) }