Merge branch 'main' into breaking_changes

# Conflicts:
#	MultiClient.py
#	WebUI.py
This commit is contained in:
Fabian Dill
2021-01-21 05:36:16 +01:00
11 changed files with 220 additions and 116 deletions

View File

@@ -560,7 +560,7 @@ def roll_settings(weights, plando_options: typing.Set[str] = frozenset(("bosses"
ret.plando_items = []
if "items" in plando_options:
default_placement = PlandoItem(item="", location="")
def add_plando_item(item: str, location: str):
if item not in item_table:
raise Exception(f"Could not plando item {item} as the item was not recognized")
@@ -571,9 +571,9 @@ def roll_settings(weights, plando_options: typing.Set[str] = frozenset(("bosses"
options = weights.get("plando_items", [])
for placement in options:
if roll_percentage(get_choice("percentage", placement, 100)):
from_pool = get_choice("from_pool", placement, default_placement.from_pool)
location_world = get_choice("world", placement, default_placement.world)
force = get_choice("force", placement, default_placement.force)
from_pool = get_choice("from_pool", placement, PlandoItem._field_defaults["from_pool"])
location_world = get_choice("world", placement, PlandoItem._field_defaults["world"])
force = str(get_choice("force", placement, PlandoItem._field_defaults["force"])).lower()
if "items" in placement and "locations" in placement:
items = placement["items"]
locations = placement["locations"]