mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-14 23:56:07 +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) {
|
private fun setProp(modname: String, key: Int, record: CSVRecord) {
|
||||||
val prop = OreProp()
|
val prop = OreProp()
|
||||||
prop.id = "ores@$modname:$key"
|
prop.id = "ores@$modname:$key"
|
||||||
|
|||||||
@@ -178,11 +178,16 @@ class CreateTileAtlas {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// TODO test
|
// filter files that do not exist on the orecodex
|
||||||
dir.list().filter { tgaFile -> tgaFile.extension() == "tga" && !tgaFile.isDirectory }.sortedBy { it.nameWithoutExtension().toInt() }.forEach { tgaFile: FileHandle ->
|
dir.list()
|
||||||
val newFile = ModMgr.GameRetextureLoader.altFilePaths.getOrDefault(tgaFile.path(), tgaFile)
|
.filter { tgaFile -> tgaFile.extension() == "tga" && !tgaFile.isDirectory && (OreCodex.getOrNull("ores@$modname:${tgaFile.nameWithoutExtension()}") != null) }
|
||||||
tgaList[dirName]!!.add(modname to newFile)
|
.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