mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +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 the number of ammo depots, including dead ones"""
|
||||||
return len([obj for obj in self.connected_objectives if obj.category == "ammo"])
|
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
|
@property
|
||||||
def strike_targets(self) -> List[Union[MissionTarget, Unit]]:
|
def strike_targets(self) -> List[Union[MissionTarget, Unit]]:
|
||||||
return []
|
return []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user