summary refs log tree commit diff stats
path: root/datatypes.py
diff options
context:
space:
mode:
Diffstat (limited to 'datatypes.py')
-rw-r--r--datatypes.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/datatypes.py b/datatypes.py index e9bf0a3..e466558 100644 --- a/datatypes.py +++ b/datatypes.py
@@ -1,3 +1,4 @@
1from enum import Enum, Flag, auto
1from typing import List, NamedTuple, Optional 2from typing import List, NamedTuple, Optional
2 3
3 4
@@ -11,10 +12,18 @@ class RoomAndPanel(NamedTuple):
11 panel: str 12 panel: str
12 13
13 14
15class EntranceType(Flag):
16 NORMAL = auto()
17 PAINTING = auto()
18 SUNWARP = auto()
19 WARP = auto()
20 CROSSROADS_ROOF_ACCESS = auto()
21
22
14class RoomEntrance(NamedTuple): 23class RoomEntrance(NamedTuple):
15 room: str # source room 24 room: str # source room
16 door: Optional[RoomAndDoor] 25 door: Optional[RoomAndDoor]
17 painting: bool 26 type: EntranceType
18 27
19 28
20class Room(NamedTuple): 29class Room(NamedTuple):
@@ -22,6 +31,12 @@ class Room(NamedTuple):
22 entrances: List[RoomEntrance] 31 entrances: List[RoomEntrance]
23 32
24 33
34class DoorType(Enum):
35 NORMAL = 1
36 SUNWARP = 2
37 SUN_PAINTING = 3
38
39
25class Door(NamedTuple): 40class Door(NamedTuple):
26 name: str 41 name: str
27 item_name: str 42 item_name: str
@@ -34,7 +49,7 @@ class Door(NamedTuple):
34 event: bool 49 event: bool
35 door_group: Optional[str] 50 door_group: Optional[str]
36 include_reduce: bool 51 include_reduce: bool
37 junk_item: bool 52 type: DoorType
38 item_group: Optional[str] 53 item_group: Optional[str]
39 54
40 55