From 0df9f5cc57f4819e6d8e5b7a0719c55ca66c33e2 Mon Sep 17 00:00:00 2001 From: morgan Date: Sat, 1 Nov 2025 11:42:44 -0600 Subject: [PATCH] Fix small references replace "bin" with "binary_bit_pos" in RAMHandler.py --- worlds/grinch/Client.py | 13 +++++++------ worlds/grinch/RamHandler.py | 4 ++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/worlds/grinch/Client.py b/worlds/grinch/Client.py index 51b4dc13..c37f9947 100644 --- a/worlds/grinch/Client.py +++ b/worlds/grinch/Client.py @@ -210,6 +210,7 @@ class GrinchClient(BizHawkClient): for addr_to_update in grinch_loc_ram_data.update_ram_addr: is_binary = True if not addr_to_update.binary_bit_pos is None else False + orig_index: int = addr_list_to_read.index( (addr_to_update.ram_address, addr_to_update.byte_size, "MainRAM") ) @@ -308,24 +309,24 @@ class GrinchClient(BizHawkClient): async def goal_checker(self, ctx: "BizHawkClientContext"): if not ctx.finished_game: goal_loc = grinch_locations["MC - Sleigh Ride - Neutralizing Santa"] - goal_ram_address = goal_loc.update_ram_addr[0] + goal_ram_data = goal_loc.update_ram_addr[0] current_ram_address_value = int.from_bytes( ( await bizhawk.read( ctx.bizhawk_ctx, [ ( - goal_ram_address.ram_address, - goal_ram_address.byte_size, - goal_ram_address.ram_area, + goal_ram_data.ram_address, + goal_ram_data.byte_size, + goal_ram_data.ram_area, ) ], ) )[0], - goal_ram_address.endian, + goal_ram_data.endian, ) - if (current_ram_address_value & (1 << goal_ram_address.binary_bit_pos)) > 0: + if (current_ram_address_value & (1 << goal_ram_data.binary_bit_pos)) > 0: # if current_ram_address_value == goal_ram_address.value: ctx.finished_game = True await ctx.send_msgs( diff --git a/worlds/grinch/RamHandler.py b/worlds/grinch/RamHandler.py index 74ae0fbe..e4d99a3e 100644 --- a/worlds/grinch/RamHandler.py +++ b/worlds/grinch/RamHandler.py @@ -6,7 +6,7 @@ class UpdateMethod(IntEnum, boundary=STRICT): SET = 1 ADD = 2 SUBTRACT = 3 - FREEZE = 4 + FREEZE = 4 # Currently Non-functional class GrinchRamData: @@ -51,7 +51,7 @@ class GrinchRamData: self.value = 1 if binary_bit_pos > -1: - self.binary_bit_pos = bin + self.binary_bit_pos = binary_bit_pos if byte_size > 0: self.byte_size = byte_size