diff --git a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/map/asset/GameMapAsset.kt b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/map/asset/GameMapAsset.kt index c8c2a1ad..2d2c810f 100644 --- a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/map/asset/GameMapAsset.kt +++ b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/map/asset/GameMapAsset.kt @@ -2,15 +2,10 @@ package com.bartlomiejpluta.base.editor.map.asset import com.bartlomiejpluta.base.editor.asset.model.Asset import javafx.beans.property.SimpleStringProperty -import tornadofx.* +import tornadofx.getValue +import tornadofx.setValue -// TODO(Add tileSetUID field) -class GameMapAsset( - override val uid: String, - name: String, - val rows: Int, - val columns: Int, -) : Asset { +class GameMapAsset(override val uid: String, name: String) : Asset { override val source = "$uid.dat" val nameProperty = SimpleStringProperty(name) diff --git a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/context/DefaultProjectContext.kt b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/context/DefaultProjectContext.kt index c5f41ccb..fcb0fd28 100644 --- a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/context/DefaultProjectContext.kt +++ b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/context/DefaultProjectContext.kt @@ -63,7 +63,7 @@ class DefaultProjectContext : ProjectContext { override fun importMap(name: String, map: GameMap) { project?.let { UID.next(it.maps.map(Asset::uid)).let { uid -> - val asset = GameMapAsset(uid, name, map.rows, map.columns) + val asset = GameMapAsset(uid, name) map.uid = uid it.maps += asset diff --git a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/serial/ProtobufProjectDeserializer.kt b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/serial/ProtobufProjectDeserializer.kt index 70c92b80..e399d9cf 100644 --- a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/serial/ProtobufProjectDeserializer.kt +++ b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/serial/ProtobufProjectDeserializer.kt @@ -18,10 +18,5 @@ class ProtobufProjectDeserializer : ProjectDeserializer { return project } - private fun deserializeMap(map: ProjectProto.GameMapAsset) = GameMapAsset( - uid = map.uid, - name = map.name, - rows = map.rows, - columns = map.columns - ) + private fun deserializeMap(map: ProjectProto.GameMapAsset) = GameMapAsset(uid = map.uid, name = map.name) } \ No newline at end of file diff --git a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/serial/ProtobufProjectSerializer.kt b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/serial/ProtobufProjectSerializer.kt index 6b34edd3..c3be4481 100644 --- a/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/serial/ProtobufProjectSerializer.kt +++ b/editor/src/main/kotlin/com/bartlomiejpluta/base/editor/project/serial/ProtobufProjectSerializer.kt @@ -20,8 +20,6 @@ class ProtobufProjectSerializer : ProjectSerializer { .setUid(map.uid) .setSource(map.source) .setName(map.name) - .setRows(map.rows) - .setColumns(map.columns) .build() } \ No newline at end of file diff --git a/proto/src/main/proto/project.proto b/proto/src/main/proto/project.proto index 00d5a34f..eec7423b 100644 --- a/proto/src/main/proto/project.proto +++ b/proto/src/main/proto/project.proto @@ -8,11 +8,8 @@ message Project { repeated GameMapAsset maps = 2; } -// TODO(Add tileSetUID field) message GameMapAsset { required string uid = 1; required string source = 2; required string name = 3; - required uint32 rows = 4; - required uint32 columns = 5; } \ No newline at end of file