mirror of
https://github.com/OMGeeky/pytiled_parser.git
synced 2025-12-27 14:52:15 +01:00
Merge branch 'rf/caster' of https://github.com/Beefy-Swain/pytiled_parser into rf/caster
This commit is contained in:
@@ -268,7 +268,9 @@ def _cast_point(raw_tiled_object: RawTiledObject) -> Point:
|
||||
|
||||
|
||||
def _cast_tile(raw_tiled_object: RawTiledObject) -> Tile:
|
||||
raise NotImplementedError
|
||||
gid = raw_tiled_object["gid"]
|
||||
|
||||
return Tile(gid=gid, **_get_common_attributes(raw_tiled_object).__dict__)
|
||||
|
||||
|
||||
def _cast_polygon(raw_tiled_object: RawTiledObject) -> Polygon:
|
||||
|
||||
@@ -322,7 +322,7 @@ POINTS = [
|
||||
),
|
||||
]
|
||||
|
||||
TILE_IMAGES = [
|
||||
TILES = [
|
||||
(
|
||||
"""
|
||||
{
|
||||
@@ -1053,7 +1053,7 @@ TEXTS = [
|
||||
),
|
||||
]
|
||||
|
||||
OBJECTS = ELLIPSES + RECTANGLES + POINTS + TILE_IMAGES + POLYGONS + POLYLINES + TEXTS
|
||||
OBJECTS = ELLIPSES + RECTANGLES + POINTS + TILES + POLYGONS + POLYLINES + TEXTS
|
||||
|
||||
|
||||
@pytest.mark.parametrize("raw_object_json,expected", OBJECTS)
|
||||
|
||||
Reference in New Issue
Block a user