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: