mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-15 13:04:05 +09:00
fixed a bug where some player-related values are not being written on saving when the player was loaded from the savegame
This commit is contained in:
@@ -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<BigInteger> {
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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<KVHashMap> {
|
||||
override fun write(json: Json, obj: KVHashMap, knownType: Class<*>?) {
|
||||
|
||||
Reference in New Issue
Block a user