SoE: produce useful error if ROM does not exist
This commit is contained in:
parent
d623cd5ce0
commit
55bfc71269
|
@ -5,6 +5,7 @@ from Utils import get_options, output_path
|
||||||
import typing
|
import typing
|
||||||
import lzma
|
import lzma
|
||||||
import os
|
import os
|
||||||
|
import os.path
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -200,8 +201,10 @@ class SoEWorld(World):
|
||||||
line = f'{loc.type},{loc.index}:{item.type},{item.index}\n'
|
line = f'{loc.type},{loc.index}:{item.type},{item.index}\n'
|
||||||
f.write(line.encode('utf-8'))
|
f.write(line.encode('utf-8'))
|
||||||
|
|
||||||
if (pyevermizer.main(rom_file, out_file, placement_file, self.world.seed_name, self.connect_name, self.evermizer_seed,
|
if not os.path.exists(rom_file):
|
||||||
flags, money, exp)):
|
raise FileNotFoundError(rom_file)
|
||||||
|
if (pyevermizer.main(rom_file, out_file, placement_file, self.world.seed_name, self.connect_name,
|
||||||
|
self.evermizer_seed, flags, money, exp)):
|
||||||
raise RuntimeError()
|
raise RuntimeError()
|
||||||
with lzma.LZMAFile(patch_file, 'wb') as f:
|
with lzma.LZMAFile(patch_file, 'wb') as f:
|
||||||
f.write(generate_patch(rom_file, out_file,
|
f.write(generate_patch(rom_file, out_file,
|
||||||
|
|
Loading…
Reference in New Issue