diff --git a/src/open_prime_rando/echoes/specific_area_patches/required_fixes.py b/src/open_prime_rando/echoes/specific_area_patches/required_fixes.py index 5796c08..57367bb 100644 --- a/src/open_prime_rando/echoes/specific_area_patches/required_fixes.py +++ b/src/open_prime_rando/echoes/specific_area_patches/required_fixes.py @@ -218,6 +218,48 @@ def gfmc_compound(editor: PatcherEditor): )) timer.add_connection(State.Zero, Message.Deactivate, ship_trigger) +def dark_oasis(editor: PatcherEditor): + """ + Add a HUDMemo for the dark oasis ing cache. + """ + area = editor.get_area(AGON_WASTES_MLVL, agon_wastes.DARK_OASIS_MREA) + + pickup_xfm = area.get_instance(0x3500B5).get_properties_as(Pickup).editor_properties.transform + oasis_trigger = area.get_layer("1st Pass").add_instance_with(Trigger( + editor_properties=EditorProperties( + name="Show Dark Oasis HudMemo", + transform=Transform( + position=pickup_xfm.position, + rotation=Vector(0.0, 0.0, 45.0), + scale=Vector(50.0, 50.0, 10.0) + ) + ), + deactivate_on_enter=True + )) + strg_id, _ = editor.create_strg( + "dark_oasis_hudmemo.STRG", + ["Defeating Power Bomb Guardian is required for this item to appear."] + ) + hud_memo = area.get_layer("1st Pass").add_instance_with(HUDMemo( + editor_properties=EditorProperties( + name="Dark Oasis HudMemo", + transform=pickup_xfm + ), + display_time=6.0, + display_type=0, + string=strg_id + )) + oasis_trigger.add_connection(State.Entered, Message.SetToZero, hud_memo) + + timer = area.get_layer("1st Pass").add_instance_with(Timer( + editor_properties=EditorProperties( + name="Disable Oasis Trigger", + transform=pickup_xfm + ), + time=0.1, + auto_start=True + )) + timer.add_connection(State.Zero, Message.Deactivate, oasis_trigger) def torvus_temple(editor: PatcherEditor): """