tilemap-parser 3.1.13__tar.gz → 3.1.14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/PKG-INFO +1 -1
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/pyproject.toml +1 -1
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/map_loader.py +22 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser.egg-info/PKG-INFO +1 -1
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/LICENSE +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/README.md +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/setup.cfg +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/__init__.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/parser/__init__.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/parser/animation.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/parser/collision.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/parser/collision_loader.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/parser/map_parse.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/parser/node_parse.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/parser/particle.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/__init__.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/animation_player.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/area_node.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/collision_cache.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/object_collision.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/particles.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/renderer.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/tile_collision.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/utils/__init__.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/utils/geometry.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser.egg-info/SOURCES.txt +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser.egg-info/dependency_links.txt +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser.egg-info/requires.txt +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser.egg-info/top_level.txt +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/tests/test_collision.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/tests/test_geometry.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/tests/test_map_loader.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/tests/test_object_collision.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/tests/test_render_scale.py +0 -0
- {tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/tests/test_tile_collision.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tilemap-parser
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.14
|
|
4
4
|
Summary: Standalone parser/loader for tilemap-editor JSON maps, sprite animations, and collision detection runtime.
|
|
5
5
|
Author: tilemap parser contributors
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "tilemap-parser"
|
|
7
|
-
version = "3.1.
|
|
7
|
+
version = "3.1.14"
|
|
8
8
|
description = "Standalone parser/loader for tilemap-editor JSON maps, sprite animations, and collision detection runtime."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -189,6 +189,28 @@ class TilemapData:
|
|
|
189
189
|
def get_tile_layers_dict(self, *, include_hidden: bool = True) -> Dict[int, ParsedLayer]:
|
|
190
190
|
return {layer.id: layer for layer in self.get_layers(include_hidden=include_hidden, layer_type="tile", sort_by_zindex=False)}
|
|
191
191
|
|
|
192
|
+
def build_tile_map(
|
|
193
|
+
self,
|
|
194
|
+
exclude_layers: Optional[set[str]] = None,
|
|
195
|
+
) -> Dict[Tuple[int, int], int]:
|
|
196
|
+
"""Build a ``{(col, row): tile_id}`` dict for use with
|
|
197
|
+
:class:`tilemap_parser.runtime.tile_collision.CollisionRunner`.
|
|
198
|
+
|
|
199
|
+
Only tile layers are scanned; object layers are skipped
|
|
200
|
+
automatically. Pass *exclude_layers* to skip specific tile
|
|
201
|
+
layers by name (e.g. collisions, overlays).
|
|
202
|
+
"""
|
|
203
|
+
tile_map: Dict[Tuple[int, int], int] = {}
|
|
204
|
+
for layer in self.parsed.layers:
|
|
205
|
+
if layer.layer_type != "tile":
|
|
206
|
+
continue
|
|
207
|
+
if exclude_layers and layer.name in exclude_layers:
|
|
208
|
+
continue
|
|
209
|
+
for (tx, ty), tile in layer.tiles.items():
|
|
210
|
+
if isinstance(tile.ttype, int):
|
|
211
|
+
tile_map[(tx, ty)] = tile.variant
|
|
212
|
+
return tile_map
|
|
213
|
+
|
|
192
214
|
def get_image(self, variant: int, ttype: int = 0, *, copy_surface: bool = True) -> Optional[Surface]:
|
|
193
215
|
if ttype < 0 or ttype >= len(self.surfaces):
|
|
194
216
|
return None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tilemap-parser
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.14
|
|
4
4
|
Summary: Standalone parser/loader for tilemap-editor JSON maps, sprite animations, and collision detection runtime.
|
|
5
5
|
Author: tilemap parser contributors
|
|
6
6
|
License: GNU GENERAL PUBLIC LICENSE
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/parser/collision_loader.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/animation_player.py
RENAMED
|
File without changes
|
|
File without changes
|
{tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/collision_cache.py
RENAMED
|
File without changes
|
{tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/object_collision.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser/runtime/tile_collision.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tilemap_parser-3.1.13 → tilemap_parser-3.1.14}/src/tilemap_parser.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|