From 1e99625f3b2150bbeaef5c3854e12c35b723f666 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Fri, 24 May 2024 00:03:25 +0200 Subject: [PATCH] Add an option docstring to roll_settings to hopefully prevent the weights fiasco from being repeated --- Generate.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Generate.py b/Generate.py index 30b992317d..db455c049f 100644 --- a/Generate.py +++ b/Generate.py @@ -443,6 +443,14 @@ def handle_option(ret: argparse.Namespace, game_weights: dict, option_key: str, def roll_settings(weights: dict, plando_options: PlandoOptions = PlandoOptions.bosses): + """ + Roll options from specified weights, usually originating from a .yaml options file. + + Important note: + The same weights dict is shared between all slots using the same yaml (e.g. generic weights file for filler slots). + This means that it should never be modified without making a copy first. + """ + if "linked_options" in weights: weights = roll_linked_options(weights)