From 00a6ac3a52188238133aae336bec4b3a0876b254 Mon Sep 17 00:00:00 2001 From: Bryce Wilson Date: Sat, 8 Mar 2025 07:14:25 -0800 Subject: [PATCH] BizHawkClient: Store seed name sent by the server for clients to check (#4702) --- worlds/_bizhawk/context.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/worlds/_bizhawk/context.py b/worlds/_bizhawk/context.py index accb5f94..21c54d30 100644 --- a/worlds/_bizhawk/context.py +++ b/worlds/_bizhawk/context.py @@ -41,6 +41,7 @@ class BizHawkClientCommandProcessor(ClientCommandProcessor): class BizHawkClientContext(CommonContext): command_processor = BizHawkClientCommandProcessor + server_seed_name: str | None = None auth_status: AuthStatus password_requested: bool client_handler: BizHawkClient | None @@ -68,6 +69,8 @@ class BizHawkClientContext(CommonContext): if cmd == "Connected": self.slot_data = args.get("slot_data", None) self.auth_status = AuthStatus.AUTHENTICATED + elif cmd == "RoomInfo": + self.server_seed_name = args.get("seed_name", None) if self.client_handler is not None: self.client_handler.on_package(self, cmd, args) @@ -100,6 +103,7 @@ class BizHawkClientContext(CommonContext): async def disconnect(self, allow_autoreconnect: bool=False): self.auth_status = AuthStatus.NOT_AUTHENTICATED + self.server_seed_name = None await super().disconnect(allow_autoreconnect)