From 1ef052291cc2734a07e5dbb18696d9a82913db26 Mon Sep 17 00:00:00 2001 From: alwaysintreble Date: Mon, 30 Sep 2024 18:12:14 -0500 Subject: [PATCH] add race mode to multidata and datastore --- Main.py | 1 + MultiServer.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Main.py b/Main.py index 5a0f5c98bcc4..4008ca5e9017 100644 --- a/Main.py +++ b/Main.py @@ -338,6 +338,7 @@ def precollect_hint(location): "seed_name": multiworld.seed_name, "spheres": spheres, "datapackage": data_package, + "race_mode": int(multiworld.is_race), } AutoWorld.call_all(multiworld, "modify_multidata", multidata) diff --git a/MultiServer.py b/MultiServer.py index e0b137fd68ce..91f4eec61574 100644 --- a/MultiServer.py +++ b/MultiServer.py @@ -427,6 +427,8 @@ def _load(self, decoded_obj: dict, game_data_packages: typing.Dict[str, typing.A use_embedded_server_options: bool): self.read_data = {} + # there might be a better place to put this. + self.stored_data["race_mode"] = decoded_obj.get("race_mode", 0) mdata_ver = decoded_obj["minimum_versions"]["server"] if mdata_ver > version_tuple: raise RuntimeError(f"Supplied Multidata (.archipelago) requires a server of at least version {mdata_ver},"