Added Flute Spots to spoiler log

This commit is contained in:
codemann8
2022-02-03 06:35:54 -06:00
parent 22243c8dfa
commit 7d391da21d
2 changed files with 30 additions and 0 deletions

View File

@@ -3053,6 +3053,18 @@ class Spoiler(object):
if self.overworlds: if self.overworlds:
outfile.write('\n\nOverworld:\n\n') outfile.write('\n\nOverworld:\n\n')
# flute shuffle
for player in range(1, self.world.players + 1):
if ('flute', player) in self.maps:
outfile.write('Flute Spots:\n')
break
for player in range(1, self.world.players + 1):
if ('flute', player) in self.maps:
if self.world.players > 1:
outfile.write(str('(Player ' + str(player) + ')\n')) # player name
outfile.write(self.maps[('flute', player)]['text'] + '\n\n')
# overworld tile swaps # overworld tile swaps
for player in range(1, self.world.players + 1): for player in range(1, self.world.players + 1):
if ('swaps', player) in self.maps: if ('swaps', player) in self.maps:

View File

@@ -420,6 +420,24 @@ def link_overworld(world, player):
world.owflutespots[player] = new_spots world.owflutespots[player] = new_spots
connect_flutes(new_spots) connect_flutes(new_spots)
# update spoiler
s = list(map(lambda x: ' ' if x not in new_spots else 'F', [i for i in range(0x40)]))
text_output = tile_swap_spoiler_table.replace('s', '%s') % ( s[0x02], s[0x07],
s[0x00], s[0x03], s[0x05],
s[0x00], s[0x02],s[0x03], s[0x05], s[0x07], s[0x0a], s[0x0f],
s[0x0a], s[0x0f],
s[0x10],s[0x11],s[0x12],s[0x13],s[0x14],s[0x15],s[0x16],s[0x17], s[0x10],s[0x11],s[0x12],s[0x13],s[0x14],s[0x15],s[0x16],s[0x17],
s[0x18], s[0x1a],s[0x1b], s[0x1d],s[0x1e],
s[0x22], s[0x25], s[0x1a], s[0x1d],
s[0x28],s[0x29],s[0x2a],s[0x2b],s[0x2c],s[0x2d],s[0x2e],s[0x2f], s[0x18], s[0x1b], s[0x1e],
s[0x30], s[0x32],s[0x33],s[0x34],s[0x35], s[0x37], s[0x22], s[0x25],
s[0x3a],s[0x3b],s[0x3c], s[0x3f],
s[0x28],s[0x29],s[0x2a],s[0x2b],s[0x2c],s[0x2d],s[0x2e],s[0x2f],
s[0x32],s[0x33],s[0x34], s[0x37],
s[0x30], s[0x35],
s[0x3a],s[0x3b],s[0x3c], s[0x3f])
world.spoiler.set_map('flute', text_output, new_spots, player)
def connect_custom(world, connected_edges, player): def connect_custom(world, connected_edges, player):
if hasattr(world, 'custom_overworld') and world.custom_overworld[player]: if hasattr(world, 'custom_overworld') and world.custom_overworld[player]:
for edgename1, edgename2 in world.custom_overworld[player]: for edgename1, edgename2 in world.custom_overworld[player]: