Skip to content

Commit

Permalink
removed the unused world map
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Aug 9, 2024
1 parent fba7b9f commit 660dd07
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 56,348 deletions.
11 changes: 2 additions & 9 deletions data/external/models/roomfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ class RfMap(typing.NamedTuple):
width: int
height: int

@property
def is_world_map(self) -> bool:
"""Check if this is the world map"""
return self.map_id == "rf9"


# pylint: disable-next=too-many-instance-attributes
class Building(PydanticConfiguration):
Expand Down Expand Up @@ -59,9 +54,7 @@ class Map(PydanticConfiguration):
def load_all(cls) -> list["Map"]:
"""Load all nat.Map's"""
with (RESULTS_PATH / "maps_roomfinder.json").open(encoding="utf-8") as file:
return [
cls(file=f"{item['id']}.webp", **item) for item in json.load(file) if item["id"] != "rf9"
] # rf9 is the world map
return [cls(file=f"{item['id']}.webp", **item) for item in json.load(file)]


class RoomMetadata(PydanticConfiguration):
Expand Down Expand Up @@ -94,4 +87,4 @@ class Room(PydanticConfiguration):
def load_all(cls) -> list["Room"]:
"""Load all nat.Room's"""
with (RESULTS_PATH / "rooms_roomfinder.json").open(encoding="utf-8") as file:
return [cls.model_validate(item) for item in json.load(file)]
return [cls.model_validate(item) for item in json.load(file) if item]
Loading

0 comments on commit 660dd07

Please sign in to comment.