From de3a4707084e8099e573ef7dbbf18b10f5db0d3b Mon Sep 17 00:00:00 2001 From: duncathan Date: Thu, 27 Jul 2023 15:18:29 -0600 Subject: [PATCH] fix echo gate crash --- src/open_prime_rando/echoes/small_randomizations/echo_locks.py | 3 +++ .../echoes/small_randomizations/minigyro_chamber.py | 2 ++ src/open_prime_rando/echoes/small_randomizations/rubiks.py | 3 +++ 3 files changed, 8 insertions(+) diff --git a/src/open_prime_rando/echoes/small_randomizations/echo_locks.py b/src/open_prime_rando/echoes/small_randomizations/echo_locks.py index d2443d5..dc19229 100644 --- a/src/open_prime_rando/echoes/small_randomizations/echo_locks.py +++ b/src/open_prime_rando/echoes/small_randomizations/echo_locks.py @@ -40,6 +40,7 @@ def randomize_echo_locks(editor: PatcherEditor, rng: random.Random): scan_info.string = strg_id key_scan.scannable_object_info.set_properties(scan_info) + key_scan.rebuild_dependencies() scan_id = editor.add_file(f"accessible_echo_lock_{pitch}.SCAN", key_scan) key_scans.append(scan_id) @@ -92,3 +93,5 @@ def randomize_echo_locks(editor: PatcherEditor, rng: random.Random): with gate_poi.edit_properties(PointOfInterest) as poi: poi.scan_info.scannable_info0 = scan_id + area.update_all_dependencies() + diff --git a/src/open_prime_rando/echoes/small_randomizations/minigyro_chamber.py b/src/open_prime_rando/echoes/small_randomizations/minigyro_chamber.py index 03b4606..958b0e9 100644 --- a/src/open_prime_rando/echoes/small_randomizations/minigyro_chamber.py +++ b/src/open_prime_rando/echoes/small_randomizations/minigyro_chamber.py @@ -62,3 +62,5 @@ def randomize_minigyro_chamber(editor: PatcherEditor, rng: random.Random): scan = editor.get_file(0xFBFF349D, Strg) solution_text = '\n'.join(gyro.text for gyro in solution) scan.set_string(1, f"Safety lockdown code is as follows:\n\n\n{solution_text}") + + area.update_all_dependencies() diff --git a/src/open_prime_rando/echoes/small_randomizations/rubiks.py b/src/open_prime_rando/echoes/small_randomizations/rubiks.py index b441c3f..0b81879 100644 --- a/src/open_prime_rando/echoes/small_randomizations/rubiks.py +++ b/src/open_prime_rando/echoes/small_randomizations/rubiks.py @@ -102,6 +102,9 @@ def randomize_rubiks_puzzles(editor: PatcherEditor, rng: random.Random): patch_upstairs_puzzle_transform(editor) + area.update_all_dependencies() + + def patch_upstairs_puzzle_transform(editor: PatcherEditor): """ The vanilla transform for these angles them with the glass, making the lock-on points