EXPECTED = tileset.Tileset( columns=8, margin=1, spacing=1, name="tileset", image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, tile_count=48, tiled_version="1.3.5", tile_height=32, tile_width=32, version=1.2, type="tileset", terrain_types=[ tileset.Terrain( name="Sand", tile=29, properties={"terrain property": "test terrain property"}, ), tileset.Terrain(name="Cobblestone", tile=29), tileset.Terrain(name="Pavement", tile=29), tileset.Terrain(name="Dirt", tile=29), ], tiles={ 0: tileset.Tile( id=0, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=0, bottom_right=1), ), 1: tileset.Tile( id=1, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=1, bottom_right=1), ), 2: tileset.Tile( id=2, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=1, bottom_right=0), ), 3: tileset.Tile( id=3, terrain=tileset.TileTerrain(top_left=3, top_right=3, bottom_left=3, bottom_right=0), ), 4: tileset.Tile( id=4, terrain=tileset.TileTerrain(top_left=3, top_right=3, bottom_left=0, bottom_right=3), ), 5: tileset.Tile( id=5, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=0, bottom_right=3), ), 6: tileset.Tile( id=6, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=3, bottom_right=3), ), 7: tileset.Tile( id=7, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=3, bottom_right=0), ), 8: tileset.Tile( id=8, terrain=tileset.TileTerrain(top_left=0, top_right=1, bottom_left=0, bottom_right=1), ), 9: tileset.Tile( id=9, terrain=tileset.TileTerrain(top_left=1, top_right=1, bottom_left=1, bottom_right=1), ), 10: tileset.Tile( id=10, terrain=tileset.TileTerrain(top_left=1, top_right=0, bottom_left=1, bottom_right=0), ), 11: tileset.Tile( id=11, terrain=tileset.TileTerrain(top_left=3, top_right=0, bottom_left=3, bottom_right=3), ), 12: tileset.Tile( id=12, terrain=tileset.TileTerrain(top_left=0, top_right=3, bottom_left=3, bottom_right=3), ), 13: tileset.Tile( id=13, terrain=tileset.TileTerrain(top_left=0, top_right=3, bottom_left=0, bottom_right=3), ), 14: tileset.Tile( id=14, terrain=tileset.TileTerrain(top_left=3, top_right=3, bottom_left=3, bottom_right=3), ), 15: tileset.Tile( id=15, terrain=tileset.TileTerrain(top_left=3, top_right=0, bottom_left=3, bottom_right=0), ), 16: tileset.Tile( id=16, terrain=tileset.TileTerrain(top_left=0, top_right=1, bottom_left=0, bottom_right=0), ), 17: tileset.Tile( id=17, terrain=tileset.TileTerrain(top_left=1, top_right=1, bottom_left=0, bottom_right=0), ), 18: tileset.Tile( id=18, terrain=tileset.TileTerrain(top_left=1, top_right=0, bottom_left=0, bottom_right=0), ), 19: tileset.Tile( id=19, terrain=tileset.TileTerrain(top_left=1, top_right=1, bottom_left=1, bottom_right=0), ), 20: tileset.Tile( id=20, terrain=tileset.TileTerrain(top_left=1, top_right=1, bottom_left=0, bottom_right=1), ), 21: tileset.Tile( id=21, terrain=tileset.TileTerrain(top_left=0, top_right=3, bottom_left=0, bottom_right=0), ), 22: tileset.Tile( id=22, terrain=tileset.TileTerrain(top_left=3, top_right=3, bottom_left=0, bottom_right=0), ), 23: tileset.Tile( id=23, terrain=tileset.TileTerrain(top_left=3, top_right=0, bottom_left=0, bottom_right=0), ), 24: tileset.Tile( id=24, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=0, bottom_right=2), ), 25: tileset.Tile( id=25, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=2, bottom_right=2), ), 26: tileset.Tile( id=26, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=2, bottom_right=0), ), 27: tileset.Tile( id=27, terrain=tileset.TileTerrain(top_left=1, top_right=0, bottom_left=1, bottom_right=1), ), 28: tileset.Tile( id=28, terrain=tileset.TileTerrain(top_left=0, top_right=1, bottom_left=1, bottom_right=1), ), 29: tileset.Tile( id=29, terrain=tileset.TileTerrain(top_left=0, top_right=0, bottom_left=0, bottom_right=0), ), 32: tileset.Tile( id=32, terrain=tileset.TileTerrain(top_left=0, top_right=2, bottom_left=0, bottom_right=2), ), 33: tileset.Tile( id=33, terrain=tileset.TileTerrain(top_left=2, top_right=2, bottom_left=2, bottom_right=2), ), 34: tileset.Tile( id=34, terrain=tileset.TileTerrain(top_left=2, top_right=0, bottom_left=2, bottom_right=0), ), 35: tileset.Tile( id=35, terrain=tileset.TileTerrain(top_left=2, top_right=2, bottom_left=2, bottom_right=0), ), 36: tileset.Tile( id=36, terrain=tileset.TileTerrain(top_left=2, top_right=2, bottom_left=0, bottom_right=2), ), 40: tileset.Tile( id=40, terrain=tileset.TileTerrain(top_left=0, top_right=2, bottom_left=0, bottom_right=0), ), 41: tileset.Tile( id=41, terrain=tileset.TileTerrain(top_left=2, top_right=2, bottom_left=0, bottom_right=0), ), 42: tileset.Tile( id=42, terrain=tileset.TileTerrain(top_left=2, top_right=0, bottom_left=0, bottom_right=0), ), 43: tileset.Tile( id=43, terrain=tileset.TileTerrain(top_left=2, top_right=0, bottom_left=2, bottom_right=2), ), 44: tileset.Tile( id=44, terrain=tileset.TileTerrain(top_left=0, top_right=2, bottom_left=2, bottom_right=2), ), }, )
from pathlib import Path from pytiled_parser import tileset EXPECTED = tileset.Tileset( columns=8, image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, margin=1, spacing=1, name="tile_set_image", tile_count=48, tiled_version="1.3.5", tile_height=32, tile_width=32, version=1.2, grid=tileset.Grid(orientation="isometric", width=32, height=32), type="tileset", )
from pathlib import Path from pytiled_parser import tileset from pytiled_parser.common_types import Color EXPECTED = tileset.Tileset( columns=8, image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, margin=1, spacing=1, name="tileset", tile_count=48, tiled_version="1.3.5", tile_height=32, tile_width=32, version=1.2, transparent_color=Color(255, 0, 255, 255), type="tileset", )
from pathlib import Path from pytiled_parser import tileset from pytiled_parser.common_types import Color EXPECTED = tileset.Tileset( columns=8, image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, margin=1, spacing=1, name="tile_set_image", tile_count=48, tiled_version="1.3.5", tile_height=32, tile_width=32, version=1.2, properties={ "bool property": True, "color property": Color(255, 0, 0, 255), "float property": 5.6, "int property": 5, "string property": "testing", }, type="tileset", )
from pathlib import Path from pytiled_parser import tileset from pytiled_parser.common_types import Color, OrderedPair EXPECTED = tileset.Tileset( columns=8, image=Path("../../images/tmw_desert_spacing.png"), image_height=199, image_width=265, margin=1, spacing=1, name="tile_set_image", tile_count=48, tiled_version="1.3.5", tile_height=32, tile_width=32, version=1.2, tile_offset=OrderedPair(3, 5), type="tileset", )
EXPECTED = tileset.Tileset( columns=0, margin=0, spacing=0, name="tileset", tile_count=4, tiled_version="1.3.5", tile_height=32, tile_width=32, version=1.2, type="tileset", grid=tileset.Grid(orientation="orthogonal", width=1, height=1), tiles={ 0: tileset.Tile( animation=[ tileset.Frame(duration=100, tile_id=0), tileset.Frame(duration=100, tile_id=1), tileset.Frame(duration=100, tile_id=2), tileset.Frame(duration=100, tile_id=3), ], id=0, image=Path("../../images/tile_01.png"), image_height=32, image_width=32, properties={"float property": 2.2}, type="tile", ), 1: tileset.Tile( id=1, image=Path("../../images/tile_02.png"), image_height=32, image_width=32, objects=layer.ObjectLayer( name="", opacity=1, visible=True, draw_order="index", tiled_objects=[ tiled_object.Rectangle( id=2, name="", size=common_types.Size(14.4766410408043, 13.7196924896511), rotation=0, type="", visible=True, coordinates=common_types.OrderedPair( 13.4358367829687, 13.5304553518628), ), tiled_object.Ellipse( id=3, name="", size=common_types.Size(14.287403903016, 11.070372560615), rotation=0, type="", visible=True, coordinates=common_types.OrderedPair( 13.8143110585452, 1.98698994677705), ), ], ), properties={"string property": "testing"}, type="tile", ), 2: tileset.Tile( id=2, image=Path("../../images/tile_03.png"), image_height=32, image_width=32, properties={"bool property": True}, type="tile", ), 3: tileset.Tile( id=3, image=Path("../../images/tile_04.png"), image_height=32, image_width=32, type="tile", ), }, )
) ], map_size=common_types.Size(10, 10), next_layer_id=2, next_object_id=1, orientation="hexagonal", render_order="right-down", tiled_version="1.4.1", tile_size=common_types.Size(14, 12), version=1.4, tilesets={ 1: tileset.Tileset( columns=5, image=Path("../../images/hexmini.png"), image_width=106, image_height=72, margin=0, spacing=0, name="tileset", tile_count=20, tiled_version="1.4.1", tile_height=18, tile_width=18, version=1.4, type="tileset", tile_offset=common_types.OrderedPair(0, 1), ) }, )
orientation="orthogonal", render_order="right-down", tiled_version="1.4.1", tile_size=common_types.Size(32, 32), version=1.4, background_color=common_types.Color(255, 0, 4, 255), tilesets={ 1: tileset.Tileset( columns=8, image=Path("../../images/tmw_desert_spacing.png"), image_width=265, image_height=199, margin=1, spacing=1, name="tile_set_image", tile_count=48, tiled_version="1.3.1", tile_height=32, tile_width=32, version=1.2, type="tileset", ) }, properties={ "bool property - true": True, "color property": common_types.Color(255, 73, 252, 255), "file property": Path("../../../../../../var/log/syslog"), "float property": 1.23456789, "int property": 13, "string property": "Hello, World!!",