diff --git a/Poster.png b/Poster.png index e746683..7a2004a 100644 --- a/Poster.png +++ b/Poster.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:78e415f2f287aff2554e869d3ed0cf005e1111269dd79218dd9309472873b4f2 -size 292820 +oid sha256:7518f1a6b17cf48a6053f8e7db43818636f8937967ed1bed60643986d8574fd8 +size 215618 diff --git a/ss14_tiled/generate/entities.py b/ss14_tiled/generate/entities.py index 0c3843d..b1c1f57 100644 --- a/ss14_tiled/generate/entities.py +++ b/ss14_tiled/generate/entities.py @@ -34,7 +34,7 @@ def create_entities(root: Path, out: Path): continue max_directions = 1 - diagonal = "suffix" in entity and "diagonal" in str(entity["suffix"]) + diagonal = "suffix" in entity and "diagonal" in str(entity["suffix"]).lower() if diagonal: max_directions = 4 for d, direction in enumerate(("S", "N", "E", "W", "SE", "SW", "NE", "NW")): @@ -200,9 +200,9 @@ def create_entities(root: Path, out: Path): existing.images.append( Image(f"./.images/entities/{dest.name}", str(width), str(height))) - existing_out.write_text(json.dumps(existing, default=vars), "UTF-8") - create_tsx(existing, f"Entities - {g_name}", - out / f"entities_{g_name}.tsx") + existing_out.write_text(json.dumps(existing, default=vars), "UTF-8") + create_tsx(existing, f"Entities - {g_name}", + out / f"entities_{g_name}.tsx") def find_entities(root: Path) -> list[dict]: @@ -314,5 +314,17 @@ def filter_entities(entities: dict) -> dict: def group_entities(entities: dict) -> list[tuple[str, dict[str, dict]]]: """Split entities into groups.""" - # TODO: implement - return [("All", entities)] + signs = {} + other = {} + + # TODO: More groups + for key, value in entities.items(): + if "parent" in value and value["parent"] in ("BaseSign", "BaseSignDirectional"): + signs[key] = value + else: + other[key] = value + + return [ + ("Signs", signs), + ("Other", other), + ]