LttP: Format non-native Location hints better

This commit is contained in:
Fabian Dill 2021-08-28 23:18:45 +02:00
parent 60840da740
commit a975c8fd00
2 changed files with 6 additions and 3 deletions

View File

@ -966,7 +966,10 @@ class Location():
@property
def hint_text(self):
return getattr(self, "_hint_text", self.name.replace("_", " ").replace("-", " "))
hint_text = getattr(self, "_hint_text", None)
if hint_text:
return hint_text
return "at " + self.name.replace("_", " ").replace("-", " ")
class Item():

View File

@ -2087,9 +2087,9 @@ def write_strings(rom, world, player):
if not dest:
return "nothing"
if ped_hint:
hint = dest.pedestal_hint_text if dest.pedestal_hint_text else "unknown item"
hint = dest.pedestal_hint_text
else:
hint = dest.hint_text if dest.hint_text else "something"
hint = dest.hint_text
if dest.player != player:
if ped_hint:
hint += f" for {world.player_name[dest.player]}!"