Skip to content

Commit

Permalink
fix issue #204 w/ help of @stevealkr.
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanyiwu committed Dec 4, 2024
1 parent aa247cc commit dcb9070
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sc2/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,8 @@ def buff_duration_max(self) -> int:
def orders(self) -> List[UnitOrder]:
""" Returns the a list of the current orders. """
# TODO: add examples on how to use unit orders
return [UnitOrder.from_proto(order, self._bot_object) for order in self._proto.orders]
return [UnitOrder.from_proto(order, self._bot_object) for order in self._proto.orders
if order.ability_id in self._bot_object._game_data.abilities]

@cached_property
def order_target(self) -> Optional[Union[int, Point2]]:
Expand Down

0 comments on commit dcb9070

Please sign in to comment.