Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion sc2/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,11 @@ def detect_range(self) -> float:
def is_detector(self) -> bool:
"""Checks if the unit is a detector. Has to be completed
in order to detect and Photoncannons also need to be powered."""
return self.is_ready and (self.type_id in IS_DETECTOR or self.type_id == UNIT_PHOTONCANNON and self.is_powered)
return (
self.is_ready
and (self.type_id in IS_DETECTOR or self.type_id == UNIT_PHOTONCANNON and self.is_powered)
or self.type_id == UnitTypeId.OBSERVER
)

@property
def radar_range(self) -> float:
Expand Down
Loading