Including OW Tile Flips in Printed Customizer File
This commit is contained in:
2
Main.py
2
Main.py
@@ -227,6 +227,8 @@ def main(args, seed=None, fish=None):
|
||||
update_world_regions(world, player)
|
||||
mark_light_dark_world_regions(world, player)
|
||||
create_dynamic_exits(world, player)
|
||||
if args.print_custom_yaml:
|
||||
world.settings.record_overworld(world)
|
||||
|
||||
init_districts(world)
|
||||
|
||||
|
||||
@@ -639,17 +639,17 @@ def shuffle_tiles(world, groups, result_list, do_grouped, player):
|
||||
if world.customizer:
|
||||
if not do_grouped:
|
||||
custom_flips = world.customizer.get_owtileflips()
|
||||
if custom_flips:
|
||||
if custom_flips and player in custom_flips:
|
||||
custom_flips = custom_flips[player]
|
||||
nonflipped_groups = list()
|
||||
forced_flips = list()
|
||||
forced_nonflips = list()
|
||||
player_key = player
|
||||
if 'undefined_chance' in custom_flips[player_key]:
|
||||
undefined_chance = custom_flips[player_key]['undefined_chance']
|
||||
if 'force_flip' in custom_flips[player_key]:
|
||||
forced_flips = custom_flips[player_key]['force_flip']
|
||||
if 'force_no_flip' in custom_flips[player_key]:
|
||||
forced_nonflips = custom_flips[player_key]['force_no_flip']
|
||||
if 'undefined_chance' in custom_flips:
|
||||
undefined_chance = custom_flips['undefined_chance']
|
||||
if 'force_flip' in custom_flips:
|
||||
forced_flips = custom_flips['force_flip']
|
||||
if 'force_no_flip' in custom_flips:
|
||||
forced_nonflips = custom_flips['force_no_flip']
|
||||
|
||||
for group in groups:
|
||||
if any(owid in group[0] for owid in forced_nonflips):
|
||||
|
||||
@@ -232,6 +232,14 @@ class CustomSettings(object):
|
||||
self.world_rep['settings'] = settings_dict
|
||||
for p in self.player_range:
|
||||
settings_dict[p] = {}
|
||||
settings_dict[p]['ow_shuffle'] = world.owShuffle[p]
|
||||
settings_dict[p]['ow_terrain'] = world.owTerrain[p]
|
||||
settings_dict[p]['ow_crossed'] = world.owCrossed[p]
|
||||
settings_dict[p]['ow_keepsimilar'] = world.owKeepSimilar[p]
|
||||
settings_dict[p]['ow_mixed'] = world.owMixed[p]
|
||||
settings_dict[p]['ow_whirlpool'] = world.owWhirlpoolShuffle[p]
|
||||
settings_dict[p]['ow_fluteshuffle'] = world.owFluteShuffle[p]
|
||||
settings_dict[p]['bonk_drops'] = world.shuffle_bonk_drops[p]
|
||||
settings_dict[p]['shuffle'] = world.shuffle[p]
|
||||
settings_dict[p]['door_shuffle'] = world.doorShuffle[p]
|
||||
settings_dict[p]['intensity'] = world.intensity[p]
|
||||
@@ -329,6 +337,15 @@ class CustomSettings(object):
|
||||
else:
|
||||
placements[location.player][location.name] = location.item.name
|
||||
|
||||
def record_overworld(self, world):
|
||||
self.world_rep['ow-tileflips'] = flips = {}
|
||||
for p in self.player_range:
|
||||
if p in world.owswaps and len(world.owswaps[p][0]) > 0:
|
||||
flips[p] = {}
|
||||
flips[p]['force_flip'] = list(f for f in world.owswaps[p][0] if f < 0x40 or f >= 0x80)
|
||||
flips[p]['force_flip'].sort()
|
||||
flips[p]['undefined_chance'] = 0
|
||||
|
||||
def record_entrances(self, world):
|
||||
self.world_rep['entrances'] = entrances = {}
|
||||
world.custom_entrances = {}
|
||||
|
||||
Reference in New Issue
Block a user