Merge branch 'rf/caster' of https://github.com/Beefy-Swain/pytiled_parser into rf/caster

This commit is contained in:
Darren Eberly
2020-06-06 19:59:03 -04:00
2 changed files with 26 additions and 29 deletions

View File

@@ -162,3 +162,7 @@ class RawLayer(TypedDict):
width: int
x: int
y: int
def cast(*args, **kwargs):
pass

View File

@@ -21,55 +21,48 @@ class Map:
See: https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#map
Attributes:
parent_dir: The directory the TMX file is in. Used for finding relative paths
to TSX files and other assets.
version: The TMX format version.
tiled_version: The Tiled version used to save the file. May be a date (for
snapshot builds).
infinite: If the map is infinite or not.
layers: List of layer objects by draw order.
map_size: The map width in tiles.
next_layer_id: Stores the next available ID for new layers.
next_object_id: Stores the next available ID for new objects.
orientation: Map orientation. Tiled supports "orthogonal", "isometric",
"staggered" and "hexagonal"
render_order: The order in which tiles on tile layers are rendered. Valid values
are right-down, right-up, left-down and left-up. In all cases, the map is
tiled_version: The Tiled version used to save the file. May be a date (for
snapshot builds).
drawn row-by-row. (only supported for orthogonal maps at the moment)
map_size: The map width in tiles.
tile_size: The width of a tile.
infinite: If the map is infinite or not.
tile_size: The size of a tile.
tile_sets: Tilesets used in this map.
version: The JSON format version.
background_color: The background color of the map.
properties: The properties of the Map.
hex_side_length: Only for hexagonal maps. Determines the width or height
(depending on the staggered axis) of the tile's edge, in pixels.
stagger_axis: For staggered and hexagonal maps, determines which axis ("x" or
"y") is staggered.
stagger_index: For staggered and hexagonal maps, determines whether the "even"
or "odd" indexes along the staggered axis are shifted.
background_color: The background color of the map.
next_layer_id: Stores the next available ID for new layers.
next_object_id: Stores the next available ID for new objects.
tile_sets: Dict of tile sets used in this map. Key is the first GID for the
tile set. The value is a TileSet object.
layers: List of layer objects by draw order.
"""
parent_dir: Path
tmx_file: Union[str, Path]
version: str
tiled_version: str
orientation: str
render_order: str
map_size: Size
tile_size: Size
infinite: bool
layers: List[Layer]
map_size: Size
next_layer_id: Optional[int]
next_object_id: int
orientation: str
render_order: str
tiled_version: str
tile_size: Size
tile_sets: List[TileSet]
version: str
tile_sets: TileSetDict
layers: List[Layer]
background_color: Optional[Color] = None
properties: Optional[Properties] = None
hex_side_length: Optional[int] = None
stagger_axis: Optional[int] = None
stagger_index: Optional[int] = None
background_color: Optional[Color] = None
properties: Optional[Properties] = None
class _RawTiledMap(TypedDict):