mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 02:54:04 +09:00
crafting recipe is at least successfully read and parsed by the modloader
This commit is contained in:
@@ -29,13 +29,13 @@ class EntryPoint : ModuleEntryPoint() {
|
||||
|
||||
// load common resources to the AssetsManager
|
||||
CommonResourcePool.addToLoadingList("$moduleName.items16") {
|
||||
TextureRegionPack(ModMgr.getGdxFile(moduleName, "items/items.tga"), 16, 16, flipY = false)
|
||||
TextureRegionPack(ModMgr.getGdxFile(moduleName, "items/items.tga"), 16, 16)
|
||||
}
|
||||
CommonResourcePool.addToLoadingList("$moduleName.items24") {
|
||||
TextureRegionPack(ModMgr.getGdxFile(moduleName, "items/items24.tga"), 24, 24, flipY = false)
|
||||
TextureRegionPack(ModMgr.getGdxFile(moduleName, "items/items24.tga"), 24, 24)
|
||||
}
|
||||
CommonResourcePool.addToLoadingList("$moduleName.items48") {
|
||||
TextureRegionPack(ModMgr.getGdxFile(moduleName, "items/items48.tga"), 48, 48, flipY = false)
|
||||
TextureRegionPack(ModMgr.getGdxFile(moduleName, "items/items48.tga"), 48, 48)
|
||||
}
|
||||
CommonResourcePool.loadAll()
|
||||
|
||||
@@ -45,6 +45,16 @@ class EntryPoint : ModuleEntryPoint() {
|
||||
ModMgr.GameItemLoader.invoke(moduleName)
|
||||
ModMgr.GameBlockLoader.invoke(moduleName)
|
||||
ModMgr.GameLanguageLoader.invoke(moduleName)
|
||||
ModMgr.GameCraftingRecipeLoader.invoke(moduleName)
|
||||
|
||||
println("Crafting Recipes: ")
|
||||
Terrarum.craftingCodex.props.forEach { item, recipes ->
|
||||
println("$item ->")
|
||||
recipes.forEach {
|
||||
print(" ")
|
||||
println(it)
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////
|
||||
// load customised item loader //
|
||||
|
||||
@@ -236,7 +236,7 @@ open class FixtureBase : ActorWithBody, CuedByTerrainChange {
|
||||
fun getSpritesheet(module: String, path: String, tileW: Int, tileH: Int): TextureRegionPack {
|
||||
val id = "$module/${path.replace('\\','/')}"
|
||||
return (CommonResourcePool.getOrPut(id) {
|
||||
TextureRegionPack(ModMgr.getGdxFile(module, path), tileW, tileH, flipY = false)
|
||||
TextureRegionPack(ModMgr.getGdxFile(module, path), tileW, tileH)
|
||||
} as TextureRegionPack)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ open class FixtureItemBase(originalID: ItemID, val fixtureClassName: String) : G
|
||||
fun getItemImageFromSheet(module: String, path: String, tileW: Int, tileH: Int): TextureRegion {
|
||||
val id = "$module/${path.replace('\\','/')}"
|
||||
return (CommonResourcePool.getOrPut(id) {
|
||||
TextureRegionPack(ModMgr.getGdxFile(module, path), tileW, tileH, flipY = false)
|
||||
TextureRegionPack(ModMgr.getGdxFile(module, path), tileW, tileH)
|
||||
} as TextureRegionPack).get(0,0)
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ class UILoadDemoSavefiles(val remoCon: UIRemoCon) : UICanvas() {
|
||||
t.flip(false, false); t
|
||||
}
|
||||
CommonResourcePool.addToLoadingList("savegame_status_icon") {
|
||||
TextureRegionPack("assets/graphics/gui/savegame_status_icon.tga", 24, 24, flipY = false)
|
||||
TextureRegionPack("assets/graphics/gui/savegame_status_icon.tga", 24, 24)
|
||||
}
|
||||
CommonResourcePool.loadAll()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user