From a975c8fd0054b2432b5e7559cea11bb258c91db2 Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Sat, 28 Aug 2021 23:18:45 +0200 Subject: [PATCH] LttP: Format non-native Location hints better --- BaseClasses.py | 5 ++++- worlds/alttp/Rom.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 8439e905..adffc359 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -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(): diff --git a/worlds/alttp/Rom.py b/worlds/alttp/Rom.py index be22447d..5f02b00c 100644 --- a/worlds/alttp/Rom.py +++ b/worlds/alttp/Rom.py @@ -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]}!"