[Proto] Apply the Entity/Character changes

This commit is contained in:
2022-08-22 23:47:49 +02:00
parent f7fa76036b
commit 33dad1e6d3
4 changed files with 8 additions and 8 deletions

View File

@@ -26,7 +26,7 @@ class ProtobufProjectDeserializer : ProjectDeserializer {
maps.addAll(proto.mapsList.map { deserializeMap(this, it) })
tileSets.addAll(proto.tileSetsList.map { deserializeTileSet(this, it) })
images.addAll(proto.imagesList.map { deserializeImage(this, it) })
characterSets.addAll(proto.entitySetsList.map { deserializeCharacterSet(this, it) })
characterSets.addAll(proto.characterSetsList.map { deserializeCharacterSet(this, it) })
animations.addAll(proto.animationsList.map { deserializeAnimation(this, it) })
iconSets.addAll(proto.iconSetsList.map { deserializeIconSet(this, it) })
fonts.addAll(proto.fontsList.map { deserializeFont(this, it) })
@@ -57,7 +57,7 @@ class ProtobufProjectDeserializer : ProjectDeserializer {
name = image.name
)
private fun deserializeCharacterSet(project: Project, characterSetAsset: ProjectProto.EntitySetAsset) = CharacterSet(
private fun deserializeCharacterSet(project: Project, characterSetAsset: ProjectProto.CharacterSetAsset) = CharacterSet(
project = project,
uid = characterSetAsset.uid,
source = characterSetAsset.source,

View File

@@ -24,7 +24,7 @@ class ProtobufProjectSerializer : ProjectSerializer {
proto.addAllMaps(item.maps.map(this::serializeMap))
proto.addAllTileSets(item.tileSets.map(this::serializeTileSet))
proto.addAllImages(item.images.map(this::serializeImage))
proto.addAllEntitySets(item.characterSets.map(this::serializeCharacterSet))
proto.addAllCharacterSets(item.characterSets.map(this::serializeCharacterSet))
proto.addAllAnimations(item.animations.map(this::serializeAnimation))
proto.addAllIconSets(item.iconSets.map(this::serializeIconSet))
proto.addAllFonts(item.fonts.map(this::serializeFont))
@@ -53,7 +53,7 @@ class ProtobufProjectSerializer : ProjectSerializer {
.setName(image.name)
.build()
private fun serializeCharacterSet(characterSet: CharacterSet) = ProjectProto.EntitySetAsset.newBuilder()
private fun serializeCharacterSet(characterSet: CharacterSet) = ProjectProto.CharacterSetAsset.newBuilder()
.setUid(characterSet.uid)
.setSource(characterSet.source)
.setName(characterSet.name)