diff --git a/Utils.py b/Utils.py index 85fb8638..8ff1834a 100644 --- a/Utils.py +++ b/Utils.py @@ -369,6 +369,7 @@ class RestrictedUnpickler(pickle.Unpickler): super(RestrictedUnpickler, self).__init__(*args, **kwargs) self.options_module = importlib.import_module("Options") self.net_utils_module = importlib.import_module("NetUtils") + self.generic_properties_module = importlib.import_module("worlds.generic") def find_class(self, module, name): if module == "builtins" and name in safe_builtins: @@ -376,7 +377,9 @@ class RestrictedUnpickler(pickle.Unpickler): # used by MultiServer -> savegame/multidata if module == "NetUtils" and name in {"NetworkItem", "ClientStatus", "Hint"}: return getattr(self.net_utils_module, name) - # Options are unpickled by WebHost -> Generate + # Options and Plando are unpickled by WebHost -> Generate + if module == "worlds.generic" and name in {"PlandoItem", "PlandoConnection"}: + return getattr(self.generic_properties_module, name) if module.endswith("Options"): if module == "Options": mod = self.options_module diff --git a/WebHostLib/check.py b/WebHostLib/check.py index f391938f..e3657659 100644 --- a/WebHostLib/check.py +++ b/WebHostLib/check.py @@ -73,7 +73,8 @@ def roll_options(options: Dict[str, Union[dict, str]]) -> Tuple[Dict[str, Union[ results[filename] = f"Failed to parse YAML data in {filename}: {e}" else: try: - rolled_results[filename] = roll_settings(yaml_data, plando_options={"bosses"}) + rolled_results[filename] = roll_settings(yaml_data, + plando_options={"bosses", "items", "connections", "texts"}) except Exception as e: results[filename] = f"Failed to generate mystery in {filename}: {e}" else: