diff --git a/CommonClient.py b/CommonClient.py index 1aedd518b4f8..8325227d5e5c 100644 --- a/CommonClient.py +++ b/CommonClient.py @@ -325,6 +325,7 @@ def __init__(self, server_address: typing.Optional[str] = None, password: typing "collect": "disabled", "remaining": "disabled", } + self.race_mode: int = 0 # own state self.finished_game = False @@ -454,6 +455,7 @@ async def send_connect(self, **kwargs: typing.Any) -> None: if kwargs: payload.update(kwargs) await self.send_msgs([payload]) + await self.send_msgs([{"cmd": "Get", "keys": ["race_mode"]}]) async def console_input(self) -> str: if self.ui: diff --git a/kvui.py b/kvui.py index 536dce12208e..d58af3ed0e78 100644 --- a/kvui.py +++ b/kvui.py @@ -243,6 +243,8 @@ def get_text(self): f"\nYou currently have {ctx.hint_points} points." elif ctx.hint_cost == 0: text += "\n!hint is free to use." + if ctx.stored_data and "race_mode" in ctx.stored_data: + text += "\nRace mode is enabled." if ctx.stored_data["race_mode"] else "\nRace mode is disabled." else: text += f"\nYou are not authenticated yet."