mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Merge branch 'release-candidate' into v2
This commit is contained in:
commit
287f634f74
43
.github/workflows/documentation.yml
vendored
43
.github/workflows/documentation.yml
vendored
@ -1,43 +0,0 @@
|
||||
# ci.yml file for GitHub Actions
|
||||
name: Documentation
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build_docs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v2
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: ./frontend/website
|
||||
|
||||
- name: Create the docs directory locally in CI
|
||||
run: npx typedoc --out ../../docs/website @types/*.d.ts src/**/*.ts
|
||||
working-directory: ./frontend/website
|
||||
|
||||
- name: Install Doxygen
|
||||
uses: ssciwr/doxygen-install@v1
|
||||
|
||||
- name: Generate Doxygen Documentation
|
||||
run: doxygen docs
|
||||
working-directory: ./src
|
||||
|
||||
- name: Deploy 🚀
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
folder: docs
|
||||
30
README.md
30
README.md
@ -9,8 +9,6 @@
|
||||
|
||||
# DCS Olympus
|
||||
|
||||

|
||||
|
||||
### What is this?
|
||||
DCS: Olympus is a free and open-source mod for DCS that enables dynamic real-time control through a map interface. The user is able to spawn units/groups, deploy a variety of effects such as smoke, flares, or explosions, and waypoints/tasks can be given to AI units in real-time in a way similar to a classic RTS game.
|
||||
|
||||
@ -26,15 +24,27 @@ The full feature list is simply too long to enumerate in a short summary but nee
|
||||
Check the [Wiki](https://github.com/Pax1601/DCSOlympus/wiki) for installation instructions
|
||||
|
||||
# Frequently Asked Questions
|
||||
### Can I join up and help out with the project? ###
|
||||
We are currently running towards first release in the very near future so we are not looking to add more people to the core team for the moment. However that does not mean we are not open to collaborations and help going forward, if you want to help for now we are committed to the free and open source model so feel free to check out the github, familiarize yourself with the project and maybe even start submitting pull requests for open issues.
|
||||
|
||||
Post-release we will be more interested in developing partnerships/collaborations with other teams/projects and potentially bringing in more team members, we will update this after release on how that will be managed!
|
||||
### I need troubleshooting guidance, please help? ###
|
||||
Read through the [Installation Guide](https://github.com/Pax1601/DCSOlympus/wiki) to ensure you have setup Olympus correctly.
|
||||
|
||||
Read through [Setup Troubleshooting](https://github.com/Pax1601/DCSOlympus/wiki/Setup-Troubleshooting) for common issues and solutions.
|
||||
|
||||
Read through the [Olympus User Guide](https://github.com/Pax1601/DCSOlympus/wiki/2.-User-Guide) to learn how to use Olympus.
|
||||
|
||||
If you're still having issues after trying the steps above, please post in the community-support channel with the following:
|
||||
|
||||
A detailed description of your issue
|
||||
Your Olympus log file \user home folder\AppData\Local\Temp\Olympus_log.txt for some it might be in \DCS Saved Games folder\Logs\Olympus_log.txt
|
||||
Your DCS log file \DCS Saved Games folder\Logs\dcs.log
|
||||
|
||||
Screenshots of any relevant screens or issues and any other pertinent information.
|
||||
|
||||
### Can I join up and help out with the project? ###
|
||||
Absolutely, join the discord and ping any of the developers to get briefed.
|
||||
|
||||
### Can I be a beta/alpha-tester? ###
|
||||
With first public release planned for the very-near future we are fully committed to the final sprint, as such we will not be formally recruiting more people to test pre-release.
|
||||
|
||||
Post-release we will be eager to hear feedback of all forms and take in bug-reports, at this time after release we will begin considering bringing in more team members to test in development versions as we go.
|
||||
Same as above!
|
||||
|
||||
### Do you have a roadmap? ###
|
||||
We do not have a roadmap no, we have a laundry list of things we are hoping to do.
|
||||
@ -72,8 +82,4 @@ Olympus by itself should not have a noticeable impact on server performance, how
|
||||
|
||||
Be cognizant of how you play, whether it's done through Olympus or the mission editor 500 MLRS units firing at once is not going to go over well with most servers
|
||||
|
||||
|
||||
[**Temporary localhost redirect**](http://localhost:3000)
|
||||
|
||||
|
||||
|
||||
|
||||
@ -25,6 +25,7 @@ private:
|
||||
|
||||
mutex mutexLock;
|
||||
|
||||
void Clear();
|
||||
void Open();
|
||||
void Close();
|
||||
};
|
||||
|
||||
@ -19,6 +19,7 @@ Logger* Logger::GetLogger()
|
||||
{
|
||||
if (m_pThis == NULL) {
|
||||
m_pThis = new Logger();
|
||||
m_pThis->Clear();
|
||||
}
|
||||
return m_pThis;
|
||||
}
|
||||
@ -28,14 +29,28 @@ void Logger::setDirectory(string newDirPath)
|
||||
m_dirPath = newDirPath;
|
||||
}
|
||||
|
||||
void Logger::Open()
|
||||
void Logger::Clear()
|
||||
{
|
||||
lock_guard<mutex> guard(mutexLock);
|
||||
try {
|
||||
m_Logfile.open((m_dirPath + m_sFileName).c_str(), ios::out | ios::app);
|
||||
m_Logfile.open((m_dirPath + m_sFileName).c_str(), ios::out | std::ios::trunc);
|
||||
}
|
||||
catch (...) {
|
||||
std::filesystem::path m_dirPath = std::filesystem::temp_directory_path();
|
||||
m_Logfile.open((m_dirPath.string() + m_sFileName).c_str(), ios::out | ios::app);
|
||||
m_Logfile.open((m_dirPath.string() + m_sFileName).c_str(), ios::out | std::ios::trunc);
|
||||
}
|
||||
m_Logfile << "Creating a new log instance\n";
|
||||
m_pThis->Close();
|
||||
}
|
||||
|
||||
void Logger::Open()
|
||||
{
|
||||
try {
|
||||
m_Logfile.open((m_dirPath + m_sFileName).c_str(), ios::out | std::ios::app);
|
||||
}
|
||||
catch (...) {
|
||||
std::filesystem::path m_dirPath = std::filesystem::temp_directory_path();
|
||||
m_Logfile.open((m_dirPath.string() + m_sFileName).c_str(), ios::out | std::ios::app);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
dependencies/VC_redist.x64.exe
vendored
Normal file
BIN
dependencies/VC_redist.x64.exe
vendored
Normal file
Binary file not shown.
395
frontend/server/public/databases/airbases/afghanistan.json
Normal file
395
frontend/server/public/databases/airbases/afghanistan.json
Normal file
@ -0,0 +1,395 @@
|
||||
{
|
||||
"airfields": {
|
||||
"Farah": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"33": {
|
||||
"magHeading": "328",
|
||||
"Heading": "330",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"15": {
|
||||
"magHeading": "148",
|
||||
"Heading": "150",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "6990"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "OAFR",
|
||||
"elevation": "2240"
|
||||
},
|
||||
"Kandahar": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"23": {
|
||||
"magHeading": "232",
|
||||
"Heading": "234",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"05": {
|
||||
"magHeading": "052",
|
||||
"Heading": "054",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "9779"
|
||||
}
|
||||
],
|
||||
"TACAN": "75X",
|
||||
"ICAO": "OAKN",
|
||||
"elevation": "3336"
|
||||
},
|
||||
"Bost": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"01": {
|
||||
"magHeading": "005",
|
||||
"Heading": "007",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"19": {
|
||||
"magHeading": "186",
|
||||
"Heading": "187",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "5758"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "OABT",
|
||||
"elevation": "2546"
|
||||
},
|
||||
"Kandahar Heliport": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"23": {
|
||||
"magHeading": "232",
|
||||
"Heading": "234",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"05": {
|
||||
"magHeading": "052",
|
||||
"Heading": "054",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "718"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "",
|
||||
"elevation": "3336"
|
||||
},
|
||||
"Shindand Heliport": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"36": {
|
||||
"magHeading": "360",
|
||||
"Heading": "002",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"18": {
|
||||
"magHeading": "181",
|
||||
"Heading": "182",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "687"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "",
|
||||
"elevation": "3798"
|
||||
},
|
||||
"Camp Bastion Heliport": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"01": {
|
||||
"magHeading": "008",
|
||||
"Heading": "010",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"19": {
|
||||
"magHeading": "189",
|
||||
"Heading": "190",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "1271"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "",
|
||||
"elevation": "2901"
|
||||
},
|
||||
"Tarinkot": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"30": {
|
||||
"magHeading": "300",
|
||||
"Heading": "303",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"12": {
|
||||
"magHeading": "121",
|
||||
"Heading": "123",
|
||||
"ILS": ""
|
||||
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "5903"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "OATN",
|
||||
"elevation": "4373"
|
||||
},
|
||||
"Nimroz": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"14": {
|
||||
"magHeading": "138",
|
||||
"Heading": "140",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"32": {
|
||||
"magHeading": "318",
|
||||
"Heading": "320",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "6944"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "OANZ",
|
||||
"elevation": "1584"
|
||||
},
|
||||
"Dwyer": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"05": {
|
||||
"magHeading": "048",
|
||||
"Heading": "050",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"23": {
|
||||
"magHeading": "228",
|
||||
"Heading": "230",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7458"
|
||||
}
|
||||
],
|
||||
"TACAN": "46X",
|
||||
"ICAO": "OADY",
|
||||
"elevation": "2398"
|
||||
},
|
||||
"Herat": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"18": {
|
||||
"magHeading": "186",
|
||||
"Heading": "188",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"36": {
|
||||
"magHeading": "006",
|
||||
"Heading": "008",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "8920"
|
||||
}
|
||||
],
|
||||
"TACAN": "54X",
|
||||
"ICAO": "OAHR",
|
||||
"elevation": "3182"
|
||||
},
|
||||
"Shindand": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"36": {
|
||||
"magHeading": "360",
|
||||
"Heading": "002",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"18": {
|
||||
"magHeading": "180",
|
||||
"Heading": "182",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "7032"
|
||||
}
|
||||
],
|
||||
"TACAN": "48X",
|
||||
"ICAO": "OASD",
|
||||
"elevation": "3715"
|
||||
},
|
||||
"Maymana Zahiraddin Faryabi": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"32": {
|
||||
"magHeading": "320",
|
||||
"Heading": "322",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"14": {
|
||||
"magHeading": "140",
|
||||
"Heading": "142",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "5542"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "OAMN",
|
||||
"elevation": "2758"
|
||||
},
|
||||
"Qala i Naw": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"22": {
|
||||
"magHeading": "218",
|
||||
"Heading": "220",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"04": {
|
||||
"magHeading": "038",
|
||||
"Heading": "040",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "6114"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "OAQN",
|
||||
"elevation": "2916"
|
||||
},
|
||||
"Chaghcharan": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"25": {
|
||||
"magHeading": "243",
|
||||
"Heading": "245",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"07": {
|
||||
"magHeading": "063",
|
||||
"Heading": "65",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "5709"
|
||||
}
|
||||
],
|
||||
"TACAN": "",
|
||||
"ICAO": "OACC",
|
||||
"elevation": "7451"
|
||||
},
|
||||
"Camp Bastion": {
|
||||
"runways": [
|
||||
{
|
||||
"headings": [
|
||||
{
|
||||
"01": {
|
||||
"magHeading": "008",
|
||||
"Heading": "010",
|
||||
"ILS": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"19": {
|
||||
"magHeading": "188",
|
||||
"Heading": "190",
|
||||
"ILS": ""
|
||||
}
|
||||
}
|
||||
],
|
||||
"length": "10647"
|
||||
}
|
||||
],
|
||||
"TACAN": "98X",
|
||||
"ICAO": "OAZI",
|
||||
"elevation": "2886"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -26,6 +26,7 @@
|
||||
"esmify": "^2.1.1",
|
||||
"formatcoords": "^1.1.3",
|
||||
"geodesy": "^1.1.2",
|
||||
"js-sha256": "^0.10.1",
|
||||
"leaflet": "^1.9.3",
|
||||
"leaflet-control-mini-map": "^0.4.0",
|
||||
"leaflet-gesture-handling": "^1.2.2",
|
||||
@ -38,7 +39,6 @@
|
||||
"tslib": "latest",
|
||||
"typescript": "^4.9.4",
|
||||
"usng.js": "^0.4.5",
|
||||
"watchify": "^4.0.0",
|
||||
"js-sha256": "^0.10.1"
|
||||
"watchify": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -147,6 +147,13 @@ export const minimapBoundaries = {
|
||||
new LatLng(63.570300, 39.364000),
|
||||
new LatLng(71.48000, 48.091100),
|
||||
new LatLng(72.055300, 4.01400003)
|
||||
],
|
||||
"Afghanistan": [ // Afghanistan
|
||||
new LatLng(39.27472222, 59.81138889),
|
||||
new LatLng(29.41166667, 60.04305556),
|
||||
new LatLng(28.97722222, 73.87666667),
|
||||
new LatLng(38.40055556, 75.07638889),
|
||||
new LatLng(39.27472222, 59.81138889)
|
||||
]
|
||||
};
|
||||
|
||||
@ -159,7 +166,8 @@ export const mapBounds = {
|
||||
"Falklands": { bounds: new LatLngBounds([-49.097217, -79.418267], [-56.874517, -43.316433]), zoom: 3 },
|
||||
"Normandy": { bounds: new LatLngBounds([50.44, -3.29], [48.12, 3.70]), zoom: 5 },
|
||||
"SinaiMap": { bounds: new LatLngBounds([34.312222, 28.523333], [25.946944, 36.897778]), zoom: 4 },
|
||||
"Kola": { bounds: new LatLngBounds([61.59999, 4.29982], [75.05179, 44.29982]), zoom: 3}
|
||||
"Kola": { bounds: new LatLngBounds([61.59999, 4.29982], [75.05179, 44.29982]), zoom: 3},
|
||||
"Afghanistan": { bounds: new LatLngBounds([29.41166667, 60.04305556], [38.40055556, 75.07638889]), zoom: 3}
|
||||
}
|
||||
|
||||
export const defaultMapMirrors = {}
|
||||
|
||||
310
frontend/website/src/constants/constants.ts.bak
Normal file
310
frontend/website/src/constants/constants.ts.bak
Normal file
@ -0,0 +1,310 @@
|
||||
import { LatLng, LatLngBounds } from "leaflet";
|
||||
import { MapMarkerVisibilityControl } from "../map/map";
|
||||
|
||||
export const UNITS_URI = "units";
|
||||
export const WEAPONS_URI = "weapons";
|
||||
export const LOGS_URI = "logs";
|
||||
export const AIRBASES_URI = "airbases";
|
||||
export const BULLSEYE_URI = "bullseyes";
|
||||
export const MISSION_URI = "mission";
|
||||
export const COMMANDS_URI = "commands";
|
||||
|
||||
export const NONE = "None";
|
||||
export const GAME_MASTER = "Game master";
|
||||
export const BLUE_COMMANDER = "Blue commander";
|
||||
export const RED_COMMANDER = "Red commander";
|
||||
|
||||
export const VISUAL = 1;
|
||||
export const OPTIC = 2;
|
||||
export const RADAR = 4;
|
||||
export const IRST = 8;
|
||||
export const RWR = 16;
|
||||
export const DLINK = 32;
|
||||
|
||||
export const states: string[] = ["none", "idle", "reach-destination", "attack", "follow", "land", "refuel", "AWACS", "tanker", "bomb-point", "carpet-bomb", "bomb-building", "fire-at-area", "simulate-fire-fight", "scenic-aaa", "miss-on-purpose", "land-at-point"];
|
||||
export const ROEs: string[] = ["free", "designated", "", "return", "hold"];
|
||||
export const reactionsToThreat: string[] = ["none", "manoeuvre", "passive", "evade"];
|
||||
export const emissionsCountermeasures: string[] = ["silent", "attack", "defend", "free"];
|
||||
|
||||
export const ERAS = [{
|
||||
"name": "Early Cold War",
|
||||
"chronologicalOrder": 2
|
||||
}, {
|
||||
"name": "Late Cold War",
|
||||
"chronologicalOrder": 4
|
||||
}, {
|
||||
"name": "Mid Cold War",
|
||||
"chronologicalOrder": 3
|
||||
}, {
|
||||
"name": "Modern",
|
||||
"chronologicalOrder": 5
|
||||
}, {
|
||||
"name": "WW2",
|
||||
"chronologicalOrder": 1
|
||||
}];
|
||||
|
||||
export const ROEDescriptions: string[] = [
|
||||
"Free (Attack anyone)",
|
||||
"Designated (Attack the designated target only) \nWARNING: Ground and Navy units don't respect this ROE, it will be equivalent to weapons FREE.",
|
||||
"",
|
||||
"Return (Only fire if fired upon) \nWARNING: Ground and Navy units don't respect this ROE, it will be equivalent to weapons FREE.",
|
||||
"Hold (Never fire)"
|
||||
];
|
||||
|
||||
export const reactionsToThreatDescriptions: string[] = [
|
||||
"None (No reaction)",
|
||||
"Manoeuvre (no countermeasures)",
|
||||
"Passive (Countermeasures only, no manoeuvre)",
|
||||
"Evade (Countermeasures and manoeuvers)"
|
||||
];
|
||||
|
||||
export const emissionsCountermeasuresDescriptions: string[] = [
|
||||
"Silent (Radar OFF, no ECM)",
|
||||
"Attack (Radar only for targeting, ECM only if locked)",
|
||||
"Defend (Radar for searching, ECM if locked)",
|
||||
"Always on (Radar and ECM always on)"
|
||||
];
|
||||
|
||||
export const shotsScatterDescriptions: string[] = [
|
||||
"When performing scenic shooting tasks like simulated firefights, will shoot with a large scatter",
|
||||
"When performing scenic shooting tasks like simulated firefights, will shoot with a medium scatter",
|
||||
"When performing scenic shooting tasks like simulated firefights, will shoot with a small scatter (Radar guided units will track shots when the enemy unit is close)"
|
||||
];
|
||||
|
||||
export const shotsIntensityDescriptions: string[] = [
|
||||
"When performing scenic shooting tasks like simulated firefights, will shoot with a low rate of fire",
|
||||
"When performing scenic shooting tasks like simulated firefights, will shoot with a medium rate of fire",
|
||||
"When performing scenic shooting tasks like simulated firefights, will shoot with a high rate of fire"
|
||||
];
|
||||
|
||||
export const minSpeedValues: { [key: string]: number } = { Aircraft: 100, Helicopter: 0, NavyUnit: 0, GroundUnit: 0 };
|
||||
export const maxSpeedValues: { [key: string]: number } = { Aircraft: 800, Helicopter: 300, NavyUnit: 60, GroundUnit: 60 };
|
||||
export const speedIncrements: { [key: string]: number } = { Aircraft: 25, Helicopter: 10, NavyUnit: 5, GroundUnit: 5 };
|
||||
export const minAltitudeValues: { [key: string]: number } = { Aircraft: 0, Helicopter: 0 };
|
||||
export const maxAltitudeValues: { [key: string]: number } = { Aircraft: 50000, Helicopter: 10000 };
|
||||
export const altitudeIncrements: { [key: string]: number } = { Aircraft: 500, Helicopter: 100 };
|
||||
|
||||
export const minimapBoundaries = {
|
||||
"Nevada": [ // NTTR
|
||||
new LatLng(39.7982463, -119.985425),
|
||||
new LatLng(34.4037128, -119.7806729),
|
||||
new LatLng(34.3483316, -112.4529351),
|
||||
new LatLng(39.7372411, -112.1130805),
|
||||
new LatLng(39.7982463, -119.985425)
|
||||
],
|
||||
"Syria": [ // Syria
|
||||
new LatLng(37.3630556, 29.2686111),
|
||||
new LatLng(31.8472222, 29.8975),
|
||||
new LatLng(32.1358333, 42.1502778),
|
||||
new LatLng(37.7177778, 42.3716667),
|
||||
new LatLng(37.3630556, 29.2686111)
|
||||
],
|
||||
"Caucasus": [ // Caucasus
|
||||
new LatLng(39.6170191, 27.634935),
|
||||
new LatLng(38.8735863, 47.1423108),
|
||||
new LatLng(47.3907982, 49.3101946),
|
||||
new LatLng(48.3955879, 26.7753625),
|
||||
new LatLng(39.6170191, 27.634935)
|
||||
],
|
||||
"PersianGulf": [ // Persian Gulf
|
||||
new LatLng(32.9355285, 46.5623682),
|
||||
new LatLng(21.729393, 47.572675),
|
||||
new LatLng(21.8501348, 63.9734737),
|
||||
new LatLng(33.131584, 64.7313594),
|
||||
new LatLng(32.9355285, 46.5623682)
|
||||
],
|
||||
"MarianaIslands": [ // Marianas
|
||||
new LatLng(22.09, 135.0572222),
|
||||
new LatLng(10.5777778, 135.7477778),
|
||||
new LatLng(10.7725, 149.3918333),
|
||||
new LatLng(22.5127778, 149.5427778),
|
||||
new LatLng(22.09, 135.0572222)
|
||||
],
|
||||
"Falklands": [ // South Atlantic
|
||||
new LatLng(-49.097217, -79.418267),
|
||||
new LatLng(-56.874517, -79.418267),
|
||||
new LatLng(-56.874517, -43.316433),
|
||||
new LatLng(-49.097217, -43.316433),
|
||||
new LatLng(-49.097217, -79.418267)
|
||||
],
|
||||
"Normandy": [ // Normandy
|
||||
new LatLng(50.44, -3.29),
|
||||
new LatLng(48.12, -3.29),
|
||||
new LatLng(48.12, 3.70),
|
||||
new LatLng(50.44, 3.70),
|
||||
new LatLng(50.44, -3.29)
|
||||
],
|
||||
"SinaiMap": [ // Sinai
|
||||
new LatLng(34.312222, 28.523333),
|
||||
new LatLng(25.946944, 28.523333),
|
||||
new LatLng(25.946944, 36.897778),
|
||||
new LatLng(34.312222, 36.897778),
|
||||
new LatLng(34.312222, 28.523333)
|
||||
],
|
||||
"Kola": [ // Kola
|
||||
new LatLng(72.055300, 4.0140000),
|
||||
new LatLng(64.421145, 10.353076),
|
||||
new LatLng(63.570300, 39.364000),
|
||||
new LatLng(71.48000, 48.091100),
|
||||
new LatLng(72.055300, 4.01400003)
|
||||
]
|
||||
};
|
||||
|
||||
export const mapBounds = {
|
||||
"Syria": { bounds: new LatLngBounds([31.8472222, 29.8975], [37.7177778, 42.3716667]), zoom: 5 },
|
||||
"MarianaIslands": { bounds: new LatLngBounds([10.5777778, 135.7477778], [22.5127778, 149.5427778]), zoom: 5 },
|
||||
"Nevada": { bounds: new LatLngBounds([34.4037128, -119.7806729], [39.7372411, -112.1130805]), zoom: 5 },
|
||||
"PersianGulf": { bounds: new LatLngBounds([21.729393, 47.572675], [33.131584, 64.7313594]), zoom: 4 },
|
||||
"Caucasus": { bounds: new LatLngBounds([39.6170191, 27.634935], [47.3907982, 49.3101946]), zoom: 4 },
|
||||
"Falklands": { bounds: new LatLngBounds([-49.097217, -79.418267], [-56.874517, -43.316433]), zoom: 3 },
|
||||
"Normandy": { bounds: new LatLngBounds([50.44, -3.29], [48.12, 3.70]), zoom: 5 },
|
||||
"SinaiMap": { bounds: new LatLngBounds([34.312222, 28.523333], [25.946944, 36.897778]), zoom: 4 },
|
||||
"Kola": { bounds: new LatLngBounds([61.59999, 4.29982], [75.05179, 44.29982]), zoom: 3}
|
||||
}
|
||||
|
||||
export const defaultMapMirrors = {}
|
||||
|
||||
export const defaultMapLayers = {}
|
||||
|
||||
/* Map constants */
|
||||
export const IDLE = "Idle";
|
||||
export const MOVE_UNIT = "Move unit";
|
||||
export const COALITIONAREA_DRAW_POLYGON = "Draw Coalition Area";
|
||||
export const visibilityControls: string[] = ["human", "dcs", "aircraft", "helicopter", "groundunit-sam", "groundunit", "navyunit", "airbase"];
|
||||
export const visibilityControlsTypes: string[][] = [["human"], ["dcs"], ["aircraft"], ["helicopter"], ["groundunit-sam"], ["groundunit"], ["navyunit"], ["airbase"]];
|
||||
export const visibilityControlsTooltips: string[] = ["Toggle human players visibility", "Toggle DCS controlled units visibility", "Toggle aircrafts visibility", "Toggle helicopter visibility", "Toggle SAM units visibility", "Toggle ground units (not SAM) visibility", "Toggle navy units visibility", "Toggle airbases visibility"];
|
||||
|
||||
export const MAP_MARKER_CONTROLS: MapMarkerVisibilityControl[] = [{
|
||||
"name": "Human",
|
||||
"image": "visibility/human.svg",
|
||||
"toggles": ["human"],
|
||||
"tooltip": "Toggle human players' visibility"
|
||||
}, {
|
||||
"image": "visibility/olympus.svg",
|
||||
"isProtected": false,
|
||||
"name": "Olympus",
|
||||
"protectable": false,
|
||||
"toggles": ["olympus"],
|
||||
"tooltip": "Toggle Olympus-controlled units' visibility"
|
||||
}, {
|
||||
"image": "visibility/dcs.svg",
|
||||
"isProtected": true,
|
||||
"name": "DCS",
|
||||
"protectable": true,
|
||||
"toggles": ["dcs"],
|
||||
"tooltip": "Toggle DCS-controlled units' visibility"
|
||||
}, {
|
||||
"category": "Aircraft",
|
||||
"image": "visibility/aircraft.svg",
|
||||
"name": "Aircraft",
|
||||
"toggles": ["aircraft"],
|
||||
"tooltip": "Toggle aircraft's visibility"
|
||||
}, {
|
||||
"category": "Helicopter",
|
||||
"image": "visibility/helicopter.svg",
|
||||
"name": "Helicopter",
|
||||
"toggles": ["helicopter"],
|
||||
"tooltip": "Toggle helicopters' visibility"
|
||||
}, {
|
||||
"category": "AirDefence",
|
||||
"image": "visibility/groundunit-sam.svg",
|
||||
"name": "Air defence",
|
||||
"toggles": ["groundunit-sam"],
|
||||
"tooltip": "Toggle air defence units' visibility"
|
||||
}, {
|
||||
"image": "visibility/groundunit.svg",
|
||||
"name": "Ground units",
|
||||
"toggles": ["groundunit"],
|
||||
"tooltip": "Toggle ground units' visibility"
|
||||
}, {
|
||||
"category": "GroundUnit",
|
||||
"image": "visibility/navyunit.svg",
|
||||
"name": "Naval",
|
||||
"toggles": ["navyunit"],
|
||||
"tooltip": "Toggle naval units' visibility"
|
||||
}, {
|
||||
"image": "visibility/airbase.svg",
|
||||
"name": "Airbase",
|
||||
"toggles": ["airbase"],
|
||||
"tooltip": "Toggle airbase' visibility"
|
||||
}];
|
||||
|
||||
export const IADSTypes = ["AAA", "SAM Site", "Radar (EWR)"];
|
||||
export const IADSDensities: { [key: string]: number } = { "AAA": 0.8, "SAM Site": 0.1, "Radar (EWR)": 0.05 };
|
||||
export const GROUND_UNIT_AIR_DEFENCE_REGEX: RegExp = /(\b(AAA|SAM|MANPADS?|[mM]anpads?)|[sS]tinger\b)/;
|
||||
export const HIDE_GROUP_MEMBERS = "Hide group members when zoomed out";
|
||||
export const SHOW_UNIT_LABELS = "Show unit labels (L)";
|
||||
export const SHOW_UNITS_ENGAGEMENT_RINGS = "Show units threat range rings (Q)";
|
||||
export const HIDE_UNITS_SHORT_RANGE_RINGS = "Hide short range units threat range rings (R)";
|
||||
export const SHOW_UNITS_ACQUISITION_RINGS = "Show units detection range rings (E)";
|
||||
export const FILL_SELECTED_RING = "Fill the threat range rings of selected units (F)";
|
||||
export const SHOW_UNIT_CONTACTS = "Show selected units contact lines";
|
||||
export const SHOW_UNIT_PATHS = "Show selected unit paths";
|
||||
export const SHOW_UNIT_TARGETS = "Show selected unit targets";
|
||||
export const DCS_LINK_PORT = "DCS Camera link port";
|
||||
export const DCS_LINK_RATIO = "DCS Camera zoom";
|
||||
|
||||
export enum DataIndexes {
|
||||
startOfData = 0,
|
||||
category,
|
||||
alive,
|
||||
human,
|
||||
controlled,
|
||||
coalition,
|
||||
country,
|
||||
name,
|
||||
unitName,
|
||||
groupName,
|
||||
state,
|
||||
task,
|
||||
hasTask,
|
||||
position,
|
||||
speed,
|
||||
horizontalVelocity,
|
||||
verticalVelocity,
|
||||
heading,
|
||||
track,
|
||||
isActiveTanker,
|
||||
isActiveAWACS,
|
||||
onOff,
|
||||
followRoads,
|
||||
fuel,
|
||||
desiredSpeed,
|
||||
desiredSpeedType,
|
||||
desiredAltitude,
|
||||
desiredAltitudeType,
|
||||
leaderID,
|
||||
formationOffset,
|
||||
targetID,
|
||||
targetPosition,
|
||||
ROE,
|
||||
reactionToThreat,
|
||||
emissionsCountermeasures,
|
||||
TACAN,
|
||||
radio,
|
||||
generalSettings,
|
||||
ammo,
|
||||
contacts,
|
||||
activePath,
|
||||
isLeader,
|
||||
operateAs,
|
||||
shotsScatter,
|
||||
shotsIntensity,
|
||||
health,
|
||||
endOfData = 255
|
||||
};
|
||||
|
||||
export const MGRS_PRECISION_10KM = 2;
|
||||
export const MGRS_PRECISION_1KM = 3;
|
||||
export const MGRS_PRECISION_100M = 4;
|
||||
export const MGRS_PRECISION_10M = 5;
|
||||
export const MGRS_PRECISION_1M = 6;
|
||||
|
||||
export const DELETE_CYCLE_TIME = 0.05;
|
||||
export const DELETE_SLOW_THRESHOLD = 50;
|
||||
|
||||
export const GROUPING_ZOOM_TRANSITION = 13;
|
||||
|
||||
export const MAX_SHOTS_SCATTER = 3;
|
||||
export const MAX_SHOTS_INTENSITY = 3;
|
||||
export const SHOTS_SCATTER_DEGREES = 10;
|
||||
@ -284,7 +284,7 @@ export class Map extends L.Map {
|
||||
/* Periodically check if the camera control endpoint is available */
|
||||
this.#cameraControlTimer = window.setInterval(() => {
|
||||
this.#checkCameraPort();
|
||||
}, 1000)
|
||||
}, 10000)
|
||||
|
||||
/* Option buttons */
|
||||
this.#createUnitMarkerControlButtons();
|
||||
@ -343,6 +343,11 @@ export class Map extends L.Map {
|
||||
} else if (Object.keys(this.#mapMirrors).includes(layerName) ) {
|
||||
let layers: L.TileLayer[] = [];
|
||||
|
||||
layers.push(new L.TileLayer("https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}", {
|
||||
minZoom: 1,
|
||||
maxZoom: 19,
|
||||
}))
|
||||
|
||||
/* Load the configuration file */
|
||||
const mirror = this.#mapMirrors[layerName as any];
|
||||
const request = new Request(mirror + "/config.json");
|
||||
@ -648,6 +653,7 @@ export class Map extends L.Map {
|
||||
}
|
||||
|
||||
setSlaveDCSCamera(newSlaveDCSCamera: boolean) {
|
||||
this.#checkCameraPort();
|
||||
this.#slaveDCSCamera = newSlaveDCSCamera;
|
||||
let button = document.getElementById("camera-link-control");
|
||||
button?.classList.toggle("off", !newSlaveDCSCamera);
|
||||
|
||||
@ -36,7 +36,10 @@ function checkVersion() {
|
||||
if (reg1[0] > reg2[0] || (reg1[0] == reg2[0] && reg1[1] > reg2[1]) || (reg1[0] == reg2[0] && reg1[1] == reg2[1] && reg1[2] > reg2[2])) {
|
||||
logger.log(`New version available: ${res["version"]}`);
|
||||
showConfirmPopup(`<div class='main-message'>You are currently running DCS Olympus ${VERSION}, but ${res["version"]} is available. </div><div class='sub-message'> Do you want to update DCS Olympus automatically? </div> <div style="max-width: 100%; color: orange">Note: DCS and Olympus MUST be stopped before proceeding.</div>`,
|
||||
() => {
|
||||
async () => {
|
||||
/* Nested popup calls need to wait for animation to complete */
|
||||
await sleep(300);
|
||||
|
||||
updateOlympusRelease();
|
||||
}, () => {
|
||||
logger.log("Update canceled");
|
||||
@ -116,8 +119,11 @@ async function updateOlympusRelease() {
|
||||
}
|
||||
})
|
||||
|
||||
/* Select the newest artifact */
|
||||
var asset = res.data.assets.find((asset) => { return asset.name.includes("manager") });
|
||||
|
||||
/* Run the update process */
|
||||
updateOlympus(res.data.assets[0].browser_download_url)
|
||||
updateOlympus(asset.browser_download_url)
|
||||
}
|
||||
|
||||
function updateOlympus(location) {
|
||||
|
||||
@ -30,7 +30,8 @@
|
||||
}
|
||||
},
|
||||
"mapMirrors": {
|
||||
"DCS Map (Refugees)": "https://refugees.dcsolympus.com/maps"
|
||||
"DCS Map (Official)": "https://maps.dcsolympus.com/maps",
|
||||
"DCS Map (Alt.)": "https://refugees.dcsolympus.com/maps"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,6 +34,9 @@ if "%errorlevel%" == "9009" (
|
||||
echo node.js is already installed, continuing installation!
|
||||
)
|
||||
|
||||
echo Installing Visual Studio redistributables
|
||||
"%CD%\dependencies\VC_redist.x64.exe" /install /passive /norestart
|
||||
|
||||
echo Installing node modules for frontend application...
|
||||
cd .\frontend
|
||||
call npm install --omit=dev
|
||||
|
||||
10
scripts/python/.vscode/launch.json
vendored
10
scripts/python/.vscode/launch.json
vendored
@ -6,7 +6,7 @@
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Add missing units",
|
||||
"type": "python",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "addMissingUnits.py",
|
||||
"console": "integratedTerminal",
|
||||
@ -15,7 +15,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Add liveries",
|
||||
"type": "python",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "addLiveries.py",
|
||||
"console": "integratedTerminal",
|
||||
@ -24,7 +24,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Generate payload tables",
|
||||
"type": "python",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "generatePayloadTables.py",
|
||||
"console": "integratedTerminal",
|
||||
@ -33,7 +33,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Add loadouts",
|
||||
"type": "python",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "addLoadouts.py",
|
||||
"console": "integratedTerminal",
|
||||
@ -42,7 +42,7 @@
|
||||
},
|
||||
{
|
||||
"name": "Add ranges",
|
||||
"type": "python",
|
||||
"type": "debugpy",
|
||||
"request": "launch",
|
||||
"program": "addRanges.py",
|
||||
"console": "integratedTerminal",
|
||||
|
||||
@ -78,11 +78,11 @@ if len(sys.argv) > 1:
|
||||
"countries": [country for country in livery.countries] if livery.countries != None else "All"
|
||||
}
|
||||
except Exception as e:
|
||||
print(f"Could not find data for aircraft of type {unit_name}: {e}, skipping...")
|
||||
print(f"Could not find data for unitof type {unit_name}: {e}, skipping...")
|
||||
|
||||
# Dump everything in the database
|
||||
with open(filename, "w") as f:
|
||||
json.dump(database, f, indent=2)
|
||||
with open(filename, "w", encoding='utf8') as f:
|
||||
json.dump(database, f, indent='\t', ensure_ascii=False)
|
||||
|
||||
# Done!
|
||||
print("Done!")
|
||||
|
||||
@ -192,11 +192,11 @@ if len(sys.argv) > 1:
|
||||
}
|
||||
database[unit_name]["loadouts"].append(new_payload)
|
||||
except Exception as e:
|
||||
print(f"Could not find data for aircraft of type {unit_name}: {e}, skipping...")
|
||||
print(f"Could not find data for unitof type {unit_name}: {e}, skipping...")
|
||||
|
||||
# Dump everything in the database
|
||||
with open(filename, "w") as f:
|
||||
json.dump(database, f, indent=2)
|
||||
with open(filename, "w", encoding='utf8') as f:
|
||||
json.dump(database, f, indent='\t', ensure_ascii=False)
|
||||
|
||||
# Done!
|
||||
print("Done!")
|
||||
|
||||
@ -36,8 +36,8 @@ if len(sys.argv) > 1:
|
||||
"name": unit.id,
|
||||
"coalition": "",
|
||||
"era": "",
|
||||
"label": unit.livery_name,
|
||||
"shortLabel": unit.livery_name,
|
||||
"label": unit.livery_name if hasattr(unit, "livery_name") else unit.name,
|
||||
"shortLabel": unit.livery_name if hasattr(unit, "livery_name") else unit.name,
|
||||
"type": unit.__qualname__.split(".")[0],
|
||||
"enabled": False,
|
||||
"liveries": {}
|
||||
@ -69,7 +69,7 @@ if len(sys.argv) > 1:
|
||||
print("Changed case of unit " + id)
|
||||
|
||||
# Dump everything in the database
|
||||
with open(filename, "w") as f:
|
||||
json.dump(database, f, indent=2)
|
||||
with open(filename, "w", encoding='utf-8') as f:
|
||||
json.dump(database, f, indent='\t', ensure_ascii=False)
|
||||
|
||||
print("Done!")
|
||||
@ -51,11 +51,11 @@ if len(sys.argv) > 1:
|
||||
database[unit_name]["engagementRange"] = unitmap[found_name].threat_range
|
||||
|
||||
except Exception as e:
|
||||
print(f"Could not find data for aircraft of type {unit_name}: {e}, skipping...")
|
||||
print(f"Could not find data for unitof type {unit_name}: {e}, skipping...")
|
||||
|
||||
# Dump everything in the database
|
||||
with open(filename, "w") as f:
|
||||
json.dump(database, f, indent=2)
|
||||
with open(filename, "w", encoding='utf8') as f:
|
||||
json.dump(database, f, indent='\t', ensure_ascii=False)
|
||||
|
||||
# Done!
|
||||
print("Done!")
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
15073
scripts/unitPayloads.lua
Normal file
15073
scripts/unitPayloads.lua
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user