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"
}
},

View File

@@ -66,6 +66,8 @@ def link_entrances_new(world, player):
default_map['Old Man Cave (East)'] = 'Death Mountain Return Cave Exit (West)'
one_way_map['Bumper Cave (Top)'] = 'Dark Death Mountain Healer Fairy'
del default_map['Bumper Cave (Top)']
del one_way_map['Big Bomb Shop']
one_way_map['Inverted Big Bomb Shop'] = 'Inverted Big Bomb Shop'
avail_pool.default_map = default_map
avail_pool.one_way_map = one_way_map
@@ -273,7 +275,7 @@ def do_main_shuffle(entrances, exits, avail, mode_def):
# OM Cave entrance in lw/dw if cross_world off
if 'Old Man Cave Exit (West)' in rem_exits:
world_limiter = DW_Entrances if avail.inverted else LW_Entrances
om_cave_options = [x for x in rem_entrances if x in world_limiter and bonk_fairy_exception(x)]
om_cave_options = sorted([x for x in rem_entrances if x in world_limiter and bonk_fairy_exception(x)])
om_cave_choice = random.choice(om_cave_options)
if not avail.coupled:
connect_exit('Old Man Cave Exit (West)', om_cave_choice, avail)