Skip to content

Commit

Permalink
Fix loading tileRectsIds in auto-layer rule definition (#7)
Browse files Browse the repository at this point in the history
When creating rules for auto-layers of an IntGrid in LDtk and saving it,
then Korge-ldtk was not able to load that ldtk file any more due to
differences between json file and the implemented json schema.

The name of the property is different in json file from LDtk, thus
@SerialName was updated. Also the type of the tileIDS field needs to
be an array of array of Ints.
  • Loading branch information
jobe-m authored Sep 26, 2024
1 parent d72694f commit bc5cbb7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1072,8 +1072,8 @@ data class AutoLayerRuleDefinition (
/**
* Array of all the tile IDs. They are used randomly or as stamps, based on `tileMode` value.
*/
@SerialName("tileIds")
val tileIDS: IntArray,
@SerialName("tileRectsIds")
val tileIDS: List<IntArray>,

/**
* Defines how tileIds array is used Possible values: `Single`, `Stamp`
Expand Down

0 comments on commit bc5cbb7

Please sign in to comment.