| 
									
										
										
										
											2024-08-11 08:47:17 -04:00
										 |  |  | from typing import Callable, Dict, NamedTuple, Optional, TYPE_CHECKING | 
					
						
							| 
									
										
										
										
											2023-07-19 17:16:03 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-08-11 08:47:17 -04:00
										 |  |  | from BaseClasses import Location | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if TYPE_CHECKING: | 
					
						
							|  |  |  |     from . import CliqueWorld | 
					
						
							| 
									
										
										
										
											2023-07-19 17:16:03 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CliqueLocation(Location): | 
					
						
							|  |  |  |     game = "Clique" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class CliqueLocationData(NamedTuple): | 
					
						
							|  |  |  |     region: str | 
					
						
							|  |  |  |     address: Optional[int] = None | 
					
						
							| 
									
										
										
										
											2024-08-11 08:47:17 -04:00
										 |  |  |     can_create: Callable[["CliqueWorld"], bool] = lambda world: True | 
					
						
							| 
									
										
										
										
											2023-07-19 17:16:03 -05:00
										 |  |  |     locked_item: Optional[str] = None | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | location_data_table: Dict[str, CliqueLocationData] = { | 
					
						
							|  |  |  |     "The Big Red Button": CliqueLocationData( | 
					
						
							|  |  |  |         region="The Button Realm", | 
					
						
							|  |  |  |         address=69696969, | 
					
						
							|  |  |  |     ), | 
					
						
							|  |  |  |     "The Item on the Desk": CliqueLocationData( | 
					
						
							|  |  |  |         region="The Button Realm", | 
					
						
							|  |  |  |         address=69696968, | 
					
						
							| 
									
										
										
										
											2024-08-11 08:47:17 -04:00
										 |  |  |         can_create=lambda world: world.options.hard_mode, | 
					
						
							| 
									
										
										
										
											2023-07-19 17:16:03 -05:00
										 |  |  |     ), | 
					
						
							|  |  |  |     "In the Player's Mind": CliqueLocationData( | 
					
						
							|  |  |  |         region="The Button Realm", | 
					
						
							|  |  |  |         locked_item="The Urge to Push", | 
					
						
							|  |  |  |     ), | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | location_table = {name: data.address for name, data in location_data_table.items() if data.address is not None} | 
					
						
							|  |  |  | locked_locations = {name: data for name, data in location_data_table.items() if data.locked_item} |