From bb324d6c529af3419eb3d0b6af2ea14726a34871 Mon Sep 17 00:00:00 2001 From: Henrique Gemignani Passos Lima Date: Sun, 23 Jun 2024 17:45:03 +0300 Subject: [PATCH] Use Spine.from_bytes --- .../echoes/dock_lock_rando/dock_type.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/open_prime_rando/echoes/dock_lock_rando/dock_type.py b/src/open_prime_rando/echoes/dock_lock_rando/dock_type.py index c5e5823..732c783 100644 --- a/src/open_prime_rando/echoes/dock_lock_rando/dock_type.py +++ b/src/open_prime_rando/echoes/dock_lock_rando/dock_type.py @@ -144,6 +144,7 @@ def patch_door(self, editor: PatcherEditor, world_name: str, area_name: str, doc with door.edit_properties(Door) as door_props: door_props.vulnerability = self.vulnerability + @dataclasses.dataclass class BlastShieldActors: door: ScriptInstance @@ -173,9 +174,9 @@ def find_attached_instance( raise TypeError(f"No {name} connected to {source}") def get_spline(self) -> Spline: - return Spline( - data=b'\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x02' - b'\x02A \x00\x00?\x80\x00\x00\x02\x02\x01\x00\x00\x00\x00?\x80\x00\x00' + return Spline.from_bytes( + b'\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x02' + b'\x02A \x00\x00?\x80\x00\x00\x02\x02\x01\x00\x00\x00\x00?\x80\x00\x00' ) def create_trigger(self, @@ -186,7 +187,7 @@ def create_trigger(self, active: bool = True, seeker_lock_on: bool = True, orbitable: bool = False, - ): + ): pos = Vector( door_xfm.position.x, door_xfm.position.y, @@ -460,7 +461,6 @@ def patch_door(self, editor: PatcherEditor, world_name: str, area_name: str, doc door.vulnerability = resist_all_vuln door_xfm = door.editor_properties.transform - with actors.lock.edit_properties(Actor) as lock: lock.vulnerability = resist_all_vuln @@ -547,7 +547,6 @@ def patch_door(self, editor: PatcherEditor, world_name: str, area_name: str, doc actors.relay.add_connection(State.Active, Message.Deactivate, hud_hint) - if not low_memory: beacon_loop = default.add_instance_with(Sound( editor_properties=EditorProperties(