mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 10:04:05 +09:00
writeworldinfo tested to be working
This commit is contained in:
@@ -5,6 +5,7 @@ import net.torvald.terrarum.console.Echo
|
||||
import net.torvald.terrarum.console.EchoError
|
||||
import net.torvald.terrarum.serialise.WriteLayerDataLzma
|
||||
import net.torvald.terrarum.serialise.WriteLayerDataZip
|
||||
import net.torvald.terrarum.serialise.WriteWorldInfo
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2017-07-18.
|
||||
@@ -12,7 +13,8 @@ import net.torvald.terrarum.serialise.WriteLayerDataZip
|
||||
object ExportLayerData : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
try {
|
||||
val outfile = WriteLayerDataLzma()
|
||||
val outfile = WriteLayerDataZip()
|
||||
WriteWorldInfo()
|
||||
Echo("Layer data exported to ${outfile!!.canonicalPath}")
|
||||
}
|
||||
catch (e: Exception) {
|
||||
|
||||
@@ -22,7 +22,7 @@ object ImportLayerData : ConsoleCommand {
|
||||
val layerData = ReadLayerDataLzma(file)
|
||||
|
||||
|
||||
Terrarum.ingame!!.world = GameWorldExtension(1, layerData)
|
||||
Terrarum.ingame!!.world = GameWorldExtension(1, layerData, 0, 0, 0) // FIXME null TIME_T for the (partial) test to pass
|
||||
Terrarum.ingame!!.actorNowPlaying?.setPosition(
|
||||
(Terrarum.ingame!!.world).spawnY * FeaturesDrawer.TILE_SIZE.toDouble(),
|
||||
(Terrarum.ingame!!.world).spawnX * FeaturesDrawer.TILE_SIZE.toDouble()
|
||||
|
||||
Reference in New Issue
Block a user