mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Merge remote-tracking branch 'origin/develop' into plugin-skynet-iads
This commit is contained in:
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -18,12 +18,12 @@ jobs:
|
||||
|
||||
- name: Install environment
|
||||
run: |
|
||||
py -m venv ./venv
|
||||
python -m venv ./venv
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
./venv/scripts/activate
|
||||
pip install -r requirements.txt
|
||||
python -m pip install -r requirements.txt
|
||||
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
|
||||
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force
|
||||
|
||||
|
||||
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -20,12 +20,12 @@ jobs:
|
||||
|
||||
- name: Install environment
|
||||
run: |
|
||||
py -m venv ./venv
|
||||
python -m venv ./venv
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
./venv/scripts/activate
|
||||
pip install -r requirements.txt
|
||||
python -m pip install -r requirements.txt
|
||||
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
|
||||
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ from dcs.task import (
|
||||
ControlledTask,
|
||||
EPLRS,
|
||||
EngageTargets,
|
||||
EngageTargetsInZone,
|
||||
GroundAttack,
|
||||
OptROE,
|
||||
OptRTBOnBingoFuel,
|
||||
@@ -75,6 +76,8 @@ from gen.flights.flight import (
|
||||
)
|
||||
from gen.radios import MHz, Radio, RadioFrequency, RadioRegistry, get_radio
|
||||
from gen.runways import RunwayData
|
||||
from gen.conflictgen import FRONTLINE_LENGTH
|
||||
from dcs.mapping import Point
|
||||
from theater import TheaterGroundObject
|
||||
from theater.controlpoint import ControlPoint, ControlPointType
|
||||
from .conflictgen import Conflict
|
||||
@@ -1158,20 +1161,36 @@ class IngressBuilder(PydcsWaypointBuilder):
|
||||
self.set_waypoint_tot(waypoint, self.timing.ingress)
|
||||
return waypoint
|
||||
|
||||
class CasIngressBuilder(PydcsWaypointBuilder):
|
||||
|
||||
class CasIngressBuilder(IngressBuilder):
|
||||
def build(self) -> MovingPoint:
|
||||
waypoint = super().build()
|
||||
self.set_waypoint_tot(waypoint, self.timing.ingress)
|
||||
waypoint.add_task(EngageTargets(max_distance=nm_to_meter(10),
|
||||
targets=[
|
||||
Targets.All.GroundUnits.GroundVehicles,
|
||||
Targets.All.GroundUnits.AirDefence.AAA,
|
||||
Targets.All.GroundUnits.Infantry,
|
||||
])
|
||||
)
|
||||
cas_waypoint = self.flight.waypoint_with_type((FlightWaypointType.CAS,))
|
||||
if cas_waypoint is None:
|
||||
logging.error(
|
||||
"No CAS waypoint found. Falling back to search and engage")
|
||||
waypoint.add_task(EngageTargets(
|
||||
max_distance=nm_to_meter(10),
|
||||
targets=[
|
||||
Targets.All.GroundUnits.GroundVehicles,
|
||||
Targets.All.GroundUnits.AirDefence.AAA,
|
||||
Targets.All.GroundUnits.Infantry,
|
||||
])
|
||||
)
|
||||
else:
|
||||
waypoint.add_task(EngageTargetsInZone(
|
||||
position=cas_waypoint.position,
|
||||
radius=FRONTLINE_LENGTH / 2,
|
||||
targets=[
|
||||
Targets.All.GroundUnits.GroundVehicles,
|
||||
Targets.All.GroundUnits.AirDefence.AAA,
|
||||
Targets.All.GroundUnits.Infantry,
|
||||
])
|
||||
)
|
||||
waypoint.add_task(OptROE(OptROE.Values.OpenFireWeaponFree))
|
||||
return waypoint
|
||||
|
||||
|
||||
class SeadIngressBuilder(IngressBuilder):
|
||||
def build(self) -> MovingPoint:
|
||||
waypoint = super().build()
|
||||
|
||||
Reference in New Issue
Block a user