Skip to content

Commit

Permalink
Don't change warp text on glitched logic
Browse files Browse the repository at this point in the history
  • Loading branch information
cjohnson57 committed Aug 18, 2022
1 parent d2d7f97 commit a68427e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions Messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -1015,16 +1015,17 @@ def update_warp_song_text(messages, world):
0x0892: 'Prelude of Light Warp -> Temple of Time',
}

for id, entr in msg_list.items():
if 'warp_songs' in world.settings.misc_hints or not world.settings.warp_songs:
destination = world.get_entrance(entr).connected_region
destination_name = HintArea.at(destination)
color = COLOR_MAP[destination_name.color]
if destination_name.preposition(True) is not None:
destination_name = f'to {destination_name}'
else:
destination_name = 'to a mysterious place'
color = COLOR_MAP['White']
if world.settings.logic_rules != "glitched": # Entrances not set on glitched logic so following code will error
for id, entr in msg_list.items():
if 'warp_songs' in world.settings.misc_hints or not world.settings.warp_songs:
destination = world.get_entrance(entr).connected_region
destination_name = HintArea.at(destination)
color = COLOR_MAP[destination_name.color]
if destination_name.preposition(True) is not None:
destination_name = f'to {destination_name}'
else:
destination_name = 'to a mysterious place'
color = COLOR_MAP['White']

new_msg = f"\x08\x05{color}Warp {destination_name}?\x05\40\x09\x01\x01\x1b\x05\x42OK\x01No\x05\40"
update_message_by_id(messages, id, new_msg)
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '6.2.178 f.LUM'
__version__ = '6.2.179 f.LUM'

0 comments on commit a68427e

Please sign in to comment.