diff --git a/tests/test_data/map_tests/embedded_tileset/expected.py b/tests/test_data/map_tests/embedded_tileset/expected.py index d8988d9..01415b3 100644 --- a/tests/test_data/map_tests/embedded_tileset/expected.py +++ b/tests/test_data/map_tests/embedded_tileset/expected.py @@ -21,11 +21,11 @@ EXPECTED = tiled_map.TiledMap( image_height=199, margin=1, spacing=1, + firstgid=1, name="tileset", tile_count=48, tile_height=32, tile_width=32, - firstgid=1, ) }, ) diff --git a/tests/test_data/map_tests/external_tileset_dif_dir/expected.py b/tests/test_data/map_tests/external_tileset_dif_dir/expected.py index 61687df..6a9005f 100644 --- a/tests/test_data/map_tests/external_tileset_dif_dir/expected.py +++ b/tests/test_data/map_tests/external_tileset_dif_dir/expected.py @@ -85,6 +85,7 @@ EXPECTED = tiled_map.TiledMap( tiled_version="1.6.0", tile_height=32, tile_width=32, + firstgid=1, version="1.6", type="tileset", grid=tileset.Grid(orientation="orthogonal", width=1, height=1), diff --git a/tests/test_data/map_tests/hexagonal/expected.py b/tests/test_data/map_tests/hexagonal/expected.py index 10b873c..17c2321 100644 --- a/tests/test_data/map_tests/hexagonal/expected.py +++ b/tests/test_data/map_tests/hexagonal/expected.py @@ -143,6 +143,7 @@ EXPECTED = tiled_map.TiledMap( .resolve(), image_width=106, image_height=72, + firstgid=1, margin=0, spacing=0, name="tileset", diff --git a/tests/test_data/map_tests/no_background_color/expected.py b/tests/test_data/map_tests/no_background_color/expected.py index 483539b..eb154f1 100644 --- a/tests/test_data/map_tests/no_background_color/expected.py +++ b/tests/test_data/map_tests/no_background_color/expected.py @@ -21,6 +21,7 @@ EXPECTED = tiled_map.TiledMap( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tile_set_image", diff --git a/tests/test_data/map_tests/no_layers/expected.py b/tests/test_data/map_tests/no_layers/expected.py index ab8b5ca..61c9622 100644 --- a/tests/test_data/map_tests/no_layers/expected.py +++ b/tests/test_data/map_tests/no_layers/expected.py @@ -22,6 +22,7 @@ EXPECTED = tiled_map.TiledMap( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tile_set_image", diff --git a/tests/test_data/map_tests/template/expected.py b/tests/test_data/map_tests/template/expected.py index edcf117..79f1f16 100644 --- a/tests/test_data/map_tests/template/expected.py +++ b/tests/test_data/map_tests/template/expected.py @@ -24,33 +24,31 @@ EXPECTED = tiled_map.TiledMap( type="", ), tiled_object.Tile( - id=3, - coordinates=common_types.OrderedPair( - 46.3682110303692, 112.993321292057 - ), + id=6, + coordinates=common_types.OrderedPair(46, 136.666666666667), name="", rotation=0, type="", visible=True, size=common_types.Size(32, 32), - gid=30, + gid=49, ), tiled_object.Tile( - id=5, - coordinates=common_types.OrderedPair(116, 145), + id=7, + coordinates=common_types.OrderedPair(141.333333333333, 148), name="", rotation=0, type="", visible=True, size=common_types.Size(32, 32), - gid=1, + gid=50, ), ], ) ], map_size=common_types.Size(8, 6), next_layer_id=3, - next_object_id=6, + next_object_id=8, orientation="orthogonal", render_order="right-down", tiled_version="1.7.1", @@ -65,6 +63,7 @@ EXPECTED = tiled_map.TiledMap( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tile_set_image", @@ -76,15 +75,33 @@ EXPECTED = tiled_map.TiledMap( type="tileset", ), 49: tileset.Tileset( + columns=1, + image=Path(Path(__file__).parent / "../../images/tile_04.png") + .absolute() + .resolve(), + image_width=32, + image_height=32, + firstgid=49, + margin=0, + spacing=0, + name="tile_set_image_for_template", + tile_count=1, + tiled_version="1.7.1", + tile_height=32, + tile_width=32, + version="1.6", + type="tileset", + ), + 50: tileset.Tileset( columns=0, margin=0, spacing=0, - name="tileset_single_image", + name="tile_set_single_image", grid=tileset.Grid(orientation="orthogonal", width=1, height=1), tiles={ 0: tileset.Tile( id=0, - image=Path(Path(__file__).parent / "../../images/tile_01.png") + image=Path(Path(__file__).parent / "../../images/tile_02.png") .absolute() .resolve(), image_height=32, @@ -95,6 +112,7 @@ EXPECTED = tiled_map.TiledMap( tiled_version="1.7.1", tile_height=32, tile_width=32, + firstgid=50, type="tileset", version="1.6", ), diff --git a/tests/test_data/map_tests/template/map.json b/tests/test_data/map_tests/template/map.json index a29eb52..e1d0727 100644 --- a/tests/test_data/map_tests/template/map.json +++ b/tests/test_data/map_tests/template/map.json @@ -10,21 +10,21 @@ "objects":[ { "id":2, - "template":"template.json", + "template":"template-rectangle.json", "x":98.4987608686521, "y":46.2385012811358 }, { - "id":3, - "template":"template_tile.json", - "x":46.3682110303692, - "y":112.993321292057 + "id":6, + "template":"template-tile-spritesheet.json", + "x":46, + "y":136.666666666667 }, { - "id":5, - "template":"template_tile_image.json", - "x":116, - "y":145 + "id":7, + "template":"template-tile-image.json", + "x":141.333333333333, + "y":148 }], "opacity":1, "type":"objectgroup", @@ -33,7 +33,7 @@ "y":0 }], "nextlayerid":3, - "nextobjectid":6, + "nextobjectid":8, "orientation":"orthogonal", "properties":[ { @@ -76,7 +76,7 @@ }, { "firstgid":49, - "source":"tileset_single_image.json" + "source":"tile_set_image_for_template.json" }], "tilewidth":32, "type":"map", diff --git a/tests/test_data/map_tests/template/template.json b/tests/test_data/map_tests/template/template-rectangle.json similarity index 100% rename from tests/test_data/map_tests/template/template.json rename to tests/test_data/map_tests/template/template-rectangle.json diff --git a/tests/test_data/map_tests/template/template_tile_image.json b/tests/test_data/map_tests/template/template-tile-image.json similarity index 78% rename from tests/test_data/map_tests/template/template_tile_image.json rename to tests/test_data/map_tests/template/template-tile-image.json index 1267c02..5ba6682 100644 --- a/tests/test_data/map_tests/template/template_tile_image.json +++ b/tests/test_data/map_tests/template/template-tile-image.json @@ -2,7 +2,7 @@ { "gid":1, "height":32, - "id":4, + "id":7, "name":"", "rotation":0, "type":"", @@ -12,7 +12,7 @@ "tileset": { "firstgid":1, - "source":"tileset_single_image.json" + "source":"tile_set_single_image.json" }, "type":"template" } \ No newline at end of file diff --git a/tests/test_data/map_tests/template/template_tile.json b/tests/test_data/map_tests/template/template-tile-spritesheet.json similarity index 71% rename from tests/test_data/map_tests/template/template_tile.json rename to tests/test_data/map_tests/template/template-tile-spritesheet.json index e215e23..daba510 100644 --- a/tests/test_data/map_tests/template/template_tile.json +++ b/tests/test_data/map_tests/template/template-tile-spritesheet.json @@ -1,8 +1,8 @@ { "object": { - "gid":30, + "gid":1, "height":32, - "id":3, + "id":6, "name":"", "rotation":0, "type":"", @@ -12,7 +12,7 @@ "tileset": { "firstgid":1, - "source":"tileset.json" + "source":"tile_set_image_for_template.json" }, "type":"template" } \ No newline at end of file diff --git a/tests/test_data/map_tests/template/tile_set_image_for_template.json b/tests/test_data/map_tests/template/tile_set_image_for_template.json new file mode 100644 index 0000000..c0cbf4e --- /dev/null +++ b/tests/test_data/map_tests/template/tile_set_image_for_template.json @@ -0,0 +1,14 @@ +{ "columns":1, + "image":"..\/..\/images\/tile_04.png", + "imageheight":32, + "imagewidth":32, + "margin":0, + "name":"tile_set_image_for_template", + "spacing":0, + "tilecount":1, + "tiledversion":"1.7.1", + "tileheight":32, + "tilewidth":32, + "type":"tileset", + "version":"1.6" +} \ No newline at end of file diff --git a/tests/test_data/map_tests/template/tileset_single_image.json b/tests/test_data/map_tests/template/tile_set_single_image.json similarity index 80% rename from tests/test_data/map_tests/template/tileset_single_image.json rename to tests/test_data/map_tests/template/tile_set_single_image.json index c15990e..859e3da 100644 --- a/tests/test_data/map_tests/template/tileset_single_image.json +++ b/tests/test_data/map_tests/template/tile_set_single_image.json @@ -6,7 +6,7 @@ "width":1 }, "margin":0, - "name":"tileset_single_image", + "name":"tile_set_single_image", "spacing":0, "tilecount":1, "tiledversion":"1.7.1", @@ -14,7 +14,7 @@ "tiles":[ { "id":0, - "image":"..\/..\/images\/tile_01.png", + "image":"..\/..\/images\/tile_02.png", "imageheight":32, "imagewidth":32 }], diff --git a/tests/test_data/tilesets/image/expected.py b/tests/test_data/tilesets/image/expected.py index 8f5b730..b1df6c6 100644 --- a/tests/test_data/tilesets/image/expected.py +++ b/tests/test_data/tilesets/image/expected.py @@ -7,6 +7,7 @@ EXPECTED = tileset.Tileset( image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, + firstgid=1, margin=1, spacing=1, name="tile_set_image", diff --git a/tests/test_data/tilesets/image_background_color/expected.py b/tests/test_data/tilesets/image_background_color/expected.py index 7b322ad..79885de 100644 --- a/tests/test_data/tilesets/image_background_color/expected.py +++ b/tests/test_data/tilesets/image_background_color/expected.py @@ -8,6 +8,7 @@ EXPECTED = tileset.Tileset( image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, + firstgid=1, margin=1, spacing=1, name="tile_set_image", diff --git a/tests/test_data/tilesets/image_grid/expected.py b/tests/test_data/tilesets/image_grid/expected.py index 0369112..d2d33a2 100644 --- a/tests/test_data/tilesets/image_grid/expected.py +++ b/tests/test_data/tilesets/image_grid/expected.py @@ -7,6 +7,7 @@ EXPECTED = tileset.Tileset( image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, + firstgid=1, margin=1, spacing=1, name="tile_set_image", diff --git a/tests/test_data/tilesets/image_properties/expected.py b/tests/test_data/tilesets/image_properties/expected.py index f83a9fb..ad71efa 100644 --- a/tests/test_data/tilesets/image_properties/expected.py +++ b/tests/test_data/tilesets/image_properties/expected.py @@ -8,6 +8,7 @@ EXPECTED = tileset.Tileset( image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, + firstgid=1, margin=1, spacing=1, name="tile_set_image", diff --git a/tests/test_data/tilesets/image_tile_offset/expected.py b/tests/test_data/tilesets/image_tile_offset/expected.py index b67716e..c5bc293 100644 --- a/tests/test_data/tilesets/image_tile_offset/expected.py +++ b/tests/test_data/tilesets/image_tile_offset/expected.py @@ -8,6 +8,7 @@ EXPECTED = tileset.Tileset( image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, + firstgid=1, margin=1, spacing=1, name="tile_set_image", diff --git a/tests/test_data/tilesets/image_transformations/expected.py b/tests/test_data/tilesets/image_transformations/expected.py index d683947..c745a3d 100644 --- a/tests/test_data/tilesets/image_transformations/expected.py +++ b/tests/test_data/tilesets/image_transformations/expected.py @@ -7,6 +7,7 @@ EXPECTED = tileset.Tileset( image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, + firstgid=1, margin=1, spacing=1, name="tile_set_image", diff --git a/tests/test_data/tilesets/image_transparent_color/expected.py b/tests/test_data/tilesets/image_transparent_color/expected.py index 7f31fa3..ac3a5d9 100644 --- a/tests/test_data/tilesets/image_transparent_color/expected.py +++ b/tests/test_data/tilesets/image_transparent_color/expected.py @@ -8,6 +8,7 @@ EXPECTED = tileset.Tileset( image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, + firstgid=1, margin=1, spacing=1, name="tileset", diff --git a/tests/test_data/tilesets/individual_images/expected.py b/tests/test_data/tilesets/individual_images/expected.py index ef98758..5f8f6c8 100644 --- a/tests/test_data/tilesets/individual_images/expected.py +++ b/tests/test_data/tilesets/individual_images/expected.py @@ -11,6 +11,7 @@ EXPECTED = tileset.Tileset( tiled_version="1.6.0", tile_height=32, tile_width=32, + firstgid=1, version="1.6", type="tileset", grid=tileset.Grid(orientation="orthogonal", width=1, height=1), diff --git a/tests/test_data/tilesets/terrain/expected.py b/tests/test_data/tilesets/terrain/expected.py index ce71f8c..55f50e5 100644 --- a/tests/test_data/tilesets/terrain/expected.py +++ b/tests/test_data/tilesets/terrain/expected.py @@ -14,6 +14,7 @@ EXPECTED = tileset.Tileset( tiled_version="1.6.0", tile_height=32, tile_width=32, + firstgid=1, version="1.6", type="tileset", wang_sets=[ diff --git a/tests/test_data/tilesets/wangsets/map.json b/tests/test_data/tilesets/wangsets/map.json deleted file mode 100644 index 6a7ee27..0000000 --- a/tests/test_data/tilesets/wangsets/map.json +++ /dev/null @@ -1,32 +0,0 @@ -{ "compressionlevel":-1, - "height":20, - "infinite":false, - "layers":[ - { - "data":[35, 1, 57, 49, 48, 67, 75, 7, 61, 52, 70, 44, 81, 55, 59, 63, 10, 68, 63, 81, 22, 23, 72, 60, 61, 52, 79, 26, 72, 60, 53, 54, 54, 72, 60, 34, 22, 77, 60, 52, 59, 64, 75, 70, 61, 71, 78, 71, 46, 29, 30, 35, 33, 53, 63, 42, 35, 9, 69, 58, 55, 74, 5, 9, 28, 2, 77, 54, 55, 39, 25, 25, 26, 63, 63, 78, 25, 26, 54, 72, 65, 50, 45, 27, 24, 26, 1, 66, 61, 7, 70, 62, 72, 33, 34, 52, 70, 70, 70, 8, 48, 34, 7, 62, 60, 67, 23, 54, 64, 23, 46, 32, 73, 21, 25, 70, 80, 78, 7, 43, 71, 42, 13, 56, 66, 7, 31, 59, 6, 62, 63, 18, 46, 30, 31, 48, 80, 54, 42, 53, 79, 7, 16, 62, 54, 19, 11, 59, 42, 35, 36, 42, 61, 16, 43, 71, 51, 34, 4, 59, 76, 41, 37, 30, 61, 70, 13, 57, 80, 18, 15, 53, 36, 42, 52, 7, 70, 25, 13, 29, 79, 53, 6, 44, 64, 77, 42, 70, 80, 24, 22, 68, 24, 52, 70, 26, 54, 55, 39, 26, 54, 60, 17, 1, 5, 6, 80, 51, 76, 56, 65, 75, 34, 58, 5, 28, 56, 59, 51, 70, 61, 67, 14, 18, 24, 16, 49, 59, 81, 36, 9, 51, 26, 69, 40, 20, 32, 64, 66, 52, 33, 76, 21, 22, 68, 19, 59, 55, 50, 10, 21, 70, 70, 8, 51, 71, 18, 54, 78, 70, 42, 8, 60, 70, 4, 30, 31, 30, 31, 38, 32, 54, 46, 38, 57, 80, 24, 70, 53, 1, 53, 24, 58, 48, 43, 17, 18, 24, 43, 52, 22, 59, 33, 80, 63, 54, 33, 49, 59, 15, 35, 72, 33, 67, 75, 17, 42, 35, 1, 29, 68, 72, 42, 52, 61, 61, 26, 63, 36, 45, 45, 54, 42, 53, 73, 23, 73, 21, 44, 42, 76, 48, 76, 57, 62, 60, 70, 58, 23, 78, 48, 67, 75, 61, 79, 61, 52, 61, 79, 53, 54, 55, 75, 70, 34, 70, 7, 58, 66, 52, 33, 53, 51, 61, 8, 72, 60, 31, 74, 57, 70, 67, 3, 79, 22, 47, 12, 62, 51, 31, 43, 58, 68, 63, 15, 76, 65, 23, 54, 63, 6, 8, 19, 74, 57, 62, 24, 35, 60, 43], - "height":20, - "id":1, - "name":"Tile Layer 1", - "opacity":1, - "type":"tilelayer", - "visible":true, - "width":20, - "x":0, - "y":0 - }], - "nextlayerid":2, - "nextobjectid":1, - "orientation":"orthogonal", - "renderorder":"right-down", - "tiledversion":"1.6.0", - "tileheight":32, - "tilesets":[ - { - "firstgid":1, - "source":"tileset.json" - }], - "tilewidth":32, - "type":"map", - "version":"1.6", - "width":20 -} \ No newline at end of file diff --git a/tests/test_data/tilesets/wangsets/tileset.json b/tests/test_data/tilesets/wangsets/tileset.json deleted file mode 100644 index 461197b..0000000 --- a/tests/test_data/tilesets/wangsets/tileset.json +++ /dev/null @@ -1,364 +0,0 @@ -{ "columns":9, - "image":"..\/..\/images\/walkways.png", - "imageheight":288, - "imagewidth":288, - "margin":0, - "name":"tileset", - "spacing":0, - "tilecount":81, - "tiledversion":"1.6.0", - "tileheight":32, - "tilewidth":32, - "type":"tileset", - "version":"1.6", - "wangsets":[ - { - "colors":[ - { - "color":"#ff0000", - "name":"Path", - "probability":1, - "tile":-1 - }, - { - "color":"#00ff00", - "name":"Grass", - "probability":0.75, - "tile":-1 - }, - { - "color":"#0000ff", - "name":"WalkWay", - "probability":0.5, - "tile":-1 - }], - "name":"My Wang Set", - "tile":-1, - "type":"edge", - "wangtiles":[ - { - "tileid":0, - "wangid":[2, 0, 3, 0, 3, 0, 2, 0] - }, - { - "tileid":1, - "wangid":[2, 0, 3, 0, 3, 0, 3, 0] - }, - { - "tileid":2, - "wangid":[2, 0, 1, 0, 3, 0, 3, 0] - }, - { - "tileid":3, - "wangid":[2, 0, 3, 0, 3, 0, 1, 0] - }, - { - "tileid":4, - "wangid":[2, 0, 2, 0, 3, 0, 3, 0] - }, - { - "tileid":5, - "wangid":[2, 0, 1, 0, 3, 0, 2, 0] - }, - { - "tileid":6, - "wangid":[2, 0, 1, 0, 3, 0, 1, 0] - }, - { - "tileid":7, - "wangid":[2, 0, 2, 0, 3, 0, 1, 0] - }, - { - "tileid":8, - "wangid":[2, 0, 2, 0, 3, 0, 2, 0] - }, - { - "tileid":9, - "wangid":[3, 0, 3, 0, 3, 0, 2, 0] - }, - { - "tileid":10, - "wangid":[3, 0, 3, 0, 3, 0, 3, 0] - }, - { - "tileid":11, - "wangid":[3, 0, 1, 0, 3, 0, 3, 0] - }, - { - "tileid":12, - "wangid":[3, 0, 3, 0, 3, 0, 1, 0] - }, - { - "tileid":13, - "wangid":[3, 0, 2, 0, 3, 0, 3, 0] - }, - { - "tileid":14, - "wangid":[3, 0, 1, 0, 3, 0, 2, 0] - }, - { - "tileid":15, - "wangid":[3, 0, 1, 0, 3, 0, 1, 0] - }, - { - "tileid":16, - "wangid":[3, 0, 2, 0, 3, 0, 1, 0] - }, - { - "tileid":17, - "wangid":[3, 0, 2, 0, 3, 0, 2, 0] - }, - { - "tileid":18, - "wangid":[3, 0, 3, 0, 1, 0, 2, 0] - }, - { - "tileid":19, - "wangid":[3, 0, 3, 0, 1, 0, 3, 0] - }, - { - "tileid":20, - "wangid":[3, 0, 1, 0, 1, 0, 3, 0] - }, - { - "tileid":21, - "wangid":[3, 0, 3, 0, 1, 0, 1, 0] - }, - { - "tileid":22, - "wangid":[3, 0, 2, 0, 1, 0, 3, 0] - }, - { - "tileid":23, - "wangid":[3, 0, 1, 0, 1, 0, 2, 0] - }, - { - "tileid":24, - "wangid":[3, 0, 1, 0, 1, 0, 1, 0] - }, - { - "tileid":25, - "wangid":[3, 0, 2, 0, 1, 0, 1, 0] - }, - { - "tileid":26, - "wangid":[3, 0, 2, 0, 1, 0, 2, 0] - }, - { - "tileid":27, - "wangid":[1, 0, 3, 0, 3, 0, 2, 0] - }, - { - "tileid":28, - "wangid":[1, 0, 3, 0, 3, 0, 3, 0] - }, - { - "tileid":29, - "wangid":[1, 0, 1, 0, 3, 0, 3, 0] - }, - { - "tileid":30, - "wangid":[1, 0, 3, 0, 3, 0, 1, 0] - }, - { - "tileid":31, - "wangid":[1, 0, 2, 0, 3, 0, 3, 0] - }, - { - "tileid":32, - "wangid":[1, 0, 1, 0, 3, 0, 2, 0] - }, - { - "tileid":33, - "wangid":[1, 0, 1, 0, 3, 0, 1, 0] - }, - { - "tileid":34, - "wangid":[1, 0, 2, 0, 3, 0, 1, 0] - }, - { - "tileid":35, - "wangid":[1, 0, 2, 0, 3, 0, 2, 0] - }, - { - "tileid":36, - "wangid":[3, 0, 3, 0, 2, 0, 2, 0] - }, - { - "tileid":37, - "wangid":[3, 0, 3, 0, 2, 0, 3, 0] - }, - { - "tileid":38, - "wangid":[3, 0, 1, 0, 2, 0, 3, 0] - }, - { - "tileid":39, - "wangid":[3, 0, 3, 0, 2, 0, 1, 0] - }, - { - "tileid":40, - "wangid":[3, 0, 2, 0, 2, 0, 3, 0] - }, - { - "tileid":41, - "wangid":[3, 0, 1, 0, 2, 0, 2, 0] - }, - { - "tileid":42, - "wangid":[3, 0, 1, 0, 2, 0, 1, 0] - }, - { - "tileid":43, - "wangid":[3, 0, 2, 0, 2, 0, 1, 0] - }, - { - "tileid":44, - "wangid":[3, 0, 2, 0, 2, 0, 2, 0] - }, - { - "tileid":45, - "wangid":[2, 0, 3, 0, 1, 0, 2, 0] - }, - { - "tileid":46, - "wangid":[2, 0, 3, 0, 1, 0, 3, 0] - }, - { - "tileid":47, - "wangid":[2, 0, 1, 0, 1, 0, 3, 0] - }, - { - "tileid":48, - "wangid":[2, 0, 3, 0, 1, 0, 1, 0] - }, - { - "tileid":49, - "wangid":[2, 0, 2, 0, 1, 0, 3, 0] - }, - { - "tileid":50, - "wangid":[2, 0, 1, 0, 1, 0, 2, 0] - }, - { - "tileid":51, - "wangid":[2, 0, 1, 0, 1, 0, 1, 0] - }, - { - "tileid":52, - "wangid":[2, 0, 2, 0, 1, 0, 1, 0] - }, - { - "tileid":53, - "wangid":[2, 0, 2, 0, 1, 0, 2, 0] - }, - { - "tileid":54, - "wangid":[1, 0, 3, 0, 1, 0, 2, 0] - }, - { - "tileid":55, - "wangid":[1, 0, 3, 0, 1, 0, 3, 0] - }, - { - "tileid":56, - "wangid":[1, 0, 1, 0, 1, 0, 3, 0] - }, - { - "tileid":57, - "wangid":[1, 0, 3, 0, 1, 0, 1, 0] - }, - { - "tileid":58, - "wangid":[1, 0, 2, 0, 1, 0, 3, 0] - }, - { - "tileid":59, - "wangid":[1, 0, 1, 0, 1, 0, 2, 0] - }, - { - "tileid":60, - "wangid":[1, 0, 1, 0, 1, 0, 1, 0] - }, - { - "tileid":61, - "wangid":[1, 0, 2, 0, 1, 0, 1, 0] - }, - { - "tileid":62, - "wangid":[1, 0, 2, 0, 1, 0, 2, 0] - }, - { - "tileid":63, - "wangid":[1, 0, 3, 0, 2, 0, 2, 0] - }, - { - "tileid":64, - "wangid":[1, 0, 3, 0, 2, 0, 3, 0] - }, - { - "tileid":65, - "wangid":[1, 0, 1, 0, 2, 0, 3, 0] - }, - { - "tileid":66, - "wangid":[1, 0, 3, 0, 2, 0, 1, 0] - }, - { - "tileid":67, - "wangid":[1, 0, 2, 0, 2, 0, 3, 0] - }, - { - "tileid":68, - "wangid":[1, 0, 1, 0, 2, 0, 2, 0] - }, - { - "tileid":69, - "wangid":[1, 0, 1, 0, 2, 0, 1, 0] - }, - { - "tileid":70, - "wangid":[1, 0, 2, 0, 2, 0, 1, 0] - }, - { - "tileid":71, - "wangid":[1, 0, 2, 0, 2, 0, 2, 0] - }, - { - "tileid":72, - "wangid":[2, 0, 3, 0, 2, 0, 2, 0] - }, - { - "tileid":73, - "wangid":[2, 0, 3, 0, 2, 0, 3, 0] - }, - { - "tileid":74, - "wangid":[2, 0, 1, 0, 2, 0, 3, 0] - }, - { - "tileid":75, - "wangid":[2, 0, 3, 0, 2, 0, 1, 0] - }, - { - "tileid":76, - "wangid":[2, 0, 2, 0, 2, 0, 3, 0] - }, - { - "tileid":77, - "wangid":[2, 0, 1, 0, 2, 0, 2, 0] - }, - { - "tileid":78, - "wangid":[2, 0, 1, 0, 2, 0, 1, 0] - }, - { - "tileid":79, - "wangid":[2, 0, 2, 0, 2, 0, 1, 0] - }, - { - "tileid":80, - "wangid":[2, 0, 2, 0, 2, 0, 2, 0] - }] - }] -} \ No newline at end of file diff --git a/tests/test_data/world_tests/both/expected.py b/tests/test_data/world_tests/both/expected.py index 2fcf738..748299b 100644 --- a/tests/test_data/world_tests/both/expected.py +++ b/tests/test_data/world_tests/both/expected.py @@ -32,6 +32,7 @@ EXPECTED = world.World( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tileset", @@ -88,6 +89,7 @@ EXPECTED = world.World( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tileset", @@ -144,6 +146,7 @@ EXPECTED = world.World( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tileset", diff --git a/tests/test_data/world_tests/pattern_matched/expected.py b/tests/test_data/world_tests/pattern_matched/expected.py index b6ab9f0..d7ffaa6 100644 --- a/tests/test_data/world_tests/pattern_matched/expected.py +++ b/tests/test_data/world_tests/pattern_matched/expected.py @@ -32,6 +32,7 @@ EXPECTED = world.World( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tileset", @@ -88,6 +89,7 @@ EXPECTED = world.World( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tileset", diff --git a/tests/test_data/world_tests/static_defined/expected.py b/tests/test_data/world_tests/static_defined/expected.py index b748577..f29750b 100644 --- a/tests/test_data/world_tests/static_defined/expected.py +++ b/tests/test_data/world_tests/static_defined/expected.py @@ -32,6 +32,7 @@ EXPECTED = world.World( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tileset", @@ -88,6 +89,7 @@ EXPECTED = world.World( .resolve(), image_width=265, image_height=199, + firstgid=1, margin=1, spacing=1, name="tileset", diff --git a/tests/test_tileset.py b/tests/test_tileset.py index bca29bd..d24e9d5 100644 --- a/tests/test_tileset.py +++ b/tests/test_tileset.py @@ -39,6 +39,6 @@ def test_tilesets_integration(tileset_dir): raw_tileset_path = tileset_dir / "tileset.json" with open(raw_tileset_path) as raw_tileset: - tileset_ = tileset.cast(json.loads(raw_tileset.read())) + tileset_ = tileset.cast(json.loads(raw_tileset.read()), 1) assert tileset_ == expected.EXPECTED