Implement ability to do a dry run for faster testing
@@ -32,6 +32,7 @@ class Randomizer:
self.randomized_output_folder = randomized_output_folder
self.options = options
self.seed = seed
+ self.dry_run = False
self.integer_seed = int(hashlib.md5(self.seed.encode('utf-8')).hexdigest(), 16)
self.rng = Random()
@@ -85,6 +86,7 @@ class Randomizer:
options_completed = 0
yield("Modifying game code...", options_completed)
+ if not self.dry_run:
self.apply_necessary_tweaks()
if self.options.get("swift_sail"):
@@ -111,11 +113,13 @@ class Randomizer:
options_completed += 2
yield("Saving items...", options_completed)
+ if not self.dry_run:
items.write_changed_items(self)
options_completed += 7
yield("Saving randomized ISO...", options_completed)
+ if not self.dry_run:
self.save_randomized_iso()
options_completed += 9
