From 8a5eef11ce0d64ceb8816e3d0892d45bac1a84bf Mon Sep 17 00:00:00 2001 From: Bonta-kun <40473493+Bonta0@users.noreply.github.com> Date: Tue, 17 Dec 2019 12:22:55 +0100 Subject: [PATCH] Individual settings: hints --- BaseClasses.py | 3 ++- EntranceRandomizer.py | 2 +- Main.py | 2 +- Rom.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/BaseClasses.py b/BaseClasses.py index 5761c9fc..4658a3a7 100644 --- a/BaseClasses.py +++ b/BaseClasses.py @@ -75,7 +75,7 @@ class World(object): self.fix_fake_world = True self.boss_shuffle = boss_shuffle self.escape_assist = {player: [] for player in range(1, players + 1)} - self.hints = hints + self.hints = hints.copy() self.crystals_needed_for_ganon = {} self.crystals_needed_for_gt = {} self.open_pyramid = {player: False for player in range(1, players + 1)} @@ -1101,6 +1101,7 @@ class Spoiler(object): outfile.write('Compass shuffle: %s\n' % {k: 'Yes' if v else 'No' for k, v in self.metadata['compassshuffle'].items()}) outfile.write('Small Key shuffle: %s\n' % {k: 'Yes' if v else 'No' for k, v in self.metadata['keyshuffle'].items()}) outfile.write('Big Key shuffle: %s\n' % {k: 'Yes' if v else 'No' for k, v in self.metadata['bigkeyshuffle'].items()}) + outfile.write('Hints: %s\n' % {k: 'Yes' if v else 'No' for k, v in self.metadata['hints'].items()}) outfile.write('Players: %d' % self.world.players) if self.entrances: outfile.write('\n\nEntrances:\n\n') diff --git a/EntranceRandomizer.py b/EntranceRandomizer.py index 883a90cf..5840be89 100755 --- a/EntranceRandomizer.py +++ b/EntranceRandomizer.py @@ -281,7 +281,7 @@ def parse_arguments(argv, no_defaults=False): for name in ['logic', 'mode', 'swords', 'goal', 'difficulty', 'item_functionality', 'shuffle', 'crystals_ganon', 'crystals_gt', 'openpyramid', 'mapshuffle', 'compassshuffle', 'keyshuffle', 'bigkeyshuffle', - 'retro', 'accessibility']: + 'retro', 'accessibility', 'hints']: value = getattr(defaults, name) if getattr(playerargs, name) is None else getattr(playerargs, name) if player == 1: setattr(ret, name, {1: value}) diff --git a/Main.py b/Main.py index 8157c39c..6808577e 100644 --- a/Main.py +++ b/Main.py @@ -193,7 +193,7 @@ def main(args, seed=None): world.shuffle[player], world.algorithm, mcsb_name, "-retro" if world.retro[player] else "", "-prog_" + world.progressive if world.progressive in ['off', 'random'] else "", - "-nohints" if not world.hints else "")) if not args.outputname else '' + "-nohints" if not world.hints[player] else "")) if not args.outputname else '' rom.write_to_file(output_path(f'{outfilebase}{outfilesuffix}.sfc')) with open(output_path('%s_multidata' % outfilebase), 'wb') as f: diff --git a/Rom.py b/Rom.py index d49be486..99362f96 100644 --- a/Rom.py +++ b/Rom.py @@ -1364,7 +1364,7 @@ def write_strings(rom, world, player): return hint # For hints, first we write hints about entrances, some from the inconvenient list others from all reasonable entrances. - if world.hints: + if world.hints[player]: tt['sign_north_of_links_house'] = '> Randomizer The telepathic tiles can have hints!' hint_locations = HintLocations.copy() random.shuffle(hint_locations)