diff options
Diffstat (limited to 'Archipelago/load.gd')
-rw-r--r-- | Archipelago/load.gd | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 09aaee2..b95e4c4 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd | |||
@@ -120,6 +120,7 @@ func _load(): | |||
120 | new_master_cdp.translation = old_master_cdp.translation | 120 | new_master_cdp.translation = old_master_cdp.translation |
121 | new_master_cdp.rotation = old_master_cdp.rotation | 121 | new_master_cdp.rotation = old_master_cdp.rotation |
122 | get_node("CountdownPanels").add_child(new_master_cdp) | 122 | get_node("CountdownPanels").add_child(new_master_cdp) |
123 | old_master_cdp.total = 5000 | ||
123 | old_master_cdp.queue_free() | 124 | old_master_cdp.queue_free() |
124 | 125 | ||
125 | # Configure AN OTHER WAY. | 126 | # Configure AN OTHER WAY. |
@@ -513,23 +514,6 @@ func _load(): | |||
513 | fearless_door.name = "Door_hider_new1" | 514 | fearless_door.name = "Door_hider_new1" |
514 | fearless_door.translation.y = 5 | 515 | fearless_door.translation.y = 5 |
515 | get_node("Doors/Naps Room Doors").add_child(fearless_door) | 516 | get_node("Doors/Naps Room Doors").add_child(fearless_door) |
516 | |||
517 | # Set up notifiers for each achievement panel, for the tracker. | ||
518 | var notifier_script = apclient.SCRIPT_notifier | ||
519 | for panel in gamedata.panels: | ||
520 | if "achievement" in panel: | ||
521 | var panel_node = panels_parent.get_node(panel["id"]) | ||
522 | var script_instance = notifier_script.new() | ||
523 | script_instance.name = "Achievement_Notifier" | ||
524 | script_instance.key = "Achievement|%s" % panel["achievement"] | ||
525 | panel_node.add_child(script_instance) | ||
526 | |||
527 | if "hunt" in panel and panel["hunt"] and not (gamedata.classification_by_location_id[panel["loc"]] & apclient._location_classification_bit): | ||
528 | var panel_node = panels_parent.get_node(panel["id"]) | ||
529 | var script_instance = notifier_script.new() | ||
530 | script_instance.name = "Hunt_Notifier" | ||
531 | script_instance.key = "Hunt|%d" % panel["loc"] | ||
532 | panel_node.add_child(script_instance) | ||
533 | 517 | ||
534 | # Make stack/double puzzles into proxies, unless panelsanity is on. | 518 | # Make stack/double puzzles into proxies, unless panelsanity is on. |
535 | if apclient._location_classification_bit != apclient.kCLASSIFICATION_LOCAL_INSANITY: | 519 | if apclient._location_classification_bit != apclient.kCLASSIFICATION_LOCAL_INSANITY: |
@@ -551,6 +535,20 @@ func _load(): | |||
551 | proxynode.exact_proxy = true | 535 | proxynode.exact_proxy = true |
552 | proxynode.request_ready() | 536 | proxynode.request_ready() |
553 | oldparent.add_child(proxynode) | 537 | oldparent.add_child(proxynode) |
538 | |||
539 | # If the world was generated on 0.5.1, apply the hotfix for the number hunt doors. | ||
540 | if apclient._panel_door_shuffle && apclient.wasGeneratedOnVersion(0, 5, 1): | ||
541 | var number_hunt_parent = get_node("Doors/Count Up Room Area Doors") | ||
542 | var extradata_051_fix = apclient.get_node("Extradata").panels_mode_051_door_fixes | ||
543 | for template_door_path in extradata_051_fix: | ||
544 | var template_door = number_hunt_parent.get_node(template_door_path) | ||
545 | var impacted_doors = extradata_051_fix[template_door_path] | ||
546 | for impacted_door_path in impacted_doors: | ||
547 | var impacted_door = number_hunt_parent.get_node(impacted_door_path) | ||
548 | var copied_door = impacted_door.duplicate() | ||
549 | copied_door.panels = template_door.panels | ||
550 | number_hunt_parent.add_child(copied_door) | ||
551 | impacted_door.queue_free() | ||
554 | 552 | ||
555 | # Attach a script to every panel so that we can do things like conditionally | 553 | # Attach a script to every panel so that we can do things like conditionally |
556 | # disable them. | 554 | # disable them. |
@@ -564,9 +562,14 @@ func _load(): | |||
564 | var script_instance = panel_script.new() | 562 | var script_instance = panel_script.new() |
565 | script_instance.name = "AP_Panel" | 563 | script_instance.name = "AP_Panel" |
566 | script_instance.data = panel | 564 | script_instance.data = panel |
565 | script_instance.solve_index = panel["solve_index"] | ||
566 | if apclient._panel_door_shuffle and gamedata.mentioned_panels.has(panel["id"]): | ||
567 | script_instance.locked = true | ||
567 | panel_node.add_child(script_instance) | 568 | panel_node.add_child(script_instance) |
568 | apclient.connect("evaluate_solvability", script_instance, "evaluate_solvability") | 569 | apclient.connect("evaluate_solvability", script_instance, "evaluate_solvability") |
569 | 570 | ||
571 | apclient._panelsBySolveIndex[panel["solve_index"]] = panel["id"] | ||
572 | |||
570 | # Hook up the goal panel. | 573 | # Hook up the goal panel. |
571 | if apclient._victory_condition == apclient.kTHE_MASTER: | 574 | if apclient._victory_condition == apclient.kTHE_MASTER: |
572 | var the_master = self.get_node("Panels/Countdown Panels/Panel_master_master") | 575 | var the_master = self.get_node("Panels/Countdown Panels/Panel_master_master") |
@@ -676,6 +679,12 @@ func _load(): | |||
676 | multiplayer_node.ghost_mode = true | 679 | multiplayer_node.ghost_mode = true |
677 | add_child(multiplayer_node) | 680 | add_child(multiplayer_node) |
678 | 681 | ||
682 | # Create the autotracker node. | ||
683 | var autotracker_script = apclient.SCRIPT_tracker | ||
684 | var autotracker = autotracker_script.new() | ||
685 | autotracker.set_name("AP_Tracker") | ||
686 | self.add_child(autotracker) | ||
687 | |||
679 | # Hook up Geronimo handler. | 688 | # Hook up Geronimo handler. |
680 | $player.connect("player_jumped", apclient, "geronimo") | 689 | $player.connect("player_jumped", apclient, "geronimo") |
681 | 690 | ||