File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 33from typing import Any , Literal
44
55import rlbot .flat as flat
6- from rlbot .utils .logging import DEFAULT_LOGGER as logger
76from rlbot .utils .os_detector import CURRENT_OS , OS
87
98
@@ -112,7 +111,7 @@ def load_match_config(config_path: Path | str) -> flat.MatchConfiguration:
112111 )
113112 )
114113 case "human" :
115- players .append (flat . PlayerConfiguration ( flat . Human (), team , 0 ))
114+ players .append (get_human ( team ))
116115 case t :
117116 raise ConfigParsingException (
118117 f"Invalid player type { repr (t )} for player { len (players )} ."
@@ -323,6 +322,13 @@ def load_psyonix_config(
323322 )
324323
325324
325+ def get_human (team : int ) -> flat .PlayerConfiguration :
326+ """
327+ Creates a `PlayerConfiguration` for a human player on the given team.
328+ """
329+ return flat .PlayerConfiguration (flat .Human (), team )
330+
331+
326332def load_script_config (path : Path | str ) -> flat .ScriptConfiguration :
327333 """
328334 Reads the script toml file at the provided path and creates a `ScriptConfiguration` from it.
You can’t perform that action at this time.
0 commit comments