diff --git a/.editorconfig b/.editorconfig index e4ab4a9fd38..4ca23b300fd 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,8 @@ trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false +[*.yml] +indent_size = 2 + [Makefile] indent_style = tab diff --git a/.github/workflows/arma.yml b/.github/workflows/arma.yml index d0649a0adec..3ddfefd63fa 100644 --- a/.github/workflows/arma.yml +++ b/.github/workflows/arma.yml @@ -27,15 +27,6 @@ jobs: - name: Validate function headers run: python3 docs/tools/document_functions.py --debug - lint: - runs-on: ubuntu-latest - steps: - - name: Checkout the source code - uses: actions/checkout@v4 - - name: Lint (sqflint) - uses: arma-actions/sqflint@master - continue-on-error: true # No failure due to many false-positives - build: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/extensions.yml b/.github/workflows/extensions.yml index 9693d2df22b..8cafd847e26 100644 --- a/.github/workflows/extensions.yml +++ b/.github/workflows/extensions.yml @@ -1,29 +1,65 @@ name: Extensions on: - pull_request: + push: paths: - - 'extensions/**' + - 'extension/**' + - 'Cargo.toml' + - 'Cargo.lock' + - '.github/workflows/extensions.yml' jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout the source code + uses: actions/checkout@master + - name: Install dependencies + run: | + rustup toolchain update stable --no-self-update + rustup default stable + rustup component add clippy rustfmt + - name: Run rustfmt + run: cargo fmt -- --check + - name: Run clippy + run: cargo clippy --all -- -Dwarnings + + test: + runs-on: ubuntu-latest + container: + image: xd009642/tarpaulin + options: --security-opt seccomp=unconfined + steps: + - name: Checkout the source code + uses: actions/checkout@master + - name: Test & Coverage + run: cargo tarpaulin --verbose --no-default-features --workspace --timeout 240 + build: - runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-latest] - + arrays: [ + os: { tag: "windows-latest", target: "i686-pc-windows-msvc" }, + os: { tag: "windows-latest", target: "x86_64-pc-windows-msvc" }, + ] + runs-on: ${{ matrix.arrays.os.tag }} steps: - name: Checkout the source code uses: actions/checkout@v4 + - name: Install stable Rust + uses: actions-rs/toolchain@v1 + with: + target: ${{ matrix.arrays.os.target }} + toolchain: stable + default: true + - name: Rust Cache + uses: Swatinem/rust-cache@v2 - name: Build - shell: cmd - run: | - cd extensions - mkdir build - cd build - cmake .. && cmake --build . - - name: Upload Artifact - uses: actions/upload-artifact@v4 + run: cargo build --verbose + - name: Upload + uses: actions/upload-artifact@v2 with: - name: ace3_extensions-${{ matrix.os }}-debug - path: extensions/build + name: ${{ matrix.arrays.os.target }} + path: target/debug/ace.dll + if-no-files-found: error + retention-days: 30 diff --git a/.github/workflows/hemtt.yml b/.github/workflows/hemtt.yml index e606852285d..23fad275602 100644 --- a/.github/workflows/hemtt.yml +++ b/.github/workflows/hemtt.yml @@ -33,6 +33,8 @@ jobs: xcopy /e /h /q pullrequest\addons addons\ xcopy /e /h /q pullrequest\optionals optionals\ xcopy /e /h /q pullrequest\include include\ + xcopy /y /h /q pullrequest\ace.dll ace.dll + xcopy /y /h /q pullrequest\ace_x64.dll ace_x64.dll - name: Run HEMTT build run: hemtt build - name: Rename build folder diff --git a/.gitignore b/.gitignore index 4ad0a5e1eb9..15cc59d0d5a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,6 @@ *.zip release/* releases/* -extensions/vcproj32/* -extensions/vcproj64/* .vscode/* hemtt hemtt.exe @@ -20,4 +18,5 @@ CHANGELOG.md sqfvm.exe ArmaScriptCompiler.exe *.sqfc +target/ !extras/**/*.zip diff --git a/.hemtt/project.toml b/.hemtt/project.toml index f5ed361e3e1..a9535dd2baa 100644 --- a/.hemtt/project.toml +++ b/.hemtt/project.toml @@ -34,32 +34,26 @@ workshop = [ ] [hemtt.launch.spe] -workshop = [ - "450814997", # CBA_A3 -] +extends = "default" dlc = [ "spe" ] [hemtt.launch.vn] -workshop = [ - "450814997", # CBA_A3's Workshop ID -] +extends = "default" dlc = [ "S.O.G. Prairie Fire", ] [hemtt.launch.ws] -workshop = [ - "450814997", # CBA_A3's Workshop ID -] +extends = "default" dlc = [ "Western Sahara", ] [hemtt.launch.rhs] +extends = "default" workshop = [ - "450814997", # CBA_A3's Workshop ID "843425103", # RHS AFRF Workshop ID "843577117", # RHS USAF Workshop ID "843593391", # RHS GREF Workshop ID diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 00000000000..f65334dd2a9 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1364 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ace" +version = "0.1.0" +dependencies = [ + "arboard", + "arma-rs", + "git2", + "rand", + "rand_chacha", + "rayon", + "uuid", +] + +[[package]] +name = "adler" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[package]] +name = "arboard" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fb4009533e8ff8f1450a5bcbc30f4242a1d34442221f72314bea1f5dc9c7f89" +dependencies = [ + "clipboard-win", + "core-graphics", + "image", + "log", + "objc2", + "objc2-app-kit", + "objc2-foundation", + "parking_lot", + "windows-sys 0.48.0", + "x11rb", +] + +[[package]] +name = "arma-rs" +version = "1.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdda6c2cf1237405dd57f82875c77b4159d415445471b903a901d8a37a61b30c" +dependencies = [ + "arma-rs-proc", + "crossbeam-channel", + "libc", + "link_args", + "log", + "seq-macro", + "state", + "uuid", + "windows 0.51.1", +] + +[[package]] +name = "arma-rs-proc" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "517b1a9cc16bc93896216ffeed0c692df4af022ee55ec45e8fc31c90a201dcb4" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "autocfg" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" + +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "block2" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f" +dependencies = [ + "objc2", +] + +[[package]] +name = "bytemuck" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fd4c6dcc3b0aea2f5c0b4b82c2b15fe39ddbc76041a310848f4706edf76bb31" + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "byteorder-lite" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" + +[[package]] +name = "cc" +version = "1.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "clipboard-win" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15efe7a882b08f34e38556b14f2fb3daa98769d06c7f0c1b076dfd0d983bc892" +dependencies = [ + "error-code", +] + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "error-code" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0474425d51df81997e2f90a21591180b38eccf27292d755f3e30750225c175b" + +[[package]] +name = "fdeflate" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "flate2" +version = "1.0.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f211bbe8e69bbd0cfdea405084f128ae8b4aaa6b0b522fc8f2b009084797920" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "generator" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" +dependencies = [ + "cc", + "libc", + "log", + "rustversion", + "windows 0.48.0", +] + +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.5", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "git2" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" +dependencies = [ + "bitflags 2.6.0", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + +[[package]] +name = "idna" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + +[[package]] +name = "image" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99314c8a2152b8ddb211f924cdae532d8c5e4c8bb54728e12fff1b0cd5963a10" +dependencies = [ + "bytemuck", + "byteorder-lite", + "num-traits", + "png", + "tiff", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "jpeg-decoder" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.157" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "374af5f94e54fa97cf75e945cce8a6b201e88a1a07e688b47dfd2a59c66dbd86" + +[[package]] +name = "libgit2-sys" +version = "0.17.0+1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" +dependencies = [ + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +] + +[[package]] +name = "libssh2-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libz-sys" +version = "1.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc53a7799a7496ebc9fd29f31f7df80e83c9bda5299768af5f9e59eeea74647" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "link_args" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7721e472624c9aaad27a5eb6b7c9c6045c7a396f2efb6dabaec1b640d5e89b" + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "loom" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff50ecb28bb86013e935fb6683ab1f6d3a20016f123c76fd4c27470076ac30f5" +dependencies = [ + "cfg-if", + "generator", + "scoped-tls", + "serde", + "serde_json", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "matchers" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +dependencies = [ + "regex-automata 0.1.10", +] + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "miniz_oxide" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" +dependencies = [ + "adler", + "simd-adler32", +] + +[[package]] +name = "nu-ansi-term" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +dependencies = [ + "overload", + "winapi", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "objc-sys" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" + +[[package]] +name = "objc2" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46a785d4eeff09c14c487497c162e92766fbb3e4059a71840cecc03d9a50b804" +dependencies = [ + "objc-sys", + "objc2-encode", +] + +[[package]] +name = "objc2-app-kit" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" +dependencies = [ + "bitflags 2.6.0", + "block2", + "libc", + "objc2", + "objc2-core-data", + "objc2-core-image", + "objc2-foundation", + "objc2-quartz-core", +] + +[[package]] +name = "objc2-core-data" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-core-image" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80" +dependencies = [ + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "objc2-encode" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7891e71393cd1f227313c9379a26a584ff3d7e6e7159e988851f0934c993f0f8" + +[[package]] +name = "objc2-foundation" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" +dependencies = [ + "bitflags 2.6.0", + "block2", + "libc", + "objc2", +] + +[[package]] +name = "objc2-metal" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", +] + +[[package]] +name = "objc2-quartz-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" +dependencies = [ + "bitflags 2.6.0", + "block2", + "objc2", + "objc2-foundation", + "objc2-metal", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.103" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" + +[[package]] +name = "pkg-config" +version = "0.3.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" + +[[package]] +name = "png" +version = "0.17.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "proc-macro2" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +dependencies = [ + "bitflags 2.6.0", +] + +[[package]] +name = "regex" +version = "1.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[package]] +name = "regex-automata" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax 0.8.4", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" + +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags 2.6.0", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "scoped-tls" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "seq-macro" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" + +[[package]] +name = "serde" +version = "1.0.208" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.208" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.125" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "state" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b8c4a4445d81357df8b1a650d0d0d6fbbbfe99d064aa5e02f3e4022061476d8" +dependencies = [ + "loom", +] + +[[package]] +name = "syn" +version = "2.0.75" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "tiff" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "tracing" +version = "0.1.40" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "unicode-bidi" +version = "0.3.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" + +[[package]] +name = "unicode-ident" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unicode-normalization" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "url" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "uuid" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +dependencies = [ + "getrandom", +] + +[[package]] +name = "valuable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "weezl" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" +dependencies = [ + "windows-core", + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-core" +version = "0.51.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "x11rb" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +dependencies = [ + "gethostname", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 00000000000..a13ce613fd6 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,11 @@ +[workspace] +resolver = "2" +members = [ + "extension" +] + +[profile.release] +opt-level = "z" +lto = true +codegen-units = 1 +strip = true diff --git a/ace.dll b/ace.dll new file mode 100644 index 00000000000..a92360dd4ac Binary files /dev/null and b/ace.dll differ diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll deleted file mode 100644 index f5686a5a3f8..00000000000 Binary files a/ace_advanced_ballistics.dll and /dev/null differ diff --git a/ace_advanced_ballistics_x64.dll b/ace_advanced_ballistics_x64.dll deleted file mode 100644 index f1802ce5e88..00000000000 Binary files a/ace_advanced_ballistics_x64.dll and /dev/null differ diff --git a/ace_artillerytables.dll b/ace_artillerytables.dll deleted file mode 100644 index 2f5855c81a3..00000000000 Binary files a/ace_artillerytables.dll and /dev/null differ diff --git a/ace_artillerytables_x64.dll b/ace_artillerytables_x64.dll deleted file mode 100644 index 97a061c2570..00000000000 Binary files a/ace_artillerytables_x64.dll and /dev/null differ diff --git a/ace_break_line.dll b/ace_break_line.dll deleted file mode 100644 index 8fc92175fe2..00000000000 Binary files a/ace_break_line.dll and /dev/null differ diff --git a/ace_break_line_x64.dll b/ace_break_line_x64.dll deleted file mode 100644 index d021bf25d23..00000000000 Binary files a/ace_break_line_x64.dll and /dev/null differ diff --git a/ace_clipboard.dll b/ace_clipboard.dll deleted file mode 100644 index 8cf6744964f..00000000000 Binary files a/ace_clipboard.dll and /dev/null differ diff --git a/ace_clipboard_x64.dll b/ace_clipboard_x64.dll deleted file mode 100644 index db7730f0fed..00000000000 Binary files a/ace_clipboard_x64.dll and /dev/null differ diff --git a/ace_fcs.dll b/ace_fcs.dll deleted file mode 100644 index 9c2a871b3d9..00000000000 Binary files a/ace_fcs.dll and /dev/null differ diff --git a/ace_fcs_x64.dll b/ace_fcs_x64.dll deleted file mode 100644 index 4ee8dc1d896..00000000000 Binary files a/ace_fcs_x64.dll and /dev/null differ diff --git a/ace_x64.dll b/ace_x64.dll new file mode 100644 index 00000000000..d9d09835f29 Binary files /dev/null and b/ace_x64.dll differ diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index 9d0dd0ee4b9..25545d02aa0 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -1,10 +1,10 @@ #include "script_component.hpp" -GVAR(currentbulletID) = -1; +#include "initKeybinds.inc.sqf" GVAR(Protractor) = false; GVAR(ProtractorStart) = CBA_missionTime; -GVAR(allBullets) = []; +GVAR(allBullets) = createHashMap; GVAR(currentGrid) = 0; if (!hasInterface) exitWith {}; @@ -24,22 +24,6 @@ if (!hasInterface) exitWith {}; // Register Perframe Handler [LINKFUNC(handleFirePFH), GVAR(simulationInterval)] call CBA_fnc_addPerFrameHandler; - - //Add warnings for missing compat PBOs (only if AB is on) - { - _x params ["_modPBO", "_compatPBO"]; - if ([_modPBO] call EFUNC(common,isModLoaded) && {!([_compatPBO] call EFUNC(common,isModLoaded))}) then { - WARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO); - }; - } forEach [ - ["RH_acc","ace_compat_rh_acc"], - ["RH_de_cfg","ace_compat_rh_de"], - ["RH_m4_cfg","ace_compat_rh_m4"], - ["RH_PDW","ace_compat_rh_pdw"], - ["RKSL_PMII","ace_compat_rksl_pm_ii"], - ["iansky_opt","ace_compat_sma3_iansky"], - ["R3F_Armes","ace_compat_r3f"] - ]; }] call CBA_fnc_addEventHandler; #ifdef DEBUG_MODE_FULL diff --git a/addons/advanced_ballistics/config.cpp b/addons/advanced_ballistics/config.cpp index 17647d0647d..e3fe6957d78 100644 --- a/addons/advanced_ballistics/config.cpp +++ b/addons/advanced_ballistics/config.cpp @@ -18,10 +18,3 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "RscTitles.hpp" #include "ACE_Settings.hpp" - -class ACE_Extensions { - class ace_advanced_ballistics { - windows = 1; - client = 1; - }; -}; diff --git a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf index e9180cb1c44..9c359bf833e 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: Glowbal, Ruthberg, joko // Jonas + * Author: Glowbal, Ruthberg, joko // Jonas, Brett Mayson * Handle the PFH for Bullets * * Arguments: @@ -17,7 +17,7 @@ private _deleted = false; { - _x params ["_bullet","_caliber","_bulletTraceVisible","_index"]; + _y params ["_bullet","_caliber","_bulletTraceVisible"]; if (alive _bullet) then { private _bulletVelocity = velocity _bullet; @@ -27,13 +27,21 @@ private _deleted = false; drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""]; }; - _bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6", _index, _bulletVelocity, _bulletPosition, wind, ASLToATL(_bulletPosition) select 2, CBA_missionTime toFixed 6]))); + ( + "ace" callExtension ["ballistics:bullet:simulate", [ + _x, + _bulletVelocity, + _bulletPosition, + wind, + ASLToATL(_bulletPosition) select 2, + CBA_missionTime toFixed 6 + ]] + ) params ["_data", "_code"]; + if (_code == 0) then { + _bullet setVelocity (_bulletVelocity vectorAdd (parseSimpleArray (_data))); + }; } else { - GVAR(allBullets) set [_forEachIndex, objNull]; - _deleted = true; + GVAR(allBullets) deleteAt _x; + "ace" callExtension ["ballistics:bullet:delete", [_x]]; }; -} forEach GVAR(allBullets); - -if (_deleted) then { - GVAR(allBullets) = GVAR(allBullets) - [objNull]; -}; +} forEach GVAR(allBullets) diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index ff2fe85ae4f..7d00168160f 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: Glowbal, Ruthberg + * Author: Glowbal, Ruthberg, Brett Mayson * * Handles advanced ballistics for (BulletBase) projectiles. Called from the unified fired EH only for players. * @@ -62,11 +62,11 @@ if (_abort) exitWith {}; // Get Weapon and Ammo Configurations private _AmmoCacheEntry = uiNamespace getVariable format[QGVAR(%1), _ammo]; if (isNil "_AmmoCacheEntry") then { - _AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig); + _AmmoCacheEntry = _ammo call FUNC(readAmmoDataFromConfig); }; private _WeaponCacheEntry = uiNamespace getVariable format[QGVAR(%1), _weapon]; if (isNil "_WeaponCacheEntry") then { - _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig); + _WeaponCacheEntry = _weapon call FUNC(readWeaponDataFromConfig); }; _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocityVariationSD"]; @@ -120,8 +120,26 @@ if (_caliber * _bulletLength * _bulletMass * _barrelTwist > 0) then { _stabilityFactor = [_caliber, _bulletLength, _bulletMass, _barrelTwist, _muzzleVelocity, _temperature, _barometricPressure] call FUNC(calculateStabilityFactor); }; -GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; - -"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _ammoCount, _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _transonicStabilityCoef, getPosASL _projectile, _bulletVelocity, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), EGVAR(weather,currentOvercast), CBA_missionTime toFixed 6]; - -GVAR(allBullets) pushBack [_projectile, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]; +("ace" callExtension [ + "ballistics:bullet:new", [ + _ammoCount, + _airFriction, + _ballisticCoefficients, + _velocityBoundaries, + _atmosphereModel, + _dragModel, + _stabilityFactor, + _twistDirection, + _transonicStabilityCoef, + _bulletVelocity, + EGVAR(common,mapLatitude), + EGVAR(weather,currentTemperature), + EGVAR(common,mapAltitude), + EGVAR(weather,currentHumidity), + EGVAR(weather,currentOvercast), + CBA_missionTime toFixed 6 + ] +]) params ["_id", "_code"]; +if (_code == 0) then { + GVAR(allBullets) set [_id, [_projectile, _caliber, _bulletTraceVisible]]; +}; diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 89e89b9f7ea..8c908639c30 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -21,7 +21,14 @@ if (!GVAR(enabled)) exitWith {}; private _initStartTime = diag_tickTime; private _mapSize = worldSize; -if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith { +( + "ace" callExtension ["ballistics:map:init", [worldName, _mapSize]] +) params ["_data", "_code"]; +if (_code != 0) exitWith { + ERROR("Error initializing map") +}; + +if (_data == "true") exitWith { INFO_1("Terrain already initialized [world: %1]",worldName); #ifdef DEBUG_MODE_FULL systemChat "AdvancedBallistics: Terrain already initialized"; @@ -53,8 +60,7 @@ INFO_2("Starting Terrain Extension [cells: %1] [world: %2]",_gridCells,worldName private _gridCenter = [_x + 25, _y + 25]; private _gridHeight = round(getTerrainHeightASL _gridCenter); private _gridNumObjects = count (_gridCenter nearObjects ["Building", 50]); - private _gridSurfaceIsWater = parseNumber (surfaceIsWater _gridCenter); - "ace_advanced_ballistics" callExtension format["set:%1:%2:%3", _gridHeight, _gridNumObjects, _gridSurfaceIsWater]; + "ace" callExtension ["ballistics:map:set", [GVAR(currentGrid), _gridHeight, _gridNumObjects, surfaceIsWater _gridCenter]]; GVAR(currentGrid) = GVAR(currentGrid) + 1; if (GVAR(currentGrid) >= _gridCells) exitWith {}; }; diff --git a/addons/advanced_ballistics/initSettings.inc.sqf b/addons/advanced_ballistics/initSettings.inc.sqf index 957044f343a..28a1d6d8262 100644 --- a/addons/advanced_ballistics/initSettings.inc.sqf +++ b/addons/advanced_ballistics/initSettings.inc.sqf @@ -5,7 +5,9 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)]; [LSTRING(enabled_DisplayName), LSTRING(enabled_Description)], _category, false, - 1 + 1, + {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_fnc_addSetting; [ @@ -45,5 +47,7 @@ private _category = format ["ACE %1", localize LSTRING(DisplayName)]; [LSTRING(simulationInterval_DisplayName), LSTRING(simulationInterval_Description)], _category, [0, 0.2, 0.05, 2], - 1 + 1, + {[QGVAR(simulationInterval), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_fnc_addSetting; diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml index 041653fe2b2..bcec121106e 100644 --- a/addons/aircraft/stringtable.xml +++ b/addons/aircraft/stringtable.xml @@ -182,6 +182,7 @@ Distanza di seguimento Folge-Entfernung 따라가는 거리 + Distance de suivi 追跡距離 @@ -189,6 +190,7 @@ Seguendo unità entro %1m Folgt Einheit bis zu %1m %1m 이내로 유닛을 따라갑니다 + Suivre l'unité jusqu'à %1m %1m 間隔で 目標を追跡します diff --git a/addons/arsenal/XEH_PREP.hpp b/addons/arsenal/XEH_PREP.hpp index 94d4739b604..d0819056f25 100644 --- a/addons/arsenal/XEH_PREP.hpp +++ b/addons/arsenal/XEH_PREP.hpp @@ -78,6 +78,7 @@ PREP(removeStat); PREP(removeVirtualItems); PREP(renameDefaultLoadout); PREP(replaceUniqueItemsLoadout); +PREP(saveLoadout); PREP(scanConfig); PREP(showItem); PREP(sortPanel); diff --git a/addons/arsenal/functions/fnc_buttonExport.sqf b/addons/arsenal/functions/fnc_buttonExport.sqf index 3e5039a5040..abf7c7d6fcb 100644 --- a/addons/arsenal/functions/fnc_buttonExport.sqf +++ b/addons/arsenal/functions/fnc_buttonExport.sqf @@ -26,28 +26,27 @@ if (GVAR(shiftState)) then { switch (true) do { // Beginning case (_index == -1): { - "ace_clipboard" callExtension (format ["[%1", endl]); + "ace" callExtension ["clipboard:append", [format ["[%1", endl]]]; }; // End case (_index == _listLength): { - "ace_clipboard" callExtension "];"; + "ace" callExtension ["clipboard:append", ["];"]]; }; // Rest default { - "ace_clipboard" callExtension ([" ", str (GVAR(defaultLoadoutsList) select _index), [",", ""] select (_index == _listLength - 1), endl] joinString ""); + "ace" callExtension ["clipboard:append", [[" ", str (GVAR(defaultLoadoutsList) select _index), [",", ""] select (_index == _listLength - 1), endl] joinString ""]]; }; }; }; - "ace_clipboard" callExtension "--COMPLETE--"; + "ace" callExtension ["clipboard:complete", []]; [_display, LLSTRING(exportDefault)] call FUNC(message); } else { // Export singular loadout private _export = str (GVAR(center) call CBA_fnc_getLoadout); - - "ace_clipboard" callExtension (_export + ";"); - "ace_clipboard" callExtension "--COMPLETE--"; + "ace" callExtension ["clipboard:append", [_export]]; + "ace" callExtension ["clipboard:complete", []]; [_display, LLSTRING(exportCurrent)] call FUNC(message); }; diff --git a/addons/arsenal/functions/fnc_buttonImport.sqf b/addons/arsenal/functions/fnc_buttonImport.sqf index 8a83fe3ff0c..494bf159daa 100644 --- a/addons/arsenal/functions/fnc_buttonImport.sqf +++ b/addons/arsenal/functions/fnc_buttonImport.sqf @@ -16,7 +16,13 @@ params ["_display"]; // Can be either a singular loadout or an array of loadouts -private _extendedLoadout = call compile copyFromClipboard; +private _extendedLoadout = if (isMultiplayer) then { + ("ace" callExtension ["clipboard:loadout", []]) params ["_loadout", "_code"]; + if (_code != 0) exitWith {}; + parseSimpleArray _loadout +} else { + call compile copyFromClipboard +}; // If error, exit if (isNil "_extendedLoadout" || {!(_extendedLoadout isEqualType [])}) exitWith { diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index 0f0a5817c6e..ea05cf1769f 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -138,14 +138,6 @@ _actionsBoxCtrl ctrlSetPosition [ ]; _actionsBoxCtrl ctrlCommit 0; -// Disable import in MP -if (isMultiplayer) then { - private _importButtonCtrl = _display displayCtrl IDC_buttonImport; - _importButtonCtrl ctrlEnable false; - _importButtonCtrl ctrlSetFade 0.6; - _importButtonCtrl ctrlCommit 0; -}; - //--------------- Camera prep cutText ["", "PLAIN"]; showCommandingMenu ""; diff --git a/addons/arsenal/functions/fnc_onKeyDown.sqf b/addons/arsenal/functions/fnc_onKeyDown.sqf index 4d62075f78f..fe69bb3486d 100644 --- a/addons/arsenal/functions/fnc_onKeyDown.sqf +++ b/addons/arsenal/functions/fnc_onKeyDown.sqf @@ -94,8 +94,8 @@ if (!isNull _loadoutsDisplay) then { }; } params ["_className"]; - "ace_clipboard" callExtension (_className + ";"); - "ace_clipboard" callExtension "--COMPLETE--"; + "ace" callExtension ["clipboard:append", [_className]]; + "ace" callExtension ["clipboard:complete", []]; [_display, LLSTRING(exportedClassnameText)] call FUNC(message); } else { diff --git a/addons/arsenal/functions/fnc_saveLoadout.sqf b/addons/arsenal/functions/fnc_saveLoadout.sqf new file mode 100644 index 00000000000..05e712e45f6 --- /dev/null +++ b/addons/arsenal/functions/fnc_saveLoadout.sqf @@ -0,0 +1,37 @@ +#include "..\script_component.hpp" +/* + * Author: DartRuffian + * Saves a given loadout to the client's profile. + * + * Arguments: + * 0: Name of loadout + * 1: CBA extended loadout or getUnitLoadout array + * 2: Replace existing loadout (default: false) + * + * Return Value: + * True if loadout was saved, otherwise false + * + * Example: + * ["Current Loadout", getUnitLoadout ACE_player] call ace_arsenal_fnc_saveLoadout + * + * Public: Yes + */ + +params [["_name", "", [""]], ["_loadout", [], [[]]], ["_replaceExisting", false, [false]]]; + +if (_name == "" || {_loadout isEqualTo []}) exitWith { false }; + +private _loadouts = profileNamespace getVariable [QGVAR(saved_loadouts), []]; +private _loadoutIndex = _loadouts findIf {(_x#0) == _name}; + +// If a loadout with same name already exists and no overwriting enabled, quit +if (!_replaceExisting && {_loadoutIndex != -1}) exitWith { false }; + +if (_loadoutIndex == -1) then { + _loadouts pushBack [_name, _loadout]; +} else { + _loadouts set [_loadoutIndex, [_name, _loadout]]; +}; + +profileNamespace setVariable [QGVAR(saved_loadouts), _loadouts]; +true diff --git a/addons/arsenal/functions/fnc_sortStatement_mod.sqf b/addons/arsenal/functions/fnc_sortStatement_mod.sqf index ab945202171..063aba0dbc4 100644 --- a/addons/arsenal/functions/fnc_sortStatement_mod.sqf +++ b/addons/arsenal/functions/fnc_sortStatement_mod.sqf @@ -14,4 +14,9 @@ params ["_config"]; -(modParams [_config call EFUNC(common,getAddon), ["name"]]) param [0, ""] +private _addon = _config call EFUNC(common,getAddon); + +// Calling modParams with "" prints 'ModParams - Undefined or empty mod directory' in RPT +if (_addon == "") exitWith {""}; + +(modParams [_addon, ["name"]]) param [0, ""] diff --git a/addons/artillerytables/XEH_PREP.hpp b/addons/artillerytables/XEH_PREP.hpp index 7ef48b61dd8..7f977dd6b32 100644 --- a/addons/artillerytables/XEH_PREP.hpp +++ b/addons/artillerytables/XEH_PREP.hpp @@ -1,8 +1,14 @@ TRACE_1("prep",_this); +PREP(adjustFire); +PREP(calculateElevation); +PREP(calculateMaxAngle); +PREP(calculateMuzzleVelocity); +PREP(calculateSolution); PREP(firedEH); PREP(interactMenuOpened); PREP(rangeTableOpen); PREP(rangeTableUpdate); +PREP(simulateShot); PREP(turretChanged); PREP(turretPFEH); diff --git a/addons/artillerytables/XEH_postInit.sqf b/addons/artillerytables/XEH_postInit.sqf index 4f0e2032088..0696302ea9b 100644 --- a/addons/artillerytables/XEH_postInit.sqf +++ b/addons/artillerytables/XEH_postInit.sqf @@ -4,10 +4,13 @@ TRACE_2("CBA_settingsInitialized",GVAR(advancedCorrections),GVAR(disableArtilleryComputer)); if (hasInterface) then { - // Add hud overlay for actuall azimuth and elevation: + // Add hud overlay for actual azimuth and elevation: GVAR(pfID) = -1; ["turret", LINKFUNC(turretChanged), true] call CBA_fnc_addPlayerEventHandler; + // Handles being teleported from one vehicle to another + ["vehicle", {[_this select 0, (_this select 1) unitTurret (_this select 0)] call FUNC(turretChanged)}] call CBA_fnc_addPlayerEventHandler; + // Add ability to dynamically open rangetables: ["ace_interactMenuOpened", LINKFUNC(interactMenuOpened)] call CBA_fnc_addEventHandler; }; @@ -30,6 +33,33 @@ }; }] call CBA_fnc_addEventHandler; +addMissionEventHandler ["ExtensionCallback", { + params ["_name", "_function", "_data"]; + if (_name == "ace:artillery" && {_function == "calculate_table"}) then { + (parseSimpleArray _data) params ["_line", "_data"]; + if (_data isEqualType []) then { + GVAR(tableData) set [_line, _data]; + }; + GVAR(tableSizeReceived) = GVAR(tableSizeReceived) + 1; + if (GVAR(tableSizeReceived) == GVAR(tableSizeActual)) then { + private _dialog = uiNamespace getVariable [QGVAR(rangeTableDialog), displayNull]; + private _ctrlRangeTable = _dialog displayCtrl IDC_TABLE; + if (isNull _dialog) exitWith {true}; + for "_i" from 0 to GVAR(tableSizeActual) do { + private _row = GVAR(tableData) getOrDefault [_i, []]; + if (count _row == 12) then { + _ctrlRangeTable lnbAddRow _row; + }; + }; + private _dialog = uiNamespace getVariable [QGVAR(rangeTableDialog), displayNull]; + private _ctrlRangeTable = _dialog displayCtrl IDC_TABLE; + if (isNull _dialog) exitWith {TRACE_1("dialog closed",_this);}; + _ctrlRangeTable lnbAddRow ["", "", "", "", "", "", "", "", "", "", ""]; + TRACE_1("table filled",_ctrlRangeTable); + }; + }; +}]; + #ifdef DEBUG_MODE_FULL #include "dev\showShotInfo.inc.sqf" #include "dev\checkConfigs.inc.sqf" diff --git a/addons/artillerytables/config.cpp b/addons/artillerytables/config.cpp index 1f6fa9f74e7..5aafdfb9b2e 100644 --- a/addons/artillerytables/config.cpp +++ b/addons/artillerytables/config.cpp @@ -14,13 +14,6 @@ class CfgPatches { }; }; -class ACE_Extensions { - class ace_artillerytables { - windows = 1; - client = 1; - }; -}; - #include "CfgEventHandlers.hpp" #include "CfgMagazines.hpp" #include "CfgVehicles.hpp" diff --git a/addons/artillerytables/functions/fnc_adjustFire.sqf b/addons/artillerytables/functions/fnc_adjustFire.sqf new file mode 100644 index 00000000000..96c884880da --- /dev/null +++ b/addons/artillerytables/functions/fnc_adjustFire.sqf @@ -0,0 +1,41 @@ +#include "..\script_component.hpp" +/* + * Author: LorenLuke + * Adjusts a target point north and east, and recalculates a solution in air based on atmospheric conditions + * + * Arguments: + * 0: Gun Position ASL + * 1: Target Position ASL + * 2: Adjustment to the East (negative is West); meters + * 3: Adjustment to the North (negative is South); meters + * 4: Adjustment vertically (negative is Down); meters + * 5: Muzzle velocity; meters/second + * 6: Air Friction; meters^-1 (m/s^2)/(m^2/s^2) + * 7: High angle boolean (true is high angle) + * 8: Temperature; degrees Celsius + * 9: Atmospheric Density; kg/(meters^3) + * 10: Direction of wind; degrees clockwise from north + * 11: Speed of wind; meters/second + * + * Return Value: + * Array of returns + * 0: Angle of shot; Milliradians + * 1: Angle adjust left or right; Milliradians + * 2: Time of flight; seconds + * + * Example: + * [getposASL vehicle player, targetPos, 20, 50, 0, 200, -0.0001, true, 15, 1.225, 225, 5] call ace_artilleryTables_fnc_adjustFire + * + * Public: No + */ + +params ["_gunPos", "_targetPos", "_adjustEast", "_adjustNorth", "_adjustUp", "_muzzleVelocity", "_airFriction", ["_highAngle", true], ["_temperature", 15], ["_airDensity", 1.225], ["_windDir", 0], ["_windSpeed", 0]]; + +//DEFAULT_AIR_FRICTION == -0.00006 +//MK6_82mm_AIR_FRICTION == -0.0001 + +private _resultPos = [_adjustEast + _targetPos select 0, _adjustNorth + _targetPos select 1, _adjustUp + _targetPos select 2]; + +private _returns = ["_gunPos", "_resultPos", "_muzzleVelocity", "_highAngle", "_airFriction", "_temperature", "_airDensity", "_windDir", "_windSpeed"] call FUNC(calculateSolution); + +_returns diff --git a/addons/artillerytables/functions/fnc_calculateElevation.sqf b/addons/artillerytables/functions/fnc_calculateElevation.sqf new file mode 100644 index 00000000000..f37ddaad923 --- /dev/null +++ b/addons/artillerytables/functions/fnc_calculateElevation.sqf @@ -0,0 +1,71 @@ +#include "..\script_component.hpp" +/* + * Author: LorenLuke + * Adjusts a target point north and east, and recalculates a solution in air based on atmospheric conditions + * + * Arguments: + * 0: Distance to Target; meters + * 1: Height of target; meters, relative to gun altitude (positive means target higher than gun) + * 2: Muzzle velocity; meters/second + * 3: High angle boolean (true is high angle) + * 4: Air Friction; meters^-1 [(m/s^2)/(m^2/s^2)] + * 5: Temperature; degrees Celsius + * 6: Atmospheric Density; kg/(meters^3) + * 7: Cross wind; meters/second (negative is Right to Left) + * 8: Tail wind; meters/second (negative is flying against the wind) + * + * Return Value: + * Array of returns + * 0: Angle of shot; Milliradians + * 1: Angle adjust left or right; Milliradians + * 2: Time of flight; seconds + * + * Example: + * [myPos, 0, 200, true, -0.0001, 15, 1.225, 5, -10] call ace_artilleryTables_fnc_calculateElevation + * + * Public: No + */ + +params ["_targetDistance", "_targetHeight", "_muzzleVelocity", ["_highArc", true], ["_airFriction", 0], ["_temperature", 15], ["_airDensity", 1.225], ["_crossWind", 0], ["_tailWind", 0]]; + +//DEFAULT_AIR_FRICTION == -0.00006 +//MK6_82mm_AIR_FRICTION == -0.0001 + +if (_airFriction != 0) then { + _muzzleVelocity = [_muzzleVelocity, _temperature, _atmosphericDensity] call FUNC(calculateMuzzleVelocity); +}; +private _maxResults = [_muzzleVelocity, _airFriction] call FUNC(calculateMaxAngle); + +private _testShot = [_maxResults select 0, _targetHeight, _muzzleVelocity, _airFriction, _crossWind, _tailWind, _temperature, _airDensity] call FUNC(simulateShot); +if (_testShot select 1 < _targetDistance) exitWith { + //No way we can hit it so don't bother; + [-1, -1, -1] +}; + +private _useDistance = _targetDistance; +private _useAngle = 0; +private _resultDistance = 0; +private _xDeviation = 0; +private _tof = 0; + +while {abs(_resultDistance - _targetDistance) > 0.5} do { + TRACE_7("callExtension:artillery:simulate_find_solution",_useDistance,_targetHeight,_muzzleVelocity,_airFriction,_higharc,DEFAULT_MIN_ELEV,DEFAULT_MAX_ELEV); + ( + "ace" callExtension ["artillery:simulate_find_solution", [_useDistance, _targetHeight, _muzzleVelocity, _airFriction, _higharc, DEFAULT_MIN_ELEV, DEFAULT_MAX_ELEV]] + ) params ["_data", "_code"]; + TRACE_1("",_code); + (parseSimpleArray _data) params ["", "_useAngleRad", ""]; + _useAngle = deg(_useAngleRad) * DEGTOMILS; + + private _shotResults = [_useAngle, _targetHeight, _muzzleVelocity, _airFriction, _crossWind, _tailWind, _temperature, _airDensity] call FUNC(simulateShot); + + _xDeviation = _shotResults select 0; + _resultDistance = _shotResults select 1; + _tof = _shotResults select 2; + _useDistance = (2 * _targetDistance) - _resultDistance; +}; + +private _angleOffsetDeg = _xDeviation atan2 _resultDistance; +private _angleOffset = _angleOffsetDeg * DEGTOMILS; + +[_useAngle, -_angleOffset, _tof] diff --git a/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf b/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf new file mode 100644 index 00000000000..ce71c02db99 --- /dev/null +++ b/addons/artillerytables/functions/fnc_calculateMaxAngle.sqf @@ -0,0 +1,31 @@ +#include "..\script_component.hpp" +/* + * Author: LorenLuke + * Calculates the best possible angle to shoot farthest based on muzzle velocity and air friction. + * + * Arguments: + * 0: Initial Muzzle Velocity; meters/second + * 1: Air Friction; meters^-1 (m/s^2)/(m^2/s^2) + * + * Return Values: + * 1: Best Angle; Milliradians + * 2: Furthest Distance; Meters + * + * Example: + * [200, -0.00006] call ace_artilleryTables_fnc_calculateMaxAngle + * + * Public: No + */ + +params ["_muzzleVelocity", "_airFriction"]; + +TRACE_2("callExtension:artillery:find_max_angle",_muzzleVelocity,_airFriction); +( + "ace" callExtension ["artillery:find_max_angle", [_muzzleVelocity, _airFriction]] +) params ["_data", "_code"]; +TRACE_1("",_code) +(parseSimpleArray _data) params ["_bestAngle", "_bestDistance", ""]; +_returns = [deg _bestAngle * 6400 / 360, _bestDistance]; +_returns params ["_bestAngle", "_bestDistance"]; + +_returns diff --git a/addons/artillerytables/functions/fnc_calculateMuzzleVelocity.sqf b/addons/artillerytables/functions/fnc_calculateMuzzleVelocity.sqf new file mode 100644 index 00000000000..6f00f74c148 --- /dev/null +++ b/addons/artillerytables/functions/fnc_calculateMuzzleVelocity.sqf @@ -0,0 +1,28 @@ +#include "..\script_component.hpp" +/* + * Author: LorenLuke + * Calculates the muzzleVelocity change with advanced calculations. + * + * Arguments: + * 0: Initial Muzzle velocity; meters/second + * 1: Temperature; degrees Celsius + * 2: Atmospheric Density; kg/(meters^3) + * + * Return Value: + * Adjusted Muzzle Velocity; Meters + * + * Example: + * [200, 15, 1.225] call ace_artilleryTables_fnc_calculateMuzzleVelocity + * + * Public: No + */ + +params ["_muzzleVelocity", "_temperature", "_airDensity"]; + +// Calculate air density +private _relativeDensity = _airDensity / 1.225; +private _newMuzzleVelocityCoefficient = (((_temperature + 273.13) / 288.13 - 1) / 40 + 1); + +private _newMuzzleVelocity = _muzzleVelocity * _newMuzzleVelocityCoefficient; + +_newMuzzleVelocity diff --git a/addons/artillerytables/functions/fnc_calculateSolution.sqf b/addons/artillerytables/functions/fnc_calculateSolution.sqf new file mode 100644 index 00000000000..13e798568c4 --- /dev/null +++ b/addons/artillerytables/functions/fnc_calculateSolution.sqf @@ -0,0 +1,44 @@ +#include "..\script_component.hpp" +/* + * Author: LorenLuke + * Provides fire angle and deflection solutions on a target of set distance and height, including accounting for drag and atmospheric wind conditions. + * + * Arguments: + * 0: Gun Position ASL; + * 1: Target Position ASL; + * 2: Muzzle Velocity; meters/second + * 3: High angle boolean (true is high angle) + * 4: Air Friction; meters^-1 [(m/s^2)/(m^2/s^2)] + * 5: Temperature; degrees Celsius + * 6: Atmospheric Density; kg/(meters^3) + * 7: Direction of wind; degrees clockwise from north + * 8: Speed of wind; meters/second + * + * Return Value: + * array of returns + * 0: Angle of shot; Milliradians + * 1: Angle adjust left or right; Milliradians + * 2: Time of flight; seconds + * + * Example: + * [myPos, targetPos, 200, true, -0.0001, 15, 1.225, 225, 5] call ace_artilleryTables_fnc_calculateSolution + * + * Public: No + */ + +params ["_ownPos", "_targetPos", "_muzzleVelocity", ["_highAngle", true], ["_airFriction", 0], ["_temperature", 15], ["_airDensity", 1.225], ["_windDir", 0], ["_windSpeed", 0]]; + +//DEFAULT_AIR_FRICTION == -0.00006 +//MK6_82mm_AIR_FRICTION == -0.0001 + +private _relPos = _targetPos vectorDiff _ownPos; + +private _targetDir = (_relpos select 0) atan2 (_relPos select 1); +private _targetDist = sqrt( (_relPos select 0)^2 + (_relpos select 1)^2 ); +private _heightDif = _relPos select 2; +private _crossWind = sin(_targetDir - _windDir) * _windSpeed; +private _tailWind = -cos(_targetDir - _windDir) * _windSpeed; + +private _solutionReturns = [_targetDist, _heightDif, _muzzleVelocity, _highAngle, _airFriction, _crossWind, _tailWind, _temperature, _airDensity] call FUNC(calculateElevation); + +_solutionReturns diff --git a/addons/artillerytables/functions/fnc_rangeTableUpdate.sqf b/addons/artillerytables/functions/fnc_rangeTableUpdate.sqf index 3e50f9d7ad2..d223785851b 100644 --- a/addons/artillerytables/functions/fnc_rangeTableUpdate.sqf +++ b/addons/artillerytables/functions/fnc_rangeTableUpdate.sqf @@ -34,31 +34,12 @@ _ctrlElevationLow ctrlSetTextColor ([[1,1,1,1],[0.25,0.25,0.25,1]] select GVAR(l lnbClear _ctrlRangeTable; // Call extension with current data and start workers -TRACE_5("callExtension:start",_muzzleVelocity,_airFriction,_elevMin,_elevMax,GVAR(lastElevationMode)); -private _ret = "ace_artillerytables" callExtension ["start", [_muzzleVelocity,_airFriction,_elevMin,_elevMax,GVAR(lastElevationMode)]]; -TRACE_1("",_ret); - -// Non-blocking read data out of extension as it becomes availiable -[{ - private _dialog = uiNamespace getVariable [QGVAR(rangeTableDialog), displayNull]; - private _ctrlRangeTable = _dialog displayCtrl IDC_TABLE; - if (isNull _dialog) exitWith {true}; - - private _status = 1; // 1 = data on line, 2 - data not ready, 3 - done - while {_status == 1} do { - private _ret = ("ace_artillerytables" callExtension ["getline", []]); - // TRACE_1("callExtension:getline",_ret); - _status = _ret select 1; - if (_status == 1) then { _ctrlRangeTable lnbAddRow parseSimpleArray (_ret select 0) }; - }; - - (_status == 3) // exit loop when all data read -}, { - // put dummy line at end because scrolling is problematic and can't see last line - private _dialog = uiNamespace getVariable [QGVAR(rangeTableDialog), displayNull]; - private _ctrlRangeTable = _dialog displayCtrl IDC_TABLE; - if (isNull _dialog) exitWith {TRACE_1("dialog closed",_this);}; - - _ctrlRangeTable lnbAddRow ["", "", "", "", "", "", "", "", "", "", ""]; - TRACE_1("table filled",_ctrlRangeTable); -}, []] call CBA_fnc_waitUntilAndExecute; +TRACE_5("callExtension:artillery:calculate_table",_muzzleVelocity,_airFriction,_elevMin,_elevMax,GVAR(lastElevationMode)); +( + "ace" callExtension ["artillery:calculate_table", [_muzzleVelocity, _airFriction, _elevMin, _elevMax, GVAR(lastElevationMode)]] +) params ["_data", "_code"]; +TRACE_1("",_code) + +GVAR(tableData) = createHashMap; +GVAR(tableSizeActual) = (parseSimpleArray _data) select 1; +GVAR(tableSizeReceived) = 0; diff --git a/addons/artillerytables/functions/fnc_simulateShot.sqf b/addons/artillerytables/functions/fnc_simulateShot.sqf new file mode 100644 index 00000000000..efe9b0f9c70 --- /dev/null +++ b/addons/artillerytables/functions/fnc_simulateShot.sqf @@ -0,0 +1,47 @@ +#include "..\script_component.hpp" +/* + * Author: LorenLuke + * Simulates an indirect shot on a target of known height with given drag, wind, and atmospheric conditions + * + * Arguments: + * 0: Gun Elevation Angle; milliradians + * 1: Relative Target Height; meters, relative to gun altitude (positive means target higher than gun) + * 2: Muzzle Velocity; meters/second + * 3: Air Friction; meters^-1 [(m/s^2)/(m^2/s^2)] + * 4: Cross wind; meters/second (negative is Right to Left) + * 5: Tail wind; meters/second (negative is flying against the wind) + * 6: Temperature; degrees Celsius + * 7: Atmospheric Density; kg/(meters^3) + * + * Return Value: + * array of returns + * 0: Deflection Adjustment To Hit; Milliradians (negative is Left) + * 1: Distance of Shot; meters + * 2: Time of Flight; seconds + * + * Example: + * [900, 10, 200, -0.0001, 4, 0, 15, 1.225] call ace_artilleryTables_fnc_simulateShot + * + * Public: No + */ + +params ["_angle", "_targetHeight", "_muzzleVelocity", ["_airFriction", 0], ["_crossWind", 0], ["_tailWind", 0], ["_temperature", 15], ["_atmosphericDensity", 1.225]]; + +//DEFAULT_AIR_FRICTION == -0.00006 +//MK6_82mm_AIR_FRICTION == -0.0001 + +if (_airFriction != 0) then { + _muzzleVelocity = [_muzzleVelocity, _temperature, _atmosphericDensity] call FUNC(calculateMuzzleVelocity); +}; + +private _atmosphericDensityRatio = _atmosphericDensity / 1.225; +private _radAngle = rad(_angle / DEGTOMILS); + +TRACE_8("callExtension:artillery:simulate_shot",_radAngle,_targetHeight,_muzzleVelocity,_airFriction,_crossWind,_tailWind,_temperature,_atmosphericDensityRatio); +( + "ace" callExtension ["artillery:simulate_shot", [_radAngle, _targetHeight, _muzzleVelocity, _airFriction, _crossWind, _tailWind, _temperature, _atmosphericDensityRatio]] +) params ["_data", "_code"]; +TRACE_1("",_code) + +//[xDeviation, yDistance, timeOfFlight] +parseSimpleArray _data diff --git a/addons/artillerytables/functions/fnc_turretPFEH.sqf b/addons/artillerytables/functions/fnc_turretPFEH.sqf index 9ad10de1aa8..e1964f7e41a 100644 --- a/addons/artillerytables/functions/fnc_turretPFEH.sqf +++ b/addons/artillerytables/functions/fnc_turretPFEH.sqf @@ -30,7 +30,10 @@ if (isNull (uiNamespace getVariable [QGVAR(display), displayNull])) then { }; private _ctrlGroup = (uiNamespace getVariable [QGVAR(display), displayNull]) displayCtrl 1000; -if (cameraView != "GUNNER") exitWith { // need to be in gunner mode, so we can check where the optics are aiming at + +// Need to be in gunner mode, so we can check where the optics are aiming at +// However, if there are no optics, ignore the above +if (!_invalidGunnerMem && {cameraView != "GUNNER"}) exitWith { _ctrlGroup ctrlShow false; }; _ctrlGroup ctrlShow true; diff --git a/addons/artillerytables/script_component.hpp b/addons/artillerytables/script_component.hpp index 128c3c17ff1..a2303b2a762 100644 --- a/addons/artillerytables/script_component.hpp +++ b/addons/artillerytables/script_component.hpp @@ -12,6 +12,10 @@ // This is a good fit for most large artillery, but a little low for lighter mortars #define DEFAULT_AIR_FRICTION -0.00006 +#define DEFAULT_MIN_ELEV 0 +// 90 degrees in radians +#define DEFAULT_MAX_ELEV 1.5708 + #define DEGTOMILS 17.7777778 #define IDC_MODECONTROLGROUP 1000 diff --git a/addons/atragmx/config.cpp b/addons/atragmx/config.cpp index 125d4a488e0..9b02aba4919 100644 --- a/addons/atragmx/config.cpp +++ b/addons/atragmx/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {"ACE_Item_ATragMX"}; weapons[] = {"ACE_ATragMX"}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ACE_Advanced_Ballistics", "ACE_common", "ACE_weather"}; + requiredAddons[] = {"ace_advanced_ballistics", "ace_common", "ace_weather"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg"}; url = ECSTRING(main,URL); diff --git a/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf b/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf index 9fe18a258d6..e667d22e75e 100644 --- a/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf +++ b/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf @@ -30,9 +30,16 @@ while {_velocity > _thresholdVelocity} do { private _bc = GVAR(targetSolutionInput) select 14; private _dragModel = GVAR(targetSolutionInput) select 15; private _temperature = GVAR(targetSolutionInput) select 5; - private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _velocity, _temperature])); _distance = _distance + _velocity * __DELTA_T; - _velocity = _velocity - (_drag * __DELTA_T); + private _data = ( + "ace" callExtension ["ballistics:retard", [ + _dragModel, + _bc, + _velocity, + _temperature + ]] + ) select 0; + _velocity = _velocity - ((parseNumber _data) * __DELTA_T); }; _distance diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf index 7efc25ebbf4..5f09fb35b1b 100644 --- a/addons/atragmx/functions/fnc_calculate_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_solution.sqf @@ -90,7 +90,14 @@ private _wind1 = [cos(270 - _windDirection * 30) * _windSpeed1, sin(270 - _windD private _wind2 = [cos(270 - _windDirection * 30) * _windSpeed2, sin(270 - _windDirection * 30) * _windSpeed2, 0]; private _windDrift = 0; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _bc = parseNumber(("ace_advanced_ballistics" callExtension format["atmosphericCorrection:%1:%2:%3:%4:%5", _bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel])); + _bc = parseNumber (("ace" callExtension ["ballistics:atmospheric_correction", [ + _bc, + _temperature, + _barometricPressure, + _relativeHumidity, + _atmosphereModel + ]] + ) select 0); }; private _eoetvoesMultiplier = 0; @@ -113,8 +120,15 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _trueSpeed = vectorMagnitude _trueVelocity; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _trueSpeed, _temperature])); - _bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag); + private _data = ( + "ace" callExtension ["ballistics:retard", [ + _dragModel, + _bc, + _trueSpeed, + _temperature + ]] + ) select 0; + _bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * (parseNumber _data)); } else { _bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction); }; diff --git a/addons/atragmx/functions/fnc_update_zero_range.sqf b/addons/atragmx/functions/fnc_update_zero_range.sqf index 8a3eca13448..d29ad18b688 100644 --- a/addons/atragmx/functions/fnc_update_zero_range.sqf +++ b/addons/atragmx/functions/fnc_update_zero_range.sqf @@ -36,11 +36,25 @@ if (!GVAR(atmosphereModeTBH)) then { }; private _scopeBaseAngle = if !(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight]; - (parseNumber _zeroAngle) + parseNumber (("ace" callExtension ["ballistics:zero_vanilla", [ + _zeroRange, + _muzzleVelocity, + _airFriction, + _boreHeight + ]]) select 0) } else { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZeroAB:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, _temperature, _barometricPressure, _relativeHumidity, _bc, _dragModel, _atmosphereModel]; - (parseNumber _zeroAngle) + parseNumber (("ace" callExtension ["ballistics:zero_advanced", [ + _zeroRange, + _muzzleVelocity, + _airFriction, + _boreHeight, + _temperature, + _barometricPressure, + _relativeHumidity, + _bc, + _dragModel, + _atmosphereModel + ]]) select 0) }; GVAR(workingMemory) set [2, _zeroRange]; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 6a0c4082711..d1e9f129875 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -50,8 +50,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment } else { GVAR(placeAction) = PLACE_WAITING; - [_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set); - [_unit, "blockThrow", "ACE_Attach", true] call EFUNC(common,statusEffect_set); + [_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); [{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame; _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)]; @@ -88,8 +88,8 @@ if (_unit == _attachToVehicle) then { //Self Attachment {!([_attachToVehicle, _unit, _itemClassname] call FUNC(canAttach))}) then { [_idPFH] call CBA_fnc_removePerFrameHandler; - [_unit, "forceWalk", "ACE_Attach", false] call EFUNC(common,statusEffect_set); - [_unit, "blockThrow", "ACE_Attach", false] call EFUNC(common,statusEffect_set); + [_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); [] call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); _unit removeAction _actionID; diff --git a/addons/captives/functions/fnc_handleRespawn.sqf b/addons/captives/functions/fnc_handleRespawn.sqf index 1dc6ca7bfa3..f3c728d0538 100644 --- a/addons/captives/functions/fnc_handleRespawn.sqf +++ b/addons/captives/functions/fnc_handleRespawn.sqf @@ -40,12 +40,12 @@ if (_respawn > 3) then { if (_unit getVariable [QGVAR(isHandcuffed), false]) then { [_unit, false] call FUNC(setHandcuffed); }; - [_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set); + [_unit, "setCaptive", QGVAR(handcuffed), false] call EFUNC(common,statusEffect_set); if (_unit getVariable [QGVAR(isSurrendering), false]) then { [_unit, false] call FUNC(setSurrendered); }; - [_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set); + [_unit, "setCaptive", QGVAR(surrendered), false] call EFUNC(common,statusEffect_set); if (_unit getVariable [QGVAR(isEscorting), false]) then { _unit setVariable [QGVAR(isEscorting), false, true]; diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index d3d9fa4e6b6..2ccd36493c8 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -41,8 +41,8 @@ if ((_unit getVariable [QGVAR(isHandcuffed), false]) isEqualTo _state) exitWith if (_state) then { _unit setVariable [QGVAR(isHandcuffed), true, true]; - [_unit, "setCaptive", QGVAR(Handcuffed), true] call EFUNC(common,statusEffect_set); - [_unit, "blockRadio", QGVAR(Handcuffed), true] call EFUNC(common,statusEffect_set); + [_unit, "setCaptive", QGVAR(handcuffed), true] call EFUNC(common,statusEffect_set); + [_unit, "blockRadio", QGVAR(handcuffed), true] call EFUNC(common,statusEffect_set); if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop [_unit, false] call FUNC(setSurrendered); @@ -82,8 +82,8 @@ if (_state) then { }, [_unit], 0.01] call CBA_fnc_waitAndExecute; } else { _unit setVariable [QGVAR(isHandcuffed), false, true]; - [_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set); - [_unit, "blockRadio", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set); + [_unit, "setCaptive", QGVAR(handcuffed), false] call EFUNC(common,statusEffect_set); + [_unit, "blockRadio", QGVAR(handcuffed), false] call EFUNC(common,statusEffect_set); //remove AnimChanged EH private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 887bfb26808..3a3724c94d2 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -44,8 +44,8 @@ if (_state) then { _unit setVariable [QGVAR(isSurrendering), true, true]; - [_unit, "setCaptive", QGVAR(Surrendered), true] call EFUNC(common,statusEffect_set); - [_unit, "blockRadio", QGVAR(Surrendered), true] call EFUNC(common,statusEffect_set); + [_unit, "setCaptive", QGVAR(surrendered), true] call EFUNC(common,statusEffect_set); + [_unit, "blockRadio", QGVAR(surrendered), true] call EFUNC(common,statusEffect_set); if (_unit == ACE_player) then { ["captive", [false, false, false, false, false, false, false, false, false, true]] call EFUNC(common,showHud); @@ -71,8 +71,8 @@ if (_state) then { }, [_unit], 0.01] call CBA_fnc_waitAndExecute; } else { _unit setVariable [QGVAR(isSurrendering), false, true]; - [_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set); - [_unit, "blockRadio", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set); + [_unit, "setCaptive", QGVAR(surrendered), false] call EFUNC(common,statusEffect_set); + [_unit, "blockRadio", QGVAR(surrendered), false] call EFUNC(common,statusEffect_set); //remove AnimChanged EH private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 4fc86ec58fe..dfc293028dc 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -158,6 +158,7 @@ 目隠しを外す Снять повязку с глаз Quitar vendas de los ojos + Remover a venda Cable Tie diff --git a/addons/chemlights/config.cpp b/addons/chemlights/config.cpp index 263fcb1a575..7f30429e798 100644 --- a/addons/chemlights/config.cpp +++ b/addons/chemlights/config.cpp @@ -3,6 +3,7 @@ class CfgPatches { class ADDON { + name = COMPONENT_NAME; units[] = {"ACE_Box_Chemlights","ACE_Item_Chemlight_Shield","ACE_Item_Chemlight_Shield_Green","ACE_Item_Chemlight_Shield_Red","ACE_Item_Chemlight_Shield_Blue","ACE_Item_Chemlight_Shield_Yellow","ACE_Item_Chemlight_Shield_Orange","ACE_Item_Chemlight_Shield_White","ModuleChemlightOrange","ModuleChemlightWhite","ModuleChemlightHiRed","ModuleChemlightHiYellow","ModuleChemlightHiWhite","ModuleChemlightHiBlue","ModuleChemlightHiGreen","ModuleChemlightUltraHiOrange"}; weapons[] = {"ACE_Chemlight_Shield", "ACE_Chemlight_Shield_Green","ACE_Chemlight_Shield_Red","ACE_Chemlight_Shield_Blue","ACE_Chemlight_Shield_Yellow","ACE_Chemlight_Shield_Orange","ACE_Chemlight_Shield_White"}; requiredVersion = REQUIRED_VERSION; diff --git a/addons/chemlights/script_component.hpp b/addons/chemlights/script_component.hpp index 324af2c55c1..5095ebe6664 100644 --- a/addons/chemlights/script_component.hpp +++ b/addons/chemlights/script_component.hpp @@ -1,4 +1,5 @@ #define COMPONENT chemlights +#define COMPONENT_BEAUTIFIED Chemlights #include "\z\ace\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index d3972dc7b30..36147753459 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -178,6 +178,7 @@ PREP(setupLocalUnitsHandler); PREP(setVariableJIP); PREP(setVariablePublic); PREP(setVolume); +PREP(setWeaponLightLaserState); PREP(showHud); PREP(statusEffect_addType); PREP(statusEffect_get); diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 8b7568f75e2..44197df81af 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -19,16 +19,16 @@ //Status Effect EHs: [QGVAR(setStatusEffect), LINKFUNC(statusEffect_set)] call CBA_fnc_addEventHandler; -["forceWalk", false, ["ace_advanced_fatigue", "ACE_SwitchUnits", "ACE_Attach", "ace_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_Trenches", "ace_medical_fracture"]] call FUNC(statusEffect_addType); -["blockSprint", false, ["ace_advanced_fatigue", "ace_dragging", "ace_medical_fracture"]] call FUNC(statusEffect_addType); -["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered)]] call FUNC(statusEffect_addType); -["blockDamage", false, ["fixCollision", "ACE_cargo"]] call FUNC(statusEffect_addType); -["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType); -["blockThrow", false, ["ACE_Attach", "ACE_concertina_wire", "ace_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_rearm", "ACE_refuel", "ACE_Sandbag", "ACE_Trenches", "ACE_tripod"]] call FUNC(statusEffect_addType); +["forceWalk", false, ["ace_advanced_fatigue", "ace_attach", "ace_dragging", "ace_explosives", QEGVAR(medical,fracture), "ace_rearm", "ace_refuel", "ace_sandbag", "ace_switchunits", "ace_tacticalladder", "ace_trenches"]] call FUNC(statusEffect_addType); +["blockSprint", false, ["ace_advanced_fatigue", "ace_dragging", QEGVAR(medical,fracture)]] call FUNC(statusEffect_addType); +["setCaptive", true, [QEGVAR(captives,handcuffed), QEGVAR(captives,surrendered)]] call FUNC(statusEffect_addType); +["blockDamage", false, ["fixCollision", "ace_cargo"]] call FUNC(statusEffect_addType); +["blockEngine", false, ["ace_refuel"]] call FUNC(statusEffect_addType); +["blockThrow", false, ["ace_attach", "ace_concertina_wire", "ace_dragging", "ace_explosives", "ace_rearm", "ace_refuel", "ace_sandbag", "ace_tacticalladder", "ace_trenches", "ace_tripod"]] call FUNC(statusEffect_addType); ["setHidden", true, ["ace_unconscious"]] call FUNC(statusEffect_addType); -["blockRadio", false, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType); +["blockRadio", false, [QEGVAR(captives,handcuffed), QEGVAR(captives,surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType); ["blockSpeaking", false, ["ace_unconscious"]] call FUNC(statusEffect_addType); -["disableWeaponAssembly", false, ["ace_common", "ace_common_lockVehicle", "ace_csw"]] call FUNC(statusEffect_addType); +["disableWeaponAssembly", false, ["ace_common", QGVAR(lockVehicle), "ace_csw"]] call FUNC(statusEffect_addType); ["lockInventory", true, [], true] call FUNC(statusEffect_addType); [QGVAR(forceWalk), { @@ -216,6 +216,7 @@ if (isServer) then { [QGVAR(setVectorDirAndUp), {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler; [QGVAR(addWeaponItem), {(_this select 0) addWeaponItem [(_this select 1), (_this select 2)]}] call CBA_fnc_addEventHandler; [QGVAR(removeMagazinesTurret), {(_this select 0) removeMagazinesTurret [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler; +[QGVAR(triggerAmmo), {triggerAmmo _this}] call CBA_fnc_addEventHandler; [QGVAR(setVanillaHitPointDamage), { params ["_object", "_hitPointAnddamage"]; diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index b559cb5dd90..f2194deb64f 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -12,6 +12,8 @@ GVAR(showHudHash) = createHashMap; GVAR(vehicleIconCache) = createHashMap; // for getVehicleIcon GVAR(wheelSelections) = createHashMap; +GVAR(InteractionConditions) = createHashMap; + GVAR(blockItemReplacement) = false; // Cache for FUNC(isModLoaded) diff --git a/addons/common/XEH_preStart.sqf b/addons/common/XEH_preStart.sqf index 208adea7b15..3168243c067 100644 --- a/addons/common/XEH_preStart.sqf +++ b/addons/common/XEH_preStart.sqf @@ -15,3 +15,25 @@ uiNamespace setVariable [QGVAR(addonCache), createHashMap]; // Cache for FUNC(getConfigName) uiNamespace setVariable [QGVAR(configNames), createHashMap]; + +//Add warnings for missing compat PBOs +GVAR(isModLoadedCache) = createHashMap; +{ + _x params ["_modPBO", "_compatPBO"]; + if ([_modPBO] call FUNC(isModLoaded) && {!([_compatPBO] call FUNC(isModLoaded))}) then { + WARNING_2("Weapon Mod [%1] missing ace compat pbo [%2]",_modPBO,_compatPBO); + }; +} forEach [ + ["CUP_Creatures_People_LoadOrder","ace_compat_cup_units"], + ["CUP_Vehicles_LoadOrder","ace_compat_cup_vehicles"], + ["CUP_Weapons_LoadOrder","ace_compat_cup_weapons"], + ["r3f_armes_c","ace_compat_r3f"], + ["RF_Data_Loadorder","ace_compat_rf"], + ["RH_acc","ace_compat_rh_acc"], + ["RH_de_cfg","ace_compat_rh_de"], + ["RH_m4_cfg","ace_compat_rh_m4"], + ["RH_PDW","ace_compat_rh_pdw"], + ["RKSL_PMII","ace_compat_rksl_pm_ii"], + ["iansky_opt","ace_compat_sma3_iansky"], + ["R3F_Armes","ace_compat_r3f"] +]; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 144e7d96c61..f7b27ce3749 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -70,8 +70,6 @@ class ctrlMapEmpty; #include "CompassControl.hpp" #include "CfgUIGrids.hpp" -class ACE_Extensions {}; - class ACE_Tests { vehicleTransportInventory = QPATHTOF(dev\test_vehicleInventory.sqf); mapConfigs = QPATHTOF(dev\test_mapConfigs.sqf); diff --git a/addons/common/functions/fnc_addCanInteractWithCondition.sqf b/addons/common/functions/fnc_addCanInteractWithCondition.sqf index 3dce27cf554..1d315f5aa53 100644 --- a/addons/common/functions/fnc_addCanInteractWithCondition.sqf +++ b/addons/common/functions/fnc_addCanInteractWithCondition.sqf @@ -19,17 +19,4 @@ params ["_conditionName", "_conditionFunc"]; _conditionName = toLowerANSI _conditionName; - -private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]]; -_conditions params ["_conditionNames", "_conditionFuncs"]; - -private _index = _conditionNames find _conditionName; - -if (_index == -1) then { - _index = count _conditionNames; -}; - -_conditionNames set [_index, _conditionName]; -_conditionFuncs set [_index, _conditionFunc]; - -GVAR(InteractionConditions) = _conditions; +GVAR(InteractionConditions) set [_conditionName, _conditionFunc]; diff --git a/addons/common/functions/fnc_canInteractWith.sqf b/addons/common/functions/fnc_canInteractWith.sqf index dd684d0619b..134a3101e4b 100644 --- a/addons/common/functions/fnc_canInteractWith.sqf +++ b/addons/common/functions/fnc_canInteractWith.sqf @@ -27,15 +27,11 @@ private _owner = _target getVariable [QGVAR(owner), objNull]; if (!isNull _owner && {_unit != _owner}) exitWith {false}; // check general conditions -private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]]; -_conditions params ["_conditionNames", "_conditionFuncs"]; - private _canInteract = true; - { - if (!(_x in _exceptions) && {!([_unit, _target] call (_conditionFuncs select _forEachIndex))}) exitWith { + if (!(_x in _exceptions) && {!([_unit, _target] call _y)}) exitWith { _canInteract = false; }; -} forEach _conditionNames; +} forEach GVAR(InteractionConditions); _canInteract diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 7b90a1b0a85..27623454ed8 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -103,47 +103,29 @@ if (_oldCompats isNotEqualTo []) then { /////////////// private _platform = toLowerANSI (productVersion select 6); -if (!isServer && {_platform in ["linux", "osx"]}) then { +if (_platform in ["linux", "osx"]) then { // Linux and OSX client ports do not support extensions at all - INFO("Operating system does not support extensions"); + if (hasInterface) then { + WARNING("Operating system does not support extensions"); + } else { + INFO("Operating system does not support extensions"); + }; } else { - { - private _extension = configName _x; - private _isWindows = _platform == "windows" && {getNumber (_x >> "windows") == 1}; - private _isLinux = _platform == "linux" && {getNumber (_x >> "linux") == 1}; - private _isClient = hasInterface && {getNumber (_x >> "client") == 1}; - private _isServer = !hasInterface && {getNumber (_x >> "server") == 1}; - - if ((_isWindows || _isLinux) && {_isClient || _isServer}) then { - private _versionEx = _extension callExtension "version"; - - if (_versionEx == "") then { - private _extensionFile = _extension; - - if (productVersion select 7 == "x64") then { - _extensionFile = format ["%1_x64", _extensionFile]; - }; - - private _platformExt = [".dll", ".so"] select (_platform == "linux"); - _extensionFile = format ["%1%2", _extensionFile, _platformExt]; + ("ace" callExtension ["version", []]) params [["_versionEx", "", [""]], ["_returnCode", -1, [-1]]]; - private _errorMsg = format ["Extension %1 not found.", _extensionFile]; - ERROR(_errorMsg); + if (_returnCode != 0 || {_versionEx == ""}) then { + private _errorMsg = format ["Extension not found. [Return Code: %1]", _returnCode]; + ERROR(_errorMsg); - if (hasInterface) then { - ["[ACE] ERROR", _errorMsg] call FUNC(errorMessage); - }; - } else { - // Print the current extension version - INFO_2("Extension version: %1: %2",_extension,_versionEx); - }; + if (hasInterface) then { + ["[ACE] ERROR", _errorMsg] call FUNC(errorMessage); }; - } forEach ("true" configClasses (configFile >> "ACE_Extensions")); + } else { + _versionEx = _versionEx select [0, 8]; // git hash + INFO_1("Extension [Version: %1]",_versionEx); + }; }; -if (isArray (configFile >> "ACE_Extensions" >> "extensions")) then { - WARNING("extensions[] array no longer supported"); -}; /////////////// // Check server version/addons diff --git a/addons/common/functions/fnc_getWeaponMuzzles.sqf b/addons/common/functions/fnc_getWeaponMuzzles.sqf index 11fffaf1960..0184a0c8c83 100644 --- a/addons/common/functions/fnc_getWeaponMuzzles.sqf +++ b/addons/common/functions/fnc_getWeaponMuzzles.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: commy2 + * Author: commy2, johnb43 * Get the muzzles of a weapon. * * Arguments: @@ -10,19 +10,30 @@ * All weapon muzzles * * Example: - * ["gun"] call ace_common_fnc_getWeaponMuzzles + * "arifle_AK12_F" call ace_common_fnc_getWeaponMuzzles * * Public: Yes */ params [["_weapon", "", [""]]]; -private _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles"); +private _config = configFile >> "CfgWeapons" >> _weapon; +if (!isClass _config) exitWith { + [] // return +}; + +private _muzzles = []; + +// Get config case muzzle names { if (_x == "this") then { - _muzzles set [_forEachIndex, configName (configFile >> "CfgWeapons" >> _weapon)]; + _muzzles pushBack (configName _config); + } else { + if (isClass (_config >> _x)) then { + _muzzles pushBack (configName (_config >> _x)); + }; }; -} forEach _muzzles; +} forEach getArray (_config >> "muzzles"); -_muzzles +_muzzles // return diff --git a/addons/common/functions/fnc_isAwake.sqf b/addons/common/functions/fnc_isAwake.sqf index f564e5e8728..1ab4ed21b0b 100644 --- a/addons/common/functions/fnc_isAwake.sqf +++ b/addons/common/functions/fnc_isAwake.sqf @@ -17,4 +17,4 @@ params ["_unit"]; -alive _unit && {!(_unit getVariable ["ACE_isUnconscious", false])} +lifeState _unit in ["HEALTHY", "INJURED"] diff --git a/addons/common/functions/fnc_removeCanInteractWithCondition.sqf b/addons/common/functions/fnc_removeCanInteractWithCondition.sqf index 6c5e8b56b66..841a9a00b15 100644 --- a/addons/common/functions/fnc_removeCanInteractWithCondition.sqf +++ b/addons/common/functions/fnc_removeCanInteractWithCondition.sqf @@ -18,16 +18,4 @@ params ["_conditionName"]; _conditionName = toLowerANSI _conditionName; - -private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]]; - -_conditions params ["_conditionNames", "_conditionFuncs"]; - -private _index = _conditionNames find _conditionName; - -if (_index == -1) exitWith {}; - -_conditionNames deleteAt _index; -_conditionFuncs deleteAt _index; - -GVAR(InteractionConditions) = _conditions; +GVAR(InteractionConditions) deleteAt _conditionName; diff --git a/addons/common/functions/fnc_setWeaponLightLaserState.sqf b/addons/common/functions/fnc_setWeaponLightLaserState.sqf new file mode 100644 index 00000000000..7f50573acb7 --- /dev/null +++ b/addons/common/functions/fnc_setWeaponLightLaserState.sqf @@ -0,0 +1,59 @@ +#include "..\script_component.hpp" +/* + * Author: johnb43 + * Toggles the unit's current weapon's light & laser. + * API for persistent lasers. Doesn't work on AI, as they have their own logic. + * + * Arguments: + * 0: Unit + * 1: Weapon light/laser state (default: false) + * + * Return Value: + * None + * + * Example: + * [player, true] call ace_common_fnc_setWeaponLightLaserState + * + * Public: Yes + */ + +params [["_unit", objNull, [objNull]], ["_state", false, [false]]]; + +if (!local _unit || {!alive _unit} || {!(_unit call FUNC(isPlayer))}) exitWith {}; + +if !(_unit call CBA_fnc_canUseWeapon) exitWith {}; + +private _currentWeapon = currentWeapon _unit; + +// Exit if unit has no weapon selected +if (_currentWeapon == "") exitWith {}; + +private _weaponIndex = [_unit, _currentWeapon] call FUNC(getWeaponIndex); + +// Ignore binoculars +if (_weaponIndex == -1) exitWith {}; + +_unit setVariable [QGVAR(laserEnabled_) + str _weaponIndex, _state]; + +// Turn off light/laser (switching between weapons can leave previous weapon laser on) +action ["GunLightOff", _unit]; +action ["IRLaserOff", _unit]; + +// Light/laser is off, don't need to do anything more +if (!_state) exitWith {}; + +// Turn laser on next frame (if weapon hasn't changed) +[{ + params ["_unit", "_currentWeapon"]; + + private _weaponState = (weaponState _unit) select [0, 3]; + + if (_weaponState select 0 != _currentWeapon) exitWith {}; + + action ["GunLightOn", _unit]; + action ["IRLaserOn", _unit]; + + _unit selectWeapon _weaponState; +}, [_unit, _currentWeapon]] call CBA_fnc_execNextFrame; + +nil diff --git a/addons/common/functions/fnc_switchAttachmentMode.sqf b/addons/common/functions/fnc_switchAttachmentMode.sqf index aae742db8a3..f721428a531 100644 --- a/addons/common/functions/fnc_switchAttachmentMode.sqf +++ b/addons/common/functions/fnc_switchAttachmentMode.sqf @@ -2,26 +2,31 @@ /* * Author: PabstMirror * Switch attachment from one mode to another - based on CBA_accessory_fnc_switchAttachment + * ToDo: Port this to CBA? * * Arguments: * 0: Unit - * 1: From - * 2: To + * 1: Weapon (String or CBA-Weapon-Index (not ace's getWeaponIndex)) + * 2: From + * 3: To * * Return Value: * None * * Example: - * [player, "ACE_DBAL_A3_Green_VP", "ACE_DBAL_A3_Green"] call ace_common_fnc_switchAttachmentMode + * [player, 0, "ACE_DBAL_A3_Green_VP", "ACE_DBAL_A3_Green"] call ace_common_fnc_switchAttachmentMode * * Public: No */ - -params ["_unit", "_currItem", "_switchItem"]; -TRACE_3("switchAttachmentMode",_unit,_currItem,_switchItem); -switch (currentWeapon _unit) do { - case (""): {}; +params ["_unit", "_weapon", "_currItem", "_switchItem"]; +TRACE_4("switchAttachmentMode",_unit,_weapon,_currItem,_switchItem); + +if (_weapon isEqualTo "") exitWith {}; + +private _exit = _unit != ACE_player; +switch (_weapon) do { + case 0; case (primaryWeapon _unit): { private _currWeaponType = 0; _unit removePrimaryWeaponItem _currItem; @@ -31,6 +36,7 @@ switch (currentWeapon _unit) do { ["CBA_attachmentSwitched", _this] call CBA_fnc_localEvent; }, [_unit, _currItem, _switchItem, _currWeaponType]] call CBA_fnc_execNextFrame; }; + case 1; case (handgunWeapon _unit): { private _currWeaponType = 1; _unit removeHandgunItem _currItem; @@ -40,6 +46,7 @@ switch (currentWeapon _unit) do { ["CBA_attachmentSwitched", _this] call CBA_fnc_localEvent; }, [_unit, _currItem, _switchItem, _currWeaponType]] call CBA_fnc_execNextFrame; }; + case 2; case (secondaryWeapon _unit): { private _currWeaponType = 2; _unit removeSecondaryWeaponItem _currItem; @@ -49,13 +56,18 @@ switch (currentWeapon _unit) do { ["CBA_attachmentSwitched", _this] call CBA_fnc_localEvent; }, [_unit, _currItem, _switchItem, _currWeaponType]] call CBA_fnc_execNextFrame; }; + default { + ERROR_1("bad weapon - %1",_this); + _exit = true; + }; }; +if (_exit) exitWith {}; // Don't notify if the unit isn't the local player or if an invalid weapon was passed + private _configSwitchItem = configfile >> "CfgWeapons" >> _switchItem; private _switchItemHintText = getText (_configSwitchItem >> "MRT_SwitchItemHintText"); private _switchItemHintImage = getText (_configSwitchItem >> "picture"); -if (_switchItemHintText isNotEqualTo "") then { + +playSound "click"; +if (_switchItemHintText != "") then { [[_switchItemHintImage, 2.0], [_switchItemHintText], true] call CBA_fnc_notify; }; -if (_unit == ACE_player) then { - playSound "click"; -}; diff --git a/addons/common/functions/fnc_switchPersistentLaser.sqf b/addons/common/functions/fnc_switchPersistentLaser.sqf index a2b7b9c1a8d..79c0e91f727 100644 --- a/addons/common/functions/fnc_switchPersistentLaser.sqf +++ b/addons/common/functions/fnc_switchPersistentLaser.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: Dystopian + * Author: Dystopian, johnb43 * Controls persistent laser state. * * Arguments: @@ -17,51 +17,87 @@ params ["_enabled"]; +if (!hasInterface) exitwith {}; + +// Reset state +{ + ACE_player setVariable [QGVAR(laserEnabled_) + str _x, nil]; +} forEach [0, 1, 2]; + if (!_enabled) exitWith { if (isNil QGVAR(laserKeyDownEH)) exitWith {}; - ["KeyDown", GVAR(laserKeyDownEH)] call CBA_fnc_removeDisplayHandler; + + removeUserActionEventHandler ["headlights", "Activate", GVAR(laserKeyDownEH)]; + ["loadout", GVAR(laserLoadoutEH)] call CBA_fnc_removePlayerEventHandler; ["turret", GVAR(laserTurretEH)] call CBA_fnc_removePlayerEventHandler; ["vehicle", GVAR(laserVehicleEH)] call CBA_fnc_removePlayerEventHandler; ["weapon", GVAR(laserWeaponEH)] call CBA_fnc_removePlayerEventHandler; + + GVAR(laserKeyDownEH) = nil; + GVAR(laserLoadoutEH) = nil; + GVAR(laserTurretEH) = nil; + GVAR(laserVehicleEH) = nil; + GVAR(laserWeaponEH) = nil; }; -GVAR(laserKeyDownEH) = ["KeyDown", { - if !((_this select 1) in actionKeys "headlights") exitWith {false}; - private _weapon = currentWeapon ACE_player; +private _fnc_getLightLaserState = { + private _currentWeapon = currentWeapon ACE_player; + + if (_currentWeapon == "") exitWith {}; + + // Ignore in vehicle except FFV + if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {}; + + private _weaponIndex = [ACE_player, _currentWeapon] call FUNC(getWeaponIndex); + + if (_weaponIndex == -1) exitWith {}; + + // Light/laser state only changes in the next frame + // However, as by default changing attachment modes is CTRL + L, the vanilla EH triggers when lights are bound to L (even despite CBA intercepting keystroke) + // Therefore, add an extra frame of delay, after which the previous laser state will have been restored + [{ + ACE_player setVariable [ + QGVAR(laserEnabled_) + str (_this select 1), + ACE_player isIRLaserOn (_this select 0) || {ACE_player isFlashlightOn (_this select 0)} + ]; + }, [_currentWeapon, _weaponIndex], 2] call CBA_fnc_execAfterNFrames; +}; + +// Get current weapon light/laser state +call _fnc_getLightLaserState; + +// Update state every time it's changed +GVAR(laserKeyDownEH) = addUserActionEventHandler ["headlights", "Activate", _fnc_getLightLaserState]; + +// Dropping weapons, as well as switching light/laser attachments turns off lights/lasers +GVAR(lastWeapons) = (getUnitLoadout ACE_player) select [0, 3]; + +// Monitor weapon addition/removal here +GVAR(laserLoadoutEH) = ["loadout", { + params ["_unit", "_loadout"]; + + private _weapons = _loadout select [0, 3]; + + if (_weapons isEqualTo GVAR(lastWeapons)) exitWith {}; + + GVAR(lastWeapons) = _weapons; + [ - { - params ["_weapon", "_laserWasEnabled"]; - private _laserEnabled = ACE_player isIRLaserOn _weapon || {ACE_player isFlashlightOn _weapon}; - if (_laserEnabled && {_laserWasEnabled} || {!_laserEnabled && {!_laserWasEnabled}}) exitWith {}; - private _weaponIndex = [ACE_player, _weapon] call FUNC(getWeaponIndex); - ACE_player setVariable [QGVAR(laserEnabled_) + str _weaponIndex, [nil, true] select _laserEnabled]; - }, - [_weapon, ACE_player isIRLaserOn _weapon || {ACE_player isFlashlightOn _weapon}] - ] call CBA_fnc_execNextFrame; - false -}] call CBA_fnc_addDisplayHandler; - -private _laserEH = { - if (sunOrMoon == 1) exitWith {}; - params ["_player"]; - private _weaponIndex = [_player, currentWeapon _player] call FUNC(getWeaponIndex); - if ( - !(_player getVariable [QGVAR(laserEnabled_) + str _weaponIndex, false]) - || {_weaponIndex > 0 && {"" != primaryWeapon _player}} // Arma switches to primary weapon if exists - || {!(_player call CBA_fnc_canUseWeapon)} // ignore in vehicle except FFV - ) exitWith {}; + _unit, + _unit getVariable [QGVAR(laserEnabled_) + str ([_unit, currentWeapon _unit] call FUNC(getWeaponIndex)), false] + ] call FUNC(setWeaponLightLaserState); +}] call CBA_fnc_addPlayerEventHandler; + +private _fnc_switchPersistentLaserEH = { + params ["_unit"]; + [ - // wait for weapon in "ready to fire" direction - {0.01 > getCameraViewDirection _this vectorDistance (_this weaponDirection currentWeapon _this)}, - {{_this action [_x, _this]} forEach ["GunLightOn", "IRLaserOn"]}, - _player, - 3, - {{_this action [_x, _this]} forEach ["GunLightOn", "IRLaserOn"]} - ] call CBA_fnc_waitUntilAndExecute; + _unit, + _unit getVariable [QGVAR(laserEnabled_) + str ([_unit, currentWeapon _unit] call FUNC(getWeaponIndex)), false] + ] call FUNC(setWeaponLightLaserState); }; -GVAR(laserLoadoutEH) = ["loadout", _laserEH] call CBA_fnc_addPlayerEventHandler; -GVAR(laserTurretEH) = ["turret", _laserEH] call CBA_fnc_addPlayerEventHandler; -GVAR(laserVehicleEH) = ["vehicle", _laserEH] call CBA_fnc_addPlayerEventHandler; -GVAR(laserWeaponEH) = ["weapon", _laserEH] call CBA_fnc_addPlayerEventHandler; +GVAR(laserTurretEH) = ["turret", _fnc_switchPersistentLaserEH] call CBA_fnc_addPlayerEventHandler; +GVAR(laserVehicleEH) = ["vehicle", _fnc_switchPersistentLaserEH] call CBA_fnc_addPlayerEventHandler; +GVAR(laserWeaponEH) = ["weapon", _fnc_switchPersistentLaserEH] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/compat_aegis/$PBOPREFIX$ b/addons/compat_aegis/$PBOPREFIX$ new file mode 100644 index 00000000000..1fc86838473 --- /dev/null +++ b/addons/compat_aegis/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\compat_aegis diff --git a/addons/compat_aegis/CfgVehicles.hpp b/addons/compat_aegis/CfgVehicles.hpp new file mode 100644 index 00000000000..8b069b517eb --- /dev/null +++ b/addons/compat_aegis/CfgVehicles.hpp @@ -0,0 +1,82 @@ +class CfgVehicles { + class Tank; + class Tank_F: Tank { + class Turrets { + class MainTurret; + }; + }; + + class MBT_01_base_F: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + // Overwrite the changes Aegis makes for the .338 coax MG on the Slammer/Merkava + // The idea is: + // 1) keep it as realistic as possible + // 2) easier to overwrite something with skipWhenMissingDependencies than to not overwrite something if another mod is loaded + weapons[] = {"cannon_120mm", "ACE_LMG_coax_MAG58_mem3"}; // Base 1.82: "cannon_120mm","LMG_coax" + magazines[] = { + "24Rnd_120mm_APFSDS_shells_Tracer_Red", + "12Rnd_120mm_HE_shells_Tracer_Red", + "12Rnd_120mm_HEAT_MP_T_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "4Rnd_120mm_LG_cannon_missiles" // Aegis adds laser-guided munitions + }; + }; + }; + }; + + class B_MBT_01_base_F: MBT_01_base_F {}; + class B_MBT_01_cannon_F: B_MBT_01_base_F {}; + class B_MBT_01_TUSK_F: B_MBT_01_cannon_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + weapons[] = {"cannon_120mm", "ACE_LMG_coax_MAG58_mem3"}; // Base 1.82: "cannon_120mm","LMG_coax" + magazines[] = { + "24Rnd_120mm_APFSDS_shells_Tracer_Red", + "12Rnd_120mm_HE_shells_Tracer_Red", + "12Rnd_120mm_HEAT_MP_T_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "200Rnd_762x51_Belt_Red", + "4Rnd_120mm_LG_cannon_missiles" // Aegis adds laser-guided munitions + }; + }; + }; + }; +}; diff --git a/addons/compat_aegis/config.cpp b/addons/compat_aegis/config.cpp new file mode 100644 index 00000000000..51a70b06ffb --- /dev/null +++ b/addons/compat_aegis/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_vehicles", "A3_Aegis_Armor_F_Aegis_MBT_01"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"johnb43"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_aegis/script_component.hpp b/addons/compat_aegis/script_component.hpp new file mode 100644 index 00000000000..d6fb73bd462 --- /dev/null +++ b/addons/compat_aegis/script_component.hpp @@ -0,0 +1,5 @@ +#define COMPONENT compat_aegis +#define COMPONENT_BEAUTIFIED Aegis Compatibility + +#include "\z\ace\addons\main\script_mod.hpp" +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/compat_csla/compat_csla_explosives/CfgMagazines.hpp b/addons/compat_csla/compat_csla_explosives/CfgMagazines.hpp index b29f7e717dc..0c8a8aa6fd8 100644 --- a/addons/compat_csla/compat_csla_explosives/CfgMagazines.hpp +++ b/addons/compat_csla/compat_csla_explosives/CfgMagazines.hpp @@ -1,15 +1,15 @@ class CfgMagazines { class US85_Magazine; class US85_ATMine_mag: US85_Magazine { - EGVAR(explosives,SetupObject) = "ACE_Explosives_Place_US85_ATMine_mag"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_US85_ATMine_mag"; useAction = 0; }; class US85_M14Mine_mag: US85_Magazine { - EGVAR(explosives,SetupObject) = "ACE_Explosives_Place_US85_M14Mine"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_US85_M14Mine"; useAction = 0; }; class US85_SatchelCharge_Mag: US85_Magazine { - EGVAR(explosives,SetupObject) = "ACE_Explosives_Place_US85_SatchelCharge_Mag"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_US85_SatchelCharge_Mag"; useAction = 0; }; }; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp index 3924ae03861..752745fb35e 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp @@ -65,7 +65,7 @@ class CfgVehicles { class ace_csw { enabled = 1; proxyWeapon = "CUP_proxy_DSHKM"; - magazineLocation = "_target selectionPosition 'magazine'"; + magazineLocation = "_target selectionPosition 'otocvez'"; disassembleWeapon = "CUP_DSHKM_carry"; disassembleTurret = "ace_csw_kordTripod"; desiredAmmo = 100; @@ -119,7 +119,7 @@ class CfgVehicles { class ace_csw { enabled = 1; proxyWeapon = "CUP_proxy_MK19"; - magazineLocation = "_target selectionPosition 'magazine'"; + magazineLocation = "_target selectionPosition 'otochlaven'"; disassembleWeapon = "CUP_MK19_carry"; disassembleTurret = "ace_csw_m3TripodLow"; desiredAmmo = 48; @@ -165,7 +165,7 @@ class CfgVehicles { class ace_csw { enabled = 1; proxyWeapon = "CUP_proxy_SPG9"; - magazineLocation = "_target selectionPosition 'otochlaven'"; + magazineLocation = "_target selectionPosition 'handle'"; disassembleWeapon = "CUP_SPG9_carry"; disassembleTurret = "ace_csw_spg9Tripod"; desiredAmmo = 1; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/stringtable.xml b/addons/compat_cup_weapons/compat_cup_weapons_csw/stringtable.xml index ea16be2905a..86e56ee3d90 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_csw/stringtable.xml +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/stringtable.xml @@ -9,6 +9,8 @@ [CSW] AGS30 Gurt [CSW] Cinta de AGS30 [CSW] Nastro AGS30 + [CSW] Cinto de AGS30 + [CSW] Ceinture AGS30 [CSW] MK19 Belt @@ -18,6 +20,8 @@ [CSW] MK19 Gurt [CSW] Cinta de MK19 [CSW] Nastro MK19 + [CSW] Cinto de MK19 + [CSW] Ceinture MK19 [CSW] TOW Tube @@ -27,6 +31,8 @@ [CSW] TOW Rohr [CSW] Tubo de TOW [CSW] Tubo TOW + [CSW] Tubo de TOW + [CSW] Tube TOW [CSW] TOW2 Tube @@ -36,6 +42,8 @@ [CSW] TOW2 Rohr [CSW] Tubo de TOW2 [CSW] Tubo TOW2 + [CSW] Tubo de TOW2 + [CSW] Tube TOW2 [CSW] PG-9 Round @@ -45,6 +53,8 @@ [CSW] PG-9 Rakete [CSW] Carga de PG-9 [CSW] Razzo PG-9 + [CSW] Cartucho PG-9 + [CSW] Projectile PG-9 [CSW] OG-9 Round @@ -54,6 +64,8 @@ [CSW] OG-9 Rakete [CSW] Carga de OG-9 [CSW] Razzo OG-9 + [CSW] Cartucho OG-9 + [CSW] Projectile OG-9. [CSW] M1 HE @@ -74,6 +86,7 @@ [CSW] M84 Rauch [CSW] Humo M84 [CSW] M84 Fumogeno + [CSW] M84 Fumígeno [CSW] M60A2 WP diff --git a/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgAmmo.hpp b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgAmmo.hpp index 1658715ddbd..eeb7e6037f2 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgAmmo.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgAmmo.hpp @@ -4,18 +4,18 @@ class CfgAmmo { hit = 3000; indirectHit = 3000; indirectHitRange = 5; - ace_explosives_explodeOnDefuse = 0.02; + EGVAR(explosives,explodeOnDefuse) = 0.02; }; class CUP_PipeBomb_Ammo: PipeBombBase { hit = 3000; indirectHit = 3000; indirectHitRange = 5; - ace_explosives_explodeOnDefuse = 0.02; + EGVAR(explosives,explodeOnDefuse) = 0.02; }; class CUP_Mine_Ammo; class CUP_IED_V1_Ammo: CUP_Mine_Ammo { - ace_explosives_explodeOnDefuse = 0.06; + EGVAR(explosives,explodeOnDefuse) = 0.06; triggerWhenDestroyed = 1; }; }; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgMagazines.hpp b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgMagazines.hpp index 15df2f73335..51dc9d0d781 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgMagazines.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgMagazines.hpp @@ -2,9 +2,9 @@ class CfgMagazines { class CA_Magazine; class CUP_TimeBomb_M: CA_Magazine { scope = 1; - ace_explosives_placeable = 1; + EGVAR(explosives,placeable) = 1; useAction = 0; - ace_explosives_setupObject = "ACE_PipeBomb_place_CUP"; + EGVAR(explosives,setupObject) = "ACE_PipeBomb_place_CUP"; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch", "Cellphone"}; class Timer { @@ -16,9 +16,9 @@ class CfgMagazines { }; }; class CUP_Mine_M: CUP_TimeBomb_M { - ace_explosives_placeable = 1; + EGVAR(explosives,placeable) = 1; useAction = 0; - ace_explosives_setupObject = "ACE_Mine_place_CUP"; + EGVAR(explosives,setupObject) = "ACE_Mine_place_CUP"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -27,9 +27,9 @@ class CfgMagazines { }; }; class CUP_MineE_M: CUP_TimeBomb_M { - ace_explosives_placeable = 1; + EGVAR(explosives,placeable) = 1; useAction = 0; - ace_explosives_setupObject = "ACE_MineE_place_CUP"; + EGVAR(explosives,setupObject) = "ACE_MineE_place_CUP"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -39,20 +39,20 @@ class CfgMagazines { }; class CUP_IED_V1_M: CUP_Mine_M { - ace_explosives_placeable = 1; + EGVAR(explosives,placeable) = 1; useAction = 0; - ace_explosives_setupObject = "ACE_IED_V1_place_CUP"; + EGVAR(explosives,setupObject) = "ACE_IED_V1_place_CUP"; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch", "Cellphone", "PressurePlate"}; }; }; class CUP_IED_V2_M: CUP_IED_V1_M { useAction = 0; - ace_explosives_setupObject = "ACE_IED_V2_place_CUP"; + EGVAR(explosives,setupObject) = "ACE_IED_V2_place_CUP"; }; class CUP_IED_V3_M: CUP_IED_V1_M { useAction = 0; - ace_explosives_setupObject = "ACE_IED_V3_place_CUP"; + EGVAR(explosives,setupObject) = "ACE_IED_V3_place_CUP"; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Timer { @@ -77,7 +77,7 @@ class CfgMagazines { }; class CUP_IED_V4_M: CUP_IED_V1_M { useAction = 0; - ace_explosives_setupObject = "ACE_IED_V4_place_CUP"; + EGVAR(explosives,setupObject) = "ACE_IED_V4_place_CUP"; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Timer { diff --git a/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgVehicles.hpp b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgVehicles.hpp index d10c315c3d7..17a7c59848e 100644 --- a/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgVehicles.hpp +++ b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgVehicles.hpp @@ -1,32 +1,31 @@ class CfgVehicles { class ACE_Explosives_Place; class ACE_PipeBomb_place_CUP: ACE_Explosives_Place { - displayName = "Satchel Charge"; + displayName = "$STR_CUP_dn_PipeBomb"; model = "\CUP\Weapons\CUP_Weapons_Put\CUP_Satchel.p3d"; - ace_explosives_offset[] = {0, 0, 0}; }; class ACE_Mine_place_CUP: ACE_Explosives_Place { - displayName = "AT-15 Anti-Tank Mine"; + displayName = "$STR_CUP_dn_Mine"; model = "\CUP\Weapons\CUP_Weapons_Put\CUP_AT15.p3d"; - ace_explosives_offset[] = {0, 0, 0}; }; class ACE_MineE_place_CUP: ACE_Explosives_Place { - displayName = "TM46 Anti-Tank Mine"; + displayName = "$STR_CUP_dn_MineE"; model = "\CUP\Weapons\CUP_Weapons_Put\CUP_TM46.p3d"; - ace_explosives_offset[] = {0, 0, 0}; }; class ACE_IED_V1_place_CUP: ACE_Explosives_Place { - displayName = "IED"; + displayName = "$STR_A3_CfgVehicles_IEDUrbanSmall_F"; model = "\CUP\Weapons\CUP_Weapons_Put\CUP_IED_V1.p3d"; - ace_explosives_offset[] = {0, 0, 0}; }; class ACE_IED_V2_place_CUP: ACE_IED_V1_place_CUP { + displayName = "$STR_A3_CfgVehicles_IEDUrbanBig_F"; model = "\CUP\Weapons\CUP_Weapons_Put\CUP_IED_V2.p3d"; }; class ACE_IED_V3_place_CUP: ACE_IED_V1_place_CUP { + displayName = "$STR_A3_CfgVehicles_IEDLandSmall_F"; model = "\CUP\Weapons\CUP_Weapons_Put\CUP_IED_V3.p3d"; }; class ACE_IED_V4_place_CUP: ACE_IED_V1_place_CUP { + displayName = "$STR_A3_CfgVehicles_IEDLandBig_F"; model = "\CUP\Weapons\CUP_Weapons_Put\CUP_IED_V4.p3d"; }; }; diff --git a/addons/compat_gm/compat_gm_explosives/CfgMagazines.hpp b/addons/compat_gm/compat_gm_explosives/CfgMagazines.hpp index 17d51d3b457..f0afb3b90cd 100644 --- a/addons/compat_gm/compat_gm_explosives/CfgMagazines.hpp +++ b/addons/compat_gm/compat_gm_explosives/CfgMagazines.hpp @@ -2,9 +2,8 @@ class CfgMagazines { // Explosives class gm_explosive_petn_charge_base; class gm_explosive_petn_charge: gm_explosive_petn_charge_base { - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) =QEGVAR(explosives,Place_gm_explosive_petn); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_gm_explosive_petn); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; @@ -21,9 +20,8 @@ class CfgMagazines { class gm_explosive_plnp_charge_base; class gm_explosive_plnp_charge: gm_explosive_plnp_charge_base { - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) =QEGVAR(explosives,Place_gm_explosive_plnp); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_gm_explosive_plnp); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; @@ -40,8 +38,8 @@ class CfgMagazines { class gm_mine_at_base; class gm_mine_at_tm46: gm_mine_at_base { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) =QEGVAR(explosives,Place_gm_mine_tm46); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_gm_mine_tm46); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -51,8 +49,8 @@ class CfgMagazines { }; }; class gm_mine_at_dm21: gm_mine_at_base { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) =QEGVAR(explosives,Place_gm_explosive_dm21); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_gm_explosive_dm21); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -62,8 +60,8 @@ class CfgMagazines { }; }; class gm_mine_at_mn111: gm_mine_at_base { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) =QEGVAR(explosives,Place_gm_explosive_m111); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_gm_explosive_m111); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -74,8 +72,8 @@ class CfgMagazines { }; class gm_mine_ap_dm31: gm_mine_at_base { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) =QEGVAR(explosives,Place_gm_explosive_dm31); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_gm_explosive_dm31); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; diff --git a/addons/compat_rf/compat_rf_realisticnames/stringtable.xml b/addons/compat_rf/compat_rf_realisticnames/stringtable.xml index 03d5003a620..16a6e927897 100644 --- a/addons/compat_rf/compat_rf_realisticnames/stringtable.xml +++ b/addons/compat_rf/compat_rf_realisticnames/stringtable.xml @@ -7,6 +7,7 @@ 이오텍 MRDS (카키) EOTech MRDS (Khaki) EOTech MRDS (Cachi) + EOTech MRDS (Khaki) EOTech MRDS (Tan) @@ -14,6 +15,7 @@ 이오텍 MRDS (황갈) EOTech MRDS (Hellbraun) EOTech MRDS (Marroncino) + EOTech MRDS (Marron) C-More Railway (Green, Desert) @@ -21,6 +23,7 @@ 씨모어 레일웨이 (녹색, 사막) C-More Railway (Grün, Wüste) C-More Railway (Verde, Deserto) + C-More Railway (Vert, Désert) C-More Railway (Green, Woodland) @@ -28,6 +31,7 @@ 씨모어 레일웨이 (녹색, 수풀 위장) C-More Railway (Grün, Grünes Tarnmuster) C-More Railway (Verde, Boschivo) + C-More Railway (Vert, Woodland) C-More Railway (Red, Desert) @@ -35,6 +39,7 @@ 씨모어 레일웨이 (빨강, 사막) C-More Railway (Rot, Wüste) C-More Railway (Rosso, Desert) + C-More Railway (Rouge, Désert) C-More Railway (Red, Woodland) @@ -42,6 +47,7 @@ 씨모어 레일웨이 (빨강, 수풀) C-More Railway (Rot, Grünes Tarnmuster) C-More Railway (Rosso, Boschivo) + C-More Railway (Rouge, Woodland) Aimpoint Micro R-1 @@ -49,6 +55,7 @@ 에임포인트 마이크로 R-1 Aimpoint Micro R-1 Aimpoint Micro R-1 + Aimpoint Micro R-1 Vortex Spitfire Prism @@ -56,6 +63,7 @@ 버텍스 스핏파이어 프리즘 Vortex Spitfire Prism Vortex Spitfire Prism + Vortex Spitfire Prism Vortex Spitfire Prism (Tan) @@ -63,6 +71,7 @@ 버텍스 스핏파이어 프리즘 (황갈) Vortex Spitfire Prism (Hellbraun) Vortex Spitfire Prism (Marroncino) + Vortex Spitfire Prism (Marron) Vortex Spitfire Prism (Khaki) @@ -70,6 +79,7 @@ 버텍스 스핏파이어 프리즘 (카키) Vortex Spitfire Prism (Khaki) Vortex Spitfire Prism (Cachi) + Vortex Spitfire Prism (Khaki) Vortex Spitfire Prism (Pistol) @@ -77,6 +87,7 @@ 버텍스 스핏파이어 프리즘 (권총용) Vortex Spitfire Prism (Pistole) Vortex Spitfire Prism (Pistola) + Vortex Spitfire Prism (Pistol) Glock 19X @@ -84,6 +95,7 @@ 글록 19X Glock 19X Glock 19X + Glock 19X Glock 19X (Khaki) @@ -91,6 +103,7 @@ 글록 19X (카키) Glock 19X (Khaki) Glock 19X (Cachi) + Glock 19X (Khaki) Glock 19X (Tan) @@ -98,6 +111,7 @@ 글록 19X (황갈) Glock 19X (Hellbraun) Glock 19X (Marroncino) + Glock 19X (Marron) Glock 19X Auto @@ -105,6 +119,7 @@ 글록 19X 기관권총 Glock 19X Auto Glock 19X Auto + Glock 19X Auto Glock 19X Auto (Khaki) @@ -112,6 +127,7 @@ 글록 19X 기관권총 (카키) Glock 19X Auto (Khaki) Glock 19X Auto (Cachi) + Glock 19X Auto (Khaki) Glock 19X Auto (Tan) @@ -119,6 +135,7 @@ 글록 19X 기관권총 (황갈) Glock 19X Auto (Hellbraun) Glock 19X Auto (Marroncino) + Glock 19X Auto (Marron) Desert Eagle Mark XIX L5 @@ -126,6 +143,7 @@ 데저트 이글 마크 XIX L5 Desert Eagle Mark XIX L5 Desert Eagle Mark XIX L5 + Desert Eagle Mark XIX L5 Desert Eagle Mark XIX L5 (Classic) @@ -133,6 +151,7 @@ 데저트 이글 마크 XIX L5 (클래식) Desert Eagle Mark XIX L5 (Klassisch) Desert Eagle Mark XIX L5 (Classico) + Desert Eagle Mark XIX L5 (Classique) Desert Eagle Mark XIX L5 (Bronze) @@ -140,6 +159,7 @@ 데저트 이글 마크 XIX L5 (브론즈) Desert Eagle Mark XIX L5 (Bronze) Desert Eagle Mark XIX L5 (Bronzo) + Desert Eagle Mark XIX L5 (Bronze) Desert Eagle Mark XIX L5 (Copper) @@ -147,6 +167,7 @@ 데저트 이글 마크 XIX L5 (구리) Desert Eagle Mark XIX L5 (Kupfer) Desert Eagle Mark XIX L5 (Rame) + Desert Eagle Mark XIX L5 (Cuivre) Desert Eagle Mark XIX L5 (Gold) @@ -154,6 +175,7 @@ 데저트 이글 마크 XIX L5 (금색) Desert Eagle Mark XIX L5 (Gold) Desert Eagle Mark XIX L5 (Oro) + Desert Eagle Mark XIX L5 (Or) HERA H6 (Tan) @@ -161,6 +183,7 @@ 헤라 H6 (황갈) HERA H6 (Hellbraun) HERA H6 (Marroncino) + HERA H6 (Marron) HERA H6 (Olive) @@ -168,6 +191,7 @@ 헤라 H6 (올리브) HERA H6 (Olivgrün) HERA H6 (Oliva) + HERA H6 (Olive) HERA H6 (Black) @@ -175,6 +199,7 @@ 헤라 H6 (검정) HERA H6 (Schwarz) HERA H6 (Nero) + HERA H6 (Noir) HERA H6 (Digital) @@ -182,6 +207,7 @@ 헤라 H6 (AAF 디지털) HERA H6 (Digital) HERA H6 (Digitale) + HERA H6 (Digital) HERA H6 (Gold) @@ -189,6 +215,7 @@ 헤라 H6 (금색) HERA H6 (Gold) HERA H6 (Oro) + HERA H6 (Or) VS-121 (Black) @@ -196,6 +223,7 @@ VS-121 (검정) VS-121 (Schwarz) VS-121 (Nero) + VS-121 (Noir) VS-121 (Tan) @@ -203,6 +231,7 @@ VS-121 (황갈) VS-121 (Hellbraun) VS-121 (Marroncino) + VS-121 (Marron) Vector SMG (Black) @@ -210,6 +239,7 @@ 벡터 SMG (검정) Vector SMG (Schwarz) Vector SMG (Nero) + Vector SMG (Noir) ASh-12 (Black) @@ -217,6 +247,7 @@ ASh-12 (검정) ASh-12 (Schwarz) ASh-12 (Nero) + ASh-12 (Noir) ASh-12 (Desert) @@ -224,6 +255,7 @@ ASh-12 (사막) ASh-12 (Wüste) ASh-12 (Deserto) + ASh-12 (Désert ) ASh-12 (Urban) @@ -231,6 +263,7 @@ ASh-12 (도심) ASh-12 (Urban) ASh-12 (Urbano) + ASh-12 (Urbain) ASh-12 (Woodland) @@ -238,6 +271,7 @@ ASh-12 (수풀) ASh-12 (Grünes Tarnmuster) ASh-12 (Boschivo) + ASh-12 (Woodland) ASh-12 GL (Black) @@ -245,6 +279,7 @@ ASh-12 GL (검정) ASh-12 GL (Schwarz) ASh-12 GL (Nero) + ASh-12 GL (Noir) ASh-12 GL (Desert) @@ -252,6 +287,7 @@ ASh-12 GL (사막) ASh-12 GL (Wüste) ASh-12 GL (Deserto) + ASh-12 GL (Désert) ASh-12 GL (Urban) @@ -259,6 +295,7 @@ ASh-12 GL (도심) ASh-12 GL (Urban) ASh-12 GL (Urbano) + ASh-12 GL (Urbain) ASh-12 GL (Woodland) @@ -266,6 +303,7 @@ ASh-12 GL (수풀) ASh-12 GL (Grünes Tarnmuster) ASh-12 GL (Boschivo) + ASh-12 GL (Woodland) ASh-12 LR (Black) @@ -273,6 +311,7 @@ ASh-12 LR (검정) ASh-12 LR (Schwarz) ASh-12 LR (Nero) + ASh-12 LR (Noir) ASh-12 LR (Desert) @@ -280,6 +319,7 @@ ASh-12 LR (사막) ASh-12 LR (Wüste) ASh-12 LR (Deserto) + ASh-12 LR (Désert) ASh-12 LR (Urban) @@ -287,6 +327,7 @@ ASh-12 LR (도심) ASh-12 LR (Urban) ASh-12 LR (Urbano) + ASh-12 LR (Urbain) ASh-12 LR (Woodland) @@ -294,6 +335,7 @@ ASh-12 LR (수풀) ASh-12 LR (Grünes Tarnmuster) ASh-12 LR (Boschivo) + ASh-12 LR (Woodland) AW159 Wildcat ASW @@ -301,6 +343,7 @@ AW159 와일드캣 ASW AW159 Wildcat ASW AW159 Wildcat ASW + AW159 Wildcat ASW AW159 Wildcat ASW (Unarmed) @@ -308,6 +351,7 @@ AW159 와일드캣 ASW (비무장) AW159 Wildcat ASW (Unbewaffnet) AW159 Wildcat ASW (Disarmato) + AW159 Wildcat ASW (non armé) H225 Super Puma (Transport) @@ -315,6 +359,7 @@ H225 슈퍼 퓨마 (비무장) H225 Super Puma (Transport) H225 Super Puma (Trasporto) + H225 Super Puma (Transport ) H225 Super Puma (Civilian) @@ -322,6 +367,7 @@ H225 슈퍼 퓨마 (비무장) H225 Super Puma (Zivil) H225 Super Puma (Civile) + H225 Super Puma (Civil) H215 Super Puma (Transport) @@ -329,6 +375,7 @@ H215 슈퍼 퓨마 (비무장) H215 Super Puma (Transport) H215 Super Puma (Trasporto) + H215 Super Puma (Transport) H215 Super Puma (Civilian) @@ -336,6 +383,7 @@ H215 슈퍼 퓨마 (비무장) H215 Super Puma (Zivil) H215 Super Puma (Civile) + H215 Super Puma (Civil) H215 Super Puma (Unarmed) @@ -343,6 +391,7 @@ H215 슈퍼 퓨마 (비무장) H215 Super Puma (Unbewaffnet) H215 Super Puma (Disarmato) + H215 Super Puma (non armé) H225M Super Cougar SOCAT @@ -350,6 +399,7 @@ H225M 슈퍼 쿠거 SOCAT H225M Super Cougar SOCAT H225M Super Cougar SOCAT + H225M Super Cougar SOCAT H225M Super Cougar SOCAT @@ -357,6 +407,7 @@ H225M 슈퍼 쿠거 SOCAT H225M Super Cougar SOCAT H225M Super Cougar SOCAT + H225M Super Cougar SOCAT H225M Super Cougar @@ -364,6 +415,7 @@ H225M 슈퍼 쿠거 H225M Super Cougar H225M Super Cougar + H225M Super Cougar H225 Super Puma SAR @@ -371,6 +423,7 @@ H225 슈퍼 퓨마 SAR H225 Super Puma SAR H225 Super Puma SAR + H225 Super Puma SAR H225M Super Cougar (Unarmed) @@ -378,6 +431,7 @@ H225M Super Cougar (Unbewaffnet) H225M Super Cougar (Disarmato) H225M 슈퍼 쿠거 (비무장) + H225M Super Cougar (Non armé) HEMTT Fire Truck @@ -398,6 +452,7 @@ 타이푼 급수 Typhoon Water Typhoon Acqua + Typhoon Water Ram 1500 @@ -405,6 +460,7 @@ 램 1500 Ram 1500 Ram 1500 + Ram 1500 Ram 1500 (Fuel) @@ -412,6 +468,7 @@ 램 1500 (연료) Ram 1500 (Treibstoff) Ram 1500 (Carburante) + Ram 1500 (Carburant) Ram 1500 (Services) @@ -419,6 +476,7 @@ 램 1500 (서비스) Ram 1500 (Pannenhilfe) Ram 1500 (Servizi) + Ram 1500 (Dépannage) Ram 1500 (Repair) @@ -426,6 +484,7 @@ 램 1500 (정비) Ram 1500 (Instandsetzung) Ram 1500 (Riparazioni) + Ram 1500 (Réparation) Ram 1500 (Comms) @@ -433,6 +492,7 @@ 램 1500 (통신) Ram 1500 (Kommunikation) Ram 1500 (Comunicazioni) + Ram 1500 (Communication) Ram 1500 (HMG) @@ -440,6 +500,7 @@ 램 1500 (중기관총) Ram 1500 (HMG) Ram 1500 (HMG) + Ram 1500 (HMG) Ram 1500 (MMG) @@ -447,6 +508,7 @@ 램 1500 (중형기관총) Ram 1500 (MMG) Ram 1500 (MMG) + Ram 1500 (MMG) Ram 1500 (MRL) @@ -454,6 +516,7 @@ 램 1500 (다연장로켓) Ram 1500 (MRL) Ram 1500 (MRL) + Ram 1500 (MRL) Ram 1500 (AA) @@ -461,6 +524,7 @@ 램 1500 (대공) Ram 1500 (AA) Ram 1500 (AA) + Ram 1500 (AA) Ram 1500 (Covered) @@ -468,6 +532,7 @@ 램 1500 (커버) Ram 1500 (Abgedeckt) Ram 1500 (Coperto) + Ram 1500 (couvert) Ram 1500 (Water) @@ -475,6 +540,7 @@ 램 1500 (급수) Ram 1500 (Wasser) Ram 1500 (Acqua) + Ram 1500 (eau) RSG60 @@ -482,6 +548,7 @@ RSG60 RSG60 RSG60 + RSG60 AMOS Container @@ -489,6 +556,7 @@ AMOS 컨테이너 AMOS Container AMOS Container + AMOS Container Drone40 @@ -496,6 +564,7 @@ 드론40 Drone40 Drone40 + Drone40 Drone40 Scout @@ -503,6 +572,7 @@ 드론40 정찰 Drone40 Scout Drone40 Scout + Drone40 Scout Drone40 HE @@ -510,6 +580,7 @@ 드론40 고폭 Drone40 HE Drone40 HE + Drone40 HE Drone40 Smoke (White) @@ -517,6 +588,7 @@ 드론40 연막 (백색) Drone40 Smoke (Weiß) Drone40 Smoke (Bianco) + Drone40 Fumée (Blanc) Drone40 Smoke (Blue) @@ -524,6 +596,7 @@ 드론40 연막 (청색) Drone40 Smoke (Blau) Drone40 Smoke (Blu) + Drone40 Fumée (Bleu) Drone40 Smoke (Red) @@ -531,6 +604,7 @@ 드론40 연막 (적색) Drone40 Smoke (Rot) Drone40 Smoke (Rosso) + Drone40 Fumée (Rouge) Drone40 Smoke (Green) @@ -538,6 +612,7 @@ 드론40 연막 (녹색) Drone40 Smoke (Grün) Drone40 Smoke (Verde) + Drone40 Fumée (Vert) Drone40 Smoke (Orange) @@ -545,6 +620,7 @@ 드론40 연막 (주황색) Drone40 Smoke (Orange) Drone40 Smoke (Arancione) + Drone40 Fumée (Orange) diff --git a/addons/compat_rhs_afrf3/XEH_postInit.sqf b/addons/compat_rhs_afrf3/XEH_postInit.sqf index be180179a55..e740d0d8a66 100644 --- a/addons/compat_rhs_afrf3/XEH_postInit.sqf +++ b/addons/compat_rhs_afrf3/XEH_postInit.sqf @@ -1,5 +1,7 @@ #include "script_component.hpp" +if !(["ace_nametags"] call EFUNC(common,isModLoaded)) exitWith {}; + private _russianRankIcons = [ QPATHTOEF(nametags,UI\icons_russia\private_gs.paa), QPATHTOEF(nametags,UI\icons_russia\corporal_gs.paa), diff --git a/addons/compat_rhs_afrf3/XEH_preInit.sqf b/addons/compat_rhs_afrf3/XEH_preInit.sqf index b47cf6628db..2ca4338e90c 100644 --- a/addons/compat_rhs_afrf3/XEH_preInit.sqf +++ b/addons/compat_rhs_afrf3/XEH_preInit.sqf @@ -6,4 +6,12 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +// Disable RHS' wheel replacement mechanic +if (["ace_repair"] call EFUNC(common,isModLoaded)) then { + RHS_Retread_Enabled = false; + rhs_btr70_EnableRetread = false; + rhs_TypeTirePressure = 1; + RHS_BTR_Effects_Init = true; +}; + ADDON = true; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/CfgMagazines.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/CfgMagazines.hpp index 4f8e808bd59..4ad71e5e24c 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/CfgMagazines.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_explosives/CfgMagazines.hpp @@ -2,7 +2,7 @@ class CfgMagazines { // ACE Explosives class ATMine_Range_Mag; class rhs_mine_tm62m_mag: ATMine_Range_Mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_tm62m); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_tm62m); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -12,7 +12,7 @@ class CfgMagazines { }; class rhs_mine_pmn2_mag: ATMine_Range_Mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_pmn2); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_pmn2); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -22,7 +22,7 @@ class CfgMagazines { }; class rhs_mag_mine_ptm1: ATMine_Range_Mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_ptm1); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_ptm1); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -32,7 +32,7 @@ class CfgMagazines { }; class rhs_mag_mine_pfm1: ATMine_Range_Mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_pfm1); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_pfm1); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -42,8 +42,7 @@ class CfgMagazines { }; class rhs_ec75_mag: ATMine_Range_Mag { - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_ec75); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_ec75); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; @@ -59,27 +58,27 @@ class CfgMagazines { }; class rhs_ec75_sand_mag: rhs_ec75_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_ec75_sand); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_ec75_sand); }; class rhs_ec200_mag: rhs_ec75_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_ec200); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_ec200); }; class rhs_ec200_sand_mag: rhs_ec200_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_ec200_sand); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_ec200_sand); }; class rhs_ec400_mag: rhs_ec75_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_ec400); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_ec400); }; class rhs_ec400_sand_mag: rhs_ec400_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_ec400_sand); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_ec400_sand); }; class rhs_mine_msk40p_white_mag: ATMine_Range_Mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_msk40p_white); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_msk40p_white); class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -89,19 +88,19 @@ class CfgMagazines { }; class rhs_mine_msk40p_red_mag: rhs_mine_msk40p_white_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_msk40p_red); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_msk40p_red); }; class rhs_mine_msk40p_green_mag: rhs_mine_msk40p_white_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_msk40p_green); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_msk40p_green); }; class rhs_mine_msk40p_blue_mag: rhs_mine_msk40p_white_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_msk40p_blue); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_msk40p_blue); }; class rhs_mine_sm320_white_mag: rhs_mine_msk40p_white_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_sm320_white); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_sm320_white); class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -111,15 +110,15 @@ class CfgMagazines { }; class rhs_mine_sm320_red_mag: rhs_mine_sm320_white_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_sm320_red); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_sm320_red); }; class rhs_mine_sm320_green_mag: rhs_mine_sm320_white_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_sm320_green); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_sm320_green); }; class rhs_mine_ozm72_a_mag: ATMine_Range_Mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_ozm72_a); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_ozm72_a); class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -129,12 +128,11 @@ class CfgMagazines { }; class rhs_mine_ozm72_b_mag: rhs_mine_ozm72_a_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_ozm72_b); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_ozm72_b); }; class rhs_mine_ozm72_c_mag: rhs_mine_ozm72_a_mag { - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhs_mine_ozm72_c); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhs_mine_ozm72_c); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Command", "MK16_Transmitter"}; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/CfgVehicles.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/CfgVehicles.hpp new file mode 100644 index 00000000000..6cd2237a6f5 --- /dev/null +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/CfgVehicles.hpp @@ -0,0 +1,123 @@ +class CfgVehicles { + class Wheeled_APC_F; + class rhs_btr_base: Wheeled_APC_F { + class EGVAR(interaction,anims) { + class wheel_1_unhide { + positions[] = {{-0.8, -1.7, 0}}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + class wheel_2_unhide { + positions[] = {{0.35, -2.9, -0.1}}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + class rhs_btr70_vmf: rhs_btr_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class wheel_1_unhide: wheel_1_unhide { + positions[] = {{-1.2, -2.6, 0.2}}; + }; + class wheel_2_unhide: wheel_2_unhide { + positions[] = {{-0.3, -3.8, 0}}; + }; + }; + }; + + class rhs_btr70_msv: rhs_btr70_vmf {}; + class rhs_btr80_msv: rhs_btr70_msv { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class wheel_1_unhide: wheel_1_unhide { + positions[] = {{-1, -2.5, 0.6}}; + }; + class wheel_2_unhide: wheel_2_unhide { + enabled = 0; + }; + }; + }; + + class Truck_F; + class rhs_truck: Truck_F { + class EGVAR(interaction,anims) { + class spare_hide { + positions[] = {"_target selectionPosition ['spare', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + class RHS_Ural_BaseTurret: Truck_F { + class EGVAR(interaction,anims) { + class spare_hide { + positions[] = {"_target selectionPosition ['spare', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + class rhs_zil131_base: Truck_F { + class EGVAR(interaction,anims) { + class spare_hide { + positions[] = {"_target selectionPosition ['spare', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + class rhs_kraz255_base; + class rhs_kraz255b1_base: rhs_kraz255_base { + class EGVAR(interaction,anims) { + class spare_hide { + positions[] = {"_target selectionPosition ['spare', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + class O_Truck_02_covered_F; + class rhs_kamaz5350: O_Truck_02_covered_F { + class EGVAR(interaction,anims) { + class spare_hide { + positions[] = {"_target selectionPosition ['spare', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + class MRAP_02_base_F; + class rhs_tigr_base: MRAP_02_base_F { + class EGVAR(interaction,anims) { + class spare_hide { + positions[] = {"_target selectionPosition ['spare', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + class Offroad_01_base_f; + class RHS_UAZ_Base: Offroad_01_base_f { + class EGVAR(interaction,anims) { + class spare_hide { + positions[] = {"_target selectionPosition ['spare', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; +}; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/config.cpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/config.cpp new file mode 100644 index 00000000000..d6d4fab1077 --- /dev/null +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "rhs_main_loadorder", + "ace_repair" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"Dystopian", "johnb43"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/script_component.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/script_component.hpp new file mode 100644 index 00000000000..1af928486c3 --- /dev/null +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_repair/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT repair +#define SUBCOMPONENT_BEAUTIFIED Repair +#include "..\script_component.hpp" diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/CfgAmmo.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/CfgAmmo.hpp index 0808c7ff1d2..458969b7c0b 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/CfgAmmo.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/CfgAmmo.hpp @@ -1,83 +1,83 @@ class CfgAmmo { class APERSMine_Range_Ammo; class rhs_mine_a200_bz_ammo: APERSMine_Range_Ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.035}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.035}; }; class rhs_mine_a200_dz35_ammo: rhs_mine_a200_bz_ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.02}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.02}; }; class rhs_mine_glasmine43_hz_ammo: APERSMine_Range_Ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.015}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.015}; }; class rhs_mine_glasmine43_bz_ammo: rhs_mine_glasmine43_hz_ammo { - ace_minedetector_detectable = 0; + EGVAR(minedetector,detectable) = 0; }; class rhs_mine_bounding_trigger_base; class rhs_mine_m2a3b_press_ammo: rhs_mine_bounding_trigger_base { - ace_explosives_defuseObjectPosition[] = {0, 0.046, 0.02}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0.046, 0.02}; }; class rhs_mine_m2a3b_trip_ammo: rhs_mine_m2a3b_press_ammo { - ace_explosives_defuseObjectPosition[] = {0, 0.046, 0.055}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0.046, 0.055}; }; class rhs_mine_M3_pressure_ammo: APERSMine_Range_Ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.015}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.015}; }; class rhs_mine_M3_tripwire_ammo: rhs_mine_M3_pressure_ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.055}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.055}; }; class ATMine_Range_Ammo; class rhs_mine_TM43_ammo: ATMine_Range_Ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.072}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.072}; }; class rhs_mine_M7A2_ammo: APERSMine_Range_Ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.067}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.067}; }; class rhs_mine_Mk2_pressure_ammo: APERSMine_Range_Ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.02}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.02}; }; class rhs_mine_Mk2_tripwire_ammo: rhs_mine_Mk2_pressure_ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.055}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.055}; }; class APERSBoundingMine_Range_Ammo; class rhs_mine_smine35_press_ammo: APERSBoundingMine_Range_Ammo { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.03}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.03}; }; class rhs_mine_smine35_trip_ammo: rhs_mine_bounding_trigger_base { - ace_explosives_defuseObjectPosition[] = {0, 0, 0.04}; + EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.04}; }; class rhs_mine_smine44_trip_ammo: rhs_mine_smine35_trip_ammo { - ace_explosives_defuseObjectPosition[] = {-0.03, 0, 0.015}; + EGVAR(explosives,defuseObjectPosition)[] = {-0.03, 0, 0.015}; }; class rhs_mine_smine44_press_ammo: APERSBoundingMine_Range_Ammo { - ace_explosives_defuseObjectPosition[] = {-0.02, 0, 0.02}; + EGVAR(explosives,defuseObjectPosition)[] = {-0.02, 0, 0.02}; }; class APERSTripMine_Wire_Ammo; class rhs_mine_stockmine43_2m_ammo: APERSTripMine_Wire_Ammo { - ace_explosives_defuseObjectPosition[] = {-1, 0, 0.25}; + EGVAR(explosives,defuseObjectPosition)[] = {-1, 0, 0.25}; }; class rhs_mine_stockmine43_4m_ammo: rhs_mine_stockmine43_2m_ammo { - ace_explosives_defuseObjectPosition[] = {-2, 0, 0.25}; + EGVAR(explosives,defuseObjectPosition)[] = {-2, 0, 0.25}; }; class DemoCharge_Remote_Ammo; class rhs_charge_M2tet_x2_ammo: DemoCharge_Remote_Ammo { - ace_explosives_defuseObjectPosition[] = {0.095, 0, 0.055}; + EGVAR(explosives,defuseObjectPosition)[] = {0.095, 0, 0.055}; }; }; diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/CfgMagazines.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/CfgMagazines.hpp index ce882e18258..d25a27bebd8 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/CfgMagazines.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_explosives/CfgMagazines.hpp @@ -1,7 +1,7 @@ class CfgMagazines { class APERSMine_Range_Mag; class rhs_mine_a200_bz_mag: APERSMine_Range_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_a200_bz"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_a200_bz"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -11,7 +11,7 @@ class CfgMagazines { }; class rhs_mine_a200_dz35_mag: rhs_mine_a200_bz_mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_a200_dz35"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_a200_dz35"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -21,7 +21,7 @@ class CfgMagazines { }; class rhs_mine_glasmine43_hz_mag: APERSMine_Range_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_glasmine43_hz"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_glasmine43_hz"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -31,12 +31,12 @@ class CfgMagazines { }; class rhs_mine_glasmine43_bz_mag: rhs_mine_glasmine43_hz_mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_glasmine43_bz"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_glasmine43_bz"; }; class APERSBoundingMine_Range_Mag; class rhs_mine_m2a3b_press_mag: APERSBoundingMine_Range_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_m2a3b_press"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_m2a3b_press"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -46,7 +46,7 @@ class CfgMagazines { }; class rhs_mine_m2a3b_trip_mag: rhs_mine_m2a3b_press_mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_m2a3b_trip"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_m2a3b_trip"; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -56,7 +56,7 @@ class CfgMagazines { }; class rhs_mine_m3_pressure_mag: APERSMine_Range_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_m3_pressure"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_m3_pressure"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -67,7 +67,7 @@ class CfgMagazines { class APERSTripMine_Wire_Mag; class rhs_mine_M3_tripwire_mag: APERSTripMine_Wire_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_M3_tripwire"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_M3_tripwire"; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -78,7 +78,7 @@ class CfgMagazines { class ATMine_Range_Mag; class rhs_mine_TM43_mag: ATMine_Range_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_TM43"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_TM43"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -88,7 +88,7 @@ class CfgMagazines { }; class rhs_mine_M7A2_mag: APERSMine_Range_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_M7A2"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_M7A2"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -98,7 +98,7 @@ class CfgMagazines { }; class rhs_mine_mk2_pressure_mag: APERSMine_Range_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_mk2_pressure"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_mk2_pressure"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -108,7 +108,7 @@ class CfgMagazines { }; class rhs_mine_Mk2_tripwire_mag: APERSTripMine_Wire_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_Mk2_tripwire"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_Mk2_tripwire"; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -118,7 +118,7 @@ class CfgMagazines { }; class rhs_mine_smine35_press_mag: APERSBoundingMine_Range_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_smine35_press"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_smine35_press"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -128,7 +128,7 @@ class CfgMagazines { }; class rhs_mine_smine35_trip_mag: rhs_mine_smine35_press_mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_smine35_trip"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_smine35_trip"; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -138,7 +138,7 @@ class CfgMagazines { }; class rhs_mine_smine44_trip_mag: APERSBoundingMine_Range_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_smine44_trip"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_smine44_trip"; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -148,7 +148,7 @@ class CfgMagazines { }; class rhs_mine_smine44_press_mag: rhs_mine_smine44_trip_mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_smine44_press"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_smine44_press"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -158,7 +158,7 @@ class CfgMagazines { }; class rhs_mine_stockmine43_2m_mag: APERSTripMine_Wire_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_stockmine43_2m"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_stockmine43_2m"; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -168,7 +168,7 @@ class CfgMagazines { }; class rhs_mine_stockmine43_4m_mag: rhs_mine_stockmine43_2m_mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_mine_stockmine43_4m"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_mine_stockmine43_4m"; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire { @@ -179,7 +179,7 @@ class CfgMagazines { class DemoCharge_Remote_Mag; class rhs_charge_M2tet_x2_mag: DemoCharge_Remote_Mag { - ace_explosives_SetupObject = "ACE_Explosives_Place_rhs_charge_M2tet_x2"; + EGVAR(explosives,setupObject) = "ACE_Explosives_Place_rhs_charge_M2tet_x2"; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; class Timer { diff --git a/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/CfgMagazines.hpp b/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/CfgMagazines.hpp index c004f584467..e7c00c95d2b 100644 --- a/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/CfgMagazines.hpp +++ b/addons/compat_rhs_saf3/compat_rhs_saf3_explosives/CfgMagazines.hpp @@ -3,22 +3,22 @@ class CfgMagazines { // ACE Explosives class ATMine_Range_Mag; class rhssaf_mine_mrud_a_mag: ATMine_Range_Mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhssaf_mine_mrud_a); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhssaf_mine_mrud_a); class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; }; }; class rhssaf_mine_mrud_b_mag: rhssaf_mine_mrud_a_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhssaf_mine_mrud_b); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhssaf_mine_mrud_b); }; class rhssaf_mine_mrud_c_mag: rhssaf_mine_mrud_a_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhssaf_mine_mrud_c); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhssaf_mine_mrud_c); }; class rhssaf_mine_mrud_d_mag: rhssaf_mine_mrud_a_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhssaf_mine_mrud_d); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhssaf_mine_mrud_d); class ACE_Triggers { SupportedTriggers[] = {"Command", "MK16_Transmitter"}; class Command { @@ -29,7 +29,7 @@ class CfgMagazines { }; class rhssaf_mine_pma3_mag: ATMine_Range_Mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhssaf_mine_pma3); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhssaf_mine_pma3); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -39,7 +39,7 @@ class CfgMagazines { }; class rhssaf_mine_tma4_mag: ATMine_Range_Mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhssaf_mine_tma4); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhssaf_mine_tma4); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -51,9 +51,8 @@ class CfgMagazines { class CA_Magazine; class rhssaf_tm100_mag: CA_Magazine { useAction = 0; - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhssaf_tm100); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhssaf_tm100); class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter"}; class Timer { @@ -67,10 +66,10 @@ class CfgMagazines { }; class rhssaf_tm200_mag: rhssaf_tm100_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhssaf_tm200); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhssaf_tm200); }; class rhssaf_tm500_mag: rhssaf_tm100_mag { - EGVAR(explosives,SetupObject) = QEGVAR(explosives,Place_rhssaf_tm500); + EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhssaf_tm500); }; }; diff --git a/addons/compat_rhs_usf3/CfgVehicles.hpp b/addons/compat_rhs_usf3/CfgVehicles.hpp index 0593c5a868a..3933e543ecf 100644 --- a/addons/compat_rhs_usf3/CfgVehicles.hpp +++ b/addons/compat_rhs_usf3/CfgVehicles.hpp @@ -43,8 +43,7 @@ class CfgVehicles { EGVAR(refuel,fuelCapacity) = 302; }; - class Truck_F; - class Truck_01_base_F: Truck_F {}; + class Truck_01_base_F; class rhsusf_fmtv_base: Truck_01_base_F { EGVAR(refuel,fuelCapacity) = 219; }; @@ -55,8 +54,7 @@ class CfgVehicles { EGVAR(refuel,fuelCargo) = 900; // 45 jerrycans }; - class rhsusf_HEMTT_A4_base: Truck_01_base_F {}; - class rhsusf_M977A4_usarmy_wd: rhsusf_HEMTT_A4_base {}; + class rhsusf_M977A4_usarmy_wd; class rhsusf_M977A4_AMMO_usarmy_wd: rhsusf_M977A4_usarmy_wd { EGVAR(rearm,defaultSupply) = 1200; }; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/CfgMagazines.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/CfgMagazines.hpp index 332c2bf1f25..aa2485dcdc2 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/CfgMagazines.hpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_explosives/CfgMagazines.hpp @@ -1,7 +1,6 @@ class CfgMagazines { class CA_Magazine; class rhsusf_m112_mag: CA_Magazine { - EGVAR(explosives,delayTime) = 1; EGVAR(explosives,placeable) = 1; EGVAR(explosives,setupObject) = QEGVAR(explosives,Place_rhsusf_explosive_m112); useAction = 0; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/CfgVehicles.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/CfgVehicles.hpp new file mode 100644 index 00000000000..445cab8226a --- /dev/null +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/CfgVehicles.hpp @@ -0,0 +1,52 @@ +class CfgVehicles { + class rhsusf_stryker_base; + class rhsusf_stryker_m1126_base: rhsusf_stryker_base { + class EGVAR(interaction,anims) { + class Hide_FCans { + positions[] = {{-0.7, -3, -0.4}}; + items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F"}; + name = ECSTRING(refuel,TakeFuelCanister); + text = ECSTRING(refuel,TakeFuelCanisterAction); + }; + }; + }; + class rhsusf_stryker_m1127_base: rhsusf_stryker_m1126_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class Hide_FCans: Hide_FCans { + positions[] = {{-0.5, -3, -0.4}}; + }; + }; + }; + + class rhsusf_stryker_m1126_m2_base: rhsusf_stryker_m1126_base {}; + class rhsusf_stryker_m1132_m2_base: rhsusf_stryker_m1126_m2_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class Hide_FCans: Hide_FCans { + positions[] = {{-1, -4, -0.4}}; + }; + }; + }; + class rhsusf_stryker_m1134_base: rhsusf_stryker_m1132_m2_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class Hide_FCans: Hide_FCans { + positions[] = {{-0.7, -3, -0.7}}; + }; + }; + }; + + class rhsusf_m1a2tank_base; + class rhsusf_m1a2sep2_base: rhsusf_m1a2tank_base { + class EGVAR(interaction,anims) { + class fuelcans_hide { + // Rotate interactions with turret rotation + positions[] = { + "[0.23, -0.6, 0] vectorAdd ([[1.1, -3.6, 0.6], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)", + "[0.23, -0.6, 0] vectorAdd ([[-1.1, -3.6, 0.6], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)" + }; + items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F"}; + name = ECSTRING(refuel,TakeFuelCanister); + text = ECSTRING(refuel,TakeFuelCanisterAction); + }; + }; + }; +}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp index bf600d5d5ae..391e22d95e8 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_refuel/config.cpp @@ -21,3 +21,4 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_repair/CfgVehicles.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_repair/CfgVehicles.hpp new file mode 100644 index 00000000000..91bed1dc5a1 --- /dev/null +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_repair/CfgVehicles.hpp @@ -0,0 +1,127 @@ +class CfgVehicles { + class Truck_01_base_F; + class rhsusf_fmtv_base: Truck_01_base_F { + class EGVAR(interaction,anims) { + class hide_spare { + positions[] = {{1, 1.4, 0}}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + class rhsusf_M1078A1P2_fmtv_usarmy: rhsusf_fmtv_base {}; + class rhsusf_M1078A1P2_B_fmtv_usarmy: rhsusf_M1078A1P2_fmtv_usarmy {}; + class rhsusf_M1078A1P2_B_M2_fmtv_usarmy: rhsusf_M1078A1P2_B_fmtv_usarmy { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_spare: hide_spare { + positions[] = {{1, 1.4, -0.5}}; + }; + }; + }; + class rhsusf_M1078A1R_SOV_M2_D_fmtv_socom: rhsusf_M1078A1P2_B_M2_fmtv_usarmy { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_spare: hide_spare { + positions[] = {{1, 1, -0.5}}; + }; + }; + }; + class rhsusf_M1083A1P2_fmtv_usarmy: rhsusf_M1078A1P2_fmtv_usarmy {}; + class rhsusf_M1083A1P2_B_fmtv_usarmy: rhsusf_M1083A1P2_fmtv_usarmy {}; + class rhsusf_M1083A1P2_B_M2_fmtv_usarmy: rhsusf_M1083A1P2_B_fmtv_usarmy { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_spare: hide_spare { + positions[] = {{1, 1.4, -0.5}}; + }; + }; + }; + class rhsusf_M1084A1P2_fmtv_usarmy: rhsusf_M1083A1P2_fmtv_usarmy { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_spare: hide_spare { + positions[] = {{1, 1.8, 0}}; + }; + }; + }; + class rhsusf_M1084A1P2_B_M2_fmtv_usarmy: rhsusf_M1083A1P2_B_M2_fmtv_usarmy { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_spare: hide_spare { + positions[] = {{1, 1.8, -0.5}}; + }; + }; + }; + class rhsusf_M1085A1P2_B_Medical_fmtv_usarmy: rhsusf_M1083A1P2_B_fmtv_usarmy { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_spare: hide_spare { + positions[] = {{1, 6.1, 0}}; + }; + }; + }; + + class rhsusf_HEMTT_A4_base: Truck_01_base_F { + class EGVAR(interaction,anims) { + class hide_spare { + positions[] = {"_target selectionPosition ['sparewheel', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + distance = 2.5; + }; + }; + }; + + class MRAP_01_base_F; + class rhsusf_m1151_base: MRAP_01_base_F { + class EGVAR(interaction,anims) { + class hide_spare { + positions[] = {"_target selectionPosition ['sparewheel', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + // Don't inherit, as it's easier for the trenches compat + class rhsusf_M1165A1_GMV_SAG2_base: rhsusf_m1151_base { + class EGVAR(interaction,anims) { + class hide_spare { + positions[] = {"_target selectionPosition ['sparewheel_gmv', 'Geometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + class rhsusf_rg33_base: MRAP_01_base_F { + class EGVAR(interaction,anims) { + class hide_spare { + positions[] = {"_target selectionPosition ['sparewheel', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + class rhsusf_M1239_base: MRAP_01_base_F { + class EGVAR(interaction,anims) { + class hide_spare { + positions[] = {"_target selectionPosition ['sparewheel', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + class rhsusf_MATV_base: MRAP_01_base_F { + class EGVAR(interaction,anims) { + class hide_spare { + positions[] = {"_target selectionPosition ['sparewheel', 'Geometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; +}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_repair/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_repair/config.cpp new file mode 100644 index 00000000000..b204f64166a --- /dev/null +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_repair/config.cpp @@ -0,0 +1,23 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "rhsusf_main_loadorder", + "ace_repair" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"johnb43"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_repair/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_repair/script_component.hpp new file mode 100644 index 00000000000..1af928486c3 --- /dev/null +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_repair/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT repair +#define SUBCOMPONENT_BEAUTIFIED Repair +#include "..\script_component.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_trenches/CfgVehicles.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_trenches/CfgVehicles.hpp new file mode 100644 index 00000000000..ba4dd16cd72 --- /dev/null +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_trenches/CfgVehicles.hpp @@ -0,0 +1,48 @@ +class CfgVehicles { + class rhsusf_stryker_base; + class rhsusf_stryker_m1126_base: rhsusf_stryker_base { + class EGVAR(interaction,anims) { + class Hide_PioKit { + positions[] = {{-1, -2.2, -0.5}}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; + class rhsusf_stryker_m1127_base: rhsusf_stryker_m1126_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class Hide_PioKit: Hide_PioKit { + positions[] = {{-0.8, -2.2, -0.5}}; + }; + }; + }; + + class rhsusf_stryker_m1126_m2_base: rhsusf_stryker_m1126_base {}; + class rhsusf_stryker_m1132_m2_base: rhsusf_stryker_m1126_m2_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class Hide_PioKit: Hide_PioKit { + positions[] = {{-1.3, -3.3, -0.5}}; + }; + }; + }; + class rhsusf_stryker_m1134_base: rhsusf_stryker_m1132_m2_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class Hide_PioKit: Hide_PioKit { + positions[] = {{-1, -2.2, -0.8}}; + }; + }; + }; + + class rhsusf_m1151_base; + class rhsusf_M1165A1_GMV_SAG2_base: rhsusf_m1151_base { + class EGVAR(interaction,anims) { + class tools_hide { + positions[] = {{0.365, 1.5, -0.4}}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; +}; diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_trenches/config.cpp b/addons/compat_rhs_usf3/compat_rhs_usf3_trenches/config.cpp new file mode 100644 index 00000000000..aea4c9daeb0 --- /dev/null +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_trenches/config.cpp @@ -0,0 +1,23 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "rhsusf_main_loadorder", + "ace_trenches" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"johnb43"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_trenches/script_component.hpp b/addons/compat_rhs_usf3/compat_rhs_usf3_trenches/script_component.hpp new file mode 100644 index 00000000000..10b90eb71e5 --- /dev/null +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_trenches/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT trenches +#define SUBCOMPONENT_BEAUTIFIED Trenches +#include "..\script_component.hpp" diff --git a/addons/compat_sog/ACE_CSW_Groups.hpp b/addons/compat_sog/ACE_CSW_Groups.hpp index 2bc81dbb65b..a8914204398 100644 --- a/addons/compat_sog/ACE_CSW_Groups.hpp +++ b/addons/compat_sog/ACE_CSW_Groups.hpp @@ -2,7 +2,7 @@ class ACE_CSW_Groups { // --- Gun Turrets ------------------------------------------------------------- - class ace_csw_100Rnd_127x99_mag { + class EGVAR(csw,100Rnd_127x99_mag) { vn_m2_v_100_mag = 1; }; diff --git a/addons/compat_sog/CfgAmmo/explosives.hpp b/addons/compat_sog/CfgAmmo/explosives.hpp index 849f7e69480..6922962fb3e 100644 --- a/addons/compat_sog/CfgAmmo/explosives.hpp +++ b/addons/compat_sog/CfgAmmo/explosives.hpp @@ -2,16 +2,10 @@ class DirectionalBombBase; class vn_mine_m18_ammo: DirectionalBombBase { EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.15}; EGVAR(explosives,size) = 1; - EGVAR(explosives,explosive) = "vn_mine_m18_ammo_scripted"; }; class vn_mine_m18_x3_ammo: vn_mine_m18_ammo { EGVAR(explosives,defuseObjectPosition)[] = {0, 0, 0.1}; - EGVAR(explosives,explosive) = "vn_mine_m18_x3_ammo_scripted"; -}; - -class vn_mine_m18_wp_ammo: vn_mine_m18_ammo { - EGVAR(explosives,explosive) = "vn_mine_m18_wp_ammo_scripted"; }; class vn_mine_m16_base; @@ -99,13 +93,7 @@ class vn_mine_punji_05_ammo: vn_mine_punji_04_ammo { }; class APERSMine_Range_Ammo; -class vn_mine_bike_ammo: APERSMine_Range_Ammo { - EGVAR(explosives,explosive) = "vn_mine_bike_ammo_scripted"; -}; - class vn_mine_cartridge_ammo: APERSMine_Range_Ammo { - EGVAR(explosives,explosive) = "vn_mine_cartridge_ammo_scripted"; - // bump range and damage slightly, default values do not work well with ACE Medical indirectHit = QUOTE(getNumber (configFile >> 'CfgAmmo' >> 'vn_mine_cartridge_ammo' >> 'GVAR(indirectHit)')); GVAR(indirectHit) = QUOTE([ARR_2(2,1)] select isNull (configFile >> 'CfgPatches' >> 'ace_medical')); @@ -116,50 +104,8 @@ class vn_mine_cartridge_ammo: APERSMine_Range_Ammo { class vn_mine_lighter_ammo: APERSMine_Range_Ammo { ACE_damageType = QGVAR(explosive_incendiary); - - EGVAR(explosives,explosive) = "vn_mine_lighter_ammo_scripted"; }; class vn_mine_jerrycan_ammo: APERSMine_Range_Ammo { ACE_damageType = QGVAR(explosive_incendiary); - - EGVAR(explosives,explosive) = "vn_mine_jerrycan_ammo_scripted"; -}; - -class vn_mine_pot_ammo: APERSMine_Range_Ammo { - EGVAR(explosives,explosive) = "vn_mine_pot_ammo_scripted"; -}; - -class vn_mine_mortar_range_ammo: APERSMine_Range_Ammo { - EGVAR(explosives,explosive) = "vn_mine_mortar_range_ammo_scripted"; -}; - -class vn_mine_limpet_01_ammo: DemoCharge_Remote_Ammo { - EGVAR(explosives,explosive) = "vn_mine_limpet_01_ammo_scripted"; -}; - -class vn_mine_limpet_02_ammo: vn_mine_limpet_01_ammo { - EGVAR(explosives,explosive) = "vn_mine_limpet_02_ammo_scripted"; -}; - -class vn_mine_chicom_no8_ammo: APERSMine_Range_Ammo { - EGVAR(explosives,explosive) = "vn_mine_chicom_no8_ammo_scripted"; -}; - -class vn_mine_dh10_ammo: DirectionalBombBase { - EGVAR(explosives,explosive) = "vn_mine_dh10_ammo_scripted"; -}; - -class PipeBombBase; -class vn_mine_gboard_range_ammo: PipeBombBase { - EGVAR(explosives,explosive) = "vn_mine_gboard_range_ammo_scripted"; -}; - -class SatchelCharge_Remote_Ammo; -class vn_mine_satchelcharge_02_ammo: SatchelCharge_Remote_Ammo { - EGVAR(explosives,explosive) = "vn_mine_satchelcharge_02_ammo_scripted"; -}; - -class vn_mine_bangalore_ammo: SatchelCharge_Remote_Ammo { - EGVAR(explosives,explosive) = "vn_mine_bangalore_ammo_scripted"; }; diff --git a/addons/compat_sog/CfgMagazines/explosives.hpp b/addons/compat_sog/CfgMagazines/explosives.hpp index 7e25609fc8a..a8d6ca76bd3 100644 --- a/addons/compat_sog/CfgMagazines/explosives.hpp +++ b/addons/compat_sog/CfgMagazines/explosives.hpp @@ -6,8 +6,8 @@ class vn_mine_m18_mag: vn_magazine { displayNameShort = ""; // Every explosive inherits this and it breaks naming in the placing menu - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m18); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(m18); class ACE_Triggers { SupportedTriggers[] = {"Command", "MK16_Transmitter"}; @@ -42,7 +42,7 @@ class vn_mine_m18_fuze10_mag: vn_mine_m18_mag { // Claymore x3 (Remote) class vn_mine_m18_x3_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m18_x3); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(m18_x3); class ACE_Triggers { SupportedTriggers[] = {"Command", "MK16_Transmitter"}; @@ -65,7 +65,7 @@ class vn_mine_m18_x3_range_mag: vn_mine_m18_x3_mag { // WP Claymore (Remote) class vn_mine_m18_wp_mag: vn_mine_m18_fuze10_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m18_wp); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(m18_wp); class ACE_Triggers { SupportedTriggers[] = {"Command", "MK16_Transmitter"}; @@ -101,7 +101,7 @@ class vn_mine_m18_wp_fuze10_mag: vn_mine_m18_wp_mag { // Toe-Popper class vn_mine_m14_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m14); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(m14); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -113,7 +113,7 @@ class vn_mine_m14_mag: vn_mine_m18_mag { // Bounding Mine class vn_mine_m16_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m16); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(m16); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -125,7 +125,7 @@ class vn_mine_m16_mag: vn_mine_m18_mag { // Bounding Mine (Trip Wire 2m) class vn_mine_tripwire_m16_02_mag: vn_mine_m16_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m16_tripwire_2m); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(m16_tripwire_2m); class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; @@ -136,7 +136,7 @@ class vn_mine_tripwire_m16_02_mag: vn_mine_m16_mag { }; // Bounding Mine (Trip Wire 4m) class vn_mine_tripwire_m16_04_mag: vn_mine_tripwire_m16_02_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m16_tripwire_4m); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(m16_tripwire_4m); class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; @@ -148,22 +148,22 @@ class vn_mine_tripwire_m16_04_mag: vn_mine_tripwire_m16_02_mag { // F1 (Trip Wire 2m) class vn_mine_tripwire_f1_02_mag: vn_mine_tripwire_m16_02_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(f1_tripwire_2m); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(f1_tripwire_2m); }; // F1 (Trip Wire 4m) class vn_mine_tripwire_f1_04_mag: vn_mine_tripwire_f1_02_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(f1_tripwire_4m); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(f1_tripwire_4m); }; // Arty Shell (Trip Wire 4m) class vn_mine_tripwire_arty_mag: vn_mine_tripwire_m16_02_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(arty_tripwire_4m); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(arty_tripwire_4m); }; // Satchel Charge class vn_mine_satchel_remote_02_mag: vn_mine_m18_mag { useAction = 0; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(satchel_remote_02); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(satchel_remote_02); class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; @@ -180,7 +180,7 @@ class vn_mine_satchel_remote_02_mag: vn_mine_m18_mag { // TM57 Anti-Tank Mine class vn_mine_tm57_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(tm57); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(tm57); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -190,7 +190,7 @@ class vn_mine_tm57_mag: vn_mine_m18_mag { // M15 Anti-Tank Mine class vn_mine_m15_mag: vn_mine_tm57_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m15); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(m15); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -202,7 +202,7 @@ class vn_mine_m15_mag: vn_mine_tm57_mag { // M112 Breaching charge class vn_mine_m112_remote_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m112); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(m112); class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; @@ -221,7 +221,7 @@ class vn_mine_m112_remote_mag: vn_mine_m18_mag { // Spiked ammo box class vn_mine_ammobox_range_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(ammobox_range); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(ammobox_range); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -234,7 +234,7 @@ class vn_mine_ammobox_range_mag: vn_mine_m18_mag { // Punji large class vn_mine_punji_01_mag: vn_mine_m18_mag { useAction = 0; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(punji_01); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(punji_01); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -246,18 +246,18 @@ class vn_mine_punji_01_mag: vn_mine_m18_mag { // Punji small class vn_mine_punji_02_mag: vn_mine_punji_01_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(punji_02); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(punji_02); }; // Punji whip class vn_mine_punji_03_mag: vn_mine_punji_01_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(punji_03); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(punji_03); }; // Punji door-way class vn_mine_punji_04_mag: vn_mine_m18_mag { useAction = 0; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(punji_04); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(punji_04); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -270,7 +270,7 @@ class vn_mine_punji_04_mag: vn_mine_m18_mag { // Punji side whip class vn_mine_punji_05_mag: vn_mine_punji_04_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(punji_05); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(punji_05); class ACE_Triggers: ACE_Triggers { class PressurePlate: PressurePlate { @@ -281,7 +281,7 @@ class vn_mine_punji_05_mag: vn_mine_punji_04_mag { // Bike mine (Remote) class vn_mine_bike_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(bike); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(bike); class ACE_Triggers { SupportedTriggers[] = {QGVAR(Command), QGVAR(MK16_Transmitter)}; @@ -304,7 +304,7 @@ class vn_mine_bike_range_mag: vn_mine_bike_mag { // Cartridge mine class vn_mine_cartridge_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(cartridge); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(cartridge); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -316,7 +316,7 @@ class vn_mine_cartridge_mag: vn_mine_m18_mag { // Lighter mine (Proximity) class vn_mine_lighter_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(lighter); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(lighter); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -328,7 +328,7 @@ class vn_mine_lighter_mag: vn_mine_m18_mag { // Pot mine (Remote) class vn_mine_pot_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(pot); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(pot); class ACE_Triggers { SupportedTriggers[] = {"Command", "MK16_Transmitter"}; @@ -351,7 +351,7 @@ class vn_mine_pot_range_mag: vn_mine_pot_mag { // Jerrycan mine (Remote) class vn_mine_jerrycan_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(jerrycan); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(jerrycan); class ACE_Triggers { SupportedTriggers[] = {"Command", "MK16_Transmitter"}; @@ -374,7 +374,7 @@ class vn_mine_jerrycan_range_mag: vn_mine_jerrycan_mag { // Mortar shell on a stick (Proximity) class vn_mine_mortar_range_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(mortar_range); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(mortar_range); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -386,17 +386,17 @@ class vn_mine_mortar_range_mag: vn_mine_m18_mag { // Limpet mine USA (Remote) class vn_mine_limpet_01_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(limpet_01); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(limpet_01); }; // Limpet mine RUS (Remote) class vn_mine_limpet_02_mag: vn_mine_limpet_01_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(limpet_02); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(limpet_02); }; // Chicom NO8 mine class vn_mine_chicom_no8_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(chicom_no8); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(chicom_no8); class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -408,7 +408,7 @@ class vn_mine_chicom_no8_mag: vn_mine_m18_mag { // DH10 mine (Remote) class vn_mine_dh10_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(dh10); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(dh10); }; // DH10 mine (Proximity) class vn_mine_dh10_range_mag: vn_mine_dh10_mag { @@ -422,7 +422,7 @@ class vn_mine_dh10_range_mag: vn_mine_dh10_mag { // Grenade board mine (Tripwire 4m) class vn_mine_gboard_range_mag: vn_mine_m18_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(gboard); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(gboard); class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; @@ -434,10 +434,10 @@ class vn_mine_gboard_range_mag: vn_mine_m18_mag { // Satchel charge class vn_mine_satchelcharge_02_mag: vn_mine_satchel_remote_02_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(satchelcharge_02); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(satchelcharge_02); }; // Bangalore mine class vn_mine_bangalore_mag: vn_mine_satchel_remote_02_mag { - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(bangalore); + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(bangalore); }; diff --git a/addons/compat_sog/CfgVehicles/tracked.hpp b/addons/compat_sog/CfgVehicles/tracked.hpp index e2832796a97..7adc0193c63 100644 --- a/addons/compat_sog/CfgVehicles/tracked.hpp +++ b/addons/compat_sog/CfgVehicles/tracked.hpp @@ -1,18 +1,55 @@ +// M113A1 https://man.fas.org/dod-101/sys/land/m113.htm +class Tank_F; +class APC_Tracked_01_base_F: Tank_F { + class ACE_Actions; +}; +class vn_armor_m113_base: APC_Tracked_01_base_F { + EGVAR(refuel,fuelCapacity) = 360; + class ACE_Actions: ACE_Actions { + class ACE_MainActions; + }; +}; +class vn_armor_m577_base: vn_armor_m113_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0, 3.5, -1]"; + }; + }; +}; + // M41 class vn_armor_tank_base; class vn_armor_m41_base: vn_armor_tank_base { EGVAR(refuel,fuelCapacity) = 530; }; -// Type 63 -class vn_armor_type63_base: vn_armor_tank_base { - EGVAR(refuel,fuelCapacity) = 545; +// M48 +class vn_armor_m48_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_mainturret_backpacks { + // Rotate interactions with turret rotation + positions[] = { + "[[-1.3, -0.7, -0.4], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D", + "[[0.1, -2, -0.2], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D" + }; + items[] = {"vn_b_pack_02_02", "vn_b_pack_04_02"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; }; -// M113A1 https://man.fas.org/dod-101/sys/land/m113.htm -class APC_Tracked_01_base_F; -class vn_armor_m113_base: APC_Tracked_01_base_F { - EGVAR(refuel,fuelCapacity) = 360; +// T-54 +class vn_armor_t54_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_mainturret_backpacks { + // Rotate interactions with turret rotation + positions[] = {"[0, -0.2, 0] vectorAdd ([[-1.1, -0.85, -1.3], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)"}; + items[] = {"vn_o_pack_01", "vn_o_pack_02"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; }; // PT-76A https://en.wikipedia.org/wiki/PT-76 @@ -24,3 +61,8 @@ class vn_armor_pt76_base: vn_armor_tank_base { class vn_armor_pt76b_base: vn_armor_pt76_base { EGVAR(refuel,fuelCapacity) = 400; }; + +// Type 63 +class vn_armor_type63_base: vn_armor_tank_base { + EGVAR(refuel,fuelCapacity) = 545; +}; diff --git a/addons/compat_sog/compat_sog_refuel/CfgVehicles.hpp b/addons/compat_sog/compat_sog_refuel/CfgVehicles.hpp new file mode 100644 index 00000000000..c3dcfb719e5 --- /dev/null +++ b/addons/compat_sog/compat_sog_refuel/CfgVehicles.hpp @@ -0,0 +1,163 @@ +class CfgVehicles { + // Vehicle animation interactions + // BTR-40 + class vn_wheeled_car_base; + class vn_wheeled_btr40_base: vn_wheeled_car_base { + class EGVAR(interaction,anims) { + class refuel_can_hide { + positions[] = {{0.7, -2.35, -0.9}}; + items[] = {"Land_CanisterFuel_F"}; + name = ECSTRING(refuel,TakeFuelCanister); + text = ECSTRING(refuel,TakeFuelCanisterAction); + }; + }; + }; + class vn_wheeled_btr40_01_base: vn_wheeled_btr40_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class refuel_can_hide: refuel_can_hide { + positions[] = {{0.72, -2.35, -0.45}}; + }; + }; + }; + class vn_wheeled_btr40_ambulance_base: vn_wheeled_btr40_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class refuel_can_hide: refuel_can_hide { + positions[] = {{0.72, -2.35, -0.45}}; + }; + }; + }; + class vn_wheeled_btr40_mg_01_base: vn_wheeled_btr40_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class refuel_can_hide: refuel_can_hide { + positions[] = {{0.72, -2.35, -0.9}}; + }; + }; + }; + class vn_wheeled_btr40_mg_03_base: vn_wheeled_btr40_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class refuel_can_hide: refuel_can_hide { + positions[] = {{0.82, -2.35, -1.25}}; + }; + }; + }; + class vn_wheeled_btr40_mg_04_base: vn_wheeled_btr40_mg_01_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class refuel_can_hide: refuel_can_hide { + positions[] = {{0.72, -2.35, -1}}; + }; + }; + }; + class vn_wheeled_btr40_mg_05_base: vn_wheeled_btr40_mg_04_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class refuel_can_hide: refuel_can_hide { + positions[] = {{0.65, -2.25, -1}}; + }; + }; + }; + + // M151 + class vn_wheeled_m151_base: vn_wheeled_car_base { + class EGVAR(interaction,anims) { + class user_refuel_can_hide { + positions[] = {{-0.48, -1.5, -1.1}}; + items[] = {"Land_CanisterFuel_F"}; + name = ECSTRING(refuel,TakeFuelCanister); + text = ECSTRING(refuel,TakeFuelCanisterAction); + }; + }; + }; + class vn_wheeled_m151_mg_03_base: vn_wheeled_m151_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class user_refuel_can_hide: user_refuel_can_hide { + positions[] = {{-0.75, -1.5, -1}}; + }; + }; + }; + class vn_wheeled_m151_mg_05_base: vn_wheeled_m151_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class user_refuel_can_hide: user_refuel_can_hide { + positions[] = {{0.9, -0.1, -1.1}}; + }; + }; + }; + class vn_wheeled_m151_mg_06_base: vn_wheeled_m151_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class user_refuel_can_hide: user_refuel_can_hide { + positions[] = {{0.3, 0.1, -1.1}}; + }; + }; + }; + class vn_wheeled_m151_01_base: vn_wheeled_m151_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class user_refuel_can_hide: user_refuel_can_hide { + positions[] = {{-0.4, -1.5, -0.7}}; + }; + }; + }; + + // M577 + class vn_armor_m113_base; + class vn_armor_m577_base: vn_armor_m113_base { + class EGVAR(interaction,anims) { + class hide_fuel_cans { + selections[] = {"hide_fuel_cans"}; + positions[] = {{1.07, 1.05, -1}}; + items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F"}; + name = ECSTRING(refuel,TakeFuelCanister); + text = ECSTRING(refuel,TakeFuelCanisterAction); + }; + }; + }; + + // M48 + class vn_armor_tank_base; + class vn_armor_m48_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_mainturret_jerrycan { + positions[] = {"_target selectionPosition ['hide_jerrycan', 'FireGeometry', 'AveragePoint']"}; + items[] = {"Land_CanisterFuel_F"}; + name = ECSTRING(refuel,TakeFuelCanister); + text = ECSTRING(refuel,TakeFuelCanisterAction); + }; + }; + }; + + // BTR-50PK + class vn_armor_btr50pk_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_barrels { + selections[] = {"hide_barrels"}; + positions[] = {"private _pos = _target selectionPosition 'hide_barrels'; _pos set [0, -(_pos select 0)]; _pos"}; // Mirror position to other side of vehicle + items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F"}; + name = ECSTRING(refuel,TakeFuelCanister); + text = ECSTRING(refuel,TakeFuelCanisterAction); + }; + }; + }; + + // PT-76 + class vn_armor_pt76_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_barrels { + selections[] = {"hide_barrels"}; + positions[] = {"private _pos = _target selectionPosition 'hide_barrels'; _pos set [0, -(_pos select 0)]; _pos"}; // Mirror position to other side of vehicle + items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F"}; + name = ECSTRING(refuel,TakeFuelCanister); + text = ECSTRING(refuel,TakeFuelCanisterAction); + }; + }; + }; + + // Type 63 + class vn_armor_type63_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_barrels { + selections[] = {"hide_barrels"}; + positions[] = {"private _pos = _target selectionPosition 'hide_barrels'; _pos set [0, -(_pos select 0)]; _pos"}; // Mirror position to other side of vehicle + items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F"}; + name = ECSTRING(refuel,TakeFuelCanister); + text = ECSTRING(refuel,TakeFuelCanisterAction); + }; + }; + }; +}; diff --git a/addons/compat_sog/compat_sog_refuel/config.cpp b/addons/compat_sog/compat_sog_refuel/config.cpp new file mode 100644 index 00000000000..793cf90fc4e --- /dev/null +++ b/addons/compat_sog/compat_sog_refuel/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"loadorder_f_vietnam", "ace_refuel"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"johnb43"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_sog/compat_sog_refuel/script_component.hpp b/addons/compat_sog/compat_sog_refuel/script_component.hpp new file mode 100644 index 00000000000..af997fb8d4d --- /dev/null +++ b/addons/compat_sog/compat_sog_refuel/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT refuel +#define SUBCOMPONENT_BEAUTIFIED refuel +#include "..\script_component.hpp" diff --git a/addons/compat_sog/compat_sog_repair/CfgVehicles.hpp b/addons/compat_sog/compat_sog_repair/CfgVehicles.hpp new file mode 100644 index 00000000000..de93243251e --- /dev/null +++ b/addons/compat_sog/compat_sog_repair/CfgVehicles.hpp @@ -0,0 +1,141 @@ +class CfgVehicles { + // Vehicle animation interactions + // M39 / M54 / M49 + class vn_wheeled_truck_base; + class vn_wheeled_m54_base: vn_wheeled_truck_base { + class EGVAR(interaction,anims) { + class user_sparewheel_hide { + positions[] = {"_target selectionPosition ['hide_spare_wheel', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + class vn_wheeled_m54_mg_01_base: vn_wheeled_m54_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class user_sparewheel_hide: user_sparewheel_hide { + items[] = {"ACE_Wheel", "ACE_Wheel", "ACE_Wheel", "ACE_Wheel"}; + }; + }; + }; + + // M151 + class vn_wheeled_car_base; + class vn_wheeled_m151_base: vn_wheeled_car_base { + class EGVAR(interaction,anims) { + class user_sparewheel_hide { + positions[] = {"_target selectionPosition ['hide_sparewheel', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + // Dirt Ranger + class vn_wheeled_lr2a_base: vn_wheeled_car_base { + class EGVAR(interaction,anims) { + class hide_sparewheel { + positions[] = {"_target selectionPosition ['hide_sparewheel', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + // BTR-40 + class vn_wheeled_btr40_base: vn_wheeled_car_base { + class EGVAR(interaction,anims) { + class sparewheel_hide { + positions[] = {"_target selectionPosition ['hide_sparewheel', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + + // M48 + class vn_armor_tank_base; + class vn_armor_m48_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_mainturret_tracks { + // Rotate interactions with turret rotation + positions[] = { + "[[1.3, 0.2, -0.5], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D", + "[[-1.3, 0.2, -0.5], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D" + }; + items[] = {"ACE_Track", "ACE_Track", "ACE_Track", "ACE_Track", "ACE_Track"}; + name = ECSTRING(repair,RemoveTrack); + text = ECSTRING(repair,RemovingTrack); + }; + }; + }; + + // BTR-50PK + class vn_armor_btr50pk_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_tracks { + positions[] = {{1.35, 2.5, -0.5}}; + items[] = {"ACE_Track"}; + name = ECSTRING(repair,RemoveTrack); + text = ECSTRING(repair,RemovingTrack); + }; + }; + }; + class vn_armor_btr50pk_01_base: vn_armor_btr50pk_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_tracks: hide_tracks { + positions[] = {{1.35, 2.5, -0.8}}; + }; + }; + }; + + class vn_armor_btr50pk_02_base: vn_armor_btr50pk_01_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_tracks: hide_tracks { + positions[] = {{1.35, 2.9, -0.8}}; + }; + }; + }; + + // T-54 + class vn_armor_t54_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_tracks { + positions[] = {{1.4, 2.1, -1.7}}; + items[] = {"ACE_Track"}; + name = ECSTRING(repair,RemoveTrack); + text = ECSTRING(repair,RemovingTrack); + }; + }; + }; + + // PT-76 + class vn_armor_pt76_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_tracks { + // Rotate interactions with turret rotation + positions[] = {"[0, 0.9, 0] vectorAdd ([[-0.6, -0.9, -0.3], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)"}; + items[] = {"ACE_Track"}; + name = ECSTRING(repair,RemoveTrack); + text = ECSTRING(repair,RemovingTrack); + }; + }; + }; + + // Type 63 + class vn_armor_type63_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_tracks { + // Rotate interactions with turret rotation + positions[] = {"[0, 0.7, 0] vectorAdd ([[0.4, -1.1, -0.4], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)"}; + items[] = {"ACE_Track"}; + name = ECSTRING(repair,RemoveTrack); + text = ECSTRING(repair,RemovingTrack); + }; + }; + }; +}; diff --git a/addons/compat_sog/compat_sog_repair/config.cpp b/addons/compat_sog/compat_sog_repair/config.cpp new file mode 100644 index 00000000000..b2cffd8a364 --- /dev/null +++ b/addons/compat_sog/compat_sog_repair/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"loadorder_f_vietnam", "ace_repair"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"johnb43"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_sog/compat_sog_repair/script_component.hpp b/addons/compat_sog/compat_sog_repair/script_component.hpp new file mode 100644 index 00000000000..1af928486c3 --- /dev/null +++ b/addons/compat_sog/compat_sog_repair/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT repair +#define SUBCOMPONENT_BEAUTIFIED Repair +#include "..\script_component.hpp" diff --git a/addons/compat_sog/compat_sog_trenches/CfgVehicles.hpp b/addons/compat_sog/compat_sog_trenches/CfgVehicles.hpp index bb222eaed16..3a826d01390 100644 --- a/addons/compat_sog/compat_sog_trenches/CfgVehicles.hpp +++ b/addons/compat_sog/compat_sog_trenches/CfgVehicles.hpp @@ -60,4 +60,199 @@ class CfgVehicles { class EGVAR(compat_sog,spiderhole_03_nogeo): vn_o_vc_spiderhole_03 { scope = 1; }; + + // Vehicle animation interactions + // BTR-40 + class vn_wheeled_car_base; + class vn_wheeled_btr40_base: vn_wheeled_car_base { + class EGVAR(interaction,anims) { + class shovel_hide { + positions[] = {{0.95, -1.5, -0.75}}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; + class vn_wheeled_btr40_01_base: vn_wheeled_btr40_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class shovel_hide: shovel_hide { + positions[] = {{0.95, -1.5, -0.3}}; + }; + }; + }; + class vn_wheeled_btr40_ambulance_base: vn_wheeled_btr40_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class shovel_hide: shovel_hide { + positions[] = {{0.95, -1.5, -0.3}}; + }; + }; + }; + class vn_wheeled_btr40_mg_01_base: vn_wheeled_btr40_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class shovel_hide: shovel_hide { + positions[] = {{0.95, -1.5, -0.8}}; + }; + }; + }; + class vn_wheeled_btr40_mg_03_base: vn_wheeled_btr40_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class shovel_hide: shovel_hide { + positions[] = {{1.05, -1.55, -1.1}}; + }; + }; + }; + class vn_wheeled_btr40_mg_04_base: vn_wheeled_btr40_mg_01_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class shovel_hide: shovel_hide { + positions[] = {{0.95, -1.5, -0.85}}; + }; + }; + }; + class vn_wheeled_btr40_mg_05_base: vn_wheeled_btr40_mg_04_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class shovel_hide: shovel_hide { + positions[] = {{0.9, -1.4, -0.85}}; + }; + }; + }; + + // Dirt Ranger + class vn_wheeled_lr2a_base: vn_wheeled_car_base { + class EGVAR(interaction,anims) { + class hide_shovel { + positions[] = {"_target selectionPosition ['hide_shovel', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; + + // M151 + class vn_wheeled_m151_base: vn_wheeled_car_base { + class EGVAR(interaction,anims) { + class user_shovel_hide { + positions[] = {{0.65, 0.2, -1.4}}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; + class vn_wheeled_m151_mg_03_base: vn_wheeled_m151_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class user_shovel_hide: user_shovel_hide { + positions[] = {{0.35, 0.2, -1.27}}; + }; + }; + }; + class vn_wheeled_m151_mg_05_base: vn_wheeled_m151_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class user_shovel_hide: user_shovel_hide { + enabled = 0; + }; + }; + }; + class vn_wheeled_m151_mg_06_base: vn_wheeled_m151_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class user_shovel_hide: user_shovel_hide { + enabled = 0; + }; + }; + }; + class vn_wheeled_m151_01_base: vn_wheeled_m151_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class user_shovel_hide: user_shovel_hide { + positions[] = {{0.72, 0.2, -0.92}}; + }; + }; + }; + + // M113 + class APC_Tracked_01_base_F; + class vn_armor_m113_base: APC_Tracked_01_base_F { + class EGVAR(interaction,anims) { + class hide_shovel { + positions[] = {{0.2, 2.2, -0.5}}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; + class vn_armor_m113_01_base: vn_armor_m113_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_shovel: hide_shovel {}; + }; + }; + class vn_armor_m132_base: vn_armor_m113_01_base { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class hide_shovel: hide_shovel { + positions[] = {{0.2, 2.2, -0.35}}; + }; + }; + }; + + // Don't inherit, as it's easier for the refuel compat + // M577 + class vn_armor_m577_base: vn_armor_m113_base { + class EGVAR(interaction,anims) { + class hide_shovel { + positions[] = {{0.2, 5.05, -0.57}}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; + + // M48 + class vn_armor_tank_base; + class vn_armor_m48_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_mainturret_tools { + positions[] = {"_target selectionPosition ['hide_tools', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; + + // BTR-50PK + class vn_armor_btr50pk_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_shovel { + positions[] = {"_target selectionPosition ['hide_shovel', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_EntrenchingTool", "ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; + + // PT-76 + class vn_armor_pt76_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_shovel { + positions[] = {"_target selectionPosition ['hide_shovel', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; + + // Type 63 + class vn_armor_type63_base: vn_armor_tank_base { + class EGVAR(interaction,anims) { + class hide_shovel { + positions[] = {"_target selectionPosition ['hide_shovel', 'FireGeometry', 'AveragePoint']"}; + items[] = {"ACE_EntrenchingTool"}; + name = ECSTRING(trenches,EntrenchingToolName); + text = ECSTRING(trenches,EntrenchingToolName); + }; + }; + }; }; diff --git a/addons/compat_spe/compat_spe_explosives/CfgMagazines.hpp b/addons/compat_spe/compat_spe_explosives/CfgMagazines.hpp index 7c1945fcb8f..810a5bc5bf1 100644 --- a/addons/compat_spe/compat_spe_explosives/CfgMagazines.hpp +++ b/addons/compat_spe/compat_spe_explosives/CfgMagazines.hpp @@ -1,9 +1,8 @@ class CfgMagazines { class SPE_Mine_Magazine; class SPE_US_TNT_4pound_mag: SPE_Mine_Magazine { - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(4LBTNT); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(4LBTNT); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "FireCord", "LIB_LadungPM"}; @@ -19,9 +18,8 @@ class CfgMagazines { }; class SPE_US_TNT_half_pound_mag: SPE_Mine_Magazine { - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(halfLBTNT); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(halfLBTNT); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "FireCord", "LIB_LadungPM"}; @@ -37,9 +35,8 @@ class CfgMagazines { }; class SPE_US_Bangalore_mag: SPE_Mine_Magazine { - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(bangalore); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(bangalore); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "FireCord", "LIB_LadungPM"}; @@ -55,9 +52,8 @@ class CfgMagazines { }; class SPE_Ladung_Small_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(smallLadung); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(smallLadung); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "FireCord", "LIB_LadungPM"}; @@ -73,9 +69,8 @@ class CfgMagazines { }; class SPE_Ladung_Big_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,DelayTime) = 1; - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(bigLadung); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(bigLadung); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "FireCord", "LIB_LadungPM"}; @@ -91,8 +86,8 @@ class CfgMagazines { }; class SPE_US_M1A1_ATMINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(M1A1at); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(M1A1at); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -102,8 +97,8 @@ class CfgMagazines { }; }; class SPE_US_M3_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(M3ap); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(M3ap); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; @@ -113,8 +108,8 @@ class CfgMagazines { }; }; class SPE_US_M3_Pressure_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(M3Pressure); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(M3Pressure); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -125,8 +120,8 @@ class CfgMagazines { }; class SPE_Shg24x7_Improvised_Mine_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(Shg24x7); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(Shg24x7); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -137,8 +132,8 @@ class CfgMagazines { }; class SPE_TMI_42_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(TMI42); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(TMI42); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -149,8 +144,8 @@ class CfgMagazines { }; class SPE_SMI_35_1_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(SMI35_1); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(SMI35_1); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; @@ -161,8 +156,8 @@ class CfgMagazines { }; class SPE_SMI_35_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(SMI35); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(SMI35); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; @@ -173,8 +168,8 @@ class CfgMagazines { }; class SPE_SMI_35_Pressure_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(SMI35Pressure); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(SMI35Pressure); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; @@ -185,8 +180,8 @@ class CfgMagazines { }; class SPE_STMI_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(STMI); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(STMI); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; @@ -197,8 +192,8 @@ class CfgMagazines { }; class SPE_shumine_42_MINE_mag: SPE_Mine_Magazine { - EGVAR(explosives,Placeable) = 1; - EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(shumine42); + EGVAR(explosives,placeable) = 1; + EGVAR(explosives,setupObject) = QEXPLOSIVES_PLACE(shumine42); useAction = 0; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; diff --git a/addons/compat_ws/CfgVehicles.hpp b/addons/compat_ws/CfgVehicles.hpp new file mode 100644 index 00000000000..9c2f3184c07 --- /dev/null +++ b/addons/compat_ws/CfgVehicles.hpp @@ -0,0 +1,45 @@ +class CfgVehicles { + // Vehicle animation interactions + class Offroad_01_base_lxWS; + class Offroad_01_armor_base_lxWS: Offroad_01_base_lxWS { + class EGVAR(interaction,anims) { + class HideBackpacks { + positions[] = {{-1.15, -1.15, -0.7}, {1.1, -1.15, -0.7}, {1.1, -2.5, -0.7}}; + items[] = {"B_TacticalPack_blk", "B_TacticalPack_blk", "B_Carryall_khk", "B_Carryall_khk"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; + + class I_G_Offroad_01_AT_F; + class Offroad_01_AT_lxWS: I_G_Offroad_01_AT_F { + class EGVAR(interaction,anims) { + class HideBackpacks { + positions[] = {{-1.15, -1.25, -0.2}, {1.1, -1.25, -0.2}, {1.1, -2.6, -0.2}}; + items[] = {"B_TacticalPack_blk", "B_TacticalPack_blk", "B_Carryall_khk", "B_Carryall_khk"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; + class Offroad_01_armor_AT_lxWS: Offroad_01_AT_lxWS { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class HideBackpacks: HideBackpacks { + positions[] = {{-1.15, -1.25, -0.7}, {1.1, -1.25, -0.7}, {1.1, -2.6, -0.7}}; + }; + }; + }; + + class I_G_Offroad_01_armed_F; + class Offroad_01_armed_lxWS: I_G_Offroad_01_armed_F { + class EGVAR(interaction,anims) { + class HideBackpacks { + positions[] = {{-1.15, -1.03, -0.8}, {1.1, -1.03, -0.8}, {1.1, -2.38, -0.8}}; + items[] = {"B_TacticalPack_blk", "B_TacticalPack_blk", "B_Carryall_khk", "B_Carryall_khk"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; +}; diff --git a/addons/compat_ws/compat_ws_realisticnames/stringtable.xml b/addons/compat_ws/compat_ws_realisticnames/stringtable.xml index 606bbb79326..66c1791f9c8 100644 --- a/addons/compat_ws/compat_ws_realisticnames/stringtable.xml +++ b/addons/compat_ws/compat_ws_realisticnames/stringtable.xml @@ -29,6 +29,7 @@ AA12 (ヘビ柄迷彩) AA12 (Змея) AA12 (Serpiente) + AA12 (Sable) Galil ARM @@ -68,6 +69,7 @@ GLX 160 (ヘビ柄迷彩) GLX 160 (Змея) GLX 160 (Serpiente) + GLX 160 GLX 160 (Hex) @@ -127,6 +129,7 @@ Mk14 Mod 1 EBR (ヘビ柄迷彩) Mk14 Mod 1 EBR (Змея) Mk14 Mod 1 EBR (Serpiente) + Mk14 Mod 1 EBR (Serpent) Vektor SS-77 @@ -195,6 +198,7 @@ ヴェクター SS-77 コンパクト (ヘビ柄迷彩) Vektor SS-77 Compact (змея) Vektor SS-77 Compacta (Serpiente) + Vektor SS-77 Compacte (Serpent) FN FAL 50.00 (Wood) @@ -262,6 +266,7 @@ FN FAL OSW 파라 FN FAL OSW Fallschirmjäger FN FAL OSW Para + FN FAL OSW Para FN FAL OSW Para (Snake) @@ -269,6 +274,7 @@ FN FAL OSW 파라 (뱀 위장) FN FAL OSW Fallschirmjäger (Schlange) FN FAL OSW Para (Serpe) + FN FAL OSW Para (Serpent) Vektor R4 @@ -308,6 +314,7 @@ ヴェクター R5 カービン (ヘビ柄迷彩) Vektor R5 Carbine (Змея) Vektor R5 Carabina (Serpiente) + Vektor R5 Carbine (Serpent) Vektor R5 Carbine GL (Snake) @@ -317,6 +324,7 @@ ヴェクター R5 カービン GL (ヘビ柄迷彩) Vektor R5 Carbine GL (Змея) Vektor R5 Carabina GL (Serpiente) + Vektor R5 Carbine GL (Serpent) XMS @@ -468,6 +476,7 @@ GM6 링스 (뱀 위장) GM6 Lynx (Schlange) GM6 Lynx (Serpe) + GM6 Lynx (Serpent) RPG-32 (Sand) @@ -475,6 +484,7 @@ RPG-32 (모래) RPG-32 (Sand) RPG-32 (Sabbia) + RPG-32 (Sable) ELCAN SpecterOS (Hex) @@ -482,6 +492,7 @@ 엘칸 스펙터OS (육각) ELCAN SpecterOS (Hex) ELCAN SpecterOS (Hex) + ELCAN SpecterOS (Hex) EOTech XPS3 (Snake) @@ -489,6 +500,7 @@ 이오텍 XPS3 (뱀 위장) EOTech XPS3 (Schlange) EOTech XPS3 (Serpe) + EOTech XPS3 (Serpent) EOTech XPS3 SMG (Snake) @@ -496,6 +508,7 @@ 이오텍 XPS3 SMG (뱀 위장) EOTech XPS3 SMG (Schlange) EOTech XPS3 SMG (Serpe) + EOTech XPS3 SMG (Serpent) Leupold Mark 4 HAMR (Arid) @@ -503,6 +516,7 @@ 류폴드 마크 4 HAMR (건조) Leupold Mark 4 HAMR (Trocken) Leupold Mark 4 HAMR (Arido) + Leupold Mark 4 HAMR (Aride) Leupold Mark 4 HAMR (Lush) @@ -510,6 +524,7 @@ 류폴드 마크 4 HAMR (초목) Leupold Mark 4 HAMR (Grün) Leupold Mark 4 HAMR (Verdeggiante) + Leupold Mark 4 HAMR (Vert) Leupold Mark 4 HAMR (Sand) @@ -517,6 +532,7 @@ 류폴드 마크 4 HAMR (모래) Leupold Mark 4 HAMR (Sand) Leupold Mark 4 HAMR (Sabbia) + Leupold Mark 4 HAMR (Sable) Leupold Mark 4 HAMR (Snake) @@ -524,6 +540,7 @@ 류폴드 마크 4 HAMR (뱀 위장) Leupold Mark 4 HAMR (Schlange) Leupold Mark 4 HAMR (Serpe) + Leupold Mark 4 HAMR (Serpent) Aimpoint Micro R-1 (High, Black) @@ -531,6 +548,7 @@ 에임포인트 마이크로 R-1 (높음, 검정) Aimpoint Micro R-1 (Hoch, Schwarz) Aimpoint Micro R-1 (Alto, Nero) + Aimpoint Micro R-1 (Haut, Noir) Aimpoint Micro R-1 (High, Khaki) @@ -538,6 +556,7 @@ 에임포인트 마이크로 R-1 (높음, 카키) Aimpoint Micro R-1 (Hoch, Khaki) Aimpoint Micro R-1 (Alto, Cachi) + Aimpoint Micro R-1 (Haut, Kaki) Aimpoint Micro R-1 (High, Sand) @@ -545,6 +564,7 @@ 에임포인트 마이크로 R-1 (높음, 모래) Aimpoint Micro R-1 (Hoch, Sand) Aimpoint Micro R-1 (Alto, Sabbia) + Aimpoint Micro R-1 (Haut, Sable) Aimpoint Micro R-1 (High, Snake) @@ -552,6 +572,7 @@ 에임포인트 마이크로 R-1 (높음, 뱀 위장) Aimpoint Micro R-1 (Hoch, Schlange) Aimpoint Micro R-1 (Alto, Serpe) + Aimpoint Micro R-1 (Haut, Serpent) Aimpoint Micro R-1 (High, Arid) @@ -559,6 +580,7 @@ 에임포인트 마이크로 R-1 (높음, 건조) Aimpoint Micro R-1 (Hoch, Trocken) Aimpoint Micro R-1 (Alto, Arido) + Aimpoint Micro R-1 (Hoch, Arid Aimpoint Micro R-1 (High, Lush) @@ -566,6 +588,7 @@ 에임포인트 마이크로 R-1 (높음, 초목) Aimpoint Micro R-1 (Hoch, Grün) Aimpoint Micro R-1 (Alto, Verdeggiante) + Aimpoint Micro R-1 (Haute, Vert) Aimpoint Micro R-1 (High, Black/Sand) @@ -573,6 +596,7 @@ 에임포인트 마이크로 R-1 (높음, 검정/모래) Aimpoint Micro R-1 (Hoch, Schwarz/Sand) Aimpoint Micro R-1 (Alto, Nero/Sabbia) + Aimpoint Micro R-1 (Haut, Noir/Sable) Aimpoint Micro R-1 (Low, Black) @@ -580,6 +604,7 @@ 에임포인트 마이크로 R-1 (낮음, 검정) Aimpoint Micro R-1 (Tief, Schwarz) Aimpoint Micro R-1 (Basso, Nero) + Aimpoint Micro R-1 (Bas, Noir) Aimpoint Micro R-1 (Low, Khaki) @@ -587,6 +612,7 @@ 에임포인트 마이크로 R-1 (낮음, 카키) Aimpoint Micro R-1 (Tief, Khaki) Aimpoint Micro R-1 (Basso, Cachi) + Aimpoint Micro R-1 (Bas, Kaki) Aimpoint Micro R-1 (Low, Sand) @@ -594,6 +620,7 @@ 에임포인트 마이크로 R-1 (낮음, 모래) Aimpoint Micro R-1 (Tief, Sand) Aimpoint Micro R-1 (Basso, Sabbia) + Aimpoint Micro R-1 ( Bas, Sable ) Aimpoint Micro R-1 (Low, Snake) @@ -601,6 +628,7 @@ 에임포인트 마이크로 R-1 (낮음, 뱀 위장) Aimpoint Micro R-1 (Tief, Schlange) Aimpoint Micro R-1 (Basso, Serpe) + Aimpoint Micro R-1 (Bas, Serpent) Aimpoint Micro R-1 (Low, Arid) @@ -608,6 +636,7 @@ 에임포인트 마이크로 R-1 (낮음, 건조) Aimpoint Micro R-1 (Tief, Trocken) Aimpoint Micro R-1 (Basso, Arido) + Aimpoint Micro R-1 (Bas, Arid) Aimpoint Micro R-1 (Low, Lush) @@ -615,6 +644,7 @@ 에임포인트 마이크로 R-1 (낮음, 초목) Aimpoint Micro R-1 (Tief, Grün) Aimpoint Micro R-1 (Basso, Verdeggiante) + Aimpoint Micro R-1 (Bas, Vert) Burris XTR II (Snake) @@ -622,6 +652,7 @@ 버리스 XTR II (뱀 위장) Burris XTR II (Schlange) Burris XTR II (Serpe) + Burris XTR II (Serpent) Badger IFV (ATGM) @@ -629,6 +660,7 @@ 뱃져 보병전투차 (대전차미사일) Badger IFV (PzAbw) Badger IFV (ATGM) + Badger IFV (ATGM) Badger IFV (Command) @@ -636,6 +668,7 @@ 뱃져 보병전투차 (지휘) Badger IFV (Kommando) Badger IFV (Comando) + Badger IFV (Commandement) Badger IFV (Mortar) @@ -643,6 +676,7 @@ 뱃져 보병전투차 (자주박격포) Badger IFV (Mörser) Badger IFV (Mortaio) + Badger IFV (mortier) KamAZ (Zu-23-2) @@ -650,6 +684,7 @@ 카마즈 (ZU-23-2) KamAZ (Zu-23-2) KamAZ (Zu-23-2) + KamAZ (Zu-23-2) KamAZ Cargo @@ -657,6 +692,7 @@ 카마즈 화물 KamAZ Fracht KamAZ Carico + KamAZ Cargo KamAZ Repair @@ -664,6 +700,7 @@ 카마즈 정비 KamAZ Instandsetzung KamAZ Riparazione + KamAZ Réparation KamAZ Racing @@ -671,6 +708,7 @@ 카마즈 경주용 KamAZ Rennlaster KamAZ da corsa + KamAZ de course KamAZ Ammo @@ -678,6 +716,7 @@ 카마즈 탄약 KamAZ Munition KamAZ Munizioni + KamAZ Munitions KamAZ Flatbed @@ -685,6 +724,7 @@ 카마즈 플랫베드 KamAZ Flachbett KamAZ Pianale + KamAZ Flatbed AW101 Merlin @@ -692,6 +732,7 @@ AW101 멀린 AW101 Merlin AW101 Merlin + AW101 Merlin BM-2T Stalker (Bumerang-BM) @@ -699,6 +740,7 @@ BM-2T 스토커 (부메랑-BM) BM-2T Stalker (Bumerang-BM) BM-2T Stalker (Bumerang-BM) + BM-2T Stalker (Boomerang-BM) Otokar ARMA (HMG) @@ -706,6 +748,7 @@ 오토카르 아르마 APC (중기관총) Otokar ARMA (HMG) Otokar ARMA (HMG) + Otokar ARMA (HMG) Otokar ARMA (Unarmed) @@ -713,6 +756,7 @@ 오토카르 아르마 APC (비무장) Otokar ARMA (Unbewaffnet) Otokar ARMA (Disarmato) + Otokar ARMA (non armé) Ka-60 Kasatka (UP) @@ -720,6 +764,7 @@ Ka-60 카사트카 (UP) Ka-60 Kasatka (UP) Ka-60 Kasatka (UP) + Ka-60 Kasatka (UP) Ka-60 Kasatka (UP, Unarmed) @@ -727,6 +772,7 @@ Ka-60 카사트카 (UP, 비무장)) Ka-60 Kasatka (UP, Unbewaffnet) Ka-60 Kasatka (UP, Disarmato) + Ka-60 Kasatka (UP, non armé) diff --git a/addons/compat_ws/compat_ws_repair/CfgVehicles.hpp b/addons/compat_ws/compat_ws_repair/CfgVehicles.hpp new file mode 100644 index 00000000000..d7fcbc7cd97 --- /dev/null +++ b/addons/compat_ws/compat_ws_repair/CfgVehicles.hpp @@ -0,0 +1,34 @@ +class CfgVehicles { + // Vehicle animation interactions + class Truck_02_base_F; + class Truck_02_aa_base_lxWS: Truck_02_base_F { + class EGVAR(interaction,anims) { + class hideSpareWheel { + positions[] = {{1, 1.93, -0.85}}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + class Truck_02_cargo_base_lxWS: Truck_02_base_F { + class EGVAR(interaction,anims) { + class hideSpareWheel { + positions[] = {{1, 1.93, -0.35}}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; + class Truck_02_box_base_lxWS: Truck_02_base_F { + class EGVAR(interaction,anims) { + class hideSpareWheel { + positions[] = {{1, 1.7, -0.35}}; + items[] = {"ACE_Wheel"}; + name = ECSTRING(repair,RemoveWheel); + text = ECSTRING(repair,RemovingWheel); + }; + }; + }; +}; diff --git a/addons/compat_ws/compat_ws_repair/config.cpp b/addons/compat_ws/compat_ws_repair/config.cpp new file mode 100644 index 00000000000..4f37c831cb6 --- /dev/null +++ b/addons/compat_ws/compat_ws_repair/config.cpp @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"data_f_lxWS_Loadorder", "ace_repair"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"johnb43"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_ws/compat_ws_repair/script_component.hpp b/addons/compat_ws/compat_ws_repair/script_component.hpp new file mode 100644 index 00000000000..1af928486c3 --- /dev/null +++ b/addons/compat_ws/compat_ws_repair/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT repair +#define SUBCOMPONENT_BEAUTIFIED Repair +#include "..\script_component.hpp" diff --git a/addons/compat_ws/config.cpp b/addons/compat_ws/config.cpp index 32a3f6f73cb..54a6df99eec 100644 --- a/addons/compat_ws/config.cpp +++ b/addons/compat_ws/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"data_f_lxWS_Loadorder"}; + requiredAddons[] = {"data_f_lxWS_Loadorder", "ace_common"}; skipWhenMissingDependencies = 1; author = ECSTRING(common,ACETeam); authors[] = {"Mike"}; @@ -15,4 +15,5 @@ class CfgPatches { }; }; +#include "CfgVehicles.hpp" #include "CfgWeapons.hpp" diff --git a/addons/cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf b/addons/cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf index 7fdcedda51d..946cb4f7d8f 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunitionServerLoop.sqf @@ -91,7 +91,7 @@ private _configMagazine = configFile >> "CfgMagazines" >> _magazineClassname; private _ammo = getText (_configMagazine >> "ammo"); private _configAmmo = configFile >> "CfgAmmo" >> _ammo; -private _simType = toLower getText (_configAmmo >> "simulation"); +private _simType = toLowerANSI getText (_configAmmo >> "simulation"); private _speed = linearConversion [0, 1, random 1, 1, 20, true]; private _effect2pos = _object selectionPosition "destructionEffect2"; @@ -100,7 +100,7 @@ private _fnc_spawnProjectile = { // If the magazines are inside of the cargo (inventory), don't let their projectiles escape the interior of the vehicle if (!_spawnProjectile) exitWith {}; - params ["_object", "_ammo", "_speed", "_flyAway"]; + params ["_flyAway"]; private _spawnPos = _object modelToWorld [-0.2 + random 0.4, -0.2 + random 0.4, random 3]; @@ -117,7 +117,7 @@ private _fnc_spawnProjectile = { _projectile setVectorDir _vectorVelocity; _projectile setVelocity _vectorVelocity; } else { - _projectile setDamage 1; + triggerAmmo _projectile; }; }; @@ -126,14 +126,14 @@ switch (_simType) do { [QGVAR(playCookoffSound), [_object, _simType]] call CBA_fnc_globalEvent; if (random 1 < 0.6) then { - [_object, _ammo, _speed, true] call _fnc_spawnProjectile; + true call _fnc_spawnProjectile; }; }; case "shotshell": { [QGVAR(playCookoffSound), [_object, _simType]] call CBA_fnc_globalEvent; if (random 1 < 0.15) then { - [_object, _ammo, _speed, true] call _fnc_spawnProjectile; + true call _fnc_spawnProjectile; }; }; case "shotgrenade": { @@ -141,7 +141,7 @@ switch (_simType) do { _speed = 0; }; - [_object, _ammo, _speed, random 1 < 0.5] call _fnc_spawnProjectile; + (random 1 < 0.5) call _fnc_spawnProjectile; }; case "shotrocket"; case "shotmissile"; @@ -149,7 +149,7 @@ switch (_simType) do { if (random 1 < 0.1) then { [QGVAR(playCookoffSound), [_object, _simType]] call CBA_fnc_globalEvent; - [_object, _ammo, _speed, random 1 < 0.3] call _fnc_spawnProjectile; + (random 1 < 0.3) call _fnc_spawnProjectile; } else { createVehicle ["ACE_ammoExplosionLarge", _object modelToWorld _effect2pos, [], 0 , "CAN_COLLIDE"]; }; @@ -157,22 +157,13 @@ switch (_simType) do { case "shotdirectionalbomb"; case "shotmine": { if (random 1 < 0.5) then { - // Not all explosives detonate on destruction, some have scripted alternatives - if (getNumber (_configAmmo >> "triggerWhenDestroyed") != 1) then { - _ammo = getText (_configAmmo >> QEGVAR(explosives,explosive)); - }; - - // If a scripted alternative doesn't exist use generic explosion - if (_ammo != "") then { - [_object, _ammo, 0, false] call _fnc_spawnProjectile; - } else { - createVehicle ["SmallSecondary", _object modelToWorld _effect2pos, [], 0 , "CAN_COLLIDE"]; - }; + // _speed should be 0, but as it doesn't fly away, no need to set _speed + false call _fnc_spawnProjectile; }; }; case "shotilluminating": { if (random 1 < 0.15) then { - [_object, _ammo, _speed, random 1 < 0.3] call _fnc_spawnProjectile; + (random 1 < 0.3) call _fnc_spawnProjectile; }; }; }; diff --git a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf index df4385d30da..35ca6fae263 100644 --- a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf +++ b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf @@ -52,7 +52,7 @@ private _ammo = ""; _x params ["_magazine", "_count"]; if (_count > 0 && {!(_magazine call FUNC(isMagazineFlare))}) then { - _ammoToDetonate pushBack [_magazine, _count, false]; + _ammoToDetonate pushBack [_magazine, _count, random 1 < 0.5]; _totalAmmo = _totalAmmo + _count; }; } forEach (magazinesAmmoCargo _object); diff --git a/addons/cookoff/stringtable.xml b/addons/cookoff/stringtable.xml index 15d2d2adec0..838b3490bba 100644 --- a/addons/cookoff/stringtable.xml +++ b/addons/cookoff/stringtable.xml @@ -23,6 +23,7 @@ 차량 유폭 화재를 활성화합니다 Abilita incendio dei veicoli Aktiviert Fahrzeug Munitionsbrand + Permettre l'incendie du véhicule Enables vehicle cook-off fire effects.\nThis doesn't include ammunition detonations. @@ -31,6 +32,7 @@ 차량 유폭 효과를 활성화합니다.\n여기엔 탄약 유폭이 포함되지 않습니다. Abilita effetti di incendio del veicolo dovuto all'esplosione delle munizioni.\nQuesto non include gli effetti di esplosione. Aktiviert Fahrzeug Brandeffekte durch Durchzündung.\nExplosionseffekte sind nicht mit einbegriffen. + Permet d'obtenir des effets de feu de véhicule à partir de munitions qui explosent.\nCela n'inclut pas les effets d'explosion. Vehicle cook-off fire duration multiplier @@ -39,6 +41,7 @@ 차량 유폭 화재 지속 시간 계수 Coefficiente di durata incendio dei veicoli Fahrzeugbrand Dauer-Multiplikator + Coefficient de durée d'incendie du véhicule Multiplier for how long vehicle cook-off fire lasts.\nSetting to 0 will disable vehicle cook-off fire. @@ -47,6 +50,7 @@ 차량 유폭 화재가 지속되는 시간에 대한 계수입니다.\n0으로 설정하면 차량 쿸오프 화재가 비활성화됩니다. Coefficiente di durata degli incendi dei veicoli.\nImpostarlo su 0 disabilita incendi dei veicoli. Multiplikator der Fahrzeugbrand Dauer.\nIhn auf 0 zu setzen wird Munitionsbrände deaktivieren. + Coefficient de durée des feux de véhicules.\nLa valeur 0 désactive les feux de véhicules. Vehicle cook-off fire probability multiplier @@ -55,6 +59,7 @@ 차량 유폭 화재 확률 계수 Probabilità di incendio dei veicoli Fahrzeug Munitionsbrand Wahrscheinlichkeit-Multiplikator + Probabilité d'incendies de véhicules Multiplier for vehicle cook-off fire probability. Higher value results in higher cook-off probability.\nSetting to 0 will disable vehicle cook-off fire. @@ -63,6 +68,7 @@ 차량 유폭 화재 확률에 대한 계수입니다. 값이 높을 수록 유폭 확률이 높아집니다.\n0으로 설정하면 차량 유폭 화재가 비활성화됩니다. Coefficiente di probabilità degli incendi dei veicoli.\nValori maggiori aumentano la probabilità di incendi.\nImpostarlo su 0 disabilita incendi dei veicoli. Multiplikator der Fahrzeugbrand Wahrscheinlichkeit.\nHöhere Werte erhöhen die Wahrscheinlichkeit.\nEin Null-Wert wird Munitionsbrände deaktivieren. + Coefficient de probabilité des incendies de véhicules.\nLes valeurs élevées augmentent la probabilité des incendies.\nLa valeur 0 désactive les incendies de véhicules. Destroy vehicles after cook-off @@ -96,6 +102,7 @@ 차량 내 탄약 유폭 활성화 Abilita esplosioni delle munizioni dei veicoli Aktiviert Fahrzeug Munitionsdurchzündung + Permet l'explosion des munitions des véhicules Enables cooking off of vehicle ammunition. Fires ammunition projectiles while vehicle has ammunition remaining.\nThis doesn't include fire effects. @@ -104,6 +111,7 @@ 차량 내 탄약 유폭을 활성화합니다. 차량에 탄약이 남아 있는 동안 탄약 발사체를 발사합니다.\n여기엔 화재 효과가 포함되지 않습니다. Abilita l'esplosione delle munizioni dei veicoli. Spara via pezzi di munizioni se il veicolo ha ancora munizioni rimanenti.\nNon include gli effetti di fuoco. Aktiviert Durchzündung von Fahrzeugmunition. Schleudert Munitionsfragmente umher wenn das Fahrzeug noch Munition an Bord hat.\nBrandeffekte sind nicht mit einbegriffen. + Permet l'explosion des munitions du véhicule. Tire des morceaux de munitions si le véhicule a encore des munitions restantes.\nIl n'y a pas d'effets de feu. Enable ammo box cook-off @@ -127,6 +135,7 @@ 탄약 상자 유폭을 활성화합니다.\n여기엔 화재 효과가 포함되지 않습니다. Abilita esplosioni delle casse di munizioni.\nNon include effetti di fuoco. Aktiviert Munitionskisten Durchzündung.\nBrandeffekte sind nicht mit einbegriffen. + Permet l'explosion des caisses de munitions.\nN'inclut pas les effets de feu. Ammo cook-off duration multiplier @@ -135,6 +144,7 @@ 탄약 유폭 시간 계수 Coefficiente di durata esplisioni di munizioni Fahrzeug Munitionsdurchzündung Dauer-Multiplikator + Coefficient de durée d'explosion des munitions Multiplier for how long ammunition cook-off lasts, for both vehicles and ammo boxes.\nSetting to 0 will disable ammo cook-off for both vehicles and ammo boxes. @@ -143,6 +153,7 @@ 차량과 탄약 상자 모두에 대해 탄약 유폭이 지속되는 시간에 대한 계수입니다.\n0으로 설정하면 차량과 탄약 상자 모두에 대해 탄약 유폭이 비활성화됩니다. Coefficiente della durata di esplosioni delle munizioni, sia per veicoli che casse.\nImpostarlo su 0 disabilita esplosioni di veicoli e casse. Multiplikator der Munitionsdurchzündungs-Dauer, gilt für Fahrzeuge und Munitionskisten.\nIhn auf 0 zu setzen wird Durchzünden deaktivieren. + Coefficient de durée d'explosion des munitions pour les véhicules et les caisses.\nLa valeur 0 désactive les explosions des véhicules et des caisses. Enable ammo removal during cook-off diff --git a/addons/csw/CfgMagazines.hpp b/addons/csw/CfgMagazines.hpp index 86ad73c58fc..2466bbe6967 100644 --- a/addons/csw/CfgMagazines.hpp +++ b/addons/csw/CfgMagazines.hpp @@ -58,6 +58,7 @@ class CfgMagazines { class GVAR(20Rnd_20mm_G_belt): 40Rnd_20mm_G_belt { author = ECSTRING(common,ACETeam); displayName = CSTRING(GMGBelt_displayName); + descriptionShort = CSTRING(GMGBelt_descriptionShort); model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d"; picture = QPATHTOF(UI\ammoBox_50bmg_ca.paa); type = 256; diff --git a/addons/csw/stringtable.xml b/addons/csw/stringtable.xml index da794376ab9..5d11773490b 100644 --- a/addons/csw/stringtable.xml +++ b/addons/csw/stringtable.xml @@ -672,6 +672,22 @@ [CSW] Лента 20-мм гранат для ст. гранатомёта [CSW] 20mm 고속유탄발사기 탄띠 + + Caliber: 20 mm<br/>Rounds: 20<br />Used in: Grenade Launcher + 口徑:20 mm<br/>個數:20<br />用於:榴彈發射器 + Calibre : 20 mm<br/>Munitions : 20<br />Application : lance-grenades + Calibre: 20 mm<br/>Cargas: 20<br />Se usa en: lanzagranadas + Calibro: 20 mm<br/>Munizioni: 20<br />Si usa in: lanciagranate + Kaliber: 20 mm<br/>Naboje: 20<br />Używane w: granatniku + Калибр: 20 мм<br/>Кол-во: 20<br />Применение: гранатомет + Kaliber: 20 mm<br/>Patronen: 20<br />Eingesetzt von: Granatenwerfer + Ráže: 20 mm<br/>Munice: 20<br />Použití: Granátomet + Calibre: 20 mm<br/>Balas: 20<br />Uso em: Lança-granadas + 구경: 20mm<br />탄 수: 20<br />사용 가능: 유탄발사기 + 口径:20 毫米<br/>容弹量:20<br />用于:枪榴弹发射器 + 口径:20 mm <br/>弾薬:20<br />使用:グレネードランチャー + Kalibre: 20 mm<br/>Mermi: 20<br />Kullanıldığı Yer: Bombaatar + M3 Tripod Trípode M3 diff --git a/addons/dogtags/XEH_postInit.sqf b/addons/dogtags/XEH_postInit.sqf index 3ced843f479..c072090a60a 100644 --- a/addons/dogtags/XEH_postInit.sqf +++ b/addons/dogtags/XEH_postInit.sqf @@ -3,6 +3,18 @@ if (hasInterface || isServer) then { [QGVAR(broadcastDogtagInfo), { GVAR(dogtagsData) set _this; + + if (isNil "CBA_fnc_renameInventoryItem") exitWith {}; // requires https://github.com/CBATeam/CBA_A3/pull/1329 + params ["_item", "_dogTagData"]; + private _name = _dogtagData param [0, ""]; + + // If data doesn't exist or body has no name, set name as "unknown" + if (_name == "") then { + _name = LELSTRING(common,unknown); + }; + + _name = [LLSTRING(itemName), ": ", _name] joinString ""; + [_item, _name] call CBA_fnc_renameInventoryItem; }] call CBA_fnc_addEventHandler; if (isServer) then { diff --git a/addons/dogtags/stringtable.xml b/addons/dogtags/stringtable.xml index 73d2d07e56b..ff0af0db4e9 100644 --- a/addons/dogtags/stringtable.xml +++ b/addons/dogtags/stringtable.xml @@ -13,7 +13,7 @@ Piastrina 兵籍牌 兵籍牌 - Dog Tag + Chapa de Identificação Placa de identidad Künye @@ -29,7 +29,7 @@ Controlla Piastrina 檢查兵籍牌 检查兵籍牌 - Verificar Dog Tag + Verificar chapa de identificação Verificar placa de identidad Künyeyi Kontrol Et @@ -77,7 +77,7 @@ Piastrina presa da %1... 從%1身上拿取兵籍牌... 从%1身上拿取兵籍牌... - Dogtag pego de %1... + Chapa de identificação pega de %1... Tomada placa de identidad de %1... Künye %1 kişisinden alındı @@ -93,7 +93,7 @@ Qualcun altro ha già preso la piastrina... 已經有人把他的兵籍牌拿走了... 已经有人把他的兵籍牌拿走了... - Alguém já pegou essa dogtag... + Alguém já pegou essa chapa de identificação... Alguien más ha tomado la placa de identidad Başka biri zaten künyeyi almış @@ -106,7 +106,7 @@ Indicatore su schermo per il controllo delle piastrine Wyświetlacz ekranowy dla sprawdzania nieśmiertelników Экран для проверки жетонов - Tela de Exibição para verificar dogtags + Tela de exibição para verificar chapas de identificação Visualización en pantalla de placa de identidad Affichage à l'écran pour le contrôle des plaques. Okno na obrazovce pro kontrolu známek diff --git a/addons/explosives/ACE_Arsenal_Stats.hpp b/addons/explosives/ACE_Arsenal_Stats.hpp index 821ac65bfd1..c2c33b7f0a7 100644 --- a/addons/explosives/ACE_Arsenal_Stats.hpp +++ b/addons/explosives/ACE_Arsenal_Stats.hpp @@ -7,7 +7,7 @@ class EGVAR(arsenal,stats) { displayName = CSTRING(statExploRange); showText = 1; textStatement = QUOTE(params [ARR_2('_stat','_config')]; private _exploRangeStat = getNumber (_config >> _stat select 0); format [ARR_3('%1m (%2ft)',_exploRangeStat,(_exploRangeStat / 0.3048) toFixed 1)]); - condition = QUOTE(params [ARR_2('','_config')]; (getNumber (_config >> QQGVAR(Detonator))) > 0); + condition = QUOTE(getNumber (_this select 1 >> QQGVAR(detonator)) > 0); tabs[] = {{}, {7}}; }; }; diff --git a/addons/explosives/ACE_Triggers.hpp b/addons/explosives/ACE_Triggers.hpp index 27d63a736dd..a94ad95eaa4 100644 --- a/addons/explosives/ACE_Triggers.hpp +++ b/addons/explosives/ACE_Triggers.hpp @@ -18,7 +18,7 @@ class ACE_Triggers { isAttachable = 1; displayName = CSTRING(clacker_displayName); picture = QPATHTOF(Data\UI\Clacker.paa); - onPlace = QUOTE(_this call FUNC(AddClacker);false); + onPlace = QUOTE(_this call FUNC(addClacker); false); requires[] = {"ACE_Clacker"}; }; class MK16_Transmitter: Command { @@ -37,7 +37,7 @@ class ACE_Triggers { isAttachable = 1; displayName = CSTRING(cellphone_displayName); picture = QPATHTOF(Data\UI\Cellphone_UI.paa); - onPlace = QUOTE(_this call FUNC(addCellphoneIED);false); + onPlace = QUOTE(_this call FUNC(addCellphoneIED); false); requires[] = {"ACE_Cellphone"}; }; class PressurePlate { diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index c02885362ee..cee1cf99c33 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -3,38 +3,19 @@ class CfgAmmo { class Default; class TimeBombCore: Default { - GVAR(DefuseTime) = 5; + GVAR(defuseTime) = 5; }; - /* - class BoundingMineCore: TimeBombCore; - class BoundingMineBase: BoundingMineCore; - class APERSBoundingMine_Range_Ammo: BoundingMineBase; - class MineCore: TimeBombCore; - class MineBase: MineCore; - class APERSMine_Range_Ammo: MineBase; - class ATMine_Range_Ammo: MineBase; - - class DirectionalBombCore: TimeBombCore; - class DirectionalBombBase: DirectionalBombCore; - - class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase; - - class PipeBombCore: TimeBombCore; - class PipeBombBase: PipeBombCore; - */ // GVAR(size) = 0; is small size // GVAR(size) = 1; is large size class DirectionalBombBase; class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase { GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag"; - GVAR(Explosive) = "ClaymoreDirectionalMine_Remote_Ammo_Scripted"; GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0, 0, 0.038}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; }; - // class ClaymoreDirectionalMine_Remote_Ammo_Scripted: ClaymoreDirectionalMine_Remote_Ammo {}; class APERSTripMine_Wire_Ammo: DirectionalBombBase { GVAR(defuseObjectPosition)[] = {-1.415, 0, 0.12}; @@ -43,7 +24,7 @@ class CfgAmmo { class ACE_FlareTripMine_Wire_Ammo: APERSTripMine_Wire_Ammo { SoundSetExplosion[] = {}; - defaultMagazine = "ACE_FlareTripMine_Mag"; //Mag that gets dropped after defuse + defaultMagazine = "ACE_FlareTripMine_Mag"; // Mag that gets dropped after defuse hit = 0; indirectHit = 0; indirectHitRange = 0; @@ -92,7 +73,6 @@ class CfgAmmo { class PipeBombBase; class DemoCharge_Remote_Ammo: PipeBombBase { GVAR(magazine) = "DemoCharge_Remote_Mag"; - GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted"; // can probably remove as base ammo now has triggerWhenDestroyed GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0.07, 0, 0.055}; soundActivation[] = {"", 0, 0, 0}; @@ -103,14 +83,11 @@ class CfgAmmo { }; class SatchelCharge_Remote_Ammo: PipeBombBase { GVAR(magazine) = "SatchelCharge_Remote_Mag"; - GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted"; // can probably remove as base ammo now has triggerWhenDestroyed GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0.1, 0.1, 0.05}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; }; - // class DemoCharge_Remote_Ammo_Scripted: DemoCharge_Remote_Ammo {}; - // class SatchelCharge_Remote_Ammo_Scripted: SatchelCharge_Remote_Ammo {}; class IEDUrbanBig_Remote_Ammo: PipeBombBase { triggerWhenDestroyed = 1; @@ -168,10 +145,9 @@ class CfgAmmo { mineTrigger = "RangeTriggerShort"; }; - // Orange DLC: + // Orange DLC class APERSMineDispenser_Ammo: PipeBombBase { GVAR(magazine) = "APERSMineDispenser_Mag"; - GVAR(Explosive) = "APERSMineDispenser_Ammo_Scripted"; // triggerWhenDestroyed = 1; GVAR(size) = 0; GVAR(defuseObjectPosition)[] = {0.0, -0.05, 0.15}; }; diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp index ae0e5fe5410..3b9e7077284 100644 --- a/addons/explosives/CfgEventHandlers.hpp +++ b/addons/explosives/CfgEventHandlers.hpp @@ -9,6 +9,7 @@ class Extended_PreInit_EventHandlers { init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; + class Extended_PostInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); @@ -26,6 +27,7 @@ class Extended_Take_EventHandlers { GVAR(takeHandler) = QUOTE(call FUNC(onInventoryChanged)); }; }; + class Extended_Put_EventHandlers { class CAManBase { GVAR(takeHandler) = QUOTE([ARR_3(_this select 1,_this select 0,_this select 2)] call FUNC(onInventoryChanged)); diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 7bb2c6ff02d..89591f2bd69 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -1,10 +1,9 @@ class CfgMagazines { class CA_Magazine; class ATMine_Range_Mag: CA_Magazine { - GVAR(Placeable) = 1; useAction = 0; - GVAR(SetupObject) = "ACE_Explosives_Place_ATMine"; // CfgVehicle class for setup object. - GVAR(DelayTime) = 2.5; + GVAR(placeable) = 1; + GVAR(setupObject) = "ACE_Explosives_Place_ATMine"; // CfgVehicle class for setup object class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -13,7 +12,7 @@ class CfgMagazines { }; }; class APERSBoundingMine_Range_Mag: ATMine_Range_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_APERSBoundingMine"; + GVAR(setupObject) = "ACE_Explosives_Place_APERSBoundingMine"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -22,7 +21,7 @@ class CfgMagazines { }; }; class APERSMine_Range_Mag: ATMine_Range_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_APERSMine"; + GVAR(setupObject) = "ACE_Explosives_Place_APERSMine"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { @@ -31,7 +30,7 @@ class CfgMagazines { }; }; class APERSTripMine_Wire_Mag: ATMine_Range_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_APERSTripwireMine"; + GVAR(setupObject) = "ACE_Explosives_Place_APERSTripwireMine"; class ACE_Triggers { SupportedTriggers[] = {"Tripwire"}; class Tripwire; @@ -40,17 +39,16 @@ class CfgMagazines { class ACE_FlareTripMine_Mag: APERSTripMine_Wire_Mag { author = ECSTRING(common,aceteam); ammo = "ACE_FlareTripMine_Wire_Ammo"; - GVAR(SetupObject) = "ACE_Explosives_Place_APERSTripwireMine"; + GVAR(setupObject) = "ACE_Explosives_Place_APERSTripwireMine"; displayName = CSTRING(TripFlare_Name); descriptionShort = CSTRING(TripFlare_Description); class Library {libTextDesc = CSTRING(TripFlare_Description);}; }; class ClaymoreDirectionalMine_Remote_Mag: CA_Magazine { - GVAR(Placeable) = 1; useAction = 0; - GVAR(SetupObject) = "ACE_Explosives_Place_Claymore"; - GVAR(DelayTime) = 1.5; + GVAR(placeable) = 1; + GVAR(setupObject) = "ACE_Explosives_Place_Claymore"; class ACE_Triggers { SupportedTriggers[] = {"Command", "MK16_Transmitter"}; class Command { @@ -61,10 +59,9 @@ class CfgMagazines { }; class SatchelCharge_Remote_Mag: CA_Magazine { - GVAR(Placeable) = 1; useAction = 0; - GVAR(SetupObject) = "ACE_Explosives_Place_SatchelCharge"; - GVAR(DelayTime) = 1; + GVAR(placeable) = 1; + GVAR(setupObject) = "ACE_Explosives_Place_SatchelCharge"; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; class Timer { @@ -78,12 +75,12 @@ class CfgMagazines { }; }; class DemoCharge_Remote_Mag: SatchelCharge_Remote_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_DemoCharge"; + GVAR(setupObject) = "ACE_Explosives_Place_DemoCharge"; model = "\A3\Weapons_F\explosives\c4_charge_small_d"; }; class SLAMDirectionalMine_Wire_Mag: ATMine_Range_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_SLAM"; + GVAR(setupObject) = "ACE_Explosives_Place_SLAM"; class ACE_Triggers { SupportedTriggers[] = {"IRSensor", "PressurePlate", "Timer", "Command", "MK16_Transmitter"}; class PressurePlate { @@ -107,7 +104,7 @@ class CfgMagazines { }; class IEDUrbanBig_Remote_Mag: DemoCharge_Remote_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_IEDUrbanBig"; + GVAR(setupObject) = "ACE_Explosives_Place_IEDUrbanBig"; class ACE_Triggers { SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; class Command { @@ -125,7 +122,7 @@ class CfgMagazines { }; }; class IEDLandBig_Remote_Mag: IEDUrbanBig_Remote_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_IEDLandBig"; + GVAR(setupObject) = "ACE_Explosives_Place_IEDLandBig"; picture = "\A3\Weapons_F\Data\UI\gear_mine_AT_CA.paa"; // Fix inconsistent picture class ACE_Triggers: ACE_Triggers { class Command: Command { @@ -139,7 +136,7 @@ class CfgMagazines { }; }; class IEDUrbanSmall_Remote_Mag: DemoCharge_Remote_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_IEDUrbanSmall"; + GVAR(setupObject) = "ACE_Explosives_Place_IEDUrbanSmall"; picture = "\A3\Weapons_F\Data\UI\gear_mine_AP_bouncing_CA.paa"; // Fix inconsistent picture class ACE_Triggers { SupportedTriggers[] = {"Command", "DeadmanSwitch", "Cellphone", "PressurePlate"}; @@ -158,7 +155,7 @@ class CfgMagazines { }; }; class IEDLandSmall_Remote_Mag: IEDUrbanSmall_Remote_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_IEDLandSmall"; + GVAR(setupObject) = "ACE_Explosives_Place_IEDLandSmall"; class ACE_Triggers: ACE_Triggers { class Command: Command { ammo = "ACE_IEDLandSmall_Command_Ammo"; @@ -174,7 +171,7 @@ class CfgMagazines { // Orange DLC: class APERSMineDispenser_Mag: SatchelCharge_Remote_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_APERSMineDispenser"; + GVAR(setupObject) = "ACE_Explosives_Place_APERSMineDispenser"; class ACE_Triggers { SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter"}; class Timer { @@ -187,7 +184,7 @@ class CfgMagazines { }; }; class TrainingMine_Mag: APERSMine_Range_Mag { - GVAR(SetupObject) = "ACE_Explosives_Place_TrainingMine"; + GVAR(setupObject) = "ACE_Explosives_Place_TrainingMine"; class ACE_Triggers { SupportedTriggers[] = {"PressurePlate"}; class PressurePlate { diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 91a708beb87..0a67a9a608d 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -6,24 +6,24 @@ class CfgVehicles { class ACE_SelfActions { class ACE_Explosives { displayName = CSTRING(Menu); - condition = QUOTE(!(_player getVariable [ARR_2(QQGVAR(PlantingExplosive),false)])); + condition = QUOTE(!(_player getVariable [ARR_2(QQGVAR(plantingExplosive),false)])); statement = ""; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 1; icon = QPATHTOF(UI\Explosives_Menu_ca.paa); - insertChildren = QUOTE([_player] call FUNC(addTransmitterActions)); + insertChildren = QUOTE(_player call FUNC(addTransmitterActions)); class ACE_Place { displayName = CSTRING(Place); statement = ""; - condition = "true"; + condition = QUOTE(true); exceptions[] = {"isNotSwimming"}; icon = QPATHTOF(UI\Place_Explosive_ca.paa); insertChildren = QUOTE(_player call FUNC(addExplosiveActions)); }; class ACE_Cellphone { displayName = CSTRING(cellphone_displayName); - condition = "('ACE_Cellphone' in (items ace_player))"; - statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';"; + condition = QUOTE([ARR_2(_player,'ACE_Cellphone')] call EFUNC(common,hasItem)); + statement = QUOTE(closeDialog 0; createDialog 'Rsc_ACE_PhoneInterface'); exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; icon = QPATHTOF(Data\UI\Cellphone_UI.paa); @@ -87,7 +87,7 @@ class CfgVehicles { displayName = CSTRING(TriggerMenu); condition = "true"; statement = ""; - insertChildren = QUOTE([ARR_3(_target getVariable QUOTE(QGVAR(class)),_target,_player)] call FUNC(addTriggerActions)); + insertChildren = QUOTE([ARR_3(_target getVariable QQGVAR(class),_target,_player)] call FUNC(addTriggerActions)); showDisabled = 0; exceptions[] = {"isNotSwimming"}; icon = QPATHTOF(UI\Explosives_Menu_ca.paa); @@ -96,7 +96,7 @@ class CfgVehicles { selection = ""; displayName = CSTRING(Pickup); condition = "true"; - statement = QUOTE([ARR_2(_player,_target getVariable QUOTE(QGVAR(class)))] call EFUNC(common,addToInventory);deleteVehicle _target;); + statement = QUOTE([ARR_2(_player,_target getVariable QQGVAR(class))] call EFUNC(common,addToInventory); deleteVehicle _target); showDisabled = 0; exceptions[] = {"isNotSwimming"}; icon = "\A3\ui_f\data\IGUI\Cfg\Actions\Obsolete\ui_action_takemine_ca.paa"; @@ -106,60 +106,60 @@ class CfgVehicles { }; class ACE_Explosives_Place_DemoCharge: ACE_Explosives_Place { - displayName = "Demo Charge"; + displayName = "$STR_A3_cfgMagazines_DemoCharge0"; model = "\A3\Weapons_F\explosives\c4_charge_small_d"; class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { - position = "[-0.07,0,0.055]"; + position = "[-0.07, 0, 0.055]"; }; }; }; class ACE_Explosives_Place_APERSBoundingMine: ACE_Explosives_Place { - displayName = "APERS Bounding Mine"; + displayName = "$STR_A3_cfgMagazines_BouncingMineRangeMagazine0"; model = "\A3\Weapons_F\explosives\mine_AP_bouncing"; }; class ACE_Explosives_Place_APERSMine: ACE_Explosives_Place { - displayName = "APERS Mine"; + displayName = "$STR_A3_cfgMagazines_ClassicMineRangeMagazine0"; model = "\A3\Weapons_F\explosives\mine_ap"; }; class ACE_Explosives_Place_APERSTripwireMine: ACE_Explosives_Place { - displayName = "APERS Tripwire Mine"; + displayName = "$STR_A3_cfgMagazines_ClassicMineWireMagazine0"; model = "\A3\Weapons_F\explosives\mine_AP_tripwire"; class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { - position = "[1.415,0,0.12]"; + position = "[1.415, 0, 0.12]"; }; }; }; class ACE_Explosives_Place_ATMine: ACE_Explosives_Place { - displayName = "AT Mine"; + displayName = "$STR_A3_CfgMagazines_Mine0"; model = "\A3\Weapons_f\Explosives\mine_at"; }; class ACE_Explosives_Place_Claymore: ACE_Explosives_Place { - displayName = "Claymore"; + displayName = "$STR_A3_cfgMagazines_DirectionalMineRemoteMagazine0"; model = "\A3\Weapons_F\explosives\mine_AP_miniclaymore"; class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { - position = "[0,0,0.038]"; + position = "[0, 0, 0.038]"; }; }; }; class ACE_Explosives_Place_SatchelCharge: ACE_Explosives_Place { - displayName = "Satchel Charge"; + displayName = "$STR_A3_cfgMagazines_PipeBomb0"; model = "\A3\Weapons_F\Explosives\satchel"; class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { - position = "[-0.1,-0.1,0.05]"; + position = "[-0.1, -0.1, 0.05]"; }; }; }; // Orange DLC: class ACE_Explosives_Place_APERSMineDispenser: ACE_Explosives_Place { - displayName = "APERSMineDispenser"; + displayName = "$STR_A3_CfgMagazines_APERSMineDispenser_Mag0"; model = "\A3\Weapons_F_Orange\Explosives\APERSmineDispenser"; class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { @@ -168,7 +168,7 @@ class CfgVehicles { }; }; class ACE_Explosives_Place_TrainingMine: ACE_Explosives_Place { - displayName = "TrainingMine"; + displayName = "$STR_A3_CfgMagazines_TrainingMine_Mag0"; model = "\A3\Weapons_F_Orange\Explosives\TrainingMine_F"; class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { @@ -179,28 +179,28 @@ class CfgVehicles { class ACE_Explosives_Place_SLAM: ACE_Explosives_Place { - displayName = "SLAM"; + displayName = "$STR_A3_cfgMagazines_DirectionalMineRangeMagazine0"; model = "\A3\Weapons_F\Explosives\mine_SLAM_directional"; }; // IEDs class ACE_Explosives_Place_IEDUrbanBig: ACE_Explosives_Place { - displayName = "IED Urban Big"; + displayName = "$STR_A3_CfgVehicles_IEDUrbanBig_F"; model = "\A3\Weapons_F\Explosives\IED_urban_big"; }; class ACE_Explosives_Place_IEDLandBig: ACE_Explosives_Place { - displayName = "IED Land Big"; + displayName = "$STR_A3_CfgVehicles_IEDLandBig_F"; model = "\A3\Weapons_F\Explosives\IED_land_big"; }; class ACE_Explosives_Place_IEDUrbanSmall: ACE_Explosives_Place { - displayName = "IED Urban Small"; + displayName = "$STR_A3_CfgVehicles_IEDUrbanSmall_F"; model = "\A3\Weapons_F\Explosives\IED_urban_small"; }; class ACE_Explosives_Place_IEDLandSmall: ACE_Explosives_Place { - displayName = "IED Land Small"; + displayName = "$STR_A3_CfgVehicles_IEDLandSmall_F"; model = "\A3\Weapons_F\Explosives\IED_land_small"; }; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index 30e1fb95cbb..5c81cb9aec0 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -12,8 +12,7 @@ class CfgWeapons { class CBA_MiscItem_ItemInfo; class ACE_ExplosiveItem: CBA_MiscItem_ItemInfo { - allowedSlots[] = {TYPE_UNIFORM,TYPE_VEST,TYPE_BACKPACK}; - //type = 201; + allowedSlots[] = {TYPE_UNIFORM, TYPE_VEST, TYPE_BACKPACK}; }; class ACE_Clacker: ACE_ItemCore { @@ -23,8 +22,8 @@ class CfgWeapons { descriptionShort = CSTRING(clacker_description); picture = QPATHTOF(Data\UI\Clacker.paa); model = QPATHTOF(data\ace_m57.p3d); - GVAR(Range) = 250; - GVAR(Detonator) = 1; + GVAR(range) = 250; + GVAR(detonator) = 1; GVAR(triggerType) = "Command"; ACE_isTool = 1; @@ -37,7 +36,7 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); displayName = CSTRING(M152_Clacker_displayName); picture = QPATHTOF(Data\UI\MK26_Transmitter_ca.paa); - GVAR(Range) = 5000; + GVAR(range) = 5000; GVAR(triggerType) = "MK16_Transmitter"; }; class ACE_DefusalKit: ACE_ItemCore { @@ -47,8 +46,8 @@ class CfgWeapons { descriptionShort = CSTRING(DefusalKit_description); picture = QPATHTOF(Data\UI\Pliers.paa); model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d"; - ACE_isTool = 1; GVAR(defusalKit) = 1; + ACE_isTool = 1; class ItemInfo: ACE_ExplosiveItem { mass = 5; @@ -62,8 +61,8 @@ class CfgWeapons { descriptionShort = CSTRING(DeadManSwitch_description); picture = QPATHTOF(Data\UI\DeadmanSwitch.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; - GVAR(Range) = 100; - GVAR(Detonator) = 1; + GVAR(range) = 100; + GVAR(detonator) = 1; GVAR(triggerType) = "DeadManSwitch"; ACE_isTool = 1; @@ -79,8 +78,8 @@ class CfgWeapons { descriptionShort = CSTRING(cellphone_description); picture = QPATHTOF(Data\UI\Cellphone_UI.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; - GVAR(Range) = 15000; - GVAR(Detonator) = 1; + GVAR(range) = 15000; + GVAR(detonator) = 1; GVAR(triggerType) = "Cellphone"; ACE_isTool = 1; diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index 81ab1b54069..f47dbbe5bd2 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -42,7 +42,7 @@ if (isServer) then { params ["_explosive"]; TRACE_1("exploding",_explosive); if (!isNull _explosive) then { - _explosive setDamage 1; + [QEGVAR(common,triggerAmmo), _explosive, _explosive] call CBA_fnc_targetEvent; }; }, _explosive, _delay] call CBA_fnc_waitAndExecute; }] call CBA_fnc_addEventHandler; diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index b60186ab684..db2e48fa8da 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -32,6 +32,7 @@ class RscEdit; class RscPicture; class RscButton; class ctrlXSliderH; + #include "ExplosivesUI.hpp" #include "TimerDialog.hpp" #include "GUI_VirtualAmmo.hpp" diff --git a/addons/explosives/dev/test_magazines.sqf b/addons/explosives/dev/test_magazines.sqf index ca9744f08da..afd091b24c4 100644 --- a/addons/explosives/dev/test_magazines.sqf +++ b/addons/explosives/dev/test_magazines.sqf @@ -5,20 +5,24 @@ INFO("--- Checking Explosive Mags ---"); private _explosivesMags = compatibleMagazines "Put"; private _setupHash = createHashMap; + { private _mag = _x; private _cfg = configFile >> "CfgMagazines" >> _mag; private _scope = getNumber (_cfg >> "scope"); - private _setupObject = getText (_cfg >> QGVAR(SetupObject)); + private _setupObject = getText (_cfg >> QGVAR(setupObject)); + if (_setupObject == "") then { WARNING_2("[%1](scope %2) has no setupObject",_mag,_scope); - continue + continue; }; + if (!isClass (configFile >> "CfgVehicles" >> _setupObject)) then { ERROR_2("[%1](scope %2) has invalid setup object",_mag,_scope); }; - if ((((_setupHash getOrDefault [_setupObject, [], true]) pushBack _mag) > 0)) then { + + if (((_setupHash getOrDefault [_setupObject, [], true]) pushBack _mag) > 0) then { INFO_2("[%1] setupObject has multiple mags %2",_setupObject,_setupHash get _setupObject); }; } forEach _explosivesMags; diff --git a/addons/explosives/functions/fnc_addDetonateActions.sqf b/addons/explosives/functions/fnc_addDetonateActions.sqf index 06c4f3c8be3..0001edffcb0 100644 --- a/addons/explosives/functions/fnc_addDetonateActions.sqf +++ b/addons/explosives/functions/fnc_addDetonateActions.sqf @@ -119,11 +119,7 @@ if (_detonator != "ACE_DeadManSwitch") then { if (_connectedInventoryExplosive != "") then { //Add the disconnect action private _magConfig = configFile >> "CfgMagazines" >> _connectedInventoryExplosive; - private _name = if ((getText (_magConfig >> "displayNameShort")) != "") then { - getText (_magConfig >> "displayNameShort") - } else { - getText(_magConfig >> "displayName") - }; + private _name = getText (_magConfig >> "displayName"); private _picture = getText (_magConfig >> "picture"); _children pushBack [ @@ -152,11 +148,7 @@ if (_detonator != "ACE_DeadManSwitch") then { private _magConfig = configFile >> "CfgMagazines" >> _mag; private _supportedTriggers = getArray (_magConfig >> "ACE_Triggers" >> "SupportedTriggers"); if (({_x == "DeadmanSwitch"} count _supportedTriggers) == 1) then { //case insensitive search - private _name = if ((getText (_magConfig >> "displayNameShort")) != "") then { - getText (_magConfig >> "displayNameShort") - } else { - getText(_magConfig >> "displayName") - }; + private _name = getText (_magConfig >> "displayName"); private _picture = getText (_magConfig >> "picture"); _children pushBack [ diff --git a/addons/explosives/functions/fnc_addExplosiveActions.sqf b/addons/explosives/functions/fnc_addExplosiveActions.sqf index 480ecd27012..6276e48afe6 100644 --- a/addons/explosives/functions/fnc_addExplosiveActions.sqf +++ b/addons/explosives/functions/fnc_addExplosiveActions.sqf @@ -27,11 +27,8 @@ { private _config = _cfgMagazines >> _x; if (getNumber (_config >> QGVAR(Placeable)) == 1) then { - private _name = getText (_config >> "displayNameShort"); + private _name = getText (_config >> "displayName"); private _picture = getText (_config >> "picture"); - if (_name isEqualTo "") then { - _name = getText (_config >> "displayName"); - }; private _action = [_x, format ["%1 (%2)", _name, _totalCount - count (_magazines - [_x])], _picture, {[{_this call FUNC(setupExplosive)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, _x] call EFUNC(interact_menu,createAction); _actions pushBack [_action, [], _player]; diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index 5e276745b59..e9ad9856fba 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -31,25 +31,9 @@ private _result = true; if !([_unit, _range, _item select 0, _item select 1, _triggerClassname] call FUNC(checkDetonateHandlers)) exitWith {false}; -if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhenDestroyed") == 0) then { - private _previousExp = _item select 0; - private _exp = getText (ConfigFile >> "CfgAmmo" >> typeOf (_previousExp) >> QGVAR(Explosive)); - if (_exp != "") then { - _exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"]; - _exp setDir (getDir _previousExp); - _item set [0, _exp]; - private _pos = getPosASL _previousExp; - deleteVehicle _previousExp; - _exp setPosASL _pos; - }; -}; - if (isNull (_item select 0)) then { WARNING_1("Explosive is null [%1]",_this); }; -if ((getNumber (configFile >> "CfgAmmo" >> (typeOf (_item select 0)) >> "triggerWhenDestroyed")) != 1) then { - WARNING_1("Explosive is not triggerWhenDestroyed [%1]",typeOf (_item select 0)); -}; [QGVAR(detonate), [_unit, _item select 0, _item select 1]] call CBA_fnc_serverEvent; diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index 918bbb0c33c..d25e5d3276a 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -29,8 +29,8 @@ if (!isClass (configFile >> "CfgVehicles" >> _setupObjectClass)) exitWith {ERROR private _p3dModel = getText (configFile >> "CfgVehicles" >> _setupObjectClass >> "model"); if (_p3dModel == "") exitWith {ERROR("No Model");}; //"" - will crash game! -[_unit, "forceWalk", "ACE_Explosives", true] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Explosives", true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); //Show mouse buttons: [localize LSTRING(PlaceAction), localize LSTRING(CancelAction), localize LSTRING(ScrollAction)] call EFUNC(interaction,showMouseHint); @@ -149,8 +149,8 @@ GVAR(TweakedAngle) = 0; [_pfID] call CBA_fnc_removePerFrameHandler; GVAR(pfeh_running) = false; - [_unit, "forceWalk", "ACE_Explosives", false] call EFUNC(common,statusEffect_set); - [_unit, "blockThrow", "ACE_Explosives", false] call EFUNC(common,statusEffect_set); + [_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); [] call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", (_unit getVariable [QGVAR(placeActionEH), -1])] call EFUNC(common,removeActionEventHandler); [_unit, "zoomtemp", (_unit getVariable [QGVAR(cancelActionEH), -1])] call EFUNC(common,removeActionEventHandler); diff --git a/addons/explosives/initSettings.inc.sqf b/addons/explosives/initSettings.inc.sqf index bdbd488550d..baa38f0d8f9 100644 --- a/addons/explosives/initSettings.inc.sqf +++ b/addons/explosives/initSettings.inc.sqf @@ -6,7 +6,7 @@ private _categoryStr = format ["ACE %1", LLSTRING(Menu)]; [LLSTRING(RequireSpecialist_DisplayName),LLSTRING(RequireSpecialist_Description)], _categoryStr, false, - true + 1 ] call CBA_fnc_addSetting; [ @@ -15,7 +15,7 @@ private _categoryStr = format ["ACE %1", LLSTRING(Menu)]; [LLSTRING(PunishNonSpecialists_DisplayName),LLSTRING(PunishNonSpecialists_Description)], _categoryStr, true, - true + 1 ] call CBA_fnc_addSetting; [ @@ -24,7 +24,7 @@ private _categoryStr = format ["ACE %1", LLSTRING(Menu)]; [LLSTRING(ExplodeOnDefuse_DisplayName),LLSTRING(ExplodeOnDefuse_Description)], _categoryStr, true, - true + 1 ] call CBA_fnc_addSetting; // Variable names to preserve https://github.com/acemod/ACE3/pull/6882 @@ -34,7 +34,7 @@ private _categoryStr = format ["ACE %1", LLSTRING(Menu)]; [LLSTRING(TimerMin_DisplayName), LLSTRING(TimerMin_Description)], [_categoryStr, LLSTRING(ExplosiveTimer)], [0, 5999, TIMER_VALUE_MIN], - true + 1 ] call CBA_fnc_addSetting; [ @@ -43,7 +43,7 @@ private _categoryStr = format ["ACE %1", LLSTRING(Menu)]; [LLSTRING(TimerMax_DisplayName), LLSTRING(TimerMax_Description)], [_categoryStr, LLSTRING(ExplosiveTimer)], [0, 5999, TIMER_VALUE_MAX], - true + 1 ] call CBA_fnc_addSetting; [ @@ -51,6 +51,5 @@ private _categoryStr = format ["ACE %1", LLSTRING(Menu)]; "TIME", [LLSTRING(TimerDefault_DisplayName), LLSTRING(TimerDefault_Description)], [_categoryStr, LLSTRING(ExplosiveTimer)], - [0, 5999, TIMER_VALUE_DEFAULT], - false + [0, 5999, TIMER_VALUE_DEFAULT] ] call CBA_fnc_addSetting; diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index 10ea50a7c51..89418c0f99b 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -134,7 +134,7 @@ Equipa el helicoptero seleccionado con un Sistema de Inserción/Extracción Rápida por Cuerda Equipaggia l'elicottero selezionato con il Fast Rope Insertion Extraction System Vybavit vybraný vrtulník systémem Fast Rope Insertion Extraction (FRIES) - Equipa um helicóptero selecionado com um sistema de Fast Rope Insertion Extraction System + Equipa o helicóptero selecionado com um Sistema de Inserção/Extração Rápida por Corda Снаряжает выбранный вертолет оборудованием для спуска десанта по канатам 選択されたヘリコプターで Fast Rope Insertion Extraction System を使えるようにします。 선택된 헬리콥터에 패스트로프 투입 및 탈출 시스템을 장착합니다. @@ -298,6 +298,7 @@ Schnelles-Abseilen Fast Rope 패스트로프 + Descida rápida pela corda Require rope item to deploy diff --git a/addons/fcs/config.cpp b/addons/fcs/config.cpp index 88e803d0ca4..433f17ac8be 100644 --- a/addons/fcs/config.cpp +++ b/addons/fcs/config.cpp @@ -27,13 +27,6 @@ class CfgPatches { #include "CfgOptics.hpp" -class ACE_Extensions { - class ace_fcs { - windows = 1; - client = 1; - }; -}; - class ACE_Tests { fcs = QPATHTOF(dev\test_debugConfigs.sqf); }; diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index b0cb2ea1c4e..de9462848d7 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -63,7 +63,7 @@ private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurret }; } forEach (_vehicle weaponsTurret _turret); - private _offset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, _angleTarget, _distance]; + private _offset = ("ace" callExtension ["fcs", [_initSpeed, _airFriction, _angleTarget, _distance]]) # 0; _offset = parseNumber _offset; _FCSInitSpeed pushBack _initSpeed; diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index e99416593af..d4e79e84617 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -41,7 +41,7 @@ if (_zeroDistance > 0) then { private _weaponCombo = [_weapon, _magazine, _ammo, _zeroDistance]; if (_weaponCombo isNotEqualTo (_gunner getVariable [QGVAR(lastWeaponCombo), []])) then { private _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction"); - private _antiOffset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, 0, _zeroDistance]; + private _antiOffset = ("ace" callExtension ["fcs", [_initSpeed, _airFriction, 0, _zeroDistance]]) # 0; _antiOffset = parseNumber _antiOffset; _gunner setVariable [QGVAR(lastWeaponCombo), _weaponCombo]; diff --git a/addons/field_rations/initSettings.inc.sqf b/addons/field_rations/initSettings.inc.sqf index 86bf04aed2f..16e2d4eb2d6 100644 --- a/addons/field_rations/initSettings.inc.sqf +++ b/addons/field_rations/initSettings.inc.sqf @@ -4,9 +4,9 @@ [ELSTRING(common,Enabled), LSTRING(Enabled_Description)], LSTRING(DisplayName), false, - true, - {}, - true // Needs restart + 1, + {[QXGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_fnc_addSetting; [ diff --git a/addons/fortify/config.cpp b/addons/fortify/config.cpp index ab12338982f..2808b56cba5 100644 --- a/addons/fortify/config.cpp +++ b/addons/fortify/config.cpp @@ -2,6 +2,7 @@ class CfgPatches { class ADDON { + name = COMPONENT_NAME; units[] = {QXGVAR(setupModule), QXGVAR(buildLocationModule)}; weapons[] = {"ACE_Fortify"}; requiredVersion = REQUIRED_VERSION; diff --git a/addons/grenades/stringtable.xml b/addons/grenades/stringtable.xml index b0630e3a437..1a6243464fa 100644 --- a/addons/grenades/stringtable.xml +++ b/addons/grenades/stringtable.xml @@ -110,6 +110,7 @@ 이 수류탄은 굴릴 수 없습니다. %1(으)로 전환되었습니다. Granate kann nicht rollen, zu %1 gewechselt Granata non può rotolare, cambiato a %1 + Grenade ne peut pas rouler, passé à %1 M84 Stun Grenade diff --git a/addons/headless/functions/fnc_transferGroups.sqf b/addons/headless/functions/fnc_transferGroups.sqf index 0efbe263652..920470c335f 100644 --- a/addons/headless/functions/fnc_transferGroups.sqf +++ b/addons/headless/functions/fnc_transferGroups.sqf @@ -74,13 +74,9 @@ private _numTransferredHC1 = 0; private _numTransferredHC2 = 0; private _numTransferredHC3 = 0; -private _units = []; -private _transfer = false; -private _previousOwner = -1; - // Transfer AI groups { - _units = units _x; + private _units = units _x; // No transfer if empty group or if group is blacklisted if (_units isEqualTo [] || {_x getVariable [QXGVAR(blacklist), false]}) then { @@ -92,6 +88,8 @@ private _previousOwner = -1; continue; }; + private _transfer = true; + { // No transfer if already transferred if (!_force && {(owner _x) in [_idHC1, _idHC2, _idHC3]}) exitWith { @@ -126,7 +124,7 @@ private _previousOwner = -1; }; // Round robin between HCs if load balance enabled, else pass all to one HC - _previousOwner = groupOwner _x; + private _previousOwner = groupOwner _x; switch (_currentHC) do { case 1: { @@ -145,11 +143,13 @@ private _previousOwner = -1; // Don't transfer if it's already local to HC1 if (_previousOwner == _idHC1) exitWith {}; - [QGVAR(groupTransferPre), [_x, _HC1, _previousOwner, _idHC1], [_previousOwner, _idHC1]] call CBA_fnc_targetEvent; // API + [QGVAR(groupTransferPre), [_x, _HC1, _previousOwner, _idHC1], _previousOwner] call CBA_fnc_ownerEvent; // API + [QGVAR(groupTransferPre), [_x, _HC1, _previousOwner, _idHC1], _idHC1] call CBA_fnc_ownerEvent; // API private _transferred = _x setGroupOwner _idHC1; - [QGVAR(groupTransferPost), [_x, _HC1, _previousOwner, _idHC1, _transferred], [_previousOwner, _idHC1]] call CBA_fnc_targetEvent; // API + [QGVAR(groupTransferPost), [_x, _HC1, _previousOwner, _idHC1, _transferred], _previousOwner] call CBA_fnc_ownerEvent; // API + [QGVAR(groupTransferPost), [_x, _HC1, _previousOwner, _idHC1, _transferred], _idHC1] call CBA_fnc_ownerEvent; // API if (_transferred) then { _numTransferredHC1 = _numTransferredHC1 + 1; @@ -171,11 +171,13 @@ private _previousOwner = -1; // Don't transfer if it's already local to HC2 if (_previousOwner == _idHC2) exitWith {}; - [QGVAR(groupTransferPre), [_x, _HC2, _previousOwner, _idHC2], [_previousOwner, _idHC2]] call CBA_fnc_targetEvent; // API + [QGVAR(groupTransferPre), [_x, _HC2, _previousOwner, _idHC2], _previousOwner] call CBA_fnc_ownerEvent; // API + [QGVAR(groupTransferPre), [_x, _HC2, _previousOwner, _idHC2], _idHC2] call CBA_fnc_ownerEvent; // API private _transferred = _x setGroupOwner _idHC2; - [QGVAR(groupTransferPost), [_x, _HC2, _previousOwner, _idHC2, _transferred], [_previousOwner, _idHC2]] call CBA_fnc_targetEvent; // API + [QGVAR(groupTransferPost), [_x, _HC2, _previousOwner, _idHC2, _transferred], _previousOwner] call CBA_fnc_ownerEvent; // API + [QGVAR(groupTransferPost), [_x, _HC2, _previousOwner, _idHC2, _transferred], _idHC2] call CBA_fnc_ownerEvent; // API if (_transferred) then { _numTransferredHC2 = _numTransferredHC2 + 1; @@ -197,11 +199,13 @@ private _previousOwner = -1; // Don't transfer if it's already local to HC3 if (_previousOwner == _idHC3) exitWith {}; - [QGVAR(groupTransferPre), [_x, _HC3, _previousOwner, _idHC3], [_previousOwner, _idHC3]] call CBA_fnc_targetEvent; // API + [QGVAR(groupTransferPre), [_x, _HC3, _previousOwner, _idHC3], _previousOwner] call CBA_fnc_ownerEvent; // API + [QGVAR(groupTransferPre), [_x, _HC3, _previousOwner, _idHC3], _idHC3] call CBA_fnc_ownerEvent; // API private _transferred = _x setGroupOwner _idHC2; - [QGVAR(groupTransferPost), [_x, _HC3, _previousOwner, _idHC3, _transferred], [_previousOwner, _idHC3]] call CBA_fnc_targetEvent; // API + [QGVAR(groupTransferPost), [_x, _HC3, _previousOwner, _idHC3, _transferred], _previousOwner] call CBA_fnc_ownerEvent; // API + [QGVAR(groupTransferPost), [_x, _HC3, _previousOwner, _idHC3, _transferred], _idHC3] call CBA_fnc_ownerEvent; // API if (_transferred) then { _numTransferredHC3 = _numTransferredHC3 + 1; diff --git a/addons/hearing/XEH_PREP.hpp b/addons/hearing/XEH_PREP.hpp index a2bcbb708a4..64161300d3e 100644 --- a/addons/hearing/XEH_PREP.hpp +++ b/addons/hearing/XEH_PREP.hpp @@ -1,6 +1,6 @@ PREP(addEarPlugs); PREP(earRinging); -PREP(explosionNear); +PREP(explosion); PREP(firedNear); PREP(getAmmoLoudness); PREP(handleRespawn); diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 4261933bd92..93a86f73497 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -11,6 +11,23 @@ if (isServer) then { }] call CBA_fnc_addEventHandler; }; +["CBA_settingsInitialized", { + TRACE_1("settingInit - common",GVAR(enableCombatDeafness)); + // Only install event handler if combat deafness is enabled + if (!GVAR(enableCombatDeafness)) exitWith {}; + + addMissionEventHandler ["ProjectileCreated", { + params ["_projectile"]; + + if (!local _projectile) exitWith {}; + + // Rockets only explode on local clients + _projectile addEventHandler ["Explode", { + [QGVAR(explosion), _this] call CBA_fnc_globalEvent; + }]; + }]; +}] call CBA_fnc_addEventHandler; + if (!hasInterface) exitWith {}; #include "initKeybinds.inc.sqf" @@ -27,7 +44,7 @@ GVAR(volumeAttenuation) = 1; GVAR(lastPlayerVehicle) = objNull; ["CBA_settingsInitialized", { - TRACE_1("settingInit",GVAR(enableCombatDeafness)); + TRACE_1("settingInit - client",GVAR(enableCombatDeafness)); // Only run PFEH and install event handlers if combat deafness is enabled if (!GVAR(enableCombatDeafness)) exitWith {}; @@ -35,6 +52,7 @@ GVAR(lastPlayerVehicle) = objNull; // Spawn volume updating process [LINKFUNC(updateVolume), 1, false] call CBA_fnc_addPerFrameHandler; + [QGVAR(explosion), LINKFUNC(explosion)] call CBA_fnc_addEventHandler; [QGVAR(updateVolume), LINKFUNC(updateVolume)] call CBA_fnc_addEventHandler; // Update veh attunation when player veh changes @@ -71,12 +89,7 @@ GVAR(lastPlayerVehicle) = objNull; private _firedEH = _oldPlayer getVariable [QGVAR(firedEH), -1]; _oldPlayer removeEventHandler ["FiredNear", _firedEH]; _oldPlayer setVariable [QGVAR(firedEH), nil]; - - private _explosionEH = _oldPlayer getVariable [QGVAR(explosionEH), -1]; - _oldPlayer removeEventHandler ["Explosion", _explosionEH]; - _oldPlayer setVariable [QGVAR(explosionEH), nil]; - - TRACE_3("removed unit eh",_oldPlayer,_firedEH,_explosionEH); + TRACE_2("removed unit eh",_oldPlayer,_firedEH); }; // Don't add a new EH if the unit respawned if ((_player getVariable [QGVAR(firedEH), -1]) == -1) then { @@ -86,11 +99,7 @@ GVAR(lastPlayerVehicle) = objNull; private _firedEH = _player addEventHandler ["FiredNear", {call FUNC(firedNear)}]; _player setVariable [QGVAR(firedEH), _firedEH]; - - private _explosionEH = _player addEventHandler ["Explosion", {call FUNC(explosionNear)}]; - _player setVariable [QGVAR(explosionEH), _explosionEH]; - - TRACE_3("added unit eh",_player,_firedEH,_explosionEH); + TRACE_2("added unit eh",_player,_firedEH); }; GVAR(deafnessDV) = 0; diff --git a/addons/hearing/functions/fnc_explosion.sqf b/addons/hearing/functions/fnc_explosion.sqf new file mode 100644 index 00000000000..159f6660114 --- /dev/null +++ b/addons/hearing/functions/fnc_explosion.sqf @@ -0,0 +1,55 @@ +#include "..\script_component.hpp" +/* + * Author: johnb43 + * Handles deafness due to explosions going off near the player. + * + * Arguments: + * 0: Projectile + * 1: Explosion position ASL + * 2: Velocity (unused) + * + * Return Value: + * None + * + * Example: + * [_projectile, [0, 0, 0], [0, 0, 0]] call ace_hearing_fnc_explosion + * + * Public: No + */ + +// Ignore spectators, curators and alike +if ((getNumber (configOf ACE_player >> "isPlayableLogic")) == 1) exitWith {}; + +params ["_projectile", "_pos"]; + +// Don't allow for distances under 1 +private _distance = ((eyePos ACE_player) vectorDistance _pos) max 1; + +// Fast exit if explosion far away +if (_distance > 100) exitWith { + TRACE_1("too far away",_distance); +}; + +private _ammoConfig = configOf _projectile; +private _explosive = getNumber (_ammoConfig >> "explosive"); + +private _vehAttenuation = [GVAR(playerVehAttenuation), 1] select (isNull objectParent ACE_player || {isTurnedOut ACE_player}); + +TRACE_5("",typeOf _projectile,_distance,_explosive,_audibleFire,_vehAttenuation); + +(if (isArray (_ammoConfig >> "soundHit1")) then { + getArray (_ammoConfig >> "soundHit1") +} else { + getArray (_ammoConfig >> "soundHit") +}) params ["", ["_volume", 1], "", ["_maxDistance", 1500]]; + +if (_distance > _maxDistance) exitWith { + TRACE_2("too far away",_distance,_maxDistance); +}; + +private _strength = _vehAttenuation * _explosive * _volume * _maxDistance / _distance^2; + +TRACE_2("strength",_volume,_strength); + +// Call immediately, as it will get picked up later by the update thread anyway +_strength call FUNC(earRinging); diff --git a/addons/hearing/functions/fnc_explosionNear.sqf b/addons/hearing/functions/fnc_explosionNear.sqf deleted file mode 100644 index 583c55749e9..00000000000 --- a/addons/hearing/functions/fnc_explosionNear.sqf +++ /dev/null @@ -1,26 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: KoffeinFlummi, commy2, Ruthberg - * Handles deafness due to explosions going off near the player. - * - * Arguments: - * 0: Unit - * 1: Damage inflicted to the unit - * - * Return Value: - * None - * - * Example: - * [clientExplosionEvent] call ace_hearing_fnc_explosionNear - * - * Public: No - */ - -params ["_unit", "_damage"]; - -TRACE_2("explosion near player",_unit,_damage); - -private _strength = (0 max _damage) * 30; - -// Call immediately, as it will get picked up later by the update thread anyway -_strength call FUNC(earRinging); diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 9aba1ab56b0..08419d4e42b 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -372,6 +372,7 @@ Mettre/enlever les bouchons Ohrstöpsel einsetzen/herausnehmen Poner/quitar tapones + Colocar/retirar protetores auriculares Only units with heavy weapons @@ -382,6 +383,7 @@ Sólo unidades con armas pesadas Solo a unità con armi pesanti 중화기를 가진 유닛만 해당 + Apenas unidades com armas pesadas diff --git a/addons/hitreactions/stringtable.xml b/addons/hitreactions/stringtable.xml index ff541ad6a34..e60be5b353a 100644 --- a/addons/hitreactions/stringtable.xml +++ b/addons/hitreactions/stringtable.xml @@ -24,6 +24,8 @@ 플레이어가 무기를 떨굴 확률 (팔 피격) Spieler Wahrscheinlichkeit, die Waffe fallen zu lassen (Arm Treffer) Probabilità dei giocatori di far cadere l'arma (colpo al braccio) + Probabilité de lâcher l'arme (coup au bras) + Probabilidade do jogador de largar a arma após tiro no braço AI Weapon Drop Chance (Arm Hit) @@ -32,6 +34,8 @@ 인공지능이 무기를 떨굴 확률 (팔 피격) KI-Wahrscheinlichkeit, die Waffe fallen zu lassen (Arm Treffer) Probabilità dell'IA di far cadere l'arma (colpo al braccio) + Probabilité de l'IA de lâcher l'arme (coup au bras) + Probabilidade da IA de largar a arma após tiro no braço diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 411dbfe30eb..65542c66e87 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -70,6 +70,7 @@ GVAR(no_cams) sort true; //Close monitor if we no longer have the item: if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable [QGVAR(monitor), displayNull])}) then { closeDialog 0; + [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }; GVAR(nearHuntIRs) = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; @@ -113,6 +114,7 @@ GVAR(no_cams) sort true; if (player != ACE_player) then { player remoteControl ACE_player; }; + [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }; switch (GVAR(ZOOM)) do { diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf index 60b7a1fc141..efb9e139d12 100644 --- a/addons/huntir/functions/fnc_huntir.sqf +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -18,16 +18,19 @@ #define __TYPE_WRITER_DELAY 0.05 -if ((ACE_player call CBA_fnc_getUnitAnim) select 0 == "stand") then { +if (missionNamespace getVariable [QGVAR(animatePlayer), true] && {(ACE_player call CBA_fnc_getUnitAnim) select 0 == "stand"}) then { ACE_player playMove "AmovPercMstpSrasWrflDnon_diary"; }; HUNTIR_BACKGROUND_LAYER_ID cutText ["", "BLACK", 0]; createDialog QGVAR(cam_dialog_off); +[QGVAR(monitorOpened), [ACE_player]] call CBA_fnc_localEvent; + [{ if (!dialog) exitWith { HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN", 0]; + [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }; closeDialog 0; createDialog QGVAR(cam_dialog_inactive); @@ -40,10 +43,12 @@ createDialog QGVAR(cam_dialog_off); GVAR(message) = []; GVAR(messageSearching) = toArray "Searching....."; GVAR(messageConnecting) = toArray "Connecting....."; + [QGVAR(monitorStarted), [ACE_player]] call CBA_fnc_localEvent; [{ //Close monitor if we no longer have item: if ((!([ACE_player, "ACE_HuntIR_monitor"] call EFUNC(common,hasItem))) && {!isNull (uiNameSpace getVariable [QGVAR(monitor), displayNull])}) then { closeDialog 0; + [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }; private _elapsedTime = CBA_missionTime - GVAR(startTime); @@ -55,6 +60,7 @@ createDialog QGVAR(cam_dialog_off); GVAR(done) = false; GVAR(message) = []; GVAR(connectionDelay) = 5; + [QGVAR(monitorDisconnected), [ACE_player]] call CBA_fnc_localEvent; }; if ((!dialog) || GVAR(done)) exitWith { @@ -64,6 +70,7 @@ createDialog QGVAR(cam_dialog_off); [_nearestHuntIRs select 0] call FUNC(cam); } else { HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN"]; + [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }; }; switch (GVAR(state)) do { @@ -75,9 +82,11 @@ createDialog QGVAR(cam_dialog_off); GVAR(message) = []; if (_elapsedTime > 10) then { GVAR(state) = "noGDS"; + [QGVAR(monitorNoGDS), [ACE_player]] call CBA_fnc_localEvent; }; if (_elapsedTime > 5 && {{_x getHitPointDamage "HitCamera" < 0.25} count _nearestHuntIRs > 0}) then { GVAR(state) = "connecting"; + [QGVAR(monitorConnecting), [ACE_player]] call CBA_fnc_localEvent; }; }; }; @@ -91,6 +100,7 @@ createDialog QGVAR(cam_dialog_off); if (GVAR(connectionDelay) <= 0) then { GVAR(done) = true; GVAR(state) = "connected"; + [QGVAR(monitorConnected), [ACE_player, _nearestHuntIRs select 0]] call CBA_fnc_localEvent; }; }; }; @@ -100,6 +110,7 @@ createDialog QGVAR(cam_dialog_off); GVAR(done) = true; closedialog 0; HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN"]; + [QGVAR(monitorClosed), [ACE_player]] call CBA_fnc_localEvent; }, [], 3, 0] call CBA_fnc_waitAndExecute; }; }; diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index 88269bcc04d..a62996df688 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -88,8 +88,8 @@ GVAR(inheritedClassesMan) = []; if (GVAR(inheritedClassesAll) pushBackUnique _type == -1) exitWith { END_COUNTER(InitPost); }; { - _x params ["_objectType", "_typeNum", "_parentPath", "_action"]; - if (_object isKindOf _objectType) then { + _x params ["_objectType", "_typeNum", "_parentPath", "_action", "_excludedClasses"]; + if (_type isKindOf _objectType && {_excludedClasses findIf {_type isKindOf _x} == -1}) then { [_type, _typeNum, _parentPath, _action] call FUNC(addActionToClass); }; } forEach GVAR(inheritedActionsAll); @@ -102,8 +102,10 @@ GVAR(inheritedClassesMan) = []; if (GVAR(inheritedClassesMan) pushBackUnique _type == -1) exitWith { END_COUNTER(InitPost); }; { - _x params ["_typeNum", "_parentPath", "_action"]; - [_type, _typeNum, _parentPath, _action] call FUNC(addActionToClass); + _x params ["_typeNum", "_parentPath", "_action", "_excludedClasses"]; + if (_excludedClasses findIf {_type isKindOf _x} == -1) then { // skip excluded classes and children + [_type, _typeNum, _parentPath, _action] call FUNC(addActionToClass); + }; } forEach GVAR(inheritedActionsMan); END_COUNTER(InitPost); }, true, ["VirtualMan_F"]] call CBA_fnc_addClassEventHandler; diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp index 756e8775abc..d29a9fb6879 100644 --- a/addons/interact_menu/config.cpp +++ b/addons/interact_menu/config.cpp @@ -21,10 +21,3 @@ class CfgPatches { #include "CursorMenus.hpp" #include "ACE_Settings.hpp" - -class ACE_Extensions { - class ace_break_line { - windows = 1; - client = 1; - }; -}; diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index ccea8c4654d..91197d02d92 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: esteldunedain - * Insert an ACE action to a class, under a certain path + * Inserts an ACE action to a class, under a certain path. * Note: This function is NOT global. * * Arguments: @@ -10,12 +10,13 @@ * 2: Parent path of the new action * 3: Action * 4: Use Inheritance (default: false) + * 5: Classes excluded from inheritance (children included) (default: []) * * Return Value: * The entry full path, which can be used to remove the entry, or add children entries . * * Example: - * [typeOf cursorTarget, 0, ["ACE_TapShoulderRight"],VulcanPinchAction] call ace_interact_menu_fnc_addActionToClass; + * [typeOf cursorTarget, 0, ["ACE_TapShoulderRight"], VulcanPinchAction] call ace_interact_menu_fnc_addActionToClass; * * Public: Yes */ @@ -25,22 +26,30 @@ if (!params [["_objectType", "", [""]], ["_typeNum", 0, [0]], ["_parentPath", [] ERROR("Bad Params"); [] }; -TRACE_4("addActionToClass",_objectType,_typeNum,_parentPath,_action); +private _useInheritance = _this param [4, false, [false]]; +private _excludedClasses = _this param [5, [], [[]]]; +TRACE_6("addActionToClass",_objectType,_typeNum,_parentPath,_action,_useInheritance,_excludedClasses); -if (param [4, false, [false]]) exitwith { +if (_useInheritance) exitwith { BEGIN_COUNTER(addAction); + private _cfgVehicles = configFile >> "CfgVehicles"; // store this so we don't resolve for every element + _excludedClasses = (_excludedClasses apply {configName (_cfgVehicles >> _x)}) - [""]; // ends up being faster than toLower'ing everything else if (_objectType == "CAManBase") then { - GVAR(inheritedActionsMan) pushBack [_typeNum, _parentPath, _action]; + GVAR(inheritedActionsMan) pushBack [_typeNum, _parentPath, _action, _excludedClasses]; { - [_x, _typeNum, _parentPath, _action] call FUNC(addActionToClass); - } forEach GVAR(inheritedClassesMan); + private _type = _x; + if (_excludedClasses findIf {_type isKindOf _x} == -1) then { // skip excluded classes and children + [_x, _typeNum, _parentPath, _action] call FUNC(addActionToClass); + }; + } forEach (GVAR(inheritedClassesMan) - _excludedClasses); } else { - GVAR(inheritedActionsAll) pushBack [_objectType, _typeNum, _parentPath, _action]; + GVAR(inheritedActionsAll) pushBack [_objectType, _typeNum, _parentPath, _action, _excludedClasses]; { - if (_x isKindOf _objectType) then { - [_x, _typeNum, _parentPath, _action] call FUNC(addActionToClass); + private _type = _x; + if (_type isKindOf _objectType && {_excludedClasses findIf {_type isKindOf _x} == -1}) then { + [_type, _typeNum, _parentPath, _action] call FUNC(addActionToClass); }; - } forEach GVAR(inheritedClassesAll); + } forEach (GVAR(inheritedClassesAll) - _excludedClasses); }; END_COUNTER(addAction); diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 8f19dfabbec..c2230efc4f2 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -119,7 +119,7 @@ private _actions = [ // Dummy statement so it's not collapsed when there's no available actions true }, - {[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder", "isNotRefueling"]] call EFUNC(common,canInteractWith)}, + {[ACE_player, _target, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotHandcuffed", "isNotSitting", "isNotOnLadder", "isNotRefueling"]] call EFUNC(common,canInteractWith)}, {}, {}, "Spine3", diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 9cb638bcea4..2ae39bff26b 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -36,7 +36,7 @@ if (_isTextEditing) then { if ( _isTextEditing || {(isNull curatorCamera) && { - !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotSitting", "isNotOnLadder", "isNotRefueling"]] call EFUNC(common,canInteractWith)) + !([ACE_player, objNull, ["isNotInside","isNotDragging", "isNotCarrying", "isNotSwimming", "notOnMap", "isNotEscorting", "isNotSurrendering", "isNotHandcuffed", "isNotSitting", "isNotOnLadder", "isNotRefueling"]] call EFUNC(common,canInteractWith)) } }) exitWith {false}; diff --git a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf index 7585616ef6a..87cc8609ccc 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf @@ -1,29 +1,63 @@ #include "..\script_component.hpp" /* * Author: esteldunedain - * Removes an action from a class + * Removes an action from a class. * * Arguments: * 0: TypeOf of the class * 1: Type of action, 0 for actions, 1 for self-actions * 2: Full path of the new action + * 3: Remove action from child classes (default: false) * * Return Value: * None * * Example: - * [typeOf cursorTarget, 0,["ACE_TapShoulderRight","VulcanPinch"]] call ace_interact_menu_fnc_removeActionFromClass; + * [typeOf cursorTarget, 0, ["ACE_TapShoulderRight", "VulcanPinch"]] call ace_interact_menu_fnc_removeActionFromClass; * * Public: No */ -params ["_objectType", "_typeNum", "_fullPath"]; +params ["_objectType", "_typeNum", "_fullPath", ["_useInheritance", false, [false]]]; _objectType = _objectType call EFUNC(common,getConfigName); private _res = _fullPath call FUNC(splitPath); _res params ["_parentPath", "_actionName"]; +if (_useInheritance) exitWith { + // Only need to run for classes that have already been initialized + { + [_x, _typeNum, _fullPath] call FUNC(removeActionFromClass); + } forEach (GVAR(inheritedClassesAll) select {_x isKindOf _objectType}); + + // Find same path and actionName, and check if it's a parent class, needs to be checked for all classes + private _index = GVAR(inheritedActionsAll) findIf { + _x params ["_currentType", "", "_currentParentPath", "_currentAction"]; + + [_objectType isKindOf _currentType, _currentParentPath, _currentAction select 0] isEqualTo [true, _parentPath, _actionName] + }; + + // Add to exclude classes + if (_index != -1) then { + (GVAR(inheritedActionsAll) select _index select 4) pushBackUnique _objectType; + }; + + // Children of CAManBase need special treatment because of inheritedActionsMan array + if (_objectType isKindOf "CAManBase") then { + private _index = GVAR(inheritedActionsMan) findIf { + _x params ["", "_currentParentPath", "_currentAction"]; + + [_currentParentPath, _currentAction select 0] isEqualTo [_parentPath, _actionName] + }; + + // Different index because array doesn't include _objectType + if (_index != -1) then { + (GVAR(inheritedActionsMan) select _index select 3) pushBackUnique _objectType; + }; + }; +}; + private _namespace = [GVAR(ActNamespace), GVAR(ActSelfNamespace)] select _typeNum; private _actionTrees = _namespace getOrDefault [_objectType, []]; diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index fffa5e91a7f..78b709472a3 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -41,7 +41,7 @@ if (_iconFile isEqualTo "") then { _text = if ([GVAR(useListMenu), GVAR(useListMenuSelf)] select GVAR(keyDownSelfAction)) then { format ["%4", _iconFile, _iconColor, _textSettings, _text] } else { - format ["
%4", _iconFile, _iconColor, _textSettings, "ace_break_line" callExtension _text]; + format ["
%4", _iconFile, _iconColor, _textSettings, ("ace" callExtension ["break_line", [_text]]) select 0]; }; [_ctrl, GVAR(iconCount), _text] call FUNC(ctrlSetParsedTextCached); diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 6ae0d4a9821..8671ecf9ce8 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -316,6 +316,12 @@ class CfgVehicles { statement = QUOTE(_player call FUNC(renameGroupUI)); showDisabled =1; }; + class ACE_groupDropDistantUnits { + displayName = CSTRING(groupDropDistantUnits); + condition = QUOTE(call FUNC(canGroupDropDistantUnits)); + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"}; + statement = QUOTE(call FUNC(groupDropDistantUnits)); + }; }; class ACE_Equipment { @@ -372,6 +378,16 @@ class CfgVehicles { }; class Car_F: Car {}; + class Offroad_01_base_F: Car_F { + class GVAR(anims) { + class HideBackpacks { + positions[] = {{-1.15, -1.15, -0.2}, {1.1, -1.15, -0.2}, {1.1, -2.5, -0.2}}; + items[] = {"B_TacticalPack_blk", "B_TacticalPack_blk", "B_Carryall_khk", "B_Carryall_khk"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; class Quadbike_01_base_F: Car_F { class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { @@ -405,6 +421,45 @@ class CfgVehicles { }; }; + class Wheeled_APC_F; + class APC_Wheeled_01_base_F: Wheeled_APC_F { + class GVAR(anims) { + class showBags { + phase = 0; + selections[] = {"vhc_bags"}; + items[] = {"B_Carryall_cbr", "B_Carryall_cbr"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + distance = 3; + }; + }; + }; + class APC_Wheeled_02_base_F: Wheeled_APC_F { + class GVAR(anims); + }; + class APC_Wheeled_02_base_v2_F: APC_Wheeled_02_base_F { + class GVAR(anims): GVAR(anims) { + class showBags { + phase = 0; + positions[] = {"_target selectionPosition ['vhc_bags', 'FireGeometry', 'AveragePoint']"}; + items[] = {"B_Carryall_cbr"}; + name = "$STR_BACKPACK_CONTAINER_NAME"; + text = "$STR_BACKPACK_CONTAINER_NAME"; + }; + }; + }; + class APC_Wheeled_03_base_F: Wheeled_APC_F { + class GVAR(anims) { + class showBags { + phase = 0; + positions[] = {"_target selectionPosition ['vhc_bags', 'FireGeometry', 'AveragePoint']"}; + items[] = {"B_Carryall_cbr", "B_Carryall_cbr"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; + class Tank: LandVehicle { class ACE_Actions { class ACE_MainActions { @@ -432,6 +487,88 @@ class CfgVehicles { }; }; }; + class Tank_F; + class LT_01_base_F: Tank_F { + class GVAR(anims) { + class showBags { + phase = 0; + positions[] = {"_target selectionPosition ['vhc_bags', 'FireGeometry', 'AveragePoint']"}; + items[] = {"B_Carryall_cbr"}; + name = "$STR_BACKPACK_CONTAINER_NAME"; + text = "$STR_BACKPACK_CONTAINER_NAME"; + }; + class showBags2: showBags { + positions[] = {"_target selectionPosition ['vhc_bags2', 'FireGeometry', 'AveragePoint']"}; + }; + }; + }; + + class APC_Tracked_01_base_F: Tank_F { + class GVAR(anims); + }; + class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F { + class GVAR(anims): GVAR(anims) { + class showBags { + phase = 0; + selections[] = {"vhc_bags"}; + positions[] = {"private _pos = _target selectionPosition 'vhc_bags'; _pos set [0, -(_pos select 0)]; _pos"}; // Mirror position to other side of vehicle + items[] = {"B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; + class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { + class GVAR(anims): GVAR(anims) { + class showBags: showBags { + items[] = {"B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr"}; + }; + }; + }; + + class APC_Tracked_02_base_F: Tank_F { + class GVAR(anims); + }; + class O_APC_Tracked_02_base_F: APC_Tracked_02_base_F {}; + class O_APC_Tracked_02_cannon_F: O_APC_Tracked_02_base_F { + class GVAR(anims): GVAR(anims) { + class showBags { + phase = 0; + selections[] = {"vhc_bags"}; + items[] = {"B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; + + class APC_Tracked_03_base_F: Tank_F { + class GVAR(anims) { + class showBags { + phase = 0; + selections[] = {"vhc_bags"}; + items[] = {"B_Carryall_cbr", "B_Carryall_cbr"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; + + class MBT_01_base_F: Tank_F { + class GVAR(anims); + }; + class B_MBT_01_base_F: MBT_01_base_F {}; + class B_MBT_01_cannon_F: B_MBT_01_base_F { + class GVAR(anims): GVAR(anims) { + class showBags { + phase = 0; + selections[] = {"vhc_bags"}; + items[] = {"B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr", "B_Carryall_cbr"}; + name = "$STR_a3_cfgvehicleclasses_backpacks0"; + text = "$STR_a3_cfgvehicleclasses_backpacks0"; + }; + }; + }; class Motorcycle: LandVehicle { class ACE_Actions { diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp index 554f9037047..23695702783 100644 --- a/addons/interaction/XEH_PREP.hpp +++ b/addons/interaction/XEH_PREP.hpp @@ -36,6 +36,8 @@ PREP(pullOutBody); PREP(canRenameGroup); PREP(renameGroupUI); PREP(renameGroup); +PREP(canGroupDropDistantUnits); +PREP(groupDropDistantUnits); // Weapon Attachments PREP(getWeaponAttachmentsActions); @@ -54,4 +56,5 @@ PREP(push); // misc PREP(canFlip); +PREP(initAnimActions); PREP(replaceTerrainObject); diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index f461e2a770e..dc1c167d7c1 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -149,11 +149,20 @@ GVAR(isOpeningDoor) = false; ["isNotOnLadder", {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "ACE_isLadder") != 1}] call EFUNC(common,addCanInteractWithCondition); ["CBA_settingsInitialized", { + TRACE_2("settingsInitialized",GVAR(disableNegativeRating),GVAR(enableAnimActions)); + if (GVAR(disableNegativeRating)) then { player addEventHandler ["HandleRating", { (_this select 1) max 0 }]; }; + + if (!GVAR(enableAnimActions)) exitWith {}; + + // Don't add inherited anim actions (but actions are added to child classes) + { + [_x, "InitPost", LINKFUNC(initAnimActions), true, [], true] call CBA_fnc_addClassEventHandler; + } forEach (keys (uiNamespace getVariable QGVAR(animActionsClasses))); }] call CBA_fnc_addEventHandler; { @@ -162,7 +171,6 @@ GVAR(isOpeningDoor) = false; }] call CBA_fnc_addPlayerEventHandler; } forEach ["loadout", "weapon"]; - // add "Take _weapon_" action to dropped weapons private _action = [ // action display name will be overwritten in modifier function diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf index c5873bcfc98..ec73b62b1b9 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -16,6 +16,7 @@ DFUNC(repair_Statement) = { // moved from config because of build problems }; if (hasInterface) then { + GVAR(initializedAnimClasses) = []; GVAR(replaceTerrainModels) = createHashMapFromArray call (uiNamespace getVariable QGVAR(cacheReplaceTerrainModels)); }; diff --git a/addons/interaction/XEH_preStart.sqf b/addons/interaction/XEH_preStart.sqf index 331b5c6d36c..39da54b3b58 100644 --- a/addons/interaction/XEH_preStart.sqf +++ b/addons/interaction/XEH_preStart.sqf @@ -23,3 +23,13 @@ private _cacheReplaceTerrainModels = createHashMap; } forEach _replaceTerrainClasses; uiNamespace setVariable [QGVAR(cacheReplaceTerrainModels), compileFinal str _cacheReplaceTerrainModels]; + + +// Cache classes with anim actions +private _animActionsClasses = (QUOTE(isClass (_x >> QQGVAR(anims)) && {!isClass (inheritsFrom _x >> QQGVAR(anims))}) configClasses (configFile >> "CfgVehicles")); +_animActionsClasses = _animActionsClasses apply { configName _x }; +_animActionsClasses = _animActionsClasses select { + private _class = _x; + (_animActionsClasses findIf {(_class != _x) && {_class isKindOf _x}}) == -1 // filter classes that already have a parent in the list +}; +uiNamespace setVariable [QGVAR(animActionsClasses), compileFinal (_animActionsClasses createHashMapFromArray [])]; diff --git a/addons/interaction/functions/fnc_canGroupDropDistantUnits.sqf b/addons/interaction/functions/fnc_canGroupDropDistantUnits.sqf new file mode 100644 index 00000000000..b13abc10392 --- /dev/null +++ b/addons/interaction/functions/fnc_canGroupDropDistantUnits.sqf @@ -0,0 +1,20 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror + * Checks if the unit can drop distant units from their group + * + * Arguments: + * 0: Unit + * + * Return Value: + * Unit can drop distant units + * + * Example: + * [player] call ace_interaction_fnc_canGroupDropDistantUnits + * + * Public: No + */ + +params ["_unit"]; + +(_unit == leader _unit) && {missionNamespace getVariable [QGVAR(groupDropUnitDistance), 100] > 0} diff --git a/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf b/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf index 2b8fbe43e9d..e91a027068c 100644 --- a/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf +++ b/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf @@ -44,7 +44,7 @@ params ["_unit"]; {}, {true}, { - params ["_unit", "", "_args"]; + params ["", "_unit", "_args"]; _args params ["_attachment", "_name", "_picture", "_weaponItems", "_currentWeapon"]; private _cfgWeapons = configFile >> "CfgWeapons"; @@ -110,10 +110,14 @@ params ["_unit"]; QGVAR(switch_) + _x, format ["%1: %2", localize "str_sensortype_switch", _modeName], getText (_config >> "picture"), - LINKFUNC(switchWeaponAttachment), + { + params ["", "_unit", "_actionParams"]; + _actionParams params ["_weapon", "_newAttachment", "_oldAttachment"]; + [_unit, _weapon, _oldAttachment, _newAttachment] call EFUNC(common,switchAttachmentMode); + }, {true}, {}, - [_currentWeapon, _x, ""] + [_currentWeapon, _x, _attachment] ] call EFUNC(interact_menu,createAction), [], _unit diff --git a/addons/interaction/functions/fnc_groupDropDistantUnits.sqf b/addons/interaction/functions/fnc_groupDropDistantUnits.sqf new file mode 100644 index 00000000000..40875b8580f --- /dev/null +++ b/addons/interaction/functions/fnc_groupDropDistantUnits.sqf @@ -0,0 +1,25 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror + * Drops distant units from their group + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [player] call ace_interaction_fnc_groupDropDistantUnits + * + * Public: No + */ + +params ["_unit"]; + +{ + if ((_x distance _unit) > (missionNamespace getVariable [QGVAR(groupDropUnitDistance), 100])) then { + TRACE_1("drop",_x); + [_x] joinSilent grpNull; + }; +} forEach (units group _unit); diff --git a/addons/interaction/functions/fnc_initAnimActions.sqf b/addons/interaction/functions/fnc_initAnimActions.sqf new file mode 100644 index 00000000000..fcd183cd75a --- /dev/null +++ b/addons/interaction/functions/fnc_initAnimActions.sqf @@ -0,0 +1,200 @@ +#include "..\script_component.hpp" +/* + * Author: Dystopian + * Initializes object interactions based on animations. + * + * Arguments: + * 0: Target + * + * Return Value: + * None + * + * Example: + * cursorObject call ace_interaction_fnc_initAnimActions + * + * Public: No + */ + +params ["_object"]; + +private _class = typeOf _object; + +if (_class in GVAR(initializedAnimClasses)) exitWith {}; + +GVAR(initializedAnimClasses) pushBack _class; + +private _statement = { + params ["_target", "_player", "_params"]; + _params params ["_anim", "_phase", "_duration", "_text"]; + TRACE_5("statement",_target,_player,_anim,_phase,_duration); + + [ + _duration, + [_target, _player, _anim, _phase], + { + (_this select 0) params ["_target", "_player", "_anim", "_phase"]; + + private _items = _target getVariable [ + format [QGVAR(animsItems_%1), _anim], + getArray (configOf _target >> QGVAR(anims) >> _anim >> "items") + ]; + + // If 1 object was spawned in, consider it a success + private _success = false; + + if (_items isNotEqualTo []) then { + if (_items isEqualType "") then { + _items = [_items]; + }; + + private _weaponHolder = objNull; + + { + private _type = (_x call EFUNC(common,getItemType)) select 0; + + if (_type == "") then { + private _emptyPosAGL = []; + + // This covers testing vehicle stability and finding a safe position + for "_i" from 1 to 3 do { + _emptyPosAGL = [_target, _x, _player] call EFUNC(common,findUnloadPosition); + + if (_emptyPosAGL isNotEqualTo []) exitWith {}; + }; + + // If still no valid position, try the next item + if (_emptyPosAGL isEqualTo []) then { + [LELSTRING(common,NoRoomToUnload)] call EFUNC(common,displayTextStructured); + + continue; + }; + + private _object = createVehicle [_x, _emptyPosAGL, [], 0, "CAN_COLLIDE"]; + + if (!isNull _object) then { + // Prevent items from taking damage when unloaded + [_object, "blockDamage", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + [EFUNC(common,statusEffect_set), [_object, "blockDamage", QUOTE(ADDON), false], 2] call CBA_fnc_waitAndExecute; + + _success = true; + } else { + WARNING_1("Failed to create object of type '%1'",_x); + }; + + continue; + }; + + // Functions/code below are guaranteed to spawn in objects + _success = true; + + // getItemType considers backpacks as weapons, so handle them first + if (getNumber (configFile >> "CfgVehicles" >> _x >> "isBackpack") == 1) then { + if (backpack _player == "") then { + _player addBackpackGlobal _x; + } else { + if (isNull _weaponHolder) then { + _weaponHolder = nearestObject [_player, "WeaponHolder"]; + + if (isNull _weaponHolder || {_player distance _weaponHolder > 2}) then { + _weaponHolder = createVehicle ["GroundWeaponHolder", [0, 0, 0], [], 0, "NONE"]; + _weaponHolder setPosASL getPosASL _player; + }; + }; + + _weaponHolder addBackpackCargoGlobal [_x, 1]; + }; + + continue; + }; + + switch (_type) do { + case "weapon": { + [_player, _x, true] call CBA_fnc_addWeapon; + }; + case "item": { + [_player, _x, true] call CBA_fnc_addItem; + }; + case "magazine": { + [_player, _x, -1, true] call CBA_fnc_addMagazine; + }; + }; + } forEach _items; + }; + + if (!_success) exitWith {}; + + _target animate [_anim, _phase, true]; + }, + {}, + _text, + { + (_this select 0) params ["_target", "", "_anim", "_phase"]; + + _target animationPhase _anim != _phase + }, + ["isNotSwimming"] + ] call EFUNC(common,progressBar); +}; + +private _condition = { + params ["_target", "_player", "_params"]; + _params params ["_anim", "_phase"]; + + _target animationPhase _anim != _phase + && {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} +}; + +private _config = configOf _object; + +{ + private _animConfig = _x; + private _anim = configName _animConfig; + + private _animationSourcesConfig = _config >> "AnimationSources" >> _anim; + + if !( + isClass _animationSourcesConfig // anim exist + && {0 != [_animationSourcesConfig >> "scope", "NUMBER", 1] call CBA_fnc_getConfigEntry} // anim not hidden + && {isNumber (_animationSourcesConfig >> "initPhase")} // anim correct (some CUP anims are inherited and cleared) + && {0 != [_animConfig >> "enabled", "NUMBER", 1] call CBA_fnc_getConfigEntry} // anim enabled + ) then {continue}; + + private _positions = []; + { + if (_x isEqualType "") then { + _positions pushBack compile _x; + } else { + _positions pushBack _x; + }; + } forEach getArray (_animConfig >> "positions"); + + _positions append getArray (_animConfig >> "selections"); + + if (_positions isEqualTo []) then { + ERROR_2("No action position for _class %1 anim %2",_class,_anim); + continue; + }; + + private _phase = [_animConfig >> "phase", "NUMBER", 1] call CBA_fnc_getConfigEntry; + private _name = [_animConfig >> "name", "TEXT", localize "str_a3_cfgactions_unmountitem0"] call CBA_fnc_getConfigEntry; + private _icon = [_animConfig >> "icon", "TEXT", "\A3\ui_f\data\igui\cfg\actions\take_ca.paa"] call CBA_fnc_getConfigEntry; + private _duration = [_animConfig >> "duration", "NUMBER", 10] call CBA_fnc_getConfigEntry; + private _text = getText (_animConfig >> "text"); + private _distance = [_animConfig >> "distance", "NUMBER", 2] call CBA_fnc_getConfigEntry; + + { + private _action = [ + format [QGVAR(anim_%1_%2), _anim, _forEachIndex], + _name, + _icon, + _statement, + _condition, + {}, + [_anim, _phase, _duration, _text], + _x, + _distance + ] call EFUNC(interact_menu,createAction); + [_class, 0, [], _action] call EFUNC(interact_menu,addActionToClass); + TRACE_3("add anim",_class,_anim,_x); + } forEach _positions; +} forEach configProperties [_config >> QGVAR(anims), "isClass _x"]; diff --git a/addons/interaction/functions/fnc_switchWeaponAttachment.sqf b/addons/interaction/functions/fnc_switchWeaponAttachment.sqf index aaefb3315ed..6fede349624 100644 --- a/addons/interaction/functions/fnc_switchWeaponAttachment.sqf +++ b/addons/interaction/functions/fnc_switchWeaponAttachment.sqf @@ -4,9 +4,12 @@ * Switches weapon attachment. * * Arguments: - * 0: Target - * 1: Player (not used) + * 0: Target (not used) + * 1: Player * 2: Action params + * - 0: Weapon + * - 1: New Attachment + * - 2: Old Attachment * * Return Value: * None @@ -17,11 +20,13 @@ * Public: No */ -params ["_unit", "", "_actionParams"]; +params ["", "_unit", "_actionParams"]; _actionParams params ["_weapon", "_newAttachment", "_oldAttachment"]; TRACE_3("Switching attachment",_weapon,_newAttachment,_oldAttachment); -[_unit, "Gear"] call EFUNC(common,doGesture); +private _currWeaponType = [_unit, _weapon] call EFUNC(common,getWeaponIndex); + +if (_currWeaponType == -1) exitWith {}; private _addNew = _newAttachment isNotEqualTo ""; private _removeOld = _oldAttachment isNotEqualTo ""; @@ -38,22 +43,33 @@ if (_removeOld && {!([_unit, _oldAttachment] call CBA_fnc_canAddItem)}) exitWith }; }; +[_unit, "Gear"] call EFUNC(common,doGesture); + if (_removeOld) then { [{ - params ["_unit", "_weapon", "_oldAttachment"]; - switch (_weapon) do { - case (primaryWeapon _unit): {_unit removePrimaryWeaponItem _oldAttachment;}; - case (handgunWeapon _unit): {_unit removeHandgunItem _oldAttachment;}; - default {_unit removeSecondaryWeaponItem _oldAttachment;}; + params ["_unit", "_currWeaponType", "_oldAttachment"]; + + switch (_currWeaponType) do { + case 0: {_unit removePrimaryWeaponItem _oldAttachment}; + case 1: {_unit removeSecondaryWeaponItem _oldAttachment}; + case 2: {_unit removeHandgunItem _oldAttachment}; + default {}; }; + _unit addItem _oldAttachment; - }, [_unit, _weapon, _oldAttachment], 0.3] call CBA_fnc_waitAndExecute; + }, [_unit, _currWeaponType, _oldAttachment], 0.3] call CBA_fnc_waitAndExecute; }; if (!_addNew) exitWith {}; [{ params ["_unit", "_weapon", "_newAttachment"]; + _unit addWeaponItem [_weapon, _newAttachment]; + + if (_unit != ACE_player) exitWith {}; + [[getText (configFile >> "CfgWeapons" >> _newAttachment >> "picture"), 4], true] call CBA_fnc_notify; + + playSound "click"; }, [_unit, _weapon, _newAttachment], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/interaction/initSettings.inc.sqf b/addons/interaction/initSettings.inc.sqf index 2cefb162a76..4adc5a6dafd 100644 --- a/addons/interaction/initSettings.inc.sqf +++ b/addons/interaction/initSettings.inc.sqf @@ -38,6 +38,16 @@ true ] call CBA_fnc_addSetting; +[ + QGVAR(enableAnimActions), "CHECKBOX", + LSTRING(SettingAnimActionsName), + format ["ACE %1", LLSTRING(DisplayName)], + true, + true, + {[QGVAR(enableAnimActions), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart +] call CBA_fnc_addSetting; + [ QGVAR(interactWithTerrainObjects), "CHECKBOX", ["str_a3_modules_moduleomquest_defend_f_attributes_useterrainobject0", LSTRING(interactWithTerrainObjects_Description)], diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 5b79a69e69b..f9bf842bd97 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -582,6 +582,9 @@ 小隊管理 Takım Yönetimi + + Drop Distant Members + Red Rot @@ -1324,5 +1327,10 @@ Advertencia: puede provocar que algunos objetos choquen con otros. Aviso: pode causar que alguns objetos colidam com outros. + + Interaction with animations + Взаимодействие с анимациями + Interaction avec les animations + diff --git a/addons/irlight/XEH_PREP.hpp b/addons/irlight/XEH_PREP.hpp index db1a29d22e1..83c619aab87 100644 --- a/addons/irlight/XEH_PREP.hpp +++ b/addons/irlight/XEH_PREP.hpp @@ -1,3 +1 @@ -PREP(getGlowOffset); PREP(initItemContextMenu); -PREP(onLightToggled); diff --git a/addons/irlight/XEH_postInit.sqf b/addons/irlight/XEH_postInit.sqf index d95186f07bb..77b98936c19 100644 --- a/addons/irlight/XEH_postInit.sqf +++ b/addons/irlight/XEH_postInit.sqf @@ -1,30 +1,27 @@ #include "script_component.hpp" -[] call FUNC(initItemContextMenu); - -addUserActionEventHandler ["headlights", "Deactivate", LINKFUNC(onLightToggled)]; +call FUNC(initItemContextMenu); ["ACE3 Equipment", QGVAR(hold), LLSTRING(MomentarySwitch), { - ACE_player action ["GunLightOn", ACE_player]; - ACE_player action ["IRLaserOn", ACE_player]; - [] call FUNC(onLightToggled); + if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {}; + + // Save current weapon state to reapply later + private _weaponState = (weaponState ACE_player) select [0, 3]; + + action ["GunLightOn", ACE_player]; + action ["IRLaserOn", ACE_player]; + + ACE_player selectWeapon _weaponState; + true }, { - ACE_player action ["GunLightOff", ACE_player]; - ACE_player action ["IRLaserOff", ACE_player]; - [] call FUNC(onLightToggled); - true -}] call CBA_fnc_addKeybind; + if !(ACE_player call CBA_fnc_canUseWeapon) exitWith {}; + + // Save current weapon state to reapply later + private _weaponState = (weaponState ACE_player) select [0, 3]; -["CBA_attachmentSwitched", { - params ["", "", "_item"]; - - private _substr = _item select [0, 8]; - if ( - ACE_player getVariable [QGVAR(isTurnedOn), false] - && {_substr == "ACE_SPIR" || {_substr == "ACE_DBAL"}} - ) then { - ACE_player action ["GunLightOn", ACE_player]; - ACE_player action ["IRLaserOn", ACE_player]; - }; -}] call CBA_fnc_addEventHandler; + action ["GunLightOff", ACE_player]; + action ["IRLaserOff", ACE_player]; + + ACE_player selectWeapon _weaponState; +}] call CBA_fnc_addKeybind; diff --git a/addons/irlight/functions/fnc_getGlowOffset.sqf b/addons/irlight/functions/fnc_getGlowOffset.sqf deleted file mode 100644 index 613e551111c..00000000000 --- a/addons/irlight/functions/fnc_getGlowOffset.sqf +++ /dev/null @@ -1,41 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: BaerMitUmlaut - * Gets the player model offset of the IR laser origin. - * Currently unused, see onLightToggled. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_irlight_fnc_getGlowOffset - * - * Public: No - */ - -if (isNil QGVAR(offsetCache)) then { - GVAR(offsetCache) = createHashMap; -}; - -private _weapon = currentWeapon ACE_player; -private _laser = ((weaponsItems ACE_player) select {_x#0 == _weapon})#0#2; - -GVAR(offsetCache) getOrDefaultCall [[_weapon, _laser], { - private _model = getText (configFile >> "CfgWeapons" >> _weapon >> "model"); - private _dummy = createSimpleObject [_model, [0, 0, 0], true]; - private _proxyOffset = _dummy selectionPosition ["\a3\data_f\proxies\weapon_slots\SIDE.001", 1]; - _proxyOffset = [_proxyOffset#1, _proxyOffset#0 * -1, _proxyOffset#2]; - deleteVehicle _dummy; - - _model = getText (configFile >> "CfgWeapons" >> _laser >> "model"); - _dummy = createSimpleObject [_model, [0, 0, 0], true]; - private _selection = getText (configFile >> "CfgWeapons" >> _laser >> "ItemInfo" >> "Pointer" >> "irLaserPos"); - private _laserOffset = _dummy selectionPosition [_selection, "Memory"]; - _laserOffset = [_laserOffset#1, _laserOffset#0 * -1, _laserOffset#2 * -1]; - deleteVehicle _dummy; - - _proxyOffset vectorAdd _laserOffset -}, true]; diff --git a/addons/irlight/functions/fnc_initItemContextMenu.sqf b/addons/irlight/functions/fnc_initItemContextMenu.sqf index fa75eba77be..75a9508b180 100644 --- a/addons/irlight/functions/fnc_initItemContextMenu.sqf +++ b/addons/irlight/functions/fnc_initItemContextMenu.sqf @@ -10,7 +10,7 @@ * None * * Example: - * [] call ace_irlight_fnc_initItemContextMenu + * call ace_irlight_fnc_initItemContextMenu * * Public: No */ @@ -19,30 +19,34 @@ _x params ["_variant", "_displayName"]; [ - "ACE_DBAL_A3_Red", "POINTER", _displayName, [], "", { + "ACE_DBAL_A3_Red", + "POINTER", + _displayName, + [], + "", + { params ["", "", "_item", "", "_variant"]; private _baseClass = getText (configFile >> "CfgWeapons" >> _item >> "baseWeapon"); _item != _baseClass + _variant }, { - params ["", "", "_item", "", "_variant"]; + params ["_unit", "", "_item", "_slot", "_variant"]; - private _baseClass = getText (configFile >> "CfgWeapons" >> _item >> "baseWeapon"); + private _weapon = switch (_slot) do { + case "RIFLE_POINTER": {primaryWeapon _unit}; + case "LAUNCHER_POINTER": {secondaryWeapon _unit}; + case "PISTOL_POINTER": {handgunWeapon _unit}; + default {""}; + }; - ACE_player removePrimaryWeaponItem _item; - ACE_player addPrimaryWeaponItem (_baseClass + _variant); - playSound "click"; + if (_weapon == "") exitWith {}; - if (_turnedOn) then { - // Force update of flashlight - ACE_player action ["GunLightOff", ACE_player]; + private _baseClass = getText (configFile >> "CfgWeapons" >> _item >> "baseWeapon"); - { - ACE_player action ["GunLightOn", ACE_player]; - ACE_player action ["IRLaserOn", ACE_player]; - } call CBA_fnc_execNextFrame; - }; - }, false, _variant + [_unit, _weapon, _item, _baseClass + _variant] call EFUNC(common,switchAttachmentMode); + }, + false, + _variant ] call CBA_fnc_addItemContextMenuOption; } forEach [ ["", LSTRING(Mode_IRDual)], diff --git a/addons/irlight/functions/fnc_onLightToggled.sqf b/addons/irlight/functions/fnc_onLightToggled.sqf deleted file mode 100644 index b3592f28f60..00000000000 --- a/addons/irlight/functions/fnc_onLightToggled.sqf +++ /dev/null @@ -1,36 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: BaerMitUmlaut - * Handles toggling flashlights on and off. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * [] call ace_irlight_fnc_onLightToggled - * - * Public: No - */ - -private _isTurnedOn = ACE_player isFlashlightOn primaryWeapon ACE_player - || ACE_player isIRLaserOn primaryWeapon ACE_player; -ACE_player setVariable [QGVAR(isTurnedOn), _isTurnedOn]; - -// This is a surprise tool that will help us later -// Requires: https://feedback.bistudio.com/T170774 -/* -deleteVehicle (ACE_player getVariable [QGVAR(glow), objNull]); - -if (ACE_player isIRLaserOn currentWeapon ACE_player) then { - private _offset = [] call FUNC(getGlowOffset); - private _glow = createSimpleObject [QPATHTOF(data\irglow.p3d), [0, 0, 0]]; - _glow attachTo [ACE_player, _offset, "proxy:\a3\characters_f\proxies\weapon.001", true]; - _glow setObjectTexture [0, "#(rgb,8,8,3)color(0.35,0,0.38,0.1)"]; - _glow setObjectScale 0.1; - - ACE_player setVariable [QGVAR(glow), _glow]; -}; -*/ diff --git a/addons/kestrel4500/config.cpp b/addons/kestrel4500/config.cpp index 5ea15f07ffe..fc339ccf6b0 100644 --- a/addons/kestrel4500/config.cpp +++ b/addons/kestrel4500/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {"ACE_Item_Kestrel4500"}; weapons[] = {"ACE_Kestrel4500"}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ACE_common", "ACE_weather"}; + requiredAddons[] = {"ace_common", "ace_weather"}; author = ECSTRING(common,ACETeam); authors[] = {ECSTRING(common,ACETeam), "Ruthberg"}; url = ECSTRING(main,URL); diff --git a/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf index 9ecbca180cc..756a5418a49 100644 --- a/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf +++ b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf @@ -15,7 +15,7 @@ * Public: No */ -private _playerDir = getDir ACE_player; +private _playerDir = (ACE_player call CBA_fnc_headDir) select 0; private _windSpeed = vectorMagnitude wind; private _windDir = (wind select 0) atan2 (wind select 1); if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { diff --git a/addons/killtracker/stringtable.xml b/addons/killtracker/stringtable.xml index 64b9ee764d4..9ab1423f1f5 100644 --- a/addons/killtracker/stringtable.xml +++ b/addons/killtracker/stringtable.xml @@ -126,6 +126,7 @@ Mostra uccisioni del veicolo a membri dell'equipaggio 車両でのキルを乗員全員に表示する 다른 승무원에게 차량 처치 표시 + Montrer les véhicules tués aux membres de l'équipage Show kills from a vehicle to driver, gunner and commander @@ -134,6 +135,7 @@ Mostra uccisioni del veicolo al pilota, artigliere e comandante 車両でのキルを操縦手、砲手、車長で共有して表示する 차량 처치를 운전수, 사수, 지휘관에게 보여줍니다 + Montrer les véhicules tués au pilote, à l'artilleur et au commandant. diff --git a/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf b/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf index d6d8f3b827c..2c32ec57276 100644 --- a/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf @@ -18,6 +18,9 @@ params ["_unit", "_magazine"]; +// Exit if repack is disabled for this magazine. +if (getNumber (configFile >> "CfgMagazines" >> _magazine >> "ace_disableRepacking") == 1) exitWith {false}; + private _maxAmmoCount = getNumber (configFile >> "CfgMagazines" >> _magazine >> "count"); { diff --git a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf index b4cf8b16ef6..09d6974fefe 100644 --- a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf +++ b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: PabstMirror, commy2, esteldunedain, Ruthberg - * Gets magazine children for interaciton menu. + * Gets magazine children for interaction menu. * * Arguments: * 0: Target @@ -18,16 +18,20 @@ params ["_target", "_player"]; +private _cfgMagazines = configFile >> "CfgMagazines"; + // get all mags and ammo count private _unitMagazines = []; private _unitMagCounts = []; { _x params ["_xClassname", "_xCount", "_xLoaded", "_xType"]; - private _xFullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _xClassname >> "count"); + private _configMagazine = _cfgMagazines >> _xClassname; + private _xFullMagazineCount = getNumber (_configMagazine >> "count"); + private _isRepackDisabled = getNumber (_configMagazine >> "ace_disableRepacking") == 1; //for every partial magazine, that is either in inventory or can be moved there - if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {GVAR(repackLoadedMagazines) && {[_player, _xClassname] call CBA_fnc_canAddItem}}}) then { + if ((!_isRepackDisabled) && {_xCount < _xFullMagazineCount} && {_xCount > 0} && {(!_xLoaded) || {GVAR(repackLoadedMagazines) && {[_player, _xClassname] call CBA_fnc_canAddItem}}}) then { private _index = _unitMagazines find _xClassname; if (_index == -1) then { _unitMagazines pushBack _xClassname; diff --git a/addons/medical/dev/test_hitpointConfigs.sqf b/addons/medical/dev/test_hitpointConfigs.sqf index 7bdeb189c23..ff1c3a95b7d 100644 --- a/addons/medical/dev/test_hitpointConfigs.sqf +++ b/addons/medical/dev/test_hitpointConfigs.sqf @@ -10,7 +10,11 @@ private _cfgWeapons = configFile >> "CfgWeapons"; private _cfgVehicles = configFile >> "CfgVehicles"; private _uniforms = "getNumber (_x >> 'scope') == 2 && {configName _x isKindOf ['Uniform_Base', _cfgWeapons]}" configClasses _cfgWeapons; -private _units = _uniforms apply {_cfgVehicles >> getText (_x >> "ItemInfo" >> "uniformClass")}; +private _units = _uniforms apply { + private _unitCfg = _cfgVehicles >> getText (_x >> "ItemInfo" >> "uniformClass"); + if (isNull _unitCfg) then { WARNING_2("%1 has invalid uniformClass %2",configName _x,getText (_x >> "ItemInfo" >> "uniformClass")) }; + _unitCfg +}; if (param [0, false]) then { // Check all units (if naked) INFO("checking ALL units"); _units append ((configProperties [configFile >> "CfgVehicles", "(isClass _x) && {(getNumber (_x >> 'scope')) == 2} && {configName _x isKindOf 'CAManBase'}", true])); @@ -21,6 +25,7 @@ INFO_1("Checking uniforms for correct medical hitpoints [%1 units]",count _units private _testPass = true; { private _typeOf = configName _x; + if (_typeOf == "") then { continue }; private _hitpoints = (configProperties [_x >> "HitPoints", "isClass _x", true]) apply {toLowerANSI configName _x}; private _expectedHitPoints = ["hitleftarm","hitrightarm","hitleftleg","hitrightleg","hithead","hitbody"]; private _missingHitPoints = _expectedHitPoints select {!(_x in _hitpoints)}; diff --git a/addons/medical_ai/XEH_PREP.hpp b/addons/medical_ai/XEH_PREP.hpp index de4ac3c38a3..3cf2b3e2441 100644 --- a/addons/medical_ai/XEH_PREP.hpp +++ b/addons/medical_ai/XEH_PREP.hpp @@ -1,3 +1,4 @@ +PREP(addHealingCommandActions); PREP(canRequestMedic); PREP(healingLogic); PREP(healSelf); diff --git a/addons/medical_ai/XEH_postInit.sqf b/addons/medical_ai/XEH_postInit.sqf index 248c6341569..9ddd8273fdf 100644 --- a/addons/medical_ai/XEH_postInit.sqf +++ b/addons/medical_ai/XEH_postInit.sqf @@ -20,6 +20,9 @@ _unit setVariable [QGVAR(lastSuppressed), CBA_missionTime]; }] call CBA_fnc_addClassEventHandler; + // Add command actions to command AI medics to treat other units + call FUNC(addHealingCommandActions); + if (GVAR(requireItems) == 2) then { ["CAManBase", "InitPost", { [{ diff --git a/addons/medical_ai/XEH_preStart.sqf b/addons/medical_ai/XEH_preStart.sqf index b4d795cbbf6..ccb92538b74 100644 --- a/addons/medical_ai/XEH_preStart.sqf +++ b/addons/medical_ai/XEH_preStart.sqf @@ -20,6 +20,7 @@ private _itemHash = createHashMap; } forEach [ ["@bandage", ["FieldDressing", "PackingBandage", "ElasticBandage", "QuikClot"]], ["@iv", ["SalineIV", "SalineIV_500", "SalineIV_250", "BloodIV", "BloodIV_500", "BloodIV_250", "PlasmaIV", "PlasmaIV_500", "PlasmaIV_250"]], + ["tourniquet", ["ApplyTourniquet"]], ["splint", ["splint"]], ["morphine", ["morphine"]], ["epinephrine", ["epinephrine"]] diff --git a/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf b/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf new file mode 100644 index 00000000000..cc91ca7eb3c --- /dev/null +++ b/addons/medical_ai/functions/fnc_addHealingCommandActions.sqf @@ -0,0 +1,88 @@ +#include "..\script_component.hpp" +/* + * Author: johnb43 + * Adds ACE actions for the player to command medics to heal injured units. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * call ace_medical_ai_fnc_addHealingCommandActions + * + * Public: No + */ + +if (!hasInterface) exitWith {}; + +private _action = [ + QGVAR(heal), + localize "STR_A3_Task180_name", + "", + {}, + {_player == leader _player}, + { + private _units = units _player; + + (_units select {_x call EFUNC(common,isAwake) && {_x call EFUNC(medical_treatment,isMedic)} && {!(_x call EFUNC(common,isPlayer))}}) apply { + [ + [ + QGVAR(medicHeal_) + str _x, + format ["%1: (%2)", [_x, false, true] call EFUNC(common,getName), groupID _x], + "", + {}, + {true}, + { + (_this select 2) params ["_healer", "_units"]; + + (_units select {_x call FUNC(isInjured)}) apply { + [ + [ + QGVAR(healUnit_) + str _x, + format [localize "str_action_heal_soldier", ([_x, false, true] call EFUNC(common,getName)) + " (" + str groupID _x + ")"], + "", + { + (_this select 2) params ["_healer", "_target"]; + + private _assignedMedic = _target getVariable [QGVAR(assignedMedic), objNull]; + + // Remove from previous medic's queue + if (!isNull _assignedMedic && {_healer != _assignedMedic}) then { + private _healQueue = _assignedMedic getVariable [QGVAR(healQueue), []]; + + _healQueue deleteAt (_healQueue find _target); + + _assignedMedic setVariable [QGVAR(healQueue), _healQueue]; + }; + + _target setVariable [QGVAR(assignedMedic), _healer]; + + // Add to new medic + private _healQueue = _healer getVariable [QGVAR(healQueue), []]; + + _healQueue deleteAt (_healQueue find _target); + _healQueue insert [0, [_target]]; + + _healer setVariable [QGVAR(healQueue), _healQueue]; + }, + {true}, + {}, + [_healer, _x] + ] call EFUNC(interact_menu,createAction), + [], + _x + ] + }; + }, + [_x, _units] + ] call EFUNC(interact_menu,createAction), + [], + _x + ] + }; + } +] call EFUNC(interact_menu,createAction); + +["CAManBase", 1, ["ACE_SelfActions"], _action, true] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/medical_ai/functions/fnc_healUnit.sqf b/addons/medical_ai/functions/fnc_healUnit.sqf index 3635088820e..6d94749d1f9 100644 --- a/addons/medical_ai/functions/fnc_healUnit.sqf +++ b/addons/medical_ai/functions/fnc_healUnit.sqf @@ -27,7 +27,13 @@ private _healQueue = _this getVariable [QGVAR(healQueue), []]; private _target = _healQueue param [0, objNull]; // If unit died or was healed, be lazy and wait for the next tick -if (!alive _target || {!(_target call FUNC(isInjured))}) exitWith { +// If the unit can't be healed, go to the next unit to be healed +if (!alive _target || {!(_target call FUNC(isInjured))} || { + private _treatmentEvent = (_this getVariable [QGVAR(currentTreatment), []]) param [2, ""]; + + // Target still needs healing, but the healer doesn't have the required items (only happens if GVAR(requireItems) != 0) or needs to wait + (_treatmentEvent select [0, 6]) == "#needs" +}) exitWith { _this forceSpeed -1; _target forceSpeed -1; _healQueue deleteAt 0; @@ -47,6 +53,10 @@ if (_this distance _target > 2.5) exitWith { _this setVariable [QGVAR(currentTreatment), nil]; if (CBA_missionTime >= (_this getVariable [QGVAR(nextMoveOrder), CBA_missionTime])) then { _this setVariable [QGVAR(nextMoveOrder), CBA_missionTime + 10]; + + // Medic, when doing a lot of treatment, moves away from injured over time (because of animations) + // Need to allow the medic to move back to the injured again + _this forceSpeed -1; _this doMove getPosATL _target; #ifdef DEBUG_MODE_FULL systemChat format ["%1 moving to %2", _this, _target]; diff --git a/addons/medical_ai/functions/fnc_healingLogic.sqf b/addons/medical_ai/functions/fnc_healingLogic.sqf index a007b83e4c1..9c7ce1c847f 100644 --- a/addons/medical_ai/functions/fnc_healingLogic.sqf +++ b/addons/medical_ai/functions/fnc_healingLogic.sqf @@ -1,7 +1,9 @@ #include "..\script_component.hpp" /* - * Author: BaerMitUmlaut, PabstMirror + * Author: BaerMitUmlaut, PabstMirror, johnb43 * Applies healing to target. + * States that contain "needs" are states in which the medic is blocked, either temporairly (HR too high/low) or until resupplied, from treating. + * States that contain "wait" are states where the medic waits temporairly before continuing treatment. * * Arguments: * 0: Healer @@ -16,9 +18,6 @@ * Public: No */ -// TODO: Add AI tourniquet behaviour -// For now, AI handle player or otherwise scripted tourniquets only - params ["_healer", "_target"]; (_healer getVariable [QGVAR(currentTreatment), [-1]]) params ["_finishTime", "_treatmentTarget", "_treatmentEvent", "_treatmentArgs", "_treatmentItem"]; @@ -27,14 +26,58 @@ if (_finishTime > 0) exitWith { if (CBA_missionTime >= _finishTime) then { TRACE_5("treatment finished",_finishTime,_treatmentTarget,_treatmentEvent,_treatmentArgs,_treatmentItem); _healer setVariable [QGVAR(currentTreatment), nil]; + + private _usedItem = ""; + if ((GVAR(requireItems) > 0) && {_treatmentItem != ""}) then { ([_healer, _treatmentItem] call FUNC(itemCheck)) params ["_itemOk", "_itemClassname", "_treatmentClass"]; - if (!_itemOk) exitWith { _treatmentEvent = "#fail"; }; // no item after delay + // No item after treatment done + if (!_itemOk) exitWith { + _treatmentEvent = "#fail"; + }; + _healer removeItem _itemClassname; - if (_treatmentClass != "") then { _treatmentArgs set [2, _treatmentClass]; }; + _usedItem = _itemClassname; + + if (_treatmentClass != "") then { + _treatmentArgs set [2, _treatmentClass]; + }; }; if ((_treatmentTarget == _target) && {(_treatmentEvent select [0, 1]) != "#"}) then { + // There is no event for tourniquet removal, so handle calling function directly + if (_treatmentEvent == QGVAR(tourniquetRemove)) exitWith { + _treatmentArgs call EFUNC(medical_treatment,tourniquetRemove); + }; + [_treatmentEvent, _treatmentArgs, _target] call CBA_fnc_targetEvent; + + // Splints are already logged on their own + switch (_treatmentEvent) do { + case QEGVAR(medical_treatment,bandageLocal): { + [_target, "activity", ELSTRING(medical_treatment,Activity_bandagedPatient), [[_healer, false, true] call EFUNC(common,getName)]] call EFUNC(medical_treatment,addToLog); + }; + case QEGVAR(medical_treatment,ivBagLocal): { + if (_usedItem == "") then { + _usedItem = "ACE_salineIV"; + }; + + [_target, _usedItem] call EFUNC(medical_treatment,addToTriageCard); + [_target, "activity", ELSTRING(medical_treatment,Activity_gaveIV), [[_healer, false, true] call EFUNC(common,getName)]] call EFUNC(medical_treatment,addToLog); + }; + case QEGVAR(medical_treatment,medicationLocal): { + if (_usedItem == "") then { + _usedItem = ["ACE_epinephrine", "ACE_morphine"] select (_treatmentArgs select 2 == "Morphine"); + }; + + [_target, _usedItem] call EFUNC(medical_treatment,addToTriageCard); + [_target, "activity", ELSTRING(medical_treatment,Activity_usedItem), [[_healer, false, true] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call EFUNC(medical_treatment,addToLog); + }; + case QEGVAR(medical_treatment,tourniquetLocal): { + [_target, "ACE_tourniquet"] call EFUNC(medical_treatment,addToTriageCard); + [_target, "activity", ELSTRING(medical_treatment,Activity_appliedTourniquet), [[_healer, false, true] call EFUNC(common,getName)]] call EFUNC(medical_treatment,addToLog); + }; + }; + #ifdef DEBUG_MODE_FULL INFO_4("%1->%2: %3 - %4",_healer,_target,_treatmentEvent,_treatmentArgs); systemChat format ["Applying [%1->%2]: %3", _healer, _treatmentTarget, _treatmentEvent]; @@ -43,64 +86,164 @@ if (_finishTime > 0) exitWith { }; }; -// Find a suitable limb (no tourniquets) for injecting and giving IVs +// Bandage a limb up, then remove the tourniquet on it +private _fnc_removeTourniquet = { + params [["_removeAllTourniquets", false]]; + + // Ignore head & torso if not removing all tourniquets (= administering drugs/IVs) + private _offset = [2, 0] select _removeAllTourniquets; + + // Bandage the least bleeding body part + private _bodyPartBleeding = []; + _bodyPartBleeding resize [[4, 6] select _removeAllTourniquets, -1]; + + { + // Ignore head and torso, if only looking for place to administer drugs/IVs + private _partIndex = (ALL_BODY_PARTS find _x) - _offset; + + if (_partIndex >= 0 && {_tourniquets select _partIndex != 0}) then { + { + _x params ["", "_amountOf", "_bleeding"]; + + // max 0, to set the baseline to 0, as body parts with no wounds are marked with -1 + _bodyPartBleeding set [_partIndex, ((_bodyPartBleeding select _partIndex) max 0) + (_amountOf * _bleeding)]; + } forEach _y; + }; + } forEach GET_OPEN_WOUNDS(_target); + + // If there are no open wounds, check if there are tourniquets on limbs with no open wounds (stitched or fully healed), + // as we know there have to be tourniquets at this point + if (_bodyPartBleeding findIf {_x != -1} == -1) then { + _bodyPartBleeding set [_tourniquets findIf {_x != 0}, 0]; + }; + + // Ignore body parts that don't have open wounds (-1) + private _minBodyPartBleeding = selectMin (_bodyPartBleeding select {_x != -1}); + private _selection = ALL_BODY_PARTS select ((_bodyPartBleeding find _minBodyPartBleeding) + _offset); + + // If not bleeding anymore, remove the tourniquet + if (_minBodyPartBleeding == 0) exitWith { + _treatmentEvent = QGVAR(tourniquetRemove); + _treatmentTime = 7; + _treatmentArgs = [_healer, _target, _selection]; + }; + + // If no bandages available, wait + // If check is done at the start of the scope, it will miss the edge case where the unit ran out of bandages just as they finished bandaging tourniqueted body part + if !(([_healer, "@bandage"] call FUNC(itemCheck)) # 0) exitWith { + _treatmentEvent = "#needsBandage"; + }; + + // Otherwise keep bandaging + _treatmentEvent = QEGVAR(medical_treatment,bandageLocal); + _treatmentTime = 5; + _treatmentArgs = [_target, _selection, "FieldDressing"]; + _treatmentItem = "@bandage"; +}; + +// Find a suitable limb (no tourniquets) for adminstering drugs/IVs private _fnc_findNoTourniquet = { private _bodyPart = ""; - private _bodyParts = ["leftarm", "rightarm", "leftleg", "rightleg"]; - private _bodyPartsSaved = +_bodyParts; - while {_bodyParts isNotEqualTo []} do { - _bodyPart = selectRandom _bodyParts; + // If all limbs have tourniquets, find the least damaged limb and try to bandage it + if ((_tourniquets select [2]) find 0 == -1) then { + call _fnc_removeTourniquet; + } else { + // Select a random non-tourniqueted limb otherwise + private _bodyParts = ["leftarm", "rightarm", "leftleg", "rightleg"]; - // If no tourniquet on, use that body part - if (_tourniquets select (ALL_BODY_PARTS find _bodyPart) == 0) exitWith {}; + while {_bodyParts isNotEqualTo []} do { + _bodyPart = selectRandom _bodyParts; - _bodyParts deleteAt (_bodyParts find _bodyPart); - }; + // If no tourniquet on, use that body part + if (_tourniquets select (ALL_BODY_PARTS find _bodyPart) == 0) exitWith {}; - // If all limbs have tourniquets, use random limb - if (_bodyPart == "") then { - _bodyPart = selectRandom _bodyPartsSaved; + _bodyParts deleteAt (_bodyParts find _bodyPart); + }; }; - _bodyPart + _bodyPart // return }; -private _isMedic = [_healer] call EFUNC(medical_treatment,isMedic); -private _heartRate = GET_HEART_RATE(_target); -private _fractures = GET_FRACTURES(_target); private _tourniquets = GET_TOURNIQUETS(_target); private _treatmentEvent = "#none"; private _treatmentArgs = []; private _treatmentTime = 6; private _treatmentItem = ""; -switch (true) do { - case ((GET_WOUND_BLEEDING(_target) > 0) - && {([_healer, "@bandage"] call FUNC(itemCheck)) # 0}): { - // Select first bleeding wound and bandage it - private _selection = "?"; + +if (true) then { + if (IS_BLEEDING(_target)) exitWith { + private _hasBandage = ([_healer, "@bandage"] call FUNC(itemCheck)) # 0; + private _hasTourniquet = ([_healer, "tourniquet"] call FUNC(itemCheck)) # 0; + + // Patient is not worth treating if bloodloss can't be stopped + if !(_hasBandage || _hasTourniquet) exitWith { + _treatmentEvent = "#needsBandageOrTourniquet"; + }; + + // Bandage the heaviest bleeding body part + private _bodyPartBleeding = [0, 0, 0, 0, 0, 0]; + { + private _partIndex = ALL_BODY_PARTS find _x; + // Ignore tourniqueted limbs - if (_tourniquets select (ALL_BODY_PARTS find _x) == 0 && { - _y findIf { - _x params ["", "_amount", "_percentage"]; - (_amount * _percentage) > 0 - } != -1} - ) exitWith { _selection = _x; }; + if (_tourniquets select _partIndex == 0) then { + { + _x params ["", "_amountOf", "_bleeding"]; + _bodyPartBleeding set [_partIndex, (_bodyPartBleeding select _partIndex) + (_amountOf * _bleeding)]; + } forEach _y; + }; } forEach GET_OPEN_WOUNDS(_target); + + private _maxBodyPartBleeding = selectMax _bodyPartBleeding; + private _bodyPartIndex = _bodyPartBleeding find _maxBodyPartBleeding; + private _selection = ALL_BODY_PARTS select _bodyPartIndex; + + // Apply tourniquet if moderate bleeding or no bandage is available, and if not head and torso + if (_hasTourniquet && {_bodyPartIndex > HITPOINT_INDEX_BODY} && {!_hasBandage || {_maxBodyPartBleeding > 0.3}}) exitWith { + _treatmentEvent = QEGVAR(medical_treatment,tourniquetLocal); + _treatmentTime = 7; + _treatmentArgs = [_target, _selection]; + _treatmentItem = "tourniquet"; + }; + _treatmentEvent = QEGVAR(medical_treatment,bandageLocal); _treatmentTime = 5; _treatmentArgs = [_target, _selection, "FieldDressing"]; _treatmentItem = "@bandage"; }; - case (IN_CRDC_ARRST(_target) && {EGVAR(medical_treatment,cprSuccessChanceMin) > 0}): { + + private _bloodVolume = GET_BLOOD_VOLUME(_target); + private _needsIV = _bloodVolume < MINIMUM_BLOOD_FOR_STABLE_VITALS; + private _canGiveIV = _needsIV && + {_healer call EFUNC(medical_treatment,isMedic)} && + {([_healer, "@iv"] call FUNC(itemCheck)) # 0}; // Has IVs + private _doCPR = IN_CRDC_ARRST(_target) && {EGVAR(medical_treatment,cprSuccessChanceMin) > 0}; + + // If in cardiac arrest, first add some blood to injured if necessary, then do CPR (doing CPR when not enough blood is suboptimal if you have IVs) + // If healer has no IVs, allow AI to do CPR to keep injured alive + if ( + _doCPR && + {!_canGiveIV || {_bloodVolume >= BLOOD_VOLUME_CLASS_3_HEMORRHAGE}} + ) exitWith { _treatmentEvent = QEGVAR(medical_treatment,cprLocal); _treatmentArgs = [_healer, _target]; _treatmentTime = 15; }; - case (_isMedic && {GET_BLOOD_VOLUME(_target) < MINIMUM_BLOOD_FOR_STABLE_VITALS} - && {([_healer, "@iv"] call FUNC(itemCheck)) # 0}): { + + private _bodypart = ""; + + if ( + _canGiveIV && { + // If all limbs are tourniqueted, bandage the one with the least amount of wounds, so that the tourniquet can be removed + _bodyPart = call _fnc_findNoTourniquet; + _bodyPart == "" + } + ) exitWith {}; + + if (_canGiveIV) then { // Check if patient's blood volume + remaining IV volume is enough to allow the patient to wake up private _totalIvVolume = 0; //in ml { @@ -108,57 +251,132 @@ switch (true) do { _totalIvVolume = _totalIvVolume + _volumeRemaining; } forEach (_target getVariable [QEGVAR(medical,ivBags), []]); - if (GET_BLOOD_VOLUME(_target) + (_totalIvVolume / 1000) > MINIMUM_BLOOD_FOR_STABLE_VITALS) exitWith { - _treatmentEvent = "#waitForBlood"; + // Check if the medic has to wait, which allows for a little multitasking + if (_bloodVolume + (_totalIvVolume / 1000) >= MINIMUM_BLOOD_FOR_STABLE_VITALS) then { + _treatmentEvent = "#waitForIV"; + _needsIV = false; + _canGiveIV = false; }; + }; + + if (_canGiveIV) exitWith { _treatmentEvent = QEGVAR(medical_treatment,ivBagLocal); _treatmentTime = 5; - _treatmentArgs = [_target, call _fnc_findNoTourniquet, "SalineIV"]; + _treatmentArgs = [_target, _bodyPart, "SalineIV"]; _treatmentItem = "@iv"; }; - case (((_fractures select 4) == 1) - && {([_healer, "splint"] call FUNC(itemCheck)) # 0}): { + + // Leg fractures + private _index = (GET_FRACTURES(_target) select [4, 2]) find 1; + + if ( + _index != -1 && { + // In case the unit doesn't have a splint, set state here + _treatmentEvent = "#needsSplint"; + + ([_healer, "splint"] call FUNC(itemCheck)) # 0 + } + ) exitWith { _treatmentEvent = QEGVAR(medical_treatment,splintLocal); _treatmentTime = 6; - _treatmentArgs = [_healer, _target, "leftleg"]; + _treatmentArgs = [_healer, _target, ALL_BODY_PARTS select (_index + 4)]; _treatmentItem = "splint"; }; - case (((_fractures select 5) == 1) - && {([_healer, "splint"] call FUNC(itemCheck)) # 0}): { - _treatmentEvent = QEGVAR(medical_treatment,splintLocal); - _treatmentTime = 6; - _treatmentArgs = [_healer, _target, "rightleg"]; - _treatmentItem = "splint"; + + // Wait until the injured has enough blood before administering drugs + // (_needsIV && !_canGiveIV), but _canGiveIV is false here, otherwise IV would be given + if (_needsIV || {_doCPR && {_treatmentEvent == "#waitForIV"}}) exitWith { + // If injured is in cardiac arrest and the healer is doing nothing else, start CPR + if (_doCPR) exitWith { + // Medic remains in this loop until injured is given enough IVs or dies + _treatmentEvent = QEGVAR(medical_treatment,cprLocal); + _treatmentArgs = [_healer, _target]; + _treatmentTime = 15; + }; + + // If the injured needs IVs, but healer can't give it to them, have healder wait + if (_needsIV) exitWith { + _treatmentEvent = "#needsIV"; + }; }; - case ((count (_target getVariable [VAR_MEDICATIONS, []])) >= 6): { - _treatmentEvent = "#tooManyMeds"; + + // These checks are not exitWith, so that the medic can try to bandage up tourniqueted body parts + if ((count (_target getVariable [VAR_MEDICATIONS, []])) >= 6) then { + _treatmentEvent = "#needsFewerMeds"; }; - case ((IS_UNCONSCIOUS(_target) || {_heartRate <= 50}) - && {([_healer, "epinephrine"] call FUNC(itemCheck)) # 0}): { - if (CBA_missionTime < (_target getVariable [QGVAR(nextEpinephrine), -1])) exitWith { + + private _heartRate = GET_HEART_RATE(_target); + private _canGiveEpinephrine = !(_treatmentEvent in ["#needsFewerMeds", "#waitForIV"]) && + {IS_UNCONSCIOUS(_target) || {_heartRate <= 50}} && + { + // In case the unit doesn't have a epinephrine injector, set state here + _treatmentEvent = "#needsEpinephrine"; + + ([_healer, "epinephrine"] call FUNC(itemCheck)) # 0 + }; + + // This allows for some multitasking + if (_canGiveEpinephrine) then { + if (CBA_missionTime < (_target getVariable [QGVAR(nextEpinephrine), -1])) then { _treatmentEvent = "#waitForEpinephrineToTakeEffect"; + _canGiveEpinephrine = false; }; - if (_heartRate > 180) exitWith { - _treatmentEvent = "#waitForSlowerHeart"; + + if (_heartRate > 180) then { + _treatmentEvent = "#needsSlowerHeart"; + _canGiveEpinephrine = false; }; + }; + + if (_canGiveEpinephrine) exitWith { + // If all limbs are tourniqueted, bandage the one with the least amount of wounds, so that the tourniquet can be removed + _bodyPart = call _fnc_findNoTourniquet; + + if (_bodyPart == "") exitWith {}; + _target setVariable [QGVAR(nextEpinephrine), CBA_missionTime + 10]; _treatmentEvent = QEGVAR(medical_treatment,medicationLocal); _treatmentTime = 2.5; - _treatmentArgs = [_target, call _fnc_findNoTourniquet, "Epinephrine"]; + _treatmentArgs = [_target, _bodyPart, "Epinephrine"]; _treatmentItem = "epinephrine"; }; - case (((GET_PAIN_PERCEIVED(_target) > 0.25) || {_heartRate >= 180}) - && {([_healer, "morphine"] call FUNC(itemCheck)) # 0}): { + + // Remove all remaining tourniquets by bandaging all body parts + if (_tourniquets isNotEqualTo DEFAULT_TOURNIQUET_VALUES) then { + true call _fnc_removeTourniquet; + }; + + // If the healer can bandage or remove tourniquets, do that + if (_treatmentEvent in [QEGVAR(medical_treatment,bandageLocal), QGVAR(tourniquetRemove)]) exitWith {}; + + // Otherwise, if the healer is either done or out of bandages, continue + if ( + !(_treatmentEvent in ["#needsFewerMeds", "#waitForIV"]) && + {(GET_PAIN_PERCEIVED(_target) > 0.25) || {_heartRate >= 180}} && + { + // In case the unit doesn't have a morphine injector, set state here + _treatmentEvent = "#needsMorphine"; + + ([_healer, "morphine"] call FUNC(itemCheck)) # 0 + } + ) exitWith { if (CBA_missionTime < (_target getVariable [QGVAR(nextMorphine), -1])) exitWith { _treatmentEvent = "#waitForMorphineToTakeEffect"; }; + if (_heartRate < 60) exitWith { - _treatmentEvent = "#waitForFasterHeart"; + _treatmentEvent = "#needsFasterHeart"; }; + + // If all limbs are tourniqueted, bandage the one with the least amount of wounds, so that the tourniquet can be removed + _bodyPart = call _fnc_findNoTourniquet; + + if (_bodyPart == "") exitWith {}; + _target setVariable [QGVAR(nextMorphine), CBA_missionTime + 30]; _treatmentEvent = QEGVAR(medical_treatment,medicationLocal); _treatmentTime = 2.5; - _treatmentArgs = [_target, call _fnc_findNoTourniquet, "Morphine"]; + _treatmentArgs = [_target, _bodyPart, "Morphine"]; _treatmentItem = "morphine"; }; }; @@ -166,10 +384,16 @@ switch (true) do { _healer setVariable [QGVAR(currentTreatment), [CBA_missionTime + _treatmentTime, _target, _treatmentEvent, _treatmentArgs, _treatmentItem]]; // Play animation -if ((_treatmentEvent select [0,1]) != "#") then { - private _treatmentClassname = _treatmentArgs select 2; - if (_treatmentEvent == QEGVAR(medical_treatment,splintLocal)) then { _treatmentClassname = "Splint" }; - [_healer, _treatmentClassname, (_healer == _target)] call FUNC(playTreatmentAnim); +if ((_treatmentEvent select [0, 1]) != "#") then { + private _treatmentClassname = switch (_treatmentEvent) do { + case QEGVAR(medical_treatment,splintLocal): {"Splint"}; + case QEGVAR(medical_treatment,cprLocal): {"CPR"}; + case QEGVAR(medical_treatment,tourniquetLocal): {"ApplyTourniquet"}; + case QGVAR(tourniquetRemove): {"RemoveTourniquet"}; + default {_treatmentArgs select 2}; + }; + + [_healer, _treatmentClassname, _healer == _target] call FUNC(playTreatmentAnim); }; #ifdef DEBUG_MODE_FULL diff --git a/addons/medical_ai/functions/fnc_isInjured.sqf b/addons/medical_ai/functions/fnc_isInjured.sqf index 51ae37caaee..2a4b6895143 100644 --- a/addons/medical_ai/functions/fnc_isInjured.sqf +++ b/addons/medical_ai/functions/fnc_isInjured.sqf @@ -24,3 +24,4 @@ if !(alive _this) exitWith {false}; private _fractures = GET_FRACTURES(_this); ((_fractures select 4) == 1) || {(_fractures select 5) == 1} } +|| { GET_TOURNIQUETS(_this) isNotEqualTo DEFAULT_TOURNIQUET_VALUES } diff --git a/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf b/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf index cb142f02880..9b663f65b22 100644 --- a/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf +++ b/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf @@ -12,7 +12,7 @@ * None * * Example: - * [cursorObject, true, true] call ace_medical_ai_fnc_playTreatmentAnim + * [cursorObject, "Splint", true] call ace_medical_ai_fnc_playTreatmentAnim * * Public: No */ diff --git a/addons/medical_ai/functions/fnc_requestMedic.sqf b/addons/medical_ai/functions/fnc_requestMedic.sqf index 0ea2584fbf2..758fa80a1fd 100644 --- a/addons/medical_ai/functions/fnc_requestMedic.sqf +++ b/addons/medical_ai/functions/fnc_requestMedic.sqf @@ -17,8 +17,11 @@ private _assignedMedic = _this getVariable QGVAR(assignedMedic); private _healQueue = _assignedMedic getVariable [QGVAR(healQueue), []]; -_healQueue pushBack _this; -_assignedMedic setVariable [QGVAR(healQueue), _healQueue]; + +// Only update if it was actually changed +if (_healQueue pushBackUnique _this != -1) then { + _assignedMedic setVariable [QGVAR(healQueue), _healQueue]; +}; #ifdef DEBUG_MODE_FULL systemChat format ["%1 requested %2 for medical treatment", _this, _assignedMedic]; diff --git a/addons/medical_ai/stateMachine.inc.sqf b/addons/medical_ai/stateMachine.inc.sqf index 03483f49815..73b82f98a9c 100644 --- a/addons/medical_ai/stateMachine.inc.sqf +++ b/addons/medical_ai/stateMachine.inc.sqf @@ -17,13 +17,8 @@ GVAR(stateMachine) = [{call EFUNC(common,getLocalUnits)}, true] call CBA_statema #endif }, {}, {}, "Safe"] call CBA_statemachine_fnc_addState; -[GVAR(stateMachine), LINKFUNC(healSelf), {}, { - _this setVariable [QGVAR(treatmentOverAt), nil]; -}, "HealSelf"] call CBA_statemachine_fnc_addState; - -[GVAR(stateMachine), LINKFUNC(healUnit), {}, { - _this setVariable [QGVAR(treatmentOverAt), nil]; -}, "HealUnit"] call CBA_statemachine_fnc_addState; +[GVAR(stateMachine), LINKFUNC(healSelf), {}, {}, "HealSelf"] call CBA_statemachine_fnc_addState; +[GVAR(stateMachine), LINKFUNC(healUnit), {}, {}, "HealUnit"] call CBA_statemachine_fnc_addState; // Add Transistions [statemachine, originalState, targetState, condition, onTransition, name] [GVAR(stateMachine), "Initial", "Injured", LINKFUNC(isInjured), {}, "Injured"] call CBA_statemachine_fnc_addTransition; diff --git a/addons/medical_damage/CfgEventHandlers.hpp b/addons/medical_damage/CfgEventHandlers.hpp index 865276cfba9..f6503c2479b 100644 --- a/addons/medical_damage/CfgEventHandlers.hpp +++ b/addons/medical_damage/CfgEventHandlers.hpp @@ -9,3 +9,9 @@ class Extended_PreInit_EventHandlers { init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/medical_damage/XEH_postInit.sqf b/addons/medical_damage/XEH_postInit.sqf new file mode 100644 index 00000000000..39b1c9301e9 --- /dev/null +++ b/addons/medical_damage/XEH_postInit.sqf @@ -0,0 +1,4 @@ +#include "script_component.hpp" + +// Reload configs (handle functions being compiled after medical_damage's preInit) +call FUNC(parseConfigForInjuries); diff --git a/addons/medical_damage/XEH_preInit.sqf b/addons/medical_damage/XEH_preInit.sqf index 344b9c81ee0..b389a0eaa0c 100644 --- a/addons/medical_damage/XEH_preInit.sqf +++ b/addons/medical_damage/XEH_preInit.sqf @@ -10,11 +10,13 @@ PREP_RECOMPILE_END; call FUNC(parseConfigForInjuries); +/* addMissionEventHandler ["Loaded",{ INFO("Mission Loaded - Reloading medical configs for extension"); // Reload configs into extension (handle full game restart) call FUNC(parseConfigForInjuries); }]; +*/ [QEGVAR(medical,woundReceived), LINKFUNC(woundReceived)] call CBA_fnc_addEventHandler; diff --git a/addons/medical_damage/config.cpp b/addons/medical_damage/config.cpp index 4df519a648e..89ac2955250 100644 --- a/addons/medical_damage/config.cpp +++ b/addons/medical_damage/config.cpp @@ -27,13 +27,4 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgAmmo.hpp" #include "CfgEden.hpp" - -/* -class ACE_Extensions { - class ace_medical { - // Not yet used - }; -}; - */ - #endif diff --git a/addons/medical_damage/functions/fnc_parseWoundHandlersCfg.sqf b/addons/medical_damage/functions/fnc_parseWoundHandlersCfg.sqf index 0dad747c683..010f02b7f5d 100644 --- a/addons/medical_damage/functions/fnc_parseWoundHandlersCfg.sqf +++ b/addons/medical_damage/functions/fnc_parseWoundHandlersCfg.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: Pterolatypus - * Read a list of wound handler entries from config, accounting for inheritance + * Read a list of wound handler entries from config, accounting for inheritance. * * Arguments: * 0: The config class containing the entries @@ -10,24 +10,43 @@ * None * * Example: - * [configFile >> "ace_medical_injuries" >> "damageTypes"] call ace_medical_damage_fnc_parseWoundHandlersCfg + * [configFile >> "ace_medical_injuries" >> "damageTypes" >> "woundHandlers"] call ace_medical_damage_fnc_parseWoundHandlersCfg * * Public: No */ + params ["_config"]; -// read all valid entries from config and store +// Read all valid entries from config and store private _entries = []; + { - private _entryResult = call compile getText _x; - if !(isNil "_entryResult") then { - _entries pushBack _entryResult; - } + private _entryResult = getText _x; + + if (_entryResult != "") then { + if (ADDON) then { + // Runs in postInit + _entryResult = call compile _entryResult; + + if (!isNil "_entryResult") then { + if (_entryResult isEqualType {}) then { + _entries pushBack _entryResult; + } else { + ERROR_2("Wound handler '%1' needs to be a function, but is of type %2.",configName _x,toLowerANSI typeName _entryResult); + }; + }; + } else { + // Runs in preInit + // In case function doesn't exist yet, wrap in extra layer + _entries pushBack (compile format ["call %1", _entryResult]); + }; + }; } forEach configProperties [_config, "isText _x", false]; private _parent = inheritsFrom _config; + if (isNull _parent) exitWith {_entries}; -// recursive call for parent -// can't use configProperties for inheritance since it returns entries in the wrong order -([_parent] call FUNC(parseWoundHandlersCfg)) + _entries; +// Recursive call for parent +// Can't use configProperties for inheritance since it returns entries in the wrong order +([_parent] call FUNC(parseWoundHandlersCfg)) + _entries // return diff --git a/addons/medical_damage/functions/fnc_woundReceived.sqf b/addons/medical_damage/functions/fnc_woundReceived.sqf index a7e3861dee1..c31cf5b3789 100644 --- a/addons/medical_damage/functions/fnc_woundReceived.sqf +++ b/addons/medical_damage/functions/fnc_woundReceived.sqf @@ -17,18 +17,23 @@ * * Public: No */ + params ["_unit", "_allDamages", "_shooter", "_ammo"]; private _typeOfDamage = _ammo call FUNC(getTypeOfDamage); + if (_typeOfDamage in GVAR(damageTypeDetails)) then { (GVAR(damageTypeDetails) get _typeOfDamage) params ["", "", "_woundHandlers"]; private _damageData = [_unit, _allDamages, _typeOfDamage]; + { _damageData = _damageData call _x; TRACE_1("Wound handler returned",_damageData); - if !(_damageData isEqualType [] && {(count _damageData) >= 3}) exitWith { - TRACE_1("Return invalid, terminating wound handling",_damageData); + + // If invalid return, exit + if (isNil "_damageData" || {!(_damageData isEqualType [])} || {(count _damageData) < 3}) exitWith { + TRACE_1("Return invalid, skipping wound handling",_damageData); }; } forEach _woundHandlers; }; diff --git a/addons/medical_feedback/functions/fnc_playInjuredSound.sqf b/addons/medical_feedback/functions/fnc_playInjuredSound.sqf index c278e6e08ae..b33b533e25f 100644 --- a/addons/medical_feedback/functions/fnc_playInjuredSound.sqf +++ b/addons/medical_feedback/functions/fnc_playInjuredSound.sqf @@ -6,8 +6,11 @@ * * Arguments: * 0: Unit - * 1: Type (optional) ["hit" (default) or "moan"] - * 2: Severity (optional) [0 (default), 1, 2] + * 1: Type ["hit", "moan"] (default: "hit") + * 2: Severity [0, 1, 2] (default: 0) + * 3: Hit sound distances (default: [50, 60, 70]) + * 4: Moan sound distances (default: [10, 15, 20]) + * 5: Allow unconscious units (default: false) * * Return Value: * None @@ -20,18 +23,18 @@ #define TIME_OUT_HIT 1 #define TIME_OUT_MOAN [12, 7.5, 5] -params [["_unit", objNull, [objNull]], ["_type", "hit", [""]], ["_severity", 0, [0]]]; +params [["_unit", objNull, [objNull]], ["_type", "hit", [""]], ["_severity", 0, [0]], ["_hitDistances", [50, 60, 70], [[]], [3]], ["_moanDistances", [10, 15, 20], [[]], [3]], ["_allowUnconscious", false, [true]]]; // TRACE_3("",_unit,_type,_severity); if (!local _unit) exitWith { ERROR_2("playInjuredSound: Unit not local or null [%1:%2]",_unit,typeOf _unit); }; -if !(_unit call EFUNC(common,isAwake)) exitWith {}; +if (!_allowUnconscious && {!(_unit call EFUNC(common,isAwake))}) exitWith {}; // Limit network traffic by only sending the event to players who can potentially hear it private _distance = if (_type == "hit") then { - [50, 60, 70] select _severity; + _hitDistances select _severity } else { - [10, 15, 20] select _severity; + _moanDistances select _severity }; private _targets = allPlayers inAreaArray [ASLToAGL getPosASL _unit, _distance, _distance, 0, false, _distance]; if (_targets isEqualTo []) exitWith {}; diff --git a/addons/medical_gui/XEH_postInit.sqf b/addons/medical_gui/XEH_postInit.sqf index 2b7fb8ce523..6d18696b0e7 100644 --- a/addons/medical_gui/XEH_postInit.sqf +++ b/addons/medical_gui/XEH_postInit.sqf @@ -2,6 +2,8 @@ if (!hasInterface) exitWith {}; +#include "initKeybinds.inc.sqf" + GVAR(target) = objNull; GVAR(previousTarget) = objNull; GVAR(selectedBodyPart) = 0; @@ -35,64 +37,6 @@ GVAR(selfInteractionActions) = []; }; }] call CBA_fnc_addEventHandler; -["ACE3 Common", QGVAR(openMedicalMenuKey), localize LSTRING(OpenMedicalMenu), { - // Get target (cursorTarget, cursorObject, and lineIntersectsSurfaces along camera to maxDistance), if not valid then target is ACE_player - TRACE_3("Open menu key",cursorTarget,cursorObject,ACE_player); - private _target = cursorTarget; - if !(_target isKindOf "CAManBase" && {[ACE_player, _target] call FUNC(canOpenMenu)}) then { - _target = cursorObject; - if !(_target isKindOf "CAManBase" && {[ACE_player, _target] call FUNC(canOpenMenu)}) then { - private _start = AGLToASL positionCameraToWorld [0, 0, 0]; - private _end = AGLToASL positionCameraToWorld [0, 0, GVAR(maxDistance)]; - private _intersections = lineIntersectsSurfaces [_start, _end, ACE_player, objNull, true, -1, "FIRE"]; - { - _x params ["", "", "_intersectObject"]; - // Only look "through" player and player's vehicle - if (!(_intersectObject isKindOf "CAManBase") && {_intersectObject != vehicle ACE_player}) exitWith {}; - if (_intersectObject != ACE_player && {_intersectObject isKindOf "CAManBase" && {[ACE_player, _intersectObject] call FUNC(canOpenMenu)}}) exitWith { - _target =_intersectObject - }; - } forEach _intersections; - if (!(_target isKindOf "CAManBase") || {!([ACE_player, _target] call FUNC(canOpenMenu))}) then { - _target = ACE_player; - }; - }; - }; - - // Check conditions: canInteract and canOpenMenu - if !([ACE_player, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; - if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false}; - - // Statement - [_target] call FUNC(openMenu); - false -}, { - // Close menu if enough time passed from opening - if (CBA_missionTime - GVAR(lastOpenedOn) > 0.5) exitWith { - [objNull] call FUNC(openMenu); - }; - false -}, [DIK_H, [false, false, false]], false, 0] call CBA_fnc_addKeybind; - -["ACE3 Common", QGVAR(peekMedicalInfoKey), localize LSTRING(PeekMedicalInfo), -{ - // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; - - // Statement - [ACE_player, -1] call FUNC(displayPatientInformation); - false -}, { - if (CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay)) then { - [{ - CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay) - }, {QGVAR(RscPatientInfo) cutFadeOut 0.3}] call CBA_fnc_waitUntilAndExecute; - }; - GVAR(peekLastOpenedOn) = CBA_missionTime; - false -}, [DIK_H, [false, true, false]], false, 0] call CBA_fnc_addKeybind; - - // Close patient information display when interaction menu is closed ["ace_interactMenuClosed", { QGVAR(RscPatientInfo) cutFadeOut 0.3; diff --git a/addons/medical_gui/initKeybinds.inc.sqf b/addons/medical_gui/initKeybinds.inc.sqf new file mode 100644 index 00000000000..53c577084e9 --- /dev/null +++ b/addons/medical_gui/initKeybinds.inc.sqf @@ -0,0 +1,55 @@ +["ACE3 Common", QGVAR(openMedicalMenuKey), LLSTRING(OpenMedicalMenu), { + // Get target (cursorTarget, cursorObject, and lineIntersectsSurfaces along camera to maxDistance), if not valid then target is ACE_player + TRACE_3("Open menu key",cursorTarget,cursorObject,ACE_player); + private _target = cursorTarget; + if !(_target isKindOf "CAManBase" && {[ACE_player, _target] call FUNC(canOpenMenu)}) then { + _target = cursorObject; + if !(_target isKindOf "CAManBase" && {[ACE_player, _target] call FUNC(canOpenMenu)}) then { + private _start = AGLToASL positionCameraToWorld [0, 0, 0]; + private _end = AGLToASL positionCameraToWorld [0, 0, GVAR(maxDistance)]; + private _intersections = lineIntersectsSurfaces [_start, _end, ACE_player, objNull, true, -1, "FIRE"]; + { + _x params ["", "", "_intersectObject"]; + // Only look "through" player and player's vehicle + if (!(_intersectObject isKindOf "CAManBase") && {_intersectObject != vehicle ACE_player}) exitWith {}; + if (_intersectObject != ACE_player && {_intersectObject isKindOf "CAManBase" && {[ACE_player, _intersectObject] call FUNC(canOpenMenu)}}) exitWith { + _target = _intersectObject; + }; + } forEach _intersections; + if (!(_target isKindOf "CAManBase") || {!([ACE_player, _target] call FUNC(canOpenMenu))}) then { + _target = ACE_player; + }; + }; + }; + + // Check conditions: canInteract and canOpenMenu + if !([ACE_player, _target, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, _target] call FUNC(canOpenMenu)) exitWith {false}; + + // Statement + [_target] call FUNC(openMenu); + false +}, { + // Close menu if enough time passed from opening + if (CBA_missionTime - GVAR(lastOpenedOn) > 0.5) exitWith { + [objNull] call FUNC(openMenu); + }; +}, [DIK_H, [false, false, false]], false, 0] call CBA_fnc_addKeybind; + +["ACE3 Common", QGVAR(peekMedicalInfoKey), LLSTRING(PeekMedicalInfo), { + // Conditions: canInteract + if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + + // Statement + [ACE_player, -1] call FUNC(displayPatientInformation); + false +}, { + if (CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay)) then { + [{ + CBA_missionTime - GVAR(peekLastOpenedOn) > GVAR(peekMedicalInfoReleaseDelay) + }, { + QGVAR(RscPatientInfo) cutFadeOut 0.3; + }] call CBA_fnc_waitUntilAndExecute; + }; + GVAR(peekLastOpenedOn) = CBA_missionTime; +}, [DIK_H, [false, true, false]], false, 0] call CBA_fnc_addKeybind; diff --git a/addons/medical_gui/stringtable.xml b/addons/medical_gui/stringtable.xml index 3f816aa39bb..6dfc16f9b95 100644 --- a/addons/medical_gui/stringtable.xml +++ b/addons/medical_gui/stringtable.xml @@ -222,6 +222,7 @@ Zeige Triage-Einstufung im Interaktionsmenü 在交互式菜单中显示分诊级别 상호작용 메뉴에서 부상자 카드 보기 + Mostrar Nível de Triagem no Menu de Interação Shows the patient's triage level by changing the color of the main and medical menu actions. @@ -234,6 +235,7 @@ Zeigt die Triage-Einstufung des Patienten durch Ändern der Farbe der Aktionen des Hauptmenüs und des medizinischen Menüs an. 通过改变主菜单和医疗菜单动作的颜色来显示伤员的分诊级别。 환자의 부상자 카드를 상호작용에서 볼 수 있게 합니다. + Mostra o nível de triagem do paciente alterando a cor das ações do menu principal e do menu médico. Medical @@ -294,6 +296,7 @@ 医療情報一時表示 Просмотр медицинской информации Ojear Información Médica + Visualização rápida das informações médicas Medical Peek Duration @@ -305,6 +308,7 @@ 医療情報一時表示の表示時間 Продолжительность медицинского осмотра Duración del Ojear Información Médica + Duração da visualização geral das informações médicas How long the medical info peek remains open after releasing the key. @@ -316,6 +320,7 @@ 医療情報一時表示キーを放してからどれだけ長く情報表示するか。 Как долго окно просмотра медицинской информации остается открытым после отпускания клавиши. Durante cuánto tiempo la información médica ojeada permanece abierta una ves se deje de apretar la tecla. + Quanto tempo a visualização rápida das informações médicas permanece aberta após soltar a tecla. Load Patient @@ -570,6 +575,7 @@ 自分に切り替え Переключиться на себя Cambiar a uno mismo + Trocar para si mesmo Switch to target @@ -581,6 +587,7 @@ 相手に切り替え Переключиться на цель Cambiar al objetivo + Trocar para paciente Head @@ -1008,6 +1015,7 @@ 出血はしていない Кровотечения нет Sin sangrado + Sem sangramento Slow bleeding @@ -1019,6 +1027,7 @@ 出血は穏やか Медленное кровотечение Sangrado lento + Sangramento lento Moderate bleeding @@ -1030,6 +1039,7 @@ 出血はそこそこ速い Умеренное кровотечение Sangrado moderado + Sangramento moderado Severe bleeding @@ -1041,6 +1051,7 @@ 出血は激しい Сильное кровотечение Sangrado severo + Sangramento grave Massive bleeding @@ -1052,6 +1063,7 @@ 出血は酷く多い Огромное кровотечение Sangrado masivo + Sangramento massivo in Pain @@ -1127,6 +1139,7 @@ 失血なし Потери крови нет Sin pérdida de sangre + Sem perda de sangue @@ -1271,6 +1284,7 @@ Información de paciente Patienteninformation 환자 정보 + Informações do paciente Blood Loss Colors @@ -1283,6 +1297,7 @@ 失血颜色 출혈 색상 Colores de pérdida de sangre + Cores de perda de sangue Defines the 10 color gradient used to indicate blood loss in Medical GUIs. @@ -1295,6 +1310,7 @@ 失血颜色,用于医学图形用户界面。10种渐变颜色。 출혈로 인한 의료 GUI의 색상을 변경합니다. 총 10가지 색상이 있습니다. Define los 10 gradientes de color utilizados para indicar la pérdida de sangre en la interfaz gráfica del sistema Médico. + Define os 10 gradientes de cores utilizados para indicar perda de sangue nas interfaces médicas. Blood Loss Color %1 @@ -1307,6 +1323,7 @@ 失血颜色 %1 출혈 색상 %1 Color de pérdida de sangre %1 + Cor de perda de sangue %1 Damage Colors @@ -1319,6 +1336,7 @@ 负伤颜色 피해 색상 Colores de daño + Cores de dano Defines the 10 color gradient used to indicate damage in Medical GUIs. @@ -1331,6 +1349,7 @@ 负伤颜色,用于医学图形用户界面。10种渐变颜色。 의료 GUI에 쓰이는 피해 색상입니다. 총 10가지 색상이 있습니다. Define los 10 gradientes de color utilizados para indicar el daño en la interfaz gráfiica del sistema Médico. + Define os 10 gradientes de cor utilizados para indicar dano nas interfaces médicas. Damage Color %1 @@ -1343,6 +1362,7 @@ 负伤颜色 %1 피해 색상 %1 Color de daño %1 + Cor de dano %1 Show Blood Loss @@ -1355,6 +1375,7 @@ Показывать кровопотерю Mostrar pérdida de sangre Afficher les pertes de sang + Mostrar perda de sangue Show qualitative blood loss in the injury list. @@ -1367,6 +1388,7 @@ Показывать тяжесть кровопотери в списке ранений. Mostrar la pérdida de sangre cualitativa en la lista de heridas. Afficher la quantité de sang perdue + Mostrar perda de sangue qualitativa na lista de feridas. Show Bleeding State @@ -1412,6 +1434,7 @@ 被弾時の医療情報一時表示 Показать медицинскую информацию о попадании Ojear Información Médica en Impacto + Visualização rápida das informações médicas durante uma lesão Temporarily show medical info when injured. @@ -1424,6 +1447,7 @@ 被弾時に医療情報を一時的に表示します。 Временно показывать медицинскую информацию при травме. Temporalmente muestra la información médica cuando es herido. + Mostrar informações médicas temporariamente durante uma lesão. Medical Peek Duration on Hit @@ -1436,6 +1460,7 @@ 被弾時の医療情報一時表示の表示時間 Продолжительность медицинского осмотра при попадании Duración de Ojear la Información Médica cuando hay Impacto + Duração da visualização rápida de informações médicas durante uma lesão How long the medical info peek remains open after being injured. @@ -1448,6 +1473,7 @@ 被弾時の医療情報の一時表示をどれだけ長く表示するか。 Как долго окно просмотра медицинской информации остается открытым после получения травмы. Durante cuánto tiempo la información médica ojeada permanece abierta una tras haber sido herido. + Quanto tempo a visualização rápida de informações médicas permanece aberta após ser ferido. Show Trauma Sustained @@ -1486,6 +1512,7 @@ 身体部位の輪郭表示の色 Цвет контура части тела Color de Contorno de las Partes del Cuerpo + Cor do contorno da parte do corpo Color of outline around selected body part. @@ -1498,6 +1525,7 @@ 選択した身体部位の輪郭表示の色。 Цвет контура вокруг выбранной части тела. Color del contorno alrededor de la parte del cuerpo seleccionada. + Cor do contorno em volta da parte do corpo selecionada. Minor Trauma @@ -1562,6 +1590,7 @@ Лево I + E R @@ -1574,6 +1603,7 @@ Право D + D in your inventory @@ -1586,6 +1616,7 @@ 個あなたが保有 в вашем инвентаре en tu inventario + em seu inventário in patient's inventory @@ -1598,6 +1629,7 @@ 個患者が保有 в инвентаре пациента en el inventario del paciente + no inventário do paciente in vehicle's inventory @@ -1610,6 +1642,7 @@ 個車両内に保有 в инвентаре транспорта en el inventario del vehículo + no inventário do veículo No effect until tourniquet removed @@ -1621,6 +1654,7 @@ 止血帯を外すまで効果を発揮しません Никакого эффекта до тех пор, пока жгут не будет снят Sin efecto hasta que se quita el torniquete + Sem efeito até o torniquete ser removido Show Tourniquet Warning @@ -1632,6 +1666,7 @@ 止血帯の警告を表示 Показать предупреждение о наложении жгута Mostrar Advertencia de Torniquete + Mostrar aviso de torniquete Show a warning tooltip when a tourniquet will interfere with a medical action. @@ -1643,6 +1678,7 @@ 止血帯が医療行為を妨げる場合には、警告ツールチップを表示します。 Показать всплывающую подсказку с предупреждением, когда жгут помешает медицинскому вмешательству. Muestra un mensaje de advertencia cuando un torniquete interfiera con una acción médica. + Mostra uma dica de aviso quando um torniquete interfere com uma ação médica. diff --git a/addons/medical_statemachine/stringtable.xml b/addons/medical_statemachine/stringtable.xml index 2b828d506e9..9c1d807bd00 100644 --- a/addons/medical_statemachine/stringtable.xml +++ b/addons/medical_statemachine/stringtable.xml @@ -173,6 +173,7 @@ Wykrwawienie podczas zatrzymanej akcji serca 心脏骤停期间失血情况 심정지 중 출혈 + Sangramento durante parada cardíaca Controls whether a person can die in cardiac arrest by blood loss before the cardiac arrest time runs out. @@ -185,6 +186,7 @@ Kontroluje czy śmierć osoby może nastąpić poprzez wykrwawienie zanim wyczerpię się Czas Zatrzymania Akcji Serca. 控制单位是否会在心脏骤停时间耗完之前因失血过多而死亡。 지정한 심정지 시간이 다 되기 전에 출혈로 인해 사망할 수 있는 지를 결정합니다. + Controla se uma pessoa pode morrer em parada cardíaca por perda de sangue antes que o tempo de parada cardíaca acabe. diff --git a/addons/medical_status/functions/fnc_getBloodLoss.sqf b/addons/medical_status/functions/fnc_getBloodLoss.sqf index c2a66046791..5193ccbb0b0 100644 --- a/addons/medical_status/functions/fnc_getBloodLoss.sqf +++ b/addons/medical_status/functions/fnc_getBloodLoss.sqf @@ -21,9 +21,10 @@ private _woundBleeding = GET_WOUND_BLEEDING(_unit); if (_woundBleeding == 0) exitWith {0}; private _cardiacOutput = [_unit] call FUNC(getCardiacOutput); +private _resistance = _unit getVariable [VAR_PERIPH_RES, DEFAULT_PERIPH_RES]; // can use value directly since this is sum of default and adjustments // even if heart stops blood will still flow slowly (gravity) -private _bloodLoss = (_woundBleeding * (_cardiacOutput max CARDIAC_OUTPUT_MIN) * EGVAR(medical,bleedingCoefficient)); +private _bloodLoss = (_woundBleeding * (_cardiacOutput max CARDIAC_OUTPUT_MIN) * (DEFAULT_PERIPH_RES / _resistance) * EGVAR(medical,bleedingCoefficient)); private _eventArgs = [_unit, _bloodLoss]; // Pass by reference diff --git a/addons/medical_status/stringtable.xml b/addons/medical_status/stringtable.xml index ea3f77429b2..cefc85ff421 100644 --- a/addons/medical_status/stringtable.xml +++ b/addons/medical_status/stringtable.xml @@ -127,6 +127,7 @@ 武器を落とす確率 Шанс выпадения оружия Probabilidad de Soltar Arma + Probabilidade de largar a arma Chance for a player to drop their weapon when going unconscious.\nHas no effect on AI. @@ -138,6 +139,7 @@ プレーヤーが意識を失ったときに武器を落とす可能性。\nAI には影響しません。 Шанс для игрока выронить свое оружие, когда он теряет сознание.\nНе влияет на ИИ Probabilidad del jugador de soltar su arma cuando quedan inconscientes.\nNo tiene efecto sobre la IA. + Chance de um jogador largar sua arma quando ficar inconsciente.\nNão tem efeito sobre a IA. diff --git a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf index 8a6be10bb49..97680353e45 100644 --- a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf +++ b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf @@ -26,7 +26,9 @@ private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; private _tourniquets = GET_TOURNIQUETS(_patient); if (_tourniquets select _partIndex == 0) exitWith { - [LSTRING(noTourniquetOnBodyPart), 1.5] call EFUNC(common,displayTextStructured); + if (_medic == ACE_player) then { + [LSTRING(noTourniquetOnBodyPart), 1.5] call EFUNC(common,displayTextStructured); + }; }; _tourniquets set [_partIndex, 0]; @@ -39,8 +41,15 @@ TRACE_1("clearConditionCaches: tourniquetRemove",_nearPlayers); [QEGVAR(interact_menu,clearConditionCaches), [], _nearPlayers] call CBA_fnc_targetEvent; // Add tourniquet item to medic or patient -private _receiver = [_patient, _medic, _medic] select GVAR(allowSharedEquipment); -[_receiver, "ACE_tourniquet"] call EFUNC(common,addToInventory); +if (_medic call EFUNC(common,isPlayer)) then { + private _receiver = [_patient, _medic, _medic] select GVAR(allowSharedEquipment); + [_receiver, "ACE_tourniquet"] call EFUNC(common,addToInventory); +} else { + // If the medic is AI, only return tourniquet if enabled + if (missionNamespace getVariable [QEGVAR(medical_ai,requireItems), 0] > 0) then { + [_medic, "ACE_tourniquet"] call EFUNC(common,addToInventory); + }; +}; // Handle occluded medications that were blocked due to tourniquet private _occludedMedications = _patient getVariable [QEGVAR(medical,occludedMedications), []]; diff --git a/addons/medical_treatment/initSettings.inc.sqf b/addons/medical_treatment/initSettings.inc.sqf index d080965eb9e..7f0fc06764c 100644 --- a/addons/medical_treatment/initSettings.inc.sqf +++ b/addons/medical_treatment/initSettings.inc.sqf @@ -86,7 +86,9 @@ [LSTRING(ConvertItems_DisplayName), LSTRING(ConvertItems_Description)], [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [ELSTRING(common,Enabled), LSTRING(ConvertItems_RemoveOnly), ELSTRING(common,Disabled)], 0], - true + 1, + {[QGVAR(convertItems), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_fnc_addSetting; [ diff --git a/addons/medical_treatment/stringtable.xml b/addons/medical_treatment/stringtable.xml index 383048626ab..10ac97af78f 100644 --- a/addons/medical_treatment/stringtable.xml +++ b/addons/medical_treatment/stringtable.xml @@ -75,6 +75,7 @@ 已启用 & 可以诊断死亡/心搏骤停 활성화 및 사망/심정지 진찰 가능 Habilitado y poder diagnosticar Muerte/Parada cardíaca + Habilitado e permite diagnosticar morte/parada cardíaca Abilitato e può diagnosticare Morte/Arresto Cardiaco @@ -84,6 +85,7 @@ 활성화 및 사망/심정지 진찰 가능 [직접] Aktiviert & kann Tod/Herzstillstand diagnostizieren [Direkt] Abilitato e può diagnosticare Morte/Arresto Cardiaco [Esplicito] + Activé & peut diagnostiquer la mort/l'arrêt cardiaque [Direct]. Advanced Medication @@ -161,6 +163,7 @@ Attivi e possono riaprirsi 已启用 & 可以伤口开裂 활성화 및 붕대 풀림 구현 + Habilitado e pode reabrir Wound Reopening Coefficient @@ -175,6 +178,7 @@ Coeficiente de reapertura de heridas 伤口开裂系数 붕대 풀림 계수 + Coeficiente de reabertura de feridas Coefficient for controlling the wound reopening chance. The final reopening chance is determined by multiplying this value with the specific reopening chance for the wound type and bandage used. @@ -189,6 +193,7 @@ Coeficiente que controla la probabilidad de reapertura de heridas. La probabilidad final de reapertura de heridas queda determinada multiplicando este valor por la probabilidad específica del tipo de herida y venda usada. 用于控制伤口开裂概率的系数。最终的重开放概率=该值x伤口类型x所使用的绷带的具体开裂概率。 붕대가 풀리는 확률 계수를 정합니다. 최종 붕대 풀림 계수는 상처의 종류와 쓰인 붕대의 합의 결과에 계수를 곱한 결과입니다. + Coeficiente para controlar a chance de reabertura da ferida. A chance final de reabertura é determinada multiplicando este valor com a chance específica de reabertura para o tipo de ferida e bandagem usada. Clear Trauma @@ -201,6 +206,7 @@ 清理创伤 상처 제거 Despejar trauma + Remover trauma Controls when hitpoint damage from wounds is healed. @@ -213,6 +219,7 @@ 控制伤口治疗后确定受伤部位的受伤情况。 상처가 언제 제거되는 지를 결정합니다. Controla cuando los puntos de daño de las heridas son curados. + Controla quando o dano de pontos de vida de feridas é curado. After Bandage @@ -225,6 +232,7 @@ 包扎后 붕대 묶은 후 Después de vendado + Após fechamento com bandagens After Stitch @@ -237,6 +245,7 @@ 缝合后 상처 봉합 후 Después de sutura + Após sutura Boost medical training when in medical vehicles or facilities. Untrained becomes medic, medic becomes doctor. @@ -329,6 +338,7 @@ Tempo di utilizzo dell'autoiniettore 自动注射器治疗时间 주사기 사용 시간 + Tempo de tratamento de auto-injetores Time, in seconds, required to administer medication using an autoinjector. @@ -341,6 +351,7 @@ Tempo in secondi richiesto per ricevere medicina da un autoiniettore. 使用自动注射器给药所需的时间(秒) 초 단위로 주사기를 사용하는데 걸리는 시간을 정합니다. + Tempo, em segundos, necessário para administrar medicações usando o auto-injetor. Tourniquet Treatment Time @@ -353,6 +364,7 @@ Czas aplikacji stazy 止血带治疗时间 지혈대 사용 시간 + Tempo de tratamento de torniquetes Time, in seconds, required to apply/remove a tourniquet. @@ -365,6 +377,7 @@ Czas w sekundach potrzebny do założenia/zdjęcia stazy. 使用/移除止血带所需的时间(秒) 초 단위로 지혈대를 사용/제거하는 데 걸리는 시간을 정합니다. + Tempo, em segundos, necessário para aplicar/remover um torniquete. IV Bag Treatment Time @@ -377,6 +390,7 @@ Czas aplikacji IV 静脉输液袋治疗时间 수액용기 사용 시간 + Tempo de tratamento de bolsas de IV Time, in seconds, required to administer an IV bag. @@ -389,6 +403,7 @@ Czas w sekundach potrzebny na aplikację transfuzji IV. 使用静脉输液所需的时间(秒) 초 단위로 수액용기를 사용하는 데 걸리는 시간을 정합니다. + Tempo, em segundos, necessário para administrar uma bolsa de IV. Splint Treatment Time @@ -401,6 +416,7 @@ Czas aplikacji szyny 夹板治疗时间 부목 사용 시간 + Tempo de tratamento de talas Time, in seconds, required to apply a splint. @@ -413,6 +429,7 @@ Czas w sekundach potrzebny na aplikację szyny. 使用夹板所需的时间(秒) 초 단위로 부목을 사용하는데 걸리는 시간을 정합니다. + Tempo, em segundos, necessário para aplicar uma talas. Body Bag Use Time @@ -425,6 +442,7 @@ Czas użycia worka na ciało 尸袋使用时间 시체 운반용 부대 사용 시간 + Tempo de uso de sacos de cadáver Time, in seconds, required to put a patient in a body bag. @@ -437,6 +455,7 @@ Czas w sekundach potrzebny na spakowanie ciała do worka na ciało. 装入裹尸袋时间 초 단위로 시체 운반용 부대를 사용하는데 걸리는 시간을 정합니다. + Tempo, em segundos, necessário para colocar um paciente em um saco de cadáver. Grave Digging Time @@ -448,6 +467,7 @@ 墓掘りの所要時間 Время рытья могилы Tiempo de Cavado de Tumba + Tempo de escavação de cova Time, in seconds, required to dig a grave for a body. @@ -459,6 +479,7 @@ 遺体の墓を掘るのに掛かる時間。 (秒単位) Время в секундах, необходимое для того, чтобы выкопать могилу для тела. Tiempo, en segundos, requerido para cavar una tumba para un cuerpo. + Tempo, em segundos, necessário para cavar uma cova para um corpo. Allow Epinephrine @@ -636,6 +657,7 @@ Kendi PAK Kullanımı Usar EPA sobre uno mismo 개인응급키트 자가 사용 + Auto-tratamento com KPS Enables the use of PAKs to heal oneself. @@ -651,6 +673,7 @@ Kendini iyileştirmek için PAK'ların kullanılmasını sağlar. Habilita el uso de EPA para curarse a uno mismo. 개인응급키트를 사용자 본인에게 쓸 수 있는 지를 정합니다. + Permite o uso de KPS para se tratar. Time Coefficient PAK @@ -815,6 +838,7 @@ Tempo di suturazione ferita. 伤口缝合时间 상처 봉합 시간 + Tempo de sutura de feridas Time, in seconds, required to stitch a single wound. @@ -827,6 +851,7 @@ Tempo in secondi richiesto per suturare una singola ferita. 缝合一个伤口所需的时间(秒) 초 단위로, 한 상처를 봉합하는데 걸리는 시간을 설정합니다. + Tempo, em segundos, necessário para suturar uma única ferida. Self IV Transfusion @@ -869,6 +894,7 @@ Permetti di insaccare un paziente svenuto 允许昏迷者装入尸袋 기절 인원 시체 운반용 부대에 옮기기 + Permitir inconscientes em sacos de cadáver Enables placing an unconscious patient in a body bag. @@ -881,6 +907,7 @@ Permette l'uso della sacca per morti anche su pazienti che sono solo svenuti (causa la morte del paziente) 能够将昏迷的伤员装入尸袋中。 기절 상태의 인원을 시체 운반용 부대에 옮겨 담을 수 있는 지를 정합니다. + Permite colocar um paciente inconsciente em um saco de cadáver. Allow Grave Digging @@ -892,6 +919,7 @@ Autoriser le creusement de tombes 墓掘りを許可 Рытье могил + Permitir escavamento de cova Enables digging graves to dispose of corpses. @@ -903,6 +931,7 @@ Active la possibilité de creuser des tombes pour enterrer les cadavres. 墓を掘って死体を処理できるようになります。 Позволяет рыть могилы для захоронения трупов. + Permite escavar covas para se livrar de cadáveres. Only if dead @@ -914,6 +943,7 @@ Uniquement s'il est mort 死体のみ Только если мертв + Apenas se estiver morto Create Grave Markers @@ -925,6 +955,7 @@ Créer des pierres tombales 墓標を作成 Надгробные знаки + Criar marcadores de covas Enables the creation of grave markers when digging graves. @@ -936,6 +967,7 @@ Active la création de pierres tombales lors de l'enterrement de cadavres. 墓を掘った際、墓標を作成できるようにします。 Позволяет создавать надгробные знаки при рытье могил. + Permite a criação de marcadores de covas ao escavá-las. Allow IV Transfusion @@ -950,6 +982,7 @@ Доступ к внутривенному переливанию Permitir transfusión de IV 수액용기 사용 허가 + Permitir transfusão IV Training level required to transfuse IVs. @@ -964,6 +997,7 @@ Уровень навыка, требуемый для осуществления внутривенного переливания. Nivel de capacitación requerido para transfusiones de IV. 수액용기를 사용하는데 필요한 등급을 정합니다. + Nível de treinamento necessário para transfusões IV. Locations IV Transfusion @@ -976,6 +1010,7 @@ Luoghi Fleboclisi EV 静脉输液地点 수액용기 사용 장소 + Locais para transfusão IV Controls where IV transfusions can be performed. @@ -988,6 +1023,7 @@ Luoghi in cui è possibile applicare Fleboclisi Endovenose. 控制何地可以静脉输液 수액용기를 사용할 수 있는 장소를 정합니다. + Controla onde as transfusões IV podem ser realizadas. Convert Vanilla Items @@ -1220,6 +1256,7 @@ 心肺复苏的最低成功率 최소 심폐소생술 성공 가능성 RCP posibilidad mínima de resultado satisfactorio + Probabilidade mínima de sucesso de RCP CPR Success Chance Maximum @@ -1232,6 +1269,7 @@ 心肺复苏的最高成功率 최대 심폐소생술 성공 가능성 RCP posibilidad máxima de resultado satisfactorio + Probabilidade máxima de sucesso de RCP Minimum probability that performing CPR will restore heart rhythm.\nThis minimum value is used when the patient has at least "Lost a fatal amount of blood".\nAn interpolated probability is used when the patient's blood volume is between the minimum and maximum thresholds. @@ -1244,6 +1282,7 @@ 实施心肺复苏恢复心律的最小可能性。\n当伤员至少有"致命失血量"时,就取该最小值。\n当伤员的血量介于最小和最大阈值之间时,将使用插值概率。 심폐소생술 시 제일 낮은 성공 가능성을 결정합니다.\n이 가능성은 환자가 최소 "심각한 양의 혈액을 잃음"일 때 사용됩니다. Probabilidad mínima de que realizar RCP restaure el ritmo cardíaco.\n Este valor mínimo es utilizado cuando el paciente tiene al menos "Pérdida fatal de sangre".\n Una probabilidad interpolada es usada cuando el volumen de sangre del paciente está entre el umbral mínimo y máximo. + Probabilidade mínima do RCP restaurar a frequência cardíaca.\nEste valor é usado em pacientes que "perderam uma quantidade fatal de sangue".\nValores entre quantidades extremas de sangue resultam em uma probabilidade interpolada entre a mínima e a máxima. Maximum probability that performing CPR will restore heart rhythm.\nThis maximum value is used when the patient has at most "Lost some blood".\nAn interpolated probability is used when the patient's blood volume is between the minimum and maximum thresholds. @@ -1256,6 +1295,7 @@ 实施心肺复苏恢复心律的最大可能性。\n当伤员最多“失血一些”时,就取该最大值。\n当伤员的血量介于最小和最大阈值之间时,将使用插值概率。 심폐소생술 시 제일 높은 성공 가능성을 결정합니다.\n이 가능성은 환자가 최소 "혈액을 조금 잃음"일 때 사용됩니다. Probabilidad máxima de que realizar RCP restaure el ritmo cardíaco.\n Este valor máximo es utilizado cuando el paciente tiene como mucho "Pérdida de un poco de sangre".\n Una probabilidad interpolada es usada cuando el volumen de sangre del paciente está entre el umbral mínimo y máximo. + Probabilidade máxima do RCP restaurar a frequência cardíaca.\nEste valor é usado em pacientes que "perderam pouco sangue".\nValores entre quantidades extremas de sangue resultam em uma probabilidade interpolada entre a mínima e a máxima. CPR Treatment Time @@ -1268,6 +1308,7 @@ HLW Behandlungsdauer 心肺复苏时间 심폐소생술 시행 시간 + Duração do RCP Time, in seconds, required to perform CPR on a patient. @@ -1280,6 +1321,7 @@ Zeit in Sekunden, die benötigt wird, um eine HLW durzuführen. 对伤员实施心肺复苏所需的时间(秒) 초 단위로, 심폐소생술을 진행하는 시간을 결정합니다. + Tempo, em segundos, necessário para realizar RCP em um paciente. Holster Required @@ -1294,6 +1336,7 @@ Необходимость убирать оружие Requiere enfundar 무장여부 + Necessário guardar armas Controls whether weapons must be holstered / lowered in order to perform medical actions.\nExcept Exam options allow examination actions (checking pulse, blood pressure, response) at all times regardless of this setting. @@ -1308,6 +1351,7 @@ Нужно ли убирать оружие для проведения медицинских действий.\nОпция «Проверка разрешена» разрешает проверять пульс, кровяное давление или реакцию независимо от этого параметра. Controla si las armas deben estar enfundadas / bajadas para realizar acciones médicas. \n Excepto Las opciones de examen permiten acciones de examen (control del pulso, presión arterial, respuesta) en todo momento, independientemente de esta configuración. 치료하기에 앞서 손에서 무기를 집어넣을 지/내릴지를 결정합니다.\n검사제외 옵션의 경우 맥박 확인, 혈압 확인, 반응 확인은 앞선 옵션에 구애받지 않고 사용할 수 있습니다. + Controla se as armas devem ser guardadas/abaixadas para realizar ações médicas.\n"Exceto exame" faz com que ações de verificação de pulso, pressão arterial e resposta sejam permitidas a qualquer momento. Lowered or Holstered @@ -1322,6 +1366,7 @@ Опущено или убрано Bajada o enfundada 내리거나 집어넣기 + Abaixada ou guardada Lowered or Holstered (Except Exam) @@ -1336,6 +1381,7 @@ Опущено или убрано (Проверка разрешена) Bajada o enfundada (excepto examen) 내리거나 집어넣기(검사 제외) + Abaixada ou guardada (exceto exame) Holstered Only @@ -1350,6 +1396,7 @@ Только убрано Solo enfundada 집어넣기 + Guardada apenas Holstered Only (Except Exam) @@ -1364,6 +1411,7 @@ Только убрано (Проверка разрешена) Solo enfundada (excepto examen) 집어넣기(검사 제외) + Guardada apenas (exceto exame) [ACE] Medical Supply Crate (Basic) @@ -1827,7 +1875,7 @@ Auto-morfin Morfium autoinjektor Autoiniettore di Morfina - Auto-injetor de morfina + Autoinjetor de Morfina モルヒネ自動注射器 자동주사기 (모르핀) 吗啡自动注射器 @@ -1874,7 +1922,7 @@ Auto-injecteur d'adénosine Autoiniettore di Adenosina Auto-adenosine - Auto-injetor de Adenosina + Autoinjetor de Adenosina Аденозин в пневмошприце アデノシン自動注射器 자동주사기 (아데노신) @@ -1922,7 +1970,7 @@ Auto-atropine Atropin autoinjektor Autoiniettore di Atropina - Auto-injetor de Atropina + Autoinjetor de Atropina アトロピン自動注射器 자동주사기 (아트로핀) 阿托品自动注射器 @@ -1971,7 +2019,7 @@ Auto-adrenalin Epinefrin autoinjektor Autoiniettore di Epinefrina - Auto-injetor de epinefrina + Autoinjetor de Epinefrina アドレナリン自動注射器 자동주사기 (에피네프린) 肾上腺素自动注射器 @@ -2385,7 +2433,7 @@ Operationsset Sebészeti készlet Kit chirurgico - Kit Cirurgico + Kit Cirúrgico Chirurgická sada 手術キット 봉합 키트 @@ -2402,7 +2450,7 @@ Operationsset für fortgeschrittene medizinische Feldversorgung Sebészeti készlet komplex orvosi feladatok terepen való ellátására Kit chirurgico per trattamenti avanzati sul campo. - Kit Cirurgico para uso de tratamento médico avançado em campo + Kit Cirúrgico para uso de tratamento médico avançado em campo Chirurgická sada určená k pokročilejším zdravotnickým zákrokům v poli 手術キットは戦場で高度な処置をする為に用いる 야전 상황에서 고급 의료 처치를 위해 사용되는 봉합 키트 @@ -2419,7 +2467,7 @@ Trousse chirurgicale pour le traitement avancé sur le terrain. Sebészeti készlet komplex orvosi feladatok terepen való ellátására Kit chirurgico per trattamenti avanzati sul campo. - Kit Cirurgico para uso de tratamento médico avançado em campo. + Kit Cirúrgico para uso de tratamento médico avançado em campo. Chirurgická sada určená k pokročilejším zdravotnickým zákrokům v poli 手術キットは戦場で高度な処置をする為に用いる 야전 상황에서 고급 의료 처치를 위해 사용되는 봉합 키트 @@ -2454,6 +2502,7 @@ 봉합술 Suture Нить + Sutura Surgical Suture for stitching injuries. @@ -2465,6 +2514,7 @@ 상처를 꿰메는 수술용 봉합술. Suture chirurgicale pour suturer les blessures. Хирургическая нить для зашивания травм. + Sutura cirúrgica para fechar feridas. Surgical Suture for stitching injuries. @@ -2476,6 +2526,7 @@ 상처를 꿰메는 수술용 봉합술. Suture chirurgicale pour suturer les blessures. Хирургическая нить для зашивания травм. + Sutura cirúrgica para fechar feridas. Bodybag @@ -4147,7 +4198,7 @@ %1 is not responsive %1 не реагирует на раздражители - %1 est inconscient. + %1 ne répond pas aux stimuli %1 no reacciona %1 jest nieprzytomny %1 ist nicht ansprechbar @@ -4168,6 +4219,7 @@ %1은(는) 의식불명입니다 %1 ist bewusstlos %1 è privo di sensi + %1 est inconscient %1 is not responsive, taking shallow gasps and convulsing @@ -4180,6 +4232,7 @@ %1 은 반응이 없고, 얕은 헐떡임과 경련증세를 보입니다 %1 не реагирует на раздражители, поверхностно дышит, в конвульсиях %1 no responde, dando pequeñas bocanadas y convulsionando + %1 está inconsciente, com respiração curta e convulsionando %1 is in cardiac arrest @@ -4188,6 +4241,7 @@ %1은(는) 심정지 상태입니다 %1 ist im Herzstillstand %1 è in arresto cardiaco + %1 est en arrêt cardiaque %1 is not responsive, motionless and cold @@ -4200,6 +4254,7 @@ %1 은 반응이 없고, 움직임이 없으며 차갑습니다 %1 не реагирует на раздражители, не шевелится и холодный %1 no responde, sin movimiento y frío + %1 está inconsciente, sem movimento e frio %1 is dead @@ -4208,6 +4263,7 @@ %1은(는) 사망했습니다 %1 ist tod %1 è morto + %1 est mort You checked %1 @@ -4694,6 +4750,7 @@ 墓を掘る Выкопать могилу для тела Cavar tumba para cuerpo + Escavar cova para cadáver Digging grave for body... @@ -4705,6 +4762,7 @@ 墓を掘っています Рытьё могилы для тела... Cavando tumba para cuerpo... + Escavando cova para cadáver... %1 has bandaged patient @@ -4947,6 +5005,7 @@ Der Körper zuckte und kann nicht tot sein! 身体抽搐了一下,可能还没死! 꿈틀대는걸 보니 죽은 것 같지는 않습니다! + O corpo se retorceu e pode não estar morto! Check name on headstone @@ -4958,6 +5017,7 @@ 墓石の名前を確認 Проверьте имя на надгробии Comprobar nombre en la lápida + Checar nome na lápide Bandage Rollover @@ -4969,6 +5029,7 @@ 包帯の繰り越し Перевязка множественных ран Vendaje múltiple + Bandagem de Múltiplas Feridas If enabled, bandages can close different types of wounds on the same body part.\nBandaging multiple injuries will scale bandaging time accordingly. @@ -4980,6 +5041,7 @@ 有効にすると、体の同じ部分にある別の種類の傷を一つの包帯で閉じることができます。\n複数の傷に包帯を巻くと、それに応じて包帯時間が変動します。 Если эта функция включена, бинты могут закрывать различные типы ран на одной и той же части тела.\nПри перевязке нескольких повреждений время перевязки будет увеличено соответствующим образом. Si se habilita, las vendas pueden cerrar diferentes tipos de heridas en la misma parte del cuerpo.n\Vendar múltiples heridas escala el tiempo de vendado acorde. + Se habilitado, bandagens podem fechar diferentes tipos de ferimento na mesma parte do corpo.\nO fechamento de múltiplas feridas modificará o tempo de aplicação proporcionalmente. Bandage Effectiveness Coefficient @@ -4991,6 +5053,7 @@ 包帯有効性係数 Коэф. эффективности повязки Coeficiente de Efectividad de Vendado + Coeficiente de Eficácia da Bandagem Determines how effective bandages are at closing wounds. @@ -5002,6 +5065,7 @@ 包帯が傷をふさぐのにどれだけ効果的かを定義します。 Определяет, насколько эффективны бинты при закрытии ран. Determina como de efectivos son los vendajes cerrando heridas. + Determina o quão efetivas as bandagens são em fechar ferimentos. Medical Items @@ -5016,6 +5080,7 @@ Medizinisches Material 医療品 Objetos médicos + Objetos médicos Zeus Treatment Time Coefficient diff --git a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf index c284b00701d..77aec7fd621 100644 --- a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf @@ -85,17 +85,17 @@ if (_adjustments isNotEqualTo []) then { private _timeInSystem = CBA_missionTime - _timeAdded; if (_timeInSystem >= _maxTimeInSystem) then { _deleted = true; - _adjustments set [_forEachIndex, objNull]; + _adjustments deleteAt _forEachIndex; } else { private _effectRatio = (((_timeInSystem / _timeTillMaxEffect) ^ 2) min 1) * (_maxTimeInSystem - _timeInSystem) / _maxTimeInSystem; if (_hrAdjust != 0) then { _hrTargetAdjustment = _hrTargetAdjustment + _hrAdjust * _effectRatio; }; if (_painAdjust != 0) then { _painSupressAdjustment = _painSupressAdjustment + _painAdjust * _effectRatio; }; if (_flowAdjust != 0) then { _peripheralResistanceAdjustment = _peripheralResistanceAdjustment + _flowAdjust * _effectRatio; }; }; - } forEach _adjustments; + } forEachReversed _adjustments; if (_deleted) then { - _unit setVariable [VAR_MEDICATIONS, _adjustments - [objNull], true]; + _unit setVariable [VAR_MEDICATIONS, _adjustments, true]; _syncValues = true; }; }; diff --git a/addons/medical_vitals/functions/fnc_updatePeripheralResistance.sqf b/addons/medical_vitals/functions/fnc_updatePeripheralResistance.sqf index 30f8038d80f..05056fa0a33 100644 --- a/addons/medical_vitals/functions/fnc_updatePeripheralResistance.sqf +++ b/addons/medical_vitals/functions/fnc_updatePeripheralResistance.sqf @@ -20,4 +20,4 @@ params ["_unit", "_peripheralResistanceAdjustment", "_deltaT", "_syncValue"]; -_unit setVariable [VAR_PERIPH_RES, 0 max (DEFAULT_PERIPH_RES + _peripheralResistanceAdjustment), _syncValue]; +_unit setVariable [VAR_PERIPH_RES, 1 max (DEFAULT_PERIPH_RES + _peripheralResistanceAdjustment), _syncValue]; diff --git a/addons/medical_vitals/stringtable.xml b/addons/medical_vitals/stringtable.xml index 2fe7336dc08..25b278732ea 100644 --- a/addons/medical_vitals/stringtable.xml +++ b/addons/medical_vitals/stringtable.xml @@ -21,6 +21,7 @@ Activer la simulation de la SpO2 SpO2-Simulation aktivieren Habilitar Simulación SpO2 + Habilitar simulação de SpO2 Enables oxygen saturation simulation, providing variable heart rate and oxygen demand based on physical activity and altitude. Required for Airway Management. @@ -31,6 +32,7 @@ Permet de simuler la saturation en oxygène, de modifier la fréquence cardiaque et la consommation d'oxygène en fonction de l'activité physique et de l'altitude. Nécessaire pour la gestion des voies respiratoires. Aktiviert die Simulation der Sauerstoffsättigung und bietet variable Herzfrequenz und Sauerstoffbedarf basierend auf körperlicher Aktivität und Geländehöhe. Erforderlich für das Atemwegsmanagement. Habilita la saturación de oxígeno, utilizando la demanda de oxígeno y ritmo cardíaco basado en la actividad física y la altitud. Requerido para el Manejo de las Vías Aéreas. + Habilita a saturação de oxigênio, tornando variáveis o batimento cardíaco e demanda de oxigênio baseados em atividade física e altitude. Necessário para o gerenciamento de vias aéreas. diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index c9bd546afce..0aa0dafacf0 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -605,6 +605,7 @@ MicroDAGR - Poprzedni Tryb 微型 GPS 接收器—上一个模式 마이크로DAGR - 이전 모드 + MicroDAGR - Modo Anterior MicroDAGR - Next Mode @@ -617,6 +618,7 @@ MicroDAGR - Kolejny Tryb 微型 GPS 接收器—下一个模式 마이크로DAGR - 다음 모드 + MicroDAGR - Modo Seguinte diff --git a/addons/nightvision/XEH_postInit.sqf b/addons/nightvision/XEH_postInit.sqf index 5a1aa19b82e..2933877771c 100644 --- a/addons/nightvision/XEH_postInit.sqf +++ b/addons/nightvision/XEH_postInit.sqf @@ -21,6 +21,9 @@ GVAR(ppeffectRadialBlur) = -1; GVAR(ppeffectColorCorrect) = -1; GVAR(ppeffectBlur) = -1; +if (isNil QGVAR(const_MaxBrightness)) then { GVAR(const_MaxBrightness) = 0; }; +if (isNil QGVAR(const_MinBrightness)) then { GVAR(const_MinBrightness) = -6; }; + GVAR(isUsingMagnification) = false; ["CBA_settingsInitialized", { diff --git a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf index 1697fa907e8..d0b210fe295 100644 --- a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf +++ b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf @@ -23,7 +23,7 @@ private _effectsEnabled = GVAR(effectScaling) != 0; private _defaultBrightness = [-3, 0] select _effectsEnabled; private _brightness = _player getVariable [QGVAR(NVGBrightness), _defaultBrightness]; -_brightness = ((_brightness + _changeInBrightness) min 0) max -6; +_brightness = ((_brightness + _changeInBrightness) min GVAR(const_MaxBrightness)) max GVAR(const_MinBrightness); _player setVariable [QGVAR(NVGBrightness), _brightness, false]; // Display default setting as 0 diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index 1c1cd61ba7a..1911681dd68 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -28,6 +28,7 @@ 夜视仪(一代,棕色) 아투경 (1세대, 갈색) Gafas de visión nocturna (Gen1, Marrón) + Óculos de Visão Noturna (Gen1, Marrom) NV Goggles (Gen1, Black) @@ -40,6 +41,7 @@ 夜视仪(一代,黑色) 아투경 (1세대, 검정) Gafas de visión nocturna (Gen1, Negro) + Óculos de Visão Noturna (Gen1, Preto) NV Goggles (Gen1, Green) @@ -52,6 +54,7 @@ 夜视仪(一代,绿色) 아투경 (1세대, 녹색) Gafas de visión nocturna (Gen1, Verde) + Óculos de Visão Noturna (Gen1, Verde) NV Goggles (Gen2, Brown) @@ -64,6 +67,7 @@ 夜视仪(二代,棕色) 아투경 (2세대, 갈색) Gafas de visión nocturna (Gen2, Marrón) + Óculos de Visão Noturna (Gen2, Marrom) NV Goggles (Gen2, Black) @@ -76,6 +80,7 @@ 夜视仪(二代,黑色) 아투경 (2세대, 검정) Gafas de visión nocturna (Gen2, Negro) + Óculos de Visão Noturna (Gen2, Preto) NV Goggles (Gen2, Green) @@ -88,6 +93,7 @@ 夜视仪(二代,绿色) 아투경 (2세대, 녹색) Gafas de visión nocturna (Gen2, Verde) + Óculos de Visão Noturna (Gen2, Verde) NV Goggles (Gen3) @@ -96,7 +102,7 @@ NS-Brille (3. Gen.) Visore Notturno (Gen3) Gogle noktowizyjne (Gen3) - Óculos de visão noturna (Gen3) + Óculos de Visão Noturna (Gen3) ПНВ (Gen3) Gafas de visión nocturna (Gen3) Éjjellátó szemüveg (3. Gen.) @@ -113,7 +119,7 @@ NS-Brille (3. Gen., braun) Visore Notturno (Gen3, Marrone) Gogle noktowizyjne (Gen3, Brązowe) - Óculos de visão noturna (Gen3, marrons) + Óculos de Visão Noturna (Gen3, Marrom) ПНВ (Gen3, Коричневый) Gafas de visión nocturna (Gen3, Marrón) Éjjellátó szemüveg (3. Gen., barna) @@ -133,6 +139,7 @@ JVN (Gen3, marron, WP) ПНВ (Gen3, Коричневый, БФ) Gafas de visión nocturna (Gen3, Marrón, FB) + Óculos de Visão Noturna (Gen3, Marrom, FB) Night Vision Goggles, White Phosphor @@ -144,6 +151,7 @@ Jumelles Vision Nocturne, Phosphore blanc Очки ночного видения, белый фосфор Gafas de Visión Nocturna, Fósforo Blanco + Óculos de Visão Nortuna, Fósforo Branco NV Goggles (Gen3, Green) @@ -152,7 +160,7 @@ NS-Brille (3. Gen., grün) Visore Notturno (Gen3, Verde) Gogle noktowizyjne (Gen3, Zielone) - Óculos de visão noturna (Gen3, verdes) + Óculos de Visão Noturna (Gen3, verdes) ПНВ (Gen3, Зелёный) Gafas de visión nocturna (Gen3, Verde) Éjjellátó szemüveg (3. Gen., zöld) @@ -172,6 +180,7 @@ JVN (Gen3, vertes, WP) ПНВ (Gen3, Зелёный, БФ) Gafas de visión nocturna (Gen3, Verde, FB) + Óculos de Visão Noturna (Gen3, Verde, FB) NV Goggles (Gen3, Black) @@ -180,7 +189,7 @@ NS-Brille (3. Gen., schwarz) Visore Notturno (Gen3, Nero) Gogle noktowizyjne (Gen3, Czarne) - Óculos de visão noturna (Gen3, pretos) + Óculos de Visão Noturna (Gen3, Preto) ПНВ (Gen3, Чёрный) Gafas de visión nocturna (Gen3, Negro) Éjjellátó szemüveg (3. Gen., fekete) @@ -200,6 +209,7 @@ JVN (Gen3, noires, WP) ПНВ (Gen3, Чёрный, БФ) Gafas de visión nocturna (Gen3, Negro, FB) + Óculos de Visão Noturna (Gen3, Preto, FB) NV Goggles (Gen4, Brown) @@ -212,6 +222,7 @@ 夜视仪(四代,棕色) 야투경 (4세대, 갈색) Gafas de visión nocturna (Gen4, Marrón) + Óculos de Visão Noturna (Gen4, Marrom) NV Goggles (Gen4, Brown, WP) @@ -223,6 +234,7 @@ JVN (Gen4, marron, WP) ПНВ (Gen4, Коричневый, БФ) Gafas de visión nocturna (Gen4, Marrón, FB) + Óculos de Visão Noturna (Gen4, Marrom, FB) NV Goggles (Gen4, Black) @@ -235,6 +247,7 @@ 夜视仪(四代,黑色) 야투경 (4세대, 검정) Gafas de visión nocturna (Gen4, Negro) + Óculos de Visão Noturna (Gen4, Preto) NV Goggles (Gen4, Black, WP) @@ -246,6 +259,7 @@ JVN (Gen4, noires, WP) ПНВ (Gen4, Чёрный, БФ) Gafas de visión nocturna (Gen4, Negro, FB) + Óculos de Visão Noturna (Gen4, Preto, FB) NV Goggles (Gen4, Green) @@ -258,6 +272,7 @@ 夜视仪(四代,绿色) 야투경 (4세대, 녹색) Gafas de visión nocturna (Gen4, Verde) + Óculos de Visão Noturna (Gen4, Verde) NV Goggles (Gen4, Green, WP) @@ -269,6 +284,7 @@ JVN (Gen4, vertes, WP) ПНВ (Gen4, Зелёный, БФ) Gafas de visión nocturna (Gen4, Verde, FB) + Óculos de Visão Noturna (Gen4, Verde, FB) NV Goggles (Wide, Brown) @@ -281,6 +297,7 @@ 夜视仪(宽,棕色) 야투경 (넓음, 갈색) Gafas de visión nocturna (Panorámicas, Marrón) + Óculos de Visão Noturna (Panorâmico, Marrom) NV Goggles (Wide, Brown, WP) @@ -292,6 +309,7 @@ JVN (Large, marron, WP) ПНВ (Широкий, Коричневый, БФ) Gafas de visión nocturna (Panorámicas, Marrón, FB) + Óculos de Visão Noturna (Panorâmico, Marrom, FB) NV Goggles (Wide, Black) @@ -304,6 +322,7 @@ 夜视仪(宽,黑色) 야투경 (넓음, 검정) Gafas de visión nocturna (Panorámicas, Negro) + Óculos de Visão Noturna (Panorâmico, Preto) NV Goggles (Wide, Black, WP) @@ -315,6 +334,7 @@ JVN (Large, noires, WP) ПНВ (Широкий, Чёрный, БФ) Gafas de visión nocturna (Panorámicas, Negro, FB) + Óculos de Visão Noturna (Panorâmico, Preto, FB) NV Goggles (Wide, Green) @@ -327,6 +347,7 @@ 夜视仪(宽,绿色) 야투경 (넓음, 녹색) Gafas de visión nocturna (Panorámicas, Verde) + Óculos de Visão Noturna (Panorâmico, Verde) NV Goggles (Wide, Green, WP) @@ -338,6 +359,7 @@ JVN (Large, vertes, WP) ПНВ (Широкий, Зелёный, БФ) Gafas de visión nocturna (Panorámicas, Verde, FB) + Óculos de Visão Noturna (Panorâmico, Verde, FB) Brightness: %1 @@ -365,7 +387,7 @@ Augmenter la luminosité des JVN Увеличить яркость ПНВ Éjjellátó fényerejének növelése - Aumentar Luminosidade do EVN + Aumentar Luminosidade do OVN Aumenta la luminosità dell'NVG 暗視装置の明度を上げる 야투경 밝기 높이기 @@ -382,7 +404,7 @@ Abaisser la luminosité des JVN Уменьшить яркость ПНВ Éjjellátó fényerejének csökkentése - Diminuir Luminosidade do EVN + Diminuir Luminosidade do OVN Riduci la luminosità dell'NVG 暗視装置の明度を下げる 야투경 밝기 줄이기 @@ -598,6 +620,7 @@ Génération de jumelles de vision nocturne Генерация ночного видения Generación de Visión Nocturna + Geração de Visão Noturna Gen %1 @@ -609,6 +632,7 @@ Gen %1 Генерация %1 Gen %1 + Gen %1 diff --git a/addons/noradio/stringtable.xml b/addons/noradio/stringtable.xml index d1cf51f0e6a..d41827ebfad 100644 --- a/addons/noradio/stringtable.xml +++ b/addons/noradio/stringtable.xml @@ -12,6 +12,7 @@ Нет рации No Radio Pas de radio + Sem Rádio Mute Player diff --git a/addons/novehicleclanlogo/stringtable.xml b/addons/novehicleclanlogo/stringtable.xml index 96d463f582d..1e07c85ce8c 100644 --- a/addons/novehicleclanlogo/stringtable.xml +++ b/addons/novehicleclanlogo/stringtable.xml @@ -11,6 +11,7 @@ Clan-Logo von Fahrzeugen entfernen Rimuovi Icone Clan dai veicoli Retirer les logos de clan des véhicules + Remover logo do clã de veículos Prevents clan logo from being displayed on vehicles controlled by players. @@ -22,6 +23,7 @@ Verhindert, dass das Clan-Logo auf von Spielern kontrollierten Fahrzeugen angezeigt wird. Impedisce la visualizzazione di icone clan sui veicoli controllati da giocatori. Empêche les logos de clan d'être affichés sur les véhicules contrôlés par des joueurs. + Previne o logo do clã de ser mostrado em veículos controlados por jogadores. diff --git a/addons/optics/CfgEventHandlers.hpp b/addons/optics/CfgEventHandlers.hpp deleted file mode 100644 index f6503c2479b..00000000000 --- a/addons/optics/CfgEventHandlers.hpp +++ /dev/null @@ -1,17 +0,0 @@ -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)); - }; -}; diff --git a/addons/optics/CfgOpticsEffect.hpp b/addons/optics/CfgOpticsEffect.hpp deleted file mode 100644 index 30c372fdac4..00000000000 --- a/addons/optics/CfgOpticsEffect.hpp +++ /dev/null @@ -1,7 +0,0 @@ -class CfgOpticsEffect { - class ACE_OpticsRadBlur1 { - type = "radialblur"; - params[] = {0.015, 0, 0.14, 0.2}; - priority = 950; - }; -}; diff --git a/addons/optics/CfgPreloadTextures.hpp b/addons/optics/CfgPreloadTextures.hpp index 1354f91e18e..b4bf27f76ff 100644 --- a/addons/optics/CfgPreloadTextures.hpp +++ b/addons/optics/CfgPreloadTextures.hpp @@ -1,49 +1,38 @@ -#define MACRO_PRELOAD \ - GVAR(BodyDay) = "*"; \ - GVAR(BodyNight) = "*"; \ - GVAR(ReticleDay) = "*"; \ - GVAR(ReticleNight) = "*" - class PreloadTextures { class CfgWeapons { class ACE_optic_Hamr_2D { - MACRO_PRELOAD; + PRELOAD; }; - class ACE_optic_Hamr_PIP { - MACRO_PRELOAD; + PRELOAD; }; class ACE_optic_Arco_2D { - MACRO_PRELOAD; + PRELOAD; }; - class ACE_optic_Arco_PIP { - MACRO_PRELOAD; + PRELOAD; }; class ACE_optic_MRCO_2D { - MACRO_PRELOAD; + PRELOAD; }; - class ACE_optic_MRCO_PIP { - MACRO_PRELOAD; + PRELOAD; }; class ACE_optic_SOS_2D { - MACRO_PRELOAD; + PRELOAD; }; - class ACE_optic_SOS_PIP { - MACRO_PRELOAD; + PRELOAD; }; class ACE_optic_LRPS_2D { - MACRO_PRELOAD; + PRELOAD; }; - class ACE_optic_LRPS_PIP { - MACRO_PRELOAD; + PRELOAD; }; }; }; diff --git a/addons/optics/CfgRscTitles.hpp b/addons/optics/CfgRscTitles.hpp deleted file mode 100644 index bb01281a22f..00000000000 --- a/addons/optics/CfgRscTitles.hpp +++ /dev/null @@ -1,204 +0,0 @@ -class RscOpticsValue; -class RscMapControl; -class RscText; - -class RscInGameUI { - class RscUnitInfo; - class RscWeaponZeroing: RscUnitInfo { - class CA_Zeroing; - }; - - class ACE_RscWeaponZeroing: RscWeaponZeroing { - controls[] = {"CA_Zeroing", "CA_FOVMode", "ACE_DrawReticleHelper", "ACE_ScriptedReticle"}; - - class CA_FOVMode: RscOpticsValue { // Idea by Taosenai. Apparently this can be used via isNil check to determine wheter the scope or the kolimator is used - idc = 154; - style = 2; - colorText[] = {0, 0, 0, 0}; - x = 0; - y = 0; - w = 0; - h = 0; - }; - - class ACE_DrawReticleHelper: RscMapControl { - onDraw = QUOTE([ctrlParent (_this select 0)] call DFUNC(onDrawScope)); - idc = -1; - w = 0; - h = 0; - }; - - class ACE_ScriptedReticle: RscText { - idc = 1713154; - style = 48; - size = 1; - sizeEx = 0; - text = QPATHTOF(reticles\ace_shortdot_reticle_1.paa); - w = 0; - h = 0; - }; - }; - - class ACE_RscWeapon_base: RscWeaponZeroing { - controls[] = {"CA_Zeroing", "CA_FOVMode", "ACE_DrawReticleHelper", "ReticleDay", "ReticleNight", "BodyNight", "BodyDay", "trippleHeadLeft", "trippleHeadRight"}; // Don't change this order - - class CA_FOVMode: RscOpticsValue { // Idea by Taosenai. Apparently this can be used via isNil check to determine wheter the scope or the kolimator is used - idc = 154; - style = 2; - colorText[] = {0, 0, 0, 0}; - x = 0; - y = 0; - w = 0; - h = 0; - }; - - class ACE_DrawReticleHelper: RscMapControl { - onDraw = QUOTE([ctrlParent (_this select 0)] call DFUNC(onDrawScope2D)); - idc = -1; - w = 0; - h = 0; - }; - - #define SIZEX 0.75/(getResolution select 5) - class ReticleDay: RscText { - idc = 1713001; - style = 48; - size = 0; - sizeEx = 1; - text = ""; - colorText[] = {1, 1, 1, 0}; - colorBackground[] = {0, 0, 0, 0}; - x = QUOTE(safezoneX + 0.5 * safezoneW - 0.5 * SIZEX); - y = QUOTE(safezoneY + 0.5 * safezoneH - 0.5 * SIZEX * (4 / 3)); - w = QUOTE(SIZEX); - h = QUOTE(SIZEX * (4 / 3)); - }; - - class ReticleNight: ReticleDay { - idc = 1713002; - text = ""; - }; - - #undef SIZEX - #define SIZEX 2*0.75/(getResolution select 5) - class BodyDay: ReticleDay { - idc = 1713005; - text = ""; - x = QUOTE(safezoneX + 0.5 * safezoneW - 0.5 * SIZEX); - y = QUOTE(safezoneY + 0.5 * safezoneH - 0.5 * SIZEX * (4 / 3)); - w = QUOTE(SIZEX); - h = QUOTE(SIZEX * (4 / 3)); - }; - - class BodyNight: BodyDay { - idc = 1713006; - text = ""; - }; - - // These are just black side panels to cover the areas that the optics p3d doesn't cover - // It will ONLY effect tripple head users as (safezoneX == safeZoneXAbs) for everyone else - // Reference PR #1156: - class trippleHeadLeft: RscText { - idc = 1713010; - x = "safeZoneXAbs"; - Y = "safezoneY"; - W = "(safezoneX - safeZoneXAbs) * ((getResolution select 4) / (16 / 3))"; - H = "safeZoneH"; - colorBackground[] = {0, 0, 0, 1}; - }; - class trippleHeadRight: trippleHeadLeft { - idc = 1713011; - x = "safeZoneXAbs + safeZoneWAbs - (safezoneX - safeZoneXABS) * ((getResolution select 4) / (16 / 3))"; - colorBackground[] = {0, 0, 0, 1}; - }; - }; - - class ACE_RscWeapon_Hamr: ACE_RscWeapon_base { - class ReticleDay: ReticleDay { - text = QPATHTOF(reticles\hamr-reticle65_ca.paa); - }; - - class ReticleNight: ReticleNight { - text = QPATHTOF(reticles\hamr-reticle65Illum_ca.paa); - }; - - class BodyDay: BodyDay { - text = QPATHTOF(reticles\hamr-body_ca.paa); - }; - - class BodyNight: BodyNight { - text = QPATHTOF(reticles\hamr-bodyNight_ca.paa); - }; - }; - - class ACE_RscWeapon_Arco: ACE_RscWeapon_base { - class ReticleDay: ReticleDay { - text = QPATHTOF(reticles\arco-reticle65_ca.paa); - }; - - class ReticleNight: ReticleNight { - text = QPATHTOF(reticles\arco-reticle65Illum_ca.paa); - }; - - class BodyDay: BodyDay { - text = QPATHTOF(reticles\arco-body_ca.paa); - }; - - class BodyNight: BodyNight { - text = QPATHTOF(reticles\arco-bodyNight_ca.paa); - }; - }; - - class ACE_RscWeapon_MRCO: ACE_RscWeapon_base { - class ReticleDay: ReticleDay { - text = QPATHTOF(reticles\mrco-reticle556_ca.paa); - }; - - class ReticleNight: ReticleNight { - text = QPATHTOF(reticles\mrco-reticle556Illum_ca.paa); - }; - - class BodyDay: BodyDay { - text = QPATHTOF(reticles\mrco-body_ca.paa); - }; - - class BodyNight: BodyNight { - text = QPATHTOF(reticles\mrco-bodyNight_ca.paa); - }; - }; - - class ACE_RscWeapon_SOS: ACE_RscWeapon_base { - class ReticleDay: ReticleDay { - text = QPATHTOF(reticles\sos-reticleMLR_ca.paa); - }; - - class ReticleNight: ReticleNight { - text = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa); - }; - - class BodyDay: BodyDay { - text = QPATHTOF(reticles\sos-body_ca.paa); - }; - - class BodyNight: BodyNight { - text = QPATHTOF(reticles\sos-bodyNight_ca.paa); - }; - }; -}; - -/* - -_ctrl = (D displayCtrl 1713006); - -_sizeX = 1.54 / (getResolution select 5); -_sizeY = _sizeX * safezoneW / safezoneH; - -_ctrl ctrlSetPosition [ - safezoneX + 0.5 * safezoneW - 0.5 * _sizeX, - safezoneY + 0.5 * safezoneH - 0.5 * _sizeY, - _sizeX, - _sizeY -]; -_ctrl ctrlCommit 0 - - */ diff --git a/addons/optics/CfgVehicles.hpp b/addons/optics/CfgVehicles.hpp index eda9a3d930c..41e2d8ab039 100644 --- a/addons/optics/CfgVehicles.hpp +++ b/addons/optics/CfgVehicles.hpp @@ -3,16 +3,10 @@ class CfgVehicles { class ACE_Box_Misc: Box_NATO_Support_F { class TransportItems { MACRO_ADDITEM(ACE_optic_Hamr_2D,2); - MACRO_ADDITEM(ACE_optic_Hamr_PIP,2); MACRO_ADDITEM(ACE_optic_Arco_2D,2); - MACRO_ADDITEM(ACE_optic_Arco_PIP,2); MACRO_ADDITEM(ACE_optic_MRCO_2D,2); - //MACRO_ADDITEM(ACE_optic_MRCO_PIP,2); MACRO_ADDITEM(ACE_optic_SOS_2D,2); - MACRO_ADDITEM(ACE_optic_SOS_PIP,2); MACRO_ADDITEM(ACE_optic_LRPS_2D,2); - MACRO_ADDITEM(ACE_optic_LRPS_PIP,2); - //MACRO_ADDITEM(ACE_optic_DMS,2); }; }; }; diff --git a/addons/optics/CfgWeapons.hpp b/addons/optics/CfgWeapons.hpp index 8088a5fcd36..90cccb32866 100644 --- a/addons/optics/CfgWeapons.hpp +++ b/addons/optics/CfgWeapons.hpp @@ -1,110 +1,62 @@ class CfgWeapons { class ItemCore; class InventoryOpticsItem_Base_F; - class Default; - - class Binocular: Default { - forceOptics = 0; // Allow using compass with Binocular - opticsZoomMin = 0.056889; // 5.25x power - opticsZoomMax = 0.056889; // 9 px/mil - modelOptics = "\z\ace\addons\optics\models\NWD_M22_5x"; // 7 degrees horizontal field of view - visionMode[] = {"Normal"}; // Can't use nvgs with binoculars any more than you can with scopes - // Fix AI using Binocs on short range - #18737 - // minRange = 300; // 300 = uses Rangefinder often (runs a few meters, stops, uses RF, repeats) - minRange = 500; //500 = seem almost never use it..? - minRangeProbab = 0.001; - midRange = 1000; - midRangeProbab = 0.01; - maxRange = 5000; - maxRangeProbab = 0.01; - }; - // zooming reticle scopes - class optic_DMS: ItemCore { + // HAMR + class optic_Hamr: ItemCore { class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { - class Snip; - class Iron; + class Hamr2Scope; + class Hamr2Collimator; }; }; }; - /*class ACE_optic_DMS: optic_DMS { + class ACE_optic_Hamr_2D: optic_Hamr { author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_DMS"; - scope = 1; - displayName = "LOCALIZE ACE DMS"; - //descriptionShort = "$STR_A3_CFGWEAPONS_ACC_DMS1"; - weaponInfoType = "ACE_RscWeaponZeroing"; + scope = 2; + displayName = CSTRING(hamr); - class ItemInfo: ItemInfo { - modelOptics = QPATHTOF(models\ace_shortdot_optics.p3d); + class CBA_ScriptedOptic { + opticsPPEffects[] = {"CBA_OpticsRadBlur3"}; - class OpticsModes: OpticsModes { - class Snip: Snip { - opticsZoomMin = 0.05; - opticsZoomMax = 0.3; - opticsZoomInit = 0.3; - discretefov[] = {}; - modelOptics[] = {}; - }; + reticleTexture = QPATHTOF(reticles\hamr-reticle65_ca.paa); + reticleTextureNight = QPATHTOF(reticles\hamr-reticle65Illum_ca.paa); + reticleTextureSize = 6 / 25 * 4; // At 25x using https://github.com/CBATeam/CBA_A3/wiki/Scripted-Optics#debug-reticle, the best choice is 6 - class Iron: Iron {}; - }; - }; - };*/ + bodyTexture = QPATHTOF(reticles\hamr-body_ca.paa); + bodyTextureNight = QPATHTOF(reticles\hamr-bodyNight_ca.paa); + bodyTextureSize = 2.2; - // PIP scopes - class optic_Hamr: ItemCore { - class ItemInfo: InventoryOpticsItem_Base_F { - class OpticsModes { - class Hamr2Collimator; - class Hamr2Scope; - }; + hideMagnification = 1; }; - }; - - class ACE_optic_Hamr_2D: optic_Hamr { - GVAR(BodyDay) = QPATHTOF(reticles\hamr-body_ca.paa); - GVAR(BodyNight) = QPATHTOF(reticles\hamr-bodyNight_ca.paa); - GVAR(ReticleDay) = QPATHTOF(reticles\hamr-reticle65_ca.paa); - GVAR(ReticleNight) = QPATHTOF(reticles\hamr-reticle65Illum_ca.paa); - - author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_Hamr_2D"; - displayName = CSTRING(hamr); - weaponInfoType = "ACE_RscWeapon_Hamr"; + weaponInfoType = "CBA_ScriptedOptic"; class ItemInfo: ItemInfo { - modelOptics = QPATHTOF(models\ace_optics_reticle90.p3d); + modelOptics = "\x\cba\addons\optics\cba_optic_big_90.p3d"; class OpticsModes: OpticsModes { - class Hamr2Collimator: Hamr2Collimator {}; - class Hamr2Scope: Hamr2Scope { useModelOptics = 1; - opticsZoomInit = 0.0872664626; - opticsZoomMax = 0.0872664626; - opticsZoomMin = 0.0872664626; - opticsPPEffects[] = {"OpticsCHAbera5", "OpticsBlur5", "ACE_OpticsRadBlur1"}; - opticsDisablePeripherialVision = 0; - visionMode[] = {"Normal", "NVG"}; + opticsZoomInit = 0.25 / 4; + opticsZoomMax = 0.25 / 4; + opticsZoomMin = 0.25 / 4; }; + class Hamr2Collimator: Hamr2Collimator {}; }; }; }; - class ACE_optic_Hamr_PIP: ACE_optic_Hamr_2D { author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_Hamr_PIP"; - //scopeArsenal = 1; + scope = 1; displayName = CSTRING(hamr_pip); class ItemInfo: ItemInfo { - modelOptics = QPATHTOF(models\ace_optics_pip.p3d); + modelOptics = "\x\cba\addons\optics\cba_optic_big_pip.p3d"; }; }; + // ARCO class optic_Arco: ItemCore { class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { @@ -115,95 +67,104 @@ class CfgWeapons { }; class ACE_optic_Arco_2D: optic_Arco { - GVAR(BodyDay) = QPATHTOF(reticles\arco-body_ca.paa); - GVAR(BodyNight) = QPATHTOF(reticles\arco-bodyNight_ca.paa); - GVAR(ReticleDay) = QPATHTOF(reticles\arco-reticle65_ca.paa); - GVAR(ReticleNight) = QPATHTOF(reticles\arco-reticle65Illum_ca.paa); - author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_Arco_2D"; + scope = 2; displayName = CSTRING(arco); - weaponInfoType = "ACE_RscWeapon_Arco"; + + class CBA_ScriptedOptic { + opticsPPEffects[] = {"CBA_OpticsRadBlur3"}; + + reticleTexture = QPATHTOF(reticles\arco-reticle65_ca.paa); + reticleTextureNight = QPATHTOF(reticles\arco-reticle65Illum_ca.paa); + reticleTextureSize = 6.4 / 25 * 4; // At 25x using https://github.com/CBATeam/CBA_A3/wiki/Scripted-Optics#debug-reticle, the best choice is 6.4 + + bodyTexture = QPATHTOF(reticles\arco-body_ca.paa); + bodyTextureNight = QPATHTOF(reticles\arco-bodyNight_ca.paa); + bodyTextureSize = 2.2; + + hideMagnification = 1; + }; + weaponInfoType = "CBA_ScriptedOptic"; class ItemInfo: ItemInfo { - modelOptics = QPATHTOF(models\ace_optics_reticle90.p3d); + modelOptics = "\x\cba\addons\optics\cba_optic_big_90.p3d"; class OpticsModes: OpticsModes { - class ARCO2collimator: ARCO2collimator {}; class ARCO2scope: ARCO2scope { useModelOptics = 1; - opticsZoomInit = 0.0872664626; - opticsZoomMax = 0.0872664626; - opticsZoomMin = 0.0872664626; - opticsPPEffects[] = {"OpticsCHAbera5", "OpticsBlur5", "ACE_OpticsRadBlur1"}; - opticsDisablePeripherialVision = 0; - visionMode[] = {"Normal"}; + opticsZoomInit = 0.25 / 4; + opticsZoomMax = 0.25 / 4; + opticsZoomMin = 0.25 / 4; }; + class ARCO2collimator: ARCO2collimator {}; }; }; }; - class ACE_optic_Arco_PIP: ACE_optic_Arco_2D { author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_Arco_PIP"; - //scopeArsenal = 1; + scope = 1; displayName = CSTRING(arco_pip); class ItemInfo: ItemInfo { - modelOptics = QPATHTOF(models\ace_optics_pip.p3d); + modelOptics = "\x\cba\addons\optics\cba_optic_big_pip.p3d"; }; }; + // MRCO class optic_MRCO: ItemCore { class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { - class MRCOcq; class MRCOscope; + class MRCOcq; }; }; }; class ACE_optic_MRCO_2D: optic_MRCO { - GVAR(BodyDay) = QPATHTOF(reticles\mrco-body_ca.paa); - GVAR(BodyNight) = QPATHTOF(reticles\mrco-bodyNight_ca.paa); - GVAR(ReticleDay) = QPATHTOF(reticles\mrco-reticle556_ca.paa); - GVAR(ReticleNight) = QPATHTOF(reticles\mrco-reticle556Illum_ca.paa); - author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_MRCO_2D"; - displayName = CSTRING(valdada); - weaponInfoType = "ACE_RscWeapon_MRCO"; + scope = 2; + displayName = CSTRING(mrco); + + class CBA_ScriptedOptic { + opticsPPEffects[] = {"CBA_OpticsRadBlur3"}; + + reticleTexture = QPATHTOF(reticles\mrco-reticle556_ca.paa); + reticleTextureNight = QPATHTOF(reticles\mrco-reticle556Illum_ca.paa); + reticleTextureSize = 6.4 / 25 * 4; // At 25x using https://github.com/CBATeam/CBA_A3/wiki/Scripted-Optics#debug-reticle, the best choice is 6.4 + + bodyTexture = QPATHTOF(reticles\mrco-body_ca.paa); + bodyTextureNight = QPATHTOF(reticles\mrco-bodyNight_ca.paa); + bodyTextureSize = 2.2; + + hideMagnification = 1; + }; + weaponInfoType = "CBA_ScriptedOptic"; class ItemInfo: ItemInfo { - modelOptics = QPATHTOF(models\ace_optics_reticle90.p3d); + modelOptics = "\x\cba\addons\optics\cba_optic_big_90.p3d"; class OpticsModes: OpticsModes { - class MRCOcq: MRCOcq {}; class MRCOscope: MRCOscope { useModelOptics = 1; - opticsZoomInit = 0.0872664626; - opticsZoomMax = 0.0872664626; - opticsZoomMin = 0.0872664626; - opticsPPEffects[] = {"OpticsCHAbera5", "OpticsBlur5", "ACE_OpticsRadBlur1"}; - opticsDisablePeripherialVision = 0; - visionMode[] = {"Normal"}; + opticsZoomInit = 0.25 / 4; + opticsZoomMax = 0.25 / 4; + opticsZoomMin = 0.25 / 4; }; + class MRCOcq: MRCOcq {}; }; }; }; - class ACE_optic_MRCO_PIP: ACE_optic_MRCO_2D { author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_MRCO_PIP"; scope = 1; - //scopeArsenal = 1; - displayName = CSTRING(valdada_pip); + displayName = CSTRING(mrco_pip); class ItemInfo: ItemInfo { - modelOptics = QPATHTOF(models\ace_optics_pip.p3d); + modelOptics = "\x\cba\addons\optics\cba_optic_big_pip.p3d"; }; }; + // SOS class optic_SOS: ItemCore { class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { @@ -214,49 +175,53 @@ class CfgWeapons { }; class ACE_optic_SOS_2D: optic_SOS { - GVAR(BodyDay) = QPATHTOF(reticles\sos-body_ca.paa); - GVAR(BodyNight) = QPATHTOF(reticles\sos-bodyNight_ca.paa); - GVAR(ReticleDay) = QPATHTOF(reticles\sos-reticleMLR_ca.paa); - GVAR(ReticleNight) = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa); - author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_SOS_2D"; + scope = 2; displayName = CSTRING(sos); - weaponInfoType = "ACE_RscWeapon_SOS"; + + class CBA_ScriptedOptic { + opticsPPEffects[] = {"CBA_OpticsRadBlur3"}; + + reticleTexture = QPATHTOF(reticles\sos-reticleMLR_ca.paa); + reticleTextureNight = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa); + reticleTextureSize = 0.76; // At 22x using https://github.com/CBATeam/CBA_A3/wiki/Scripted-Optics#debug-reticle, the best choice is 0.76 + + bodyTexture = QPATHTOF(reticles\sos-body_ca.paa); + bodyTextureNight = QPATHTOF(reticles\sos-bodyNight_ca.paa); + bodyTextureSize = 1.55; + }; + weaponInfoType = "CBA_ScriptedOptic"; class ItemInfo: ItemInfo { class OpticsModes: OpticsModes { class Snip: Snip { - modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d), QPATHTOF(models\ace_optics_reticle90.p3d)}; + opticsZoomMin = "5.5 call (uiNamespace getVariable 'cba_optics_fnc_setOpticMagnificationHelper')"; + opticsZoomMax = "2.75 call (uiNamespace getVariable 'cba_optics_fnc_setOpticMagnificationHelper')"; + opticsZoomInit = "2.75 call (uiNamespace getVariable 'cba_optics_fnc_setOpticMagnificationHelper')"; + discreteFov[] = {}; + modelOptics[] = {"\x\cba\addons\optics\cba_optic_big_90.p3d"}; useModelOptics = 1; - opticsZoomInit = 0.0116; - opticsZoomMax = 0.0464; - opticsZoomMin = 0.0116; - discreteFOV[] = {0.0464, 0.0116}; - opticsPPEffects[] = {"OpticsCHAbera1", "OpticsBlur1", "ACE_OpticsRadBlur1"}; - opticsDisablePeripherialVision = 0; }; class Iron: Iron {}; }; }; }; - class ACE_optic_SOS_PIP: ACE_optic_SOS_2D { author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_SOS_PIP"; - //scopeArsenal = 1; + scope = 1; displayName = CSTRING(sos_pip); class ItemInfo: ItemInfo { class OpticsModes: OpticsModes { class Snip: Snip { - modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d), QPATHTOF(models\ace_optics_pip.p3d)}; + modelOptics[] = {"\x\cba\addons\optics\cba_optic_big_pip.p3d"}; }; class Iron: Iron {}; }; }; }; + // LRPS class optic_LRPS: ItemCore { class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { @@ -266,44 +231,64 @@ class CfgWeapons { }; class ACE_optic_LRPS_2D: optic_LRPS { - GVAR(BodyDay) = QPATHTOF(reticles\sos-body_ca.paa); - GVAR(BodyNight) = QPATHTOF(reticles\sos-bodyNight_ca.paa); - GVAR(ReticleDay) = QPATHTOF(reticles\sos-reticleMLR_ca.paa); - GVAR(ReticleNight) = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa); - author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_LRPS_2D"; + scope = 2; displayName = CSTRING(lrps); - weaponInfoType = "ACE_RscWeapon_SOS"; + + class CBA_ScriptedOptic { + opticsPPEffects[] = {"CBA_OpticsRadBlur3"}; + + reticleTexture = QPATHTOF(reticles\sos-reticleMLR_ca.paa); + reticleTextureNight = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa); + reticleTextureSize = 0.76; // At 22x using https://github.com/CBATeam/CBA_A3/wiki/Scripted-Optics#debug-reticle, the best choice is 0.76 + + bodyTexture = QPATHTOF(reticles\sos-body_ca.paa); + bodyTextureNight = QPATHTOF(reticles\sos-bodyNight_ca.paa); + bodyTextureSize = 1.55; + }; + weaponInfoType = "CBA_ScriptedOptic"; class ItemInfo: ItemInfo { class OpticsModes: OpticsModes { class Snip: Snip { - modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d), QPATHTOF(models\ace_optics_reticle90.p3d)}; + opticsZoomMin = "22 call (uiNamespace getVariable 'cba_optics_fnc_setOpticMagnificationHelper')"; + opticsZoomMax = "5.5 call (uiNamespace getVariable 'cba_optics_fnc_setOpticMagnificationHelper')"; + opticsZoomInit = "5.5 call (uiNamespace getVariable 'cba_optics_fnc_setOpticMagnificationHelper')"; + discreteFov[] = {}; + modelOptics[] = {"\x\cba\addons\optics\cba_optic_big_90.p3d"}; useModelOptics = 1; - opticsZoomInit = 0.0116; - opticsZoomMax = 0.0464; - opticsZoomMin = 0.0116; - discreteFOV[] = {}; - opticsPPEffects[] = {"OpticsCHAbera1", "OpticsBlur1", "ACE_OpticsRadBlur1"}; - opticsDisablePeripherialVision = 0; }; }; }; }; - class ACE_optic_LRPS_PIP: ACE_optic_LRPS_2D { author = ECSTRING(common,ACETeam); - _generalMacro = "ACE_optic_LRPS_PIP"; - //scopeArsenal = 1; + scope = 1; displayName = CSTRING(lrps_pip); class ItemInfo: ItemInfo { class OpticsModes: OpticsModes { class Snip: Snip { - modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d), QPATHTOF(models\ace_optics_pip.p3d)}; + modelOptics[] = {"\x\cba\addons\optics\cba_optic_big_pip.p3d"}; }; }; }; }; + + // Binocular + class Default; + class Binocular: Default { + opticsZoomInit = 0.056889; // 7x power IRL + opticsZoomMin = 0.056889; // but in order to make the stadiametric rangefinder useful, ~4.4x magnification has been set + opticsZoomMax = 0.056889; // 9 px/mil + modelOptics = "\z\ace\addons\optics\models\NWD_M22_5x"; // 7 degrees horizontal field of view (Steiner M22) + // Fix AI using Binocs on short range - #18737 + // minRange = 300; // 300 = uses Rangefinder often (runs a few meters, stops, uses RF, repeats) + minRange = 500; // 500 = seem almost never use it..? + minRangeProbab = 0.001; + midRange = 1000; + midRangeProbab = 0.01; + maxRange = 5000; + maxRangeProbab = 0.01; + }; }; diff --git a/addons/optics/XEH_PREP.hpp b/addons/optics/XEH_PREP.hpp deleted file mode 100644 index 8eb8eb1eb56..00000000000 --- a/addons/optics/XEH_PREP.hpp +++ /dev/null @@ -1,3 +0,0 @@ -PREP(handleFired); -PREP(onDrawScope); -PREP(onDrawScope2D); diff --git a/addons/optics/XEH_postInit.sqf b/addons/optics/XEH_postInit.sqf deleted file mode 100644 index 1641ee21746..00000000000 --- a/addons/optics/XEH_postInit.sqf +++ /dev/null @@ -1,31 +0,0 @@ -// by commy2 -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -GVAR(camera) = objNull; - -// save control for fired EH -["ace_infoDisplayChanged", { - TRACE_1("ace_infoDisplayChanged",_this); - if (!isNull ((_this select 0) displayCtrl 1713001)) then { - uiNamespace setVariable [QGVAR(RscWeaponInfo2D), _this select 0]; - }; -}] call CBA_fnc_addEventHandler; - -// camera has to be re-created every time another camera is created. Otherwise r2t is either black or transparent.. -["featureCamera", { - params ["_player", "_featureCamera"]; - TRACE_1("featureCamera",_featureCamera); - if (_featureCamera isEqualTo "") then { - // Destroy the camera, and it will be re-created in the onDrawScope2d helper - if (!isNull GVAR(camera)) then { - GVAR(camera) cameraEffect ["TERMINATE", "BACK"]; - camDestroy GVAR(camera); - TRACE_1("destroying pip camera for restart",GVAR(camera)); - }; - }; -}] call CBA_fnc_addPlayerEventHandler; - -// Register fire event handler -["ace_firedPlayer", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler; diff --git a/addons/optics/XEH_preInit.sqf b/addons/optics/XEH_preInit.sqf deleted file mode 100644 index b47cf6628db..00000000000 --- a/addons/optics/XEH_preInit.sqf +++ /dev/null @@ -1,9 +0,0 @@ -#include "script_component.hpp" - -ADDON = false; - -PREP_RECOMPILE_START; -#include "XEH_PREP.hpp" -PREP_RECOMPILE_END; - -ADDON = true; diff --git a/addons/optics/XEH_preStart.sqf b/addons/optics/XEH_preStart.sqf deleted file mode 100644 index 022888575ed..00000000000 --- a/addons/optics/XEH_preStart.sqf +++ /dev/null @@ -1,3 +0,0 @@ -#include "script_component.hpp" - -#include "XEH_PREP.hpp" diff --git a/addons/optics/config.cpp b/addons/optics/config.cpp index c1524320c73..8b61425c67b 100644 --- a/addons/optics/config.cpp +++ b/addons/optics/config.cpp @@ -10,12 +10,11 @@ class CfgPatches { "ACE_optic_Arco_2D", "ACE_optic_Arco_PIP", "ACE_optic_MRCO_2D", - //"ACE_optic_MRCO_PIP", + "ACE_optic_MRCO_PIP", "ACE_optic_SOS_2D", "ACE_optic_SOS_PIP", "ACE_optic_LRPS_2D", "ACE_optic_LRPS_PIP" - //"ACE_optic_DMS" }; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; @@ -26,12 +25,15 @@ class CfgPatches { }; }; -#include "CfgEventHandlers.hpp" - -#include "CfgOpticsEffect.hpp" -#include "CfgRscTitles.hpp" -#include "CfgVehicles.hpp" -#include "CfgWeapons.hpp" +#include "CfgPreloadTextures.hpp" #include "CfgJointRails.hpp" +#include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" -#include "CfgPreloadTextures.hpp" +class CBA_PIPItems { + ACE_optic_Hamr_2D = "ACE_optic_Hamr_PIP"; + ACE_optic_Arco_2D = "ACE_optic_Arco_PIP"; + ACE_optic_MRCO_2D = "ACE_optic_MRCO_PIP"; + ACE_optic_SOS_2D = "ACE_optic_SOS_PIP"; + ACE_optic_LRPS_2D = "ACE_optic_LRPS_PIP"; +}; diff --git a/addons/optics/functions/fnc_handleFired.sqf b/addons/optics/functions/fnc_handleFired.sqf deleted file mode 100644 index f36f04d8817..00000000000 --- a/addons/optics/functions/fnc_handleFired.sqf +++ /dev/null @@ -1,104 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Taosenai - * Adapted By: KoffeinFlummi, commy2 - * - * Animates the scope when firing. Called from the unified fired EH only for the local player. - * - * Arguments: - * None. Parameters inherited from EFUNC(common,firedEH) - * - * Return Value: - * None - * - * Example: - * call ace_optics_fnc_handleFired - * - * Public: No - */ - -// IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; -TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_vehicle,_gunner,_turret); - -disableSerialization; - -// Check if compatible scope is used -private _display = uiNamespace getVariable [QGVAR(RscWeaponInfo2D), displayNull]; - -if (isNull _display) exitWith {}; - -// Reduce the reticle movement as the player drops into lower, supported stances. -private _recoilCoef = switch (true) do { - case (isWeaponDeployed _unit): {0.1}; - case (isWeaponRested _unit): {0.4}; - default {1}; -}; - -// Constants which determine how the scope recoils - -private _recoilScope = _recoilCoef * linearConversion [0, 1, random 1, SCOPE_RECOIL_MIN, SCOPE_RECOIL_MAX, false]; - -private _reticleShiftX = _recoilCoef * linearConversion [0, 1, random 1, RETICLE_SHIFT_X_MIN, RETICLE_SHIFT_X_MAX, false]; -private _reticleShiftY = _recoilCoef * linearConversion [0, 1, random 1, RETICLE_SHIFT_Y_MIN, RETICLE_SHIFT_Y_MAX, false]; - -private _scopeShiftX = _recoilCoef * linearConversion [0, 1, random 1, SCOPE_SHIFT_X_MIN, SCOPE_SHIFT_X_MAX, false]; -private _scopeShiftY = _recoilCoef * linearConversion [0, 1, random 1, SCOPE_SHIFT_Y_MIN, SCOPE_SHIFT_Y_MAX, false]; - -// Create and commit recoil effect - -private _sizeX = (0.75 + _recoilScope) / (getResolution select 5); -private _sizeY = _sizeX * (4 / 3); - -private _positionReticle = [ - safezoneX + 0.5 * safezoneW - 0.5 * (_sizeX + _reticleShiftX), - safezoneY + 0.5 * safezoneH - 0.5 * (_sizeY + _reticleShiftY), - _sizeX, - _sizeY -]; - -(_display displayCtrl 1713001) ctrlSetPosition _positionReticle; -(_display displayCtrl 1713002) ctrlSetPosition _positionReticle; - -private _positionBody = [ - safezoneX + 0.5 * safezoneW - 0.5 * (2 * _sizeX + _scopeShiftX), - safezoneY + 0.5 * safezoneH - 0.5 * (2 * _sizeY + _scopeShiftY), - 2 * _sizeX, - 2 * _sizeY -]; - -(_display displayCtrl 1713005) ctrlSetPosition _positionBody; -(_display displayCtrl 1713006) ctrlSetPosition _positionBody; - -(_display displayCtrl 1713001) ctrlCommit 0; -(_display displayCtrl 1713002) ctrlCommit 0; -(_display displayCtrl 1713005) ctrlCommit 0; -(_display displayCtrl 1713006) ctrlCommit 0; - -// Bring them all back -_sizeX = 0.75 / (getResolution select 5); -_sizeY = _sizeX * (4 / 3); - -_positionReticle = [ - safezoneX + 0.5 * safezoneW - 0.5 * _sizeX, - safezoneY + 0.5 * safezoneH - 0.5 * _sizeY, - _sizeX, - _sizeY -]; - -(_display displayCtrl 1713001) ctrlSetPosition _positionReticle; -(_display displayCtrl 1713002) ctrlSetPosition _positionReticle; - -_positionBody = [ - safezoneX + 0.5 * safezoneW - 0.5 * 2 * _sizeX, - safezoneY + 0.5 * safezoneH - 0.5 * 2 * _sizeY, - 2 * _sizeX, - 2 * _sizeY -]; - -(_display displayCtrl 1713005) ctrlSetPosition _positionBody; -(_display displayCtrl 1713006) ctrlSetPosition _positionBody; - -(_display displayCtrl 1713001) ctrlCommit RECENTER_TIME; -(_display displayCtrl 1713002) ctrlCommit RECENTER_TIME; -(_display displayCtrl 1713005) ctrlCommit RECENTER_TIME; -(_display displayCtrl 1713006) ctrlCommit RECENTER_TIME; diff --git a/addons/optics/functions/fnc_onDrawScope.sqf b/addons/optics/functions/fnc_onDrawScope.sqf deleted file mode 100644 index 4b1b9e321df..00000000000 --- a/addons/optics/functions/fnc_onDrawScope.sqf +++ /dev/null @@ -1,39 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: commy2 - * - * - * Arguments: - * 0: Display - * - * Return Value: - * None - * - * Example: - * [DISPLAY] call ace_optics_fnc_onDrawScope - * - * Public: No - */ - -disableSerialization; - -params ["_display"]; - -private _control = _display displayCtrl 1713154; - -if (!ctrlShown (_display displayCtrl 154)) exitWith { - _control ctrlShow false; -}; - -private _sizeX = (call EFUNC(common,getZoom)) / 4; -private _sizeY = _sizeX * safezoneW / safezoneH; - -_control ctrlSetPosition [ - safezoneX + 0.5 * safezoneW - 0.5 * _sizeX, - safezoneY + 0.5 * safezoneH - 0.5 * _sizeY, - _sizeX, - _sizeY -]; - -_control ctrlCommit 0; -_control ctrlShow true; diff --git a/addons/optics/functions/fnc_onDrawScope2D.sqf b/addons/optics/functions/fnc_onDrawScope2D.sqf deleted file mode 100644 index c7fb19c9c13..00000000000 --- a/addons/optics/functions/fnc_onDrawScope2D.sqf +++ /dev/null @@ -1,103 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: commy2 - * Helper function for updating the 2d and 3d scope controls - * Called from a dummy map controls onDraw. - * - * Arguments: - * 0: Display (RscInGameUI for a weapon) - * - * Return Value: - * None - * - * Example: - * [ACE_RscWeapon_Arco's Display] call ace_optics_fnc_onDrawScope2D - * - * Public: No - */ - -disableSerialization; - -params ["_display"]; - -// @todo, all weapon types -private _optic = (primaryWeaponItems ACE_player) select 2; -private _isPIP = (getText (configFile >> "CfgWeapons" >> _optic >> "ItemInfo" >> "modelOptics")) == QPATHTOF(models\ace_optics_pip.p3d); - -if (_isPIP) then { - GVAR(pipLastFrame) = diag_frameno; - if (isNull GVAR(camera)) then { - if ((({_x != GVAR(camera)} count allMissionObjects "camera") > 0) || {!isNull curatorCamera}) exitWith { - TRACE_1("waiting for feature camera to end",GVAR(camera)); - }; - - // PiP technique by BadBenson - GVAR(camera) = "camera" camCreate positionCameraToWorld [0, 0, 0]; - GVAR(camera) camSetFov 0.7; - GVAR(camera) camSetTarget ACE_player; - GVAR(camera) camCommit 1; - - QGVAR(rendertarget0) setPiPEffect [0]; - GVAR(camera) cameraEffect ["INTERNAL", "BACK", QGVAR(rendertarget0)]; - - TRACE_2("created new pip camera",GVAR(camera),isNull GVAR(camera)); - - // Start a waitUntil to handle destruction after GVAR(pipLastFrame) is no longer updated - [{ - (abs (diag_frameno - GVAR(pipLastFrame))) > 1 - }, { - GVAR(camera) cameraEffect ["TERMINATE", "BACK"]; - camDestroy GVAR(camera); - TRACE_2("destroyed pip camera",GVAR(camera),isNull GVAR(camera)); - }, []] call CBA_fnc_waitUntilAndExecute; - }; -}; - -//If we are not zoomed into the actual scope (not collimator) -if (!ctrlShown (_display displayCtrl 154)) exitWith { - (_display displayCtrl 1713001) ctrlShow false; - (_display displayCtrl 1713002) ctrlShow false; - (_display displayCtrl 1713005) ctrlShow false; - (_display displayCtrl 1713006) ctrlShow false; - (_display displayCtrl 1713010) ctrlShow false; - (_display displayCtrl 1713011) ctrlShow false; -}; - -if (_isPIP) then { - GVAR(camera) setPosATL positionCameraToWorld [0, 0, 0.4]; - GVAR(camera) camPrepareTarget positionCameraToWorld [0, 0, 50]; - GVAR(camera) camCommitPrepared 0; - - // @todo, check if that needs to be done at all - if (cameraView == "GUNNER") then { - GVAR(camera) camsetFOV 0.7; - GVAR(camera) camcommit 0; - } else { - GVAR(camera) camsetFOV 0.01; - GVAR(camera) camcommit 0; - }; -}; - -// Calculate lighting -private _dayOpacity = call EFUNC(common,ambientBrightness); -private _nightOpacity = parseNumber (_dayOpacity == 1); - -// Apply lighting and make layers visible -(_display displayCtrl 1713001) ctrlSetTextColor [1, 1, 1, 1]; -(_display displayCtrl 1713002) ctrlSetTextColor [1, 1, 1, parseNumber (_dayOpacity < 0.5)]; -(_display displayCtrl 1713005) ctrlSetTextColor [1, 1, 1, _dayOpacity]; -(_display displayCtrl 1713006) ctrlSetTextColor [1, 1, 1, _nightOpacity]; - -/* -(_display displayCtrl 1713001) ctrlCommit 0; -(_display displayCtrl 1713002) ctrlCommit 0; -(_display displayCtrl 1713005) ctrlCommit 0; -(_display displayCtrl 1713006) ctrlCommit 0; - */ - -(_display displayCtrl 1713001) ctrlShow true; -(_display displayCtrl 1713002) ctrlShow true; -(_display displayCtrl 1713005) ctrlShow true; -(_display displayCtrl 1713006) ctrlShow true; -(_display displayCtrl 1713010) ctrlShow _isPIP; -(_display displayCtrl 1713011) ctrlShow _isPIP; diff --git a/addons/optics/models/ace_optics_empty.p3d b/addons/optics/models/ace_optics_empty.p3d deleted file mode 100644 index 89a29d7d8ce..00000000000 Binary files a/addons/optics/models/ace_optics_empty.p3d and /dev/null differ diff --git a/addons/optics/models/ace_optics_pip.p3d b/addons/optics/models/ace_optics_pip.p3d deleted file mode 100644 index 9ec67652942..00000000000 Binary files a/addons/optics/models/ace_optics_pip.p3d and /dev/null differ diff --git a/addons/optics/models/ace_optics_reticle100.p3d b/addons/optics/models/ace_optics_reticle100.p3d deleted file mode 100644 index b5f58cfd1c8..00000000000 Binary files a/addons/optics/models/ace_optics_reticle100.p3d and /dev/null differ diff --git a/addons/optics/models/ace_optics_reticle70.p3d b/addons/optics/models/ace_optics_reticle70.p3d deleted file mode 100644 index 5aa9e8613a8..00000000000 Binary files a/addons/optics/models/ace_optics_reticle70.p3d and /dev/null differ diff --git a/addons/optics/models/ace_optics_reticle80.p3d b/addons/optics/models/ace_optics_reticle80.p3d deleted file mode 100644 index 55cf2330321..00000000000 Binary files a/addons/optics/models/ace_optics_reticle80.p3d and /dev/null differ diff --git a/addons/optics/models/ace_optics_reticle90.p3d b/addons/optics/models/ace_optics_reticle90.p3d deleted file mode 100644 index 30dc511df99..00000000000 Binary files a/addons/optics/models/ace_optics_reticle90.p3d and /dev/null differ diff --git a/addons/optics/models/ace_shortdot_optics.p3d b/addons/optics/models/ace_shortdot_optics.p3d deleted file mode 100644 index 47b82be4b71..00000000000 Binary files a/addons/optics/models/ace_shortdot_optics.p3d and /dev/null differ diff --git a/addons/optics/reticles/ace_shortdot_reticle_1.paa b/addons/optics/reticles/ace_shortdot_reticle_1.paa deleted file mode 100644 index 6c3d23668ae..00000000000 Binary files a/addons/optics/reticles/ace_shortdot_reticle_1.paa and /dev/null differ diff --git a/addons/optics/reticles/ace_shortdot_reticle_2.paa b/addons/optics/reticles/ace_shortdot_reticle_2.paa deleted file mode 100644 index beb7a651c93..00000000000 Binary files a/addons/optics/reticles/ace_shortdot_reticle_2.paa and /dev/null differ diff --git a/addons/optics/reticles/black.rvmat b/addons/optics/reticles/black.rvmat deleted file mode 100644 index 431d76689f5..00000000000 --- a/addons/optics/reticles/black.rvmat +++ /dev/null @@ -1,8 +0,0 @@ -ambient[]={0,0,0,0.89999998}; -diffuse[]={0,0,0,0.89999998}; -forcedDiffuse[]={0,0,0,1}; -emmisive[]={0,0,0,1}; -specular[]={0,0,0,0}; -specularPower=1; -PixelShaderID="Normal"; -VertexShaderID="Basic"; diff --git a/addons/optics/reticles/em.rvmat b/addons/optics/reticles/em.rvmat deleted file mode 100644 index a491df4b9a7..00000000000 --- a/addons/optics/reticles/em.rvmat +++ /dev/null @@ -1,20 +0,0 @@ -ambient[]={1,1,1,1}; -diffuse[]={1,1,1,1}; -forcedDiffuse[]={0,0,0,0}; -emmisive[]={1,1,1,1}; -specular[]={1,0.99956858,1,1}; -specularPower=1; -PixelShaderID="Normal"; -VertexShaderID="Basic"; -class Stage1 -{ - texture="#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)"; - uvSource="tex"; - class uvTransform - { - aside[]={1,0,0}; - up[]={0,1,0}; - dir[]={0,0,0}; - pos[]={0,0,0}; - }; -}; diff --git a/addons/optics/reticles/scopeblack-100_ca.paa b/addons/optics/reticles/scopeblack-100_ca.paa deleted file mode 100644 index d0232dc0ccd..00000000000 Binary files a/addons/optics/reticles/scopeblack-100_ca.paa and /dev/null differ diff --git a/addons/optics/reticles/scopeblack-70_ca.paa b/addons/optics/reticles/scopeblack-70_ca.paa deleted file mode 100644 index 62b06d7f844..00000000000 Binary files a/addons/optics/reticles/scopeblack-70_ca.paa and /dev/null differ diff --git a/addons/optics/reticles/scopeblack-80_ca.paa b/addons/optics/reticles/scopeblack-80_ca.paa deleted file mode 100644 index f74e3e41f1b..00000000000 Binary files a/addons/optics/reticles/scopeblack-80_ca.paa and /dev/null differ diff --git a/addons/optics/reticles/scopeblack-90_ca.paa b/addons/optics/reticles/scopeblack-90_ca.paa deleted file mode 100644 index 2240dcc5fe0..00000000000 Binary files a/addons/optics/reticles/scopeblack-90_ca.paa and /dev/null differ diff --git a/addons/optics/script_component.hpp b/addons/optics/script_component.hpp index 6cc168aea0c..e57cd984b0b 100644 --- a/addons/optics/script_component.hpp +++ b/addons/optics/script_component.hpp @@ -16,17 +16,10 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define SCOPE_RECOIL_MIN 0.03 -#define SCOPE_RECOIL_MAX 0.032 - -#define SCOPE_SHIFT_X_MIN 0.04 -#define SCOPE_SHIFT_X_MAX 0.05 -#define SCOPE_SHIFT_Y_MIN -0.02 -#define SCOPE_SHIFT_Y_MAX -0.03 - -#define RETICLE_SHIFT_X_MIN 0.006 -#define RETICLE_SHIFT_X_MAX 0.011 -#define RETICLE_SHIFT_Y_MIN -0.009 -#define RETICLE_SHIFT_Y_MAX -0.014 - -#define RECENTER_TIME 0.09 +#define PRELOAD \ +class CBA_ScriptedOptic {\ + reticleTexture = "*";\ + reticleTextureNight = "*";\ + bodyTexture = "*";\ + bodyTextureNight = "*";\ +} diff --git a/addons/optics/stringtable.xml b/addons/optics/stringtable.xml index 85620ac37c7..5433f805092 100644 --- a/addons/optics/stringtable.xml +++ b/addons/optics/stringtable.xml @@ -69,7 +69,7 @@ 先進步槍戰鬥光學瞄準鏡(擬真版) ARCO (PIP) - + MRCO (2D) MRCO (2D) MRCO (2D) @@ -86,7 +86,7 @@ 多距離戰鬥瞄準鏡(2D) MRCO (2D) - + MRCO (PIP) MRCO (PIP) MRCO (PIP) diff --git a/addons/optionsmenu/config.cpp b/addons/optionsmenu/config.cpp index 811b1eecece..0d9977be7a5 100644 --- a/addons/optionsmenu/config.cpp +++ b/addons/optionsmenu/config.cpp @@ -29,13 +29,6 @@ class CfgAddons { #include "gui\mainMenu.hpp" #include "gui\pauseMenu.hpp" -class ACE_Extensions { - class ace_clipboard { - windows = 1; - client = 1; - }; -}; - class CfgCommands { allowedHTMLLoadURIs[] += { "https://ace3.acemod.org/version.html" diff --git a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf index 07205dc1952..74d18a66d90 100644 --- a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf +++ b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf @@ -19,8 +19,7 @@ private _outputText = { diag_log text (_this select 0); - "ace_clipboard" callExtension ((_this select 0) + " -"); + "ace" callExtension ["clipboard:append", [(_this select 0) + endl]]; }; private _text = format ["~~~~~~~~~ACE Debug~~~~~~~~~ @@ -94,4 +93,4 @@ _text = format [" } forEach (allVariables _unit); } forEach allUnits; -"ace_clipboard" callExtension "--COMPLETE--"; +"ace" callExtension ["clipboard:complete", []]; diff --git a/addons/overheating/functions/fnc_jamWeapon.sqf b/addons/overheating/functions/fnc_jamWeapon.sqf index 9a5b8b10491..afe6d15e975 100644 --- a/addons/overheating/functions/fnc_jamWeapon.sqf +++ b/addons/overheating/functions/fnc_jamWeapon.sqf @@ -80,9 +80,11 @@ if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then { private _condition = { private _unit = _this select 1; - [_unit] call CBA_fnc_canUseWeapon - && {currentMuzzle _unit in (_unit getVariable [QGVAR(jammedWeapons), []])} - && {!(currentMuzzle _unit in (_unit getVariable [QEGVAR(safemode,safedWeapons), []]))} + (weaponState _unit) params ["_currentWeapon", "_currentMuzzle"]; + + _unit call CBA_fnc_canUseWeapon + && {_currentMuzzle in (_unit getVariable [QGVAR(jammedWeapons), []])} + && {!(["ace_safemode"] call EFUNC(common,isModLoaded)) || {!([_unit, _currentWeapon, _currentMuzzle] call EFUNC(safemode,getWeaponSafety))}} }; private _statement = { diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index d5e8ad7ca87..0d3f0dd96eb 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -58,6 +58,7 @@ 过热系数 과열 계수 Coeficiente de calentamiento + Coeficiente de aquecimento Coefficient for the amount of heat a weapon generates per shot.\nHigher value increases heat. @@ -70,6 +71,7 @@ 武器每次射击产生的热量系数。\n数值越高,热量越高。 매 발사마다 만들어지는 열에 계수를 적용합니다.\n높은 계수는 더 많은 열을 발생시킵니다. Coeficiente para la cantidad de calor que genera un arma por disparo.\nValores más altos incrementan el calor + Coeficiente da quantidade de calor que um armamento gera por disparo.\nValores mais altos potencializam o aquecimento. Cooling Coefficient @@ -82,6 +84,7 @@ Коэф. остывания Coeficiente de enfriado Coefficient de refroidissement + Coeficiente de resfriamento Coefficient for how quickly a weapon cools down.\nHigher value increases cooling speed. @@ -94,6 +97,7 @@ Коэффициент скорости остывания орудия.\nЧем больше значение, тем быстрее остывает. Coeficiente para cómo de rápido se enfría un arma.\nValores más altos incrementan la velocidad de enfriamiento. Coefficient de rapidité de refroidissement de l'arme.\nUne valeur élevée augmente la vitesse de refroidissement. + Coeficiente que determina o quão rápido a arma resfria.\nValores mais altos potencializam o resfriamento. Suppressor Coefficient @@ -106,6 +110,7 @@ Коэф. глушителя Coeficiente del silenciador Coefficient de suppresion + Coeficiente de supressão Coefficient for how much additional heat is added from having a suppressor attached.\nHigher value increases heat, 0 means no additional heat from the suppressor. diff --git a/addons/overpressure/stringtable.xml b/addons/overpressure/stringtable.xml index 2ce7615ad45..c8a0aa895d5 100644 --- a/addons/overpressure/stringtable.xml +++ b/addons/overpressure/stringtable.xml @@ -52,6 +52,7 @@ Coefficiente distanza di svampata 後方噴射の距離係数 후폭풍 거리 계수 + Multiplicateur de distance de réflexion Scales the backblast effect @@ -60,6 +61,7 @@ Scala l'effetto delle svampate dei lanciarazzi 無反動砲による後方噴射の影響範囲の大きさ 후폭풍 효과의 스케일을 조정합니다 + Multiplicateur de distance de réflexion Backblast range @@ -72,7 +74,7 @@ Дальность реактивной струи Alcance do Sopro de Disparo Utóhatás távolsága - Portée du backblast + Portée du souffle Dosah zpětné tlakové vlny (backblast) Alcance del cono de fuego 후폭풍 거리 @@ -88,7 +90,7 @@ Угол реактивной струи Ângulo do Sopro de Disparo Utóhatás aránya - Angle du backblast + Angle du souffle Úhel zpětné tlakové vlny (backblast) Ángulo del cono de fuego 후폭풍 각도 diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index db48a6109cb..b13483dca5e 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -146,6 +146,7 @@ 开伞失败率 낙하산 펼치기 실패 확률 Probabilidad de fallo de paracaidas + Probabilidade de falha do paraquedas diff --git a/addons/quickmount/XEH_postInitClient.sqf b/addons/quickmount/XEH_postInitClient.sqf index 6dbd38742bc..30f655edd82 100644 --- a/addons/quickmount/XEH_postInitClient.sqf +++ b/addons/quickmount/XEH_postInitClient.sqf @@ -4,6 +4,6 @@ if (!hasInterface) exitWith {}; ["ACE3 Movement", QGVAR(mount), [LLSTRING(KeybindName), LLSTRING(KeybindDescription)], "", { if (!dialog) then { - call FUNC(getInNearest); + [] call FUNC(getInNearest); }; }] call CBA_fnc_addKeybind; diff --git a/addons/quickmount/config.cpp b/addons/quickmount/config.cpp index d74d99c0503..846e5f05430 100644 --- a/addons/quickmount/config.cpp +++ b/addons/quickmount/config.cpp @@ -2,6 +2,7 @@ class CfgPatches { class ADDON { + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; diff --git a/addons/rangecard/config.cpp b/addons/rangecard/config.cpp index f300fb1a308..56ebec629da 100644 --- a/addons/rangecard/config.cpp +++ b/addons/rangecard/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {"ACE_Item_RangeCard"}; weapons[] = {"ACE_RangeCard"}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ACE_Advanced_Ballistics","ace_scopes"}; + requiredAddons[] = {"ace_advanced_ballistics", "ace_scopes"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg"}; url = ECSTRING(main,URL); diff --git a/addons/rangecard/functions/fnc_calculateRangeCard.sqf b/addons/rangecard/functions/fnc_calculateRangeCard.sqf index d2347b84944..0663fcfd531 100644 --- a/addons/rangecard/functions/fnc_calculateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_calculateRangeCard.sqf @@ -65,7 +65,7 @@ private _n = 0; private _range = 0; if (_useABConfig) then { - _bc = parseNumber(("ace_advanced_ballistics" callExtension format["atmosphericCorrection:%1:%2:%3:%4:%5", _bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel])); + _bc = parseNumber (("ace" callExtension ["ballistics:atmospheric_correction", [_bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel]]) select 0); }; private _airFrictionCoef = 1; @@ -99,7 +99,7 @@ while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do { _trueSpeed = vectorMagnitude _trueVelocity; if (_useABConfig) then { - private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _trueSpeed, _temperature])); + private _drag = parseNumber (("ace" callExtension ["ballistics:retard", [_dragModel, _bc, _trueSpeed, _temperature]]) select 0); _bulletAccel = (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag); } else { _bulletAccel = _trueVelocity vectorMultiply (_trueSpeed * _airFriction * _airFrictionCoef); diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index c2c86738444..ba44d7e41cc 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -161,11 +161,9 @@ if (_isABenabled) then { private _cacheEntry = missionNamespace getVariable format [QGVAR(%1_%2_%3_%4_%5_%6_%7), _zeroRange, _boreHeight, _ammoClass, _weaponClass, _isABenabled, _useBarrelLengthInfluence, _useAmmoTemperatureInfluence]; if (isNil "_cacheEntry") then { private _scopeBaseAngle = if (!_isABenabled) then { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight]; - (parseNumber _zeroAngle) + parseNumber (("ace" callExtension ["ballistics:zero_vanilla", [_zeroRange, _muzzleVelocity, _airFriction, _boreHeight]]) select 0) } else { - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZeroAB:%1:%2:%3:%4:%5:%6:%7:%8:%9", _zeroRange, _muzzleVelocity, _boreHeight, EGVAR(scopes,zeroReferenceTemperature), EGVAR(scopes,zeroReferenceBarometricPressure), EGVAR(scopes,zeroReferenceHumidity), _bc, _dragModel, _atmosphereModel]; - (parseNumber _zeroAngle) + parseNumber (("ace" callExtension ["ballistics:zero_advanced", [_zeroRange, _muzzleVelocity, _boreHeight, EGVAR(scopes,zeroReferenceTemperature), EGVAR(scopes,zeroReferenceBarometricPressure), EGVAR(scopes,zeroReferenceHumidity), _bc, _dragModel, _atmosphereModel]]) select 0) }; if (_useAmmoTemperatureInfluence) then { { diff --git a/addons/realisticnames/CfgMagazines.hpp b/addons/realisticnames/CfgMagazines.hpp index be7ce2b2a51..dc5beec603c 100644 --- a/addons/realisticnames/CfgMagazines.hpp +++ b/addons/realisticnames/CfgMagazines.hpp @@ -390,12 +390,6 @@ class CfgMagazines { class DemoCharge_Remote_Mag: SatchelCharge_Remote_Mag { displayName = CSTRING(DemoCharge_Name); }; - class ACE_SatchelCharge_Remote_Mag_Throwable: CA_Magazine { - displayName = CSTRING(SatchelChargeThrowable_Name); - }; - class ACE_DemoCharge_Remote_Mag_Throwable: ACE_SatchelCharge_Remote_Mag_Throwable { - displayName = CSTRING(DemoChargeThrowable_Name); - }; // hand grenades class HandGrenade: CA_Magazine { diff --git a/addons/realisticnames/CfgVehicles.hpp b/addons/realisticnames/CfgVehicles.hpp index 29ac412957f..ba95cf147d5 100644 --- a/addons/realisticnames/CfgVehicles.hpp +++ b/addons/realisticnames/CfgVehicles.hpp @@ -1,6 +1,5 @@ - class CfgVehicles { - // static weapons + // Static weapons class StaticMGWeapon; class HMG_01_base_F: StaticMGWeapon { displayName = CSTRING(HMG_01_Name); @@ -61,7 +60,7 @@ class CfgVehicles { displayName = CSTRING(MRAP_01_hmg_Name); }; - // punisher + // Punisher class MRAP_02_base_F; class O_MRAP_02_F: MRAP_02_base_F { displayName = CSTRING(MRAP_02_Name); @@ -86,7 +85,7 @@ class CfgVehicles { displayName = CSTRING(MRAP_02_gmg_Name); }; - // strider + // Strider class MRAP_03_base_F; class I_MRAP_03_F: MRAP_03_base_F { displayName = CSTRING(MRAP_03_Name); @@ -102,7 +101,7 @@ class CfgVehicles { displayName = CSTRING(MRAP_03_gmg_Name); }; - // merkava derivates + // Merkava derivates class MBT_01_base_F; class B_MBT_01_base_F: MBT_01_base_F {}; @@ -124,7 +123,7 @@ class CfgVehicles { class B_MBT_01_mlrs_base_F: MBT_01_mlrs_base_F {}; class B_MBT_01_mlrs_F: B_MBT_01_mlrs_base_F { - displayName = CSTRING(MBT_01_mlrs_Name); // Fictional name, (probably wrong) hebrew translation of storm. + displayName = CSTRING(MBT_01_mlrs_Name); // Fictional name, (probably wrong) hebrew translation of storm }; // T100 derivates @@ -142,20 +141,20 @@ class CfgVehicles { displayName = CSTRING(MBT_02_arty_Name); }; - // leopard sg + // Leopard 2 SG class I_MBT_03_base_F; class I_MBT_03_cannon_F: I_MBT_03_base_F { displayName = CSTRING(MBT_03_cannon_Name); }; - // tracked apcs + // Tracked apcs class B_APC_Tracked_01_base_F; class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F { displayName = CSTRING(APC_Tracked_01_rcws_Name); }; class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { - displayName = CSTRING(APC_Tracked_01_AA_Name); // Fictional name, (probably wrong) hebrew translation of cheetah. + displayName = CSTRING(APC_Tracked_01_AA_Name); // Fictional name, (probably wrong) hebrew translation of cheetah }; class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { @@ -176,7 +175,7 @@ class CfgVehicles { displayName = CSTRING(APC_tracked_03_cannon_Name); }; - // wheeled apcs + // Wheeled apcs class B_APC_Wheeled_01_base_F; class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { displayName = CSTRING(APC_Wheeled_01_cannon_Name); @@ -199,7 +198,7 @@ class CfgVehicles { displayName = CSTRING(APC_Wheeled_03_cannon_Name); }; - // trucks + // Trucks class Truck_01_base_F; class B_Truck_01_transport_F: Truck_01_base_F { displayName = CSTRING(Truck_01_transport_Name); @@ -317,7 +316,7 @@ class CfgVehicles { displayName = CSTRING(Truck_03_medical_Name); }; - // helicopters + // Helicopters class Heli_Attack_01_base_F; class B_Heli_Attack_01_F: Heli_Attack_01_base_F { displayName = CSTRING(Heli_Attack_01_Name); @@ -398,7 +397,7 @@ class CfgVehicles { displayName = CSTRING(Heli_Transport_02_Name); }; - // planes + // Planes class Plane_CAS_01_base_F; class B_Plane_CAS_01_F: Plane_CAS_01_base_F { displayName = CSTRING(Plane_CAS_01_Name); @@ -438,7 +437,7 @@ class CfgVehicles { displayName = CSTRING(Plane_Fighter_04_Name); }; - // uavs + // UAVs class UAV_02_base_F; class B_UAV_02_F: UAV_02_base_F { displayName = CSTRING(UAV_02_Name); @@ -472,104 +471,93 @@ class CfgVehicles { displayName = CSTRING(UAV_02_Name); }; - // pistols - class Pistol_Base_F; - class Weapon_hgun_P07_F: Pistol_Base_F { - displayName = CSTRING(hgun_P07_Name); - }; - - class Weapon_hgun_Rook40_F: Pistol_Base_F { - displayName = CSTRING(hgun_Rook40_Name); - }; - - class Weapon_hgun_ACPC2_F: Pistol_Base_F { - displayName = CSTRING(hgun_ACPC2_Name); - }; - - class Weapon_hgun_Pistol_heavy_01_F: Pistol_Base_F { - displayName = CSTRING(hgun_Pistol_heavy_01_Name); - }; - - class Weapon_hgun_Pistol_heavy_02_F: Pistol_Base_F { - displayName = CSTRING(hgun_Pistol_heavy_02_Name); - }; - - class Weapon_hgun_Pistol_Signal_F: Pistol_Base_F { - displayName = CSTRING(hgun_Pistol_Signal_Name); - }; - - // rocket launchers - class Launcher_Base_F; - class Weapon_launch_NLAW_F: Launcher_Base_F { - displayName = CSTRING(launch_NLAW_Name); - }; - - class Weapon_launch_RPG32_F: Launcher_Base_F { - displayName = CSTRING(launch_RPG32_Name); - }; - - /*class Weapon_launch_Titan_F: Launcher_Base_F { - displayName = CSTRING(launch_Titan_Name); - }; - - class Weapon_launch_Titan_short_F: Launcher_Base_F { - displayName = CSTRING(launch_Titan_short_Name); - }; - - class Weapon_launch_B_Titan_F: Launcher_Base_F { - displayName = CSTRING(launch_Titan_Name); - };*/ - //class Weapon_launch_I_Titan_F: Weapon_launch_B_Titan_F {}; - //class Weapon_launch_O_Titan_F: Weapon_launch_B_Titan_F {}; - - /*class Weapon_launch_launch_B_Titan_short_F: Launcher_Base_F { - displayName = CSTRING(launch_Titan_short_Name); - };*/ - //class Weapon_launch_I_Titan_short_F: Weapon_launch_launch_B_Titan_short_F {}; - //class Weapon_launch_O_Titan_short_F: Weapon_launch_launch_B_Titan_short_F {}; + #include "CfgVehiclesAttachments.hpp" - // rifles + // Assault rifles // MX class Weapon_Base_F; class Weapon_arifle_MX_F: Weapon_Base_F { displayName = CSTRING(arifle_MX_Name); }; + class Weapon_arifle_MX_Black_F: Weapon_Base_F { + displayName = CSTRING(arifle_MX_Black_Name); + }; + class Weapon_arifle_MX_khk_F: Weapon_Base_F { + displayName = CSTRING(arifle_MX_Khaki_Name); + }; class Weapon_arifle_MXC_F: Weapon_Base_F { displayName = CSTRING(arifle_MXC_Name); }; + class Weapon_arifle_MXC_Black_F: Weapon_Base_F { + displayName = CSTRING(arifle_MXC_Black_Name); + }; + class Weapon_arifle_MXC_khk_F: Weapon_Base_F { + displayName = CSTRING(arifle_MXC_Khaki_Name); + }; class Weapon_arifle_MX_GL_F: Weapon_Base_F { displayName = CSTRING(arifle_MX_GL_Name); }; + class Weapon_arifle_MX_GL_Black_F: Weapon_Base_F { + displayName = CSTRING(arifle_MX_GL_Black_Name); + }; + class Weapon_arifle_MX_GL_khk_F: Weapon_Base_F { + displayName = CSTRING(arifle_MX_GL_Khaki_Name); + }; class Weapon_arifle_MX_SW_F: Weapon_Base_F { displayName = CSTRING(arifle_MX_SW_Name); }; + class Weapon_arifle_MX_SW_Black_F: Weapon_Base_F { + displayName = CSTRING(arifle_MX_SW_Black_Name); + }; + class Weapon_arifle_MX_SW_khk_F: Weapon_Base_F { + displayName = CSTRING(arifle_MX_SW_Khaki_Name); + }; class Weapon_arifle_MXM_F: Weapon_Base_F { displayName = CSTRING(arifle_MXM_Name); }; + class Weapon_arifle_MXM_Black_F: Weapon_Base_F { + displayName = CSTRING(arifle_MXM_Black_Name); + }; + class Weapon_arifle_MXM_khk_F: Weapon_Base_F { + displayName = CSTRING(arifle_MXM_Khaki_Name); + }; // Katiba class Weapon_arifle_Katiba_F: Weapon_Base_F { displayName = CSTRING(arifle_Katiba_Name); }; - class Weapon_arifle_Katiba_C_F: Weapon_Base_F { displayName = CSTRING(arifle_Katiba_C_Name); }; - class Weapon_arifle_Katiba_GL_F: Weapon_Base_F { displayName = CSTRING(arifle_Katiba_GL_Name); }; + // SDAR + class Weapon_arifle_SDAR_F: Weapon_Base_F { + displayName = CSTRING(arifle_SDAR_Name); + }; + + // TAR-21 + class Weapon_arifle_TRG21_F: Weapon_Base_F { + displayName = CSTRING(arifle_TRG21_Name); + }; + class Weapon_arifle_TRG20_F: Weapon_Base_F { + displayName = CSTRING(arifle_TRG20_Name); + }; + class Weapon_arifle_TRG21_GL_F: Weapon_Base_F { + displayName = CSTRING(arifle_TRG21_GL_Name); + }; + // F2000 class Weapon_arifle_Mk20_F: Weapon_Base_F { displayName = CSTRING(arifle_Mk20_Name); }; - class Weapon_arifle_Mk20_plain_F: Weapon_Base_F { displayName = CSTRING(arifle_Mk20_plain_Name); }; @@ -577,7 +565,6 @@ class CfgVehicles { class Weapon_arifle_Mk20C_F: Weapon_Base_F { displayName = CSTRING(arifle_Mk20C_Name); }; - class Weapon_arifle_Mk20C_plain_F: Weapon_Base_F { displayName = CSTRING(arifle_Mk20C_plain_Name); }; @@ -585,46 +572,102 @@ class CfgVehicles { class Weapon_arifle_Mk20_GL_F: Weapon_Base_F { displayName = CSTRING(arifle_Mk20_GL_Name); }; - class Weapon_arifle_Mk20_GL_plain_F: Weapon_Base_F { displayName = CSTRING(arifle_Mk20_GL_plain_Name); }; - // TAR-21 - class Weapon_arifle_TRG21_F: Weapon_Base_F { - displayName = CSTRING(arifle_TRG21_Name); + // P90 (1.86) + class Weapon_SMG_03_TR_black: Weapon_Base_F { + displayName = CSTRING(PS90_TR_Black_Name); }; - - class Weapon_arifle_TRG20_F: Weapon_Base_F { - displayName = CSTRING(arifle_TRG20_Name); + class Weapon_SMG_03_TR_khaki: Weapon_Base_F { + displayName = CSTRING(PS90_TR_Khaki_Name); }; - - class Weapon_arifle_TRG21_GL_F: Weapon_Base_F { - displayName = CSTRING(arifle_TRG21_GL_Name); + class Weapon_SMG_03_TR_camo: Weapon_Base_F { + displayName = CSTRING(PS90_TR_Camo_Name); + }; + class Weapon_SMG_03_TR_hex: Weapon_Base_F { + displayName = CSTRING(PS90_TR_Hex_Name); + }; + class Weapon_SMG_03_black: Weapon_Base_F { + displayName = CSTRING(PS90_Black_Name); + }; + class Weapon_SMG_03_khaki: Weapon_Base_F { + displayName = CSTRING(PS90_Khaki_Name); + }; + class Weapon_SMG_03_camo: Weapon_Base_F { + displayName = CSTRING(PS90_Camo_Name); + }; + class Weapon_SMG_03_hex: Weapon_Base_F { + displayName = CSTRING(PS90_Hex_Name); + }; + class Weapon_SMG_03C_TR_black: Weapon_Base_F { + displayName = CSTRING(P90_TR_Black_Name); + }; + class Weapon_SMG_03C_TR_khaki: Weapon_Base_F { + displayName = CSTRING(P90_TR_Khaki_Name); + }; + class Weapon_SMG_03C_TR_camo: Weapon_Base_F { + displayName = CSTRING(P90_TR_Camo_Name); + }; + class Weapon_SMG_03C_TR_hex: Weapon_Base_F { + displayName = CSTRING(P90_TR_Hex_Name); + }; + class Weapon_SMG_03C_black: Weapon_Base_F { + displayName = CSTRING(P90_Black_Name); + }; + class Weapon_SMG_03C_khaki: Weapon_Base_F { + displayName = CSTRING(P90_Khaki_Name); + }; + class Weapon_SMG_03C_camo: Weapon_Base_F { + displayName = CSTRING(P90_Camo_Name); + }; + class Weapon_SMG_03C_hex: Weapon_Base_F { + displayName = CSTRING(P90_Hex_Name); }; - // sub machine guns + // Vector class Weapon_SMG_01_F: Weapon_Base_F { displayName = CSTRING(SMG_01_Name); }; + // Scorpion class Weapon_SMG_02_F: Weapon_Base_F { displayName = CSTRING(SMG_02_Name); }; - class Weapon_SMG_05_F: Weapon_Base_F { - displayName = CSTRING(SMG_05); - }; - + // CPW class Weapon_hgun_PDW2000_F: Weapon_Base_F { displayName = CSTRING(hgun_PDW2000_Name); }; - class Weapon_arifle_SDAR_F: Weapon_Base_F { - displayName = CSTRING(arifle_SDAR_Name); + // Pistols + class Pistol_Base_F; + class Weapon_hgun_P07_F: Pistol_Base_F { + displayName = CSTRING(hgun_P07_Name); + }; + + class Weapon_hgun_Rook40_F: Pistol_Base_F { + displayName = CSTRING(hgun_Rook40_Name); + }; + + class Weapon_hgun_ACPC2_F: Pistol_Base_F { + displayName = CSTRING(hgun_ACPC2_Name); + }; + + class Weapon_hgun_Pistol_heavy_01_F: Pistol_Base_F { + displayName = CSTRING(hgun_Pistol_heavy_01_Name); + }; + + class Weapon_hgun_Pistol_heavy_02_F: Pistol_Base_F { + displayName = CSTRING(hgun_Pistol_heavy_02_Name); + }; + + class Weapon_hgun_Pistol_Signal_F: Pistol_Base_F { + displayName = CSTRING(hgun_Pistol_Signal_Name); }; - // machine guns + // Machine guns class Weapon_LMG_Mk200_F: Weapon_Base_F { displayName = CSTRING(LMG_Mk200_Name); }; @@ -633,40 +676,73 @@ class CfgVehicles { displayName = CSTRING(LMG_Zafir_Name); }; - // sniper rifles + // Sniper rifles class Weapon_srifle_EBR_F: Weapon_Base_F { displayName = CSTRING(srifle_EBR_Name); }; + class Weapon_srifle_LRR_F: Weapon_Base_F { + displayName = CSTRING(srifle_LRR_Name); + }; + class Weapon_srifle_LRR_camo_F: Weapon_Base_F { + displayName = CSTRING(srifle_LRR_camo_Name); + }; + class Weapon_srifle_GM6_F: Weapon_Base_F { displayName = CSTRING(srifle_GM6_Name); }; - class Weapon_srifle_GM6_camo_F: Weapon_Base_F { displayName = CSTRING(srifle_GM6_camo_Name); }; - class Weapon_srifle_LRR_F: Weapon_Base_F { - displayName = CSTRING(srifle_LRR_Name); + class Weapon_srifle_DMR_01_F: Weapon_Base_F { + displayName = CSTRING(srifle_DMR_01_Name); }; - class Weapon_srifle_LRR_camo_F: Weapon_Base_F { - displayName = CSTRING(srifle_LRR_camo_Name); + // Rocket launchers + class Launcher_Base_F; + class Weapon_launch_RPG32_F: Launcher_Base_F { + displayName = CSTRING(launch_RPG32_Name); }; - class Weapon_srifle_DMR_01_F: Weapon_Base_F { - displayName = CSTRING(srifle_DMR_01_Name); + class Weapon_launch_NLAW_F: Launcher_Base_F { + displayName = CSTRING(launch_NLAW_Name); }; - // marksmen - /*class Weapon_srifle_DMR_02_F: Weapon_Base_F { - displayName = CSTRING(srifle_DMR_02); + /*class Weapon_launch_Titan_F: Launcher_Base_F { + displayName = CSTRING(launch_Titan_Name); + }; + + class Weapon_launch_Titan_short_F: Launcher_Base_F { + displayName = CSTRING(launch_Titan_short_Name); + }; + + class Weapon_launch_B_Titan_F: Launcher_Base_F { + displayName = CSTRING(launch_Titan_Name); + };*/ + //class Weapon_launch_I_Titan_F: Weapon_launch_B_Titan_F {}; + //class Weapon_launch_O_Titan_F: Weapon_launch_B_Titan_F {}; + + /*class Weapon_launch_launch_B_Titan_short_F: Launcher_Base_F { + displayName = CSTRING(launch_Titan_short_Name); + };*/ + //class Weapon_launch_I_Titan_short_F: Weapon_launch_launch_B_Titan_short_F {}; + //class Weapon_launch_O_Titan_short_F: Weapon_launch_launch_B_Titan_short_F {}; + + class Weapon_launch_O_Vorona_brown_F: Launcher_Base_F { + displayName = CSTRING(launch_Vorona_brown); + }; + class Weapon_launch_O_Vorona_green_F: Launcher_Base_F { + displayName = CSTRING(launch_Vorona_green); }; + // Marksmen marksman + class Weapon_srifle_DMR_02_F: Weapon_Base_F { + displayName = CSTRING(srifle_DMR_02); + }; class Weapon_srifle_DMR_02_camo_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_02_camo); }; - class Weapon_srifle_DMR_02_sniper_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_02_sniper); }; @@ -674,19 +750,15 @@ class CfgVehicles { class Weapon_srifle_DMR_03_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_03); }; - class Weapon_srifle_DMR_03_khaki_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_03_khaki); }; - class Weapon_srifle_DMR_03_tan_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_03_tan); }; - class Weapon_srifle_DMR_03_multicam_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_03_multicam); }; - class Weapon_srifle_DMR_03_woodland_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_03_woodland); }; @@ -694,7 +766,6 @@ class CfgVehicles { class Weapon_srifle_DMR_04_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_04); }; - class Weapon_srifle_DMR_04_Tan_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_04_Tan); }; @@ -702,11 +773,9 @@ class CfgVehicles { class Weapon_srifle_DMR_05_blk_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_05_blk); }; - class Weapon_srifle_DMR_05_hex_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_05_hex); }; - class Weapon_srifle_DMR_05_tan_f: Weapon_Base_F { displayName = CSTRING(srifle_DMR_05_tan); }; @@ -714,11 +783,11 @@ class CfgVehicles { class Weapon_srifle_DMR_06_camo_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_06_camo); }; - class Weapon_srifle_DMR_06_olive_F: Weapon_Base_F { displayName = CSTRING(srifle_DMR_06_olive); }; + // Marksmen MGs class Weapon_MMG_01_hex_F: Weapon_Base_F { displayName = CSTRING(MMG_01_hex); }; @@ -737,14 +806,58 @@ class CfgVehicles { class Weapon_MMG_02_sand_F: Weapon_Base_F { displayName = CSTRING(MMG_02_sand); - };*/ + }; - //attachments + // Tanks DLC - class Item_Base_F; + // Rooikat 120 (Rhino MGS) + class AFV_Wheeled_01_base_F; + class B_AFV_Wheeled_01_cannon_F: AFV_Wheeled_01_base_F { + displayName = CSTRING(afv_wheeled_01); + }; + class B_T_AFV_Wheeled_01_cannon_F: AFV_Wheeled_01_base_F { + displayName = CSTRING(afv_wheeled_01); + }; + class AFV_Wheeled_01_up_base_F; + class B_AFV_Wheeled_01_up_cannon_F: AFV_Wheeled_01_up_base_F { + displayName = CSTRING(afv_wheeled_01_up); + }; + class B_T_AFV_Wheeled_01_up_cannon_F: AFV_Wheeled_01_up_base_F { + displayName = CSTRING(afv_wheeled_01_up); + }; + + // T-14 Armata (T-140 Angara) + class MBT_04_cannon_base_F; + class O_MBT_04_cannon_F: MBT_04_cannon_base_F { + displayName = CSTRING(MBT_04_cannon); + }; + class O_T_MBT_04_cannon_F: MBT_04_cannon_base_F { + displayName = CSTRING(MBT_04_cannon); + }; + class MBT_04_command_base_F; // Keep "K" designation for command variant. + class O_MBT_04_command_F: MBT_04_command_base_F { + displayName = CSTRING(MBT_04_command); + }; + class O_T_MBT_04_command_F: MBT_04_command_base_F { + displayName = CSTRING(MBT_04_command); + }; - class Item_acc_flashlight: Item_Base_F { - displayName="UTG Defender 126"; + // Wiesel 2 (AWC 302 Nyx) + class LT_01_AA_base_F; + class I_LT_01_AA_F: LT_01_AA_base_F { + displayName = CSTRING(LT_01_AA); + }; + class LT_01_AT_base_F; + class I_LT_01_AT_F: LT_01_AT_base_F { + displayName = CSTRING(LT_01_AT); + }; + class LT_01_cannon_base_F; + class I_LT_01_cannon_F: LT_01_cannon_base_F { + displayName = CSTRING(LT_01_cannon); + }; + class LT_01_scout_base_F; + class I_LT_01_scout_F: LT_01_scout_base_F { + displayName = CSTRING(LT_01_scout); }; // APEX/Tanoa @@ -815,54 +928,266 @@ class CfgVehicles { displayName = CSTRING(lsv_02_at); }; - // Rooikat 120 (Rhino MGS) - class AFV_Wheeled_01_base_F; - class B_AFV_Wheeled_01_cannon_F: AFV_Wheeled_01_base_F { - displayName = CSTRING(afv_wheeled_01); + // Type 115 + class Weapon_arifle_ARX_blk_F: Weapon_Base_F { + displayName = CSTRING(arifle_arx_blk_Name); }; - class B_T_AFV_Wheeled_01_cannon_F: AFV_Wheeled_01_base_F { - displayName = CSTRING(afv_wheeled_01); + class Weapon_arifle_ARX_ghex_F: Weapon_Base_F { + displayName = CSTRING(arifle_arx_ghex_Name); }; - class AFV_Wheeled_01_up_base_F; - class B_AFV_Wheeled_01_up_cannon_F: AFV_Wheeled_01_up_base_F { - displayName = CSTRING(afv_wheeled_01_up); + class Weapon_arifle_ARX_hex_F: Weapon_Base_F { + displayName = CSTRING(arifle_arx_hex_Name); }; - class B_T_AFV_Wheeled_01_up_cannon_F: AFV_Wheeled_01_up_base_F { - displayName = CSTRING(afv_wheeled_01_up); + + // QBZ-95 and variants + class Weapon_arifle_CTAR_blk_F: Weapon_Base_F { + displayName = CSTRING(arifle_CTAR_blk); + }; + class Weapon_arifle_CTAR_ghex_F: Weapon_Base_F { + displayName = CSTRING(arifle_CTAR_ghex); + }; + class Weapon_arifle_CTAR_hex_F: Weapon_Base_F { + displayName = CSTRING(arifle_CTAR_hex); }; - // T-14 Armata (T-140 Angara) - class MBT_04_cannon_base_F; - class O_MBT_04_cannon_F: MBT_04_cannon_base_F { - displayName = CSTRING(MBT_04_cannon); + class Weapon_arifle_CTAR_GL_blk_F: Weapon_Base_F { + displayName = CSTRING(arifle_CTAR_GL_blk); }; - class O_T_MBT_04_cannon_F: MBT_04_cannon_base_F { - displayName = CSTRING(MBT_04_cannon); + class Weapon_arifle_CTAR_GL_ghex_F: Weapon_Base_F { + displayName = CSTRING(arifle_CTAR_GL_ghex); }; - class MBT_04_command_base_F; // Keep "K" designation for command variant. - class O_MBT_04_command_F: MBT_04_command_base_F { - displayName = CSTRING(MBT_04_command); + class Weapon_arifle_CTAR_GL_hex_F: Weapon_Base_F { + displayName = CSTRING(arifle_CTAR_GL_hex); }; - class O_T_MBT_04_command_F: MBT_04_command_base_F { - displayName = CSTRING(MBT_04_command); + + class Weapon_arifle_CTARS_blk_F: Weapon_Base_F { + displayName = CSTRING(arifle_CTARS_blk); + }; + class Weapon_arifle_CTARS_ghex_F: Weapon_Base_F { + displayName = CSTRING(arifle_CTARS_ghex); + }; + class Weapon_arifle_CTARS_hex_F: Weapon_Base_F { + displayName = CSTRING(arifle_CTARS_hex); }; - // Wiesel 2 (AWC 302 Nyx) - class LT_01_AA_base_F; - class I_LT_01_AA_F: LT_01_AA_base_F { - displayName = CSTRING(LT_01_AA); + // QBU-88 + class Weapon_srifle_DMR_07_blk_F: Weapon_Base_F { + displayName = CSTRING(srifle_DMR_07_blk); }; - class LT_01_AT_base_F; - class I_LT_01_AT_F: LT_01_AT_base_F { - displayName = CSTRING(LT_01_AT); + class Weapon_srifle_DMR_07_ghex_F: Weapon_Base_F { + displayName = CSTRING(srifle_DMR_07_ghex); }; - class LT_01_cannon_base_F; - class I_LT_01_cannon_F: LT_01_cannon_base_F { - displayName = CSTRING(LT_01_cannon); + class Weapon_srifle_DMR_07_hex_F: Weapon_Base_F { + displayName = CSTRING(srifle_DMR_07_hex); }; - class LT_01_scout_base_F; - class I_LT_01_scout_F: LT_01_scout_base_F { - displayName = CSTRING(LT_01_scout); + + // GM6 + class Weapon_srifle_GM6_ghex_F: Weapon_Base_F { + displayName = CSTRING(srifle_GM6_ghex); + }; + + // M249 + class Weapon_LMG_03_F: Weapon_Base_F { + displayName = CSTRING(LMG_03); + }; + + // Intervention + class Weapon_srifle_LRR_tna_F: Weapon_Base_F { + displayName = CSTRING(srifle_LRR_tna); + }; + + // MP5 + class Weapon_SMG_05_F: Weapon_Base_F { + displayName = CSTRING(SMG_05); + }; + + // HK416 and variants + class Weapon_arifle_SPAR_01_blk_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_01_blk); + }; + class Weapon_arifle_SPAR_01_khk_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_01_khk); + }; + class Weapon_arifle_SPAR_01_snd_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_01_snd); + }; + + class Weapon_arifle_SPAR_01_GL_blk_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_01_GL_blk); + }; + class Weapon_arifle_SPAR_01_GL_khk_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_01_GL_khk); + }; + class Weapon_arifle_SPAR_01_GL_snd_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_01_GL_snd); + }; + + class Weapon_arifle_SPAR_02_blk_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_02_blk); + }; + class Weapon_arifle_SPAR_02_khk_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_02_khk); + }; + class Weapon_arifle_SPAR_02_snd_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_02_snd); + }; + + class Weapon_arifle_SPAR_03_blk_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_03_blk); + }; + class Weapon_arifle_SPAR_03_khk_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_03_khk); + }; + class Weapon_arifle_SPAR_03_snd_F: Weapon_Base_F { + displayName = CSTRING(arifle_SPAR_03_snd); + }; + + // RPG-32 + class Weapon_launch_RPG32_ghex_F: Launcher_Base_F { + displayName = CSTRING(launch_RPG32_ghex); + }; + + // P99 + class Weapon_hgun_P07_khk_F: Pistol_Base_F { + displayName = CSTRING(hgun_P07_khk); + }; + class Weapon_hgun_P07_blk_F: Pistol_Base_F { + displayName = CSTRING(hgun_P07_blk); + }; + + // Makarov + class Weapon_hgun_Pistol_01_F: Pistol_Base_F { + displayName = CSTRING(hgun_Pistol_01); + }; + + // AKM + class Weapon_arifle_AKM_F: Weapon_Base_F { + displayName = CSTRING(arifle_AKM); + }; + + // AKSU + class Weapon_arifle_AKS_F: Weapon_Base_F { + displayName = CSTRING(arifle_AKS); }; + // Contact/Livonia + + // CZ 581 Shotgun + class Weapon_sgun_HunterShotgun_01_F: Weapon_Base_F { + displayName = CSTRING(sgun_huntershotgun_01_Name); + }; + class Weapon_sgun_HunterShotgun_01_sawedoff_F: Weapon_Base_F { + displayName = CSTRING(sgun_huntershotgun_sawedoff_01_Name); + }; + + // FNX-45 (Green) + class Weapon_hgun_Pistol_heavy_01_green_F: Pistol_Base_F { + displayName = CSTRING(hgun_Pistol_heavy_01_green_Name); + }; + + // RPG-32 (Green) + class Weapon_launch_RPG32_green_F: Launcher_Base_F { + displayName = CSTRING(launch_RPG32_green_Name); + }; + + // AK15 variants + class Weapon_arifle_AK12_F: Weapon_Base_F { + displayName = CSTRING(arifle_AK12); + }; + class Weapon_arifle_AK12_lush_F: Weapon_Base_F { + displayName = CSTRING(arifle_AK12_lush); + }; + class Weapon_arifle_AK12_arid_F: Weapon_Base_F { + displayName = CSTRING(arifle_AK12_arid); + }; + + class Weapon_arifle_AK12_GL_F: Weapon_Base_F { + displayName = CSTRING(arifle_AK12_GL); + }; + class Weapon_arifle_AK12_GL_lush_F: Weapon_Base_F { + displayName = CSTRING(arifle_AK12_GL_lush); + }; + class Weapon_arifle_AK12_GL_arid_F: Weapon_Base_F { + displayName = CSTRING(arifle_AK12_GL_arid); + }; + + class Weapon_arifle_AK12U_F: Weapon_Base_F { + displayName = CSTRING(arifle_AK12U); + }; + class Weapon_arifle_AK12U_lush_F: Weapon_Base_F { + displayName = CSTRING(arifle_AK12U_lush); + }; + class Weapon_arifle_AK12U_arid_F: Weapon_Base_F { + displayName = CSTRING(arifle_AK12U_arid); + }; + + class Weapon_arifle_RPK12_F: Weapon_Base_F { + displayName = CSTRING(arifle_RPK12); + }; + class Weapon_arifle_RPK12_lush_F: Weapon_Base_F { + displayName = CSTRING(arifle_RPK12_lush); + }; + class Weapon_arifle_RPK12_arid_F: Weapon_Base_F { + displayName = CSTRING(arifle_RPK12_arid); + }; + + // M14 (Classic) + class Weapon_srifle_DMR_06_hunter_F: Weapon_Base_F { + displayName = CSTRING(srifle_DMR_06_hunter); + }; + + // Stoner 99 LMG (Black) + class Weapon_LMG_Mk200_black_F: Weapon_Base_F { + displayName = CSTRING(LMG_Mk200_black); + }; + + // MSBS Grot variants + class Weapon_arifle_MSBS65_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65); + }; + class Weapon_arifle_MSBS65_black_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_black); + }; + class Weapon_arifle_MSBS65_camo_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_camo); + }; + class Weapon_arifle_MSBS65_sand_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_sand); + }; + class Weapon_arifle_MSBS65_GL_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_GL); + }; + class Weapon_arifle_MSBS65_GL_black_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_GL_black); + }; + class Weapon_arifle_MSBS65_GL_camo_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_GL_camo); + }; + class Weapon_arifle_MSBS65_GL_sand_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_GL_sand); + }; + class Weapon_arifle_MSBS65_Mark_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_Mark); + }; + class Weapon_arifle_MSBS65_Mark_black_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_Mark_black); + }; + class Weapon_arifle_MSBS65_Mark_camo_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_Mark_camo); + }; + class Weapon_arifle_MSBS65_Mark_sand_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_Mark_sand); + }; + class Weapon_arifle_MSBS65_UBS_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_UBS); + }; + class Weapon_arifle_MSBS65_UBS_black_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_UBS_black); + }; + class Weapon_arifle_MSBS65_UBS_camo_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_UBS_camo); + }; + class Weapon_arifle_MSBS65_UBS_sand_F: Weapon_Base_F { + displayName = CSTRING(arifle_MSBS65_UBS_sand); + }; }; diff --git a/addons/realisticnames/CfgVehiclesAttachments.hpp b/addons/realisticnames/CfgVehiclesAttachments.hpp new file mode 100644 index 00000000000..54e6206fe3a --- /dev/null +++ b/addons/realisticnames/CfgVehiclesAttachments.hpp @@ -0,0 +1,146 @@ +// Attachments +class Item_Base_F; +class Item_acc_flashlight: Item_Base_F { + displayName = CSTRING(flashlight_Name); +}; + +class Item_optic_MRD: Item_Base_F { + displayName = CSTRING(optic_mrd_Name); +}; +class Item_optic_MRD_black: Item_Base_F { + displayName = CSTRING(optic_mrd_black_Name); +}; + +class Item_optic_Hamr: Item_Base_F { + displayName = CSTRING(optic_hamr); +}; +class Item_optic_Hamr_khk_F: Item_Base_F { + displayName = CSTRING(optic_hamr_khk); +}; + +class Item_optic_Arco: Item_Base_F { + displayName = CSTRING(optic_arco); +}; +class Item_optic_Arco_blk_F: Item_Base_F { + displayName = CSTRING(optic_arco_blk); +}; +class Item_optic_Arco_ghex_F: Item_Base_F { + displayName = CSTRING(optic_arco_ghex); +}; +class Item_optic_Arco_lush_F: Item_Base_F { + displayName = CSTRING(optic_arco_lush); +}; +class Item_optic_Arco_arid_F: Item_Base_F { + displayName = CSTRING(optic_arco_arid); +}; +class Item_optic_Arco_AK_blk_F: Item_Base_F { + displayName = CSTRING(optic_arco_ak_blk); +}; +class Item_optic_Arco_AK_lush_F: Item_Base_F { + displayName = CSTRING(optic_arco_ak_lush); +}; +class Item_optic_Arco_AK_arid_F: Item_Base_F { + displayName = CSTRING(optic_arco_ak_arid); +}; + +class Item_optic_ERCO_blk_f: Item_Base_F { + displayName = CSTRING(optic_erco_blk); +}; +class Item_optic_ERCO_khk_f: Item_Base_F { + displayName = CSTRING(optic_erco_khk); +}; +class Item_optic_ERCO_snd_f: Item_Base_F { + displayName = CSTRING(optic_erco_snd); +}; + +class Item_optic_LRPS: Item_Base_F { + displayName = CSTRING(optic_lrps); +}; +class Item_optic_LRPS_ghex_F: Item_Base_F { + displayName = CSTRING(optic_lrps_ghex); +}; +class Item_optic_LRPS_tna_F: Item_Base_F { + displayName = CSTRING(optic_lrps_tna); +}; + +class Item_optic_AMS: Item_Base_F { + displayName = CSTRING(optic_ams); +}; +class Item_optic_AMS_khk: Item_Base_F { + displayName = CSTRING(optic_ams_khk); +}; +class Item_optic_AMS_snd: Item_Base_F { + displayName = CSTRING(optic_ams_snd); +}; + +class Item_optic_KHS_blk: Item_Base_F { + displayName = CSTRING(optic_khs_blk); +}; +class Item_optic_KHS_hex: Item_Base_F { + displayName = CSTRING(optic_khs_hex); +}; +class Item_optic_KHS_old: Item_Base_F { + displayName = CSTRING(optic_khs_old); +}; +class Item_optic_KHS_tan: Item_Base_F { + displayName = CSTRING(optic_khs_tan); +}; + +class Item_optic_DMS: Item_Base_F { + displayName = CSTRING(optic_dms); +}; +class Item_optic_DMS_ghex_F: Item_Base_F { + displayName = CSTRING(optic_dms_ghex); +}; +class Item_optic_DMS_weathered_F: Item_Base_F { + displayName = CSTRING(optic_dms_weathered); +}; +class Item_optic_DMS_weathered_Kir_F: Item_Base_F { + displayName = CSTRING(optic_dms_weathered_kir); +}; + +class Item_optic_holosight: Item_Base_F { + displayName = CSTRING(optic_holosight); +}; +class Item_optic_Holosight_blk_F: Item_Base_F { + displayName = CSTRING(optic_holosight_blk); +}; +class Item_optic_Holosight_khk_F: Item_Base_F { + displayName = CSTRING(optic_holosight_khk); +}; +class Item_optic_Holosight_lush_F: Item_Base_F { + displayName = CSTRING(optic_holosight_lush); +}; +class Item_optic_Holosight_arid_F: Item_Base_F { + displayName = CSTRING(optic_holosight_arid); +}; +class Item_optic_Holosight_smg: Item_Base_F { + displayName = CSTRING(optic_holosight_smg); +}; +class Item_optic_Holosight_smg_blk_F: Item_Base_F { + displayName = CSTRING(optic_holosight_smg_blk); +}; +class Item_optic_Holosight_smg_khk_F: Item_Base_F { + displayName = CSTRING(optic_holosight_smg_khk); +}; + +class Item_optic_MRCO: Item_Base_F { + displayName = CSTRING(optic_MRCO); +}; + +class Item_optic_Yorris: Item_Base_F { + displayName = CSTRING(optic_Yorris); +}; + +class Item_optic_ACO: Item_Base_F { + displayName = CSTRING(optic_ACO); +}; +class Item_optic_ACO_grn: Item_Base_F { + displayName = CSTRING(optic_ACO_grn); +}; +class Item_optic_ACO_smg: Item_Base_F { + displayName = CSTRING(optic_ACO_smg); +}; +class Item_optic_ACO_grn_smg: Item_Base_F { + displayName = CSTRING(optic_ACO_grn_smg); +}; diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 5b0e33e98c9..c515cf08fc7 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -2,8 +2,9 @@ class Mode_SemiAuto; class Mode_FullAuto; class CfgWeapons { - #include "Attachments.hpp" - // assault rifles + #include "CfgWeaponsAttachments.hpp" + + // Assault rifles // MX class arifle_MX_Base_F; @@ -176,13 +177,13 @@ class CfgWeapons { displayName = CSTRING(SMG_02_Name); }; - // PDW 2000 + // CPW class pdw2000_base_F; class hgun_pdw2000_F: pdw2000_base_F { displayName = CSTRING(hgun_PDW2000_Name); }; - // pistols + // Pistols class Pistol_Base_F; class hgun_P07_F: Pistol_Base_F { displayName = CSTRING(hgun_P07_Name); @@ -208,7 +209,7 @@ class CfgWeapons { displayName = CSTRING(hgun_Pistol_Signal_Name); }; - // machine guns + // Machine guns class Rifle_Long_Base_F; class LMG_Mk200_F: Rifle_Long_Base_F { displayName = CSTRING(LMG_Mk200_Name); @@ -218,7 +219,7 @@ class CfgWeapons { displayName = CSTRING(LMG_Zafir_Name); }; - // sniper rifles + // Sniper rifles class EBR_base_F; class srifle_EBR_F: EBR_base_F { displayName = CSTRING(srifle_EBR_Name); @@ -245,7 +246,7 @@ class CfgWeapons { displayName = CSTRING(srifle_DMR_01_Name); }; - // launchers + // Launchers class Launcher_Base_F; class launch_RPG32_F: Launcher_Base_F { displayName = CSTRING(launch_RPG32_Name); @@ -270,42 +271,35 @@ class CfgWeapons { displayName = CSTRING(launch_Vorona_green); }; - // marksmen marksman + // Marksmen marksman class DMR_02_base_F: Rifle_Long_Base_F { displayName = CSTRING(DMR_02); //MAR-10 .338; }; - class srifle_DMR_02_F: DMR_02_base_F { displayName = CSTRING(srifle_DMR_02); //MAR-10 .338 (Black); }; - class srifle_DMR_02_camo_F: srifle_DMR_02_F { displayName = CSTRING(srifle_DMR_02_camo); //MAR-10 .338 (Camo); }; - class srifle_DMR_02_sniper_F: srifle_DMR_02_F { displayName = CSTRING(srifle_DMR_02_sniper); //MAR-10 .338 (Sand); }; + class DMR_03_base_F: Rifle_Long_Base_F { displayName = CSTRING(DMR_03); //Mk-I EMR 7.62 mm; }; - class srifle_DMR_03_F: DMR_03_base_F { displayName = CSTRING(srifle_DMR_03); //Mk-I EMR 7.62 mm (Black); }; - class srifle_DMR_03_khaki_F: srifle_DMR_03_F { displayName = CSTRING(srifle_DMR_03_khaki); //Mk-I EMR 7.62 mm (Khaki); }; - class srifle_DMR_03_tan_F: srifle_DMR_03_F { displayName = CSTRING(srifle_DMR_03_tan); //Mk-I EMR 7.62 mm (Sand); }; - class srifle_DMR_03_multicam_F: srifle_DMR_03_F { displayName = CSTRING(srifle_DMR_03_multicam); //Mk-I EMR 7.62 mm (Camo); }; - class srifle_DMR_03_woodland_F: srifle_DMR_03_F { displayName = CSTRING(srifle_DMR_03_woodland); //Mk-I EMR 7.62 mm (Woodland); }; @@ -313,11 +307,9 @@ class CfgWeapons { class DMR_04_base_F: Rifle_Long_Base_F { displayName = CSTRING(DMR_04); //ASP-1 Kir 12.7 mm; }; - class srifle_DMR_04_F: DMR_04_base_F { displayName = CSTRING(srifle_DMR_04); //ASP-1 Kir 12.7 mm (Black); }; - class srifle_DMR_04_Tan_F: srifle_DMR_04_F { displayName = CSTRING(srifle_DMR_04_Tan); //ASP-1 Kir 12.7 mm (Tan); }; @@ -325,31 +317,27 @@ class CfgWeapons { class DMR_05_base_F: Rifle_Long_Base_F { displayName = CSTRING(DMR_05); //Cyrus 9.3 mm; }; - class srifle_DMR_05_blk_F: DMR_05_base_F { displayName = CSTRING(srifle_DMR_05_blk); //Cyrus 9.3 mm (Black) }; - class srifle_DMR_05_hex_F: srifle_DMR_05_blk_F { displayName = CSTRING(srifle_DMR_05_hex); //Cyrus 9.3 mm (Hex); }; - class srifle_DMR_05_tan_f: srifle_DMR_05_blk_F { displayName = CSTRING(srifle_DMR_05_tan); //Cyrus 9.3 mm (Tan); }; + class DMR_06_base_F: Rifle_Long_Base_F { displayName = CSTRING(DMR_06); //Mk14 7.62 mm; }; - class srifle_DMR_06_camo_F: DMR_06_base_F { displayName = CSTRING(srifle_DMR_06_camo); //Mk14 7.62 mm (Camo) }; - class srifle_DMR_06_olive_F: srifle_DMR_06_camo_F { displayName = CSTRING(srifle_DMR_06_olive); //Mk14 7.62 mm (Olive); }; - // marksmen mgs + // Marksmen MGs class MMG_01_base_F: Rifle_Long_Base_F { displayName = CSTRING(MMG_01); //Navid 9.3 mm; }; @@ -377,15 +365,12 @@ class CfgWeapons { displayName = CSTRING(MMG_02_sand); //SPMG .338 (Sand); }; - // vehicle weapons + // Vehicle weapons - // gatlings + // Gatlings class CannonCore; class gatling_20mm: CannonCore { - //displayName = ""; - class manual: CannonCore { - //displayName = ""; - }; + class manual; }; class Twin_Cannon_20mm: gatling_20mm { displayName = "Plamen PL-20"; @@ -415,7 +400,7 @@ class CfgWeapons { }; }; - // missiles + // Missiles class RocketPods; class Missile_AA_04_Plane_CAS_01_F: RocketPods { displayName = "AIM-9 Sidewinder"; @@ -438,7 +423,7 @@ class CfgWeapons { displayName = CSTRING(missiles_vorona); }; - // rockets + // Rockets class Rocket_04_HE_Plane_CAS_01_F: RocketPods { displayName = "Hydra 70"; class Burst: RocketPods { @@ -469,7 +454,7 @@ class CfgWeapons { }; }; - // more missiles + // More missiles class missiles_DAR: RocketPods { displayName = "Hydra 70"; class Burst: RocketPods { @@ -492,17 +477,17 @@ class CfgWeapons { displayName = "AIM-120A AMRAAM"; }; - class missiles_SCALPEL: RocketPods { // according to zGuba, this is what it's based on + class missiles_SCALPEL: RocketPods { // According to zGuba, this is what it's based on displayName = "9K121 Vikhr"; }; - // bomb + // Bomb class Bomb_04_Plane_CAS_01_F; class Bomb_03_Plane_CAS_02_F: Bomb_04_Plane_CAS_01_F { displayName = "FAB-250M-54"; }; - // machine guns + // Machine guns class MGunCore; class M134_minigun: MGunCore { displayName = "2x M134 Minigun"; @@ -532,11 +517,6 @@ class CfgWeapons { }; }; - class HMG_127_APC: HMG_127 {}; - class ACE_HMG_127_KORD: HMG_127_APC { - displayName = "6P49 Kord"; - }; - class HMG_01: HMG_127 { displayName = "XM312"; }; @@ -551,7 +531,7 @@ class CfgWeapons { }; }; - // grenade launchers + // Grenade launchers class GMG_F; class GMG_20mm: GMG_F { displayName = "XM307"; @@ -567,7 +547,7 @@ class CfgWeapons { }; }; - // autocannons + // Autocannons class autocannon_35mm: CannonCore { displayName = "GDF-001"; class manual: CannonCore { @@ -575,7 +555,7 @@ class CfgWeapons { }; }; - // aa missiles + // AA missiles class missiles_titan: MissileLauncher { displayName = "Mini-Spike"; }; @@ -584,17 +564,17 @@ class CfgWeapons { displayName = "FIM-92F"; }; - // mortar + // Nortar class mortar_155mm_AMOS: CannonCore { displayName = "L/52"; }; - // artillery rockets + // Artillery rockets class rockets_230mm_GAT: RocketPods { displayName = "M269"; }; - // tank guns + // Tank guns class cannon_120mm: CannonCore { class player; displayName = "MG251"; @@ -605,10 +585,6 @@ class CfgWeapons { class player: player {}; }; - class ACE_cannon_120mm_GT12: cannon_120mm { - displayName = "GT12"; - }; - class cannon_105mm: CannonCore { displayName = "M68"; class player: Mode_SemiAuto { @@ -624,28 +600,12 @@ class CfgWeapons { displayName = "2A82-1M"; }; - // coax machine guns + // Coax machine guns class LMG_coax: LMG_RCWS { displayName = "PKT"; }; - class LMG_coax_ext: LMG_coax {}; - class ACE_LMG_coax_ext_MAG58: LMG_coax_ext { - displayName = "MAG 58M"; - }; - class ACE_LMG_coax_MAG58_mem3: LMG_coax { - displayName = "MAG 58M"; - }; - class ACE_LMG_coax_L94A1_mem3: LMG_coax { - displayName = "L94A1"; - }; - class ACE_LMG_coax_ext_MG3: LMG_coax_ext { - displayName = "Rheinmetall MG3"; - }; - class ACE_LMG_coax_DenelMG4: LMG_coax { - displayName = "Denel MG4"; - }; - // more autocannons + // More autocannons class autocannon_Base_F; class autocannon_40mm_CTWS: autocannon_Base_F { displayName = "Mk44 Bushmaster II"; @@ -694,20 +654,6 @@ class CfgWeapons { displayName = "2A42"; }; - class cannon_20mm: autocannon_Base_F { - class AP: autocannon_Base_F {}; - class HE: autocannon_Base_F {}; - }; - class ACE_cannon_20mm_Rh202: cannon_20mm { - displayName = "MK20 Rh 202"; - class AP: AP { - displayName = "MK20 Rh 202"; - }; - class HE: HE { - displayName = "MK20 Rh 202"; - }; - }; - // APEX/Tanoa // Type 115 diff --git a/addons/realisticnames/Attachments.hpp b/addons/realisticnames/CfgWeaponsAttachments.hpp similarity index 84% rename from addons/realisticnames/Attachments.hpp rename to addons/realisticnames/CfgWeaponsAttachments.hpp index a861bb4a043..c23559b7028 100644 --- a/addons/realisticnames/Attachments.hpp +++ b/addons/realisticnames/CfgWeaponsAttachments.hpp @@ -1,7 +1,5 @@ -//attachments - +// Attachments class ItemCore; - class acc_flashlight: ItemCore { displayName = CSTRING(flashlight_Name); }; @@ -19,12 +17,6 @@ class optic_Hamr: ItemCore { class optic_Hamr_khk_F: optic_Hamr { displayName = CSTRING(optic_hamr_khk); }; -class ACE_optic_Hamr_2D: optic_Hamr { - displayName = CSTRING(optic_hamr_2d); -}; -class ACE_optic_Hamr_PIP: ACE_optic_Hamr_2D { - displayName = CSTRING(optic_hamr_pip); -}; class optic_Arco: ItemCore { displayName = CSTRING(optic_arco); @@ -35,12 +27,6 @@ class optic_Arco_blk_F: optic_Arco { class optic_Arco_ghex_F: optic_Arco { displayName = CSTRING(optic_arco_ghex); }; -class ACE_optic_Arco_2D: optic_Arco { - displayName = CSTRING(optic_arco_2d); -}; -class ACE_optic_Arco_PIP: ACE_optic_Arco_2D { - displayName = CSTRING(optic_arco_pip); -}; class optic_Arco_lush_F: optic_Arco { displayName = CSTRING(optic_arco_lush); }; @@ -76,12 +62,6 @@ class optic_LRPS_ghex_F: optic_LRPS { class optic_LRPS_tna_F: optic_LRPS { displayName = CSTRING(optic_lrps_tna); }; -class ACE_optic_LRPS_2D: optic_LRPS { - displayName = CSTRING(optic_lrps_2d); -}; -class ACE_optic_LRPS_PIP: ACE_optic_LRPS_2D { - displayName = CSTRING(optic_lrps_pip); -}; class optic_AMS_base; class optic_AMS: optic_AMS_base { @@ -149,12 +129,6 @@ class optic_Holosight_smg_khk_F: optic_Holosight_smg { class optic_MRCO: ItemCore { displayName = CSTRING(optic_MRCO); }; -class ACE_optic_MRCO_2D: optic_MRCO { - displayName = CSTRING(optic_MRCO_2d); -}; -class ACE_optic_MRCO_PIP: ACE_optic_MRCO_2D { - displayName = CSTRING(optic_MRCO_pip); -}; class optic_Yorris: ItemCore { displayName = CSTRING(optic_Yorris); diff --git a/addons/realisticnames/compat_explosives/CfgMagazines.hpp b/addons/realisticnames/compat_explosives/CfgMagazines.hpp new file mode 100644 index 00000000000..41a19345dbe --- /dev/null +++ b/addons/realisticnames/compat_explosives/CfgMagazines.hpp @@ -0,0 +1,9 @@ +class CfgMagazines { + class CA_Magazine; + class ACE_SatchelCharge_Remote_Mag_Throwable: CA_Magazine { + displayName = CSTRING(SatchelChargeThrowable_Name); + }; + class ACE_DemoCharge_Remote_Mag_Throwable: ACE_SatchelCharge_Remote_Mag_Throwable { + displayName = CSTRING(DemoChargeThrowable_Name); + }; +}; diff --git a/addons/realisticnames/compat_explosives/CfgVehicles.hpp b/addons/realisticnames/compat_explosives/CfgVehicles.hpp new file mode 100644 index 00000000000..e22068161a8 --- /dev/null +++ b/addons/realisticnames/compat_explosives/CfgVehicles.hpp @@ -0,0 +1,29 @@ +class CfgVehicles { + class ACE_Explosives_Place; + class ACE_Explosives_Place_DemoCharge: ACE_Explosives_Place { + displayName = CSTRING(DemoCharge_Name); + }; + class ACE_Explosives_Place_APERSBoundingMine: ACE_Explosives_Place { + displayName = CSTRING(APERSBoundingMine_Name); + }; + class ACE_Explosives_Place_APERSMine: ACE_Explosives_Place { + displayName = CSTRING(APERSMine_Name); + }; + class ACE_Explosives_Place_APERSTripwireMine: ACE_Explosives_Place { + displayName = CSTRING(APERSTripwireMine_Name); + }; + class ACE_Explosives_Place_ATMine: ACE_Explosives_Place { + displayName = CSTRING(ATMine_Name); + }; + class ACE_Explosives_Place_Claymore: ACE_Explosives_Place { + displayName = CSTRING(Claymore_Name); + }; + class ACE_Explosives_Place_SatchelCharge: ACE_Explosives_Place { + displayName = CSTRING(SatchelCharge_Name); + }; + + // Orange DLC + class ACE_Explosives_Place_SLAM: ACE_Explosives_Place { + displayName = CSTRING(SLAM_Name); + }; +}; diff --git a/addons/realisticnames/compat_explosives/config.cpp b/addons/realisticnames/compat_explosives/config.cpp new file mode 100644 index 00000000000..208bc7e791f --- /dev/null +++ b/addons/realisticnames/compat_explosives/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {QUOTE(ADDON), "ace_explosives"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + // this prevents any patched class from requiring this addon + addonRootClass = "A3_Characters_F"; + }; +}; + +#include "CfgMagazines.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/realisticnames/compat_explosives/script_component.hpp b/addons/realisticnames/compat_explosives/script_component.hpp new file mode 100644 index 00000000000..a697aad7f3b --- /dev/null +++ b/addons/realisticnames/compat_explosives/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT explosives +#define SUBCOMPONENT_BEAUTIFIED Explosives +#include "..\script_component.hpp" diff --git a/addons/realisticnames/compat_optics/CfgWeapons.hpp b/addons/realisticnames/compat_optics/CfgWeapons.hpp new file mode 100644 index 00000000000..6ffd6484b2c --- /dev/null +++ b/addons/realisticnames/compat_optics/CfgWeapons.hpp @@ -0,0 +1,33 @@ +class CfgWeapons { + class optic_Hamr; + class ACE_optic_Hamr_2D: optic_Hamr { + displayName = CSTRING(optic_hamr_2d); + }; + class ACE_optic_Hamr_PIP: ACE_optic_Hamr_2D { + displayName = CSTRING(optic_hamr_pip); + }; + + class optic_Arco; + class ACE_optic_Arco_2D: optic_Arco { + displayName = CSTRING(optic_arco_2d); + }; + class ACE_optic_Arco_PIP: ACE_optic_Arco_2D { + displayName = CSTRING(optic_arco_pip); + }; + + class optic_LRPS; + class ACE_optic_LRPS_2D: optic_LRPS { + displayName = CSTRING(optic_lrps_2d); + }; + class ACE_optic_LRPS_PIP: ACE_optic_LRPS_2D { + displayName = CSTRING(optic_lrps_pip); + }; + + class optic_MRCO; + class ACE_optic_MRCO_2D: optic_MRCO { + displayName = CSTRING(optic_MRCO_2d); + }; + class ACE_optic_MRCO_PIP: ACE_optic_MRCO_2D { + displayName = CSTRING(optic_MRCO_pip); + }; +}; diff --git a/addons/realisticnames/compat_optics/config.cpp b/addons/realisticnames/compat_optics/config.cpp new file mode 100644 index 00000000000..32d2795dd96 --- /dev/null +++ b/addons/realisticnames/compat_optics/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {QUOTE(ADDON), "ace_optics"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + // this prevents any patched class from requiring this addon + addonRootClass = "A3_Characters_F"; + }; +}; + +#include "CfgWeapons.hpp" diff --git a/addons/realisticnames/compat_optics/script_component.hpp b/addons/realisticnames/compat_optics/script_component.hpp new file mode 100644 index 00000000000..b90538fc4e2 --- /dev/null +++ b/addons/realisticnames/compat_optics/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT optics +#define SUBCOMPONENT_BEAUTIFIED Optics +#include "..\script_component.hpp" diff --git a/addons/realisticnames/compat_vehicles/CfgWeapons.hpp b/addons/realisticnames/compat_vehicles/CfgWeapons.hpp new file mode 100644 index 00000000000..c49ae26bcb4 --- /dev/null +++ b/addons/realisticnames/compat_vehicles/CfgWeapons.hpp @@ -0,0 +1,45 @@ +class CfgWeapons { + class HMG_127_APC; + class ACE_HMG_127_KORD: HMG_127_APC { + displayName = "6P49 Kord"; + }; + + class cannon_120mm; + class ACE_cannon_120mm_GT12: cannon_120mm { + displayName = "GT12"; + }; + + class LMG_coax_ext; + class ACE_LMG_coax_ext_MG3: LMG_coax_ext { + displayName = "Rheinmetall MG3"; + }; + class ACE_LMG_coax_ext_MAG58: LMG_coax_ext { + displayName = "MAG 58M"; + }; + + class LMG_coax; + class ACE_LMG_coax_MAG58_mem3: LMG_coax { + displayName = "MAG 58M"; + }; + class ACE_LMG_coax_L94A1_mem3: LMG_coax { + displayName = "L94A1"; + }; + class ACE_LMG_coax_DenelMG4: LMG_coax { + displayName = "Denel MG4"; + }; + + class autocannon_Base_F; + class cannon_20mm: autocannon_Base_F { + class AP: autocannon_Base_F {}; + class HE: autocannon_Base_F {}; + }; + class ACE_cannon_20mm_Rh202: cannon_20mm { + displayName = "MK20 Rh 202"; + class AP: AP { + displayName = "MK20 Rh 202"; + }; + class HE: HE { + displayName = "MK20 Rh 202"; + }; + }; +}; diff --git a/addons/realisticnames/compat_vehicles/config.cpp b/addons/realisticnames/compat_vehicles/config.cpp new file mode 100644 index 00000000000..846c92a0eec --- /dev/null +++ b/addons/realisticnames/compat_vehicles/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {QUOTE(ADDON), "ace_vehicles"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + // this prevents any patched class from requiring this addon + addonRootClass = "A3_Characters_F"; + }; +}; + +#include "CfgWeapons.hpp" diff --git a/addons/realisticnames/compat_vehicles/script_component.hpp b/addons/realisticnames/compat_vehicles/script_component.hpp new file mode 100644 index 00000000000..17370c415fd --- /dev/null +++ b/addons/realisticnames/compat_vehicles/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT vehicles +#define SUBCOMPONENT_BEAUTIFIED Vehicles +#include "..\script_component.hpp" diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index af864f64df0..bf5110de7a9 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -706,6 +706,7 @@ 카마즈 급수 KamAS Wasser KamAZ Acqua + KamAZ Eau KamAZ MRL @@ -1324,7 +1325,7 @@ Demoliční nálož M183 M183 Charge de démolition M183 комплектный подрывной заряд - M183 Sacola de Demolição + M183 Conjunto de Carga de Demolição M183 romboló töltet M183 Carica da Demolizioni M183 梱包爆薬 @@ -1345,6 +1346,7 @@ M183 Geballte Sprengladung (Werfbar) M183 炸药包(可投掷) M183 폭파 장약 (투척) + M183 Carga de Demolição (Arremessável) M112 Demolition Block @@ -1375,6 +1377,7 @@ M112 Sprengladung (Werfbar) M112 塑性炸药(可投掷) M112 폭파 장약 (투척) + M112 Carga de Demolição (Arremessável) M67 Fragmentation Grenade @@ -1672,6 +1675,7 @@ CZ 581 CZ 581 CZ 581 + CZ 581 CZ 581 (Sawed-Off) @@ -1681,6 +1685,7 @@ CZ 581 (소드오프) CZ 581 (Abgesägt) CZ 581 (Canne mozze) + CZ 581 (canon scié) FNX-45 Tactical (Green) @@ -2731,7 +2736,7 @@ ASP-1 Kir (Tan) ASP-1 Kir (Žlutohnědá) - ASP-1 Kir (Tan) + ASP-1 Kir (Marron) ASP-1 Kir (Tan) ASP-1 Kir (пустынный) ASP-1 Kir (Hellbraun) @@ -3091,6 +3096,7 @@ 115식 보총 (검정) Type 115 (Schwarz) Type 115 (Nero) + Type 115 (Noir) Type 115 (Green Hex) @@ -3100,6 +3106,7 @@ 115식 보총 (초록육각) Type 115 (Hex Grün) Type 115 (Hex Verde) + Type 115 (Hew Vert) Type 115 (Hex) @@ -3109,6 +3116,7 @@ 115식 보총 (육각) Type 115 (Hex) Type 115 (Hex) + Type 115 (Hex) QBZ-95-1 (Black) @@ -3902,6 +3910,7 @@ UTG 디펜더 126 UTG Defender 126 UTG Defender 126 + UTG Defender 126 EOTech MRDS @@ -3911,6 +3920,7 @@ 이오텍 MRDS EOTech MRDS EOTech MRDS + EOTech MRDS EOTech MRDS (Black) @@ -3920,6 +3930,7 @@ 이오텍 MRDS (검정) EOTech MRDS (Schwarz) EOTech MRDS (Nero) + EOTech MRDS (Noir) Leupold Mark 4 HAMR @@ -4076,6 +4087,7 @@ 엘칸 스펙터OS (초목) ELCAN SpecterOS (обильная растительность) ELCAN SpecterOS (Exuberante) + ELCAN SpecterOS (Exuberante) ELCAN SpecterOS (Arid) @@ -4088,6 +4100,7 @@ 엘칸 스펙터OS (건조) ELCAN SpecterOS (сухая местность) ELCAN SpecterOS (Árido) + ELCAN SpecterOS (Árido) ELCAN SpecterOS 7.62 (Black) @@ -4100,6 +4113,7 @@ 엘칸 스펙터OS 7.62 (검정) ELCAN SpecterOS 7.62 (чёрный) ELCAN SpecterOS 7.62 (Negro) + ELCAN SpecterOS 7.62 (Preto) ELCAN SpecterOS 7.62 (Lush) @@ -4112,6 +4126,7 @@ 엘칸 스펙터OS 7.62 (초목) ELCAN SpecterOS 7.62 (обильная растительность) ELCAN SpecterOS 7.62 (Exuberante) + ELCAN SpecterOS 7.62 (Exuberante) ELCAN SpecterOS 7.62 (Arid) @@ -4124,6 +4139,7 @@ 엘칸 스펙터OS 7.62 (건조) ELCAN SpecterOS 7.62 (сухая местность) ELCAN SpecterOS 7.62 (Árido) + ELCAN SpecterOS 7.62 (Árido) SIG BRAVO4 / ROMEO3 (Black) @@ -4408,6 +4424,7 @@ 버리스 XTR II (낡음) Burris XTR II (старый) Burris XTR II (Viejo) + Burris XTR II (Velho) Burris XTR II (ASP-1 Kir) @@ -4420,6 +4437,7 @@ 버리스 XTR II (ASP-1 키르용) Burris XTR II (ASP-1 Kir) Burris XTR II (ASP-1 Kir) + Burris XTR II (ASP-1 Kir) EOTech XPS3 (Tan) @@ -4480,6 +4498,7 @@ 이오텍 XPS3 (초목) EOTech XPS3 (обильная растительность) EOTech XPS3 (Exuberante) + EOTech XPS3 (Exuberante) EOTech XPS3 (Arid) @@ -4492,6 +4511,7 @@ 이오텍 XPS3 (건조) EOTech XPS3 (сухая местность) EOTech XPS3 (Árido) + EOTech XPS3 (Árido) EOTech XPS3 SMG (Tan) diff --git a/addons/realisticweights/config.cpp b/addons/realisticweights/config.cpp index 91c1ea00aa9..ebd919fc49b 100644 --- a/addons/realisticweights/config.cpp +++ b/addons/realisticweights/config.cpp @@ -2,6 +2,7 @@ class CfgPatches { class ADDON { + name = COMPONENT_NAME; units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; diff --git a/addons/realisticweights/script_component.hpp b/addons/realisticweights/script_component.hpp index fcdb3450689..bf7173a3e70 100644 --- a/addons/realisticweights/script_component.hpp +++ b/addons/realisticweights/script_component.hpp @@ -1,4 +1,5 @@ #define COMPONENT realisticweights +#define COMPONENT_BEAUTIFIED Realistic Weights #include "\z\ace\addons\main\script_mod.hpp" // #define DEBUG_MODE_FULL diff --git a/addons/rearm/functions/fnc_dropAmmo.sqf b/addons/rearm/functions/fnc_dropAmmo.sqf index af4b74ee775..ba89c9cd917 100644 --- a/addons/rearm/functions/fnc_dropAmmo.sqf +++ b/addons/rearm/functions/fnc_dropAmmo.sqf @@ -38,8 +38,8 @@ if (_actionID != -1) then { _unit removeAction _actionID; _unit setVariable [QGVAR(ReleaseActionID), nil]; }; -[_unit, "forceWalk", "ACE_rearm", false] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_rearm", false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); if (_unholster) then { REARM_UNHOLSTER_WEAPON diff --git a/addons/rearm/functions/fnc_grabAmmo.sqf b/addons/rearm/functions/fnc_grabAmmo.sqf index d3554853092..b8c53371d8d 100644 --- a/addons/rearm/functions/fnc_grabAmmo.sqf +++ b/addons/rearm/functions/fnc_grabAmmo.sqf @@ -19,8 +19,8 @@ params ["_dummy", "_unit"]; REARM_HOLSTER_WEAPON; -[_unit, "forceWalk", "ACE_rearm", true] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_rearm", true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); [ TIME_PROGRESSBAR(5), diff --git a/addons/rearm/functions/fnc_takeSuccess.sqf b/addons/rearm/functions/fnc_takeSuccess.sqf index 717d549b86c..1d112f26459 100644 --- a/addons/rearm/functions/fnc_takeSuccess.sqf +++ b/addons/rearm/functions/fnc_takeSuccess.sqf @@ -36,8 +36,8 @@ if (_vehicle == _unit) exitWith { [_unit, _magazineClass, _rounds] call EFUNC(csw,reload_handleReturnAmmo); }; -[_unit, "forceWalk", "ACE_rearm", true] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_rearm", true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); private _dummy = [_unit, _magazineClass] call FUNC(createDummy); [_dummy, _unit] call FUNC(pickUpAmmo); diff --git a/addons/recoil/CfgRecoils.hpp b/addons/recoil/CfgRecoils.hpp index 1c0751080cd..b8d181e5664 100644 --- a/addons/recoil/CfgRecoils.hpp +++ b/addons/recoil/CfgRecoils.hpp @@ -332,16 +332,17 @@ class CfgRecoils { class recoil_rpg: recoil_default { muzzleOuter[] = { - 2*MUZZLERIGHT_POS, - 3*MUZZLECLIMB_POS, - 1*MUZZLERIGHT_MAG, + 0.0*MUZZLERIGHT_POS, + 0.1*MUZZLECLIMB_POS, + 0.3*MUZZLERIGHT_MAG, 0.5*MUZZLECLIMB_MAG }; kickBack[] = { - 0.08*KICKBACK, - 0.1*KICKBACK + 0.0*KICKBACK, + 0.08*KICKBACK }; - temporary = 0.1*MUZZLETEMP; + permanent = 1.0*MUZZLEPERM; + temporary = 0.05*MUZZLETEMP; }; class recoil_nlaw: recoil_default { diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index 197d506bf52..9c6e78608f8 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -61,6 +61,9 @@ private _powerCoef = RECOIL_COEF * linearConversion [0, 1, random 1, _recoil sel if (isWeaponRested _unit) then {_powerMod = _powerMod - 0.07}; if (isWeaponDeployed _unit) then {_powerMod = _powerMod - 0.11}; +if (_weapon isEqualTo secondaryWeapon _unit) then { + _powerCoef = _powerCoef + 25.0; +}; private _camshake = [ _powerCoef * (BASE_POWER + _powerMod) max 0, diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index 44575a141d7..dbbcaf04d1c 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -238,6 +238,20 @@ class CfgVehicles { // Patria = LAV GVAR(fuelCapacity) = 269; }; + class APC_Wheeled_02_base_F: Wheeled_APC_F { + class EGVAR(interaction,anims); + }; + class APC_Wheeled_02_base_v2_F: APC_Wheeled_02_base_F { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class showCanisters { + phase = 0; + positions[] = {{-1.188, -3.87, -0.769}, {1.638, -3.87, -0.769}}; + items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F"}; + name = CSTRING(TakeFuelCanister); + text = CSTRING(TakeFuelCanisterAction); + }; + }; + }; class Truck_F: Car_F { GVAR(fuelCapacity) = 400; @@ -308,12 +322,14 @@ class CfgVehicles { class MBT_01_base_F: Tank_F { // Merkava IV GVAR(fuelCapacity) = 1400; + class EGVAR(interaction,anims); }; class MBT_02_base_F: Tank_F { // T100 Black Eagle // Assuming T80 GVAR(fuelCapacity) = 1100; + class EGVAR(interaction,anims); }; class MBT_03_base_F: Tank_F { @@ -324,11 +340,37 @@ class CfgVehicles { class MBT_01_arty_base_F: MBT_01_base_F { // Assuming similar 2S3 GVAR(fuelCapacity) = 830; + + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class showCanisters { + phase = 0; + // Rotate interactions with turret rotation + positions[] = { + "[0, -2.5, 0] vectorAdd ([[1.6, -2.4, -0.3], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)", + "[0, -2.5, 0] vectorAdd ([[1.8, 0.55, -0.7], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)", + "[0, -2.5, 0] vectorAdd ([[-1.8, 0.55, -0.7], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)" + }; + items[] = {"Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F", "Land_CanisterFuel_F"}; + name = CSTRING(TakeFuelCanister); + text = CSTRING(TakeFuelCanisterAction); + }; + }; }; class MBT_02_arty_base_F: MBT_02_base_F { // Assuming similar 2S3 GVAR(fuelCapacity) = 830; + + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class showCanisters { + phase = 0; + // Rotate interactions with turret rotation + positions[] = {"[0, -2.1, 0] vectorAdd ([[1.6, -2.65, -0.3], [0, 0, 1], deg (_target animationPhase 'MainTurret')] call CBA_fnc_vectRotate3D)"}; + items[] = {"Land_CanisterFuel_F"}; + name = CSTRING(TakeFuelCanister); + text = CSTRING(TakeFuelCanisterAction); + }; + }; }; class Heli_Light_02_base_F: Helicopter_Base_H { diff --git a/addons/refuel/functions/fnc_handleDisconnect.sqf b/addons/refuel/functions/fnc_handleDisconnect.sqf index cf4b37cce9a..3aa1831a186 100644 --- a/addons/refuel/functions/fnc_handleDisconnect.sqf +++ b/addons/refuel/functions/fnc_handleDisconnect.sqf @@ -24,4 +24,4 @@ private _nozzle = _unit getVariable [QGVAR(nozzle), objNull]; if (isNull _nozzle) exitWith {}; [_unit, _nozzle] call FUNC(dropNozzle); -[_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); diff --git a/addons/refuel/functions/fnc_returnNozzle.sqf b/addons/refuel/functions/fnc_returnNozzle.sqf index ea84f6a5180..eba836ed8a1 100644 --- a/addons/refuel/functions/fnc_returnNozzle.sqf +++ b/addons/refuel/functions/fnc_returnNozzle.sqf @@ -43,12 +43,12 @@ if (isNull _nozzle || {_source != _nozzle getVariable QGVAR(source)}) exitWith { deleteVehicle _helper; }; deleteVehicle _nozzle; - + // Restore ability to drag and carry this object _source setVariable [QEGVAR(dragging,canCarry), _source getVariable [QGVAR(canCarryLast), false], true]; _source setVariable [QEGVAR(dragging,canDrag), _source getVariable [QGVAR(canDragLast), false], true]; - [_source, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set); + [_source, "blockEngine", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); }, "", localize LSTRING(ReturnAction), diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index 611fa85e909..3e4dc23afbb 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -23,8 +23,8 @@ #define END_PFH \ _unit setVariable [QGVAR(hint), nil]; \ call EFUNC(interaction,hideMouseHint); \ - [_unit, "forceWalk", "ACE_refuel", false] call EFUNC(common,statusEffect_set); \ - [_unit, "blockThrow", "ACE_refuel", false] call EFUNC(common,statusEffect_set); \ + [_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); \ + [_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); \ [_idPFH] call CBA_fnc_removePerFrameHandler; params ["_unit", "_nozzle"]; diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index cd8f8b4eb4e..51db8789e5d 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -80,7 +80,7 @@ params [ _nozzle setVariable [QGVAR(attachPos), _attachPos, true]; _nozzle setVariable [QGVAR(source), _source, true]; - [_source, "blockEngine", "ACE_Refuel", true] call EFUNC(common,statusEffect_set); + [_source, "blockEngine", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); _source setVariable [QGVAR(isConnected), true, true]; _source setVariable [QGVAR(ownedNozzle), _nozzle, true]; @@ -100,8 +100,8 @@ params [ _unit call EFUNC(common,fixLoweredRifleAnimation); _unit action ["SwitchWeapon", _unit, _unit, 299]; - [_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set); - [_unit, "blockThrow", "ACE_refuel", true] call EFUNC(common,statusEffect_set); + [_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); + [_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); [_unit, _nozzle] call FUNC(startNozzleInHandsPFH); }, diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index 2f0c6c60c1f..ec860ff46a1 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -107,7 +107,7 @@ Gurt anhängen Töltényheveder összekötése Combina nastro - Ligar cintos de munição + Conectar cintos de munição ベルトを繋げる 탄띠 연결 连接弹链 @@ -123,7 +123,7 @@ Gurt anhängen... Töltényheveder összekötése folyamatban... Combinando nastro... - Ligando cintos... + Conectando cintos... ベルトを繋げています・・・ 탄띠 연결 중... 正在连接弹链... @@ -139,6 +139,7 @@ 탄띠가 연결되었습니다 Ремень был пристегнут Cinta enganchada + Cinto conectado Belt could not be linked @@ -150,6 +151,7 @@ 탄띠를 연결할 수 없습니다 Ремень не удалось пристегнуть La cinta no ha podido ser enganchada + Cinto não pôde ser conectado diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml index b55ccde1705..6324a97b552 100644 --- a/addons/reloadlaunchers/stringtable.xml +++ b/addons/reloadlaunchers/stringtable.xml @@ -11,6 +11,7 @@ Affichage de notifications lors d'une rechargement par un ami Отображает уведомления о загрузке помощника Mostrar notificaciones para recarga de compañero + Mostrar notificações para Carregamento de Companheiro Displays notifications when an assistant loads a gunner's launcher. @@ -22,6 +23,7 @@ Affiche une notofication lorsqu'un assistant recharge l'arme du tireur. Отображает уведомления, когда помощник загружает пусковую установку стрелка. Mostrar notificaciones cuando un asistente recarga el lanzador del tirador. + Notifica quando um assistente carrega o lançador do atirador Load launcher @@ -50,6 +52,7 @@ %1이(가) 당신의 발사기를 장전했습니다. %1 загружает Вашу установку %1 está cargando tu lanzador + %1 está carregando seu lançador %1 stopped loading your launcher @@ -61,6 +64,7 @@ %1이(가) 당신의 발사기 장전을 멈췄습니다. %1 прекратил загружать Вашу установку %1 paró de cargar tu lanzador + %1 parou de carregar seu lançador Loading launcher... @@ -123,6 +127,7 @@ 발사기를 장전할 수 없습니다. Не удалось загрузить пусковую установку El lanzador no ha podido ser cargado + O lançador não pôde ser carregado Buddy Loading @@ -134,6 +139,7 @@ バディローディング Перезарядка помощником Cargado de Compañero + Carregamento de Companheiro diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index ce74737b766..011a038f919 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -429,9 +429,34 @@ class CfgVehicles { GVAR(hitpointPositions)[] = {{"HitTurret", {0,-2,0}}}; }; + class Tank_F; + class APC_Tracked_02_base_F: Tank_F { + class EGVAR(interaction,anims) { + class showTracks { + phase = 0; + selections[] = {"vhc_tracks"}; + positions[] = {"private _pos = _target selectionPosition 'vhc_tracks'; _pos set [0, -(_pos select 0)]; _pos"}; // Mirror position to other side of vehicle + items[] = {"ACE_Track", "ACE_Track", "ACE_Track"}; + name = CSTRING(RemoveTrack); + text = CSTRING(RemovingTrack); + }; + }; + }; + class Car_F: Car { class HitPoints; }; + class Offroad_02_base_F: Car_F { + class EGVAR(interaction,anims) { + class hideSpareWheel { + positions[] = {"_target selectionPosition ['spare_wheel', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = CSTRING(RemoveWheel); + text = CSTRING(RemovingWheel); + }; + }; + }; + class Truck_F: Car_F { class HitPoints: HitPoints { class HitLBWheel; @@ -449,10 +474,43 @@ class CfgVehicles { }; }; + class Truck_01_viv_base_F; + class Truck_01_cargo_base_F: Truck_01_viv_base_F { + class EGVAR(interaction,anims) { + class Tyre1_hide { + selections[] = {"tyre1_hide"}; + items[] = {"ACE_Wheel"}; + name = CSTRING(RemoveWheel); + text = CSTRING(RemovingWheel); + }; + }; + }; + class Truck_01_flatbed_base_F: Truck_01_viv_base_F { + class EGVAR(interaction,anims) { + class Tyre1_hide { + selections[] = {"tyre1_hide"}; + items[] = {"ACE_Wheel"}; + name = CSTRING(RemoveWheel); + text = CSTRING(RemovingWheel); + }; + }; + }; + class Quadbike_01_base_F: Car_F { GVAR(hitpointPositions)[] = { {"HitEngine", {0, 0.5, -0.7}}, {"HitFuel", {0, 0, -0.5}} }; }; class Hatchback_01_base_F: Car_F { GVAR(hitpointPositions)[] = {{"HitBody", {0, 0.7, -0.5}}, {"HitFuel", {0, -1.75, -0.75}}}; }; + + class Van_02_base_F: Truck_F { + class EGVAR(interaction,anims) { + class spare_tyre_hide { + positions[] = {"_target selectionPosition ['spare_tyre', 'ViewGeometry', 'AveragePoint']"}; + items[] = {"ACE_Wheel"}; + name = CSTRING(RemoveWheel); + text = CSTRING(RemovingWheel); + }; + }; + }; }; diff --git a/addons/safemode/CfgEventHandlers.hpp b/addons/safemode/CfgEventHandlers.hpp index 6c29240403a..f6503c2479b 100644 --- a/addons/safemode/CfgEventHandlers.hpp +++ b/addons/safemode/CfgEventHandlers.hpp @@ -1,4 +1,3 @@ - class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); diff --git a/addons/safemode/XEH_PREP.hpp b/addons/safemode/XEH_PREP.hpp index 2f23aa02c9e..499ae808670 100644 --- a/addons/safemode/XEH_PREP.hpp +++ b/addons/safemode/XEH_PREP.hpp @@ -1,6 +1,6 @@ - +PREP(getWeaponSafety); PREP(lockSafety); PREP(playChangeFiremodeSound); PREP(setSafeModeVisual); -PREP(unlockSafety); PREP(setWeaponSafety); +PREP(unlockSafety); diff --git a/addons/safemode/XEH_postInit.sqf b/addons/safemode/XEH_postInit.sqf index db922f9b35d..79064789d54 100644 --- a/addons/safemode/XEH_postInit.sqf +++ b/addons/safemode/XEH_postInit.sqf @@ -4,18 +4,26 @@ if (!hasInterface) exitWith {}; -["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode), { +["ACE3 Weapons", QGVAR(safeMode), LLSTRING(SafeMode), { // Conditions: canInteract if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; + + (weaponState ACE_player) params ["_currentWeapon", "_currentMuzzle"]; + // Conditions: specific - if !([ACE_player] call CBA_fnc_canUseWeapon && {currentWeapon ACE_player != binocular ACE_player} && {currentWeapon ACE_player != ""}) exitWith {false}; + if !(ACE_player call CBA_fnc_canUseWeapon && {_currentWeapon != ""} && {_currentWeapon != binocular ACE_player}) exitWith {false}; + + // Statement: Toggle weapon safety + [ACE_player, _currentWeapon, _currentMuzzle] call FUNC(lockSafety); - // Statement - [ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety); true }, {false}, [DIK_GRAVE, [false, true, false]], false] call CBA_fnc_addKeybind; ["unit", { - private _weaponSafe = currentWeapon ACE_player in (ACE_player getVariable [QGVAR(safedWeapons), []]); - [!_weaponSafe] call FUNC(setSafeModeVisual); + (weaponState ACE_player) params ["_currentWeapon", "_currentMuzzle"]; + + private _weaponSafe = [ACE_player, _currentWeapon, _currentMuzzle] call FUNC(getWeaponSafety); + + // Player HUD + !_weaponSafe call FUNC(setSafeModeVisual); }] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/safemode/functions/fnc_getWeaponSafety.sqf b/addons/safemode/functions/fnc_getWeaponSafety.sqf new file mode 100644 index 00000000000..b171d974e4d --- /dev/null +++ b/addons/safemode/functions/fnc_getWeaponSafety.sqf @@ -0,0 +1,45 @@ +#include "..\script_component.hpp" +/* + * Author: johnb43 + * Getter for weapon safety state. + * + * Arguments: + * 0: Unit + * 1: Weapon + * 2: Muzzle (default: current muzzle of weapon) + * + * Return Value: + * Safety status + * + * Example: + * [ACE_player, currentWeapon ACE_player] call ace_safemode_fnc_getWeaponSafety + * + * Public: Yes + */ + +params [ + ["_unit", objNull, [objNull]], + ["_weapon", "", [""]], + ["_muzzle", nil, [""]] +]; + +if (_weapon == "" || {!(_unit hasWeapon _weapon)}) exitWith {false}; + +// Check if weapon is a binocular +if ((_weapon call EFUNC(common,getItemType)) select 1 == "binocular") exitWith {false}; + +// Check for invalid muzzles +_muzzle = if (isNil "_muzzle") then { + // Get current weapon muzzle if not defined + (_unit weaponState _weapon) select 1 +} else { + // Get config case muzzle names + private _muzzles = _weapon call EFUNC(common,getWeaponMuzzles); + + _muzzles param [_muzzles findIf {_x == _muzzle}, ""] +}; + +// Weapon is not available +if (_muzzle == "") exitWith {false}; + +_muzzle in ((_unit getVariable [QGVAR(safedWeapons), createHashMap]) getOrDefault [_weapon, createHashMap]) // return diff --git a/addons/safemode/functions/fnc_lockSafety.sqf b/addons/safemode/functions/fnc_lockSafety.sqf index 6c617c18989..28adb42df91 100644 --- a/addons/safemode/functions/fnc_lockSafety.sqf +++ b/addons/safemode/functions/fnc_lockSafety.sqf @@ -1,13 +1,13 @@ #include "..\script_component.hpp" /* - * Author: commy2 - * Put weapon on safety, or take it off safety if safety is already put on. + * Author: commy2, johnb43 + * Puts weapon on safety, or take it off safety if safety is already put on. * * Arguments: * 0: Unit * 1: Weapon * 2: Muzzle - * 3: Show hint + * 3: Show hint (default: true) * * Return Value: * None @@ -18,67 +18,74 @@ * Public: No */ -params ["_unit", "_weapon", "_muzzle", ["_hint", true, [true]]]; +params ["_unit", "_weapon", "_muzzle", ["_hint", true]]; -private _safedWeapons = _unit getVariable [QGVAR(safedWeapons), []]; +private _safedWeapons = _unit getVariable QGVAR(safedWeapons); -if (_weapon in _safedWeapons) exitWith { - _this call FUNC(unlockSafety); +if (isNil "_safedWeapons") then { + _safedWeapons = createHashMap; + + _unit setVariable [QGVAR(safedWeapons), _safedWeapons]; +}; + +// See if the current weapon has locked muzzles +private _safedWeaponMuzzles = _safedWeapons getOrDefault [_weapon, createHashMap, true]; + +// If muzzle is locked, unlock it (toggle) +if (_muzzle in _safedWeaponMuzzles) exitWith { + [_unit, _weapon, _muzzle, _hint] call FUNC(unlockSafety); }; -_safedWeapons pushBack _weapon; +private _firemode = (_unit weaponState _muzzle) select 2; -_unit setVariable [QGVAR(safedWeapons), _safedWeapons]; +// This syntax of selectWeapon doesn't mess with gun lights and lasers +_unit selectWeapon [_weapon, _muzzle, _firemode]; -if (_unit getVariable [QGVAR(actionID), -1] == -1) then { +// Store new muzzle & firemode +_safedWeaponMuzzles set [_muzzle, _firemode]; + +// Lock muzzle +if (isNil {_unit getVariable QGVAR(actionID)}) then { _unit setVariable [QGVAR(actionID), [ _unit, "DefaultAction", { + params ["", "_unit"]; + if ( - [_this select 1] call CBA_fnc_canUseWeapon - && { - if (currentMuzzle (_this select 1) in ((_this select 1) getVariable [QGVAR(safedWeapons), []])) then { - if (inputAction "nextWeapon" > 0) exitWith { - [_this select 1, currentWeapon (_this select 1), currentMuzzle (_this select 1)] call FUNC(unlockSafety); + _unit call CBA_fnc_canUseWeapon && { + (weaponState _unit) params ["_currentWeapon", "_currentMuzzle"]; + + // Block firing the muzzle in safe mode + if (_currentMuzzle in ((_unit getVariable [QGVAR(safedWeapons), createHashMap]) getOrDefault [_currentWeapon, createHashMap])) then { + if (inputAction "nextWeapon" > 0 || {inputAction "prevWeapon" > 0}) exitWith { + [_unit, _currentWeapon, _currentMuzzle] call FUNC(unlockSafety); + false }; + true - } else {false} + } else { + false + } } ) then { - // player hud - [false] call FUNC(setSafeModeVisual); + // Player HUD + false call FUNC(setSafeModeVisual); + true } else { - // player hud - [true] call FUNC(setSafeModeVisual); + // Player HUD + true call FUNC(setSafeModeVisual); + false }; }, {} ] call EFUNC(common,addActionEventHandler)]; }; -if (_muzzle isEqualType "") then { - private _laserEnabled = _unit isIRLaserOn _weapon || {_unit isFlashlightOn _weapon}; - - _unit selectWeapon _muzzle; - - if ( - _laserEnabled - && { - _muzzle == primaryWeapon _unit // prevent UGL switch - || {"" == primaryWeapon _unit} // Arma switches to primary weapon if exists - } - ) then { - {_unit action [_x, _unit]} forEach ["GunLightOn", "IRLaserOn"]; - }; -}; - -// play fire mode selector sound +// Play fire mode selector sound [_unit, _weapon, _muzzle] call FUNC(playChangeFiremodeSound); -// show info box unless disabled +// Show info box unless disabled if (_hint) then { - private _picture = getText (configFile >> "CfgWeapons" >> _weapon >> "picture"); - [localize LSTRING(PutOnSafety), _picture] call EFUNC(common,displayTextPicture); + [LLSTRING(PutOnSafety), getText (configFile >> "CfgWeapons" >> _weapon >> "picture")] call EFUNC(common,displayTextPicture); }; - diff --git a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf index 257e5864f6b..1edc2363340 100644 --- a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: commy2 - * Play weapon firemode change sound. + * Plays weapon firemode change sound. * * Arguments: * 0: Unit @@ -21,21 +21,23 @@ params ["_unit", "_weapon"]; private _sound = getArray (configFile >> "CfgWeapons" >> _weapon >> "changeFiremodeSound"); if (_sound isEqualTo []) exitWith { - playSound "ACE_Sound_Click"; + playSoundUI ["ACE_Sound_Click"]; }; -// get position where to play the sound (position of the weapon) -private _position = _unit modelToWorldVisualWorld (_unit selectionPosition "RightHand"); - -_sound params ["_filename", ["_volume", 1], ["_soundPitch", 1], ["_distance", 0]]; +_sound params [["_filename", ""], ["_volume", 1], ["_soundPitch", 1], ["_distance", 0]]; if (_filename == "") exitWith { - playSound "ACE_Sound_Click"; + playSoundUI ["ACE_Sound_Click"]; }; -// add file extension .wss as default +// Add file extension .wss as default if !(toLowerANSI (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then { _filename = format ["%1.wss", _filename]; }; -playSound3D [_filename, objNull, false, _position, _volume, _soundPitch, _distance]; +// Get position where to play the sound (position of the weapon) +private _position = _unit modelToWorldVisualWorld (_unit selectionPosition "RightHand"); + +playSound3D [_filename, objNull, insideBuilding _unit >= 0.5, _position, _volume, _soundPitch, _distance]; + +nil // return diff --git a/addons/safemode/functions/fnc_setSafeModeVisual.sqf b/addons/safemode/functions/fnc_setSafeModeVisual.sqf index d62a542b9d7..12b7f864ef3 100644 --- a/addons/safemode/functions/fnc_setSafeModeVisual.sqf +++ b/addons/safemode/functions/fnc_setSafeModeVisual.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: commy2 - * Show firemode indicator, representing safety lock + * Shows firemode indicator, representing safety lock. * * Arguments: * 0: Show firemode @@ -10,7 +10,7 @@ * None * * Example: - * [true] call ace_safemode_fnc_setSafeModeVisual + * true call ace_safemode_fnc_setSafeModeVisual * * Public: No */ @@ -27,8 +27,8 @@ if (_show) then { private _config = configFile >> "RscInGameUI" >> "RscUnitInfoSoldier" >> "WeaponInfoControlsGroupLeft" >> "controls" >> "CA_ModeTexture"; _control ctrlSetPosition [getNumber (_config >> "x"), getNumber (_config >> "y"), getNumber (_config >> "w"), getNumber (_config >> "h")]; - _control ctrlCommit 0; } else { _control ctrlSetPosition [0, 0, 0, 0]; - _control ctrlCommit 0; }; + +_control ctrlCommit 0; diff --git a/addons/safemode/functions/fnc_setWeaponSafety.sqf b/addons/safemode/functions/fnc_setWeaponSafety.sqf index d80e1d8c38f..3db0033bf8f 100644 --- a/addons/safemode/functions/fnc_setWeaponSafety.sqf +++ b/addons/safemode/functions/fnc_setWeaponSafety.sqf @@ -1,13 +1,14 @@ #include "..\script_component.hpp" /* - * Author: Brostrom.A - * Safe or unsafe the given weapon based on weapon state; locked or unlocked. + * Author: Brostrom.A, johnb43 + * Lock or unlock the given weapon based on weapon state. * * Arguments: * 0: Unit * 1: Weapon * 2: State * 3: Show hint (default: true) + * 4: Muzzle (default: current muzzle of weapon) * * Return Value: * None @@ -22,17 +23,31 @@ params [ ["_unit", objNull, [objNull]], ["_weapon", "", [""]], ["_state", true, [true]], - ["_hint", true, [true]] + ["_hint", true, [true]], + ["_muzzle", nil, [""]] ]; -if (_weapon == "") exitWith {}; +// Don't allow to set weapon safety if unit doesn't have one (but allow removing safety, in case unit doesn't have weapon anymore) +if (_weapon == "" || {_state && {!(_unit hasWeapon _weapon)}}) exitWith {}; -private _safedWeapons = _unit getVariable [QGVAR(safedWeapons), []]; +// Check if weapon is a binocular +if ((_weapon call EFUNC(common,getItemType)) select 1 == "binocular") exitWith {}; -_weapon = configName (configFile >> "CfgWeapons" >> _weapon); +// Check for invalid muzzles +_muzzle = if (isNil "_muzzle") then { + // Get current weapon muzzle if not defined + (_unit weaponState _weapon) select 1 +} else { + // Get config case muzzle names + private _muzzles = _weapon call EFUNC(common,getWeaponMuzzles); -private _muzzle = currentMuzzle _unit; - -if (_state isNotEqualTo (_weapon in _safedWeapons)) then { - [_unit, _weapon, _muzzle, _hint] call FUNC(lockSafety); + _muzzles param [_muzzles findIf {_x == _muzzle}, ""] }; + +// Weapon is not available +if (_muzzle == "") exitWith {}; + +// If the weapon is already in the desired state, don't do anything +if (_state == (_muzzle in ((_unit getVariable [QGVAR(safedWeapons), createHashMap]) getOrDefault [_weapon, createHashMap]))) exitWith {}; + +[_unit, _weapon, _muzzle, _hint] call FUNC(lockSafety); diff --git a/addons/safemode/functions/fnc_unlockSafety.sqf b/addons/safemode/functions/fnc_unlockSafety.sqf index 10372f1a2ef..97716025dc6 100644 --- a/addons/safemode/functions/fnc_unlockSafety.sqf +++ b/addons/safemode/functions/fnc_unlockSafety.sqf @@ -1,13 +1,13 @@ #include "..\script_component.hpp" /* - * Author: commy2 - * Take weapon of safety lock. + * Author: commy2, johnb43 + * Takes the weapon safety lock off. * * Arguments: * 0: Unit * 1: Weapon * 2: Muzzle - * 3: Show hint + * 3: Show hint (default: true) * * Return Value: * None @@ -18,67 +18,37 @@ * Public: No */ -params ["_unit", "_weapon", "_muzzle", ["_hint", true, [true]]]; +params ["_unit", "_weapon", "_muzzle", ["_hint", true]]; -private _safedWeapons = _unit getVariable [QGVAR(safedWeapons), []]; -_safedWeapons deleteAt (_safedWeapons find _weapon); +private _safedWeaponMuzzles = (_unit getVariable QGVAR(safedWeapons)) get _weapon; +private _firemode = _safedWeaponMuzzles deleteAt _muzzle; -_unit setVariable [QGVAR(safedWeapons), _safedWeapons]; +// Remove action if all weapons have removed their safeties +if (_safedWeaponMuzzles isEqualTo createHashMap) then { + (_unit getVariable QGVAR(safedWeapons)) deleteAt _weapon; -// remove action if all weapons have put their safety on -if (_safedWeapons isEqualTo []) then { - [_unit, "DefaultAction", _unit getVariable [QGVAR(actionID), -1]] call EFUNC(common,removeActionEventHandler); - _unit setVariable [QGVAR(actionID), -1]; -}; - -private _laserEnabled = _unit isIRLaserOn _weapon || {_unit isFlashlightOn _weapon}; + private _ehID = _unit getVariable QGVAR(actionID); -_unit selectWeapon _muzzle; + if (!isNil "_ehID" && {(_unit getVariable QGVAR(safedWeapons)) isEqualTo createHashMap}) then { + [_unit, "DefaultAction", _ehID] call EFUNC(common,removeActionEventHandler); -if ( - _laserEnabled - && { - _muzzle == primaryWeapon _unit // prevent UGL switch - || {"" == primaryWeapon _unit} // Arma switches to primary weapon if exists - } -) then { - {_unit action [_x, _unit]} forEach ["GunLightOn", "IRLaserOn"]; + _unit setVariable [QGVAR(actionID), nil]; + }; }; -if (inputAction "nextWeapon" > 0) then { - // switch to the last mode to roll over to first after the default nextWeapon action - // get weapon modes - private _modes = []; - { - if (getNumber (configFile >> "CfgWeapons" >> _weapon >> _x >> "showToPlayer") == 1) then { - _modes pushBack _x; - }; - if (_x == "this") then { - _modes pushBack _weapon; - }; - } forEach getArray (configFile >> "CfgWeapons" >> _weapon >> "modes"); +// Let engine handle switching to next firemode/muzzle +if (inputAction "nextWeapon" == 0 && {inputAction "prevWeapon" == 0}) then { + // This syntax of selectWeapon doesn't mess with gun lights and lasers + _unit selectWeapon [_weapon, _muzzle, _firemode]; - // select last mode - private _mode = _modes select (count _modes - 1); - - // switch to last mode - private _index = 0; - while { - _index < 299 && {currentMuzzle _unit != _weapon || {currentWeaponMode _unit != _mode}} - } do { - _unit action ["SwitchWeapon", _unit, _unit, _index]; - _index = _index + 1; - }; -} else { - // play fire mode selector sound + // Play fire mode selector sound [_unit, _weapon, _muzzle] call FUNC(playChangeFiremodeSound); }; -// player hud -[true] call FUNC(setSafeModeVisual); +// Player HUD +true call FUNC(setSafeModeVisual); -// show info box unless disabled +// Show info box unless disabled if (_hint) then { - private _picture = getText (configFile >> "CfgWeapons" >> _weapon >> "picture"); - [localize LSTRING(TookOffSafety), _picture] call EFUNC(common,displayTextPicture); + [LLSTRING(TookOffSafety), getText (configFile >> "CfgWeapons" >> _weapon >> "picture")] call EFUNC(common,displayTextPicture); }; diff --git a/addons/sandbag/functions/fnc_deploy.sqf b/addons/sandbag/functions/fnc_deploy.sqf index 1ef84851128..31818907489 100644 --- a/addons/sandbag/functions/fnc_deploy.sqf +++ b/addons/sandbag/functions/fnc_deploy.sqf @@ -18,8 +18,8 @@ params ["_unit"]; // prevent the placing unit from running -[_unit, "forceWalk", "ACE_Sandbag", true] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Sandbag", true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); // create the sandbag private _sandBag = createVehicle ["ACE_SandbagObject_NoGeo", [0, 0, 0], [], 0, "NONE"]; diff --git a/addons/sandbag/functions/fnc_deployCancel.sqf b/addons/sandbag/functions/fnc_deployCancel.sqf index aa2c2419a39..bccae637e5e 100644 --- a/addons/sandbag/functions/fnc_deployCancel.sqf +++ b/addons/sandbag/functions/fnc_deployCancel.sqf @@ -21,8 +21,8 @@ params ["_unit", "_key"]; if (_key != 1 || {GVAR(deployPFH) == -1}) exitWith {}; // enable running again -[_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); // delete placement dummy deleteVehicle GVAR(sandBag); diff --git a/addons/sandbag/functions/fnc_deployConfirm.sqf b/addons/sandbag/functions/fnc_deployConfirm.sqf index 20b821b3b53..ef2aafd97c7 100644 --- a/addons/sandbag/functions/fnc_deployConfirm.sqf +++ b/addons/sandbag/functions/fnc_deployConfirm.sqf @@ -18,8 +18,8 @@ params ["_unit"]; // enable running again -[_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); // remove sandbag from inventory _unit removeItem "ACE_Sandbag_empty"; diff --git a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf index ab84db7cde1..ed1222e3bbc 100644 --- a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf +++ b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf @@ -36,25 +36,23 @@ if (_initSpeedCoef < 0) then { _initSpeed = _initSpeed * (-1 * _initSpeedCoef); }; -private _zeroAngle = "ace_advanced_ballistics" callExtension format ["replicateVanillaZero:%1:%2:%3", _oldZeroRange, _initSpeed, _airFriction]; -private _vanillaZero = parseNumber _zeroAngle; +private _vanillaZero = parseNumber (("ace" callExtension ["ballistics:replicate_vanilla_zero", [_oldZeroRange, _initSpeed, _airFriction]]) select 0); #ifdef DISABLE_DISPERSION _vanillaZero = 0; #endif private _trueZero = if (!_advancedBallistics) then { - _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _newZeroRange, _initSpeed, _airFriction, _boreHeight]; - (parseNumber _zeroAngle) + parseNumber (("ace" callExtension ["ballistics:zero_vanilla", [_newZeroRange, _initSpeed, _airFriction, _boreHeight]]) select 0) } else { // Get Weapon and Ammo Configurations private _AmmoCacheEntry = uiNamespace getVariable format[QEGVAR(advanced_ballistics,%1), _ammo]; if (isNil "_AmmoCacheEntry") then { - _AmmoCacheEntry = _ammo call EFUNC(advanced_ballistics,readAmmoDataFromConfig); + _AmmoCacheEntry = _ammo call EFUNC(advanced_ballistics,readAmmoDataFromConfig); }; private _WeaponCacheEntry = uiNamespace getVariable format[QEGVAR(advanced_ballistics,%1), _weapon]; if (isNil "_WeaponCacheEntry") then { - _WeaponCacheEntry = _weapon call EFUNC(advanced_ballistics,readWeaponDataFromConfig); + _WeaponCacheEntry = _weapon call EFUNC(advanced_ballistics,readWeaponDataFromConfig); }; _AmmoCacheEntry params ["_airFriction", "_caliber", "_bulletLength", "_bulletMass", "_transonicStabilityCoef", "_dragModel", "_ballisticCoefficients", "_velocityBoundaries", "_atmosphereModel", "_ammoTempMuzzleVelocityShifts", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocityVariationSD"]; @@ -70,8 +68,19 @@ private _trueZero = if (!_advancedBallistics) then { _initSpeed = _initSpeed + _ammoTemperatureVelocityShift; }; - _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZeroAB:%1:%2:%3:%4:%5:%6:%7:%8:%9", _newZeroRange, _initSpeed, _boreHeight, GVAR(zeroReferenceTemperature), GVAR(zeroReferenceBarometricPressure), GVAR(zeroReferenceHumidity), _ballisticCoefficients select 0, _dragModel, _atmosphereModel]; - (parseNumber _zeroAngle) + parseNumber ( + ("ace" callExtension ["ballistics:zero_advanced", [ + _newZeroRange, + _initSpeed, + _boreHeight, + GVAR(zeroReferenceTemperature), + GVAR(zeroReferenceBarometricPressure), + GVAR(zeroReferenceHumidity), + _ballisticCoefficients select 0, + _dragModel, + _atmosphereModel + ]]) select 0 + ) }; private _zeroAngleCorrection = _trueZero - _vanillaZero; diff --git a/addons/smallarms/stringtable.xml b/addons/smallarms/stringtable.xml index 0b89a38b0d0..ebb387113ab 100644 --- a/addons/smallarms/stringtable.xml +++ b/addons/smallarms/stringtable.xml @@ -30,6 +30,7 @@ .45 ACP 25Rnd マガジン .45 ACP 25发 弹匣 .45 ACP 25발 탄창 + Carregador 25Mun. .45 ACP .45 ACP 25Rnd Tracers (Green) Mag @@ -44,6 +45,7 @@ .45 ACP 25Rnd トレーサー (緑) マガジン .45 ACP 25发 弹匣(曳光,绿) .45 ACP 25발 예광탄 (초록) 탄창 + Carregador 25Mun. .45 ACP Traçante (Verde) .45 ACP 25Rnd Tracers (Red) Mag @@ -58,6 +60,7 @@ .45 ACP 25Rnd トレーサー (赤) マガジン .45 ACP 25发 弹匣(曳光,红) .45 ACP 25발 예광탄 (빨강) 탄창 + Carregador 25Mun. .45 ACP Traçante (Vermelha) .45 ACP 25Rnd Tracers (Yellow) Mag @@ -72,6 +75,7 @@ .45 ACP 25Rnd トレーサー (黄) マガジン .45 ACP 25发 弹匣(曳光,黄) .45 ACP 25발 예광탄 (노랑) 탄창 + Carregador 25Mun. .45 ACP Traçante (Amarela) .45 ACP 8Rnd Mag @@ -86,6 +90,7 @@ .45 ACP 8Rnd マガジン .45 ACP 8发 弹匣 .45 ACP 8발 탄창 + Carregador 8Mun. .45 ACP .45 ACP 15Rnd Mag @@ -100,6 +105,7 @@ .45 ACP 15Rnd マガジン .45 ACP 15发 弹匣 .45 ACP 15발 탄창 + Carregador 15Mun. .45 ACP diff --git a/addons/switchunits/functions/fnc_initPlayer.sqf b/addons/switchunits/functions/fnc_initPlayer.sqf index ffc0f7ad630..ba9c3f77b30 100644 --- a/addons/switchunits/functions/fnc_initPlayer.sqf +++ b/addons/switchunits/functions/fnc_initPlayer.sqf @@ -36,7 +36,7 @@ if (vehicle _playerUnit == _playerUnit) then { removeAllContainers _playerUnit; _playerUnit linkItem "ItemMap"; - [_playerUnit, "forceWalk", "ACE_SwitchUnits", true] call EFUNC(common,statusEffect_set); + [_playerUnit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); [] call FUNC(addMapFunction); }; diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf index 7c05cbbe63b..24013f02d74 100644 --- a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf @@ -23,8 +23,8 @@ params ["_unit", "_key"]; if (_key != 1 || {isNull GVAR(ladder)}) exitWith {}; // enable running again -[_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); detach GVAR(ladder); diff --git a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf index 9fe13e4e658..8211dc5f9d0 100644 --- a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf @@ -19,8 +19,8 @@ params ["_unit", "_ladder"]; // enable running again -[_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); private _pos1 = getPosASL _ladder; private _pos2 = _ladder modelToWorldWorld (_ladder selectionPosition "check2"); diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf index 6d6f78f1a34..e9168d75a1a 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -21,8 +21,8 @@ params ["_unit", "_ladder"]; // prevent the placing unit from running -[_unit, "forceWalk", "ACE_Ladder", true] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Ladder", true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); { _ladder animate [_x, 0]; diff --git a/addons/towing/stringtable.xml b/addons/towing/stringtable.xml index 949d36dd488..7549fb3c8a8 100644 --- a/addons/towing/stringtable.xml +++ b/addons/towing/stringtable.xml @@ -12,6 +12,7 @@ 牵引 견인 Remolcado + Rebocando Attach Tow Rope @@ -24,6 +25,7 @@ 系上牵引绳 견인줄 부착 Sujetar cuerda de remolcado + Fixar corda de reboque Attaching Cancelled @@ -36,6 +38,7 @@ 取消系上绳索 견인 취소됨 Sujección cancelada + Reboque cancelado Attach Tow Rope (3.2m) @@ -48,6 +51,7 @@ 系上牵引绳(3.2米) 견인줄 부착(3.2M) Sujetar cuerda de remolcado (3.2m) + Fixar corda de reboque (3,2m) Attach Tow Rope (6.2m) @@ -60,6 +64,7 @@ 系上牵引绳(6.2米) 견인줄 부착(6.2M) Sujetar cuerda de remolcado (6.2m) + Fixar corda de reboque (6,2m) Attach Tow Rope (12.2m) @@ -72,6 +77,7 @@ 系上牵引绳(12.2米) 견인줄 부착(12.2M) Sujetar cuerda de remolcado (12.2m) + Fixar corda de reboque (12,2m) Attach Tow Rope (15.2m) @@ -84,6 +90,7 @@ 系上牵引绳(15.2米) 견인줄 부착(15.2M) Sujetar cuerda de remolcado (15.2m) + Fixar corda de reboque (15,2m) Attach Tow Rope (18.3m) @@ -96,6 +103,7 @@ 系上牵引绳(18.3米) 견인줄 부착(18.2M) Sujetar cuerda de remolcado (18.3m) + Fixar corda de reboque (18,3m) Attach Tow Rope (27.4m) @@ -108,6 +116,7 @@ 系上牵引绳(27.4米) 견인줄 부착(27.4M) Sujetar cuerda de remolcado (27.4m) + Fixar corda de reboque (27,4m) Attach Tow Rope (36.6m) @@ -120,6 +129,7 @@ 系上牵引绳(36.6米) 견인줄 부착(36.6M) Sujetar cuerda de remolcado (36.6m) + Fixar corda de reboque (36,6m) Detach Tow Rope @@ -132,6 +142,7 @@ 解开牵引绳 견인줄 분리 Desmontar cuerda de remolcado + Soltar corda de reboque Add Tow Rope to Vehicle Inventory @@ -143,6 +154,7 @@ 車両のインベントリに牽引ロープを追加する Abschleppseil zum Fahrzeuginventar hinzufügen Ajouter une corde à l'inventaire des véhicules + Adicionar corda de reboque ao inventário do veículo diff --git a/addons/trenches/CfgVehicles.hpp b/addons/trenches/CfgVehicles.hpp index bec66e2e641..554a75149b8 100644 --- a/addons/trenches/CfgVehicles.hpp +++ b/addons/trenches/CfgVehicles.hpp @@ -106,4 +106,44 @@ class CfgVehicles { MACRO_ADDITEM(ACE_EntrenchingTool,50); }; }; + + class Wheeled_APC_F; + class APC_Wheeled_02_base_F: Wheeled_APC_F { + class EGVAR(interaction,anims); + }; + class APC_Wheeled_02_base_v2_F: APC_Wheeled_02_base_F { + class EGVAR(interaction,anims): EGVAR(interaction,anims) { + class showTools { + phase = 0; + positions[] = {{-1.108, -1.47, -0.769}}; + items[] = {"ACE_EntrenchingTool"}; + name = CSTRING(EntrenchingToolName); + text = CSTRING(EntrenchingToolName); + }; + }; + }; + class APC_Wheeled_03_base_F: Wheeled_APC_F { + class EGVAR(interaction,anims) { + class showTools { + phase = 0; + positions[] = {{-0.9, -3, -0.5}}; + items[] = {"ACE_EntrenchingTool"}; + name = CSTRING(EntrenchingToolName); + text = CSTRING(EntrenchingToolName); + }; + }; + }; + + class Tank_F; + class LT_01_base_F: Tank_F { + class EGVAR(interaction,anims) { + class showTools { + phase = 0; + positions[] = {{0.6, 0, -0.3}}; + items[] = {"ACE_EntrenchingTool"}; + name = CSTRING(EntrenchingToolName); + text = CSTRING(EntrenchingToolName); + }; + }; + }; }; diff --git a/addons/trenches/functions/fnc_placeCancel.sqf b/addons/trenches/functions/fnc_placeCancel.sqf index a06ecff4590..f3cd20c0beb 100644 --- a/addons/trenches/functions/fnc_placeCancel.sqf +++ b/addons/trenches/functions/fnc_placeCancel.sqf @@ -21,8 +21,8 @@ params ["_unit", "_key"]; if (_key != 1 || {GVAR(digPFH) == -1}) exitWith {}; // enable running again -[_unit, "forceWalk", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); // delete placement dummy deleteVehicle GVAR(trench); diff --git a/addons/trenches/functions/fnc_placeConfirm.sqf b/addons/trenches/functions/fnc_placeConfirm.sqf index 03d4791e026..9a49df86e79 100644 --- a/addons/trenches/functions/fnc_placeConfirm.sqf +++ b/addons/trenches/functions/fnc_placeConfirm.sqf @@ -18,8 +18,8 @@ params ["_unit"]; // enable running again -[_unit, "forceWalk", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), false] call EFUNC(common,statusEffect_set); // remove dig pfh [GVAR(digPFH)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf index f49aef4a385..e6e03e0b579 100644 --- a/addons/trenches/functions/fnc_placeTrench.sqf +++ b/addons/trenches/functions/fnc_placeTrench.sqf @@ -27,8 +27,8 @@ GVAR(trenchPlacementData) = getArray (configFile >> "CfgVehicles" >> _trenchClas TRACE_1("",GVAR(trenchPlacementData)); // prevent the placing unit from running -[_unit, "forceWalk", "ACE_Trenches", true] call EFUNC(common,statusEffect_set); -[_unit, "blockThrow", "ACE_Trenches", true] call EFUNC(common,statusEffect_set); +[_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); +[_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); // create the trench private _trench = createVehicle [_noGeoModel, [0, 0, 0], [], 0, "NONE"]; diff --git a/addons/trenches/stringtable.xml b/addons/trenches/stringtable.xml index 4b47ee6a144..5242603bc28 100644 --- a/addons/trenches/stringtable.xml +++ b/addons/trenches/stringtable.xml @@ -237,6 +237,7 @@ Camuffa la trincea 塹壕を偽装 Graben tarnen + Camuflar trincheira Removing Trench @@ -265,6 +266,7 @@ ACE Trincee ACE 战壕 ACE 참호 + ACE Trincheiras Small Trench Dig Duration @@ -277,6 +279,7 @@ Trincea piccola - Durata di scavo 小型战壕挖掘时间 소형참호 건설 시간 + Duração de Escavamento de Trincheira Pequena Time, in seconds, required to dig a small trench. @@ -289,6 +292,7 @@ Tempo in secondi per scavare una trincea piccola. 挖一条小型战壕所需的时间(秒)。 소형 참호를 팔 때 필요한 시간을 설정합니다. (초 단위) + Tempo, em segundos, necessário para cavar uma trincheira pequena. Small Trench Remove Duration @@ -301,6 +305,7 @@ Trincea piccola - Durata di rimozione 小型战壕回填时间 소형참호 제거 시간 + Duração de Remoção de Trincheira Pequena Time, in seconds, required to remove a small trench. @@ -313,6 +318,7 @@ Tempo in secondi per rimuovere una trincea piccola. 回填一条小型战壕所需的时间(秒)。 소형 참호를 제거할때 필요한 시간을 설정합니다. (초 단위) + Tempo, em segundos, necessário para remover uma trincheira pequena. Big Trench Dig Duration @@ -325,6 +331,7 @@ Trincea grande - Durata di scavo 大型战壕挖掘时间 대형참호 건설 시간 + Duração de Escavamento de Trincheira Grande Time, in seconds, required to dig a big trench. @@ -337,6 +344,7 @@ Tempo in secondi per scavare una trincea grande. 挖一条大型战壕所需的时间(秒)。 대형 참호를 팔때 필요한 시간을 설정합니다. (초 단위) + Tempo, em segundos, necessário para cavar uma trincheira grande. Big Trench Remove Duration @@ -349,6 +357,7 @@ Trincea grande - Durata di rimozione 大型战壕回填时间 대형참호 제거 시간 + Duração de Remoção de Trincheira Grande Time, in seconds, required to remove a big trench. @@ -361,6 +370,7 @@ Tempo in secondi per rimuovere una trincea grande. 回填一条大型战壕所需的时间(秒)。 대형 참호를 제거할때 필요한 시간을 설정합니다. (초 단위) + Tempo, em segundos, necessário para remover uma trincheira grande. diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index 2578f58c6d0..11089428c24 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -168,6 +168,7 @@ Filigrana per versione in fase di sviluppo 开发建设水印 개발용 빌드 워터마크 + Marca d'agua de versão de desenvolvimento Weapon Name @@ -680,6 +681,7 @@ 启用移动速度指示器 이동 속도 표시기 활성화 Habilitar indicador de velocidad de movimiento + Habilitar indicador de velocidade de movimento Enables movement speed indicator for player character. @@ -692,6 +694,7 @@ 为玩家角色启用移动速度指示器。 플레이어 캐릭터를 위한 이동속도 표시기를 활성화합니다. Habilita el indicador de velocidad de movimiento para el personaje del jugador. + Habilita o indicador de velocidade de movimento do personagem do jogador. Hide Default Action Icon @@ -704,6 +707,7 @@ Standardaktionssymbol ausblenden Masquer l'icône d'action par défaut Nascondi Icona dell'Interazione Standard + Esconder ícone padrão de ação Hides the icon shown automatically when something is in front of the cursor. Requires a game restart.\nWarning: Does not remove the action itself! It is advisable to unbind 'Use default action' key to prevent unwanted interactions. @@ -716,6 +720,7 @@ Blendet das Symbol aus, das automatisch angezeigt wird, wenn sich etwas vor dem Cursor befindet. Erfordert einen Neustart des Spiels.\nWarnung: Die Aktion selbst wird nicht entfernt! Es empfiehlt sich, die Belegung der Taste 'Standardaktion verwenden' aufzuheben, um unerwünschte Interaktionen zu verhindern. Cache l'icône qui s'affiche automatiquement lorsque quelque chose est devant le curseur. Nécessite un redémarrage du jeu.\nAvertissement : l'action n'est pas supprimée ! Il est recommandé d'annuler l'affectation du bouton 'Utiliser l'action par défaut' afin d'éviter des interactions indésirables. Nasconde l'icona mostrata in automatico quando qualcosa è davanti al cursore. La modifica richiede un riavvio del gioco.\nAttenzione: Non rimuovere l'azione stessa! È consigliato rimuovere solo il tasto dall'assegnazione 'Usa Azione Standard' per impedire interazioni non volute. + Esconde o ícone mostrado automaticamente quando algo está a frente do cursor. É preciso reiniciar o jogo.\nAviso: Não remove a ação em si! É recomendado desvincular a tecla de "Usar ação padrão" para previnir interações indesejadas. diff --git a/addons/vehicle_damage/CfgAmmo.hpp b/addons/vehicle_damage/CfgAmmo.hpp index 408c3e7b157..ad84fbc53cd 100644 --- a/addons/vehicle_damage/CfgAmmo.hpp +++ b/addons/vehicle_damage/CfgAmmo.hpp @@ -21,9 +21,6 @@ class CfgAmmo { class M_Vorona_HEAT; class M_SPG9_HEAT; class R_MRAAWS_HEAT_F; - class B_338_Ball; - - class ACE_G_40mm_HE; CREATE_INCENDIARY_AMMO(BulletBase, BulletCore, 0.1); CREATE_INCENDIARY_AMMO(ShellBase, ShellCore, 1.0); diff --git a/addons/vehicle_damage/CfgEventHandlers.hpp b/addons/vehicle_damage/CfgEventHandlers.hpp index 74ffec132ee..f6503c2479b 100644 --- a/addons/vehicle_damage/CfgEventHandlers.hpp +++ b/addons/vehicle_damage/CfgEventHandlers.hpp @@ -1,19 +1,17 @@ - class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; -class Extended_PostInit_EventHandlers { +class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; -class Extended_PreInit_EventHandlers { +class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; - diff --git a/addons/vehicle_damage/CfgVehicles.hpp b/addons/vehicle_damage/CfgVehicles.hpp index 9ea47711ea9..96a6e956e67 100644 --- a/addons/vehicle_damage/CfgVehicles.hpp +++ b/addons/vehicle_damage/CfgVehicles.hpp @@ -28,6 +28,7 @@ class CfgVehicles { GVAR(engineFireProb) = 0.5; GVAR(detonationDuringFireProb) = 0.2; GVAR(canHaveFireRing) = 0; + EGVAR(cookoff,canHaveFireJet) = 1; }; class Wheeled_APC_F: Car_F { GVAR(hullDetonationProb) = 0.2; @@ -38,6 +39,7 @@ class CfgVehicles { GVAR(engineFireProb) = 0.5; GVAR(detonationDuringFireProb) = 0.2; GVAR(canHaveFireRing) = 0; + EGVAR(cookoff,canHaveFireJet) = 1; }; class APC_Tracked_01_base_F: Tank_F {}; class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {}; @@ -288,4 +290,3 @@ class CfgVehicles { GVAR(canHaveFireRing) = 1; }; }; - diff --git a/addons/vehicle_damage/XEH_PREP.hpp b/addons/vehicle_damage/XEH_PREP.hpp index a7eb5198811..20075cbd4af 100644 --- a/addons/vehicle_damage/XEH_PREP.hpp +++ b/addons/vehicle_damage/XEH_PREP.hpp @@ -1,14 +1,13 @@ PREP(abandon); PREP(addEventHandler); +PREP(blowOffTurret); PREP(handleBail); -PREP(handleVehicleDamage); PREP(handleCookoff); -PREP(detonate); -PREP(processHit); -PREP(handleDetonation); PREP(handleDamage); -PREP(knockOut); -PREP(addDamage); PREP(handleDamageEjectIfDestroyed); -PREP(blowOffTurret); +PREP(handleDetonation); +PREP(handleVehicleDamage); +PREP(knockOut); PREP(medicalDamage); +PREP(processHit); +PREP(setDamage); diff --git a/addons/vehicle_damage/XEH_postInit.sqf b/addons/vehicle_damage/XEH_postInit.sqf index 9784d335eda..5e15599735e 100644 --- a/addons/vehicle_damage/XEH_postInit.sqf +++ b/addons/vehicle_damage/XEH_postInit.sqf @@ -1,53 +1,65 @@ #include "script_component.hpp" -["ace_settingsInitialized", { +// Init eject from destroyed vehicles +// See https://github.com/acemod/ACE3/pull/6330 +// Still valid for Arma 2.16 +{ + [_x, "Init", { + params ["_vehicle"]; + + if (!alive _vehicle) exitWith {}; + + TRACE_2("ejectIfDestroyed init",_vehicle,typeOf _vehicle); + + _vehicle addEventHandler ["HandleDamage", {call FUNC(handleDamageEjectIfDestroyed)}]; + }, true, [], true] call CBA_fnc_addClassEventHandler; +} forEach EJECT_IF_DESTROYED_VEHICLES; + +["CBA_settingsInitialized", { TRACE_1("settings init",GVAR(enabled)); - if (GVAR(enabled)) then { - [QGVAR(medicalDamage), LINKFUNC(medicalDamage)] call CBA_fnc_addEventHandler; - [QGVAR(bailOut), { - params ["_center", "_crewman", "_vehicle"]; - TRACE_3("bailOut",_center,_crewman,_vehicle); + if (!GVAR(enabled)) exitWith {}; - if (isPlayer _crewman) exitWith {}; - if (!alive _crewman || {!([_crewman] call EFUNC(common,isAwake))}) exitWith {}; + [QGVAR(medicalDamage), LINKFUNC(medicalDamage)] call CBA_fnc_addEventHandler; - unassignVehicle _crewman; - _crewman leaveVehicle _vehicle; - doGetOut _crewman; + if (isServer) then { + // To set source and instigator, setDamage must be executed on the server + [QGVAR(setDamage), {(_this select 0) setDamage (_this select 1)}] call CBA_fnc_addEventHandler; + }; - private _angle = floor (random 360); - private _dist = (30 + (random 10)); - private _escape = _center getPos [_dist, _angle]; + [QGVAR(bailOut), { + params ["_vehicle", "_unit"]; - _crewman doMove _escape; - _crewman setSpeedMode "FULL"; - }] call CBA_fnc_addEventHandler; + TRACE_2("bailOut",_vehicle,_unit); - ["Tank", "init", LINKFUNC(addEventHandler), true, [], true] call CBA_fnc_addClassEventHandler; - ["Wheeled_APC_F", "init", LINKFUNC(addEventHandler), true, [], true] call CBA_fnc_addClassEventHandler; + // Ignore players and the dead + if (_unit call EFUNC(common,isPlayer) || {!(_unit call EFUNC(common,isAwake))}) exitWith {}; - if (GVAR(enableCarDamage)) then { - ["Car", "init", LINKFUNC(addEventHandler), true, [], true] call CBA_fnc_addClassEventHandler; - }; + unassignVehicle _unit; + _unit leaveVehicle _vehicle; + doGetOut _unit; - // Blow off turret effect - // TODO: Add blowing-off-turret effect to vehicles that cook-off but aren't destroyed (no catastrophic explosion) - // The problem is that vehicles are repairable if they haven't been destroyed. So if the turret is gone and vehicle is repaired, how do we handle that? - ["Tank", "Killed", { - if (_this select 3 && random 1 < 0.15) then { - (_this select 0) call FUNC(blowOffTurret); - }; - }, true, [], true] call CBA_fnc_addClassEventHandler; - }; + private _angle = floor (random 360); + private _dist = 30 + (random 10); + private _escape = _vehicle getPos [_dist, _angle]; + + _unit doMove _escape; + _unit setSpeedMode "FULL"; + }] call CBA_fnc_addEventHandler; + + GVAR(vehicleClassesHitPointHash) = createHashMap; - // init eject from destroyed vehicle - { - [_x, "init", { - params ["_vehicle"]; - if (!alive _vehicle) exitWith {}; - TRACE_2("ejectIfDestroyed init",_vehicle,typeOf _vehicle); - _vehicle addEventHandler ["HandleDamage", {call FUNC(handleDamageEjectIfDestroyed)}]; - }, true, [], true] call CBA_fnc_addClassEventHandler; - } forEach EJECT_IF_DESTROYED_VEHICLES; + ["Tank", "Init", LINKFUNC(addEventHandler), true, [], true] call CBA_fnc_addClassEventHandler; + + // Wheeled_APC_F inherits from Car + [["Wheeled_Apc_F", "Car"] select GVAR(enableCarDamage), "Init", LINKFUNC(addEventHandler), true, [], true] call CBA_fnc_addClassEventHandler; + + // Blow off turret effect + // TODO: Add blowing-off-turret effect to vehicles that cook-off but aren't destroyed (no catastrophic explosion) + // The problem is that vehicles are repairable if they haven't been destroyed. So if the turret is gone and vehicle is repaired, how do we handle that? + ["Tank", "Killed", { + if (_this select 3 && random 1 < 0.15) then { + (_this select 0) call FUNC(blowOffTurret); + }; + }] call CBA_fnc_addClassEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/vehicle_damage/config.cpp b/addons/vehicle_damage/config.cpp index 6b4f7cf685d..24b2abda5ba 100644 --- a/addons/vehicle_damage/config.cpp +++ b/addons/vehicle_damage/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; // ammo/vehicle config defines touch all of these - requiredAddons[] = { "ace_common", "ace_cookoff" }; + requiredAddons[] = {"ace_common", "ace_cookoff"}; author = ECSTRING(common,ACETeam); authors[] = {"tcvm"}; url = ECSTRING(main,URL); diff --git a/addons/vehicle_damage/functions/fnc_abandon.sqf b/addons/vehicle_damage/functions/fnc_abandon.sqf index 83b06a80df1..3539e21a976 100644 --- a/addons/vehicle_damage/functions/fnc_abandon.sqf +++ b/addons/vehicle_damage/functions/fnc_abandon.sqf @@ -4,29 +4,34 @@ * Forces the AI currently in a vehicle to bail out. * * Arguments: - * 0: The vehicle in which to bail out + * 0: Vehicle * * Return Value: * None * * Example: - * [tank2] call ace_vehicle_damage_fnc_abandon; + * cursorObject call ace_vehicle_damage_fnc_abandon * * Public: No */ params ["_vehicle"]; -TRACE_2("abandon",_vehicle,(crew _vehicle) select {alive _x}); -if (_vehicle getVariable [QGVAR(allowCrewInImmobile), false]) exitWith {}; // check for API +// Check for API +if (_vehicle getVariable [QGVAR(allowCrewInImmobile), false]) exitWith { + TRACE_1("API prevented crew from dismounting",_vehicle); +}; + +TRACE_1("abandon",_vehicle); [{ params ["_vehicle"]; + _vehicle allowCrewInImmobile false; - private _center = getPosASL _vehicle; - TRACE_2("bailing out crew after delay",_vehicle,_center); + TRACE_2("bailing out crew after delay",_vehicle,crew _vehicle); + { - [QGVAR(bailOut), [_center, _x, _vehicle], _x] call CBA_fnc_targetEvent; - } forEach crew _vehicle; -}, _this, random MAX_CREW_BAILOUT_TIME] call CBA_fnc_waitAndExecute; + [QGVAR(bailOut), [_vehicle, _x], _x] call CBA_fnc_targetEvent; + } forEach (crew _vehicle); +}, _vehicle, random MAX_CREW_BAILOUT_TIME] call CBA_fnc_waitAndExecute; diff --git a/addons/vehicle_damage/functions/fnc_addDamage.sqf b/addons/vehicle_damage/functions/fnc_addDamage.sqf deleted file mode 100644 index 35475bd36cb..00000000000 --- a/addons/vehicle_damage/functions/fnc_addDamage.sqf +++ /dev/null @@ -1,42 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: tcvm - * Sets vehicle damage based on HitIndex. Failing that it falls back to HitPoint name. - * - * Arguments: - * 0: The vehicle - * 1: Hit Index - * 2: Hit Point - * 3: Damage - * 4: Whether or not to cap the damage to maximum part damage (default: True) - * - * Return Value: - * None - * - * Example: - * [vehicle player, 234, "HitHull"] call ace_vehicle_damage_fnc_addDamage - * - * Public: No - */ - -params ["_vehicle", "_hitIndex", "_hitPoint", "_damage", ["_capDamageAtCurret", true]]; - -private _currentDamage = _vehicle getHitPointDamage _hitPoint; -if (_capDamageAtCurret && { _damage < _currentDamage }) exitWith { - TRACE_4("capping damage at current",_capDamageAtCurret,_damage,_currentDamage,_hitPoint); -}; - -TRACE_4("adding damage to vehicle",_vehicle,_hitIndex,_hitPoint,_damage); -if (_hitPoint isEqualTo "#structural") then { - _hitPoint = "hithull"; - _hitIndex = -1; -}; -if (_hitIndex >= 0) then { - _vehicle setHitIndex [_hitIndex, _damage, true]; -} else { - _vehicle setHitPointDamage [_hitPoint, _damage, true]; -}; - -if (_hitPoint == "hitengine" && {_damage > 0.9}) then { - [QEGVAR(cookoff,engineFireServer), _vehicle] call CBA_fnc_serverEvent; -}; diff --git a/addons/vehicle_damage/functions/fnc_addEventHandler.sqf b/addons/vehicle_damage/functions/fnc_addEventHandler.sqf index a7e59c75a19..3fdbf9ec20c 100644 --- a/addons/vehicle_damage/functions/fnc_addEventHandler.sqf +++ b/addons/vehicle_damage/functions/fnc_addEventHandler.sqf @@ -1,110 +1,137 @@ #include "..\script_component.hpp" /* - * Author: tcvm + * Author: tcvm, johnb43 * Adds the event handler to a vehicle. * * Arguments: - * 0: The vehicle in which to add the event handler to + * 0: Vehicle * * Return Value: * None * * Example: - * [tank2] call ace_vehicle_damage_fnc_addEventHandler; + * cursorObject call ace_vehicle_damage_fnc_addEventHandler * * Public: No */ -params["_vehicle"]; +params ["_vehicle"]; TRACE_2("addEventHandler",_vehicle,GVAR(enabled)); -if !(GVAR(enabled)) exitWith { +if (!GVAR(enabled)) exitWith { #ifdef DEBUG_MODE_FULL - [{ ["Warning: Vehicle Damage not enabled...", 2] call CBA_fnc_notify; }, [], 5] call CBA_fnc_waitAndExecute; + [CBA_fnc_notify, ["Warning: Vehicle Damage not enabled", 2], 5] call CBA_fnc_waitAndExecute; #endif }; -private _hitpointHash = [[], nil] call CBA_fnc_hashCreate; +if (!isNil {_vehicle getVariable QGVAR(handleDamage)}) exitWith {}; + +_vehicle allowCrewInImmobile true; + +// No clue why, but for some reason this needs to be exec'd next frame or else it isn't the last event handler in the system. +// Maybe its overridden somewhere else, but this makes sure it is the last one +[{ + params ["_vehicle"]; + + if (!isNil {_vehicle getVariable QGVAR(handleDamage)}) exitWith {}; + + TRACE_1("added eh",_vehicle); + + _vehicle setVariable [QGVAR(hitHash), createHashMap]; + _vehicle setVariable [QGVAR(handleDamage), _vehicle addEventHandler ["HandleDamage", {_this call FUNC(handleDamage)}]]; +}, _vehicle] call CBA_fnc_execNextFrame; + +private _typeOf = typeOf _vehicle; + +if (_typeOf in GVAR(vehicleClassesHitPointHash)) exitWith {}; + +private _hitPointHash = createHashMap; private _vehicleConfig = configOf _vehicle; -private _hitpointsConfig = _vehicleConfig >> "HitPoints"; -private _turretConfig = _vehicleConfig >> "Turrets"; -private _eraHitpoints = [_vehicleConfig >> QGVAR(eraHitpoints), "ARRAY", []] call CBA_fnc_getConfigEntry; -private _slatHitpoints = [_vehicleConfig >> QGVAR(slatHitpoints), "ARRAY", []] call CBA_fnc_getConfigEntry; +private _hitPointsConfig = _vehicleConfig >> "HitPoints"; // Add hitpoint names to config for quick lookup { - _x params ["_hitpoints", "_type"]; + _x params ["_hitPoints", "_hitArea"]; + { - [_hitpointHash, toLowerANSI _x, [_type, _hitpointsConfig >> _x, toLowerANSI _x]] call CBA_fnc_hashSet; - } forEach _hitpoints; + _hitPointHash set [toLowerANSI _x, [_hitArea, abs getNumber (_hitPointsConfig >> _x >> "minimalHit")]]; + } forEach _hitPoints; } forEach ALL_HITPOINTS; -_vehicle setVariable [QGVAR(hitpointHash), _hitpointHash]; - -// gun and turret hitpoints arent hardcoded anymore - dig through config to find correct names -private _iterateThroughConfig = { - params ["_vehicle", "_config", "_iterateThroughConfig", "_hitpointAliases"]; +// Gun and turret hitpoints aren't hardcoded anymore - dig through config to find correct names +private _fnc_iterateThroughConfig = { + params ["_config"]; TRACE_1("checking config",_config); + private _configName = toLowerANSI configName _config; - private _isGun = ([_config >> "isGun", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1; - private _isTurret = ([_config >> "isTurret", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1; + private _isGun = getNumber (_config >> "isGun") == 1; + private _isTurret = getNumber (_config >> "isTurret") == 1; private _isEra = _configName in _eraHitpoints; private _isSlat = _configName in _slatHitpoints; private _isMisc = false; - // prevent incompatibilites with old mods - if (_configName isEqualTo "hitturret") then { + // Prevent incompatibilites with old mods + if (_configName == "hitturret") then { _isTurret = true; }; - if (_configName isEqualTo "hitgun") then { + + if (_configName == "hitgun") then { _isGun = true; }; - private _hash = _vehicle getVariable QGVAR(hitpointHash); { - _x params ["_hitType", "_hitPoints"]; + _x params ["_hitArea", "_hitPoints"]; + if (_configName in _hitPoints) then { - [_hash, _configName, [_hitType, _config, _configName]] call CBA_fnc_hashSet; + _hitPointHash set [_configName, [_hitArea, abs getNumber (_config >> "minimalHit")]]; _isMisc = true; }; - } forEach _hitpointAliases; + } forEach _hitPointAliases; if (_isGun || _isTurret || _isEra || _isSlat || _isMisc) then { - TRACE_6("found gun/turret/era/slat/misc",_isGun,_isTurret,_isEra,_isSlat,_isMisc,_hash); if (_isGun) then { - [_hash, _configName, ["gun", _config, _configName]] call CBA_fnc_hashSet; + _hitPointHash set [_configName, ["gun", abs getNumber (_config >> "minimalHit")]]; }; if (_isTurret) then { - [_hash, _configName, ["turret", _config, _configName]] call CBA_fnc_hashSet; + _hitPointHash set [_configName, ["turret", abs getNumber (_config >> "minimalHit")]]; }; if (_isEra) then { - [_hash, _configName, ["era", _config, _configName]] call CBA_fnc_hashSet; + _hitPointHash set [_configName, ["era", abs getNumber (_config >> "minimalHit")]]; }; if (_isSlat) then { - [_hash, _configName, ["slat", _config, _configName]] call CBA_fnc_hashSet; + _hitPointHash set [_configName, ["slat", abs getNumber (_config >> "minimalHit")]]; }; - _vehicle setVariable [QGVAR(hitpointHash), _hash]; + + TRACE_6("found gun/turret/era/slat/misc",_isGun,_isTurret,_isEra,_isSlat,_isMisc,_hash); } else { { - [_vehicle, _x, _iterateThroughConfig, _hitpointAliases] call _iterateThroughConfig; + _x call _fnc_iterateThroughConfig; } forEach configProperties [_config, "isClass _x", true]; }; }; -private _hitpointAliases = [_vehicleConfig >> QGVAR(hitpointAlias), "ARRAY", []] call CBA_fnc_getConfigEntry; -TRACE_1("hitpoint alias",_hitpointAliases); -[_vehicle, _hitpointsConfig, _iterateThroughConfig, _hitpointAliases] call _iterateThroughConfig; -[_vehicle, _turretConfig, _iterateThroughConfig, _hitpointAliases] call _iterateThroughConfig; +private _turretConfig = _vehicleConfig >> "Turrets"; +private _eraHitpoints = (getArray (_vehicleConfig >> QGVAR(eraHitpoints))) apply {toLowerANSI _x}; +private _slatHitpoints = (getArray (_vehicleConfig >> QGVAR(slatHitpoints))) apply {toLowerANSI _x}; -_vehicle allowCrewInImmobile true; -private _eh = _vehicle getVariable [QGVAR(handleDamage), nil]; -if (isNil "_eh") then { - // no clue why, but for some reason this needs to exec'd next frame or else it isnt the last event handler in the system. - // Maybe its overridden somewhere else, but this makes sure it is the last one - [{ - params ["_vehicle"]; - TRACE_1("EH not added yet - added eh now",_vehicle); - private _hd = _vehicle addEventHandler ["HandleDamage", { _this call FUNC(handleDamage) }]; - _vehicle setVariable [QGVAR(handleDamage), _hd]; - }, [_vehicle]] call CBA_fnc_execNextFrame; +private _fnc_toLowerCase = { + _this apply { + if (_x isEqualType []) then { + _x call _fnc_toLowerCase + } else { + toLowerANSI _x + }; + }; }; + +// Convert areas to lower case +private _hitPointAliases = (getArray (_vehicleConfig >> QGVAR(hitpointAlias))) call _fnc_toLowerCase; + +TRACE_1("hitpoint alias",_hitPointAliases); + +_hitPointsConfig call _fnc_iterateThroughConfig; +_turretConfig call _fnc_iterateThroughConfig; + +GVAR(vehicleClassesHitPointHash) set [_typeOf, _hitPointHash]; + +nil diff --git a/addons/vehicle_damage/functions/fnc_blowOffTurret.sqf b/addons/vehicle_damage/functions/fnc_blowOffTurret.sqf index 818fe6f6ef8..9c9e5036da6 100644 --- a/addons/vehicle_damage/functions/fnc_blowOffTurret.sqf +++ b/addons/vehicle_damage/functions/fnc_blowOffTurret.sqf @@ -10,7 +10,7 @@ * None * * Example: - * (vehicle player) call ace_vehicle_damage_fnc_blowOffTurret + * cursorObject call ace_vehicle_damage_fnc_blowOffTurret * * Public: No */ @@ -19,6 +19,7 @@ // The sudden change in the model would cause nearby PhysX objects to get stuck [{ params ["_vehicle"]; + TRACE_1("blowOffTurret",_vehicle); (getArray (configOf _vehicle >> QGVAR(turret))) params [["_model", "", [""]], ["_offset", [0, 0, 0], [[]], 3]]; diff --git a/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf b/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf deleted file mode 100644 index 4e847c2d367..00000000000 --- a/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf +++ /dev/null @@ -1,118 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: tcvm - * Calculates whether or not hit penetrated given armour or not. Only enabled with advanced penetration simulation turned on. - * - * Arguments: - * 0: Source of damage - * 1: The vehicle - * 2: Projectile that hit - * 3: Hitpoint damaged - * - * Return Value: - * None - * - * Example: - * [myVehicle, projectile, 5, 0.663] call ace_vehicle_damage_fnc_calculatePenetrationInfo; - * - * Public: No - */ - -params ["_source", "_vehicle", "_projectileData", "_hitpointConfig"]; -_projectileData params ["_projectileType", "_projectileConfig"]; -/* - http://www.longrods.ch/peneq.php - https://www.scribd.com/doc/267210898/57-mm-APFSDS-2-000-m#download - Perforation Calculation of APFSDS: - Tungsten/Depleted Uranium: Rods - P/Lw = a * (1 / tanh(b0 + b1 * (Lw/D))) * cos^m (theta) * sqrt (Pp / Pt) * e^((-(c0 + c1 * BHNT) * BHNT) / (Pp * Vt^2)) - - Steel Rods - P/Lw = a * (1 / tanh(b0 + b1 * (Lw/D))) * cos^m (theta) * sqrt (Pp / Pt) * e^((-c * BHNT^k * BHNP^n) / (Pp * Vt^2)) - - Penetration Calculation of Tungsten APFSDS (Used for all penetrators): - P/Lw = a * (1 / tanh(b0 + b1 * (Lw/D))) sqrt (Pp / Pt) * e^((-(c0 + c1 * BHNT) * BHNT) / (Pp * Vt^2)) - - where: - Penetrator: - D = Diameter of penetrator rod (always 22mm) - L = Total length of penetrator in millimeters (always 950mm) - Lw = Working length of rod in millimeters - Vt = impact velocity in Kilometers/Second - theta = NATO Obliquity angle of Penetration - Pp = Penetrator Density in kg/m^3 - BHNP = Brinell hardness number of penetrator - - Target: - Pt = target density in kg/m^3 (always 7840kg/m^3) - d = plate thickness in millimeters - BHNT = Brinell hardness number of target (always 350) - - Material Data: - Tungsten: - Pp = 19300 - BHNP = N/A - - a = 0.994 - c0 = 134.5 - c1 = -0.148 - - Depleted Uranium: - Pp = 18600 - BHNP = N/A - - a = 0.825 - c0 = 90.0 - c1 = -0.0849 - - Steel: - Pp = 7850 - BHNP = 500 - - a = 1.104 - c = 9874 - k = 0.3598 - n = -0.2342 - - Cofficients: - m = -0.224 - b0 = 0.283 - b1 = 0.0656 -*/ - -private _enabled = ([_hitpointConfig >> QGVAR(enabled), "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1; -#define MATERIAL_ARRAY ([[0, 0, 0, 0, 0, 0], "steel", [7850, 500, 1.104, 9874, 0.3598, -0.2342], "tungsten", [19300, 0, 0.994, 134.5, -0.148], "depleted_uranium", [18600, 0, 0.825, 90, -0.0849]]) -private _rodMaterialStr = [_projectileConfig >> QGVAR(material), "STRING", "tungsten"] call CBA_fnc_getConfigEntry; -private _rodMaterialParams = MATERIAL_ARRAY select (1 + MATERIAL_ARRAY find toLowerANSI _rodMaterial); - -if !(_enabled) exitWith { [false, 0, 0, 0, 0] }; -if (_rodMaterialParams isEqualTo [0, 0, 0, 0, 0, 0]) exitWith { [] }; - -private _tanX = 2 * (0.283 * 0.0656 * (1)); -private _tanh = 1 / (((exp _tanX) - 1) / ((exp _tanX) + 1)); -private _cosm = (cos 0) ^ -0.224; -private _lw = 950; // technically this would be something else depending on armour slant but this is a good enough aproximation - -private _aproximateVelocity = 0; - -private _perf_pLw = 0; -private _pen_pLw = 0; -if (_rodMaterialStr isEqualTo "steel") then { - _rodMaterialParams params ["_Pp", "_BHNP", "_a", "_c", "_k", "_n"]; - private _exp = (-_c * 350^_k * _BHNP^_n) / (_Pp * _aproximateVelocity * _aproximateVelocity); - _pen_pLw = _a * _tanh * sqrt (_Pp / 7840) * exp _exp; - _perf_pLw = _pen_pLw * _cosm; -} else { - _rodMaterialParams params ["_Pp", "_BHNP", "_a", "_c0", "_c1"]; - private _exp = (-(_c0 + _c1 * 350) * 350) / (_Pp * _aproximateVelocity * _aproximateVelocity); - _pen_pLw = _a * _tanh * _cosm * sqrt (_Pp / 7840) * exp _exp; - _perf_pLw = _pen_pLw * _cosm; -}; - -private _perforationDistance = _lw * _perf_pLw; -private _penetrationDistance = _lw * _pen_pLw; -private _hitpointEffectiveArmour = [_hitpointConfig >> QGVAR(thickness), "NUMBER", 0] call CBA_fnc_getConfigEntry; -private _hitpointEffectiveSlope = [_hitpointConfig >> QGVAR(slope), "NUMBER", 0] call CBA_fnc_getConfigEntry; -_penetrationDistance = _penetrationDistance * cos (_hitpointEffectiveSlope); - -[_penetrationDistance > _hitpointEffectiveArmour, _penetrationDistance - _hitpointEffectiveArmour, _penetrationDistance, _perforationDistance, _hitpointEffectiveArmour] diff --git a/addons/vehicle_damage/functions/fnc_detonate.sqf b/addons/vehicle_damage/functions/fnc_detonate.sqf deleted file mode 100644 index 7f0dce28c93..00000000000 --- a/addons/vehicle_damage/functions/fnc_detonate.sqf +++ /dev/null @@ -1,27 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: tcvm - * Detonates vehicle ammo and heavily wounds all inside. - * - * Arguments: - * 0: The vehicle - * 1: Person who caused detonation (default: objNull) - * - * Return Value: - * None - * - * Example: - * [tank2] call ace_vehicle_damage_fnc_detonate; - * - * Public: No - */ - -params ["_vehicle", ["_injurer", objNull]]; - -if (((_vehicle call EFUNC(cookoff,getVehicleAmmo)) select 1) > 0) then { - { - [QGVAR(medicalDamage), [_x, _injurer, _injurer], _x] call CBA_fnc_targetEvent; - } forEach (crew _vehicle); -}; - -[QEGVAR(cookoff,detonateAmmunitionServer), [_vehicle, false, _injurer, _injurer]] call CBA_fnc_serverEvent; diff --git a/addons/vehicle_damage/functions/fnc_handleBail.sqf b/addons/vehicle_damage/functions/fnc_handleBail.sqf index 97aad2cd321..6c9f23c82bc 100644 --- a/addons/vehicle_damage/functions/fnc_handleBail.sqf +++ b/addons/vehicle_damage/functions/fnc_handleBail.sqf @@ -4,64 +4,66 @@ * Handles whether or not the crew should bail. * * Arguments: - * 0: The vehicle - * 1: Can the vehicle move? - * 2: Can the vehicle shoot? + * 0: Vehicle * * Return Value: * None * * Example: - * [tank1, false, true] call ace_vehicle_damage_fnc_handleBail + * cursorObject call ace_vehicle_damage_fnc_handleBail * * Public: No */ -params ["_vehicle", "_canMove", "_canShoot"]; -private _isCar = (_vehicle isKindOf "Car" && { !(_vehicle isKindOf "Wheeled_APC_F") }); +params ["_vehicle"]; +TRACE_1("handleBail",_vehicle); -if (_canMove) then { - _canMove = alive driver _vehicle; -}; +private _isCar = _vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}; -if (_canShoot) then { - _canShoot = alive gunner _vehicle; -}; +// canFire command is broken, hence the variable +private _canMove = (_vehicle getVariable [QGVAR(canMove), true]) && {alive driver _vehicle}; +private _canShoot = (_vehicle getVariable [QGVAR(canShoot), true]) && {alive gunner _vehicle}; -_vehicle setVariable[QGVAR(canMove), _canMove]; -_vehicle setVariable[QGVAR(canShoot), _canShoot]; +_vehicle setVariable [QGVAR(canMove), _canMove]; +_vehicle setVariable [QGVAR(canShoot), _canShoot]; private _rand = random 1; if (_isCar) then { - if !(_canMove) then { - [_vehicle] spawn FUNC(abandon); - LOG_3("[%1] can't move and is bailing and is a car [%2 | %3]",_vehicle,_canMove,_isCar); + if (!_canMove) then { + _vehicle call FUNC(abandon); + + TRACE_3("car immobile - bailing",_vehicle,_canMove,_isCar); }; } else { - if (!_canMove && !_canShoot ) exitWith { // If you can't move and you can't shoot, you better GTFO - [_vehicle] spawn FUNC(abandon); - LOG_3("[%1] is a sitting duck and is bailing [%2 | %3]",_vehicle,_canMove,_canShoot); + // If you can't move and you can't shoot, you better GTFO + if (!_canMove && !_canShoot) exitWith { + _vehicle call FUNC(abandon); + + TRACE_3("immobile and can't shoot - bailing",_vehicle,_canMove,_canShoot); }; - if (!_canShoot && !_isCar) then { - if (BAILOUT_CHANCE_SHOOT > _rand) then { // 50% chance of bailing out if turret/gun is destroyed - [_vehicle] spawn FUNC(abandon); - LOG_4("[%1] Cannot shoot and is bailing with chance [%2] [%3 | %4]",_vehicle,_rand,_canMove,_canShoot); + if (!_canShoot) then { + // 50% chance of bailing out if turret/gun is disabled + if (BAILOUT_CHANCE_SHOOT > _rand) then { + _vehicle call FUNC(abandon); + + TRACE_4("can't shoot - bailing",_vehicle,_rand,_canMove,_canShoot); } else { _vehicle allowFleeing 1; - LOG_4("[%1] Cannot shoot and is fleeing with chance [%2] [%3 | %4]",_vehicle,_rand,_canMove,_canShoot); + + TRACE_4("fleeing",_vehicle,_rand,_canMove,_canShoot); }; }; - if !(_canMove) then { - if (BAILOUT_CHANCE_MOVE > _rand) then { // 80% Chance of bailing out if engine is destroyed - [_vehicle] spawn FUNC(abandon); - LOG_4("[%1] Cannot move and is bailing with chance [%2] [%3 | %4]",_vehicle,_rand,_canMove,_canShoot); + if (!_canMove) then { + // 80% Chance of bailing out if engine is disabled + if (BAILOUT_CHANCE_MOVE > _rand) then { + _vehicle call FUNC(abandon); + + TRACE_4("immobile - bailing",_vehicle,_rand,_canMove,_canShoot); } else { - LOG_4("[%1] Cannot move and is bunkering with chance [%2] [%3 | %4]",_vehicle,_rand,_canMove,_canShoot); + TRACE_4("immobile - bunkering",_vehicle,_rand,_canMove,_canShoot); }; }; }; - - diff --git a/addons/vehicle_damage/functions/fnc_handleCookoff.sqf b/addons/vehicle_damage/functions/fnc_handleCookoff.sqf index 3e7b83ebb61..4558359695e 100644 --- a/addons/vehicle_damage/functions/fnc_handleCookoff.sqf +++ b/addons/vehicle_damage/functions/fnc_handleCookoff.sqf @@ -1,59 +1,71 @@ #include "..\script_component.hpp" /* * Author: tcvm - * Checks hitpoint damage and determines if a vehicle should cookoff. + * Checks hitpoint damage and determines if a vehicle should cook off. * * Arguments: - * 0: The vehicle + * 0: Vehicle * 1: Chance of fire * 2: Intensity of cookoff - * 3: Person who instigated cookoff (default: objNull) - * 4: Part of vehicle which got hit (default: "") - * 5: Whether or not the vehicle can spawn ring-fire effect (default: false) - * 6: Can Jet (default: true) + * 3: Source of damage + * 4: Person who caused damage + * 5: Part of vehicle which got hit (default: "") + * 6: Whether or not the vehicle can spawn ring-fire effect (default: false) + * 7: Whether or not the vehicle can spawn jet-fire effect (default: true) * * Return Value: - * If cooked off + * If vehicle started or already cooking off * * Example: - * [tank2, 0.1, 5] call ace_vehicle_damage_fnc_handleCookoff; + * [cursorObject, 0.1, 5, player, player] call ace_vehicle_damage_fnc_handleCookoff * * Public: No */ -params ["_vehicle", "_chanceOfFire", "_intensity", ["_injurer", objNull], ["_hitPart", ""], ["_canRing", false], ["_canJet", true]]; +params ["_vehicle", "_chanceOfFire", "_intensity", "_source", "_instigator", ["_hitPart", ""], ["_canRing", true], ["_canJet", true]]; +TRACE_8("handleCookoff",_vehicle,_chanceOfFire,_intensity,_source,_instigator,_hitPart,_canRing,_canJet); // Ignore if the vehicle is already cooking off -if (_vehicle getVariable [QEGVAR(cookoff,isCookingOff), false]) exitWith {true}; +if (_vehicle getVariable [QEGVAR(cookoff,isCookingOff), false]) exitWith { + TRACE_3("already cooking off",_vehicle,_chanceOfFire,_intensity); + + true // return +}; _chanceOfFire = _chanceOfFire * EGVAR(cookoff,probabilityCoef); -if (_chanceOfFire >= random 1) exitWith { - private _configOf = configOf _vehicle; - private _fireDetonateChance = [_configOf >> QGVAR(detonationDuringFireProb), "number", 0] call CBA_fnc_getConfigEntry; - if (_canRing) then { - _canRing = ([_configOf >> QGVAR(canHaveFireRing), "number", 0] call CBA_fnc_getConfigEntry) == 1; - }; +// Failure to cook off +if (_chanceOfFire == 0 || {_chanceOfFire < random 1}) exitWith { + TRACE_3("no cook-off",_vehicle,_chanceOfFire,_intensity); - if (_canJet) then { - _canJet = ([_configOf >> QEGVAR(cookoff,canHaveFireJet), "number", 1] call CBA_fnc_getConfigEntry) == 1; - }; + false // return +}; - private _delayWithSmoke = _chanceOfFire < random 1; - private _detonateAfterCookoff = (_fireDetonateChance / 4) > random 1; +// Vehicle will cook off +private _configOf = configOf _vehicle; +private _fireDetonateChance = getNumber (_configOf >> QGVAR(detonationDuringFireProb)); - private _source = ""; - if (_hitPart == "engine") then { - _source = ["hit_engine_point", "HitPoints"]; - }; +if (_canRing) then { + _canRing = getNumber (_configOf >> QGVAR(canHaveFireRing)) == 1; +}; - [QEGVAR(cookOff,cookOffServer), [_vehicle, _intensity, _injurer, _injurer, _delayWithSmoke, _fireDetonateChance, _detonateAfterCookoff, _source, _canRing, _canJet]] call CBA_fnc_serverEvent; - LOG_4("Cooking-off [%1] with a chance-of-fire [%2] - Delayed Smoke | Detonate after cookoff [%3 | %4]",_vehicle,_chanceOfFire,_delayWithSmoke,_detonateAfterCookoff); - [_vehicle] spawn FUNC(abandon); - LOG_1("[%1] is on fire is bailing",_vehicle); +if (_canJet) then { + _canJet = getNumber (_configOf >> QEGVAR(cookoff,canHaveFireJet)) == 1; +}; - true +private _delaySmoke = _chanceOfFire < random 1; +private _detonateAfterCookoff = (_fireDetonateChance / 4) > random 1; + +private _source = ""; + +if (_hitPart == "engine") then { + _source = ["hit_engine_point", "HitPoints"]; }; -LOG_2("[%1] No Cook-off - Chance of fire [%2]",_vehicle,_chanceOfFire); -false +[QEGVAR(cookOff,cookOffServer), [_vehicle, _intensity, _injurer, _injurer, _delayWithSmoke, _fireDetonateChance, _detonateAfterCookoff, _source, _canRing, _canJet]] call CBA_fnc_serverEvent; +TRACE_4("cooking-off",_vehicle,_chanceOfFire,_delaySmoke,_detonateAfterCookoff); + +// Abandon vehicle +_vehicle call FUNC(abandon); + +true // return diff --git a/addons/vehicle_damage/functions/fnc_handleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleDamage.sqf index 51bf1be97da..733d4f23214 100644 --- a/addons/vehicle_damage/functions/fnc_handleDamage.sqf +++ b/addons/vehicle_damage/functions/fnc_handleDamage.sqf @@ -4,91 +4,88 @@ * Called by "HandleDamage" event handler. Sets up hit array for this frame's damage. * * Arguments: - * 0: The vehicle - * 1: Name of selection where unit was damaged (unused) - * 2: Damage taken - * 3: Source unit of damage (unused) + * 0: Vehicle + * 1: Selection + * 2: New level of damage + * 3: Source of damage * 4: Projectile that caused damage - * 5: Hit part index of hit point - * 6: Instigator of damage (unused) - * 7: Hit point config name + * 5: Hit index + * 6: Person who caused damage + * 7: Hit point * * Return Value: - * Current or maximum damage of part + * Current or maximum damage of part * * Example: - * [myVehicle, projectile, 5, 0.663] call ace_vehicle_damage_fnc_handleDamage; + * [cursorObject, "hit_engine_point", 0.5, player, projectile, 1, player, "HitEngine"] call ace_vehicle_damage_fnc_handleDamage * * Public: No */ -params ["_vehicle", "_hitSelection", "_damage", "", "_projectile", "_hitIndex", "", "_hitPoint"]; -TRACE_6("HandleDamage event inputs",_vehicle,_hitSelection,_damage,_projectile,_hitIndex,_hitPoint); +params ["_vehicle", "_selection", "_newDamage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; +TRACE_8("handleDamage",_vehicle,_selection,_newDamage,_source,_projectile,_hitIndex,_instigator,_hitPoint); -private _returnHit = if (_hitSelection isNotEqualTo "") then { +if (!local _vehicle) exitWith {}; + +private _currentDamage = if (_selection != "") then { _vehicle getHitIndex _hitIndex } else { damage _vehicle }; if !(_projectile in ["ace_ammoExplosion", "ACE_ammoExplosionLarge"]) then { - if (local _vehicle) then { - // set up hit array so we can execute all damage next frame. Always in order of hit done. - private _hitHash = _vehicle getVariable [QGVAR(hitHash), nil]; - if (isNil "_hitHash") then { - _hitHash = [[], nil] call CBA_fnc_hashCreate; - }; - private _currentFrameArray = [_hitHash, diag_frameNo] call CBA_fnc_hashGet; - if (isNil "_currentFrameArray") then { - _currentFrameArray = []; - }; - // if a valid hit, process it - if !((_hitPoint find "#light") >= 0 || { _damage <= 0 }) then { - if (_currentFrameArray isEqualTo []) then { - [{ - params ["_vehicle", "_processingFrame"]; - private _frameHash = _vehicle getVariable [QGVAR(hitHash), nil]; - private _hitArray = [_frameHash, _processingFrame] call CBA_fnc_hashGet; - if (_hitArray isEqualTo []) exitWith {}; - - reverse _hitArray; - TRACE_3("processing data from old frame",diag_frameNo,_processingFrame,_hitArray); - { - _x params ["_vehicle", "_selection", "_damage", "_injurer", "_projectile", "_hitIndex", "", "_hitPoint"]; - - private _returnHit = if (_selection isNotEqualTo "") then { - _vehicle getHitIndex _hitIndex - } else { - damage _vehicle - }; - - private _newDamage = _damage - _returnHit; - if !([_vehicle, _hitPoint, _hitIndex, _injurer, _returnHit, _newDamage, _projectile, _selection] call FUNC(handleVehicleDamage)) exitWith { - LOG_2("cancelling rest of vehicle damage queue ( [%1] items left out of [%2] )",(count (_hitArray#1)) - _forEachIndex,count (_hitArray#1)) - }; - } forEach _hitArray; - - [_frameHash, _processingFrame] call CBA_fnc_hashRem; - - }, [_vehicle, diag_frameNo]] call CBA_fnc_execNextFrame; - }; - _currentFrameArray pushBack _this; - }; - - [_hitHash, diag_frameNo, _currentFrameArray] call CBA_fnc_hashSet; - _vehicle setVariable [QGVAR(hitHash), _hitHash]; + // If an invalid hit, don't process it + if (_newDamage <= 0 || {"#light" in _hitPoint}) exitWith {}; + + // Set up hit array so we can execute all damage next frame. Always in order of hit done. + private _hitHash = _vehicle getVariable QGVAR(hitHash); + private _currentFrameArray = _hitHash getOrDefault [diag_frameNo, [], true]; + + if (_currentFrameArray isEqualTo []) then { + [{ + params ["_vehicle", "_processingFrame"]; + + private _hitHash = _vehicle getVariable QGVAR(hitHash); + private _hitArray = _hitHash deleteAt _processingFrame; + + if (_hitArray isEqualTo []) exitWith {}; + + TRACE_3("processing data from old frame",diag_frameNo,_processingFrame,_hitArray); + + // Start from newest damage and work backwards + { + _x params ["_vehicle", "_selection", "_newDamage", "_source", "_projectile", "_hitIndex", "_instigator", "_hitPoint"]; + + private _currentDamage = if (_selection != "") then { + _vehicle getHitIndex _hitIndex + } else { + damage _vehicle + }; + + private _addedDamage = _newDamage - _currentDamage; + + TRACE_1("handleDamage",_currentDamage); + + if !([_vehicle, _hitPoint, _hitIndex, _selection, _addedDamage, _projectile, _source, _instigator] call FUNC(handleVehicleDamage)) exitWith { + TRACE_2("cancelling rest of vehicle damage queue",(count (_hitArray#1)) - _forEachIndex,count (_hitArray#1)) + }; + } forEachReversed _hitArray; + }, [_vehicle, diag_frameNo]] call CBA_fnc_execNextFrame; }; + + _currentFrameArray pushBack _this; }; -// damage is never to be handled in-engine. Always handle out of engine with this event handler -// don't return 0 or else old parts will be reset in damage -private _criticalDamageIndex = (CRITICAL_HITPOINTS findIf { _x isEqualTo _hitPoint }) + 1; -if (_criticalDamageIndex > 0) then { - _returnHit = (_returnHit min (CRITICAL_HITPOINTS select _criticalDamageIndex)); +// Damage is never to be handled in-engine. Always handle out of engine with this event handler +// Don't return 0 or else old parts will be reset in damage +private _criticalDamageIndex = CRITICAL_HITPOINTS findIf {_x == _hitPoint}; + +if (_criticalDamageIndex != -1) then { + _currentDamage = _currentDamage min (CRITICAL_HITPOINTS_THRESHOLDS select _criticalDamageIndex); }; -if (_hitPoint isEqualTo "" && _hitIndex < 0) then { - _returnHit = _returnHit min 0.89; +if (_hitPoint == "" && {_hitIndex < 0}) then { + _currentDamage = _currentDamage min 0.89; }; -_returnHit +_currentDamage diff --git a/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf b/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf index fdf6f9c6d3a..10485d5ce96 100644 --- a/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf +++ b/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf @@ -20,7 +20,7 @@ params ["_vehicle", "", "", "", "_ammo"]; if (alive _vehicle) exitWith {}; -TRACE_2("ejectIfDestroyed HDEH",typeOf _vehicle,_this); +TRACE_2("handleDamageEjectIfDestroyed",typeOf _vehicle,_this); if (!IS_EXPLOSIVE_AMMO(_ammo)) then { { diff --git a/addons/vehicle_damage/functions/fnc_handleDetonation.sqf b/addons/vehicle_damage/functions/fnc_handleDetonation.sqf index 8f317323fa7..9fdaa3b0c27 100644 --- a/addons/vehicle_damage/functions/fnc_handleDetonation.sqf +++ b/addons/vehicle_damage/functions/fnc_handleDetonation.sqf @@ -1,37 +1,59 @@ #include "..\script_component.hpp" /* - * Author: tcvm - * Checks hitpoint damage and determines if a vehicle should cookoff. + * Author: tcvm, johnb43 + * Checks hitpoint damage and determines if a vehicle should detonate its ammo. * * Arguments: - * 0: The vehicle + * 0: Vehicle * 1: Chance of detonation - * 2: Vehicle ammo array - * 3: How much explosive ammo is inside vehicle - * 4: How much non-explosive ammo inside vehicle - * 5: Person who instigated damage (default: objNull) + * 2: If the vehicle should be knocked out + * 3: If the crew should be injured + * 4: Source of damage + * 5: Person who caused damage * * Return Value: - * Detonated + * None * * Example: - * [tank2, 0.5] call ace_vehicle_damage_fnc_handleDetonation; + * [cursorObject, 0.5, true, player, player] call ace_vehicle_damage_fnc_handleDetonation * * Public: No */ -params ["_vehicle", "_chanceOfDetonate", "_vehicleAmmo", "_explosiveAmmoCount", "_nonExplosiveAmmoCount", ["_injurer", objNull]]; - -private _isKnockedOut = _explosiveAmmoCount > 0; +params ["_vehicle", "_chanceToDetonate", "_knockOut", "_injureCrew", "_source", "_instigator"]; // Ignore if the vehicle is already detonating ammo -if (_vehicle getVariable [QEGVAR(cookoff,isAmmoDetonating), false]) exitWith {_isKnockedOut}; +if (_vehicle getVariable [QEGVAR(cookoff,isAmmoDetonating), false]) exitWith { + TRACE_2("already detonating",_vehicle,_chanceToDetonate); + + if (_knockOut) then { + [_vehicle, _source, _instigator] call FUNC(knockOut); + }; + + _knockOut // return +}; + +// Failure to detonate +if (_chanceToDetonate == 0 || {_chanceToDetonate < random 1}) exitWith { + TRACE_2("no detonation",_vehicle,_chanceToDetonate); + + false // return +}; + +// Vehicle will be detonated +if (_injureCrew) then { + { + [QGVAR(medicalDamage), [_x, _source, _instigator], _x] call CBA_fnc_targetEvent; + } forEach (crew _vehicle); +}; + +TRACE_2("detonation",_vehicle,_chanceToDetonate); + +// Detonate the vehicle +[QEGVAR(cookoff,detonateAmmunitionServer), [_vehicle, false, _source, _instigator]] call CBA_fnc_serverEvent; -if (_chanceOfDetonate >= random 1) exitWith { - [_vehicle, _injurer, _vehicleAmmo] call FUNC(detonate); - LOG_2("Detonating [%1] with a chance-to-detonate [%2]",_vehicle,_chanceOfDetonate); - _isKnockedOut +if (_knockOut) then { + [_vehicle, _source, _instigator] call FUNC(knockOut); }; -LOG_2("[%1] No Detonation - Chance of detonation [%2]",_vehicle,_chanceOfDetonate); -false +_knockOut // return diff --git a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf index 02033b83be7..4654b616d06 100644 --- a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf +++ b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf @@ -4,96 +4,101 @@ * Process vehicle hit. * * Arguments: - * 0: The vehicle - * 1: The hitpoint which got hit - * 2: The index of what got hit - * 3: The damage that the new part took - * 4: Person who hit vehicle - * 5: Damage before hit - * 6: Damage after hit - * 7: Projectile - * 8: Selection that got hit + * 0: Vehicle + * 1: Hit point + * 2: Hit index + * 3: Selection + * 4: Added damage to part + * 5: Projectile + * 6: Source of damage + * 7: Person who caused damage * * Return Value: - * Whether or not to continue handling last frame's damage + * Whether or not to continue handling last frame's damage * * Example: - * [ace_vehicle_damage_fnc_handleVehicleDamage, tank1, "Hit_Engine", 12]] call CBA_fnc_execNextFrame + * [ace_vehicle_damage_fnc_handleVehicleDamage, [cursorObject, "HitEngine", 12, "hit_engine_point", 0.25, projectile, player, player]] call CBA_fnc_execNextFrame * * Public: No */ -params["_vehicle", "_hitPoint", "_hitIndex", "_injurer", "_oldDamage", "_newDamage", "_projectile", "_selection"]; -TRACE_6("handleVehicleDamage",_vehicle,_hitPoint,_hitIndex,_injurer,_oldDamage,_newDamage); -if !(alive _vehicle) exitWith { - private _eventHandler = _vehicle getVariable[QGVAR(handleDamage), nil]; - if !(isNil "_eventHandler") then { - _vehicle removeEventHandler ["HandleDamage", _eventHandler]; +params ["_vehicle", "_hitPoint", "_hitIndex", "_selection", "_addedDamage", "_projectile", "_source", "_instigator"]; +TRACE_8("handleVehicleDamage",_vehicle,_hitPoint,_hitIndex,_selection,_addedDamage,_projectile,_source,_instigator); + +if (!alive _vehicle) exitWith { + private _handleDamageEH = _vehicle getVariable [QGVAR(handleDamage), nil]; + + if (!isNil "_handleDamageEH") then { + _vehicle removeEventHandler ["HandleDamage", _handleDamageEH]; }; - LOG_1("Vehicle [%1] no longer alive",_vehicle); - true -}; -_hitPoint = toLowerANSI _hitPoint; -private _hitpointHash = _vehicle getVariable [QGVAR(hitpointHash), []]; -private _type = if (_hitpointHash isEqualTo []) then { - "exit" -} else { - ([_hitpointHash, _hitPoint] call CBA_fnc_hashGet) select 0 -}; + TRACE_1("vehicle no longer alive",_vehicle); -if (isNil "_type") then { - _type = "exit"; + false }; -// generic structural damage will be transfered into hull damage for simulation's sake +_hitPoint = toLowerANSI _hitPoint; +private _hitPointHash = GVAR(vehicleClassesHitPointHash) getOrDefault [typeOf _vehicle, createHashMap]; +private _type = (_hitPointHash getOrDefault [_hitPoint, []]) select 0; + +// Generic structural damage will be transfered into hull damage for simulation's sake private _structural = false; -if (_selection isEqualTo "") then { + +if (_selection == "") then { _type = "hull"; _hitPoint = "hithull"; _structural = true; + TRACE_1("structural damage",_selection); - _newDamage = abs _newDamage; + + _addedDamage = abs _addedDamage; }; -if (_type isEqualTo "exit") exitWith { LOG_1("No relevant hitpoints hit [%1]. Exiting",_hitPoint); true }; +if (isNil "_type") exitWith { + TRACE_1("no relevant hitpoints hit, exiting",_hitPoint); + + true +}; // Ignore multiple hits at the same time private _ignoreHit = false; private _ignoreBailCheck = false; private _multHit = _vehicle getVariable [QGVAR(hitTime), nil]; + if (isNil "_multHit") then { - _vehicle setVariable[QGVAR(hitTime), [CBA_missionTime, _injurer, [_hitPoint]]]; + _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _source, [_hitPoint]]]; } else { private _hitPointInOldArray = _hitPoint in (_multHit select 2); - private _withinTime = (CBA_missionTime <= (_multHit select 0) + CONST_TIME) && { _injurer == (_multHit select 1) }; + private _withinTime = (CBA_missionTime <= (_multHit select 0) + CONST_TIME) && {_source == (_multHit select 1)}; + if (_hitPointInOldArray && _withinTime) then { _ignoreHit = true; } else { // If the hitpoint isnt in the old array then that means that the time expired and a new array should be generated - if !(_hitPointInOldArray) then { + if (!_hitPointInOldArray) then { private _oldHitPoints = _multHit select 2; _oldHitPoints pushBack _hitPoint; - _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _injurer, _oldHitPoints]]; + _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _source, _oldHitPoints]]; + _ignoreBailCheck = true; } else { - _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _injurer, [_hitPoint]]]; + _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _source, [_hitPoint]]]; }; }; }; + if (_ignoreHit && !_structural) exitWith { - LOG_3("Ignoring multiple hits done to vehicle [%1] by [%2] -- hitpoint [%3].",_vehicle,_injurer,_hitPoint); + TRACE_3("ignoring multiple hits done to vehicle",_vehicle,_source,_hitPoint); + true }; -LOG_3("Processing hit done to vehicle [%1] by [%2] at time [%3].",_vehicle,_injurer,CBA_missionTime); -if !([_vehicle, _projectile, _hitIndex, _newDamage, [_hitpointHash, _hitPoint] call CBA_fnc_hashGet, _injurer] call FUNC(processHit)) exitWith { false }; +TRACE_3("processing hit done to vehicle",_vehicle,_source,CBA_missionTime); -private _canMove = _vehicle getVariable[QGVAR(canMove), true]; -private _canShoot = _vehicle getVariable[QGVAR(canShoot), true]; +if !([_vehicle, _hitPoint, _hitIndex, _addedDamage, _projectile, _source, _instigator] call FUNC(processHit)) exitWith {false}; -if !(_ignoreBailCheck) then { - [_vehicle, _canMove, _canShoot] call FUNC(handleBail); +if (!_ignoreBailCheck) then { + _vehicle call FUNC(handleBail); }; true diff --git a/addons/vehicle_damage/functions/fnc_knockOut.sqf b/addons/vehicle_damage/functions/fnc_knockOut.sqf index 5c8d1697a6f..753255c99f9 100644 --- a/addons/vehicle_damage/functions/fnc_knockOut.sqf +++ b/addons/vehicle_damage/functions/fnc_knockOut.sqf @@ -1,37 +1,37 @@ #include "..\script_component.hpp" /* * Author: tcvm - * Knock out vehicle from battle. Destroy all internal hitpoints. + * Knock out a vehicle from battle by destroying all internal hitpoints. * * Arguments: - * 0: The vehicle + * 0: Vehicle + * 1: Source of damage + * 2: Person who caused damage * * Return Value: * None * * Example: - * [vehicle player] call ace_vehicle_damage_fnc_knockOut + * [cursorObject, player, player] call ace_vehicle_damage_fnc_knockOut * * Public: No */ -params ["_vehicle"]; -private _hash = _vehicle getVariable [QGVAR(hitpointHash), nil]; -if (isNil "_hash") exitWith {}; +params ["_vehicle", "_source", "_instigator"]; +TRACE_3("knockOut",_vehicle,_source,_instigator); -[_hash, { - private _hitpointAlias = _value#0; - if (_hitpointAlias isEqualTo "hull") then { - [_vehicle, -1, _key, 0.89] call FUNC(addDamage); +{ + private _hitArea = _y select 0; + + if (_hitArea == "hull") then { + [_vehicle, _x, -1, 0.89, _source, _instigator] call FUNC(setDamage); } else { - if (_hitpointAlias in ["fuel", "turret", "gun", "engine"]) then { - if ((0.3 > random 1) || { _hitpointAlias isEqualTo "engine" }) then { - [_vehicle, -1, _key, 1] call FUNC(addDamage); + if (_hitArea in ["fuel", "turret", "gun", "engine"]) then { + if ((0.3 > random 1) || {_hitArea == "engine"}) then { + [_vehicle, _x, -1, 1, _source, _instigator] call FUNC(setDamage); } else { - private _currentDamage = _vehicle getHitpointDamage _key; - [_vehicle, -1, _key, (_currentDamage + (0.3 max random 1)) min 1] call FUNC(addDamage); + [_vehicle, _x, -1, ((_vehicle getHitPointDamage _x) + (0.3 max random 1)) min 1, _source, _instigator] call FUNC(setDamage); }; }; }; -}] call CBA_fnc_hashEachPair; - +} forEach (GVAR(vehicleClassesHitPointHash) getOrDefault [typeOf _vehicle, createHashMap]); diff --git a/addons/vehicle_damage/functions/fnc_processHit.sqf b/addons/vehicle_damage/functions/fnc_processHit.sqf index 2402df7fc25..9c87c4b0374 100644 --- a/addons/vehicle_damage/functions/fnc_processHit.sqf +++ b/addons/vehicle_damage/functions/fnc_processHit.sqf @@ -1,133 +1,132 @@ #include "..\script_component.hpp" /* - * Author: tcvm + * Author: tcvm, johnb43 * Process hit by projectile against vehicle and apply appropiate damage to part. * * Arguments: - * 0: The vehicle - * 1: Projectile that hit - * 2: Hit index of potentially damaged part - * 3: New damage done to part - * 4: Information about hitpoint - * 5: Person who caused damage + * 0: Vehicle + * 1: Hit point + * 2: Hit index + * 3: Added damage to part + * 4: Projectile + * 5: Source of damage + * 6: Person who caused damage * * Return Value: - * None + * Whether or not to continue handling last frame's damage * * Example: - * [myVehicle, projectile, 5, 0.663] call ace_vehicle_damage_fnc_processHit; + * [cursorObject, "HitEngine", 1, 0.25, projectile, player, player] call ace_vehicle_damage_fnc_processHit * * Public: No */ -params ["_vehicle", "_projectile", "_hitIndex", "_newDamage", "_hitpointData", "_injurer"]; -_hitpointData params ["_hitArea", "_hitpointConfig", "_hitpointName"]; +params ["_vehicle", "_hitPoint", "_hitIndex", "_addedDamage", "_projectile", "_source", "_instigator"]; +TRACE_7("processHit",_vehicle,_hitPoint,_hitIndex,_addedDamage,_projectile,_source,_instigator); -private _return = true; - -if (_newDamage < 0) then { - _newDamage = -_newDamage; -}; +_addedDamage = abs _addedDamage; private _currentPartDamage = _vehicle getHitIndex _hitIndex; -private _nextPartDamage = _currentPartDamage + _newDamage; +private _newPartDamage = _currentPartDamage + _addedDamage; + +// Damage is high enough for immediate destruction +if (_addedDamage >= 15) exitWith { + TRACE_2("immediate destruction - high damage",_addedDamage,_currentPartDamage); -// damage is high enough for immediate destruction -if (_newDamage >= 15) exitWith { - TRACE_2("immediate destruction - high damage",_newDamage,_currentPartDamage); - [_vehicle] call FUNC(knockOut); - [_vehicle, 1] call FUNC(handleDetonation); // Kill everyone inside for very insane damage { - [QGVAR(medicalDamage), [_x, _injurer, _injurer, true], _x] call CBA_fnc_targetEvent; + [QGVAR(medicalDamage), [_x, _source, _instigator, true], _x] call CBA_fnc_targetEvent; } forEach (crew _vehicle); - _vehicle setDamage 1; - _return = false; - _return + + // setDamage triggers "Killed" EH in cookoff, which starts ammo cook-off + [QGVAR(setDamage), [_vehicle, [1, true, _source, _instigator]]] call CBA_fnc_serverEvent; + + false }; private _projectileConfig = _projectile call CBA_fnc_getObjectConfig; -private _warheadTypeStr = getText (_projectileConfig >> "warheadName"); -private _incendiary = [_projectileConfig >> QGVAR(incendiary), "NUMBER", -1] call CBA_fnc_getConfigEntry; -private _warheadType = ["HE", "AP", "HEAT", "TandemHEAT"] find _warheadTypeStr; // numerical index for warhead type for quicker checks. Numbers defined in script_macros.hpp -if (_warheadType < 0) then { - _warheadType = WARHEAD_TYPE_NONE; -}; -if (_incendiary < 0) then { - _incendiary = [0.3, 0.1, 1, 1, 0] select _warheadType; -}; +private _warheadTypeStr = toLowerANSI getText (_projectileConfig >> "warheadName"); +private _warheadType = ["he", "ap", "heat", "tandemheat"] find _warheadTypeStr; // numerical index for warhead type for quicker checks. Numbers defined in script_macros.hpp -private _minDamage = [_hitpointConfig >> "minimalHit", "NUMBER", 0] call CBA_fnc_getConfigEntry; -if (_minDamage < 0) then { - _minDamage = -_minDamage; -}; +private _incendiary = [_projectileConfig >> QGVAR(incendiary), "NUMBER", [0.3, 0.1, 1, 1, 0] select _warheadType] call CBA_fnc_getConfigEntry; + +private _hitPointHash = GVAR(vehicleClassesHitPointHash) getOrDefault [typeOf _vehicle, createHashMap]; +(_hitPointHash getOrDefault [_hitPoint, []]) params ["_hitArea", "_minDamage"]; -private _ammoEffectiveness = 0; -private _projectileExplosive = [_projectileConfig >> "explosive", "NUMBER", 0] call CBA_fnc_getConfigEntry; -private _indirectHit = [_projectileConfig >> "indirectHit", "NUMBER", 0] call CBA_fnc_getConfigEntry; +private _projectileExplosive = getNumber (_projectileConfig >> "explosive"); +private _indirectHit = getNumber (_projectileConfig >> "indirectHit"); -if (_warheadType isEqualTo WARHEAD_TYPE_AP) then { - // change damage based on projectile speed (doesn't do this in vanilla ARMA believe it or not) - if !(isNull _injurer) then { - private _airFriction = [_projectileConfig >> "airFriction", "NUMBER", 0] call CBA_fnc_getConfigEntry; - private _distance = _injurer distance _vehicle; - _newDamage = (1 - _projectileExplosive) * _newDamage * exp(_airFriction * _distance); +if (_warheadType == WARHEAD_TYPE_AP) then { + // Change damage based on projectile speed (doesn't do this in vanilla Arma believe it or not) + if (!isNull _source) then { + private _airFriction = getNumber (_projectileConfig >> "airFriction"); + private _distance = _source distance _vehicle; + _addedDamage = (1 - _projectileExplosive) * _addedDamage * exp (_airFriction * _distance); }; }; private _penChance = 1; -if (_newDamage < _minDamage) then { - _penChance = _newDamage / _minDamage; - TRACE_5("minimum damage modifying hit",_newDamage,_penChance,abs _minDamage,_warheadTypeStr,_hitArea); + +// Added damage can't be 0, so don't need to worry about 0 division here +if (_addedDamage < _minDamage) then { + _penChance = _addedDamage / _minDamage; + + TRACE_5("minimum damage modifying hit",_addedDamage,_penChance,_minDamage,_warheadTypeStr,_hitArea); }; if (_penChance < random 1) exitWith { TRACE_1("didn't penetrate",_penChance); - _return + + true }; if (_minDamage == 0) then { _minDamage = 1; }; -if (_warheadType isEqualTo WARHEAD_TYPE_HE) then { +if (_warheadType == WARHEAD_TYPE_HE) then { private _modifiedIndirectHit = _indirectHit / 100; - if (_newDamage > _modifiedIndirectHit) then { - _newDamage = _newDamage / 2; + + if (_addedDamage > _modifiedIndirectHit) then { + _addedDamage = _addedDamage / 2; }; - _newDamage = (_newDamage * (_newDamage / _modifiedIndirectHit)) min _newDamage; + + _addedDamage = (_addedDamage * (_addedDamage / _modifiedIndirectHit)) min _addedDamage; }; -_ammoEffectiveness = if (_warheadType isEqualTo WARHEAD_TYPE_AP) then { - 0.15 max _newDamage +private _ammoEffectiveness = if (_warheadType == WARHEAD_TYPE_AP) then { + 0.15 max _addedDamage } else { - if (_warheadType isEqualTo WARHEAD_TYPE_HE) then { - (_newDamage / (_minDamage + (_indirectHit / 100)) * 0.2) + if (_warheadType == WARHEAD_TYPE_HE) then { + (_addedDamage / (_minDamage + (_indirectHit / 100)) * 0.2) } else { - ((_newDamage / _minDamage) * 0.4) min 1 + ((_addedDamage / _minDamage) * 0.4) min 1 }; }; -TRACE_4("ammo effectiveness",_ammoEffectiveness,_newDamage,_minDamage,_warheadTypeStr); + +TRACE_4("ammo effectiveness",_ammoEffectiveness,_addedDamage,_minDamage,_warheadTypeStr); _incendiary = _incendiary * _ammoEffectiveness; -private _isCar = (_vehicle isKindOf "Car" && { !(_vehicle isKindOf "Wheeled_APC_F") }); +private _isCar = _vehicle isKindOf "Car" && {!(_vehicle isKindOf "Wheeled_APC_F")}; + if (_isCar) then { - _ammoEffectiveness = (_ammoEffectiveness + (_ammoEffectiveness * 0.5)) min 1; + _ammoEffectiveness = (_ammoEffectiveness * 1.5) min 1; }; -private _currentVehicleAmmo = _vehicle call EFUNC(cookoff,getVehicleAmmo); +(_vehicle call EFUNC(cookoff,getVehicleAmmo)) params ["_magazines", "_totalAmmo"]; private _chanceOfDetonation = 0; private _explosiveAmmoCount = 0; -private _nonExplosiveAmmoCount = 0; -if ((_currentVehicleAmmo select 0) isNotEqualTo []) then { +if (_magazines isNotEqualTo []) then { private _magConfig = configFile >> "CfgMagazines"; private _ammoConfig = configFile >> "CfgAmmo"; private _countOfExplodableAmmo = 0; + { _x params ["_magazineClassname", "_currentAmmoCount"]; + private _initialAmmoCount = getNumber (_magConfig >> _magazineClassname >> "count"); _chanceOfDetonation = _chanceOfDetonation + (_currentAmmoCount / _initialAmmoCount); _countOfExplodableAmmo = _countOfExplodableAmmo + 1; @@ -135,215 +134,241 @@ if ((_currentVehicleAmmo select 0) isNotEqualTo []) then { private _ammoClassname = getText (_magConfig >> _magazineClassname >> "ammo"); private _explosive = getNumber (_ammoConfig >> _ammoClassname >> "explosive"); private _hit = getNumber (_ammoConfig >> _ammoClassname >> "hit"); - if (_explosive > 0.5 || _hit > 50) then { + + if (_explosive > 0.5 || {_hit > 50}) then { _explosiveAmmoCount = _explosiveAmmoCount + 1; - } else { - _nonExplosiveAmmoCount = _nonExplosiveAmmoCount + 1; }; - } forEach (_currentVehicleAmmo select 0); + } forEach _magazines; + if (_countOfExplodableAmmo != 0) then { _chanceOfDetonation = _chanceOfDetonation / _countOfExplodableAmmo; }; }; -private _chanceToDetonate = 0; -private _chanceOfFire = 0; -private _currentFuel = fuel _vehicle; -private _vehicleConfig = _vehicle call CBA_fnc_getObjectConfig; + +private _return = true; + switch (_hitArea) do { case "engine": { - _chanceToDetonate = ([_vehicleConfig >> QGVAR(engineDetonationProb), "NUMBER", 0] call CBA_fnc_getConfigEntry) * _incendiary * _currentFuel * _penChance; - _chanceOfFire = ([_vehicleConfig >> QGVAR(engineFireProb), "NUMBER", 0] call CBA_fnc_getConfigEntry) * _incendiary * _currentFuel * _penChance; + private _vehicleConfig = configOf _vehicle; + private _currentFuel = fuel _vehicle; + private _chanceToDetonate = getNumber (_vehicleConfig >> QGVAR(engineDetonationProb)) * _incendiary * _currentFuel * _penChance; - private _cookoffIntensity = 4 * _currentFuel; - TRACE_6("hit engine",_chanceToDetonate,_chanceOfFire,_incendiary,_chanceOfDetonation,_currentFuel,_cookoffIntensity); + TRACE_4("hit engine",_chanceToDetonate,_incendiary,_chanceOfDetonation,_currentFuel); - if (_isCar) then { - _chanceOfFire = 0; // no cookoff for cars - }; + // Knock out and detonate vehicle if necessary + if ([_vehicle, _chanceToDetonate, _explosiveAmmoCount > 0, _totalAmmo > 0, _source, _instigator] call FUNC(handleDetonation)) exitWith {}; - if ([_vehicle, _chanceToDetonate, _explosiveAmmoCount, _nonExplosiveAmmoCount, _injurer] call FUNC(handleDetonation)) exitWith { - [_vehicle] call FUNC(knockOut); - }; + // Cap damage at 0.9 to avoid hard coded blow up + _newPartDamage = 0.9 min _newPartDamage; - // cap damage at 0.9 to avoid hard coded blow up - _nextPartDamage = (0.9 min _nextPartDamage); + // Fatal engine/drive system damage (engine and tracks stop working at 0.9) + if (0.8 * _ammoEffectiveness > random 1) then { + _newPartDamage = 0.9; + }; - // fatal engine/drive system damage - if (_nextPartDamage == 0.9 || { 0.8 * _ammoEffectiveness > random 1 }) then { - [_vehicle, _hitIndex, _hitpointName, 0.9 * _penChance] call FUNC(addDamage); + if (_newPartDamage == 0.9) then { _vehicle setVariable [QGVAR(canMove), false]; - } else { - [_vehicle, _hitIndex, _hitpointName, _nextPartDamage * _penChance] call FUNC(addDamage); }; - [_vehicle, _chanceOfFire, _cookoffIntensity, _injurer, _hitArea, false] call FUNC(handleCookoff); + [_vehicle, _hitPoint, _hitIndex, _newPartDamage * _penChance, _source, _instigator] call FUNC(setDamage); + + // No cookoff for cars + if (_isCar) exitWith {}; + + private _chanceOfFire = getNumber (_vehicleConfig >> QGVAR(engineFireProb)) * _incendiary * _currentFuel * _penChance; + private _cookoffIntensity = 4 * _currentFuel; + + [_vehicle, _chanceOfFire, _cookoffIntensity, _source, _instigator, "engine", false, false] call FUNC(handleCookoff); }; case "hull": { - _chanceToDetonate = ([_vehicleConfig >> QGVAR(hullDetonationProb), "NUMBER", 0] call CBA_fnc_getConfigEntry) * _incendiary * ((_chanceOfDetonation + _currentFuel) / 2) * _penChance; - _chanceOfFire = ([_vehicleConfig >> QGVAR(hullFireProb), "NUMBER", 0] call CBA_fnc_getConfigEntry) * _incendiary * ((_chanceOfDetonation + _currentFuel) / 2) * _penChance; + private _vehicleConfig = configOf _vehicle; + private _currentFuel = fuel _vehicle; + private _chanceToDetonate = getNumber (_vehicleConfig >> QGVAR(hullDetonationProb)) * _incendiary * ((_chanceOfDetonation + _currentFuel) / 2) * _penChance; - private _cookoffIntensity = 1.5 + (_explosiveAmmoCount * _chanceOfFire); - TRACE_6("hit hull",_chanceToDetonate,_chanceOfFire,_incendiary,_chanceOfDetonation,_currentFuel,_cookoffIntensity); + TRACE_4("hit hull",_chanceToDetonate,_incendiary,_chanceOfDetonation,_currentFuel); - if (_isCar) then { - _chanceOfFire = 0; // no cookoff for cars + // Knock out and detonate vehicle if necessary + if ([_vehicle, _chanceToDetonate, _explosiveAmmoCount > 0, _totalAmmo > 0, _source, _instigator] call FUNC(handleDetonation)) exitWith { + [_vehicle, _hitPoint, _hitIndex, 0.89 * _penChance, _source, _instigator] call FUNC(setDamage); }; - if ([_vehicle, _chanceToDetonate, _explosiveAmmoCount, _nonExplosiveAmmoCount, _injurer] call FUNC(handleDetonation)) exitWith { - [_vehicle, _hitIndex, _hitpointName, 0.89 * _penChance] call FUNC(addDamage); - [_vehicle] call FUNC(knockOut); - }; - - private _hash = _vehicle getVariable [QGVAR(hitpointHash), []]; - private _hashKeys = [_hash] call CBA_fnc_hashKeys; - // 25% chance of jamming turret - 25% of mobility kill - 25% of both - 75% chance of critical hull damage private _rand = random 1; + TRACE_2("rolling hull damage",_ammoEffectiveness,_rand); + private _partKill = []; + if (_ammoEffectiveness > _rand) then { _rand = random 1; + TRACE_2("damaged hull part",_ammoEffectiveness,_rand); + switch (true) do { case (_rand < 0.25): { - [_vehicle, _hitIndex, _hitpointName, 0.89 * _penChance] call FUNC(addDamage); - // iterate through all keys and find appropriate turret - [_hash, { - if (_value#0 isEqualTo "turret") then { - _partKill pushBack _key; + [_vehicle, _hitPoint, _hitIndex, 0.89 * _penChance, _source, _instigator] call FUNC(setDamage); + + // Iterate through all keys and find appropriate turret + { + if ((_y select 0) == "turret") then { + _partKill pushBack _x; }; - }] call CBA_fnc_hashEachPair; + } forEach _hitPointHash; + _vehicle setVariable [QGVAR(canShoot), false]; }; case (_rand < 0.5): { - [_vehicle, _hitIndex, _hitpointName, 0.89 * _penChance] call FUNC(addDamage); - _partKill = _partKill + ENGINE_HITPOINTS#0; + [_vehicle, _hitPoint, _hitIndex, 0.89 * _penChance, _source, _instigator] call FUNC(setDamage); + + _partKill append (ENGINE_HITPOINTS select 0); + if !(_vehicle isKindOf "Wheeled_APC_F") then { - _partKill = _partKill + TRACK_HITPOINTS#0; + _partKill append (TRACK_HITPOINTS select 0); }; _vehicle setVariable [QGVAR(canMove), false]; }; case (_rand < 0.75): { - [_vehicle, _hitIndex, _hitpointName, 0.89 * _penChance] call FUNC(addDamage); - _partKill = _partKill + ENGINE_HITPOINTS#0; + [_vehicle, _hitPoint, _hitIndex, 0.89 * _penChance, _source, _instigator] call FUNC(setDamage); + + _partKill append (ENGINE_HITPOINTS select 0); + if !(_vehicle isKindOf "Wheeled_APC_F") then { - _partKill = _partKill + TRACK_HITPOINTS#0; + _partKill append (TRACK_HITPOINTS select 0); }; - // iterate through all keys and find appropriate turret - [_hash, { - if (_value#0 isEqualTo "turret") then { - _partKill pushBack _key; + // Iterate through all keys and find appropriate turret + { + if ((_y select 0) == "turret") then { + _partKill pushBack _x; }; - }] call CBA_fnc_hashEachPair; + } forEach _hitPointHash; _vehicle setVariable [QGVAR(canMove), false]; _vehicle setVariable [QGVAR(canShoot), false]; }; - default{}; }; }; { + [_vehicle, _x, -1, _penChance, _source, _instigator] call FUNC(setDamage); + TRACE_1("doing damage to hitpoint",_x); - [_vehicle, -1, _x, 1 * _penChance] call FUNC(addDamage); } forEach _partKill; - [_vehicle, _chanceOfFire, _cookoffIntensity, _injurer, "", true] call FUNC(handleCookoff); + // No cookoff for cars + if (_isCar) exitWith {}; + + private _chanceOfFire = getNumber (_vehicleConfig >> QGVAR(hullFireProb)) * _incendiary * ((_chanceOfDetonation + _currentFuel) / 2) * _penChance; + private _cookoffIntensity = 1.5 + (_explosiveAmmoCount * _chanceOfFire); + + [_vehicle, _chanceOfFire, _cookoffIntensity, _source, _instigator] call FUNC(handleCookoff); }; case "turret": { - _chanceToDetonate = ([_vehicleConfig >> QGVAR(turretDetonationProb), "NUMBER", 0] call CBA_fnc_getConfigEntry) * _incendiary * _chanceOfDetonation * _penChance; - _chanceOfFire = ([_vehicleConfig >> QGVAR(turretFireProb), "NUMBER", 0] call CBA_fnc_getConfigEntry) * _incendiary * _chanceOfDetonation * _penChance; + private _vehicleConfig = configOf _vehicle; + private _chanceToDetonate = getNumber (_vehicleConfig >> QGVAR(turretDetonationProb)) * _incendiary * _chanceOfDetonation * _penChance; - private _cookoffIntensity = _explosiveAmmoCount * _chanceOfFire; - TRACE_6("hit turret",_chanceToDetonate,_chanceOfFire,_incendiary,_chanceOfDetonation,_currentFuel,_cookoffIntensity); + TRACE_3("hit turret",_chanceToDetonate,_incendiary,_chanceOfDetonation); - if (_isCar) then { - _chanceOfFire = 0; // no cookoff for cars - }; - - if ([_vehicle, _chanceToDetonate, _explosiveAmmoCount, _nonExplosiveAmmoCount, _injurer] call FUNC(handleDetonation)) exitWith { - [_vehicle] call FUNC(knockOut); - }; + if ([_vehicle, _chanceToDetonate, _explosiveAmmoCount > 0, _totalAmmo > 0, _source, _instigator] call FUNC(handleDetonation)) exitWith {}; if (0.8 * _ammoEffectiveness > random 1) then { TRACE_1("damaged turret",_ammoEffectiveness * 0.8); - [_vehicle, _hitIndex, _hitpointName, 1 * _penChance] call FUNC(addDamage); + + [_vehicle, _hitPoint, _hitIndex, _penChance, _source, _instigator] call FUNC(setDamage); + _vehicle setVariable [QGVAR(canShoot), false]; }; - [_vehicle, _chanceOfFire, _cookoffIntensity, _injurer, "", true] call FUNC(handleCookoff); + // No cookoff for cars + if (_isCar) exitWith {}; + + private _chanceOfFire = getNumber (_vehicleConfig >> QGVAR(turretFireProb)) * _incendiary * _chanceOfDetonation * _penChance; + private _cookoffIntensity = _explosiveAmmoCount * _chanceOfFire; + + [_vehicle, _chanceOfFire, _cookoffIntensity, _source, _instigator] call FUNC(handleCookoff); }; case "gun": { - TRACE_5("hit gun",_chanceToDetonate,_chanceOfFire,_incendiary,_chanceOfDetonation,_currentFuel); + TRACE_2("hit gun",_addedDamage,_minDamage); + if (0.8 * _ammoEffectiveness > random 1) then { TRACE_1("damaged gun",_ammoEffectiveness * 0.8); - [_vehicle, _hitIndex, _hitpointName, 1 * _penChance] call FUNC(addDamage); + + [_vehicle, _hitPoint, _hitIndex, _penChance, _source, _instigator] call FUNC(setDamage); + _vehicle setVariable [QGVAR(canShoot), false]; }; }; case "track": { - private _damage = (0.1 max (0.1 * _newDamage / _minDamage)) min 1; - [_vehicle, _hitIndex, _hitpointName, (_currentPartDamage + _damage) * _penChance] call FUNC(addDamage); - TRACE_3("damaged track",_damage,_newDamage,_minDamage); + private _damage = (0.1 max (0.1 * _addedDamage / _minDamage)) min 1; + + [_vehicle, _hitPoint, _hitIndex, (_currentPartDamage + _damage) * _penChance] call FUNC(setDamage); + + TRACE_3("damaged track",_damage,_addedDamage,_minDamage); if ((_vehicle getHitIndex _hitIndex) >= 1) then { _vehicle setVariable [QGVAR(canMove), false]; }; }; case "wheel": { - [_vehicle, _hitIndex, _hitpointName, (_currentPartDamage + _newDamage) * _penChance] call FUNC(addDamage); - TRACE_1("damaged wheel",_newDamage); + [_vehicle, _hitPoint, _hitIndex, (_currentPartDamage + _addedDamage) * _penChance, _source, _instigator] call FUNC(setDamage); + + TRACE_1("damaged wheel",_addedDamage); }; case "fuel": { - _chanceOfFire = (_incendiary * _currentFuel * _penChance) / 2; - private _cookoffIntensity = _currentFuel * 5; - TRACE_2("damaged fuel",_chanceOfFire,_cookoffIntensity); + private _damage = (0.1 max (0.1 * _addedDamage / _minDamage)) min 1; + [_vehicle, _hitPoint, _hitIndex, (_currentPartDamage + _damage) * _penChance, _source, _instigator] call FUNC(setDamage); - if (_isCar) then { - _chanceOfFire = 0; // no cookoff for cars - }; + // No cookoff for cars + if (_isCar) exitWith {}; + + private _currentFuel = fuel _vehicle; + private _chanceOfFire = (_incendiary * _currentFuel * _penChance) / 2; + private _cookoffIntensity = _currentFuel * 5; - [_vehicle, _chanceOfFire, _cookoffIntensity, _injurer, "", false] call FUNC(handleCookoff); + TRACE_4("damaged fuel",_chanceOfFire,_incendiary,_cookoffIntensity,_currentFuel); - private _damage = (0.1 max (0.1 * _newDamage / _minDamage)) min 1; - [_vehicle, _hitIndex, _hitpointName, (_currentPartDamage + _damage) * _penChance] call FUNC(addDamage); + [_vehicle, _chanceOfFire, _cookoffIntensity, _source, _instigator, "", false, false] call FUNC(handleCookoff); }; case "slat": { TRACE_2("hit slat",_warheadType,_warheadTypeStr); - // incredibly small chance of AP destroying SLAT - if (_warheadType isEqualTo WARHEAD_TYPE_HEAT || { _warheadType isEqualTo WARHEAD_TYPE_TANDEM } || { _warheadType isEqualTo WARHEAD_TYPE_HE } || { 0.01 > random 1 }) then { + + // Incredibly small chance of AP destroying SLAT + if (_warheadType in [WARHEAD_TYPE_HE, WARHEAD_TYPE_AP, WARHEAD_TYPE_HEAT, WARHEAD_TYPE_TANDEM] || {0.01 > random 1}) then { private _currentDamage = _vehicle getHitIndex _hitIndex; + TRACE_3("damaged slat",_warheadType,_warheadTypeStr,_currentDamage); - if (_warheadType isEqualTo WARHEAD_TYPE_HEAT || { _warheadType isEqualTo WARHEAD_TYPE_TANDEM }) then { - [_vehicle, _hitIndex, _hitpointName, 1] call FUNC(addDamage); + if (_warheadType in [WARHEAD_TYPE_HEAT, WARHEAD_TYPE_TANDEM, WARHEAD_TYPE_AP]) then { + [_vehicle, _hitPoint, _hitIndex, 1, _source, _instigator] call FUNC(setDamage); } else { - [_vehicle, _hitIndex, _hitpointName, _currentDamage + (0.5 max random 1)] call FUNC(addDamage); + [_vehicle, _hitPoint, _hitIndex, _currentDamage + (0.5 max random 1), _source, _instigator] call FUNC(setDamage); }; - if (_currentDamage < 1 && _warheadType isEqualTo WARHEAD_TYPE_HEAT) then { + if (_currentDamage < 1 && {_warheadType == WARHEAD_TYPE_HEAT}) then { _return = false; }; }; }; case "era": { TRACE_2("hit era",_warheadType,_warheadTypeStr); - if (_warheadType isEqualTo WARHEAD_TYPE_HEAT || { _warheadType isEqualTo WARHEAD_TYPE_TANDEM } || { 0.05 > random 1 }) then { + + if (_warheadType in [WARHEAD_TYPE_AP, WARHEAD_TYPE_HEAT, WARHEAD_TYPE_TANDEM] || {0.05 > random 1}) then { private _currentDamage = _vehicle getHitIndex _hitIndex; + TRACE_3("damaged era",_warheadType,_warheadTypeStr,_currentDamage); - [_vehicle, _hitIndex, _hitpointName, 1] call FUNC(addDamage); - // dont process anymore damage if this is HEAT - shouldnt happen anyway but ARMA says it does so you know - if (_currentDamage < 1 && _warheadType isEqualTo WARHEAD_TYPE_HEAT) then { + [_vehicle, _hitPoint, _hitIndex, 1, _source, _instigator] call FUNC(setDamage); + + // Don't process anymore damage if this is HEAT - shouldn't happen anyway but Arma says it does so you know + if (_currentDamage < 1 && {_warheadType == WARHEAD_TYPE_HEAT}) then { _return = false; }; }; }; default { TRACE_1("hit unknown hitpoint??",_hitArea); - } + }; }; _return diff --git a/addons/vehicle_damage/functions/fnc_setDamage.sqf b/addons/vehicle_damage/functions/fnc_setDamage.sqf new file mode 100644 index 00000000000..8b75bff1f7a --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_setDamage.sqf @@ -0,0 +1,45 @@ +#include "..\script_component.hpp" +/* + * Author: tcvm + * Sets vehicle damage based on HitIndex. Failing that it falls back to HitPoint name. + * + * Arguments: + * 0: Vehicle + * 1: Hit point + * 2: Hit index + * 3: Damage + * 4: Source of damage + * 5: Person who caused damage + * + * Return Value: + * None + * + * Example: + * [cursorObject, "HitEngine", 1, 0.25, player, player] call ace_vehicle_damage_fnc_setDamage + * + * Public: No + */ + +params ["_vehicle", "_hitPoint", "_hitIndex", "_damage", "_source", "_instigator"]; +TRACE_6("setDamage",_vehicle,_hitPoint,_hitIndex,_damage,_source,_instigator); + +private _currentDamage = _vehicle getHitPointDamage _hitPoint; + +if (_damage < _currentDamage) exitWith { + TRACE_3("capping damage at current",_damage,_currentDamage,_hitPoint); +}; + +if (_hitPoint == "#structural") then { + _hitPoint = "hithull"; + _hitIndex = -1; +}; + +if (_hitIndex >= 0) then { + _vehicle setHitIndex [_hitIndex, _damage, true, _source, _instigator]; +} else { + _vehicle setHitPointDamage [_hitPoint, _damage, true, _source, _instigator]; +}; + +if (_hitPoint == "HitEngine" && {_damage >= 0.9}) then { + [QEGVAR(cookoff,engineFireServer), _vehicle] call CBA_fnc_serverEvent; +}; diff --git a/addons/vehicle_damage/initSettings.inc.sqf b/addons/vehicle_damage/initSettings.inc.sqf index 0d3f324af2f..3a1bcf568ab 100644 --- a/addons/vehicle_damage/initSettings.inc.sqf +++ b/addons/vehicle_damage/initSettings.inc.sqf @@ -1,19 +1,21 @@ [ - QGVAR(enabled), "CHECKBOX", + QGVAR(enabled), + "CHECKBOX", [ELSTRING(common,Enabled), LSTRING(setting_description)], LSTRING(category_displayName), - false, // default value - true, // isGlobal + false, + 1, {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ - QGVAR(enableCarDamage), "CHECKBOX", + QGVAR(enableCarDamage), + "CHECKBOX", [LSTRING(carDamage_setting_enable), LSTRING(carDamage_setting_description)], LSTRING(category_displayName), - false, // default value - true, // isGlobal + false, + 1, {[QGVAR(enableCarDamage), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/vehicle_damage/script_macros.hpp b/addons/vehicle_damage/script_macros.hpp index 84f3120ac15..43bac7e2f80 100644 --- a/addons/vehicle_damage/script_macros.hpp +++ b/addons/vehicle_damage/script_macros.hpp @@ -7,21 +7,23 @@ #define IS_EXPLOSIVE_AMMO(ammo) (getNumber (ammo call CBA_fnc_getObjectConfig >> "explosive") > 0.5) #define ENGINE_HITPOINTS [["hitengine"], "engine"] -#define HULL_HITPOINTS [["hithull", "hitbody", "#structural"],"hull"] +#define HULL_HITPOINTS [["hithull", "hitbody", "#structural"], "hull"] #define TRACK_HITPOINTS [["hitltrack", "hitrtrack"], "track"] #define WHEEL_HITPOINTS [["hitlbwheel", "hitlmwheel", "hitlfwheel", "hitlf2wheel", "hitrbwheel", "hitrmwheel", "hitrlwheel", "hitrfwheel", "hitrf2wheel"], "wheel"] #define FUEL_HITPOINTS [["hitfuel"], "fuel"] #define ALL_HITPOINTS [ENGINE_HITPOINTS, HULL_HITPOINTS, TRACK_HITPOINTS, WHEEL_HITPOINTS, FUEL_HITPOINTS] -#define CRITICAL_HITPOINTS ["hithull", 0.89, "hitbody", 0.89, "#structural", 0.89, "hitengine", 0.9] +#define CRITICAL_HITPOINTS ["hithull", "hitbody", "#structural", "hitengine"] +#define CRITICAL_HITPOINTS_THRESHOLDS [0.89, 0.89, 0.89, 0.9] #define WARHEAD_TYPE_HE 0 #define WARHEAD_TYPE_AP 1 #define WARHEAD_TYPE_HEAT 2 #define WARHEAD_TYPE_TANDEM 3 -#define WARHEAD_TYPE_NONE 4 #define EJECT_IF_DESTROYED_VEHICLES ["Boat_Transport_02_base_F", "Rubber_duck_base_F"] - -#define CREATE_INCENDIARY_AMMO(ammo,base,inc) class ammo: base { GVAR(incendiary) = inc; } +#define CREATE_INCENDIARY_AMMO(ammo,base,inc)\ +class ammo: base {\ + GVAR(incendiary) = inc;\ +} diff --git a/addons/vehicle_damage/stringtable.xml b/addons/vehicle_damage/stringtable.xml index 4a8fdb42643..a2d9a9232fb 100644 --- a/addons/vehicle_damage/stringtable.xml +++ b/addons/vehicle_damage/stringtable.xml @@ -12,42 +12,36 @@ ACE 고급 차량 피해 ACE Продвинутое повреждение техники ACE Daño avanzado de vehículos + ACE Dano avançãdo de veículos - Enable/Disable advanced vehicle damage - アドバンスドビークルダメージを有効/無効にする + Enable advanced vehicle damage Active les dégâts de véhicule avancés. - Aktiviert/Deaktiviert den Erweiterten Fahrzeugsschaden + Aktiviert den Erweiterten Fahrzeugsschaden Abilità danni avanzati ai veicoli - Włącz/Wyłącz zaawansowane uszkodzenia pojazdów - 启用/禁用高级载具损坏 - 고급 차량 피해 활성화/비활성화 - Включить/выключить продвинутое повреждение техники - Habilitar/Deshabilitar el daño avanzado de vehículos - - - Enable/Disable advanced car damage (Experimental) - アドバンスド車ダメージを有効/無効にする (試験的) - Active les dégâts avancés sur les voitures (expérimental). - Aktiviert/Deaktiviert den Erweiterten Fahrzeugsschaden (Experimentell) - Abilita danni avanzati ai veicoli (sperimentale) - Włącz/Wyłącz zaawansowane uszkodzenia w samochodach (eksperymentalne) - 启用/禁用高级车辆损坏(实验性) - 고급 차량 피해(실험용) 활성화/비활성화 - Включить/выключить продвинутое повреждение машин (экспериментальное) - Habilita/Deshabilita el daño avanzado de coche (Experimental) + Włącz zaawansowane uszkodzenia pojazdów + Включить продвинутое повреждение техники + Habilitar el daño avanzado de vehículos + Ativar dano avançado de veículo - Enable/Disable advanced car damage - アドバンスド車ダメージを有効/無効にする + Enable advanced car damage Dégâts de voiture avancés - Aktiviert/Deaktiviert erweiterten Autoschaden + Aktiviert erweiterten Autoschaden Abilita danni avanzati alle macchine - Włącz/Wyłącz zaawansowane uszkodzenia w samochodach - 启用/禁用高级车辆损坏 - 고급 차량 피해 활성화/비활성화 - Продвинутое повреждение машин - Habilitar/Deshabilitar daño avanzado de coche (Experimental) + Włącz zaawansowane uszkodzenia w samochodach + Habilitar daño avanzado de coche + Habilitar dano avançado para carros + + + Enable advanced car damage (Experimental) + Active les dégâts avancés sur les voitures (expérimental). + Aktiviert den Erweiterten Fahrzeugsschaden (Experimentell) + Abilita danni avanzati ai veicoli (sperimentale) + Włącz zaawansowane uszkodzenia w samochodach (eksperymentalne) + Включить продвинутое повреждение машин (экспериментальное) + Habilitar daño avanzado de coche (Experimental) + Habilitar dano avançado para carros (Experimental) Wreck (Turret) diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index b247967fe17..7f89ec49505 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -288,6 +288,7 @@ Unklaren Sperrzustand entfernen 移除不明确的上锁状态 불분명한 잠금상태 제거 + Remover estado de bloqueio ambíguo As Is diff --git a/addons/vehicles/CfgWeapons.hpp b/addons/vehicles/CfgWeapons.hpp index 2fbe4e52466..0c2eb0e4de4 100644 --- a/addons/vehicles/CfgWeapons.hpp +++ b/addons/vehicles/CfgWeapons.hpp @@ -13,8 +13,7 @@ class CfgWeapons { class ACE_LMG_coax_DenelMG4: LMG_coax {}; class LMG_Minigun: LMG_RCWS { - // Add the following: "2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt" - magazines[] = {"PylonWeapon_2000Rnd_65x39_belt", "1000Rnd_65x39_Belt","1000Rnd_65x39_Belt_Green","1000Rnd_65x39_Belt_Tracer_Green","1000Rnd_65x39_Belt_Tracer_Red","1000Rnd_65x39_Belt_Tracer_Yellow","1000Rnd_65x39_Belt_Yellow","2000Rnd_65x39_Belt","2000Rnd_65x39_Belt_Green","2000Rnd_65x39_Belt_Tracer_Green","2000Rnd_65x39_Belt_Tracer_Green_Splash","2000Rnd_65x39_Belt_Tracer_Red","2000Rnd_65x39_Belt_Tracer_Yellow","2000Rnd_65x39_Belt_Tracer_Yellow_Splash","2000Rnd_65x39_Belt_Yellow","2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","200Rnd_65x39_Belt","200Rnd_65x39_Belt_Tracer_Green","200Rnd_65x39_Belt_Tracer_Red","200Rnd_65x39_Belt_Tracer_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt","500Rnd_65x39_Belt","500Rnd_65x39_Belt_Tracer_Red_Splash","500Rnd_65x39_Belt_Tracer_Green_Splash","500Rnd_65x39_Belt_Tracer_Yellow_Splash"}; + magazines[] += {"2000Rnd_762x51_Belt_T_Green","2000Rnd_762x51_Belt_T_Red","2000Rnd_762x51_Belt_T_Yellow","5000Rnd_762x51_Belt","5000Rnd_762x51_Yellow_Belt"}; }; class HMG_127: LMG_RCWS { diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml index 741901d75c7..6148bcdd25e 100644 --- a/addons/vehicles/stringtable.xml +++ b/addons/vehicles/stringtable.xml @@ -29,6 +29,7 @@ Круиз-контроль включён Control de crucero encendido Régulateur de vitesse activé + Controle de cruzeiro ativado Speed Limiter off @@ -58,6 +59,7 @@ Круиз-контроль выключен Control de crucero apagado Régulateur de vitesse désactivé + Controle de cruzeiro desativado Speed Limit diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index eb7ed948382..2c2e92d24e6 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -129,6 +129,7 @@ Значение 0 будет использовать настройки видео по умолчанию Establecer a 0 utiliza las opciones de video por defecto La valeur 0 permet d'utiliser les paramètres vidéo par défaut + Estabelecer em 0 utilizará as configurações padrão de vídeo Client View Distance (On Foot) diff --git a/addons/viewports/stringtable.xml b/addons/viewports/stringtable.xml index be78cdc9957..22f7d77813b 100644 --- a/addons/viewports/stringtable.xml +++ b/addons/viewports/stringtable.xml @@ -12,6 +12,7 @@ Periscopios Sichtfenster Périscopes + Periscópios Allows crew to look through periscopes @@ -24,6 +25,7 @@ Permite a la tripulación asomarse a través de los periscopios Ermöglicht der Besatzung den Blick durch Periskope Permet à l'équipage de regarder à travers des périscopes. + Permite que a tripulação olhe através de periscópios diff --git a/addons/viewrestriction/stringtable.xml b/addons/viewrestriction/stringtable.xml index fee4a9bf336..7356e6412f5 100644 --- a/addons/viewrestriction/stringtable.xml +++ b/addons/viewrestriction/stringtable.xml @@ -15,6 +15,7 @@ Ограничение обзора Görüntüyü Kısıtla Reestricción de Vista + Restrição do Modo de Visão View restriction settings to limit the usage of 1st or 3rd person views globally or per vehicle type. @@ -29,6 +30,7 @@ Настройки ограничения обзора при виде от 1-го или 3-го лица. Общие для всех, или Выборочные, в зависимости от техники. 1. veya 3. kişi görünümlerinin kullanımını genel olarak veya araç türüne göre sınırlamak için kısıtlama ayarlarını görüntüleyin. Opciones de Reestricción de Vista para limitar el uso de 1º o 3º persona globalmente o según el tipo de vehículo. + A restrição do modo de visão limita o uso de 1ª ou 3ª pessoa globalmente ou por tipo de veículo. Mode @@ -44,6 +46,7 @@ Режим установок Mod Modo + Modo Sets global mode. Default: Disabled @@ -59,6 +62,7 @@ Общие установки для всех. По умолчанию: Отключено. Global modu ayarlar. Varsayılan: Devre Dışı Establece el modo global. Defecto: Deshabilitado + Define o modo global. Padrão: Desabilitado (Selective) Foot @@ -74,6 +78,7 @@ (Выборочные) Пешком (Seçilebilir) Ayakta (Selectivo) Pie + (Seletivo) A pé Selective mode on Foot. Default: Disabled (Requires Mode: Selective) @@ -89,6 +94,7 @@ Выборочные установки без техники. По умолчанию: Отключено (требуется режим: Выборочные) Ayakta iken seçilen görüş modu. Varsayılan: Etkin Değil Modo selectivo a pie. Defecto: Deshabilitado (Requiere Modo: Selectivo) + Modo seletivo a pé. Padrão: Desabilitado (Modo necessário: Seletivo) (Selective) Land Vehicles @@ -104,6 +110,7 @@ (Выборочные) Наземная техника (Seçilebilir) Kara Araçları (Selectivo) Vehículos de tierra + (Seletivo) Veículos terrestres Selective mode in Land Vehicles. Default: Disabled (Requires Mode: Selective) @@ -119,6 +126,7 @@ Выборочные установки для наземной техники. По умолчанию: Отключено (требуется режим: Выборочные) Kara araçlarında iken seçilen görüş modu. Varsayılan: Etkin Değil Modo selectivo en vehículos de tierra.Defecto: Deshabilitado (Requiere Modo: Selectivo) + Modo seletivo em veículos terrestres. Padrão: Desabilitado (Modo necessário: Seletivo) (Selective) Air Vehicles @@ -134,6 +142,7 @@ (Выборочные) Авиатехника (Seçilebilir) Hava Araçları (Selectivo) Vehículos aéreos + (Seletivo) Aeronaves Selective mode in Air Vehicles. Default: Disabled (Requires Mode: Selective) @@ -149,6 +158,7 @@ Выборочные установки для авиатехники. По умолчанию: Отключено (требуется режим: Выборочные) Hava araçlarında iken seçilen görüş modu. Varsayılan: Etkin Değil Modo selectivo en vehículos aéreos. Defecto: Deshabilitado (Requiere Modo: Selectivo) + Modo seletivo em aeronaves. Padrão: Desabilitado (Modo necessário: Seletivo) (Selective) Sea Vehicles @@ -164,6 +174,7 @@ (Выборочные) Водный транспорт (Seçilebilir) Deniz Araçları (Selectivo) Vehículos marítimos + (Seletivo) Veículos aquáticos Selective mode in Sea Vehicles. Default: Disabled (Requires Mode: Selective) @@ -179,6 +190,7 @@ Выборочные установки для водного транспорта. По умолчанию: Отключено (требуется режим: Выборочные) Deniz araçlarında iken seçilen görüş modu. Varsayılan: Etkin Değil Modo selectivo en vehículos marítimos. Defecto: Deshabilitado (Requiere Modo: Selectivo) + Modo seletivo em veículos aquáticos. Padrão: Desabilitado (Modo necessário: Seletivo) (Selective) UAVs @@ -194,6 +206,7 @@ (Выборочные) Беспиплотники (Seçilebilir) IHA'lar (Selectivo) VANTs + (Seletivo) VANTs Selective mode in UAVs. Default: Disabled (Requires Mode: Selective) @@ -209,6 +222,7 @@ Выборочные установки для беспилотников. По умолчанию: Отключено (требуется режим: Выборочные) IHA araçlarında iken seçilen görüş modu. Varsayılan: Etkin Değil Modo selectivo en VANTs. Defecto: Deshabilitado (Requiere Modo: Selectivo) + Modo seletivo em VANTs. Padrão: Desabilitado (Modo necessário: Seletivo) Disabled @@ -224,6 +238,7 @@ Отключено Devre Dışı Deshabilitado + Desabilitado Forced 1st Person @@ -238,6 +253,7 @@ От 1-го лица (принудительно) 1. Kişi Görüşüne Zorla Forzada 1º persona + Forçada 1ª pessoa Forced 3rd Person @@ -252,6 +268,7 @@ От 3-го лица (принудительно) 3. Kişi Görüşüne Zorla Forzada 3º persona + Forçada 3ª pessoa Selective @@ -267,6 +284,7 @@ Выборочный Seçilebilinir Selectivo + Seletivo Preserve view for vehicle types @@ -281,6 +299,7 @@ 차량 타입에 따른 시야 정보 저장 Preservar vista para los tipos de vehículos Conserver la vue pour les types de véhicules + Mantém o modo de visão por tipo de veículo Switch view on vehicle change to last used in this vehicle type (Requires Mode: Disabled) @@ -295,6 +314,7 @@ 해당 차량 타입에서 마지막으로 사용했던 시야로 설정하여 봅니다 (모드 - 사용 안함 필요) Cambiar vista en el cambio de vehículo hacia la última usada en ese tipo de vehículo (Requiere Modo: Deshabilitado) Lors d'un changement de véhicule, change la vue pour la dernière utilisée dans ce type de véhicule (Mod requis : désactivé). + Ao trocar de veículo, troca o modo de visão para aquele usado anteriormente no mesmo tipo de veículo (Modo necessário: Desabilitado) diff --git a/addons/volume/stringtable.xml b/addons/volume/stringtable.xml index feecb28b104..08aae728a1b 100644 --- a/addons/volume/stringtable.xml +++ b/addons/volume/stringtable.xml @@ -14,6 +14,7 @@ Głosność Ses Volumen + Volume Toggle Volume @@ -28,6 +29,7 @@ Przełącz Głosność Sesi Aç/Kapat Activar control de volumen + Alternar volume Toggle volume reduction. @@ -42,6 +44,7 @@ Przełącz redukcje głosności Ses azaltmayı aç / kapat. Activar reducción de volumen. + Alternar redução de volume Lowered volume @@ -56,6 +59,7 @@ Zmniejszona głosność Azaltılmış ses Volumen reducido + Volume reduzido Restored volume @@ -69,6 +73,7 @@ Громкость восстановлена Przywrócona głosność Volumen restaurado + Volume restaurado Reduction @@ -82,6 +87,7 @@ Уменьшение Redukcja Reducción + Redução Reduce volume by this percentage. @@ -95,6 +101,7 @@ Уменьшает громкость Zmniejsz głosność o tyle procent Reducir el volumen este porcentaje. + Reduzir o volume por esta porcentagem. Lower in vehicles @@ -109,6 +116,7 @@ Zmniejsz w pojazdach Araçlarda Daha Düşük Reducir en vehículos + Reduzir em veículos Automatically lower volume when inside vehicles. @@ -123,6 +131,7 @@ Automatycznie zmniejsz głosność będąc w pojeździe Araçlara binince sesi azalt. Reduce automáticamente el volumen dentro de vehículos. + Reduz automaticamente o volume dentro de veículos. Show notification @@ -137,6 +146,7 @@ Pokaż powiadomienie Bildirim Göster Mostrar notificación + Mostrar notificação Show notification when lowering/restoring volume. @@ -151,6 +161,7 @@ Pokaż powiadomienie zmniejszając/odnawiając głosność Ses azaltıldığın da bildirim göster. Mostrar notificación cuando se disminuye/restaura el volumen. + Mostrar notificação quando o volume for reduzido/restaurado Fade delay @@ -164,6 +175,7 @@ Задержка затухания Opoznienie wyciszenia Retardo en disminución gradual + Atraso de alteração gradual de volume Time it takes (in seconds) for the sound to fade in/out. @@ -177,6 +189,7 @@ Время (сек.) для затухания/восстановления звука. Ilość czasu (w sekundach) ile zajmuje wyciszenie/zgłośnienie dźwięku Tiempo que tarda (en segundos) para que se active o desactive la disminuación gradual del volumen + Tempo de atraso (em segundos) para que o volume do som sofra alteração gradual Reminder if lowered @@ -191,6 +204,7 @@ Przypomnij o zmniejszonej głosności dźwięku Eğer Düşükse Hatırlat Recordatorio s reducido + Lembrete de redução sonora Reminds you every minute if your volume is lowered. @@ -205,6 +219,7 @@ Przypomina co minuten o zmniejszonej głosności dźwięku Eğer ses düşükse her dakika hatırlatır. Te recuerda cada minuto si el volumen está siendo reducido. + Te notifica a cada minuto se o volume sonoro estiver reduzido. Volume still lowered @@ -219,6 +234,7 @@ Dźwięk jest nadal zmniejszony Ses hala düşük Volumen todavía reducido + Volume ainda está reduzido diff --git a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf index fd22bd44620..3a63e1097fa 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf @@ -28,8 +28,8 @@ if (currentWeapon _unit != _weapon) exitWith { }; // Unlock safety -if (_weapon in (_unit getVariable [QEGVAR(safemode,safedWeapons), []])) exitWith { - [_unit, _weapon, _weapon] call EFUNC(safemode,unlockSafety); +if ((["ace_safemode"] call EFUNC(common,isModLoaded)) && {[_unit, _weapon] call EFUNC(safemode,getWeaponSafety)}) exitWith { + [_unit, _weapon, false] call EFUNC(safemode,setWeaponSafety); }; private _modes = _weapon call EFUNC(common,getWeaponModes); diff --git a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf index 4ebea1f507c..6f54dfbba10 100644 --- a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf +++ b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf @@ -25,7 +25,6 @@ _args set [0, CBA_missionTime]; private _isWind = (vectorMagnitude wind > 0); - private _deleted = false; { _x params ["_bullet", "_airFriction"]; @@ -33,8 +32,7 @@ private _bulletSpeedSqr = vectorMagnitudeSqr _bulletVelocity; if ((!alive _bullet) || {(_bullet isKindOf "BulletBase") && {_bulletSpeedSqr < 10000}}) then { - GVAR(trackedBullets) set [_forEachIndex, objNull]; - _deleted = true; + GVAR(trackedBullets) deleteAt _forEachIndex; } else { if (_isWind) then { private _trueVelocity = _bulletVelocity vectorDiff wind; @@ -50,11 +48,7 @@ }; _bullet setVelocity _bulletVelocity; }; - } forEach GVAR(trackedBullets); - - if (_deleted) then { - GVAR(trackedBullets) = GVAR(trackedBullets) - [objNull]; - }; + } forEachReversed GVAR(trackedBullets); // END_COUNTER(pfeh); }, GVAR(simulationInterval), [CBA_missionTime]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/xm157/functions/fnc_ballistics_calculator.sqf b/addons/xm157/functions/fnc_ballistics_calculator.sqf index a39b09a7059..1bf6fb86ad7 100644 --- a/addons/xm157/functions/fnc_ballistics_calculator.sqf +++ b/addons/xm157/functions/fnc_ballistics_calculator.sqf @@ -48,7 +48,7 @@ private _gravity = [-sin (_bank) * cos(_scopeBaseAngle + _inclinationAngle) * -G private _useAB = missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]; if (_useAB) then { - _bc = parseNumber(("ace_advanced_ballistics" callExtension format["atmosphericCorrection:%1:%2:%3:%4:%5", _bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel])); + _bc = parseNumber (("ace" callExtension ["ballistics:atmospheric_correction", [_bc, _temperature, _barometricPressure, _relativeHumidity, _atmosphereModel]]) select 0); }; private _deltaT = 1 / 60; @@ -58,7 +58,7 @@ while {(_TOF < 5) && {(_bulletPos # 1) < _targetRange}} do { private _trueSpeed = vectorMagnitude _trueVelocity; private _bulletAccel = if (_useAB) then { - private _drag = parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3:%4", _dragModel, _bc, _trueSpeed, _temperature])); + private _drag = parseNumber (("ace" callExtension ["ballistics:retard", [_dragModel, _bc, _trueSpeed, _temperature]]) select 0); (vectorNormalized _trueVelocity) vectorMultiply (-1 * _drag); } else { _trueVelocity vectorMultiply (_trueSpeed * _airFriction); diff --git a/addons/xm157/functions/fnc_ballistics_getData.sqf b/addons/xm157/functions/fnc_ballistics_getData.sqf index 828db8e4ae2..f366216e49a 100644 --- a/addons/xm157/functions/fnc_ballistics_getData.sqf +++ b/addons/xm157/functions/fnc_ballistics_getData.sqf @@ -56,8 +56,7 @@ if ((_weaponInfo isEqualTo []) && {_magazineClass != ""}) then { }; // Scope Base Angle - private _zeroAngle = "ace_advanced_ballistics" callExtension format ["calcZero:%1:%2:%3:%4", _zeroRange, _muzzleVelocity, _airFriction, _boreHeight]; - private _scopeBaseAngle = parseNumber _zeroAngle; + private _scopeBaseAngle = parseNumber (("ace" callExtension ["ballistics:zero_vanilla", [_zeroRange, _muzzleVelocity, _airFriction, _boreHeight]]) select 0); _weaponInfo = [_scopeBaseAngle,_boreHeight,_airFriction,_muzzleVelocity,_bc,_dragModel,_atmosphereModel,_barrelTwist,_twistDirection,_caliber,_bulletLength,_bulletMass]; GVAR(data) set [_key, _weaponInfo]; diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index a6eaaac1589..7a285f2d6a8 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -2016,6 +2016,7 @@ 플레이어가 Esc 키로 관전자 인터페이스를 닫지 못하도록 강제로 관전자 인터페이스를 설정합니다. Erzwingt die Zuschauer-Ansicht und verhindert dass der Spieler sie mit der Esc-Taste schließen kann Forza l'interfaccia di spettatore, impedendo al giocatore di chiuderla con il tasto Esc + Force le mode spectateur en empêchant le joueur de la fermer avec la touche Echap. Hide player @@ -2024,6 +2025,7 @@ 플레이어 숨기기 Spieler ausblenden Nascondi giocatore + Cacher le joueur Hides the player by making them invisible, invulnerable, muted, and removing them from their group @@ -2032,6 +2034,7 @@ 플레이어를 투명, 무적, 음소거화하고 그룹에서 제거하여 숨깁니다. Blendet den Spieler aus, macht ihn unsichtbar, unverwundbar, stumm und entfernt ihn von seiner Gruppe Nasconde il giocatore, rendendolo invisibile, invulnerabile, muto e lo rimuove dal proprio gruppo + Cache le joueur en le rendant invisible, invulnérable, muet et en le retirant de son groupe. Sets the sides that are available to spectate @@ -2040,6 +2043,7 @@ 관전 가능한 진영을 설정합니다. Bestimmt die Seiten denen man zuschauen kann Imposta le fazioni che lo spettatore può osservare + Définit les côtés disponibles pour le mode spectateur White Hot @@ -2048,6 +2052,7 @@ 백색 열원 Weiß-Schwarz Bianco-caldo + Blanc-noir Black Hot @@ -2056,6 +2061,7 @@ 흑색 열원 Schwarz-Weiß Nero-caldo + Noir et blanc Toggle All @@ -2064,6 +2070,7 @@ 전부 토글 Alle wechseln Cambia tutti + Tout afficher diff --git a/docs/Gemfile b/docs/Gemfile index 053c27dc351..486c7aac0fb 100644 --- a/docs/Gemfile +++ b/docs/Gemfile @@ -1,2 +1,4 @@ source 'https://rubygems.org' gem 'github-pages' +gem 'tzinfo-data' +gem 'webrick' diff --git a/docs/tools/document_functions.py b/docs/tools/document_functions.py index dab567d2088..7ed20eade3a 100644 --- a/docs/tools/document_functions.py +++ b/docs/tools/document_functions.py @@ -339,6 +339,8 @@ def document_functions(addons_dir, components): return errors +def getFunctionPath(func): + return func.path.casefold() def crawl_dir(addons_dir, directory, debug=False, lint_private=False): components = {} @@ -360,7 +362,11 @@ def crawl_dir(addons_dir, directory, debug=False, lint_private=False): if function.is_public() and not debug: # Add functions to component key (initalise key if necessary) component = os.path.basename(os.path.dirname(root)) - components.setdefault(component, []).append(function) + + # Sort functions alphabetically + functions = components.setdefault(component, []) + functions.append(function) + functions.sort(key=getFunctionPath) function.feedback("Publicly documented") else: diff --git a/docs/wiki/development/ace3-config-entries.md b/docs/wiki/development/ace3-config-entries.md index 9e656ad48c9..8ff22438a10 100644 --- a/docs/wiki/development/ace3-config-entries.md +++ b/docs/wiki/development/ace3-config-entries.md @@ -13,29 +13,78 @@ Entries found in the `CfgVehicles.hpp` files ```cpp -ace_nightvision_grain -ace_nightvision_blur -ace_recoil_enablecamshake -ace_dragging_cancarry -ace_dragging_carryposition -ace_dragging_carrydirection -ace_dragging_candrag -ace_dragging_dragposition -ace_dragging_dragdirection +ace_artillerytables_showGunLaying +ace_cargo_canLoad +ace_cargo_hasCargo +ace_cargo_loadmasterTurrets +ace_cargo_noRename +ace_cargo_size +ace_cargo_space +ace_casings_model +ace_cookoff_canHaveFireJet +ace_cookoff_cookoffSelections +ace_dragging_canCarry +ace_dragging_canDrag +ace_dragging_carryPosition +ace_dragging_carryDirection +ace_dragging_dragPosition +ace_dragging_dragDirection ace_fastroping_enabled -ace_fastroping_friesType ace_fastroping_friesAttachmentPoint +ace_fastroping_friesType ace_fastroping_onCut ace_fastroping_onPrepare ace_fastroping_ropeOrigins -ace_gforcecoef -ace_offset -ace_hasReserveParachute -ace_reserveParachute +ace_fcs_distanceInterval +ace_fcs_enabled +ace_fcs_maxDistance +ace_fcs_minDistance +ace_hunterkiller +ace_intelitems_magazine +ace_interaction_canPush +ace_interaction_bodyLength +ace_interaction_bodyWidth +ace_interaction_replaceTerrainObject +ace_logitics_wirecutter_isFence +ace_medical_treatment_patientSeats +ace_minedetector_detectable +ace_parachute_failureDelay +ace_rearm_defaultSupply +ace_refuel_canReceive ace_refuel_flowRate ace_refuel_fuelCapacity ace_refuel_fuelCargo ace_refuel_hooks +ace_repair_hitpointPositions +ace_tagging_canTag +ace_trenches_diggingDuration +ace_trenches_grassCuttingPoints +ace_trenches_noGeoClass +ace_trenches_placementData +ace_trenches_removalDuration +ace_vehicle_damage_canHaveFireRing +ace_vehicle_damage_detonationDuringFireProb +ace_vehicle_damage_engineDetonationProb +ace_vehicle_damage_engineFireProb +ace_vehicle_damage_eraHitpoints +ace_vehicle_damage_hullDetonationProb +ace_vehicle_damage_hullFireProb +ace_vehicle_damage_slatHitpoints +ace_vehicle_damage_turretDetonationProb +ace_vehicle_damage_turretFireProb +ace_vehicles_engineStartDelay + +acex_field_rations_offset +acex_field_rations_waterSupply +acex_sitting_canSit +acex_sitting_interactPosition +acex_sitting_sitDirection +acex_sitting_sitPosition + +ACE_Attachable +ACE_GForceCoef +ace_hasReserveParachute +ace_reserveParachute ``` @@ -140,7 +189,6 @@ ace_isbelt ace_attachable ace_placeable ace_setupobject -ace_delaytime ace_triggers ace_magazines_forcemagazinemuzzlevelocity ``` diff --git a/docs/wiki/development/arma-3-issues.md b/docs/wiki/development/arma-3-issues.md index 506bfde2221..379fb7d5bbc 100644 --- a/docs/wiki/development/arma-3-issues.md +++ b/docs/wiki/development/arma-3-issues.md @@ -14,7 +14,6 @@ Keeping track of Arma 3 issues that need to be fixed. - [bux578: T79355: MineDetector equipable in Launcher slot](https://feedback.bistudio.com/T79355) - [bux578: T79534: Zeus / Curator Add Remote Controlled Event](https://feedback.bistudio.com/T79534) -- [bux578: T79827: Add script commands "addPrimaryWeaponMagazine" and "addSecondaryWeaponMagazine"](https://feedback.bistudio.com/T79827) - [bux578: T80358: Add/Alter script command to add perfectly configured weapons to cargo](https://feedback.bistudio.com/T80358) - [commy2: T79801: Unexpected behavior of += array in configs](https://feedback.bistudio.com/T79801) - [commy2: T81029: setVariable is not always JIP persistent](https://feedback.bistudio.com/T81029) @@ -23,11 +22,12 @@ Keeping track of Arma 3 issues that need to be fixed. - [Jaynus: T82046: Display event handler return values for mouse buttons should be respected](https://feedback.bistudio.com/T82046) - [Heisenberg: T82108: Switching between optic modes of a sniper scope (AMS, DMS, MOS) will result in a blurred vision](https://feedback.bistudio.com/T82108) - [BaerMitUmlaut: T120030: Particles do not render properly since 1.62](https://feedback.bistudio.com/T120030) -- [Killzone_Kid: T79689: magazineTurretAmmo and setMagazineTurretAmmo do not function as expected if there are multiple magazines of the same type](https://feedback.bistudio.com/T79689) -- [nekoarrow: T122981: setMagazineTurretAmmo locality issue](https://feedback.bistudio.com/T122981) **Resolved:** - [Nou: T79119: Memory points rfemur, lfemur, and other leg memory points returned incorrectly with SQF command selectionPosition](https://feedback.bistudio.com/T79119) - [commy2: T81503: isLightOn doesn't recognize destroyed light bulbs for streetlamps](https://feedback.bistudio.com/T81503) - [commy2: T83771: splitString scripting command causes game crash](https://feedback.bistudio.com/T83771) +- [bux578: T79827: Add script commands "addPrimaryWeaponMagazine" and "addSecondaryWeaponMagazine"](https://feedback.bistudio.com/T79827) +- [Killzone_Kid: T79689: magazineTurretAmmo and setMagazineTurretAmmo do not function as expected if there are multiple magazines of the same type](https://feedback.bistudio.com/T79689) +- [nekoarrow: T122981: setMagazineTurretAmmo locality issue?](https://feedback.bistudio.com/T122981) diff --git a/docs/wiki/development/dependencies.md b/docs/wiki/development/dependencies.md index b43371034c5..c6d0f87d63d 100644 --- a/docs/wiki/development/dependencies.md +++ b/docs/wiki/development/dependencies.md @@ -21,16 +21,18 @@ Because `ace_zeus` is being removed you must also remove any components that req ## 2. Dependencies -{% assign pages_by_title = site.pages | sort: "title" %} +{% assign pages_by_title = site.pages | sort_natural: "title" %} {% for page in pages_by_title %} {%- if page.group == 'feature' and page.component -%} - ### {{ page.title }} - - {% capture component %}{{ page.component }}{% endcapture %} - {% include dependencies_list.md component=component %} - - {%- if page.core_component -%} - _Note: This module is required by nearly all other modules. Do NOT remove it!_ - {% endif %} + {%- unless page.version.removed -%} + ### {{ page.title }} + + {% capture component %}{{ page.component }}{% endcapture %} + {% include dependencies_list.md component=component %} + + {%- if page.core_component -%} + _Note: This module is required by nearly all other modules. Do NOT remove it!_ + {% endif %} + {% endunless %} {% endif %} {% endfor %} diff --git a/docs/wiki/development/extension-guidelines.md b/docs/wiki/development/extension-guidelines.md index d7f4fe08a67..36178d86f54 100644 --- a/docs/wiki/development/extension-guidelines.md +++ b/docs/wiki/development/extension-guidelines.md @@ -7,87 +7,59 @@ parent: wiki order: 9 --- -## 1. Basics +## 1. Setup ### 1.1 Requirements -- A compiler (VS/GCC/Clang) - - If starting with Visual Studio, you need to make sure to use the Visual studio command prompt -- cmake 3.0 or later in your path +- [Rust](https://rustup.rs/) +- [cargo-make](https://crates.io/crates/cargo-make) +`cargo install --no-default-features --force cargo-make` -### 1.2 Cross-Platform Guidelines +### 1.2 Recomendations -### 1.3 C++ basic style and naming guide +- [VSCode](https://code.visualstudio.com/) +- [Rust Analyzer](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer) +- [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb) -### 1.4 ace_common cpp library +### 1.3 Rust Resources ---- +- [Learn Rust](https://www.rust-lang.org/learn) -## 2 Building Extensions on Windows +--- -### 2.1 Compiling +## 2 Development -#### 2.1.1 Windows - Creating a Visual Studio Project -1. Open your compiling command prompt (which has cmake and your compiler) -2. From this directory, you need to use cmake to build the appropriate build files. Change the -G property appropriately. run cmake --help to get a list of the options. +### 2.1 Code Standards -``` -cd extensions\build -cmake .. -G "Visual Studio 15 2017 Win64" -``` +1. [Rust API Guidelines for naming](https://rust-lang.github.io/api-guidelines/naming.html) should be followed +2. All code should be formatted with `cargo fmt` +3. All code should be free from errors and warnings +4. Tests should be written where applicable -A Visual studio project file will now be generated in your build directory. +### 2.2 Local Development -#### 2.1.2 Windows - Visual Studio - Compile only (nmake) -1. Open your compiling command prompt (which has cmake and your compiler) -2. From this directory, you need to use cmake to build the appropriate build files. Change the -G property appropriately. run cmake --help to get a list of the options. - -``` -cd extensions\build -cmake .. -G "NMake Makefiles" -nmake -``` +Running `cargo make debug` will compile the project for x32 and x64 and move the built libraries to `ace.dll` and `ace_x64.dll`. -The extensions will not be built in its appropriate project folder, for example: +The library can be debugged with the following `.vscode/launch.json` file. Replace all sections in `{}` with the appropriate path. +```json +{ + "version": "0.2.0", + "configurations": [ + { + "type": "lldb", + "request": "launch", + "name": "Debug", + "program": "{Path to Arma}\\arma3_x64.exe", + "args": ["-mod=\"{Path to CBA};{Path to ACE development folder}\""], + "cwd": "{Path to Arma}" + } + ] +} ``` -extensions\ - build\ - fcs\ace_fcs.dll - somethingElse\ace_somethingElse.dll -``` - -### 2.2 Creating a new Extension - -#### 2.2.1 Arma Config - -ACE3 loads extensions defined in `ACE_Extensions` root config class and supports the following entries: -```cpp -// Platform -windows = 1; // Load on Windows -linux = 1; // Load on Linux +Use the `Run and Debug` tab in VSCode to launch Arma, or Press `F5`. -// Type -client = 1; // Load on Client -server = 1; // Load on Server -``` - -```cpp -class ACE_Extensions { - // Windows Client only extension - class tag_extension { - windows = 1; - client = 1; - }; - - // Any platform Server extension - class tag_extension2 { - windows = 1; - linux = 1; - server = 1; - }; -}; -``` +### 2.3 Release -Combining platform and client/server values is possible to get all combinations currently supported by the game and more. +Release versions can be built using `cargo make release`. diff --git a/docs/wiki/development/setting-up-the-development-environment.md b/docs/wiki/development/setting-up-the-development-environment.md index e2c94430395..822da19fa40 100644 --- a/docs/wiki/development/setting-up-the-development-environment.md +++ b/docs/wiki/development/setting-up-the-development-environment.md @@ -139,7 +139,7 @@ Different `make.py` command line options include: - `increment_patch` - increments _patch_ version number (ignored with `increment_minor` or `increment_major`) - `increment_minor` - increments _minor_ version number and resets _patch_ version number to `0` (ignored with `increment_major`) - `increment_major` - increments _major_ version number and resets _minor_ and _patch_ version numbers to `0` -- `force` - force rebuild all PBOs, even those already present in the `release` directory (combined with `compile` it will also rebuild all extensions) +- `force` - force rebuild all PBOs, even those already present in the `release` directory - `checkexternal` - check external references (incompatible only with ` ` and `force `) - `release` - create release packages/archives - ` ` - build only specified component(s) (incompatible with `release`) diff --git a/docs/wiki/feature/artillerytables.md b/docs/wiki/feature/artillerytables.md new file mode 100644 index 00000000000..4bdfb5c5d53 --- /dev/null +++ b/docs/wiki/feature/artillerytables.md @@ -0,0 +1,30 @@ +--- +layout: wiki +title: Artillery Tables +component: artillerytables +description: Adds universal rangetables for artillery. +group: feature +category: equipment +parent: wiki +mod: ace +version: + major: 3 + minor: 13 + patch: 0 +--- + +## 1. Overview + +### 1.1 Features +- Adds a rangetable to accurately take out your target without the artillery computer. +- Shows accurate elevation and azimuth. +- Optionally adds wind deflection and air friction for shells. +- Optionally disables artillery computers. + +## 2. Usage + +### 2.1 Opening a rangetable +- Enter a piece of artillery. +- Use Self Interact Ctrl+⊞ Win (ACE3 default). +- Select `Equipment`. +- Select the rangetable of the piece of artillery you are in. diff --git a/docs/wiki/feature/cargo.md b/docs/wiki/feature/cargo.md new file mode 100644 index 00000000000..304ba709445 --- /dev/null +++ b/docs/wiki/feature/cargo.md @@ -0,0 +1,41 @@ +--- +layout: wiki +title: Cargo +component: cargo +description: Adds the ability to transport cargo using vehicles. +group: feature +category: interaction +parent: wiki +mod: ace +version: + major: 3 + minor: 3 + patch: 0 +--- + +## 1. Overview +Adds the ability to load and unload cargo from vehicles. Unloading can happen via two methods: Regular unloading and deploying, where you can preplace the item before it's unloaded. + +## 2. Usage + +### 2.1 Loading an object +- Interact with the object to be loaded ⊞ win. +- Select the `Load` option. +- Select which vehicle you want to load the object in. +- Wait for the progress bar to finish. To cancel loading, press Escape. + +### 2.2 Checking a vehicle's cargo +- Interact with the vehicle whose cargo is to b e checked ⊞ win. +- Select the `Cargo` option. + +### 2.3 Unloading an object from a vehicle +- Open the vehicle's cargo menu (see "Checking a vehicle's cargo") +- Press `Unload`. +- Wait for the progress bar to finish. To cancel unloading, press Escape. + +### 2.4 Deploying an object from a vehicle +- Open the vehicle's cargo menu (see "Checking a vehicle's cargo") +- Press `Deploy`. +- Use the mouse to fine tune the placement of the object. +- When ready to place, press left click to start deploying the object. +- Wait for the progress bar to finish. To cancel deploying, press Escape. diff --git a/docs/wiki/feature/casings.md b/docs/wiki/feature/casings.md new file mode 100644 index 00000000000..8bcf24a6969 --- /dev/null +++ b/docs/wiki/feature/casings.md @@ -0,0 +1,17 @@ +--- +layout: wiki +title: Casings +component: casings +description: Adds infantry bullet casings on the ground when weapons are fired. +group: feature +category: realism +parent: wiki +mod: ace +version: + major: 3 + minor: 15 + patch: 0 +--- + +## 1. Overview +Spits out casings from infantry weapons when fired. diff --git a/docs/wiki/feature/cookoff.md b/docs/wiki/feature/cookoff.md new file mode 100644 index 00000000000..19a32893882 --- /dev/null +++ b/docs/wiki/feature/cookoff.md @@ -0,0 +1,22 @@ +--- +layout: wiki +title: Cook-off +component: cookoff +description: Adds cook-off effects to vehicles and ammunition boxes that have had their ammunition detonated or that have been destroyed. +group: feature +category: realism +parent: wiki +mod: ace +version: + major: 3 + minor: 7 + patch: 0 +--- + +## 1. Overview + +### 1.1 Features +- Adds engine fires when a vehicle's engine is damaged heavily. +- Optionally adds fire if a vehicle suffers ammunition detonations (requires `Vehicle Damage` to be enabled). +- Optionally adds ammunition detonation if a vehicle is destroyed. +- Optionally adds ammunition detonation if an ammunition box is destroyed or hit with explosive, incendiary or tracer ammunition. diff --git a/docs/wiki/feature/dogtags.md b/docs/wiki/feature/dogtags.md new file mode 100644 index 00000000000..9f1d27e371d --- /dev/null +++ b/docs/wiki/feature/dogtags.md @@ -0,0 +1,40 @@ +--- +layout: wiki +title: Dog Tags +component: dogtags +description: Adds dog tags to units. +group: feature +category: realism +parent: wiki +mod: ace +version: + major: 3 + minor: 7 + patch: 0 +--- + +## 1. Overview +Provides dog tags to units, which include name, social security number and blood type as information. + +## 2. Usage + +### 2.1 Checking a unit's dog tags +- Interact with the unconscious or dead unit whose dog tags are to be checked ⊞ win. +- Select the `Dog Tag` option. +- Select the `Check` option. + +### 2.2 Taking a unit's dog tags +- Interact with the unconscious or dead unit whose dog tags are to be checked ⊞ win. +- Select the `Dog Tag` option. +- Select the `Take` option. +- If the one of the two dog tags has already been taken, it will inform you and not give you the 2nd dog tag + +### 2.3 Checking what dog tags you have via self-interaction +- Use Self Interact Ctrl+⊞ Win (ACE3 default). +- Select the `Equipment` option. +- Select the `Check Dog Tag` option. + +### 2.4 Checking what dog tags you have via context menu +- Open your inventory and find the dog tag you want to inspect. +- Double click the item. +- Click `Check Dog Tag`. diff --git a/docs/wiki/feature/field-rations.md b/docs/wiki/feature/field-rations.md new file mode 100644 index 00000000000..63daad99631 --- /dev/null +++ b/docs/wiki/feature/field-rations.md @@ -0,0 +1,30 @@ +--- +layout: wiki +title: Field Rations +component: field_rations +description: Adds a thirst and hunger system, along with food to replenish those. +group: feature +category: realism +parent: wiki +mod: acex +version: + major: 3 + minor: 4 + patch: 0 +--- + +## 1. Overview +Simulates hunger and thirst which need to be replenished. This system is affected by other modules, such as weather and medical, and can in turn affect fatigue. + +## 2. Usage + +### 2.1 Satiate hunger/Quench thirst via self-interaction +- Pick up a drink. +- Use Self Interact Ctrl+⊞ Win (ACE3 default). +- Select the `Survival` option. +- Choose an item to consume. + +### 2.2 Satiate hunger/Quench thirst via context menu +- Open your inventory and find the item you want to consume. +- Double click the item. +- Click `Eat/Drink`. diff --git a/docs/wiki/feature/fieldmanual.md b/docs/wiki/feature/fieldmanual.md new file mode 100644 index 00000000000..bf6af86fe24 --- /dev/null +++ b/docs/wiki/feature/fieldmanual.md @@ -0,0 +1,23 @@ +--- +layout: wiki +title: Field Manual +component: fieldmanual +description: Adds ACE3 content to the field manual. +group: feature +category: general +parent: wiki +mod: ace +version: + major: 3 + minor: 16 + patch: 0 +--- + +## 1. Overview +Provides information on items and mechanics that ACE3 adds. + +## 2. Usage + +### 2.1 Opening the field manual +- Press Escape. +- Press `Field Manual`. diff --git a/docs/wiki/feature/gestures.md b/docs/wiki/feature/gestures.md new file mode 100644 index 00000000000..30be084be38 --- /dev/null +++ b/docs/wiki/feature/gestures.md @@ -0,0 +1,32 @@ +--- +layout: wiki +title: Gestures +component: gestures +description: Adds gestures that can be used for communication. +group: feature +category: interaction +parent: wiki +mod: ace +version: + major: 3 + minor: 4 + patch: 0 +--- + +## 1. Overview +Adds the ability to use 14 gestures for communication. + +## 2. Usage + +### 2.1 Using gestures via self-interaction + +- Use Self Interact Ctrl+⊞ Win (ACE3 default). +- Select the `Gestures` option. + +### 2.2 Rebinding keybinds for gestures + +- Press Escape. +- Select `Options`. +- Select `Controls`. +- Select `Configure Addons`. +- Select `ACE Gestures`. diff --git a/docs/wiki/feature/gunbag.md b/docs/wiki/feature/gunbag.md new file mode 100644 index 00000000000..35e2dd5e59a --- /dev/null +++ b/docs/wiki/feature/gunbag.md @@ -0,0 +1,32 @@ +--- +layout: wiki +title: Gun Bag +component: gunbag +description: Adds a gun bag that can be used to store a weapon. +group: feature +category: equipment +parent: wiki +mod: ace +version: + major: 3 + minor: 6 + patch: 0 +--- + +## 1. Overview +Adds easy handling and storage of an additional weapon in a backpack. + +## 2. Usage + +### 2.1 Interacting with your gun bag via self-interaction +- Use Self Interact Ctrl+⊞ Win (ACE3 default). +- Select the `Equipment` option. +- Select the `Gunbag` option. + +### 2.2 Interacting with your gun bag via the ACE arsenal +- Open an ACE arsenal. +- Get yourself a gun bag if you don't have one already. +- Select the primary weapon or backpack tab to interact with weapon. + +### 2.3 Interacting with another unit's gun bag +- Interact with the unit ⊞ win. diff --git a/docs/wiki/feature/index.md b/docs/wiki/feature/index.md index 41fd0fdeea6..1c7039dfd29 100644 --- a/docs/wiki/feature/index.md +++ b/docs/wiki/feature/index.md @@ -19,7 +19,7 @@ redirect_from: "/wiki/featurex"

General