Skip to content

Commit 9076069

Browse files
committed
Settings: Interpret "compress_rom" setting when initializing settings.
If "compress_rom" is in the source dictionary when initializing Settings, it will set "create_patch_file", "create_compressed_rom", and "create_uncompressed_rom" based off of its value. This allows CLI users to continue using the old setting to get a singular output.
1 parent 58477a7 commit 9076069

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

Settings.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,12 @@ def resolve_random_settings(self, cosmetic, randomize_key=None):
297297

298298
# add the settings as fields, and calculate information based on them
299299
def __init__(self, settings_dict, strict=False):
300+
if settings_dict.get('compress_rom', None):
301+
# Old compress_rom setting is set, so set the individual output settings using it.
302+
settings_dict['create_patch_file'] = settings_dict['compress_rom'] == 'Patch' or settings_dict.get('create_patch_file', False)
303+
settings_dict['create_compressed_rom'] = settings_dict['compress_rom'] == 'True' or settings_dict.get('create_compressed_rom', False)
304+
settings_dict['create_uncompressed_rom'] = settings_dict['compress_rom'] == 'False' or settings_dict.get('create_uncompressed_rom', False)
305+
del settings_dict['compress_rom']
300306
if strict:
301307
validate_settings(settings_dict)
302308
self.__dict__.update(settings_dict)

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '6.2.42 f.LUM'
1+
__version__ = '6.2.43 f.LUM'

0 commit comments

Comments
 (0)