Fix for Non-ER Inverted Experimental (Aga and GT weren't logically swapped)

Fix for customizer setting crystals to 0 for either GT/Ganon
This commit is contained in:
aerinon
2023-04-14 15:23:38 -06:00
parent ea8bd117fc
commit d5e69b28f2
4 changed files with 9 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ import os
import urllib.request
import urllib.parse
import yaml
from typing import Any
from yaml.representer import Representer
from collections import defaultdict
from pathlib import Path
@@ -46,8 +47,8 @@ class CustomSettings(object):
return meta['players']
def adjust_args(self, args):
def get_setting(value, default):
if value:
def get_setting(value: Any, default):
if value or value == 0:
if isinstance(value, dict):
return random.choices(list(value.keys()), list(value.values()), k=1)[0]
else:

View File

@@ -56,6 +56,8 @@ def link_entrances_new(world, player):
one_way_map.update(drop_map)
one_way_map.update(single_entrance_map)
if avail_pool.inverted:
default_map['Ganons Tower'] = 'Agahnims Tower Exit'
default_map['Agahnims Tower'] = 'Ganons Tower Exit'
default_map['Old Man Cave (West)'] = 'Bumper Cave Exit (Bottom)'
default_map['Death Mountain Return Cave (West)'] = 'Bumper Cave Exit (Top)'
default_map['Bumper Cave (Bottom)'] = 'Old Man Cave Exit (West)'
@@ -64,8 +66,6 @@ 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