def is_returning(self) -> bool:
        """ Checks if a unit is returning from mineral field / vespene geyser to deliver resources to townhall. """
        return self.orders and self.orders[0].ability.id is AbilityId.HARVEST_RETURN
def is_returning ( self ) -> bool : return self . orders and self . orders [ 0 ] . ability . id is AbilityId . HARVEST_RETURN
Checks if a unit is returning from mineral field / vespene geyser to deliver resources to townhall.