@@ -280,33 +280,33 @@ def actions(self) -> list[ActionRawUnitCommand | ActionRawToggleAutocast | Actio
280280 # Actions that have a point as target
281281 actions .append (
282282 ActionRawUnitCommand (
283- game_loop ,
284- raw_unit_command . ability_id ,
285- list (raw_unit_command .unit_tags ),
286- raw_unit_command .queue_command ,
287- Point2 .from_proto (raw_unit_command .target_world_space_pos ),
283+ ability_id = raw_unit_command . ability_id ,
284+ game_loop = game_loop ,
285+ unit_tags = list (raw_unit_command .unit_tags ),
286+ queue_command = raw_unit_command .queue_command ,
287+ target_world_space_pos = Point2 .from_proto (raw_unit_command .target_world_space_pos ),
288288 )
289289 )
290290 else :
291291 # Actions that have a unit as target
292292 actions .append (
293293 ActionRawUnitCommand (
294- game_loop ,
295- raw_unit_command . ability_id ,
296- list (raw_unit_command .unit_tags ),
297- raw_unit_command .queue_command ,
298- None ,
299- raw_unit_command .target_unit_tag ,
294+ ability_id = raw_unit_command . ability_id ,
295+ game_loop = game_loop ,
296+ unit_tags = list (raw_unit_command .unit_tags ),
297+ queue_command = raw_unit_command .queue_command ,
298+ target_world_space_pos = None ,
299+ target_unit_tag = raw_unit_command .target_unit_tag ,
300300 )
301301 )
302302 elif action_raw .HasField ("toggle_autocast" ):
303303 # Toggle autocast actions
304304 raw_toggle_autocast_action = action_raw .toggle_autocast
305305 actions .append (
306306 ActionRawToggleAutocast (
307- game_loop ,
308- raw_toggle_autocast_action . ability_id ,
309- list (raw_toggle_autocast_action .unit_tags ),
307+ ability_id = raw_toggle_autocast_action . ability_id ,
308+ game_loop = game_loop ,
309+ unit_tags = list (raw_toggle_autocast_action .unit_tags ),
310310 )
311311 )
312312 else :
@@ -340,6 +340,6 @@ def action_errors(self) -> list[ActionError]:
340340 """
341341 previous_frame_errors = self .previous_observation .action_errors if self .previous_observation else []
342342 return [
343- ActionError (error .ability_id , error .unit_tag , error .result )
343+ ActionError (ability_id = error .ability_id , unit_tag = error .unit_tag , result = error .result )
344344 for error in chain (self .response_observation .action_errors , previous_frame_errors )
345345 ]
0 commit comments