From 636ed7e795ab76cc331831c5f7f070d71b08a7da Mon Sep 17 00:00:00 2001 From: thatguy11325 <148832074+thatguy11325@users.noreply.github.com> Date: Fri, 13 Sep 2024 01:56:09 -0400 Subject: [PATCH] Revert map id scaling for hidden objs and signs --- pokemonred_puffer/environment.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pokemonred_puffer/environment.py b/pokemonred_puffer/environment.py index 0931f06..f4117d0 100644 --- a/pokemonred_puffer/environment.py +++ b/pokemonred_puffer/environment.py @@ -1244,19 +1244,22 @@ def insert_guard_drinks(self): def sign_hook(self, *args, **kwargs): sign_id = self.read_m("hSpriteIndexOrTextID") map_id = self.read_m("wCurMap") - self.seen_signs[(map_id, sign_id)] = 1.0 if self.scale_map_id(map_id) else 0.0 + # self.seen_signs[(map_id, sign_id)] = 1.0 if self.scale_map_id(map_id) else 0.0 + self.seen_signs[(map_id, sign_id)] = 1.0 def hidden_object_hook(self, *args, **kwargs): hidden_object_id = self.pyboy.memory[self.pyboy.symbol_lookup("wHiddenObjectIndex")[1]] map_id = self.pyboy.memory[self.pyboy.symbol_lookup("wCurMap")[1]] - self.seen_hidden_objs[(map_id, hidden_object_id)] = ( - 1.0 if self.scale_map_id(map_id) else 0.0 - ) + # self.seen_hidden_objs[(map_id, hidden_object_id)] = ( + # 1.0 if self.scale_map_id(map_id) else 0.0 + # ) + self.seen_hidden_objs[(map_id, hidden_object_id)] = 1.0 def sprite_hook(self, *args, **kwargs): sprite_id = self.pyboy.memory[self.pyboy.symbol_lookup("hSpriteIndexOrTextID")[1]] map_id = self.pyboy.memory[self.pyboy.symbol_lookup("wCurMap")[1]] - self.seen_npcs[(map_id, sprite_id)] = 1.0 if self.scale_map_id(map_id) else 0.0 + # self.seen_npcs[(map_id, sprite_id)] = 1.0 if self.scale_map_id(map_id) else 0.0 + self.seen_npcs[(map_id, sprite_id)] = 1.0 def start_menu_hook(self, *args, **kwargs): if self.read_m("wIsInBattle") == 0: