mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Compare commits
311 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
119a6f620c | ||
|
|
3e22247f76 | ||
|
|
854bef15e0 | ||
|
|
aacf6d99bc | ||
|
|
a8595a97d8 | ||
|
|
c630fe3045 | ||
|
|
05c7d8166b | ||
|
|
1d3d8ca705 | ||
|
|
97a11d6873 | ||
|
|
15e23564c2 | ||
|
|
42782c60a4 | ||
|
|
62b2b13d75 | ||
|
|
8bf2048d4d | ||
|
|
0fee5c8e7f | ||
|
|
b5e47fdbe6 | ||
|
|
c85e923899 | ||
|
|
a897401975 | ||
|
|
2f43a84224 | ||
|
|
274c16851e | ||
|
|
e77356cb61 | ||
|
|
f4e77b1f5b | ||
|
|
95247062a3 | ||
|
|
959b083a60 | ||
|
|
395409ecae | ||
|
|
5a2b050104 | ||
|
|
732b837a46 | ||
|
|
d60d2e78ef | ||
|
|
a15d2e2ec7 | ||
|
|
df1839cee0 | ||
|
|
1b4d3dd832 | ||
|
|
0e414850bd | ||
|
|
40e984982b | ||
|
|
d7c278b034 | ||
|
|
4e679344d0 | ||
|
|
b0ab0ae8cf | ||
|
|
6edcd8a5ce | ||
|
|
aa0cca67a1 | ||
|
|
c477dcd065 | ||
|
|
6db4455d5a | ||
|
|
54bf19d410 | ||
|
|
52833cadee | ||
|
|
6a45bc9e79 | ||
|
|
88d17d1cb3 | ||
|
|
8c27fdb53c | ||
|
|
e7777a2a48 | ||
|
|
fa4a0ccecb | ||
|
|
b54aa45377 | ||
|
|
eecdcad8e7 | ||
|
|
d68ac6cf2b | ||
|
|
e39b6b5eea | ||
|
|
4eb1b3ef6d | ||
|
|
4204a4b150 | ||
|
|
b64d336922 | ||
|
|
19c1ae82a2 | ||
|
|
61dc9c8b31 | ||
|
|
d078105eb7 | ||
|
|
7ee9946f49 | ||
|
|
5507bca68d | ||
|
|
535b95242c | ||
|
|
e40b79d2c4 | ||
|
|
ecd0581942 | ||
|
|
4f7c3988a0 | ||
|
|
5b7e63b02d | ||
|
|
ef99c21380 | ||
|
|
e0ad679b57 | ||
|
|
61fb80d67f | ||
|
|
a9a0332465 | ||
|
|
4494a5ccbb | ||
|
|
f0c4b10084 | ||
|
|
0bdf362174 | ||
|
|
a53cca8dda | ||
|
|
9aad81588a | ||
|
|
5ba1498802 | ||
|
|
539b183da8 | ||
|
|
396c061a3e | ||
|
|
8c7f6abb1c | ||
|
|
5cc42dd9cf | ||
|
|
f52b5f419e | ||
|
|
3b38ca5920 | ||
|
|
86cfb4fb2f | ||
|
|
166631d618 | ||
|
|
013546a45b | ||
|
|
a2c8563adf | ||
|
|
0c8de2dcf3 | ||
|
|
4f3491062b | ||
|
|
cc8c25a283 | ||
|
|
70740233a9 | ||
|
|
f2d4f0b0ca | ||
|
|
153ca01b96 | ||
|
|
f667410a56 | ||
|
|
f13545eae9 | ||
|
|
7ee24b1c7c | ||
|
|
29784310fc | ||
|
|
3427fcea7e | ||
|
|
c99b5ed19f | ||
|
|
2118ded496 | ||
|
|
4401261446 | ||
|
|
a6ec3a8cd0 | ||
|
|
6e6da64c51 | ||
|
|
a84e190548 | ||
|
|
e0238c2680 | ||
|
|
a60f2e7b62 | ||
|
|
4782596e3c | ||
|
|
832568aa00 | ||
|
|
05e0cc393a | ||
|
|
c74258e3ad | ||
|
|
2e1c3ec4b9 | ||
|
|
9a571132c8 | ||
|
|
acb55044d1 | ||
|
|
14679bd7d8 | ||
|
|
3c9af59051 | ||
|
|
8390a25c50 | ||
|
|
97b277edda | ||
|
|
462fa53c80 | ||
|
|
945c45803b | ||
|
|
20917da437 | ||
|
|
cd25509d3d | ||
|
|
4c3f80d7d7 | ||
|
|
fac32476d4 | ||
|
|
3fa88f3cdf | ||
|
|
46135f7ae0 | ||
|
|
f6e9503045 | ||
|
|
39c28ffb04 | ||
|
|
6373fd300d | ||
|
|
04f281db56 | ||
|
|
5f2fb60e1f | ||
|
|
4efd48c4b9 | ||
|
|
fb6ac40af8 | ||
|
|
9daa683b42 | ||
|
|
baffc9af49 | ||
|
|
bc6c70928f | ||
|
|
9e1503c106 | ||
|
|
57a700d2d2 | ||
|
|
5ca6c97cbe | ||
|
|
55f3bd5adb | ||
|
|
bf7c4beccd | ||
|
|
14d44babe7 | ||
|
|
30a90a96d8 | ||
|
|
c621b5dd85 | ||
|
|
63bdf44e17 | ||
|
|
029decf969 | ||
|
|
b5c7eaf36e | ||
|
|
99de17a858 | ||
|
|
5765ade7f8 | ||
|
|
59a8fba14d | ||
|
|
965b67b8ab | ||
|
|
0ef3abbffa | ||
|
|
2124e9cd42 | ||
|
|
2f1a0ad7d3 | ||
|
|
24e6c219f5 | ||
|
|
daec6dab5b | ||
|
|
3708d4150c | ||
|
|
11518485de | ||
|
|
29118e1ea1 | ||
|
|
aa5b62c1d2 | ||
|
|
f320cb122c | ||
|
|
bb7738724f | ||
|
|
df7eebed39 | ||
|
|
21040da195 | ||
|
|
be625fdca9 | ||
|
|
7ee3fb883b | ||
|
|
c2f6edfd74 | ||
|
|
4f5023b45c | ||
|
|
f0ab43d320 | ||
|
|
d2e803ab82 | ||
|
|
ca45b8b906 | ||
|
|
ec020f7b5d | ||
|
|
f2161da162 | ||
|
|
613aed2d2b | ||
|
|
1d38bd6fea | ||
|
|
6f7b251094 | ||
|
|
a9d873a05f | ||
|
|
05f98b2738 | ||
|
|
1568c65492 | ||
|
|
4a5c4ed7d7 | ||
|
|
ff7385cf49 | ||
|
|
a0de159234 | ||
|
|
d56a95cfa3 | ||
|
|
497f718e4b | ||
|
|
9942ff476b | ||
|
|
c042d2b6f5 | ||
|
|
b9201d583c | ||
|
|
3f67125f20 | ||
|
|
4f72f10642 | ||
|
|
89fb0a9da1 | ||
|
|
0e9b249bba | ||
|
|
0f0ba4c725 | ||
|
|
5542109daf | ||
|
|
ec91b597c8 | ||
|
|
d0f85ae977 | ||
|
|
7d6930fba9 | ||
|
|
2232a114b7 | ||
|
|
33ce537993 | ||
|
|
1ab8e9a16f | ||
|
|
73b1714191 | ||
|
|
cb793e9d0f | ||
|
|
7686a60bfd | ||
|
|
38027b6ff3 | ||
|
|
a512b0e405 | ||
|
|
46fb6a98d5 | ||
|
|
1a8a19ae5c | ||
|
|
8865ded4bd | ||
|
|
7adfe9cce4 | ||
|
|
85e5a6a309 | ||
|
|
d681d3cee0 | ||
|
|
c5650ba29a | ||
|
|
ef0a2d2ddc | ||
|
|
f143e8d874 | ||
|
|
89c1660988 | ||
|
|
4e7c8ef856 | ||
|
|
8024db9579 | ||
|
|
a0634a7f99 | ||
|
|
7bf6c1bb23 | ||
|
|
a62ae4e21e | ||
|
|
6c466a8bb8 | ||
|
|
36f828acb1 | ||
|
|
046e096b9e | ||
|
|
82df3cb316 | ||
|
|
1ba16f82e7 | ||
|
|
72c6bb0086 | ||
|
|
8bb4334187 | ||
|
|
59a9069d4b | ||
|
|
ba534f1786 | ||
|
|
72bb54bde0 | ||
|
|
cb3f46303c | ||
|
|
57f021f995 | ||
|
|
bf4b2272e4 | ||
|
|
31999ec00c | ||
|
|
086b6736b0 | ||
|
|
bf93b8e90a | ||
|
|
4d6bd6c6e9 | ||
|
|
c9dc5eb2f5 | ||
|
|
5fdb704d68 | ||
|
|
6d18e25232 | ||
|
|
7391006a2f | ||
|
|
9207585f5b | ||
|
|
cb53da3a71 | ||
|
|
d2ac5aeff8 | ||
|
|
b646087026 | ||
|
|
82e60cd2cf | ||
|
|
9d46a1c73f | ||
|
|
955057183d | ||
|
|
0396d6bf9c | ||
|
|
ee1d89007c | ||
|
|
4245927a6c | ||
|
|
f585828936 | ||
|
|
7450c9e506 | ||
|
|
d957cd6655 | ||
|
|
ef91f840ae | ||
|
|
17c74fbe91 | ||
|
|
17a7a1889e | ||
|
|
24ed96b348 | ||
|
|
15e8c9e791 | ||
|
|
de14f6c738 | ||
|
|
92b1a46e8a | ||
|
|
cbaadb6fc9 | ||
|
|
44295673dc | ||
|
|
8bf0f403e2 | ||
|
|
917a0d10e5 | ||
|
|
9c65411733 | ||
|
|
6c315d89e1 | ||
|
|
b5f1a459c2 | ||
|
|
6b12000979 | ||
|
|
1aec7f8081 | ||
|
|
5f0e96e2e6 | ||
|
|
678a8585a9 | ||
|
|
e632e379b6 | ||
|
|
1a7d2b5028 | ||
|
|
ce28d49510 | ||
|
|
0ac632cc9b | ||
|
|
47e4757b6e | ||
|
|
d21ee2a7b6 | ||
|
|
0cec61afea | ||
|
|
ff04364178 | ||
|
|
0cf2733d55 | ||
|
|
f5319ed654 | ||
|
|
cfef9f4bc4 | ||
|
|
6abf7f059a | ||
|
|
c0c1ff6e17 | ||
|
|
856dba83a5 | ||
|
|
2f37916595 | ||
|
|
f36a29570b | ||
|
|
62a3719163 | ||
|
|
e9511e9233 | ||
|
|
51cf15b8cc | ||
|
|
278d0bdd3c | ||
|
|
0a07f85fcf | ||
|
|
7face05e12 | ||
|
|
22ad5d5972 | ||
|
|
2e194d557a | ||
|
|
1a76df2056 | ||
|
|
787bf13f3c | ||
|
|
10f1c6a862 | ||
|
|
0366cc38e2 | ||
|
|
603018d1ef | ||
|
|
66ae06056b | ||
|
|
17486ab40c | ||
|
|
6cae91b06f | ||
|
|
9c055e0d71 | ||
|
|
db4aeca47d | ||
|
|
c29a368e5a | ||
|
|
dbe2442bb7 | ||
|
|
2108fc4b26 | ||
|
|
48f962ca4b | ||
|
|
e80a5e8ca1 | ||
|
|
fb2ecc75eb | ||
|
|
ee95291418 | ||
|
|
46796fce13 | ||
|
|
ee08f57abe | ||
|
|
eb86d8dfca | ||
|
|
c75e20e58f |
13
.github/workflows/build_package.yml
vendored
13
.github/workflows/build_package.yml
vendored
@@ -2,7 +2,7 @@ name: Build & package
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ "main" ]
|
branches: [ "main", "release-candidate" ]
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -33,6 +33,13 @@ jobs:
|
|||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v3.1.3
|
uses: actions/upload-artifact@v3.1.3
|
||||||
with:
|
with:
|
||||||
name: latest
|
name: development_build_not_a_release
|
||||||
path: installer/Output/*.exe
|
path: ./package
|
||||||
|
|
||||||
|
- name: Upload a Build Artifact
|
||||||
|
uses: actions/upload-artifact@v3.1.3
|
||||||
|
with:
|
||||||
|
name: zip_only_package
|
||||||
|
path: ./zip
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
42
.github/workflows/documentation.yml
vendored
42
.github/workflows/documentation.yml
vendored
@@ -1,42 +0,0 @@
|
|||||||
# ci.yml file for GitHub Actions
|
|
||||||
name: Documentation
|
|
||||||
|
|
||||||
on: [push]
|
|
||||||
|
|
||||||
# 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: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout the repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@v2
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: npm ci
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
- name: Create the docs directory locally in CI
|
|
||||||
run: npx typedoc --out ../docs/client @types/*.d.ts src/**/*.ts
|
|
||||||
working-directory: ./client
|
|
||||||
|
|
||||||
- name: Install Doxygen
|
|
||||||
run: sudo apt-get install doxygen -y
|
|
||||||
shell: bash
|
|
||||||
|
|
||||||
- name: Generate Doxygen Documentation
|
|
||||||
run: doxygen docs
|
|
||||||
shell: bash
|
|
||||||
working-directory: ./src
|
|
||||||
|
|
||||||
- name: Deploy 🚀
|
|
||||||
uses: JamesIves/github-pages-deploy-action@v4
|
|
||||||
with:
|
|
||||||
folder: docs
|
|
||||||
49
.gitignore
vendored
49
.gitignore
vendored
@@ -1,25 +1,42 @@
|
|||||||
bin
|
bin
|
||||||
.vs
|
.vs
|
||||||
x64
|
x64
|
||||||
/src/vcpkg_installed
|
|
||||||
*.user
|
|
||||||
Output
|
Output
|
||||||
*.aps
|
|
||||||
node_modules
|
node_modules
|
||||||
/client/TODO.txt
|
|
||||||
/client/public/javascripts/bundle.js
|
|
||||||
!client/bin
|
|
||||||
/client/public/plugins
|
|
||||||
/client/plugins/controltips/index.js
|
|
||||||
hgt
|
hgt
|
||||||
/client/public/databases/units/old
|
|
||||||
/client/plugins/databasemanager/index.js
|
/backend/vcpkg_installed
|
||||||
|
|
||||||
|
/frontend/server/TODO.txt
|
||||||
|
/frontend/server/public/javascripts/bundle.js
|
||||||
|
/frontend/server/public/plugins
|
||||||
|
/frontend/server/plugins/controltips/index.js
|
||||||
|
/frontend/server/public/databases/units/old
|
||||||
|
/frontend/server/plugins/databasemanager/index.js
|
||||||
|
|
||||||
/src/html
|
/src/html
|
||||||
/src/latex
|
/src/latex
|
||||||
client/public/stylesheets/leaflet/leaflet-gesture-handling.css
|
|
||||||
client/public/javascripts/leaflet.nauticscale.js
|
/package
|
||||||
client/public/javascripts/L.Path.Drag.js
|
/build
|
||||||
/installer/archive/Scripts
|
/DCS Olympus backups
|
||||||
/installer/archive/Mods
|
/zip
|
||||||
/installer/installer/DCSOlympus*.exe
|
|
||||||
|
*.user
|
||||||
|
*.aps
|
||||||
|
|
||||||
|
L.Path.Drag.js
|
||||||
|
leaflet-gesture-handling.css
|
||||||
|
leaflet.nauticscale.js
|
||||||
|
leaflet.css
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
|
!frontend/server/bin
|
||||||
|
/mock-dcs
|
||||||
|
/frontend/setup
|
||||||
|
frontend/server/public/plugins/controltipsplugin/index.js
|
||||||
|
frontend/website/plugins/controltips/index.js
|
||||||
|
/frontend/server/public/maps
|
||||||
|
*.pyc
|
||||||
|
/scripts/**/*.jpg
|
||||||
|
manager/manager.log
|
||||||
|
|||||||
BIN
DCS Olympus Manager.lnk
Normal file
BIN
DCS Olympus Manager.lnk
Normal file
Binary file not shown.
59
INSTRUCTIONS.txt
Normal file
59
INSTRUCTIONS.txt
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
_____ _____ _____ ____ _
|
||||||
|
| __ \ / ____|/ ____| / __ \| |
|
||||||
|
| | | | | | (___ | | | | |_ _ _ __ ___ _ __ _ _ ___
|
||||||
|
| | | | | \___ \ | | | | | | | | '_ ` _ \| '_ \| | | / __|
|
||||||
|
| |__| | |____ ____) | | |__| | | |_| | | | | | | |_) | |_| \__ \
|
||||||
|
|_____/ \_____|_____/ \____/|_|\__, |_| |_| |_| .__/ \__,_|___/
|
||||||
|
__/ | | |
|
||||||
|
|___/ |_|
|
||||||
|
|
||||||
|
{{OLYMPUS_VERSION_NUMBER}}
|
||||||
|
|
||||||
|
==========================================
|
||||||
|
INSTALLATION INSTRUCTIONS
|
||||||
|
|
||||||
|
1) Close any applications which may interfere with installation, including Digital Combat Simulator (DCS) and previous versions of Olympus.
|
||||||
|
|
||||||
|
2) If you DO NOT have Olympus already installed, SKIP THIS STEP. If you have already installed Olympus, do the following:
|
||||||
|
NOTE: If you made any changes to your unit databases or mods.lua file (e.g. to support a third party mod) make a backup of the edited files before proceeding or changes will be lost;
|
||||||
|
a) If you installed DCS Olympus v1.0.3 using the installer, simply remove it using Windows's "Add or remove programs" application.
|
||||||
|
b) If you installed DCS Olympus v1.0.3 using the archived version, remove it by deleting the "...<DCS Saved Games folder>\Mods\Services\Olympus" folder. Do this for every DCS instance you installed Olympus in.
|
||||||
|
Remember to delete any shortcuts you created. Don't worry, they will be created automatically again by the installation script provided in this package.
|
||||||
|
|
||||||
|
3) Create a folder named "DCS Olympus" in your "Saved Games" directory and extract all the contents of the downloaded package into it.
|
||||||
|
NOTE:
|
||||||
|
a) Do not extract the contents of the package directly in your Saved Games folder or in your DCS Saved Games folder.
|
||||||
|
b) Unlike previous version of Olympus, it is no longer necessary to copy the packaged files into each DCS instance folder.
|
||||||
|
|
||||||
|
4) Execute the "installer.bat" script by double-clicking on it. It is located in the folder you created in step 3. Wait for the installation script to complete. Installation may take a couple of minutes, after which the Manager will start automatically.
|
||||||
|
NOTE: depending on your Windows configuration, the script may be called "installer" (without .bat at the end).
|
||||||
|
|
||||||
|
5) The Olympus Manager will open. This will allow you to add/remove Olympus to individual DCS instances.
|
||||||
|
Use the Olympus Manager and follow the instructions to install and setup Olympus.
|
||||||
|
|
||||||
|
6) Start DCS and run a mission. Make sure it is UNPAUSED.
|
||||||
|
|
||||||
|
7) Open Olympus via the shortcut and login using any username and the Game Master password set using the Manager. (NOTE: not your DCS server password).
|
||||||
|
Local installation: run the client from the provided desktop shortcut or start it using the "View and manage instances" page of the Manager.
|
||||||
|
Dedicated server: users must first start the Olympus server from the provided desktop shortcut or using the "View and manage instances" page of the Manager.
|
||||||
|
Then log in using any browser and visiting "http:\\<server IP>:<frontend port>" (frontend port is 3000 by default, but can be edited using the Manager)
|
||||||
|
|
||||||
|
8) You can use the manager at any time to change the ports and/or passwords. If you do, REMEMBER TO RESTART OLYMPUS AND DCS.
|
||||||
|
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
a) when launching the Manager you will be prompted to allow Electron to create a firewall rule. This is optional and can be denied without effect on the operation of the Manager;
|
||||||
|
b) if you are using Olympus on a dedicated server with a router, you must enable port forwarding on the frontend port (3000 by default);
|
||||||
|
c) unlike Olympus v1.0.3, running the netsh command is no longer required. It is also no longer required to create firewall rules or port forwarding for the backend port. (Optional) If you already performed this steps in the past you can delete the firewall and netsh rules.
|
||||||
|
|
||||||
|
|
||||||
|
==========================================
|
||||||
|
UPDATING INSTRUCTIONS
|
||||||
|
|
||||||
|
IF YOU ARE UPDATING FROM DCS OLYMPUS v1.0.3, FOLLOW THE "INSTALLATION INSTRUCTIONS".
|
||||||
|
|
||||||
|
To update your Olympus installation you have two options:
|
||||||
|
a) download the new package from the GitHub releases page, delete the old unpacked package folder, then follow the INSTALLATION INSTRUCTIONS;
|
||||||
|
b) run the Olympus Manager. If an update is available you will be given the option to automatically update Olympus from there.
|
||||||
|
|
||||||
|
For either options a) or b), remember to close any applications which may interfere with installation, including Digital Combat Simulator (DCS) and previous versions of Olympus.
|
||||||
33
README.md
33
README.md
@@ -1,4 +1,3 @@
|
|||||||
## Important note: DCS Olympus is in beta state. No official release has been produced yet. The first public version is planned for mid december 2023.
|
|
||||||
<img align="left" width="30" src="https://github.com/Pax1601/DCSOlympus/assets/103559271/0ecff279-a87c-4e2d-a4c7-da98c74adf38">
|
<img align="left" width="30" src="https://github.com/Pax1601/DCSOlympus/assets/103559271/0ecff279-a87c-4e2d-a4c7-da98c74adf38">
|
||||||
|
|
||||||
[**Join our Discord**](https://discord.gg/kNAQkhUHnQ)
|
[**Join our Discord**](https://discord.gg/kNAQkhUHnQ)
|
||||||
@@ -10,8 +9,6 @@
|
|||||||
|
|
||||||
# DCS Olympus
|
# DCS Olympus
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
### What is this?
|
### 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.
|
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.
|
||||||
|
|
||||||
@@ -24,18 +21,30 @@ Even better it requires no client mods be installed if used on a server
|
|||||||
The full feature list is simply too long to enumerate in a short summary but needless to say Olympus offers up a lot of unique gameplay that has previously not existed, and enhances many other elements of DCS in exciting ways
|
The full feature list is simply too long to enumerate in a short summary but needless to say Olympus offers up a lot of unique gameplay that has previously not existed, and enhances many other elements of DCS in exciting ways
|
||||||
|
|
||||||
### Installing DCS Olympus
|
### Installing DCS Olympus
|
||||||
A prebuilt installer will soon be released and available here
|
Check the [Wiki](https://github.com/Pax1601/DCSOlympus/wiki) for installation instructions
|
||||||
|
|
||||||
# Frequently Asked Questions
|
# 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? ###
|
### 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.
|
Same as above!
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
### Do you have a roadmap? ###
|
### Do you have a roadmap? ###
|
||||||
We do not have a roadmap no, we have a laundry list of things we are hoping to do.
|
We do not have a roadmap no, we have a laundry list of things we are hoping to do.
|
||||||
@@ -72,9 +81,5 @@ A and B never communicate when you connect the client you download the web page
|
|||||||
Olympus by itself should not have a noticeable impact on server performance, however the ability for the user to spawn arbitrary units and command engagements means Olympus can be used in such a way that brings the game to it's knees.
|
Olympus by itself should not have a noticeable impact on server performance, however the ability for the user to spawn arbitrary units and command engagements means Olympus can be used in such a way that brings the game to it's knees.
|
||||||
|
|
||||||
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
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
FILEVERSION 1,0,4,0
|
||||||
PRODUCTVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
PRODUCTVERSION 1,0,3,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -79,12 +79,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "DCS Olympus"
|
VALUE "CompanyName", "DCS Olympus"
|
||||||
VALUE "FileDescription", "DCS Olympus"
|
VALUE "FileDescription", "DCS Olympus"
|
||||||
VALUE "FileVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "FileVersion", "1.0.4.0"
|
||||||
VALUE "InternalName", "core.dll"
|
VALUE "InternalName", "core.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2023"
|
VALUE "LegalCopyright", "Copyright (C) 2023"
|
||||||
VALUE "OriginalFilename", "core.dll"
|
VALUE "OriginalFilename", "core.dll"
|
||||||
VALUE "ProductName", "DCS Olympus"
|
VALUE "ProductName", "DCS Olympus"
|
||||||
VALUE "ProductVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "ProductVersion", "1.0.4.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
@@ -110,26 +110,26 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<OutDir>.\..\..\bin\$(Platform)\$(Configuration)\</OutDir>
|
<OutDir>.\..\..\bin\$(Platform)\$(Configuration)\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<OutDir>.\..\..\bin\</OutDir>
|
<OutDir>.\..\..\build\backend\bin\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -152,6 +152,7 @@ struct SpawnOptions {
|
|||||||
string unitType;
|
string unitType;
|
||||||
Coords location;
|
Coords location;
|
||||||
string loadout;
|
string loadout;
|
||||||
|
string skill;
|
||||||
string liveryID;
|
string liveryID;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -46,7 +46,9 @@ string SpawnGroundUnits::getString()
|
|||||||
<< "unitType = " << "\"" << spawnOptions[i].unitType << "\"" << ", "
|
<< "unitType = " << "\"" << spawnOptions[i].unitType << "\"" << ", "
|
||||||
<< "lat = " << spawnOptions[i].location.lat << ", "
|
<< "lat = " << spawnOptions[i].location.lat << ", "
|
||||||
<< "lng = " << spawnOptions[i].location.lng << ", "
|
<< "lng = " << spawnOptions[i].location.lng << ", "
|
||||||
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << " }, ";
|
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << ", "
|
||||||
|
<< "skill = \"" << spawnOptions[i].skill << "\"" << "}, ";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostringstream commandSS;
|
std::ostringstream commandSS;
|
||||||
@@ -70,7 +72,8 @@ string SpawnNavyUnits::getString()
|
|||||||
<< "unitType = " << "\"" << spawnOptions[i].unitType << "\"" << ", "
|
<< "unitType = " << "\"" << spawnOptions[i].unitType << "\"" << ", "
|
||||||
<< "lat = " << spawnOptions[i].location.lat << ", "
|
<< "lat = " << spawnOptions[i].location.lat << ", "
|
||||||
<< "lng = " << spawnOptions[i].location.lng << ", "
|
<< "lng = " << spawnOptions[i].location.lng << ", "
|
||||||
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << " }, ";
|
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << ", "
|
||||||
|
<< "skill = \"" << spawnOptions[i].skill << "\"" << "}, ";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostringstream commandSS;
|
std::ostringstream commandSS;
|
||||||
@@ -95,7 +98,8 @@ string SpawnAircrafts::getString()
|
|||||||
<< "lng = " << spawnOptions[i].location.lng << ", "
|
<< "lng = " << spawnOptions[i].location.lng << ", "
|
||||||
<< "alt = " << spawnOptions[i].location.alt << ", "
|
<< "alt = " << spawnOptions[i].location.alt << ", "
|
||||||
<< "loadout = \"" << spawnOptions[i].loadout << "\"" << ", "
|
<< "loadout = \"" << spawnOptions[i].loadout << "\"" << ", "
|
||||||
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << " }, ";
|
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << ", "
|
||||||
|
<< "skill = \"" << spawnOptions[i].skill << "\"" << "}, ";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostringstream commandSS;
|
std::ostringstream commandSS;
|
||||||
@@ -122,7 +126,8 @@ string SpawnHelicopters::getString()
|
|||||||
<< "lng = " << spawnOptions[i].location.lng << ", "
|
<< "lng = " << spawnOptions[i].location.lng << ", "
|
||||||
<< "alt = " << spawnOptions[i].location.alt << ", "
|
<< "alt = " << spawnOptions[i].location.alt << ", "
|
||||||
<< "loadout = \"" << spawnOptions[i].loadout << "\"" << ", "
|
<< "loadout = \"" << spawnOptions[i].loadout << "\"" << ", "
|
||||||
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << " }, ";
|
<< "liveryID = " << "\"" << spawnOptions[i].liveryID << "\"" << ", "
|
||||||
|
<< "skill = \"" << spawnOptions[i].skill << "\"" << "}, ";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostringstream commandSS;
|
std::ostringstream commandSS;
|
||||||
@@ -167,6 +167,7 @@ void NavyUnit::AIloop()
|
|||||||
setState(State::IDLE);
|
setState(State::IDLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case State::ATTACK: {
|
case State::ATTACK: {
|
||||||
@@ -187,6 +188,8 @@ void NavyUnit::AIloop()
|
|||||||
else {
|
else {
|
||||||
setState(State::IDLE);
|
setState(State::IDLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case State::FIRE_AT_AREA: {
|
case State::FIRE_AT_AREA: {
|
||||||
setTask("Firing at area");
|
setTask("Firing at area");
|
||||||
@@ -200,6 +203,8 @@ void NavyUnit::AIloop()
|
|||||||
scheduler->appendCommand(command);
|
scheduler->appendCommand(command);
|
||||||
setHasTask(true);
|
setHasTask(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
case State::SIMULATE_FIRE_FIGHT: {
|
case State::SIMULATE_FIRE_FIGHT: {
|
||||||
setTask("Simulating fire fight");
|
setTask("Simulating fire fight");
|
||||||
@@ -207,6 +212,7 @@ void NavyUnit::AIloop()
|
|||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
setState(State::IDLE);
|
setState(State::IDLE);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -192,6 +192,7 @@ void Scheduler::handleRequest(string key, json::value value, string username, js
|
|||||||
string airbaseName = to_string(value[L"airbaseName"]);
|
string airbaseName = to_string(value[L"airbaseName"]);
|
||||||
string country = to_string(value[L"country"]);
|
string country = to_string(value[L"country"]);
|
||||||
|
|
||||||
|
|
||||||
int spawnPoints = value[L"spawnPoints"].as_number().to_int32();
|
int spawnPoints = value[L"spawnPoints"].as_number().to_int32();
|
||||||
if (!checkSpawnPoints(spawnPoints, coalition)) return;
|
if (!checkSpawnPoints(spawnPoints, coalition)) return;
|
||||||
|
|
||||||
@@ -204,9 +205,10 @@ void Scheduler::handleRequest(string key, json::value value, string username, js
|
|||||||
Coords location; location.lat = lat; location.lng = lng; location.alt = alt;
|
Coords location; location.lat = lat; location.lng = lng; location.alt = alt;
|
||||||
string loadout = to_string(unit[L"loadout"]);
|
string loadout = to_string(unit[L"loadout"]);
|
||||||
string liveryID = to_string(unit[L"liveryID"]);
|
string liveryID = to_string(unit[L"liveryID"]);
|
||||||
|
string skill = to_string(unit[L"skill"]);
|
||||||
|
|
||||||
spawnOptions.push_back({unitType, location, loadout, liveryID});
|
spawnOptions.push_back({unitType, location, loadout, skill, liveryID});
|
||||||
log(username + " spawned a " + coalition + " " + unitType, true);
|
log(username + " spawned a " + coalition + " " + unitType , true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key.compare("spawnAircrafts") == 0)
|
if (key.compare("spawnAircrafts") == 0)
|
||||||
@@ -231,8 +233,9 @@ void Scheduler::handleRequest(string key, json::value value, string username, js
|
|||||||
double lng = unit[L"location"][L"lng"].as_double();
|
double lng = unit[L"location"][L"lng"].as_double();
|
||||||
Coords location; location.lat = lat; location.lng = lng;
|
Coords location; location.lat = lat; location.lng = lng;
|
||||||
string liveryID = to_string(unit[L"liveryID"]);
|
string liveryID = to_string(unit[L"liveryID"]);
|
||||||
|
string skill = to_string(unit[L"skill"]);
|
||||||
|
|
||||||
spawnOptions.push_back({ unitType, location, "", liveryID });
|
spawnOptions.push_back({ unitType, location, "", skill, liveryID});
|
||||||
log(username + " spawned a " + coalition + " " + unitType, true);
|
log(username + " spawned a " + coalition + " " + unitType, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "luatools.h"
|
#include "luatools.h"
|
||||||
#include "dcstools.h"
|
#include "dcstools.h"
|
||||||
|
#include "defines.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
@@ -38,9 +39,9 @@ void registerLuaFunctions(lua_State* L)
|
|||||||
log("protectedCall registered successfully");
|
log("protectedCall registered successfully");
|
||||||
}
|
}
|
||||||
|
|
||||||
executeLuaScript(L, instancePath + "..\\Scripts\\mist.lua");
|
executeLuaScript(L, instancePath + MIST_SCRIPT);
|
||||||
executeLuaScript(L, instancePath + "..\\Scripts\\OlympusCommand.lua");
|
executeLuaScript(L, instancePath + OLYMPUS_COMMAND_SCRIPT);
|
||||||
executeLuaScript(L, instancePath + "..\\Scripts\\unitPayloads.lua");
|
executeLuaScript(L, instancePath + UNIT_PAYLOADS_SCRIPT);
|
||||||
executeLuaScript(L, instancePath + "..\\Scripts\\templates.lua");
|
executeLuaScript(L, instancePath + TEMPLATES_SCRIPT);
|
||||||
executeLuaScript(L, instancePath + "..\\Scripts\\mods.lua");
|
executeLuaScript(L, instancePath + MODS_SCRIPT);
|
||||||
}
|
}
|
||||||
@@ -296,14 +296,14 @@ void Server::task()
|
|||||||
ss << ifstream.rdbuf();
|
ss << ifstream.rdbuf();
|
||||||
std::error_code errorCode;
|
std::error_code errorCode;
|
||||||
json::value config = json::value::parse(ss.str(), errorCode);
|
json::value config = json::value::parse(ss.str(), errorCode);
|
||||||
if (config.is_object() && config.has_object_field(L"server") &&
|
if (config.is_object() && config.has_object_field(L"backend") &&
|
||||||
config[L"server"].has_string_field(L"address") && config[L"server"].has_number_field(L"port"))
|
config[L"backend"].has_string_field(L"address") && config[L"backend"].has_number_field(L"port"))
|
||||||
{
|
{
|
||||||
address = "http://" + to_string(config[L"server"][L"address"]) + ":" + to_string(config[L"server"][L"port"].as_number().to_int32());
|
address = "http://" + to_string(config[L"backend"][L"address"]) + ":" + to_string(config[L"backend"][L"port"].as_number().to_int32());
|
||||||
log("Starting server on " + address);
|
log("Starting backend on " + address);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
log("Error reading configuration file. Starting server on " + address);
|
log("Error reading configuration file. Starting backend on " + address);
|
||||||
|
|
||||||
if (config.is_object() && config.has_object_field(L"authentication"))
|
if (config.is_object() && config.has_object_field(L"authentication"))
|
||||||
{
|
{
|
||||||
@@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
FILEVERSION 1,0,4,0
|
||||||
PRODUCTVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
PRODUCTVERSION 1,0,3,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -79,12 +79,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "DCS Olympus"
|
VALUE "CompanyName", "DCS Olympus"
|
||||||
VALUE "FileDescription", "DCS Olympus"
|
VALUE "FileDescription", "DCS Olympus"
|
||||||
VALUE "FileVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "FileVersion", "1.0.4.0"
|
||||||
VALUE "InternalName", "dcstools.dll"
|
VALUE "InternalName", "dcstools.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2023"
|
VALUE "LegalCopyright", "Copyright (C) 2023"
|
||||||
VALUE "OriginalFilename", "dcstools.dll"
|
VALUE "OriginalFilename", "dcstools.dll"
|
||||||
VALUE "ProductName", "DCS Olympus"
|
VALUE "ProductName", "DCS Olympus"
|
||||||
VALUE "ProductVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "ProductVersion", "1.0.4.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
@@ -77,23 +77,23 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<OutDir>.\..\..\bin\</OutDir>
|
<OutDir>.\..\..\build\backend\bin\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "framework.h"
|
#include "framework.h"
|
||||||
|
|
||||||
|
void DllExport setLogDirectory(std::string m_dirPath);
|
||||||
void DllExport log(const std::string& sMessage, bool addToJSON = false);
|
void DllExport log(const std::string& sMessage, bool addToJSON = false);
|
||||||
void DllExport log(const std::wstring& sMessage, bool addToJSON = false);
|
void DllExport log(const std::wstring& sMessage, bool addToJSON = false);
|
||||||
void DllExport getLogsJSON(json::value& json, unsigned long long time);
|
void DllExport getLogsJSON(json::value& json, unsigned long long time);
|
||||||
@@ -8,6 +8,7 @@ public:
|
|||||||
void log(const string& sMessage, bool addToJSON);
|
void log(const string& sMessage, bool addToJSON);
|
||||||
void log(const wstring& sMessage, bool addToJSON);
|
void log(const wstring& sMessage, bool addToJSON);
|
||||||
void toJSON(json::value& json, unsigned long long time);
|
void toJSON(json::value& json, unsigned long long time);
|
||||||
|
void setDirectory(string newDirPath);
|
||||||
|
|
||||||
static Logger* GetLogger();
|
static Logger* GetLogger();
|
||||||
|
|
||||||
@@ -20,9 +21,11 @@ private:
|
|||||||
static Logger* m_pThis;
|
static Logger* m_pThis;
|
||||||
static ofstream m_Logfile;
|
static ofstream m_Logfile;
|
||||||
static std::map<unsigned long long, std::string> m_logs;
|
static std::map<unsigned long long, std::string> m_logs;
|
||||||
|
static string m_dirPath;
|
||||||
|
|
||||||
mutex mutexLock;
|
mutex mutexLock;
|
||||||
|
|
||||||
|
void Clear();
|
||||||
void Open();
|
void Open();
|
||||||
void Close();
|
void Close();
|
||||||
};
|
};
|
||||||
@@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
FILEVERSION 1,0,4,0
|
||||||
PRODUCTVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
PRODUCTVERSION 1,0,3,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -79,12 +79,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "DCS Olympus"
|
VALUE "CompanyName", "DCS Olympus"
|
||||||
VALUE "FileDescription", "DCS Olympus"
|
VALUE "FileDescription", "DCS Olympus"
|
||||||
VALUE "FileVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "FileVersion", "1.0.4.0"
|
||||||
VALUE "InternalName", "logger.dll"
|
VALUE "InternalName", "logger.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2023"
|
VALUE "LegalCopyright", "Copyright (C) 2023"
|
||||||
VALUE "OriginalFilename", "logger.dll"
|
VALUE "OriginalFilename", "logger.dll"
|
||||||
VALUE "ProductName", "DCS Olympus"
|
VALUE "ProductName", "DCS Olympus"
|
||||||
VALUE "ProductVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "ProductVersion", "1.0.4.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
@@ -76,23 +76,23 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<OutDir>.\..\..\bin\</OutDir>
|
<OutDir>.\..\..\build\backend\bin\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -4,6 +4,11 @@
|
|||||||
|
|
||||||
#define LOGGER Logger::GetLogger()
|
#define LOGGER Logger::GetLogger()
|
||||||
|
|
||||||
|
void setLogDirectory(string m_dirPath)
|
||||||
|
{
|
||||||
|
LOGGER->setDirectory(m_dirPath);
|
||||||
|
}
|
||||||
|
|
||||||
void log(const string& message, bool addToJSON)
|
void log(const string& message, bool addToJSON)
|
||||||
{
|
{
|
||||||
LOGGER->log(message, addToJSON);
|
LOGGER->log(message, addToJSON);
|
||||||
@@ -8,25 +8,51 @@ const string Logger::m_sFileName = LOG_NAME;
|
|||||||
Logger* Logger::m_pThis = NULL;
|
Logger* Logger::m_pThis = NULL;
|
||||||
ofstream Logger::m_Logfile;
|
ofstream Logger::m_Logfile;
|
||||||
std::map<unsigned long long, std::string> Logger::m_logs;
|
std::map<unsigned long long, std::string> Logger::m_logs;
|
||||||
|
std::string Logger::m_dirPath;
|
||||||
|
|
||||||
Logger::Logger()
|
Logger::Logger()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger* Logger::GetLogger()
|
Logger* Logger::GetLogger()
|
||||||
{
|
{
|
||||||
if (m_pThis == NULL) {
|
if (m_pThis == NULL) {
|
||||||
m_pThis = new Logger();
|
m_pThis = new Logger();
|
||||||
std::filesystem::path dirPath = std::filesystem::temp_directory_path();
|
m_pThis->Clear();
|
||||||
m_Logfile.open((dirPath.string() + m_sFileName).c_str(), ios::out);
|
|
||||||
}
|
}
|
||||||
return m_pThis;
|
return m_pThis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Logger::setDirectory(string newDirPath)
|
||||||
|
{
|
||||||
|
m_dirPath = newDirPath;
|
||||||
|
Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Logger::Clear()
|
||||||
|
{
|
||||||
|
lock_guard<mutex> guard(mutexLock);
|
||||||
|
try {
|
||||||
|
m_Logfile.open((m_dirPath + m_sFileName).c_str(), ios::out | 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::trunc);
|
||||||
|
}
|
||||||
|
m_Logfile << "Creating a new log instance\n";
|
||||||
|
m_pThis->Close();
|
||||||
|
}
|
||||||
|
|
||||||
void Logger::Open()
|
void Logger::Open()
|
||||||
{
|
{
|
||||||
std::filesystem::path dirPath = std::filesystem::temp_directory_path();
|
try {
|
||||||
m_Logfile.open((dirPath.string() + m_sFileName).c_str(), ios::out | ios::app);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Logger::Close()
|
void Logger::Close()
|
||||||
@@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
FILEVERSION 1,0,4,0
|
||||||
PRODUCTVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
PRODUCTVERSION 1,0,3,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -79,12 +79,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "DCS Olympus"
|
VALUE "CompanyName", "DCS Olympus"
|
||||||
VALUE "FileDescription", "DCS Olympus"
|
VALUE "FileDescription", "DCS Olympus"
|
||||||
VALUE "FileVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "FileVersion", "1.0.4.0"
|
||||||
VALUE "InternalName", "luatools.dll"
|
VALUE "InternalName", "luatools.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2023"
|
VALUE "LegalCopyright", "Copyright (C) 2023"
|
||||||
VALUE "OriginalFilename", "luatools.dll"
|
VALUE "OriginalFilename", "luatools.dll"
|
||||||
VALUE "ProductName", "DCS Olympus"
|
VALUE "ProductName", "DCS Olympus"
|
||||||
VALUE "ProductVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "ProductVersion", "1.0.4.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
@@ -60,23 +60,23 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<OutDir>.\..\..\bin\</OutDir>
|
<OutDir>.\..\..\build\backend\bin\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
FILEVERSION 1,0,4,0
|
||||||
PRODUCTVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
PRODUCTVERSION 1,0,3,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -79,12 +79,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "DCS Olympus"
|
VALUE "CompanyName", "DCS Olympus"
|
||||||
VALUE "FileDescription", "DCS Olympus"
|
VALUE "FileDescription", "DCS Olympus"
|
||||||
VALUE "FileVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "FileVersion", "1.0.4.0"
|
||||||
VALUE "InternalName", "olympus.dll"
|
VALUE "InternalName", "olympus.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2023"
|
VALUE "LegalCopyright", "Copyright (C) 2023"
|
||||||
VALUE "OriginalFilename", "olympus.dll"
|
VALUE "OriginalFilename", "olympus.dll"
|
||||||
VALUE "ProductName", "DCS Olympus"
|
VALUE "ProductName", "DCS Olympus"
|
||||||
VALUE "ProductVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "ProductVersion", "1.0.4.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
@@ -62,11 +62,11 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Import Project="..\DCSOlympus.props" />
|
<Import Project="..\DCSOlympus.props" />
|
||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
@@ -75,7 +75,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<OutDir>.\..\..\bin\</OutDir>
|
<OutDir>.\..\..\build\backend\bin\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
@@ -49,6 +49,9 @@ static int onSimulationStart(lua_State* L)
|
|||||||
{
|
{
|
||||||
LogInfo(L, "Trying to load core.dll from " + modPath);
|
LogInfo(L, "Trying to load core.dll from " + modPath);
|
||||||
SetDllDirectoryA(modPath.c_str());
|
SetDllDirectoryA(modPath.c_str());
|
||||||
|
|
||||||
|
setLogDirectory(modPath);
|
||||||
|
|
||||||
log("onSimulationStart callback called successfully");
|
log("onSimulationStart callback called successfully");
|
||||||
|
|
||||||
string dllLocation = modPath + "\\core.dll";
|
string dllLocation = modPath + "\\core.dll";
|
||||||
28
backend/shared/include/defines.h
Normal file
28
backend/shared/include/defines.h
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#define VERSION "{{OLYMPUS_VERSION_NUMBER}}.{{OLYMPUS_COMMIT_HASH}}"
|
||||||
|
#define LOG_NAME "..\\..\\..\\..\\Logs\\Olympus_log.txt"
|
||||||
|
|
||||||
|
#define REST_ADDRESS "http://localhost:3001"
|
||||||
|
#define REST_URI "olympus"
|
||||||
|
#define UNITS_URI "units"
|
||||||
|
#define WEAPONS_URI "weapons"
|
||||||
|
#define LOGS_URI "logs"
|
||||||
|
#define AIRBASES_URI "airbases"
|
||||||
|
#define BULLSEYE_URI "bullseyes"
|
||||||
|
#define MISSION_URI "mission"
|
||||||
|
#define COMMANDS_URI "commands"
|
||||||
|
|
||||||
|
#define FRAMERATE_TIME_INTERVAL 0.05
|
||||||
|
|
||||||
|
#define OLYMPUS_JSON_PATH "..\\..\\..\\..\\Config\\olympus.json"
|
||||||
|
#define AIRCRAFT_DATABASE_PATH "..\\databases\\units\\aircraftdatabase.json"
|
||||||
|
#define HELICOPTER_DATABASE_PATH "..\\databases\\units\\helicopterdatabase.json"
|
||||||
|
#define GROUNDUNIT_DATABASE_PATH "..\\databases\\units\\groundunitdatabase.json"
|
||||||
|
#define NAVYUNIT_DATABASE_PATH "..\\databases\\units\\navyunitdatabase.json"
|
||||||
|
|
||||||
|
#define MIST_SCRIPT "..\\Scripts\\mist.lua"
|
||||||
|
#define OLYMPUS_COMMAND_SCRIPT "..\\Scripts\\OlympusCommand.lua"
|
||||||
|
#define UNIT_PAYLOADS_SCRIPT "..\\Scripts\\unitPayloads.lua"
|
||||||
|
#define TEMPLATES_SCRIPT "..\\Scripts\\templates.lua"
|
||||||
|
#define MODS_SCRIPT "..\\Scripts\\mods.lua"
|
||||||
@@ -61,8 +61,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
|||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
FILEVERSION 1,0,4,0
|
||||||
PRODUCTVERSION {{OLYMPUS_VS_VERSION_NUMBER_1}},0
|
PRODUCTVERSION 1,0,3,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
@@ -79,12 +79,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "DCS Olympus"
|
VALUE "CompanyName", "DCS Olympus"
|
||||||
VALUE "FileDescription", "DCS Olympus"
|
VALUE "FileDescription", "DCS Olympus"
|
||||||
VALUE "FileVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "FileVersion", "1.0.4.0"
|
||||||
VALUE "InternalName", "utils.dll"
|
VALUE "InternalName", "utils.dll"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2023"
|
VALUE "LegalCopyright", "Copyright (C) 2023"
|
||||||
VALUE "OriginalFilename", "utils.dll"
|
VALUE "OriginalFilename", "utils.dll"
|
||||||
VALUE "ProductName", "TODO: <Product name>"
|
VALUE "ProductName", "TODO: <Product name>"
|
||||||
VALUE "ProductVersion", "{{OLYMPUS_VS_VERSION_NUMBER_2}}.0"
|
VALUE "ProductVersion", "1.0.4.0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
@@ -85,7 +85,7 @@
|
|||||||
</ImportGroup>
|
</ImportGroup>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<OutDir>.\..\..\bin\</OutDir>
|
<OutDir>.\..\..\build\backend\bin\</OutDir>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<OutDir>.\..\..\bin\$(Platform)\$(Configuration)\</OutDir>
|
<OutDir>.\..\..\bin\$(Platform)\$(Configuration)\</OutDir>
|
||||||
14
backend/vcpkg-configuration.json
Normal file
14
backend/vcpkg-configuration.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"default-registry": {
|
||||||
|
"kind": "git",
|
||||||
|
"baseline": "7f9f0e44db287e8e67c0e888141bfa200ab45121",
|
||||||
|
"repository": "https://github.com/microsoft/vcpkg"
|
||||||
|
},
|
||||||
|
"registries": [
|
||||||
|
{
|
||||||
|
"kind": "artifact",
|
||||||
|
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
|
||||||
|
"name": "microsoft"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
6
backend/vcpkg.json
Normal file
6
backend/vcpkg.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"dependencies": [
|
||||||
|
"cpprestsdk",
|
||||||
|
"geographiclib"
|
||||||
|
]
|
||||||
|
}
|
||||||
23
build.bat
23
build.bat
@@ -1,23 +0,0 @@
|
|||||||
call node increase_version.js
|
|
||||||
|
|
||||||
cd src
|
|
||||||
msbuild olympus.sln /t:Build /p:Configuration=Release
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
cd client
|
|
||||||
rmdir /s /q "hgt"
|
|
||||||
call npm install
|
|
||||||
call npm run emit-declarations
|
|
||||||
call npm run build-release
|
|
||||||
|
|
||||||
cd "plugins\controltips"
|
|
||||||
call npm install
|
|
||||||
call npm run build-release
|
|
||||||
cd "..\.."
|
|
||||||
|
|
||||||
cd "plugins\databasemanager"
|
|
||||||
call npm install
|
|
||||||
call npm run build-release
|
|
||||||
cd "..\.."
|
|
||||||
|
|
||||||
cd..
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
call build.bat
|
call .\scripts\batch\build.bat
|
||||||
call package.bat
|
call .\scripts\batch\package.bat
|
||||||
2
client/.vscode/settings.json
vendored
2
client/.vscode/settings.json
vendored
@@ -1,2 +0,0 @@
|
|||||||
{
|
|
||||||
}
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
var express = require('express');
|
|
||||||
var path = require('path');
|
|
||||||
var cookieParser = require('cookie-parser');
|
|
||||||
var logger = require('morgan');
|
|
||||||
var fs = require('fs');
|
|
||||||
var bodyParser = require('body-parser');
|
|
||||||
|
|
||||||
var atcRouter = require('./routes/api/atc');
|
|
||||||
var airbasesRouter = require('./routes/api/airbases');
|
|
||||||
var elevationRouter = require('./routes/api/elevation');
|
|
||||||
var databasesRouter = require('./routes/api/databases');
|
|
||||||
var indexRouter = require('./routes/index');
|
|
||||||
var uikitRouter = require('./routes/uikit');
|
|
||||||
var usersRouter = require('./routes/users');
|
|
||||||
var resourcesRouter = require('./routes/resources');
|
|
||||||
var pluginsRouter = require('./routes/plugins');
|
|
||||||
|
|
||||||
var app = express();
|
|
||||||
|
|
||||||
app.use(logger('dev'));
|
|
||||||
app.use(bodyParser.json({limit: '50mb'}));
|
|
||||||
app.use(bodyParser.urlencoded({limit: '50mb', extended: true}));
|
|
||||||
app.use(cookieParser());
|
|
||||||
app.use(express.static(path.join(__dirname, 'public')));
|
|
||||||
|
|
||||||
app.use('/', indexRouter);
|
|
||||||
app.use('/api/atc', atcRouter);
|
|
||||||
app.use('/api/airbases', airbasesRouter);
|
|
||||||
app.use('/api/elevation', elevationRouter);
|
|
||||||
app.use('/api/databases', databasesRouter);
|
|
||||||
app.use('/plugins', pluginsRouter)
|
|
||||||
app.use('/users', usersRouter);
|
|
||||||
app.use('/uikit', uikitRouter);
|
|
||||||
app.use('/resources', resourcesRouter);
|
|
||||||
|
|
||||||
app.set('view engine', 'ejs');
|
|
||||||
|
|
||||||
let rawdata = fs.readFileSync('../olympus.json');
|
|
||||||
let config = JSON.parse(rawdata);
|
|
||||||
if (config["server"] != undefined)
|
|
||||||
app.get('/config', (req, res) => res.send(config["server"]));
|
|
||||||
|
|
||||||
module.exports = app;
|
|
||||||
|
|
||||||
const DemoDataGenerator = require('./demo.js');
|
|
||||||
var demoDataGenerator = new DemoDataGenerator(app, config);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
const fs = require('fs')
|
|
||||||
const path = require('path')
|
|
||||||
const yargs = require('yargs');
|
|
||||||
const prompt = require('prompt-sync')({sigint: true});
|
|
||||||
const sha256 = require('sha256');
|
|
||||||
const jsonPath = path.join('..', 'olympus.json');
|
|
||||||
|
|
||||||
/* Set the acceptable values */
|
|
||||||
yargs.alias('a', 'address').describe('a', 'Backend address').string('a');
|
|
||||||
yargs.alias('b', 'backendPort').describe('b', 'Backend port').number('b');
|
|
||||||
yargs.alias('c', 'clientPort').describe('c', 'Client port').number('c');
|
|
||||||
yargs.alias('p', 'gameMasterPassword').describe('p', 'Game Master password').string('p');
|
|
||||||
yargs.alias('bp', 'blueCommanderPassword').describe('bp', 'Blue Commander password').string('bp');
|
|
||||||
yargs.alias('rp', 'redCommanderPassword').describe('rp', 'Red Commander password').string('rp');
|
|
||||||
args = yargs.argv;
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
/* Check that we can read the json */
|
|
||||||
if (fs.existsSync(jsonPath)) {
|
|
||||||
var json = JSON.parse(fs.readFileSync(jsonPath, 'utf-8'));
|
|
||||||
|
|
||||||
var address = args.address ?? json["server"]["address"];
|
|
||||||
var clientPort = args.clientPort ?? json["client"]["port"];
|
|
||||||
var backendPort = args.backendPort ?? json["server"]["port"];
|
|
||||||
var gameMasterPassword = args.gameMasterPassword? sha256(args.gameMasterPassword): json["authentication"]["gameMasterPassword"];
|
|
||||||
var blueCommanderPassword = args.blueCommanderPassword? sha256(args.blueCommanderPassword): json["authentication"]["blueCommanderPassword"];
|
|
||||||
var redCommanderPassword = args.redCommanderPassword? sha256(args.redCommanderPassword): json["authentication"]["redCommanderPassword"];
|
|
||||||
|
|
||||||
/* Run in interactive mode */
|
|
||||||
if (args.address === undefined && args.clientPort === undefined && args.backendPort === undefined &&
|
|
||||||
args.gameMasterPassword === undefined && args.blueCommanderPassword === undefined && args.redCommanderPassword === undefined) {
|
|
||||||
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "*********************************************************************");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "* _____ _____ _____ ____ _ *");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "* | __ \\ / ____|/ ____| / __ \\| | *");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "* | | | | | | (___ | | | | |_ _ _ __ ___ _ __ _ _ ___ *");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "* | | | | | \\___ \\ | | | | | | | | '_ ` _ \\| '_ \\| | | / __| *");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "* | |__| | |____ ____) | | |__| | | |_| | | | | | | |_) | |_| \\__ \\ *");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "* |_____/ \\_____|_____/ \\____/|_|\\__, |_| |_| |_| .__/ \\__,_|___/ *");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "* __/ | | | *");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "* |___/ |_| *");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "*********************************************************************");
|
|
||||||
console.log('\x1b[36m%s\x1b[0m', "");
|
|
||||||
|
|
||||||
console.log("DCS Olympus configurator {{OLYMPUS_VERSION_NUMBER}}.{{OLYMPUS_COMMIT_HASH}}");
|
|
||||||
console.log("");
|
|
||||||
|
|
||||||
var newValue;
|
|
||||||
var result;
|
|
||||||
|
|
||||||
/* Get the new address */
|
|
||||||
newValue = prompt(`Insert an address or press Enter to keep current value ${address}. Use * for any address: `);
|
|
||||||
address = newValue !== ""? newValue: address;
|
|
||||||
|
|
||||||
/* Get the new client port */
|
|
||||||
while (true) {
|
|
||||||
newValue = prompt(`Insert a client port or press Enter to keep current value ${clientPort}. Integers between 1025 and 65535: `);
|
|
||||||
if (newValue === "")
|
|
||||||
break;
|
|
||||||
result = Number(newValue);
|
|
||||||
|
|
||||||
if (!isNaN(result) && Number.isInteger(result) && result > 1024 && result <= 65535)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
clientPort = newValue? result: clientPort;
|
|
||||||
|
|
||||||
/* Get the new backend port */
|
|
||||||
while (true) {
|
|
||||||
newValue = prompt(`Insert a backend port or press Enter to keep current value ${backendPort}. Integers between 1025 and 65535: `);
|
|
||||||
if (newValue === "")
|
|
||||||
break;
|
|
||||||
result = Number(newValue);
|
|
||||||
|
|
||||||
if (!isNaN(result) && Number.isInteger(result) && result > 1024 && result <= 65535 && result != clientPort)
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (result === clientPort)
|
|
||||||
console.log("Client port and backend port must be different.");
|
|
||||||
}
|
|
||||||
backendPort = newValue? result: backendPort;
|
|
||||||
|
|
||||||
/* Get the new Game Master password */
|
|
||||||
newValue = prompt(`Insert a new Game Master password or press Enter to keep current value: `, {echo: "*"});
|
|
||||||
gameMasterPassword = newValue !== ""? sha256(newValue): gameMasterPassword;
|
|
||||||
|
|
||||||
/* Get the new Blue Commander password */
|
|
||||||
newValue = prompt(`Insert a new Blue Commander password or press Enter to keep current value: `, {echo: "*"});
|
|
||||||
blueCommanderPassword = newValue !== ""? sha256(newValue): blueCommanderPassword;
|
|
||||||
|
|
||||||
/* Get the new Red Commander password */
|
|
||||||
newValue = prompt(`Insert a new Red Commander password or press Enter to keep current value: `, {echo: "*"});
|
|
||||||
redCommanderPassword = newValue !== ""? sha256(newValue): redCommanderPassword;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Apply the inputs */
|
|
||||||
json["server"]["address"] = address;
|
|
||||||
json["client"]["port"] = clientPort;
|
|
||||||
json["server"]["port"] = backendPort;
|
|
||||||
json["authentication"]["gameMasterPassword"] = gameMasterPassword;
|
|
||||||
json["authentication"]["blueCommanderPassword"] = blueCommanderPassword;
|
|
||||||
json["authentication"]["redCommanderPassword"] = redCommanderPassword;
|
|
||||||
|
|
||||||
/* Write the result to disk */
|
|
||||||
const serialized = JSON.stringify(json, null, 4);
|
|
||||||
fs.writeFileSync(jsonPath, serialized, 'utf8');
|
|
||||||
console.log("Olympus.json updated correctly, goodbye!");
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.error("Error, could not read olympus.json file!")
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Wait a bit before closing the window */
|
|
||||||
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Run the configurator */
|
|
||||||
run();
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
copy .\\node_modules\\leaflet\\dist\\leaflet.css .\\public\\stylesheets\\leaflet\\leaflet.css
|
|
||||||
copy .\\node_modules\\leaflet-gesture-handling\\dist\\leaflet-gesture-handling.css .\\public\\stylesheets\\leaflet\\leaflet-gesture-handling.css
|
|
||||||
copy .\\node_modules\\leaflet.nauticscale\\dist\\leaflet.nauticscale.js .\\public\\javascripts\\leaflet.nauticscale.js
|
|
||||||
copy .\\node_modules\\leaflet-path-drag\\dist\\L.Path.Drag.js .\\public\\javascripts\\L.Path.Drag.js
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
start cmd /k "npm run start"
|
|
||||||
start cmd /k "watchify .\src\index.ts --debug -o .\public\javascripts\bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ]
|
|
||||||
514
client/demo.js
514
client/demo.js
@@ -1,514 +0,0 @@
|
|||||||
const { random } = require('@turf/turf');
|
|
||||||
var basicAuth = require('express-basic-auth')
|
|
||||||
var enc = new TextEncoder();
|
|
||||||
|
|
||||||
const aircraftDatabase = require('./public/databases/units/aircraftDatabase.json');
|
|
||||||
const helicopterDatabase = require('./public/databases/units/helicopterDatabase.json');
|
|
||||||
const groundUnitDatabase = require('./public/databases/units/groundUnitDatabase.json');
|
|
||||||
const navyUnitDatabase = require('./public/databases/units/navyUnitDatabase.json');
|
|
||||||
|
|
||||||
const DEMO_UNIT_DATA = {}
|
|
||||||
|
|
||||||
const DEMO_WEAPONS_DATA = {
|
|
||||||
/*["1001"]:{ category: "Missile", alive: true, coalition: 2, name: "", position: { lat: 37.1, lng: -116, alt: 1000 }, speed: 200, heading: 45 * Math.PI / 180 }, */
|
|
||||||
}
|
|
||||||
|
|
||||||
class DemoDataGenerator {
|
|
||||||
constructor(app, config)
|
|
||||||
{
|
|
||||||
app.get('/demo/units', (req, res) => this.units(req, res));
|
|
||||||
app.get('/demo/weapons', (req, res) => this.weapons(req, res));
|
|
||||||
app.get('/demo/logs', (req, res) => this.logs(req, res));
|
|
||||||
app.get('/demo/bullseyes', (req, res) => this.bullseyes(req, res));
|
|
||||||
app.get('/demo/airbases', (req, res) => this.airbases(req, res));
|
|
||||||
app.get('/demo/mission', (req, res) => this.mission(req, res));
|
|
||||||
app.get('/demo/commands', (req, res) => this.command(req, res));
|
|
||||||
app.put('/demo', (req, res) => this.put(req, res));
|
|
||||||
|
|
||||||
app.use('/demo', basicAuth({
|
|
||||||
users: {
|
|
||||||
'admin': config["authentication"]["gameMasterPassword"],
|
|
||||||
'blue': config["authentication"]["blueCommanderPassword"],
|
|
||||||
'red': config["authentication"]["redCommanderPassword"]
|
|
||||||
},
|
|
||||||
}))
|
|
||||||
|
|
||||||
|
|
||||||
let baseData = { alive: true, human: false, controlled: true, coalition: 2, country: 0, unitName: "Cool guy", groupName: "Cool group 1", state: 13, task: "Being cool!",
|
|
||||||
hasTask: true, position: { lat: 37, lng: -116, alt: 1000 }, speed: 200, horizontalVelocity: 200, verticalVelicity: 0, heading: 45, track: 45, isActiveTanker: false, isActiveAWACS: false, onOff: true, followRoads: false, fuel: 50,
|
|
||||||
desiredSpeed: 300, desiredSpeedType: 1, desiredAltitude: 1000, desiredAltitudeType: 1, leaderID: 0,
|
|
||||||
formationOffset: { x: 0, y: 0, z: 0 },
|
|
||||||
targetID: 0,
|
|
||||||
targetPosition: { lat: 0, lng: 0, alt: 0 },
|
|
||||||
ROE: 1,
|
|
||||||
reactionToThreat: 1,
|
|
||||||
emissionsCountermeasures: 1,
|
|
||||||
TACAN: { isOn: false, XY: 'Y', callsign: 'TKR', channel: 40 },
|
|
||||||
radio: { frequency: 124000000, callsign: 1, callsignNumber: 1 },
|
|
||||||
generalSettings: { prohibitAA: false, prohibitAfterburner: false, prohibitAG: false, prohibitAirWpn: false, prohibitJettison: false },
|
|
||||||
ammo: [],
|
|
||||||
contacts: [],
|
|
||||||
activePath: [],
|
|
||||||
isLeader: true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// UNCOMMENT TO TEST ALL UNITS ****************
|
|
||||||
/*
|
|
||||||
var databases = Object.assign({}, aircraftDatabase, helicopterDatabase, groundUnitDatabase, navyUnitDatabase);
|
|
||||||
var t = Object.keys(databases).length;
|
|
||||||
var l = Math.floor(Math.sqrt(t));
|
|
||||||
let latIdx = 0;
|
|
||||||
let lngIdx = 0;
|
|
||||||
let idx = 1;
|
|
||||||
console.log(l)
|
|
||||||
for (let name in databases) {
|
|
||||||
if (databases[name].enabled) {
|
|
||||||
DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData));
|
|
||||||
DEMO_UNIT_DATA[idx].name = name;
|
|
||||||
DEMO_UNIT_DATA[idx].groupName = `Group-${idx}`;
|
|
||||||
DEMO_UNIT_DATA[idx].position.lat += latIdx / 5;
|
|
||||||
DEMO_UNIT_DATA[idx].position.lng += lngIdx / 5;
|
|
||||||
DEMO_UNIT_DATA[idx].coalition = Math.floor(Math.random() * 3)
|
|
||||||
|
|
||||||
latIdx += 1;
|
|
||||||
if (latIdx === l) {
|
|
||||||
latIdx = 0;
|
|
||||||
lngIdx += 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (name in aircraftDatabase)
|
|
||||||
DEMO_UNIT_DATA[idx].category = "Aircraft";
|
|
||||||
else if (name in helicopterDatabase)
|
|
||||||
DEMO_UNIT_DATA[idx].category = "Helicopter";
|
|
||||||
else if (name in groundUnitDatabase)
|
|
||||||
DEMO_UNIT_DATA[idx].category = "GroundUnit";
|
|
||||||
else if (name in navyUnitDatabase)
|
|
||||||
DEMO_UNIT_DATA[idx].category = "NavyUnit";
|
|
||||||
|
|
||||||
idx += 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
let idx = 1;
|
|
||||||
DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData));
|
|
||||||
DEMO_UNIT_DATA[idx].name = "S_75M_Volhov";
|
|
||||||
DEMO_UNIT_DATA[idx].groupName = `Group`;
|
|
||||||
DEMO_UNIT_DATA[idx].position.lat += idx / 100;
|
|
||||||
DEMO_UNIT_DATA[idx].category = "GroundUnit";
|
|
||||||
DEMO_UNIT_DATA[idx].isLeader = true;
|
|
||||||
|
|
||||||
idx += 1;
|
|
||||||
DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData));
|
|
||||||
DEMO_UNIT_DATA[idx].name = "SNR_75V";
|
|
||||||
DEMO_UNIT_DATA[idx].groupName = `Group`;
|
|
||||||
DEMO_UNIT_DATA[idx].position.lat += idx / 100;
|
|
||||||
DEMO_UNIT_DATA[idx].category = "GroundUnit";
|
|
||||||
DEMO_UNIT_DATA[idx].isLeader = false;
|
|
||||||
|
|
||||||
idx += 1;
|
|
||||||
DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData));
|
|
||||||
DEMO_UNIT_DATA[idx].name = "Ural-4320 APA-5D";
|
|
||||||
DEMO_UNIT_DATA[idx].groupName = `Group`;
|
|
||||||
DEMO_UNIT_DATA[idx].position.lat += idx / 100;
|
|
||||||
DEMO_UNIT_DATA[idx].category = "GroundUnit";
|
|
||||||
DEMO_UNIT_DATA[idx].isLeader = false;
|
|
||||||
|
|
||||||
|
|
||||||
idx += 1;
|
|
||||||
DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData));
|
|
||||||
DEMO_UNIT_DATA[idx].name = "F-14B";
|
|
||||||
DEMO_UNIT_DATA[idx].groupName = `Group-1`;
|
|
||||||
DEMO_UNIT_DATA[idx].position.lat += idx / 100;
|
|
||||||
DEMO_UNIT_DATA[idx].category = "Aircraft";
|
|
||||||
DEMO_UNIT_DATA[idx].isLeader = false;
|
|
||||||
|
|
||||||
idx += 1;
|
|
||||||
DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData));
|
|
||||||
DEMO_UNIT_DATA[idx].name = "Infantry AK";
|
|
||||||
DEMO_UNIT_DATA[idx].groupName = `Group-2`;
|
|
||||||
DEMO_UNIT_DATA[idx].position.lat += idx / 100;
|
|
||||||
DEMO_UNIT_DATA[idx].category = "GroundUnit";
|
|
||||||
DEMO_UNIT_DATA[idx].isLeader = true;
|
|
||||||
DEMO_UNIT_DATA[idx].coalition = 0;
|
|
||||||
DEMO_UNIT_DATA[idx].operateAs = 2;
|
|
||||||
|
|
||||||
idx += 1;
|
|
||||||
DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData));
|
|
||||||
DEMO_UNIT_DATA[idx].name = "Infantry AK";
|
|
||||||
DEMO_UNIT_DATA[idx].groupName = `Group-3`;
|
|
||||||
DEMO_UNIT_DATA[idx].position.lat += idx / 100;
|
|
||||||
DEMO_UNIT_DATA[idx].category = "GroundUnit";
|
|
||||||
DEMO_UNIT_DATA[idx].isLeader = true;
|
|
||||||
DEMO_UNIT_DATA[idx].coalition = 0;
|
|
||||||
DEMO_UNIT_DATA[idx].operateAs = 1;
|
|
||||||
|
|
||||||
idx += 1;
|
|
||||||
DEMO_UNIT_DATA[idx] = JSON.parse(JSON.stringify(baseData));
|
|
||||||
DEMO_UNIT_DATA[idx].name = "KC-135";
|
|
||||||
DEMO_UNIT_DATA[idx].groupName = `Group-4`;
|
|
||||||
DEMO_UNIT_DATA[idx].position.lat += idx / 100;
|
|
||||||
DEMO_UNIT_DATA[idx].category = "Aircraft";
|
|
||||||
DEMO_UNIT_DATA[idx].isLeader = true;
|
|
||||||
|
|
||||||
|
|
||||||
this.startTime = Date.now();
|
|
||||||
}
|
|
||||||
|
|
||||||
units(req, res){
|
|
||||||
var array = new Uint8Array();
|
|
||||||
var time = Date.now();
|
|
||||||
array = this.concat(array, this.uint64ToByteArray(BigInt(time)));
|
|
||||||
if (req.query["time"] == 0){
|
|
||||||
for (let idx in DEMO_UNIT_DATA) {
|
|
||||||
const unit = DEMO_UNIT_DATA[idx];
|
|
||||||
var dataIndex = 1;
|
|
||||||
array = this.concat(array, this.uint32ToByteArray(idx));
|
|
||||||
array = this.appendString(array, unit.category, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.alive, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.human, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.controlled, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint16(array, unit.coalition, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.country, dataIndex); dataIndex++;
|
|
||||||
array = this.appendString(array, unit.name, dataIndex); dataIndex++;
|
|
||||||
array = this.appendString(array, unit.unitName, dataIndex); dataIndex++;
|
|
||||||
array = this.appendString(array, unit.groupName, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.state, dataIndex); dataIndex++;
|
|
||||||
array = this.appendString(array, unit.task, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.hasTask, dataIndex); dataIndex++;
|
|
||||||
array = this.appendCoordinates(array, unit.position, dataIndex); dataIndex++;
|
|
||||||
array = this.appendDouble(array, unit.speed, dataIndex); dataIndex++;
|
|
||||||
array = this.appendDouble(array, unit.horizontalVelocity, dataIndex); dataIndex++;
|
|
||||||
array = this.appendDouble(array, unit.verticalVelicity, dataIndex); dataIndex++;
|
|
||||||
array = this.appendDouble(array, unit.heading, dataIndex); dataIndex++;
|
|
||||||
array = this.appendDouble(array, unit.track, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.isActiveTanker, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.isActiveAWACS, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.onOff, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.followRoads, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint16(array, unit.fuel, dataIndex); dataIndex++;
|
|
||||||
array = this.appendDouble(array, unit.desiredSpeed, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.desiredSpeedType, dataIndex); dataIndex++;
|
|
||||||
array = this.appendDouble(array, unit.desiredAltitude, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.desiredAltitudeType, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint32(array, unit.leaderID, dataIndex); dataIndex++;
|
|
||||||
array = this.appendOffset(array, unit.formationOffset, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint32(array, unit.targetID, dataIndex); dataIndex++;
|
|
||||||
array = this.appendCoordinates(array, unit.targetPosition, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.ROE, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.reactionToThreat, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.emissionsCountermeasures, dataIndex); dataIndex++;
|
|
||||||
array = this.appendTACAN(array, unit.TACAN, dataIndex); dataIndex++;
|
|
||||||
array = this.appendRadio(array, unit.radio, dataIndex); dataIndex++;
|
|
||||||
array = this.appendRadio(array, unit.generalSettings, dataIndex); dataIndex++;
|
|
||||||
array = this.appendAmmo(array, unit.ammo, dataIndex); dataIndex++;
|
|
||||||
array = this.appendContacts(array, unit.contacts, dataIndex); dataIndex++;
|
|
||||||
array = this.appendActivePath(array, unit.activePath, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.isLeader, dataIndex); dataIndex++;
|
|
||||||
array = this.appendUint8(array, unit.operateAs, dataIndex); dataIndex++;
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(255));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
res.end(Buffer.from(array, 'binary'));
|
|
||||||
};
|
|
||||||
|
|
||||||
weapons(req, res){
|
|
||||||
var array = new Uint8Array();
|
|
||||||
var time = Date.now();
|
|
||||||
array = this.concat(array, this.uint64ToByteArray(BigInt(time)));
|
|
||||||
for (let idx in DEMO_WEAPONS_DATA) {
|
|
||||||
const weapon = DEMO_WEAPONS_DATA[idx];
|
|
||||||
array = this.concat(array, this.uint32ToByteArray(idx));
|
|
||||||
array = this.appendString(array, weapon.category, 1);
|
|
||||||
array = this.appendUint8(array, weapon.alive, 2);
|
|
||||||
array = this.appendUint16(array, weapon.coalition, 5);
|
|
||||||
array = this.appendString(array, weapon.name, 7);
|
|
||||||
array = this.appendCoordinates(array, weapon.position, 13);
|
|
||||||
array = this.appendDouble(array, weapon.speed, 14);
|
|
||||||
array = this.appendDouble(array, weapon.heading, 15);
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(255));
|
|
||||||
}
|
|
||||||
res.end(Buffer.from(array, 'binary'));
|
|
||||||
};
|
|
||||||
|
|
||||||
concat(array1, array2) {
|
|
||||||
var mergedArray = new Uint8Array(array1.length + array2.length);
|
|
||||||
mergedArray.set(array1);
|
|
||||||
mergedArray.set(array2, array1.length);
|
|
||||||
return mergedArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8ToByteArray(number) {
|
|
||||||
var buffer = new ArrayBuffer(1);
|
|
||||||
var longNum = new Uint8Array(buffer);
|
|
||||||
longNum[0] = number;
|
|
||||||
return Array.from(new Uint8Array(buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16ToByteArray(number) {
|
|
||||||
var buffer = new ArrayBuffer(2);
|
|
||||||
var longNum = new Uint16Array(buffer);
|
|
||||||
longNum[0] = number;
|
|
||||||
return Array.from(new Uint8Array(buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32ToByteArray(number) {
|
|
||||||
var buffer = new ArrayBuffer(4);
|
|
||||||
var longNum = new Uint32Array(buffer);
|
|
||||||
longNum[0] = number;
|
|
||||||
return Array.from(new Uint8Array(buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64ToByteArray(number) {
|
|
||||||
var buffer = new ArrayBuffer(8);
|
|
||||||
var longNum = new BigUint64Array(buffer);
|
|
||||||
longNum[0] = number;
|
|
||||||
return Array.from(new Uint8Array(buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
doubleToByteArray(number) {
|
|
||||||
var buffer = new ArrayBuffer(8);
|
|
||||||
var longNum = new Float64Array(buffer);
|
|
||||||
longNum[0] = number;
|
|
||||||
return Array.from(new Uint8Array(buffer));
|
|
||||||
}
|
|
||||||
|
|
||||||
appendUint8(array, number, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(number));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendUint16(array, number, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint16ToByteArray(number));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendUint32(array, number, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint32ToByteArray(number));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendDouble(array, number, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.doubleToByteArray(number));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendCoordinates(array, coordinates, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.doubleToByteArray(coordinates.lat));
|
|
||||||
array = this.concat(array, this.doubleToByteArray(coordinates.lng));
|
|
||||||
array = this.concat(array, this.doubleToByteArray(coordinates.alt));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendOffset(array, offset, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.doubleToByteArray(offset.x));
|
|
||||||
array = this.concat(array, this.doubleToByteArray(offset.y));
|
|
||||||
array = this.concat(array, this.doubleToByteArray(offset.z));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendString(array, string, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint16ToByteArray(string.length));
|
|
||||||
array = this.concat(array, enc.encode(string));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
padString(string, length) {
|
|
||||||
while (string.length < length)
|
|
||||||
string += " ";
|
|
||||||
return string.substring(0, length);
|
|
||||||
}
|
|
||||||
|
|
||||||
appendTACAN(array, TACAN, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(TACAN.isOn));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(TACAN.channel));
|
|
||||||
array = this.concat(array, enc.encode(TACAN.XY));
|
|
||||||
array = this.concat(array, enc.encode(this.padString(TACAN.callsign, 4)));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendRadio(array, radio, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint32ToByteArray(radio.frequency));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(radio.callsign));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(radio.callsignNumber));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendGeneralSettings(array, generalSettings, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(generalSettings.prohibitAA));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(generalSettings.prohibitAfterburner));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(generalSettings.prohibitAG));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(generalSettings.prohibitAirWpn));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(generalSettings.prohibitJettison));
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendAmmo(array, ammo, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint16ToByteArray(ammo.length));
|
|
||||||
ammo.forEach((element) => {
|
|
||||||
array = this.concat(array, this.uint16ToByteArray(element.quantity));
|
|
||||||
array = this.concat(array, enc.encode(this.padString(element.name, 33)));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(element.guidance));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(element.category));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(element.missileCategory));
|
|
||||||
})
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendContacts(array, contacts, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint16ToByteArray(contacts.length));
|
|
||||||
contacts.forEach((element) => {
|
|
||||||
array = this.concat(array, this.uint32ToByteArray(element.ID));
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(element.detectionMethod));
|
|
||||||
})
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
appendActivePath(array, activePath, datumIndex) {
|
|
||||||
array = this.concat(array, this.uint8ToByteArray(datumIndex));
|
|
||||||
array = this.concat(array, this.uint16ToByteArray(activePath.length));
|
|
||||||
activePath.forEach((element) => {
|
|
||||||
array = this.concat(array, this.doubleToByteArray(element.lat));
|
|
||||||
array = this.concat(array, this.doubleToByteArray(element.lng));
|
|
||||||
array = this.concat(array, this.doubleToByteArray(element.alt));
|
|
||||||
})
|
|
||||||
return array;
|
|
||||||
}
|
|
||||||
|
|
||||||
logs(req, res){
|
|
||||||
var ret = {logs: {"1": "I'm a log!", "2": "I'm a different log!"}};
|
|
||||||
ret.time = Date.now();
|
|
||||||
ret.frameRate = 60;
|
|
||||||
ret.load = 0;
|
|
||||||
res.send(JSON.stringify(ret));
|
|
||||||
};
|
|
||||||
|
|
||||||
airbases(req, res){
|
|
||||||
var ret = {airbases: {
|
|
||||||
["0"]: {
|
|
||||||
callsign: "Nellis",
|
|
||||||
latitude: 37.3,
|
|
||||||
longitude: -115.8,
|
|
||||||
coalition: "neutral"
|
|
||||||
},
|
|
||||||
["1"]: {
|
|
||||||
callsign: "Red",
|
|
||||||
latitude: 37.3,
|
|
||||||
longitude: -115.75,
|
|
||||||
coalition: "red"
|
|
||||||
},
|
|
||||||
["2"]: {
|
|
||||||
callsign: "Blue",
|
|
||||||
latitude: 37.3,
|
|
||||||
longitude: -115.7,
|
|
||||||
coalition: "blue"
|
|
||||||
}
|
|
||||||
}};
|
|
||||||
ret.time = Date.now();
|
|
||||||
res.send(JSON.stringify(ret));
|
|
||||||
};
|
|
||||||
|
|
||||||
bullseyes(req, res){
|
|
||||||
var ret = {bullseyes: {
|
|
||||||
"0": {
|
|
||||||
latitude: 37.25,
|
|
||||||
longitude: -115.8,
|
|
||||||
coalition: "neutral"
|
|
||||||
},
|
|
||||||
"1": {
|
|
||||||
latitude: 37.25,
|
|
||||||
longitude: -115.75,
|
|
||||||
coalition: "red"
|
|
||||||
},
|
|
||||||
"2": {
|
|
||||||
latitude: 37.25,
|
|
||||||
longitude: -115.7,
|
|
||||||
coalition: "blue"
|
|
||||||
}
|
|
||||||
}};
|
|
||||||
ret.time = Date.now();
|
|
||||||
res.send(JSON.stringify(ret));
|
|
||||||
};
|
|
||||||
|
|
||||||
mission(req, res){
|
|
||||||
var ret = {mission: {theatre: "Nevada"}};
|
|
||||||
ret.time = Date.now();
|
|
||||||
|
|
||||||
ret.mission.dateAndTime = {
|
|
||||||
time: { h: 10, m: 15, s: 34 },
|
|
||||||
date: "",
|
|
||||||
elapsedTime: (Date.now() - this.startTime) / 1000,
|
|
||||||
startTime: 0
|
|
||||||
}
|
|
||||||
|
|
||||||
ret.mission.coalitions = {
|
|
||||||
red: [
|
|
||||||
'RUSSIA',
|
|
||||||
'CHINA'
|
|
||||||
],
|
|
||||||
blue: [
|
|
||||||
'UK',
|
|
||||||
'USA'
|
|
||||||
],
|
|
||||||
neutral: [
|
|
||||||
'ITALY'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
ret.mission.commandModeOptions = {
|
|
||||||
restrictSpawns: true,
|
|
||||||
restrictToCoalition: true,
|
|
||||||
setupTime: 0,
|
|
||||||
spawnPoints: {
|
|
||||||
red: 400,
|
|
||||||
blue: 400
|
|
||||||
},
|
|
||||||
eras: ["WW2", "Early Cold War", "Late Cold War", "Modern"]
|
|
||||||
}
|
|
||||||
|
|
||||||
var auth = req.get("Authorization");
|
|
||||||
if (auth) {
|
|
||||||
var username = Buffer.from(auth.replace("Basic ", ""), 'base64').toString('binary').split(":")[0];
|
|
||||||
switch (username) {
|
|
||||||
case "admin":
|
|
||||||
ret.mission.commandModeOptions.commandMode = "Game master";
|
|
||||||
break
|
|
||||||
case "blue":
|
|
||||||
ret.mission.commandModeOptions.commandMode = "Blue commander";
|
|
||||||
break;
|
|
||||||
case "red":
|
|
||||||
ret.mission.commandModeOptions.commandMode = "Red commander";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
res.send(JSON.stringify(ret));
|
|
||||||
}
|
|
||||||
|
|
||||||
command(req, res) {
|
|
||||||
var ret = {commandExecuted: Math.random() > 0.5};
|
|
||||||
res.send(JSON.stringify(ret));
|
|
||||||
}
|
|
||||||
|
|
||||||
put(req, res) {
|
|
||||||
var ret = {commandHash: Math.random().toString(36).slice(2, 19)}
|
|
||||||
res.send(JSON.stringify(ret));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = DemoDataGenerator;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
call npm install --omit=dev
|
|
||||||
call npm install yargs prompt-sync sha256 tcp-ping-port
|
|
||||||
8986
client/package-lock.json
generated
8986
client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "DCSOlympus",
|
|
||||||
"node-main": "./bin/www",
|
|
||||||
"main": "http://localhost:3000",
|
|
||||||
"version": "{{OLYMPUS_VERSION_NUMBER}}",
|
|
||||||
"private": true,
|
|
||||||
"scripts": {
|
|
||||||
"build": "browserify .\\src\\index.ts --debug -o .\\public\\javascripts\\bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ] && copy.bat",
|
|
||||||
"build-release": "browserify .\\src\\index.ts -o .\\public\\javascripts\\bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ] && copy.bat",
|
|
||||||
"emit-declarations": "tsc --project tsconfig.json --declaration --emitDeclarationOnly --outfile ./@types/olympus/index.d.ts",
|
|
||||||
"copy": "copy.bat",
|
|
||||||
"start": "node ./bin/www",
|
|
||||||
"debug": "npm run copy & concurrently --kill-others \"npm run watch\" \"nodemon --ignore ./public/databases/ ./bin/www\"",
|
|
||||||
"watch": "watchify .\\src\\index.ts --debug -o .\\public\\javascripts\\bundle.js -t [ babelify --global true --presets [ @babel/preset-env ] --extensions '.js'] -p [ tsify --noImplicitAny ]"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@turf/turf": "^6.5.0",
|
|
||||||
"body-parser": "^1.20.2",
|
|
||||||
"cookie-parser": "~1.4.4",
|
|
||||||
"debug": "~2.6.9",
|
|
||||||
"ejs": "^3.1.8",
|
|
||||||
"express": "~4.16.1",
|
|
||||||
"express-basic-auth": "^1.2.1",
|
|
||||||
"js-sha256": "^0.10.1",
|
|
||||||
"leaflet-gesture-handling": "^1.2.2",
|
|
||||||
"morgan": "~1.9.1",
|
|
||||||
"save": "^2.9.0",
|
|
||||||
"srtm-elevation": "^2.1.2",
|
|
||||||
"uuid": "^9.0.1"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/preset-env": "^7.21.4",
|
|
||||||
"@tanem/svg-injector": "^10.1.68",
|
|
||||||
"@types/formatcoords": "^1.1.0",
|
|
||||||
"@types/geojson": "^7946.0.10",
|
|
||||||
"@types/leaflet": "^1.9.0",
|
|
||||||
"@types/node": "^18.16.1",
|
|
||||||
"@types/sortablejs": "^1.15.0",
|
|
||||||
"@types/svg-injector": "^0.0.29",
|
|
||||||
"babelify": "^10.0.0",
|
|
||||||
"browserify": "^17.0.0",
|
|
||||||
"concurrently": "^7.6.0",
|
|
||||||
"cp": "^0.2.0",
|
|
||||||
"esmify": "^2.1.1",
|
|
||||||
"formatcoords": "^1.1.3",
|
|
||||||
"geodesy": "^1.1.2",
|
|
||||||
"leaflet": "^1.9.3",
|
|
||||||
"leaflet-control-mini-map": "^0.4.0",
|
|
||||||
"leaflet-path-drag": "*",
|
|
||||||
"leaflet.nauticscale": "^1.1.0",
|
|
||||||
"nodemon": "^2.0.20",
|
|
||||||
"requirejs": "^2.3.6",
|
|
||||||
"sortablejs": "^1.15.0",
|
|
||||||
"tinyify": "^4.0.0",
|
|
||||||
"tsify": "^5.0.4",
|
|
||||||
"tslib": "latest",
|
|
||||||
"typescript": "^4.9.4",
|
|
||||||
"usng.js": "^0.4.5",
|
|
||||||
"watchify": "^4.0.0"
|
|
||||||
},
|
|
||||||
"window": {
|
|
||||||
"width": 1000,
|
|
||||||
"height": 800,
|
|
||||||
"position": "center",
|
|
||||||
"icon": "public/images/icon.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
mkdir .\\..\\DCSOlympus\\client\\public\\plugins\\boilerplateplugin
|
|
||||||
|
|
||||||
copy .\\index.js .\\..\\DCSOlympus\\client\\public\\plugins\\boilerplateplugin\\index.js
|
|
||||||
copy .\\plugin.json .\\..\\DCSOlympus\\client\\public\\plugins\\boilerplateplugin\\plugin.json
|
|
||||||
copy .\\style.css .\\..\\DCSOlympus\\client\\public\\plugins\\boilerplateplugin\\style.css
|
|
||||||
|
|
||||||
mkdir .\\..\\DCSOlympus\\client\\public\\plugins\\boilerplateplugin\\images
|
|
||||||
copy .\\images\\*.* .\\..\\DCSOlympus\\client\\public\\plugins\\boilerplateplugin\\images\\
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
mkdir .\\..\\..\\public\\plugins\\controltipsplugin
|
|
||||||
|
|
||||||
copy .\\index.js .\\..\\..\\public\\plugins\\controltipsplugin\\index.js
|
|
||||||
copy .\\plugin.json .\\..\\..\\public\\plugins\\controltipsplugin\\plugin.json
|
|
||||||
copy .\\style.css .\\..\\..\\public\\plugins\\controltipsplugin\\style.css
|
|
||||||
6317
client/plugins/controltips/package-lock.json
generated
6317
client/plugins/controltips/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +0,0 @@
|
|||||||
mkdir .\\..\\..\\public\\plugins\\databasemanager
|
|
||||||
|
|
||||||
copy .\\index.js .\\..\\..\\public\\plugins\\databasemanager\\index.js
|
|
||||||
copy .\\plugin.json .\\..\\..\\public\\plugins\\databasemanager\\plugin.json
|
|
||||||
copy .\\style.css .\\..\\..\\public\\plugins\\databasemanager\\style.css
|
|
||||||
6214
client/plugins/databasemanager/package-lock.json
generated
6214
client/plugins/databasemanager/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,38 +0,0 @@
|
|||||||
L.Control.ScaleNautic = L.Control.Scale.extend({
|
|
||||||
options: {
|
|
||||||
nautic: false
|
|
||||||
},
|
|
||||||
|
|
||||||
_addScales: function(options, className, container) {
|
|
||||||
L.Control.Scale.prototype._addScales.call(this, options, className, container);
|
|
||||||
L.setOptions(options);
|
|
||||||
if (this.options.nautic) {
|
|
||||||
this._nScale = L.DomUtil.create('div', className, container);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_updateScales: function (maxMeters) {
|
|
||||||
L.Control.Scale.prototype._updateScales.call(this, maxMeters);
|
|
||||||
if (this.options.nautic && maxMeters) {
|
|
||||||
this._updateNautic(maxMeters);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_updateNautic: function (maxMeters) {
|
|
||||||
var scale = this._nScale,
|
|
||||||
maxNauticalMiles = maxMeters / 1852, nauticalMiles;
|
|
||||||
|
|
||||||
if(maxMeters >= 1852) {
|
|
||||||
nauticalMiles = L.Control.Scale.prototype._getRoundNum.call(this, maxNauticalMiles);
|
|
||||||
} else {
|
|
||||||
nauticalMiles = maxNauticalMiles > 0.1 ? Math.round(maxNauticalMiles * 10) / 10 : Math.round(maxNauticalMiles * 100) / 100;
|
|
||||||
}
|
|
||||||
|
|
||||||
scale.style.width = Math.round(this.options.maxWidth * (nauticalMiles / maxNauticalMiles)) - 10 + 'px';
|
|
||||||
scale.innerHTML = nauticalMiles + ' nm';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
L.control.scalenautic = function (options) {
|
|
||||||
return new L.Control.ScaleNautic(options);
|
|
||||||
};
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
@-webkit-keyframes leaflet-gestures-fadein {
|
|
||||||
0% {
|
|
||||||
opacity: 0; }
|
|
||||||
100% {
|
|
||||||
opacity: 1; } }
|
|
||||||
|
|
||||||
@keyframes leaflet-gestures-fadein {
|
|
||||||
0% {
|
|
||||||
opacity: 0; }
|
|
||||||
100% {
|
|
||||||
opacity: 1; } }
|
|
||||||
|
|
||||||
.leaflet-container:after {
|
|
||||||
-webkit-animation: leaflet-gestures-fadein 0.8s backwards;
|
|
||||||
animation: leaflet-gestures-fadein 0.8s backwards;
|
|
||||||
color: #fff;
|
|
||||||
font-family: "Roboto", Arial, sans-serif;
|
|
||||||
font-size: 22px;
|
|
||||||
-webkit-box-pack: center;
|
|
||||||
-ms-flex-pack: center;
|
|
||||||
justify-content: center;
|
|
||||||
display: -webkit-box;
|
|
||||||
display: -ms-flexbox;
|
|
||||||
display: flex;
|
|
||||||
-webkit-box-align: center;
|
|
||||||
-ms-flex-align: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 15px;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background: rgba(0, 0, 0, 0.5);
|
|
||||||
z-index: 461;
|
|
||||||
pointer-events: none; }
|
|
||||||
|
|
||||||
.leaflet-gesture-handling-touch-warning:after,
|
|
||||||
.leaflet-gesture-handling-scroll-warning:after {
|
|
||||||
-webkit-animation: leaflet-gestures-fadein 0.8s forwards;
|
|
||||||
animation: leaflet-gestures-fadein 0.8s forwards; }
|
|
||||||
|
|
||||||
.leaflet-gesture-handling-touch-warning:after {
|
|
||||||
content: attr(data-gesture-handling-touch-content); }
|
|
||||||
|
|
||||||
.leaflet-gesture-handling-scroll-warning:after {
|
|
||||||
content: attr(data-gesture-handling-scroll-content); }
|
|
||||||
@@ -1,661 +0,0 @@
|
|||||||
/* required styles */
|
|
||||||
|
|
||||||
.leaflet-pane,
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow,
|
|
||||||
.leaflet-tile-container,
|
|
||||||
.leaflet-pane > svg,
|
|
||||||
.leaflet-pane > canvas,
|
|
||||||
.leaflet-zoom-box,
|
|
||||||
.leaflet-image-layer,
|
|
||||||
.leaflet-layer {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-container {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-tile,
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
-webkit-user-drag: none;
|
|
||||||
}
|
|
||||||
/* Prevents IE11 from highlighting tiles in blue */
|
|
||||||
.leaflet-tile::selection {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
|
|
||||||
.leaflet-safari .leaflet-tile {
|
|
||||||
image-rendering: -webkit-optimize-contrast;
|
|
||||||
}
|
|
||||||
/* hack that prevents hw layers "stretching" when loading new tiles */
|
|
||||||
.leaflet-safari .leaflet-tile-container {
|
|
||||||
width: 1600px;
|
|
||||||
height: 1600px;
|
|
||||||
-webkit-transform-origin: 0 0;
|
|
||||||
}
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
|
|
||||||
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
|
|
||||||
.leaflet-container .leaflet-overlay-pane svg {
|
|
||||||
max-width: none !important;
|
|
||||||
max-height: none !important;
|
|
||||||
}
|
|
||||||
.leaflet-container .leaflet-marker-pane img,
|
|
||||||
.leaflet-container .leaflet-shadow-pane img,
|
|
||||||
.leaflet-container .leaflet-tile-pane img,
|
|
||||||
.leaflet-container img.leaflet-image-layer,
|
|
||||||
.leaflet-container .leaflet-tile {
|
|
||||||
max-width: none !important;
|
|
||||||
max-height: none !important;
|
|
||||||
width: auto;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-container img.leaflet-tile {
|
|
||||||
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
|
|
||||||
mix-blend-mode: plus-lighter;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-container.leaflet-touch-zoom {
|
|
||||||
-ms-touch-action: pan-x pan-y;
|
|
||||||
touch-action: pan-x pan-y;
|
|
||||||
}
|
|
||||||
.leaflet-container.leaflet-touch-drag {
|
|
||||||
-ms-touch-action: pinch-zoom;
|
|
||||||
/* Fallback for FF which doesn't support pinch-zoom */
|
|
||||||
touch-action: none;
|
|
||||||
touch-action: pinch-zoom;
|
|
||||||
}
|
|
||||||
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
|
|
||||||
-ms-touch-action: none;
|
|
||||||
touch-action: none;
|
|
||||||
}
|
|
||||||
.leaflet-container {
|
|
||||||
-webkit-tap-highlight-color: transparent;
|
|
||||||
}
|
|
||||||
.leaflet-container a {
|
|
||||||
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
|
|
||||||
}
|
|
||||||
.leaflet-tile {
|
|
||||||
filter: inherit;
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
.leaflet-tile-loaded {
|
|
||||||
visibility: inherit;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
width: 0;
|
|
||||||
height: 0;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
z-index: 800;
|
|
||||||
}
|
|
||||||
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
|
|
||||||
.leaflet-overlay-pane svg {
|
|
||||||
-moz-user-select: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-pane { z-index: 400; }
|
|
||||||
|
|
||||||
.leaflet-tile-pane { z-index: 200; }
|
|
||||||
.leaflet-overlay-pane { z-index: 400; }
|
|
||||||
.leaflet-shadow-pane { z-index: 500; }
|
|
||||||
.leaflet-marker-pane { z-index: 600; }
|
|
||||||
.leaflet-tooltip-pane { z-index: 650; }
|
|
||||||
.leaflet-popup-pane { z-index: 700; }
|
|
||||||
|
|
||||||
.leaflet-map-pane canvas { z-index: 100; }
|
|
||||||
.leaflet-map-pane svg { z-index: 200; }
|
|
||||||
|
|
||||||
.leaflet-vml-shape {
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
}
|
|
||||||
.lvml {
|
|
||||||
behavior: url(#default#VML);
|
|
||||||
display: inline-block;
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* control positioning */
|
|
||||||
|
|
||||||
.leaflet-control {
|
|
||||||
position: relative;
|
|
||||||
z-index: 800;
|
|
||||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
.leaflet-top,
|
|
||||||
.leaflet-bottom {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 1000;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.leaflet-top {
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.leaflet-right {
|
|
||||||
right: 0;
|
|
||||||
}
|
|
||||||
.leaflet-bottom {
|
|
||||||
bottom: 0;
|
|
||||||
}
|
|
||||||
.leaflet-left {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control {
|
|
||||||
float: left;
|
|
||||||
clear: both;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
.leaflet-top .leaflet-control {
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control {
|
|
||||||
margin-left: 10px;
|
|
||||||
}
|
|
||||||
.leaflet-right .leaflet-control {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* zoom and fade animations */
|
|
||||||
|
|
||||||
.leaflet-fade-anim .leaflet-popup {
|
|
||||||
opacity: 0;
|
|
||||||
-webkit-transition: opacity 0.2s linear;
|
|
||||||
-moz-transition: opacity 0.2s linear;
|
|
||||||
transition: opacity 0.2s linear;
|
|
||||||
}
|
|
||||||
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-animated {
|
|
||||||
-webkit-transform-origin: 0 0;
|
|
||||||
-ms-transform-origin: 0 0;
|
|
||||||
transform-origin: 0 0;
|
|
||||||
}
|
|
||||||
svg.leaflet-zoom-animated {
|
|
||||||
will-change: transform;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
|
||||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
|
|
||||||
}
|
|
||||||
.leaflet-zoom-anim .leaflet-tile,
|
|
||||||
.leaflet-pan-anim .leaflet-tile {
|
|
||||||
-webkit-transition: none;
|
|
||||||
-moz-transition: none;
|
|
||||||
transition: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-zoom-anim .leaflet-zoom-hide {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* cursors */
|
|
||||||
|
|
||||||
.leaflet-interactive {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.leaflet-grab {
|
|
||||||
cursor: -webkit-grab;
|
|
||||||
cursor: -moz-grab;
|
|
||||||
cursor: grab;
|
|
||||||
}
|
|
||||||
.leaflet-crosshair,
|
|
||||||
.leaflet-crosshair .leaflet-interactive {
|
|
||||||
cursor: crosshair;
|
|
||||||
}
|
|
||||||
.leaflet-popup-pane,
|
|
||||||
.leaflet-control {
|
|
||||||
cursor: auto;
|
|
||||||
}
|
|
||||||
.leaflet-dragging .leaflet-grab,
|
|
||||||
.leaflet-dragging .leaflet-grab .leaflet-interactive,
|
|
||||||
.leaflet-dragging .leaflet-marker-draggable {
|
|
||||||
cursor: move;
|
|
||||||
cursor: -webkit-grabbing;
|
|
||||||
cursor: -moz-grabbing;
|
|
||||||
cursor: grabbing;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* marker & overlays interactivity */
|
|
||||||
.leaflet-marker-icon,
|
|
||||||
.leaflet-marker-shadow,
|
|
||||||
.leaflet-image-layer,
|
|
||||||
.leaflet-pane > svg path,
|
|
||||||
.leaflet-tile-container {
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-marker-icon.leaflet-interactive,
|
|
||||||
.leaflet-image-layer.leaflet-interactive,
|
|
||||||
.leaflet-pane > svg path.leaflet-interactive,
|
|
||||||
svg.leaflet-image-layer.leaflet-interactive path {
|
|
||||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* visual tweaks */
|
|
||||||
|
|
||||||
.leaflet-container {
|
|
||||||
background: #ddd;
|
|
||||||
outline-offset: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-container a {
|
|
||||||
color: #0078A8;
|
|
||||||
}
|
|
||||||
.leaflet-zoom-box {
|
|
||||||
border: 2px dotted #38f;
|
|
||||||
background: rgba(255,255,255,0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general typography */
|
|
||||||
.leaflet-container {
|
|
||||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 12px;
|
|
||||||
font-size: 0.75rem;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* general toolbar styles */
|
|
||||||
|
|
||||||
.leaflet-bar {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a {
|
|
||||||
background-color: #fff;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
width: 26px;
|
|
||||||
height: 26px;
|
|
||||||
line-height: 26px;
|
|
||||||
display: block;
|
|
||||||
text-align: center;
|
|
||||||
text-decoration: none;
|
|
||||||
color: black;
|
|
||||||
}
|
|
||||||
.leaflet-bar a,
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-position: 50% 50%;
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:hover,
|
|
||||||
.leaflet-bar a:focus {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:first-child {
|
|
||||||
border-top-left-radius: 4px;
|
|
||||||
border-top-right-radius: 4px;
|
|
||||||
}
|
|
||||||
.leaflet-bar a:last-child {
|
|
||||||
border-bottom-left-radius: 4px;
|
|
||||||
border-bottom-right-radius: 4px;
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
|
||||||
.leaflet-bar a.leaflet-disabled {
|
|
||||||
cursor: default;
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
color: #bbb;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-bar a {
|
|
||||||
width: 30px;
|
|
||||||
height: 30px;
|
|
||||||
line-height: 30px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-bar a:first-child {
|
|
||||||
border-top-left-radius: 2px;
|
|
||||||
border-top-right-radius: 2px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-bar a:last-child {
|
|
||||||
border-bottom-left-radius: 2px;
|
|
||||||
border-bottom-right-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* zoom control */
|
|
||||||
|
|
||||||
.leaflet-control-zoom-in,
|
|
||||||
.leaflet-control-zoom-out {
|
|
||||||
font: bold 18px 'Lucida Console', Monaco, monospace;
|
|
||||||
text-indent: 1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
|
|
||||||
font-size: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* layers control */
|
|
||||||
|
|
||||||
.leaflet-control-layers {
|
|
||||||
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers.png);
|
|
||||||
width: 36px;
|
|
||||||
height: 36px;
|
|
||||||
}
|
|
||||||
.leaflet-retina .leaflet-control-layers-toggle {
|
|
||||||
background-image: url(images/layers-2x.png);
|
|
||||||
background-size: 26px 26px;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers-toggle {
|
|
||||||
width: 44px;
|
|
||||||
height: 44px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers .leaflet-control-layers-list,
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded .leaflet-control-layers-list {
|
|
||||||
display: block;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-expanded {
|
|
||||||
padding: 6px 10px 6px 6px;
|
|
||||||
color: #333;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-scrollbar {
|
|
||||||
overflow-y: scroll;
|
|
||||||
overflow-x: hidden;
|
|
||||||
padding-right: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-selector {
|
|
||||||
margin-top: 2px;
|
|
||||||
position: relative;
|
|
||||||
top: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers label {
|
|
||||||
display: block;
|
|
||||||
font-size: 13px;
|
|
||||||
font-size: 1.08333em;
|
|
||||||
}
|
|
||||||
.leaflet-control-layers-separator {
|
|
||||||
height: 0;
|
|
||||||
border-top: 1px solid #ddd;
|
|
||||||
margin: 5px -10px 5px -6px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Default icon URLs */
|
|
||||||
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
|
|
||||||
background-image: url(images/marker-icon.png);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* attribution and scale controls */
|
|
||||||
|
|
||||||
.leaflet-container .leaflet-control-attribution {
|
|
||||||
background: #fff;
|
|
||||||
background: rgba(255, 255, 255, 0.8);
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution,
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
padding: 0 5px;
|
|
||||||
color: #333;
|
|
||||||
line-height: 1.4;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a {
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.leaflet-control-attribution a:hover,
|
|
||||||
.leaflet-control-attribution a:focus {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
.leaflet-attribution-flag {
|
|
||||||
display: inline !important;
|
|
||||||
vertical-align: baseline !important;
|
|
||||||
width: 1em;
|
|
||||||
height: 0.6669em;
|
|
||||||
}
|
|
||||||
.leaflet-left .leaflet-control-scale {
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-bottom .leaflet-control-scale {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line {
|
|
||||||
border: 2px solid #777;
|
|
||||||
border-top: none;
|
|
||||||
line-height: 1.1;
|
|
||||||
padding: 2px 5px 1px;
|
|
||||||
white-space: nowrap;
|
|
||||||
-moz-box-sizing: border-box;
|
|
||||||
box-sizing: border-box;
|
|
||||||
background: rgba(255, 255, 255, 0.8);
|
|
||||||
text-shadow: 1px 1px #fff;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child) {
|
|
||||||
border-top: 2px solid #777;
|
|
||||||
border-bottom: none;
|
|
||||||
margin-top: -2px;
|
|
||||||
}
|
|
||||||
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
|
|
||||||
border-bottom: 2px solid #777;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-touch .leaflet-control-attribution,
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
box-shadow: none;
|
|
||||||
}
|
|
||||||
.leaflet-touch .leaflet-control-layers,
|
|
||||||
.leaflet-touch .leaflet-bar {
|
|
||||||
border: 2px solid rgba(0,0,0,0.2);
|
|
||||||
background-clip: padding-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* popup */
|
|
||||||
|
|
||||||
.leaflet-popup {
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper {
|
|
||||||
padding: 1px;
|
|
||||||
text-align: left;
|
|
||||||
border-radius: 12px;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content {
|
|
||||||
margin: 13px 24px 13px 20px;
|
|
||||||
line-height: 1.3;
|
|
||||||
font-size: 13px;
|
|
||||||
font-size: 1.08333em;
|
|
||||||
min-height: 1px;
|
|
||||||
}
|
|
||||||
.leaflet-popup-content p {
|
|
||||||
margin: 17px 0;
|
|
||||||
margin: 1.3em 0;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip-container {
|
|
||||||
width: 40px;
|
|
||||||
height: 20px;
|
|
||||||
position: absolute;
|
|
||||||
left: 50%;
|
|
||||||
margin-top: -1px;
|
|
||||||
margin-left: -20px;
|
|
||||||
overflow: hidden;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
width: 17px;
|
|
||||||
height: 17px;
|
|
||||||
padding: 1px;
|
|
||||||
|
|
||||||
margin: -10px auto 0;
|
|
||||||
pointer-events: auto;
|
|
||||||
|
|
||||||
-webkit-transform: rotate(45deg);
|
|
||||||
-moz-transform: rotate(45deg);
|
|
||||||
-ms-transform: rotate(45deg);
|
|
||||||
transform: rotate(45deg);
|
|
||||||
}
|
|
||||||
.leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-popup-tip {
|
|
||||||
background: white;
|
|
||||||
color: #333;
|
|
||||||
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: 0;
|
|
||||||
border: none;
|
|
||||||
text-align: center;
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
font: 16px/24px Tahoma, Verdana, sans-serif;
|
|
||||||
color: #757575;
|
|
||||||
text-decoration: none;
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
.leaflet-container a.leaflet-popup-close-button:hover,
|
|
||||||
.leaflet-container a.leaflet-popup-close-button:focus {
|
|
||||||
color: #585858;
|
|
||||||
}
|
|
||||||
.leaflet-popup-scrolled {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
|
||||||
-ms-zoom: 1;
|
|
||||||
}
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
width: 24px;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
|
||||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
|
||||||
}
|
|
||||||
|
|
||||||
.leaflet-oldie .leaflet-control-zoom,
|
|
||||||
.leaflet-oldie .leaflet-control-layers,
|
|
||||||
.leaflet-oldie .leaflet-popup-content-wrapper,
|
|
||||||
.leaflet-oldie .leaflet-popup-tip {
|
|
||||||
border: 1px solid #999;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* div icon */
|
|
||||||
|
|
||||||
.leaflet-div-icon {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* Tooltip */
|
|
||||||
/* Base styles for the element that has a tooltip */
|
|
||||||
.leaflet-tooltip {
|
|
||||||
position: absolute;
|
|
||||||
padding: 6px;
|
|
||||||
background-color: #fff;
|
|
||||||
border: 1px solid #fff;
|
|
||||||
border-radius: 3px;
|
|
||||||
color: #222;
|
|
||||||
white-space: nowrap;
|
|
||||||
-webkit-user-select: none;
|
|
||||||
-moz-user-select: none;
|
|
||||||
-ms-user-select: none;
|
|
||||||
user-select: none;
|
|
||||||
pointer-events: none;
|
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
|
||||||
}
|
|
||||||
.leaflet-tooltip.leaflet-interactive {
|
|
||||||
cursor: pointer;
|
|
||||||
pointer-events: auto;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-top:before,
|
|
||||||
.leaflet-tooltip-bottom:before,
|
|
||||||
.leaflet-tooltip-left:before,
|
|
||||||
.leaflet-tooltip-right:before {
|
|
||||||
position: absolute;
|
|
||||||
pointer-events: none;
|
|
||||||
border: 6px solid transparent;
|
|
||||||
background: transparent;
|
|
||||||
content: "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Directions */
|
|
||||||
|
|
||||||
.leaflet-tooltip-bottom {
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-top {
|
|
||||||
margin-top: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-bottom:before,
|
|
||||||
.leaflet-tooltip-top:before {
|
|
||||||
left: 50%;
|
|
||||||
margin-left: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-top:before {
|
|
||||||
bottom: 0;
|
|
||||||
margin-bottom: -12px;
|
|
||||||
border-top-color: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-bottom:before {
|
|
||||||
top: 0;
|
|
||||||
margin-top: -12px;
|
|
||||||
margin-left: -6px;
|
|
||||||
border-bottom-color: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-left {
|
|
||||||
margin-left: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-right {
|
|
||||||
margin-left: 6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-left:before,
|
|
||||||
.leaflet-tooltip-right:before {
|
|
||||||
top: 50%;
|
|
||||||
margin-top: -6px;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-left:before {
|
|
||||||
right: 0;
|
|
||||||
margin-right: -12px;
|
|
||||||
border-left-color: #fff;
|
|
||||||
}
|
|
||||||
.leaflet-tooltip-right:before {
|
|
||||||
left: 0;
|
|
||||||
margin-left: -12px;
|
|
||||||
border-right-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Printing */
|
|
||||||
|
|
||||||
@media print {
|
|
||||||
/* Prevent printers from removing background-images of controls. */
|
|
||||||
.leaflet-control {
|
|
||||||
-webkit-print-color-adjust: exact;
|
|
||||||
print-color-adjust: exact;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.--><path d="M0 224.2C0 100.6 100.2 0 224 0h24c95.2 0 181.2 69.3 197.3 160.2c2.3 13 6.8 25.7 15.1 36l42 52.6c6.2 7.8 9.6 17.4 9.6 27.4c0 24.2-19.6 43.8-43.8 43.8H448v64c0 35.3-28.7 64-64 64H320v32c0 17.7-14.3 32-32 32H96c-17.7 0-32-14.3-32-32V407.3c0-16.7-6.9-32.5-17.1-45.8C16.6 322.4 0 274.1 0 224.2zM224 64c-8.8 0-16 7.2-16 16c0 33-39.9 49.5-63.2 26.2c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6C145.5 152.1 129 192 96 192c-8.8 0-16 7.2-16 16s7.2 16 16 16c33 0 49.5 39.9 26.2 63.2c-6.2 6.2-6.2 16.4 0 22.6s16.4 6.2 22.6 0C168.1 286.5 208 303 208 336c0 8.8 7.2 16 16 16s16-7.2 16-16c0-33 39.9-49.5 63.2-26.2c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6C302.5 263.9 319 224 352 224c8.8 0 16-7.2 16-16s-7.2-16-16-16c-33 0-49.5-39.9-26.2-63.2c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0C279.9 129.5 240 113 240 80c0-8.8-7.2-16-16-16zm-24 96a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm40 80a16 16 0 1 1 32 0 16 16 0 1 1 -32 0z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user