mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-16 21:44:05 +09:00
still working on the new savegame scheme
main game works fine, saving/loading will not be possible
This commit is contained in:
@@ -17,6 +17,7 @@ import java.io.InputStream
|
||||
import java.io.Reader
|
||||
import java.io.StringReader
|
||||
import java.math.BigInteger
|
||||
import java.util.*
|
||||
import java.util.zip.GZIPInputStream
|
||||
import java.util.zip.GZIPOutputStream
|
||||
|
||||
@@ -172,6 +173,16 @@ object Common {
|
||||
return hashMap
|
||||
}
|
||||
})
|
||||
// UUID
|
||||
jsoner.setSerializer(UUID::class.java, object : Json.Serializer<UUID> {
|
||||
override fun write(json: Json, obj: UUID, knownType: Class<*>?) {
|
||||
json.writeValue(obj.toString())
|
||||
}
|
||||
|
||||
override fun read(json: Json, jsonData: JsonValue, type: Class<*>?): UUID {
|
||||
return UUID.fromString(jsonData.asString())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private data class LayerInfo(val h: String, val b: String, val x: Int, val y: Int)
|
||||
|
||||
Reference in New Issue
Block a user