@@ -521,17 +521,21 @@ def __str__(self):
521
521
522
522
def create_control_group_event (frame , pid , data ):
523
523
update_type = data ["control_group_update" ]
524
- if update_type == 0 :
524
+ if update_type in [0 , 4 ]:
525
+ # 0 is the normal set command.
526
+ # 4 is used when you steal and set. If required, type 4 will be followed by autogenerated
527
+ # selection and control group events that remove the units from their other groups.
525
528
return SetControlGroupEvent (frame , pid , data )
526
- elif update_type == 1 :
529
+ elif update_type in [1 , 5 ]:
530
+ # 1 is the normal add command.
531
+ # 5 is used when you steal and add. If required, type 5 will be followed by autogenerated
532
+ # selection and control group events that remove the units from their other groups.
527
533
return AddToControlGroupEvent (frame , pid , data )
528
534
elif update_type == 2 :
529
535
return GetControlGroupEvent (frame , pid , data )
530
536
elif update_type == 3 :
531
- # TODO: What could this be?!?
532
- return ControlGroupEvent (frame , pid , data )
537
+ return DeleteControlGroupEvent (frame , pid , data )
533
538
else :
534
- # No idea what this is but we're seeing update_types of 4 and 5 in 3.0
535
539
return ControlGroupEvent (frame , pid , data )
536
540
537
541
@@ -589,6 +593,15 @@ class AddToControlGroupEvent(SetControlGroupEvent):
589
593
"""
590
594
591
595
596
+ class DeleteControlGroupEvent (ControlGroupEvent ):
597
+ """
598
+ Extends :class:`ControlGroupEvent`
599
+
600
+ This event deletes the control group (all units are removed). This happens when all
601
+ units are stolen from the event group (alt, alt+shift modifiers by default).
602
+ """
603
+
604
+
592
605
class GetControlGroupEvent (ControlGroupEvent ):
593
606
"""
594
607
Extends :class:`ControlGroupEvent`
0 commit comments