From 2cc03d003a366d83d99f1b0acc355f175655c187 Mon Sep 17 00:00:00 2001 From: alwaysintreble Date: Mon, 5 Dec 2022 17:50:11 -0600 Subject: [PATCH] Core: fix bug that caused world option overrides to fail (#1293) * core: fix bug that caused world option overrides to fail * copy paste sliver's better code that works as intended * Fix whitespace Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> --- Generate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Generate.py b/Generate.py index ccf05484..04c081b4 100644 --- a/Generate.py +++ b/Generate.py @@ -503,7 +503,8 @@ def roll_settings(weights: dict, plando_options: PlandoSettings = PlandoSettings handle_option(ret, game_weights, option_key, option, plando_options) for option_key, option in Options.per_game_common_options.items(): # skip setting this option if already set from common_options, defaulting to root option - if not (option_key in Options.common_options and option_key not in game_weights): + if option_key not in world_type.option_definitions and \ + (option_key not in Options.common_options or option_key in game_weights): handle_option(ret, game_weights, option_key, option, plando_options) if PlandoSettings.items in plando_options: ret.plando_items = game_weights.get("plando_items", [])