poi read wip

This commit is contained in:
minjaesong
2023-10-23 15:46:12 +09:00
parent 56d915cd71
commit 5806388bee
2 changed files with 41 additions and 11 deletions

View File

@@ -41,7 +41,7 @@ class BuildingMaker(batch: FlippingSpriteBatch) : IngameInstance(batch) {
- New Flat ter. : net.torvald.terrarum.modulebasegame.YamlCommandNewFlatTerrain
- New Rand. ter.
- Export… : net.torvald.terrarum.modulebasegame.YamlCommandToolExportTest
- Import…
- Import… : net.torvald.terrarum.modulebasegame.YamlCommandToolImportTest
- Exit to Title : net.torvald.terrarum.modulebasegame.YamlCommandExit
- Edit
- Clear Selections : net.torvald.terrarum.modulebasegame.YamlCommandClearSelection
@@ -795,4 +795,15 @@ class YamlCommandNewFlatTerrain : YamlInvokable {
ui.reset()
}
}
class YamlCommandToolImportTest : YamlInvokable {
override fun invoke(args: Array<Any>) {
YamlCommandClearSelection().invoke(args)
val ui = (args[0] as BuildingMaker)
val json = """{"genver":67108864,"id":"test","wlen":8,"w":6,"h":7,"lut":{"0":"basegame:0","1":"basegame:19","2":"basegame:-1"},"layers":[{"name":"test1","dat":["abZy8000000rlLp0S#Gh%Q1%XFDc>fH&5.j6G~zOdGxCG","abZy8000000rlLp0S#Gh38ntBemYv>C=*G~dGxCG"]},{"name":"test2","dat":["abZy8000000rlLp0S#Gh%Q1%XFDc>fH&5.j6G~zOdGxCG","abZy8000000rlLp0S#Gh38ntBemYv>C=*G~dGxCG"]}]}"""
val poi = Common.jsoner.fromJson(PointOfInterest().javaClass, json)
}
}