save/load kinda mostly working but fixtures are not getting their sprites back

This commit is contained in:
minjaesong
2021-09-06 17:31:37 +09:00
parent ec08f8d07e
commit 1accf985e7
29 changed files with 230 additions and 126 deletions

View File

@@ -233,7 +233,7 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
IngameRenderer.setRenderedWorld(world)
super.show() // gameInitialised = true
super.show() // this function sets gameInitialised = true
}
data class NewWorldParameters(
@@ -245,11 +245,11 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
data class Codices(
val meta: WriteMeta.WorldMeta,
val block: BlockCodex,
// val block: BlockCodex,
val item: ItemCodex,
val wire: WireCodex,
val material: MaterialCodex,
val faction: FactionCodex,
// val wire: WireCodex,
// val material: MaterialCodex,
// val faction: FactionCodex,
val apocryphas: Map<String, Any>
)
@@ -270,18 +270,13 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
printdbg(this, "loaded successfully.")
}
else {
printdbg(this, "Ingame setting things up from the savegame")
RoguelikeRandomiser.loadFromSave(codices.meta.randseed0, codices.meta.randseed1)
WeatherMixer.loadFromSave(codices.meta.weatseed0, codices.meta.weatseed1)
// Load BlockCodex //
// Load WireCodex //
// Load ItemCodex //
Terrarum.itemCodex = codices.item
// Load MaterialCodex //
Terrarum.itemCodex.loadFromSave(codices.item)
Terrarum.apocryphas = HashMap(codices.apocryphas)
}
}
@@ -683,6 +678,7 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
IngameRenderer.invoke(
paused,
screenZoom,
visibleActorsRenderBehind,
visibleActorsRenderMiddle,
visibleActorsRenderMidTop,