diff options
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/__init__.py | 0 | ||||
| -rw-r--r-- | utils/pickle_static_data.py | 475 |
2 files changed, 475 insertions, 0 deletions
| diff --git a/utils/__init__.py b/utils/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/utils/__init__.py | |||
| diff --git a/utils/pickle_static_data.py b/utils/pickle_static_data.py new file mode 100644 index 0000000..c7a2711 --- /dev/null +++ b/utils/pickle_static_data.py | |||
| @@ -0,0 +1,475 @@ | |||
| 1 | from typing import Dict, List, Set | ||
| 2 | |||
| 3 | import os | ||
| 4 | import sys | ||
| 5 | |||
| 6 | sys.path.append(os.path.join("worlds", "lingo")) | ||
| 7 | sys.path.append(".") | ||
| 8 | sys.path.append("..") | ||
| 9 | from datatypes import Door, Painting, Panel, Progression, Room, RoomAndDoor, RoomAndPanel, RoomEntrance | ||
| 10 | |||
| 11 | import hashlib | ||
| 12 | import pickle | ||
| 13 | import sys | ||
| 14 | import Utils | ||
| 15 | |||
| 16 | |||
| 17 | ALL_ROOMS: List[Room] = [] | ||
| 18 | DOORS_BY_ROOM: Dict[str, Dict[str, Door]] = {} | ||
| 19 | PANELS_BY_ROOM: Dict[str, Dict[str, Panel]] = {} | ||
| 20 | PAINTINGS: Dict[str, Painting] = {} | ||
| 21 | |||
| 22 | PROGRESSIVE_ITEMS: List[str] = [] | ||
| 23 | PROGRESSION_BY_ROOM: Dict[str, Dict[str, Progression]] = {} | ||
| 24 | |||
| 25 | PAINTING_ENTRANCES: int = 0 | ||
| 26 | PAINTING_EXIT_ROOMS: Set[str] = set() | ||
| 27 | PAINTING_EXITS: int = 0 | ||
| 28 | REQUIRED_PAINTING_ROOMS: List[str] = [] | ||
| 29 | REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS: List[str] = [] | ||
| 30 | |||
| 31 | SPECIAL_ITEM_IDS: Dict[str, int] = {} | ||
| 32 | PANEL_LOCATION_IDS: Dict[str, Dict[str, int]] = {} | ||
| 33 | DOOR_LOCATION_IDS: Dict[str, Dict[str, int]] = {} | ||
| 34 | DOOR_ITEM_IDS: Dict[str, Dict[str, int]] = {} | ||
| 35 | DOOR_GROUP_ITEM_IDS: Dict[str, int] = {} | ||
| 36 | PROGRESSIVE_ITEM_IDS: Dict[str, int] = {} | ||
| 37 | |||
| 38 | |||
| 39 | def hash_file(path): | ||
| 40 | md5 = hashlib.md5() | ||
| 41 | |||
| 42 | with open(path, 'rb') as f: | ||
| 43 | content = f.read() | ||
| 44 | content = content.replace(b'\r\n', b'\n') | ||
| 45 | md5.update(content) | ||
| 46 | |||
| 47 | return md5.hexdigest() | ||
| 48 | |||
| 49 | |||
| 50 | def load_static_data(ll1_path, ids_path): | ||
| 51 | global PAINTING_EXITS, SPECIAL_ITEM_IDS, PANEL_LOCATION_IDS, DOOR_LOCATION_IDS, DOOR_ITEM_IDS, \ | ||
| 52 | DOOR_GROUP_ITEM_IDS, PROGRESSIVE_ITEM_IDS | ||
| 53 | |||
| 54 | # Load in all item and location IDs. These are broken up into groups based on the type of item/location. | ||
| 55 | with open(ids_path, "r") as file: | ||
| 56 | config = Utils.parse_yaml(file) | ||
| 57 | |||
| 58 | if "special_items" in config: | ||
| 59 | for item_name, item_id in config["special_items"].items(): | ||
| 60 | SPECIAL_ITEM_IDS[item_name] = item_id | ||
| 61 | |||
| 62 | if "panels" in config: | ||
| 63 | for room_name in config["panels"].keys(): | ||
| 64 | PANEL_LOCATION_IDS[room_name] = {} | ||
| 65 | |||
| 66 | for panel_name, location_id in config["panels"][room_name].items(): | ||
| 67 | PANEL_LOCATION_IDS[room_name][panel_name] = location_id | ||
| 68 | |||
| 69 | if "doors" in config: | ||
| 70 | for room_name in config["doors"].keys(): | ||
| 71 | DOOR_LOCATION_IDS[room_name] = {} | ||
| 72 | DOOR_ITEM_IDS[room_name] = {} | ||
| 73 | |||
| 74 | for door_name, door_data in config["doors"][room_name].items(): | ||
| 75 | if "location" in door_data: | ||
| 76 | DOOR_LOCATION_IDS[room_name][door_name] = door_data["location"] | ||
| 77 | |||
| 78 | if "item" in door_data: | ||
| 79 | DOOR_ITEM_IDS[room_name][door_name] = door_data["item"] | ||
| 80 | |||
| 81 | if "door_groups" in config: | ||
| 82 | for item_name, item_id in config["door_groups"].items(): | ||
| 83 | DOOR_GROUP_ITEM_IDS[item_name] = item_id | ||
| 84 | |||
| 85 | if "progression" in config: | ||
| 86 | for item_name, item_id in config["progression"].items(): | ||
| 87 | PROGRESSIVE_ITEM_IDS[item_name] = item_id | ||
| 88 | |||
| 89 | # Process the main world file. | ||
| 90 | with open(ll1_path, "r") as file: | ||
| 91 | config = Utils.parse_yaml(file) | ||
| 92 | |||
| 93 | for room_name, room_data in config.items(): | ||
| 94 | process_room(room_name, room_data) | ||
| 95 | |||
| 96 | PAINTING_EXITS = len(PAINTING_EXIT_ROOMS) | ||
| 97 | |||
| 98 | |||
| 99 | def process_entrance(source_room, doors, room_obj): | ||
| 100 | global PAINTING_ENTRANCES, PAINTING_EXIT_ROOMS | ||
| 101 | |||
| 102 | # If the value of an entrance is just True, that means that the entrance is always accessible. | ||
| 103 | if doors is True: | ||
| 104 | room_obj.entrances.append(RoomEntrance(source_room, None, False)) | ||
| 105 | elif isinstance(doors, dict): | ||
| 106 | # If the value of an entrance is a dictionary, that means the entrance requires a door to be accessible, is a | ||
| 107 | # painting-based entrance, or both. | ||
| 108 | if "painting" in doors and "door" not in doors: | ||
| 109 | PAINTING_EXIT_ROOMS.add(room_obj.name) | ||
| 110 | PAINTING_ENTRANCES += 1 | ||
| 111 | |||
| 112 | room_obj.entrances.append(RoomEntrance(source_room, None, True)) | ||
| 113 | else: | ||
| 114 | if "painting" in doors and doors["painting"]: | ||
| 115 | PAINTING_EXIT_ROOMS.add(room_obj.name) | ||
| 116 | PAINTING_ENTRANCES += 1 | ||
| 117 | |||
| 118 | room_obj.entrances.append(RoomEntrance(source_room, RoomAndDoor( | ||
| 119 | doors["room"] if "room" in doors else None, | ||
| 120 | doors["door"] | ||
| 121 | ), doors["painting"] if "painting" in doors else False)) | ||
| 122 | else: | ||
| 123 | # If the value of an entrance is a list, then there are multiple possible doors that can give access to the | ||
| 124 | # entrance. | ||
| 125 | for door in doors: | ||
| 126 | if "painting" in door and door["painting"]: | ||
| 127 | PAINTING_EXIT_ROOMS.add(room_obj.name) | ||
| 128 | PAINTING_ENTRANCES += 1 | ||
| 129 | |||
| 130 | room_obj.entrances.append(RoomEntrance(source_room, RoomAndDoor( | ||
| 131 | door["room"] if "room" in door else None, | ||
| 132 | door["door"] | ||
| 133 | ), door["painting"] if "painting" in door else False)) | ||
| 134 | |||
| 135 | |||
| 136 | def process_panel(room_name, panel_name, panel_data): | ||
| 137 | global PANELS_BY_ROOM | ||
| 138 | |||
| 139 | full_name = f"{room_name} - {panel_name}" | ||
| 140 | |||
| 141 | # required_room can either be a single room or a list of rooms. | ||
| 142 | if "required_room" in panel_data: | ||
| 143 | if isinstance(panel_data["required_room"], list): | ||
| 144 | required_rooms = panel_data["required_room"] | ||
| 145 | else: | ||
| 146 | required_rooms = [panel_data["required_room"]] | ||
| 147 | else: | ||
| 148 | required_rooms = [] | ||
| 149 | |||
| 150 | # required_door can either be a single door or a list of doors. For convenience, the room key for each door does not | ||
| 151 | # need to be specified if the door is in this room. | ||
| 152 | required_doors = list() | ||
| 153 | if "required_door" in panel_data: | ||
| 154 | if isinstance(panel_data["required_door"], dict): | ||
| 155 | door = panel_data["required_door"] | ||
| 156 | required_doors.append(RoomAndDoor( | ||
| 157 | door["room"] if "room" in door else None, | ||
| 158 | door["door"] | ||
| 159 | )) | ||
| 160 | else: | ||
| 161 | for door in panel_data["required_door"]: | ||
| 162 | required_doors.append(RoomAndDoor( | ||
| 163 | door["room"] if "room" in door else None, | ||
| 164 | door["door"] | ||
| 165 | )) | ||
| 166 | |||
| 167 | # required_panel can either be a single panel or a list of panels. For convenience, the room key for each panel does | ||
| 168 | # not need to be specified if the panel is in this room. | ||
| 169 | required_panels = list() | ||
| 170 | if "required_panel" in panel_data: | ||
| 171 | if isinstance(panel_data["required_panel"], dict): | ||
| 172 | other_panel = panel_data["required_panel"] | ||
| 173 | required_panels.append(RoomAndPanel( | ||
| 174 | other_panel["room"] if "room" in other_panel else None, | ||
| 175 | other_panel["panel"] | ||
| 176 | )) | ||
| 177 | else: | ||
| 178 | for other_panel in panel_data["required_panel"]: | ||
| 179 | required_panels.append(RoomAndPanel( | ||
| 180 | other_panel["room"] if "room" in other_panel else None, | ||
| 181 | other_panel["panel"] | ||
| 182 | )) | ||
| 183 | |||
| 184 | # colors can either be a single color or a list of colors. | ||
| 185 | if "colors" in panel_data: | ||
| 186 | if isinstance(panel_data["colors"], list): | ||
| 187 | colors = panel_data["colors"] | ||
| 188 | else: | ||
| 189 | colors = [panel_data["colors"]] | ||
| 190 | else: | ||
| 191 | colors = [] | ||
| 192 | |||
| 193 | if "check" in panel_data: | ||
| 194 | check = panel_data["check"] | ||
| 195 | else: | ||
| 196 | check = False | ||
| 197 | |||
| 198 | if "event" in panel_data: | ||
| 199 | event = panel_data["event"] | ||
| 200 | else: | ||
| 201 | event = False | ||
| 202 | |||
| 203 | if "achievement" in panel_data: | ||
| 204 | achievement = True | ||
| 205 | else: | ||
| 206 | achievement = False | ||
| 207 | |||
| 208 | if "exclude_reduce" in panel_data: | ||
| 209 | exclude_reduce = panel_data["exclude_reduce"] | ||
| 210 | else: | ||
| 211 | exclude_reduce = False | ||
| 212 | |||
| 213 | if "non_counting" in panel_data: | ||
| 214 | non_counting = panel_data["non_counting"] | ||
| 215 | else: | ||
| 216 | non_counting = False | ||
| 217 | |||
| 218 | panel_obj = Panel(required_rooms, required_doors, required_panels, colors, check, event, exclude_reduce, | ||
| 219 | achievement, non_counting) | ||
| 220 | PANELS_BY_ROOM[room_name][panel_name] = panel_obj | ||
| 221 | |||
| 222 | |||
| 223 | def process_door(room_name, door_name, door_data): | ||
| 224 | global DOORS_BY_ROOM | ||
| 225 | |||
| 226 | # The item name associated with a door can be explicitly specified in the configuration. If it is not, it is | ||
| 227 | # generated from the room and door name. | ||
| 228 | if "item_name" in door_data: | ||
| 229 | item_name = door_data["item_name"] | ||
| 230 | else: | ||
| 231 | item_name = f"{room_name} - {door_name}" | ||
| 232 | |||
| 233 | if "skip_location" in door_data: | ||
| 234 | skip_location = door_data["skip_location"] | ||
| 235 | else: | ||
| 236 | skip_location = False | ||
| 237 | |||
| 238 | if "skip_item" in door_data: | ||
| 239 | skip_item = door_data["skip_item"] | ||
| 240 | else: | ||
| 241 | skip_item = False | ||
| 242 | |||
| 243 | if "event" in door_data: | ||
| 244 | event = door_data["event"] | ||
| 245 | else: | ||
| 246 | event = False | ||
| 247 | |||
| 248 | if "include_reduce" in door_data: | ||
| 249 | include_reduce = door_data["include_reduce"] | ||
| 250 | else: | ||
| 251 | include_reduce = False | ||
| 252 | |||
| 253 | if "junk_item" in door_data: | ||
| 254 | junk_item = door_data["junk_item"] | ||
| 255 | else: | ||
| 256 | junk_item = False | ||
| 257 | |||
| 258 | if "group" in door_data: | ||
| 259 | group = door_data["group"] | ||
| 260 | else: | ||
| 261 | group = None | ||
| 262 | |||
| 263 | # panels is a list of panels. Each panel can either be a simple string (the name of a panel in the current room) or | ||
| 264 | # a dictionary specifying a panel in a different room. | ||
| 265 | if "panels" in door_data: | ||
| 266 | panels = list() | ||
| 267 | for panel in door_data["panels"]: | ||
| 268 | if isinstance(panel, dict): | ||
| 269 | panels.append(RoomAndPanel(panel["room"], panel["panel"])) | ||
| 270 | else: | ||
| 271 | panels.append(RoomAndPanel(None, panel)) | ||
| 272 | else: | ||
| 273 | skip_location = True | ||
| 274 | panels = None | ||
| 275 | |||
| 276 | # The location name associated with a door can be explicitly specified in the configuration. If it is not, then the | ||
| 277 | # name is generated using a combination of all of the panels that would ordinarily open the door. This can get quite | ||
| 278 | # messy if there are a lot of panels, especially if panels from multiple rooms are involved, so in these cases it | ||
| 279 | # would be better to specify a name. | ||
| 280 | if "location_name" in door_data: | ||
| 281 | location_name = door_data["location_name"] | ||
| 282 | elif skip_location is False: | ||
| 283 | panel_per_room = dict() | ||
| 284 | for panel in panels: | ||
| 285 | panel_room_name = room_name if panel.room is None else panel.room | ||
| 286 | panel_per_room.setdefault(panel_room_name, []).append(panel.panel) | ||
| 287 | |||
| 288 | room_strs = list() | ||
| 289 | for door_room_str, door_panels_str in panel_per_room.items(): | ||
| 290 | room_strs.append(door_room_str + " - " + ", ".join(door_panels_str)) | ||
| 291 | |||
| 292 | location_name = " and ".join(room_strs) | ||
| 293 | else: | ||
| 294 | location_name = None | ||
| 295 | |||
| 296 | # The id field can be a single item, or a list of door IDs, in the event that the item for this logical door should | ||
| 297 | # open more than one actual in-game door. | ||
| 298 | has_doors = "id" in door_data | ||
| 299 | |||
| 300 | # The painting_id field can be a single item, or a list of painting IDs, in the event that the item for this logical | ||
| 301 | # door should move more than one actual in-game painting. | ||
| 302 | if "painting_id" in door_data: | ||
| 303 | if isinstance(door_data["painting_id"], list): | ||
| 304 | painting_ids = door_data["painting_id"] | ||
| 305 | else: | ||
| 306 | painting_ids = [door_data["painting_id"]] | ||
| 307 | else: | ||
| 308 | painting_ids = [] | ||
| 309 | |||
| 310 | door_obj = Door(door_name, item_name, location_name, panels, skip_location, skip_item, has_doors, | ||
| 311 | painting_ids, event, group, include_reduce, junk_item) | ||
| 312 | |||
| 313 | DOORS_BY_ROOM[room_name][door_name] = door_obj | ||
| 314 | |||
| 315 | |||
| 316 | def process_painting(room_name, painting_data): | ||
| 317 | global PAINTINGS, REQUIRED_PAINTING_ROOMS, REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS | ||
| 318 | |||
| 319 | # Read in information about this painting and store it in an object. | ||
| 320 | painting_id = painting_data["id"] | ||
| 321 | |||
| 322 | if "disable" in painting_data: | ||
| 323 | disable_painting = painting_data["disable"] | ||
| 324 | else: | ||
| 325 | disable_painting = False | ||
| 326 | |||
| 327 | if "required" in painting_data: | ||
| 328 | required_painting = painting_data["required"] | ||
| 329 | if required_painting: | ||
| 330 | REQUIRED_PAINTING_ROOMS.append(room_name) | ||
| 331 | else: | ||
| 332 | required_painting = False | ||
| 333 | |||
| 334 | if "required_when_no_doors" in painting_data: | ||
| 335 | rwnd = painting_data["required_when_no_doors"] | ||
| 336 | if rwnd: | ||
| 337 | REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS.append(room_name) | ||
| 338 | else: | ||
| 339 | rwnd = False | ||
| 340 | |||
| 341 | if "exit_only" in painting_data: | ||
| 342 | exit_only = painting_data["exit_only"] | ||
| 343 | else: | ||
| 344 | exit_only = False | ||
| 345 | |||
| 346 | if "enter_only" in painting_data: | ||
| 347 | enter_only = painting_data["enter_only"] | ||
| 348 | else: | ||
| 349 | enter_only = False | ||
| 350 | |||
| 351 | if "req_blocked" in painting_data: | ||
| 352 | req_blocked = painting_data["req_blocked"] | ||
| 353 | else: | ||
| 354 | req_blocked = False | ||
| 355 | |||
| 356 | if "req_blocked_when_no_doors" in painting_data: | ||
| 357 | req_blocked_when_no_doors = painting_data["req_blocked_when_no_doors"] | ||
| 358 | else: | ||
| 359 | req_blocked_when_no_doors = False | ||
| 360 | |||
| 361 | required_door = None | ||
| 362 | if "required_door" in painting_data: | ||
| 363 | door = painting_data["required_door"] | ||
| 364 | required_door = RoomAndDoor( | ||
| 365 | door["room"] if "room" in door else room_name, | ||
| 366 | door["door"] | ||
| 367 | ) | ||
| 368 | |||
| 369 | painting_obj = Painting(painting_id, room_name, enter_only, exit_only, | ||
| 370 | required_painting, rwnd, required_door, disable_painting, req_blocked, | ||
| 371 | req_blocked_when_no_doors) | ||
| 372 | PAINTINGS[painting_id] = painting_obj | ||
| 373 | |||
| 374 | |||
| 375 | def process_progression(room_name, progression_name, progression_doors): | ||
| 376 | global PROGRESSIVE_ITEMS, PROGRESSION_BY_ROOM | ||
| 377 | |||
| 378 | # Progressive items are configured as a list of doors. | ||
| 379 | PROGRESSIVE_ITEMS.append(progression_name) | ||
| 380 | |||
| 381 | progression_index = 1 | ||
| 382 | for door in progression_doors: | ||
| 383 | if isinstance(door, Dict): | ||
| 384 | door_room = door["room"] | ||
| 385 | door_door = door["door"] | ||
| 386 | else: | ||
| 387 | door_room = room_name | ||
| 388 | door_door = door | ||
| 389 | |||
| 390 | room_progressions = PROGRESSION_BY_ROOM.setdefault(door_room, {}) | ||
| 391 | room_progressions[door_door] = Progression(progression_name, progression_index) | ||
| 392 | progression_index += 1 | ||
| 393 | |||
| 394 | |||
| 395 | def process_room(room_name, room_data): | ||
| 396 | global ALL_ROOMS | ||
| 397 | |||
| 398 | room_obj = Room(room_name, []) | ||
| 399 | |||
| 400 | if "entrances" in room_data: | ||
| 401 | for source_room, doors in room_data["entrances"].items(): | ||
| 402 | process_entrance(source_room, doors, room_obj) | ||
| 403 | |||
| 404 | if "panels" in room_data: | ||
| 405 | PANELS_BY_ROOM[room_name] = dict() | ||
| 406 | |||
| 407 | for panel_name, panel_data in room_data["panels"].items(): | ||
| 408 | process_panel(room_name, panel_name, panel_data) | ||
| 409 | |||
| 410 | if "doors" in room_data: | ||
| 411 | DOORS_BY_ROOM[room_name] = dict() | ||
| 412 | |||
| 413 | for door_name, door_data in room_data["doors"].items(): | ||
| 414 | process_door(room_name, door_name, door_data) | ||
| 415 | |||
| 416 | if "paintings" in room_data: | ||
| 417 | for painting_data in room_data["paintings"]: | ||
| 418 | process_painting(room_name, painting_data) | ||
| 419 | |||
| 420 | if "progression" in room_data: | ||
| 421 | for progression_name, progression_doors in room_data["progression"].items(): | ||
| 422 | process_progression(room_name, progression_name, progression_doors) | ||
| 423 | |||
| 424 | ALL_ROOMS.append(room_obj) | ||
| 425 | |||
| 426 | |||
| 427 | if __name__ == '__main__': | ||
| 428 | if len(sys.argv) == 1: | ||
| 429 | ll1_path = os.path.join("worlds", "lingo", "data", "LL1.yaml") | ||
| 430 | ids_path = os.path.join("worlds", "lingo", "data", "ids.yaml") | ||
| 431 | output_path = os.path.join("worlds", "lingo", "data", "generated.dat") | ||
| 432 | elif len(sys.argv) != 4: | ||
| 433 | print("") | ||
| 434 | print("Usage: python worlds/lingo/utils/pickle_static_data.py [args]") | ||
| 435 | print("Arguments:") | ||
| 436 | print(" - Path to LL1.yaml") | ||
| 437 | print(" - Path to ids.yaml") | ||
| 438 | print(" - Path to output file") | ||
| 439 | |||
| 440 | exit() | ||
| 441 | else: | ||
| 442 | ll1_path = sys.argv[1] | ||
| 443 | ids_path = sys.argv[2] | ||
| 444 | output_path = sys.argv[3] | ||
| 445 | |||
| 446 | load_static_data(ll1_path, ids_path) | ||
| 447 | |||
| 448 | hashes = { | ||
| 449 | "LL1.yaml": hash_file(ll1_path), | ||
| 450 | "ids.yaml": hash_file(ids_path), | ||
| 451 | } | ||
| 452 | |||
| 453 | pickdata = { | ||
| 454 | "HASHES": hashes, | ||
| 455 | "PAINTINGS": PAINTINGS, | ||
| 456 | "ALL_ROOMS": ALL_ROOMS, | ||
| 457 | "DOORS_BY_ROOM": DOORS_BY_ROOM, | ||
| 458 | "PANELS_BY_ROOM": PANELS_BY_ROOM, | ||
| 459 | "PROGRESSIVE_ITEMS": PROGRESSIVE_ITEMS, | ||
| 460 | "PROGRESSION_BY_ROOM": PROGRESSION_BY_ROOM, | ||
| 461 | "PAINTING_ENTRANCES": PAINTING_ENTRANCES, | ||
| 462 | "PAINTING_EXIT_ROOMS": PAINTING_EXIT_ROOMS, | ||
| 463 | "PAINTING_EXITS": PAINTING_EXITS, | ||
| 464 | "REQUIRED_PAINTING_ROOMS": REQUIRED_PAINTING_ROOMS, | ||
| 465 | "REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS": REQUIRED_PAINTING_WHEN_NO_DOORS_ROOMS, | ||
| 466 | "SPECIAL_ITEM_IDS": SPECIAL_ITEM_IDS, | ||
| 467 | "PANEL_LOCATION_IDS": PANEL_LOCATION_IDS, | ||
| 468 | "DOOR_LOCATION_IDS": DOOR_LOCATION_IDS, | ||
| 469 | "DOOR_ITEM_IDS": DOOR_ITEM_IDS, | ||
| 470 | "DOOR_GROUP_ITEM_IDS": DOOR_GROUP_ITEM_IDS, | ||
| 471 | "PROGRESSIVE_ITEM_IDS": PROGRESSIVE_ITEM_IDS, | ||
| 472 | } | ||
| 473 | |||
| 474 | with open(output_path, "wb") as file: | ||
| 475 | pickle.dump(pickdata, file) | ||
