Skip to content
Merged
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
33 changes: 22 additions & 11 deletions eve_sde/models/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,38 +208,49 @@ class Import:

@property
def is_high_sec(self) -> bool:
"""Return True when this solar system is in high sec, else False."""
"""
Return True when this solar system is in high sec, else False.
"""
return self.security_status >= 0.45

@property
def is_low_sec(self) -> bool:
"""Return True when this solar system is in low sec, else False."""
"""
Return True when this solar system is in low sec, else False.
"""
return 0.0 < self.security_status < 0.45

@property
def is_null_sec(self) -> bool:
"""Return True when this solar system is in null sec, else False."""
"""
Return True when this solar system is in null sec, else False.
"""
return (
not self.is_w_space
and not self.is_trig_space
not self.is_wh_space
and not self.is_triglavian_space
and not self.is_abyssal_deadspace
and self.security_status <= 0.0
and not self.is_w_space
)

@property
def is_w_space(self) -> bool:
"""Return True when this solar system is in wormhole space, else False."""
def is_wh_space(self) -> bool:
"""
Return True when this solar system is in wormhole space, else False.
"""
return 31_000_000 <= self.id < 32_000_000

@property
def is_trig_space(self) -> bool:
"""Return True when this solar system is in Triglavian space, else False."""
def is_triglavian_space(self) -> bool:
"""
Return True when this solar system is in Triglavian space, else False.
"""
return self.constellation.region.id == POCHVEN_REGION_ID

@property
def is_abyssal_deadspace(self) -> bool:
"""Return True when this solar system is in abyssal deadspace, else False."""
"""
Return True when this solar system is in abyssal deadspace, else False.
"""
return 32_000_000 <= self.id < 33_000_000


Expand Down
Loading