@@ -34,7 +34,7 @@ class SocketDataType(IntEnum):
3434 STOP_COMMAND = 12
3535 SET_LOADOUT = 13
3636 INIT_COMPLETE = 14
37- TEAM_CONTROLLABLES = 15
37+ CONTROLLABLE_TEAM_INFO = 15
3838
3939
4040MAX_SIZE_2_BYTES = 2 ** 16 - 1
@@ -71,16 +71,18 @@ class SocketRelay:
7171 match_settings_handlers : list [Callable [[flat .MatchSettings ], None ]] = []
7272 match_communication_handlers : list [Callable [[flat .MatchComm ], None ]] = []
7373 ball_prediction_handlers : list [Callable [[flat .BallPrediction ], None ]] = []
74- team_controllables_handlers : list [Callable [[flat .TeamControllables ], None ]] = []
74+ controllable_team_info_handlers : list [
75+ Callable [[flat .ControllableTeamInfo ], None ]
76+ ] = []
7577 raw_handlers : list [Callable [[SocketMessage ], None ]] = []
7678
7779 def __init__ (
7880 self ,
79- group_id : str ,
81+ agent_id : str ,
8082 connection_timeout : float = 120 ,
8183 logger : Optional [logging .Logger ] = None ,
8284 ):
83- self .group_id = group_id
85+ self .agent_id = agent_id
8486 self .connection_timeout = connection_timeout
8587 self .logger = get_logger ("interface" ) if logger is None else logger
8688
@@ -197,7 +199,7 @@ def connect(
197199 handler ()
198200
199201 flatbuffer = flat .ConnectionSettings (
200- self .group_id ,
202+ self .agent_id ,
201203 wants_ball_predictions ,
202204 wants_match_communications ,
203205 close_after_match ,
@@ -292,12 +294,12 @@ def handle_incoming_message(self, incoming_message: SocketMessage):
292294 ball_prediction = flat .BallPrediction .unpack (incoming_message .data )
293295 for handler in self .ball_prediction_handlers :
294296 handler (ball_prediction )
295- case SocketDataType .TEAM_CONTROLLABLES :
296- if len (self .team_controllables_handlers ) > 0 :
297- player_mappings = flat .TeamControllables .unpack (
297+ case SocketDataType .CONTROLLABLE_TEAM_INFO :
298+ if len (self .controllable_team_info_handlers ) > 0 :
299+ player_mappings = flat .ControllableTeamInfo .unpack (
298300 incoming_message .data
299301 )
300- for handler in self .team_controllables_handlers :
302+ for handler in self .controllable_team_info_handlers :
301303 handler (player_mappings )
302304
303305 def disconnect (self ):
0 commit comments