diff --git a/pytiled_parser/tileset.py b/pytiled_parser/tileset.py index 5195fc6..c307afe 100644 --- a/pytiled_parser/tileset.py +++ b/pytiled_parser/tileset.py @@ -186,8 +186,9 @@ class RawTerrain(TypedDict): class RawTile(TypedDict): - """ The keys and their types that appear in a Tile JSON Object. - FIXME Implement objectgroup, can't be done until TileLayer's are implemented""" + """ The keys and their types that appear in a Tile JSON Object.""" + + # FIXME: Implement objectgroup, can't be done until TileLayer's are implemented animation: List[RawFrame] id: int diff --git a/tests/test_data/maps/images/tmw_desert_spacing.png b/tests/test_data/images/tmw_desert_spacing.png similarity index 100% rename from tests/test_data/maps/images/tmw_desert_spacing.png rename to tests/test_data/images/tmw_desert_spacing.png diff --git a/tests/test_data/layers/ten_layers/map_simple_external_tileset.json b/tests/test_data/layers/ten_layers/map_simple_external_tileset.json new file mode 100644 index 0000000..e68a7f7 --- /dev/null +++ b/tests/test_data/layers/ten_layers/map_simple_external_tileset.json @@ -0,0 +1,68 @@ +{ "compressionlevel":0, + "height":6, + "infinite":false, + "layers":[ + { + "data":[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], + "height":6, + "id":1, + "name":"Tile Layer 1", + "opacity":1, + "type":"tilelayer", + "visible":true, + "width":8, + "x":0, + "y":0 + }], + "nextlayerid":2, + "nextobjectid":1, + "orientation":"orthogonal", + "properties":[ + { + "name":"bool property - false", + "type":"bool", + "value":false + }, + { + "name":"bool property - true", + "type":"bool", + "value":true + }, + { + "name":"color property", + "type":"color", + "value":"#ff49fcff" + }, + { + "name":"file property", + "type":"file", + "value":"..\/..\/..\/..\/..\/..\/var\/log\/syslog" + }, + { + "name":"float property", + "type":"float", + "value":1.23456789 + }, + { + "name":"int property", + "type":"int", + "value":13 + }, + { + "name":"string property", + "type":"string", + "value":"Hello, World!!" + }], + "renderorder":"right-down", + "tiledversion":"1.3.1", + "tileheight":32, + "tilesets":[ + { + "firstgid":1, + "source":"tileset_image.json" + }], + "tilewidth":32, + "type":"map", + "version":1.2, + "width":8 +} diff --git a/tests/test_data/layers/ten_layers/tileset_image.json b/tests/test_data/layers/ten_layers/tileset_image.json new file mode 100644 index 0000000..8f3b73e --- /dev/null +++ b/tests/test_data/layers/ten_layers/tileset_image.json @@ -0,0 +1,14 @@ +{ "columns":8, + "image":"..\/images\/tmw_desert_spacing.png", + "imageheight":199, + "imagewidth":265, + "margin":1, + "name":"tile_set_image", + "spacing":1, + "tilecount":48, + "tiledversion":"1.3.1", + "tileheight":32, + "tilewidth":32, + "type":"tileset", + "version":1.2 +} diff --git a/tests/test_data/maps/all_objects/tileset_image.json b/tests/test_data/maps/all_objects/tileset_image.json index 8f3b73e..e88a3f1 100644 --- a/tests/test_data/maps/all_objects/tileset_image.json +++ b/tests/test_data/maps/all_objects/tileset_image.json @@ -1,5 +1,5 @@ { "columns":8, - "image":"..\/images\/tmw_desert_spacing.png", + "image":"..\/..\/images\/tmw_desert_spacing.png", "imageheight":199, "imagewidth":265, "margin":1, diff --git a/tests/test_data/maps/all_objects/tileset_image_objects.json b/tests/test_data/maps/all_objects/tileset_image_objects.json index 6ceb5be..6ed0287 100644 --- a/tests/test_data/maps/all_objects/tileset_image_objects.json +++ b/tests/test_data/maps/all_objects/tileset_image_objects.json @@ -1,5 +1,5 @@ { "columns":8, - "image":"..\/images\/tmw_desert_spacing.png", + "image":"..\/..\/images\/tmw_desert_spacing.png", "imageheight":199, "imagewidth":265, "margin":1, diff --git a/tests/test_data/maps/simple_external_tileset/tileset_image.json b/tests/test_data/maps/simple_external_tileset/tileset_image.json index 8f3b73e..e88a3f1 100644 --- a/tests/test_data/maps/simple_external_tileset/tileset_image.json +++ b/tests/test_data/maps/simple_external_tileset/tileset_image.json @@ -1,5 +1,5 @@ { "columns":8, - "image":"..\/images\/tmw_desert_spacing.png", + "image":"..\/..\/images\/tmw_desert_spacing.png", "imageheight":199, "imagewidth":265, "margin":1, diff --git a/tests/test_data/maps/simple_infinite/tileset_image.json b/tests/test_data/maps/simple_infinite/tileset_image.json index 8f3b73e..e88a3f1 100644 --- a/tests/test_data/maps/simple_infinite/tileset_image.json +++ b/tests/test_data/maps/simple_infinite/tileset_image.json @@ -1,5 +1,5 @@ { "columns":8, - "image":"..\/images\/tmw_desert_spacing.png", + "image":"..\/..\/images\/tmw_desert_spacing.png", "imageheight":199, "imagewidth":265, "margin":1, diff --git a/tests/test_data/maps/simple_offset/tileset_image.json b/tests/test_data/maps/simple_offset/tileset_image.json index 8f3b73e..e88a3f1 100644 --- a/tests/test_data/maps/simple_offset/tileset_image.json +++ b/tests/test_data/maps/simple_offset/tileset_image.json @@ -1,5 +1,5 @@ { "columns":8, - "image":"..\/images\/tmw_desert_spacing.png", + "image":"..\/..\/images\/tmw_desert_spacing.png", "imageheight":199, "imagewidth":265, "margin":1,