Fix possible TypeError

This commit is contained in:
CaitSith2 2020-11-24 10:40:05 -08:00
parent 79aea6b3a6
commit e78e22477c
1 changed files with 4 additions and 3 deletions

7
Rom.py
View File

@ -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.'