Skip to content

Commit

Permalink
Fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinCathcart committed Aug 24, 2019
1 parent e29f39c commit df6bf6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions BaseClasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,20 +1044,20 @@ def to_json(self):
def to_file(self, filename):
self.parse_data()
with open(filename, 'w') as outfile:
outfile.write('ALttP Entrance Randomizer Version %s - Seed: %s\n\n' % (self.metadata['version'], self.metadata['seed']))
outfile.write('ALttP Entrance Randomizer Version %s - Seed: %s\n\n' % (self.metadata['version'], self.world.seed))
outfile.write('Logic: %s\n' % self.metadata['logic'])
outfile.write('Mode: %s\n' % self.metadata['mode'])
outfile.write('Goal: %s\n' % self.metadata['goal'])
outfile.write('Difficulty: %s\n' % self.metadata['difficulty'])
outfile.write('Item Functionality: %s\n' % self.metadata['difficulty_mode'])
outfile.write('Difficulty: %s\n' % self.metadata['item_pool'])
outfile.write('Item Functionality: %s\n' % self.metadata['item_functionality'])
outfile.write('Entrance Shuffle: %s\n' % self.metadata['shuffle'])
outfile.write('Filling Algorithm: %s\n' % self.metadata['algorithm'])
outfile.write('Filling Algorithm: %s\n' % self.world.algorithm)
outfile.write('Accessibility: %s\n' % self.metadata['accessibility'])
outfile.write('Maps and Compasses in Dungeons: %s\n' % ('Yes' if self.metadata['dungeonitems'] else 'No'))
outfile.write('L\\R Quickswap enabled: %s\n' % ('Yes' if self.metadata['quickswap'] else 'No'))
outfile.write('Menu speed: %s\n' % self.metadata['fastmenu'])
outfile.write('Maps and Compasses in Dungeons: %s\n' % ('Yes' if self.world.place_dungeon_items else 'No'))
outfile.write('L\\R Quickswap enabled: %s\n' % ('Yes' if self.world.quickswap else 'No'))
outfile.write('Menu speed: %s\n' % self.world.fastmenu)
outfile.write('Keysanity enabled: %s\n' % ('Yes' if self.metadata['keysanity'] else 'No'))
outfile.write('Players: %d' % self.metadata['players'])
outfile.write('Players: %d' % self.world.players)
if self.entrances:
outfile.write('\n\nEntrances:\n\n')
outfile.write('\n'.join(['%s%s %s %s' % ('Player {0}: '.format(entry['player']) if self.world.players >1 else '', entry['entrance'], '<=>' if entry['direction'] == 'both' else '<=' if entry['direction'] == 'exit' else '=>', entry['exit']) for entry in self.entrances.values()]))
Expand Down
2 changes: 1 addition & 1 deletion Rom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ def get_reveal_bytes(itemName):
# set rom name
# 21 bytes
from Main import __version__
rom.name = bytearray('ER_{0}_{1:09}\0'.format(__version__,world.seed), 'utf8')
rom.name = bytearray('ER_{0}_{1:09}\0'.format(__version__[0:7],world.seed), 'utf8')
assert len(rom.name) <= 21
rom.write_bytes(0x7FC0, rom.name)

Expand Down

0 comments on commit df6bf6f

Please sign in to comment.