1
1
from typing import Dict , List , NamedTuple , Optional , TYPE_CHECKING
2
2
3
3
from BaseClasses import Item , ItemClassification
4
- from .options import ShuffleDoors
5
4
from .static_logic import DOORS_BY_ROOM , PROGRESSION_BY_ROOM , PROGRESSIVE_ITEMS , get_door_group_item_id , \
6
5
get_door_item_id , get_progressive_item_id , get_special_item_id
7
6
8
- if TYPE_CHECKING :
9
- from . import LingoWorld
10
-
11
7
12
8
class ItemData (NamedTuple ):
13
9
"""
@@ -19,20 +15,6 @@ class ItemData(NamedTuple):
19
15
has_doors : bool
20
16
painting_ids : List [str ]
21
17
22
- def should_include (self , world : "LingoWorld" ) -> bool :
23
- if self .mode == "colors" :
24
- return world .options .shuffle_colors > 0
25
- elif self .mode == "doors" :
26
- return world .options .shuffle_doors != ShuffleDoors .option_none
27
- elif self .mode == "complex door" :
28
- return world .options .shuffle_doors == ShuffleDoors .option_complex
29
- elif self .mode == "door group" :
30
- return world .options .shuffle_doors == ShuffleDoors .option_simple
31
- elif self .mode == "special" :
32
- return False
33
- else :
34
- return True
35
-
36
18
37
19
class LingoItem (Item ):
38
20
"""
@@ -44,6 +26,8 @@ class LingoItem(Item):
44
26
ALL_ITEM_TABLE : Dict [str , ItemData ] = {}
45
27
ITEMS_BY_GROUP : Dict [str , List [str ]] = {}
46
28
29
+ TRAP_ITEMS : List [str ] = ["Slowness Trap" , "Iceland Trap" , "Atbash Trap" ]
30
+
47
31
48
32
def load_item_data ():
49
33
global ALL_ITEM_TABLE , ITEMS_BY_GROUP
@@ -87,9 +71,7 @@ def load_item_data():
87
71
"The Feeling of Being Lost" : ItemClassification .filler ,
88
72
"Wanderlust" : ItemClassification .filler ,
89
73
"Empty White Hallways" : ItemClassification .filler ,
90
- "Slowness Trap" : ItemClassification .trap ,
91
- "Iceland Trap" : ItemClassification .trap ,
92
- "Atbash Trap" : ItemClassification .trap ,
74
+ ** {trap_name : ItemClassification .trap for trap_name in TRAP_ITEMS },
93
75
"Puzzle Skip" : ItemClassification .useful ,
94
76
}
95
77
0 commit comments