mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-13 20:24:34 +00:00
Compare commits
206 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 37aa51f8c2 | |||
| ad03444ff5 | |||
| 167d47e488 | |||
| 3a82dba854 | |||
| 1fff02cdd2 | |||
| 1ab318c279 | |||
| 7a1a4b7372 | |||
| 2802f9cdc8 | |||
| ed039035df | |||
| 7fa4a7c411 | |||
| d4dfd80cdf | |||
| 720f9da2df | |||
| 5015f09d1d | |||
| 882a35c2cd | |||
| 6b3ce96c18 | |||
| 760027b925 | |||
| 9b05bcccc2 | |||
| 80320c0f2c | |||
| b43a6c9748 | |||
| dcc9e1d469 | |||
| 3c37185c1a | |||
| 671e7d5dc1 | |||
| 0ebd192487 | |||
| 3fc54a1fb5 | |||
| eaf38a4d06 | |||
| 6376b7acf0 | |||
| 52edf94b17 | |||
| 3e11dd9e16 | |||
| a9f09b6ce6 | |||
| a43aa60f45 | |||
| 9cba642e9b | |||
| c7494da901 | |||
| b9e848d66e | |||
| 99f8d991be | |||
| 753dcab26e | |||
| 2f53488ba8 | |||
| 323339e679 | |||
| 3f14a75e81 | |||
| 469a54c141 | |||
| 2ee9030c00 | |||
| 5b29a40990 | |||
| 708fe5e670 | |||
| e32aadda4e | |||
| c35b7f0268 | |||
| 876cf900c3 | |||
| 778ac0ac54 | |||
| b816144fb0 | |||
| 61ba9f6d63 | |||
| f88c02a7aa | |||
| 5ffc08e6f1 | |||
| 9392380c78 | |||
| a18343b81d | |||
|
|
13cd08c655 | ||
|
|
8fe14dc18d | ||
|
|
1bec26df8a | ||
|
|
c5d5da636f | ||
|
|
c2e137e67c | ||
|
|
de5ac9dbb5 | ||
|
|
ef3be1e768 | ||
|
|
9bda92d389 | ||
|
|
9763cb6697 | ||
|
|
5ac49e12f8 | ||
|
|
2108d20b01 | ||
|
|
524e7a0b3e | ||
|
|
7e4379ada4 | ||
|
|
572b2a360f | ||
|
|
083ccd2906 | ||
|
|
35a45d2cd4 | ||
|
|
2b241fbeaf | ||
|
|
ad9ba834cc | ||
|
|
469403d9b5 | ||
|
|
01ea754f57 | ||
|
|
fd8a25790e | ||
|
|
9ede7237b8 | ||
|
|
1242b1f79f | ||
|
|
9f8f326446 | ||
|
|
bf3b0cf0d4 | ||
|
|
42098401f2 | ||
|
|
cad4aaa1a5 | ||
|
|
ef787a6a09 | ||
|
|
2e017f97c9 | ||
|
|
fbd58d9426 | ||
|
|
894a11f087 | ||
|
|
dacb38fe45 | ||
|
|
2298254e24 | ||
|
|
853000a5c9 | ||
|
|
d0b47dd315 | ||
|
|
3c9dd1bea4 | ||
|
|
4d89ea7bc5 | ||
|
|
b97d13121e | ||
|
|
dcfdb0451c | ||
|
|
83b9082e87 | ||
|
|
2ab83a17b9 | ||
|
|
4ae35335e2 | ||
|
|
a1bf9472ae | ||
|
|
15129bb344 | ||
|
|
f143d80c34 | ||
|
|
e713c2f35f | ||
|
|
b1fac90e78 | ||
|
|
8341288457 | ||
|
|
4ad2b2d6dd | ||
|
|
485e67120c | ||
|
|
60f04bc4e8 | ||
|
|
35742847a7 | ||
|
|
c8c2b639ea | ||
|
|
0453470f1f | ||
|
|
d9da877da6 | ||
|
|
ed2b09a5f6 | ||
|
|
c1198ef287 | ||
|
|
58f6d3f349 | ||
|
|
67a7fa99af | ||
|
|
220c56f01d | ||
|
|
30be943581 | ||
|
|
a859e55c1b | ||
|
|
f491b06664 | ||
|
|
874686c975 | ||
|
|
2a7c1b8ae8 | ||
|
|
8ddbefee18 | ||
|
|
2b190d72c5 | ||
|
|
9fb8311aca | ||
|
|
d4f6ddb0fa | ||
|
|
0dd12a275b | ||
|
|
c45708066e | ||
|
|
0de4cf75e8 | ||
|
|
9bb4483266 | ||
|
|
ffc75cf4c4 | ||
|
|
2919805844 | ||
|
|
f3bff2b9cf | ||
|
|
74cda1c9a6 | ||
|
|
6c667d69b8 | ||
|
|
5f62304965 | ||
|
|
082831951e | ||
|
|
645a16394b | ||
|
|
0340a84e9c | ||
|
|
50cf9b10bd | ||
|
|
6e220e5807 | ||
|
|
c1f61dc4aa | ||
|
|
d8e08b8da8 | ||
|
|
1fee414ff0 | ||
|
|
b41008df8b | ||
|
|
3d775db2cc | ||
|
|
7b5510698e | ||
|
|
3f028b48c8 | ||
|
|
aa7b27ac2e | ||
|
|
2d207965db | ||
|
|
2e2a321006 | ||
|
|
67fa1cfe52 | ||
|
|
730440f4ac | ||
|
|
1d65705aa8 | ||
|
|
f04c0141ef | ||
|
|
e06c199816 | ||
|
|
94c7752844 | ||
|
|
9bdb4770c9 | ||
|
|
98e63a7152 | ||
|
|
3a179ea958 | ||
|
|
af15a44fb6 | ||
|
|
ac18c45bef | ||
|
|
65b8aaebe3 | ||
|
|
b3bd58385e | ||
|
|
29574bc36c | ||
|
|
6208286294 | ||
|
|
2299a3f5c9 | ||
|
|
098de89d95 | ||
|
|
8f7d5425ad | ||
|
|
938f0bcb6a | ||
|
|
577125120d | ||
|
|
5c599877ca | ||
|
|
c1b00cb050 | ||
|
|
319ea9b32a | ||
|
|
eda786931d | ||
|
|
31f7b5178e | ||
|
|
8a6dcff05d | ||
|
|
f2fe8b586c | ||
|
|
bcefc7670f | ||
|
|
12c8781236 | ||
|
|
d81c8fa67b | ||
|
|
6de6a29a09 | ||
|
|
ffcd4feb4e | ||
|
|
39f4936bf7 | ||
|
|
25549cda25 | ||
|
|
5231dae17a | ||
|
|
f669cc1cc0 | ||
|
|
43f1cd3bb2 | ||
|
|
ec9d3693bf | ||
|
|
01efe4e01d | ||
|
|
a997c54170 | ||
|
|
68b0fd1e38 | ||
|
|
9c82832a54 | ||
|
|
d9e7dfe497 | ||
|
|
49afb54b80 | ||
|
|
5d6846c5fa | ||
|
|
9bb4a8feaa | ||
|
|
50b118cbfe | ||
|
|
d11050fcc8 | ||
|
|
3d8baae344 | ||
|
|
1d7cce8409 | ||
|
|
3f4535cf17 | ||
|
|
4412b67d63 | ||
|
|
3128ac0022 | ||
|
|
b230515675 | ||
|
|
ad2f529345 | ||
|
|
162f3c7e7a | ||
|
|
ca4231f669 | ||
|
|
8334ff4be5 | ||
|
|
19907184be | ||
|
|
f2ba112ae4 |
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,3 +1,5 @@
|
|||||||
|
*.rs linguist-language=Rust
|
||||||
|
|
||||||
*.paa filter=lfs diff=lfs merge=lfs -text
|
*.paa filter=lfs diff=lfs merge=lfs -text
|
||||||
*.p3d filter=lfs diff=lfs merge=lfs -text
|
*.p3d filter=lfs diff=lfs merge=lfs -text
|
||||||
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
||||||
|
|||||||
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,4 +1,5 @@
|
|||||||
**When merged this pull request will:**
|
**When merged this pull request will:**
|
||||||
|
|
||||||
- _Describe what this pull request will do_
|
- _Describe what this pull request will do_
|
||||||
- _Each change in a separate line_
|
- _Each change in a separate line_
|
||||||
|
|
||||||
|
|||||||
33
.github/workflows/pack_early.yaml
vendored
33
.github/workflows/pack_early.yaml
vendored
@@ -5,32 +5,6 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
package_application:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
- name: set up JDK 11
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'zulu'
|
|
||||||
cache: gradle
|
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew assembleDebug
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: simtak
|
|
||||||
path: app/build/outputs/apk/debug/app-debug.apk
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
build_extension:
|
build_extension:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -66,7 +40,7 @@ jobs:
|
|||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
package:
|
package:
|
||||||
needs: [build_extension, package_application]
|
needs: [build_extension]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
@@ -88,11 +62,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: x86_64-unknown-linux-gnu
|
name: x86_64-unknown-linux-gnu
|
||||||
- run: mv ./libarmatak.so ./armatak_x64.so
|
- run: mv ./libarmatak.so ./armatak_x64.so
|
||||||
- name: Download Android Application Installer
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: simtak
|
|
||||||
- run: mv ./app-debug.apk ./simtak.apk
|
|
||||||
- name: Setup HEMTT
|
- name: Setup HEMTT
|
||||||
uses: arma-actions/hemtt@v1
|
uses: arma-actions/hemtt@v1
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|||||||
33
.github/workflows/publish.yaml
vendored
33
.github/workflows/publish.yaml
vendored
@@ -5,32 +5,6 @@ on:
|
|||||||
branches: [ main ]
|
branches: [ main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
package_application:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
- name: set up JDK 11
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'zulu'
|
|
||||||
cache: gradle
|
|
||||||
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew assembleDebug
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: simtak
|
|
||||||
path: app/build/outputs/apk/debug/app-debug.apk
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
build_extension:
|
build_extension:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -66,7 +40,7 @@ jobs:
|
|||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
package:
|
package:
|
||||||
needs: [build_extension, package_application]
|
needs: [build_extension]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
@@ -88,11 +62,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: x86_64-unknown-linux-gnu
|
name: x86_64-unknown-linux-gnu
|
||||||
- run: mv ./libarmatak.so ./armatak_x64.so
|
- run: mv ./libarmatak.so ./armatak_x64.so
|
||||||
- name: Download Android Application Installer
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: simtak
|
|
||||||
- run: mv ./app-debug.apk ./simtak.apk
|
|
||||||
- name: Setup HEMTT
|
- name: Setup HEMTT
|
||||||
uses: arma-actions/hemtt@v1
|
uses: arma-actions/hemtt@v1
|
||||||
- name: Build
|
- name: Build
|
||||||
|
|||||||
36
.github/workflows/release_drafter.yaml
vendored
36
.github/workflows/release_drafter.yaml
vendored
@@ -9,31 +9,6 @@ permissions:
|
|||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
package_application:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
lfs: true
|
|
||||||
- name: Set up JDK 11
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
java-version: '17'
|
|
||||||
distribution: 'zulu'
|
|
||||||
cache: gradle
|
|
||||||
- name: Grant execute permission for gradlew
|
|
||||||
run: chmod +x gradlew
|
|
||||||
- name: Build with Gradle
|
|
||||||
run: ./gradlew assembleDebug
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: simtak
|
|
||||||
path: app/build/outputs/apk/debug/app-debug.apk
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 1
|
|
||||||
|
|
||||||
build_extension:
|
build_extension:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
@@ -69,7 +44,7 @@ jobs:
|
|||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
package:
|
package:
|
||||||
needs: [build_extension, package_application]
|
needs: [build_extension]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repo
|
- name: Checkout Repo
|
||||||
@@ -91,11 +66,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: x86_64-unknown-linux-gnu
|
name: x86_64-unknown-linux-gnu
|
||||||
- run: mv ./libarmatak.so ./armatak_x64.so
|
- run: mv ./libarmatak.so ./armatak_x64.so
|
||||||
- name: Download Android Application Installer
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: simtak
|
|
||||||
- run: mv ./app-debug.apk ./simtak.apk
|
|
||||||
- name: Setup HEMTT
|
- name: Setup HEMTT
|
||||||
uses: arma-actions/hemtt@v1
|
uses: arma-actions/hemtt@v1
|
||||||
- name: Build
|
- name: Build
|
||||||
@@ -121,8 +91,8 @@ jobs:
|
|||||||
release_name: ${{ github.ref }}
|
release_name: ${{ github.ref }}
|
||||||
body: |
|
body: |
|
||||||
Changes in this release:
|
Changes in this release:
|
||||||
${{ env.COMMIT_MESSAGES }}
|
${{ github.event.head_commit.message }}
|
||||||
draft: false
|
draft: true
|
||||||
prerelease: false
|
prerelease: false
|
||||||
- name: Upload Release Asset
|
- name: Upload Release Asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
|
|||||||
79
.github/workflows/release_publisher.yaml
vendored
Normal file
79
.github/workflows/release_publisher.yaml
vendored
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
name: Publish Production
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_extension:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os_target:
|
||||||
|
- { os: "windows-latest", target: "i686-pc-windows-msvc", artifact: "armatak.dll", name: "armatak.dll" }
|
||||||
|
- { os: "windows-latest", target: "x86_64-pc-windows-msvc", artifact: "armatak.dll", name: "armatak_x64.dll" }
|
||||||
|
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu", artifact: "libarmatak.so", name: "armatak.so" }
|
||||||
|
runs-on: ${{ matrix.os_target.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
- name: Install Rust Toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
target: ${{ matrix.os_target.target }}
|
||||||
|
toolchain: stable
|
||||||
|
default: true
|
||||||
|
- name: Install Dependencies (Linux only)
|
||||||
|
if: matrix.os_target.os == 'ubuntu-latest'
|
||||||
|
run: sudo apt-get update && sudo apt-get install -y build-essential
|
||||||
|
- name: Cargo Build
|
||||||
|
run: cargo build --release --target ${{ matrix.os_target.target }}
|
||||||
|
- name: check stuff
|
||||||
|
run: ls target/release
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os_target.target }}
|
||||||
|
path: target/${{ matrix.os_target.target }}/release/${{ matrix.os_target.artifact }}
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 1
|
||||||
|
|
||||||
|
package:
|
||||||
|
needs: [build_extension]
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
lfs: true
|
||||||
|
- run: mkdir -p ./target/release
|
||||||
|
- name: Download Windows x64 Artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: x86_64-pc-windows-msvc
|
||||||
|
- run: mv ./armatak.dll ./armatak_x64.dll
|
||||||
|
- name: Download Windows x86 Artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: i686-pc-windows-msvc
|
||||||
|
- name: Download Linux x64 Artifact
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: x86_64-unknown-linux-gnu
|
||||||
|
- run: mv ./libarmatak.so ./armatak_x64.so
|
||||||
|
- name: Setup HEMTT
|
||||||
|
uses: arma-actions/hemtt@v1
|
||||||
|
- name: Build
|
||||||
|
run: hemtt release
|
||||||
|
- name: Extract Zipped Mod
|
||||||
|
run: unzip releases/armatak-latest.zip -d releases
|
||||||
|
- uses: arma-actions/workshop-upload@v1
|
||||||
|
with:
|
||||||
|
appId: '107410'
|
||||||
|
itemId: ${{ secrets.STEAM_WORKSHOP_PROD_ID }}
|
||||||
|
contentPath: releases/@armatak
|
||||||
|
changelog: 'Update'
|
||||||
|
env:
|
||||||
|
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
|
||||||
|
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
|
||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -3,6 +3,7 @@
|
|||||||
hemtt
|
hemtt
|
||||||
hemtt.exe
|
hemtt.exe
|
||||||
*.biprivatekey
|
*.biprivatekey
|
||||||
|
.hemttprivatekey
|
||||||
source/
|
source/
|
||||||
.vscode
|
.vscode
|
||||||
releases/
|
releases/
|
||||||
@@ -88,3 +89,6 @@ target/
|
|||||||
local.properties
|
local.properties
|
||||||
|
|
||||||
*.apk
|
*.apk
|
||||||
|
|
||||||
|
|
||||||
|
.hemtt/missions
|
||||||
@@ -4,10 +4,10 @@ name = "ARMA Team Awareness Kit"
|
|||||||
prefix = "armatak"
|
prefix = "armatak"
|
||||||
|
|
||||||
[version]
|
[version]
|
||||||
build = 9
|
build = 0
|
||||||
major = 0
|
major = 1
|
||||||
minor = 9
|
minor = 1
|
||||||
patch = 9
|
patch = 0
|
||||||
|
|
||||||
git_hash = 0
|
git_hash = 0
|
||||||
|
|
||||||
@@ -25,8 +25,7 @@ include = [
|
|||||||
"LICENSE",
|
"LICENSE",
|
||||||
"*.dll",
|
"*.dll",
|
||||||
"*.so",
|
"*.so",
|
||||||
"*.paa",
|
"*.paa"
|
||||||
"simtak.apk"
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[properties]
|
[properties]
|
||||||
@@ -38,28 +37,8 @@ preset = "Hemtt"
|
|||||||
|
|
||||||
[hemtt.launch.default]
|
[hemtt.launch.default]
|
||||||
workshop = [
|
workshop = [
|
||||||
"450814997", # CBA
|
"450814997", # CBA_A3
|
||||||
"463939057", # ACE
|
"463939057", # ace
|
||||||
"623475643", # 3den enhanced
|
|
||||||
"1779063631", # Zeus enhanced
|
|
||||||
"1673595418", # User Input Menus
|
|
||||||
"1678581937", # Extended Function Viewer
|
|
||||||
"1231625987", #Debug Console
|
|
||||||
"751965892", # ACRE2
|
|
||||||
"843577117", # RHSUSAF
|
|
||||||
"843425103", # RHSAFRF
|
|
||||||
"843593391", # RHSGREF
|
|
||||||
"735566597", # Project OPFOR
|
|
||||||
"3030830594", # Western Dusk
|
|
||||||
"3147473073", # TOTT Core
|
|
||||||
"3147480843", # TOTT CAG
|
|
||||||
"3147476552", # TOTT Optics
|
|
||||||
"2975268929", # GPNVG
|
|
||||||
"583496184", # CUP Terrains
|
|
||||||
"421620913", # Kunduz
|
|
||||||
"2397360831", # USAF Core
|
|
||||||
"2397376046", # USAF Utility
|
|
||||||
"2226368165", # USAF AC130
|
|
||||||
]
|
]
|
||||||
|
|
||||||
parameters = [
|
parameters = [
|
||||||
|
|||||||
1897
Cargo.lock
generated
1897
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
17
Cargo.toml
17
Cargo.toml
@@ -1,26 +1,19 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "armatak"
|
name = "armatak"
|
||||||
version = "0.9.9"
|
version = "1.0.1"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
arma-rs = "1.10.4"
|
arma-rs = "1.10.4"
|
||||||
chrono = "0.4.39"
|
chrono = "0.4.39"
|
||||||
futures = "0.3.31"
|
|
||||||
futures-util = "0.3.31"
|
|
||||||
http = "1.1.0"
|
|
||||||
lazy_static = "1.5.0"
|
lazy_static = "1.5.0"
|
||||||
log = "0.4.22"
|
log = "0.4.22"
|
||||||
log4rs = "1.3.0"
|
log4rs = "1.3.0"
|
||||||
once_cell = "1.19.0"
|
reqwest = { version = "0.12.15", default-features = false, features = ["blocking", "json", "rustls-tls"] }
|
||||||
qrcode = "0.14.1"
|
rcgen = { version = "0.13.2", default-features = false, features = ["crypto", "pem", "aws_lc_rs"] }
|
||||||
regex = "1.10.6"
|
rustls = "0.23.23"
|
||||||
reqwest = { version = "0.12.7", features = ["blocking"] }
|
rustls-pemfile = "2.2.0"
|
||||||
serde = { version = "1.0.210", features = ["derive"] }
|
serde = { version = "1.0.210", features = ["derive"] }
|
||||||
serde_json = "1.0.128"
|
|
||||||
tokio = { version = "1.40", features = ["full"] }
|
|
||||||
tokio-tungstenite = "0.24.0"
|
|
||||||
ws = "0.9.2"
|
|
||||||
|
|
||||||
[dependencies.uuid]
|
[dependencies.uuid]
|
||||||
version = "1.10.0"
|
version = "1.10.0"
|
||||||
|
|||||||
1
addons/client/$PBOPREFIX$
Normal file
1
addons/client/$PBOPREFIX$
Normal file
@@ -0,0 +1 @@
|
|||||||
|
armatak\armatak\addons\client
|
||||||
17
addons/client/CfgEventHandlers.hpp
Normal file
17
addons/client/CfgEventHandlers.hpp
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
class Extended_PreStart_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_PreInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_PostInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
|
||||||
|
};
|
||||||
|
};
|
||||||
4
addons/client/XEH_PREP.hpp
Normal file
4
addons/client/XEH_PREP.hpp
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
PREP(convertClientLocation);
|
||||||
|
PREP(extractClientPosition);
|
||||||
|
PREP(sendLaserRangeFinder);
|
||||||
|
PREP(startUDPSocket);
|
||||||
9
addons/client/XEH_postInit.sqf
Normal file
9
addons/client/XEH_postInit.sqf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
|
_local_address = "armatak" callExtension ["local_ip", []] select 0;
|
||||||
|
|
||||||
|
SETVAR(player,GVAR(localAddress),_local_address);
|
||||||
|
SETVAR(player,GVAR(eudConnected),false);
|
||||||
|
SETVAR(player,GVAR(lrfEnabled),false);
|
||||||
9
addons/client/XEH_preInit.sqf
Normal file
9
addons/client/XEH_preInit.sqf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP_RECOMPILE_START;
|
||||||
|
#include "XEH_PREP.hpp"
|
||||||
|
PREP_RECOMPILE_END;
|
||||||
|
|
||||||
|
ADDON = true;
|
||||||
3
addons/client/XEH_preStart.sqf
Normal file
3
addons/client/XEH_preStart.sqf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#include "XEH_PREP.hpp"
|
||||||
35
addons/client/config.cpp
Normal file
35
addons/client/config.cpp
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
name = COMPONENT_NAME;
|
||||||
|
units[] = {};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredAddons[] = {
|
||||||
|
"cba_main",
|
||||||
|
"ace_main",
|
||||||
|
"armatak_main"
|
||||||
|
};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
author = PROJECT_AUTHOR;
|
||||||
|
url = "https://github.com/valmojr/armatak";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class CfgVehicles {
|
||||||
|
class Man;
|
||||||
|
class CAManBase: Man {
|
||||||
|
class ACE_SelfActions {
|
||||||
|
class danceParty {
|
||||||
|
displayName = "Connect to EUD";
|
||||||
|
condition = "!(player getVariable ['armatak_client_eudConnected', false])";
|
||||||
|
exceptions[] = {};
|
||||||
|
statement = "createDialog 'armatak_udp_socket_start_dialog'";
|
||||||
|
icon = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgEventHandlers.hpp"
|
||||||
|
#include "dialog.hpp"
|
||||||
126
addons/client/dialog.hpp
Normal file
126
addons/client/dialog.hpp
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
class RscText;
|
||||||
|
class RscBackground;
|
||||||
|
class RscButton;
|
||||||
|
class RscEdit;
|
||||||
|
|
||||||
|
class armatak_udp_socket_start_dialog {
|
||||||
|
idd = 999091;
|
||||||
|
movingEnable = 0;
|
||||||
|
class ControlsBackground {
|
||||||
|
class armatak_gui_module_udp_socket_dialog_main_frame: RscBackground {
|
||||||
|
idc = 16960;
|
||||||
|
x = "0.386562 * safezoneW + safezoneX";
|
||||||
|
y = "0.357 * safezoneH + safezoneY";
|
||||||
|
w = "0.216563 * safezoneW";
|
||||||
|
h = "0.495 * safezoneH";
|
||||||
|
colorBackground[]={0,0,0,0.45};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Controls {
|
||||||
|
class armatak_gui_module_udp_socket_dialog_address_edit: RscEdit {
|
||||||
|
idc = 16961;
|
||||||
|
text = "192.168.15.121";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.401 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[]={0,0,0,0.5};
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_gnss_port_edit: RscEdit {
|
||||||
|
idc = 16962;
|
||||||
|
text = "4349";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.478 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[]={0,0,0,0.5};
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_mavlink_port_edit: RscEdit {
|
||||||
|
idc = 16967;
|
||||||
|
text = "14550";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.555 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[]={0,0,0,0.5};
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_video_feed_url_edit: RscEdit {
|
||||||
|
idc = 16969;
|
||||||
|
text = "";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.709 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[]={0,0,0,0.5};
|
||||||
|
tooltip = "Optional shared feed URL. If empty, the UAV 3DEN URL is used first, then a local RTP fallback.";
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_lrf_port_edit: RscEdit {
|
||||||
|
idc = 16971;
|
||||||
|
text = "17211";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.632 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[]={0,0,0,0.5};
|
||||||
|
tooltip = "ATAK local Laser Range Finder UDP input. Leave empty to disable.";
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_address_text: RscText {
|
||||||
|
idc = 16963;
|
||||||
|
text = "EUD's Address";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.368 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_gnss_port_text: RscText {
|
||||||
|
idc = 16964;
|
||||||
|
text = "Network GNSS Port";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.445 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_mavlink_port_text: RscText {
|
||||||
|
idc = 16968;
|
||||||
|
text = "Mavlink Port";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.522 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_video_feed_url_text: RscText {
|
||||||
|
idc = 16970;
|
||||||
|
text = "Video Feed URL (Optional)";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.676 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_lrf_port_text: RscText {
|
||||||
|
idc = 16972;
|
||||||
|
text = "Laser Range Finder Port";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.599 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_address_button_cancel: RscButton {
|
||||||
|
idc = 16965;
|
||||||
|
text = "Cancel";
|
||||||
|
action = "closeDialog 2;";
|
||||||
|
x = "0.551563 * safezoneW + safezoneX";
|
||||||
|
y = "0.786 * safezoneH + safezoneY";
|
||||||
|
w = "0.0464063 * safezoneW";
|
||||||
|
h = "0.055 * safezoneH";
|
||||||
|
};
|
||||||
|
class armatak_gui_module_udp_socket_dialog_address_button_ok: RscButton {
|
||||||
|
idc = 16966;
|
||||||
|
text = "Ok";
|
||||||
|
action = QUOTE(call FUNC(startUDPSocket));
|
||||||
|
x = "0.5 * safezoneW + safezoneX";
|
||||||
|
y = "0.786 * safezoneH + safezoneY";
|
||||||
|
w = "0.0464063 * safezoneW";
|
||||||
|
h = "0.055 * safezoneH";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
128
addons/client/functions/fnc_convertClientLocation.sqf
Normal file
128
addons/client/functions/fnc_convertClientLocation.sqf
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Author: Valmo Trindade
|
||||||
|
* This function is used to convert the position of a unit to the world world location.
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: in game latitude <NUMBER> is the latitude of the unit.
|
||||||
|
* 1: in game longitude <NUMBER> is the longitude of the unit.
|
||||||
|
* 2: in game altitude <NUMBER> is the altitude of the unit.
|
||||||
|
* 3: in game bearing <NUMBER> is the bearing of the unit.
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* ARRAY -> [latitude, longitude, altitude, bearing]
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player] call armatak_client_fnc_convertClientLocation;
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*/
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_latitude", 0, [0]],
|
||||||
|
["_longitude", 0, [0]],
|
||||||
|
["_altitude", 0, [0]]
|
||||||
|
];
|
||||||
|
|
||||||
|
private _position = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
|
private _realLocation = [0, 0, _altitude];
|
||||||
|
|
||||||
|
switch (toLower worldName) do {
|
||||||
|
case "altis": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_altis;
|
||||||
|
};
|
||||||
|
case "stratis": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_stratis;
|
||||||
|
};
|
||||||
|
case "malden": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_malden;
|
||||||
|
};
|
||||||
|
case "vr": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_vr;
|
||||||
|
};
|
||||||
|
case "lawn": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_lawn;
|
||||||
|
};
|
||||||
|
case "cucui": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_cucui;
|
||||||
|
};
|
||||||
|
case "chernarus": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_chernarus;
|
||||||
|
};
|
||||||
|
case "chernarus_summer": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_chernarus;
|
||||||
|
};
|
||||||
|
case "chernarus_winter": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_chernarus;
|
||||||
|
};
|
||||||
|
case "bootcamp_acr": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_bukovina;
|
||||||
|
};
|
||||||
|
case "woodland_acr": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_bystrika;
|
||||||
|
};
|
||||||
|
case "mountains_acr": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_takistan_montains;
|
||||||
|
};
|
||||||
|
case "sara_dbe1": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_united_sahrani;
|
||||||
|
};
|
||||||
|
case "saralite": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_southen_sahrani;
|
||||||
|
};
|
||||||
|
case "enoch": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_livonia;
|
||||||
|
};
|
||||||
|
case "kunduz": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_kunduz;
|
||||||
|
};
|
||||||
|
case "kunduz_valley": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_kunduz_valley;
|
||||||
|
};
|
||||||
|
case "malvinasfalkands": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_malvinas_malvinasfalkands;
|
||||||
|
};
|
||||||
|
case "pebble_island_airfield": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_malvinas_pebble_island_airfield;
|
||||||
|
};
|
||||||
|
case "p_argentino_stanley": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_malvinas_p_argentino_stanley;
|
||||||
|
};
|
||||||
|
case "top_malo_house": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_malvinas_top_malo_house;
|
||||||
|
};
|
||||||
|
case "pradera_ganso": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_malvinas_pradera_ganso;
|
||||||
|
};
|
||||||
|
case "tanoa": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_tanoa;
|
||||||
|
};
|
||||||
|
case "zagor_zagorsk_reserved_forest": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_zagor_zagorsk_reserved_forest;
|
||||||
|
};
|
||||||
|
case "umb_colombia": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_colombia;
|
||||||
|
};
|
||||||
|
case "clafghan": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_clafghan;
|
||||||
|
};
|
||||||
|
case "rut_mandol": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_rut_mandol;
|
||||||
|
};
|
||||||
|
case "hellanmaa": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_hellanmaa;
|
||||||
|
};
|
||||||
|
case "hellanmaaw": {
|
||||||
|
_realLocation = _position call armatak_fnc_convert_to_hellanmaa;
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Unsupported Map"];
|
||||||
|
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||||
|
|
||||||
|
_realLocation = [0, 0, 0];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_realLocation
|
||||||
29
addons/client/functions/fnc_extractClientPosition.sqf
Normal file
29
addons/client/functions/fnc_extractClientPosition.sqf
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Author: Valmo Trindade
|
||||||
|
* This function is used to extract the position of a unit and convert it to a format suitable for SIMTAK.
|
||||||
|
*
|
||||||
|
* Argument:
|
||||||
|
* 0: The first argument <OBJECT> is the unit whose position you want to extract.
|
||||||
|
*
|
||||||
|
* Return Value:
|
||||||
|
* ARRAY -> [latitude, longitude, altitude, bearing]
|
||||||
|
*
|
||||||
|
* Example:
|
||||||
|
* [player] call armatak_client_fnc_extractClientPosition;
|
||||||
|
*
|
||||||
|
* Public: Yes
|
||||||
|
*/
|
||||||
|
|
||||||
|
params["_unit"];
|
||||||
|
|
||||||
|
private _uuid = _unit call armatak_fnc_extract_uuid;
|
||||||
|
private _pos = (getPos _unit) call FUNC(convertClientLocation);
|
||||||
|
private _callsign = _unit call armatak_fnc_extract_unit_callsign;
|
||||||
|
private _bearing = parseNumber ((getDir _unit) toFixed 0);
|
||||||
|
private _speed = speed _unit / 3.6;
|
||||||
|
|
||||||
|
_payload = [_uuid, _pos select 0, _pos select 1, _pos select 2, _callsign, _bearing, _speed, _callsign];
|
||||||
|
|
||||||
|
_payload
|
||||||
52
addons/client/functions/fnc_sendLaserRangeFinder.sqf
Normal file
52
addons/client/functions/fnc_sendLaserRangeFinder.sqf
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
params ["_unit"];
|
||||||
|
|
||||||
|
private _lrfEnabled = player getVariable [QGVAR(lrfEnabled), false];
|
||||||
|
|
||||||
|
private _uid = format ["%1.LRF", _unit call armatak_fnc_extract_uuid];
|
||||||
|
private _laserTarget = laserTarget _unit;
|
||||||
|
|
||||||
|
if (!isNull _laserTarget) exitWith {
|
||||||
|
private _originASL = getPosASL _unit;
|
||||||
|
private _targetASL = getPosASL _laserTarget;
|
||||||
|
private _delta = _targetASL vectorDiff _originASL;
|
||||||
|
|
||||||
|
private _dx = _delta select 0;
|
||||||
|
private _dy = _delta select 1;
|
||||||
|
private _dz = _delta select 2;
|
||||||
|
private _horizontalDistance = sqrt ((_dx * _dx) + (_dy * _dy));
|
||||||
|
private _slantDistance = (_originASL vectorDistance _targetASL) max 1;
|
||||||
|
private _azimuth = (((_dx atan2 _dy) + 360) mod 360);
|
||||||
|
private _elevation = _dz atan2 (_horizontalDistance max 0.001);
|
||||||
|
private _lastTargetASL = player getVariable [QGVAR(lrfLastTargetASL), []];
|
||||||
|
private _lastSentAt = player getVariable [QGVAR(lrfLastSentAt), -1000];
|
||||||
|
private _targetMoved = _lastTargetASL isEqualTo [] || {(_lastTargetASL vectorDistance _targetASL) > 5};
|
||||||
|
private _sendCooldownElapsed = (time - _lastSentAt) >= 2.5;
|
||||||
|
|
||||||
|
player setVariable [QGVAR(lrfWasActive), true];
|
||||||
|
player setVariable [QGVAR(lrfLostAt), -1];
|
||||||
|
player setVariable [QGVAR(lrfClearSent), false];
|
||||||
|
|
||||||
|
if (_lrfEnabled && {_targetMoved} && {_sendCooldownElapsed}) then {
|
||||||
|
"armatak" callExtension ["udp_socket:send_lrf", [[_uid, _slantDistance, _azimuth, _elevation]]];
|
||||||
|
player setVariable [QGVAR(lrfLastTargetASL), _targetASL];
|
||||||
|
player setVariable [QGVAR(lrfLastSentAt), time];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if !(player getVariable [QGVAR(lrfWasActive), false]) exitWith {};
|
||||||
|
|
||||||
|
private _lostAt = player getVariable [QGVAR(lrfLostAt), -1];
|
||||||
|
if (_lostAt < 0) then {
|
||||||
|
player setVariable [QGVAR(lrfLostAt), time];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _clearSent = player getVariable [QGVAR(lrfClearSent), false];
|
||||||
|
if (_lrfEnabled && {!_clearSent} && {(time - (player getVariable [QGVAR(lrfLostAt), time])) >= 6}) then {
|
||||||
|
"armatak" callExtension ["udp_socket:clear_lrf", [_uid]];
|
||||||
|
player setVariable [QGVAR(lrfWasActive), false];
|
||||||
|
player setVariable [QGVAR(lrfClearSent), true];
|
||||||
|
player setVariable [QGVAR(lrfLastTargetASL), []];
|
||||||
|
player setVariable [QGVAR(lrfLastSentAt), -1000];
|
||||||
|
};
|
||||||
65
addons/client/functions/fnc_startUDPSocket.sqf
Normal file
65
addons/client/functions/fnc_startUDPSocket.sqf
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
params ["_logic"];
|
||||||
|
|
||||||
|
private _socket_is_running = player getVariable [QGVAR(eudConnected), false];
|
||||||
|
|
||||||
|
if (_socket_is_running) exitWith {
|
||||||
|
["Socket is already running", "error", "UDP Socket"] call EFUNC(main,notify);
|
||||||
|
closeDialog 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
disableSerialization;
|
||||||
|
|
||||||
|
private _eud_address = ctrlText 16961;
|
||||||
|
private _gnss_port = ctrlText 16962;
|
||||||
|
private _mavlink_port = ctrlText 16967;
|
||||||
|
private _lrf_port = ctrlText 16971;
|
||||||
|
private _video_feed_url = ctrlText 16969;
|
||||||
|
|
||||||
|
private _udp_socket_fulladdress = _eud_address + ":" + _gnss_port;
|
||||||
|
private _mavlink_address = _eud_address + ":" + _mavlink_port;
|
||||||
|
private _lrf_port_trimmed = trim _lrf_port;
|
||||||
|
private _lrf_enabled = _lrf_port_trimmed isNotEqualTo "";
|
||||||
|
private _lrf_address = _eud_address + ":" + _lrf_port_trimmed;
|
||||||
|
|
||||||
|
player setVariable [QGVAR(udp_socket_address), _udp_socket_fulladdress];
|
||||||
|
player setVariable [QGVAR(mavlink_address), _mavlink_address];
|
||||||
|
player setVariable [QGVAR(lrf_address), _lrf_address];
|
||||||
|
player setVariable [QGVAR(lrfEnabled), _lrf_enabled];
|
||||||
|
player setVariable [QGVAR(lrfWasActive), false];
|
||||||
|
player setVariable [QGVAR(lrfLostAt), -1];
|
||||||
|
player setVariable [QGVAR(lrfClearSent), false];
|
||||||
|
player setVariable [QGVAR(lrfLastTargetASL), []];
|
||||||
|
player setVariable [QGVAR(lrfLastSentAt), -1000];
|
||||||
|
player setVariable [QGVAR(video_feed_url), trim _video_feed_url];
|
||||||
|
player setVariable [QGVAR(eudConnected), true, true];
|
||||||
|
|
||||||
|
private _advertised_video_uri = [objNull] call EFUNC(uav,resolveVideoUri);
|
||||||
|
|
||||||
|
"armatak" callExtension ["udp_socket:start", [_udp_socket_fulladdress]];
|
||||||
|
"armatak" callExtension ["uas:start_endpoint", [parseNumber _mavlink_port]];
|
||||||
|
if (_lrf_enabled) then {
|
||||||
|
"armatak" callExtension ["udp_socket:start_lrf", [_lrf_address]];
|
||||||
|
};
|
||||||
|
|
||||||
|
private _mdnsInstanceName = format ["ArmaTAK-%1", name player];
|
||||||
|
"armatak" callExtension ["mdns:start_uas_advertisement", [_mdnsInstanceName, parseNumber _mavlink_port, _advertised_video_uri]];
|
||||||
|
"armatak" callExtension ["log", [["info", format ["Client UDP socket started for %1, MAVLink target set to %2, LRF target set to %3 and advertised video URI set to %4. Digital pointer uses ATAK LRF when enabled.", _udp_socket_fulladdress, _mavlink_address, _lrf_address, _advertised_video_uri]]]];
|
||||||
|
|
||||||
|
call EFUNC(uav,startMavlinkBroadcast);
|
||||||
|
|
||||||
|
[{
|
||||||
|
if !(player getVariable [QGVAR(eudConnected), false]) exitWith {};
|
||||||
|
|
||||||
|
"armatak" callExtension ["udp_socket:send_gps_cot", [player call FUNC(extractClientPosition)]];
|
||||||
|
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
[{
|
||||||
|
if !(player getVariable [QGVAR(eudConnected), false]) exitWith {};
|
||||||
|
|
||||||
|
[player] call FUNC(sendLaserRangeFinder);
|
||||||
|
}, 0.25, []] call CBA_fnc_addPerFrameHandler;
|
||||||
|
|
||||||
|
deleteVehicle _logic;
|
||||||
|
closeDialog 1;
|
||||||
17
addons/client/script_component.hpp
Normal file
17
addons/client/script_component.hpp
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#define COMPONENT client
|
||||||
|
#define COMPONENT_BEAUTIFIED WebSocket Client
|
||||||
|
#include "\armatak\armatak\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
// #define DEBUG_MODE_FULL
|
||||||
|
// #define DISABLE_COMPILE_CACHE
|
||||||
|
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_CLIENT
|
||||||
|
#define DEBUG_MODE_FULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_SETTINGS_CLIENT
|
||||||
|
#define DEBUG_SETTINGS DEBUG_SETTINGS_CLIENT
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
||||||
@@ -1 +1 @@
|
|||||||
armatak\armatak\armatak_main
|
armatak\armatak\addons\main
|
||||||
170
addons/main/Cfg3den.hpp
Normal file
170
addons/main/Cfg3den.hpp
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
class Cfg3den {
|
||||||
|
class Object {
|
||||||
|
class AttributeCategories {
|
||||||
|
class armatak_3den_attributes {
|
||||||
|
displayName = "ARMA Team Awareness Kit";
|
||||||
|
class Attributes {
|
||||||
|
class armatak_attribute_unit_callsign {
|
||||||
|
displayName = "Unit Callsign";
|
||||||
|
tooltip = "Unit callsign on TAK";
|
||||||
|
property = "armatak_attribute_unit_callsign";
|
||||||
|
control = "Edit";
|
||||||
|
expression = "_this setVariable ['armatak_attribute_unit_callsign',_value]";
|
||||||
|
defaultValue = "''";
|
||||||
|
condition = "objectBrain";
|
||||||
|
typeName = "STRING";
|
||||||
|
};
|
||||||
|
class armatak_attribute_unit_role {
|
||||||
|
displayName = "Unit Role";
|
||||||
|
tooltip = "Unit role on TAK";
|
||||||
|
property = "armatak_attribute_unit_role";
|
||||||
|
control = "Combo";
|
||||||
|
class Values {
|
||||||
|
class armatak_attribute_unit_role_value_teammember {
|
||||||
|
name = "Team Member";
|
||||||
|
value = "Team Member";
|
||||||
|
default = 1;
|
||||||
|
};
|
||||||
|
class armatak_attribute_unit_role_value_teamleader {
|
||||||
|
name = "Team Leader";
|
||||||
|
value = "Team Lead";
|
||||||
|
};
|
||||||
|
class armatak_attribute_unit_role_value_hq {
|
||||||
|
name = "Headquarters";
|
||||||
|
value = "HQ";
|
||||||
|
};
|
||||||
|
class armatak_attribute_unit_role_value_sniper {
|
||||||
|
name = "Sniper";
|
||||||
|
value = "Sniper";
|
||||||
|
};
|
||||||
|
class armatak_attribute_unit_role_value_medic {
|
||||||
|
name = "Medic";
|
||||||
|
value = "Medic";
|
||||||
|
};
|
||||||
|
class armatak_attribute_unit_role_value_forward_observer {
|
||||||
|
name = "Forward Observer";
|
||||||
|
value = "Forward Observer";
|
||||||
|
};
|
||||||
|
class armatak_attribute_unit_role_value_rto {
|
||||||
|
name = "Radio Telephone Operator";
|
||||||
|
value = "RTO";
|
||||||
|
};
|
||||||
|
class armatak_attribute_unit_role_value_k9 {
|
||||||
|
name = "K9 Operator";
|
||||||
|
value = "K9";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
expression = "_this setVariable ['%s',_value];";
|
||||||
|
unique = 0;
|
||||||
|
condition = "objectBrain";
|
||||||
|
};
|
||||||
|
class armatak_attribute_marker_callsign {
|
||||||
|
displayName = "Marker Callsign";
|
||||||
|
tooltip = "Marker Callsign on TAK";
|
||||||
|
property = "armatak_attribute_marker_callsign";
|
||||||
|
control = "Edit";
|
||||||
|
expression = "_this setVariable ['armatak_attribute_marker_callsign',_value]";
|
||||||
|
defaultValue = "''";
|
||||||
|
condition = "objectVehicle";
|
||||||
|
typeName = "STRING";
|
||||||
|
};
|
||||||
|
class armatak_attribute_marker_type {
|
||||||
|
displayName = "Marker Type";
|
||||||
|
tooltip = "Marker type on TAK";
|
||||||
|
property = "armatak_attribute_marker_type";
|
||||||
|
control = "Edit";
|
||||||
|
expression = "_this setVariable ['armatak_attribute_marker_type',_value]";
|
||||||
|
defaultValue = "''";
|
||||||
|
condition = "objectVehicle";
|
||||||
|
typeName = "STRING";
|
||||||
|
};
|
||||||
|
class armatak_attribute_marker_video_url {
|
||||||
|
displayName = "Video Feed URL";
|
||||||
|
tooltip = "Shared UAV video URL. This per-vehicle value overrides the optional session video URL from Connect to EUD.";
|
||||||
|
property = "armatak_attribute_marker_video_url";
|
||||||
|
control = "Edit";
|
||||||
|
expression = "_this setVariable ['armatak_attribute_marker_video_url',_value]";
|
||||||
|
defaultValue = "''";
|
||||||
|
condition = "objectVehicle";
|
||||||
|
typeName = "STRING";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Group {
|
||||||
|
class AttributeCategories {
|
||||||
|
class armatak_3den_group_attributes {
|
||||||
|
displayName = "ARMA Team Awareness Kit";
|
||||||
|
class Attributes {
|
||||||
|
class armatak_attribute_group_color {
|
||||||
|
displayName = "Color";
|
||||||
|
tooltip = "Group on TAK";
|
||||||
|
property = "armatak_attribute_group_color";
|
||||||
|
control = "Combo";
|
||||||
|
class Values {
|
||||||
|
class armatak_attribute_group_color_value_white {
|
||||||
|
name = "White";
|
||||||
|
value = "White";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_yellow {
|
||||||
|
name = "Yellow";
|
||||||
|
value = "Yellow";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_orange {
|
||||||
|
name = "Orange";
|
||||||
|
value = "Orange";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_magenta {
|
||||||
|
name = "Magenta";
|
||||||
|
value = "Magenta";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_red {
|
||||||
|
name = "Red";
|
||||||
|
value = "Red";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_maroon {
|
||||||
|
name = "Maroon";
|
||||||
|
value = "Maroon";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_purple {
|
||||||
|
name = "Purple";
|
||||||
|
value = "Purple";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_darkblue {
|
||||||
|
name = "Dark Blue";
|
||||||
|
value = "DarkBlue";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_blue {
|
||||||
|
name = "Blue";
|
||||||
|
value = "Blue";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_cyan {
|
||||||
|
name = "Cyan";
|
||||||
|
value = "Cyan";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_teal {
|
||||||
|
name = "Teal";
|
||||||
|
value = "Teal";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_green {
|
||||||
|
name = "Green";
|
||||||
|
value = "Green";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_darkgreen {
|
||||||
|
name = "Dark Green";
|
||||||
|
value = "DarkGreen";
|
||||||
|
};
|
||||||
|
class armatak_attribute_group_color_value_brown {
|
||||||
|
name = "Brown";
|
||||||
|
value = "Brown";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
expression = "_this setVariable ['%s',_value];";
|
||||||
|
unique = 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
17
addons/main/CfgEventHandlers.hpp
Normal file
17
addons/main/CfgEventHandlers.hpp
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
class Extended_PreStart_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_PreInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_PostInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_SCRIPT(XEH_postInit));
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -1,99 +1,174 @@
|
|||||||
class CfgFunctions {
|
class CfgFunctions {
|
||||||
class armatak {
|
class armatak {
|
||||||
class functions {
|
class functions {
|
||||||
class init {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\fn_init.sqf";
|
|
||||||
};
|
|
||||||
class video_init {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\fn_video_init.sqf";
|
|
||||||
};
|
|
||||||
class log_message {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\fn_log_message.sqf";
|
|
||||||
};
|
|
||||||
class send_digital_pointer_cot {
|
class send_digital_pointer_cot {
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_send_digital_pointer_cot.sqf";
|
file = "\armatak\armatak\addons\main\functions\api\fn_send_digital_pointer_cot.sqf";
|
||||||
};
|
};
|
||||||
class send_drone_cot {
|
class send_drone_cot {
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_send_drone_cot.sqf";
|
file = "\armatak\armatak\addons\main\functions\api\fn_send_drone_cot.sqf";
|
||||||
};
|
};
|
||||||
class send_group_cots {
|
class send_group_cots {
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_send_group_cots.sqf";
|
file = "\armatak\armatak\addons\main\functions\api\fn_send_group_cots.sqf";
|
||||||
};
|
};
|
||||||
class send_human_cot {
|
class send_enemy_cot {
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_send_human_cot.sqf";
|
file = "\armatak\armatak\addons\main\functions\api\fn_send_enemy_cot.sqf";
|
||||||
|
};
|
||||||
|
class send_eud_cot {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_send_eud_cot.sqf";
|
||||||
};
|
};
|
||||||
class send_marker_cot {
|
class send_marker_cot {
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_send_marker_cot.sqf";
|
file = "\armatak\armatak\addons\main\functions\api\fn_send_marker_cot.sqf";
|
||||||
};
|
};
|
||||||
class send_message_cot {
|
class report_marker {
|
||||||
file = "\armatak\armatak\armatak_main\functions\api\fn_send_marker_cot.sqf";
|
file = "\armatak\armatak\addons\main\functions\api\fn_report_marker.sqf";
|
||||||
};
|
};
|
||||||
class extract_callsign {
|
class register_cot {
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_callsign.sqf";
|
file = "\armatak\armatak\addons\main\functions\api\fn_register_cot.sqf";
|
||||||
|
};
|
||||||
|
class delete_registered_cots {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_delete_registered_cots.sqf";
|
||||||
|
};
|
||||||
|
class draw_circle {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_draw_circle.sqf";
|
||||||
|
};
|
||||||
|
class draw_ellipse {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_draw_ellipse.sqf";
|
||||||
|
};
|
||||||
|
class draw_rectangle {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_draw_rectangle.sqf";
|
||||||
|
};
|
||||||
|
class draw_polyline {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_draw_polyline.sqf";
|
||||||
|
};
|
||||||
|
class draw_route {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_draw_route.sqf";
|
||||||
|
};
|
||||||
|
class draw_tactical_graphic {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_draw_tactical_graphic.sqf";
|
||||||
|
};
|
||||||
|
class send_uas_platform_cot {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_send_uas_platform_cot.sqf";
|
||||||
|
};
|
||||||
|
class send_uas_video_cot {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_send_uas_video_cot.sqf";
|
||||||
|
};
|
||||||
|
class send_uas_sensor_cot {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_send_uas_sensor_cot.sqf";
|
||||||
|
};
|
||||||
|
class set_uas_camera_override {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_set_uas_camera_override.sqf";
|
||||||
|
};
|
||||||
|
class stop_tcp_socket {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\api\fn_stop_tcp_socket.sqf";
|
||||||
};
|
};
|
||||||
class extract_group_color {
|
class extract_group_color {
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_group_color.sqf";
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_group_color.sqf";
|
||||||
};
|
};
|
||||||
class extract_group_role {
|
class extract_group_role {
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_group_role.sqf";
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_group_role.sqf";
|
||||||
|
};
|
||||||
|
class extract_marker_callsign {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_marker_callsign.sqf";
|
||||||
|
};
|
||||||
|
class extract_marker_video_url {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_marker_video_url.sqf";
|
||||||
};
|
};
|
||||||
class extract_role {
|
class extract_role {
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_role.sqf";
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_role.sqf";
|
||||||
};
|
};
|
||||||
class extract_position {
|
class extract_sensor_data {
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_position.sqf";
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_sensor_data.sqf";
|
||||||
|
};
|
||||||
|
class extract_uas_camera_data {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_uas_camera_data.sqf";
|
||||||
|
};
|
||||||
|
class extract_unit_callsign {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_unit_callsign.sqf";
|
||||||
};
|
};
|
||||||
class extract_uuid {
|
class extract_uuid {
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_extract_uuid.sqf";
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_uuid.sqf";
|
||||||
};
|
};
|
||||||
class shorten_name {
|
class shorten_name {
|
||||||
file = "\armatak\armatak\armatak_main\functions\extract_data\fn_shorten_name.sqf";
|
file = "\armatak\armatak\addons\main\functions\extract_data\fn_shorten_name.sqf";
|
||||||
};
|
};
|
||||||
|
|
||||||
class convert_location {
|
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_location.sqf";
|
|
||||||
};
|
|
||||||
class convert_to_altis {
|
class convert_to_altis {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_altis.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_altis.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_bukovina {
|
class convert_to_bukovina {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_bukovina.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_bukovina.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_bystrika {
|
class convert_to_bystrika {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_bystrika.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_bystrika.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_chernarus {
|
class convert_to_chernarus {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_chernarus.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_chernarus.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_cucui {
|
class convert_to_cucui {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_cucui.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_cucui.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_kunduz {
|
class convert_to_kunduz {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_kunduz.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_kunduz.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_kunduz_valley {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_kunduz_valley.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_lawn {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_lawn.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_livonia {
|
class convert_to_livonia {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_livonia.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_livonia.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_malden {
|
class convert_to_malden {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_malden.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malden.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_malvinas_malvinasfalkands {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_malvinasfalkands.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_malvinas_p_argentino_stanley {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_p_argentino_stanley.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_malvinas_pebble_island_airfield {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_pebble_island_airfield.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_malvinas_pradera_ganso {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_pradera_ganso.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_malvinas_top_malo_house {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_top_malo_house.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_southen_sahrani {
|
class convert_to_southen_sahrani {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_southen_sahrani.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_southen_sahrani.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_stratis {
|
class convert_to_stratis {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_stratis.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_stratis.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_takistan_montains {
|
class convert_to_takistan_montains {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_takistan_montains.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_takistan_montains.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_tanoa {
|
class convert_to_tanoa {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_tanoa.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_tanoa.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_united_sahrani {
|
class convert_to_united_sahrani {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_united_sahrani.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_united_sahrani.sqf";
|
||||||
};
|
};
|
||||||
class convert_to_vr {
|
class convert_to_vr {
|
||||||
file = "\armatak\armatak\armatak_main\functions\map\fn_convert_to_vr.sqf";
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_vr.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_zagor_zagorsk_reserved_forest {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_zagor_zagorsk_reserved_forest.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_colombia {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_colombia.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_clafghan {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_clafghan.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_rut_mandol {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_rut_mandol.sqf";
|
||||||
|
};
|
||||||
|
class convert_to_hellanmaa {
|
||||||
|
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_hellanmaa.sqf";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,172 +0,0 @@
|
|||||||
class CfgFactionClasses {
|
|
||||||
class NO_CATEGORY;
|
|
||||||
class armatak_module_category: NO_CATEGORY {
|
|
||||||
displayName = "Team Awareness Kit";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
class CfgVehicles {
|
|
||||||
class Logic;
|
|
||||||
class Module_F : Logic
|
|
||||||
{
|
|
||||||
class AttributesBase
|
|
||||||
{
|
|
||||||
class Default;
|
|
||||||
class Edit; // Default edit box (i.e. text input field)
|
|
||||||
class Combo; // Default combo box (i.e. drop-down menu)
|
|
||||||
class Checkbox; // Default checkbox (returned value is Boolean)
|
|
||||||
class CheckboxNumber; // Default checkbox (returned value is Number)
|
|
||||||
class ModuleDescription; // Module description
|
|
||||||
class Units; // Selection of units on which the module is applied
|
|
||||||
};
|
|
||||||
|
|
||||||
class ModuleDescription
|
|
||||||
{
|
|
||||||
class AnyBrain;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class armatak_module_core: Module_F {
|
|
||||||
scope = 2;
|
|
||||||
displayname = "ARMATAK CoT Router";
|
|
||||||
icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa";
|
|
||||||
category = "armatak_module_category";
|
|
||||||
function = "armatak_fnc_init";
|
|
||||||
functionPriority = 1;
|
|
||||||
isGlobal = 0;
|
|
||||||
isTriggerActivated = 0;
|
|
||||||
isDisposable = 1;
|
|
||||||
is3den = 0;
|
|
||||||
curatorCanAttach = 0;
|
|
||||||
curatorInfoType = "RscDisplayAttributeModuleNuke";
|
|
||||||
|
|
||||||
canSetArea = 0;
|
|
||||||
canSetAreaShape = 0;
|
|
||||||
canSetAreaHeight = 0;
|
|
||||||
|
|
||||||
class AttributesValues {
|
|
||||||
size3[] = { 1, 1, -1 };
|
|
||||||
isRectangle = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Attributes: AttributesBase {
|
|
||||||
class armatak_module_tak_server_instance_address: Edit {
|
|
||||||
property = "armatak_module_tak_server_instance_address";
|
|
||||||
displayname = "TAK Server Address";
|
|
||||||
tooltip = "TAK Server Instance Address";
|
|
||||||
typeName = "STRING";
|
|
||||||
defaultValue = "localhost";
|
|
||||||
};
|
|
||||||
class armatak_module_tak_server_instance_port: Edit {
|
|
||||||
property = "armatak_module_tak_server_instance_port";
|
|
||||||
displayname = "TAK Server TCP Port";
|
|
||||||
tooltip = "TAK Server instance Port for TCP connection";
|
|
||||||
typeName = "NUMBER";
|
|
||||||
defaultValue = "8088";
|
|
||||||
};
|
|
||||||
class ModuleDescription: ModuleDescription {};
|
|
||||||
};
|
|
||||||
|
|
||||||
class ModuleDescription: ModuleDescription {
|
|
||||||
description = "Generate the initial ARMATAK configuration, syncronizing all players to the TAK server instance";
|
|
||||||
sync[] = {"LocationArea_F"};
|
|
||||||
|
|
||||||
class LocationArea_F {
|
|
||||||
description[] = {
|
|
||||||
"First line",
|
|
||||||
"Second line"
|
|
||||||
};
|
|
||||||
position = 1;
|
|
||||||
direction = 1;
|
|
||||||
optional = 1;
|
|
||||||
duplicate = 1;
|
|
||||||
synced[] = { "BluforUnit", "AnyBrain" };
|
|
||||||
};
|
|
||||||
class BluforUnit
|
|
||||||
{
|
|
||||||
description = "Short description";
|
|
||||||
displayName = "Any BLUFOR unit";
|
|
||||||
icon = "iconMan";
|
|
||||||
side = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
class armatak_module_video_stream_core: armatak_module_core {
|
|
||||||
scope = 2;
|
|
||||||
displayname = "ARMATAK MediaMTX Video Feed Parser";
|
|
||||||
icon = "\a3\Modules_F_Curator\Data\iconcuratorsetcamera_ca.paa";
|
|
||||||
category = "armatak_module_category";
|
|
||||||
function = "armatak_fnc_video_init";
|
|
||||||
functionPriority = 1;
|
|
||||||
isGlobal = 0;
|
|
||||||
isTriggerActivated = 0;
|
|
||||||
isDisposable = 1;
|
|
||||||
is3den = 0;
|
|
||||||
curatorCanAttach = 0;
|
|
||||||
curatorInfoType = "RscDisplayAttributeModuleNuke";
|
|
||||||
|
|
||||||
canSetArea = 0;
|
|
||||||
canSetAreaShape = 0;
|
|
||||||
canSetAreaHeight = 0;
|
|
||||||
|
|
||||||
class AttributesValues {
|
|
||||||
size3[] = { 1, 1, -1 };
|
|
||||||
isRectangle = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
class Attributes: AttributesBase {
|
|
||||||
class armatak_module_mediamtx_video_stream_instance_address: Edit {
|
|
||||||
property = "armatak_module_mediamtx_video_stream_instance_address";
|
|
||||||
displayname = "MediaMTX Provider Address";
|
|
||||||
tooltip = "MediaMTX Provider Instance Address";
|
|
||||||
typeName = "STRING";
|
|
||||||
defaultValue = "localhost";
|
|
||||||
};
|
|
||||||
class armatak_module_mediamtx_video_stream_instance_port: Edit {
|
|
||||||
property = "armatak_module_mediamtx_video_stream_instance_port";
|
|
||||||
displayname = "MediaMTX Provider Port";
|
|
||||||
tooltip = "MediaMTX Provider Port for handling video streams";
|
|
||||||
typeName = "STRING";
|
|
||||||
defaultValue = "8554";
|
|
||||||
};
|
|
||||||
class armatak_module_mediamtx_video_stream_instance_auth_user: Edit {
|
|
||||||
property = "armatak_module_mediamtx_video_stream_instance_auth_user";
|
|
||||||
displayname = "MediaMTX Provider Username";
|
|
||||||
tooltip = "MediaMTX Provider Instance Username";
|
|
||||||
typeName = "STRING";
|
|
||||||
defaultValue = "administrator";
|
|
||||||
};
|
|
||||||
class armatak_module_mediamtx_video_stream_instance_auth_pass: Edit {
|
|
||||||
property = "armatak_module_mediamtx_video_stream_instance_auth_pass";
|
|
||||||
displayname = "MediaMTX Provider Password";
|
|
||||||
tooltip = "MediaMTX Provider Instance Password";
|
|
||||||
typeName = "STRING";
|
|
||||||
defaultValue = "password";
|
|
||||||
};
|
|
||||||
class ModuleDescription: ModuleDescription {};
|
|
||||||
};
|
|
||||||
|
|
||||||
class ModuleDescription: ModuleDescription {
|
|
||||||
description = "Generate the initial ARMATAK configuration, syncronizing all players to the TAK server instance";
|
|
||||||
sync[] = {"LocationArea_F"};
|
|
||||||
|
|
||||||
class LocationArea_F {
|
|
||||||
description[] = {
|
|
||||||
"First line",
|
|
||||||
"Second line"
|
|
||||||
};
|
|
||||||
position = 1;
|
|
||||||
direction = 1;
|
|
||||||
optional = 1;
|
|
||||||
duplicate = 1;
|
|
||||||
synced[] = { "BluforUnit", "AnyBrain" };
|
|
||||||
};
|
|
||||||
class BluforUnit
|
|
||||||
{
|
|
||||||
description = "Short description";
|
|
||||||
displayName = "Any BLUFOR unit";
|
|
||||||
icon = "iconMan";
|
|
||||||
side = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
2
addons/main/XEH_PREP.hpp
Normal file
2
addons/main/XEH_PREP.hpp
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
PREP(logMessage);
|
||||||
|
PREP(notify);
|
||||||
115
addons/main/XEH_postInit.sqf
Normal file
115
addons/main/XEH_postInit.sqf
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
addMissionEventHandler ["ExtensionCallback", {
|
||||||
|
params ["_name", "_function", "_data"];
|
||||||
|
|
||||||
|
switch (_name) do {
|
||||||
|
case "UDP SOCKET": {
|
||||||
|
[_function, "success", _name] call FUNC(notify);
|
||||||
|
|
||||||
|
switch (_function) do {
|
||||||
|
case "EUD Connected": {
|
||||||
|
player setVariable [QEGVAR(client,eudConnected), true, true];
|
||||||
|
};
|
||||||
|
case "EUD Disconnected": {
|
||||||
|
player setVariable [QEGVAR(client,eudConnected), false, true];
|
||||||
|
SETVAR(player,EGVAR(client,lrfEnabled),false);
|
||||||
|
call EFUNC(uav,stopMavlinkBroadcast);
|
||||||
|
"armatak" callExtension ["uas:stop_endpoint", []];
|
||||||
|
"armatak" callExtension ["mdns:stop", []];
|
||||||
|
};
|
||||||
|
default {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
case "UDP SOCKET WARNING": {
|
||||||
|
[_function, "warning", "UDP Socket"] call FUNC(notify);
|
||||||
|
};
|
||||||
|
case "UDP SOCKET ERROR": {
|
||||||
|
[_function, "error", _name] call FUNC(notify);
|
||||||
|
|
||||||
|
if (_function == "UDP Socket is not running") then {
|
||||||
|
player setVariable [QEGVAR(client,eudConnected), false, true];
|
||||||
|
SETVAR(player,EGVAR(client,lrfEnabled),false);
|
||||||
|
call EFUNC(uav,stopMavlinkBroadcast);
|
||||||
|
"armatak" callExtension ["uas:stop_endpoint", []];
|
||||||
|
"armatak" callExtension ["mdns:stop", []];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_function == "failed to bind UDP socket") then {
|
||||||
|
player setVariable [QEGVAR(client,eudConnected), false, true];
|
||||||
|
SETVAR(player,EGVAR(client,lrfEnabled),false);
|
||||||
|
call EFUNC(uav,stopMavlinkBroadcast);
|
||||||
|
"armatak" callExtension ["uas:stop_endpoint", []];
|
||||||
|
"armatak" callExtension ["mdns:stop", []];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
case "MAVLINK UDP ERROR": {
|
||||||
|
_message = _function;
|
||||||
|
if (_data isNotEqualTo "") then {
|
||||||
|
_message = format ["%1: %2", _function, _data];
|
||||||
|
};
|
||||||
|
|
||||||
|
[_message, "warning", _name] call FUNC(notify);
|
||||||
|
};
|
||||||
|
case "MAVLINK UDP": {
|
||||||
|
private _history = missionNamespace getVariable ["armatak_uav_mavlink_callback_history", []];
|
||||||
|
_history pushBack [diag_tickTime, _function, _data];
|
||||||
|
if ((count _history) > 50) then {
|
||||||
|
_history deleteRange [0, (count _history) - 50];
|
||||||
|
};
|
||||||
|
missionNamespace setVariable ["armatak_uav_mavlink_callback_history", _history];
|
||||||
|
missionNamespace setVariable ["armatak_uav_last_mavlink_callback", [diag_tickTime, _function, _data]];
|
||||||
|
|
||||||
|
switch (_function) do {
|
||||||
|
case "COMMAND_LONG";
|
||||||
|
case "COMMAND_INT";
|
||||||
|
case "COMMAND_ACK";
|
||||||
|
case "MISSION_COUNT";
|
||||||
|
case "MISSION_ITEM";
|
||||||
|
case "MISSION_ITEM_INT";
|
||||||
|
case "MISSION_CLEAR_ALL";
|
||||||
|
case "MISSION_SET_CURRENT";
|
||||||
|
case "SET_HOME_POSITION";
|
||||||
|
case "SET_MODE";
|
||||||
|
case "SET_POSITION_TARGET_GLOBAL_INT";
|
||||||
|
case "MANUAL_CONTROL": {
|
||||||
|
"armatak" callExtension ["log", [["info", format ["MAVLINK UDP CALLBACK %1 %2", _function, _data]]]];
|
||||||
|
[_function, _data] call EFUNC(uav,handleMavlinkCallback);
|
||||||
|
};
|
||||||
|
default {};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
case "TCP SOCKET": {
|
||||||
|
[_function, "success", _name] call FUNC(notify);
|
||||||
|
};
|
||||||
|
case "TCP SOCKET ERROR": {
|
||||||
|
_message = _function;
|
||||||
|
if (_data isNotEqualTo "") then {
|
||||||
|
_message = format ["%1: %2", _function, _data];
|
||||||
|
};
|
||||||
|
|
||||||
|
[_message, "error", _name] call FUNC(notify);
|
||||||
|
};
|
||||||
|
case "VIDEO": {
|
||||||
|
[_function, "success", _name] call FUNC(notify);
|
||||||
|
};
|
||||||
|
case "MDNS": {
|
||||||
|
[_function, "success", _name] call FUNC(notify);
|
||||||
|
};
|
||||||
|
case "MDNS ERROR": {
|
||||||
|
[_function, "warning", _name] call FUNC(notify);
|
||||||
|
};
|
||||||
|
case "VIDEO ERROR": {
|
||||||
|
[_function, "error", _name] call FUNC(notify);
|
||||||
|
|
||||||
|
SETVAR(player,EGVAR(video,isStreaming),false);
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
"armatak" callExtension ["log",["error", (_name + _function + _data)]];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}];
|
||||||
|
|
||||||
|
GVAR(group_colors) = ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"];
|
||||||
|
|
||||||
|
missionNamespace setVariable [QGVAR(group_colors), GVAR(group_colors)];
|
||||||
9
addons/main/XEH_preInit.sqf
Normal file
9
addons/main/XEH_preInit.sqf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP_RECOMPILE_START;
|
||||||
|
#include "XEH_PREP.hpp"
|
||||||
|
PREP_RECOMPILE_END;
|
||||||
|
|
||||||
|
ADDON = true;
|
||||||
3
addons/main/XEH_preStart.sqf
Normal file
3
addons/main/XEH_preStart.sqf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#include "XEH_PREP.hpp"
|
||||||
@@ -1,26 +1,46 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
class CfgPatches {
|
class CfgPatches {
|
||||||
class armatak_main {
|
class ADDON {
|
||||||
units[] = {
|
name = COMPONENT_NAME;
|
||||||
"armatak_module_core",
|
units[] = {};
|
||||||
"armatak_module_callsign"
|
weapons[] = {};
|
||||||
};
|
requiredAddons[] = {
|
||||||
weapons[] = {""};
|
|
||||||
author = "Valmo";
|
|
||||||
url = "https://github.com/valmojr/armatak";
|
|
||||||
requiredAddons[] =
|
|
||||||
{
|
|
||||||
"cba_main",
|
"cba_main",
|
||||||
"ace_main"
|
"ace_main"
|
||||||
};
|
};
|
||||||
requiredVersion = 2.06;
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
author = PROJECT_AUTHOR;
|
||||||
|
url = "https://github.com/valmojr/armatak";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Extended_PostInit_EventHandlers {
|
class CfgMods {
|
||||||
class armatak_main {
|
class PREFIX {
|
||||||
init = "call compileScript ['\armatak\armatak\armatak_main\initPlayerLocal.sqf']";
|
name = "Arma Team Awareness Kit";
|
||||||
|
author = PROJECT_AUTHOR;
|
||||||
|
logo = "logo_ca.paa";
|
||||||
|
logoOver = "logo_hover_ca.paa";
|
||||||
|
tooltip = "ARMATAK";
|
||||||
|
tooltipOwned = "ARMATAK";
|
||||||
|
picture = "picture.paa";
|
||||||
|
actionName = "GitHub";
|
||||||
|
action = "https://github.com/valmojr/armatak";
|
||||||
|
overview = "ARMATAK Addons allows Arma 3 sessions to be parsed to TAK Clients";
|
||||||
|
hideName = 0;
|
||||||
|
hidePicture = 0;
|
||||||
|
dlcColor[] = { 0.23, 0.39, 0.30, 1 };
|
||||||
|
logoSmall = "logo_small_ca.paa";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CfgFactionClasses {
|
||||||
|
class NO_CATEGORY;
|
||||||
|
class GVAR(moduleCategory): NO_CATEGORY {
|
||||||
|
displayName = "Team Awareness Kit";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgEventHandlers.hpp"
|
||||||
#include "CfgFunctions.hpp"
|
#include "CfgFunctions.hpp"
|
||||||
#include "CfgVehicles.hpp"
|
#include "Cfg3den.hpp"
|
||||||
|
|||||||
36
addons/main/functions/api/fn_delete_registered_cots.sqf
Normal file
36
addons/main/functions/api/fn_delete_registered_cots.sqf
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
// function name: armatak_fnc_delete_registered_cots
|
||||||
|
// function author: Valmo, Codex
|
||||||
|
// function description: Sends forced delete CoTs for all registered CoTs in a scope.
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
// 0: Scope/key used to group CoTs <STRING>
|
||||||
|
//
|
||||||
|
// Return Value:
|
||||||
|
// Number of delete CoTs sent <NUMBER>
|
||||||
|
//
|
||||||
|
// Public: Yes
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_scope", "", [""]]
|
||||||
|
];
|
||||||
|
|
||||||
|
if (_scope isEqualTo "") exitWith {0};
|
||||||
|
|
||||||
|
private _registry = missionNamespace getVariable ["armatak_registered_cots", []];
|
||||||
|
private _remaining = [];
|
||||||
|
private _deleted = 0;
|
||||||
|
|
||||||
|
{
|
||||||
|
_x params ["_registeredScope", "_uid", "_type", "_lat", "_lon", "_hae"];
|
||||||
|
|
||||||
|
if (_registeredScope isEqualTo _scope) then {
|
||||||
|
"armatak" callExtension ["tcp_socket:cot:delete", [[_uid, _type, _lat, _lon, _hae]]];
|
||||||
|
_deleted = _deleted + 1;
|
||||||
|
} else {
|
||||||
|
_remaining pushBack _x;
|
||||||
|
};
|
||||||
|
} forEach _registry;
|
||||||
|
|
||||||
|
missionNamespace setVariable ["armatak_registered_cots", _remaining];
|
||||||
|
|
||||||
|
_deleted
|
||||||
44
addons/main/functions/api/fn_draw_circle.sqf
Normal file
44
addons/main/functions/api/fn_draw_circle.sqf
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
// function name: armatak_fnc_draw_circle
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Sends an ATAK Drawing Tools circle CoT.
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
// 0: Center position or object <ARRAY|OBJECT>
|
||||||
|
// 1: Radius in meters <NUMBER>
|
||||||
|
// 2: Callsign/title <STRING> (default: "ArmaTAK Circle")
|
||||||
|
// 3: Stale time in seconds <NUMBER> (default: 86400)
|
||||||
|
// 4: Stroke color as signed ARGB int <NUMBER> (default: -1)
|
||||||
|
// 5: Fill color as signed ARGB int <NUMBER> (default: -1761607681)
|
||||||
|
// 6: Stroke weight <NUMBER> (default: 3)
|
||||||
|
// 7: Optional registration scope <STRING> (default: "")
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
// [player, 300, "Mortar Risk Area"] call armatak_fnc_draw_circle;
|
||||||
|
//
|
||||||
|
// Public: Yes
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_center", objNull, [objNull, []]],
|
||||||
|
["_radius", 100, [0]],
|
||||||
|
["_callsign", "ArmaTAK Circle", [""]],
|
||||||
|
["_staleSeconds", 86400, [0]],
|
||||||
|
["_strokeColor", -1, [0]],
|
||||||
|
["_fillColor", -1761607681, [0]],
|
||||||
|
["_strokeWeight", 3, [0]],
|
||||||
|
["_scope", "", [""]]
|
||||||
|
];
|
||||||
|
|
||||||
|
[
|
||||||
|
_center,
|
||||||
|
_radius,
|
||||||
|
_radius,
|
||||||
|
360,
|
||||||
|
_callsign,
|
||||||
|
_staleSeconds,
|
||||||
|
_strokeColor,
|
||||||
|
_fillColor,
|
||||||
|
_strokeWeight,
|
||||||
|
"",
|
||||||
|
"u-d-c-c",
|
||||||
|
_scope
|
||||||
|
] call armatak_fnc_draw_ellipse;
|
||||||
70
addons/main/functions/api/fn_draw_ellipse.sqf
Normal file
70
addons/main/functions/api/fn_draw_ellipse.sqf
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
// function name: armatak_fnc_draw_ellipse
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Sends an ATAK Drawing Tools ellipse or circle CoT.
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
// 0: Center position or object <ARRAY|OBJECT>
|
||||||
|
// 1: Major radius in meters <NUMBER>
|
||||||
|
// 2: Minor radius in meters <NUMBER>
|
||||||
|
// 3: Rotation angle in degrees <NUMBER> (default: 0)
|
||||||
|
// 4: Callsign/title <STRING> (default: "ArmaTAK Ellipse")
|
||||||
|
// 5: Stale time in seconds <NUMBER> (default: 86400)
|
||||||
|
// 6: Stroke color as signed ARGB int <NUMBER> (default: -1)
|
||||||
|
// 7: Fill color as signed ARGB int <NUMBER> (default: -1761607681)
|
||||||
|
// 8: Stroke weight <NUMBER> (default: 3)
|
||||||
|
// 9: MilSym SIDC for tactical overlay <STRING> (default: "")
|
||||||
|
// 10: CoT type <STRING> (default: "u-d-c-e")
|
||||||
|
// 11: Optional registration scope <STRING> (default: "")
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
// [screenToWorld [0.5, 0.5], 250, 100, 45, "Support by Fire"] call armatak_fnc_draw_ellipse;
|
||||||
|
//
|
||||||
|
// Public: Yes
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_center", objNull, [objNull, []]],
|
||||||
|
["_major", 100, [0]],
|
||||||
|
["_minor", 50, [0]],
|
||||||
|
["_angle", 0, [0]],
|
||||||
|
["_callsign", "ArmaTAK Ellipse", [""]],
|
||||||
|
["_staleSeconds", 86400, [0]],
|
||||||
|
["_strokeColor", -1, [0]],
|
||||||
|
["_fillColor", -1761607681, [0]],
|
||||||
|
["_strokeWeight", 3, [0]],
|
||||||
|
["_milsym", "", [""]],
|
||||||
|
["_cotType", "u-d-c-e", [""]],
|
||||||
|
["_scope", "", [""]]
|
||||||
|
];
|
||||||
|
|
||||||
|
private _position = if (_center isEqualType objNull) then {
|
||||||
|
getPos _center
|
||||||
|
} else {
|
||||||
|
_center
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((count _position) < 2) exitWith {""};
|
||||||
|
|
||||||
|
private _altitude = _position param [2, 0, [0]];
|
||||||
|
private _realLocation = [_position select 0, _position select 1, _altitude] call armatak_client_fnc_convertClientLocation;
|
||||||
|
private _uuid = "armatak" callExtension ["uuid", []] select 0;
|
||||||
|
private _payload = [
|
||||||
|
_uuid,
|
||||||
|
_cotType,
|
||||||
|
_realLocation select 0,
|
||||||
|
_realLocation select 1,
|
||||||
|
_realLocation select 2,
|
||||||
|
_major max 1,
|
||||||
|
_minor max 1,
|
||||||
|
_angle,
|
||||||
|
_callsign,
|
||||||
|
_staleSeconds max 1,
|
||||||
|
_strokeColor,
|
||||||
|
_fillColor,
|
||||||
|
_strokeWeight max 1,
|
||||||
|
_milsym
|
||||||
|
];
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:draw:ellipse", [_payload]];
|
||||||
|
[_scope, _uuid, _cotType, _realLocation select 0, _realLocation select 1, _realLocation select 2] call armatak_fnc_register_cot;
|
||||||
|
|
||||||
|
_uuid
|
||||||
83
addons/main/functions/api/fn_draw_polyline.sqf
Normal file
83
addons/main/functions/api/fn_draw_polyline.sqf
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
// function name: armatak_fnc_draw_polyline
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Sends an ATAK Drawing Tools freeform line or polygon CoT.
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
// 0: Positions or objects <ARRAY>
|
||||||
|
// 1: Callsign/title <STRING> (default: "ArmaTAK Line")
|
||||||
|
// 2: Closed polygon <BOOL> (default: false)
|
||||||
|
// 3: Stale time in seconds <NUMBER> (default: 86400)
|
||||||
|
// 4: Stroke color as signed ARGB int <NUMBER> (default: -1)
|
||||||
|
// 5: Fill color as signed ARGB int <NUMBER> (default: -1761607681)
|
||||||
|
// 6: Stroke weight <NUMBER> (default: 3)
|
||||||
|
// 7: Stroke style <STRING> (default: "solid")
|
||||||
|
// 8: MilSym SIDC for tactical overlay <STRING> (default: "")
|
||||||
|
// 9: CoT type <STRING> (default: "u-d-f")
|
||||||
|
// 10: Optional registration scope <STRING> (default: "")
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
// [[pos player, screenToWorld [0.5, 0.5]], "Phase Line Blue"] call armatak_fnc_draw_polyline;
|
||||||
|
//
|
||||||
|
// Public: Yes
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_points", [], [[]]],
|
||||||
|
["_callsign", "ArmaTAK Line", [""]],
|
||||||
|
["_closed", false, [true]],
|
||||||
|
["_staleSeconds", 86400, [0]],
|
||||||
|
["_strokeColor", -1, [0]],
|
||||||
|
["_fillColor", -1761607681, [0]],
|
||||||
|
["_strokeWeight", 3, [0]],
|
||||||
|
["_strokeStyle", "solid", [""]],
|
||||||
|
["_milsym", "", [""]],
|
||||||
|
["_cotType", "u-d-f", [""]],
|
||||||
|
["_scope", "", [""]]
|
||||||
|
];
|
||||||
|
|
||||||
|
if ((count _points) < 2) exitWith {""};
|
||||||
|
|
||||||
|
private _pointStrings = [];
|
||||||
|
private _center = [];
|
||||||
|
|
||||||
|
{
|
||||||
|
private _position = if (_x isEqualType objNull) then {
|
||||||
|
getPos _x
|
||||||
|
} else {
|
||||||
|
_x
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((count _position) >= 2) then {
|
||||||
|
private _altitude = _position param [2, 0, [0]];
|
||||||
|
private _realLocation = [_position select 0, _position select 1, _altitude] call armatak_client_fnc_convertClientLocation;
|
||||||
|
_pointStrings pushBack format ["%1,%2,%3", _realLocation select 0, _realLocation select 1, _realLocation select 2];
|
||||||
|
|
||||||
|
if (_center isEqualTo []) then {
|
||||||
|
_center = _realLocation;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _points;
|
||||||
|
|
||||||
|
if ((count _pointStrings) < 2) exitWith {""};
|
||||||
|
|
||||||
|
private _uuid = "armatak" callExtension ["uuid", []] select 0;
|
||||||
|
private _payload = [
|
||||||
|
_uuid,
|
||||||
|
_cotType,
|
||||||
|
_center select 0,
|
||||||
|
_center select 1,
|
||||||
|
_center select 2,
|
||||||
|
_pointStrings joinString ";",
|
||||||
|
_callsign,
|
||||||
|
_staleSeconds max 1,
|
||||||
|
_strokeColor,
|
||||||
|
_fillColor,
|
||||||
|
_strokeWeight max 1,
|
||||||
|
_strokeStyle,
|
||||||
|
_closed,
|
||||||
|
_milsym
|
||||||
|
];
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:draw:free", [_payload]];
|
||||||
|
[_scope, _uuid, _cotType, _center select 0, _center select 1, _center select 2] call armatak_fnc_register_cot;
|
||||||
|
|
||||||
|
_uuid
|
||||||
94
addons/main/functions/api/fn_draw_rectangle.sqf
Normal file
94
addons/main/functions/api/fn_draw_rectangle.sqf
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
// function name: armatak_fnc_draw_rectangle
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Sends an ATAK Drawing Tools rectangle CoT from an Arma center, width, length, and bearing.
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
// 0: Center position or object <ARRAY|OBJECT>
|
||||||
|
// 1: Width in meters <NUMBER>
|
||||||
|
// 2: Length in meters <NUMBER>
|
||||||
|
// 3: Bearing in degrees <NUMBER> (default: 0)
|
||||||
|
// 4: Callsign/title <STRING> (default: "ArmaTAK Rectangle")
|
||||||
|
// 5: Stale time in seconds <NUMBER> (default: 86400)
|
||||||
|
// 6: Stroke color as signed ARGB int <NUMBER> (default: -1)
|
||||||
|
// 7: Fill color as signed ARGB int <NUMBER> (default: -1761607681)
|
||||||
|
// 8: Stroke weight <NUMBER> (default: 3)
|
||||||
|
// 9: MilSym SIDC for tactical overlay <STRING> (default: "")
|
||||||
|
// 10: Optional registration scope <STRING> (default: "")
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
// [screenToWorld [0.5, 0.5], 200, 500, 30, "Engagement Area"] call armatak_fnc_draw_rectangle;
|
||||||
|
//
|
||||||
|
// Public: Yes
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_center", objNull, [objNull, []]],
|
||||||
|
["_width", 100, [0]],
|
||||||
|
["_length", 100, [0]],
|
||||||
|
["_bearing", 0, [0]],
|
||||||
|
["_callsign", "ArmaTAK Rectangle", [""]],
|
||||||
|
["_staleSeconds", 86400, [0]],
|
||||||
|
["_strokeColor", -1, [0]],
|
||||||
|
["_fillColor", -1761607681, [0]],
|
||||||
|
["_strokeWeight", 3, [0]],
|
||||||
|
["_milsym", "", [""]],
|
||||||
|
["_scope", "", [""]]
|
||||||
|
];
|
||||||
|
|
||||||
|
private _centerPos = if (_center isEqualType objNull) then {
|
||||||
|
getPos _center
|
||||||
|
} else {
|
||||||
|
_center
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((count _centerPos) < 2) exitWith {""};
|
||||||
|
|
||||||
|
private _altitude = _centerPos param [2, 0, [0]];
|
||||||
|
private _halfWidth = (_width max 1) / 2;
|
||||||
|
private _halfLength = (_length max 1) / 2;
|
||||||
|
private _sin = sin _bearing;
|
||||||
|
private _cos = cos _bearing;
|
||||||
|
private _forward = [_sin, _cos, 0];
|
||||||
|
private _right = [_cos, -_sin, 0];
|
||||||
|
private _offsets = [
|
||||||
|
[(_right vectorMultiply -_halfWidth), (_forward vectorMultiply _halfLength)],
|
||||||
|
[(_right vectorMultiply _halfWidth), (_forward vectorMultiply _halfLength)],
|
||||||
|
[(_right vectorMultiply _halfWidth), (_forward vectorMultiply -_halfLength)],
|
||||||
|
[(_right vectorMultiply -_halfWidth), (_forward vectorMultiply -_halfLength)]
|
||||||
|
];
|
||||||
|
private _points = [];
|
||||||
|
|
||||||
|
{
|
||||||
|
private _offset = (_x select 0) vectorAdd (_x select 1);
|
||||||
|
_points pushBack ([_centerPos select 0, _centerPos select 1, _altitude] vectorAdd _offset);
|
||||||
|
} forEach _offsets;
|
||||||
|
|
||||||
|
private _centerReal = [_centerPos select 0, _centerPos select 1, _altitude] call armatak_client_fnc_convertClientLocation;
|
||||||
|
private _pointStrings = [];
|
||||||
|
|
||||||
|
{
|
||||||
|
private _realLocation = [_x select 0, _x select 1, _x select 2] call armatak_client_fnc_convertClientLocation;
|
||||||
|
_pointStrings pushBack format ["%1,%2,%3", _realLocation select 0, _realLocation select 1, _realLocation select 2];
|
||||||
|
} forEach _points;
|
||||||
|
|
||||||
|
private _uuid = "armatak" callExtension ["uuid", []] select 0;
|
||||||
|
private _payload = [
|
||||||
|
_uuid,
|
||||||
|
"u-d-r",
|
||||||
|
_centerReal select 0,
|
||||||
|
_centerReal select 1,
|
||||||
|
_centerReal select 2,
|
||||||
|
_pointStrings joinString ";",
|
||||||
|
_callsign,
|
||||||
|
_staleSeconds max 1,
|
||||||
|
_strokeColor,
|
||||||
|
_fillColor,
|
||||||
|
_strokeWeight max 1,
|
||||||
|
"solid",
|
||||||
|
false,
|
||||||
|
_milsym
|
||||||
|
];
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:draw:rectangle", [_payload]];
|
||||||
|
[_scope, _uuid, "u-d-r", _centerReal select 0, _centerReal select 1, _centerReal select 2] call armatak_fnc_register_cot;
|
||||||
|
|
||||||
|
_uuid
|
||||||
200
addons/main/functions/api/fn_draw_route.sqf
Normal file
200
addons/main/functions/api/fn_draw_route.sqf
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
// function name: armatak_fnc_draw_route
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Sends an ATAK navigable route CoT.
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
// 0: Positions or objects <ARRAY>
|
||||||
|
// 1: Callsign/title <STRING> (default: "ArmaTAK Route")
|
||||||
|
// 2: Stale time in seconds <NUMBER> (default: 86400)
|
||||||
|
// 3: Color as signed ARGB int <NUMBER> (default: -1)
|
||||||
|
// 4: Stroke weight <NUMBER> (default: 3)
|
||||||
|
// 5: Navigation method <STRING> (default: "Driving")
|
||||||
|
// 6: Route type <STRING> (default: "Primary")
|
||||||
|
// 7: Direction/planning method <STRING> (default: "Infil")
|
||||||
|
// 8: Checkpoint interval among route points <NUMBER> (default: 5)
|
||||||
|
// 9: Optional registration scope <STRING> (default: "")
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
// [[pos player, screenToWorld [0.5, 0.5]], "Patrol Route"] call armatak_fnc_draw_route;
|
||||||
|
//
|
||||||
|
// Public: Yes
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_points", [], [[]]],
|
||||||
|
["_callsign", "ArmaTAK Route", [""]],
|
||||||
|
["_staleSeconds", 86400, [0]],
|
||||||
|
["_color", -1, [0]],
|
||||||
|
["_strokeWeight", 3, [0]],
|
||||||
|
["_method", "Driving", [""]],
|
||||||
|
["_routeType", "Primary", [""]],
|
||||||
|
["_direction", "Infil", [""]],
|
||||||
|
["_checkpointInterval", 5, [0]],
|
||||||
|
["_scope", "", [""]]
|
||||||
|
];
|
||||||
|
|
||||||
|
if ((count _points) < 2) exitWith {""};
|
||||||
|
|
||||||
|
private _pointStrings = [];
|
||||||
|
|
||||||
|
{
|
||||||
|
private _position = if (_x isEqualType objNull) then {
|
||||||
|
getPos _x
|
||||||
|
} else {
|
||||||
|
_x
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((count _position) >= 2) then {
|
||||||
|
private _altitude = _position param [2, 0, [0]];
|
||||||
|
private _realLocation = [_position select 0, _position select 1, _altitude] call armatak_client_fnc_convertClientLocation;
|
||||||
|
_pointStrings pushBack format ["%1,%2,%3", _realLocation select 0, _realLocation select 1, _realLocation select 2];
|
||||||
|
};
|
||||||
|
} forEach _points;
|
||||||
|
|
||||||
|
if ((count _pointStrings) < 2) exitWith {""};
|
||||||
|
|
||||||
|
private _uuid = "armatak" callExtension ["uuid", []] select 0;
|
||||||
|
private _pad = {
|
||||||
|
params ["_value", "_digits"];
|
||||||
|
|
||||||
|
private _text = str (floor _value);
|
||||||
|
while {(count _text) < _digits} do {
|
||||||
|
_text = "0" + _text;
|
||||||
|
};
|
||||||
|
|
||||||
|
_text
|
||||||
|
};
|
||||||
|
|
||||||
|
private _formatCotTime = {
|
||||||
|
params ["_dateParts"];
|
||||||
|
|
||||||
|
format [
|
||||||
|
"%1-%2-%3T%4:%5:%6.%7Z",
|
||||||
|
_dateParts param [0, 1970, [0]],
|
||||||
|
[_dateParts param [1, 1, [0]], 2] call _pad,
|
||||||
|
[_dateParts param [2, 1, [0]], 2] call _pad,
|
||||||
|
[_dateParts param [3, 0, [0]], 2] call _pad,
|
||||||
|
[_dateParts param [4, 0, [0]], 2] call _pad,
|
||||||
|
[_dateParts param [5, 0, [0]], 2] call _pad,
|
||||||
|
[_dateParts param [6, 0, [0]], 3] call _pad
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
private _addSecondsUtc = {
|
||||||
|
params ["_dateParts", "_secondsToAdd"];
|
||||||
|
|
||||||
|
private _year = _dateParts param [0, 1970, [0]];
|
||||||
|
private _month = _dateParts param [1, 1, [0]];
|
||||||
|
private _day = _dateParts param [2, 1, [0]];
|
||||||
|
private _hour = _dateParts param [3, 0, [0]];
|
||||||
|
private _minute = _dateParts param [4, 0, [0]];
|
||||||
|
private _second = (_dateParts param [5, 0, [0]]) + (floor _secondsToAdd);
|
||||||
|
private _millisecond = _dateParts param [6, 0, [0]];
|
||||||
|
|
||||||
|
while {_second >= 60} do {
|
||||||
|
_second = _second - 60;
|
||||||
|
_minute = _minute + 1;
|
||||||
|
};
|
||||||
|
while {_minute >= 60} do {
|
||||||
|
_minute = _minute - 60;
|
||||||
|
_hour = _hour + 1;
|
||||||
|
};
|
||||||
|
while {_hour >= 24} do {
|
||||||
|
_hour = _hour - 24;
|
||||||
|
_day = _day + 1;
|
||||||
|
|
||||||
|
private _daysInMonth = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
||||||
|
private _isLeapYear = ((_year mod 4) isEqualTo 0) && {((_year mod 100) isNotEqualTo 0) || {(_year mod 400) isEqualTo 0}};
|
||||||
|
if (_isLeapYear) then {_daysInMonth set [1, 29];};
|
||||||
|
|
||||||
|
if (_day > (_daysInMonth select (_month - 1))) then {
|
||||||
|
_day = 1;
|
||||||
|
_month = _month + 1;
|
||||||
|
if (_month > 12) then {
|
||||||
|
_month = 1;
|
||||||
|
_year = _year + 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
[_year, _month, _day, _hour, _minute, _second, _millisecond]
|
||||||
|
};
|
||||||
|
|
||||||
|
private _nowDate = systemTimeUTC;
|
||||||
|
private _now = [_nowDate] call _formatCotTime;
|
||||||
|
private _stale = [[_nowDate, _staleSeconds max 60] call _addSecondsUtc] call _formatCotTime;
|
||||||
|
|
||||||
|
private _links = "";
|
||||||
|
private _routeWaypoints = [];
|
||||||
|
private _lastIndex = (count _pointStrings) - 1;
|
||||||
|
private _checkpointNumber = 1;
|
||||||
|
private _checkpointIntervalSafe = _checkpointInterval max 1;
|
||||||
|
|
||||||
|
{
|
||||||
|
private _linkUuid = "armatak" callExtension ["uuid", []] select 0;
|
||||||
|
private _pointCallsign = "";
|
||||||
|
if (_forEachIndex isEqualTo 0) then {
|
||||||
|
_pointCallsign = format ["%1 SP", _callsign];
|
||||||
|
} else {
|
||||||
|
if (_forEachIndex isEqualTo _lastIndex) then {
|
||||||
|
_pointCallsign = "VDO";
|
||||||
|
} else {
|
||||||
|
if ((_forEachIndex mod _checkpointIntervalSafe) isEqualTo 0) then {
|
||||||
|
_pointCallsign = format ["CP%1", _checkpointNumber];
|
||||||
|
_checkpointNumber = _checkpointNumber + 1;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
private _linkType = ["b-m-p-w", "b-m-p-c"] select (_pointCallsign isEqualTo "");
|
||||||
|
_links = _links + format [
|
||||||
|
"<link uid=""%1"" callsign=""%2"" type=""%3"" point=""%4"" remarks="""" relation=""c""/>",
|
||||||
|
_linkUuid,
|
||||||
|
_pointCallsign,
|
||||||
|
_linkType,
|
||||||
|
_x
|
||||||
|
];
|
||||||
|
|
||||||
|
if (_pointCallsign isNotEqualTo "") then {
|
||||||
|
_routeWaypoints pushBack [_linkUuid, _pointCallsign, _x];
|
||||||
|
};
|
||||||
|
} forEach _pointStrings;
|
||||||
|
|
||||||
|
private _xml = format [
|
||||||
|
"<?xml version=""1.0"" encoding=""UTF-8"" ?><event version=""2.0"" uid=""%1"" type=""b-m-r"" time=""%2"" start=""%2"" stale=""%3"" how=""h-e"" access=""Undefined""><point lat=""0.0"" lon=""0.0"" hae=""9999999.0"" ce=""9999999.0"" le=""9999999.0""/><detail>%4<link_attr planningmethod=""%5"" color=""%6"" method=""%7"" prefix=""CP"" style=""0"" type=""Vehicle"" stroke=""%8"" direction=""%5"" routetype=""%9"" order=""Ascending Check Points""/><creator uid=""ARMATAK"" callsign=""ArmaTAK"" time=""%2"" type=""a-f-G-U-C""/><strokeColor value=""%6""/><strokeWeight value=""%8""/><strokeStyle value=""solid""/><labels_on value=""false""/><__routeinfo><__navcues/></__routeinfo><color value=""%6""/><remarks/><contact callsign=""%10""/><archive/><height_unit>1</height_unit></detail></event>",
|
||||||
|
_uuid,
|
||||||
|
_now,
|
||||||
|
_stale,
|
||||||
|
_links,
|
||||||
|
_direction,
|
||||||
|
_color,
|
||||||
|
_method,
|
||||||
|
_strokeWeight max 1,
|
||||||
|
_routeType,
|
||||||
|
_callsign
|
||||||
|
];
|
||||||
|
|
||||||
|
"armatak" callExtension ["log", [["info", format ["Sending ATAK route '%1' with %2 points (%3 bytes)", _callsign, count _pointStrings, count _xml]]]];
|
||||||
|
"armatak" callExtension ["tcp_socket:send_payload", [_xml]];
|
||||||
|
[_scope, _uuid, "b-m-r", 0, 0, 9999999] call armatak_fnc_register_cot;
|
||||||
|
|
||||||
|
{
|
||||||
|
_x params ["_waypointUid", "_waypointCallsign", "_pointString"];
|
||||||
|
private _pointParts = _pointString splitString ",";
|
||||||
|
if ((count _pointParts) >= 3) then {
|
||||||
|
private _waypointXml = format [
|
||||||
|
"<?xml version=""1.0"" encoding=""UTF-8"" ?><event version=""2.0"" uid=""%1"" type=""b-m-p-w"" time=""%2"" start=""%2"" stale=""%3"" how=""h-e""><point lat=""%4"" lon=""%5"" hae=""%6"" ce=""9999999.0"" le=""9999999.0""/><detail><contact callsign=""%7""/><remarks/><archive/><link relation=""p-p"" type=""b-m-r"" uid=""%8""/></detail></event>",
|
||||||
|
_waypointUid,
|
||||||
|
_now,
|
||||||
|
_stale,
|
||||||
|
_pointParts select 0,
|
||||||
|
_pointParts select 1,
|
||||||
|
_pointParts select 2,
|
||||||
|
_waypointCallsign,
|
||||||
|
_uuid
|
||||||
|
];
|
||||||
|
"armatak" callExtension ["tcp_socket:send_payload", [_waypointXml]];
|
||||||
|
[_scope, _waypointUid, "b-m-p-w", parseNumber (_pointParts select 0), parseNumber (_pointParts select 1), parseNumber (_pointParts select 2)] call armatak_fnc_register_cot;
|
||||||
|
};
|
||||||
|
} forEach _routeWaypoints;
|
||||||
|
|
||||||
|
_uuid
|
||||||
75
addons/main/functions/api/fn_draw_tactical_graphic.sqf
Normal file
75
addons/main/functions/api/fn_draw_tactical_graphic.sqf
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
// function name: armatak_fnc_draw_tactical_graphic
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Sends an ATAK Drawing Tools shape with a MilSym tactical graphic overlay.
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
// 0: Positions or objects <ARRAY>
|
||||||
|
// 1: MilSym SIDC <STRING>
|
||||||
|
// 2: Callsign/title <STRING> (default: "ArmaTAK Tactical Graphic")
|
||||||
|
// 3: Closed polygon <BOOL> (default: false)
|
||||||
|
// 4: Stale time in seconds <NUMBER> (default: 86400)
|
||||||
|
// 5: Stroke color as signed ARGB int <NUMBER> (default: -1)
|
||||||
|
// 6: Fill color as signed ARGB int <NUMBER> (default: -1761607681)
|
||||||
|
// 7: Stroke weight <NUMBER> (default: 3)
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
// [[pos player, screenToWorld [0.5, 0.5]], "GFGPOLAGM-----X", "Axis of Advance"] call armatak_fnc_draw_tactical_graphic;
|
||||||
|
//
|
||||||
|
// Public: Yes
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_points", [], [[]]],
|
||||||
|
["_milsym", "", [""]],
|
||||||
|
["_callsign", "ArmaTAK Tactical Graphic", [""]],
|
||||||
|
["_closed", false, [true]],
|
||||||
|
["_staleSeconds", 86400, [0]],
|
||||||
|
["_strokeColor", -1, [0]],
|
||||||
|
["_fillColor", -1761607681, [0]],
|
||||||
|
["_strokeWeight", 3, [0]]
|
||||||
|
];
|
||||||
|
|
||||||
|
if (_milsym isEqualTo "") exitWith {""};
|
||||||
|
if ((count _points) < 2) exitWith {""};
|
||||||
|
|
||||||
|
private _pointStrings = [];
|
||||||
|
private _center = [];
|
||||||
|
|
||||||
|
{
|
||||||
|
private _position = if (_x isEqualType objNull) then {
|
||||||
|
getPos _x
|
||||||
|
} else {
|
||||||
|
_x
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((count _position) >= 2) then {
|
||||||
|
private _altitude = _position param [2, 0, [0]];
|
||||||
|
private _realLocation = [_position select 0, _position select 1, _altitude] call armatak_client_fnc_convertClientLocation;
|
||||||
|
_pointStrings pushBack format ["%1,%2,%3", _realLocation select 0, _realLocation select 1, _realLocation select 2];
|
||||||
|
|
||||||
|
if (_center isEqualTo []) then {
|
||||||
|
_center = _realLocation;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _points;
|
||||||
|
|
||||||
|
if ((count _pointStrings) < 2) exitWith {""};
|
||||||
|
|
||||||
|
private _uuid = "armatak" callExtension ["uuid", []] select 0;
|
||||||
|
private _payload = [
|
||||||
|
_uuid,
|
||||||
|
"u-d-f",
|
||||||
|
_center select 0,
|
||||||
|
_center select 1,
|
||||||
|
_center select 2,
|
||||||
|
_pointStrings joinString ";",
|
||||||
|
_callsign,
|
||||||
|
_staleSeconds max 1,
|
||||||
|
_strokeColor,
|
||||||
|
_fillColor,
|
||||||
|
_strokeWeight max 1,
|
||||||
|
"solid",
|
||||||
|
_closed,
|
||||||
|
_milsym
|
||||||
|
];
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:draw:vector", [_payload]];
|
||||||
30
addons/main/functions/api/fn_register_cot.sqf
Normal file
30
addons/main/functions/api/fn_register_cot.sqf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
// function name: armatak_fnc_register_cot
|
||||||
|
// function author: Valmo, Codex
|
||||||
|
// function description: Registers a CoT object under a scope so it can be deleted later.
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
// 0: Scope/key used to group CoTs <STRING>
|
||||||
|
// 1: CoT UID <STRING>
|
||||||
|
// 2: CoT type <STRING>
|
||||||
|
// 3: Latitude <NUMBER>
|
||||||
|
// 4: Longitude <NUMBER>
|
||||||
|
// 5: HAE altitude <NUMBER>
|
||||||
|
//
|
||||||
|
// Public: Yes
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_scope", "", [""]],
|
||||||
|
["_uid", "", [""]],
|
||||||
|
["_type", "", [""]],
|
||||||
|
["_lat", 0, [0]],
|
||||||
|
["_lon", 0, [0]],
|
||||||
|
["_hae", 0, [0]]
|
||||||
|
];
|
||||||
|
|
||||||
|
if (_scope isEqualTo "" || {_uid isEqualTo ""} || {_type isEqualTo ""}) exitWith {false};
|
||||||
|
|
||||||
|
private _registry = missionNamespace getVariable ["armatak_registered_cots", []];
|
||||||
|
_registry pushBack [_scope, _uid, _type, _lat, _lon, _hae];
|
||||||
|
missionNamespace setVariable ["armatak_registered_cots", _registry];
|
||||||
|
|
||||||
|
true
|
||||||
105
addons/main/functions/api/fn_report_marker.sqf
Normal file
105
addons/main/functions/api/fn_report_marker.sqf
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
// function name: armatak_fnc_report_marker
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Sends a one-shot TAK report marker with an independent stale time.
|
||||||
|
//
|
||||||
|
// Arguments:
|
||||||
|
// 0: Source position or object <ARRAY|OBJECT>
|
||||||
|
// 1: Affiliation or raw CoT type <STRING> (default: "unknown")
|
||||||
|
// Supported affiliations: "friendly", "enemy", "hostile", "neutral", "unknown"
|
||||||
|
// 2: Marker kind <STRING> (default: "infantry")
|
||||||
|
// Supported kinds: "infantry", "tank", "car", "apc", "helicopter", "plane", "ship", "static"
|
||||||
|
// 3: Callsign <STRING> (default: "Report")
|
||||||
|
// 4: Remarks <STRING> (default: "")
|
||||||
|
// 5: Stale time in seconds <NUMBER> (default: 3600)
|
||||||
|
// 6: Optional registration scope <STRING> (default: "")
|
||||||
|
//
|
||||||
|
// Example:
|
||||||
|
// [cursorObject, "enemy", "tank", "Enemy Tank", "Reported enemy tank"] call armatak_fnc_report_marker;
|
||||||
|
// [screenToWorld [0.5, 0.5], "unknown", "infantry", "Unknown Contact", "Unknown contact reported", 7200] call armatak_fnc_report_marker;
|
||||||
|
// [cursorObject, "a-h-G-U-C-A-T", "Enemy Tank", "Reported enemy tank", 7200] call armatak_fnc_report_marker;
|
||||||
|
//
|
||||||
|
// Public: Yes
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_source", objNull, [objNull, []]],
|
||||||
|
["_affiliationOrType", "unknown", [""]],
|
||||||
|
["_kindOrCallsign", "infantry", [""]],
|
||||||
|
["_callsignOrRemarks", "Report", [""]],
|
||||||
|
["_remarksOrStaleSeconds", "", ["", 0]],
|
||||||
|
["_staleSeconds", 3600, [0, ""]],
|
||||||
|
["_scope", "", [""]]
|
||||||
|
];
|
||||||
|
|
||||||
|
private _type = "";
|
||||||
|
private _callsign = _callsignOrRemarks;
|
||||||
|
private _remarks = _remarksOrStaleSeconds;
|
||||||
|
|
||||||
|
if (_staleSeconds isEqualType "") then {
|
||||||
|
_scope = _staleSeconds;
|
||||||
|
_staleSeconds = 3600;
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((_affiliationOrType select [0, 2]) isEqualTo "a-") then {
|
||||||
|
_type = _affiliationOrType;
|
||||||
|
_callsign = _kindOrCallsign;
|
||||||
|
_remarks = _callsignOrRemarks;
|
||||||
|
|
||||||
|
if (_remarksOrStaleSeconds isEqualType 0) then {
|
||||||
|
_staleSeconds = _remarksOrStaleSeconds;
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
private _affiliation = switch (toLower _affiliationOrType) do {
|
||||||
|
case "friendly": {"f"};
|
||||||
|
case "enemy": {"h"};
|
||||||
|
case "hostile": {"h"};
|
||||||
|
case "neutral": {"n"};
|
||||||
|
default {"u"};
|
||||||
|
};
|
||||||
|
|
||||||
|
private _kind = switch (toLower _kindOrCallsign) do {
|
||||||
|
case "tank": {"G-U-C-A-T"};
|
||||||
|
case "car": {"G-U-C-I-M"};
|
||||||
|
case "apc": {"G-U-C-I-I"};
|
||||||
|
case "helicopter": {"A-M-H"};
|
||||||
|
case "plane": {"A-M-F"};
|
||||||
|
case "ship": {"S"};
|
||||||
|
case "static": {"G-U-C-F-M"};
|
||||||
|
default {"G-U-C-I"};
|
||||||
|
};
|
||||||
|
|
||||||
|
_type = "a-" + _affiliation + "-" + _kind;
|
||||||
|
|
||||||
|
if (_remarksOrStaleSeconds isEqualType 0) then {
|
||||||
|
_staleSeconds = _remarksOrStaleSeconds;
|
||||||
|
_remarks = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
private _position = if (_source isEqualType objNull) then {
|
||||||
|
getPos _source
|
||||||
|
} else {
|
||||||
|
_source
|
||||||
|
};
|
||||||
|
|
||||||
|
if ((count _position) < 2) exitWith {
|
||||||
|
""
|
||||||
|
};
|
||||||
|
|
||||||
|
private _altitude = _position param [2, 0, [0]];
|
||||||
|
private _realLocation = [_position select 0, _position select 1, _altitude] call armatak_client_fnc_convertClientLocation;
|
||||||
|
private _uuid = "armatak" callExtension ["uuid", []] select 0;
|
||||||
|
private _payload = [
|
||||||
|
_uuid,
|
||||||
|
_type,
|
||||||
|
_realLocation select 0,
|
||||||
|
_realLocation select 1,
|
||||||
|
_realLocation select 2,
|
||||||
|
_callsign,
|
||||||
|
_staleSeconds max 1,
|
||||||
|
_remarks
|
||||||
|
];
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:cot:report_marker", [_payload]];
|
||||||
|
[_scope, _uuid, _type, _realLocation select 0, _realLocation select 1, _realLocation select 2] call armatak_fnc_register_cot;
|
||||||
|
|
||||||
|
_uuid
|
||||||
@@ -3,12 +3,18 @@ params ["_unit"];
|
|||||||
_digitalPointer = laserTarget _unit;
|
_digitalPointer = laserTarget _unit;
|
||||||
|
|
||||||
if (!isNull _digitalPointer) then {
|
if (!isNull _digitalPointer) then {
|
||||||
_digitalPointerPosition = _digitalPointer call armatak_fnc_extract_position;
|
_digitalPointerPosition = _digitalPointer call armatak_client_fnc_extractClientPosition;
|
||||||
|
|
||||||
_link_uid = [_unit] call armatak_fnc_extract_uuid;
|
_link_uid = [_unit] call armatak_fnc_extract_uuid;
|
||||||
_contact_callsign = ([player] call armatak_fnc_extract_callsign) + ".DP1";
|
_objectType = [_unit] call BIS_fnc_objectType;
|
||||||
|
_ownerCallsign = if ((_objectType select 0) == "Soldier") then {
|
||||||
|
[_unit] call armatak_fnc_extract_unit_callsign
|
||||||
|
} else {
|
||||||
|
[_unit] call armatak_fnc_extract_marker_callsign
|
||||||
|
};
|
||||||
|
_contact_callsign = _ownerCallsign + ".DP1";
|
||||||
|
|
||||||
_dpCot = [_link_uid, _contact_callsign, _digitalPointerPosition select 0, _digitalPointerPosition select 1, _digitalPointerPosition select 2];
|
_dpCot = [_link_uid, _contact_callsign, _digitalPointerPosition select 1, _digitalPointerPosition select 2, _digitalPointerPosition select 3];
|
||||||
|
|
||||||
"armatak" callExtension ["cot_router:send_digital_pointer_cot", [_dpCot]];
|
"armatak" callExtension ["tcp_socket:cot:digital_pointer", [_dpCot]];
|
||||||
};
|
};
|
||||||
@@ -1,28 +1,7 @@
|
|||||||
// function name: armatak_fnc_extract_drone
|
// function name: armatak_fnc_send_drone_cot
|
||||||
// function author: Valmo
|
// function author: Valmo
|
||||||
// function description: Gets the drone information for the CoT Router
|
// function description: Gets the drone information for the CoT Router
|
||||||
|
|
||||||
params["_drone"];
|
params["_drone"];
|
||||||
|
|
||||||
private _atak_role = "a-f-A";
|
[_drone] call armatak_fnc_send_uas_platform_cot;
|
||||||
private _atak_callsign = [_unit] call armatak_fnc_extract_callsign;
|
|
||||||
|
|
||||||
switch (side _drone) do {
|
|
||||||
case "WEST": {
|
|
||||||
_atak_role = "a-f-A-M-F-Q"
|
|
||||||
};
|
|
||||||
case "EAST": {
|
|
||||||
_atak_role = "a-h-A-M-F-Q"
|
|
||||||
};
|
|
||||||
case "INDEPENDENT": {
|
|
||||||
_atak_role = "a-n-A-M-F-Q"
|
|
||||||
};
|
|
||||||
case "CIVILIAN": {
|
|
||||||
_atak_role = "a-f-A-C"
|
|
||||||
};
|
|
||||||
default {
|
|
||||||
_atak_role = "a-f-A-M-F-Q"
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
_cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_send_marker_cot;
|
|
||||||
|
|||||||
15
addons/main/functions/api/fn_send_enemy_cot.sqf
Normal file
15
addons/main/functions/api/fn_send_enemy_cot.sqf
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// function name: armatak_fnc_send_eud_cot
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Gets the information necessary for generating the EUD Cursor Over Time
|
||||||
|
|
||||||
|
params ["_unit"];
|
||||||
|
|
||||||
|
_unit_position = _unit call armatak_client_fnc_extractClientPosition;
|
||||||
|
|
||||||
|
_uuid = _unit call armatak_fnc_extract_uuid;
|
||||||
|
_type = _unit call armatak_fnc_extract_role;
|
||||||
|
_callsign = _unit call armatak_fnc_extract_marker_callsign;
|
||||||
|
|
||||||
|
_marker_cot = [_uuid, _type, _unit_position select 1, _unit_position select 2, _unit_position select 3, _callsign, _unit_position select 5, _unit_position select 6];
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:cot:marker", [_marker_cot]];
|
||||||
12
addons/main/functions/api/fn_send_eud_cot.sqf
Normal file
12
addons/main/functions/api/fn_send_eud_cot.sqf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// function name: armatak_fnc_send_eud_cot
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Gets the information necessary for generating the EUD Cursor Over Time
|
||||||
|
|
||||||
|
params ["_unit", "_callsign", "_group_name", "_group_role"];
|
||||||
|
|
||||||
|
_position = _unit call armatak_client_fnc_extractClientPosition;
|
||||||
|
|
||||||
|
_uuid = _unit call armatak_fnc_extract_uuid;
|
||||||
|
|
||||||
|
_eud_cot = [_uuid, _position select 1, _position select 2, _position select 3, _callsign, _group_name, _group_role, _position select 5, _position select 6];
|
||||||
|
"armatak" callExtension ["tcp_socket:cot:eud", [_eud_cot]];
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
params["_group"];
|
params["_group"];
|
||||||
|
|
||||||
{
|
{
|
||||||
_callsign = [_x] call armatak_fnc_extract_callsign;
|
_callsign = [_x] call armatak_fnc_extract_unit_callsign;
|
||||||
_group_name = [_group] call armatak_fnc_extract_group_color;
|
_group_name = [_group] call armatak_fnc_extract_group_color;
|
||||||
_group_role = [_x] call armatak_fnc_extract_group_role;
|
_group_role = [_x] call armatak_fnc_extract_group_role;
|
||||||
|
|
||||||
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_human_cot;
|
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
|
||||||
} forEach (units _group);
|
} forEach (units _group);
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
// function name: armatak_fnc_extract_human_cot_info
|
|
||||||
// function author: Valmo
|
|
||||||
// function description: Gets the information necessary for generating the Human Cursor Over Time
|
|
||||||
|
|
||||||
params ["_unit", "_callsign", "_group_name", "_group_role"];
|
|
||||||
|
|
||||||
_position = _unit call armatak_fnc_extract_position;
|
|
||||||
_uuid = _unit call armatak_fnc_extract_uuid;
|
|
||||||
|
|
||||||
_human_cot = [_uuid, _position select 0, _position select 1, _position select 2, _callsign, _group_name, _group_role, _position select 3, speed player / 3.6];
|
|
||||||
|
|
||||||
"armatak" callExtension ["cot_router:send_human_cot", [_human_cot]];
|
|
||||||
@@ -4,9 +4,11 @@
|
|||||||
|
|
||||||
params ["_unit", "_type", "_callsign"];
|
params ["_unit", "_type", "_callsign"];
|
||||||
|
|
||||||
_unit_position = _unit call armatak_fnc_extract_position;
|
_unit_position = _unit call armatak_client_fnc_extractClientPosition;
|
||||||
|
_video_url = [_unit] call armatak_fnc_extract_marker_video_url;
|
||||||
|
|
||||||
_uuid = _unit call armatak_fnc_extract_uuid;
|
_uuid = _unit call armatak_fnc_extract_uuid;
|
||||||
|
|
||||||
_marker_cot = [_uuid, _type, _unit_position select 0, _unit_position select 1, _unit_position select 2, _callsign, _unit_position select 3, speed _unit / 3.6];
|
_marker_cot = [_uuid, _type, _unit_position select 1, _unit_position select 2, _unit_position select 3, _callsign, _unit_position select 5, _unit_position select 6, _video_url];
|
||||||
|
|
||||||
"armatak" callExtension ["cot_router:send_marker_cot", [_marker_cot]];
|
"armatak" callExtension ["tcp_socket:cot:marker", [_marker_cot]];
|
||||||
|
|||||||
77
addons/main/functions/api/fn_send_uas_platform_cot.sqf
Normal file
77
addons/main/functions/api/fn_send_uas_platform_cot.sqf
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
params ["_drone"];
|
||||||
|
|
||||||
|
private _uuid = _drone call armatak_fnc_extract_uuid;
|
||||||
|
private _uavControl = UAVControl _drone;
|
||||||
|
private _controller = _uavControl param [0, objNull];
|
||||||
|
private _controller_uid = if (!isNull _controller) then { [_controller] call armatak_fnc_extract_uuid } else { _drone getVariable ["armatak_uas_controller_uid", _uuid] };
|
||||||
|
private _callsign = [_drone] call armatak_fnc_extract_marker_callsign;
|
||||||
|
private _video_url = [_drone] call armatak_fnc_extract_marker_video_url;
|
||||||
|
|
||||||
|
private _atak_role = "a-f-A-M-H-Q";
|
||||||
|
switch (side _drone) do {
|
||||||
|
case west: {
|
||||||
|
_atak_role = "a-f-A-M-H-Q";
|
||||||
|
};
|
||||||
|
case east: {
|
||||||
|
_atak_role = "a-h-A-M-H-Q";
|
||||||
|
};
|
||||||
|
case independent: {
|
||||||
|
_atak_role = "a-n-A-M-H-Q";
|
||||||
|
};
|
||||||
|
case civilian: {
|
||||||
|
_atak_role = "a-f-A-C";
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
_atak_role = "a-f-A-M-H-Q";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
private _position = _drone call armatak_client_fnc_extractClientPosition;
|
||||||
|
private _lat = _position select 1;
|
||||||
|
private _lon = _position select 2;
|
||||||
|
private _hae = _position select 3;
|
||||||
|
private _course = _position select 5;
|
||||||
|
private _speed = _position select 6;
|
||||||
|
|
||||||
|
private _cameraData = [_drone] call armatak_fnc_extract_uas_camera_data;
|
||||||
|
private _azimuth = _cameraData select 0;
|
||||||
|
private _elevation = _cameraData select 1;
|
||||||
|
private _fov = _cameraData select 2;
|
||||||
|
private _range = _cameraData select 3;
|
||||||
|
private _vfov = _drone getVariable ["armatak_uas_vfov", _fov];
|
||||||
|
|
||||||
|
private _yaw = round (getDir _drone);
|
||||||
|
private _pitch = (vectorDir _drone) select 2;
|
||||||
|
private _roll = (vectorUp _drone) select 0;
|
||||||
|
private _isFlying = parseNumber (isEngineOn _drone);
|
||||||
|
private _hal = ((getPosATL _drone) select 2) max 0;
|
||||||
|
private _vehicleType = if (_video_url == "") then {
|
||||||
|
typeOf _drone
|
||||||
|
} else {
|
||||||
|
format ["%1|armatak_video_url=%2", typeOf _drone, _video_url]
|
||||||
|
};
|
||||||
|
|
||||||
|
private _payload = [
|
||||||
|
_uuid,
|
||||||
|
_atak_role,
|
||||||
|
_callsign,
|
||||||
|
_lat,
|
||||||
|
_lon,
|
||||||
|
_hae,
|
||||||
|
_course,
|
||||||
|
_speed,
|
||||||
|
_azimuth,
|
||||||
|
_elevation,
|
||||||
|
_fov,
|
||||||
|
_vfov,
|
||||||
|
_range,
|
||||||
|
_yaw,
|
||||||
|
_pitch,
|
||||||
|
_roll,
|
||||||
|
_hal,
|
||||||
|
_vehicleType,
|
||||||
|
_isFlying,
|
||||||
|
_controller_uid
|
||||||
|
];
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:cot:uas_platform", [_payload]];
|
||||||
22
addons/main/functions/api/fn_send_uas_sensor_cot.sqf
Normal file
22
addons/main/functions/api/fn_send_uas_sensor_cot.sqf
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
params ["_drone"];
|
||||||
|
|
||||||
|
private _video_url = [_drone] call armatak_fnc_extract_marker_video_url;
|
||||||
|
if (_video_url == "") exitWith {};
|
||||||
|
|
||||||
|
private _uuid = _drone call armatak_fnc_extract_uuid;
|
||||||
|
private _video_uid = _uuid + "-video";
|
||||||
|
private _sensor_uid = _uuid + "-sensor";
|
||||||
|
private _callsign = [_drone] call armatak_fnc_extract_marker_callsign;
|
||||||
|
|
||||||
|
private _position = _drone call armatak_client_fnc_extractClientPosition;
|
||||||
|
private _lat = _position select 1;
|
||||||
|
private _lon = _position select 2;
|
||||||
|
private _hae = _position select 3;
|
||||||
|
|
||||||
|
private _cameraData = [_drone] call armatak_fnc_extract_uas_camera_data;
|
||||||
|
private _azimuth = _cameraData select 0;
|
||||||
|
private _fov = _cameraData select 2;
|
||||||
|
private _range = _cameraData select 3;
|
||||||
|
|
||||||
|
private _payload = [_sensor_uid, _video_uid, _callsign, _lat, _lon, _hae, _azimuth, _fov, _range];
|
||||||
|
"armatak" callExtension ["tcp_socket:cot:uas_sensor", [_payload]];
|
||||||
20
addons/main/functions/api/fn_send_uas_video_cot.sqf
Normal file
20
addons/main/functions/api/fn_send_uas_video_cot.sqf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
params ["_drone"];
|
||||||
|
|
||||||
|
private _video_url = [_drone] call armatak_fnc_extract_marker_video_url;
|
||||||
|
if (_video_url == "") exitWith {};
|
||||||
|
|
||||||
|
private _uuid = _drone call armatak_fnc_extract_uuid;
|
||||||
|
private _video_uid = _uuid + "-video";
|
||||||
|
private _callsign = [_drone] call armatak_fnc_extract_marker_callsign;
|
||||||
|
|
||||||
|
private _signature = format ["%1|%2|%3", _video_uid, _callsign, _video_url];
|
||||||
|
private _nextRefreshAt = _drone getVariable ["armatak_next_uas_video_refresh_at", 0];
|
||||||
|
private _lastSignature = _drone getVariable ["armatak_last_uas_video_signature", ""];
|
||||||
|
|
||||||
|
if (_signature == _lastSignature && {diag_tickTime < _nextRefreshAt}) exitWith {};
|
||||||
|
|
||||||
|
_drone setVariable ["armatak_last_uas_video_signature", _signature, false];
|
||||||
|
_drone setVariable ["armatak_next_uas_video_refresh_at", diag_tickTime + 300, false];
|
||||||
|
|
||||||
|
private _payload = [_video_uid, _callsign, _video_url];
|
||||||
|
"armatak" callExtension ["tcp_socket:cot:uas_video", [_payload]];
|
||||||
9
addons/main/functions/api/fn_set_uas_camera_override.sqf
Normal file
9
addons/main/functions/api/fn_set_uas_camera_override.sqf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
params ["_drone", ["_cameraData", []]];
|
||||||
|
|
||||||
|
if (isNull _drone) exitWith {};
|
||||||
|
|
||||||
|
if ((_cameraData isEqualType []) && {(count _cameraData) >= 6}) then {
|
||||||
|
_drone setVariable ["armatak_uas_camera_data_override", _cameraData + [serverTime], false];
|
||||||
|
} else {
|
||||||
|
_drone setVariable ["armatak_uas_camera_data_override", nil, false];
|
||||||
|
};
|
||||||
10
addons/main/functions/api/fn_stop_tcp_socket.sqf
Normal file
10
addons/main/functions/api/fn_stop_tcp_socket.sqf
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
_armatak_tcp_socket_is_running = missionNamespace getVariable "armatak_tcp_socket_is_running";
|
||||||
|
|
||||||
|
if (_armatak_tcp_socket_is_running) then {
|
||||||
|
missionNamespace setVariable ["armatak_tcp_socket_is_running", false];
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:stop", []];
|
||||||
|
} else {
|
||||||
|
_warning = format ["<t color='#FF0021'>ARMATAK</t><br/> %1", "There is no TCP Socket running to be stopped"];
|
||||||
|
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||||
|
};
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
// function name: armatak_fnc_extract_callsign
|
|
||||||
// function author: Valmo
|
|
||||||
// function description: Gets the unit name or classname to be used as TAK callsign
|
|
||||||
|
|
||||||
params["_unit"];
|
|
||||||
|
|
||||||
private _callsign = "";
|
|
||||||
|
|
||||||
if (roleDescription _unit != "") then {
|
|
||||||
_callsign = ([name _unit] call armatak_fnc_shorten_name) + " | " + roleDescription _unit;
|
|
||||||
} else {
|
|
||||||
_callsign = name _unit;
|
|
||||||
|
|
||||||
if (_callsign == "Error: No unit") then {
|
|
||||||
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if ((([_unit] call BIS_fnc_objectType) select 0) == "Vehicle") then {
|
|
||||||
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
|
|
||||||
|
|
||||||
if (!isNull driver _unit) then {
|
|
||||||
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName") + " | " + ([name (driver _unit)] call armatak_fnc_shorten_name);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
if (unitIsUAV _unit) then {
|
|
||||||
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
|
|
||||||
|
|
||||||
if (isUAVConnected _unit) then {
|
|
||||||
_callsign = (_callsign) + "[ON]";
|
|
||||||
} else {
|
|
||||||
_callsign = (_callsign) + "[OFF]";
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
_atak_pre_defined_callsign = _unit getVariable "_atak_callsign";
|
|
||||||
|
|
||||||
if (!isNil "_atak_pre_defined_callsign") then {
|
|
||||||
_callsign = _atak_pre_defined_callsign;
|
|
||||||
};
|
|
||||||
|
|
||||||
_callsign
|
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
|
#include "..\..\script_component.hpp"
|
||||||
|
|
||||||
params["_group"];
|
params["_group"];
|
||||||
|
|
||||||
_group_name = _group getVariable "_atak_group_name";
|
_group_name = _group getVariable QGVAR(group_name);
|
||||||
|
|
||||||
if (isNil "_group_name") then {
|
if (isNil "_group_name") then {
|
||||||
_group_colors = missionNamespace getVariable "_group_colors";
|
_group_colors = missionNamespace getVariable QGVAR(group_colors);
|
||||||
_group_name = selectRandom _group_colors;
|
_group_name = selectRandom _group_colors;
|
||||||
|
|
||||||
if (count _group_colors > 0) then {
|
if (count _group_colors > 0) then {
|
||||||
@@ -14,11 +16,11 @@ if (isNil "_group_name") then {
|
|||||||
_group_colors deleteAt _randomIndex;
|
_group_colors deleteAt _randomIndex;
|
||||||
|
|
||||||
_group_name = _selectedColor;
|
_group_name = _selectedColor;
|
||||||
_group setVariable ["_atak_group_name", _group_name];
|
_group setVariable [QGVAR(group_name), _group_name];
|
||||||
missionNamespace setVariable ["_group_colors", _group_colors]
|
missionNamespace setVariable [QGVAR(group_colors), _group_colors]
|
||||||
} else {
|
} else {
|
||||||
_group_name = "Red";
|
_group_name = "Red";
|
||||||
_group setVariable ["_atak_group_name", _group_name];
|
_group setVariable [QGVAR(group_name), _group_name];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
params["_unit"];
|
params["_unit"];
|
||||||
|
|
||||||
|
_group = group _unit;
|
||||||
_group_roles = ["Team Member", "Team Lead", "HQ", "Sniper", "Medic", "Forward Observer", "RTO", "K9"];
|
_group_roles = ["Team Member", "Team Lead", "HQ", "Sniper", "Medic", "Forward Observer", "RTO", "K9"];
|
||||||
_group_role = "Team Member";
|
_group_role = "Team Member";
|
||||||
|
|
||||||
if (["SpecialOperative", (configFile >> "CfgVehicles" >> typeOf _unit >> "role") call BIS_fnc_getCfgData, false] call BIS_fnc_inString) then {
|
if (["SpecialOperative", (configOf _unit >> "role") call BIS_fnc_getCfgData, false] call BIS_fnc_inString) then {
|
||||||
_group_role = _group_roles select 5;
|
_group_role = _group_roles select 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -19,7 +20,7 @@ if (((backpack _unit) isKindOf "TFAR_Bag_Base") or (["radio", typeOf _unit, fals
|
|||||||
_group_role = _group_roles select 6;
|
_group_role = _group_roles select 6;
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((["sniper", typeOf _unit, false] call BIS_fnc_inString) or (["marksman", (configFile >> "CfgVehicles" >> typeOf _unit >> "role") call BIS_fnc_getCfgData, false] call BIS_fnc_inString) or (["sharpshooter", typeOf _unit, false] call BIS_fnc_inString)) then {
|
if ((["sniper", typeOf _unit, false] call BIS_fnc_inString) or (["marksman", (configOf _unit >> "role") call BIS_fnc_getCfgData, false] call BIS_fnc_inString) or (["sharpshooter", typeOf _unit, false] call BIS_fnc_inString)) then {
|
||||||
_group_role = _group_roles select 3;
|
_group_role = _group_roles select 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ if (["officer", typeOf _unit, false] call BIS_fnc_inString) then {
|
|||||||
_pre_defined_role = _unit getVariable "_atak_group_role";
|
_pre_defined_role = _unit getVariable "_atak_group_role";
|
||||||
|
|
||||||
if (!isNil "_pre_defined_role") then {
|
if (!isNil "_pre_defined_role") then {
|
||||||
_callsign = _pre_defined_callsign;
|
_callsign = _pre_defined_role;
|
||||||
};
|
};
|
||||||
|
|
||||||
_group_role
|
_group_role
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
// function name: armatak_fnc_extract_marker_callsign
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Gets the unit name or classname to be used as TAK callsign in a Marker
|
||||||
|
|
||||||
|
params["_unit"];
|
||||||
|
|
||||||
|
private _callsign = "";
|
||||||
|
private _displayName = localize (getText (configOf _unit >> "displayName"));
|
||||||
|
private _markerCallsignOverride = _unit getVariable ["armatak_attribute_marker_callsign", ""];
|
||||||
|
|
||||||
|
if (_markerCallsignOverride isNotEqualTo "") exitWith {
|
||||||
|
_markerCallsignOverride
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_displayName isEqualTo "") then {
|
||||||
|
_displayName = typeOf _unit;
|
||||||
|
};
|
||||||
|
|
||||||
|
private _vehicleName = vehicleVarName _unit;
|
||||||
|
|
||||||
|
if ((([_unit] call BIS_fnc_objectType) select 0) == "Vehicle") then {
|
||||||
|
_callsign = [_displayName, _vehicleName] select (_vehicleName isNotEqualTo "");
|
||||||
|
|
||||||
|
if (!isNull driver _unit) then {
|
||||||
|
_callsign = _displayName + " | " + ([name (driver _unit)] call armatak_fnc_shorten_name);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (unitIsUAV _unit) then {
|
||||||
|
_callsign = [_displayName, _vehicleName] select (_vehicleName isNotEqualTo "");
|
||||||
|
|
||||||
|
private _uavControl = UAVControl _unit;
|
||||||
|
private _controller = _uavControl param [0, objNull];
|
||||||
|
if (!isNull _controller) then {
|
||||||
|
_callsign = _callsign + " | " + ([name _controller] call armatak_fnc_shorten_name);
|
||||||
|
};
|
||||||
|
|
||||||
|
if (isUAVConnected _unit) then {
|
||||||
|
_callsign = _callsign + " [ON]";
|
||||||
|
} else {
|
||||||
|
_callsign = _callsign + " [OFF]";
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_callsign isEqualTo "") then {
|
||||||
|
_callsign = _displayName;
|
||||||
|
};
|
||||||
|
|
||||||
|
_callsign
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
// function name: armatak_fnc_extract_marker_video_url
|
||||||
|
// function author: Codex
|
||||||
|
// function description: Gets the marker video URL configured in 3DEN for a vehicle
|
||||||
|
|
||||||
|
params ["_unit"];
|
||||||
|
|
||||||
|
private _videoUrl = _unit getVariable ["armatak_attribute_marker_video_url", ""];
|
||||||
|
|
||||||
|
if (isNil "_videoUrl") exitWith {
|
||||||
|
""
|
||||||
|
};
|
||||||
|
|
||||||
|
_videoUrl
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
// function name: armatak_fnc_extract_position
|
|
||||||
// function author: Valmo
|
|
||||||
// function description: Receives a player's unit as param and return the information array for SIMTAK
|
|
||||||
|
|
||||||
params["_unit"];
|
|
||||||
|
|
||||||
private _location = (getPos _unit) call armatak_fnc_convert_location;
|
|
||||||
|
|
||||||
private _atak_latitude = _location select 0;
|
|
||||||
private _atak_longitude = _location select 1;
|
|
||||||
private _atak_altitude = _location select 2;
|
|
||||||
private _atak_bearing = parseNumber ((getDir _unit) toFixed 0);
|
|
||||||
|
|
||||||
_unit_info = [_atak_latitude,_atak_longitude,_atak_altitude,_atak_bearing];
|
|
||||||
|
|
||||||
_unit_info
|
|
||||||
@@ -7,8 +7,9 @@ params["_unit"];
|
|||||||
private _affiliation = "f";
|
private _affiliation = "f";
|
||||||
private _type = "G";
|
private _type = "G";
|
||||||
private _role = "a-f-G-U-C-I";
|
private _role = "a-f-G-U-C-I";
|
||||||
|
private _side = _unit getVariable ["armatak_current_side", side _unit];
|
||||||
|
|
||||||
switch (str side _unit) do {
|
switch (str _side) do {
|
||||||
case "WEST": {
|
case "WEST": {
|
||||||
_affiliation = "f";
|
_affiliation = "f";
|
||||||
};
|
};
|
||||||
@@ -22,11 +23,11 @@ switch (str side _unit) do {
|
|||||||
_affiliation = "u";
|
_affiliation = "u";
|
||||||
};
|
};
|
||||||
default {
|
default {
|
||||||
_affiliation = "f";
|
_affiliation = "u";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_unit_type = _unit call BIS_fnc_objectType;
|
private _unit_type = _unit call BIS_fnc_objectType;
|
||||||
|
|
||||||
if ((_unit_type select 0) == "Soldier") then {
|
if ((_unit_type select 0) == "Soldier") then {
|
||||||
switch (_unit_type select 1) do {
|
switch (_unit_type select 1) do {
|
||||||
@@ -70,7 +71,7 @@ if ((_unit_type select 0) == "Soldier") then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if ((typeOf (vehicle _unit) != typeOf _unit) or ((_unit_type select 0) == "Vehicle")) then {
|
if ((typeOf (vehicle _unit) != typeOf _unit) or ((_unit_type select 0) == "Vehicle")) then {
|
||||||
_vehicle_type = (vehicle _unit) call BIS_fnc_objectType select 1;
|
private _vehicle_type = (vehicle _unit) call BIS_fnc_objectType select 1;
|
||||||
switch (_vehicle_type) do {
|
switch (_vehicle_type) do {
|
||||||
case "Car": {
|
case "Car": {
|
||||||
_type = "G-U-C-I-M";
|
_type = "G-U-C-I-M";
|
||||||
@@ -110,4 +111,10 @@ if ((typeOf (vehicle _unit) != typeOf _unit) or ((_unit_type select 0) == "Vehic
|
|||||||
|
|
||||||
_role = "a-" + _affiliation + "-" + _type;
|
_role = "a-" + _affiliation + "-" + _type;
|
||||||
|
|
||||||
|
private _markerTypeOverride = _unit getVariable ["armatak_attribute_marker_type", ""];
|
||||||
|
|
||||||
|
if (_markerTypeOverride isNotEqualTo "") then {
|
||||||
|
_role = _markerTypeOverride;
|
||||||
|
};
|
||||||
|
|
||||||
_role
|
_role
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
params["_unit"];
|
||||||
|
|
||||||
|
if (_unit getVariable ["armatak_disable_sensor_data", false]) exitWith {};
|
||||||
|
|
||||||
|
_target = getSensorTargets (_unit);
|
||||||
|
|
||||||
|
{
|
||||||
|
private _targetUnit = _x select 0;
|
||||||
|
_position = _x select 1;
|
||||||
|
_status = _x select 2;
|
||||||
|
private _targetType = toLower (typeOf _targetUnit);
|
||||||
|
|
||||||
|
if ((_targetType find "lasertarget") < 0) then {
|
||||||
|
if (isNil {
|
||||||
|
_targetUnit getVariable "armatak_current_side"
|
||||||
|
}) then {
|
||||||
|
_targetUnit setVariable ["armatak_current_side", side _targetUnit];
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_status != "destroyed" && !(_targetUnit in armatak_server_syncedUnits)) then {
|
||||||
|
_unit_position = _targetUnit call armatak_client_fnc_extractClientPosition;
|
||||||
|
|
||||||
|
_uuid = _targetUnit call armatak_fnc_extract_uuid;
|
||||||
|
_type = _targetUnit call armatak_fnc_extract_role;
|
||||||
|
_callsign = getText (configOf _targetUnit >> "displayName");
|
||||||
|
|
||||||
|
_marker_cot = [_uuid, _type, _unit_position select 1, _unit_position select 2, _unit_position select 3, _callsign, _unit_position select 5, _unit_position select 6];
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:cot:marker", [_marker_cot]];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _target;
|
||||||
@@ -0,0 +1,143 @@
|
|||||||
|
params ["_drone", ["_cameraMode", "turret"]];
|
||||||
|
|
||||||
|
private _override = _drone getVariable ["armatak_uas_camera_data_override", []];
|
||||||
|
private _isLocalController = hasInterface && {!isNull player} && {(getConnectedUAV player) isEqualTo _drone};
|
||||||
|
|
||||||
|
if (!_isLocalController && {_override isEqualType []} && {(count _override) >= 7}) then {
|
||||||
|
private _updatedAt = _override param [6, -1000];
|
||||||
|
if ((time - _updatedAt) <= 5) exitWith {
|
||||||
|
private _overrideSpiAsl = _override param [4, []];
|
||||||
|
private _overrideSpiGeo = _override param [5, []];
|
||||||
|
_drone setVariable ["armatak_uas_spi_asl", _overrideSpiAsl, false];
|
||||||
|
_drone setVariable ["armatak_uas_spi_geo", _overrideSpiGeo, false];
|
||||||
|
_override select [0, 6]
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
private _defaultFov = _drone getVariable ["armatak_uas_fov", 60];
|
||||||
|
private _maxRange = _drone getVariable ["armatak_uas_max_range", 15000];
|
||||||
|
private _originASL = getPosASL _drone;
|
||||||
|
private _originAGL = ASLToAGL _originASL;
|
||||||
|
private _cameraDir = [];
|
||||||
|
private _spiASL = [];
|
||||||
|
private _slantRange = 0;
|
||||||
|
|
||||||
|
if (_cameraMode isNotEqualTo "fpv") then {
|
||||||
|
private _laserTarget = laserTarget _drone;
|
||||||
|
if (!isNull _laserTarget) then {
|
||||||
|
private _laserTargetWorld = getPosWorld _laserTarget;
|
||||||
|
private _laserTargetAslZ = (getPosASL _laserTarget) select 2;
|
||||||
|
_spiASL = [_laserTargetWorld select 0, _laserTargetWorld select 1, _laserTargetAslZ];
|
||||||
|
_cameraDir = _spiASL vectorDiff _originASL;
|
||||||
|
_slantRange = _originASL vectorDistance _spiASL;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_cameraDir isEqualTo [] && {_cameraMode isNotEqualTo "fpv"}) then {
|
||||||
|
private _uavControl = UAVControl _drone;
|
||||||
|
private _controlledTurretPath = _uavControl param [1, []];
|
||||||
|
private _candidateTurrets = [];
|
||||||
|
|
||||||
|
if ((_controlledTurretPath isEqualType []) && {_controlledTurretPath isNotEqualTo []}) then {
|
||||||
|
_candidateTurrets pushBack _controlledTurretPath;
|
||||||
|
};
|
||||||
|
|
||||||
|
{
|
||||||
|
if !(_x in _candidateTurrets) then {
|
||||||
|
_candidateTurrets pushBack _x;
|
||||||
|
};
|
||||||
|
} forEach (allTurrets _drone);
|
||||||
|
|
||||||
|
{
|
||||||
|
private _turretWeapons = _drone weaponsTurret _x;
|
||||||
|
if (_turretWeapons isNotEqualTo []) exitWith {
|
||||||
|
private _weapon = _turretWeapons select 0;
|
||||||
|
private _weaponDirection = _drone weaponDirection _weapon;
|
||||||
|
if (_weaponDirection isNotEqualTo [0, 0, 0]) then {
|
||||||
|
_cameraDir = _weaponDirection;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} forEach _candidateTurrets;
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_cameraDir isEqualTo []) then {
|
||||||
|
_cameraDir = vectorDirVisual _drone;
|
||||||
|
};
|
||||||
|
|
||||||
|
private _dirMagnitude = vectorMagnitude _cameraDir;
|
||||||
|
if (_dirMagnitude <= 0) then {
|
||||||
|
private _fallbackAzimuth = getDir _drone;
|
||||||
|
_cameraDir = [sin _fallbackAzimuth, cos _fallbackAzimuth, -1];
|
||||||
|
_dirMagnitude = vectorMagnitude _cameraDir;
|
||||||
|
};
|
||||||
|
|
||||||
|
_cameraDir = _cameraDir vectorMultiply (1 / _dirMagnitude);
|
||||||
|
|
||||||
|
private _dirX = _cameraDir select 0;
|
||||||
|
private _dirY = _cameraDir select 1;
|
||||||
|
private _dirZ = _cameraDir select 2;
|
||||||
|
private _horizontalMagnitude = sqrt ((_dirX * _dirX) + (_dirY * _dirY));
|
||||||
|
|
||||||
|
private _azimuth = (((_dirX atan2 _dirY) + 360) mod 360);
|
||||||
|
private _elevation = (_dirZ atan2 (_horizontalMagnitude max 0.001));
|
||||||
|
|
||||||
|
if (_spiASL isEqualTo []) then {
|
||||||
|
private _altitudeAGL = (_originAGL select 2) max 0.1;
|
||||||
|
private _probeASL = _originASL vectorAdd (_cameraDir vectorMultiply _maxRange);
|
||||||
|
|
||||||
|
if (_dirZ < -0.01 && {terrainIntersectASL [_originASL, _probeASL]}) then {
|
||||||
|
private _near = _originASL;
|
||||||
|
private _far = _probeASL;
|
||||||
|
|
||||||
|
for "_i" from 0 to 24 do {
|
||||||
|
private _mid = [
|
||||||
|
((_near select 0) + (_far select 0)) / 2,
|
||||||
|
((_near select 1) + (_far select 1)) / 2,
|
||||||
|
((_near select 2) + (_far select 2)) / 2
|
||||||
|
];
|
||||||
|
|
||||||
|
if (terrainIntersectASL [_originASL, _mid]) then {
|
||||||
|
_far = _mid;
|
||||||
|
} else {
|
||||||
|
_near = _mid;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
_spiASL = _far;
|
||||||
|
_slantRange = _originASL vectorDistance _spiASL;
|
||||||
|
} else {
|
||||||
|
private _verticalComponent = abs _dirZ;
|
||||||
|
|
||||||
|
if (_verticalComponent > 0.01) then {
|
||||||
|
_slantRange = (_altitudeAGL / _verticalComponent) min _maxRange;
|
||||||
|
} else {
|
||||||
|
_slantRange = _maxRange;
|
||||||
|
};
|
||||||
|
|
||||||
|
_slantRange = _slantRange max 1;
|
||||||
|
_spiASL = _originASL vectorAdd (_cameraDir vectorMultiply _slantRange);
|
||||||
|
_spiASL set [2, getTerrainHeightASL [_spiASL select 0, _spiASL select 1]];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (_slantRange <= 0) then {
|
||||||
|
_slantRange = (_originASL vectorDistance _spiASL) max 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
private _spiAgl = ASLToAGL _spiASL;
|
||||||
|
private _spiWorld = [_spiAgl select 0, _spiAgl select 1, (_spiAgl select 2) max 0];
|
||||||
|
private _spiGeo = _spiWorld call armatak_client_fnc_convertClientLocation;
|
||||||
|
|
||||||
|
_drone setVariable ["armatak_uas_spi_asl", _spiASL, false];
|
||||||
|
_drone setVariable ["armatak_uas_spi_geo", _spiGeo, false];
|
||||||
|
|
||||||
|
[
|
||||||
|
round _azimuth,
|
||||||
|
round _elevation,
|
||||||
|
round _defaultFov,
|
||||||
|
round (_slantRange max 1),
|
||||||
|
_spiASL,
|
||||||
|
_spiGeo
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
// function name: armatak_fnc_extract_unit_callsign
|
||||||
|
// function author: Valmo
|
||||||
|
// function description: Gets the unit name or classname to be used as TAK callsign from a unit
|
||||||
|
|
||||||
|
params["_unit"];
|
||||||
|
|
||||||
|
private _callsign = "";
|
||||||
|
|
||||||
|
if (roleDescription _unit != "") then {
|
||||||
|
_callsign = ([name _unit] call armatak_fnc_shorten_name) + " | " + roleDescription _unit;
|
||||||
|
} else {
|
||||||
|
_callsign = name _unit;
|
||||||
|
|
||||||
|
if (_callsign == "Error: No unit") then {
|
||||||
|
_callsign = getText (configOf _unit >> "displayName");
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
if (side _unit == east) then {
|
||||||
|
_callsign = getText (configOf _unit >> "displayName");
|
||||||
|
};
|
||||||
|
|
||||||
|
private _unitCallsignOverride = _unit getVariable ["armatak_attribute_unit_callsign", ""];
|
||||||
|
|
||||||
|
if (_unitCallsignOverride isNotEqualTo "") then {
|
||||||
|
_callsign = _unitCallsignOverride;
|
||||||
|
};
|
||||||
|
|
||||||
|
_callsign
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
params [
|
|
||||||
["_logic", objNull, [objNull]],
|
|
||||||
["_units", [], [[]]],
|
|
||||||
["_activated", true, [true]]
|
|
||||||
];
|
|
||||||
|
|
||||||
if (isServer) exitWith {
|
|
||||||
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Connecting to TAK Server TCP Socket..."];
|
|
||||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
|
||||||
|
|
||||||
addMissionEventHandler ["ExtensionCallback", {
|
|
||||||
params ["_name", "_function", "_data"];
|
|
||||||
|
|
||||||
if (_name == "armatak_tcp_socket") then {
|
|
||||||
_warning = format ["<t color='#00FF21'>ARMATAK</t><br/> %1", _function];
|
|
||||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_name == "armatak_tcp_socket_error") then {
|
|
||||||
_warning = format ["<t color='#FF0021'>ARMATAK</t><br/> %1", _function];
|
|
||||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_name == "armatak_video") then {
|
|
||||||
_warning = format ["<t color='#00FF21'>ARMATAK</t><br/> %1", _function];
|
|
||||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (_name == "armatak_video_error") then {
|
|
||||||
_warning = format ["<t color='#FF0021'>ARMATAK</t><br/> %1", _function];
|
|
||||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
|
||||||
};
|
|
||||||
}];
|
|
||||||
|
|
||||||
_tak_server_instance_address = _logic getVariable "armatak_module_tak_server_instance_address";
|
|
||||||
_tak_server_instance_port = _logic getVariable "armatak_module_tak_server_instance_port";
|
|
||||||
|
|
||||||
_tak_server_fulladdress = _tak_server_instance_address + ":" + (str _tak_server_instance_port);
|
|
||||||
|
|
||||||
missionNamespace setVariable ["_atak_server_instance", _tak_server_fulladdress];
|
|
||||||
missionNamespace setVariable ["_group_colors", ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"]];
|
|
||||||
|
|
||||||
"armatak" callExtension ["cot_router:start", [_tak_server_fulladdress]];
|
|
||||||
|
|
||||||
_syncUnits = synchronizedObjects _logic;
|
|
||||||
|
|
||||||
missionNamespace setVariable ["_armatak_marked_units", _syncUnits];
|
|
||||||
|
|
||||||
_syncedUnits = missionNamespace getVariable "_armatak_marked_units";
|
|
||||||
|
|
||||||
[{
|
|
||||||
_syncedUnits = missionNamespace getVariable "_armatak_marked_units";
|
|
||||||
|
|
||||||
{
|
|
||||||
_objectType = _x call BIS_fnc_objectType;
|
|
||||||
if ((_objectType select 0) == "Soldier") then {
|
|
||||||
_callsign = [_x] call armatak_fnc_extract_callsign;
|
|
||||||
_group_name = [group _x] call armatak_fnc_extract_group_color;
|
|
||||||
_group_role = [_x] call armatak_fnc_extract_group_role;
|
|
||||||
|
|
||||||
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_human_cot;
|
|
||||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
|
||||||
};
|
|
||||||
if ((_objectType select 0) == "Vehicle") then {
|
|
||||||
_atak_type = [_x] call armatak_fnc_extract_role;
|
|
||||||
_callsign = [_x] call armatak_fnc_extract_callsign;
|
|
||||||
|
|
||||||
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
|
|
||||||
};
|
|
||||||
if (unitIsUAV _x) then {
|
|
||||||
[_x] call armatak_fnc_send_drone_cot;
|
|
||||||
[_x] call armatak_fnc_send_digital_pointer_cot;
|
|
||||||
};
|
|
||||||
} forEach _syncedUnits;
|
|
||||||
}, 2, []] call CBA_fnc_addPerFrameHandler;
|
|
||||||
};
|
|
||||||
|
|
||||||
true;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
params[_type, _message];
|
|
||||||
|
|
||||||
"armatak" callExtension ["log", [_type, _message]]
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
params [
|
|
||||||
["_logic", objNull, [objNull]],
|
|
||||||
["_units", [], [[]]],
|
|
||||||
["_activated", true, [true]]
|
|
||||||
];
|
|
||||||
|
|
||||||
if (isServer) exitWith {
|
|
||||||
armatak_module_mediamtx_video_stream_instance_address = _logic getVariable "armatak_module_mediamtx_video_stream_instance_address";
|
|
||||||
armatak_module_mediamtx_video_stream_instance_port = _logic getVariable "armatak_module_mediamtx_video_stream_instance_port";
|
|
||||||
armatak_module_mediamtx_video_stream_instance_auth_user = _logic getVariable "armatak_module_mediamtx_video_stream_instance_auth_user";
|
|
||||||
armatak_module_mediamtx_video_stream_instance_auth_pass = _logic getVariable "armatak_module_mediamtx_video_stream_instance_auth_pass";
|
|
||||||
|
|
||||||
missionNamespace setVariable ["armatak_mediamtx_video_stream_instance_address", armatak_module_mediamtx_video_stream_instance_address];
|
|
||||||
missionNamespace setVariable ["armatak_mediamtx_video_stream_instance_port", armatak_module_mediamtx_video_stream_instance_port];
|
|
||||||
missionNamespace setVariable ["armatak_mediamtx_video_stream_instance_auth_user", armatak_module_mediamtx_video_stream_instance_auth_user];
|
|
||||||
missionNamespace setVariable ["armatak_mediamtx_video_stream_instance_auth_pass", armatak_module_mediamtx_video_stream_instance_auth_pass];
|
|
||||||
|
|
||||||
_startAction = [
|
|
||||||
"ArmatakStartStream",
|
|
||||||
"Start Video Feed",
|
|
||||||
"",
|
|
||||||
{
|
|
||||||
_uuid = (_this select 0) call armatak_fnc_extract_uuid;
|
|
||||||
|
|
||||||
_uuid = (_this select 0) call armatak_fnc_extract_uuid;
|
|
||||||
_uuid_short = _uuid select [0, 8];
|
|
||||||
_role = roleDescription (_this select 0);
|
|
||||||
_name = name (_this select 0);
|
|
||||||
|
|
||||||
_role = [_role] call BIS_fnc_filterString;
|
|
||||||
_name = [_name] call BIS_fnc_filterString;
|
|
||||||
|
|
||||||
_stream_path = _name + "_" + _role + "_" + _uuid_short;
|
|
||||||
|
|
||||||
armatak_mediamtx_video_stream_instance_address = missionNamespace getVariable "armatak_mediamtx_video_stream_instance_address";
|
|
||||||
armatak_mediamtx_video_stream_instance_port = missionNamespace getVariable "armatak_mediamtx_video_stream_instance_port";
|
|
||||||
armatak_mediamtx_video_stream_instance_auth_user = missionNamespace getVariable "armatak_mediamtx_video_stream_instance_auth_user";
|
|
||||||
armatak_mediamtx_video_stream_instance_auth_pass = missionNamespace getVariable "armatak_mediamtx_video_stream_instance_auth_pass";
|
|
||||||
|
|
||||||
"armatak" callExtension ["video_stream:start", [armatak_mediamtx_video_stream_instance_address, armatak_mediamtx_video_stream_instance_port, _uuid, armatak_mediamtx_video_stream_instance_auth_user, armatak_mediamtx_video_stream_instance_auth_pass]];
|
|
||||||
(_this select 0) setVariable ["armatak_video_feed_is_streaming", true];
|
|
||||||
},
|
|
||||||
{
|
|
||||||
(_this select 0) getVariable "armatak_video_feed_is_streaming" == false
|
|
||||||
}
|
|
||||||
] call ace_interact_menu_fnc_createAction;
|
|
||||||
[
|
|
||||||
"Man",
|
|
||||||
1,
|
|
||||||
["ACE_SelfActions"],
|
|
||||||
_startAction,
|
|
||||||
true
|
|
||||||
] call ace_interact_menu_fnc_addActionToClass;
|
|
||||||
|
|
||||||
_stopAction = [
|
|
||||||
"ArmatakStopStream",
|
|
||||||
"Stop Video Feed",
|
|
||||||
"",
|
|
||||||
{
|
|
||||||
"armatak" callExtension ["video_stream:stop", []];
|
|
||||||
(_this select 0) setVariable ["armatak_video_feed_is_streaming", false];
|
|
||||||
},
|
|
||||||
{
|
|
||||||
(_this select 0) getVariable "armatak_video_feed_is_streaming"
|
|
||||||
}
|
|
||||||
] call ace_interact_menu_fnc_createAction;
|
|
||||||
[
|
|
||||||
"Man",
|
|
||||||
1,
|
|
||||||
["ACE_SelfActions"],
|
|
||||||
_stopAction,
|
|
||||||
true
|
|
||||||
] call ace_interact_menu_fnc_addActionToClass;
|
|
||||||
if (isMultiplayer) then {
|
|
||||||
{
|
|
||||||
_x setVariable ["armatak_video_feed_is_streaming", false];
|
|
||||||
} forEach playableUnits;
|
|
||||||
} else {
|
|
||||||
player setVariable ["armatak_video_feed_is_streaming", false];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
true;
|
|
||||||
3
addons/main/functions/fnc_logMessage.sqf
Normal file
3
addons/main/functions/fnc_logMessage.sqf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
params["_type", "_message"];
|
||||||
|
|
||||||
|
"armatak" callExtension ["log", [_type, _message]]
|
||||||
21
addons/main/functions/fnc_notify.sqf
Normal file
21
addons/main/functions/fnc_notify.sqf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
params ["_message", "_type", ["_title", "ARMATAK"]];
|
||||||
|
|
||||||
|
switch (_type) do {
|
||||||
|
case "success": {
|
||||||
|
_warning = format ["<t color='#00FF21'>ARMATAK - %1</t><br/> %2", _title, _message];
|
||||||
|
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||||
|
};
|
||||||
|
case "warning": {
|
||||||
|
_warning = format ["<t color='#ffff16'>ARMATAK - %1</t><br/> %2", _title, _message];
|
||||||
|
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||||
|
};
|
||||||
|
case "error": {
|
||||||
|
_warning = format ["<t color='#FF0021'>ARMATAK - %1</t><br/> %2", _title, _message];
|
||||||
|
[[_warning, 1.5]] call CBA_fnc_notify;
|
||||||
|
};
|
||||||
|
default {
|
||||||
|
systemChat format ["%1 - %2", _title, _message];
|
||||||
|
};
|
||||||
|
};
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
params["_latitude", "_longitude", "_altitude"];
|
|
||||||
|
|
||||||
_position = [_latitude, _longitude, _altitude];
|
|
||||||
|
|
||||||
_realLocation = null;
|
|
||||||
|
|
||||||
switch (toLower worldName) do {
|
|
||||||
case "altis": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_altis;
|
|
||||||
};
|
|
||||||
case "stratis": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_stratis;
|
|
||||||
};
|
|
||||||
case "malden": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_malden;
|
|
||||||
};
|
|
||||||
case "vr": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_vr;
|
|
||||||
};
|
|
||||||
case "cucui": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_cucui;
|
|
||||||
};
|
|
||||||
case "chernarus": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_chernarus;
|
|
||||||
};
|
|
||||||
case "chernarus_summer": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_chernarus;
|
|
||||||
};
|
|
||||||
case "chernarus_winter": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_chernarus;
|
|
||||||
};
|
|
||||||
case "bootcamp_acr": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_bukovina;
|
|
||||||
};
|
|
||||||
case "woodland_acr": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_bystrika;
|
|
||||||
};
|
|
||||||
case "mountains_acr": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_takistan_montains;
|
|
||||||
};
|
|
||||||
case "sara_dbe1": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_united_sahrani;
|
|
||||||
};
|
|
||||||
case "saralite": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_southen_sahrani;
|
|
||||||
};
|
|
||||||
case "enoch": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_livonia;
|
|
||||||
};
|
|
||||||
case "kunduz": {
|
|
||||||
_realLocation = _position call armatak_fnc_convert_to_kunduz;
|
|
||||||
};
|
|
||||||
default {
|
|
||||||
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Unsupported Map"];
|
|
||||||
[[_warning, 1.5]] call CBA_fnc_notify;
|
|
||||||
|
|
||||||
_realLocation = [0, 0, 0];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
_realLocation
|
|
||||||
23
addons/main/functions/map/fn_convert_to_clafghan.sqf
Normal file
23
addons/main/functions/map/fn_convert_to_clafghan.sqf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
params["_latitude", "_longitude", "_altitude"];
|
||||||
|
|
||||||
|
_playerPosition = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
|
_playerLatitude = _playerPosition select 0;
|
||||||
|
_playerLongitude = _playerPosition select 1;
|
||||||
|
|
||||||
|
_playerMaxLatitude = 20480;
|
||||||
|
_playerMaxLongitude = 20480;
|
||||||
|
|
||||||
|
_MapMaxLongitude = 33.728772;
|
||||||
|
_MapMinLongitude = 33.542815;
|
||||||
|
|
||||||
|
_MapMaxLatitude = 63.169746;
|
||||||
|
_MapMinLatitude = 62.938820;
|
||||||
|
|
||||||
|
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
||||||
|
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
||||||
|
|
||||||
|
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
||||||
|
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
||||||
|
|
||||||
|
[_RealLongitude, _RealLatitude, _playerPosition select 2]
|
||||||
23
addons/main/functions/map/fn_convert_to_colombia.sqf
Normal file
23
addons/main/functions/map/fn_convert_to_colombia.sqf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
params["_latitude", "_longitude", "_altitude"];
|
||||||
|
|
||||||
|
_playerPosition = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
|
_playerLatitude = _playerPosition select 0;
|
||||||
|
_playerLongitude = _playerPosition select 1;
|
||||||
|
|
||||||
|
_playerMaxLatitude = 20480;
|
||||||
|
_playerMaxLongitude = 20480;
|
||||||
|
|
||||||
|
_MapMaxLatitude = -67.765153;
|
||||||
|
_MapMinLatitude = -68.223664;
|
||||||
|
|
||||||
|
_MapMaxLongitude = 10.593815;
|
||||||
|
_MapMinLongitude = 10.137466;
|
||||||
|
|
||||||
|
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
||||||
|
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
||||||
|
|
||||||
|
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
||||||
|
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
||||||
|
|
||||||
|
[_RealLongitude, _RealLatitude, _playerPosition select 2]
|
||||||
30
addons/main/functions/map/fn_convert_to_hellanmaa.sqf
Normal file
30
addons/main/functions/map/fn_convert_to_hellanmaa.sqf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
||||||
|
|
||||||
|
private _mapWidth = 8192;
|
||||||
|
private _mapHeight = 8192;
|
||||||
|
|
||||||
|
// SW corner (used as origin)
|
||||||
|
private _SW_lat = 63.005389;
|
||||||
|
private _SW_lon = 22.638957;
|
||||||
|
|
||||||
|
// SE corner
|
||||||
|
private _SE_lat = 63.010092;
|
||||||
|
private _SE_lon = 22.800107;
|
||||||
|
|
||||||
|
// NW corner
|
||||||
|
private _NW_lat = 63.078713;
|
||||||
|
private _NW_lon = 22.628542;
|
||||||
|
|
||||||
|
private _edgeSE_lat = _SE_lat - _SW_lat;
|
||||||
|
private _edgeSE_lon = _SE_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _edgeNW_lat = _NW_lat - _SW_lat;
|
||||||
|
private _edgeNW_lon = _NW_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _fx = _longitudeInGame / _mapWidth;
|
||||||
|
private _fy = _latitudeInGame / _mapHeight;
|
||||||
|
|
||||||
|
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
|
||||||
|
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
|
||||||
|
|
||||||
|
[_realLat, _realLon, _altitude]
|
||||||
@@ -4,16 +4,16 @@ private _mapWidth = 5120;
|
|||||||
private _mapHeight = 5120;
|
private _mapHeight = 5120;
|
||||||
|
|
||||||
// SW corner (used as origin)
|
// SW corner (used as origin)
|
||||||
private _SW_lat = 36.588437;
|
private _SW_lat = 36.581566;
|
||||||
private _SW_lon = 68.834763;
|
private _SW_lon = 68.839770;
|
||||||
|
|
||||||
// SE corner
|
// SE corner
|
||||||
private _SE_lat = 36.574950;
|
private _SE_lat = 36.581566;
|
||||||
private _SE_lon = 68.899151;
|
private _SE_lon = 68.905867;
|
||||||
|
|
||||||
// NW corner
|
// NW corner
|
||||||
private _NW_lat = 36.640080;
|
private _NW_lat = 36.633309;
|
||||||
private _NW_lon = 68.847941;
|
private _NW_lon = 68.839770;
|
||||||
|
|
||||||
private _edgeSE_lat = _SE_lat - _SW_lat;
|
private _edgeSE_lat = _SE_lat - _SW_lat;
|
||||||
private _edgeSE_lon = _SE_lon - _SW_lon;
|
private _edgeSE_lon = _SE_lon - _SW_lon;
|
||||||
|
|||||||
30
addons/main/functions/map/fn_convert_to_kunduz_valley.sqf
Normal file
30
addons/main/functions/map/fn_convert_to_kunduz_valley.sqf
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
||||||
|
|
||||||
|
private _mapWidth = 10240;
|
||||||
|
private _mapHeight = 10240;
|
||||||
|
|
||||||
|
// SW corner (used as origin)
|
||||||
|
private _SW_lat = 36.547662;
|
||||||
|
private _SW_lon = 68.802314;
|
||||||
|
|
||||||
|
// SE corner
|
||||||
|
private _SE_lat = 36.547662;
|
||||||
|
private _SE_lon = 68.916671;
|
||||||
|
|
||||||
|
// NW corner
|
||||||
|
private _NW_lat = 36.639935;
|
||||||
|
private _NW_lon = 68.802314;
|
||||||
|
|
||||||
|
private _edgeSE_lat = _SE_lat - _SW_lat;
|
||||||
|
private _edgeSE_lon = _SE_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _edgeNW_lat = _NW_lat - _SW_lat;
|
||||||
|
private _edgeNW_lon = _NW_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _fx = _longitudeInGame / _mapWidth;
|
||||||
|
private _fy = _latitudeInGame / _mapHeight;
|
||||||
|
|
||||||
|
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
|
||||||
|
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
|
||||||
|
|
||||||
|
[_realLat, _realLon, _altitude]
|
||||||
23
addons/main/functions/map/fn_convert_to_lawn.sqf
Normal file
23
addons/main/functions/map/fn_convert_to_lawn.sqf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
params["_latitude", "_longitude", "_altitude"];
|
||||||
|
|
||||||
|
_playerPosition = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
|
_playerLatitude = _playerPosition select 0;
|
||||||
|
_playerLongitude = _playerPosition select 1;
|
||||||
|
|
||||||
|
_playerMaxLongitude = 4992;
|
||||||
|
_playerMaxLatitude = 4992;
|
||||||
|
|
||||||
|
_MapMaxLongitude = -99.722665;
|
||||||
|
_MapMinLongitude = -99.775505;
|
||||||
|
|
||||||
|
_MapMaxLatitude = 32.159272;
|
||||||
|
_MapMinLatitude = 32.114011;
|
||||||
|
|
||||||
|
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
||||||
|
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
||||||
|
|
||||||
|
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
||||||
|
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
||||||
|
|
||||||
|
[_RealLongitude, _RealLatitude, _playerPosition select 2]
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
||||||
|
|
||||||
|
private _mapWidth = 11264;
|
||||||
|
private _mapHeight = 11264;
|
||||||
|
|
||||||
|
// SW corner (used as origin)
|
||||||
|
private _SW_lat = -51.736078;
|
||||||
|
private _SW_lon = -57.915032;
|
||||||
|
|
||||||
|
// SE corner
|
||||||
|
private _SE_lat = -51.736078;
|
||||||
|
private _SE_lon = -58.077879;
|
||||||
|
|
||||||
|
// NW corner
|
||||||
|
private _NW_lat = -51.634750;
|
||||||
|
private _NW_lon = -58.077879;
|
||||||
|
|
||||||
|
private _edgeSE_lat = _SE_lat - _SW_lat;
|
||||||
|
private _edgeSE_lon = _SE_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _edgeNW_lat = _NW_lat - _SW_lat;
|
||||||
|
private _edgeNW_lon = _NW_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _fx = _longitudeInGame / _mapWidth;
|
||||||
|
private _fy = _latitudeInGame / _mapHeight;
|
||||||
|
|
||||||
|
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
|
||||||
|
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
|
||||||
|
|
||||||
|
[_realLat, _realLon, _altitude]
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
||||||
|
|
||||||
|
private _mapWidth = 16384;
|
||||||
|
private _mapHeight = 16384;
|
||||||
|
|
||||||
|
// SW corner (used as origin)
|
||||||
|
private _SW_lat = -51.806546;
|
||||||
|
private _SW_lon = -57.939747;
|
||||||
|
|
||||||
|
// SE corner
|
||||||
|
private _SE_lat = -51.806546;
|
||||||
|
private _SE_lon = -57.701978;
|
||||||
|
|
||||||
|
// NW corner
|
||||||
|
private _NW_lat = -51.658913;
|
||||||
|
private _NW_lon = -57.939747;
|
||||||
|
|
||||||
|
private _edgeSE_lat = _SE_lat - _SW_lat;
|
||||||
|
private _edgeSE_lon = _SE_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _edgeNW_lat = _NW_lat - _SW_lat;
|
||||||
|
private _edgeNW_lon = _NW_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _fx = _longitudeInGame / _mapWidth;
|
||||||
|
private _fy = _latitudeInGame / _mapHeight;
|
||||||
|
|
||||||
|
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
|
||||||
|
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
|
||||||
|
|
||||||
|
[_realLat, _realLon, _altitude]
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
||||||
|
|
||||||
|
private _mapWidth = 10240;
|
||||||
|
private _mapHeight = 10240;
|
||||||
|
|
||||||
|
// SW corner (used as origin)
|
||||||
|
private _SW_lat = -51.863358;
|
||||||
|
private _SW_lon = -59.054585;
|
||||||
|
|
||||||
|
// SE corner
|
||||||
|
private _SE_lat = -51.863358;
|
||||||
|
private _SE_lon = -58.906155;
|
||||||
|
|
||||||
|
// NW corner
|
||||||
|
private _NW_lat = -51.771493;
|
||||||
|
private _NW_lon = -59.054585;
|
||||||
|
|
||||||
|
private _edgeSE_lat = _SE_lat - _SW_lat;
|
||||||
|
private _edgeSE_lon = _SE_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _edgeNW_lat = _NW_lat - _SW_lat;
|
||||||
|
private _edgeNW_lon = _NW_lon - _SW_lon;
|
||||||
|
|
||||||
|
private _fx = _longitudeInGame / _mapWidth;
|
||||||
|
private _fy = _latitudeInGame / _mapHeight;
|
||||||
|
|
||||||
|
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
|
||||||
|
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
|
||||||
|
|
||||||
|
[_realLat, _realLon, _altitude]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
params["_latitude", "_longitude", "_altitude"];
|
||||||
|
|
||||||
|
_playerPosition = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
|
_playerLatitude = _playerPosition select 0;
|
||||||
|
_playerLongitude = _playerPosition select 1;
|
||||||
|
|
||||||
|
_playerMaxLongitude = 5120;
|
||||||
|
_playerMaxLatitude = 5120;
|
||||||
|
|
||||||
|
_MapMaxLatitude = -51.619725;
|
||||||
|
_MapMinLatitude = -51.664223;
|
||||||
|
|
||||||
|
_MapMaxLongitude = -58.394630;
|
||||||
|
_MapMinLongitude = -58.469580;
|
||||||
|
|
||||||
|
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
||||||
|
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
||||||
|
|
||||||
|
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
||||||
|
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
||||||
|
|
||||||
|
[_RealLongitude, _RealLatitude, _playerPosition select 2]
|
||||||
23
addons/main/functions/map/fn_convert_to_rut_mandol.sqf
Normal file
23
addons/main/functions/map/fn_convert_to_rut_mandol.sqf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
params["_latitude", "_longitude", "_altitude"];
|
||||||
|
|
||||||
|
_playerPosition = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
|
_playerLatitude = _playerPosition select 0;
|
||||||
|
_playerLongitude = _playerPosition select 1;
|
||||||
|
|
||||||
|
_playerMaxLatitude = 32768;
|
||||||
|
_playerMaxLongitude = 32768;
|
||||||
|
|
||||||
|
_MapMaxLongitude = 35.285485;
|
||||||
|
_MapMinLongitude = 34.927617;
|
||||||
|
|
||||||
|
_MapMaxLatitude = 70.445404;
|
||||||
|
_MapMinLatitude = 70.016783;
|
||||||
|
|
||||||
|
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
||||||
|
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
||||||
|
|
||||||
|
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
||||||
|
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
||||||
|
|
||||||
|
[_RealLongitude, _RealLatitude, _playerPosition select 2]
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
||||||
|
|
||||||
private _mapWidth = 30720;
|
private _mapWidth = 8192;
|
||||||
private _mapHeight = 30720;
|
private _mapHeight = 8192;
|
||||||
|
|
||||||
// SW corner (used as origin)
|
// SW corner (used as origin)
|
||||||
private _SW_lat = 39.456910;
|
private _SW_lat = 39.458019;
|
||||||
private _SW_lon = 24.940792;
|
private _SW_lon = 24.939314;
|
||||||
|
|
||||||
// SE corner
|
// SE corner
|
||||||
private _SE_lat = 39.459151;
|
private _SE_lat = 39.458019;
|
||||||
private _SE_lon = 25.083440;
|
private _SE_lon = 25.081992;
|
||||||
|
|
||||||
// NW corner
|
// NW corner
|
||||||
private _NW_lat = 39.567714;
|
private _NW_lat = 39.568847;
|
||||||
private _NW_lon = 24.937866;
|
private _NW_lon = 24.939314;
|
||||||
|
|
||||||
private _edgeSE_lat = _SE_lat - _SW_lat;
|
private _edgeSE_lat = _SE_lat - _SW_lat;
|
||||||
private _edgeSE_lon = _SE_lon - _SW_lon;
|
private _edgeSE_lon = _SE_lon - _SW_lon;
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
|
||||||
|
|
||||||
private _mapWidth = 30720;
|
private _mapWidth = 15360;
|
||||||
private _mapHeight = 30720;
|
private _mapHeight = 15360;
|
||||||
|
|
||||||
// SW corner (used as origin)
|
// SW corner (used as origin)
|
||||||
private _SW_lat = -19.086825;
|
private _SW_lat = -19.086803;
|
||||||
private _SW_lon = 176.812772;
|
private _SW_lon = 176.812619;
|
||||||
|
|
||||||
// SE corner
|
// SE corner
|
||||||
private _SE_lat = -19.086825;
|
private _SE_lat = -19.086803;
|
||||||
private _SE_lon = 178.687920;
|
private _SE_lon = 178.704583;
|
||||||
|
|
||||||
// NW corner
|
// NW corner
|
||||||
private _NW_lat = -17.196898;
|
private _NW_lat = -17.196900;
|
||||||
private _NW_lon = 176.812622;
|
private _NW_lon = 176.812619;
|
||||||
|
|
||||||
private _edgeSE_lat = _SE_lat - _SW_lat;
|
private _edgeSE_lat = _SE_lat - _SW_lat;
|
||||||
private _edgeSE_lon = _SE_lon - _SW_lon;
|
private _edgeSE_lon = _SE_lon - _SW_lon;
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
params["_latitude", "_longitude", "_altitude"];
|
||||||
|
|
||||||
|
_playerPosition = [_latitude, _longitude, _altitude];
|
||||||
|
|
||||||
|
_playerLatitude = _playerPosition select 0;
|
||||||
|
_playerLongitude = _playerPosition select 1;
|
||||||
|
|
||||||
|
_playerMaxLongitude = 20480;
|
||||||
|
_playerMaxLatitude = 20480;
|
||||||
|
|
||||||
|
_MapMaxLongitude = 48.351216;
|
||||||
|
_MapMinLongitude = 48.097496;
|
||||||
|
|
||||||
|
_MapMaxLatitude = 38.345389;
|
||||||
|
_MapMinLatitude = 37.956754;
|
||||||
|
|
||||||
|
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
|
||||||
|
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
|
||||||
|
|
||||||
|
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
|
||||||
|
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
|
||||||
|
|
||||||
|
[_RealLongitude, _RealLatitude, _playerPosition select 2]
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
if (!hasInterface) exitWith {};
|
|
||||||
|
|
||||||
_local_address = "armatak" callExtension ["local_ip", []] select 0;
|
|
||||||
|
|
||||||
player setVariable ["localAddress", _local_address];
|
|
||||||
|
|
||||||
player addEventHandler ["Respawn", {
|
|
||||||
params["_unit", "_corpse"];
|
|
||||||
[{
|
|
||||||
if (alive _this) then {
|
|
||||||
"armatak" callExtension ["websocket:location", [player call armatak_fnc_extract_position]];
|
|
||||||
};
|
|
||||||
}, 1, []] call CBA_fnc_addPerFrameHandler;
|
|
||||||
}];
|
|
||||||
|
|
||||||
[{
|
|
||||||
"armatak" callExtension ["websocket:location", [player call armatak_fnc_extract_position]];
|
|
||||||
}, 1, []] call CBA_fnc_addPerFrameHandler;
|
|
||||||
17
addons/main/script_component.hpp
Normal file
17
addons/main/script_component.hpp
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#define COMPONENT main
|
||||||
|
#define COMPONENT_BEAUTIFIED Main
|
||||||
|
#include "\armatak\armatak\addons\main\script_mod.hpp"
|
||||||
|
|
||||||
|
// #define DEBUG_MODE_FULL
|
||||||
|
// #define DISABLE_COMPILE_CACHE
|
||||||
|
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED_MAIN
|
||||||
|
#define DEBUG_MODE_FULL
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef DEBUG_SETTINGS_MAIN
|
||||||
|
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "\z\ace\addons\main\script_macros.hpp"
|
||||||
32
addons/main/script_mod.hpp
Normal file
32
addons/main/script_mod.hpp
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
// COMPONENT should be defined in the script_component.hpp and included BEFORE this hpp
|
||||||
|
|
||||||
|
#define MAINPREFIX armatak
|
||||||
|
#define PREFIX armatak
|
||||||
|
|
||||||
|
#include "script_version.hpp"
|
||||||
|
|
||||||
|
#define VERSION MAJOR.MINOR
|
||||||
|
#define VERSION_STR MAJOR.MINOR.PATCHLVL.BUILD
|
||||||
|
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
|
||||||
|
|
||||||
|
#define PROJECT_AUTHOR QUOTE(Valmo Trindade)
|
||||||
|
|
||||||
|
// MINIMAL required version for the Mod. Components can specify others..
|
||||||
|
#define REQUIRED_VERSION 2.18
|
||||||
|
#define REQUIRED_CBA_VERSION {3,18,2}
|
||||||
|
|
||||||
|
#ifndef COMPONENT_BEAUTIFIED
|
||||||
|
#define COMPONENT_BEAUTIFIED COMPONENT
|
||||||
|
#endif
|
||||||
|
#ifdef SUBCOMPONENT_BEAUTIFIED
|
||||||
|
#define COMPONENT_NAME QUOTE(ARMATAK - COMPONENT_BEAUTIFIED - SUBCOMPONENT_BEAUTIFIED)
|
||||||
|
#else
|
||||||
|
#define COMPONENT_NAME QUOTE(ARMATAK - COMPONENT_BEAUTIFIED)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Custom ARMATAK MACRO defines
|
||||||
|
|
||||||
|
#define EXTENSION_NAME QUOTE(armatak)
|
||||||
|
|
||||||
|
#define CALLEXT(var) EXTENSION_NAME callExtension [QUOTE(var),[]]
|
||||||
|
#define CALLEXTP(var1, var2) EXTENSION_NAME callExtension [QUOTE(var1), var2] select 0
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
#define build 0
|
#define build 0
|
||||||
#define major 1
|
#define major 1
|
||||||
#define minor 0
|
#define minor 1
|
||||||
#define patch 0
|
#define patch 0
|
||||||
1
addons/server/$PBOPREFIX$
Normal file
1
addons/server/$PBOPREFIX$
Normal file
@@ -0,0 +1 @@
|
|||||||
|
armatak\armatak\addons\server
|
||||||
11
addons/server/CfgEventHandlers.hpp
Normal file
11
addons/server/CfgEventHandlers.hpp
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
class Extended_PreStart_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class Extended_PreInit_EventHandlers {
|
||||||
|
class ADDON {
|
||||||
|
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
|
||||||
|
};
|
||||||
|
};
|
||||||
133
addons/server/CfgVehicles.hpp
Normal file
133
addons/server/CfgVehicles.hpp
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
class CfgVehicles {
|
||||||
|
class Logic;
|
||||||
|
class Module_F : Logic {
|
||||||
|
class AttributesBase {
|
||||||
|
class Edit;
|
||||||
|
class ModuleDescription;
|
||||||
|
};
|
||||||
|
class ModuleDescription;
|
||||||
|
};
|
||||||
|
|
||||||
|
class GVAR(moduleBase): Module_F {
|
||||||
|
author = PROJECT_AUTHOR;
|
||||||
|
category = QEGVAR(main,moduleCategory);
|
||||||
|
function = QUOTE({});
|
||||||
|
functionPriority = 1;
|
||||||
|
isGlobal = 1;
|
||||||
|
isTriggerActivated = 0;
|
||||||
|
scope = 1;
|
||||||
|
scopeCurator = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
class GVAR(connectionModuleBase): GVAR(moduleBase) {
|
||||||
|
scopeCurator = 0;
|
||||||
|
icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa";
|
||||||
|
category = QEGVAR(main,moduleCategory);
|
||||||
|
functionPriority = 1;
|
||||||
|
isGlobal = 0;
|
||||||
|
isTriggerActivated = 1;
|
||||||
|
isDisposable = 1;
|
||||||
|
is3den = 0;
|
||||||
|
curatorCanAttach = 0;
|
||||||
|
curatorInfoType = "RscDisplayAttributeModuleNuke";
|
||||||
|
canSetArea = 0;
|
||||||
|
canSetAreaShape = 0;
|
||||||
|
canSetAreaHeight = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class GVAR(tcpModule): GVAR(connectionModuleBase) {
|
||||||
|
scope = 2;
|
||||||
|
displayName = "CoT Router (TCP)";
|
||||||
|
function = QFUNC(3denTcpModuleConfig);
|
||||||
|
|
||||||
|
class Attributes: AttributesBase {
|
||||||
|
class GVAR(moduleInstanceAddress): Edit {
|
||||||
|
property = QGVAR(moduleInstanceAddress);
|
||||||
|
displayName = "TAK Server Address";
|
||||||
|
tooltip = "Hostname or IP address for the TAK or IronTAK server.";
|
||||||
|
typeName = "STRING";
|
||||||
|
defaultValue = "'localhost'";
|
||||||
|
};
|
||||||
|
class GVAR(moduleInstancePort): Edit {
|
||||||
|
property = QGVAR(moduleInstancePort);
|
||||||
|
displayName = "TAK Server TCP Port";
|
||||||
|
tooltip = "Port for the unauthenticated TCP socket.";
|
||||||
|
typeName = "NUMBER";
|
||||||
|
defaultValue = "8088";
|
||||||
|
};
|
||||||
|
class ModuleDescription: ModuleDescription {};
|
||||||
|
};
|
||||||
|
|
||||||
|
class ModuleDescription: ModuleDescription {
|
||||||
|
description = "Connect ArmaTAK to a TAK server over plain TCP.";
|
||||||
|
sync[] = {"LocationArea_F"};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class GVAR(enrollModule): GVAR(connectionModuleBase) {
|
||||||
|
scope = 2;
|
||||||
|
displayName = "CoT Router (Authenticated)";
|
||||||
|
function = QFUNC(3denEnrollModuleConfig);
|
||||||
|
|
||||||
|
class Attributes: AttributesBase {
|
||||||
|
class GVAR(moduleInstanceAddress): Edit {
|
||||||
|
property = QGVAR(moduleInstanceAddress);
|
||||||
|
displayname = "TAK Server Address";
|
||||||
|
tooltip = "Hostname or IP address used for enrollment and the final TLS connection.";
|
||||||
|
typeName = "STRING";
|
||||||
|
defaultValue = "'localhost'";
|
||||||
|
};
|
||||||
|
class GVAR(moduleEnrollmentPort): Edit {
|
||||||
|
property = QGVAR(moduleEnrollmentPort);
|
||||||
|
displayName = "Enrollment HTTPS Port";
|
||||||
|
tooltip = "Port used for GET /Marti/api/tls/config and POST /Marti/api/tls/signClient/v2.";
|
||||||
|
typeName = "NUMBER";
|
||||||
|
defaultValue = "8446";
|
||||||
|
};
|
||||||
|
class GVAR(moduleEnrollmentUsername): Edit {
|
||||||
|
property = QGVAR(moduleEnrollmentUsername);
|
||||||
|
displayName = "Enrollment Username";
|
||||||
|
tooltip = "Username used in Basic Auth for client certificate enrollment.";
|
||||||
|
typeName = "STRING";
|
||||||
|
defaultValue = "''";
|
||||||
|
};
|
||||||
|
class GVAR(moduleEnrollmentPassword): Edit {
|
||||||
|
property = QGVAR(moduleEnrollmentPassword);
|
||||||
|
displayName = "Enrollment Password";
|
||||||
|
tooltip = "Password used in Basic Auth for client certificate enrollment.";
|
||||||
|
typeName = "STRING";
|
||||||
|
defaultValue = "''";
|
||||||
|
};
|
||||||
|
class ModuleDescription: ModuleDescription {};
|
||||||
|
};
|
||||||
|
|
||||||
|
class ModuleDescription: ModuleDescription {
|
||||||
|
description = "Enroll a client certificate and connect ArmaTAK over mTLS.";
|
||||||
|
sync[] = {"LocationArea_F"};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class GVAR(tcpModuleCurator): GVAR(tcpModule) {
|
||||||
|
scope = 1;
|
||||||
|
scopeCurator = 2;
|
||||||
|
function = "";
|
||||||
|
displayName = "CoT Router (TCP, Zeus)";
|
||||||
|
curatorInfoType = "armatak_zeus_tcp_module_dialog";
|
||||||
|
};
|
||||||
|
|
||||||
|
class GVAR(enrollModuleCurator): GVAR(enrollModule) {
|
||||||
|
scope = 1;
|
||||||
|
scopeCurator = 2;
|
||||||
|
function = "";
|
||||||
|
displayName = "CoT Router (Authenticated, Zeus)";
|
||||||
|
curatorInfoType = "armatak_zeus_enroll_module_dialog";
|
||||||
|
};
|
||||||
|
|
||||||
|
class GVAR(markEntity): GVAR(moduleBase) {
|
||||||
|
curatorCanAttach = 1;
|
||||||
|
category = QEGVAR(main,moduleCategory);
|
||||||
|
displayname = "Mark Entity";
|
||||||
|
function = QFUNC(routerEntityAdd);
|
||||||
|
icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa";
|
||||||
|
};
|
||||||
|
};
|
||||||
7
addons/server/XEH_PREP.hpp
Normal file
7
addons/server/XEH_PREP.hpp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
PREP(3denEnrollModuleConfig);
|
||||||
|
PREP(3denTcpModuleConfig);
|
||||||
|
PREP(routerEntityAdd);
|
||||||
|
PREP(routerEntityRemove);
|
||||||
|
PREP(startCotRouter);
|
||||||
|
PREP(ZeusEnrollModuleConfig);
|
||||||
|
PREP(ZeusTcpModuleConfig);
|
||||||
9
addons/server/XEH_preInit.sqf
Normal file
9
addons/server/XEH_preInit.sqf
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
ADDON = false;
|
||||||
|
|
||||||
|
PREP_RECOMPILE_START;
|
||||||
|
#include "XEH_PREP.hpp"
|
||||||
|
PREP_RECOMPILE_END;
|
||||||
|
|
||||||
|
ADDON = true;
|
||||||
3
addons/server/XEH_preStart.sqf
Normal file
3
addons/server/XEH_preStart.sqf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
#include "XEH_PREP.hpp"
|
||||||
27
addons/server/config.cpp
Normal file
27
addons/server/config.cpp
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
#include "script_component.hpp"
|
||||||
|
|
||||||
|
class CfgPatches {
|
||||||
|
class ADDON {
|
||||||
|
name = COMPONENT_NAME;
|
||||||
|
units[] = {
|
||||||
|
QGVAR(tcpModule),
|
||||||
|
QGVAR(tcpModuleCurator),
|
||||||
|
QGVAR(enrollModule),
|
||||||
|
QGVAR(enrollModuleCurator),
|
||||||
|
QGVAR(markEntity)
|
||||||
|
};
|
||||||
|
weapons[] = {};
|
||||||
|
requiredAddons[] = {
|
||||||
|
"cba_main",
|
||||||
|
"ace_main",
|
||||||
|
"armatak_main"
|
||||||
|
};
|
||||||
|
requiredVersion = REQUIRED_VERSION;
|
||||||
|
author = PROJECT_AUTHOR;
|
||||||
|
url = "https://github.com/valmojr/armatak";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
#include "CfgEventHandlers.hpp"
|
||||||
|
#include "dialog.hpp"
|
||||||
|
#include "CfgVehicles.hpp"
|
||||||
244
addons/server/dialog.hpp
Normal file
244
addons/server/dialog.hpp
Normal file
@@ -0,0 +1,244 @@
|
|||||||
|
class RscText;
|
||||||
|
class RscBackground;
|
||||||
|
class RscButton;
|
||||||
|
class RscEdit;
|
||||||
|
|
||||||
|
class armatak_zeus_tcp_module_dialog {
|
||||||
|
idd = 999991;
|
||||||
|
movingEnable = 0;
|
||||||
|
class ControlsBackground {
|
||||||
|
class main_frame: RscBackground {
|
||||||
|
idc = 1800;
|
||||||
|
x = "0.386562 * safezoneW + safezoneX";
|
||||||
|
y = "0.29 * safezoneH + safezoneY";
|
||||||
|
w = "0.216563 * safezoneW";
|
||||||
|
h = "0.32 * safezoneH";
|
||||||
|
colorBackground[] = {0,0,0,0.45};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Controls {
|
||||||
|
class address_text: RscText {
|
||||||
|
idc = 1000;
|
||||||
|
text = "TAK Server Address";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.332 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class address_edit: RscEdit {
|
||||||
|
idc = 14000;
|
||||||
|
text = "localhost";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.365 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[] = {0,0,0,0.5};
|
||||||
|
};
|
||||||
|
class port_text: RscText {
|
||||||
|
idc = 1001;
|
||||||
|
text = "TAK Server Port";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.425 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class port_edit: RscEdit {
|
||||||
|
idc = 14001;
|
||||||
|
text = "8088";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.458 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[] = {0,0,0,0.5};
|
||||||
|
};
|
||||||
|
class button_cancel: RscButton {
|
||||||
|
idc = 1601;
|
||||||
|
text = "Cancel";
|
||||||
|
action = "closeDialog 2;";
|
||||||
|
x = "0.551563 * safezoneW + safezoneX";
|
||||||
|
y = "0.535 * safezoneH + safezoneY";
|
||||||
|
w = "0.0464063 * safezoneW";
|
||||||
|
h = "0.055 * safezoneH";
|
||||||
|
};
|
||||||
|
class button_ok: RscButton {
|
||||||
|
idc = 1600;
|
||||||
|
text = "Ok";
|
||||||
|
action = QUOTE(call FUNC(ZeusTcpModuleConfig));
|
||||||
|
x = "0.5 * safezoneW + safezoneX";
|
||||||
|
y = "0.535 * safezoneH + safezoneY";
|
||||||
|
w = "0.0464063 * safezoneW";
|
||||||
|
h = "0.055 * safezoneH";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class armatak_zeus_enroll_module_dialog {
|
||||||
|
idd = 999992;
|
||||||
|
movingEnable = 0;
|
||||||
|
class ControlsBackground {
|
||||||
|
class main_frame: RscBackground {
|
||||||
|
idc = 1810;
|
||||||
|
x = "0.386562 * safezoneW + safezoneX";
|
||||||
|
y = "0.2 * safezoneH + safezoneY";
|
||||||
|
w = "0.216563 * safezoneW";
|
||||||
|
h = "0.52 * safezoneH";
|
||||||
|
colorBackground[] = {0,0,0,0.45};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
class Controls {
|
||||||
|
class address_text: RscText {
|
||||||
|
idc = 1010;
|
||||||
|
text = "TAK Server Address";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.242 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class address_edit: RscEdit {
|
||||||
|
idc = 14100;
|
||||||
|
text = "localhost";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.275 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[] = {0,0,0,0.5};
|
||||||
|
};
|
||||||
|
class enroll_port_text: RscText {
|
||||||
|
idc = 1011;
|
||||||
|
text = "Enrollment HTTPS Port";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.335 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class enroll_port_edit: RscEdit {
|
||||||
|
idc = 14101;
|
||||||
|
text = "8446";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.368 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[] = {0,0,0,0.5};
|
||||||
|
};
|
||||||
|
class username_text: RscText {
|
||||||
|
idc = 1012;
|
||||||
|
text = "Enrollment Username";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.428 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class username_edit: RscEdit {
|
||||||
|
idc = 14102;
|
||||||
|
text = "";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.461 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[] = {0,0,0,0.5};
|
||||||
|
};
|
||||||
|
class password_text: RscText {
|
||||||
|
idc = 1013;
|
||||||
|
text = "Enrollment Password";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.521 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.033 * safezoneH";
|
||||||
|
};
|
||||||
|
class password_edit: RscEdit {
|
||||||
|
idc = 14103;
|
||||||
|
text = "";
|
||||||
|
x = "0.391719 * safezoneW + safezoneX";
|
||||||
|
y = "0.554 * safezoneH + safezoneY";
|
||||||
|
w = "0.20625 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
colorBackground[] = {0,0,0,0.5};
|
||||||
|
};
|
||||||
|
class button_cancel: RscButton {
|
||||||
|
idc = 1611;
|
||||||
|
text = "Cancel";
|
||||||
|
action = "closeDialog 2;";
|
||||||
|
x = "0.551563 * safezoneW + safezoneX";
|
||||||
|
y = "0.645 * safezoneH + safezoneY";
|
||||||
|
w = "0.0464063 * safezoneW";
|
||||||
|
h = "0.055 * safezoneH";
|
||||||
|
};
|
||||||
|
class button_ok: RscButton {
|
||||||
|
idc = 1610;
|
||||||
|
text = "Ok";
|
||||||
|
action = QUOTE(call FUNC(ZeusEnrollModuleConfig));
|
||||||
|
x = "0.5 * safezoneW + safezoneX";
|
||||||
|
y = "0.645 * safezoneH + safezoneY";
|
||||||
|
w = "0.0464063 * safezoneW";
|
||||||
|
h = "0.055 * safezoneH";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
class armatak_zeus_custom_marker_dialog {
|
||||||
|
idd = 990991;
|
||||||
|
movingEnable = 0;
|
||||||
|
|
||||||
|
class Controls {
|
||||||
|
class RscFrame_1800: RscBackground
|
||||||
|
{
|
||||||
|
idc = 1800;
|
||||||
|
x = "0.37625 * safezoneW + safezoneX";
|
||||||
|
y = "0.357 * safezoneH + safezoneY";
|
||||||
|
w = "0.237187 * safezoneW";
|
||||||
|
h = "0.275 * safezoneH";
|
||||||
|
};
|
||||||
|
class RscEdit_1400: RscEdit
|
||||||
|
{
|
||||||
|
idc = 1400;
|
||||||
|
x = "0.386562 * safezoneW + safezoneX";
|
||||||
|
y = "0.423 * safezoneH + safezoneY";
|
||||||
|
w = "0.216563 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
};
|
||||||
|
class RscText_1000: RscText
|
||||||
|
{
|
||||||
|
idc = 1000;
|
||||||
|
text = "Entity Callsign";
|
||||||
|
x = "0.386562 * safezoneW + safezoneX";
|
||||||
|
y = "0.379 * safezoneH + safezoneY";
|
||||||
|
w = "0.216563 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
};
|
||||||
|
class RscText_1001: RscText
|
||||||
|
{
|
||||||
|
idc = 1001;
|
||||||
|
text = "Entity Type (only for vehicles)";
|
||||||
|
x = "0.386562 * safezoneW + safezoneX";
|
||||||
|
y = "0.467 * safezoneH + safezoneY";
|
||||||
|
w = "0.216563 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
};
|
||||||
|
class RscEdit_1401: RscEdit
|
||||||
|
{
|
||||||
|
idc = 1401;
|
||||||
|
x = "0.386562 * safezoneW + safezoneX";
|
||||||
|
y = "0.511 * safezoneH + safezoneY";
|
||||||
|
w = "0.216563 * safezoneW";
|
||||||
|
h = "0.044 * safezoneH";
|
||||||
|
};
|
||||||
|
class RscButton_1600: RscButton
|
||||||
|
{
|
||||||
|
idc = 1600;
|
||||||
|
text = "Cancel";
|
||||||
|
x = "0.551562 * safezoneW + safezoneX";
|
||||||
|
y = "0.566 * safezoneH + safezoneY";
|
||||||
|
w = "0.0515625 * safezoneW";
|
||||||
|
h = "0.055 * safezoneH";
|
||||||
|
};
|
||||||
|
class RscButton_1601: RscButton
|
||||||
|
{
|
||||||
|
idc = 1601;
|
||||||
|
text = "OK";
|
||||||
|
x = "0.489687 * safezoneW + safezoneX";
|
||||||
|
y = "0.566 * safezoneH + safezoneY";
|
||||||
|
w = "0.0515625 * safezoneW";
|
||||||
|
h = "0.055 * safezoneH";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
37
addons/server/functions/fnc_3denEnrollModuleConfig.sqf
Normal file
37
addons/server/functions/fnc_3denEnrollModuleConfig.sqf
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_logic", objNull, [objNull]],
|
||||||
|
["_units", [], [[]]],
|
||||||
|
["_activated", true, [true]]
|
||||||
|
];
|
||||||
|
|
||||||
|
if (isServer) exitWith {
|
||||||
|
if (missionNamespace getVariable ["armatak_tcp_socket_is_running", false]) exitWith {
|
||||||
|
["Socket was called twice", "error", "TCP Socket"] call EFUNC(main,notify);
|
||||||
|
};
|
||||||
|
|
||||||
|
["Connecting to authenticated TAK socket", "success", "TCP Socket"] call EFUNC(main,notify);
|
||||||
|
|
||||||
|
_tak_server_instance_address = _logic getVariable [QGVAR(moduleInstanceAddress), "localhost"];
|
||||||
|
_tak_server_enrollment_port = _logic getVariable [QGVAR(moduleEnrollmentPort), 8446];
|
||||||
|
_tak_server_enrollment_username = _logic getVariable [QGVAR(moduleEnrollmentUsername), ""];
|
||||||
|
_tak_server_enrollment_password = _logic getVariable [QGVAR(moduleEnrollmentPassword), ""];
|
||||||
|
|
||||||
|
"armatak" callExtension [
|
||||||
|
"tcp_socket:start_enroll_mtls",
|
||||||
|
[
|
||||||
|
_tak_server_instance_address,
|
||||||
|
_tak_server_instance_address,
|
||||||
|
str _tak_server_enrollment_port,
|
||||||
|
_tak_server_enrollment_username,
|
||||||
|
_tak_server_enrollment_password,
|
||||||
|
""
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
missionNamespace setVariable ["armatak_server_syncedUnits", synchronizedObjects _logic];
|
||||||
|
_tak_server_instance_address call FUNC(startCotRouter);
|
||||||
|
};
|
||||||
|
|
||||||
|
true
|
||||||
26
addons/server/functions/fnc_3denTcpModuleConfig.sqf
Normal file
26
addons/server/functions/fnc_3denTcpModuleConfig.sqf
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
params [
|
||||||
|
["_logic", objNull, [objNull]],
|
||||||
|
["_units", [], [[]]],
|
||||||
|
["_activated", true, [true]]
|
||||||
|
];
|
||||||
|
|
||||||
|
if (isServer) exitWith {
|
||||||
|
if (missionNamespace getVariable ["armatak_tcp_socket_is_running", false]) exitWith {
|
||||||
|
["Socket was called twice", "error", "TCP Socket"] call EFUNC(main,notify);
|
||||||
|
};
|
||||||
|
|
||||||
|
["Connecting to TCP Socket", "success", "TCP Socket"] call EFUNC(main,notify);
|
||||||
|
|
||||||
|
_tak_server_instance_address = _logic getVariable [QGVAR(moduleInstanceAddress), "localhost"];
|
||||||
|
_tak_server_instance_port = _logic getVariable [QGVAR(moduleInstancePort), 8088];
|
||||||
|
_tak_server_fulladdress = _tak_server_instance_address + ":" + (str _tak_server_instance_port);
|
||||||
|
|
||||||
|
"armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
|
||||||
|
|
||||||
|
missionNamespace setVariable ["armatak_server_syncedUnits", synchronizedObjects _logic];
|
||||||
|
_tak_server_fulladdress call FUNC(startCotRouter);
|
||||||
|
};
|
||||||
|
|
||||||
|
true
|
||||||
33
addons/server/functions/fnc_ZeusEnrollModuleConfig.sqf
Normal file
33
addons/server/functions/fnc_ZeusEnrollModuleConfig.sqf
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
|
params ["_logic"];
|
||||||
|
|
||||||
|
if (missionNamespace getVariable ["armatak_tcp_socket_is_running", false]) exitWith {
|
||||||
|
["Socket was called twice", "error", "TCP Socket"] call EFUNC(main,notify);
|
||||||
|
closeDialog 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
disableSerialization;
|
||||||
|
|
||||||
|
["Connecting to authenticated TAK socket", "success", "TCP Socket"] call EFUNC(main,notify);
|
||||||
|
|
||||||
|
_tak_server_instance_address = ctrlText 14100;
|
||||||
|
_tak_server_enrollment_port = ctrlText 14101;
|
||||||
|
_tak_server_enrollment_username = ctrlText 14102;
|
||||||
|
_tak_server_enrollment_password = ctrlText 14103;
|
||||||
|
|
||||||
|
"armatak" callExtension [
|
||||||
|
"tcp_socket:start_enroll_mtls",
|
||||||
|
[
|
||||||
|
_tak_server_instance_address,
|
||||||
|
_tak_server_instance_address,
|
||||||
|
_tak_server_enrollment_port,
|
||||||
|
_tak_server_enrollment_username,
|
||||||
|
_tak_server_enrollment_password,
|
||||||
|
""
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
_tak_server_instance_address call FUNC(startCotRouter);
|
||||||
|
deleteVehicle _logic;
|
||||||
|
closeDialog 1;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user