33import  json 
44
55from  BaseClasses  import  MultiWorld , Item , Location 
6- from  typing  import  Optional , List 
6+ from  typing  import  Optional , List ,  TYPE_CHECKING 
77from  worlds .AutoWorld  import  World 
88from  .hooks .Helpers  import  before_is_category_enabled , before_is_item_enabled , before_is_location_enabled 
99
1010from  typing  import  Union 
1111
12+ if  TYPE_CHECKING :
13+     from  .Items  import  ManualItem 
14+     from  .Locations  import  ManualLocation 
15+ 
1216# blatantly copied from the minecraft ap world because why not 
1317def  load_data_file (* args ) ->  dict :
1418    fname  =  os .path .join ("data" , * args )
@@ -69,7 +73,7 @@ def is_item_name_enabled(multiworld: MultiWorld, player: int, item_name: str) ->
6973
7074    return  is_item_enabled (multiworld , player , item )
7175
72- def  is_item_enabled (multiworld : MultiWorld , player : int , item : Item ) ->  bool :
76+ def  is_item_enabled (multiworld : MultiWorld , player : int , item : "ManualItem" ) ->  bool :
7377    """Check if an item has been disabled by a yaml option.""" 
7478    hook_result  =  before_is_item_enabled (multiworld , player , item )
7579    if  hook_result  is  not None :
@@ -85,7 +89,7 @@ def is_location_name_enabled(multiworld: MultiWorld, player: int, location_name:
8589
8690    return  is_location_enabled (multiworld , player , location )
8791
88- def  is_location_enabled (multiworld : MultiWorld , player : int , location : Location ) ->  bool :
92+ def  is_location_enabled (multiworld : MultiWorld , player : int , location : "ManualLocation" ) ->  bool :
8993    """Check if a location has been disabled by a yaml option.""" 
9094    hook_result  =  before_is_location_enabled (multiworld , player , location )
9195    if  hook_result  is  not None :
0 commit comments