From f6afeebe9428d459be1a47e880f2216bc9e62435 Mon Sep 17 00:00:00 2001 From: Virx Date: Wed, 29 Jan 2025 15:08:07 -0500 Subject: [PATCH] `commands` is now `list[str]` instead of `list[flat.ConsoleCommand]` --- rlbot/managers/bot.py | 2 +- rlbot/managers/hivemind.py | 2 +- rlbot/managers/match.py | 2 +- rlbot/managers/script.py | 2 +- rlbot/utils/__init__.py | 11 +++++++---- rlbot/version.py | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/rlbot/managers/bot.py b/rlbot/managers/bot.py index 2f57c29..c4f70bd 100644 --- a/rlbot/managers/bot.py +++ b/rlbot/managers/bot.py @@ -250,7 +250,7 @@ def set_game_state( balls: dict[int, flat.DesiredBallState] = {}, cars: dict[int, flat.DesiredCarState] = {}, match_info: Optional[flat.DesiredMatchInfo] = None, - commands: list[flat.ConsoleCommand] = [], + commands: list[str] = [], ): """ Sets the game to the desired state. diff --git a/rlbot/managers/hivemind.py b/rlbot/managers/hivemind.py index 0cfbbd7..044b14e 100644 --- a/rlbot/managers/hivemind.py +++ b/rlbot/managers/hivemind.py @@ -264,7 +264,7 @@ def set_game_state( balls: dict[int, flat.DesiredBallState] = {}, cars: dict[int, flat.DesiredCarState] = {}, match_info: Optional[flat.DesiredMatchInfo] = None, - commands: list[flat.ConsoleCommand] = [], + commands: list[str] = [], ): """ Sets the game to the desired state. diff --git a/rlbot/managers/match.py b/rlbot/managers/match.py index df119bb..dc42360 100644 --- a/rlbot/managers/match.py +++ b/rlbot/managers/match.py @@ -265,7 +265,7 @@ def set_game_state( balls: dict[int, flat.DesiredBallState] = {}, cars: dict[int, flat.DesiredCarState] = {}, match_info: Optional[flat.DesiredMatchInfo] = None, - commands: list[flat.ConsoleCommand] = [], + commands: list[str] = [], ): """ Sets the game to the desired state. diff --git a/rlbot/managers/script.py b/rlbot/managers/script.py index b1d8578..8e92739 100644 --- a/rlbot/managers/script.py +++ b/rlbot/managers/script.py @@ -217,7 +217,7 @@ def set_game_state( balls: dict[int, flat.DesiredBallState] = {}, cars: dict[int, flat.DesiredCarState] = {}, match_info: Optional[flat.DesiredMatchInfo] = None, - commands: list[flat.ConsoleCommand] = [], + commands: list[str] = [], ): """ Sets the game to the desired state. diff --git a/rlbot/utils/__init__.py b/rlbot/utils/__init__.py index 318fa17..c478c2e 100644 --- a/rlbot/utils/__init__.py +++ b/rlbot/utils/__init__.py @@ -7,14 +7,17 @@ def fill_desired_game_state( balls: dict[int, flat.DesiredBallState] = {}, cars: dict[int, flat.DesiredCarState] = {}, match_info: Optional[flat.DesiredMatchInfo] = None, - commands: list[flat.ConsoleCommand] = [], + commands: list[str] = [], ) -> flat.DesiredGameState: """ - # Converts the dictionaries to a DesiredGameState by - # filling in the blanks with empty states that do nothing. + Converts the dictionaries to a DesiredGameState by + filling in the blanks with empty states that do nothing. """ - game_state = flat.DesiredGameState(match_info=match_info, console_commands=commands) + game_state = flat.DesiredGameState( + match_info=match_info, + console_commands=[flat.ConsoleCommand(cmd) for cmd in commands], + ) if balls: max_entry = max(balls.keys()) diff --git a/rlbot/version.py b/rlbot/version.py index 857c0e5..8fb3c76 100644 --- a/rlbot/version.py +++ b/rlbot/version.py @@ -1 +1 @@ -__version__ = "2.0.0-beta.22" +__version__ = "2.0.0-beta.23"