mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
using 'smelting dictionary' for smelter recipes
This commit is contained in:
@@ -846,11 +846,16 @@ object ModMgr {
|
||||
|
||||
object GameCraftingRecipeLoader {
|
||||
const val recipePath = "crafting/"
|
||||
const val smeltingPath = "smelting/"
|
||||
|
||||
@JvmStatic operator fun invoke(module: String) {
|
||||
getFile(module, recipePath).listFiles { it: File -> it.name.lowercase().endsWith(".json") }?.forEach { jsonFile ->
|
||||
Terrarum.craftingCodex.addFromJson(JsonFetcher(jsonFile), module, jsonFile.name)
|
||||
}
|
||||
|
||||
getFile(module, smeltingPath).listFiles { it: File -> it.name.lowercase().endsWith(".json") }?.forEach { jsonFile ->
|
||||
Terrarum.craftingCodex.addSmeltingFromJson(JsonFetcher(jsonFile), module, jsonFile.name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user