diff options
Diffstat (limited to 'apworld/player_logic.py')
| -rw-r--r-- | apworld/player_logic.py | 10 |
1 files changed, 3 insertions, 7 deletions
| diff --git a/apworld/player_logic.py b/apworld/player_logic.py index f54573f..675c6ae 100644 --- a/apworld/player_logic.py +++ b/apworld/player_logic.py | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | from .generated import common_pb2 as common_pb2 | ||
| 1 | from typing import TYPE_CHECKING, NamedTuple | 2 | from typing import TYPE_CHECKING, NamedTuple |
| 2 | 3 | ||
| 3 | if TYPE_CHECKING: | 4 | if TYPE_CHECKING: |
| @@ -5,7 +6,6 @@ if TYPE_CHECKING: | |||
| 5 | 6 | ||
| 6 | 7 | ||
| 7 | class PlayerLocation(NamedTuple): | 8 | class PlayerLocation(NamedTuple): |
| 8 | name: str | ||
| 9 | code: int | None | 9 | code: int | None |
| 10 | 10 | ||
| 11 | 11 | ||
| @@ -15,10 +15,6 @@ class Lingo2PlayerLogic: | |||
| 15 | def __init__(self, world: "Lingo2World"): | 15 | def __init__(self, world: "Lingo2World"): |
| 16 | self.locations_by_room = {} | 16 | self.locations_by_room = {} |
| 17 | 17 | ||
| 18 | code = 1 | ||
| 19 | for door in world.static_logic.objects.doors: | 18 | for door in world.static_logic.objects.doors: |
| 20 | if not door.HasField("room_id"): | 19 | if door.type == common_pb2.DoorType.STANDARD: |
| 21 | continue | 20 | self.locations_by_room.setdefault(door.room_id, []).append(PlayerLocation(door.ap_id)) |
| 22 | |||
| 23 | self.locations_by_room.setdefault(door.room_id, []).append(PlayerLocation(door.name, code)) | ||
| 24 | code += 1 | ||
