From 87083f6dce6f74ea9264f85aa720e983a7d54194 Mon Sep 17 00:00:00 2001 From: duncathan Date: Sun, 30 Jul 2023 14:59:02 -0600 Subject: [PATCH] fix main gyro crash --- src/open_prime_rando/echoes/small_randomizations/rubiks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/open_prime_rando/echoes/small_randomizations/rubiks.py b/src/open_prime_rando/echoes/small_randomizations/rubiks.py index 0b81879..f238479 100644 --- a/src/open_prime_rando/echoes/small_randomizations/rubiks.py +++ b/src/open_prime_rando/echoes/small_randomizations/rubiks.py @@ -77,10 +77,14 @@ def randomize_rubiks_puzzles(editor: PatcherEditor, rng: random.Random): for color in COLORS.values(): txtr_id = editor.add_file(color.txtr_name, color.txtr) - cmdl = editor.get_file(color.cmdl, Cmdl) + # FIXME: we can't use get_file or else the dependencies break + cmdl = editor.get_parsed_asset(color.cmdl, type_hint=Cmdl) file_ids = cmdl.raw.material_sets[0].texture_file_ids old_txtr = file_ids.index(color.old_txtr) file_ids[old_txtr] = txtr_id + editor.replace_asset(color.cmdl, cmdl) + # FIXME: we should not need to do this manually + editor._cached_dependencies.pop(color.cmdl, None) for puzzle_name, cubes in RUBIKS_CUBES.items(): solution = [