mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
TextPointerLabelParam sometimes doesn't point to anything useful
This commit is contained in:
parent
81e950c2d1
commit
90cee9191e
@ -1517,6 +1517,7 @@ class RawTextPointerLabelParam(PointerLabelParam):
|
||||
class TextPointerLabelParam(PointerLabelParam):
|
||||
"""this is a pointer to a text script"""
|
||||
bank = False
|
||||
text = None
|
||||
def parse(self):
|
||||
PointerLabelParam.parse(self)
|
||||
address = calculate_pointer_from_bytes_at(self.address, bank=self.bank)
|
||||
@ -1524,8 +1525,11 @@ class TextPointerLabelParam(PointerLabelParam):
|
||||
self.text = parse_text_engine_script_at(address, map_group=self.map_group, map_id=self.map_id, force=self.force, debug=self.debug)
|
||||
|
||||
def get_dependencies(self, recompute=False, global_dependencies=set()):
|
||||
global_dependencies.add(self.text)
|
||||
return [self.text]
|
||||
if self.text:
|
||||
global_dependencies.add(self.text)
|
||||
return [self.text]
|
||||
else:
|
||||
return []
|
||||
|
||||
class MovementPointerLabelParam(PointerLabelParam):
|
||||
pass
|
||||
|
Loading…
Reference in New Issue
Block a user