Merged in DR v1.2.0.3

This commit is contained in:
codemann8
2023-01-06 21:37:28 -06:00
parent 285038c871
commit c98300e2ff
15 changed files with 133 additions and 21 deletions

View File

@@ -61,6 +61,7 @@ class CustomSettings(object):
args.bps = get_setting(meta['bps'], args.bps)
args.suppress_rom = get_setting(meta['suppress_rom'], args.suppress_rom)
args.names = get_setting(meta['names'], args.names)
args.race = get_setting(meta['race'], args.race)
self.player_range = range(1, args.multi + 1)
if 'settings' in self.file_source:
for p in self.player_range:
@@ -156,6 +157,7 @@ class CustomSettings(object):
args.ow_palettes[p] = get_setting(settings['ow_palettes'], args.ow_palettes[p])
args.uw_palettes[p] = get_setting(settings['uw_palettes'], args.uw_palettes[p])
args.shuffle_sfx[p] = get_setting(settings['shuffle_sfx'], args.shuffle_sfx[p])
args.msu_resume[p] = get_setting(settings['msu_resume'], args.msu_resume[p])
def get_item_pool(self):
if 'item_pool' in self.file_source:
@@ -202,13 +204,14 @@ class CustomSettings(object):
return self.file_source['drops']
return None
def create_from_world(self, world):
def create_from_world(self, world, race):
self.player_range = range(1, world.players + 1)
settings_dict, meta_dict = {}, {}
self.world_rep['meta'] = meta_dict
meta_dict['players'] = world.players
meta_dict['algorithm'] = world.algorithm
meta_dict['seed'] = world.seed
meta_dict['race'] = race
self.world_rep['settings'] = settings_dict
for p in self.player_range:
settings_dict[p] = {}

View File

@@ -141,6 +141,7 @@ SETTINGSTOPROCESS = {
"print_custom_yaml": "print_custom_yaml",
"usestartinventory": "usestartinventory",
"usecustompool": "custom",
"race": "race",
"saveonexit": "saveonexit"
}
},