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
This commit is contained in:
NewSoupVi
2025-04-24 21:55:48 +02:00
committed by GitHub
parent 5bb87c6da5
commit f288e3469c

View File

@@ -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: