mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
seemingly working world teleporter (no saving... ui tho)
This commit is contained in:
@@ -57,6 +57,7 @@ class PlayerSavingThread(
|
||||
val gzout = GZIPOutputStream(tgaout)
|
||||
PixmapIO2._writeTGA(gzout, IngameRenderer.fboRGBexport, true, true)
|
||||
IngameRenderer.fboRGBexport.dispose()
|
||||
// App.disposables.add(IngameRenderer.fboRGBexport)
|
||||
val thumbContent = EntryFile(tgaout.toByteArray64())
|
||||
val thumb =
|
||||
DiskEntry(VDFileID.PLAYER_SCREENSHOT, VDFileID.ROOT, ingame.world.creationTime, time_t, thumbContent)
|
||||
|
||||
@@ -151,8 +151,16 @@ object ReadPlayer {
|
||||
object ReadActor {
|
||||
|
||||
operator fun invoke(disk: SimpleFileSystem, dataStream: Reader): Actor =
|
||||
Common.jsoner.fromJson<Actor?>(null, dataStream).also {
|
||||
fillInDetails(disk, it)
|
||||
try {
|
||||
Common.jsoner.fromJson<Actor?>(null, dataStream).also {
|
||||
fillInDetails(disk, it)
|
||||
}
|
||||
}
|
||||
catch (e: ClassCastException) {
|
||||
System.err.println(e.message)
|
||||
System.err.println("The JSON:")
|
||||
System.err.println(dataStream.readText())
|
||||
throw e
|
||||
}
|
||||
|
||||
private fun fillInDetails(disk: SimpleFileSystem, actor: Actor) {
|
||||
|
||||
Reference in New Issue
Block a user