mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +09:00
fix: ores glow textures are not loading
This commit is contained in:
@@ -46,6 +46,10 @@ class OreCodex {
|
||||
}
|
||||
}
|
||||
|
||||
fun getOrNull(blockID: ItemID?): OreProp? {//<O>
|
||||
return oreProps[blockID]
|
||||
}
|
||||
|
||||
private fun setProp(modname: String, key: Int, record: CSVRecord) {
|
||||
val prop = OreProp()
|
||||
prop.id = "ores@$modname:$key"
|
||||
|
||||
@@ -178,11 +178,16 @@ class CreateTileAtlas {
|
||||
}
|
||||
}
|
||||
else {
|
||||
// TODO test
|
||||
dir.list().filter { tgaFile -> tgaFile.extension() == "tga" && !tgaFile.isDirectory }.sortedBy { it.nameWithoutExtension().toInt() }.forEach { tgaFile: FileHandle ->
|
||||
val newFile = ModMgr.GameRetextureLoader.altFilePaths.getOrDefault(tgaFile.path(), tgaFile)
|
||||
tgaList[dirName]!!.add(modname to newFile)
|
||||
}
|
||||
// filter files that do not exist on the orecodex
|
||||
dir.list()
|
||||
.filter { tgaFile -> tgaFile.extension() == "tga" && !tgaFile.isDirectory && (OreCodex.getOrNull("ores@$modname:${tgaFile.nameWithoutExtension()}") != null) }
|
||||
.sortedBy { it.nameWithoutExtension().toInt() }
|
||||
.forEach { tgaFile: FileHandle -> // toInt() to sort by the number, not lexicographically
|
||||
// tgaFile be like: ./assets/mods/basegame/blocks/32.tga (which is not always .tga)
|
||||
val newFile = ModMgr.GameRetextureLoader.altFilePaths.getOrDefault(tgaFile.path(), tgaFile)
|
||||
tgaList[dirName]!!.add(modname to newFile)
|
||||
// printdbg(this, "modname = $modname, file = $newFile")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user