From 84f4fc2db8b7ada36faa5341cb7bee17750f1a07 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 8 Dec 2024 16:14:53 -0500 Subject: Add workaround for 0.5.1 number hunt logic bug --- Archipelago/load.gd | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Archipelago/load.gd') diff --git a/Archipelago/load.gd b/Archipelago/load.gd index 4811b47..e593548 100644 --- a/Archipelago/load.gd +++ b/Archipelago/load.gd @@ -551,6 +551,20 @@ func _load(): proxynode.exact_proxy = true proxynode.request_ready() oldparent.add_child(proxynode) + + # If the world was generated on 0.5.1, apply the hotfix for the number hunt doors. + if apclient.wasGeneratedOnVersion(0, 5, 1): + var number_hunt_parent = get_node("Doors/Count Up Room Area Doors") + var extradata_051_fix = apclient.get_node("Extradata").panels_mode_051_door_fixes + for template_door_path in extradata_051_fix: + var template_door = number_hunt_parent.get_node(template_door_path) + var impacted_doors = extradata_051_fix[template_door_path] + for impacted_door_path in impacted_doors: + var impacted_door = number_hunt_parent.get_node(impacted_door_path) + var copied_door = impacted_door.duplicate() + copied_door.panels = template_door.panels + number_hunt_parent.add_child(copied_door) + impacted_door.queue_free() # Attach a script to every panel so that we can do things like conditionally # disable them. -- cgit 1.4.1