mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Compare commits
92 Commits
main
...
f16i-mod-s
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fe2fc70816 | ||
|
|
07abdc1a34 | ||
|
|
c1b7911d56 | ||
|
|
a7e5c7c425 | ||
|
|
756e86d891 | ||
|
|
0e9bbfd4e3 | ||
|
|
ed4b3e1166 | ||
|
|
93328d4443 | ||
|
|
dbb9152b9a | ||
|
|
5b8caea9ff | ||
|
|
24e9936f28 | ||
|
|
3e9776dc89 | ||
|
|
07de598aec | ||
|
|
2ea74d7435 | ||
|
|
3c3b81cb1f | ||
|
|
a736bf9b09 | ||
|
|
ada297d331 | ||
|
|
223d70e15f | ||
|
|
515d28313d | ||
|
|
303ae3ac14 | ||
|
|
426cbdec89 | ||
|
|
dcc2256195 | ||
|
|
bdbfc19c7c | ||
|
|
041202d242 | ||
|
|
92199b7b95 | ||
|
|
8bc530ee81 | ||
|
|
ffb9bee5af | ||
|
|
7413df4ccc | ||
|
|
12d67c71c8 | ||
|
|
8f40a507b9 | ||
|
|
4adf1ee898 | ||
|
|
4d155f0a26 | ||
|
|
040addc1f5 | ||
|
|
42d1ef648e | ||
|
|
f681598104 | ||
|
|
5810bd6201 | ||
|
|
69c70e1598 | ||
|
|
547136adc7 | ||
|
|
ce12047fa3 | ||
|
|
5ab4c70013 | ||
|
|
7bbb07c927 | ||
|
|
db20ad3232 | ||
|
|
eccbfa7a64 | ||
|
|
6e126bd562 | ||
|
|
2ac9d6bd98 | ||
|
|
9ad92d26d4 | ||
|
|
ace3af8f50 | ||
|
|
81f459c571 | ||
|
|
a215af13f5 | ||
|
|
1bbe023e20 | ||
|
|
34d208c19e | ||
|
|
b0c53152ef | ||
|
|
35f9d6ed99 | ||
|
|
d508c1855c | ||
|
|
9e5f1d08d2 | ||
|
|
0135e40f1a | ||
|
|
33ae428506 | ||
|
|
d89ad18825 | ||
|
|
9f3f9ad808 | ||
|
|
d53bfd4542 | ||
|
|
febcbce413 | ||
|
|
b478e9c3af | ||
|
|
6c388bd557 | ||
|
|
f0a30b5cb7 | ||
|
|
daa5227f07 | ||
|
|
8920d5890a | ||
|
|
04a5497f3b | ||
|
|
139e42dbed | ||
|
|
8c905f95e3 | ||
|
|
33305cfb46 | ||
|
|
9d65c450b6 | ||
|
|
fa2fa63cd3 | ||
|
|
ad09548c69 | ||
|
|
ae7a3ffa70 | ||
|
|
bf7838e6cc | ||
|
|
849b4e7e4e | ||
|
|
ef78824b05 | ||
|
|
53f28c6ad9 | ||
|
|
c3ea0c0df0 | ||
|
|
1c35b18cd9 | ||
|
|
b4e5efe3c0 | ||
|
|
4dc619a140 | ||
|
|
9e9941ba94 | ||
|
|
b3ab2aed87 | ||
|
|
840cbf66d9 | ||
|
|
fccdd82d87 | ||
|
|
1a440f40b8 | ||
|
|
9276db05d7 | ||
|
|
716224da13 | ||
|
|
204060665f | ||
|
|
1dd1ef6933 | ||
|
|
4fe0102b7b |
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -25,6 +25,7 @@ jobs:
|
||||
- name: Set build number
|
||||
run: |
|
||||
[IO.File]::WriteAllLines($pwd.path + "\resources\buildnumber", $env:GITHUB_RUN_NUMBER)
|
||||
[IO.File]::WriteAllLines($pwd.path + "\resources\gitsha", $env:GITHUB_SHA)
|
||||
|
||||
- name: Build app
|
||||
uses: ./.github/actions/build-app
|
||||
@@ -42,11 +43,11 @@ jobs:
|
||||
- name: Send status to Discord
|
||||
uses: stegzilla/discord-notify@v2
|
||||
with:
|
||||
webhook_url: ${{ secrets.discord_webhook_betas }} # required
|
||||
webhook_url: ${{ secrets.discord_webhook_betas }}
|
||||
title: "Build #${{ github.run_number }} available!"
|
||||
message: "**Download link:\n**
|
||||
message: "**Branch:** ${{ github.ref_name }}\n**Download link:\n**
|
||||
https://github.com/dcs-retribution/dcs-retribution/actions/runs/${{ github.run_id }}"
|
||||
include_image: true
|
||||
avatar_url: https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png
|
||||
username: GitHub Build Notifier
|
||||
if: success() # or failure() or success()
|
||||
if: startsWith(github.ref_name, 'test')
|
||||
@@ -26,7 +26,6 @@ the patreon link will keep pointing to [Khopa's](https://github.com/Khopa) accou
|
||||
|
||||
Currently, Retribution supports the following new features:
|
||||
* A livery selector in the air wing configuration dialog
|
||||
* Fixed mod support (still unfixed in Liberation)
|
||||
* Support for campaigns with quad-point triggers
|
||||
* Support for the F-15D 'Baz' mod
|
||||
* Support for the Su-30 mod
|
||||
@@ -34,6 +33,7 @@ Currently, Retribution supports the following new features:
|
||||
* Variation in flight-size for BAI/ANTISHIP/DEAD/STRIKE main flight (randomize 2/3/4-ships)
|
||||
* More performance options
|
||||
* Various bug-fixes (including a fix for the zombie carrier)
|
||||
* And more... (See [changelog](https://github.com/dcs-retribution/dcs-retribution/blob/main/changelog.md))
|
||||
|
||||
## Downloads
|
||||
|
||||
|
||||
24
changelog.md
24
changelog.md
@@ -2,15 +2,27 @@
|
||||
|
||||
## Features/Improvements
|
||||
* **[Mission Generation]** Add option to configure the maximum front-line length in settings
|
||||
* **[Mission Generation]** Variable flight-size (2/3/4-ship) for BAI/ANTISHIP/DEAD/STRIKE (main) missions
|
||||
* **[Mission Generation]** Variable flight-size (2/3/4-ship) for
|
||||
BAI/ANTISHIP/DEAD/STRIKE/BARCAP/CAS/OCA/AIR-ASSAULT (main) missions
|
||||
* **[Modding]** Support for F-15D 'Baz' mod version 1.0
|
||||
* **[Modding]** Support for Su-30 mod version 2.01B
|
||||
* **[Modding]** Support for A-6A Intruder version 2.7.5.01
|
||||
* **[Modding]** Support for F-4B Phantom II mod version v2.7.10.02, patch 2022.10.02
|
||||
* **[Modding]** Support for F-100 Super Sabre mod versions v2.7.18.01 & 2.7.18.30765 and patches 30.09.22 & 09.10.22
|
||||
* **[Modding]** Support for F-105 mod version 2.7.12.23x
|
||||
* **[Modding]** Support IDF Mod Project F-16I Sufa & F-16D v2.2 mod
|
||||
* **[Modding]** Support for F-84G mod version 2.5.7.01
|
||||
* **[Modding]** Updated F-104 mod version support to 2.7.11.222.01
|
||||
* **[UI]** Add livery selector to Air Wing Configurator's squadrons.
|
||||
* **[Performance]** Added performance option: Maximum front-line unit supply per control point.
|
||||
* **[Performance]** Added performance option: Disable convoys.
|
||||
* **[Performance]** Added performance option: Front-line troops prefer roads.
|
||||
* **[Data]** Added data to support C-47 Skytrain.
|
||||
* **[Data]** Added data to support KS-19 & SON-9, including support for "AAA Site" layout.
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[Mission Generation]** Fixed issue where aircraft carriers would return after being killed.
|
||||
|
||||
# Liberation:
|
||||
# 6.0.0
|
||||
@@ -43,14 +55,24 @@ Saves from 5.x are not compatible with 6.0.
|
||||
|
||||
## Fixes
|
||||
|
||||
* **[Engine]** Fixed issue that prevented some weapon types like torpedoes from being recognized.
|
||||
* **[Flight Planning]** Fixed a miscalculation of waypoint TOTs that would require time travel.
|
||||
* **[Loadouts]** Improved the range of the F-16 CAS loadout by adding bags.
|
||||
* **[Mission Generation]** Fixed SA-13 incorrectly created as SA-8 Loading Unit which will not be spawned in the generated mission.
|
||||
* **[Mission Generation]** Fixed an issue which generated the helipads at FARPs incorrectly and placed the helicopters within each other.
|
||||
* **[Mission Generation]** Fixed an issue with SEAD missions flown by the AI when using the Skynet Plugin and anti-radiation missiles (ARM). The AI now correctly engages the SAM when it comes alive instead of diving into it.
|
||||
* **[Mission Generation]** Fixed an issue where SEAD/DEAD/BAI flights fired all missiles / bombs against a single unit in a group instead of targeting the whole group.
|
||||
* **[Mission Generation]** Fixed adding additional mission types for a squadron causing error messages when the mission type is not supported by the aircraft type by default
|
||||
* **[Mission Generation]** AAA ground units now spawn correctly at the frontline
|
||||
* **[Mission Generation]** Fixed mission scripting error caused by control points with apostrophes in their names, such as Tha'lah.
|
||||
* **[Mission Generation]** Fixed generation issue that would cause AI helicopters to get stuck after taking off from a FARP.
|
||||
* **[Modding]** Loadouts with invalid weapons (typically new DCS weapons not yet available in Liberation) will be ignored rather than causing an error.
|
||||
* **[Modding]** Campaigns that used quad zones for scenery targets will no longer load. Only circular zones were ever supported, but an implementation quirk allowed them to load in a way that would misbehave. A "No white triggerzones found" message during campaign generation is the sign of a broken campaign.
|
||||
* **[Squadrons]** Helicopter squadrons can no longer be assigned to FOBs that are not FARPs.
|
||||
* **[Squadrons]** Fixed issue in air wing configuration that would allow squadrons to be created with no home base if no base was available.
|
||||
* **[UI]** Fixed and issue where the liberation main exe was still running after application close.
|
||||
* **[UI]** Disable player slots for non-flyable aircraft.
|
||||
* **[UI]** Add vanilla theme weather and time of day icons
|
||||
|
||||
|
||||
# 5.2.0
|
||||
|
||||
731
client/package-lock.json
generated
731
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -69,7 +69,9 @@
|
||||
"electron": "^21.1.0",
|
||||
"electron-is-dev": "^2.0.0",
|
||||
"generate-license-file": "^2.0.0",
|
||||
"got": "^11.8.5",
|
||||
"license-checker": "^25.0.1",
|
||||
"nth-check": "^2.0.1",
|
||||
"react-scripts": "5.0.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"wait-on": "^6.0.1"
|
||||
|
||||
@@ -1,270 +1,15 @@
|
||||
import backend from "../../api/backend";
|
||||
import { ControlPoint as ControlPointModel } from "../../api/liberationApi";
|
||||
import {
|
||||
useClearControlPointDestinationMutation,
|
||||
useSetControlPointDestinationMutation,
|
||||
} from "../../api/liberationApi";
|
||||
import {
|
||||
Icon,
|
||||
LatLng,
|
||||
Point,
|
||||
Marker as LMarker,
|
||||
Polyline as LPolyline,
|
||||
LatLngLiteral,
|
||||
} from "leaflet";
|
||||
import { Symbol as MilSymbol } from "milsymbol";
|
||||
import {
|
||||
MutableRefObject,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import ReactDOMServer from "react-dom/server";
|
||||
import { Marker, Polyline, Tooltip } from "react-leaflet";
|
||||
|
||||
function iconForControlPoint(cp: ControlPointModel) {
|
||||
const symbol = new MilSymbol(cp.sidc, {
|
||||
size: 24,
|
||||
colorMode: "Dark",
|
||||
});
|
||||
|
||||
return new Icon({
|
||||
iconUrl: symbol.toDataURL(),
|
||||
iconAnchor: new Point(symbol.getAnchor().x, symbol.getAnchor().y),
|
||||
});
|
||||
}
|
||||
|
||||
function openInfoDialog(controlPoint: ControlPointModel) {
|
||||
backend.post(`/qt/info/control-point/${controlPoint.id}`);
|
||||
}
|
||||
|
||||
function openNewPackageDialog(controlPoint: ControlPointModel) {
|
||||
backend.post(`/qt/create-package/control-point/${controlPoint.id}`);
|
||||
}
|
||||
import { MobileControlPoint } from "./MobileControlPoint";
|
||||
import { StaticControlPoint } from "./StaticControlPoint";
|
||||
|
||||
interface ControlPointProps {
|
||||
controlPoint: ControlPointModel;
|
||||
}
|
||||
|
||||
function LocationTooltipText(props: ControlPointProps) {
|
||||
return <h3 style={{ margin: 0 }}>{props.controlPoint.name}</h3>;
|
||||
}
|
||||
|
||||
function metersToNauticalMiles(meters: number) {
|
||||
return meters * 0.000539957;
|
||||
}
|
||||
|
||||
function formatLatLng(latLng: LatLng) {
|
||||
const lat = latLng.lat.toFixed(2);
|
||||
const lng = latLng.lng.toFixed(2);
|
||||
const ns = latLng.lat >= 0 ? "N" : "S";
|
||||
const ew = latLng.lng >= 0 ? "E" : "W";
|
||||
return `${lat}°${ns} ${lng}°${ew}`;
|
||||
}
|
||||
|
||||
function destinationTooltipText(
|
||||
cp: ControlPointModel,
|
||||
destinationish: LatLngLiteral,
|
||||
inRange: boolean
|
||||
) {
|
||||
const destination = new LatLng(destinationish.lat, destinationish.lng);
|
||||
const distance = metersToNauticalMiles(
|
||||
destination.distanceTo(cp.position)
|
||||
).toFixed(1);
|
||||
if (!inRange) {
|
||||
return `Out of range (${distance}nm away)`;
|
||||
}
|
||||
const dest = formatLatLng(destination);
|
||||
return `${cp.name} moving ${distance}nm to ${dest} next turn`;
|
||||
}
|
||||
|
||||
function PrimaryMarker(props: ControlPointProps) {
|
||||
// We can't use normal state to update the marker tooltip or the line points
|
||||
// because if we set any state in the drag event it will re-render the
|
||||
// component and interrupt dragging. Instead, keep refs to the objects and
|
||||
// mutate them directly.
|
||||
//
|
||||
// For the same reason, the path is owned by this component, because updating
|
||||
// sibling state would be messy. Lifting the state into the parent would still
|
||||
// cause this component to redraw.
|
||||
const marker: MutableRefObject<LMarker | undefined> = useRef();
|
||||
const pathLine: MutableRefObject<LPolyline | undefined> = useRef();
|
||||
|
||||
const [hasDestination, setHasDestination] = useState<boolean>(
|
||||
props.controlPoint.destination != null
|
||||
);
|
||||
const [pathDestination, setPathDestination] = useState<LatLngLiteral>(
|
||||
props.controlPoint.destination
|
||||
? props.controlPoint.destination
|
||||
: props.controlPoint.position
|
||||
);
|
||||
const [position, setPosition] = useState<LatLngLiteral>(
|
||||
props.controlPoint.destination
|
||||
? props.controlPoint.destination
|
||||
: props.controlPoint.position
|
||||
);
|
||||
|
||||
const setDestination = useCallback((destination: LatLng) => {
|
||||
setPathDestination(destination);
|
||||
setPosition(destination);
|
||||
setHasDestination(true);
|
||||
}, []);
|
||||
|
||||
const resetDestination = useCallback(() => {
|
||||
setPathDestination(props.controlPoint.position);
|
||||
setPosition(props.controlPoint.position);
|
||||
setHasDestination(false);
|
||||
}, [props.controlPoint.position]);
|
||||
|
||||
const [putDestination, { isLoading }] =
|
||||
useSetControlPointDestinationMutation();
|
||||
const [cancelTravel] = useClearControlPointDestinationMutation();
|
||||
|
||||
useEffect(() => {
|
||||
marker.current?.setTooltipContent(
|
||||
props.controlPoint.destination
|
||||
? destinationTooltipText(
|
||||
props.controlPoint,
|
||||
props.controlPoint.destination,
|
||||
true
|
||||
)
|
||||
: ReactDOMServer.renderToString(
|
||||
<LocationTooltipText controlPoint={props.controlPoint} />
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<Marker
|
||||
position={position}
|
||||
icon={iconForControlPoint(props.controlPoint)}
|
||||
draggable={props.controlPoint.mobile && !isLoading}
|
||||
autoPan
|
||||
// We might draw other markers on top of the CP. The tooltips from the
|
||||
// other markers are helpful so we want to keep them, but make sure the CP
|
||||
// is always the clickable thing.
|
||||
zIndexOffset={1000}
|
||||
opacity={props.controlPoint.destination ? 0.5 : 1}
|
||||
ref={(ref) => {
|
||||
if (ref != null) {
|
||||
marker.current = ref;
|
||||
}
|
||||
}}
|
||||
eventHandlers={{
|
||||
click: () => {
|
||||
if (!hasDestination) {
|
||||
openInfoDialog(props.controlPoint);
|
||||
}
|
||||
},
|
||||
contextmenu: () => {
|
||||
if (props.controlPoint.destination) {
|
||||
cancelTravel({ cpId: props.controlPoint.id }).then(() => {
|
||||
resetDestination();
|
||||
});
|
||||
} else {
|
||||
openNewPackageDialog(props.controlPoint);
|
||||
}
|
||||
},
|
||||
drag: (event) => {
|
||||
const destination = event.target.getLatLng();
|
||||
backend
|
||||
.get(
|
||||
`/control-points/${props.controlPoint.id}/destination-in-range?lat=${destination.lat}&lng=${destination.lng}`
|
||||
)
|
||||
.then((inRange) => {
|
||||
marker.current?.setTooltipContent(
|
||||
destinationTooltipText(
|
||||
props.controlPoint,
|
||||
destination,
|
||||
inRange.data
|
||||
)
|
||||
);
|
||||
});
|
||||
pathLine.current?.setLatLngs([
|
||||
props.controlPoint.position,
|
||||
destination,
|
||||
]);
|
||||
},
|
||||
dragend: async (event) => {
|
||||
const currentPosition = new LatLng(
|
||||
pathDestination.lat,
|
||||
pathDestination.lng
|
||||
);
|
||||
const destination = event.target.getLatLng();
|
||||
setDestination(destination);
|
||||
try {
|
||||
await putDestination({
|
||||
cpId: props.controlPoint.id,
|
||||
body: { lat: destination.lat, lng: destination.lng },
|
||||
}).unwrap();
|
||||
} catch (error) {
|
||||
console.error("setDestination failed", error);
|
||||
setDestination(currentPosition);
|
||||
}
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Tooltip />
|
||||
</Marker>
|
||||
<Polyline
|
||||
positions={[props.controlPoint.position, pathDestination]}
|
||||
weight={1}
|
||||
color="#80BA80"
|
||||
interactive
|
||||
ref={(ref) => {
|
||||
if (ref != null) {
|
||||
pathLine.current = ref;
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
interface SecondaryMarkerProps {
|
||||
controlPoint: ControlPointModel;
|
||||
destination: LatLngLiteral | undefined;
|
||||
}
|
||||
|
||||
function SecondaryMarker(props: SecondaryMarkerProps) {
|
||||
if (!props.destination) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return (
|
||||
<Marker
|
||||
position={props.controlPoint.position}
|
||||
icon={iconForControlPoint(props.controlPoint)}
|
||||
// We might draw other markers on top of the CP. The tooltips from the
|
||||
// other markers are helpful so we want to keep them, but make sure the CP
|
||||
// is always the clickable thing.
|
||||
zIndexOffset={1000}
|
||||
eventHandlers={{
|
||||
click: () => {
|
||||
openInfoDialog(props.controlPoint);
|
||||
},
|
||||
contextmenu: () => {
|
||||
openNewPackageDialog(props.controlPoint);
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Tooltip>
|
||||
<LocationTooltipText {...props} />
|
||||
</Tooltip>
|
||||
</Marker>
|
||||
);
|
||||
}
|
||||
|
||||
export default function ControlPoint(props: ControlPointProps) {
|
||||
return (
|
||||
<>
|
||||
<PrimaryMarker {...props} />
|
||||
<SecondaryMarker
|
||||
controlPoint={props.controlPoint}
|
||||
destination={props.controlPoint.destination}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
if (props.controlPoint.mobile) {
|
||||
return <MobileControlPoint {...props} />;
|
||||
} else {
|
||||
return <StaticControlPoint {...props} />;
|
||||
}
|
||||
}
|
||||
|
||||
22
client/src/components/controlpoints/EventHandlers.ts
Normal file
22
client/src/components/controlpoints/EventHandlers.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { ControlPoint } from "../../api/_liberationApi";
|
||||
import backend from "../../api/backend";
|
||||
|
||||
function openInfoDialog(controlPoint: ControlPoint) {
|
||||
backend.post(`/qt/info/control-point/${controlPoint.id}`);
|
||||
}
|
||||
|
||||
function openNewPackageDialog(controlPoint: ControlPoint) {
|
||||
backend.post(`/qt/create-package/control-point/${controlPoint.id}`);
|
||||
}
|
||||
|
||||
export const makeLocationMarkerEventHandlers = (controlPoint: ControlPoint) => {
|
||||
return {
|
||||
click: () => {
|
||||
openInfoDialog(controlPoint);
|
||||
},
|
||||
|
||||
contextmenu: () => {
|
||||
openNewPackageDialog(controlPoint);
|
||||
},
|
||||
};
|
||||
};
|
||||
15
client/src/components/controlpoints/Icons.tsx
Normal file
15
client/src/components/controlpoints/Icons.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { ControlPoint } from "../../api/_liberationApi";
|
||||
import { Icon, Point } from "leaflet";
|
||||
import { Symbol } from "milsymbol";
|
||||
|
||||
export const iconForControlPoint = (cp: ControlPoint) => {
|
||||
const symbol = new Symbol(cp.sidc, {
|
||||
size: 24,
|
||||
colorMode: "Dark",
|
||||
});
|
||||
|
||||
return new Icon({
|
||||
iconUrl: symbol.toDataURL(),
|
||||
iconAnchor: new Point(symbol.getAnchor().x, symbol.getAnchor().y),
|
||||
});
|
||||
};
|
||||
@@ -0,0 +1,9 @@
|
||||
interface LocationTooltipTextProps {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export const LocationTooltipText = (props: LocationTooltipTextProps) => {
|
||||
return <h3 style={{ margin: 0 }}>{props.name}</h3>;
|
||||
};
|
||||
|
||||
export default LocationTooltipText;
|
||||
228
client/src/components/controlpoints/MobileControlPoint.tsx
Normal file
228
client/src/components/controlpoints/MobileControlPoint.tsx
Normal file
@@ -0,0 +1,228 @@
|
||||
import { ControlPoint } from "../../api/_liberationApi";
|
||||
import backend from "../../api/backend";
|
||||
import {
|
||||
useClearControlPointDestinationMutation,
|
||||
useSetControlPointDestinationMutation,
|
||||
} from "../../api/liberationApi";
|
||||
import { makeLocationMarkerEventHandlers } from "./EventHandlers";
|
||||
import { iconForControlPoint } from "./Icons";
|
||||
import LocationTooltipText from "./LocationTooltipText";
|
||||
import { MovementPath, MovementPathHandle } from "./MovementPath";
|
||||
import { StaticControlPoint } from "./StaticControlPoint";
|
||||
import { LatLng, Marker as LMarker, LatLngLiteral } from "leaflet";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
import ReactDOMServer from "react-dom/server";
|
||||
import { Marker, Tooltip } from "react-leaflet";
|
||||
|
||||
function metersToNauticalMiles(meters: number) {
|
||||
return meters * 0.000539957;
|
||||
}
|
||||
|
||||
function formatLatLng(latLng: LatLng) {
|
||||
const lat = latLng.lat.toFixed(2);
|
||||
const lng = latLng.lng.toFixed(2);
|
||||
const ns = latLng.lat >= 0 ? "N" : "S";
|
||||
const ew = latLng.lng >= 0 ? "E" : "W";
|
||||
return `${lat}°${ns} ${lng}°${ew}`;
|
||||
}
|
||||
|
||||
function destinationTooltipText(
|
||||
cp: ControlPoint,
|
||||
destinationish: LatLngLiteral,
|
||||
inRange: boolean
|
||||
) {
|
||||
const destination = new LatLng(destinationish.lat, destinationish.lng);
|
||||
const distance = metersToNauticalMiles(
|
||||
destination.distanceTo(cp.position)
|
||||
).toFixed(1);
|
||||
if (!inRange) {
|
||||
return `Out of range (${distance}nm away)`;
|
||||
}
|
||||
const dest = formatLatLng(destination);
|
||||
return `${cp.name} moving ${distance}nm to ${dest} next turn`;
|
||||
}
|
||||
|
||||
interface PrimaryMarkerProps {
|
||||
controlPoint: ControlPoint;
|
||||
}
|
||||
|
||||
/**
|
||||
* The primary control point marker. For non-mobile control points, this has
|
||||
* fairly simple behavior: it's a marker in a fixed location that can manage
|
||||
* units and can have missions planned against it.
|
||||
*
|
||||
* For mobile control points, this is a draggable marker. If the control point
|
||||
* has a destination (either because it was dragged after render, or because it
|
||||
* had a destination in the game that was loaded), the unit management and
|
||||
* mission planning behaviors are delegated to SecondaryMarker, and the primary
|
||||
* marker becomes only a destination marker. It can be dragged to change the
|
||||
* destination, and can be right clicked to cancel movement.
|
||||
*/
|
||||
function PrimaryMarker(props: PrimaryMarkerProps) {
|
||||
// We can't use normal state to update the marker tooltip or the line points
|
||||
// because if we set any state in the drag event it will re-render this
|
||||
// component and all children, interrupting dragging. Instead, keep refs to
|
||||
// the objects and mutate them directly.
|
||||
//
|
||||
// For the same reason, the path is owned by this component, because updating
|
||||
// sibling state would be messy. Lifting the state into the parent would still
|
||||
// cause this component to redraw.
|
||||
const markerRef = useRef<LMarker | null>(null);
|
||||
const pathRef = useRef<MovementPathHandle | null>(null);
|
||||
|
||||
const [hasDestination, setHasDestination] = useState<boolean>(
|
||||
props.controlPoint.destination != null
|
||||
);
|
||||
const [position, setPosition] = useState<LatLngLiteral>(
|
||||
props.controlPoint.destination
|
||||
? props.controlPoint.destination
|
||||
: props.controlPoint.position
|
||||
);
|
||||
|
||||
const setDestination = useCallback((destination: LatLng) => {
|
||||
setPosition(destination);
|
||||
setHasDestination(true);
|
||||
}, []);
|
||||
|
||||
const resetDestination = useCallback(() => {
|
||||
setPosition(props.controlPoint.position);
|
||||
setHasDestination(false);
|
||||
}, [props]);
|
||||
|
||||
const [putDestination, { isLoading }] =
|
||||
useSetControlPointDestinationMutation();
|
||||
const [cancelTravel] = useClearControlPointDestinationMutation();
|
||||
|
||||
useEffect(() => {
|
||||
markerRef.current?.setTooltipContent(
|
||||
props.controlPoint.destination
|
||||
? destinationTooltipText(
|
||||
props.controlPoint,
|
||||
props.controlPoint.destination,
|
||||
true
|
||||
)
|
||||
: ReactDOMServer.renderToString(
|
||||
<LocationTooltipText name={props.controlPoint.name} />
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
const locationClickHandlers = makeLocationMarkerEventHandlers(
|
||||
props.controlPoint
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Marker
|
||||
position={position}
|
||||
icon={iconForControlPoint(props.controlPoint)}
|
||||
draggable={!isLoading}
|
||||
autoPan
|
||||
// We might draw other markers on top of the CP. The tooltips from the
|
||||
// other markers are helpful so we want to keep them, but make sure the CP
|
||||
// is always the clickable thing.
|
||||
zIndexOffset={1000}
|
||||
opacity={props.controlPoint.destination ? 0.5 : 1}
|
||||
ref={(ref) => {
|
||||
if (ref != null) {
|
||||
markerRef.current = ref;
|
||||
}
|
||||
}}
|
||||
eventHandlers={{
|
||||
click: () => {
|
||||
if (!hasDestination) {
|
||||
locationClickHandlers.click();
|
||||
}
|
||||
},
|
||||
contextmenu: () => {
|
||||
if (props.controlPoint.destination) {
|
||||
cancelTravel({ cpId: props.controlPoint.id }).then(() => {
|
||||
resetDestination();
|
||||
});
|
||||
} else {
|
||||
locationClickHandlers.contextmenu();
|
||||
}
|
||||
},
|
||||
drag: (event) => {
|
||||
const destination = event.target.getLatLng();
|
||||
backend
|
||||
.get(
|
||||
`/control-points/${props.controlPoint.id}/destination-in-range?lat=${destination.lat}&lng=${destination.lng}`
|
||||
)
|
||||
.then((inRange) => {
|
||||
markerRef.current?.setTooltipContent(
|
||||
destinationTooltipText(
|
||||
props.controlPoint,
|
||||
destination,
|
||||
inRange.data
|
||||
)
|
||||
);
|
||||
});
|
||||
pathRef.current?.setDestination(destination);
|
||||
},
|
||||
dragend: async (event) => {
|
||||
const currentPosition = new LatLng(position.lat, position.lng);
|
||||
const destination = event.target.getLatLng();
|
||||
setDestination(destination);
|
||||
try {
|
||||
await putDestination({
|
||||
cpId: props.controlPoint.id,
|
||||
body: { lat: destination.lat, lng: destination.lng },
|
||||
}).unwrap();
|
||||
} catch (error) {
|
||||
console.error("setDestination failed", error);
|
||||
setDestination(currentPosition);
|
||||
}
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Tooltip />
|
||||
</Marker>
|
||||
<MovementPath
|
||||
source={props.controlPoint.position}
|
||||
destination={position}
|
||||
ref={pathRef}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
interface SecondaryMarkerProps {
|
||||
controlPoint: ControlPoint;
|
||||
destination: LatLngLiteral | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* The secondary marker for a control point. The secondary marker will only be
|
||||
* shown when the control point has a destination set. For mobile control
|
||||
* points, the primary marker is draggable, and the secondary marker will be
|
||||
* shown at the current location iff the control point has been dragged. The
|
||||
* secondary marker is also the marker that has the normal control point
|
||||
* interaction options (mission planning and unit management).
|
||||
*/
|
||||
function SecondaryMarker(props: SecondaryMarkerProps) {
|
||||
if (!props.destination) {
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return <StaticControlPoint controlPoint={props.controlPoint} />;
|
||||
}
|
||||
|
||||
interface MobileControlPointProps {
|
||||
controlPoint: ControlPoint;
|
||||
}
|
||||
|
||||
export const MobileControlPoint = (props: MobileControlPointProps) => {
|
||||
return (
|
||||
<>
|
||||
<PrimaryMarker
|
||||
controlPoint={props.controlPoint}
|
||||
key={props.controlPoint.destination ? 0 : 1}
|
||||
/>
|
||||
<SecondaryMarker
|
||||
controlPoint={props.controlPoint}
|
||||
destination={props.controlPoint.destination}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
35
client/src/components/controlpoints/MovementPath.tsx
Normal file
35
client/src/components/controlpoints/MovementPath.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { LatLngLiteral, Polyline as LPolyline } from "leaflet";
|
||||
import { forwardRef, useImperativeHandle, useRef } from "react";
|
||||
import { Polyline } from "react-leaflet";
|
||||
|
||||
interface MovementPathProps {
|
||||
source: LatLngLiteral;
|
||||
destination: LatLngLiteral;
|
||||
}
|
||||
|
||||
export interface MovementPathHandle {
|
||||
setDestination: (destination: LatLngLiteral) => void;
|
||||
}
|
||||
|
||||
export const MovementPath = forwardRef<MovementPathHandle, MovementPathProps>(
|
||||
(props: MovementPathProps, ref) => {
|
||||
const lineRef = useRef<LPolyline | null>(null);
|
||||
useImperativeHandle(
|
||||
ref,
|
||||
() => ({
|
||||
setDestination: (destination: LatLngLiteral) => {
|
||||
lineRef.current?.setLatLngs([props.source, destination]);
|
||||
},
|
||||
}),
|
||||
[props]
|
||||
);
|
||||
return (
|
||||
<Polyline
|
||||
positions={[props.source, props.destination]}
|
||||
weight={1}
|
||||
color="#80BA80"
|
||||
ref={lineRef}
|
||||
/>
|
||||
);
|
||||
}
|
||||
);
|
||||
27
client/src/components/controlpoints/StaticControlPoint.tsx
Normal file
27
client/src/components/controlpoints/StaticControlPoint.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { ControlPoint } from "../../api/_liberationApi";
|
||||
import { makeLocationMarkerEventHandlers } from "./EventHandlers";
|
||||
import { iconForControlPoint } from "./Icons";
|
||||
import LocationTooltipText from "./LocationTooltipText";
|
||||
import { Marker, Tooltip } from "react-leaflet";
|
||||
|
||||
interface StaticControlPointProps {
|
||||
controlPoint: ControlPoint;
|
||||
}
|
||||
|
||||
export const StaticControlPoint = (props: StaticControlPointProps) => {
|
||||
return (
|
||||
<Marker
|
||||
position={props.controlPoint.position}
|
||||
icon={iconForControlPoint(props.controlPoint)}
|
||||
// We might draw other markers on top of the CP. The tooltips from the
|
||||
// other markers are helpful so we want to keep them, but make sure the CP
|
||||
// is always the clickable thing.
|
||||
zIndexOffset={1000}
|
||||
eventHandlers={makeLocationMarkerEventHandlers(props.controlPoint)}
|
||||
>
|
||||
<Tooltip>
|
||||
<LocationTooltipText name={props.controlPoint.name} />
|
||||
</Tooltip>
|
||||
</Marker>
|
||||
);
|
||||
};
|
||||
@@ -4,18 +4,20 @@ import { SocketProvider } from "./components/socketprovider/socketprovider";
|
||||
import "./index.css";
|
||||
import * as serviceWorker from "./serviceWorker";
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import ReactDOM from "react-dom/client";
|
||||
import { Provider } from "react-redux";
|
||||
|
||||
ReactDOM.render(
|
||||
const root = ReactDOM.createRoot(
|
||||
document.getElementById("root") as HTMLElement
|
||||
);
|
||||
root.render(
|
||||
<React.StrictMode>
|
||||
<Provider store={store}>
|
||||
<SocketProvider>
|
||||
<App />
|
||||
</SocketProvider>
|
||||
</Provider>
|
||||
</React.StrictMode>,
|
||||
document.getElementById("root")
|
||||
</React.StrictMode>
|
||||
);
|
||||
|
||||
// If you want your app to work offline and load faster, you can change
|
||||
|
||||
@@ -2,8 +2,9 @@ from __future__ import annotations
|
||||
|
||||
import random
|
||||
from typing import TYPE_CHECKING, Iterator, Optional
|
||||
from game.data.groups import GroupTask
|
||||
|
||||
from game.armedforces.forcegroup import ForceGroup
|
||||
from game.data.groups import GroupTask
|
||||
from game.layout import LAYOUTS
|
||||
from game.profiling import logged_duration
|
||||
|
||||
|
||||
@@ -10,19 +10,18 @@ import yaml
|
||||
from dcs.unittype import ShipType, StaticType, UnitType as DcsUnitType, VehicleType
|
||||
|
||||
from game.data.groups import GroupTask
|
||||
from game.data.radar_db import UNITS_WITH_RADAR
|
||||
from game.dcs.groundunittype import GroundUnitType
|
||||
from game.dcs.helpers import static_type_from_name
|
||||
from game.dcs.shipunittype import ShipUnitType
|
||||
from game.dcs.unittype import UnitType
|
||||
from game.layout import LAYOUTS
|
||||
from game.layout.layout import TgoLayout, TgoLayoutUnitGroup
|
||||
from game.point_with_heading import PointWithHeading
|
||||
from game.theater.theatergroundobject import (
|
||||
IadsGroundObject,
|
||||
IadsBuildingGroundObject,
|
||||
NavalGroundObject,
|
||||
)
|
||||
from game.layout import LAYOUTS
|
||||
from game.layout.layout import TgoLayout, TgoLayoutUnitGroup
|
||||
from game.point_with_heading import PointWithHeading
|
||||
from game.theater.theatergroup import IadsGroundGroup, IadsRole, TheaterGroup
|
||||
from game.utils import escape_string_for_lua
|
||||
|
||||
|
||||
@@ -121,9 +121,22 @@ from dcs.unittype import FlyingType
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from pydcs_extensions.a4ec.a4ec import A_4E_C
|
||||
from pydcs_extensions.f104.f104 import VSN_F104G, VSN_F104S, VSN_F104S_AG
|
||||
from pydcs_extensions.a6a.a6a import VSN_A6A
|
||||
from pydcs_extensions.f100.f100 import VSN_F100
|
||||
from pydcs_extensions.f104.f104 import VSN_F104C, VSN_F104G, VSN_F104S, VSN_F104S_AG
|
||||
from pydcs_extensions.f105.f105 import VSN_F105D, VSN_F105G
|
||||
from pydcs_extensions.f15d.f15d import F_15D
|
||||
from pydcs_extensions.f16i_idf.f16i_idf import (
|
||||
F_16D_50,
|
||||
F_16D_52,
|
||||
F_16D_50_NS,
|
||||
F_16D_52_NS,
|
||||
F_16D_Barak,
|
||||
F_16I,
|
||||
)
|
||||
from pydcs_extensions.f22a.f22a import F_22A
|
||||
from pydcs_extensions.f4b.f4b import VSN_F4B
|
||||
from pydcs_extensions.f84g.f84g import VSN_F84G
|
||||
from pydcs_extensions.hercules.hercules import Hercules
|
||||
from pydcs_extensions.jas39.jas39 import JAS39Gripen, JAS39Gripen_AG
|
||||
from pydcs_extensions.su30.su30 import Su_30MKA, Su_30MKI, Su_30MKM, Su_30SM
|
||||
@@ -155,11 +168,18 @@ CAP_CAPABLE = [
|
||||
Su_27,
|
||||
MiG_29S,
|
||||
F_16C_50,
|
||||
F_16I,
|
||||
F_16D_Barak,
|
||||
F_16D_50,
|
||||
F_16D_50_NS,
|
||||
F_16D_52,
|
||||
F_16D_52_NS,
|
||||
FA_18C_hornet,
|
||||
JF_17,
|
||||
JAS39Gripen,
|
||||
F_16A,
|
||||
F_4E,
|
||||
VSN_F4B,
|
||||
MiG_31,
|
||||
MiG_25PD,
|
||||
MiG_29G,
|
||||
@@ -181,12 +201,15 @@ CAP_CAPABLE = [
|
||||
F_5E_3,
|
||||
VSN_F104S,
|
||||
VSN_F104G,
|
||||
VSN_F104C,
|
||||
MiG_19P,
|
||||
VSN_F100,
|
||||
A_4E_C,
|
||||
F_86F_Sabre,
|
||||
MiG_15bis,
|
||||
C_101CC,
|
||||
L_39ZA,
|
||||
VSN_F84G,
|
||||
P_51D_30_NA,
|
||||
P_51D,
|
||||
SpitfireLFMkIXCW,
|
||||
@@ -213,7 +236,14 @@ CAS_CAPABLE = [
|
||||
Su_25,
|
||||
F_15D,
|
||||
F_15E,
|
||||
F_16A,
|
||||
F_16C_50,
|
||||
F_16I,
|
||||
F_16D_Barak,
|
||||
F_16D_50,
|
||||
F_16D_50_NS,
|
||||
F_16D_52,
|
||||
F_16D_52_NS,
|
||||
FA_18C_hornet,
|
||||
Tornado_GR4,
|
||||
Tornado_IDS,
|
||||
@@ -269,8 +299,6 @@ CAS_CAPABLE = [
|
||||
C_101CC,
|
||||
L_39ZA,
|
||||
UH_1H,
|
||||
VSN_F104S_AG,
|
||||
VSN_F104G,
|
||||
A_20G,
|
||||
Ju_88A4,
|
||||
P_47D_40,
|
||||
@@ -288,6 +316,15 @@ CAS_CAPABLE = [
|
||||
WingLoong_I,
|
||||
MQ_9_Reaper,
|
||||
RQ_1A_Predator,
|
||||
VSN_A6A,
|
||||
VSN_F100,
|
||||
VSN_F105G,
|
||||
VSN_F105D,
|
||||
VSN_F104S_AG,
|
||||
VSN_F104G,
|
||||
VSN_F104C,
|
||||
VSN_F4B,
|
||||
VSN_F84G,
|
||||
]
|
||||
|
||||
|
||||
@@ -295,6 +332,12 @@ CAS_CAPABLE = [
|
||||
SEAD_CAPABLE = [
|
||||
JF_17,
|
||||
F_16C_50,
|
||||
F_16I,
|
||||
F_16D_Barak,
|
||||
F_16D_50,
|
||||
F_16D_50_NS,
|
||||
F_16D_52,
|
||||
F_16D_52_NS,
|
||||
FA_18C_hornet,
|
||||
Tornado_IDS,
|
||||
Su_25T,
|
||||
@@ -315,6 +358,7 @@ SEAD_CAPABLE = [
|
||||
Su_30SM,
|
||||
MiG_27K,
|
||||
Tornado_GR4,
|
||||
VSN_F105G,
|
||||
]
|
||||
|
||||
|
||||
@@ -323,6 +367,7 @@ DEAD_CAPABLE = SEAD_CAPABLE + [
|
||||
AJS37,
|
||||
F_14B,
|
||||
F_14A_135_GR,
|
||||
F_16A,
|
||||
JAS39Gripen_AG,
|
||||
B_1B,
|
||||
B_52H,
|
||||
@@ -331,8 +376,6 @@ DEAD_CAPABLE = SEAD_CAPABLE + [
|
||||
H_6J,
|
||||
A_20G,
|
||||
Ju_88A4,
|
||||
VSN_F104S_AG,
|
||||
VSN_F104G,
|
||||
P_47D_40,
|
||||
P_47D_30bl1,
|
||||
P_47D_30,
|
||||
@@ -344,6 +387,13 @@ DEAD_CAPABLE = SEAD_CAPABLE + [
|
||||
Bf_109K_4,
|
||||
FW_190D9,
|
||||
FW_190A8,
|
||||
VSN_A6A,
|
||||
VSN_F105D,
|
||||
VSN_F104S_AG,
|
||||
VSN_F104G,
|
||||
VSN_F104C,
|
||||
VSN_F100,
|
||||
VSN_F84G,
|
||||
]
|
||||
|
||||
|
||||
@@ -361,6 +411,12 @@ STRIKE_CAPABLE = [
|
||||
AJS37,
|
||||
Tornado_GR4,
|
||||
F_16C_50,
|
||||
F_16I,
|
||||
F_16D_Barak,
|
||||
F_16D_50,
|
||||
F_16D_50_NS,
|
||||
F_16D_52,
|
||||
F_16D_52_NS,
|
||||
FA_18C_hornet,
|
||||
AV8BNA,
|
||||
JF_17,
|
||||
@@ -409,8 +465,6 @@ STRIKE_CAPABLE = [
|
||||
B_17G,
|
||||
A_20G,
|
||||
Ju_88A4,
|
||||
VSN_F104S_AG,
|
||||
VSN_F104G,
|
||||
P_47D_40,
|
||||
P_47D_30bl1,
|
||||
P_47D_30,
|
||||
@@ -422,6 +476,15 @@ STRIKE_CAPABLE = [
|
||||
Bf_109K_4,
|
||||
FW_190D9,
|
||||
FW_190A8,
|
||||
VSN_A6A,
|
||||
VSN_F100,
|
||||
VSN_F104S_AG,
|
||||
VSN_F104G,
|
||||
VSN_F104C,
|
||||
VSN_F105G,
|
||||
VSN_F105D,
|
||||
VSN_F4B,
|
||||
VSN_F84G,
|
||||
]
|
||||
|
||||
|
||||
@@ -430,6 +493,7 @@ ANTISHIP_CAPABLE = [
|
||||
Tu_142,
|
||||
Tu_22M3,
|
||||
H_6J,
|
||||
F_16A,
|
||||
FA_18C_hornet,
|
||||
JAS39Gripen_AG,
|
||||
Su_24M,
|
||||
@@ -468,6 +532,12 @@ RUNWAY_ATTACK_CAPABLE = [
|
||||
F_15E,
|
||||
AJS37,
|
||||
F_16C_50,
|
||||
F_16I,
|
||||
F_16D_Barak,
|
||||
F_16D_50,
|
||||
F_16D_50_NS,
|
||||
F_16D_52,
|
||||
F_16D_52_NS,
|
||||
FA_18C_hornet,
|
||||
AV8BNA,
|
||||
JF_17,
|
||||
@@ -516,8 +586,6 @@ RUNWAY_ATTACK_CAPABLE = [
|
||||
B_17G,
|
||||
A_20G,
|
||||
Ju_88A4,
|
||||
VSN_F104S_AG,
|
||||
VSN_F104G,
|
||||
P_47D_40,
|
||||
P_47D_30bl1,
|
||||
P_47D_30,
|
||||
@@ -529,6 +597,14 @@ RUNWAY_ATTACK_CAPABLE = [
|
||||
Bf_109K_4,
|
||||
FW_190D9,
|
||||
FW_190A8,
|
||||
VSN_A6A,
|
||||
VSN_F105G,
|
||||
VSN_F105D,
|
||||
VSN_F104S_AG,
|
||||
VSN_F104G,
|
||||
VSN_F104C,
|
||||
VSN_F100,
|
||||
VSN_F4B,
|
||||
]
|
||||
|
||||
# For any aircraft that isn't necessarily directly involved in strike
|
||||
|
||||
@@ -40,6 +40,11 @@ class Navigating(InFlight):
|
||||
)
|
||||
|
||||
def estimate_altitude(self) -> tuple[Distance, str]:
|
||||
# This does not behave well when one of the waypoints is AGL and the other is
|
||||
# MSL. We can't really avoid that problem though. We don't know where the ground
|
||||
# is, so conversions between them are impossible, and we do need to use AGL
|
||||
# altitudes for takeoff and landing waypoints (even if we had the runway
|
||||
# elevation, we don't have elevation for FARPs).
|
||||
return (
|
||||
meters(
|
||||
lerp(
|
||||
|
||||
@@ -3,7 +3,7 @@ from __future__ import annotations
|
||||
import datetime
|
||||
import logging
|
||||
from collections.abc import Iterable
|
||||
from typing import Iterator, Mapping, Optional, TYPE_CHECKING, Type, Dict, Any
|
||||
from typing import Iterator, Mapping, Optional, TYPE_CHECKING, Type, Dict
|
||||
|
||||
from dcs.unittype import FlyingType
|
||||
|
||||
@@ -151,10 +151,10 @@ class Loadout:
|
||||
# names, so those have been included here too. The priority goes from first to
|
||||
# last - the first element in the tuple will be tried first, then the second,
|
||||
# etc.
|
||||
loadout_names = {t: [f"Liberation {t.value}"] for t in FlightType}
|
||||
loadout_names = {t: [f"Retribution {t.value}"] for t in FlightType}
|
||||
legacy_names = {
|
||||
FlightType.TARCAP: ("CAP HEAVY", "CAP", "Liberation BARCAP"),
|
||||
FlightType.BARCAP: ("CAP HEAVY", "CAP", "Liberation TARCAP"),
|
||||
FlightType.TARCAP: ("CAP HEAVY", "CAP", "Retribution BARCAP"),
|
||||
FlightType.BARCAP: ("CAP HEAVY", "CAP", "Retribution TARCAP"),
|
||||
FlightType.CAS: ("CAS MAVERICK F", "CAS"),
|
||||
FlightType.STRIKE: ("STRIKE",),
|
||||
FlightType.ANTISHIP: ("ANTISHIP",),
|
||||
|
||||
@@ -3,8 +3,8 @@ import logging
|
||||
import re
|
||||
from typing import Any
|
||||
|
||||
from dcs.unitgroup import FlyingGroup
|
||||
from dcs.flyingunit import FlyingUnit
|
||||
from dcs.unitgroup import FlyingGroup
|
||||
|
||||
|
||||
def callsign_for_support_unit(group: FlyingGroup[Any]) -> str:
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import dataclasses
|
||||
import logging
|
||||
from typing import Optional, TYPE_CHECKING, Dict, Union
|
||||
from typing import Optional, TYPE_CHECKING
|
||||
|
||||
from game.squadrons import Squadron
|
||||
from game.squadrons.squadrondef import SquadronDef
|
||||
from ..ato.flighttype import FlightType
|
||||
from .campaignairwingconfig import CampaignAirWingConfig, SquadronConfig
|
||||
from ..ato.flighttype import FlightType
|
||||
from ..dcs.aircrafttype import AircraftType
|
||||
from ..theater import ControlPoint
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@ import itertools
|
||||
import random
|
||||
from typing import Optional, TYPE_CHECKING
|
||||
|
||||
from game.ato.ai_flight_planner_db import aircraft_for_task, tasks_for_aircraft
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.squadrons.operatingbases import OperatingBases
|
||||
from game.squadrons.squadrondef import SquadronDef
|
||||
from game.theater import ControlPoint
|
||||
from game.ato.ai_flight_planner_db import aircraft_for_task, tasks_for_aircraft
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.factions.faction import Faction
|
||||
|
||||
@@ -2,8 +2,8 @@ from dataclasses import field, dataclass
|
||||
from enum import Enum, auto
|
||||
from typing import Optional
|
||||
|
||||
from game.theater import MissionTarget
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.theater import MissionTarget
|
||||
|
||||
|
||||
class EscortType(Enum):
|
||||
|
||||
@@ -6,9 +6,9 @@ from collections import defaultdict
|
||||
from datetime import timedelta
|
||||
from typing import Iterator, Dict, TYPE_CHECKING
|
||||
|
||||
from game.theater import MissionTarget
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.ato.traveltime import TotEstimator
|
||||
from game.theater import MissionTarget
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.coalition import Coalition
|
||||
|
||||
@@ -5,6 +5,7 @@ import operator
|
||||
from collections.abc import Iterable, Iterator
|
||||
from typing import TYPE_CHECKING, TypeVar
|
||||
|
||||
from game.ato.closestairfields import ClosestAirfields, ObjectiveDistanceCache
|
||||
from game.theater import (
|
||||
Airfield,
|
||||
ControlPoint,
|
||||
@@ -20,7 +21,6 @@ from game.theater.theatergroundobject import (
|
||||
IadsBuildingGroundObject,
|
||||
)
|
||||
from game.utils import meters, nautical_miles
|
||||
from game.ato.closestairfields import ClosestAirfields, ObjectiveDistanceCache
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
@@ -178,6 +178,8 @@ class ObjectiveFinder:
|
||||
return self._targets_by_range(airfields)
|
||||
|
||||
def convoys(self) -> Iterator[Convoy]:
|
||||
if self.game.settings.perf_disable_convoys:
|
||||
return
|
||||
for front_line in self.front_lines():
|
||||
yield from self.game.coalition_for(
|
||||
self.is_player
|
||||
|
||||
@@ -4,8 +4,8 @@ from dataclasses import dataclass
|
||||
from game.commander.tasks.compound.attackairinfrastructure import (
|
||||
AttackAirInfrastructure,
|
||||
)
|
||||
from game.commander.tasks.compound.attackbuildings import AttackBuildings
|
||||
from game.commander.tasks.compound.attackbattlepositions import AttackBattlePositions
|
||||
from game.commander.tasks.compound.attackbuildings import AttackBuildings
|
||||
from game.commander.tasks.compound.capturebases import CaptureBases
|
||||
from game.commander.tasks.compound.defendbases import DefendBases
|
||||
from game.commander.tasks.compound.degradeiads import DegradeIads
|
||||
|
||||
@@ -2,10 +2,10 @@ from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater import MissionTarget
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -3,10 +3,10 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from random import randint
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater import ControlPoint
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -3,11 +3,11 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from random import randint
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.missionproposals import EscortType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater.theatergroundobject import NavalGroundObject
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -3,10 +3,10 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from random import randint
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.transfers import CargoShip
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -2,10 +2,10 @@ from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater.theatergroundobject import VehicleGroupGroundObject
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -3,10 +3,10 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from random import randint
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater import ControlPoint
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -3,10 +3,10 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from random import randint
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater import FrontLine
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -2,11 +2,10 @@ from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.data.doctrine import Doctrine
|
||||
from game.transfers import Convoy
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -2,11 +2,11 @@ from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.missionproposals import EscortType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater.theatergroundobject import IadsGroundObject
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -3,10 +3,10 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass
|
||||
from random import randint
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater import ControlPoint
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -2,10 +2,10 @@ from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater import MissionTarget
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.commander.tasks.packageplanningtask import PackagePlanningTask
|
||||
from game.commander.theaterstate import TheaterState
|
||||
from game.theater.theatergroundobject import TheaterGroundObject
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import inspect
|
||||
|
||||
import dcs
|
||||
|
||||
REQUIRED_BUILDINGS = [
|
||||
"ammo",
|
||||
"factory",
|
||||
"fob",
|
||||
"oil",
|
||||
]
|
||||
|
||||
IADS_BUILDINGS = [
|
||||
@@ -15,7 +17,6 @@ IADS_BUILDINGS = [
|
||||
|
||||
DEFAULT_AVAILABLE_BUILDINGS = [
|
||||
"fuel",
|
||||
"oil",
|
||||
"ware",
|
||||
"farp",
|
||||
"derrick",
|
||||
|
||||
@@ -3,9 +3,9 @@ from typing import Optional, Type
|
||||
from dcs.helicopters import helicopter_map
|
||||
from dcs.planes import plane_map
|
||||
from dcs.ships import ship_map
|
||||
from dcs.statics import fortification_map, groundobject_map, warehouse_map, cargo_map
|
||||
from dcs.unittype import UnitType
|
||||
from dcs.vehicles import vehicle_map
|
||||
from dcs.statics import fortification_map, groundobject_map, warehouse_map, cargo_map
|
||||
|
||||
|
||||
def unit_type_from_name(name: str) -> Optional[Type[UnitType]]:
|
||||
|
||||
@@ -11,6 +11,7 @@ from dcs.countries import country_dict
|
||||
from dcs.unittype import ShipType, StaticType
|
||||
from dcs.unittype import UnitType as DcsUnitType
|
||||
|
||||
from game.armedforces.forcegroup import ForceGroup
|
||||
from game.data.building_data import (
|
||||
WW2_ALLIES_BUILDINGS,
|
||||
DEFAULT_AVAILABLE_BUILDINGS,
|
||||
@@ -25,13 +26,13 @@ from game.data.doctrine import (
|
||||
COLDWAR_DOCTRINE,
|
||||
WWII_DOCTRINE,
|
||||
)
|
||||
from game.data.units import UnitClass
|
||||
from game.data.groups import GroupRole
|
||||
from game.data.units import UnitClass
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.dcs.groundunittype import GroundUnitType
|
||||
from game.dcs.shipunittype import ShipUnitType
|
||||
from game.armedforces.forcegroup import ForceGroup
|
||||
from game.dcs.unittype import UnitType
|
||||
from pydcs_extensions.f16i_idf.f16i_idf import inject_F16I
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.theater.start_generator import ModSettings
|
||||
@@ -124,6 +125,10 @@ class Faction:
|
||||
#: both will use it.
|
||||
unrestricted_satnav: bool = False
|
||||
|
||||
# Store mod settings so mod properties can be injected again on game load,
|
||||
# in case mods like CJS F/A-18E/F/G or IDF F-16I are selected by the player
|
||||
mod_settings: Optional[ModSettings] = field(default=None)
|
||||
|
||||
def has_access_to_dcs_type(self, unit_type: Type[DcsUnitType]) -> bool:
|
||||
# Vehicle and Ship Units
|
||||
if any(unit_type == u.dcs_unit_type for u in self.accessible_units):
|
||||
@@ -294,7 +299,21 @@ class Faction:
|
||||
if unit.unit_class is unit_class:
|
||||
yield unit
|
||||
|
||||
def apply_mod_settings(self, mod_settings: ModSettings) -> None:
|
||||
def apply_mod_settings(self, mod_settings: Optional[ModSettings] = None) -> None:
|
||||
if mod_settings is None:
|
||||
if self.mod_settings is None:
|
||||
# No mod settings were provided and none were saved for this faction
|
||||
# so stop here
|
||||
return
|
||||
elif self.mod_settings is not None:
|
||||
# Saved mod settings were found for this faction,
|
||||
# so load them for use
|
||||
mod_settings = self.mod_settings
|
||||
else:
|
||||
# Update the mod settings of this faction
|
||||
# so the settings can be applied again on load, if needed
|
||||
self.mod_settings = mod_settings
|
||||
|
||||
# aircraft
|
||||
if not mod_settings.a4_skyhawk:
|
||||
self.remove_aircraft("A-4E-C")
|
||||
@@ -303,14 +322,35 @@ class Faction:
|
||||
if not mod_settings.uh_60l:
|
||||
self.remove_aircraft("UH-60L")
|
||||
self.remove_aircraft("KC130J")
|
||||
if not mod_settings.f4b_phantom:
|
||||
self.remove_aircraft("VSN_F4B")
|
||||
if not mod_settings.f15d_baz:
|
||||
self.remove_aircraft("F-15D")
|
||||
if not mod_settings.f_16_idf:
|
||||
self.remove_aircraft("F-16I")
|
||||
self.remove_aircraft("F_16D_52")
|
||||
self.remove_aircraft("F_16D_50")
|
||||
self.remove_aircraft("F_16D_50_NS")
|
||||
self.remove_aircraft("F_16D_52_NS")
|
||||
else:
|
||||
inject_F16I()
|
||||
# Remove the stock Viper because that DCS ID is now used by the Sufa
|
||||
self.remove_aircraft_by_name("F-16CM Fighting Falcon (Block 50)")
|
||||
if not mod_settings.f22_raptor:
|
||||
self.remove_aircraft("F-22A")
|
||||
if not mod_settings.f84g_thunderjet:
|
||||
self.remove_aircraft("VSN_F84G")
|
||||
if not mod_settings.f100_supersabre:
|
||||
self.remove_aircraft("VSN_F100")
|
||||
if not mod_settings.f104_starfighter:
|
||||
self.remove_aircraft("VSN_F104G")
|
||||
self.remove_aircraft("VSN_F104S")
|
||||
self.remove_aircraft("VSN_F104S_AG")
|
||||
if not mod_settings.f105_thunderchief:
|
||||
self.remove_aircraft("VSN_F105D")
|
||||
self.remove_aircraft("VSN_F105G")
|
||||
if not mod_settings.a6a_intruder:
|
||||
self.remove_aircraft("VSN_A6A")
|
||||
if not mod_settings.jas39_gripen:
|
||||
self.remove_aircraft("JAS39Gripen")
|
||||
self.remove_aircraft("JAS39Gripen_AG")
|
||||
@@ -380,6 +420,11 @@ class Faction:
|
||||
if i.dcs_unit_type.id == name:
|
||||
self.aircrafts.remove(i)
|
||||
|
||||
def remove_aircraft_by_name(self, name: str) -> None:
|
||||
for i in self.aircrafts:
|
||||
if i.name == name:
|
||||
self.aircrafts.remove(i)
|
||||
|
||||
def remove_preset(self, name: str) -> None:
|
||||
for pg in self.preset_groups:
|
||||
if pg.name == name:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
@@ -232,6 +232,10 @@ class Game:
|
||||
LuaPluginManager.load_settings(self.settings)
|
||||
ObjectiveDistanceCache.set_theater(self.theater)
|
||||
self.compute_unculled_zones(GameUpdateEvents())
|
||||
# Apply mod settings again so mod properties get injected again,
|
||||
# in case mods like CJS F/A-18E/F/G or IDF F-16I are selected by the player
|
||||
self.blue.faction.apply_mod_settings()
|
||||
self.red.faction.apply_mod_settings()
|
||||
if not game_still_initializing:
|
||||
# We don't need to push events that happen during load. The UI will fully
|
||||
# reset when we're done.
|
||||
@@ -341,7 +345,6 @@ class Game:
|
||||
with logged_duration("Turn initialization"):
|
||||
self.initialize_turn(events)
|
||||
|
||||
events.begin_new_turn()
|
||||
EventStream.put_nowait(events)
|
||||
|
||||
# Autosave progress
|
||||
@@ -437,6 +440,8 @@ class Game:
|
||||
with logged_duration("Computing culling positions"):
|
||||
self.compute_unculled_zones(events)
|
||||
|
||||
events.begin_new_turn()
|
||||
|
||||
def message(self, title: str, text: str = "") -> None:
|
||||
self.informations.append(Information(title, text, turn=self.turn))
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
from __future__ import annotations
|
||||
from collections import defaultdict
|
||||
|
||||
import logging
|
||||
import random
|
||||
from dataclasses import dataclass, field
|
||||
from typing import TYPE_CHECKING, Iterator, Type, Optional
|
||||
@@ -28,7 +26,6 @@ from game.theater.theatergroundobject import (
|
||||
IadsGroundObject,
|
||||
)
|
||||
from game.theater.theatergroup import TheaterUnit
|
||||
from game.utils import Heading
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.factions.faction import Faction
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from __future__ import annotations
|
||||
from collections import defaultdict
|
||||
|
||||
import itertools
|
||||
import logging
|
||||
import pickle
|
||||
from collections import defaultdict
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from pathlib import Path
|
||||
from typing import Iterator
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
from collections import defaultdict
|
||||
|
||||
from collections import defaultdict
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Optional, Type
|
||||
|
||||
|
||||
@@ -17,8 +17,8 @@ from game.ato.flighttype import FlightType
|
||||
from game.ato.package import Package
|
||||
from game.ato.starttype import StartType
|
||||
from game.factions.faction import Faction
|
||||
from game.missiongenerator.missiondata import MissionData
|
||||
from game.missiongenerator.lasercoderegistry import LaserCodeRegistry
|
||||
from game.missiongenerator.missiondata import MissionData
|
||||
from game.radio.radios import RadioRegistry
|
||||
from game.radio.tacan import TacanRegistry
|
||||
from game.runways import RunwayData
|
||||
|
||||
@@ -12,9 +12,9 @@ from dcs.unitgroup import FlyingGroup
|
||||
from game.ato import Flight, FlightType
|
||||
from game.callsigns import callsign_for_support_unit
|
||||
from game.data.weapons import Pylon, WeaponType as WeaponTypeEnum
|
||||
from game.missiongenerator.missiondata import MissionData, AwacsInfo, TankerInfo
|
||||
from game.missiongenerator.lasercoderegistry import LaserCodeRegistry
|
||||
from game.missiongenerator.logisticsgenerator import LogisticsGenerator
|
||||
from game.missiongenerator.missiondata import MissionData, AwacsInfo, TankerInfo
|
||||
from game.radio.radios import RadioFrequency, RadioRegistry
|
||||
from game.radio.tacan import TacanBand, TacanRegistry, TacanUsage
|
||||
from game.runways import RunwayData
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
from dcs.point import MovingPoint
|
||||
from dcs.point import PointAction
|
||||
from dcs.task import Land
|
||||
|
||||
from game.utils import feet
|
||||
from dcs.point import PointAction
|
||||
|
||||
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ from dcs.task import (
|
||||
)
|
||||
|
||||
from game.ato import FlightType
|
||||
from game.theater import NavalControlPoint
|
||||
from game.utils import nautical_miles
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
@@ -32,9 +33,18 @@ class JoinPointBuilder(PydcsWaypointBuilder):
|
||||
waypoint.tasks.append(OptFormation.spread_four_open())
|
||||
|
||||
elif self.flight.flight_type == FlightType.SEAD_ESCORT:
|
||||
self.configure_escort_tasks(
|
||||
waypoint, [Targets.All.GroundUnits.AirDefence.AAA.SAMRelated]
|
||||
)
|
||||
if isinstance(self.flight.package.target, NavalControlPoint):
|
||||
self.configure_escort_tasks(
|
||||
waypoint,
|
||||
[
|
||||
Targets.All.Naval,
|
||||
Targets.All.GroundUnits.AirDefence.AAA.SAMRelated,
|
||||
],
|
||||
)
|
||||
else:
|
||||
self.configure_escort_tasks(
|
||||
waypoint, [Targets.All.GroundUnits.AirDefence.AAA.SAMRelated]
|
||||
)
|
||||
|
||||
# Let the AI use ECM to preemptively defend themselves.
|
||||
ecm_option = OptECMUsing(value=OptECMUsing.Values.UseIfDetectedLockByRadar)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from dcs.point import MovingPoint
|
||||
from dcs.task import RefuelingTaskAction
|
||||
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ from dcs.task import (
|
||||
OptECMUsing,
|
||||
WeaponType as DcsWeaponType,
|
||||
)
|
||||
from game.data.weapons import WeaponType
|
||||
|
||||
from game.data.weapons import WeaponType
|
||||
from game.theater import TheaterGroundObject
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
from dcs.point import MovingPoint, PointAction
|
||||
from dcs.task import Land
|
||||
|
||||
from .pydcswaypointbuilder import PydcsWaypointBuilder
|
||||
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
from typing import Any, Optional
|
||||
|
||||
from dcs import Mission
|
||||
from dcs.unitgroup import FlyingGroup
|
||||
from dcs.statics import Fortification
|
||||
from dcs.unitgroup import FlyingGroup
|
||||
|
||||
from game.ato import Flight
|
||||
from game.ato.flightplans.airassault import AirAssaultFlightPlan
|
||||
from game.ato.flightwaypointtype import FlightWaypointType
|
||||
@@ -9,7 +11,6 @@ from game.missiongenerator.missiondata import CargoInfo, LogisticsInfo
|
||||
from game.settings.settings import Settings
|
||||
from game.transfers import TransferOrder
|
||||
|
||||
|
||||
ZONE_RADIUS = 300
|
||||
CRATE_ZONE_RADIUS = 50
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ from game.plugins import LuaPluginManager
|
||||
from game.theater import TheaterGroundObject
|
||||
from game.theater.iadsnetwork.iadsrole import IadsRole
|
||||
from game.utils import escape_string_for_lua
|
||||
|
||||
from .missiondata import MissionData
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -3,9 +3,9 @@ from __future__ import annotations
|
||||
from dataclasses import dataclass, field
|
||||
from datetime import timedelta
|
||||
from typing import Optional, TYPE_CHECKING
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.missiongenerator.aircraft.flightdata import FlightData
|
||||
|
||||
from game.runways import RunwayData
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -9,15 +9,13 @@ from __future__ import annotations
|
||||
|
||||
import logging
|
||||
import random
|
||||
from collections import defaultdict
|
||||
from typing import Any, Dict, Iterator, List, Optional, TYPE_CHECKING, Type
|
||||
|
||||
import dcs.vehicles
|
||||
from dcs import Mission, Point, unitgroup
|
||||
from dcs import Mission, Point
|
||||
from dcs.action import DoScript, SceneryDestructionZone
|
||||
from dcs.condition import MapObjectIsDead
|
||||
from dcs.country import Country
|
||||
from dcs.point import StaticPoint
|
||||
from dcs.ships import (
|
||||
CVN_71,
|
||||
CVN_72,
|
||||
@@ -41,8 +39,8 @@ from dcs.unit import Unit, InvisibleFARP
|
||||
from dcs.unitgroup import MovingGroup, ShipGroup, StaticGroup, VehicleGroup
|
||||
from dcs.unittype import ShipType, VehicleType
|
||||
from dcs.vehicles import vehicle_map
|
||||
from game.missiongenerator.missiondata import CarrierInfo, MissionData
|
||||
|
||||
from game.missiongenerator.missiondata import CarrierInfo, MissionData
|
||||
from game.radio.radios import RadioFrequency, RadioRegistry
|
||||
from game.radio.tacan import TacanBand, TacanChannel, TacanRegistry, TacanUsage
|
||||
from game.runways import RunwayData
|
||||
@@ -53,7 +51,7 @@ from game.theater.theatergroundobject import (
|
||||
LhaGroundObject,
|
||||
MissileSiteGroundObject,
|
||||
)
|
||||
from game.theater.theatergroup import SceneryUnit, TheaterGroup, IadsGroundGroup
|
||||
from game.theater.theatergroup import SceneryUnit, IadsGroundGroup
|
||||
from game.unitmap import UnitMap
|
||||
from game.utils import Heading, feet, knots, mps
|
||||
|
||||
|
||||
@@ -59,7 +59,9 @@ class NavPoint:
|
||||
if not isinstance(other, NavPoint):
|
||||
return False
|
||||
|
||||
if not self.point.almost_equals(other.point):
|
||||
# The tolerance value used here is the same that was used by the now deprecated
|
||||
# almost_equals.
|
||||
if not self.point.equals_exact(other.point, 0.5 * 10 ** (-6)):
|
||||
return False
|
||||
|
||||
return self.poly == other.poly
|
||||
|
||||
@@ -4,7 +4,6 @@ from pathlib import Path
|
||||
from typing import Dict, List
|
||||
|
||||
from game.settings import Settings
|
||||
|
||||
from .luaplugin import LuaPlugin
|
||||
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import logging
|
||||
import re
|
||||
from dataclasses import dataclass
|
||||
from typing import Dict, FrozenSet, Iterator, List, Set, Tuple
|
||||
|
||||
from dcs.task import Modulation
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Iterable, List, TYPE_CHECKING
|
||||
|
||||
from dcs.mapping import Polygon
|
||||
|
||||
@@ -12,10 +12,10 @@ from game.server.frontlines.models import FrontLineJs
|
||||
from game.server.iadsnetwork.models import IadsConnectionJs
|
||||
from game.server.leaflet import LeafletPoint
|
||||
from game.server.mapzones.models import ThreatZonesJs
|
||||
from game.server.navmesh.models import NavMeshJs
|
||||
from game.server.tgos.models import TgoJs
|
||||
from game.server.mapzones.models import UnculledZoneJs
|
||||
from game.server.navmesh.models import NavMeshJs
|
||||
from game.server.supplyroutes.models import SupplyRouteJs
|
||||
from game.server.tgos.models import TgoJs
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
|
||||
@@ -7,12 +7,12 @@ from pydantic import BaseModel
|
||||
from game.server.controlpoints.models import ControlPointJs
|
||||
from game.server.flights.models import FlightJs
|
||||
from game.server.frontlines.models import FrontLineJs
|
||||
from game.server.iadsnetwork.models import IadsNetworkJs
|
||||
from game.server.leaflet import LeafletPoint
|
||||
from game.server.mapzones.models import ThreatZoneContainerJs, UnculledZoneJs
|
||||
from game.server.navmesh.models import NavMeshesJs
|
||||
from game.server.supplyroutes.models import SupplyRouteJs
|
||||
from game.server.tgos.models import TgoJs
|
||||
from game.server.iadsnetwork.models import IadsConnectionJs, IadsNetworkJs
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game import Game
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from uuid import UUID
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
from game.server.leaflet import LeafletPoint
|
||||
from game.theater.iadsnetwork.iadsnetwork import IadsNetworkNode, IadsNetwork
|
||||
from game.theater.theatergroundobject import TheaterGroundObject
|
||||
|
||||
|
||||
class IadsConnectionJs(BaseModel):
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from uuid import UUID
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from game import Game
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import uuid
|
||||
from typing import Any, TYPE_CHECKING
|
||||
from uuid import UUID
|
||||
|
||||
from dcs import Point
|
||||
from pydantic import BaseModel
|
||||
|
||||
@@ -4,9 +4,9 @@ import itertools
|
||||
from collections import defaultdict
|
||||
from typing import Sequence, Iterator, TYPE_CHECKING, Optional
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.ato.ai_flight_planner_db import aircraft_for_task
|
||||
from game.ato.closestairfields import ObjectiveDistanceCache
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from .squadrondefloader import SquadronDefLoader
|
||||
from ..campaignloader.squadrondefgenerator import SquadronDefGenerator
|
||||
from ..factions.faction import Faction
|
||||
|
||||
@@ -63,7 +63,6 @@ from .frontline import FrontLine
|
||||
from .missiontarget import MissionTarget
|
||||
from .theatergroundobject import (
|
||||
GenericCarrierGroundObject,
|
||||
IadsGroundObject,
|
||||
TheaterGroundObject,
|
||||
VehicleGroupGroundObject,
|
||||
)
|
||||
@@ -1177,7 +1176,10 @@ class NavalControlPoint(ControlPoint, ABC):
|
||||
# TODO: Inter-ship logistics?
|
||||
]
|
||||
else:
|
||||
yield FlightType.ANTISHIP
|
||||
yield from [
|
||||
FlightType.ANTISHIP,
|
||||
FlightType.SEAD_ESCORT,
|
||||
]
|
||||
yield from super().mission_types(for_player)
|
||||
|
||||
@property
|
||||
@@ -1425,6 +1427,7 @@ class Fob(ControlPoint):
|
||||
if not self.is_friendly(for_player):
|
||||
yield FlightType.STRIKE
|
||||
yield FlightType.AIR_ASSAULT
|
||||
yield FlightType.OCA_AIRCRAFT
|
||||
|
||||
yield from super().mission_types(for_player)
|
||||
|
||||
@@ -1433,7 +1436,10 @@ class Fob(ControlPoint):
|
||||
return len(self.helipads)
|
||||
|
||||
def can_operate(self, aircraft: AircraftType) -> bool:
|
||||
return aircraft.helicopter
|
||||
# FOBs and FARPs are the same class, distinguished only by non-FARP FOBs having
|
||||
# zero parking.
|
||||
# https://github.com/dcs-liberation/dcs_liberation/issues/2378
|
||||
return aircraft.helicopter and self.total_aircraft_parking > 0
|
||||
|
||||
@property
|
||||
def heading(self) -> Heading:
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
from __future__ import annotations
|
||||
from collections import defaultdict
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
import logging
|
||||
import uuid
|
||||
from collections import defaultdict
|
||||
from dataclasses import dataclass, field
|
||||
from typing import TYPE_CHECKING, Iterator, Optional
|
||||
from uuid import UUID
|
||||
import uuid
|
||||
from game.theater.iadsnetwork.iadsrole import IadsRole
|
||||
|
||||
from game.dcs.groundunittype import GroundUnitType
|
||||
from game.theater.iadsnetwork.iadsrole import IadsRole
|
||||
from game.theater.theatergroundobject import (
|
||||
IadsBuildingGroundObject,
|
||||
IadsGroundObject,
|
||||
@@ -179,7 +180,7 @@ class IadsNetwork:
|
||||
|
||||
def update_tgo(self, tgo: TheaterGroundObject, events: GameUpdateEvents) -> None:
|
||||
"""Update the IADS Network for the given TGO"""
|
||||
if IadsRole.for_category(tgo.category).is_comms_or_power:
|
||||
if self.advanced_iads and IadsRole.for_category(tgo.category).is_comms_or_power:
|
||||
return self._update_iads_comms_and_power(tgo, events)
|
||||
# Remove existing nodes for the given tgo
|
||||
for cn in self.nodes:
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from enum import Enum
|
||||
from game.data.groups import GroupTask
|
||||
|
||||
from game.data.groups import GroupTask
|
||||
from game.utils import Distance
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
from dataclasses import dataclass
|
||||
import pickle
|
||||
from functools import cached_property
|
||||
from typing import Optional, Tuple, Union
|
||||
import logging
|
||||
import pickle
|
||||
from dataclasses import dataclass
|
||||
from functools import cached_property
|
||||
from pathlib import Path
|
||||
from typing import Optional, Union
|
||||
|
||||
from shapely import geometry
|
||||
from shapely.geometry import MultiPolygon, Polygon
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
from typing import Iterator, TYPE_CHECKING, Union
|
||||
from typing import Iterator, TYPE_CHECKING
|
||||
|
||||
from dcs.mapping import Point
|
||||
from dcs.unit import Unit
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from game.ato.flighttype import FlightType
|
||||
|
||||
@@ -52,9 +52,15 @@ class GeneratorSettings:
|
||||
@dataclass
|
||||
class ModSettings:
|
||||
a4_skyhawk: bool = False
|
||||
a6a_intruder: bool = False
|
||||
f4b_phantom: bool = False
|
||||
f15d_baz: bool = False
|
||||
f_16_idf: bool = False
|
||||
f22_raptor: bool = False
|
||||
f84g_thunderjet: bool = False
|
||||
f100_supersabre: bool = False
|
||||
f104_starfighter: bool = False
|
||||
f105_thunderchief: bool = False
|
||||
hercules: bool = False
|
||||
uh_60l: bool = False
|
||||
jas39_gripen: bool = False
|
||||
|
||||
@@ -6,7 +6,6 @@ from abc import ABC
|
||||
from typing import Any, Iterator, List, Optional, TYPE_CHECKING
|
||||
|
||||
from dcs.mapping import Point
|
||||
|
||||
from shapely.geometry import Point as ShapelyPoint
|
||||
|
||||
from game.sidc import (
|
||||
@@ -351,7 +350,10 @@ class NavalGroundObject(TheaterGroundObject, ABC):
|
||||
from game.ato import FlightType
|
||||
|
||||
if not self.is_friendly(for_player):
|
||||
yield FlightType.ANTISHIP
|
||||
yield from [
|
||||
FlightType.ANTISHIP,
|
||||
FlightType.SEAD_ESCORT,
|
||||
]
|
||||
yield from super().mission_types(for_player)
|
||||
|
||||
@property
|
||||
|
||||
@@ -10,10 +10,10 @@ from dcs.triggers import TriggerZone
|
||||
from dcs.unit import Unit
|
||||
from dcs.unitgroup import FlyingGroup, VehicleGroup, ShipGroup
|
||||
|
||||
from game.ato.flight import Flight
|
||||
from game.dcs.groundunittype import GroundUnitType
|
||||
from game.squadrons import Pilot
|
||||
from game.theater import Airfield, ControlPoint, TheaterUnit
|
||||
from game.ato.flight import Flight
|
||||
from game.theater.theatergroup import SceneryUnit
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
||||
@@ -6,15 +6,24 @@ MINOR_VERSION = 0
|
||||
MICRO_VERSION = 0
|
||||
|
||||
|
||||
def _optional_build_id_component(path: Path) -> str | None:
|
||||
if path.exists():
|
||||
return path.read_text().strip()
|
||||
return None
|
||||
|
||||
|
||||
BUILD_NUMBER = _optional_build_id_component(Path("resources/buildnumber"))
|
||||
GIT_SHA = _optional_build_id_component(Path("resources/gitsha"))
|
||||
|
||||
|
||||
def _build_version_string() -> str:
|
||||
components = [
|
||||
".".join(str(v) for v in (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION))
|
||||
]
|
||||
build_number_path = Path("resources/buildnumber")
|
||||
if build_number_path.exists():
|
||||
with build_number_path.open("r", encoding="utf-8") as build_number_file:
|
||||
components.append(build_number_file.readline())
|
||||
|
||||
if BUILD_NUMBER is not None:
|
||||
components.append(BUILD_NUMBER)
|
||||
if GIT_SHA is not None:
|
||||
components.append(GIT_SHA)
|
||||
if not Path("resources/final").exists():
|
||||
components.append("preview")
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ from typing import Optional, TYPE_CHECKING
|
||||
from dcs.cloud_presets import Clouds as PydcsClouds
|
||||
from dcs.weather import CloudPreset, Weather as PydcsWeather, Wind
|
||||
|
||||
from game.theater.daytimemap import DaytimeMap
|
||||
from game.theater.seasonalconditions import determine_season
|
||||
from game.timeofday import TimeOfDay
|
||||
from game.utils import Distance, Heading, Pressure, inches_hg, interpolate, meters
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
from .a4ec import *
|
||||
from .a6a import *
|
||||
from .f4b import *
|
||||
from .f84g import *
|
||||
from .f100 import *
|
||||
from .f104 import *
|
||||
from .f105 import *
|
||||
from .f22a import *
|
||||
from .frenchpack import *
|
||||
from .hercules import *
|
||||
|
||||
257
pydcs_extensions/a6a/a6a.py
Normal file
257
pydcs_extensions/a6a/a6a.py
Normal file
@@ -0,0 +1,257 @@
|
||||
from typing import Set
|
||||
|
||||
from dcs import task
|
||||
from dcs.planes import PlaneType
|
||||
from dcs.weapons_data import Weapons
|
||||
from dcs.liveries_scanner import Liveries
|
||||
|
||||
from game.modsupport import planemod
|
||||
|
||||
|
||||
@planemod
|
||||
class VSN_A6A(PlaneType):
|
||||
id = "VSN_A6A"
|
||||
flyable = True
|
||||
group_size_max = 1
|
||||
height = 4.57
|
||||
width = 10.15
|
||||
length = 17.98
|
||||
fuel_max = 6994
|
||||
max_speed = 1047.96
|
||||
chaff = 30
|
||||
flare = 30
|
||||
charge_total = 60
|
||||
chaff_charge_size = 1
|
||||
flare_charge_size = 1
|
||||
eplrs = True
|
||||
radio_frequency = 250.5
|
||||
|
||||
livery_name = "VSN_A6A" # from type
|
||||
Liveries = Liveries()[livery_name]
|
||||
|
||||
class Pylon1:
|
||||
F_5_275Gal_Fuel_tank = (1, Weapons.F_5_275Gal_Fuel_tank)
|
||||
AIM_9M_Sidewinder_IR_AAM = (1, Weapons.AIM_9M_Sidewinder_IR_AAM)
|
||||
AIM_9X_Sidewinder_IR_AAM = (1, Weapons.AIM_9X_Sidewinder_IR_AAM)
|
||||
Mk_82___500lb_GP_Bomb_LD = (1, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (1, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (1, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
1,
|
||||
Weapons.BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD = (
|
||||
1,
|
||||
Weapons.BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD,
|
||||
)
|
||||
LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
1,
|
||||
Weapons.LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
1,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
1,
|
||||
Weapons.LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
1,
|
||||
Weapons.BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
1,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
1,
|
||||
Weapons.BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
|
||||
# ERRR {ac94375e-aa45-491e-858b-a8b93ee8b959}
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon2:
|
||||
F_5_275Gal_Fuel_tank = (2, Weapons.F_5_275Gal_Fuel_tank)
|
||||
AIM_9M_Sidewinder_IR_AAM = (2, Weapons.AIM_9M_Sidewinder_IR_AAM)
|
||||
AIM_9X_Sidewinder_IR_AAM = (2, Weapons.AIM_9X_Sidewinder_IR_AAM)
|
||||
Mk_82___500lb_GP_Bomb_LD = (2, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (2, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (2, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER6_with_6_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
2,
|
||||
Weapons.MER6_with_6_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
MER6_with_6_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets = (
|
||||
2,
|
||||
Weapons.MER6_with_6_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
2,
|
||||
Weapons.BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD = (
|
||||
2,
|
||||
Weapons.BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD,
|
||||
)
|
||||
LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
2,
|
||||
Weapons.LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
2,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
2,
|
||||
Weapons.LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
2,
|
||||
Weapons.BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
2,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
2,
|
||||
Weapons.BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
|
||||
# ERRR {ac94375e-aa45-491e-858b-a8b93ee8b959}
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon3:
|
||||
F_5_275Gal_Fuel_tank = (3, Weapons.F_5_275Gal_Fuel_tank)
|
||||
Mk_82___500lb_GP_Bomb_LD = (3, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (3, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (3, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER6_with_6_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
3,
|
||||
Weapons.MER6_with_6_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
MER6_with_6_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets = (
|
||||
3,
|
||||
Weapons.MER6_with_6_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
3,
|
||||
Weapons.BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD = (
|
||||
3,
|
||||
Weapons.BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD,
|
||||
)
|
||||
|
||||
# ERRR {ac94375e-aa45-491e-858b-a8b93ee8b959}
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon4:
|
||||
F_5_275Gal_Fuel_tank = (4, Weapons.F_5_275Gal_Fuel_tank)
|
||||
AIM_9M_Sidewinder_IR_AAM = (4, Weapons.AIM_9M_Sidewinder_IR_AAM)
|
||||
AIM_9X_Sidewinder_IR_AAM = (4, Weapons.AIM_9X_Sidewinder_IR_AAM)
|
||||
Mk_82___500lb_GP_Bomb_LD = (4, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (4, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (4, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER6_with_6_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
4,
|
||||
Weapons.MER6_with_6_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
MER6_with_6_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets = (
|
||||
4,
|
||||
Weapons.MER6_with_6_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
4,
|
||||
Weapons.BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD = (
|
||||
4,
|
||||
Weapons.BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD,
|
||||
)
|
||||
LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
4,
|
||||
Weapons.LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
4,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
4,
|
||||
Weapons.LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
4,
|
||||
Weapons.BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
4,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
4,
|
||||
Weapons.BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
|
||||
# ERRR {ac94375e-aa45-491e-858b-a8b93ee8b959}
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon5:
|
||||
F_5_275Gal_Fuel_tank = (5, Weapons.F_5_275Gal_Fuel_tank)
|
||||
AIM_9M_Sidewinder_IR_AAM = (5, Weapons.AIM_9M_Sidewinder_IR_AAM)
|
||||
AIM_9X_Sidewinder_IR_AAM = (5, Weapons.AIM_9X_Sidewinder_IR_AAM)
|
||||
Mk_82___500lb_GP_Bomb_LD = (5, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (5, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (5, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
5,
|
||||
Weapons.BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD = (
|
||||
5,
|
||||
Weapons.BRU_42_with_3_x_Mk_82_AIR_Ballute___500lb_GP_Bombs_HD,
|
||||
)
|
||||
LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
5,
|
||||
Weapons.LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
5,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
5,
|
||||
Weapons.LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
5,
|
||||
Weapons.BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
5,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
5,
|
||||
Weapons.BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
|
||||
# ERRR {ac94375e-aa45-491e-858b-a8b93ee8b959}
|
||||
# ERRR <CLEAN>
|
||||
|
||||
pylons: Set[int] = {1, 2, 3, 4, 5}
|
||||
|
||||
tasks = [
|
||||
task.Escort,
|
||||
task.Reconnaissance,
|
||||
task.GroundAttack,
|
||||
task.CAS,
|
||||
task.AFAC,
|
||||
task.RunwayAttack,
|
||||
task.AntishipStrike,
|
||||
task.SEAD,
|
||||
]
|
||||
task_default = task.GroundAttack
|
||||
408
pydcs_extensions/f100/f100.py
Normal file
408
pydcs_extensions/f100/f100.py
Normal file
@@ -0,0 +1,408 @@
|
||||
from typing import Set
|
||||
|
||||
from dcs import task
|
||||
from dcs.liveries_scanner import Liveries
|
||||
from dcs.planes import PlaneType
|
||||
from dcs.weapons_data import Weapons
|
||||
|
||||
from game.modsupport import planemod
|
||||
from pydcs_extensions.weapon_injector import inject_weapons
|
||||
|
||||
|
||||
class WeaponsF100:
|
||||
Fuel_tank_1000_Liter = {
|
||||
"clsid": "{VSN_F1001000_ptb}",
|
||||
"name": "Fuel tank 1000 Liter",
|
||||
"weight": 934,
|
||||
}
|
||||
Fuel_tank_500_Liter = {
|
||||
"clsid": "{VSN_F100500_ptb}",
|
||||
"name": "Fuel tank 500 Liter",
|
||||
"weight": 693,
|
||||
}
|
||||
TER_M117_F_105 = {
|
||||
"clsid": "{SB_F105_TER9A_M117_3}",
|
||||
"name": "TER M117 F-105",
|
||||
"weight": 1500,
|
||||
}
|
||||
MER_6_M117_F_105 = {
|
||||
"clsid": "{SB_F105_BRU_41A_M117_6}",
|
||||
"name": "MER*6 M117 F-105",
|
||||
"weight": 2100,
|
||||
}
|
||||
|
||||
|
||||
inject_weapons(WeaponsF100)
|
||||
|
||||
|
||||
@planemod
|
||||
class VSN_F100(PlaneType):
|
||||
id = "VSN_F100"
|
||||
flyable = True
|
||||
height = 4.95
|
||||
width = 11.81
|
||||
length = 15
|
||||
fuel_max = 3397
|
||||
max_speed = 1702.8
|
||||
chaff = 30
|
||||
flare = 15
|
||||
charge_total = 60
|
||||
chaff_charge_size = 1
|
||||
flare_charge_size = 2
|
||||
category = "Interceptor" # {78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}
|
||||
|
||||
livery_name = "VSN_F100" # from type
|
||||
Liveries = Liveries()[livery_name]
|
||||
|
||||
class Pylon2:
|
||||
L_081_Fantasmagoria_ELINT_pod = (2, Weapons.L_081_Fantasmagoria_ELINT_pod)
|
||||
|
||||
class Pylon3:
|
||||
AN_ASQ_T50_TCTS_Pod___ACMI_Pod = (3, Weapons.AN_ASQ_T50_TCTS_Pod___ACMI_Pod)
|
||||
AIM_9P_Sidewinder_IR_AAM = (3, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (3, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (3, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
LAU_7_with_AIM_9B_Sidewinder_IR_AAM = (
|
||||
3,
|
||||
Weapons.LAU_7_with_AIM_9B_Sidewinder_IR_AAM,
|
||||
)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (3, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
3,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
3,
|
||||
Weapons.BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD = (
|
||||
3,
|
||||
Weapons.BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (3, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (3, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
M117___750lb_GP_Bomb_LD = (3, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
AGM_45A_Shrike_ARM = (3, Weapons.AGM_45A_Shrike_ARM)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
3,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
3,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
3,
|
||||
Weapons.BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
3,
|
||||
Weapons.BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
3,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_20_Rockeye___490lbs_CBU__247_x_HEAT_Bomblets = (
|
||||
3,
|
||||
Weapons.BRU_33_with_2_x_Mk_20_Rockeye___490lbs_CBU__247_x_HEAT_Bomblets,
|
||||
)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon4:
|
||||
AIM_9P_Sidewinder_IR_AAM = (4, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (4, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (4, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (4, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
4,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
4,
|
||||
Weapons.BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD = (
|
||||
4,
|
||||
Weapons.BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD,
|
||||
)
|
||||
TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
4,
|
||||
Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (4, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (4, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
M117___750lb_GP_Bomb_LD = (4, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
TER_M117_F_105 = (4, WeaponsF100.TER_M117_F_105)
|
||||
AGM_45A_Shrike_ARM = (4, Weapons.AGM_45A_Shrike_ARM)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
4,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
4,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
Fuel_tank_1000_Liter = (4, WeaponsF100.Fuel_tank_1000_Liter)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon5:
|
||||
AIM_9P_Sidewinder_IR_AAM = (5, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (5, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (5, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
LAU_105_with_2_x_AIM_9P_Sidewinder_IR_AAM = (
|
||||
5,
|
||||
Weapons.LAU_105_with_2_x_AIM_9P_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_105_with_2_x_AIM_9M_Sidewinder_IR_AAM = (
|
||||
5,
|
||||
Weapons.LAU_105_with_2_x_AIM_9M_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_7_with_2_x_AIM_9L_Sidewinder_IR_AAM = (
|
||||
5,
|
||||
Weapons.LAU_7_with_2_x_AIM_9L_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_7_with_2_x_AIM_9B_Sidewinder_IR_AAM = (
|
||||
5,
|
||||
Weapons.LAU_7_with_2_x_AIM_9B_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_7_with_2_x_AIM_9P5_Sidewinder_IR_AAM = (
|
||||
5,
|
||||
Weapons.LAU_7_with_2_x_AIM_9P5_Sidewinder_IR_AAM,
|
||||
)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (5, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
5,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
5,
|
||||
Weapons.BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD = (
|
||||
5,
|
||||
Weapons.BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (5, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (5, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
5,
|
||||
Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
MER_6_M117_F_105 = (5, WeaponsF100.MER_6_M117_F_105)
|
||||
TER_M117_F_105 = (5, WeaponsF100.TER_M117_F_105)
|
||||
_3_Mk_83 = (5, Weapons._3_Mk_83)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
5,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
5,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
5,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_7_with_AIM_9P_Sidewinder_IR_AAM = (
|
||||
5,
|
||||
Weapons.LAU_7_with_AIM_9P_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_7_with_AIM_9B_Sidewinder_IR_AAM = (
|
||||
5,
|
||||
Weapons.LAU_7_with_AIM_9B_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_118a_with_AGM_45B_Shrike_ARM__Imp_ = (
|
||||
5,
|
||||
Weapons.LAU_118a_with_AGM_45B_Shrike_ARM__Imp_,
|
||||
)
|
||||
|
||||
Fuel_tank_500_Liter = (5, WeaponsF100.Fuel_tank_500_Liter)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon6:
|
||||
Smoke_Generator___red_ = (6, Weapons.Smoke_Generator___red_)
|
||||
Smoke_Generator___green_ = (6, Weapons.Smoke_Generator___green_)
|
||||
Smoke_Generator___blue_ = (6, Weapons.Smoke_Generator___blue_)
|
||||
Smoke_Generator___white_ = (6, Weapons.Smoke_Generator___white_)
|
||||
Smoke_Generator___yellow_ = (6, Weapons.Smoke_Generator___yellow_)
|
||||
Smoke_Generator___orange_ = (6, Weapons.Smoke_Generator___orange_)
|
||||
|
||||
class Pylon7:
|
||||
AIM_9P_Sidewinder_IR_AAM = (7, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (7, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (7, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
LAU_105_with_2_x_AIM_9P_Sidewinder_IR_AAM = (
|
||||
7,
|
||||
Weapons.LAU_105_with_2_x_AIM_9P_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_105_with_2_x_AIM_9M_Sidewinder_IR_AAM = (
|
||||
7,
|
||||
Weapons.LAU_105_with_2_x_AIM_9M_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_7_with_2_x_AIM_9L_Sidewinder_IR_AAM = (
|
||||
7,
|
||||
Weapons.LAU_7_with_2_x_AIM_9L_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_7_with_2_x_AIM_9B_Sidewinder_IR_AAM = (
|
||||
7,
|
||||
Weapons.LAU_7_with_2_x_AIM_9B_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_7_with_2_x_AIM_9P5_Sidewinder_IR_AAM = (
|
||||
7,
|
||||
Weapons.LAU_7_with_2_x_AIM_9P5_Sidewinder_IR_AAM,
|
||||
)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (7, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
7,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
7,
|
||||
Weapons.BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD = (
|
||||
7,
|
||||
Weapons.BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (7, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (7, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
7,
|
||||
Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
MER_6_M117_F_105 = (7, WeaponsF100.MER_6_M117_F_105)
|
||||
TER_M117_F_105 = (7, WeaponsF100.TER_M117_F_105)
|
||||
_3_Mk_83 = (7, Weapons._3_Mk_83)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
7,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
7,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
7,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_7_with_AIM_9B_Sidewinder_IR_AAM = (
|
||||
7,
|
||||
Weapons.LAU_7_with_AIM_9B_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_7_with_AIM_9P_Sidewinder_IR_AAM = (
|
||||
7,
|
||||
Weapons.LAU_7_with_AIM_9P_Sidewinder_IR_AAM,
|
||||
)
|
||||
Fuel_tank_500_Liter = (7, WeaponsF100.Fuel_tank_500_Liter)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon8:
|
||||
AIM_9P_Sidewinder_IR_AAM = (8, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (8, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (8, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (8, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
8,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
8,
|
||||
Weapons.BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD = (
|
||||
8,
|
||||
Weapons.BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD,
|
||||
)
|
||||
TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
8,
|
||||
Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (8, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (8, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
M117___750lb_GP_Bomb_LD = (8, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
TER_M117_F_105 = (8, WeaponsF100.TER_M117_F_105)
|
||||
AGM_45A_Shrike_ARM = (8, Weapons.AGM_45A_Shrike_ARM)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
8,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
8,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
Fuel_tank_1000_Liter = (8, WeaponsF100.Fuel_tank_1000_Liter)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon9:
|
||||
AN_ASQ_T50_TCTS_Pod___ACMI_Pod = (9, Weapons.AN_ASQ_T50_TCTS_Pod___ACMI_Pod)
|
||||
AIM_9P_Sidewinder_IR_AAM = (9, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (9, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (9, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (9, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
9,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
LAU_7_with_AIM_9B_Sidewinder_IR_AAM = (
|
||||
9,
|
||||
Weapons.LAU_7_with_AIM_9B_Sidewinder_IR_AAM,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
9,
|
||||
Weapons.BRU_33_with_2_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD = (
|
||||
9,
|
||||
Weapons.BRU_33_with_2_x_Mk_82_Snakeye___500lb_GP_Bomb_HD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (9, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (9, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
M117___750lb_GP_Bomb_LD = (9, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
AGM_45A_Shrike_ARM = (9, Weapons.AGM_45A_Shrike_ARM)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
9,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
9,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
9,
|
||||
Weapons.BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
9,
|
||||
Weapons.BRU_33_with_2_x_LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
9,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_20_Rockeye___490lbs_CBU__247_x_HEAT_Bomblets = (
|
||||
9,
|
||||
Weapons.BRU_33_with_2_x_Mk_20_Rockeye___490lbs_CBU__247_x_HEAT_Bomblets,
|
||||
)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
pylons: Set[int] = {2, 3, 4, 5, 6, 7, 8, 9}
|
||||
|
||||
tasks = [
|
||||
task.CAP,
|
||||
task.Escort,
|
||||
task.FighterSweep,
|
||||
task.Intercept,
|
||||
task.Reconnaissance,
|
||||
task.GroundAttack,
|
||||
task.CAS,
|
||||
task.RunwayAttack,
|
||||
task.AntishipStrike,
|
||||
]
|
||||
task_default = task.FighterSweep
|
||||
395
pydcs_extensions/f105/f105.py
Normal file
395
pydcs_extensions/f105/f105.py
Normal file
@@ -0,0 +1,395 @@
|
||||
from typing import Set
|
||||
|
||||
from dcs import task
|
||||
from dcs.liveries_scanner import Liveries
|
||||
from dcs.planes import PlaneType
|
||||
from dcs.weapons_data import Weapons
|
||||
|
||||
from game.modsupport import planemod
|
||||
from pydcs_extensions.weapon_injector import inject_weapons
|
||||
|
||||
|
||||
class WeaponsF105:
|
||||
Fuel_Tank = {"clsid": "{VSN_F105G_PTB}", "name": "Fuel Tank", "weight": 3027}
|
||||
Fuel_Tank_ = {
|
||||
"clsid": "{VSN_F105G_Center_PTB}",
|
||||
"name": "Fuel Tank",
|
||||
"weight": 2062,
|
||||
}
|
||||
LAU_105_2_AIM_9L__ = {
|
||||
"clsid": "{VSN_F105_LAU105_AIM9L}",
|
||||
"name": "LAU-105 2*AIM-9L",
|
||||
"weight": 332,
|
||||
}
|
||||
LAU_105_2_AIM_9P_ = {
|
||||
"clsid": "{VSN_F105_LAU105_AIM9P}",
|
||||
"name": "LAU-105 2*AIM-9P",
|
||||
"weight": 332,
|
||||
}
|
||||
MER_6_M117_F_105 = {
|
||||
"clsid": "{SB_F105_BRU_41A_M117_6}",
|
||||
"name": "MER*6 M117 F-105",
|
||||
"weight": 2100,
|
||||
}
|
||||
MER_6_Mk_82_F_105 = {
|
||||
"clsid": "{VSN_F105_MK82_6}",
|
||||
"name": "MER*6 Mk-82 F-105",
|
||||
"weight": 1506,
|
||||
}
|
||||
TER_M117_F_105 = {
|
||||
"clsid": "{SB_F105_TER9A_M117_3}",
|
||||
"name": "TER M117 F-105",
|
||||
"weight": 1500,
|
||||
}
|
||||
vsn_f105_lau6 = {"clsid": "{F105_LAUx6}", "name": "vsn_f105_lau6", "weight": None}
|
||||
|
||||
|
||||
inject_weapons(WeaponsF105)
|
||||
|
||||
|
||||
@planemod
|
||||
class VSN_F105G(PlaneType):
|
||||
id = "VSN_F105G"
|
||||
flyable = True
|
||||
height = 6.157
|
||||
width = 10.63
|
||||
length = 20.04
|
||||
fuel_max = 4986
|
||||
max_speed = 2240.928
|
||||
chaff = 30
|
||||
flare = 15
|
||||
charge_total = 60
|
||||
chaff_charge_size = 1
|
||||
flare_charge_size = 2
|
||||
category = "Interceptor" # {78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}
|
||||
|
||||
livery_name = "VSN_F105G" # from type
|
||||
Liveries = Liveries()[livery_name]
|
||||
|
||||
class Pylon3:
|
||||
Smoke_Generator___red_ = (3, Weapons.Smoke_Generator___red_)
|
||||
Smoke_Generator___green_ = (3, Weapons.Smoke_Generator___green_)
|
||||
Smoke_Generator___blue_ = (3, Weapons.Smoke_Generator___blue_)
|
||||
Smoke_Generator___white_ = (3, Weapons.Smoke_Generator___white_)
|
||||
Smoke_Generator___yellow_ = (3, Weapons.Smoke_Generator___yellow_)
|
||||
Smoke_Generator___orange_ = (3, Weapons.Smoke_Generator___orange_)
|
||||
|
||||
class Pylon4:
|
||||
AN_ASQ_T50_TCTS_Pod___ACMI_Pod = (4, Weapons.AN_ASQ_T50_TCTS_Pod___ACMI_Pod)
|
||||
LAU_105_2_AIM_9L__ = (4, WeaponsF105.LAU_105_2_AIM_9L__)
|
||||
LAU_105_2_AIM_9P_ = (4, WeaponsF105.LAU_105_2_AIM_9P_)
|
||||
AIM_9P_Sidewinder_IR_AAM = (4, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (4, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (4, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (4, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
4,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (4, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (4, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
M117___750lb_GP_Bomb_LD = (4, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
AGM_45A_Shrike_ARM = (4, Weapons.AGM_45A_Shrike_ARM)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
4,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
4,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon5:
|
||||
AGM_45A_Shrike_ARM = (5, Weapons.AGM_45A_Shrike_ARM)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (5, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
5,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (5, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (5, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
MER_6_Mk_82_F_105 = (5, WeaponsF105.MER_6_Mk_82_F_105)
|
||||
Fuel_Tank = (5, WeaponsF105.Fuel_Tank)
|
||||
TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
5,
|
||||
Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
MER_6_M117_F_105 = (5, WeaponsF105.MER_6_M117_F_105)
|
||||
TER_M117_F_105 = (5, WeaponsF105.TER_M117_F_105)
|
||||
_3_Mk_83 = (5, Weapons._3_Mk_83)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
5,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
5,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
|
||||
# ERRR {BRU33_2*LAU61_M282}
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon6:
|
||||
Mk_84___2000lb_GP_Bomb_LD = (6, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
6,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (6, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
MER_6_Mk_82_F_105 = (6, WeaponsF105.MER_6_Mk_82_F_105)
|
||||
MER_6_M117_F_105 = (6, WeaponsF105.MER_6_M117_F_105)
|
||||
TER_M117_F_105 = (6, WeaponsF105.TER_M117_F_105)
|
||||
_3_Mk_83 = (6, Weapons._3_Mk_83)
|
||||
Fuel_Tank_ = (6, WeaponsF105.Fuel_Tank_)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon7:
|
||||
AGM_45A_Shrike_ARM = (7, Weapons.AGM_45A_Shrike_ARM)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (7, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
7,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (7, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (7, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
MER_6_Mk_82_F_105 = (7, WeaponsF105.MER_6_Mk_82_F_105)
|
||||
Fuel_Tank = (7, WeaponsF105.Fuel_Tank)
|
||||
TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
7,
|
||||
Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
MER_6_M117_F_105 = (7, WeaponsF105.MER_6_M117_F_105)
|
||||
TER_M117_F_105 = (7, WeaponsF105.TER_M117_F_105)
|
||||
_3_Mk_83 = (7, Weapons._3_Mk_83)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
7,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
7,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
|
||||
# ERRR {BRU33_2*LAU61_M282}
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon8:
|
||||
AN_ASQ_T50_TCTS_Pod___ACMI_Pod = (8, Weapons.AN_ASQ_T50_TCTS_Pod___ACMI_Pod)
|
||||
LAU_105_2_AIM_9L__ = (8, WeaponsF105.LAU_105_2_AIM_9L__)
|
||||
LAU_105_2_AIM_9P_ = (8, WeaponsF105.LAU_105_2_AIM_9P_)
|
||||
AIM_9P_Sidewinder_IR_AAM = (8, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (8, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (8, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (8, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
8,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (8, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (8, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
M117___750lb_GP_Bomb_LD = (8, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
AGM_45A_Shrike_ARM = (8, Weapons.AGM_45A_Shrike_ARM)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
8,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
8,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon9:
|
||||
L_081_Fantasmagoria_ELINT_pod = (9, Weapons.L_081_Fantasmagoria_ELINT_pod)
|
||||
|
||||
pylons: Set[int] = {3, 4, 5, 6, 7, 8, 9}
|
||||
|
||||
tasks = [
|
||||
task.CAP,
|
||||
task.Escort,
|
||||
task.FighterSweep,
|
||||
task.Intercept,
|
||||
task.Reconnaissance,
|
||||
task.GroundAttack,
|
||||
task.CAS,
|
||||
task.RunwayAttack,
|
||||
task.AntishipStrike,
|
||||
]
|
||||
task_default = task.FighterSweep
|
||||
|
||||
|
||||
@planemod
|
||||
class VSN_F105D(PlaneType):
|
||||
id = "VSN_F105D"
|
||||
flyable = True
|
||||
height = 6.157
|
||||
width = 10.63
|
||||
length = 20.04
|
||||
fuel_max = 4986
|
||||
max_speed = 2240.928
|
||||
chaff = 30
|
||||
flare = 15
|
||||
charge_total = 60
|
||||
chaff_charge_size = 1
|
||||
flare_charge_size = 2
|
||||
category = "Interceptor" # {78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}
|
||||
|
||||
livery_name = "VSN_F105D" # from type
|
||||
Liveries = Liveries()[livery_name]
|
||||
|
||||
class Pylon3:
|
||||
Smoke_Generator___red_ = (3, Weapons.Smoke_Generator___red_)
|
||||
Smoke_Generator___green_ = (3, Weapons.Smoke_Generator___green_)
|
||||
Smoke_Generator___blue_ = (3, Weapons.Smoke_Generator___blue_)
|
||||
Smoke_Generator___white_ = (3, Weapons.Smoke_Generator___white_)
|
||||
Smoke_Generator___yellow_ = (3, Weapons.Smoke_Generator___yellow_)
|
||||
Smoke_Generator___orange_ = (3, Weapons.Smoke_Generator___orange_)
|
||||
|
||||
class Pylon4:
|
||||
AN_ASQ_T50_TCTS_Pod___ACMI_Pod = (4, Weapons.AN_ASQ_T50_TCTS_Pod___ACMI_Pod)
|
||||
AIM_9P_Sidewinder_IR_AAM = (4, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (4, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (4, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
LAU_105_2_AIM_9L__ = (4, WeaponsF105.LAU_105_2_AIM_9L__)
|
||||
LAU_105_2_AIM_9P_ = (4, WeaponsF105.LAU_105_2_AIM_9P_)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (4, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
4,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (4, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (4, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
M117___750lb_GP_Bomb_LD = (4, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
AGM_45A_Shrike_ARM = (4, Weapons.AGM_45A_Shrike_ARM)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
4,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
4,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon5:
|
||||
Mk_84___2000lb_GP_Bomb_LD = (5, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
5,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (5, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (5, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
MER_6_Mk_82_F_105 = (5, WeaponsF105.MER_6_Mk_82_F_105)
|
||||
Fuel_Tank = (5, WeaponsF105.Fuel_Tank)
|
||||
TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
5,
|
||||
Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
MER_6_M117_F_105 = (5, WeaponsF105.MER_6_M117_F_105)
|
||||
TER_M117_F_105 = (5, WeaponsF105.TER_M117_F_105)
|
||||
_3_Mk_83 = (5, Weapons._3_Mk_83)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
5,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
5,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
|
||||
# ERRR {BRU33_2*LAU61_M282}
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon6:
|
||||
Mk_84___2000lb_GP_Bomb_LD = (6, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
6,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (6, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
MER_6_Mk_82_F_105 = (6, WeaponsF105.MER_6_Mk_82_F_105)
|
||||
MER_6_M117_F_105 = (6, WeaponsF105.MER_6_M117_F_105)
|
||||
TER_M117_F_105 = (6, WeaponsF105.TER_M117_F_105)
|
||||
_3_Mk_83 = (6, Weapons._3_Mk_83)
|
||||
Fuel_Tank_ = (6, WeaponsF105.Fuel_Tank_)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon7:
|
||||
Mk_84___2000lb_GP_Bomb_LD = (7, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
7,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (7, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (7, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
MER_6_Mk_82_F_105 = (7, WeaponsF105.MER_6_Mk_82_F_105)
|
||||
Fuel_Tank = (7, WeaponsF105.Fuel_Tank)
|
||||
TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
7,
|
||||
Weapons.TER_9A_with_3_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
MER_6_M117_F_105 = (7, WeaponsF105.MER_6_M117_F_105)
|
||||
TER_M117_F_105 = (7, WeaponsF105.TER_M117_F_105)
|
||||
_3_Mk_83 = (7, Weapons._3_Mk_83)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
7,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
7,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
|
||||
# ERRR {BRU33_2*LAU61_M282}
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon8:
|
||||
AN_ASQ_T50_TCTS_Pod___ACMI_Pod = (8, Weapons.AN_ASQ_T50_TCTS_Pod___ACMI_Pod)
|
||||
AIM_9P_Sidewinder_IR_AAM = (8, Weapons.AIM_9P_Sidewinder_IR_AAM)
|
||||
AIM_9L_Sidewinder_IR_AAM = (8, Weapons.AIM_9L_Sidewinder_IR_AAM)
|
||||
AIM_9B_Sidewinder_IR_AAM = (8, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
LAU_105_2_AIM_9L__ = (8, WeaponsF105.LAU_105_2_AIM_9L__)
|
||||
LAU_105_2_AIM_9P_ = (8, WeaponsF105.LAU_105_2_AIM_9P_)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (8, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
8,
|
||||
Weapons.MER2_with_2_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (8, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (8, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
M117___750lb_GP_Bomb_LD = (8, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
AGM_45A_Shrike_ARM = (8, Weapons.AGM_45A_Shrike_ARM)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE = (
|
||||
8,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk1__HE,
|
||||
)
|
||||
LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT = (
|
||||
8,
|
||||
Weapons.LAU_3_pod___19_x_2_75_FFAR__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
|
||||
# ERRR <CLEAN>
|
||||
|
||||
class Pylon9:
|
||||
L_081_Fantasmagoria_ELINT_pod = (9, Weapons.L_081_Fantasmagoria_ELINT_pod)
|
||||
|
||||
pylons: Set[int] = {3, 4, 5, 6, 7, 8, 9}
|
||||
|
||||
tasks = [
|
||||
task.CAP,
|
||||
task.Escort,
|
||||
task.FighterSweep,
|
||||
task.Intercept,
|
||||
task.Reconnaissance,
|
||||
task.GroundAttack,
|
||||
task.CAS,
|
||||
task.RunwayAttack,
|
||||
task.AntishipStrike,
|
||||
]
|
||||
task_default = task.FighterSweep
|
||||
4752
pydcs_extensions/f16i_idf/f16i_idf.py
Normal file
4752
pydcs_extensions/f16i_idf/f16i_idf.py
Normal file
File diff suppressed because it is too large
Load Diff
416
pydcs_extensions/f4b/f4b.py
Normal file
416
pydcs_extensions/f4b/f4b.py
Normal file
@@ -0,0 +1,416 @@
|
||||
from dcs import task
|
||||
from dcs.planes import PlaneType
|
||||
from dcs.weapons_data import Weapons
|
||||
from dcs.liveries_scanner import Liveries
|
||||
|
||||
from game.modsupport import planemod
|
||||
from pydcs_extensions.weapon_injector import inject_weapons
|
||||
|
||||
|
||||
class WeaponsF4B:
|
||||
F4B_SUU_23_Gun_Pod = {
|
||||
"clsid": "{VSN_F4B_Gunpod}",
|
||||
"name": "F4B SUU-23 Gun Pod",
|
||||
"weight": 112.35,
|
||||
}
|
||||
VSN_F4EC_PTB = {
|
||||
"clsid": "VSN_F4EC_PTB",
|
||||
"name": "Fuel tank 600 Gal",
|
||||
"weight": 1980,
|
||||
}
|
||||
VSN_F4EL_PTB = {
|
||||
"clsid": "VSN_F4EL_PTB",
|
||||
"name": "Fuel tank 370 Gal",
|
||||
"weight": 1240,
|
||||
}
|
||||
VSN_F4ER_PTB = {
|
||||
"clsid": "VSN_F4ER_PTB",
|
||||
"name": "Fuel tank 370 Gal",
|
||||
"weight": 1240,
|
||||
}
|
||||
LAU_105_2_AIM_9J = {
|
||||
"clsid": "{VSN_F4B_LAU105_AIM9J}",
|
||||
"name": "LAU-105 2*AIM-9J",
|
||||
"weight": 332,
|
||||
}
|
||||
LAU_105_2_AIM_9JULI = {
|
||||
"clsid": "{VSN_F4B_LAU105_AIM9JULI}",
|
||||
"name": "LAU-105 2*AIM-9JULI",
|
||||
"weight": 332,
|
||||
}
|
||||
|
||||
|
||||
inject_weapons(WeaponsF4B)
|
||||
|
||||
|
||||
@planemod
|
||||
class VSN_F4B(PlaneType):
|
||||
id = "VSN_F4B"
|
||||
flyable = True
|
||||
height = 5.02
|
||||
width = 11.71
|
||||
length = 19.2
|
||||
fuel_max = 6416
|
||||
max_speed = 2545.2
|
||||
chaff = 48
|
||||
flare = 48
|
||||
charge_total = 96
|
||||
chaff_charge_size = 1
|
||||
flare_charge_size = 1
|
||||
category = "Interceptor" # {78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}
|
||||
radio_frequency = 127.5
|
||||
|
||||
livery_name = "VSN_F4B" # from type
|
||||
Liveries = Liveries()[livery_name]
|
||||
|
||||
class Pylon1:
|
||||
Smoke_Generator___red_ = (1, Weapons.Smoke_Generator___red_)
|
||||
Smoke_Generator___green_ = (1, Weapons.Smoke_Generator___green_)
|
||||
Smoke_Generator___blue_ = (1, Weapons.Smoke_Generator___blue_)
|
||||
Smoke_Generator___white_ = (1, Weapons.Smoke_Generator___white_)
|
||||
Smoke_Generator___yellow_ = (1, Weapons.Smoke_Generator___yellow_)
|
||||
Smoke_Generator___orange_ = (1, Weapons.Smoke_Generator___orange_)
|
||||
|
||||
class Pylon2:
|
||||
GBU_10___2000lb_Laser_Guided_Bomb = (
|
||||
2,
|
||||
Weapons.GBU_10___2000lb_Laser_Guided_Bomb,
|
||||
)
|
||||
GBU_12___500lb_Laser_Guided_Bomb = (2, Weapons.GBU_12___500lb_Laser_Guided_Bomb)
|
||||
BRU_42_with_3_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets = (
|
||||
2,
|
||||
Weapons.BRU_42_with_3_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets,
|
||||
)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (2, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
2,
|
||||
Weapons.LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
2,
|
||||
Weapons.LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
_3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
2,
|
||||
Weapons._3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos = (
|
||||
2,
|
||||
Weapons.LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos,
|
||||
)
|
||||
LAU_118a_with_AGM_45B_Shrike_ARM__Imp_ = (
|
||||
2,
|
||||
Weapons.LAU_118a_with_AGM_45B_Shrike_ARM__Imp_,
|
||||
)
|
||||
Smokewinder___red = (2, Weapons.Smokewinder___red)
|
||||
Smokewinder___green = (2, Weapons.Smokewinder___green)
|
||||
Smokewinder___blue = (2, Weapons.Smokewinder___blue)
|
||||
Smokewinder___white = (2, Weapons.Smokewinder___white)
|
||||
Smokewinder___yellow = (2, Weapons.Smokewinder___yellow)
|
||||
BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
2,
|
||||
Weapons.BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
2,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_41A_with_6_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
2,
|
||||
Weapons.BRU_41A_with_6_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
BRU_33_with_2_x_GBU_12___500lb_Laser_Guided_Bomb = (
|
||||
2,
|
||||
Weapons.BRU_33_with_2_x_GBU_12___500lb_Laser_Guided_Bomb,
|
||||
)
|
||||
VSN_F4EL_PTB = (2, WeaponsF4B.VSN_F4EL_PTB)
|
||||
|
||||
class Pylon3:
|
||||
GBU_10___2000lb_Laser_Guided_Bomb = (
|
||||
3,
|
||||
Weapons.GBU_10___2000lb_Laser_Guided_Bomb,
|
||||
)
|
||||
GBU_12___500lb_Laser_Guided_Bomb = (3, Weapons.GBU_12___500lb_Laser_Guided_Bomb)
|
||||
BRU_42_with_3_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets = (
|
||||
3,
|
||||
Weapons.BRU_42_with_3_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
3,
|
||||
Weapons.BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (3, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
LAU_88_with_2_x_AGM_65K___Maverick_K__CCD_Imp_ASM_ = (
|
||||
3,
|
||||
Weapons.LAU_88_with_2_x_AGM_65K___Maverick_K__CCD_Imp_ASM_,
|
||||
)
|
||||
LAU_88_with_2_x_AGM_65D___Maverick_D__IIR_ASM_ = (
|
||||
3,
|
||||
Weapons.LAU_88_with_2_x_AGM_65D___Maverick_D__IIR_ASM_,
|
||||
)
|
||||
LAU_118a_with_AGM_45B_Shrike_ARM__Imp_ = (
|
||||
3,
|
||||
Weapons.LAU_118a_with_AGM_45B_Shrike_ARM__Imp_,
|
||||
)
|
||||
LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
3,
|
||||
Weapons.LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
_3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
3,
|
||||
Weapons._3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
3,
|
||||
Weapons.BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
3,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_88_with_2_x_AGM_65D___Maverick_D__IIR_ASM_ = (
|
||||
3,
|
||||
Weapons.LAU_88_with_2_x_AGM_65D___Maverick_D__IIR_ASM_,
|
||||
)
|
||||
LAU_88_with_3_x_AGM_65D___Maverick_D__IIR_ASM_ = (
|
||||
3,
|
||||
Weapons.LAU_88_with_3_x_AGM_65D___Maverick_D__IIR_ASM_,
|
||||
)
|
||||
LAU_105_with_2_x_AIM_9M_Sidewinder_IR_AAM = (
|
||||
3,
|
||||
Weapons.LAU_105_with_2_x_AIM_9M_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_105_2_AIM_9L = (3, Weapons.LAU_105_2_AIM_9L)
|
||||
LAU_105_with_2_x_AIM_9P_Sidewinder_IR_AAM = (
|
||||
3,
|
||||
Weapons.LAU_105_with_2_x_AIM_9P_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_105_2_AIM_9P5 = (3, Weapons.LAU_105_2_AIM_9P5)
|
||||
LAU_7_with_2_x_AIM_9B_Sidewinder_IR_AAM = (
|
||||
3,
|
||||
Weapons.LAU_7_with_2_x_AIM_9B_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_105_2_AIM_9J = (3, WeaponsF4B.LAU_105_2_AIM_9J)
|
||||
LAU_105_2_AIM_9JULI = (3, WeaponsF4B.LAU_105_2_AIM_9JULI)
|
||||
AIM_120B_AMRAAM___Active_Rdr_AAM = (3, Weapons.AIM_120B_AMRAAM___Active_Rdr_AAM)
|
||||
AIM_7F_Sparrow_Semi_Active_Radar = (3, Weapons.AIM_7F_Sparrow_Semi_Active_Radar)
|
||||
AIM_7E_Sparrow_Semi_Active_Radar = (3, Weapons.AIM_7E_Sparrow_Semi_Active_Radar)
|
||||
Mk_20_Rockeye___490lbs_CBU__247_x_HEAT_Bomblets = (
|
||||
3,
|
||||
Weapons.Mk_20_Rockeye___490lbs_CBU__247_x_HEAT_Bomblets,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (3, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
TER_9A_with_3_x_Mk_82_Snakeye___500lb_GP_Bomb_HD = (
|
||||
3,
|
||||
Weapons.TER_9A_with_3_x_Mk_82_Snakeye___500lb_GP_Bomb_HD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_83___1000lb_GP_Bomb_LD = (
|
||||
3,
|
||||
Weapons.BRU_33_with_2_x_Mk_83___1000lb_GP_Bomb_LD,
|
||||
)
|
||||
|
||||
class Pylon4:
|
||||
AIM_7M_Sparrow_Semi_Active_Radar = (4, Weapons.AIM_7M_Sparrow_Semi_Active_Radar)
|
||||
AIM_7F_Sparrow_Semi_Active_Radar = (4, Weapons.AIM_7F_Sparrow_Semi_Active_Radar)
|
||||
AIM_7E_Sparrow_Semi_Active_Radar = (4, Weapons.AIM_7E_Sparrow_Semi_Active_Radar)
|
||||
AIM_120B_AMRAAM___Active_Rdr_AAM = (4, Weapons.AIM_120B_AMRAAM___Active_Rdr_AAM)
|
||||
|
||||
class Pylon5:
|
||||
AIM_7M_Sparrow_Semi_Active_Radar = (5, Weapons.AIM_7M_Sparrow_Semi_Active_Radar)
|
||||
AIM_7F_Sparrow_Semi_Active_Radar = (5, Weapons.AIM_7F_Sparrow_Semi_Active_Radar)
|
||||
AIM_7E_Sparrow_Semi_Active_Radar = (5, Weapons.AIM_7E_Sparrow_Semi_Active_Radar)
|
||||
AIM_120B_AMRAAM___Active_Rdr_AAM = (5, Weapons.AIM_120B_AMRAAM___Active_Rdr_AAM)
|
||||
|
||||
class Pylon6:
|
||||
Smokewinder___red = (6, Weapons.Smokewinder___red)
|
||||
Smokewinder___green = (6, Weapons.Smokewinder___green)
|
||||
Smokewinder___blue = (6, Weapons.Smokewinder___blue)
|
||||
Smokewinder___white = (6, Weapons.Smokewinder___white)
|
||||
Smokewinder___yellow = (6, Weapons.Smokewinder___yellow)
|
||||
BRU_41A_with_6_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
6,
|
||||
Weapons.BRU_41A_with_6_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
_3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
6,
|
||||
Weapons._3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
6,
|
||||
Weapons.BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
ALQ_131___ECM_Pod = (6, Weapons.ALQ_131___ECM_Pod)
|
||||
F4B_SUU_23_Gun_Pod = (6, WeaponsF4B.F4B_SUU_23_Gun_Pod)
|
||||
VSN_F4EC_PTB = (6, WeaponsF4B.VSN_F4EC_PTB)
|
||||
|
||||
class Pylon7:
|
||||
AIM_7M_Sparrow_Semi_Active_Radar = (7, Weapons.AIM_7M_Sparrow_Semi_Active_Radar)
|
||||
AIM_7F_Sparrow_Semi_Active_Radar = (7, Weapons.AIM_7F_Sparrow_Semi_Active_Radar)
|
||||
AIM_7E_Sparrow_Semi_Active_Radar = (7, Weapons.AIM_7E_Sparrow_Semi_Active_Radar)
|
||||
AIM_120B_AMRAAM___Active_Rdr_AAM = (7, Weapons.AIM_120B_AMRAAM___Active_Rdr_AAM)
|
||||
|
||||
class Pylon8:
|
||||
AIM_7M_Sparrow_Semi_Active_Radar = (8, Weapons.AIM_7M_Sparrow_Semi_Active_Radar)
|
||||
AIM_7F_Sparrow_Semi_Active_Radar = (8, Weapons.AIM_7F_Sparrow_Semi_Active_Radar)
|
||||
AIM_7E_Sparrow_Semi_Active_Radar = (8, Weapons.AIM_7E_Sparrow_Semi_Active_Radar)
|
||||
AIM_120B_AMRAAM___Active_Rdr_AAM = (8, Weapons.AIM_120B_AMRAAM___Active_Rdr_AAM)
|
||||
|
||||
class Pylon9:
|
||||
GBU_10___2000lb_Laser_Guided_Bomb = (
|
||||
9,
|
||||
Weapons.GBU_10___2000lb_Laser_Guided_Bomb,
|
||||
)
|
||||
GBU_12___500lb_Laser_Guided_Bomb = (9, Weapons.GBU_12___500lb_Laser_Guided_Bomb)
|
||||
BRU_42_with_3_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets = (
|
||||
9,
|
||||
Weapons.BRU_42_with_3_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD = (
|
||||
9,
|
||||
Weapons.BRU_42_with_3_x_Mk_82___500lb_GP_Bombs_LD,
|
||||
)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (9, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
LAU_88_with_2_x_AGM_65K___Maverick_K__CCD_Imp_ASM_ = (
|
||||
9,
|
||||
Weapons.LAU_88_with_2_x_AGM_65K___Maverick_K__CCD_Imp_ASM_,
|
||||
)
|
||||
LAU_88_with_2_x_AGM_65D___Maverick_D__IIR_ASM_ = (
|
||||
9,
|
||||
Weapons.LAU_88_with_2_x_AGM_65D___Maverick_D__IIR_ASM_,
|
||||
)
|
||||
LAU_118a_with_AGM_45B_Shrike_ARM__Imp_ = (
|
||||
9,
|
||||
Weapons.LAU_118a_with_AGM_45B_Shrike_ARM__Imp_,
|
||||
)
|
||||
LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
9,
|
||||
Weapons.LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
_3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
9,
|
||||
Weapons._3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
9,
|
||||
Weapons.BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
9,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_88_with_2_x_AGM_65D___Maverick_D__IIR_ASM_ = (
|
||||
9,
|
||||
Weapons.LAU_88_with_2_x_AGM_65D___Maverick_D__IIR_ASM_,
|
||||
)
|
||||
LAU_88_with_3_x_AGM_65D___Maverick_D__IIR_ASM_ = (
|
||||
9,
|
||||
Weapons.LAU_88_with_3_x_AGM_65D___Maverick_D__IIR_ASM_,
|
||||
)
|
||||
LAU_105_with_2_x_AIM_9M_Sidewinder_IR_AAM = (
|
||||
9,
|
||||
Weapons.LAU_105_with_2_x_AIM_9M_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_105_2_AIM_9L = (9, Weapons.LAU_105_2_AIM_9L)
|
||||
LAU_105_with_2_x_AIM_9P_Sidewinder_IR_AAM = (
|
||||
9,
|
||||
Weapons.LAU_105_with_2_x_AIM_9P_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_105_2_AIM_9P5 = (9, Weapons.LAU_105_2_AIM_9P5)
|
||||
LAU_7_with_2_x_AIM_9B_Sidewinder_IR_AAM = (
|
||||
9,
|
||||
Weapons.LAU_7_with_2_x_AIM_9B_Sidewinder_IR_AAM,
|
||||
)
|
||||
LAU_105_2_AIM_9J = (9, WeaponsF4B.LAU_105_2_AIM_9J)
|
||||
LAU_105_2_AIM_9JULI = (9, WeaponsF4B.LAU_105_2_AIM_9JULI)
|
||||
AIM_120B_AMRAAM___Active_Rdr_AAM = (9, Weapons.AIM_120B_AMRAAM___Active_Rdr_AAM)
|
||||
AIM_7F_Sparrow_Semi_Active_Radar = (9, Weapons.AIM_7F_Sparrow_Semi_Active_Radar)
|
||||
AIM_7E_Sparrow_Semi_Active_Radar = (9, Weapons.AIM_7E_Sparrow_Semi_Active_Radar)
|
||||
Mk_20_Rockeye___490lbs_CBU__247_x_HEAT_Bomblets = (
|
||||
9,
|
||||
Weapons.Mk_20_Rockeye___490lbs_CBU__247_x_HEAT_Bomblets,
|
||||
)
|
||||
Mk_82___500lb_GP_Bomb_LD = (9, Weapons.Mk_82___500lb_GP_Bomb_LD)
|
||||
TER_9A_with_3_x_Mk_82_Snakeye___500lb_GP_Bomb_HD = (
|
||||
9,
|
||||
Weapons.TER_9A_with_3_x_Mk_82_Snakeye___500lb_GP_Bomb_HD,
|
||||
)
|
||||
BRU_33_with_2_x_Mk_83___1000lb_GP_Bomb_LD = (
|
||||
9,
|
||||
Weapons.BRU_33_with_2_x_Mk_83___1000lb_GP_Bomb_LD,
|
||||
)
|
||||
|
||||
class Pylon10:
|
||||
GBU_10___2000lb_Laser_Guided_Bomb = (
|
||||
10,
|
||||
Weapons.GBU_10___2000lb_Laser_Guided_Bomb,
|
||||
)
|
||||
GBU_12___500lb_Laser_Guided_Bomb = (
|
||||
10,
|
||||
Weapons.GBU_12___500lb_Laser_Guided_Bomb,
|
||||
)
|
||||
BRU_42_with_3_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets = (
|
||||
10,
|
||||
Weapons.BRU_42_with_3_x_Mk_20_Rockeye___490lbs_CBUs__247_x_HEAT_Bomblets,
|
||||
)
|
||||
Mk_84___2000lb_GP_Bomb_LD = (10, Weapons.Mk_84___2000lb_GP_Bomb_LD)
|
||||
LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
10,
|
||||
Weapons.LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
10,
|
||||
Weapons.LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
_3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
10,
|
||||
Weapons._3_x_LAU_61_pods___57_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos = (
|
||||
10,
|
||||
Weapons.LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos,
|
||||
)
|
||||
LAU_118a_with_AGM_45B_Shrike_ARM__Imp_ = (
|
||||
10,
|
||||
Weapons.LAU_118a_with_AGM_45B_Shrike_ARM__Imp_,
|
||||
)
|
||||
Smokewinder___red = (10, Weapons.Smokewinder___red)
|
||||
Smokewinder___green = (10, Weapons.Smokewinder___green)
|
||||
Smokewinder___blue = (10, Weapons.Smokewinder___blue)
|
||||
Smokewinder___white = (10, Weapons.Smokewinder___white)
|
||||
Smokewinder___yellow = (10, Weapons.Smokewinder___yellow)
|
||||
BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG = (
|
||||
10,
|
||||
Weapons.BRU_33_with_2_x_LAU_10_pod___4_x_127mm_ZUNI__UnGd_Rkts_Mk71__HE_FRAG,
|
||||
)
|
||||
BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
10,
|
||||
Weapons.BRU_33_with_2_x_LAU_61_pod___19_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
BRU_41A_with_6_x_Mk_82___500lb_GP_Bomb_LD = (
|
||||
10,
|
||||
Weapons.BRU_41A_with_6_x_Mk_82___500lb_GP_Bomb_LD,
|
||||
)
|
||||
BRU_33_with_2_x_GBU_12___500lb_Laser_Guided_Bomb = (
|
||||
10,
|
||||
Weapons.BRU_33_with_2_x_GBU_12___500lb_Laser_Guided_Bomb,
|
||||
)
|
||||
VSN_F4ER_PTB = (10, WeaponsF4B.VSN_F4ER_PTB)
|
||||
|
||||
class Pylon11:
|
||||
L005_Sorbtsiya_ECM_pod__left_ = (11, Weapons.L005_Sorbtsiya_ECM_pod__left_)
|
||||
L_081_Fantasmagoria_ELINT_pod = (11, Weapons.L_081_Fantasmagoria_ELINT_pod)
|
||||
|
||||
pylons = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
|
||||
|
||||
tasks = [
|
||||
task.CAP,
|
||||
task.Escort,
|
||||
task.FighterSweep,
|
||||
task.Intercept,
|
||||
task.Reconnaissance,
|
||||
task.GroundAttack,
|
||||
task.CAS,
|
||||
task.AFAC,
|
||||
task.RunwayAttack,
|
||||
]
|
||||
task_default = task.CAP
|
||||
217
pydcs_extensions/f84g/f84g.py
Normal file
217
pydcs_extensions/f84g/f84g.py
Normal file
@@ -0,0 +1,217 @@
|
||||
from typing import Set
|
||||
|
||||
from dcs import task
|
||||
from dcs.liveries_scanner import Liveries
|
||||
from dcs.planes import PlaneType
|
||||
from dcs.weapons_data import Weapons
|
||||
|
||||
from game.modsupport import planemod
|
||||
from pydcs_extensions.weapon_injector import inject_weapons
|
||||
|
||||
|
||||
class WeaponsF84G:
|
||||
Tank = {"clsid": "{PTB_F84G}", "name": "Tank", "weight": 910}
|
||||
|
||||
|
||||
inject_weapons(WeaponsF84G)
|
||||
|
||||
|
||||
@planemod
|
||||
class VSN_F84G(PlaneType):
|
||||
id = "VSN_F84G"
|
||||
flyable = True
|
||||
height = 4.496
|
||||
width = 11.9
|
||||
length = 11.43
|
||||
fuel_max = 1282
|
||||
max_speed = 964.8
|
||||
category = "Interceptor" # {78EFB7A2-FD52-4b57-A6A6-3BF0E1D6555F}
|
||||
radio_frequency = 127.5
|
||||
|
||||
livery_name = "VSN_F84G" # from type
|
||||
Liveries = Liveries()[livery_name]
|
||||
|
||||
class Pylon2:
|
||||
Tank = (2, WeaponsF84G.Tank)
|
||||
|
||||
class Pylon3:
|
||||
AN_ASQ_T50_TCTS_Pod___ACMI_Pod = (3, Weapons.AN_ASQ_T50_TCTS_Pod___ACMI_Pod)
|
||||
AIM_9B_Sidewinder_IR_AAM = (3, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (3, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk1__Practice = (
|
||||
3,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk1__Practice,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
3,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk61__Practice = (
|
||||
3,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk61__Practice,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
3,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos = (
|
||||
3,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_WTU_1_B__Practice = (
|
||||
3,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_WTU_1_B__Practice,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M257__Para_Illum = (
|
||||
3,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M257__Para_Illum,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M274__Practice_Smk = (
|
||||
3,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M274__Practice_Smk,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk1__Practice = (
|
||||
3,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk1__Practice,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
3,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk61__Practice = (
|
||||
3,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk61__Practice,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
3,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos = (
|
||||
3,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_WTU_1_B__Practice = (
|
||||
3,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_WTU_1_B__Practice,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M257__Para_Illum = (
|
||||
3,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M257__Para_Illum,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M274__Practice_Smk = (
|
||||
3,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M274__Practice_Smk,
|
||||
)
|
||||
M117___750lb_GP_Bomb_LD = (3, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
AN_M64___500lb_GP_Bomb_LD_ = (3, Weapons.AN_M64___500lb_GP_Bomb_LD_)
|
||||
_2_x_HVAR__UnGd_Rkts = (3, Weapons._2_x_HVAR__UnGd_Rkts)
|
||||
# ERRR <CLEAN>
|
||||
Smoke_Generator___red_ = (3, Weapons.Smoke_Generator___red_)
|
||||
Smoke_Generator___green_ = (3, Weapons.Smoke_Generator___green_)
|
||||
Smoke_Generator___blue_ = (3, Weapons.Smoke_Generator___blue_)
|
||||
Smoke_Generator___white_ = (3, Weapons.Smoke_Generator___white_)
|
||||
Smoke_Generator___yellow_ = (3, Weapons.Smoke_Generator___yellow_)
|
||||
Smoke_Generator___orange_ = (3, Weapons.Smoke_Generator___orange_)
|
||||
|
||||
class Pylon6:
|
||||
Smoke_Generator___red_ = (6, Weapons.Smoke_Generator___red_)
|
||||
Smoke_Generator___green_ = (6, Weapons.Smoke_Generator___green_)
|
||||
Smoke_Generator___blue_ = (6, Weapons.Smoke_Generator___blue_)
|
||||
Smoke_Generator___white_ = (6, Weapons.Smoke_Generator___white_)
|
||||
Smoke_Generator___yellow_ = (6, Weapons.Smoke_Generator___yellow_)
|
||||
Smoke_Generator___orange_ = (6, Weapons.Smoke_Generator___orange_)
|
||||
|
||||
class Pylon9:
|
||||
AN_ASQ_T50_TCTS_Pod___ACMI_Pod = (9, Weapons.AN_ASQ_T50_TCTS_Pod___ACMI_Pod)
|
||||
AIM_9B_Sidewinder_IR_AAM = (9, Weapons.AIM_9B_Sidewinder_IR_AAM)
|
||||
Mk_83___1000lb_GP_Bomb_LD = (9, Weapons.Mk_83___1000lb_GP_Bomb_LD)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk1__Practice = (
|
||||
9,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk1__Practice,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
9,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk61__Practice = (
|
||||
9,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk61__Practice,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
9,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos = (
|
||||
9,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_WTU_1_B__Practice = (
|
||||
9,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_WTU_1_B__Practice,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M257__Para_Illum = (
|
||||
9,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M257__Para_Illum,
|
||||
)
|
||||
LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M274__Practice_Smk = (
|
||||
9,
|
||||
Weapons.LAU_68_pod___7_x_2_75_Hydra__UnGd_Rkts_M274__Practice_Smk,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk1__Practice = (
|
||||
9,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk1__Practice,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT = (
|
||||
9,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk5__HEAT,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk61__Practice = (
|
||||
9,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_Mk61__Practice,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE = (
|
||||
9,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M151__HE,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos = (
|
||||
9,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M156__Wht_Phos,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_WTU_1_B__Practice = (
|
||||
9,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_WTU_1_B__Practice,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M257__Para_Illum = (
|
||||
9,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M257__Para_Illum,
|
||||
)
|
||||
LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M274__Practice_Smk = (
|
||||
9,
|
||||
Weapons.LAU_131_pod___7_x_2_75_Hydra__UnGd_Rkts_M274__Practice_Smk,
|
||||
)
|
||||
M117___750lb_GP_Bomb_LD = (9, Weapons.M117___750lb_GP_Bomb_LD)
|
||||
AN_M64___500lb_GP_Bomb_LD_ = (9, Weapons.AN_M64___500lb_GP_Bomb_LD_)
|
||||
_2_x_HVAR__UnGd_Rkts = (9, Weapons._2_x_HVAR__UnGd_Rkts)
|
||||
# ERRR <CLEAN>
|
||||
Smoke_Generator___red_ = (9, Weapons.Smoke_Generator___red_)
|
||||
Smoke_Generator___green_ = (9, Weapons.Smoke_Generator___green_)
|
||||
Smoke_Generator___blue_ = (9, Weapons.Smoke_Generator___blue_)
|
||||
Smoke_Generator___white_ = (9, Weapons.Smoke_Generator___white_)
|
||||
Smoke_Generator___yellow_ = (9, Weapons.Smoke_Generator___yellow_)
|
||||
Smoke_Generator___orange_ = (9, Weapons.Smoke_Generator___orange_)
|
||||
|
||||
class Pylon10:
|
||||
Tank = (10, WeaponsF84G.Tank)
|
||||
|
||||
pylons: Set[int] = {2, 3, 6, 9, 10}
|
||||
|
||||
tasks = [
|
||||
task.CAP,
|
||||
task.CAS,
|
||||
task.Escort,
|
||||
task.FighterSweep,
|
||||
task.GroundAttack,
|
||||
task.Intercept,
|
||||
task.AntishipStrike,
|
||||
]
|
||||
task_default = task.GroundAttack
|
||||
17
pydcs_extensions/pylon_injector.py
Normal file
17
pydcs_extensions/pylon_injector.py
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import Tuple, Any
|
||||
|
||||
|
||||
def inject_pylon(to_pylon: Any, from_pylon: Any) -> None:
|
||||
"""
|
||||
Inject weapons/ordnance added by mods into the pylons of existing aircraft.
|
||||
This is done to support mods such as the CJS Super Hornet, which modify aircraft
|
||||
that exist in stock DCS. Ornance is injected pydcs aircraft classes via introspection
|
||||
:param to_pylon: The pydcs pylon class of the target aircraft
|
||||
:param from_pylon: The custom pylon class containing tuples with added weapon info
|
||||
:return: None
|
||||
"""
|
||||
for key, value in from_pylon.__dict__.items():
|
||||
if key.startswith("__"):
|
||||
continue
|
||||
if isinstance(value, Tuple):
|
||||
setattr(to_pylon, key, value)
|
||||
@@ -56,6 +56,18 @@ def inject_custom_payloads(user_path: Path) -> None:
|
||||
PayloadDirectories.set_preferred(user_path / "MissionEditor" / "UnitPayloads")
|
||||
|
||||
|
||||
def inject_mod_payloads(mod_path: Path) -> None:
|
||||
if mod_path.exists():
|
||||
payloads = mod_path
|
||||
else:
|
||||
raise RuntimeError(
|
||||
f"Could not find mod payloads at {mod_path}."
|
||||
f"Aircraft will have no payloads."
|
||||
)
|
||||
# We configure these as preferred so the mod's loadouts override the stock ones.
|
||||
PayloadDirectories.set_preferred(payloads)
|
||||
|
||||
|
||||
def on_game_load(game: Game | None) -> None:
|
||||
EventStream.drain()
|
||||
EventStream.put_nowait(GameUpdateEvents().game_loaded(game))
|
||||
@@ -294,8 +306,13 @@ def create_game(
|
||||
),
|
||||
ModSettings(
|
||||
a4_skyhawk=False,
|
||||
a6a_intruder=False,
|
||||
f4b_phantom=False,
|
||||
f22_raptor=False,
|
||||
f84g_thunderjet=False,
|
||||
f100_supersabre=False,
|
||||
f104_starfighter=False,
|
||||
f105_thunderchief=False,
|
||||
hercules=False,
|
||||
jas39_gripen=False,
|
||||
su30_flanker_h=False,
|
||||
|
||||
@@ -63,10 +63,18 @@ def load_icons():
|
||||
|
||||
ICONS["Hangar"] = QPixmap("./resources/ui/misc/hangar.png")
|
||||
|
||||
ICONS["Dawn"] = QPixmap("./resources/ui/conditions/timeofday/dawn.png")
|
||||
ICONS["Day"] = QPixmap("./resources/ui/conditions/timeofday/day.png")
|
||||
ICONS["Dusk"] = QPixmap("./resources/ui/conditions/timeofday/dusk.png")
|
||||
ICONS["Night"] = QPixmap("./resources/ui/conditions/timeofday/night.png")
|
||||
ICONS["Dawn"] = QPixmap(
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/timeofday/dawn.png"
|
||||
)
|
||||
ICONS["Day"] = QPixmap(
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/timeofday/day.png"
|
||||
)
|
||||
ICONS["Dusk"] = QPixmap(
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/timeofday/dusk.png"
|
||||
)
|
||||
ICONS["Night"] = QPixmap(
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/timeofday/night.png"
|
||||
)
|
||||
|
||||
ICONS["Money"] = QPixmap(
|
||||
"./resources/ui/misc/" + get_theme_icons() + "/money_icon.png"
|
||||
@@ -116,46 +124,64 @@ def load_icons():
|
||||
"""
|
||||
Weather Icons
|
||||
"""
|
||||
ICONS["Weather_winds"] = QPixmap("./resources/ui/conditions/weather/winds.png")
|
||||
ICONS["Weather_winds"] = QPixmap(
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/weather/winds.png"
|
||||
)
|
||||
ICONS["Weather_day-clear"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/day-clear.png"
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/weather/day-clear.png"
|
||||
)
|
||||
ICONS["Weather_day-cloudy-fog"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/day-cloudy-fog.png"
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/weather/day-cloudy-fog.png"
|
||||
)
|
||||
ICONS["Weather_day-fog"] = QPixmap(
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/weather/day-fog.png"
|
||||
)
|
||||
ICONS["Weather_day-fog"] = QPixmap("./resources/ui/conditions/weather/day-fog.png")
|
||||
ICONS["Weather_day-partly-cloudy"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/day-partly-cloudy.png"
|
||||
"./resources/ui/conditions/"
|
||||
+ get_theme_icons()
|
||||
+ "/weather/day-partly-cloudy.png"
|
||||
)
|
||||
ICONS["Weather_day-rain"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/day-rain.png"
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/weather/day-rain.png"
|
||||
)
|
||||
ICONS["Weather_day-thunderstorm"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/day-thunderstorm.png"
|
||||
"./resources/ui/conditions/"
|
||||
+ get_theme_icons()
|
||||
+ "/weather/day-thunderstorm.png"
|
||||
)
|
||||
ICONS["Weather_day-totally-cloud"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/day-totally-cloud.png"
|
||||
"./resources/ui/conditions/"
|
||||
+ get_theme_icons()
|
||||
+ "/weather/day-totally-cloud.png"
|
||||
)
|
||||
ICONS["Weather_night-clear"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/night-clear.png"
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/weather/night-clear.png"
|
||||
)
|
||||
ICONS["Weather_night-cloudy-fog"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/night-cloudy-fog.png"
|
||||
"./resources/ui/conditions/"
|
||||
+ get_theme_icons()
|
||||
+ "/weather/night-cloudy-fog.png"
|
||||
)
|
||||
ICONS["Weather_night-fog"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/night-fog.png"
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/weather/night-fog.png"
|
||||
)
|
||||
ICONS["Weather_night-partly-cloudy"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/night-partly-cloudy.png"
|
||||
"./resources/ui/conditions/"
|
||||
+ get_theme_icons()
|
||||
+ "/weather/night-partly-cloudy.png"
|
||||
)
|
||||
ICONS["Weather_night-rain"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/night-rain.png"
|
||||
"./resources/ui/conditions/" + get_theme_icons() + "/weather/night-rain.png"
|
||||
)
|
||||
ICONS["Weather_night-thunderstorm"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/night-thunderstorm.png"
|
||||
"./resources/ui/conditions/"
|
||||
+ get_theme_icons()
|
||||
+ "/weather/night-thunderstorm.png"
|
||||
)
|
||||
ICONS["Weather_night-totally-cloud"] = QPixmap(
|
||||
"./resources/ui/conditions/weather/night-totally-cloud.png"
|
||||
"./resources/ui/conditions/"
|
||||
+ get_theme_icons()
|
||||
+ "/weather/night-totally-cloud.png"
|
||||
)
|
||||
|
||||
ICONS["heading"] = QPixmap("./resources/ui/misc/heading.png")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from PySide2.QtWidgets import QLabel, QHBoxLayout, QGroupBox, QPushButton
|
||||
from PySide2.QtWidgets import QHBoxLayout, QGroupBox, QPushButton
|
||||
|
||||
import qt_ui.uiconstants as CONST
|
||||
from game import Game
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from PySide2.QtWidgets import QLabel, QGroupBox, QGridLayout
|
||||
|
||||
from game import Game
|
||||
|
||||
|
||||
|
||||
@@ -41,15 +41,6 @@ class QIntelBox(QGroupBox):
|
||||
self.economic_strength = QLabel()
|
||||
summary.addWidget(self.economic_strength, 2, 1)
|
||||
|
||||
# some dirty styling to make the labels show up well on the button
|
||||
button_text_style = "background-color: rgba(0,0,0,0%); color: white;"
|
||||
air_superiority.setStyleSheet(button_text_style)
|
||||
front_line.setStyleSheet(button_text_style)
|
||||
economy.setStyleSheet(button_text_style)
|
||||
self.air_strength.setStyleSheet(button_text_style)
|
||||
self.ground_strength.setStyleSheet(button_text_style)
|
||||
self.economic_strength.setStyleSheet(button_text_style)
|
||||
|
||||
self.details = QPushButton()
|
||||
self.details.setMinimumHeight(50)
|
||||
self.details.setMinimumWidth(210)
|
||||
|
||||
@@ -11,7 +11,6 @@ from PySide2.QtWidgets import (
|
||||
|
||||
import qt_ui.uiconstants as CONST
|
||||
from game import Game, persistency
|
||||
from game.game import TurnState
|
||||
from game.ato.package import Package
|
||||
from game.ato.traveltime import TotEstimator
|
||||
from game.profiling import logged_duration
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"""Combo box for selecting aircraft types."""
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
"""Combo box for selecting a flight's task type."""
|
||||
|
||||
from PySide2.QtWidgets import QComboBox
|
||||
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.settings.settings import Settings
|
||||
|
||||
from game.theater import ConflictTheater, MissionTarget
|
||||
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
import random
|
||||
|
||||
from PySide2.QtGui import QStandardItemModel, QStandardItem
|
||||
from PySide2.QtWidgets import (
|
||||
QGroupBox,
|
||||
QLabel,
|
||||
QWidget,
|
||||
QVBoxLayout,
|
||||
QListView,
|
||||
QAbstractItemView,
|
||||
|
||||
@@ -29,6 +29,7 @@ from PySide2.QtWidgets import (
|
||||
QToolButton,
|
||||
QMessageBox,
|
||||
)
|
||||
|
||||
from game import Game
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.coalition import Coalition
|
||||
|
||||
@@ -17,9 +17,9 @@ from PySide2.QtWidgets import (
|
||||
QHBoxLayout,
|
||||
)
|
||||
|
||||
from game.ato.flight import Flight
|
||||
from game.squadrons import Squadron
|
||||
from game.theater import ConflictTheater
|
||||
from game.ato.flight import Flight
|
||||
from qt_ui.delegates import TwoColumnRowDelegate
|
||||
from qt_ui.models import GameModel, AirWingModel, SquadronModel, AtoModel
|
||||
from qt_ui.windows.SquadronDialog import SquadronDialog
|
||||
|
||||
@@ -5,8 +5,8 @@ from typing import Optional
|
||||
from PySide2.QtCore import QObject, Signal
|
||||
|
||||
from game import Game
|
||||
from game.game import TurnState
|
||||
from game.debriefing import Debriefing
|
||||
from game.game import TurnState
|
||||
|
||||
|
||||
class GameUpdateSignal(QObject):
|
||||
|
||||
@@ -12,10 +12,8 @@ from PySide2.QtWidgets import (
|
||||
)
|
||||
|
||||
from game.debriefing import Debriefing
|
||||
from game.game import TurnState
|
||||
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
|
||||
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ from PySide2.QtWidgets import (
|
||||
)
|
||||
|
||||
import game.ato.ai_flight_planner_db
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.dcs.groundunittype import GroundUnitType
|
||||
from game.dcs.unittype import UnitType
|
||||
from game.game import Game
|
||||
from game.ato.flighttype import FlightType
|
||||
from qt_ui.uiconstants import AIRCRAFT_BANNERS, VEHICLE_BANNERS
|
||||
|
||||
|
||||
|
||||
@@ -9,12 +9,10 @@ from PySide2.QtWidgets import (
|
||||
QVBoxLayout,
|
||||
QWidget,
|
||||
)
|
||||
from dcs.ships import Stennis, KUZNECOW
|
||||
|
||||
from game import Game
|
||||
from game.ato.flighttype import FlightType
|
||||
from game.config import RUNWAY_REPAIR_COST
|
||||
from game.game import TurnState
|
||||
from game.server import EventStream
|
||||
from game.sim import GameUpdateEvents
|
||||
from game.theater import (
|
||||
|
||||
@@ -11,12 +11,12 @@ from PySide2.QtWidgets import (
|
||||
)
|
||||
|
||||
from game.dcs.aircrafttype import AircraftType
|
||||
from game.purchaseadapter import AircraftPurchaseAdapter
|
||||
from game.squadrons import Squadron
|
||||
from game.theater import ControlPoint
|
||||
from qt_ui.models import GameModel
|
||||
from qt_ui.uiconstants import ICONS
|
||||
from qt_ui.windows.basemenu.UnitTransactionFrame import UnitTransactionFrame
|
||||
from game.purchaseadapter import AircraftPurchaseAdapter
|
||||
|
||||
|
||||
class QAircraftRecruitmentMenu(UnitTransactionFrame[Squadron]):
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user