From f288e3469c9fbc1a5a96fd5fdf7574fd0c58aa10 Mon Sep 17 00:00:00 2001 From: NewSoupVi <57900059+NewSoupVi@users.noreply.github.com> Date: Thu, 24 Apr 2025 21:55:48 +0200 Subject: [PATCH] Core: Add a function docstring to roll_settings to hopefully prevent the weights fiasco from being repeated (#3388) * Add an option docstring to roll_settings to hopefully prevent the weights fiasco from being repeated * Update Generate.py * Update Generate.py --- Generate.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Generate.py b/Generate.py index 82386644..5b521984 100644 --- a/Generate.py +++ b/Generate.py @@ -456,6 +456,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 it should never be modified without making a deepcopy first. + """ + from worlds import AutoWorldRegister if "linked_options" in weights: