From e78e22477ccf53ee1481a74e4b84dbf88c28ccf0 Mon Sep 17 00:00:00 2001 From: CaitSith2 Date: Tue, 24 Nov 2020 10:40:05 -0800 Subject: [PATCH] Fix possible TypeError --- Rom.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Rom.py b/Rom.py index 9c148e91..d2d74e6e 100644 --- a/Rom.py +++ b/Rom.py @@ -2061,9 +2061,10 @@ def write_strings(rom, world, player, team): greenpendant = world.find_items('Green Pendant', player)[0] tt['sahasrahla_bring_courage'] = 'I lost my family heirloom in %s' % greenpendant.hint_text - tt['sign_ganons_tower'] = ('You need a crystal to enter.' if world.crystals_needed_for_gt[ - player] == 1 else 'You need %d crystals to enter.') % \ - world.crystals_needed_for_gt[player] + if world.crystals_needed_for_gt[player] == 1: + tt['sign_ganons_tower'] = 'You need a crystal to enter.' + else: + tt['sign_ganons_tower'] = f'You need {world.crystals_needed_for_gt[player]} crystals to enter.' if world.goal[player] == 'dungeons': tt['sign_ganon'] = 'You need to complete all the dungeons.'