mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Added function to get cp number of fuel depots
This commit is contained in:
parent
f4c54bb9e6
commit
51fa0a0891
@ -780,6 +780,22 @@ class ControlPoint(MissionTarget, ABC):
|
||||
"""Return the number of ammo depots, including dead ones"""
|
||||
return len([obj for obj in self.connected_objectives if obj.category == "ammo"])
|
||||
|
||||
@property
|
||||
def active_fuel_depots_count(self) -> int:
|
||||
"""Return the number of available fuel depots"""
|
||||
return len(
|
||||
[
|
||||
obj
|
||||
for obj in self.connected_objectives
|
||||
if obj.category == "fuel" and not obj.is_dead
|
||||
]
|
||||
)
|
||||
|
||||
@property
|
||||
def total_fuel_depots_count(self) -> int:
|
||||
"""Return the number of fuel depots, including dead ones"""
|
||||
return len([obj for obj in self.connected_objectives if obj.category == "fuel"])
|
||||
|
||||
@property
|
||||
def strike_targets(self) -> List[Union[MissionTarget, Unit]]:
|
||||
return []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user