| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  | from dataclasses import dataclass | 
					
						
							|  |  |  | from enum import Enum | 
					
						
							| 
									
										
										
										
											2023-07-20 02:10:48 +02:00
										 |  |  | from typing import Dict, List | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-28 02:23:50 +02:00
										 |  |  | from .utils import define_new_region, parse_lambda, lazy, get_items, get_sigma_normal_logic, get_sigma_expert_logic,\ | 
					
						
							|  |  |  |     get_vanilla_logic | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  | class ItemCategory(Enum): | 
					
						
							|  |  |  |     SYMBOL = 0 | 
					
						
							|  |  |  |     DOOR = 1 | 
					
						
							|  |  |  |     LASER = 2 | 
					
						
							|  |  |  |     USEFUL = 3 | 
					
						
							|  |  |  |     FILLER = 4 | 
					
						
							|  |  |  |     TRAP = 5 | 
					
						
							|  |  |  |     JOKE = 6 | 
					
						
							|  |  |  |     EVENT = 7 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-20 02:10:48 +02:00
										 |  |  | CATEGORY_NAME_MAPPINGS: Dict[str, ItemCategory] = { | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  |     "Symbols:": ItemCategory.SYMBOL, | 
					
						
							|  |  |  |     "Doors:": ItemCategory.DOOR, | 
					
						
							|  |  |  |     "Lasers:": ItemCategory.LASER, | 
					
						
							|  |  |  |     "Useful:": ItemCategory.USEFUL, | 
					
						
							|  |  |  |     "Filler:": ItemCategory.FILLER, | 
					
						
							|  |  |  |     "Traps:": ItemCategory.TRAP, | 
					
						
							|  |  |  |     "Jokes:": ItemCategory.JOKE | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @dataclass(frozen=True) | 
					
						
							|  |  |  | class ItemDefinition: | 
					
						
							|  |  |  |     local_code: int | 
					
						
							|  |  |  |     category: ItemCategory | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @dataclass(frozen=True) | 
					
						
							|  |  |  | class ProgressiveItemDefinition(ItemDefinition): | 
					
						
							| 
									
										
										
										
											2023-07-20 02:10:48 +02:00
										 |  |  |     child_item_names: List[str] | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @dataclass(frozen=True) | 
					
						
							|  |  |  | class DoorItemDefinition(ItemDefinition): | 
					
						
							| 
									
										
										
										
											2023-07-20 02:10:48 +02:00
										 |  |  |     panel_id_hexes: List[str] | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @dataclass(frozen=True) | 
					
						
							|  |  |  | class WeightedItemDefinition(ItemDefinition): | 
					
						
							|  |  |  |     weight: int | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  | class StaticWitnessLogicObj: | 
					
						
							| 
									
										
										
										
											2023-06-28 02:23:50 +02:00
										 |  |  |     def read_logic_file(self, lines): | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  |         """
 | 
					
						
							|  |  |  |         Reads the logic file and does the initial population of data structures | 
					
						
							|  |  |  |         """
 | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |         current_region = dict() | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |         for line in lines: | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  |             if line == "" or line[0] == "#": | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 continue | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |             if line[-1] == ":": | 
					
						
							|  |  |  |                 new_region_and_connections = define_new_region(line) | 
					
						
							|  |  |  |                 current_region = new_region_and_connections[0] | 
					
						
							|  |  |  |                 region_name = current_region["name"] | 
					
						
							|  |  |  |                 self.ALL_REGIONS_BY_NAME[region_name] = current_region | 
					
						
							|  |  |  |                 self.STATIC_CONNECTIONS_BY_REGION_NAME[region_name] = new_region_and_connections[1] | 
					
						
							|  |  |  |                 continue | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |             line_split = line.split(" - ") | 
					
						
							| 
									
										
										
										
											2022-07-17 12:56:22 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |             location_id = line_split.pop(0) | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             entity_name_full = line_split.pop(0) | 
					
						
							| 
									
										
										
										
											2022-07-17 12:56:22 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             entity_hex = entity_name_full[0:7] | 
					
						
							|  |  |  |             entity_name = entity_name_full[9:-1] | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |             required_panel_lambda = line_split.pop(0) | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             full_entity_name = current_region["shortName"] + " " + entity_name | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |             if location_id == "Door" or location_id == "Laser": | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |                 self.ENTITIES_BY_HEX[entity_hex] = { | 
					
						
							|  |  |  |                     "checkName": full_entity_name, | 
					
						
							|  |  |  |                     "entity_hex": entity_hex, | 
					
						
							|  |  |  |                     "region": None, | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                     "id": None, | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |                     "entityType": location_id | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  |                 } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |                 self.ENTITIES_BY_NAME[self.ENTITIES_BY_HEX[entity_hex]["checkName"]] = self.ENTITIES_BY_HEX[entity_hex] | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |                 self.STATIC_DEPENDENT_REQUIREMENTS_BY_HEX[entity_hex] = { | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                     "panels": parse_lambda(required_panel_lambda) | 
					
						
							|  |  |  |                 } | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |                 # Lasers and Doors exist in a region, but don't have a regional *requirement* | 
					
						
							|  |  |  |                 # If a laser is activated, you don't need to physically walk up to it for it to count | 
					
						
							|  |  |  |                 # As such, logically, they behave more as if they were part of the "Entry" region | 
					
						
							|  |  |  |                 self.ALL_REGIONS_BY_NAME["Entry"]["panels"].append(entity_hex) | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 continue | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             required_item_lambda = line_split.pop(0) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             laser_names = { | 
					
						
							|  |  |  |                 "Laser", | 
					
						
							|  |  |  |                 "Laser Hedges", | 
					
						
							|  |  |  |                 "Laser Pressure Plates", | 
					
						
							|  |  |  |                 "Desert Laser Redirect" | 
					
						
							|  |  |  |             } | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             is_vault_or_video = "Vault" in entity_name or "Video" in entity_name | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             if "Discard" in entity_name: | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 location_type = "Discard" | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             elif is_vault_or_video or entity_name == "Tutorial Gate Close": | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 location_type = "Vault" | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             elif entity_name in laser_names: | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 location_type = "Laser" | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             elif "Obelisk Side" in entity_name: | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 location_type = "Obelisk Side" | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |                 full_entity_name = entity_name | 
					
						
							|  |  |  |             elif "EP" in entity_name: | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 location_type = "EP" | 
					
						
							|  |  |  |             else: | 
					
						
							|  |  |  |                 location_type = "General" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             required_items = parse_lambda(required_item_lambda) | 
					
						
							|  |  |  |             required_panels = parse_lambda(required_panel_lambda) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             required_items = frozenset(required_items) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             requirement = { | 
					
						
							|  |  |  |                 "panels": required_panels, | 
					
						
							|  |  |  |                 "items": required_items | 
					
						
							|  |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             if location_type == "Obelisk Side": | 
					
						
							|  |  |  |                 eps = set(list(required_panels)[0]) | 
					
						
							|  |  |  |                 eps -= {"Theater to Tunnels"} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |                 eps_ints = {int(h, 16) for h in eps} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |                 self.OBELISK_SIDE_ID_TO_EP_HEXES[int(entity_hex, 16)] = eps_ints | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 for ep_hex in eps: | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |                     self.EP_TO_OBELISK_SIDE[ep_hex] = entity_hex | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             self.ENTITIES_BY_HEX[entity_hex] = { | 
					
						
							|  |  |  |                 "checkName": full_entity_name, | 
					
						
							|  |  |  |                 "entity_hex": entity_hex, | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 "region": current_region, | 
					
						
							|  |  |  |                 "id": int(location_id), | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |                 "entityType": location_type | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |             } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             self.ENTITY_ID_TO_NAME[entity_hex] = full_entity_name | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             self.ENTITIES_BY_NAME[self.ENTITIES_BY_HEX[entity_hex]["checkName"]] = self.ENTITIES_BY_HEX[entity_hex] | 
					
						
							|  |  |  |             self.STATIC_DEPENDENT_REQUIREMENTS_BY_HEX[entity_hex] = requirement | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |             current_region["panels"].append(entity_hex) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     def __init__(self, lines=None): | 
					
						
							|  |  |  |         if lines is None: | 
					
						
							|  |  |  |             lines = get_sigma_normal_logic() | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  |         # All regions with a list of panels in them and the connections to other regions, before logic adjustments | 
					
						
							|  |  |  |         self.ALL_REGIONS_BY_NAME = dict() | 
					
						
							|  |  |  |         self.STATIC_CONNECTIONS_BY_REGION_NAME = dict() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |         self.ENTITIES_BY_HEX = dict() | 
					
						
							|  |  |  |         self.ENTITIES_BY_NAME = dict() | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  |         self.STATIC_DEPENDENT_REQUIREMENTS_BY_HEX = dict() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  |         self.OBELISK_SIDE_ID_TO_EP_HEXES = dict() | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         self.EP_TO_OBELISK_SIDE = dict() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-10 07:58:00 +01:00
										 |  |  |         self.ENTITY_ID_TO_NAME = dict() | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-06-28 02:23:50 +02:00
										 |  |  |         self.read_logic_file(lines) | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class StaticWitnessLogic: | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  |     # Item data parsed from WitnessItems.txt | 
					
						
							| 
									
										
										
										
											2023-07-20 02:10:48 +02:00
										 |  |  |     all_items: Dict[str, ItemDefinition] = {} | 
					
						
							|  |  |  |     _progressive_lookup: Dict[str, str] = {} | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     ALL_REGIONS_BY_NAME = dict() | 
					
						
							|  |  |  |     STATIC_CONNECTIONS_BY_REGION_NAME = dict() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  |     OBELISK_SIDE_ID_TO_EP_HEXES = dict() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |     ENTITIES_BY_HEX = dict() | 
					
						
							|  |  |  |     ENTITIES_BY_NAME = dict() | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  |     STATIC_DEPENDENT_REQUIREMENTS_BY_HEX = dict() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  |     EP_TO_OBELISK_SIDE = dict() | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-03-10 07:58:00 +01:00
										 |  |  |     ENTITY_ID_TO_NAME = dict() | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  |     @staticmethod | 
					
						
							|  |  |  |     def parse_items(): | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  |         """
 | 
					
						
							|  |  |  |         Parses currently defined items from WitnessItems.txt | 
					
						
							|  |  |  |         """
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-20 02:10:48 +02:00
										 |  |  |         lines: List[str] = get_items() | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  |         current_category: ItemCategory = ItemCategory.SYMBOL | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         for line in lines: | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  |             # Skip empty lines and comments. | 
					
						
							|  |  |  |             if line == "" or line[0] == "#": | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 continue | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |             # If this line is a category header, update our cached category. | 
					
						
							|  |  |  |             if line in CATEGORY_NAME_MAPPINGS.keys(): | 
					
						
							|  |  |  |                 current_category = CATEGORY_NAME_MAPPINGS[line] | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |                 continue | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             line_split = line.split(" - ") | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  |             item_code = int(line_split[0]) | 
					
						
							|  |  |  |             item_name = line_split[1] | 
					
						
							| 
									
										
										
										
											2023-07-20 02:10:48 +02:00
										 |  |  |             arguments: List[str] = line_split[2].split(",") if len(line_split) >= 3 else [] | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  |             if current_category in [ItemCategory.DOOR, ItemCategory.LASER]: | 
					
						
							|  |  |  |                 # Map doors to IDs. | 
					
						
							|  |  |  |                 StaticWitnessLogic.all_items[item_name] = DoorItemDefinition(item_code, current_category, | 
					
						
							|  |  |  |                                                                              arguments) | 
					
						
							|  |  |  |             elif current_category == ItemCategory.TRAP or current_category == ItemCategory.FILLER: | 
					
						
							|  |  |  |                 # Read filler weights. | 
					
						
							|  |  |  |                 weight = int(arguments[0]) if len(arguments) >= 1 else 1 | 
					
						
							|  |  |  |                 StaticWitnessLogic.all_items[item_name] = WeightedItemDefinition(item_code, current_category, weight) | 
					
						
							|  |  |  |             elif arguments: | 
					
						
							|  |  |  |                 # Progressive items. | 
					
						
							|  |  |  |                 StaticWitnessLogic.all_items[item_name] = ProgressiveItemDefinition(item_code, current_category, | 
					
						
							|  |  |  |                                                                                     arguments) | 
					
						
							|  |  |  |                 for child_item in arguments: | 
					
						
							|  |  |  |                     StaticWitnessLogic._progressive_lookup[child_item] = item_name | 
					
						
							| 
									
										
										
										
											2023-06-25 02:00:56 +02:00
										 |  |  |             else: | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  |                 StaticWitnessLogic.all_items[item_name] = ItemDefinition(item_code, current_category) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     @staticmethod | 
					
						
							|  |  |  |     def get_parent_progressive_item(item_name: str): | 
					
						
							|  |  |  |         """
 | 
					
						
							|  |  |  |         Returns the name of the item's progressive parent, if there is one, or the item's name if not. | 
					
						
							|  |  |  |         """
 | 
					
						
							|  |  |  |         return StaticWitnessLogic._progressive_lookup.get(item_name, item_name) | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     @lazy | 
					
						
							|  |  |  |     def sigma_expert(self) -> StaticWitnessLogicObj: | 
					
						
							| 
									
										
										
										
											2023-06-28 02:23:50 +02:00
										 |  |  |         return StaticWitnessLogicObj(get_sigma_expert_logic()) | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |     @lazy | 
					
						
							|  |  |  |     def sigma_normal(self) -> StaticWitnessLogicObj: | 
					
						
							| 
									
										
										
										
											2023-06-28 02:23:50 +02:00
										 |  |  |         return StaticWitnessLogicObj(get_sigma_normal_logic()) | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  |     @lazy | 
					
						
							|  |  |  |     def vanilla(self) -> StaticWitnessLogicObj: | 
					
						
							| 
									
										
										
										
											2023-06-28 02:23:50 +02:00
										 |  |  |         return StaticWitnessLogicObj(get_vanilla_logic()) | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-04-29 00:42:11 +02:00
										 |  |  |     def __init__(self): | 
					
						
							|  |  |  |         self.parse_items() | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  |         self.ALL_REGIONS_BY_NAME.update(self.sigma_normal.ALL_REGIONS_BY_NAME) | 
					
						
							|  |  |  |         self.STATIC_CONNECTIONS_BY_REGION_NAME.update(self.sigma_normal.STATIC_CONNECTIONS_BY_REGION_NAME) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-24 06:27:03 +01:00
										 |  |  |         self.ENTITIES_BY_HEX.update(self.sigma_normal.ENTITIES_BY_HEX) | 
					
						
							|  |  |  |         self.ENTITIES_BY_NAME.update(self.sigma_normal.ENTITIES_BY_NAME) | 
					
						
							| 
									
										
										
										
											2022-10-09 04:13:52 +02:00
										 |  |  |         self.STATIC_DEPENDENT_REQUIREMENTS_BY_HEX.update(self.sigma_normal.STATIC_DEPENDENT_REQUIREMENTS_BY_HEX) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-02-01 21:18:07 +01:00
										 |  |  |         self.OBELISK_SIDE_ID_TO_EP_HEXES.update(self.sigma_normal.OBELISK_SIDE_ID_TO_EP_HEXES) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |         self.EP_TO_OBELISK_SIDE.update(self.sigma_normal.EP_TO_OBELISK_SIDE) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-07-18 20:02:57 -07:00
										 |  |  |         self.ENTITY_ID_TO_NAME.update(self.sigma_normal.ENTITY_ID_TO_NAME) |