diff --git a/src/net/torvald/terrarum/modulebasegame/TerrarumIngame.kt b/src/net/torvald/terrarum/modulebasegame/TerrarumIngame.kt index 2e19ca4b1..c1573e1b8 100644 --- a/src/net/torvald/terrarum/modulebasegame/TerrarumIngame.kt +++ b/src/net/torvald/terrarum/modulebasegame/TerrarumIngame.kt @@ -426,8 +426,6 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) { savegameNickname = worldParams.savegameName - - player.worldCurrentlyPlaying = UUID.fromString(world.worldIndex.toString()) world.worldCreator = UUID.fromString(player.uuid.toString()) printdbg(this, "new woridIndex: ${world.worldIndex}") diff --git a/src/net/torvald/terrarum/modulebasegame/ui/UILoadDemoSavefiles.kt b/src/net/torvald/terrarum/modulebasegame/ui/UILoadDemoSavefiles.kt index 5edd9eafc..51c5a49ed 100644 --- a/src/net/torvald/terrarum/modulebasegame/ui/UILoadDemoSavefiles.kt +++ b/src/net/torvald/terrarum/modulebasegame/ui/UILoadDemoSavefiles.kt @@ -449,7 +449,11 @@ class UIItemPlayerCells( internal var hasTexture = false private set + private val litCol = UIItemTextButton.defaultActiveCol private val cellCol = CELL_COL + private val defaultCol = Color.WHITE + private val hruleCol = Color(1f,1f,1f,0.35f) + private val hruleColLit = litCol.cpy().sub(0f,0f,0f,0.65f) private val icons = CommonResourcePool.getAsTextureRegionPack("inventory_category") @@ -471,7 +475,7 @@ class UIItemPlayerCells( hasTexture = true } - val highlightCol = if (mouseUp) UIItemTextButton.defaultActiveCol else Color.WHITE + val highlightCol = if (mouseUp) litCol else defaultCol val x = posX.toFloat() val y = posY.toFloat() @@ -486,9 +490,6 @@ class UIItemPlayerCells( Toolkit.drawBoxBorder(batch, posX - 1, posY - 1, 106 + 2, height + 2) // infocell border Toolkit.drawBoxBorder(batch, posX + 115, posY + 33, width - 114, 88) - // infocell divider - Toolkit.fillArea(batch, posX + 118, posY + 62, width - 120, 1) - Toolkit.fillArea(batch, posX + 118, posY + 91, width - 120, 1) // texts val playTimeTextLen = App.fontGame.getWidth(totalPlayTime) @@ -500,7 +501,12 @@ class UIItemPlayerCells( batch.draw(icons.get(24,0), x + 120f, y + height - 82f) // player name batch.draw(icons.get(12,0), x + 119f, y + height - 53f) // world map batch.draw(icons.get(13,0), x + 120f, y + height - 24f) // journal - batch.draw(icons.get(23,0), x + width - 5f - playTimeTextLen - 24f, y + height - 24f) // stopwatch + batch.draw(icons.get(23,0), x + width - 4f - playTimeTextLen - 24f, y + height - 24f) // stopwatch + + // infocell divider + batch.color = if (mouseUp) hruleColLit else hruleCol + Toolkit.fillArea(batch, posX + 118, posY + 62, width - 120, 1) + Toolkit.fillArea(batch, posX + 118, posY + 91, width - 120, 1) // player avatar batch.color = Color.WHITE diff --git a/src/net/torvald/terrarum/serialise/Common.kt b/src/net/torvald/terrarum/serialise/Common.kt index 3c5d24f92..9af644ad4 100644 --- a/src/net/torvald/terrarum/serialise/Common.kt +++ b/src/net/torvald/terrarum/serialise/Common.kt @@ -44,7 +44,8 @@ object Common { // install custom (de)serialiser init { jsoner.ignoreUnknownFields = true - + jsoner.setUsePrototypes(false) + jsoner.setIgnoreDeprecated(false) // BigInteger jsoner.setSerializer(BigInteger::class.java, object : Json.Serializer { diff --git a/src/net/torvald/terrarum/serialise/WriteActor.kt b/src/net/torvald/terrarum/serialise/WriteActor.kt index 04603eb38..6d8c560ca 100644 --- a/src/net/torvald/terrarum/serialise/WriteActor.kt +++ b/src/net/torvald/terrarum/serialise/WriteActor.kt @@ -72,6 +72,8 @@ object WritePlayer { player.inventory = player.unauthorisedPlayerProps.inventory!! } + player.worldCurrentlyPlaying = ingame.world.worldIndex + val actorJson = WriteActor.encodeToByteArray64(player) val adl = player.animDesc!!.getRawADL() diff --git a/src/net/torvald/terrarum/serialise/WriteConfig.kt b/src/net/torvald/terrarum/serialise/WriteConfig.kt index 20c5aa8d1..54b9a5745 100644 --- a/src/net/torvald/terrarum/serialise/WriteConfig.kt +++ b/src/net/torvald/terrarum/serialise/WriteConfig.kt @@ -15,6 +15,10 @@ object WriteConfig { private val jsoner = Json(JsonWriter.OutputType.json) init { + jsoner.ignoreUnknownFields = true + jsoner.setUsePrototypes(false) + jsoner.setIgnoreDeprecated(false) + // KVHashMap jsoner.setSerializer(KVHashMap::class.java, object : Json.Serializer { override fun write(json: Json, obj: KVHashMap, knownType: Class<*>?) {