Fix rels from RELS.arc not being decompressed
@@ -19,12 +19,7 @@ class Randomizer:
shutil.copytree(self.clean_base_dir, self.randomized_base_dir)
self.stage_dir = os.path.join(self.randomized_base_dir, "files", "res", "Stage")
- arc_paths = Path(self.stage_dir).glob("**/*.arc")
- self.arc_paths = [str(arc_path) for arc_path in arc_paths]
-
self.rels_dir = os.path.join(self.randomized_base_dir, "files", "rels")
- rel_paths = Path(self.rels_dir).glob("**/*.rel")
- self.rel_paths = [str(rel_path) for rel_path in rel_paths]
# Extract all the extra rel files from RELS.arc.
print("Extracting rels...")
@@ -35,6 +30,9 @@ class Randomizer:
os.remove(rels_arc_path)
rels_arc = None
+ arc_paths = Path(self.stage_dir).glob("**/*.arc")
+ self.arc_paths = [str(arc_path) for arc_path in arc_paths]
+
# Decompress any compressed arcs.
print("Decompressing archives...")
for arc_path in self.arc_paths:
@@ -45,6 +43,9 @@ class Randomizer:
with open(arc_path, "wb") as file:
file.write(decomp_data)
+ rel_paths = Path(self.rels_dir).glob("**/*.rel")
+ self.rel_paths = [str(rel_path) for rel_path in rel_paths]
+
# Decompress any compressed rels.
print("Decompressing rels...")
for rel_path in self.rel_paths:
