diff --git a/.gitattributes b/.gitattributes index 3c59efe684..2462fa3c3b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,3 +2,13 @@ *.png binary *.jpg binary *.paa binary + +# Change GitHub language categorization +addons/**/*.cpp linguist-language=SQF +addons/**/*.hpp linguist-language=SQF + +optionals/**/*.cpp linguist-language=SQF +optionals/**/*.hpp linguist-language=SQF + +# Do not count hemtt includes in language usage stats +include/* linguist-vendored diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 0ed30391a5..2dd93748a3 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,23 +4,37 @@ about: Create a report to help us improve title: '' labels: kind/bug assignees: '' - --- + + **Mods (complete and add to the following information):** - **Arma 3:** `x.xx` [e.g. 1.00 stable, rc, dev] - **CBA:** `3.x.x` [e.g. 3.0.0 stable, commit hash] - **ACE3:** `3.x.x` [eg. 3.0.0 stable, commit hash] -_Make sure to reproduce the issue with only CBA and ACE3 on a newly created mission!_ + **Description:** A clear and concise description of what the bug is. **Steps to reproduce:** -- _Follow [https://ace3mod.com/img/wiki/user/issue_flowchart.png](this flowchart)!_ -- Go to ... -- Click ... -- See ... +_Follow [https://ace3mod.com/img/wiki/user/issue_flowchart.png](this flowchart)!_ + +1. _Go to ..._ +2. _Click ..._ +3. _See ..._ **Expected behavior:** A clear and concise description of what you expected to happen. diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index dbcdbfec52..e6b87a25ee 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -27,6 +27,7 @@ categories: exclude-labels: - 'ignore changelog' + - 'dependencies' change-template: '- $TITLE (#$NUMBER)' template: | diff --git a/.github/workflows/extensions.yml b/.github/workflows/extensions.yml index 65f0a29eb9..06e4737e80 100644 --- a/.github/workflows/extensions.yml +++ b/.github/workflows/extensions.yml @@ -3,11 +3,7 @@ name: Extensions on: pull_request: paths: - - 'extensions/*' - - 'extensions/*/*' - - 'extensions/*/*/*' - - 'extensions/*/*/*/*' - - 'extensions/*/*/*/*/*' + - 'extensions/**' jobs: build: @@ -22,7 +18,9 @@ jobs: - name: Build shell: cmd run: | - cd extensions/build + cd extensions + mkdir build + cd build cmake .. && cmake --build . - name: Upload Artifact uses: actions/upload-artifact@master diff --git a/.github/workflows/pboproject.yml b/.github/workflows/pboproject.yml new file mode 100644 index 0000000000..4aea0e7c18 --- /dev/null +++ b/.github/workflows/pboproject.yml @@ -0,0 +1,82 @@ +name: pboProject + +on: + push: + branches: + - master + pull_request_target: + +jobs: + pboproject: + runs-on: windows-2019 + steps: + - name: Install Arma 3 Tools + uses: arma-actions/arma3-tools@master + with: + toolsUrl: ${{ secrets.ARMA3_TOOLS_URL }} + - name: Install Mikero Tools + uses: arma-actions/mikero-tools@2021-04-10 + - name: Download game data + run: | + Invoke-WebRequest "$env:ARMA3_DATA_URL" -OutFile arma3.zip + Invoke-WebRequest "$env:RHSAFRF_URL" -OutFile rhsafrf.zip + Invoke-WebRequest "$env:RHSGREF_URL" -OutFile rhsgref.zip + Invoke-WebRequest "$env:RHSSAF_URL" -OutFile rhssaf.zip + Invoke-WebRequest "$env:RHSUSF_URL" -OutFile rhsusf.zip + $files = @("arma3.zip", "rhsafrf.zip", "rhsgref.zip", "rhssaf.zip", "rhsusf.zip") + ForEach ($file in $files) { + Extract-7Zip -Path $file -DestinationPath . + Remove-Item $file + } + env: + ARMA3_DATA_URL: ${{ secrets.ARMA3_DATA_URL }} + RHSAFRF_URL: ${{ secrets.RHSAFRF_URL }} + RHSGREF_URL: ${{ secrets.RHSGREF_URL }} + RHSSAF_URL: ${{ secrets.RHSSAF_URL }} + RHSUSF_URL: ${{ secrets.RHSUSF_URL }} + - name: Checkout CBA A3 + uses: actions/checkout@v2 + with: + path: x\cba + ref: master + repository: CBATeam/CBA_A3.git + - name: Checkout ACE3 + uses: actions/checkout@v2 + with: + path: z\ace + persist-credentials: false + - name: Checkout pull request + uses: actions/checkout@v2 + if: ${{ github.event_name == 'pull_request_target' }} + with: + path: pullrequest + ref: 'refs/pull/${{ github.event.number }}/merge' + - name: Replace addons with pull request addons + if: ${{ github.event_name == 'pull_request_target' }} + run: | + rm -r z\ace\addons\ + rm -r z\ace\optionals\ + xcopy /e /h /q pullrequest\addons z\ace\addons\ + xcopy /e /h /q pullrequest\optionals z\ace\optionals\ + - name: Setup build environment + run: | + subst P: . + pboproject -P + xcopy /e /h /q z\ace\tools\pDummies\A3\ui_f_enoch a3\ui_f_enoch\ + xcopy /e /h /q z\ace\tools\pDummies\gm gm\ + xcopy /e /h /q z\ace\tools\pDummies\vn vn\ + - name: Build + run: py P:\z\ace\tools\make.py ci + env: + PYTHONUNBUFFERED: 1 + - name: Archive logs + uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + name: logs + path: temp/*.log + - name: Archive @ace + uses: actions/upload-artifact@v2 + with: + name: '@ace3-${{ github.sha }}' + path: z\ace\release\@ace diff --git a/.gitignore b/.gitignore index a8f6a13221..93f758c4cd 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ *.zip release/* releases/* +extensions/vcproj32/* +extensions/vcproj64/* +.vscode/* hemtt hemtt.exe tools/temp @@ -13,3 +16,6 @@ texHeaders.bin *.biprivatekey Thumbs.db CHANGELOG.md +sqfvm.exe +ArmaScriptCompiler.exe +*.sqfc diff --git a/AUTHORS.txt b/AUTHORS.txt index 78f4287014..3b3c7a669c 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -9,6 +9,7 @@ Brandon (TCVM) bux578 commy2 +Dahlgren esteldunedain Felix Wiegand Garth "L-H" de Wet @@ -30,9 +31,10 @@ VKing Walter Pearce # CONTRIBUTORS -[BIG]Bull +10Dozen a.k.a Dusin 11RDP-LoupVert 654wak654 +[BIG]Bull ACCtomeek adam3adam Adanteh @@ -43,9 +45,10 @@ Aleksey EpMAK Yermakov Alganthe Andrea "AtixNeon" Verano Anthariel -Arcanum417 Anton +Arcanum417 Arkhir +ARV187 aka Spark23 Asgar Serran BaerMitUmlaut Bamse @@ -54,25 +57,28 @@ Bla1337 BlackPixxel BlackQwar Brakoviejo +Brett Mayson Brisse Brostrom.A | Evul BullHorn +C0kkie chris579 classicarma Clon1998 Codingboy Coren Crusty -C0kkie +dabako dgibso29 Dharma Bellamkonda Dimaslg diwako dixon13 +Drift_91 Drill -Dudakov aka [OMCB]Kaban Drofseh Dslyecxi +Dudakov aka [OMCB]Kaban Eclipser Elgin675 ElTyranos @@ -87,7 +93,9 @@ FFAAMOD Filip Basara fr89k Fragment +Frank FreeZbe +Fyuran geraldbolso1899 Ghost Gianmarco Varriale (TeamNuke) @@ -102,7 +110,9 @@ havena Hawkins Head Hybrid V +JasperRab john681611 +JoramD Karneck Kavinsky Keithen @@ -128,8 +138,8 @@ Orbis2358 oscarmolinadev Panisher (Tushino Serious Games) PaxJaromeMalues -PiZZADOX <509thParachuteInfantry@gmail.com> Phyma +PiZZADOX <509thParachuteInfantry@gmail.com> pokertour Professor Pterolatypus @@ -156,11 +166,13 @@ Toaster Tonic Tourorist Tuupertunut +TyroneMF Valentin Torikian voiper VyMajoris(W-Cephei) +Walthzer Winter +wizpig64 xrufix Zakant zGuba -Fyuran diff --git a/README.md b/README.md index 90a469dc27..6d8d5aebae 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Issues @@ -76,7 +76,7 @@ The mod is **built modularly**, so almost any included PBO can be easily removed ## Getting started -ACE3 requires Arma 3 and the latest version of CBA A3. See the following pages for help and information on how to get started with ACE3: +ACE3 requires Arma 3 and the latest version of CBA A3. See the following pages for help and information on how to get started with ACE3: - [Installation guide](https://ace3mod.com/wiki/user/installation-guide.html) - [Information center](https://ace3mod.com/wiki/user/information-center.html) @@ -87,7 +87,7 @@ You can help out with the ongoing development by looking for potential bugs in o ### Contribution guidelines -To contribute something to ACE3, simply fork this repository and submit your pull requests for review by other collaborators. Remember to add yourself to the author array of any PBO you will be editing and the [`AUTHORS.txt`](https://github.com/acemod/ACE3/blob/master/AUTHORS.txt) file; including a valid email address. +To contribute something to ACE3, simply fork this repository and submit your pull requests for review by other collaborators. See [the pull request guidelines](https://ace3mod.com/wiki/development/merging-pull-requests.html) for further information on this process. ### Submitting issues and requesting features @@ -121,7 +121,7 @@ To help us test the latest development changes, download our master branch ([dir Bohemia Forum We have a dedicated thread on the Bohemia Forums for the ACE3 project - + ## License diff --git a/ace_parse_imagepath.dll b/ace_parse_imagepath.dll deleted file mode 100644 index f252410bcd..0000000000 Binary files a/ace_parse_imagepath.dll and /dev/null differ diff --git a/ace_parse_imagepath_x64.dll b/ace_parse_imagepath_x64.dll deleted file mode 100644 index 8d154117c5..0000000000 Binary files a/ace_parse_imagepath_x64.dll and /dev/null differ diff --git a/addons/advanced_ballistics/ACE_Settings.hpp b/addons/advanced_ballistics/ACE_Settings.hpp index c25592eb5d..d90a4e748f 100644 --- a/addons/advanced_ballistics/ACE_Settings.hpp +++ b/addons/advanced_ballistics/ACE_Settings.hpp @@ -1,45 +1,20 @@ class ACE_Settings { class GVAR(enabled) { - category = CSTRING(DisplayName); - displayName = CSTRING(enabled_DisplayName); - description = CSTRING(enabled_Description); - typeName = "BOOL"; - value = 0; + movedToSQF = 1; }; class GVAR(muzzleVelocityVariationEnabled) { - category = CSTRING(DisplayName); - displayName = CSTRING(muzzleVelocityVariationEnabled_DisplayName); - description = CSTRING(muzzleVelocityVariationEnabled_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(ammoTemperatureEnabled) { - category = CSTRING(DisplayName); - displayName = CSTRING(ammoTemperatureEnabled_DisplayName); - description = CSTRING(ammoTemperatureEnabled_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(barrelLengthInfluenceEnabled) { - category = CSTRING(DisplayName); - displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName); - description = CSTRING(barrelLengthInfluenceEnabled_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(bulletTraceEnabled) { - category = CSTRING(DisplayName); - displayName = CSTRING(bulletTraceEnabled_DisplayName); - description = CSTRING(bulletTraceEnabled_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(simulationInterval) { - category = CSTRING(DisplayName); - displayName = CSTRING(simulationInterval_DisplayName); - description = CSTRING(simulationInterval_Description); - typeName = "SCALAR"; - value = 0.05; - sliderSettings[] = {0, 0.2, 0.05, 2}; + movedToSQF = 1; }; }; diff --git a/addons/advanced_ballistics/CfgEventHandlers.hpp b/addons/advanced_ballistics/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/advanced_ballistics/CfgEventHandlers.hpp +++ b/addons/advanced_ballistics/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/advanced_ballistics/README.md b/addons/advanced_ballistics/README.md index 122769b191..ebd377bab6 100644 --- a/addons/advanced_ballistics/README.md +++ b/addons/advanced_ballistics/README.md @@ -2,10 +2,3 @@ ace_advanced_ballistics =============== The Advanced Ballistics module introduces advanced external- and internal ballistics to the game. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/advanced_ballistics/RscTitles.hpp b/addons/advanced_ballistics/RscTitles.hpp index 6deaf0a058..1e29db268b 100644 --- a/addons/advanced_ballistics/RscTitles.hpp +++ b/addons/advanced_ballistics/RscTitles.hpp @@ -47,7 +47,7 @@ class RscTitles { sizeEx=0.027; text=""; }; - class RscProtractorMarker : RscProtractorBase { + class RscProtractorMarker: RscProtractorBase { idc=132951; }; }; diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index bef679cd15..43299a0e38 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -11,7 +11,7 @@ GVAR(currentGrid) = 0; if (!hasInterface) exitWith {}; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { //If not enabled, dont't add PFEH if (!GVAR(enabled)) exitWith {}; diff --git a/addons/advanced_ballistics/XEH_preInit.sqf b/addons/advanced_ballistics/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/advanced_ballistics/XEH_preInit.sqf +++ b/addons/advanced_ballistics/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf index 13b4692452..845045e1cb 100644 --- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf @@ -60,8 +60,8 @@ private _barrelLengthTable = getArray(_ammoConfig >> "ACE_barrelLengths"); //Handle subsonic ammo that would have a huge muzzle velocity shift (when ballistic configs not explicitly defined) private _typicalSpeed = getNumber (_ammoConfig >> "typicalSpeed"); if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then { - private _inheritedBarrelConfig = (!(_muzzleVelocityTable isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []}; - private _inheritedTempConfig = (!(_ammoTempMuzzleVelocityShifts isEqualTo [])) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []}; + private _inheritedBarrelConfig = (_muzzleVelocityTable isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo []}; + private _inheritedTempConfig = (_ammoTempMuzzleVelocityShifts isNotEqualTo []) && {(configProperties [_ammoConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo []}; TRACE_3("subsonic",_typicalSpeed,_inheritedBarrelConfig,_inheritedTempConfig); if (_inheritedBarrelConfig || _inheritedTempConfig) then { private _parentConfig = inheritsFrom _ammoConfig; @@ -73,7 +73,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then { }; private _linearMuliplier = _typicalSpeed / _parentSpeed; if (_inheritedBarrelConfig) then { - if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isEqualTo [])) then { + if ((configProperties [_parentConfig, "(configName _x) == 'ACE_muzzleVelocities'", false]) isNotEqualTo []) then { TRACE_2("Parent Has Defined Barrel MV",_linearMuliplier,_muzzleVelocityTable); { _muzzleVelocityTable set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _muzzleVelocityTable; } else { @@ -82,7 +82,7 @@ if ((_typicalSpeed > 0) && {_typicalSpeed < 360}) then { }; }; if (_inheritedTempConfig) then { - if (!((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isEqualTo [])) then { + if ((configProperties [_parentConfig, "(configName _x) == 'ACE_ammoTempMuzzleVelocityShifts'", false]) isNotEqualTo []) then { TRACE_2("Parent Has Defined Ammo Temp Shifts",_linearMuliplier,_muzzleVelocityTable); { _ammoTempMuzzleVelocityShifts set [_forEachIndex, (_x * _linearMuliplier)]; } forEach _ammoTempMuzzleVelocityShifts; } else { diff --git a/addons/advanced_ballistics/initSettings.sqf b/addons/advanced_ballistics/initSettings.sqf new file mode 100644 index 0000000000..957044f343 --- /dev/null +++ b/addons/advanced_ballistics/initSettings.sqf @@ -0,0 +1,49 @@ +private _category = format ["ACE %1", localize LSTRING(DisplayName)]; + +[ + QGVAR(enabled), "CHECKBOX", + [LSTRING(enabled_DisplayName), LSTRING(enabled_Description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(muzzleVelocityVariationEnabled), "CHECKBOX", + [LSTRING(muzzleVelocityVariationEnabled_DisplayName), LSTRING(muzzleVelocityVariationEnabled_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(ammoTemperatureEnabled), "CHECKBOX", + [LSTRING(ammoTemperatureEnabled_DisplayName), LSTRING(ammoTemperatureEnabled_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(barrelLengthInfluenceEnabled), "CHECKBOX", + [LSTRING(barrelLengthInfluenceEnabled_DisplayName), LSTRING(barrelLengthInfluenceEnabled_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(bulletTraceEnabled), "CHECKBOX", + [LSTRING(bulletTraceEnabled_DisplayName), LSTRING(bulletTraceEnabled_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(simulationInterval), "SLIDER", + [LSTRING(simulationInterval_DisplayName), LSTRING(simulationInterval_Description)], + _category, + [0, 0.2, 0.05, 2], + 1 +] call CBA_fnc_addSetting; diff --git a/addons/advanced_fatigue/CfgEventHandlers.hpp b/addons/advanced_fatigue/CfgEventHandlers.hpp index 0b5cb8edff..f6e2bb398c 100644 --- a/addons/advanced_fatigue/CfgEventHandlers.hpp +++ b/addons/advanced_fatigue/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/advanced_fatigue/README.md b/addons/advanced_fatigue/README.md index aec1cfd38b..46c4aab73f 100644 --- a/addons/advanced_fatigue/README.md +++ b/addons/advanced_fatigue/README.md @@ -2,9 +2,3 @@ ace_advanced_fatigue ========== An in depth stamina and fatigue simulation. - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [BaerMitUmlaut](https://github.com/BaerMitUmlaut) diff --git a/addons/advanced_fatigue/XEH_postInit.sqf b/addons/advanced_fatigue/XEH_postInit.sqf index 9a45c1f280..5a8b2d4efe 100644 --- a/addons/advanced_fatigue/XEH_postInit.sqf +++ b/addons/advanced_fatigue/XEH_postInit.sqf @@ -19,7 +19,7 @@ if (!hasInterface) exitWith {}; }; }] call EFUNC(common,arithmeticSetSource); -["ace_settingsInitialized", { +["CBA_settingsInitialized", { if (!GVAR(enabled)) exitWith {}; // - Post process effect ------------------------------------------------------ diff --git a/addons/advanced_fatigue/initSettings.sqf b/addons/advanced_fatigue/initSettings.sqf index fa90aa9a4b..7787fd3f5d 100644 --- a/addons/advanced_fatigue/initSettings.sqf +++ b/addons/advanced_fatigue/initSettings.sqf @@ -13,7 +13,7 @@ [QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged) }, true // Needs mission restart -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(enableStaminaBar), @@ -28,7 +28,7 @@ _staminaBarContainer ctrlCommit 0; }; } -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fadeStaminaBar), @@ -43,7 +43,7 @@ _staminaBarContainer ctrlCommit 0; }; } -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(performanceFactor), @@ -52,7 +52,7 @@ LSTRING(DisplayName), [0, 5, 1, 1], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(recoveryFactor), @@ -61,7 +61,7 @@ LSTRING(DisplayName), [0, 5, 1, 1], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(loadFactor), @@ -70,7 +70,7 @@ LSTRING(DisplayName), [0, 5, 1, 1], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(terrainGradientFactor), @@ -79,7 +79,7 @@ LSTRING(DisplayName), [0, 5, 1, 1], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(swayFactor), @@ -88,4 +88,4 @@ LSTRING(DisplayName), [0, 5, 1, 1], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/advanced_throwing/ACE_Settings.hpp b/addons/advanced_throwing/ACE_Settings.hpp index 63de71cac7..2792e1953b 100644 --- a/addons/advanced_throwing/ACE_Settings.hpp +++ b/addons/advanced_throwing/ACE_Settings.hpp @@ -1,40 +1,17 @@ class ACE_Settings { class GVAR(enabled) { - category = CSTRING(Category); - displayName = CSTRING(Enable_DisplayName); - description = CSTRING(Enable_Description); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(showThrowArc) { - category = CSTRING(Category); - displayName = CSTRING(ShowThrowArc_DisplayName); - description = CSTRING(ShowThrowArc_Description); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(showMouseControls) { - category = CSTRING(Category); - displayName = CSTRING(ShowMouseControls_DisplayName); - description = CSTRING(ShowMouseControls_Description); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(enablePickUp) { - category = CSTRING(Category); - displayName = CSTRING(EnablePickUp_DisplayName); - description = CSTRING(EnablePickUp_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(enablePickUpAttached) { - category = CSTRING(Category); - displayName = CSTRING(EnablePickUpAttached_DisplayName); - description = CSTRING(EnablePickUpAttached_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; }; diff --git a/addons/advanced_throwing/CfgEventHandlers.hpp b/addons/advanced_throwing/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/advanced_throwing/CfgEventHandlers.hpp +++ b/addons/advanced_throwing/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/advanced_throwing/README.md b/addons/advanced_throwing/README.md index eea1c6e395..bba889d2f7 100644 --- a/addons/advanced_throwing/README.md +++ b/addons/advanced_throwing/README.md @@ -2,10 +2,3 @@ ace_advanced_throwing =================== Integrates advanced throwing by [Dslyecxi](https://github.com/dslyecxi). - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Jonpas](https://github.com/jonpas) diff --git a/addons/advanced_throwing/XEH_preInit.sqf b/addons/advanced_throwing/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/advanced_throwing/XEH_preInit.sqf +++ b/addons/advanced_throwing/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/advanced_throwing/functions/fnc_drawArc.sqf b/addons/advanced_throwing/functions/fnc_drawArc.sqf index bd7bc7a661..0782c4b46c 100644 --- a/addons/advanced_throwing/functions/fnc_drawArc.sqf +++ b/addons/advanced_throwing/functions/fnc_drawArc.sqf @@ -53,7 +53,7 @@ for "_i" from 0.05 to 1.45 step 0.1 do { if (lineIntersects [_prevTrajASL, _newTrajASL]) then { // Checks the "VIEW" LOD _cross = 2; // 2: View LOD Block (Red) } else { - if !((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isEqualTo []) then { + if ((lineIntersectsSurfaces [_prevTrajASL, _newTrajASL, _activeThrowable, ACE_player, true, 1, "GEOM", "FIRE"]) isNotEqualTo []) then { _cross = 3; // 3: GEOM/FIRE LOD Block (Yellow) - pass a3 bulding glass, but blocked on some CUP glass }; }; diff --git a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf index 42d52b7153..9d3879e59b 100644 --- a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf +++ b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf @@ -118,7 +118,7 @@ if (abs _leanCoef < 0.15 || {vehicle ACE_player != ACE_player} || {weaponLowered private _posCameraWorld = AGLToASL (positionCameraToWorld [0, 0, 0]); _posHeadRel = _posHeadRel vectorAdd [-0.03, 0.01, 0.15]; // Bring closer to eyePos value -private _posFin = AGLToASL (ACE_player modelToWorldVisual _posHeadRel); +private _posFin = ACE_player modelToWorldVisualWorld _posHeadRel; private _throwType = ACE_player getVariable [QGVAR(throwType), THROW_TYPE_DEFAULT]; diff --git a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf index 5b7d2c9f0b..920f4d1781 100644 --- a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf +++ b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf @@ -31,7 +31,7 @@ _nearThrowables append (ACE_player nearObjects ["ACE_Chemlight_IR_Dummy", PICK_UP_DISTANCE]); { - if (!(_x in _throwablesHelped) && + if (!(_x in _throwablesHelped) && {!((attachedTo _x) getVariable [QGVAR(disablePickUp), false])} && {!(_x isKindOf "SmokeShellArty")} && {!(_x isKindOf "G_40mm_Smoke")} && // All smokes inherit from "GrenadeHand" >> "SmokeShell" {GVAR(enablePickUpAttached) || {!GVAR(enablePickUpAttached) && {isNull (attachedTo _x)}}} ) then { diff --git a/addons/advanced_throwing/functions/fnc_throw.sqf b/addons/advanced_throwing/functions/fnc_throw.sqf index 3bc69be882..a5ff3d62e2 100644 --- a/addons/advanced_throwing/functions/fnc_throw.sqf +++ b/addons/advanced_throwing/functions/fnc_throw.sqf @@ -40,7 +40,7 @@ if (!(_unit getVariable [QGVAR(primed), false])) then { _velocity = [_velocity, THROWSTYLE_DROP_VEL] select _dropMode; private _p2 = (eyePos _unit) vectorAdd (AGLToASL (positionCameraToWorld _direction)) vectorDiff (AGLToASL (positionCameraToWorld [0, 0, 0])); - private _p1 = AGLtoASL (_activeThrowable modelToWorldVisual [0, 0, 0]); + private _p1 = _activeThrowable modelToWorldVisualWorld [0, 0, 0]; private _newVelocity = (_p1 vectorFromTo _p2) vectorMultiply _velocity; diff --git a/addons/advanced_throwing/initSettings.sqf b/addons/advanced_throwing/initSettings.sqf new file mode 100644 index 0000000000..d4ebe14918 --- /dev/null +++ b/addons/advanced_throwing/initSettings.sqf @@ -0,0 +1,42 @@ +private _category = format ["ACE %1", localize LSTRING(Category)]; +[ + QGVAR(enabled), + "CHECKBOX", + [LSTRING(Enable_DisplayName), LSTRING(Enable_Description)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(showThrowArc), + "CHECKBOX", + [LSTRING(ShowThrowArc_DisplayName), LSTRING(ShowThrowArc_Description)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(showMouseControls), "CHECKBOX", + [LSTRING(ShowMouseControls_DisplayName), LSTRING(ShowMouseControls_Description)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(enablePickUp), "CHECKBOX", + [LSTRING(EnablePickUp_DisplayName), LSTRING(EnablePickUp_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(enablePickUpAttached), "CHECKBOX", + [LSTRING(EnablePickUpAttached_DisplayName), LSTRING(EnablePickUpAttached_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; diff --git a/addons/ai/CfgEventHandlers.hpp b/addons/ai/CfgEventHandlers.hpp index 45d472cd21..8452cd4fdd 100644 --- a/addons/ai/CfgEventHandlers.hpp +++ b/addons/ai/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/ai/README.md b/addons/ai/README.md index e3175b1006..7757530905 100644 --- a/addons/ai/README.md +++ b/addons/ai/README.md @@ -2,11 +2,3 @@ ace_ai ====== Overhaul of AI firing modes of vanilla weapons, encouraging the AI to use full-auto and bursts more often. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/aircraft/CfgAmmo.hpp b/addons/aircraft/CfgAmmo.hpp index 99f80d5d72..4f88c8fa06 100644 --- a/addons/aircraft/CfgAmmo.hpp +++ b/addons/aircraft/CfgAmmo.hpp @@ -23,6 +23,7 @@ class CfgAmmo { explosive = 0; CraterEffects = ""; explosionEffects = ""; + EGVAR(vehicle_damage,incendiary) = 0.5; }; // adjust minigun caliber and deflection to other ammo @@ -58,17 +59,19 @@ class CfgAmmo { indirectHit = 2.5; // default: 4 indirectHitRange = 1; // default: 3 fuseDistance = 0.2; // default: 10 + EGVAR(vehicle_damage,incendiary) = 1.0; }; // adds submunition logic, enabling multiple rounds per frame class ACE_Gatling_30mm_Sub_HEI: SubmunitionBullet { submunitionAmmo = "Gatling_30mm_HE_Plane_CAS_01_F"; weaponType = "cannon"; - submunitionConeType[] = {"poissondisccenter", 3}; + submunitionConeType[] = {"randomcenter", 3}; submunitionConeAngle = 0.056; // in degrees, 0.055 ~= 0.001 mils minute, but present model = "\A3\Weapons_f\Data\bullettracer\tracer_red.p3d"; triggerTime = 0.005; ACE_caliber = 1.4; + EGVAR(vehicle_damage,incendiary) = 1.0; }; class ACE_Gatling_30mm_Sub_AP: ACE_Gatling_30mm_Sub_HEI { diff --git a/addons/aircraft/CfgEventHandlers.hpp b/addons/aircraft/CfgEventHandlers.hpp index 93e3311cf2..865276cfba 100644 --- a/addons/aircraft/CfgEventHandlers.hpp +++ b/addons/aircraft/CfgEventHandlers.hpp @@ -1,11 +1,11 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/aircraft/README.md b/addons/aircraft/README.md index c1bf72b3d7..20286990d1 100644 --- a/addons/aircraft/README.md +++ b/addons/aircraft/README.md @@ -4,12 +4,3 @@ ace_aircraft Changes to air weaponry, ejection and HUDs. - Contributions by Kimi (geraldbolso1899) for HUD updates - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) -- [jaynus](https://github.com/walterpearce) diff --git a/addons/aircraft/RscInGameUI.hpp b/addons/aircraft/RscInGameUI.hpp index 67116a7b62..10d41d7009 100644 --- a/addons/aircraft/RscInGameUI.hpp +++ b/addons/aircraft/RscInGameUI.hpp @@ -1,6 +1,6 @@ class RscControlsGroup; class RscText; -class RangeText: RscText{}; +class RangeText: RscText {}; class RscPicture; class RscOpticsText; class RscIGProgress; diff --git a/addons/aircraft/functions/fnc_initEjectAction.sqf b/addons/aircraft/functions/fnc_initEjectAction.sqf index 8ec9e33ade..b453ce7704 100644 --- a/addons/aircraft/functions/fnc_initEjectAction.sqf +++ b/addons/aircraft/functions/fnc_initEjectAction.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; if (unitIsUAV _vehicle) exitWith {}; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _addAction = false; diff --git a/addons/apl/README.md b/addons/apl/README.md index 13b5f9d268..10f826e4a9 100644 --- a/addons/apl/README.md +++ b/addons/apl/README.md @@ -2,10 +2,3 @@ ace_apl ============ Assets licensed under Arma Public License (APL). - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- None diff --git a/addons/arsenal/ACE_Arsenal_Sorts.hpp b/addons/arsenal/ACE_Arsenal_Sorts.hpp index 17c5abf4a0..22e618c1e4 100644 --- a/addons/arsenal/ACE_Arsenal_Sorts.hpp +++ b/addons/arsenal/ACE_Arsenal_Sorts.hpp @@ -4,6 +4,7 @@ class GVAR(sorts) { displayName = ""; tabs[] = {{}, {}}; statement = ""; + condition = "true"; }; class ACE_alphabetically: sortBase { @@ -27,11 +28,19 @@ class GVAR(sorts) { statement = QUOTE(_this call FUNC(sortStatement_mass)); }; + class ACE_amount: sortBase { + scope = 2; + displayName = CSTRING(sortByAmountText); + tabs[] = {{}, {0,1,2,3,4,5,6,7}}; + statement = QUOTE(_this call FUNC(sortStatement_amount)); + condition = QUOTE(_this select 0); // Only show for containers + }; + class ACE_load: sortBase { scope = 2; displayName = CSTRING(sortByLoadText); tabs[] = {{3,4,5}, {}}; - statement = QUOTE(getContainerMaxLoad configName _this); + statement = QUOTE(getContainerMaxLoad (_this select 1)); }; class ACE_accuracy: sortBase { @@ -61,4 +70,16 @@ class GVAR(sorts) { tabs[] = {{}, {4}}; statement = QUOTE(_this call FUNC(sortStatement_magCount)); }; + + class ACE_protectionBallistic: sortBase { + scope = 2; + displayName = CSTRING(sortByProtectionBallistic); + tabs[] = {{3,4,6}, {}}; + statement = QUOTE([ARR_3(_this, 1000000, 1000)] call FUNC(sortStatement_protection)); + }; + + class ACE_protectionExplosive: ACE_protectionBallistic { + displayName = CSTRING(sortByProtectionExplosive); + statement = QUOTE([ARR_3(_this, 1000, 1000000)] call FUNC(sortStatement_protection)); + }; }; diff --git a/addons/arsenal/CfgEventHandlers.hpp b/addons/arsenal/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/arsenal/CfgEventHandlers.hpp +++ b/addons/arsenal/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/arsenal/XEH_PREP.hpp b/addons/arsenal/XEH_PREP.hpp index 4879e6d7a1..18128f8cc9 100644 --- a/addons/arsenal/XEH_PREP.hpp +++ b/addons/arsenal/XEH_PREP.hpp @@ -64,9 +64,11 @@ PREP(scanConfig); PREP(showItem); PREP(sortPanel); PREP(sortStatement_accuracy); +PREP(sortStatement_amount); PREP(sortStatement_magCount); PREP(sortStatement_mass); PREP(sortStatement_mod); +PREP(sortStatement_protection); PREP(sortStatement_rateOfFire); PREP(sortStatement_scopeMag); PREP(statBarStatement_accuracy); diff --git a/addons/arsenal/XEH_postInit.sqf b/addons/arsenal/XEH_postInit.sqf index 9b92f8ee51..65b8045562 100644 --- a/addons/arsenal/XEH_postInit.sqf +++ b/addons/arsenal/XEH_postInit.sqf @@ -1,6 +1,8 @@ #include "script_component.hpp" #include "defines.hpp" +GVAR(currentBox) = objNull; + GVAR(EH_ID) = 0; GVAR(lastSearchTextLeft) = ""; GVAR(lastSearchTextRight) = ""; diff --git a/addons/arsenal/XEH_preInit.sqf b/addons/arsenal/XEH_preInit.sqf index 1aebf5040f..3fb6a7817c 100644 --- a/addons/arsenal/XEH_preInit.sqf +++ b/addons/arsenal/XEH_preInit.sqf @@ -8,15 +8,15 @@ PREP_RECOMPILE_START; PREP_RECOMPILE_END; // Arsenal -[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_Settings_fnc_init; -[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_Settings_fnc_init; -[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_Settings_fnc_init; -[QGVAR(enableIdentityTabs), "CHECKBOX", localize LSTRING(enableIdentityTabsSettings), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init; +[QGVAR(camInverted), "CHECKBOX", localize LSTRING(invertCameraSetting), localize LSTRING(settingCategory), false] call CBA_fnc_addSetting; +[QGVAR(enableModIcons), "CHECKBOX", [LSTRING(modIconsSetting), LSTRING(modIconsTooltip)], localize LSTRING(settingCategory), true] call CBA_fnc_addSetting; +[QGVAR(fontHeight), "SLIDER", [LSTRING(fontHeightSetting), LSTRING(fontHeightTooltip)], localize LSTRING(settingCategory), [1, 10, 4.5, 1]] call CBA_fnc_addSetting; +[QGVAR(enableIdentityTabs), "CHECKBOX", localize LSTRING(enableIdentityTabsSettings), localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting; // Arsenal loadouts -[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init; -[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), localize LSTRING(settingCategory), true, true] call CBA_Settings_fnc_init; -[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], localize LSTRING(settingCategory), false, false] call CBA_Settings_fnc_init; +[QGVAR(allowDefaultLoadouts), "CHECKBOX", [LSTRING(allowDefaultLoadoutsSetting), LSTRING(defaultLoadoutsTooltip)], localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting; +[QGVAR(allowSharedLoadouts), "CHECKBOX", localize LSTRING(allowSharingSetting), localize LSTRING(settingCategory), true, true] call CBA_fnc_addSetting; +[QGVAR(EnableRPTLog), "CHECKBOX", [LSTRING(printToRPTSetting), LSTRING(printToRPTTooltip)], localize LSTRING(settingCategory), false, false] call CBA_fnc_addSetting; [QGVAR(statsToggle), { params ["_display", "_showStats"]; diff --git a/addons/arsenal/config.cpp b/addons/arsenal/config.cpp index cd526e3494..e491065480 100644 --- a/addons/arsenal/config.cpp +++ b/addons/arsenal/config.cpp @@ -8,7 +8,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); - authors[] = {"alganthe", "mharis001", "SynixeBrett"}; + authors[] = {"alganthe", "mharis001", "Brett Mayson"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; diff --git a/addons/arsenal/defines.hpp b/addons/arsenal/defines.hpp index fd71c5eaee..70292c3e7c 100644 --- a/addons/arsenal/defines.hpp +++ b/addons/arsenal/defines.hpp @@ -165,6 +165,25 @@ #define IDC_ATTRIBUTE_IMPORT_BUTTON 8109 #define IDC_ATTRIBUTE_ADD_COMPATIBLE 8110 +// Indexes of virtual items array +#define IDX_VIRT_WEAPONS 0 +#define IDX_VIRT_ATTACHEMENTS 1 + +#define IDX_VIRT_ITEMS_ALL 2 + +#define IDX_VIRT_HEADGEAR 3 +#define IDX_VIRT_UNIFORM 4 +#define IDX_VIRT_VEST 5 +#define IDX_VIRT_BACKPACK 6 +#define IDX_VIRT_GOGGLES 7 +#define IDX_VIRT_NVG 8 +#define IDX_VIRT_BINO 9 +#define IDX_VIRT_MAP 10 +#define IDX_VIRT_COMPASS 11 +#define IDX_VIRT_RADIO 12 +#define IDX_VIRT_WATCH 13 +#define IDX_VIRT_COMMS 14 + #define SYMBOL_ITEM_NONE "−" #define SYMBOL_ITEM_REMOVE "×" #define SYMBOL_ITEM_VIRTUAL "∞" diff --git a/addons/arsenal/functions/fnc_addListBoxItem.sqf b/addons/arsenal/functions/fnc_addListBoxItem.sqf index 35cde798ee..53bf321baf 100644 --- a/addons/arsenal/functions/fnc_addListBoxItem.sqf +++ b/addons/arsenal/functions/fnc_addListBoxItem.sqf @@ -32,9 +32,9 @@ if (_cachedItemInfo isEqualTo []) then {//Not in cache. So get info and put into //get name of DLC private _dlcName = ""; private _addons = configsourceaddonlist _configPath; - if !(_addons isEqualTo []) then { + if (_addons isNotEqualTo []) then { private _mods = configsourcemodlist (configfile >> "CfgPatches" >> _addons select 0); - if !(_mods isEqualTo []) then { + if (_mods isNotEqualTo []) then { _dlcName = _mods select 0; }; }; diff --git a/addons/arsenal/functions/fnc_addSort.sqf b/addons/arsenal/functions/fnc_addSort.sqf index 6faa2ba51c..9ecdcc03d2 100644 --- a/addons/arsenal/functions/fnc_addSort.sqf +++ b/addons/arsenal/functions/fnc_addSort.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: SynixeBrett + * Author: Brett Mayson * Add a custom sorting method. * * Arguments: @@ -10,12 +10,13 @@ * 1: Sort Class (a unique string for each algorithm) * 2: Display Name * 3: Algorithm + * 4: Condition (Optional) * * Return Value: * 0: Array of IDs (ARRAY of STRINGS) * * Example: - * [[[0, 1]], "fireRateSort", "Sort by fire rate", { + * [[[0, 1], []], "fireRateSort", "Sort by fire rate", { * params ["_itemCfg"]; * private _fireModes = getArray (_itemCfg >> "modes"); * private _fireRate = []; @@ -35,7 +36,8 @@ params [ ["_tabs", [[], []], [[]], 2], ["_class", "", [""]], ["_displayName", "", [""]], - ["_statement", {}, [{}]] + ["_statement", {}, [{}]], + ["_condition", {true}, [{}]] ]; _tabs params [ @@ -57,13 +59,13 @@ private _fnc_addToTabs = { } forEach _tabsToAddTo; }; -_finalArray = ["", _displayName, _statement]; +_finalArray = ["", _displayName, _statement, _condition]; -if !(_leftTabs isEqualTo []) then { +if (_leftTabs isNotEqualTo []) then { [GVAR(sortListLeftPanel), _leftTabs, "L", 0] call _fnc_addToTabs; }; -if !(_rightTabs isEqualTo []) then { +if (_rightTabs isNotEqualTo []) then { [GVAR(sortListRightPanel), _rightTabs, "R", 1] call _fnc_addToTabs; }; diff --git a/addons/arsenal/functions/fnc_attributeAddCompatible.sqf b/addons/arsenal/functions/fnc_attributeAddCompatible.sqf index 4f84f9624c..0b8e3f2557 100644 --- a/addons/arsenal/functions/fnc_attributeAddCompatible.sqf +++ b/addons/arsenal/functions/fnc_attributeAddCompatible.sqf @@ -51,7 +51,7 @@ if (_category == 8) then { _itemsToAdd append _magazines; { - _itemsToAdd append ([_magazineGroups, toLower _x] call CBA_fnc_hashGet); + _itemsToAdd append (_magazineGroups get (toLower _x)); } forEach getArray (_muzzleConfig >> "magazineWell"); } forEach getArray (_weaponConfig >> "muzzles"); } forEach _attributeWeapons; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf index a1d39b1423..7ca972fde2 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf @@ -37,6 +37,7 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { _contentPanelCtrl lnbSetCurSelRow (_contentPanelCursSel); [(findDisplay IDD_ace_arsenal), [localize LSTRING(loadoutDeleted), _loadoutName] joinString " "] call FUNC(message); + [QGVAR(onLoadoutDelete), [_loadoutName]] call CBA_fnc_localEvent; } else { private _profileName = profileName; // GVAR(center) could be a remote unit diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf index 17c89b5f36..0827ec2c31 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf @@ -124,7 +124,7 @@ switch (GVAR(currentLoadoutsTab)) do { }; }; - if (GVAR(shiftState) && {is3DEN} && {!(_loadoutName isEqualTo "")} && {_cursSelRow != -1} && {!(_loadoutIndex isEqualto -1)}) exitwith { + if (GVAR(shiftState) && {is3DEN} && {_loadoutName isNotEqualTo ""} && {_cursSelRow != -1} && {_loadoutIndex isNotEqualTo -1}) exitwith { private _defaultLoadoutsSearch = GVAR(defaultLoadoutsList) findIf {(_x select 0) == _loadoutName}; if (_defaultLoadoutsSearch isEqualto -1) then { GVAR(defaultLoadoutsList) pushBack [_loadoutName, _curSelLoadout]; diff --git a/addons/arsenal/functions/fnc_compileSorts.sqf b/addons/arsenal/functions/fnc_compileSorts.sqf index 423bec30b3..71f9885c09 100644 --- a/addons/arsenal/functions/fnc_compileSorts.sqf +++ b/addons/arsenal/functions/fnc_compileSorts.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: SynixeBrett + * Author: Brett Mayson * Create the internal stats arrays when needed for the first time * * Arguments: @@ -64,19 +64,24 @@ private _configEntries = "(getNumber (_x >> 'scope')) == 2" configClasses (confi private _class = configName _x; private _displayName = getText (_x >> "displayName"); private _statement = getText (_x >> "statement"); + private _condition = getText (_x >> "condition"); (getArray (_x >> "tabs")) params ["_leftTabsList", "_rightTabsList"]; if (_statement != "") then { _statement = compile _statement; }; - _finalArray = ["", _displayName, _statement]; + if (_condition != "") then { + _condition = compile _condition; + }; - if !(_leftTabsList isEqualTo []) then { + _finalArray = ["", _displayName, _statement, _condition]; + + if (_leftTabsList isNotEqualTo []) then { [_sortListLeftPanel, _leftTabsList, "L"] call _fnc_addToTabs; }; - if !(_rightTabsList isEqualTo []) then { + if (_rightTabsList isNotEqualTo []) then { [_sortListRightPanel, _rightTabsList, "R"] call _fnc_addToTabs; }; } foreach _configEntries; diff --git a/addons/arsenal/functions/fnc_fillLeftPanel.sqf b/addons/arsenal/functions/fnc_fillLeftPanel.sqf index 1dca06b065..b1212843a5 100644 --- a/addons/arsenal/functions/fnc_fillLeftPanel.sqf +++ b/addons/arsenal/functions/fnc_fillLeftPanel.sqf @@ -37,10 +37,6 @@ _ctrlPanel ctrlCommit FADE_DELAY; _ctrlPanel lbSetCurSel -1; -// Fill sort options -private _sortLeftCtrl = _display displayCtrl IDC_sortLeftTab; -[_display, _control, _sortLeftCtrl] call FUNC(fillSort); - // Handle icons and filling switch true do { case (_ctrlIDC in [IDC_buttonPrimaryWeapon, IDC_buttonHandgun, IDC_buttonSecondaryWeapon]) : { @@ -51,7 +47,7 @@ switch true do { { ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } foreach ((GVAR(virtualItems) select 0) select ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find _ctrlIDC)); + } foreach ((GVAR(virtualItems) select IDX_VIRT_WEAPONS) select ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find _ctrlIDC)); }; case (_ctrlIDC in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBackpack]) : { @@ -65,19 +61,19 @@ switch true do { case IDC_buttonUniform : { { ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } foreach (GVAR(virtualItems) select 4); + } foreach (GVAR(virtualItems) select IDX_VIRT_UNIFORM); }; case IDC_buttonVest : { { ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } foreach (GVAR(virtualItems) select 5); + } foreach (GVAR(virtualItems) select IDX_VIRT_VEST); }; case IDC_buttonBackpack : { { ["CfgVehicles", _x, _ctrlPanel] call FUNC(addListBoxItem); - } foreach (GVAR(virtualItems) select 6); + } foreach (GVAR(virtualItems) select IDX_VIRT_BACKPACK); }; }; }; @@ -96,12 +92,12 @@ switch true do { case IDC_buttonHeadgear: { { ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } foreach (GVAR(virtualItems) select 3); + } foreach (GVAR(virtualItems) select IDX_VIRT_HEADGEAR); }; case IDC_buttonGoggles : { { ["CfgGlasses", _x, _ctrlPanel] call FUNC(addListBoxItem); - } foreach (GVAR(virtualItems) select 7); + } foreach (GVAR(virtualItems) select IDX_VIRT_GOGGLES); }; case IDC_buttonNVG : { { @@ -153,8 +149,8 @@ switch true do { _ctrlPanel lbSetTooltip [_lbAdd,format ["%1\n%2",_displayName, _configName]]; _x call ADDMODICON; }; - } foreach ("isClass _x" configClasses _x); - } foreach ("isClass _x" configClasses (configfile >> "cfgfaces")); + } foreach ("true" configClasses _x); + } foreach ("true" configClasses (configfile >> "cfgfaces")); }; case IDC_buttonVoice : { private _voices = (configProperties [(configFile >> "CfgVoice"), "isClass _x && {getNumber (_x >> 'scope') == 2}", true]) - [(configfile >> "CfgVoice" >> "NoVoice")]; @@ -191,7 +187,8 @@ GVAR(currentLeftPanel) = _ctrlIDC; [QGVAR(leftPanelFilled), [_display, _ctrlIDC, GVAR(currentRightPanel)]] call CBA_fnc_localEvent; // Sort -[_sortLeftCtrl] call FUNC(sortPanel); +private _sortLeftCtrl = _display displayCtrl IDC_sortLeftTab; +[_display, _control, _sortLeftCtrl] call FUNC(fillSort); //Select current item private _itemsToCheck = ((GVAR(currentItems) select [0,15]) + [GVAR(currentFace), GVAR(currentVoice), GVAR(currentInsignia)]) apply {tolower _x}; @@ -199,7 +196,7 @@ private _itemsToCheck = ((GVAR(currentItems) select [0,15]) + [GVAR(currentFace) for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do { private _currentData = _ctrlPanel lbData _lbIndex; - if (!(_currentData isEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith { + if ((_currentData isNotEqualTo "") && {tolower _currentData in _itemsToCheck}) exitWith { _ctrlPanel lbSetCurSel _lbIndex; }; }; diff --git a/addons/arsenal/functions/fnc_fillRightPanel.sqf b/addons/arsenal/functions/fnc_fillRightPanel.sqf index ae675ffcdf..436c448300 100644 --- a/addons/arsenal/functions/fnc_fillRightPanel.sqf +++ b/addons/arsenal/functions/fnc_fillRightPanel.sqf @@ -45,6 +45,10 @@ private _fnc_fill_right_Container = { private _cacheNamespace = _ctrlPanel; private _cachedItemInfo = _cacheNamespace getVariable [_configCategory+_className, []]; + if (!(_className in GVAR(virtualItemsFlat))) then { + _isUnique = true; + }; + // Not in cache. So get info and put into cache if (_cachedItemInfo isEqualTo []) then { private _configPath = configFile >> _configCategory >> _className; @@ -86,7 +90,7 @@ private _compatibleMagazines = [[[], []], [[], []], [[], []]]; // Magazine groups { private _magazineGroups = uiNamespace getVariable [QGVAR(magazineGroups),["#CBA_HASH#",[],[],[]]]; - private _magArray = [_magazineGroups, toLower _x] call CBA_fnc_hashGet; + private _magArray = _magazineGroups get (toLower _x); {((_compatibleMagazines select _index) select _subIndex) pushBackUnique _x} forEach _magArray; } foreach ([getArray (_weaponConfig >> _x >> "magazineWell"), getArray (_weaponConfig >> "magazineWell")] select (_x == "this")); @@ -224,7 +228,7 @@ switch (_ctrlIDC) do { if (_leftPanelState) then { { ["CfgMagazines", _x, _ctrlPanel] call FUNC(addListBoxItem); - } foreach ((GVAR(virtualItems) select 2) arrayIntersect _compatibleMagsPrimaryMuzzle); + } foreach ((GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) arrayIntersect _compatibleMagsPrimaryMuzzle); }; }; @@ -232,14 +236,14 @@ switch (_ctrlIDC) do { if (_leftPanelState) then { { ["CfgMagazines", _x, _ctrlPanel] call FUNC(addListBoxItem); - } foreach ((GVAR(virtualItems) select 2) arrayIntersect _compatibleMagsSecondaryMuzzle); + } foreach ((GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) arrayIntersect _compatibleMagsSecondaryMuzzle); }; }; case IDC_buttonMag : { { ["CfgMagazines", _x, true] call _fnc_fill_right_Container; - } foreach ((GVAR(virtualItems) select 2) arrayIntersect _allCompatibleMags); + } foreach ((GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) arrayIntersect _allCompatibleMags); { ["CfgMagazines", _x, true, true] call _fnc_fill_right_Container; } foreach ((GVAR(virtualItems) select 19) arrayIntersect _allCompatibleMags); @@ -248,7 +252,7 @@ switch (_ctrlIDC) do { case IDC_buttonMagALL : { { ["CfgMagazines", _x, true] call _fnc_fill_right_Container; - } foreach (GVAR(virtualItems) select 2); + } foreach (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL); { ["CfgMagazines", _x, true, true] call _fnc_fill_right_Container; } foreach (GVAR(virtualItems) select 19); @@ -282,32 +286,42 @@ switch (_ctrlIDC) do { }; } forEach GVAR(customRightPanelButtons); }; - + { ["CfgWeapons", _x, false] call _fnc_fill_right_Container; } forEach ((GVAR(virtualItems) select 17) select {!((toLower _x) in _blockItems)}); - + { ["CfgWeapons", _x, false, true] call _fnc_fill_right_Container; - } foreach (GVAR(virtualItems) select 18); + } foreach ((GVAR(virtualItems) select 18) select {!((toLower _x) in _blockItems)}); { ["CfgVehicles", _x, false, true] call _fnc_fill_right_Container; - } foreach (GVAR(virtualItems) select 23); + } foreach ((GVAR(virtualItems) select 23) select {!((toLower _x) in _blockItems)}); { ["CfgGlasses", _x, false, true] call _fnc_fill_right_Container; - } foreach (GVAR(virtualItems) select 24); + } foreach ((GVAR(virtualItems) select 24) select {!((toLower _x) in _blockItems)}); }; - + default { private _index = [RIGHT_PANEL_CUSTOM_BUTTONS] find _ctrlIDC; if (_index != -1) then { private _data = GVAR(customRightPanelButtons) param [_index]; - + if (!isNil "_data") then { private _items = _data select 0; { - ["CfgWeapons", _x, true] call _fnc_fill_right_Container; + ["CfgWeapons", _x, false] call _fnc_fill_right_Container; } foreach ((GVAR(virtualItems) select 17) select {(toLower _x) in _items}); + + { + ["CfgWeapons", _x, false, true] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 18) select {(toLower _x) in _items}); + { + ["CfgVehicles", _x, false, true] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 23) select {(toLower _x) in _items}); + { + ["CfgGlasses", _x, false, true] call _fnc_fill_right_Container; + } foreach ((GVAR(virtualItems) select 24) select {(toLower _x) in _items}); }; }; }; @@ -353,10 +367,8 @@ if (GVAR(currentLeftPanel) in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBack private _sortRightCtrl = _display displayCtrl IDC_sortRightTab; [_display, _control, _sortRightCtrl] call FUNC(fillSort); -[_sortRightCtrl] call FUNC(sortPanel); - // Select current data if not in a container -if !(_itemsToCheck isEqualTo []) then { +if (_itemsToCheck isNotEqualTo []) then { for "_lbIndex" from 0 to (lbSize _ctrlPanel - 1) do { private _currentData = _ctrlPanel lbData _lbIndex; diff --git a/addons/arsenal/functions/fnc_fillSort.sqf b/addons/arsenal/functions/fnc_fillSort.sqf index a6e93a0508..3516b5b6be 100644 --- a/addons/arsenal/functions/fnc_fillSort.sqf +++ b/addons/arsenal/functions/fnc_fillSort.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" #include "..\defines.hpp" /* - * Author: Alganthe, SynixeBrett + * Author: Alganthe, Brett Mayson * Fill right panel. * * Arguments: @@ -90,9 +90,13 @@ private _sortIndex = 0; { if (_x isEqualTo []) exitWith {}; - _sortCtrl lbAdd (_x select 1); - if ((_x select 1) isEqualTo _lastSort) then { - _sortIndex = _forEachIndex; + _x params ["_sortName", "_displayName", "", "_condition"]; + if ([_right] call _condition) then { + private _index = _sortCtrl lbAdd _displayName; + _sortCtrl lbSetData [_index, _sortName]; + if (_displayName isEqualTo _lastSort) then { + _sortIndex = _index; + }; }; } forEach _sorts; diff --git a/addons/arsenal/functions/fnc_handleStats.sqf b/addons/arsenal/functions/fnc_handleStats.sqf index 0d071740b7..16cdc1c7e1 100644 --- a/addons/arsenal/functions/fnc_handleStats.sqf +++ b/addons/arsenal/functions/fnc_handleStats.sqf @@ -64,7 +64,7 @@ if (!isNil "_itemCfg") then { // Handle titles, bars and text _statsList = _statsList select [0, 5]; - if !(_statsList isEqualTo []) then { + if (_statsList isNotEqualTo []) then { { _x params ["_ID", "_configEntry", "_title", "_bools", "_statements"]; _bools params ["_showBar", "_showText"]; diff --git a/addons/arsenal/functions/fnc_onArsenalClose.sqf b/addons/arsenal/functions/fnc_onArsenalClose.sqf index 554947df85..328c1da1f2 100644 --- a/addons/arsenal/functions/fnc_onArsenalClose.sqf +++ b/addons/arsenal/functions/fnc_onArsenalClose.sqf @@ -59,7 +59,6 @@ if (is3DEN) then { curatorcamera cameraEffect ["internal","back"]; } else { GVAR(camera) cameraEffect ["terminate","back"]; - ACE_player switchCamera GVAR(cameraView); }; }; @@ -71,8 +70,17 @@ if (!isNil QGVAR(moduleUsed)) then { objNull remoteControl GVAR(center); }; -if (isMultiplayer) then { +ACE_player switchCamera GVAR(cameraView); +// Restore curator camera state +if (!isNull curatorCamera) then { + GVAR(curatorCameraData) params ["_position", "_dirAndUp"]; + + curatorCamera setPosASL _position; + curatorCamera setVectorDirAndUp _dirAndUp; +}; + +if (isMultiplayer) then { [QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(center) + "_face"] call CBA_fnc_globalEventJIP; [QGVAR(center) + "_face", GVAR(center)] call CBA_fnc_removeGlobalEventJIP; @@ -80,9 +88,13 @@ if (isMultiplayer) then { [QGVAR(center) + "_voice", GVAR(center)] call CBA_fnc_removeGlobalEventJIP; }; +GVAR(currentBox) = objNull; + GVAR(camera) = nil; GVAR(cameraHelper) = nil; +GVAR(curatorCameraData) = nil; + GVAR(mouseButtonState) = nil; GVAR(currentLeftPanel) = nil; GVAR(currentRightPanel) = nil; @@ -95,6 +107,7 @@ GVAR(rightTabLnBFocus) = nil; GVAR(selectedWeaponType) = nil; GVAR(virtualItems) = nil; +GVAR(virtualItemsFlat) = nil; GVAR(currentItems) = nil; GVAR(currentFace) = nil; GVAR(currentVoice) = nil; diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index b59d1b28a9..34243a49f6 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -60,28 +60,31 @@ GVAR(statsPagesLeft) = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; GVAR(statsPagesRight) = [0, 0, 0, 0, 0, 0, 0, 0]; GVAR(statsInfo) = [true, 0, controlNull, nil, nil]; +// Cache assignedItems +private _assignedItems = (getUnitLoadout GVAR(center)) select 9; + // Add the items the player has to virtualItems -for "_index" from 0 to 10 do { +for "_index" from 0 to 14 do { switch (_index) do { // primary, secondary, handgun weapons - case 0: { + case IDX_VIRT_WEAPONS: { private _array = LIST_DEFAULTS select _index; - if !((_array select 0) isEqualTo "") then { + if ((_array select 0) isNotEqualTo "") then { ((GVAR(virtualItems) select _index) select 0) pushBackUnique (_array select 0); }; - if !((_array select 1) isEqualTo "") then { + if ((_array select 1) isNotEqualTo "") then { ((GVAR(virtualItems) select _index) select 1) pushBackUnique (_array select 1); }; - if !((_array select 2) isEqualTo "") then { + if ((_array select 2) isNotEqualTo "") then { ((GVAR(virtualItems) select _index) select 2) pushBackUnique (_array select 2); }; }; // Accs for the weapons above - case 1: { + case IDX_VIRT_ATTACHEMENTS: { private _array = LIST_DEFAULTS select _index; _array params ["_accsArray", "_magsArray"]; @@ -96,28 +99,36 @@ for "_index" from 0 to 10 do { } forEach _accsArray; { - if !(_x isEqualTo []) then { + if (_x isNotEqualTo []) then { if (_x select 0 != "") then { - (GVAR(virtualItems) select 2) pushBackUnique (_x select 0); + (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) pushBackUnique (_x select 0); }; if (count _x > 1 && {_x select 1 != ""}) then { - (GVAR(virtualItems) select 2) pushBackUnique (_x select 1); + (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) pushBackUnique (_x select 1); }; }; } forEach _magsArray; }; + // Assigned items + case IDX_VIRT_MAP: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 0) }; + case IDX_VIRT_COMMS: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 1) }; + case IDX_VIRT_RADIO: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 2) }; + case IDX_VIRT_COMPASS: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 3) }; + case IDX_VIRT_WATCH: { (GVAR(virtualItems) select _index) pushBackUnique (_assignedItems select 4) }; + + // Inventory items - case 2: { + case IDX_VIRT_ITEMS_ALL: { call FUNC(updateUniqueItemsList); }; // The rest default { - private _array = (LIST_DEFAULTS select _index) select {!(_x isEqualTo "")}; - if !(_array isEqualTo []) then { + private _array = (LIST_DEFAULTS select _index) select {_x isNotEqualTo ""}; + if (_array isNotEqualTo []) then { {(GVAR(virtualItems) select _index) pushBackUnique _x} forEach _array; }; }; @@ -164,18 +175,24 @@ for "_index" from 0 to 15 do { }; { - private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation"); - - if (_simulationType != "NVGoggles") then { - if (_simulationType == "ItemGps" || _simulationType == "Weapon") then { + switch (_forEachIndex) do { + case 0: { // Map + GVAR(currentItems) set [10, _x]; + }; + case 1: { // GPS GVAR(currentItems) set [14, _x]; - } else { - - private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType)); - GVAR(currentItems) set [_index, _x]; + }; + case 2: { // Radio + GVAR(currentItems) set [12, _x]; + }; + case 3: { // Compass + GVAR(currentItems) set [11, _x]; + }; + case 4: { // Watch + GVAR(currentItems) set [13, _x]; }; }; -} forEach (assignedItems GVAR(center)); +} forEach _assignedItems; GVAR(currentWeaponType) = switch true do { case (currentWeapon GVAR(center) == GVAR(currentItems) select 0): {0}; @@ -334,6 +351,11 @@ if (isNil QGVAR(cameraPosition)) then { GVAR(cameraPosition) = [5,0,0,[0,0,0.85]]; }; +// Save curator camera state so camera position and direction are not modified while using arsenal +if (!isNull curatorCamera) then { + GVAR(curatorCameraData) = [getPosASL curatorCamera, [vectorDir curatorCamera, vectorUp curatorCamera]]; +}; + GVAR(cameraHelper) = createAgent ["Logic", position GVAR(center) ,[] ,0 ,"none"]; GVAR(cameraHelper) attachTo [GVAR(center), GVAR(cameraPosition) select 3, ""]; diff --git a/addons/arsenal/functions/fnc_onKeyDown.sqf b/addons/arsenal/functions/fnc_onKeyDown.sqf index 0c265873eb..2bd8e0ac7b 100644 --- a/addons/arsenal/functions/fnc_onKeyDown.sqf +++ b/addons/arsenal/functions/fnc_onKeyDown.sqf @@ -25,7 +25,7 @@ GVAR(shiftState) = _shiftState; private _return = true; private _loadoutsDisplay = findDisplay IDD_loadouts_display; -if !(_loadoutsDisplay isEqualTo displayNull) then { +if (_loadoutsDisplay isNotEqualTo displayNull) then { if !(GVAR(loadoutsSearchbarFocus)) then { switch true do { // Close button @@ -171,7 +171,7 @@ if !(_loadoutsDisplay isEqualTo displayNull) then { case (_keyPressed == DIK_RETURN): { if (GVAR(leftSearchbarFocus)) then { [_display, _display displayCtrl IDC_leftSearchbar] call FUNC(handleSearchBar); - }; + }; if (GVAR(rightSearchbarFocus)) then { [_display, _display displayCtrl IDC_rightSearchbar] call FUNC(handleSearchBar); }; diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf index 1e6c851f0f..3f1ca14b87 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -60,7 +60,7 @@ switch (GVAR(currentLeftPanel)) do { private _cfgMags = configFile >> "CfgMagazines"; private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 }; GVAR(center) addWeapon _item; - if !(_compatibleMags isEqualTo []) then { + if (_compatibleMags isNotEqualTo []) then { GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]]; }; @@ -102,7 +102,7 @@ switch (GVAR(currentLeftPanel)) do { private _cfgMags = configFile >> "CfgMagazines"; private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 }; GVAR(center) addWeapon _item; - if !(_compatibleMags isEqualTo []) then { + if (_compatibleMags isNotEqualTo []) then { GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]]; }; @@ -143,7 +143,7 @@ switch (GVAR(currentLeftPanel)) do { private _cfgMags = configFile >> "CfgMagazines"; private _compatibleMags = ([_item, true] call CBA_fnc_compatibleMagazines) select { getNumber (_cfgMags >> _x >> "scope") == 2 }; GVAR(center) addWeapon _item; - if !(_compatibleMags isEqualTo []) then { + if (_compatibleMags isNotEqualTo []) then { GVAR(center) addWeaponItem [_item, [_compatibleMags select 0]]; }; diff --git a/addons/arsenal/functions/fnc_openBox.sqf b/addons/arsenal/functions/fnc_openBox.sqf index ce02e6e343..f1c6612671 100644 --- a/addons/arsenal/functions/fnc_openBox.sqf +++ b/addons/arsenal/functions/fnc_openBox.sqf @@ -41,12 +41,16 @@ if (isNil "_displayToUse" || {!isnil QGVAR(camera)}) exitWith { [localize LSTRING(CantOpenDisplay), false, 5, 1] call EFUNC(common,displayText); }; +GVAR(currentBox) = _object; + if (_mode) then { GVAR(virtualItems) = +(uiNamespace getVariable QGVAR(configItems)); + GVAR(virtualItemsFlat) = +(uiNamespace getVariable QGVAR(configItemsFlat)); } else { GVAR(virtualItems) = +(_object getVariable [QGVAR(virtualItems), [ [[], [], []], [[], [], [], []], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [], [] ]]); + GVAR(virtualItemsFlat) = flatten GVAR(virtualItems); }; GVAR(center) = _center; diff --git a/addons/arsenal/functions/fnc_removeVirtualItems.sqf b/addons/arsenal/functions/fnc_removeVirtualItems.sqf index d96d16e3d6..ad9ff7f89e 100644 --- a/addons/arsenal/functions/fnc_removeVirtualItems.sqf +++ b/addons/arsenal/functions/fnc_removeVirtualItems.sqf @@ -68,9 +68,9 @@ if (_items isEqualType true) then { private _itemCount = { if (_x isEqualTo (_cargo select 0) || {_x isEqualTo (_cargo select 1)}) then { - !(_x isEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]}) + (_x isNotEqualTo [[],[],[]] || {_x isEqualTo [[],[],[],[]]}) } else { - !(_x isEqualTo []) + (_x isNotEqualTo []) }; } count _cargo; diff --git a/addons/arsenal/functions/fnc_scanConfig.sqf b/addons/arsenal/functions/fnc_scanConfig.sqf index e5bc4e6571..26660d048c 100644 --- a/addons/arsenal/functions/fnc_scanConfig.sqf +++ b/addons/arsenal/functions/fnc_scanConfig.sqf @@ -41,13 +41,14 @@ private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in va private _className = configName _x; private _hasItemInfo = isClass (_configItemInfo); private _itemInfoType = if (_hasItemInfo) then {getNumber (_configItemInfo >> "type")} else {0}; + private _isMiscItem = _className isKindOf ["CBA_MiscItem", (_configCfgWeapons)]; switch true do { /* Weapon acc */ case ( _hasItemInfo && {_itemInfoType in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} && - {!(configName _x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])} + {!_isMiscItem} ): { //Convert type to array index @@ -117,7 +118,7 @@ private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in va case ( _hasItemInfo && (_itemInfoType in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD] && - {(_className isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}) || + {_isMiscItem}) || {_itemInfoType in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} || {(getText ( _x >> "simulation")) == "ItemMineDetector"} ): { @@ -140,15 +141,6 @@ private _putList = []; private _className = configName _x; switch true do { - // Rifle, handgun, secondary weapons mags - case ( - ((getNumber (_x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL,TYPE_MAGAZINE_MISSILE]) || - {(getNumber (_x >> QGVAR(hide))) == -1}) && - {!(_className in _grenadeList)} && - {!(_className in _putList)} - ): { - (_cargo select 2) pushBackUnique _className; - }; // Grenades case (_className in _grenadeList): { (_cargo select 15) pushBackUnique _className; @@ -157,6 +149,13 @@ private _putList = []; case (_className in _putList): { (_cargo select 16) pushBackUnique _className; }; + // Rifle, handgun, secondary weapons mags + case ( + ((getNumber (_x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL,TYPE_MAGAZINE_MISSILE]) || + {(getNumber (_x >> QGVAR(hide))) == -1}) + ): { + (_cargo select 2) pushBackUnique _className; + }; }; } foreach configProperties [(configFile >> "CfgMagazines"), "isClass _x && {(if (isNumber (_x >> 'scopeArsenal')) then {getNumber (_x >> 'scopeArsenal')} else {getNumber (_x >> 'scope')}) == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true]; @@ -170,7 +169,7 @@ private _putList = []; (_cargo select 7) pushBackUnique (configName _x); } foreach configProperties [(configFile >> "CfgGlasses"), "isClass _x && {(if (isNumber (_x >> 'scopeArsenal')) then {getNumber (_x >> 'scopeArsenal')} else {getNumber (_x >> 'scope')}) == 2} && {getNumber (_x >> 'ace_arsenal_hide') != 1}", true]; -private _magazineGroups = [[],[]] call CBA_fnc_hashCreate; +private _magazineGroups = createHashMap; private _cfgMagazines = configFile >> "CfgMagazines"; @@ -182,8 +181,9 @@ private _cfgMagazines = configFile >> "CfgMagazines"; _magList append _magazines; } foreach configProperties [_x, "isArray _x", true]; - [_magazineGroups, toLower configName _x, _magList arrayIntersect _magList] call CBA_fnc_hashSet; + _magazineGroups set [toLower configName _x, _magList arrayIntersect _magList]; } foreach configProperties [(configFile >> "CfgMagazineWells"), "isClass _x", true]; uiNamespace setVariable [QGVAR(configItems), _cargo]; +uiNamespace setVariable [QGVAR(configItemsFlat), flatten _cargo]; uiNamespace setVariable [QGVAR(magazineGroups), _magazineGroups]; diff --git a/addons/arsenal/functions/fnc_sortPanel.sqf b/addons/arsenal/functions/fnc_sortPanel.sqf index 91d0614c65..d5524c9078 100644 --- a/addons/arsenal/functions/fnc_sortPanel.sqf +++ b/addons/arsenal/functions/fnc_sortPanel.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" #include "..\defines.hpp" /* - * Author: Alganthe, Dedmen, SynixeBrett + * Author: Alganthe, Dedmen, Brett Mayson * Sort arsenal panel. * * Arguments: @@ -97,14 +97,17 @@ private _selected = if (_right) then { _panel lbData _curSel }; -private _mode = 0 max lbCurSel _sortControl; -private _statement = _sorts select _mode select 2; +private _sortName = _sortControl lbData (0 max lbCurSel _sortControl); +private _sortConfig = _sorts select (0 max (_sorts findIf {(_x select 0) isEqualTo _sortName})); +private _statement = _sortConfig select 2; missionNamespace setVariable [ [QGVAR(lastSortLeft), QGVAR(lastSortRight)] select _rightSort, - _sorts select _mode select 1 + _sortConfig select 1 ]; +private _originalNames = createHashMap; + private _for = if (_right) then { for '_i' from 0 to ((lnbSize _panel select 0) - 1) } else { @@ -117,19 +120,39 @@ _for do { } else { _panel lbData _i }; + private _quantity = if (_right) then { + parseNumber (_panel lnbText [_i, 2]) + } else { + 0 + }; + private _itemCfg = _cfgClass >> _item; - private _value = _itemCfg call _statement; + + // In rare cases, item may not belong to the config class for the panel + // For example, misc items panel can contain CfgVehicles and CfgGlasses items in addition to the usual CfgWeapons items + if (isNull _itemCfg) then { + _itemCfg = _item call CBA_fnc_getItemConfig; + }; + + private _value = [_itemCfg, _item, _quantity] call _statement; if (_value isEqualType 0) then { _value = [_value, 8] call CBA_fnc_formatNumber; }; if (_value isEqualTo "") then { _value = "_"; }; + if (_right) then { - _panel lnbSetText [[_i, 1], format ["%1%2", _value, _panel lnbText [_i, 1]]]; + private _name = _panel lnbText [_i, 1]; + _originalNames set [_item, _name]; + + _panel lnbSetText [[_i, 1], format ["%1%2", _value, _name]]; } else { - if !(_item isEqualTo "") then { - _panel lbSetText [_i, format ["%1%2", _value, _panel lbText _i]]; + if (_item isNotEqualTo "") then { + private _name = _panel lbText _i; + _originalNames set [_item, _name]; + + _panel lbSetText [_i, format ["%1%2", _value, _name]]; }; }; }; @@ -139,22 +162,25 @@ if (_right) then { _for do { private _data = _panel lnbData [_i, 0]; - if (_cursel >= 0) then { - if (_data == _selected) then {_panel lnbSetCurSelRow _i}; + + if (_curSel >= 0 && {_data == _selected}) then { + _panel lnbSetCurSelRow _i; }; - _panel lnbSetText [[_i, 1], getText (_cfgClass >> _data >> "displayName")]; + + _panel lnbSetText [[_i, 1], _originalNames get _data]; }; } else { lbSort [_panel, "ASC"]; _for do { private _data = _panel lbData _i; - if (_cursel >= 0) then { - if (_data == _selected) then {_panel lbSetCurSel _i}; + + if (_curSel >= 0 && {_data == _selected}) then { + _panel lbSetCurSel _i; }; - private _name = getText (_cfgClass >> _data >> "displayName"); - if !(_name isEqualTo "") then { - _panel lbSetText [_i, _name]; + + if (_data isNotEqualTo "") then { + _panel lbSetText [_i, _originalNames get _data]; }; }; }; diff --git a/addons/arsenal/functions/fnc_sortStatement_accuracy.sqf b/addons/arsenal/functions/fnc_sortStatement_accuracy.sqf index 5207f3c1a4..76d7570433 100644 --- a/addons/arsenal/functions/fnc_sortStatement_accuracy.sqf +++ b/addons/arsenal/functions/fnc_sortStatement_accuracy.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: Alganthe, SynixeBrett + * Author: Alganthe, Brett Mayson * Statement to sort weapons by their accuracy. * * Arguments: diff --git a/addons/arsenal/functions/fnc_sortStatement_amount.sqf b/addons/arsenal/functions/fnc_sortStatement_amount.sqf new file mode 100644 index 0000000000..afafc5dba6 --- /dev/null +++ b/addons/arsenal/functions/fnc_sortStatement_amount.sqf @@ -0,0 +1,19 @@ +#include "script_component.hpp" +/* + * Author: Brett Mayson + * Statement to sort items by the amount in inventory. + * + * Arguments: + * 0: Item Config + * 1: Item Name + * 2: Quantity + * + * Return Value: + * Sorting Value + * + * Public: No +*/ + +params ["", "", "_quantity"]; + +10000 - _quantity diff --git a/addons/arsenal/functions/fnc_sortStatement_magCount.sqf b/addons/arsenal/functions/fnc_sortStatement_magCount.sqf index 4c056d5147..77a33ff452 100644 --- a/addons/arsenal/functions/fnc_sortStatement_magCount.sqf +++ b/addons/arsenal/functions/fnc_sortStatement_magCount.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: SynixeBrett + * Author: Brett Mayson * Statement to sort magazines by their ammo count. * * Arguments: diff --git a/addons/arsenal/functions/fnc_sortStatement_mass.sqf b/addons/arsenal/functions/fnc_sortStatement_mass.sqf index cfba8a6043..552df474e5 100644 --- a/addons/arsenal/functions/fnc_sortStatement_mass.sqf +++ b/addons/arsenal/functions/fnc_sortStatement_mass.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: Alganthe, SynixeBrett + * Author: Alganthe, Brett Mayson * Statement to sort items by their mass. * * Arguments: diff --git a/addons/arsenal/functions/fnc_sortStatement_mod.sqf b/addons/arsenal/functions/fnc_sortStatement_mod.sqf index 3fabb7f4ce..acba504fc8 100644 --- a/addons/arsenal/functions/fnc_sortStatement_mod.sqf +++ b/addons/arsenal/functions/fnc_sortStatement_mod.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: SynixeBrett + * Author: Brett Mayson * Statement to sort items by the mod they belong to. * * Arguments: @@ -16,9 +16,9 @@ params ["_config"]; private _dlc = ""; private _addons = configSourceAddonList _config; -if !(_addons isEqualTo []) then { +if (_addons isNotEqualTo []) then { private _mods = configSourceModList (configfile >> "CfgPatches" >> _addons select 0); - if !(_mods isEqualTo []) then { + if (_mods isNotEqualTo []) then { _dlc = _mods select 0; }; }; diff --git a/addons/arsenal/functions/fnc_sortStatement_protection.sqf b/addons/arsenal/functions/fnc_sortStatement_protection.sqf new file mode 100644 index 0000000000..463c75e03d --- /dev/null +++ b/addons/arsenal/functions/fnc_sortStatement_protection.sqf @@ -0,0 +1,24 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror + * Statement to sort items by their protection (combination of ballistic and explosive). + * + * Arguments: + * 0: Item Config + * 1: Ballistic (passthrough) coefficent + * 2: Explosive (armor) coefficent + * + * Return Value: + * Sorting Value + * + * Public: No +*/ + +params ["_itemInfo", "_ballisticCo", "_explosiveCo"]; +_itemInfo params ["_itemCfg"]; + +(([[_itemCfg], ["passthrough", "armor"]] call BIS_fnc_configExtremes) select 1) params [["_passthroughMax", 0], ["_armorMax", 0]]; + +private _protectionCombined = _passthroughMax * _ballisticCo + _armorMax * _explosiveCo; + +_protectionCombined diff --git a/addons/arsenal/functions/fnc_sortStatement_rateOfFire.sqf b/addons/arsenal/functions/fnc_sortStatement_rateOfFire.sqf index 3afbb52bdf..31f177b09d 100644 --- a/addons/arsenal/functions/fnc_sortStatement_rateOfFire.sqf +++ b/addons/arsenal/functions/fnc_sortStatement_rateOfFire.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: Alganthe, SynixeBrett + * Author: Alganthe, Brett Mayson * Statement to sort weapons by their rate of fire. * * Arguments: diff --git a/addons/arsenal/functions/fnc_sortStatement_scopeMag.sqf b/addons/arsenal/functions/fnc_sortStatement_scopeMag.sqf index 29891a2fe3..76aedce006 100644 --- a/addons/arsenal/functions/fnc_sortStatement_scopeMag.sqf +++ b/addons/arsenal/functions/fnc_sortStatement_scopeMag.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: Alganthe, SynixeBrett + * Author: Alganthe, Brett Mayson * Statement to sort optics by their magnification. * * Arguments: diff --git a/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf index 7405950631..e0aec74273 100644 --- a/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf +++ b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf @@ -21,7 +21,7 @@ GVAR(virtualItems) set [22, [[], [], [], []]]; GVAR(virtualItems) set [23, []]; GVAR(virtualItems) set [24, []]; -private _array = LIST_DEFAULTS select 2; +private _array = LIST_DEFAULTS select IDX_VIRT_ITEMS_ALL; private _itemsCache = uiNamespace getVariable QGVAR(configItems); private _configCfgWeapons = configFile >> "CfgWeapons"; @@ -33,16 +33,16 @@ private _configGlasses = configFile >> "CfgGlasses"; switch true do { // Weapon mag case ( - isClass (_configMagazines >> _x) && - {_x in (_itemsCache select 2)} && - {!(_x in (GVAR(virtualItems) select 2))} + isClass (_configMagazines >> _x) && + {_x in (_itemsCache select 2)} && + {!(_x in (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL))} ): { (GVAR(virtualItems) select 19) pushBackUnique _x; }; // Mag throw case ( - isClass (_configMagazines >> _x) && + isClass (_configMagazines >> _x) && {_x in (_itemsCache select 15)} && {!(_x in (GVAR(virtualItems) select 15))} ): { @@ -51,7 +51,7 @@ private _configGlasses = configFile >> "CfgGlasses"; // Mag put case ( - isClass (_configMagazines >> _x) && + isClass (_configMagazines >> _x) && {_x in (_itemsCache select 16)} && {!(_x in (GVAR(virtualItems) select 16))} ): { @@ -61,7 +61,7 @@ private _configGlasses = configFile >> "CfgGlasses"; // acc case ( isClass (_configCfgWeapons >> _x) && - {!(_x in ((GVAR(virtualItems) select 1) select 0))} && + {!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 0))} && {_x in ((_itemsCache select 1) select 0)} ): { ((GVAR(virtualItems) select 22) select 0) pushBackUnique _x; @@ -70,7 +70,7 @@ private _configGlasses = configFile >> "CfgGlasses"; // acc case ( isClass (_configCfgWeapons >> _x) && - {!(_x in ((GVAR(virtualItems) select 1) select 1))} && + {!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 1))} && {_x in ((_itemsCache select 1) select 1)} ): { ((GVAR(virtualItems) select 22) select 1) pushBackUnique _x; @@ -79,7 +79,7 @@ private _configGlasses = configFile >> "CfgGlasses"; // acc case ( isClass (_configCfgWeapons >> _x) && - {!(_x in ((GVAR(virtualItems) select 1) select 2))} && + {!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 2))} && {_x in ((_itemsCache select 1) select 2)} ): { ((GVAR(virtualItems) select 22) select 2) pushBackUnique _x; @@ -87,7 +87,7 @@ private _configGlasses = configFile >> "CfgGlasses"; // acc case ( isClass (_configCfgWeapons >> _x) && - {!(_x in ((GVAR(virtualItems) select 1) select 3))} && + {!(_x in ((GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS) select 3))} && {_x in ((_itemsCache select 1) select 3)} ): { ((GVAR(virtualItems) select 22) select 3) pushBackUnique _x; @@ -100,13 +100,13 @@ private _configGlasses = configFile >> "CfgGlasses"; {!(_x in ((_itemsCache select 1) select 0))} && {!(_x in ((_itemsCache select 1) select 1))} && {!(_x in ((_itemsCache select 1) select 2))} && - {!(_x in ((_itemsCache select 1) select 3))} + {!(_x in ((_itemsCache select 1) select 3))} ): { (GVAR(virtualItems) select 18) pushBackUnique _x; }; // Backpacks - case (isClass (_configVehicles >> _x)): { + case (getNumber (_configVehicles >> _x >> "isBackpack") == 1): { (GVAR(virtualItems) select 23) pushBackUnique _x; }; diff --git a/addons/arsenal/functions/fnc_verifyLoadout.sqf b/addons/arsenal/functions/fnc_verifyLoadout.sqf index 12509333bb..bacd6a11b3 100644 --- a/addons/arsenal/functions/fnc_verifyLoadout.sqf +++ b/addons/arsenal/functions/fnc_verifyLoadout.sqf @@ -19,8 +19,8 @@ private _weaponCfg = configFile >> "CfgWeapons"; private _magCfg = configFile >> "CfgMagazines"; private _vehcCfg = configFile >> "CfgVehicles"; private _glassesCfg = configFile >> "CfgGlasses"; -private _weaponsArray = GVAR(virtualItems) select 0; -private _accsArray = GVAR(virtualItems) select 1; +private _weaponsArray = GVAR(virtualItems) select IDX_VIRT_WEAPONS; +private _accsArray = GVAR(virtualItems) select IDX_VIRT_ATTACHEMENTS; private _nullItemsAmount = 0; private _unavailableItemsAmount = 0; @@ -58,7 +58,7 @@ private _fnc_weaponCheck = { private _mag = _x select 0; if (isClass (_magCfg >> _mag)) then { - if !(_mag in (GVAR(virtualItems) select 2)) then { + if !(_mag in (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL)) then { _unavailableItemsList pushBackUnique _mag; _dataPath set [_forEachIndex, []]; @@ -137,7 +137,7 @@ for "_dataIndex" from 0 to 9 do { if (isClass (_magCfg >> _item)) then { if !( - _item in (GVAR(virtualItems) select 2) || + _item in (GVAR(virtualItems) select IDX_VIRT_ITEMS_ALL) || _item in (GVAR(virtualItems) select 15) || _item in (GVAR(virtualItems) select 16) ) then { @@ -173,7 +173,7 @@ for "_dataIndex" from 0 to 9 do { if (isClass (_weaponCfg >> _item)) then { - if !(_item in (GVAR(virtualItems) select 3)) then { + if !(_item in (GVAR(virtualItems) select IDX_VIRT_HEADGEAR)) then { _unavailableItemsList pushBackUnique _item; _loadout set [_dataIndex, ""]; @@ -195,7 +195,7 @@ for "_dataIndex" from 0 to 9 do { if (isClass (_glassesCfg >> _item)) then { - if !(_item in (GVAR(virtualItems) select 7)) then { + if !(_item in (GVAR(virtualItems) select IDX_VIRT_GOGGLES)) then { _unavailableItemsList pushBackUnique _item; _loadout set [_dataIndex, ""]; diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml index dcb2d22a64..7b980ff310 100644 --- a/addons/arsenal/stringtable.xml +++ b/addons/arsenal/stringtable.xml @@ -159,22 +159,6 @@ [Shift+Klik pro uložení jako standardního vybavení pro misi] [Shift+Click varsayılan kıyafetlere kaydet] - - Rename - Renombrar - Renommer - Umbenennen - Zmień nazwę - 改名 - Rinomina - 이름바꾸기 - 重新命名 - 重新命名 - Переименовать - Renomear - Přejmenovat - Yeniden adlandır - Rename the selected loadout Renombrar el equipamiento seleccionado @@ -388,6 +372,9 @@ Nach Tragelast sortieren Trier par capacité de chargement 容量で並び替え + Ordenar por capacidad + Сортировка по вместимости + Sortuj po rozmiarze Sort by accuracy @@ -395,6 +382,9 @@ Trier par précision 精度で並び替え Isabet doğruluğuna göre sırala + Ordenar por precisión + Сортировка по точности + Sortuj po celności Sort by rate of fire @@ -402,12 +392,18 @@ Trier par cadence de tir 連射速度で並び替え Atış hızına göre sırala + Ordenar por cadencia de tiro + Сортировка по темпу стрельбы + Sortuj po szybkostrzelności Sort by magnification Nach Vergrößerung sortieren Trier par grossissement 倍率で並び替え + Ordenar por magnificación + Сортировка по кратности приближения + Sortuj po przybliżeniu Sort by ammo count @@ -415,6 +411,25 @@ Trier par nombre de munitions 装弾数で並び替え Mermi sayısına göre sırala + Ordenar por cantidad de munición + Сортировка по количеству боеприпасов + Sortuj po ilości amunicji + + + Sort by ballistic protection + Trier par protection balistique + 防弾性能で並び替え + Ordenar por protección balística + Сортировка по баллистической защите + Sortuj po ochronie balistycznej + + + Sort by explosive protection + Trier par résistance aux explosifs + 防爆性能で並び替え + Ordenar por protección de explosivos + Сортировка по защите от взрывов + Sortuj po ochronie przeciw wybuchom Share or stop sharing the selected loadout @@ -1084,7 +1099,6 @@ Niveles de potasio Kaliumspiegel Taux de potassium - カリウム レベル 钾水平 鉀水平 Ilvello di potassio @@ -1093,6 +1107,7 @@ Níveis de Potássio Úrovně draslíku Potasyum seviyeleri + カリウム含有量 Magnification @@ -1370,6 +1385,7 @@ Задержка детонации Opoźnienie zapalnika 信管設定時間 + Tiempo de espoleta Detonates on impact @@ -1378,6 +1394,7 @@ Детонация от удара Detonuj przy uderzeniu 着発信管 + Detona mediante impacto diff --git a/addons/arsenal/ui/RscAttributes.hpp b/addons/arsenal/ui/RscAttributes.hpp index 8f291e4bb6..1bd6c9909b 100644 --- a/addons/arsenal/ui/RscAttributes.hpp +++ b/addons/arsenal/ui/RscAttributes.hpp @@ -492,7 +492,7 @@ class GVAR(display) { x = QUOTE(safezoneX + safezoneW - 93 * GRID_W); h = QUOTE(safezoneH - 28 * GRID_H); }; - class rightTabContentListnBox : RscListNBox { + class rightTabContentListnBox: RscListNBox { idc = IDC_rightTabContentListnBox; colorBackground[]={0,0,0,0}; colorSelectBackground[]={1,1,1,0.5}; @@ -1005,8 +1005,8 @@ class GVAR(loadoutsDisplay) { class buttonRename: buttonSave { idc = IDC_buttonRename; x = QUOTE(32.5 * GRID_W); - text= CSTRING(buttonRenameText); - tooltip= CSTRING(buttonRenameTooltip); + text = ECSTRING(common,rename); + tooltip = CSTRING(buttonRenameTooltip); onButtonClick = QUOTE([ARR_2(ctrlParent (_this select 0), _this select 0)] call FUNC(buttonLoadoutsRename)); }; class buttonLoad: buttonSave { diff --git a/addons/arsenal/ui/RscCustomArsenalButton.hpp b/addons/arsenal/ui/RscCustomArsenalButton.hpp index 7f0a139374..abe3358399 100644 --- a/addons/arsenal/ui/RscCustomArsenalButton.hpp +++ b/addons/arsenal/ui/RscCustomArsenalButton.hpp @@ -1,4 +1,4 @@ -class GVAR(customArsenalButton_Button) : RscButtonArsenal { +class GVAR(customArsenalButton_Button): RscButtonArsenal { x = QUOTE(safezoneW + safezoneX - 10 * GRID_W); y = QUOTE(safezoneY + 88 * GRID_H); w = QUOTE(9 * GRID_W); @@ -10,7 +10,7 @@ class GVAR(customArsenalButton_Button) : RscButtonArsenal { colorBackground[] = {0,0,0,0.5}; }; -class GVAR(customArsenalButton_Background) : ctrlStaticBackground { +class GVAR(customArsenalButton_Background): ctrlStaticBackground { x = QUOTE(safezoneW + safezoneX - 13 * GRID_W); y = QUOTE(safezoneY + 88 * GRID_H); w = QUOTE(12 * GRID_W); diff --git a/addons/artillerytables/CfgEventHandlers.hpp b/addons/artillerytables/CfgEventHandlers.hpp index e90bed419e..2a3f71f852 100644 --- a/addons/artillerytables/CfgEventHandlers.hpp +++ b/addons/artillerytables/CfgEventHandlers.hpp @@ -1,15 +1,15 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/artillerytables/README.md b/addons/artillerytables/README.md index 3e52ba9946..03d7f0ac29 100644 --- a/addons/artillerytables/README.md +++ b/addons/artillerytables/README.md @@ -5,10 +5,3 @@ Universal artillery rangetables. #### Items Added: `ACE_artilleryTable` - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/artillerytables/RscRangeTable.hpp b/addons/artillerytables/RscRangeTable.hpp index 8c673537d6..3245b77af6 100644 --- a/addons/artillerytables/RscRangeTable.hpp +++ b/addons/artillerytables/RscRangeTable.hpp @@ -42,7 +42,7 @@ class GVAR(rangeTableDialog) { colorSelectBackground[] = {0, 0, 0, 0.025}; colorSelectBackground2[] = {0, 0, 0, 0.025}; colorScrollbar[] = {0.95,0,0.95,1}; - class ListScrollBar: ScrollBar{ + class ListScrollBar: ScrollBar { color[] = {0,0,0,0.6}; }; }; diff --git a/addons/artillerytables/XEH_postInit.sqf b/addons/artillerytables/XEH_postInit.sqf index 2f31655814..6bc444d700 100644 --- a/addons/artillerytables/XEH_postInit.sqf +++ b/addons/artillerytables/XEH_postInit.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" -["ace_settingsInitialized", { - TRACE_2("ace_settingsInitialized",GVAR(advancedCorrections),GVAR(disableArtilleryComputer)); +["CBA_settingsInitialized", { + TRACE_2("CBA_settingsInitialized",GVAR(advancedCorrections),GVAR(disableArtilleryComputer)); if (hasInterface) then { // Add hud overlay for actuall azimuth and elevation: @@ -15,7 +15,7 @@ if (GVAR(advancedCorrections)) then { ["LandVehicle", "init", { params ["_vehicle"]; - private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _vehicle; + private _vehicleCfg = configOf _vehicle; // config "ace_artillerytables_applyCorrections" [0 disabled, 1 enabled] falls back to artilleryScanner private _applyCorrections = if (isNumber (_vehicleCfg >> QGVAR(applyCorrections))) then { getNumber (_vehicleCfg >> QGVAR(applyCorrections)) diff --git a/addons/artillerytables/config.cpp b/addons/artillerytables/config.cpp index 4f5048e5ae..eadb5c2a24 100644 --- a/addons/artillerytables/config.cpp +++ b/addons/artillerytables/config.cpp @@ -4,7 +4,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; units[] = {}; - weapons[] = {}; + weapons[] = {"ACE_artilleryTable"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; author = ECSTRING(common,ACETeam); diff --git a/addons/artillerytables/dev/checkConfigs.sqf b/addons/artillerytables/dev/checkConfigs.sqf index 91627edbf6..1dfcea7f9f 100644 --- a/addons/artillerytables/dev/checkConfigs.sqf +++ b/addons/artillerytables/dev/checkConfigs.sqf @@ -1,3 +1,4 @@ +//pragma SKIP_COMPILE diag_log text "-------------------------------------------"; INFO("Showing entries with custom configs"); diag_log text "-------------------------------------------"; @@ -7,7 +8,7 @@ private _fnc_showPropertyDefined = { params ["_configBase", "_configProperty"]; private _customAll = configProperties [_configBase, 'isClass _x && {isNumber (_x >> _configProperty)}', true]; - private _customExplicit = _customAll select {!([] isEqualTo configProperties [_x, 'configName _x == _configProperty', false])}; + private _customExplicit = _customAll select {[] isNotEqualTo configProperties [_x, 'configName _x == _configProperty', false]}; diag_log text format ["%1 with custom %2: %3 Explicit, %4 Total]", configName _configBase, _configProperty, count _customExplicit, count _customAll]; diag_log text format [" - Defined: %1", _customExplicit apply {configName _x}]; diag_log text format [" - Inherited: %1", _customAll apply {[configName _x, getNumber (_x >> _configProperty)]}]; diff --git a/addons/artillerytables/dev/showShotInfo.sqf b/addons/artillerytables/dev/showShotInfo.sqf index 81a29dca22..aab2f0ef5f 100644 --- a/addons/artillerytables/dev/showShotInfo.sqf +++ b/addons/artillerytables/dev/showShotInfo.sqf @@ -1,3 +1,4 @@ +//pragma SKIP_COMPILE // #include "\z\ace\addons\artillerytables\script_component.hpp" INFO("showing shot info"); diff --git a/addons/artillerytables/functions/fnc_interactMenuOpened.sqf b/addons/artillerytables/functions/fnc_interactMenuOpened.sqf index 849be932ce..8e396a0f13 100644 --- a/addons/artillerytables/functions/fnc_interactMenuOpened.sqf +++ b/addons/artillerytables/functions/fnc_interactMenuOpened.sqf @@ -26,7 +26,7 @@ private _rangeTablesShown = ace_player getVariable [QGVAR(rangeTablesShown), []] TRACE_2("searching for new vehicles",_vehicleAdded,_rangeTablesShown); { - private _vehicleCfg = configFile >> "CfgVehicles" >> typeOf _x; + private _vehicleCfg = configOf _x; // config "ace_artillerytables_showRangetable" [0 disabled, 1 enabled] falls back to artilleryScanner private _showRangetable = if (isNumber (_vehicleCfg >> QGVAR(showRangetable))) then { getNumber (_vehicleCfg >> QGVAR(showRangetable)) diff --git a/addons/artillerytables/functions/fnc_rangeTableOpen.sqf b/addons/artillerytables/functions/fnc_rangeTableOpen.sqf index 754c10356c..b96101bfce 100644 --- a/addons/artillerytables/functions/fnc_rangeTableOpen.sqf +++ b/addons/artillerytables/functions/fnc_rangeTableOpen.sqf @@ -47,6 +47,7 @@ _mags = _mags apply { _magParamsArray pushBackUnique _airFriction; [getText (_magCfg >> _x >> "displayNameShort"), getText (_magCfg >> _x >> "displayName"), _initSpeed, _airFriction] }; +_mags = _mags arrayIntersect _mags; TRACE_2("",_magParamsArray,_mags); if ((count _magParamsArray) == 2) then { // test if all magazines share the parameters _mags = [["", "All Magazines", (_mags select 0) select 2, (_mags select 0) select 3]]; // simplify diff --git a/addons/artillerytables/initSettings.sqf b/addons/artillerytables/initSettings.sqf index c578901e2e..0a909ae41b 100644 --- a/addons/artillerytables/initSettings.sqf +++ b/addons/artillerytables/initSettings.sqf @@ -10,7 +10,7 @@ private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art" true, // isGlobal {[QGVAR(advancedCorrections), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(disableArtilleryComputer), "CHECKBOX", @@ -20,4 +20,4 @@ private _categoryName = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art" true, // isGlobal {[QGVAR(disableArtilleryComputer), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/atragmx/CfgEventHandlers.hpp b/addons/atragmx/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/atragmx/CfgEventHandlers.hpp +++ b/addons/atragmx/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/atragmx/README.md b/addons/atragmx/README.md index 1b68573051..17245373cb 100644 --- a/addons/atragmx/README.md +++ b/addons/atragmx/README.md @@ -2,10 +2,3 @@ ace_atragmx =============== ATragMX - Handheld ballistics calculator - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/atragmx/RscTitles.hpp b/addons/atragmx/RscTitles.hpp index 834c4eb8af..896bc78ae0 100644 --- a/addons/atragmx/RscTitles.hpp +++ b/addons/atragmx/RscTitles.hpp @@ -126,7 +126,7 @@ class ATragMX_RscListBox { thumb="\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; }; - class ListScrollBar : ScrollBar { + class ListScrollBar: ScrollBar { }; }; class ATragMX_RscListNBox: ATragMX_RscListBox { diff --git a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf index be6ebd1eda..e3dfe5b6a4 100644 --- a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf @@ -60,7 +60,7 @@ if (_parseInput) then { _subsonicDrop = _transonicDrop max _subsonicDrop; }; -if ((GVAR(truingDropDropData) select 0) == 0 || {!([_transonicRange, _subsonicRange] isEqualTo GVAR(truingDropRangeData))}) then { +if ((GVAR(truingDropDropData) select 0) == 0 || {[_transonicRange, _subsonicRange] isNotEqualTo GVAR(truingDropRangeData)}) then { if (isNil QGVAR(targetSolutionInput)) then { call FUNC(calculate_target_solution); }; diff --git a/addons/attach/CfgEventHandlers.hpp b/addons/attach/CfgEventHandlers.hpp index 7bb7a9bae5..0da123e61b 100644 --- a/addons/attach/CfgEventHandlers.hpp +++ b/addons/attach/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_clientInit)); }; }; class Extended_GetIn_EventHandlers { diff --git a/addons/attach/CfgVehicles.hpp b/addons/attach/CfgVehicles.hpp index ce0d7df21a..189853dcf9 100644 --- a/addons/attach/CfgVehicles.hpp +++ b/addons/attach/CfgVehicles.hpp @@ -86,6 +86,10 @@ class CfgVehicles { dayLight = 0; onlyInNvg = 1; useFlare = 0; + maxLifetime = "8 * 60 * 60"; + blinkingPattern[] = {0.1, 1.1}; // 0.1 s on, 1.1 s off + blinkingStartsOn = 1; + blinkingPatternGuarantee = 1; }; side = 7;//-1=NO_SIDE yellow box,3=CIV grey box,4=NEUTRAL yellow box,6=FRIENDLY green box,7=LOGIC no radar signature @@ -102,6 +106,12 @@ class CfgVehicles { brightness = 10; }; + class NVG_TargetBase: All { + class NVGMarker { + maxLifetime = "8 * 60 * 60"; + }; + }; + class NATO_Box_Base; class Box_NATO_Support_F: NATO_Box_Base { class TransportItems { diff --git a/addons/attach/README.md b/addons/attach/README.md index 3bce88839c..21fa4f1bf6 100644 --- a/addons/attach/README.md +++ b/addons/attach/README.md @@ -5,13 +5,3 @@ Introducing the ability to attach various throwables to yourself or vehicles, to #### Items Added: `ACE_IR_Strobe_Item` - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [esteldunedain](https://github.com/esteldunedain) -- [bux578](https://github.com/bux578) -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 4d43cf47e9..a6f091a689 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -38,12 +38,13 @@ private _onAttachText = format [localize LSTRING(Item_Attached), _onAttachText]; if (_unit == _attachToVehicle) then { //Self Attachment private _attachedItem = _itemVehClass createVehicle [0,0,0]; - _attachedItem attachTo [_unit, [0.05, -0.09, 0.1], "leftshoulder"]; + _attachedItem attachTo [_unit, [0.07, -0.06, 0.085], "leftshoulder", true]; if (!_silentScripted) then { _unit removeItem _itemClassname; // Remove item [_onAttachText, 2] call EFUNC(common,displayTextStructured); }; _unit setVariable [QGVAR(attached), [[_attachedItem, _itemClassname]], true]; + [QGVAR(attached), [_attachedItem, _itemClassname, _silentScripted]] call CBA_fnc_localEvent; } else { GVAR(placeAction) = PLACE_WAITING; @@ -74,7 +75,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment _virtualPosASL = _virtualPosASL vectorAdd ((positionCameraToWorld [0.3,0,0]) vectorDiff (positionCameraToWorld [0,0,0])); }; private _virtualPos = _virtualPosASL call EFUNC(common,ASLToPosition); - private _lineInterection = !((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isEqualTo []); + private _lineInterection = ((lineIntersectsSurfaces [eyePos ACE_player, _virtualPosASL, ACE_player]) isNotEqualTo []); //Don't allow placing in a bad position: if (_lineInterection && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;}; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 5ff12967ce..8c7a817891 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -46,10 +46,12 @@ if (isNull _attachedObject || {_itemName == ""}) exitWith {ERROR("Could not find private _isChemlight = _attachedObject isKindOf "Chemlight_base"; // Exit if can't add the item -if (!(_unit canAdd _itemName) && {!_isChemlight}) exitWith { - [localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured); +if (!([_unit, _itemName] call CBA_fnc_canAddItem) && {!_isChemlight}) exitWith { + [LELSTRING(common,Inventory_Full)] call EFUNC(common,displayTextStructured); }; +[QGVAR(detaching), [_attachedObject, _itemName, false]] call CBA_fnc_localEvent; + // Add item to inventory (unless it's a chemlight) if (!_isChemlight) then { _unit addItem _itemName; diff --git a/addons/attach/functions/fnc_handleGetIn.sqf b/addons/attach/functions/fnc_handleGetIn.sqf index b2203958a0..418c62ebfe 100644 --- a/addons/attach/functions/fnc_handleGetIn.sqf +++ b/addons/attach/functions/fnc_handleGetIn.sqf @@ -25,9 +25,10 @@ if (!local _unit) exitWith {}; private _attachedList = _unit getVariable [QGVAR(attached), []]; if (_attachedList isEqualTo []) exitWith {}; -(_attachedList select 0) params ["_xObject"]; +(_attachedList select 0) params ["_xObject", "_xItemName"]; if (!isNull _xObject) then { TRACE_1("detaching and moving attached light",_xObject); + [QGVAR(detaching), [_xObject, _xItemName, true]] call CBA_fnc_localEvent; detach _xObject; _xObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]); [{ diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index 2ae6f84b74..0e9595efd6 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -4,7 +4,7 @@ * Approves placement of the lightObject, scans for an appropriate location and attaches * A player can release the attachObject with it floating in mid-air. * This will use lineIntersectsSurfaces to scan towards the center of the vehicle to find a collision - * ArmA's collision detection is of couse terrible and often misses collisions (difference between what we see and collision LOD) + * Arma's collision detection is of couse terrible and often misses collisions (difference between what we see and collision LOD) * So it does multiple scans at slighly different angles * This is VERY computationaly intensive, but doesn't happen that often. * @@ -100,5 +100,6 @@ _unit removeItem _itemClassname; private _attachList = _attachToVehicle getVariable [QGVAR(attached), []]; _attachList pushBack [_attachedObject, _itemClassname]; _attachToVehicle setVariable [QGVAR(attached), _attachList, true]; +[QGVAR(attached), [_attachedObject, _itemClassname, false]] call CBA_fnc_localEvent; [_onAttachText, 2] call EFUNC(common,displayTextStructured); diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml index 44af699017..831c4384e4 100644 --- a/addons/attach/stringtable.xml +++ b/addons/attach/stringtable.xml @@ -154,23 +154,6 @@ 已取下萤光棒 Işık Çubuğu Söküldü - - No inventory space - Kein Platz im Inventar - Sin espacio en inventario - Brak miejsca w ekwipunku - Pas de place dans l'inventaire - Nedostatek místa v inventáři - Sem espaço no inventário - Non hai più spazio - Nincs több hely - В инвентаре нет места - インベントリに空きがない - 넣을 공간이 없음 - 無可用空間 - 无可用空间 - Envanter de alan yok - IR Strobe IR-Stroboskop diff --git a/addons/backpacks/CfgEventHandlers.hpp b/addons/backpacks/CfgEventHandlers.hpp index 20cf8f83bf..5fedbc4606 100644 --- a/addons/backpacks/CfgEventHandlers.hpp +++ b/addons/backpacks/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/backpacks/README.md b/addons/backpacks/README.md index 64e37f337b..58bcb36dbf 100644 --- a/addons/backpacks/README.md +++ b/addons/backpacks/README.md @@ -2,11 +2,3 @@ ace_backpacks ================= Adds indication when someone else opens your backpack (sound effect and camera shake). - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/backpacks/functions/fnc_backpackOpened.sqf b/addons/backpacks/functions/fnc_backpackOpened.sqf index 92897d72f5..50ab9891cc 100644 --- a/addons/backpacks/functions/fnc_backpackOpened.sqf +++ b/addons/backpacks/functions/fnc_backpackOpened.sqf @@ -30,7 +30,7 @@ private _sounds = [ QUOTE(PATHTO_R(sounds\zip_out.wav)) ]; -private _position = AGLToASL (_target modelToWorldVisual (_target selectionPosition "Spine3")); +private _position = _target modelToWorldVisualWorld (_target selectionPosition "Spine3"); playSound3D [ selectRandom _sounds, diff --git a/addons/ballistics/ACE_Arsenal_Stats.hpp b/addons/ballistics/ACE_Arsenal_Stats.hpp index 34a8b561e5..9e4982656b 100644 --- a/addons/ballistics/ACE_Arsenal_Stats.hpp +++ b/addons/ballistics/ACE_Arsenal_Stats.hpp @@ -34,7 +34,7 @@ class EGVAR(arsenal,stats) { displayName= CSTRING(statBallisticCoef); showText= 1; textStatement = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); private _ballisticCoef = getArray (_ammoCfg >> _stat select 1); _ballisticCoef sort false; format [ARR_4('%1 G%2 (%3)', _ballisticCoef select 0 ,getNumber (_ammoCfg >> _stat select 0), getText (_ammoCfg >> _stat select 2))]); - condition = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); !(getArray (_ammoCfg >> _stat select 1) isEqualTo [])); + condition = QUOTE(params[ARR_2('_stat', '_config')]; private _ammoCfg = (configFile >> 'CfgAmmo' >> (getText (_config >> 'ammo'))); (getArray (_ammoCfg >> _stat select 1) isNotEqualTo [])); tabs[] ={{}, {4}}; }; class ACE_bulletMass: statBase { diff --git a/addons/ballistics/CfgAmmo.hpp b/addons/ballistics/CfgAmmo.hpp index 37f1678e35..51e5c4ddd4 100644 --- a/addons/ballistics/CfgAmmo.hpp +++ b/addons/ballistics/CfgAmmo.hpp @@ -114,7 +114,7 @@ class CfgAmmo { caliber = 1.037; //~7mm RHA, ~22.4mm metal, probably still too high though as RHA is hardened. }; - class B_556x45_Ball : BulletBase { + class B_556x45_Ball: BulletBase { airFriction=-0.00130094; tracerScale = 1; tracerStartTime=0.073; // M856 tracer burns out to 800m @@ -130,7 +130,15 @@ class CfgAmmo { ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900}; ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6}; }; - class ACE_556x45_Ball_Mk262 : B_556x45_Ball { + + class B_556x45_dual: B_556x45_Ball { + airFriction = -0.00055; + ACE_ammoTempMuzzleVelocityShifts[] = {-2.655, -2.547, -2.285, -2.012, -1.698, -1.280, -0.764, -0.153, 0.596, 1.517, 2.619}; + ACE_muzzleVelocities[] = {268}; // at 21°C, at 15°C 267 m/s according with the 20Rnd_556x45_UW_mag initSpeed + ACE_barrelLengths[] = {457.2}; // according with the SDAR barrel length: https://en.wikipedia.org/wiki/Kel-Tec_RFB + }; + + class ACE_556x45_Ball_Mk262: B_556x45_Ball { airFriction=-0.00111805; ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -144,7 +152,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={624, 816, 832, 838}; ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0}; }; - class ACE_556x45_Ball_Mk318 : B_556x45_Ball { + class ACE_556x45_Ball_Mk318: B_556x45_Ball { airFriction=-0.0012588; ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -157,7 +165,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={780, 886, 950}; ACE_barrelLengths[]={254.0, 393.7, 508.0}; }; - class ACE_556x45_Ball_M995_AP : B_556x45_Ball { + class ACE_556x45_Ball_M995_AP: B_556x45_Ball { airFriction=-0.00126182; caliber=1.6; ACE_caliber=5.69; @@ -188,9 +196,7 @@ class CfgAmmo { ACE_muzzleVelocities[] = {743, 848, 891, 900}; // at 21°C, at 15°C {735, 840, 883, 892} according with the AKS initSpeed ACE_barrelLengths[] = {210, 314, 415, 508.0}; // respectively {AKS74U / AK105,AK12K / AK74 / default} }; - class B_56x15_dual: BulletBase { - tracerScale = 0.5; - }; + class B_580x42_Ball_F: BulletBase { // DBP87 airFriction = -0.00121087; ACE_caliber = 6; @@ -215,7 +221,7 @@ class CfgAmmo { ACE_barrelLengths[] = {640}; }; - class B_65x39_Caseless : BulletBase { + class B_65x39_Caseless: BulletBase { airFriction=-0.00077363; tracerScale = 1.1; //1.0; ACE_caliber=6.706; @@ -230,11 +236,11 @@ class CfgAmmo { ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4, 762.0}; }; class B_65x39_Case_yellow; - class ACE_65x39_Caseless_Tracer_Dim : B_65x39_Case_yellow { + class ACE_65x39_Caseless_Tracer_Dim: B_65x39_Case_yellow { nvgOnly = 1; }; class B_65x39_Caseless_green; - class ACE_65x39_Caseless_green_Tracer_Dim : B_65x39_Caseless_green { + class ACE_65x39_Caseless_green_Tracer_Dim: B_65x39_Caseless_green { nvgOnly = 1; }; class ACE_65x47_Ball_Scenar: B_65x39_Caseless { @@ -271,7 +277,7 @@ class CfgAmmo { class B_65x39_Minigun_Caseless: SubmunitionBullet { tracerScale = 1.1; //1.0; }; - class B_762x51_Ball : BulletBase { + class B_762x51_Ball: BulletBase { airFriction=-0.00103711; tracerScale = 1.2; //0.6; tracerStartTime=0.073; // Based on the British L5A1 which burns out to 1000m @@ -291,7 +297,7 @@ class CfgAmmo { class ACE_B_762x51_Tracer_Dim: B_762x51_Tracer_Yellow { nvgOnly = 1; }; - class ACE_762x51_Ball_M118LR : B_762x51_Ball { + class ACE_762x51_Ball_M118LR: B_762x51_Ball { airFriction=-0.00085157; caliber=1.8; hit=16; @@ -308,7 +314,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={750, 780, 790, 794}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class ACE_762x51_Ball_Mk316_Mod_0 : B_762x51_Ball { + class ACE_762x51_Ball_Mk316_Mod_0: B_762x51_Ball { airFriction=-0.00084311; caliber=1.8; hit=16; @@ -325,7 +331,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={775, 790, 805, 810}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class ACE_762x51_Ball_Mk319_Mod_0 : B_762x51_Ball { + class ACE_762x51_Ball_Mk319_Mod_0: B_762x51_Ball { airFriction=-0.00104515; caliber=1.5; hit=14; @@ -342,7 +348,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={838, 892, 910}; ACE_barrelLengths[]={330.2, 406.4, 508.0}; }; - class ACE_762x51_Ball_M993_AP : B_762x51_Ball { + class ACE_762x51_Ball_M993_AP: B_762x51_Ball { airFriction=-0.0010939; caliber=2.2; hit=11; @@ -358,7 +364,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={875, 910, 930}; ACE_barrelLengths[]={330.2, 406.4, 508.0}; }; - class ACE_762x51_Ball_Subsonic : B_762x51_Ball { + class ACE_762x51_Ball_Subsonic: B_762x51_Ball { airFriction=-0.00060194; caliber=1; hit=6; @@ -374,7 +380,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={305, 325, 335, 340}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball { + class ACE_762x67_Ball_Mk248_Mod_0: B_762x51_Ball { airFriction=-0.00072468; caliber=1.8; hit=17; @@ -391,7 +397,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={865, 900, 924}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball { + class ACE_762x67_Ball_Mk248_Mod_1: B_762x51_Ball { airFriction=-0.00063027; caliber=1.9; hit=18; @@ -408,7 +414,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={847, 867, 877}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball { + class ACE_762x67_Ball_Berger_Hybrid_OTM: B_762x51_Ball { airFriction=-0.000546; caliber=2.0; hit=19; @@ -440,7 +446,7 @@ class CfgAmmo { ACE_barrelLengths[]={406.4, 508.0, 604.5, 736.6}; }; class B_762x54_Tracer_Green; - class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green { + class ACE_762x54_Ball_7T2: B_762x54_Tracer_Green { airFriction=-0.00103739; typicalSpeed=800; tracerStartTime=0.073; // Based on the 7T2 which burns three seconds @@ -469,7 +475,7 @@ class CfgAmmo { ACE_muzzleVelocities[] = {658, 678, 723, 743, 753}; // at 21°C, at 15°C {650, 670, 715, 735, 745} according with the AKM,AK12,AK12U,RPK initSpeed ACE_barrelLengths[] = {254, 314, 415, 520, 590}; // respectively {default / AK104,AK15K / AK47,AKM,AK103,AK15 / SKS / RPK} }; - class B_9x21_Ball : BulletBase { + class B_9x21_Ball: BulletBase { airFriction=-0.00211064; tracerScale = 0.5; ACE_caliber=9.042; @@ -486,7 +492,7 @@ class CfgAmmo { class B_9x21_Ball_Tracer_Green: B_9x21_Ball { tracerScale = 0.5; }; - class ACE_9x19_Ball : B_9x21_Ball { + class ACE_9x19_Ball: B_9x21_Ball { airFriction=-0.00201185; ACE_caliber=9.017; ACE_bulletLength=15.494; @@ -499,7 +505,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={340, 370, 400}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class B_93x64_Ball : BulletBase { + class B_93x64_Ball: BulletBase { airFriction = -0.000808; // According with the G1 BC 0.515 and the SVDK muzzle velocity 780 m/s https://www.kalashnikov.ru/medialibrary/bd9/72_77.pdf#page=3 ACE_caliber = 9.28; // https://www.kalashnikov.ru/medialibrary/bd9/72_77.pdf#page=3 ACE_bulletLength = 35.56; // Average length from bullets with similar mass and BC @@ -513,7 +519,7 @@ class CfgAmmo { ACE_muzzleVelocities[] = {768, 788, 798}; // Default values - 82 m/s at 21°C, at 15°C {760, 780, 790} according with the 10Rnd_93x64_DMR_05_Mag and the 150Rnd_93x64_Mag initSpeed ACE_barrelLengths[] = {508.0, 620.0, 660.4}; }; - class B_408_Ball : BulletBase { + class B_408_Ball: BulletBase { timeToLive=10; airFriction=-0.00046249; tracerScale = 1.3; @@ -530,7 +536,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={867}; ACE_barrelLengths[]={736.6}; }; - class ACE_408_Ball : BulletBase { + class ACE_408_Ball: BulletBase { timeToLive=10; airFriction=-0.00065414; typicalSpeed=1067; @@ -548,7 +554,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={1067}; ACE_barrelLengths[]={736.6}; }; - class B_338_Ball : BulletBase { + class B_338_Ball: BulletBase { timeToLive=10; airFriction=-0.00060841; ACE_caliber=8.585; @@ -563,7 +569,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={880, 915, 925}; ACE_barrelLengths[]={508.0, 660.4, 711.2}; }; - class B_338_NM_Ball : BulletBase { + class B_338_NM_Ball: BulletBase { airFriction=-0.00053639; ACE_caliber=8.585; ACE_bulletLength=43.18; @@ -576,7 +582,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={790, 807, 820}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class ACE_338_Ball : B_338_Ball { + class ACE_338_Ball: B_338_Ball { timeToLive=10; airFriction=-0.00055706; typicalSpeed=826; @@ -592,7 +598,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={800, 820, 826, 830}; ACE_barrelLengths[]={508.0, 609.6, 673.1, 711.2}; }; - class ACE_338_Ball_API526 : B_338_Ball { + class ACE_338_Ball_API526: B_338_Ball { timeToLive=10; airFriction=-0.0006922; caliber=2.8; @@ -608,11 +614,12 @@ class CfgAmmo { ACE_dragModel=7; ACE_muzzleVelocities[]={880, 895, 900}; ACE_barrelLengths[]={508.0, 685.8, 711.2}; + EGVAR(vehicle_damage,incendiary) = 1.0; }; class B_127x33_Ball: BulletBase { tracerScale = 1.3; //1.2; }; - class B_127x54_Ball : BulletBase { + class B_127x54_Ball: BulletBase { airFriction=-0.00019568; tracerScale = 1.3;// ACE_caliber=12.954; @@ -626,7 +633,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={300}; ACE_barrelLengths[]={436.88}; }; - class B_127x99_Ball : BulletBase { + class B_127x99_Ball: BulletBase { timeToLive=10; airFriction=-0.00058679; tracerScale = 1.3; //1.2; @@ -642,7 +649,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={900}; ACE_barrelLengths[]={736.6}; }; - class ACE_127x99_API : B_127x99_Ball { + class ACE_127x99_API: B_127x99_Ball { timeToLive=10; airFriction=-0.00058679; tracerScale = 1.3;// @@ -659,8 +666,9 @@ class CfgAmmo { ACE_dragModel=1; ACE_muzzleVelocities[]={900}; ACE_barrelLengths[]={736.6}; + EGVAR(vehicle_damage,incendiary) = 1.0; }; - class ACE_127x99_Ball_AMAX : B_127x99_Ball { + class ACE_127x99_Ball_AMAX: B_127x99_Ball { timeToLive=10; airFriction=-0.00037397; caliber=3.0; @@ -676,7 +684,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={860}; ACE_barrelLengths[]={736.6}; }; - class B_127x108_Ball : BulletBase { + class B_127x108_Ball: BulletBase { timeToLive=10; airFriction=-0.00065098; tracerScale = 1.3; //1.5; @@ -695,7 +703,7 @@ class CfgAmmo { typicalSpeed = 820; airFriction = -0.00065098; }; - class B_45ACP_Ball : BulletBase { + class B_45ACP_Ball: BulletBase { airFriction=-0.00082143; tracerScale = 0.6; ACE_caliber=11.481; diff --git a/addons/ballistics/CfgEventHandlers.hpp b/addons/ballistics/CfgEventHandlers.hpp index 93e3311cf2..865276cfba 100644 --- a/addons/ballistics/CfgEventHandlers.hpp +++ b/addons/ballistics/CfgEventHandlers.hpp @@ -1,11 +1,11 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/ballistics/CfgMagazineWells.hpp b/addons/ballistics/CfgMagazineWells.hpp index 258b619e14..be00c64b2f 100644 --- a/addons/ballistics/CfgMagazineWells.hpp +++ b/addons/ballistics/CfgMagazineWells.hpp @@ -34,9 +34,7 @@ class CfgMagazineWells { class MX_65x39 { //Vanilla magwell ADDON[] = { - "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim", - "ACE_30Rnd_65x47_Scenar_mag", - "ACE_30Rnd_65_Creedmor_mag" + "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim" }; }; @@ -67,6 +65,15 @@ class CfgMagazineWells { }; }; + class CBA_556x45_SCAR_EGLM { + ADDON[] = { + "ACE_30Rnd_556x45_Stanag_M995_AP_mag", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + }; + class STANAG_556x45 { //Vanilla magwell ADDON[] = { "ACE_30Rnd_556x45_Stanag_M995_AP_mag", @@ -81,6 +88,9 @@ class CfgMagazineWells { "ACE_20Rnd_762x51_Mag_Tracer", "ACE_20Rnd_762x51_Mag_Tracer_Dim", "ACE_20Rnd_762x51_Mag_SD", + "ACE_10Rnd_762x51_Mag_Tracer", + "ACE_10Rnd_762x51_Mag_Tracer_Dim", + "ACE_10Rnd_762x51_Mag_SD", "ACE_10Rnd_762x51_M118LR_Mag", "ACE_10Rnd_762x51_Mk316_Mod_0_Mag", "ACE_10Rnd_762x51_Mk319_Mod_0_Mag", @@ -97,6 +107,9 @@ class CfgMagazineWells { "ACE_20Rnd_762x51_Mag_Tracer", "ACE_20Rnd_762x51_Mag_Tracer_Dim", "ACE_20Rnd_762x51_Mag_SD", + "ACE_10Rnd_762x51_Mag_Tracer", + "ACE_10Rnd_762x51_Mag_Tracer_Dim", + "ACE_10Rnd_762x51_Mag_SD", "ACE_10Rnd_762x51_M118LR_Mag", "ACE_10Rnd_762x51_Mk316_Mod_0_Mag", "ACE_10Rnd_762x51_Mk319_Mod_0_Mag", @@ -113,6 +126,9 @@ class CfgMagazineWells { "ACE_20Rnd_762x51_Mag_Tracer", "ACE_20Rnd_762x51_Mag_Tracer_Dim", "ACE_20Rnd_762x51_Mag_SD", + "ACE_10Rnd_762x51_Mag_Tracer", + "ACE_10Rnd_762x51_Mag_Tracer_Dim", + "ACE_10Rnd_762x51_Mag_SD", "ACE_10Rnd_762x51_M118LR_Mag", "ACE_10Rnd_762x51_Mk316_Mod_0_Mag", "ACE_10Rnd_762x51_Mk319_Mod_0_Mag", @@ -129,6 +145,9 @@ class CfgMagazineWells { "ACE_20Rnd_762x51_Mag_Tracer", "ACE_20Rnd_762x51_Mag_Tracer_Dim", "ACE_20Rnd_762x51_Mag_SD", + "ACE_10Rnd_762x51_Mag_Tracer", + "ACE_10Rnd_762x51_Mag_Tracer_Dim", + "ACE_10Rnd_762x51_Mag_SD", "ACE_10Rnd_762x51_M118LR_Mag", "ACE_10Rnd_762x51_Mk316_Mod_0_Mag", "ACE_10Rnd_762x51_Mk319_Mod_0_Mag", @@ -146,33 +165,27 @@ class CfgMagazineWells { "ACE_10Rnd_338_API526_Mag", "ACE_20Rnd_762x67_Mk248_Mod_0_Mag", "ACE_20Rnd_762x67_Mk248_Mod_1_Mag", - "ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag" + "ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag", + "ACE_10Rnd_762x67_Mk248_Mod_0_Mag", + "ACE_10Rnd_762x67_Mk248_Mod_1_Mag", + "ACE_10Rnd_762x67_Berger_Hybrid_OTM_Mag" }; }; class CBA_65C_AR10 { ADDON[] = { - "ACE_30Rnd_65_Creedmor_mag", "ACE_20Rnd_65_Creedmor_mag", - "ACE_30Rnd_65x47_Scenar_mag", "ACE_20Rnd_65x47_Scenar_mag" }; }; - class CBA_338LM_AI { //338 Lapua Magnum Accuracy International - ADDON[] = { - "ACE_10Rnd_338_300gr_HPBT_Mag", - "ACE_10Rnd_338_API526_Mag" - }; - }; - class CBA_408CT_Inter { ADDON[] = { "ACE_7Rnd_408_305gr_Mag" }; }; - class CBA_50BMG_M107 { + class CBA_50BMG_AS50 { ADDON[] = { "ACE_5Rnd_127x99_Mag", "ACE_5Rnd_127x99_API_Mag", @@ -180,6 +193,14 @@ class CfgMagazineWells { }; }; + class CBA_50BMG_M107 { + ADDON[] = { + "ACE_10Rnd_127x99_Mag", + "ACE_10Rnd_127x99_API_Mag", + "ACE_10Rnd_127x99_AMAX_Mag" + }; + }; + class CBA_9x19_P226 { // SIG P226 ADDON[] = { "ACE_16Rnd_9x19_mag" diff --git a/addons/ballistics/CfgMagazines.hpp b/addons/ballistics/CfgMagazines.hpp index 175d2687d0..999987a24b 100644 --- a/addons/ballistics/CfgMagazines.hpp +++ b/addons/ballistics/CfgMagazines.hpp @@ -130,6 +130,9 @@ class CfgMagazines { class 30Rnd_65x39_caseless_mag: CA_Magazine { initSpeed = 774; }; + class 30Rnd_65x39_caseless_black_mag; + class 30Rnd_65x39_caseless_khaki_mag; + class 30Rnd_65x39_caseless_msbs_mag; class 30Rnd_65x39_caseless_green: 30Rnd_65x39_caseless_mag { initSpeed = 788; @@ -260,6 +263,8 @@ class CfgMagazines { initSpeed = 827; }; + class 10Rnd_Mk14_762x51_Mag; + class 10Rnd_762x51_Mag: 20Rnd_762x51_Mag { initSpeed = 833; }; @@ -298,7 +303,33 @@ class CfgMagazines { initSpeed = 330; }; - class ACE_10Rnd_762x51_M118LR_Mag: 10Rnd_762x51_Mag { + class ACE_10Rnd_762x51_Mag_Tracer: 10Rnd_Mk14_762x51_Mag { + author = ECSTRING(common,ACETeam); + ammo = "B_762x51_Tracer_Red"; + displayName = CSTRING(10Rnd_762x51_mag_TracerName); + displayNameShort = CSTRING(10Rnd_762x51_mag_TracerNameShort); + descriptionShort = CSTRING(10Rnd_762x51_mag_TracerDescription); + tracersEvery = 1; + }; + + class ACE_10Rnd_762x51_Mag_Tracer_Dim: ACE_10Rnd_762x51_Mag_Tracer { + author = ECSTRING(common,ACETeam); + ammo = "ACE_B_762x51_Tracer_Dim"; + displayName = CSTRING(10Rnd_762x51_mag_Tracer_DimName); + displayNameShort = CSTRING(10Rnd_762x51_mag_Tracer_DimNameShort); + descriptionShort = CSTRING(10Rnd_762x51_mag_Tracer_DimDescription); + }; + + class ACE_10Rnd_762x51_Mag_SD: 10Rnd_Mk14_762x51_Mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_762x51_Ball_Subsonic"; + displayName = CSTRING(10Rnd_762x51_mag_SDName); + displayNameShort = CSTRING(10Rnd_762x51_mag_SDNameShort); + descriptionShort = CSTRING(10Rnd_762x51_mag_SDDescription); + initSpeed = 330; + }; + + class ACE_10Rnd_762x51_M118LR_Mag: 10Rnd_Mk14_762x51_Mag { author = ECSTRING(common,ACETeam); ammo = "ACE_762x51_Ball_M118LR"; count = 10; @@ -308,7 +339,7 @@ class CfgMagazines { initSpeed = 780; }; - class ACE_10Rnd_762x51_Mk316_Mod_0_Mag: 10Rnd_762x51_Mag { + class ACE_10Rnd_762x51_Mk316_Mod_0_Mag: 10Rnd_Mk14_762x51_Mag { author = ECSTRING(common,ACETeam); ammo = "ACE_762x51_Ball_Mk316_Mod_0"; count = 10; @@ -318,7 +349,7 @@ class CfgMagazines { initSpeed = 790; }; - class ACE_10Rnd_762x51_Mk319_Mod_0_Mag: 10Rnd_762x51_Mag { + class ACE_10Rnd_762x51_Mk319_Mod_0_Mag: 10Rnd_Mk14_762x51_Mag { author = ECSTRING(common,ACETeam); ammo = "ACE_762x51_Ball_Mk319_Mod_0"; count = 10; @@ -328,7 +359,7 @@ class CfgMagazines { initSpeed = 900; }; - class ACE_10Rnd_762x51_M993_AP_Mag: 10Rnd_762x51_Mag { + class ACE_10Rnd_762x51_M993_AP_Mag: 10Rnd_Mk14_762x51_Mag { author = ECSTRING(common,ACETeam); ammo = "ACE_762x51_Ball_M993_AP"; count = 10; @@ -376,33 +407,6 @@ class CfgMagazines { initSpeed = 930; }; - class ACE_20Rnd_762x67_Mk248_Mod_0_Mag: 20Rnd_762x51_Mag { - author = ECSTRING(common,ACETeam); - ammo = "ACE_762x67_Ball_Mk248_Mod_0"; - displayName = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_Name); - displayNameShort = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_NameShort); - descriptionShort = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_Description); - initSpeed = 865; - }; - - class ACE_20Rnd_762x67_Mk248_Mod_1_Mag: 20Rnd_762x51_Mag { - author = ECSTRING(common,ACETeam); - ammo = "ACE_762x67_Ball_Mk248_Mod_1"; - displayName = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_Name); - displayNameShort = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_NameShort); - descriptionShort = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_Description); - initSpeed = 847; - }; - - class ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag: 20Rnd_762x51_Mag { - author = ECSTRING(common,ACETeam); - ammo = "ACE_762x67_Ball_Berger_Hybrid_OTM"; - displayName = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_Name); - displayNameShort = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_NameShort); - descriptionShort = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_Description); - initSpeed = 800; - }; - class ACE_30Rnd_65x47_Scenar_mag: 30Rnd_65x39_caseless_mag { author = ECSTRING(common,ACETeam); ammo = "ACE_65x47_Ball_Scenar"; @@ -411,6 +415,22 @@ class CfgMagazines { displayNameShort = CSTRING(30Rnd_65x47_Scenar_mag_NameShort); descriptionShort = CSTRING(30Rnd_65x47_Scenar_mag_Description); }; + class ACE_30Rnd_65x47_Scenar_black_mag: 30Rnd_65x39_caseless_black_mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_65x47_Ball_Scenar"; + initSpeed = 826; + displayName = CSTRING(30Rnd_65x47_Scenar_black_mag_Name); + displayNameShort = CSTRING(30Rnd_65x47_Scenar_mag_NameShort); + descriptionShort = CSTRING(30Rnd_65x47_Scenar_mag_Description); + }; + class ACE_30Rnd_65x47_Scenar_khaki_mag: 30Rnd_65x39_caseless_khaki_mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_65x47_Ball_Scenar"; + initSpeed = 826; + displayName = CSTRING(30Rnd_65x47_Scenar_khaki_mag_Name); + displayNameShort = CSTRING(30Rnd_65x47_Scenar_mag_NameShort); + descriptionShort = CSTRING(30Rnd_65x47_Scenar_mag_Description); + }; class ACE_20Rnd_65x47_Scenar_mag: 20Rnd_650x39_Cased_Mag_F { author = ECSTRING(common,ACETeam); @@ -421,6 +441,15 @@ class CfgMagazines { descriptionShort = CSTRING(20Rnd_65x47_Scenar_mag_Description); }; + class ACE_30Rnd_65x47_Scenar_msbs_mag: 30Rnd_65x39_caseless_msbs_mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_65x47_Ball_Scenar"; + initSpeed = 826; + displayName = CSTRING(30Rnd_65x47_Scenar_msbs_mag_Name); + displayNameShort = CSTRING(30Rnd_65x47_Scenar_mag_NameShort); + descriptionShort = CSTRING(30Rnd_65x47_Scenar_msbs_mag_Description); + }; + class ACE_30Rnd_65_Creedmor_mag: 30Rnd_65x39_caseless_mag { author = ECSTRING(common,ACETeam); ammo = "ACE_65_Creedmor_Ball"; @@ -429,6 +458,22 @@ class CfgMagazines { displayNameShort = CSTRING(30Rnd_65_Creedmor_mag_NameShort); descriptionShort = CSTRING(30Rnd_65_Creedmor_mag_Description); }; + class ACE_30Rnd_65_Creedmor_black_mag: 30Rnd_65x39_caseless_black_mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_65_Creedmor_Ball"; + initSpeed = 857; + displayName = CSTRING(30Rnd_65_Creedmor_black_mag_Name); + displayNameShort = CSTRING(30Rnd_65_Creedmor_mag_NameShort); + descriptionShort = CSTRING(30Rnd_65_Creedmor_mag_Description); + }; + class ACE_30Rnd_65_Creedmor_khaki_mag: 30Rnd_65x39_caseless_khaki_mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_65_Creedmor_Ball"; + initSpeed = 857; + displayName = CSTRING(30Rnd_65_Creedmor_khaki_mag_Name); + displayNameShort = CSTRING(30Rnd_65_Creedmor_mag_NameShort); + descriptionShort = CSTRING(30Rnd_65_Creedmor_mag_Description); + }; class ACE_20Rnd_65_Creedmor_mag: 20Rnd_650x39_Cased_Mag_F { author = ECSTRING(common,ACETeam); @@ -439,6 +484,15 @@ class CfgMagazines { descriptionShort = CSTRING(20Rnd_65_Creedmor_mag_Description); }; + class ACE_30Rnd_65_Creedmor_msbs_mag: 30Rnd_65x39_caseless_msbs_mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_65_Creedmor_Ball"; + initSpeed = 857; + displayName = CSTRING(30Rnd_65_Creedmor_msbs_mag_Name); + displayNameShort = CSTRING(30Rnd_65_Creedmor_mag_NameShort); + descriptionShort = CSTRING(30Rnd_65_Creedmor_msbs_mag_Description); + }; + class 10Rnd_338_Mag: CA_Magazine { initSpeed = 880; }; @@ -461,6 +515,69 @@ class CfgMagazines { initSpeed = 880; }; + class ACE_20Rnd_762x67_Mk248_Mod_0_Mag: 10Rnd_338_Mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_762x67_Ball_Mk248_Mod_0"; + count = 20; + scope = 1; // backwards compatibility only + mass = 28; // 10Rnd_338_Mag mass * 2 + displayName = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_Name); + displayNameShort = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_NameShort); + descriptionShort = CSTRING(20Rnd_762x67_Mk248_Mod_0_Mag_Description); + initSpeed = 865; + }; + + class ACE_20Rnd_762x67_Mk248_Mod_1_Mag: 10Rnd_338_Mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_762x67_Ball_Mk248_Mod_1"; + count = 20; + scope = 1; + mass = 28; + displayName = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_Name); + displayNameShort = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_NameShort); + descriptionShort = CSTRING(20Rnd_762x67_Mk248_Mod_1_Mag_Description); + initSpeed = 847; + }; + + class ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag: 10Rnd_338_Mag { + author = ECSTRING(common,ACETeam); + ammo = "ACE_762x67_Ball_Berger_Hybrid_OTM"; + count = 20; + scope = 1; + mass = 28; + displayName = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_Name); + displayNameShort = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_NameShort); + descriptionShort = CSTRING(20Rnd_762x67_Berger_Hybrid_OTM_Mag_Description); + initSpeed = 800; + }; + + class ACE_10Rnd_762x67_Mk248_Mod_0_Mag: ACE_20Rnd_762x67_Mk248_Mod_0_Mag { + scope = 2; + count = 10; + mass = 14; // same as 10Rnd_338_Mag + displayName = CSTRING(10Rnd_762x67_Mk248_Mod_0_Mag_Name); + displayNameShort = CSTRING(10Rnd_762x67_Mk248_Mod_0_Mag_NameShort); + descriptionShort = CSTRING(10Rnd_762x67_Mk248_Mod_0_Mag_Description); + }; + + class ACE_10Rnd_762x67_Mk248_Mod_1_Mag: ACE_20Rnd_762x67_Mk248_Mod_1_Mag { + scope = 2; + count = 10; + mass = 14; + displayName = CSTRING(10Rnd_762x67_Mk248_Mod_1_Mag_Name); + displayNameShort = CSTRING(10Rnd_762x67_Mk248_Mod_1_Mag_NameShort); + descriptionShort = CSTRING(10Rnd_762x67_Mk248_Mod_1_Mag_Description); + }; + + class ACE_10Rnd_762x67_Berger_Hybrid_OTM_Mag: ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag { + scope = 2; + count = 10; + mass = 14; + displayName = CSTRING(10Rnd_762x67_Berger_Hybrid_OTM_Mag_Name); + displayNameShort = CSTRING(10Rnd_762x67_Berger_Hybrid_OTM_Mag_NameShort); + descriptionShort = CSTRING(10Rnd_762x67_Berger_Hybrid_OTM_Mag_Description); + }; + class 7Rnd_408_Mag: CA_Magazine { initSpeed = 867; }; @@ -483,7 +600,7 @@ class CfgMagazines { author = ECSTRING(common,ACETeam); ammo = "B_127x99_Ball"; displayName = CSTRING(5Rnd_127x99_Mag_Name); - displayNameShort = CSTRING(5Rnd_127x99_Mag_NameShort); + displayNameShort = CSTRING(127x99_Mag_NameShort); descriptionShort = CSTRING(5Rnd_127x99_Mag_Description); initSpeed = 900; }; @@ -492,7 +609,7 @@ class CfgMagazines { author = ECSTRING(common,ACETeam); ammo = "ACE_127x99_API"; displayName = CSTRING(5Rnd_127x99_API_Mag_Name); - displayNameShort = CSTRING(5Rnd_127x99_API_Mag_NameShort); + displayNameShort = CSTRING(127x99_API_Mag_NameShort); descriptionShort = CSTRING(5Rnd_127x99_API_Mag_Description); initSpeed = 900; }; @@ -501,11 +618,35 @@ class CfgMagazines { author = ECSTRING(common,ACETeam); ammo = "ACE_127x99_Ball_AMAX"; displayName = CSTRING(5Rnd_127x99_AMAX_Mag_Name); - displayNameShort = CSTRING(5Rnd_127x99_AMAX_Mag_NameShort); + displayNameShort = CSTRING(127x99_AMAX_Mag_NameShort); descriptionShort = CSTRING(5Rnd_127x99_AMAX_Mag_Description); initSpeed = 860; }; + class ACE_10Rnd_127x99_Mag: ACE_5Rnd_127x99_Mag { + count = 10; + mass = 32; // 5Rnd_127x108_Mag mass * 2 + displayName = CSTRING(10Rnd_127x99_Mag_Name); + displayNameShort = CSTRING(127x99_Mag_NameShort); + descriptionShort = CSTRING(10Rnd_127x99_Mag_Description); + }; + + class ACE_10Rnd_127x99_API_Mag: ACE_5Rnd_127x99_API_Mag { + count = 10; + mass = 32; + displayName = CSTRING(10Rnd_127x99_API_Mag_Name); + displayNameShort = CSTRING(127x99_API_Mag_NameShort); + descriptionShort = CSTRING(10Rnd_127x99_API_Mag_Description); + }; + + class ACE_10Rnd_127x99_AMAX_Mag: ACE_5Rnd_127x99_AMAX_Mag { + count = 10; + mass = 32; + displayName = CSTRING(10Rnd_127x99_AMAX_Mag_Name); + displayNameShort = CSTRING(127x99_AMAX_Mag_NameShort); + descriptionShort = CSTRING(10Rnd_127x99_AMAX_Mag_Description); + }; + class 30Rnd_9x21_Mag: CA_Magazine { initSpeed = 430; }; @@ -530,7 +671,7 @@ class CfgMagazines { initSpeed = 254; }; - class 6Rnd_45ACP_Cylinder : 11Rnd_45ACP_Mag { + class 6Rnd_45ACP_Cylinder: 11Rnd_45ACP_Mag { initSpeed = 254; }; diff --git a/addons/ballistics/CfgVehicles.hpp b/addons/ballistics/CfgVehicles.hpp index 091e734c44..5632507530 100644 --- a/addons/ballistics/CfgVehicles.hpp +++ b/addons/ballistics/CfgVehicles.hpp @@ -13,9 +13,7 @@ class CfgVehicles { class NATO_Box_Base; class Box_NATO_Wps_F: NATO_Box_Base { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); }; }; @@ -37,9 +35,7 @@ class CfgVehicles { class Box_NATO_Ammo_F: NATO_Box_Base { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4); @@ -83,9 +79,7 @@ class CfgVehicles { class ReammoBox_F; class B_supplyCrate_F: ReammoBox_F { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x51_M118LR_Mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_762x51_M118LR_Mag,4); @@ -102,9 +96,7 @@ class CfgVehicles { class Box_East_Wps_F: EAST_Box_Base { class TransportMagazines { MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); - MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_580x42_DBP88_Mag,4); }; @@ -115,9 +107,7 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_30Rnd_556x45_Stanag_Tracer_Dim,1); MACRO_ADDMAGAZINE(ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim,4); MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); - MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_580x42_DBP88_Mag,4); }; @@ -126,9 +116,7 @@ class CfgVehicles { class Box_East_Ammo_F: EAST_Box_Base { class TransportMagazines { MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); - MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_580x42_DBP88_Mag,4); }; @@ -137,9 +125,7 @@ class CfgVehicles { class Box_East_Support_F: EAST_Box_Base { class TransportMagazines { MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); - MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_762x54_Tracer_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_580x42_DBP88_Mag,4); }; @@ -203,9 +189,7 @@ class CfgVehicles { class C_supplyCrate_F: ReammoBox_F { class TransportMagazines { - MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); - MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); }; }; @@ -244,14 +228,19 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_200Rnd_65x39_cased_Box_Tracer_Dim,4); MACRO_ADDMAGAZINE(ACE_20Rnd_65x47_Scenar_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_65x47_Scenar_msbs_mag,4); MACRO_ADDMAGAZINE(ACE_20Rnd_65_Creedmor_mag,4); MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_mag,4); + MACRO_ADDMAGAZINE(ACE_30Rnd_65_Creedmor_msbs_mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_300gr_HPBT_Mag,4); MACRO_ADDMAGAZINE(ACE_10Rnd_338_API526_Mag,4); MACRO_ADDMAGAZINE(ACE_7Rnd_408_305gr_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_API_Mag,4); MACRO_ADDMAGAZINE(ACE_5Rnd_127x99_AMAX_Mag,4); + MACRO_ADDMAGAZINE(ACE_10Rnd_127x99_Mag,4); + MACRO_ADDMAGAZINE(ACE_10Rnd_127x99_API_Mag,4); + MACRO_ADDMAGAZINE(ACE_10Rnd_127x99_AMAX_Mag,4); }; class AnimationSources { class Ammo_source { diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp index 8bb00972e7..2dfc62b754 100644 --- a/addons/ballistics/CfgWeapons.hpp +++ b/addons/ballistics/CfgWeapons.hpp @@ -13,7 +13,7 @@ class CfgWeapons { ACE_barrelTwist = 381.0; initSpeed = -1.0; magazineWell[] += { - "CBA_50BMG_M107" + "CBA_50BMG_AS50" }; // empty in vanilla }; @@ -59,7 +59,7 @@ class CfgWeapons { ACE_barrelTwist = 254.0; initSpeed = -0.991536; magazineWell[] += { - "CBA_762x51_M14" + "CBA_762x51_SR25" }; // vanilla magazineWell[] = {"M14_762x51"}; }; @@ -80,8 +80,7 @@ class CfgWeapons { }; // M14 - class DMR_06_base_F: Rifle_Long_Base_F {}; - class srifle_DMR_06_camo_F: DMR_06_base_F { + class DMR_06_base_F: Rifle_Long_Base_F { ACE_barrelLength = 558.8; ACE_barrelTwist = 304.8; initSpeed = -0.999395; @@ -153,6 +152,34 @@ class CfgWeapons { ACE_barrelLength = 457.2; ACE_barrelTwist = 228.6; initSpeed = -1.0; + magazines[] += { // 6.5C Rechambering, MXM only + "ACE_30Rnd_65_Creedmor_mag", + "ACE_30Rnd_65x47_Scenar_mag", + "ACE_30Rnd_65_Creedmor_black_mag", + "ACE_30Rnd_65_Creedmor_khaki_mag", + "ACE_30Rnd_65x47_Scenar_black_mag", + "ACE_30Rnd_65x47_Scenar_khaki_mag" + }; + }; + class arifle_MXM_Black_F: arifle_MXM_F { // bleh inheritance + magazines[] += { + "ACE_30Rnd_65_Creedmor_mag", + "ACE_30Rnd_65x47_Scenar_mag", + "ACE_30Rnd_65_Creedmor_black_mag", + "ACE_30Rnd_65_Creedmor_khaki_mag", + "ACE_30Rnd_65x47_Scenar_black_mag", + "ACE_30Rnd_65x47_Scenar_khaki_mag" + }; + }; + class arifle_MXM_khk_F: arifle_MXM_Black_F { + magazines[] += { + "ACE_30Rnd_65_Creedmor_mag", + "ACE_30Rnd_65x47_Scenar_mag", + "ACE_30Rnd_65_Creedmor_black_mag", + "ACE_30Rnd_65_Creedmor_khaki_mag", + "ACE_30Rnd_65x47_Scenar_black_mag", + "ACE_30Rnd_65x47_Scenar_khaki_mag" + }; }; // MX @@ -330,6 +357,10 @@ class CfgWeapons { class arifle_MSBS65_Mark_base_F: arifle_MSBS65_base_F { ACE_barrelLength = 508; // 20" initSpeed = -1.007752; // 774*1.007752= 780 m/s according with the ACE_muzzleVelocities at 15°C + magazines[] += { // 6.5C Rechambering, only available for Grot MR + "ACE_30Rnd_65_Creedmor_msbs_mag", + "ACE_30Rnd_65x47_Scenar_msbs_mag" + }; }; // QBZ-95-1 diff --git a/addons/ballistics/README.md b/addons/ballistics/README.md index 18d81bceb3..54a7cf5e76 100644 --- a/addons/ballistics/README.md +++ b/addons/ballistics/README.md @@ -2,12 +2,3 @@ ace_ballistics ============== Changes to weapon, magazine and ammunition values. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index d5656ff728..967e00b9cd 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -171,30 +171,30 @@ #4 Картечь - #7 Birdshot - Perdigones #7 - #7 Vogelschrot - #7 鹿彈 - #7 Birdshot - #7 バックショット + #4 Birdshot + Perdigones #4 + #4 Vogelschrot + #4 鹿彈 + #4 Birdshot + #4 バックショット Grenaille No.4 - #7 Broky malé - #7 Śrut Drobny - #7 Küçük saçma - #7 Дробь + #4 Broky malé + #4 Śrut Drobny + #4 Küçük saçma + #4 Дробь - #7 Birdshot - Perdigones #7 - #7 Vogelschrot - #7 鹿彈 - #7 Birdshot - #7 バックショット + #4 Birdshot + Perdigones #4 + #4 Vogelschrot + #4 鹿彈 + #4 Birdshot + #4 バックショット Grenaille No.4 - #7 Broky malé - kalibr 2.54 mm - #7 Śrut Drobny (Birdshot) - #7 Küçük saçma - #7 Дробь + #4 Broky malé - kalibr 3.3 mm + #4 Śrut Drobny (Birdshot) + #4 Küçük saçma + #4 Дробь 12 Gauge 2Rnd #00 Buckshot @@ -281,18 +281,18 @@ 12 kalibre 2 mermi #4 İrisaçma - 12 Gauge 2Rnd #7 Birdshot - 2 Cartuchos de Perdigones Calibre 12 #7 - 12 Gauge 2Schuss #7 Schrotmunition - 12鉛徑 2發 #7 鹿彈 - 12 Gauge 2Rnd #7 Birdshot - 12 ゲージ 2 発入り #7 バックショット + 12 Gauge 2Rnd #4 Birdshot + 2 Cartuchos de Perdigones Calibre 12 #4 + 12 Gauge 2Schuss #4 Schrotmunition + 12鉛徑 2發 #4 鹿彈 + 12 Gauge 2Rnd #4 Birdshot + 12 ゲージ 2 発入り #4 バックショット 2 balles cal. 12 Grenaille No.4 - 2x #7 Broky malé (kalibr 2.54 mm) - 12 Gauge 2 naboje #7 Śrut - Chumbo #7 Calibre Doze 2 Tiros - 12 Калибр 2 патр. #7 Дробь - 12 kalibre 2 mermi #5 İrisaçma + 2x #4 Broky malé (kalibr 3.3 mm) + 12 Gauge 2 naboje #4 Śrut + Chumbo #4 Calibre Doze 2 Tiros + 12 Калибр 2 патр. #4 Дробь + 12 kalibre 2 mermi #4 İrisaçma 12 Gauge 6Rnd #00 Buckshot @@ -379,17 +379,17 @@ 12 kalibre 6 mermi #4 İrisaçma - 12 Gauge 6Rnd #7 Birdshot - 6 Cartuchos de Perdigones Calibre 12 #7 - 12 Gauge 6Schuss #7 Schrotmunition - 12鉛徑 6發 #7 鹿彈 - 12 Gauge 6Rnd #7 Birdshot - 12 ゲージ 6 発入り #7 バックショット + 12 Gauge 6Rnd #4 Birdshot + 6 Cartuchos de Perdigones Calibre 12 #4 + 12 Gauge 6Schuss #4 Schrotmunition + 12鉛徑 6發 #4 鹿彈 + 12 Gauge 6Rnd #4 Birdshot + 12 ゲージ 6 発入り #4 バックショット 6 balles cal. 12 Grenaille No.4 - 6x #7 Broky malé (kalibr 2.54 mm) - 12 Gauge 6 naboi #7 Śrut - 12 Калибр 6 патр. #7 Дробь - 12 kalibre 6 mermi #7 İrisaçma + 6x #4 Broky malé (kalibr 3.3 mm) + 12 Gauge 6 naboi #4 Śrut + 12 Калибр 6 патр. #4 Дробь + 12 kalibre 6 mermi #4 İrisaçma 12 Gauge 15Rnd #00 Buckshot @@ -407,671 +407,824 @@ - 6.5x47mm 20Rnd Mag (HPBT Scenar) - Ch. 6,5x47mm 20Cps (HPBT Scenar) - Cargador de 20 balas de 6.5x47mm (HPBT Scenar) - Magazynek 6,5x47mm 20rd (HPBT Scenar) + 6.5x47 mm 20Rnd Mag (HPBT Scenar) + Ch. 6,5x47 mm 20Cps (HPBT Scenar) + Cargador de 20 balas de 6.5x47 mm (HPBT Scenar) + Magazynek 6,5x47 mm 20rd (HPBT Scenar) Магазин из 20-ти 6,5x47 мм (экспансивные Scenar) - 6,5x47mm 20-Patronen-Magazin (HPBT Scenar) - 6.5x47mm 20Rnd Mag (HPBT Scenar) - 6.5x47mm 20náb. Zásobník (HPBT Scenar) - Carregador 6.5x47mm com 20 cartuchos (HPBT Scenar) - 6,5x47mm 20-lövedékes tár (HPBT Scenar) - 6.5x47mm 20発入り 弾倉 (HPBT Scenar) - 20발들이 6.5x47mm (HPBT Scenar) + 6,5x47 mm 20-Patronen-Magazin (HPBT Scenar) + 6.5x47 mm 20Rnd Mag (HPBT Scenar) + 6.5x47 mm 20náb. Zásobník (HPBT Scenar) + Carregador 6.5x47 mm com 20 cartuchos (HPBT Scenar) + 6,5x47 mm 20-lövedékes tár (HPBT Scenar) + 6.5x47 mm 20発入り 弾倉 (HPBT Scenar) + 20발들이 6.5x47 mm (HPBT Scenar) 6.5x47毫米 20發 彈匣 (拉普 空尖艇尾狙擊專用彈) - 6.5x47mm 20发 弹匣 (Lapua 空尖艇尾狙击专用弹) - 6.5x47mm 20Rnd Mag (HPBT Scenar) + 6.5x47 mm 20发 弹匣 (Lapua 空尖艇尾狙击专用弹) + 6.5x47 mm 20Rnd Mag (HPBT Scenar) - 6.5mm Lapua - 6,5mm Lapua - 6.5mm Lapua - 6,5mm Lapua + 6.5 mm Lapua + 6,5 mm Lapua + 6.5 mm Lapua + 6,5 mm Lapua 6,5 мм Lapua - 6,5mm Lapua - 6.5mm Lapua - 6.5mm Lapua - 6.5mm Lapua - 6,5mm Lapua - 6.5mm Lapua - 6.5mm Lapua + 6,5 mm Lapua + 6.5 mm Lapua + 6.5 mm Lapua + 6.5 mm Lapua + 6,5 mm Lapua + 6.5 mm Lapua + 6.5 mm Lapua 6.5毫米 拉普 空尖艇尾狙擊專用彈 - 6.5mm Lapua 空尖艇尾狙击专用弹 - 6.5mm Lapua + 6.5 mm Lapua 空尖艇尾狙击专用弹 + 6.5 mm Lapua - Caliber: 6.5x47mm (HPBT Scenar)<br />Rounds: 20<br />Used in: QBU-88 - Calibre: 6,5x47mm (HPBT Scenar)<br />Cartouches: 20<br />Utilisé avec: QBU-88 - Calibre: 6.5x47mm (HPBT Scenar)<br />Balas: 20<br />Se usa en: QBU-88 - Kaliber: 6,5x47mm (HPBT Scenar)<br />Pociski: 20 + Caliber: 6.5x47 mm (HPBT Scenar)<br />Rounds: 20<br />Used in: QBU-88 + Calibre: 6,5x47 mm (HPBT Scenar)<br />Cartouches: 20<br />Utilisé avec: QBU-88 + Calibre: 6.5x47 mm (HPBT Scenar)<br />Balas: 20<br />Se usa en: QBU-88 + Kaliber: 6,5x47 mm (HPBT Scenar)<br />Pociski: 20 Калибр: 6,5x47 мм (экспансивные Scenar)<br />Патронов: 20<br />Используются с: QBU-88 - Kaliber: 6,5x47mm (HPBT Scenar)<br />Patronen: 20<br />Eingesetzt von: QBU-88 - Calibro: 6.5x47mm (HPBT Scenar)<br />Munizioni: 20<br />In uso su: QBU-88 - Ráže: 6.5x47mm (HPBT Scenar)<br />Nábojů: 20<br />Použití u: QBU-88 - Calibre: 6.5x47mm (HPBT Scenar)<br/>Cartuchos: 20<br/>Usado em: QBU-88 - Kaliber: 6,5x47mm (HPBT Scenar)<br />Lövedékek: 20<br />Használható: QBU-88 - 口径: 6.5x47mm (HPBT Scenar)<br />装填数: 20<br />次で使用: QBU-88 - 구경: 6.5x47mm (HPBT Scenar)<br />장탄수: 20<br />사용처: QBU-88 + Kaliber: 6,5x47 mm (HPBT Scenar)<br />Patronen: 20<br />Eingesetzt von: QBU-88 + Calibro: 6.5x47 mm (HPBT Scenar)<br />Munizioni: 20<br />In uso su: QBU-88 + Ráže: 6.5x47 mm (HPBT Scenar)<br />Nábojů: 20<br />Použití u: QBU-88 + Calibre: 6.5x47 mm (HPBT Scenar)<br/>Cartuchos: 20<br/>Usado em: QBU-88 + Kaliber: 6,5x47 mm (HPBT Scenar)<br />Lövedékek: 20<br />Használható: QBU-88 + 口径: 6.5x47 mm (HPBT Scenar)<br />装填数: 20<br />次で使用: QBU-88 + 구경: 6.5x47 mm (HPBT Scenar)<br />장탄수: 20<br />사용처: QBU-88 口徑: 6.5x47毫米 (拉普 空尖艇尾狙擊專用彈)<br />發數: 20<br />使用於: QBU-88 - 口径: 6.5x47mm (Lapua 空尖艇尾狙击专用弹)<br />发数: 20<br />使用于: QBU-88 - Kalibre: 6.5x47mm (HPBT Scenar)<br />Mermi: 20<br />Kullanıyor: QBU-88 + 口径: 6.5x47 mm (Lapua 空尖艇尾狙击专用弹)<br />发数: 20<br />使用于: QBU-88 + Kalibre: 6.5x47 mm (HPBT Scenar)<br />Mermi: 20<br />Kullanıyor: QBU-88 - 6.5mm Creedmor 20Rnd Mag - Magazynek 6,5mm Creedmor 20rd - 6.5mm Creedmor 20Rnd Mag + 6.5 mm Creedmor 20Rnd Mag + Magazynek 6,5 mm Creedmor 20rd + 6.5 mm Creedmor 20Rnd Mag Магазин из 20-ти 6,5 мм Creedmor - 6,5mm Creedmor 20-Patronen-Magazin - Cargador de 20 balas Creedmor de 6.5mm - Ch. 6,5mm Creedmor 20Cps - 6.5mm Creedmor 20náb. Zásobník - Carregador 6.5mm com 20 cartuchos Creedmor - 6,5mm Creedmor 20-lövedékes tár - 6.5mm Creedmor 20発入り 弾倉 - 20발들이 6.5mm Creedmor 탄창 + 6,5 mm Creedmor 20-Patronen-Magazin + Cargador de 20 balas Creedmor de 6.5 mm + Ch. 6,5 mm Creedmor 20Cps + 6.5 mm Creedmor 20náb. Zásobník + Carregador 6.5 mm com 20 cartuchos Creedmor + 6,5 mm Creedmor 20-lövedékes tár + 6.5 mm Creedmor 20発入り 弾倉 + 20발들이 6.5 mm Creedmor 탄창 6.5毫米 20發 彈匣 (克里德莫爾(CM) 狙擊專用彈) - 6.5mm 20发 弹匣 (Creedmor 狙击专用弹) - 6.5mm Creedmor 20Rnd Mag + 6.5 mm 20发 弹匣 (Creedmor 狙击专用弹) + 6.5 mm Creedmor 20Rnd Mag - 6.5mm CM - 6,5mm CM - 6.5mm CM - 6,5mm CM + 6.5 mm CM + 6,5 mm CM + 6.5 mm CM + 6,5 mm CM 6,5 мм CM - 6,5mm CM - 6.5mm CM - 6.5mm CM - 6.5mm CM - 6,5mm CM - 6.5mm CM - 6.5mm CM + 6,5 mm CM + 6.5 mm CM + 6.5 mm CM + 6.5 mm CM + 6,5 mm CM + 6.5 mm CM + 6.5 mm CM 6.5毫米 CM 狙擊專用彈 - 6.5mm CM 狙击专用弹 - 6.5mm CM + 6.5 mm CM 狙击专用弹 + 6.5 mm CM - Caliber: 6.5x47mm Creedmor<br />Rounds: 20<br />Used in: QBU-88 - Kaliber: 6,5x47mm Creedmor<br />Pociski: 20<br />Używany w: QBU-88 - Kaliber: 6,5x47mm Creedmor<br />Patronen: 20<br />Eingesetzt von: QBU-88 - Calibre: 6,5x47mm Creedmor <br />Cartouches: 20<br />Utilisé avec: QBU-88 - Calibro: 6.5mm Creedmor<br />Munizioni: 20<br />In uso su: QBU-88 - Calibre: 6.5mm Creedmor<br />Balas: 20<br />Se usa en: QBU-88 + Caliber: 6.5x47 mm Creedmor<br />Rounds: 20<br />Used in: QBU-88 + Kaliber: 6,5x47 mm Creedmor<br />Pociski: 20<br />Używany w: QBU-88 + Kaliber: 6,5x47 mm Creedmor<br />Patronen: 20<br />Eingesetzt von: QBU-88 + Calibre: 6,5x47 mm Creedmor <br />Cartouches: 20<br />Utilisé avec: QBU-88 + Calibro: 6.5 mm Creedmor<br />Munizioni: 20<br />In uso su: QBU-88 + Calibre: 6.5 mm Creedmor<br />Balas: 20<br />Se usa en: QBU-88 Калибр: 6,5x47мм Creedmor<br />Патронов: 20<br />Используются c: QBU-88 - Ráže: 6.5x47mm Creedmor<br />Nábojů: 20<br />Použití u: QBU-88 - Calibre: 6.5x47mm Creedmor<br/>Cartuchos: 20<br/>Usado em: QBU-88 - Kaliber: 6,5x47mm Creedmor<br />Lövedékek: 20<br />Használható: QBU-88 - 口径: 6.5x47mm Creedmor<br />装填数: 20<br />次で使用: QBU-88 - 구경: 6.5x47mm Creedmor<br />장탄수: 20<br />사용처: QBU-88 + Ráže: 6.5x47 mm Creedmor<br />Nábojů: 20<br />Použití u: QBU-88 + Calibre: 6.5x47 mm Creedmor<br/>Cartuchos: 20<br/>Usado em: QBU-88 + Kaliber: 6,5x47 mm Creedmor<br />Lövedékek: 20<br />Használható: QBU-88 + 口径: 6.5x47 mm Creedmor<br />装填数: 20<br />次で使用: QBU-88 + 구경: 6.5x47 mm Creedmor<br />장탄수: 20<br />사용처: QBU-88 口徑: 6.5x47毫米 克里德莫爾 狙擊專用彈<br />發數: 20<br />使用於: QBU-88 - 口径: 6.5x47mm Creedmor 狙击专用弹<br />发数: 20<br />使用于: QBU-88 - Kalibre: 6.5x47mm Creedmor<br />Mermi: 20<br />Kullanıyor: QBU-88 + 口径: 6.5x47 mm Creedmor 狙击专用弹<br />发数: 20<br />使用于: QBU-88 + Kalibre: 6.5x47 mm Creedmor<br />Mermi: 20<br />Kullanıyor: QBU-88 - 5.8mm DBP88 10Rnd Mag - Magazynek 5,8mm DBP88 10rd - 5.8mm DBP88 10Rnd Mag + 5.8 mm DBP88 10Rnd Mag + Magazynek 5,8 mm DBP88 10rd + 5.8 mm DBP88 10Rnd Mag Магазин из 10-ти 5,8 мм DBP88 - 5,8mm DBP88 10-Patronen-Magazin - Cargador de 10 balas DBP88 de 5.8mm - Ch. 5,8mm DBP88 10Cps - 5.8mm DBP88 10náb. Zásobník - Carregador 5.8mm com 10 cartuchos DBP88 - 5,8mm DBP88 10-lövedékes tár - 5.8mm DBP88 10発入り 弾倉 - 10발들이 5.8mm DBP88 탄창 + 5,8 mm DBP88 10-Patronen-Magazin + Cargador de 10 balas DBP88 de 5.8 mm + Ch. 5,8 mm DBP88 10Cps + 5.8 mm DBP88 10náb. Zásobník + Carregador 5.8 mm com 10 cartuchos DBP88 + 5,8 mm DBP88 10-lövedékes tár + 5.8 mm DBP88 10発入り 弾倉 + 10발들이 5.8 mm DBP88 탄창 5.8毫米 10發 彈匣 (DBP88) - 5.8mm 10发 弹匣 (DBP88) - 5.8mm DBP88 10Rnd Mag + 5.8 mm 10发 弹匣 (DBP88) + 5.8 mm DBP88 10Rnd Mag - 5.8mm DBP88 - 5,8mm DBP88 - 5.8mm DBP88 - 5,8mm DBP88 + 5.8 mm DBP88 + 5,8 mm DBP88 + 5.8 mm DBP88 + 5,8 mm DBP88 5,8 мм DBP88 - 5,8mm DBP88 - 5.5mm DBP88 - 5.8mm DBP88 - 5.8mm DBP88 - 5,8mm DBP88 - 5.8mm DBP88 - 5.8mm DBP88 + 5,8 mm DBP88 + 5.5 mm DBP88 + 5.8 mm DBP88 + 5.8 mm DBP88 + 5,8 mm DBP88 + 5.8 mm DBP88 + 5.8 mm DBP88 5.8毫米 DBP88 - 5.8mm DBP88 - 5.8mm DBP88 + 5.8 mm DBP88 + 5.8 mm DBP88 - Caliber: 5.8x42mm DBP88<br />Rounds: 10<br />Used in: QBU-88 - Kaliber: 5,8x42mm DBP88<br />Pociski: 10<br />Używany w: QBU-88 - Kaliber: 5,8x42mm DBP88<br />Patronen: 10<br />Eingesetzt von: QBU-88 - Calibre: 5,8x42mm DBP88 <br />Cartouches: 10<br />Utilisé avec: QBU-88 - Calibro: 5.8mm DBP88<br />Munizioni: 10<br />In uso su: QBU-88 - Calibre: 5.8mm DBP88<br />Balas: 10<br />Se usa en: QBU-88 + Caliber: 5.8x42 mm DBP88<br />Rounds: 10<br />Used in: QBU-88 + Kaliber: 5,8x42 mm DBP88<br />Pociski: 10<br />Używany w: QBU-88 + Kaliber: 5,8x42 mm DBP88<br />Patronen: 10<br />Eingesetzt von: QBU-88 + Calibre: 5,8x42 mm DBP88 <br />Cartouches: 10<br />Utilisé avec: QBU-88 + Calibro: 5.8 mm DBP88<br />Munizioni: 10<br />In uso su: QBU-88 + Calibre: 5.8 mm DBP88<br />Balas: 10<br />Se usa en: QBU-88 Калибр: 5,8x42мм DBP88<br />Патронов: 10<br />Используются c: QBU-88 - Ráže: 5.8x42mm DBP88<br />Nábojů: 10<br />Použití u: QBU-88 - Calibre: 5.8x42mm DBP88<br/>Cartuchos: 10<br/>Usado em: QBU-88 - Kaliber: 5,8x42mm DBP88<br />Lövedékek: 10<br />Használható: QBU-88 - 口径: 5.8x42mm DBP88<br />装填数: 10<br />次で使用: QBU-88 - 구경: 5.8x42mm DBP88<br />장탄수: 10<br />사용처: QBU-88 + Ráže: 5.8x42 mm DBP88<br />Nábojů: 10<br />Použití u: QBU-88 + Calibre: 5.8x42 mm DBP88<br/>Cartuchos: 10<br/>Usado em: QBU-88 + Kaliber: 5,8x42 mm DBP88<br />Lövedékek: 10<br />Használható: QBU-88 + 口径: 5.8x42 mm DBP88<br />装填数: 10<br />次で使用: QBU-88 + 구경: 5.8x42 mm DBP88<br />장탄수: 10<br />사용처: QBU-88 口徑: 5.8x42毫米 DBP88<br />發數: 10<br />使用於: QBU-88 - 口径: 5.8x42mm DBP88<br />发数: 10<br />使用于: QBU-88 - Kalibre: 5.8x42mm DBP88<br />Mermi: 10<br />Kullanıyor: QBU-88 + 口径: 5.8x42 mm DBP88<br />发数: 10<br />使用于: QBU-88 + Kalibre: 5.8x42 mm DBP88<br />Mermi: 10<br />Kullanıyor: QBU-88 - 6.5mm 30Rnd Tracer IR-DIM Mag - 6,5mm Nyomjelző IR-DIM 30-as Tár - 6,5mm 30-Patronen-Magazin Leuchtspur IR-DIM - Cargador de 30 balas trazadoras IR-DIM de 6,5mm - Ch. 6,5mm 30Cps Traçantes IR-DIM - Magazynek 6,5mm 30rd Smugacz IR-DIM - 6.5mm 30náb. Svítící IR-DIM Zásobník - Carregador de 30 projéteis traçantes IR-DIM de 6,5mm - Caricatore 6.5mm 30Rnd Traccianti IR-DIM + 6.5 mm 30Rnd Tracer IR-DIM Mag + 6,5 mm Nyomjelző IR-DIM 30-as Tár + 6,5 mm 30-Patronen-Magazin Leuchtspur IR-DIM + Cargador de 30 balas trazadoras IR-DIM de 6,5 mm + Ch. 6,5 mm 30Cps Traçantes IR-DIM + Magazynek 6,5 mm 30rd Smugacz IR-DIM + 6.5 mm 30náb. Svítící IR-DIM Zásobník + Carregador de 30 projéteis traçantes IR-DIM de 6,5 mm + Caricatore 6.5 mm 30Rnd Traccianti IR-DIM Магазин из 30-ти 6,5 мм ИК-трассирующих - 6.5mm 30発入り IR-DIM曳光弾 弾倉 - 30발들이 6.5mm IR-DIM 예광탄 탄창 + 6.5 mm 30発入り IR-DIM曳光弾 弾倉 + 30발들이 6.5 mm IR-DIM 예광탄 탄창 6.5毫米 30發 低視度紅外線曳光彈 彈匣 - 6.5mm 30发 低视度红外线曳光弹 弹匣 - 6.5mm 30Rnd Tracer IR-DIM Mag + 6.5 mm 30发 低视度红外线曳光弹 弹匣 + 6.5 mm 30Rnd Tracer IR-DIM Mag - 6.5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6.5mm IR-DIM - 6,5mm IR-DIM - 6.5mm IR-DIM + 6.5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6.5 mm IR-DIM + 6,5 mm IR-DIM + 6.5 mm IR-DIM 6,5 мм ИК-трассирующие - 6.5mm IR-DIM曳光弾 - 6.5mm IR-DIM 예광탄 + 6.5 mm IR-DIM曳光弾 + 6.5 mm IR-DIM 예광탄 6.5毫米 低視紅外曳光彈 - 6.5mm 低视红外曳光弹 - 6.5mm IR-DIM + 6.5 mm 低视红外曳光弹 + 6.5 mm IR-DIM - Caliber: 6.5x39mm Tracer IR-DIM<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL - Kaliber: 6,5x39mm Nyomjelző IR-DIM<br />Lövedékek: 30<br />Használható: MX/C/M/SW/3GL - Kaliber: 6,5x39mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL - Calibre: 6,5x39mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL - Calibre: 6,5x39mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé avec: MX/C/M/SW/3GL - Kaliber: 6,5x39mm Smugacz IR-DIM<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL - Ráže: 6.5x39mm Svítící IR-DIM<br />Nábojů: 30<br />Použití u: MX - Calibre: 6,5x39mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL - Calibro: 6.5x39mm Traccianti IR-DIM <br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL + Caliber: 6.5x39 mm Tracer IR-DIM<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Nyomjelző IR-DIM<br />Lövedékek: 30<br />Használható: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL + Calibre: 6,5x39 mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL + Calibre: 6,5x39 mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé avec: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Smugacz IR-DIM<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL + Ráže: 6.5x39 mm Svítící IR-DIM<br />Nábojů: 30<br />Použití u: MX + Calibre: 6,5x39 mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL + Calibro: 6.5x39 mm Traccianti IR-DIM <br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL Калибр: 6,5x39 мм ИК-трассирующие<br />Патронов: 30<br />Используются с: MX/C/M/SW/3GL - 口径: 6.5x39mm 曳光弾 IR-DIM<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL - 구경: 6.5x39mm IR-DIM 예광탄<br />장탄수: 30<br />사용처: MX/C/M/SW/3GL + 口径: 6.5x39 mm 曳光弾 IR-DIM<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL + 구경: 6.5x39 mm IR-DIM 예광탄<br />장탄수: 30<br />사용처: MX/C/M/SW/3GL 口徑: 6.5x39毫米 低視度紅外線曳光彈<br />發數: 30<br />使用於: MX/C/M/SW/3GL - 口径: 6.5x39mm 低视度红外线曳光弹<br />发数: 30<br />使用于: MX/C/M/SW/3GL - Kalibre: 6.5x39mm Tracer IR-DIM<br />Mermi: 30<br />Kullanıyor: MX/C/M/SW/3GL + 口径: 6.5x39 mm 低视度红外线曳光弹<br />发数: 30<br />使用于: MX/C/M/SW/3GL + Kalibre: 6.5x39 mm Tracer IR-DIM<br />Mermi: 30<br />Kullanıyor: MX/C/M/SW/3GL - 6.5mm 30Rnd SD Mag - 6,5mm Halk 30-as Tár - 6,5mm 30-Patronen-Magazin SD - Cargador de 30 balas SD de 6,5mm - Ch. 6,5mm 30Cps SD - Magazynek 6,5mm 30rd SD - 6.5mm 30náb. SD Zásobník - Carregador de 30 projéteis SD de 6,5mm - Caricatore 6.5mm 30Rnd Sil. + 6.5 mm 30Rnd SD Mag + 6,5 mm Halk 30-as Tár + 6,5 mm 30-Patronen-Magazin SD + Cargador de 30 balas SD de 6,5 mm + Ch. 6,5 mm 30Cps SD + Magazynek 6,5 mm 30rd SD + 6.5 mm 30náb. SD Zásobník + Carregador de 30 projéteis SD de 6,5 mm + Caricatore 6.5 mm 30Rnd Sil. Магазин из 30-ти 6,5 мм дозвуковых - 6.5mm 30発入り 亜音速弾 弾倉 - 30발들이 6.5mm 아음속탄 탄창 + 6.5 mm 30発入り 亜音速弾 弾倉 + 30발들이 6.5 mm 아음속탄 탄창 6.5毫米 30發 消音彈 彈匣 - 6.5mm 30发 消音弹 弹匣 - 6.5mm 30Rnd SD Mag + 6.5 mm 30发 消音弹 弹匣 + 6.5 mm 30Rnd SD Mag - 6.5mm SD - 6,5mm Halk - 6,5mm SD - 6,5mm SD - 6,5mm SD - 6,5mm SD - 6.5mm SD - 6,5mm SD - 6.5mm Sil. + 6.5 mm SD + 6,5 mm Halk + 6,5 mm SD + 6,5 mm SD + 6,5 mm SD + 6,5 mm SD + 6.5 mm SD + 6,5 mm SD + 6.5 mm Sil. 6,5 мм дозвуковые - 6.5mm 亜音速弾 - 6.5mm 아음속탄 + 6.5 mm 亜音速弾 + 6.5 mm 아음속탄 6.5毫米 消音彈 - 6.5mm 消音弹 - 6.5mm SD + 6.5 mm 消音弹 + 6.5 mm SD - Caliber: 6.5x39mm SD<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL - Kaliber: 6,5x39mm Halk<br />Lövedékek: 30<br />Használható: MX/C/M/SW/3GL - Kaliber: 6,5x39mm SD<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL - Calibre: 6,5x39mm SD<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL - Calibre: 6,5x39mm SD<br />Cartouches: 30<br />Utilisé avec: MX/C/M/SW/3GL - Kaliber: 6,5x39mm SD<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL - Ráže: 6.5x39mm SD<br />Nábojů: 30<br />Použití u: MX - Calibre: 6,5x39mm SD<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL - Calibro: 6.5x39mm Sil.<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL + Caliber: 6.5x39 mm SD<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Halk<br />Lövedékek: 30<br />Használható: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm SD<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL + Calibre: 6,5x39 mm SD<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL + Calibre: 6,5x39 mm SD<br />Cartouches: 30<br />Utilisé avec: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm SD<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL + Ráže: 6.5x39 mm SD<br />Nábojů: 30<br />Použití u: MX + Calibre: 6,5x39 mm SD<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL + Calibro: 6.5x39 mm Sil.<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL Калибр: 6,5x39 мм дозвуковые<br />Патронов: 30<br />Используются с: MX/C/M/SW/3GL - 口径: 6.5x39mm 亜音速弾<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL - 구경: 6.5x39mm SD<br />장탄수: 30<br />사용처: MX/C/M/SW/3GL + 口径: 6.5x39 mm 亜音速弾<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL + 구경: 6.5x39 mm SD<br />장탄수: 30<br />사용처: MX/C/M/SW/3GL 口徑: 6.5x39毫米 消音彈<br />發數: 30<br />使用於: MX/C/M/SW/3GL - 口径: 6.5x39mm 消音弹<br />发数: 30<br />使用于: MX/C/M/SW/3GL - Kalibre: 6.5x39mm SD<br />Mermi: 30<br />Kullanıyor: MX/C/M/SW/3GL + 口径: 6.5x39 mm 消音弹<br />发数: 30<br />使用于: MX/C/M/SW/3GL + Kalibre: 6.5x39 mm SD<br />Mermi: 30<br />Kullanıyor: MX/C/M/SW/3GL - 6.5mm 30Rnd AP Mag - 6,5mm Páncéltörő 30-as Tár - 6,5mm 30-Patronen-Magazin AP - Cargador de 30 balas AP de 6,5mm - Ch. 6,5mm 30Cps AP - Magazynek 6,5mm 30rd AP - 6.5mm 30náb. AP Zásobník - Carregador de 30 projéteis AP de 6,5mm - Caricatore 6.5mm 30Rnd AP + 6.5 mm 30Rnd AP Mag + 6,5 mm Páncéltörő 30-as Tár + 6,5 mm 30-Patronen-Magazin AP + Cargador de 30 balas AP de 6,5 mm + Ch. 6,5 mm 30Cps AP + Magazynek 6,5 mm 30rd AP + 6.5 mm 30náb. AP Zásobník + Carregador de 30 projéteis AP de 6,5 mm + Caricatore 6.5 mm 30Rnd AP Магазин из 30-ти 6,5 мм бронебойных - 6.5mm 30 発入り徹甲弾 弾倉 - 30발들이 6.5mm 철갑탄 탄창 + 6.5 mm 30 発入り徹甲弾 弾倉 + 30발들이 6.5 mm 철갑탄 탄창 6.5毫米30發 穿甲彈 彈匣 - 6.5mm 30发 穿甲弹 弹匣 - 6.5mm 30Rnd AP Mag + 6.5 mm 30发 穿甲弹 弹匣 + 6.5 mm 30Rnd AP Mag - 6.5mm AP - 6,5mm Páncéltörő - 6,5mm AP - 6,5mm AP - 6,5mm AP - 6,5mm AP - 6.5mm AP - 6,5mm AP - 6.5mm AP + 6.5 mm AP + 6,5 mm Páncéltörő + 6,5 mm AP + 6,5 mm AP + 6,5 mm AP + 6,5 mm AP + 6.5 mm AP + 6,5 mm AP + 6.5 mm AP 6,5 мм бронебойные - 6.5mm 徹甲弾 - 6.5mm 철갑탄 + 6.5 mm 徹甲弾 + 6.5 mm 철갑탄 6.5毫米 穿甲彈 - 6.5mm 穿甲弹 - 6.5mm AP + 6.5 mm 穿甲弹 + 6.5 mm AP - Caliber: 6.5x39mm AP<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL - Kaliber: 6,5x39mm Páncéltörő<br />Lövedékek: 30<br />Használható: MX/C/M/SW/3GL - Kaliber: 6,5x39mm AP<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL - Calibre: 6,5x39mm AP<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL - Calibre: 6,5x39mm AP<br />Cartouches: 30<br />Utilisé avec: MX/C/M/SW/3GL - Kaliber: 6,5x39mm AP<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL - Ráže: 6.5x39mm AP<br />Nábojů: 30<br />Použití u: MX - Calibre: 6,5x39mm AP<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL - Calibro: 6.5x39mm AP<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL + Caliber: 6.5x39 mm AP<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm Páncéltörő<br />Lövedékek: 30<br />Használható: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm AP<br />Patronen: 30<br />Eingesetzt von: MX/C/M/SW/3GL + Calibre: 6,5x39 mm AP<br />Balas: 30<br />Se usa en: MX/C/M/SW/3GL + Calibre: 6,5x39 mm AP<br />Cartouches: 30<br />Utilisé avec: MX/C/M/SW/3GL + Kaliber: 6,5x39 mm AP<br />Pociski: 30<br />Używane w: MX/C/M/SW/3GL + Ráže: 6.5x39 mm AP<br />Nábojů: 30<br />Použití u: MX + Calibre: 6,5x39 mm AP<br />Projéteis: 30<br />Usado em: MX/C/M/SW/3GL + Calibro: 6.5x39 mm AP<br />Munizioni: 30<br />In uso su: MX/C/M/SW/3GL Калибр: 6,5x39 мм бронебойные<br />Патронов: 30<br />Используются с: MX/C/M/SW/3GL - 口径: 6.5x39mm 徹甲弾<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL - 구경: 6.5x39mm 철갑탄<br />장탄수: 30<br />사용처: MX/C/M/SW/3GL + 口径: 6.5x39 mm 徹甲弾<br />装填数: 30<br />次で使用: MX/C/M/SW/3GL + 구경: 6.5x39 mm 철갑탄<br />장탄수: 30<br />사용처: MX/C/M/SW/3GL 口徑: 6.5x39毫米 穿甲彈<br />發數: 30<br />使用於: MX/C/M/SW/3GL - 口径: 6.5x39mm 穿甲弹<br />发数: 30<br />使用于: MX/C/M/SW/3GL - Kalibre: 6.5x39mm AP<br />Mermi: 30<br />Kullanıyor: MX/C/M/SW/3GL + 口径: 6.5x39 mm 穿甲弹<br />发数: 30<br />使用于: MX/C/M/SW/3GL + Kalibre: 6.5x39 mm AP<br />Mermi: 30<br />Kullanıyor: MX/C/M/SW/3GL - 6.5mm 30Rnd Tracer IR-DIM Mag - 6,5mm IR-DIM Nyomjelző 30-as Tár - 6,5mm 30-Patronen-Magazin Leuchtspur IR-DIM - Cargador de 30 balas trazadoras IR-DIM de 6,5mm - Ch. 6,5mm 30Cps Traçantes IR-DIM - Magazynek 6,5mm 30rd Smugacz IR-DIM - 6.5mm 30náb. Svítící IR-DIM Zásobník - Carregador de 30 projéteis traçantes IR-DIM de 6,5mm - Caricatore 6.5mm 30Rnd Traccianti IR-DIM + 6.5 mm 30Rnd Tracer IR-DIM Mag + 6,5 mm IR-DIM Nyomjelző 30-as Tár + 6,5 mm 30-Patronen-Magazin Leuchtspur IR-DIM + Cargador de 30 balas trazadoras IR-DIM de 6,5 mm + Ch. 6,5 mm 30Cps Traçantes IR-DIM + Magazynek 6,5 mm 30rd Smugacz IR-DIM + 6.5 mm 30náb. Svítící IR-DIM Zásobník + Carregador de 30 projéteis traçantes IR-DIM de 6,5 mm + Caricatore 6.5 mm 30Rnd Traccianti IR-DIM Магазин из 30-ти 6,5 мм ИК-трассирующих - 6.5mm 30発入り IR-DIM曳光弾 弾倉 - 30발들이 6.5mm IR-DIM 예광탄 탄창 + 6.5 mm 30発入り IR-DIM曳光弾 弾倉 + 30발들이 6.5 mm IR-DIM 예광탄 탄창 6.5毫米 30發 低視度紅外線曳光彈 彈匣 - 6.5mm 30发 低视度红外线曳光弹 弹匣 - 6.5mm 30Rnd Tracer IR-DIM Mag + 6.5 mm 30发 低视度红外线曳光弹 弹匣 + 6.5 mm 30Rnd Tracer IR-DIM Mag - 6.5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6.5mm IR-DIM - 6,5mm IR-DIM - 6.5mm IR-DIM + 6.5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6.5 mm IR-DIM + 6,5 mm IR-DIM + 6.5 mm IR-DIM 6,5 мм ИК-трассирующие - 6.5mm IR-DIM曳光弾 - 6.5mm IR-DIM 예광탄 + 6.5 mm IR-DIM曳光弾 + 6.5 mm IR-DIM 예광탄 6.5毫米 低視紅外曳光彈 - 6.5mm 低视红外曳光弹 - 6.5mm IR-DIM + 6.5 mm 低视红外曳光弹 + 6.5 mm IR-DIM - Caliber: 6.5x39mm Tracer IR-DIM<br />Rounds: 30<br />Used in: Katiba - Kaliber: 6,5x39mm Nyomjelző IR-DIM<br />Lövedékek: 30<br />Használható: Katiba - Kaliber: 6,5x39mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: Katiba - Calibre: 6,5x39mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: Katiba - Calibre: 6,5x39mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé avec: Katiba - Kaliber: 6,5x39mm Smugacz IR-DIM<br />Pociski: 30<br />Używane w: Katiba - Ráže: 6.5x39mm Svítící IR-DIM<br />Nábojů: 30<br />Použití u: KH 2002 Sama - Calibre: 6,5x39mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: Katiba - Calibro: 6.5x39mm Tracciant IR-DIM<br />Munizioni: 30<br />In uso su: Katiba + Caliber: 6.5x39 mm Tracer IR-DIM<br />Rounds: 30<br />Used in: Katiba + Kaliber: 6,5x39 mm Nyomjelző IR-DIM<br />Lövedékek: 30<br />Használható: Katiba + Kaliber: 6,5x39 mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: Katiba + Calibre: 6,5x39 mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: Katiba + Calibre: 6,5x39 mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé avec: Katiba + Kaliber: 6,5x39 mm Smugacz IR-DIM<br />Pociski: 30<br />Używane w: Katiba + Ráže: 6.5x39 mm Svítící IR-DIM<br />Nábojů: 30<br />Použití u: KH 2002 Sama + Calibre: 6,5x39 mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: Katiba + Calibro: 6.5x39 mm Tracciant IR-DIM<br />Munizioni: 30<br />In uso su: Katiba Калибр: 6,5x39 мм ИК-трассирующие<br />Патронов: 30<br />Используются с: Katiba - 口径: 6.5x39mm IR-DIM曳光弾<br />装填数: 30<br />次で使用: Katiba - 구경: 6.5x39mm IR-DIM 예광탄<br />장탄수: 30<br />사용처: Katiba + 口径: 6.5x39 mm IR-DIM曳光弾<br />装填数: 30<br />次で使用: Katiba + 구경: 6.5x39 mm IR-DIM 예광탄<br />장탄수: 30<br />사용처: Katiba 口徑: 6.5x39毫米 低視度紅外線曳光彈<br />發數: 30<br />使用於: Katiba - 口径: 6.5x39mm 低视度红外线曳光弹<br />发数: 30<br />使用于: Katiba - Kalibre: 6.5x39mm Tracer IR-DIM<br />Mermi: 30<br />Kullanıyor: Katiba + 口径: 6.5x39 mm 低视度红外线曳光弹<br />发数: 30<br />使用于: Katiba + Kalibre: 6.5x39 mm Tracer IR-DIM<br />Mermi: 30<br />Kullanıyor: Katiba - 6.5mm 30Rnd SD Mag - 6,5mm Halk 30-as Tár - 6,5mm 30-Patronen-Magazin SD - Cargador de 30 balas SD de 6,5mm - Ch. 6,5mm 30Cps SD - Magazynek 6,5mm 30rd SD - 6.5mm 30náb. SD Zásobník - Carregador de 30 projéteis SD de 6,5mm - Caricatore 6.5mm 30Rnd Sil. + 6.5 mm 30Rnd SD Mag + 6,5 mm Halk 30-as Tár + 6,5 mm 30-Patronen-Magazin SD + Cargador de 30 balas SD de 6,5 mm + Ch. 6,5 mm 30Cps SD + Magazynek 6,5 mm 30rd SD + 6.5 mm 30náb. SD Zásobník + Carregador de 30 projéteis SD de 6,5 mm + Caricatore 6.5 mm 30Rnd Sil. Магазин из 30-ти 6,5 мм дозвуковых - 6.5mm 30発入り 亜音速弾 弾倉 - 30발들이 6.5mm 아음속탄 탄창 + 6.5 mm 30発入り 亜音速弾 弾倉 + 30발들이 6.5 mm 아음속탄 탄창 6.5毫米 30發 消音彈 彈匣 - 6.5mm 30发 消音弹 弹匣 - 6.5mm 30Rnd SD Mag + 6.5 mm 30发 消音弹 弹匣 + 6.5 mm 30Rnd SD Mag - 6.5mm SD - 6,5mm Halk - 6,5mm SD - 6,5mm SD - 6,5mm SD - 6,5mm SD - 6.5mm SD - 6,5mm SD - 6.5mm Sil. + 6.5 mm SD + 6,5 mm Halk + 6,5 mm SD + 6,5 mm SD + 6,5 mm SD + 6,5 mm SD + 6.5 mm SD + 6,5 mm SD + 6.5 mm Sil. 6,5 мм дозвуковые - 6.5mm 亜音速弾 - 6.5mm 아음속탄 + 6.5 mm 亜音速弾 + 6.5 mm 아음속탄 6.5毫米 消音彈 - 6.5mm 消音弹 - 6.5mm SD + 6.5 mm 消音弹 + 6.5 mm SD - Caliber: 6.5x39mm SD<br />Rounds: 30<br />Used in: Katiba - Kaliber: 6,5x39mm Halk<br />Lövedékek: 30<br />Használható: Katiba - Kaliber: 6,5x39mm SD<br />Patronen: 30<br />Eingesetzt von: Katiba - Calibre: 6,5x39mm SD<br />Balas: 30<br />Se usa en: Katiba - Calibre: 6,5x39mm SD<br />Cartouches: 30<br />Utilisé avec: Katiba - Kaliber: 6,5x39mm SD<br />Naboje: 30<br />Używane w: Katiba - Ráže: 6.5x39mm SD<br />Nábojů: 30<br />Použití u: KH 2002 Sama - Calibre: 6,5x39mm SD<br />Projéteis: 30<br />Usado em: Katiba - Calibro: 6.5x39mm Sil.<br />Munizioni: 30<br />In uso su: Katiba + Caliber: 6.5x39 mm SD<br />Rounds: 30<br />Used in: Katiba + Kaliber: 6,5x39 mm Halk<br />Lövedékek: 30<br />Használható: Katiba + Kaliber: 6,5x39 mm SD<br />Patronen: 30<br />Eingesetzt von: Katiba + Calibre: 6,5x39 mm SD<br />Balas: 30<br />Se usa en: Katiba + Calibre: 6,5x39 mm SD<br />Cartouches: 30<br />Utilisé avec: Katiba + Kaliber: 6,5x39 mm SD<br />Naboje: 30<br />Używane w: Katiba + Ráže: 6.5x39 mm SD<br />Nábojů: 30<br />Použití u: KH 2002 Sama + Calibre: 6,5x39 mm SD<br />Projéteis: 30<br />Usado em: Katiba + Calibro: 6.5x39 mm Sil.<br />Munizioni: 30<br />In uso su: Katiba Калибр: 6,5x39 мм дозвуковые<br />Патронов: 30<br />Используются с: Katiba - 口径: 6.5x39mm 亜音速弾<br />装填数: 30<br />次で使用: Katiba - 구경: 6.5x39mm 아음속탄<br />장탄수: 30<br />사용처: Katiba + 口径: 6.5x39 mm 亜音速弾<br />装填数: 30<br />次で使用: Katiba + 구경: 6.5x39 mm 아음속탄<br />장탄수: 30<br />사용처: Katiba 口徑: 6.5x39毫米 消音彈<br />發數: 30<br />使用於: Katiba - 口径: 6.5x39mm 消音弹<br />发数: 30<br />使用于: Katiba - Kalibre: 6.5x39mm SD<br />Mermi: 30<br />Kullanıyor: Katiba + 口径: 6.5x39 mm 消音弹<br />发数: 30<br />使用于: Katiba + Kalibre: 6.5x39 mm SD<br />Mermi: 30<br />Kullanıyor: Katiba - 6.5mm 30Rnd AP Mag - 6,5mm Páncéltörő 30-as Tár - 6,5mm 30-Patronen-Magazin AP - Cargador de 30 balas AP de 6,5mm - Ch. 6,5mm 30Cps AP - Magazynek 6,5mm 30rd AP - 6.5mm 30náb. AP Zásobník - Carregador de 30 projéteis AP de 6,5mm - Caricatore 6.5mm 30Rnd AP + 6.5 mm 30Rnd AP Mag + 6,5 mm Páncéltörő 30-as Tár + 6,5 mm 30-Patronen-Magazin AP + Cargador de 30 balas AP de 6,5 mm + Ch. 6,5 mm 30Cps AP + Magazynek 6,5 mm 30rd AP + 6.5 mm 30náb. AP Zásobník + Carregador de 30 projéteis AP de 6,5 mm + Caricatore 6.5 mm 30Rnd AP Магазин из 30-ти 6,5 мм бронебойных - 6.5mm 30 発入り徹甲弾 弾倉 - 30발들이 6.5mm 철갑탄 탄창 + 6.5 mm 30 発入り徹甲弾 弾倉 + 30발들이 6.5 mm 철갑탄 탄창 6.5毫米 30發 穿甲彈 彈匣 - 6.5mm 30发 穿甲弹 弹匣 - 6.5mm 30Rnd AP Mag + 6.5 mm 30发 穿甲弹 弹匣 + 6.5 mm 30Rnd AP Mag - 6.5mm AP - 6,5mm Páncéltörő - 6,5mm AP - 6,5mm AP - 6,5mm AP - 6,5mm AP - 6.5mm AP - 6,5mm AP - 6.5mm AP + 6.5 mm AP + 6,5 mm Páncéltörő + 6,5 mm AP + 6,5 mm AP + 6,5 mm AP + 6,5 mm AP + 6.5 mm AP + 6,5 mm AP + 6.5 mm AP 6,5 мм бронебойные - 6.5mm 徹甲弾 - 6.5mm 철갑탄 + 6.5 mm 徹甲弾 + 6.5 mm 철갑탄 6.5毫米 穿甲彈 - 6.5mm 穿甲弹 - 6.5mm AP + 6.5 mm 穿甲弹 + 6.5 mm AP - Caliber: 6.5x39mm AP<br />Rounds: 30<br />Used in: Katiba - Kaliber: 6,5x39mm Páncéltörő<br />Lövedékek: 30<br />Használható: Katiba - Kaliber: 6,5x39mm AP<br />Patronen: 30<br />Eingesetzt von: Katiba - Calibre: 6,5x39mm AP<br />Balas: 30<br />Se usa en: Katiba - Calibre: 6,5x39mm AP<br />Cartouches: 30<br />Utilisé avec: Katiba - Kaliber: 6,5x39mm AP<br />Pociski: 30<br />Używane w: Katiba - Ráže: 6.5x39mm AP<br />Nábojů: 30<br />Použití u: KH 2002 Sama - Calibre: 6,5x39mm AP<br />Projéteis: 30<br />Usado em: Katiba - Calibro: 6.5x39mm AP<br />Munizioni: 30<br />In uso su: Katiba + Caliber: 6.5x39 mm AP<br />Rounds: 30<br />Used in: Katiba + Kaliber: 6,5x39 mm Páncéltörő<br />Lövedékek: 30<br />Használható: Katiba + Kaliber: 6,5x39 mm AP<br />Patronen: 30<br />Eingesetzt von: Katiba + Calibre: 6,5x39 mm AP<br />Balas: 30<br />Se usa en: Katiba + Calibre: 6,5x39 mm AP<br />Cartouches: 30<br />Utilisé avec: Katiba + Kaliber: 6,5x39 mm AP<br />Pociski: 30<br />Używane w: Katiba + Ráže: 6.5x39 mm AP<br />Nábojů: 30<br />Použití u: KH 2002 Sama + Calibre: 6,5x39 mm AP<br />Projéteis: 30<br />Usado em: Katiba + Calibro: 6.5x39 mm AP<br />Munizioni: 30<br />In uso su: Katiba Калибр: 6,5x39 мм бронебойные<br />Патронов: 30<br />Используются с: Katiba - 口径: 6.5x39mm 徹甲弾<br />装填数: 30<br />次で使用: Katiba - 구경: 6.5x39mm 철갑탄<br />장탄수: 30<br />사용처: Katiba + 口径: 6.5x39 mm 徹甲弾<br />装填数: 30<br />次で使用: Katiba + 구경: 6.5x39 mm 철갑탄<br />장탄수: 30<br />사용처: Katiba 口徑: 6.5x39m毫米 穿甲彈<br />發數: 30<br />使用於: Katiba - 口径: 6.5x39mm 穿甲弹<br />发数: 30<br />使用于: Katiba - Kalibre: 6.5x39mm AP<br />Mermi: 30<br />Kullanıyor: Katiba + 口径: 6.5x39 mm 穿甲弹<br />发数: 30<br />使用于: Katiba + Kalibre: 6.5x39 mm AP<br />Mermi: 30<br />Kullanıyor: Katiba - + - 5.56mm 30rnd Tracer IR-DIM Mag - 5,56mm Nyomjelző IR-DIM 30-as Tár - 5,56mm 30-Patronen-Magazin Leuchtspur IR-DIM - Cargador de 30 balas trazadoras IR-DIM de 5,56mm - Ch. 5,56mm 30Cps Traçantes IR-DIM - Magazynek 5,56mm 30rd Smugacz IR-DIM - 5.56mm 30náb. Svítící IR-DIM Zásobník - Carregador de 30 projéteis traçantes IR-DIM de 5,56mm - Caricatore 5.56mm 30rnd Traccianti IR-DIM + 5.56 mm 30rnd Tracer IR-DIM Mag + 5,56 mm Nyomjelző IR-DIM 30-as Tár + 5,56 mm 30-Patronen-Magazin Leuchtspur IR-DIM + Cargador de 30 balas trazadoras IR-DIM de 5,56 mm + Ch. 5,56 mm 30Cps Traçantes IR-DIM + Magazynek 5,56 mm 30rd Smugacz IR-DIM + 5.56 mm 30náb. Svítící IR-DIM Zásobník + Carregador de 30 projéteis traçantes IR-DIM de 5,56 mm + Caricatore 5.56 mm 30rnd Traccianti IR-DIM Магазин из 30-ти 5,56 мм ИК-трассирующих - 5.56mm 30発入り IR-DIM曳光弾 弾倉 - 30발 들이 5.56mm IR-DIM 예광탄 탄창 + 5.56 mm 30発入り IR-DIM曳光弾 弾倉 + 30발 들이 5.56 mm IR-DIM 예광탄 탄창 5.56毫米 30發 低視度紅外線曳光彈 彈匣 - 5.56mm 30发 低视度红外线曳光弹 弹匣 - 5.56mm 30rnd Tracer IR-DIM Mag + 5.56 mm 30发 低视度红外线曳光弹 弹匣 + 5.56 mm 30rnd Tracer IR-DIM Mag - 5.56mm IR-DIM - 5,56mm IR-DIM - 5,56mm IR-DIM - 5,56mm IR-DIM - 5,56mm IR-DIM - 5,56mm IR-DIM - 5.56mm IR-DIM - 5,56mm IR-DIM - 5.56mm IR-DIM + 5.56 mm IR-DIM + 5,56 mm IR-DIM + 5,56 mm IR-DIM + 5,56 mm IR-DIM + 5,56 mm IR-DIM + 5,56 mm IR-DIM + 5.56 mm IR-DIM + 5,56 mm IR-DIM + 5.56 mm IR-DIM 5,56 мм ИК-трассирующие - 5.56mm IR-DIM曳光弾 - 5.56mm IR-DIM 예광탄 + 5.56 mm IR-DIM曳光弾 + 5.56 mm IR-DIM 예광탄 5.56毫米 低視紅外曳光彈 - 5.56mm 低视红外曳光弹 - 5.56mm IR-DIM + 5.56 mm 低视红外曳光弹 + 5.56 mm IR-DIM - Caliber: 5.56x45mm Tracer IR-DIM<br />Rounds: 30<br />Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56x45mm Nyomjelző IR-DIM<br />Lövedékek: 30<br />Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56x45mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibre: 5,56x45mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé avec: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kaliber: 5,56x45mm Smugacz IR-DIM<br />Pociski: 30<br />Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Ráže: 5.56x45mm Svítící IR-DIM<br />Nábojů: 30<br />Použití u: CTAR-21, TAR-21, F2000, RFB SDAR - Calibre: 5,56x45mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Calibro: 5.56x45mm Traccianti IR-DIM<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Caliber: 5.56x45 mm Tracer IR-DIM<br />Rounds: 30<br />Used in: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kaliber: 5,56x45 mm Nyomjelző IR-DIM<br />Lövedékek: 30<br />Használható: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kaliber: 5,56x45 mm Leuchtspur IR-DIM<br />Patronen: 30<br />Eingesetzt von: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibre: 5,56x45 mm Trazadoras IR-DIM<br />Balas: 30<br />Se usa en: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibre: 5,56x45 mm Traçantes IR-DIM<br />Cartouches: 30<br />Utilisé avec: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kaliber: 5,56x45 mm Smugacz IR-DIM<br />Pociski: 30<br />Używane w: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Ráže: 5.56x45 mm Svítící IR-DIM<br />Nábojů: 30<br />Použití u: CTAR-21, TAR-21, F2000, RFB SDAR + Calibre: 5,56x45 mm Traçante IR-DIM<br />Projéteis: 30<br />Usado em: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Calibro: 5.56x45 mm Traccianti IR-DIM<br />Munizioni: 30<br />In uso su: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR Калибр: 5,56x45 мм ИК-трассирующие<br />Патронов: 30<br />Используются с: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - 口径: 5.56x45mm IR-DIM曳光弾<br />装填数: 30<br />次で使用: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - 구경: 5.56x45mm IR-DIM 예광탄<br />장탄수: 30<br />사용처: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + 口径: 5.56x45 mm IR-DIM曳光弾<br />装填数: 30<br />次で使用: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + 구경: 5.56x45 mm IR-DIM 예광탄<br />장탄수: 30<br />사용처: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR 口徑: 5.56x45毫米 低視度紅外線曳光彈<br />發數: 30<br />使用於: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - 口径: 5.56x45mm 低视度红外线曳光弹<br />发数: 30<br />使用于: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - Kalibre: 5.56x45mm Tracer IR-DIM<br />Mermi: 30<br />Kullanıyor: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + 口径: 5.56x45 mm 低视度红外线曳光弹<br />发数: 30<br />使用于: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR + Kalibre: 5.56x45 mm Tracer IR-DIM<br />Mermi: 30<br />Kullanıyor: TRG-20, TRG-21/EGLM, Mk20/C/EGLM, SDAR - + - 7.62mm 20rnd Tracer Mag - 7,62mm Nyomjelző IR-DIM 20-as Tár - 7,62mm 20-Patronen-Magazin Leuchtspur - Cargador de 20 balas trazadores de 7,62mm - Ch. 7,62mm 20Cps Traçantes - Magazynek 7,62mm 20rd Smugacz - 7.62mm 20náb. Svítící Zásobník - Carregador de 20 projéteis traçantes de 7,62mm - Caricatore 7.62mm 20Rnd Traccianti + 7.62 mm 20Rnd Mag (Tracer) + 7,62 mm Nyomjelző IR-DIM 20-as Tár + 7,62 mm 20-Patronen-Magazin Leuchtspur + Cargador de 20 balas trazadores de 7,62 mm + Ch. 7,62 mm 20Cps Traçantes + Magazynek 7,62 mm 20rd Smugacz + 7.62 mm 20náb. Svítící Zásobník + Carregador de 20 projéteis traçantes de 7,62 mm + Caricatore 7.62 mm 20Rnd Traccianti Магазин из 20-ти 7,62 мм трассирующих - 7.62mm 20発入り 曳光弾 - 20발들이 7.62mm 예광탄 탄창 + 7.62 mm 20発入り 曳光弾 + 20발들이 7.62 mm 예광탄 탄창 7.62毫米 20發 曳光彈 彈匣 - 7.62mm 20发 曳光弹 弹匣 - 7.62mm 20rnd Tracer Mag + 7.62 mm 20发 曳光弹 弹匣 + 7.62 mm 20Rnd Mag (Tracer) - 7.62mm Tracer - 7,62mm Nyomjelző - 7,62mm Leuchtspur - 7,62mm Trazadora - 7,62mm Traçante - 7,62mm Smugacz - 7.62mm Svítící - 7,62mm Traçante - 7.62mm Traccianti + 7.62 mm Tracer + 7,62 mm Nyomjelző + 7,62 mm Leuchtspur + 7,62 mm Trazadora + 7,62 mm Traçante + 7,62 mm Smugacz + 7.62 mm Svítící + 7,62 mm Traçante + 7.62 mm Traccianti 7,62 мм трассирущие - 7.62mm 曳光弾 - 7.62mm 예광탄 + 7.62 mm 曳光弾 + 7.62 mm 예광탄 7.62毫米 曳光彈 - 7.62mm 曳光弹 - 7.62mm İzli + 7.62 mm 曳光弹 + 7.62 mm İzli - Caliber: 7.62x51mm Tracer<br />Rounds: 20<br />Used in: Mk18 ABR - Kaliber: 7,62x51mm Nyomjelző<br />Lövedékek: 20<br />Használható: Mk18 ABR - Kaliber: 7,62x51mm Leuchtspur<br />Patronen: 20<br />Eingesetzt von: EBR - Calibre: 7,62x51mm Trazadora<br />Balas: 20<br />Se usa en: Mk18 ABR - Calibre: 7,62x51mm Traçante<br />Cartouches: 20<br />Utilisé avec: Mk18 ABR - Kaliber: 7,62x51mm Smugacz<br />Pociski: 20<br />Używane w: Mk18 ABR - Ráže: 7.62x51mm Svítící<br />Nábojů: 20<br />Použití u: Mk14 Mod 1 EBR - Calibre: 7,62x51mm Traçante<br />Projéteis: 20<br />Usado em: Mk18 ABR - Calibro: 7.62x51mm Traccianti<br />Munizioni: 20<br />In uso su: Mk18 ABR + Caliber: 7.62x51 mm Tracer<br />Rounds: 20<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Nyomjelző<br />Lövedékek: 20<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm Leuchtspur<br />Patronen: 20<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm Trazadora<br />Balas: 20<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm Traçante<br />Cartouches: 20<br />Utilisé avec: Mk18 ABR + Kaliber: 7,62x51 mm Smugacz<br />Pociski: 20<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm Svítící<br />Nábojů: 20<br />Použití u: Mk14 Mod 1 EBR + Calibre: 7,62x51 mm Traçante<br />Projéteis: 20<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm Traccianti<br />Munizioni: 20<br />In uso su: Mk18 ABR Калибр: 7,62x51 мм трассирующие<br />Патронов: 20<br />Используются с: Mk18 ABR - 口径: 7.62x51mm 曳光弾<br />装填数: 20<br />次で使用: Mk18 ABR - 구경: 7.62x51mm 예광탄<br />장탄수: 20<br />사용처: Mk18 ABR + 口径: 7.62x51 mm 曳光弾<br />装填数: 20<br />次で使用: Mk18 ABR + 구경: 7.62x51 mm 예광탄<br />장탄수: 20<br />사용처: Mk18 ABR 口徑: 7.62x51毫米 曳光彈<br />發數: 20<br />使用於: Mk18 ABR - 口径: 7.62x51mm 曳光弹<br />发数: 20<br />使用于: Mk18 ABR - Kalibre: 7.62x51mm Tracer<br />Mermi: 20<br />Kullanıyor: Mk18 ABR + 口径: 7.62x51 mm 曳光弹<br />发数: 20<br />使用于: Mk18 ABR + Kalibre: 7.62x51 mm Tracer<br />Mermi: 20<br />Kullanıyor: Mk18 ABR - 7.62mm 20rnd Tracer IR-DIM Mag - 7,62mm Nyomjelző IR-DIM 20-as Tár - 7,62mm 20-Patronen-Magazin Leuchtspur IR-DIM - Cargador de 20 balas trazadoras IR-DIM de 7,62mm - Ch. 7,62mm 20Cps Traçantes IR-DIM - Magazynek 7,62mm 20rd Smugacz IR-DIM - 7.62mm 20náb. Svítící IR-DIM Zásobník - Carregador de 20 projéteis IR-DIM de 7,62mm - Caricatore 7.62mm 20rnd Traccianti IR-DIM + 7.62 mm 20Rnd Mag (IR-DIM) + 7,62 mm Nyomjelző IR-DIM 20-as Tár + 7,62 mm 20-Patronen-Magazin Leuchtspur IR-DIM + Cargador de 20 balas trazadoras IR-DIM de 7,62 mm + Ch. 7,62 mm 20Cps Traçantes IR-DIM + Magazynek 7,62 mm 20rd Smugacz IR-DIM + 7.62 mm 20náb. Svítící IR-DIM Zásobník + Carregador de 20 projéteis IR-DIM de 7,62 mm + Caricatore 7.62 mm 20rnd Traccianti IR-DIM Магазин из 20-ти 7,62 мм ИК-трассирующих - 7.62mm 20発入り IR-DIM曳光弾 - 20발들이 7.62mm IR-DIM 예광탄 탄창 + 7.62 mm 20発入り IR-DIM曳光弾 + 20발들이 7.62 mm IR-DIM 예광탄 탄창 7.62毫米 20發 低視度紅外線曳光彈 彈匣 - 7.62mm 20发 低视度红外线曳光弹 弹匣 - 7.62mm 20rnd Tracer IR-DIM Mag + 7.62 mm 20发 低视度红外线曳光弹 弹匣 + 7.62 mm 20Rnd Mag (IR-DIM) - 7.62mm IR-DIM - 7,62mm IR-DIM - 7,62mm IR-DIM - 7,62mm IR-DIM - 7,62mm IR-DIM - 7,62mm IR-DIM - 7.62mm IR-DIM - 7,62mm IR-DIM - 7.62mm IR-DIM + 7.62 mm IR-DIM + 7,62 mm IR-DIM + 7,62 mm IR-DIM + 7,62 mm IR-DIM + 7,62 mm IR-DIM + 7,62 mm IR-DIM + 7.62 mm IR-DIM + 7,62 mm IR-DIM + 7.62 mm IR-DIM 7,62 мм ИК-трассирующие - 7.62mm IR-DIM曳光弾 - 7.62mm IR-DIM 예광탄 + 7.62 mm IR-DIM曳光弾 + 7.62 mm IR-DIM 예광탄 7.62毫米 低視紅外曳光彈 - 7.62mm 低视红外曳光弹 - 7.62mm IR-DIM + 7.62 mm 低视红外曳光弹 + 7.62 mm IR-DIM - Caliber: 7.62x51mm Tracer IR-DIM<br />Rounds: 20<br />Used in: Mk18 ABR - Kaliber: 7,62x51mm Nyomjelző IR-DIM<br />Lövedékek: 20<br />Használható: Mk18 ABR - Kaliber: 7,62x51mm Leuchtspur IR-DIM<br />Patronen: 20<br />Eingesetzt von: EBR - Calibre: 7,62x51mm Trazadoras IR-DIM<br />Balas: 20<br />Se usa en: Mk18 ABR - Calibre: 7,62x51mm Traçante IR-DIM<br />Cartouches: 20<br />Utilisé avec: Mk18 ABR - Kaliber: 7,62x51mm Smugacz IR-DIM<br />Pociski: 20<br />Używane w: Mk18 ABR - Ráže: 7.62x51mm Svítící IR-DIM<br />Nábojů: 20<br />Použití u: Mk14 Mod 1 EBR - Calibre: 7,62x51mm Traçante IR-DIM<br />Projéteis: 20<br />Usado em: Mk18 ABR - Calibro: 7.62x51mm Traccianti IR-DIM<br />Munizioni: 20<br />In uso su: Mk18 ABR + Caliber: 7.62x51 mm Tracer IR-DIM<br />Rounds: 20<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Nyomjelző IR-DIM<br />Lövedékek: 20<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm Leuchtspur IR-DIM<br />Patronen: 20<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm Trazadoras IR-DIM<br />Balas: 20<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm Traçante IR-DIM<br />Cartouches: 20<br />Utilisé avec: Mk18 ABR + Kaliber: 7,62x51 mm Smugacz IR-DIM<br />Pociski: 20<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm Svítící IR-DIM<br />Nábojů: 20<br />Použití u: Mk14 Mod 1 EBR + Calibre: 7,62x51 mm Traçante IR-DIM<br />Projéteis: 20<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm Traccianti IR-DIM<br />Munizioni: 20<br />In uso su: Mk18 ABR Калибр: 7,62x51 мм ИК-трассирующие<br />Патронов: 20<br />Используются с: Mk18 ABR - 口径: 7.62x51mm IR-DIM曳光弾<br />装填数: 20<br />次で使用: Mk18 ABR - 구경: 7.62x51mm IR-DIM 예광탄<br />장탄수: 20<br />사용처: Mk18 ABR + 口径: 7.62x51 mm IR-DIM曳光弾<br />装填数: 20<br />次で使用: Mk18 ABR + 구경: 7.62x51 mm IR-DIM 예광탄<br />장탄수: 20<br />사용처: Mk18 ABR 口徑: 7.62x51毫米 低視度紅外線曳光彈<br />發數: 20<br />使用於: Mk18 ABR - 口径: 7.62x51mm 低视度红外线曳光弹<br />发数: 20<br />使用于: Mk18 ABR - Kalibre: 7.62x51mm Tracer IR-DIM<br />Mermi: 20<br />Kullanıyor: Mk18 ABR + 口径: 7.62x51 mm 低视度红外线曳光弹<br />发数: 20<br />使用于: Mk18 ABR + Kalibre: 7.62x51 mm Tracer IR-DIM<br />Mermi: 20<br />Kullanıyor: Mk18 ABR - 7.62mm 20Rnd SD Mag - 7,62mm Halk 20-as Tár - 7,62mm 20-Patronen-Magazin SD - Cargador de 20 balas SD de 7,62mm - Ch. 7,62mm 20Cps SD - Magazynek 7,62mm 20rd SD - 7.62mm 20náb. SD Zásobník - Carregador de 20 projéteis SD de 7,62mm - Caricatore 7.62mm 20Rnd Sil. + 7.62 mm 20Rnd Mag (SD) + 7,62 mm Halk 20-as Tár + 7,62 mm 20-Patronen-Magazin SD + Cargador de 20 balas SD de 7,62 mm + Ch. 7,62 mm 20Cps SD + Magazynek 7,62 mm 20rd SD + 7.62 mm 20náb. SD Zásobník + Carregador de 20 projéteis SD de 7,62 mm + Caricatore 7.62 mm 20Rnd Sil. Магазин из 20-ти 7,62 мм дозвуковых - 7.62mm 20発入り 亜音速弾 弾倉 - 20발들이 7.62mm 아음속탄 탄창 + 7.62 mm 20発入り 亜音速弾 弾倉 + 20발들이 7.62 mm 아음속탄 탄창 7.62毫米 20發 消音彈 彈匣 - 7.62mm 20发 消音弹 弹匣 - 7.62mm 20Rnd SD Mag + 7.62 mm 20发 消音弹 弹匣 + 7.62 mm 20Rnd Mag (SD) - 7.62mm SD - 7,62mm Halk - 7,62mm SD - 7,62mm SD - 7,62mm SD - 7,62mm SD - 7.62mm SD - 7,62mm SD - 7.62mm Sil. + 7.62 mm SD + 7,62 mm Halk + 7,62 mm SD + 7,62 mm SD + 7,62 mm SD + 7,62 mm SD + 7.62 mm SD + 7,62 mm SD + 7.62 mm Sil. 7,62 мм дозвуковые - 7.62mm 亜音速弾 - 7.62mm 아음속탄 + 7.62 mm 亜音速弾 + 7.62 mm 아음속탄 7.62毫米 消音彈 - 7.62mm 消音弹 - 7.62mm SD + 7.62 mm 消音弹 + 7.62 mm SD - Caliber: 7.62x51mm SD<br />Rounds: 20<br />Used in: Mk18 ABR - Kaliber: 7,62x51mm Halk<br />Lövedékek: 20<br />Használható: Mk18 ABR - Kaliber: 7,62x51mm SD<br />Patronen: 20<br />Eingesetzt von: EBR - Calibre: 7,62x51mm SD<br />Balas: 20<br />Se usa en: Mk18 ABR - Calibre: 7,62x51mm SD<br />Cartouches: 20<br />Utilisé avec: Mk18 ABR - Kaliber: 7,62x51mm SD<br />Pociski: 20<br />Używane w: Mk18 ABR - Ráže: 7.62x51mm SD<br />Nábojů: 20<br />Použití u: Mk14 Mod 1 EBR - Calibre: 7,62x51mm SD<br />Projéteis: 20<br />Usado em: Mk18 ABR - Calibro: 7.62x51mm Sil.<br />Munizioni: 20<br />In uso su: Mk18 ABR + Caliber: 7.62x51 mm SD<br />Rounds: 20<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Halk<br />Lövedékek: 20<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm SD<br />Patronen: 20<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm SD<br />Balas: 20<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm SD<br />Cartouches: 20<br />Utilisé avec: Mk18 ABR + Kaliber: 7,62x51 mm SD<br />Pociski: 20<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm SD<br />Nábojů: 20<br />Použití u: Mk14 Mod 1 EBR + Calibre: 7,62x51 mm SD<br />Projéteis: 20<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm Sil.<br />Munizioni: 20<br />In uso su: Mk18 ABR Калибр: 7,62x51 мм дозвуковые<br />Патронов: 20<br />Используются с: Mk18 ABR - 口径: 7.62x51mm 亜音速弾<br />装填数: 20<br />次で使用: Mk18 ABR - 구경: 7.62x51mm SD<br />장탄수: 20<br />사용처: Mk18 ABR + 口径: 7.62x51 mm 亜音速弾<br />装填数: 20<br />次で使用: Mk18 ABR + 구경: 7.62x51 mm SD<br />장탄수: 20<br />사용처: Mk18 ABR 口徑: 7.62x51毫米 消音彈<br />發數: 20<br />使用於: Mk18 ABR - 口径: 7.62x51mm 消音弹<br />发数: 20<br />使用于: Mk18 ABR - Kalibre: 7.62x51mm SD<br />Mermi: 20<br />Kullanıyor: Mk18 ABR + 口径: 7.62x51 mm 消音弹<br />发数: 20<br />使用于: Mk18 ABR + Kalibre: 7.62x51 mm SD<br />Mermi: 20<br />Kullanıyor: Mk18 ABR + + + 7.62 mm 10Rnd Mag (Tracer) + 7,62 mm Nyomjelző IR-DIM 10-as Tár + 7,62 mm 10-Patronen-Magazin Leuchtspur + Cargador de 10 balas trazadores de 7,62 mm + Ch. 7,62 mm 10Cps Traçantes + Magazynek 7,62 mm 10rd Smugacz + 7.62 mm 10náb. Svítící Zásobník + Carregador de 10 projéteis traçantes de 7,62 mm + Caricatore 7.62 mm 10Rnd Traccianti + Магазин из 10-ти 7,62 мм трассирующих + 7.62 mm 10発入り 曳光弾 + 10발들이 7.62 mm 예광탄 탄창 + 7.62毫米 10發 曳光彈 彈匣 + 7.62 mm 10发 曳光弹 弹匣 + 7.62 mm 10Rnd Mag (Tracer) + + + 7.62 mm Tracer + 7,62 mm Nyomjelző + 7,62 mm Leuchtspur + 7,62 mm Trazadora + 7,62 mm Traçante + 7,62 mm Smugacz + 7.62 mm Svítící + 7,62 mm Traçante + 7.62 mm Traccianti + 7,62 мм трассирущие + 7.62 mm 曳光弾 + 7.62 mm 예광탄 + 7.62毫米 曳光彈 + 7.62 mm 曳光弹 + 7.62 mm İzli + + + Caliber: 7.62x51 mm Tracer<br />Rounds: 10<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Nyomjelző<br />Lövedékek: 10<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm Leuchtspur<br />Patronen: 10<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm Trazadora<br />Balas: 10<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm Traçante<br />Cartouches: 10<br />Utilisé avec: Mk18 ABR + Kaliber: 7,62x51 mm Smugacz<br />Pociski: 10<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm Svítící<br />Nábojů: 10<br />Použití u: Mk14 Mod 1 EBR + Calibre: 7,62x51 mm Traçante<br />Projéteis: 10<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm Traccianti<br />Munizioni: 10<br />In uso su: Mk18 ABR + Калибр: 7,62x51 мм трассирующие<br />Патронов: 10<br />Используются с: Mk18 ABR + 口径: 7.62x51 mm 曳光弾<br />装填数: 10<br />次で使用: Mk18 ABR + 구경: 7.62x51 mm 예광탄<br />장탄수: 10<br />사용처: Mk18 ABR + 口徑: 7.62x51毫米 曳光彈<br />發數: 10<br />使用於: Mk18 ABR + 口径: 7.62x51 mm 曳光弹<br />发数: 10<br />使用于: Mk18 ABR + Kalibre: 7.62x51 mm Tracer<br />Mermi: 10<br />Kullanıyor: Mk18 ABR + + + 7.62 mm 10Rnd Mag (IR-DIM) + 7,62 mm Nyomjelző IR-DIM 10-as Tár + 7,62 mm 10-Patronen-Magazin Leuchtspur IR-DIM + Cargador de 10 balas trazadoras IR-DIM de 7,62 mm + Ch. 7,62 mm 10Cps Traçantes IR-DIM + Magazynek 7,62 mm 10rd Smugacz IR-DIM + 7.62 mm 10náb. Svítící IR-DIM Zásobník + Carregador de 10 projéteis IR-DIM de 7,62 mm + Caricatore 7.62 mm 10rnd Traccianti IR-DIM + Магазин из 10-ти 7,62 мм ИК-трассирующих + 7.62 mm 10発入り IR-DIM曳光弾 + 10발들이 7.62 mm IR-DIM 예광탄 탄창 + 7.62毫米 10發 低視度紅外線曳光彈 彈匣 + 7.62 mm 10发 低视度红外线曳光弹 弹匣 + 7.62 mm 10Rnd Mag (IR-DIM) + + + 7.62 mm IR-DIM + 7,62 mm IR-DIM + 7,62 mm IR-DIM + 7,62 mm IR-DIM + 7,62 mm IR-DIM + 7,62 mm IR-DIM + 7.62 mm IR-DIM + 7,62 mm IR-DIM + 7.62 mm IR-DIM + 7,62 мм ИК-трассирующие + 7.62 mm IR-DIM曳光弾 + 7.62 mm IR-DIM 예광탄 + 7.62毫米 低視紅外曳光彈 + 7.62 mm 低视红外曳光弹 + 7.62 mm IR-DIM + + + Caliber: 7.62x51 mm Tracer IR-DIM<br />Rounds: 10<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Nyomjelző IR-DIM<br />Lövedékek: 10<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm Leuchtspur IR-DIM<br />Patronen: 10<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm Trazadoras IR-DIM<br />Balas: 10<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm Traçante IR-DIM<br />Cartouches: 10<br />Utilisé avec: Mk18 ABR + Kaliber: 7,62x51 mm Smugacz IR-DIM<br />Pociski: 10<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm Svítící IR-DIM<br />Nábojů: 10<br />Použití u: Mk14 Mod 1 EBR + Calibre: 7,62x51 mm Traçante IR-DIM<br />Projéteis: 10<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm Traccianti IR-DIM<br />Munizioni: 10<br />In uso su: Mk18 ABR + Калибр: 7,62x51 мм ИК-трассирующие<br />Патронов: 10<br />Используются с: Mk18 ABR + 口径: 7.62x51 mm IR-DIM曳光弾<br />装填数: 10<br />次で使用: Mk18 ABR + 구경: 7.62x51 mm IR-DIM 예광탄<br />장탄수: 10<br />사용처: Mk18 ABR + 口徑: 7.62x51毫米 低視度紅外線曳光彈<br />發數: 10<br />使用於: Mk18 ABR + 口径: 7.62x51 mm 低视度红外线曳光弹<br />发数: 10<br />使用于: Mk18 ABR + Kalibre: 7.62x51 mm Tracer IR-DIM<br />Mermi: 10<br />Kullanıyor: Mk18 ABR + + + 7.62 mm 10Rnd Mag (SD) + 7,62 mm Halk 10-as Tár + 7,62 mm 10-Patronen-Magazin SD + Cargador de 10 balas SD de 7,62 mm + Ch. 7,62 mm 10Cps SD + Magazynek 7,62 mm 10rd SD + 7.62 mm 10náb. SD Zásobník + Carregador de 10 projéteis SD de 7,62 mm + Caricatore 7.62 mm 10Rnd Sil. + Магазин из 10-ти 7,62 мм дозвуковых + 7.62 mm 10発入り 亜音速弾 弾倉 + 10발들이 7.62 mm 아음속탄 탄창 + 7.62毫米 10發 消音彈 彈匣 + 7.62 mm 10发 消音弹 弹匣 + 7.62 mm 10Rnd Mag (SD) + + + 7.62 mm SD + 7,62 mm Halk + 7,62 mm SD + 7,62 mm SD + 7,62 mm SD + 7,62 mm SD + 7.62 mm SD + 7,62 mm SD + 7.62 mm Sil. + 7,62 мм дозвуковые + 7.62 mm 亜音速弾 + 7.62 mm 아음속탄 + 7.62毫米 消音彈 + 7.62 mm 消音弹 + 7.62 mm SD + + + Caliber: 7.62x51 mm SD<br />Rounds: 10<br />Used in: Mk18 ABR + Kaliber: 7,62x51 mm Halk<br />Lövedékek: 10<br />Használható: Mk18 ABR + Kaliber: 7,62x51 mm SD<br />Patronen: 10<br />Eingesetzt von: EBR + Calibre: 7,62x51 mm SD<br />Balas: 10<br />Se usa en: Mk18 ABR + Calibre: 7,62x51 mm SD<br />Cartouches: 10<br />Utilisé avec: Mk18 ABR + Kaliber: 7,62x51 mm SD<br />Pociski: 10<br />Używane w: Mk18 ABR + Ráže: 7.62x51 mm SD<br />Nábojů: 10<br />Použití u: Mk14 Mod 1 EBR + Calibre: 7,62x51 mm SD<br />Projéteis: 10<br />Usado em: Mk18 ABR + Calibro: 7.62x51 mm Sil.<br />Munizioni: 10<br />In uso su: Mk18 ABR + Калибр: 7,62x51 мм дозвуковые<br />Патронов: 10<br />Используются с: Mk18 ABR + 口径: 7.62x51 mm 亜音速弾<br />装填数: 10<br />次で使用: Mk18 ABR + 구경: 7.62x51 mm SD<br />장탄수: 10<br />사용처: Mk18 ABR + 口徑: 7.62x51毫米 消音彈<br />發數: 10<br />使用於: Mk18 ABR + 口径: 7.62x51 mm 消音弹<br />发数: 10<br />使用于: Mk18 ABR + Kalibre: 7.62x51 mm SD<br />Mermi: 10<br />Kullanıyor: Mk18 ABR @@ -1116,7 +1269,7 @@ Calibre: .338 Norma Magnum trazadora<br />Balas: 130<br />Se usa en: SPMG Калибр: .338 Norma Magnum трассирующие<br />Патронов: 130<br />Используются в: SPMG Calibro: .338 Norma Magnum Tracciante<br />Munizioni: 130<br />In uso su: SPMG - Ráže: .338 Noma Magnum Svítící<br />Nábojů: 130<br />Použití u: LWMMG + Ráže: .338 Norma Magnum Svítící<br />Nábojů: 130<br />Použití u: LWMMG Calibre: .338 Norma Magnum Traçante<br />Cartuchos: 130<br />Usado em: SPMG Kaliber: .338 Norma Magnum nyomkövető<br />Lövedékek: 130<br />Használható: SPMG 口径: .338 Norma Magnum 曳光弾<br />装填数: 130<br />次で使用: SPMG @@ -1144,7 +1297,7 @@ .338 NM IR-DIM - .338 LM IR-DIM + .338 NM IR-DIM .338 NM IR-DIM .338 NM IR-DIM .338 NM IR-DIM @@ -1227,1350 +1380,1535 @@ 口径: .338 Norma Magnum 穿甲弹<br />发数: 130<br />使用于: SPMG Kalibre: .338 Norma Magnum AP<br />Mermi: 130<br />Kullanıyor: SPMG - + - 9.3mm 10Rnd Tracer Mag - 9,3mm 10-Patronen-Magazin Leuchtspur - Magazynek 9.3mm 10rd Smugacz - Ch. 9,3mm 10Cps Traçantes - Cargador de 10 balas trazadoras de 9.3mm + 9.3 mm 10Rnd Tracer Mag + 9,3 mm 10-Patronen-Magazin Leuchtspur + Magazynek 9.3 mm 10rd Smugacz + Ch. 9,3 mm 10Cps Traçantes + Cargador de 10 balas trazadoras de 9.3 mm Магазин из 10-ти 9,3 мм трассирующих - 9.3mm 10Rnd Tracer Mag - 9.3mm 10náb. Svítící Zásobník - Carregador de 10 cartuchos 9.3mm traçantes - 9,3mm 10-lövedékes nyomkövető tár - 9.3mm 10発入り 曳光弾 弾倉 - 10발들이 9.3mm 예광탄 탄창 + 9.3 mm 10Rnd Tracer Mag + 9.3 mm 10náb. Svítící Zásobník + Carregador de 10 cartuchos 9.3 mm traçantes + 9,3 mm 10-lövedékes nyomkövető tár + 9.3 mm 10発入り 曳光弾 弾倉 + 10발들이 9.3 mm 예광탄 탄창 9.3毫米 10發 曳光彈 彈匣 - 9.3mm 10发 曳光弹 弹匣 - 9.3mm 10Rnd Tracer Mag + 9.3 mm 10发 曳光弹 弹匣 + 9.3 mm 10Rnd Tracer Mag - 9.3mm Tracer - 9,3mm Leuchtspur - 9,3mm Smugacz - 9.3mm Svítící - 9,3mm Traçante - 9.3mm Trazadora + 9.3 mm Tracer + 9,3 mm Leuchtspur + 9,3 mm Smugacz + 9.3 mm Svítící + 9,3 mm Traçante + 9.3 mm Trazadora 9,3 мм трассирующие - 9.3mm Tracer - 9.3mm Traçante - 9,3mm nyomkövető - 9.3mm 曳光弾 - 9.3mm 예광탄 + 9.3 mm Tracer + 9.3 mm Traçante + 9,3 mm nyomkövető + 9.3 mm 曳光弾 + 9.3 mm 예광탄 9.3毫米 曳光彈 - 9.3mm 曳光弹 - 9.3mm Tracer + 9.3 mm 曳光弹 + 9.3 mm Tracer - Caliber: 9.3x64mm Tracer<br />Rounds: 10<br />Used in: Cyrus - Kaliber: 9,3x64mm Leuchtspur<br />Patronen: 10<br />Eingesetzt von: Cyrus - Kaliber: 9,3x64mm Smugacz<br />Pociski: 10<br />Używany w: Cyrus - Calibre: 9,3x64mm Traçante<br />Cartouches: 10<br />Utilisé avec: Cyrus - Calibre: 9.3x64mm trazadora<br />Balas: 10<br />Se usa en: Cyrus + Caliber: 9.3x64 mm Tracer<br />Rounds: 10<br />Used in: Cyrus + Kaliber: 9,3x64 mm Leuchtspur<br />Patronen: 10<br />Eingesetzt von: Cyrus + Kaliber: 9,3x64 mm Smugacz<br />Pociski: 10<br />Używany w: Cyrus + Calibre: 9,3x64 mm Traçante<br />Cartouches: 10<br />Utilisé avec: Cyrus + Calibre: 9.3x64 mm trazadora<br />Balas: 10<br />Se usa en: Cyrus Калибр: 9,3x64 мм трассирующие<br />Патронов: 10<br />Используются с: Cyrus - Calibro: 9.3x64mm Tracer<br />Munizioni: 10<br />In uso su: Cyrus - Ráže: 9.3x64mm Svítící<br />Nábojů: 10<br />Použití u: Cyrus - Calibre: 9.3x64mm Traçante<br />Cartuchos: 10<br />Usado em: Cyrus - Kaliber: 9,3x64mm nyomkövető<br />Lövedékek: 10<br />Használható: Cyrus - 口径: 9.3x64mm 曳光弾<br />装填数: 10<br />次で使用: Cyrus - 구경: 9.3x64mm 예광탄<br />장탄수: 10<br />사용처: Cyrus + Calibro: 9.3x64 mm Tracer<br />Munizioni: 10<br />In uso su: Cyrus + Ráže: 9.3x64 mm Svítící<br />Nábojů: 10<br />Použití u: Cyrus + Calibre: 9.3x64 mm Traçante<br />Cartuchos: 10<br />Usado em: Cyrus + Kaliber: 9,3x64 mm nyomkövető<br />Lövedékek: 10<br />Használható: Cyrus + 口径: 9.3x64 mm 曳光弾<br />装填数: 10<br />次で使用: Cyrus + 구경: 9.3x64 mm 예광탄<br />장탄수: 10<br />사용처: Cyrus 口徑: 9.3x64毫米 曳光彈<br />發數: 10<br />使用於: Cyrus - 口径: 9.3x64mm 曳光弹<br />发数: 10<br />使用于: Cyrus - Kalibre: 9.3x64mm Tracer<br />Mermi: 10<br />Kullanıyor: Cyrus + 口径: 9.3x64 mm 曳光弹<br />发数: 10<br />使用于: Cyrus + Kalibre: 9.3x64 mm Tracer<br />Mermi: 10<br />Kullanıyor: Cyrus - 9.3mm 10Rnd Tracer IR-DIM Mag - 9,3mm 10-Patronen-Magazin Leuchtspur IR-DIM - Magazynek 9,3mm 10rd Smugacz IR-DIM - Ch. 9,3mm 10Cps Traçantes IR-DIM - Cargador de 10 balas trazadoras IR-DIM de 9.3mm + 9.3 mm 10Rnd Tracer IR-DIM Mag + 9,3 mm 10-Patronen-Magazin Leuchtspur IR-DIM + Magazynek 9,3 mm 10rd Smugacz IR-DIM + Ch. 9,3 mm 10Cps Traçantes IR-DIM + Cargador de 10 balas trazadoras IR-DIM de 9.3 mm Магазин из 10-ти 9,3 мм ИК-трассирующих - 9.3mm 10Rnd Tracciante IR-DIM Mag - 9.3mm 10náb. Svítící IR-DIM Zásobník - Carregador de 10 cartuchos 9.3mm traçantes IR-DIM - 9,3mm 10-lövedékes infravörös nyomkövető tár - 9.3mm 10発入り IR-DIM曳光弾 弾倉 - 10발들이 9.3mm IR-DIM 예광탄 탄창 + 9.3 mm 10Rnd Tracciante IR-DIM Mag + 9.3 mm 10náb. Svítící IR-DIM Zásobník + Carregador de 10 cartuchos 9.3 mm traçantes IR-DIM + 9,3 mm 10-lövedékes infravörös nyomkövető tár + 9.3 mm 10発入り IR-DIM曳光弾 弾倉 + 10발들이 9.3 mm IR-DIM 예광탄 탄창 9.3毫米 10發 低視度紅外線曳光彈 彈匣 - 9.3mm 10发 低视度红外线曳光弹 弹匣 - 9.3mm 10Rnd Tracer IR-DIM Mag + 9.3 mm 10发 低视度红外线曳光弹 弹匣 + 9.3 mm 10Rnd Tracer IR-DIM Mag - 9.3mm IR-DIM - 9,3mm IR-DIM - 9,3mm IR-DIM - 9.3mm IR-DIM - 9,3mm IR-DIM - 9.3mm IR-DIM + 9.3 mm IR-DIM + 9,3 mm IR-DIM + 9,3 mm IR-DIM + 9.3 mm IR-DIM + 9,3 mm IR-DIM + 9.3 mm IR-DIM 9,3 мм ИК-трассирующие - 9.3mm IR-DIM - 9.3mm IR-DIM - 9,3mm infravörös nyomkövető - 9.3mm IR-DIM曳光弾 - 9.3mm IR-DIM 예광탄 + 9.3 mm IR-DIM + 9.3 mm IR-DIM + 9,3 mm infravörös nyomkövető + 9.3 mm IR-DIM曳光弾 + 9.3 mm IR-DIM 예광탄 9.3毫米 低視紅外曳光彈 - 9.3mm 低视红外曳光弹 - 9.3mm IR-DIM + 9.3 mm 低视红外曳光弹 + 9.3 mm IR-DIM - Caliber: 9.3x64mm Tracer IR-DIM<br />Rounds: 10<br />Used in: Cyrus - Kaliber: 9,3x64mm Leuchtspur IR-DIM<br />Patronen: 10<br />Eingesetzt von: Cyrus - Kaliber: 9,3x64mm Smugacz IR-DIM<br />Pociski: 10<br />Używany w: Cyrus - Calibre: 9,3x64mm Traçante IR-DIM<br />Cartouches: 10<br />Utilisé avec: Cyrus - Calibre: 9.3x64mm trazadora IR-DIM<br />Balas: 10<br />Se usa en: Cyrus + Caliber: 9.3x64 mm Tracer IR-DIM<br />Rounds: 10<br />Used in: Cyrus + Kaliber: 9,3x64 mm Leuchtspur IR-DIM<br />Patronen: 10<br />Eingesetzt von: Cyrus + Kaliber: 9,3x64 mm Smugacz IR-DIM<br />Pociski: 10<br />Używany w: Cyrus + Calibre: 9,3x64 mm Traçante IR-DIM<br />Cartouches: 10<br />Utilisé avec: Cyrus + Calibre: 9.3x64 mm trazadora IR-DIM<br />Balas: 10<br />Se usa en: Cyrus Калибр: 9,3x64 мм ИК-трассирующие<br />Патронов: 10<br />Используются с: Cyrus - Calibro: 9.3x64mm Tracciante IR-DIM<br />Munizioni: 10<br />In uso su: Cyrus - Ráže: 9.3x64mm Svítící IR-DIM<br />Nábojů: 10<br />Použití u: Cyrus - Calibre: 9.3x64mm Traçante IR-DIM<br />Cartuchos: 10<br />Usado em: Cyrus - Kaliber: 9,3x64mm infravörös nyomkövető<br />Lövedékek: 10<br /> Használható: Cyrus - 口径: 9.3x64mm IR-DIM曳光弾<br />装填数: 10<br />次で使用: Cyrus - 구경: 9.3x64mm IR-DIM 예광탄<br />장탄수: 10<br />사용처: Cyrus + Calibro: 9.3x64 mm Tracciante IR-DIM<br />Munizioni: 10<br />In uso su: Cyrus + Ráže: 9.3x64 mm Svítící IR-DIM<br />Nábojů: 10<br />Použití u: Cyrus + Calibre: 9.3x64 mm Traçante IR-DIM<br />Cartuchos: 10<br />Usado em: Cyrus + Kaliber: 9,3x64 mm infravörös nyomkövető<br />Lövedékek: 10<br /> Használható: Cyrus + 口径: 9.3x64 mm IR-DIM曳光弾<br />装填数: 10<br />次で使用: Cyrus + 구경: 9.3x64 mm IR-DIM 예광탄<br />장탄수: 10<br />사용처: Cyrus 口徑: 9.3x64毫米 低視度紅外線曳光彈<br />發數: 10<br />使用於: Cyrus - 口径: 9.3x64mm 低视度红外线曳光弹<br />发数: 10<br />使用于: Cyrus - Kalibre: 9.3x64mm Tracer IR-DIM<br />Mermi: 10<br />Kullanıyor: Cyrus + 口径: 9.3x64 mm 低视度红外线曳光弹<br />发数: 10<br />使用于: Cyrus + Kalibre: 9.3x64 mm Tracer IR-DIM<br />Mermi: 10<br />Kullanıyor: Cyrus - + - 9.3mm 150Rnd Tracer Belt - 9,3mm 150-Patronen-Gurt Leuchtspur - Taśma 9,3mm 150rd Smugacz - Bande 9,3mm 150Cps Traçantes - Cinta de 150 balas trazadoras de 9.3mm + 9.3 mm 150Rnd Tracer Belt + 9,3 mm 150-Patronen-Gurt Leuchtspur + Taśma 9,3 mm 150rd Smugacz + Bande 9,3 mm 150Cps Traçantes + Cinta de 150 balas trazadoras de 9.3 mm Лента из 150-ти 9,3 мм трассирующих - 9.3mm 150Rnd Tracer Belt - 9.3mm 150náb. Svítící Pás - Cinto de munição traçante 9.3mm com 150 cartuchos - 9,3mm 150-lövedékes nyomkövető heveder - 9.3mm 150発入り 曳光弾ベルト - 150발들이 9.3mm 예광탄 벨트 + 9.3 mm 150Rnd Tracer Belt + 9.3 mm 150náb. Svítící Pás + Cinto de munição traçante 9.3 mm com 150 cartuchos + 9,3 mm 150-lövedékes nyomkövető heveder + 9.3 mm 150発入り 曳光弾ベルト + 150발들이 9.3 mm 예광탄 벨트 9.3毫米 150發 曳光彈 彈鏈 - 9.3mm 150发 曳光弹 弹链 - 9.3mm 150Rnd Tracer Belt + 9.3 mm 150发 曳光弹 弹链 + 9.3 mm 150Rnd Tracer Belt - 9.3mm Tracer - 9,3mm Leuchtspur - 9,3mm Smugacz - 9.3mm Svítící - 9,3mm Traçante - 9.3mm Trazadora + 9.3 mm Tracer + 9,3 mm Leuchtspur + 9,3 mm Smugacz + 9.3 mm Svítící + 9,3 mm Traçante + 9.3 mm Trazadora 9,3 мм трассирующие - 9.3mm Tracciante - 9.3mm Traçante - 9,3mm nyomkövető - 9.3mm 曳光弾 - 9.3mm 예광탄 + 9.3 mm Tracciante + 9.3 mm Traçante + 9,3 mm nyomkövető + 9.3 mm 曳光弾 + 9.3 mm 예광탄 9.3毫米 曳光彈 - 9.3mm 曳光弹 - 9.3mm Tracer + 9.3 mm 曳光弹 + 9.3 mm Tracer - Caliber: 9.3x64mm Tracer<br />Rounds: 150<br />Used in: Navid - Kaliber: 9,3x64mm Leuchtspur<br />Patronen: 150<br />Eingesetzt von: Navid - Kaliber: 9,3x64mm Smugacz<br />Pociski: 150<br />Używane w: Navid - Calibre: 9,3x64mm Traçantes<br />Cartouches: 150<br />Utilisé avec: Navid - Calibre: 9.3x64mm trazadora<br />Balas: 150<br />Se usa en: Navid + Caliber: 9.3x64 mm Tracer<br />Rounds: 150<br />Used in: Navid + Kaliber: 9,3x64 mm Leuchtspur<br />Patronen: 150<br />Eingesetzt von: Navid + Kaliber: 9,3x64 mm Smugacz<br />Pociski: 150<br />Używane w: Navid + Calibre: 9,3x64 mm Traçantes<br />Cartouches: 150<br />Utilisé avec: Navid + Calibre: 9.3x64 mm trazadora<br />Balas: 150<br />Se usa en: Navid Калибр: 9,3x64 мм трассирующие<br />Патронов: 150<br />Используются с: Навид - Calibro: 9.3x64mm Tracciante<br />Munizioni: 150<br />In uso su: Navid - Ráže: 9.3x64mm Svítící<br />Nábojů: 150<br />Použití u: HK121 - Calibre: 9.3x64mm Traçante<br />Cartuchos: 150<br />Usado em: Navid - Kaliber: 9,3x64mm nyomkövető<br />Lövedékek: 150<br />Használható: Navid - 口径: 9.3x64mm 曳光弾<br />装填数: 150<br />次で使用: Navid - 구경: 9.3x64mm 예광탄<br />장탄수: 150<br />사용처: Navid + Calibro: 9.3x64 mm Tracciante<br />Munizioni: 150<br />In uso su: Navid + Ráže: 9.3x64 mm Svítící<br />Nábojů: 150<br />Použití u: HK121 + Calibre: 9.3x64 mm Traçante<br />Cartuchos: 150<br />Usado em: Navid + Kaliber: 9,3x64 mm nyomkövető<br />Lövedékek: 150<br />Használható: Navid + 口径: 9.3x64 mm 曳光弾<br />装填数: 150<br />次で使用: Navid + 구경: 9.3x64 mm 예광탄<br />장탄수: 150<br />사용처: Navid 口徑: 9.3x64m毫米 曳光彈<br />發數: 150<br />使用於: Navid - 口径: 9.3x64mm 曳光弹<br />发数: 150<br />使用于: Navid - Kalibre: 9.3x64mm Tracer<br />Mermi: 150<br />Kullanıyor: Navid + 口径: 9.3x64 mm 曳光弹<br />发数: 150<br />使用于: Navid + Kalibre: 9.3x64 mm Tracer<br />Mermi: 150<br />Kullanıyor: Navid - 9.3mm 150Rnd Tracer IR-DIM Belt - 9,3mm 150-Patronen-Gurt Leuchtspur IR-DIM - Taśma 9,3mm 150rd Smugacz IR-DIM - Bande 9,3mm 150Cps Traçantes IR-DIM - Cinta de 150 balas trazadoras IR-DIM de 9.3mm + 9.3 mm 150Rnd Tracer IR-DIM Belt + 9,3 mm 150-Patronen-Gurt Leuchtspur IR-DIM + Taśma 9,3 mm 150rd Smugacz IR-DIM + Bande 9,3 mm 150Cps Traçantes IR-DIM + Cinta de 150 balas trazadoras IR-DIM de 9.3 mm Лента из 150-ти 9,3 мм ИК-трассирующих - 9.3mm 150Rnd Tracciante IR-DIM Belt - 9.3mm 150náb. Svítící IR-DIM Pás - Cinto de munição traçante 9.3mm IR-DIM com 150 cartuchos - 9,3mm 150-lövedékes infravörös nyomkövető heveder - 9.3mm 150発入り IR-DIM曳光弾ベルト - 150발들이 9.3mm IR-DIM 예광탄 벨트 + 9.3 mm 150Rnd Tracciante IR-DIM Belt + 9.3 mm 150náb. Svítící IR-DIM Pás + Cinto de munição traçante 9.3 mm IR-DIM com 150 cartuchos + 9,3 mm 150-lövedékes infravörös nyomkövető heveder + 9.3 mm 150発入り IR-DIM曳光弾ベルト + 150발들이 9.3 mm IR-DIM 예광탄 벨트 9.3毫米 150發 低視度紅外線曳光彈 彈鏈 - 9.3mm 150发 低视度红外线曳光弹 弹链 - 9.3mm 150Rnd Tracer IR-DIM Belt + 9.3 mm 150发 低视度红外线曳光弹 弹链 + 9.3 mm 150Rnd Tracer IR-DIM Belt - 9.3mm IR-DIM - 9,3mm IR-DIM - 9,3mm IR-DIM - 9.3mm IR-DIM - 9,3mm IR-DIM - 9.3mm IR-DIM + 9.3 mm IR-DIM + 9,3 mm IR-DIM + 9,3 mm IR-DIM + 9.3 mm IR-DIM + 9,3 mm IR-DIM + 9.3 mm IR-DIM 9,3 мм ИК-трассирующие - 9.3mm IR-DIM - 9.3mm IR-DIM - 9,3mm infravörös nyomkövető - 9.3mm IR-DIM曳光弾 - 9.3mm IR-DIM 예광탄 + 9.3 mm IR-DIM + 9.3 mm IR-DIM + 9,3 mm infravörös nyomkövető + 9.3 mm IR-DIM曳光弾 + 9.3 mm IR-DIM 예광탄 9.3毫米 低視紅外曳光彈 - 9.3mm 低视红外曳光弹 - 9.3mm IR-DIM + 9.3 mm 低视红外曳光弹 + 9.3 mm IR-DIM - Caliber: 9.3x64mm Tracer IR-DIM<br />Rounds: 150<br />Used in: Navid - Kaliber: 9,3x64mm Leuchtspur IR-DIM<br />Patronen: 150<br />Eingesetzt von: Navid - Kaliber: 9,3x64mm Smugacz IR-DIM<br />Pociski: 150<br />Używane w: Navid - Calibre: 9,3x64mm Traçante IR-DIM<br />Cartouches: 150<br />Utilisé avec: Navid - Calibre: 9.3x64mm trazadora IR-DIM<br />Balas: 150<br />Se usa en: Navid + Caliber: 9.3x64 mm Tracer IR-DIM<br />Rounds: 150<br />Used in: Navid + Kaliber: 9,3x64 mm Leuchtspur IR-DIM<br />Patronen: 150<br />Eingesetzt von: Navid + Kaliber: 9,3x64 mm Smugacz IR-DIM<br />Pociski: 150<br />Używane w: Navid + Calibre: 9,3x64 mm Traçante IR-DIM<br />Cartouches: 150<br />Utilisé avec: Navid + Calibre: 9.3x64 mm trazadora IR-DIM<br />Balas: 150<br />Se usa en: Navid Калибр: 9,3x64 мм ИК-трассирующие<br />Патронов: 150<br />Используются с: Навид - Calibro: 9.3x64mm Tracciante IR-DIM<br />Munizioni: 150<br />In uso su: Navid - Ráže: 9.3x64mm Svítící IR-DIM<br />Nábojů: 150<br />Použití u: HK121 - Calibre: 9.3x64mm Traçante IR-DIM<br />Cartuchos: 150<br />Usado em: Navid - Kaliber: 9,3x64mm infravörös nyomkövető<br />Lövedékek: 150<br />Használható: Navid - 口径: 9.3x64mm IR-DIM曳光弾<br />装填数: 150<br />次で使用: Navid - 구경: 9.3x64mm IR-DIM 예광탄<br />장탄수: 150<br />사용처: Navid + Calibro: 9.3x64 mm Tracciante IR-DIM<br />Munizioni: 150<br />In uso su: Navid + Ráže: 9.3x64 mm Svítící IR-DIM<br />Nábojů: 150<br />Použití u: HK121 + Calibre: 9.3x64 mm Traçante IR-DIM<br />Cartuchos: 150<br />Usado em: Navid + Kaliber: 9,3x64 mm infravörös nyomkövető<br />Lövedékek: 150<br />Használható: Navid + 口径: 9.3x64 mm IR-DIM曳光弾<br />装填数: 150<br />次で使用: Navid + 구경: 9.3x64 mm IR-DIM 예광탄<br />장탄수: 150<br />사용처: Navid 口徑: 9.3x64毫米 低視度紅外線曳光彈<br />發數: 150<br />使用於: Navid - 口径: 9.3x64mm 低视度红外线曳光弹<br />发数: 150<br />使用于: Navid - Kalibre: 9.3x64mm Tracer IR-DIM<br />Mermi: 150<br />Kullanıyor: Navid + 口径: 9.3x64 mm 低视度红外线曳光弹<br />发数: 150<br />使用于: Navid + Kalibre: 9.3x64 mm Tracer IR-DIM<br />Mermi: 150<br />Kullanıyor: Navid - 9.3mm 150Rnd AP Belt - 9,3mm 150-Patronen-Gurt Hartkern - Taśma 9,3mm 150rd AP - Bande 9,3mm 150Cps AP - Cinta de 150 balas AP de 9.3mm + 9.3 mm 150Rnd AP Belt + 9,3 mm 150-Patronen-Gurt Hartkern + Taśma 9,3 mm 150rd AP + Bande 9,3 mm 150Cps AP + Cinta de 150 balas AP de 9.3 mm Лента из 150-ти 9,3 мм бронебойных - 9.3mm 150Rnd AP Belt - 9.3mm 150náb. AP Pás - Cinto de munição 9.3mm AP com 150 cartuchos - 9,3mm 150-lövedékes páncéltörő heveder - 9.3mm 150発入り 徹甲弾ベルト - 150발들이 9.3mm 철갑탄 벨트 + 9.3 mm 150Rnd AP Belt + 9.3 mm 150náb. AP Pás + Cinto de munição 9.3 mm AP com 150 cartuchos + 9,3 mm 150-lövedékes páncéltörő heveder + 9.3 mm 150発入り 徹甲弾ベルト + 150발들이 9.3 mm 철갑탄 벨트 9.3毫米 150發 穿甲彈 彈鏈 - 9.3mm 150发 穿甲弹 弹链 - 9.3mm 150Rnd AP Belt + 9.3 mm 150发 穿甲弹 弹链 + 9.3 mm 150Rnd AP Belt - 9.3mm AP - 9,3mm AP - 9,3mm AP - 9.3mm AP - 9,3mm AP - 9.3mm AP + 9.3 mm AP + 9,3 mm AP + 9,3 mm AP + 9.3 mm AP + 9,3 mm AP + 9.3 mm AP 9,3 мм бронебойные - 9.3mm AP - 9.3mm AP - 9,3mm páncéltörő - 9.3mm 徹甲弾 - 9.3mm 철갑탄 + 9.3 mm AP + 9.3 mm AP + 9,3 mm páncéltörő + 9.3 mm 徹甲弾 + 9.3 mm 철갑탄 9.3毫米 穿甲彈 - 9.3mm 穿甲弹 - 9.3mm AP + 9.3 mm 穿甲弹 + 9.3 mm AP - Caliber: 9.3x64mm AP<br />Rounds: 150<br />Used in: Navid - Kaliber: 9,3x64mm Hartkern<br />Patronen: 150<br />Eingesetzt von: Navid - Kaliber: 9,3x64mm AP<br />Pociski: 150<br />Używane w: Navid - Calibre: 9,3x64mm AP<br />Cartouches: 150<br />Utilisé avec: Navid - Calibre: 9.3x64mm AP<br />Balas: 150<br />Se usa en: Navid + Caliber: 9.3x64 mm AP<br />Rounds: 150<br />Used in: Navid + Kaliber: 9,3x64 mm Hartkern<br />Patronen: 150<br />Eingesetzt von: Navid + Kaliber: 9,3x64 mm AP<br />Pociski: 150<br />Używane w: Navid + Calibre: 9,3x64 mm AP<br />Cartouches: 150<br />Utilisé avec: Navid + Calibre: 9.3x64 mm AP<br />Balas: 150<br />Se usa en: Navid Калибр: 9,3x64 мм бронебойные<br />Патронов: 150<br />Используются с: Навид - Calibro: 9.3x64mm AP<br />Munizioni: 150<br />In uso su: Navid - Ráže: 9.3x64mm AP<br />Nábojů: 150<br />Použití u: HK121 - Calibre: 9.3x64mm AP<br />Cartuchos: 150<br />Usado em: Navid - Kaliber: 9,3x64mm páncéltörő<br />Lövedékek: 150<br />Használható: Navid - 口径: 9.3x64mm 徹甲弾<br />装填数: 150<br />次で使用: Navid - 구경: 9.3x64mm 철갑탄<br />장탄수: 150<br />사용처: Navid + Calibro: 9.3x64 mm AP<br />Munizioni: 150<br />In uso su: Navid + Ráže: 9.3x64 mm AP<br />Nábojů: 150<br />Použití u: HK121 + Calibre: 9.3x64 mm AP<br />Cartuchos: 150<br />Usado em: Navid + Kaliber: 9,3x64 mm páncéltörő<br />Lövedékek: 150<br />Használható: Navid + 口径: 9.3x64 mm 徹甲弾<br />装填数: 150<br />次で使用: Navid + 구경: 9.3x64 mm 철갑탄<br />장탄수: 150<br />사용처: Navid 口徑: 9.3x64毫米 穿甲彈<br />發數: 150<br />使用於: Navid - 口径: 9.3x64mm 穿甲弹<br />发数: 150<br />使用于: Navid - Kalibre: 9.3x64mm AP<br />Mermi: 150<br />Kullanıyor: Navid + 口径: 9.3x64 mm 穿甲弹<br />发数: 150<br />使用于: Navid + Kalibre: 9.3x64 mm AP<br />Mermi: 150<br />Kullanıyor: Navid - 9x19mm 16Rnd Mag - Magazynek 9x19mm 16rd - Ch. 9x19mm 16Cps - Cargador de 16 balas de 9x19mm + 9x19 mm 16Rnd Mag + Magazynek 9x19 mm 16rd + Ch. 9x19 mm 16Cps + Cargador de 16 balas de 9x19 mm Магазин из 16-ти 9х19 мм - 9x19mm 20-Patronen-Magazin - 9x19mm 16Rnd Mag - 9x19mm 16náb. Zásobník - Carregador de 16 cartuchos 9x19mm - 9x19mm 16-lövedékes tár - 9x19mm 16発入り 弾倉 - 16발들이 9x19mm 탄창 + 9x19 mm 20-Patronen-Magazin + 9x19 mm 16Rnd Mag + 9x19 mm 16náb. Zásobník + Carregador de 16 cartuchos 9x19 mm + 9x19 mm 16-lövedékes tár + 9x19 mm 16発入り 弾倉 + 16발들이 9x19 mm 탄창 9x19毫米 16發 彈匣 - 9x19mm 16发 弹匣 - 9x19mm 16Rnd Mag + 9x19 mm 16发 弹匣 + 9x19 mm 16Rnd Mag - 9x19mm - 9x19mm - 9x19mm - 9x19mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm 9х19 мм - 9x19mm - 9x19mm - 9x19mm - 9x19mm - 9x19mm - 9x19mm - 9x19mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm 9x19毫米 - 9x19mm - 9x19mm + 9x19 mm + 9x19 mm - 9x19mm 30Rnd Mag - Magazynek 9x19mm 16rd - Ch. 9x19mm 30Cps - Cargador de 16 balas de 9x19mm + 9x19 mm 30Rnd Mag + Magazynek 9x19 mm 16rd + Ch. 9x19 mm 30Cps + Cargador de 16 balas de 9x19 mm Магазин из 16-ти 9х19 мм - 9x19mm 30-Patronen-Magazin - 9x19mm 30Rnd Mag - 9x19mm 30náb. Zásobník - Carregador de 16 cartuchos 9x19mm - 9x19mm 16-lövedékes tár - 9x19mm 30発入り 弾倉 - 30발들이 9x19mm 탄창 + 9x19 mm 30-Patronen-Magazin + 9x19 mm 30Rnd Mag + 9x19 mm 30náb. Zásobník + Carregador de 16 cartuchos 9x19 mm + 9x19 mm 16-lövedékes tár + 9x19 mm 30発入り 弾倉 + 30발들이 9x19 mm 탄창 9x19毫米 30發 彈匣 - 9x19mm 30发 弹匣 - 9x19mm 30Rnd Mag + 9x19 mm 30发 弹匣 + 9x19 mm 30Rnd Mag - 9x19mm 30Rnd Mag - Magazynek 9x19mm 30rd - Ch. 9x19mm 30Cps - Cargador de 30 balas de 9x19mm + 9x19 mm 30Rnd Mag + Magazynek 9x19 mm 30rd + Ch. 9x19 mm 30Cps + Cargador de 30 balas de 9x19 mm Магазин из 30-ти 9х19 мм - 9x19mm 30-Patronen-Magazin - 9x19mm 30Rnd Mag - 9x19mm 30náb. Zásobník - Carregador de 30 cartuchos 9x19mm - 9x19mm 30-lövedékes tár - 9x19mm 30発入り 弾倉 - 30발들이 9x19mm 탄창 + 9x19 mm 30-Patronen-Magazin + 9x19 mm 30Rnd Mag + 9x19 mm 30náb. Zásobník + Carregador de 30 cartuchos 9x19 mm + 9x19 mm 30-lövedékes tár + 9x19 mm 30発入り 弾倉 + 30발들이 9x19 mm 탄창 9x19毫米 30發 彈匣 - 9x19mm 30发 弹匣 - 9x19mm 30Rnd Mag + 9x19 mm 30发 弹匣 + 9x19 mm 30Rnd Mag - 9x19mm - 9x19mm - 9x19mm - 9x19mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm 9х19 мм - 9x19mm - 9x19mm - 9x19mm - 9x19mm - 9x19mm - 9x19mm - 9x19mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm + 9x19 mm 9x19毫米 - 9x19mm - 9x19mm + 9x19 mm + 9x19 mm - 9x19mm 30Rnd Mag - Magazynek 9x19mm 30rd - Ch. 9x19mm 30Cps - Cargador de 30 balas de 9x19mm + 9x19 mm 30Rnd Mag + Magazynek 9x19 mm 30rd + Ch. 9x19 mm 30Cps + Cargador de 30 balas de 9x19 mm Магазин из 30-ти 9х19 мм - 9x19mm 30-Patronen-Magazin - 9x19mm 30Rnd Mag - 9x19mm 30náb. Zásobník - Carregador de 30 cartuchos 9x19mm - 9x19mm 30-lövedékes tár - 9x19mm 30発入り 弾倉 - 30발들이 9x19mm 탄창 + 9x19 mm 30-Patronen-Magazin + 9x19 mm 30Rnd Mag + 9x19 mm 30náb. Zásobník + Carregador de 30 cartuchos 9x19 mm + 9x19 mm 30-lövedékes tár + 9x19 mm 30発入り 弾倉 + 30발들이 9x19 mm 탄창 9x19毫米 30發 彈匣 - 9x19mm 30发 弹匣 - 9x19mm 30Rnd Mag + 9x19 mm 30发 弹匣 + 9x19 mm 30Rnd Mag - 7.62x54mm 10Rnd Tracer Mag - Magazynek 7,62x54mm 10rd Smugacz - Ch. 7,62x54mm 10Cps Traçantes - Cargador de 10 balas trazadoras de 7.62x54mm + 7.62x54 mm 10Rnd Tracer Mag + Magazynek 7,62x54 mm 10rd Smugacz + Ch. 7,62x54 mm 10Cps Traçantes + Cargador de 10 balas trazadoras de 7.62x54 mm Магазин из 10-ти 7,62 мм ИК-трассирующих - 7,62x54mm 10-Patronen-Magazin Leuchtspur - 7.62x54mm 10Munizioni Traccianti IR-DIM Mag - 7.62x54mm 10náb. Svítící Zásobník - Carregador com 10 cartuchos 7.62x54mm Traçante - 7,62x54mm 10-lövedékes nyomkövető tár - 7.62x54mm 10発入り 曳光弾 弾倉 - 10발들이 7.62x54mm 예광탄 탄창 + 7,62x54 mm 10-Patronen-Magazin Leuchtspur + 7.62x54 mm 10Munizioni Traccianti IR-DIM Mag + 7.62x54 mm 10náb. Svítící Zásobník + Carregador com 10 cartuchos 7.62x54 mm Traçante + 7,62x54 mm 10-lövedékes nyomkövető tár + 7.62x54 mm 10発入り 曳光弾 弾倉 + 10발들이 7.62x54 mm 예광탄 탄창 7.62x54毫米 10發 曳光彈 彈匣 - 7.62x54mm 10发 曳光弹 弹匣 - 7.62x54mm 10Rnd Tracer Mag + 7.62x54 mm 10发 曳光弹 弹匣 + 7.62x54 mm 10Rnd Tracer Mag - 7.62mm - 7,62mm - 7,62mm - 7.62mm + 7.62 mm + 7,62 mm + 7,62 mm + 7.62 mm 7,62 мм - 7,62mm - 7.62mm - 7.62mm - 7.62mm - 7,62mm - 7.62mm - 7.62mm + 7,62 mm + 7.62 mm + 7.62 mm + 7.62 mm + 7,62 mm + 7.62 mm + 7.62 mm 7.62毫米 - 7.62mm - 7.62mm + 7.62 mm + 7.62 mm - 7.62x54mm 10Rnd Tracer Mag - Magazynek 7,62x54mm 10rd Smugacz - Ch. 7,62x54mm 10Cps Traçantes - Cargador de 10 balas trazadoras de 7.62x54mm + 7.62x54 mm 10Rnd Tracer Mag + Magazynek 7,62x54 mm 10rd Smugacz + Ch. 7,62x54 mm 10Cps Traçantes + Cargador de 10 balas trazadoras de 7.62x54 mm Магазин из 10-ти 7,62 мм ИК-трассирующих - 7,62x54mm 10-Patronen-Magazin Leuchtspur - 7.62x54mm 10Munizioni Traccianti IR-DIM Mag - 7.62x54mm 10náb. Svítící Zásobník - Carregador com 10 cartuchos 7.62x54mm Traçante - 7,62x54mm 10-lövedékes nyomkövető tár - 7.62x54mm 10発入り 曳光弾 弾倉 - 10발들이 7.62x54mm 예광탄 탄창 + 7,62x54 mm 10-Patronen-Magazin Leuchtspur + 7.62x54 mm 10Munizioni Traccianti IR-DIM Mag + 7.62x54 mm 10náb. Svítící Zásobník + Carregador com 10 cartuchos 7.62x54 mm Traçante + 7,62x54 mm 10-lövedékes nyomkövető tár + 7.62x54 mm 10発入り 曳光弾 弾倉 + 10발들이 7.62x54 mm 예광탄 탄창 7.62x54毫米 10發 曳光彈 彈匣 - 7.62x54mm 10发 曳光弹 弹匣 - 7.62x54mm 10Rnd Tracer Mag + 7.62x54 mm 10发 曳光弹 弹匣 + 7.62x54 mm 10Rnd Tracer Mag - 6.5mm 100Rnd Tracer IR-DIM Mag - Magazynek 6,5mm 100rd Smugacz IR-DIM - Ch. 6,5mm 100Cps Traçantes IR-DIM - Cargador de 100 balas trazadoras IR-DIM de 6.5mm + 6.5 mm 100Rnd Tracer IR-DIM Mag + Magazynek 6,5 mm 100rd Smugacz IR-DIM + Ch. 6,5 mm 100Cps Traçantes IR-DIM + Cargador de 100 balas trazadoras IR-DIM de 6.5 mm Магазин из 100 6,5 мм ИК-трассирующих - 6,5mm 100-Patronen-Magazin IR-DIM Leuchtspur - 6.5mm 100Munizioni Traccianti IR-DIM Mag - 6.5mm 100náb. Svítící IR-DIM Zásobník - Carregador com 100 cartuchos 6.5mm IR-DIM Traçante - 6,5mm 100-lövedékes infravörös nyomkövető tár - 6.5mm 100発入り IR-DIM曳光弾 弾倉 - 100발들이 6.5mm IR-DIM 예광탄 탄창 + 6,5 mm 100-Patronen-Magazin IR-DIM Leuchtspur + 6.5 mm 100Munizioni Traccianti IR-DIM Mag + 6.5 mm 100náb. Svítící IR-DIM Zásobník + Carregador com 100 cartuchos 6.5 mm IR-DIM Traçante + 6,5 mm 100-lövedékes infravörös nyomkövető tár + 6.5 mm 100発入り IR-DIM曳光弾 弾倉 + 100발들이 6.5 mm IR-DIM 예광탄 탄창 6.5毫米 100發 低視度紅外線曳光彈 彈匣 - 6.5mm 100发 低视度红外线曳光弹 弹匣 - 6.5mm 100Rnd Tracer IR-DIM Mag + 6.5 mm 100发 低视度红外线曳光弹 弹匣 + 6.5 mm 100Rnd Tracer IR-DIM Mag - 6.5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6.5mm IR-DIM + 6.5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6.5 mm IR-DIM 6,5 мм ИК-трассирующие - 6,5mm IR-DIM - 6.5mm IR-DIM - 6.5mm IR-DIM - 6.5mm IR-DIM - 6,5mm infravörös nyomkövető - 6.5mm IR-DIM曳光弾 - 6.5mm IR-DIM 예광탄 + 6,5 mm IR-DIM + 6.5 mm IR-DIM + 6.5 mm IR-DIM + 6.5 mm IR-DIM + 6,5 mm infravörös nyomkövető + 6.5 mm IR-DIM曳光弾 + 6.5 mm IR-DIM 예광탄 6.5毫米 低視紅外曳光彈 - 6.5mm 低视红外曳光弹 - 6.5mm IR-DIM + 6.5 mm 低视红外曳光弹 + 6.5 mm IR-DIM - 6.5mm 100Rnd Tracer IR-DIM Mag<br />Rounds: 100<br />Used in: MX LSW - Magazynek 6,5mm 100rd Smugacz IR-DIM - Ch. 6,5mm 100Cps Traçantes IR-DIM<br />Cartouches: 100<br />Utilisé avec: MX LSW - Cargador de 100 balas trazadoras IR-DIM de 6.5mm + 6.5 mm 100Rnd Tracer IR-DIM Mag<br />Rounds: 100<br />Used in: MX LSW + Magazynek 6,5 mm 100rd Smugacz IR-DIM + Ch. 6,5 mm 100Cps Traçantes IR-DIM<br />Cartouches: 100<br />Utilisé avec: MX LSW + Cargador de 100 balas trazadoras IR-DIM de 6.5 mm Магазин из 100 6,5 мм ИК-трассирующих - 6,5mm 100-Patronen-Magazin IR-DIM Leuchtspur<br />Patronen: 100<br />Eingesetzt von: MXLSW - 6.5mm 100Rnd Tracer IR-DIM Mag<br />Munizioni: 100<br />In uso su: MX LSW - 6.5mm 100náb. Svítící IR-DIM Zásobník<br />Nábojů: 100<br />Použití u: MX LSW - Carregador 6.5mm 100 Cartuchos Traçantes IR-DIM<br />Cartuchos: 100<br />Usado em: MX LSW - 6.5mm 100-lövedékes infravörös nyomkövető tár<br />Lövedékek: 100<br />Használható: MX LSW - 6.5mm 100発入り IR-DIM曳光弾 弾倉<br />装填数: 100<br />次で使用: MX LSW - 100발들이 6.5mm IR-DIM 예광탄 탄창<br />장탄수: 100<br />사용처: MX LSW + 6,5 mm 100-Patronen-Magazin IR-DIM Leuchtspur<br />Patronen: 100<br />Eingesetzt von: MXLSW + 6.5 mm 100Rnd Tracer IR-DIM Mag<br />Munizioni: 100<br />In uso su: MX LSW + 6.5 mm 100náb. Svítící IR-DIM Zásobník<br />Nábojů: 100<br />Použití u: MX LSW + Carregador 6.5 mm 100 Cartuchos Traçantes IR-DIM<br />Cartuchos: 100<br />Usado em: MX LSW + 6.5 mm 100-lövedékes infravörös nyomkövető tár<br />Lövedékek: 100<br />Használható: MX LSW + 6.5 mm 100発入り IR-DIM曳光弾 弾倉<br />装填数: 100<br />次で使用: MX LSW + 100발들이 6.5 mm IR-DIM 예광탄 탄창<br />장탄수: 100<br />사용처: MX LSW 6.5毫米 100發 低視度紅外線曳光彈<br />發數: 100<br />使用於: MX LSW - 6.5mm 100发 低视度红外线曳光弹<br />发数: 100<br />使用于: MX LSW - 6.5mm 100Rnd Tracer IR-DIM Mag<br />Mermi: 100<br />Kullanıyor: MX LSW + 6.5 mm 100发 低视度红外线曳光弹<br />发数: 100<br />使用于: MX LSW + 6.5 mm 100Rnd Tracer IR-DIM Mag<br />Mermi: 100<br />Kullanıyor: MX LSW - 6.5mm 200Rnd Tracer IR-DIM Belt - Magazynek 6,5mm 200rd Smugacz IR-DIM - Bande 6,5mm 200Cps Traçantes IR-DIM - Cinta de 200 balas trazadoras IR-DIM de 6.5mm + 6.5 mm 200Rnd Belt Tracer (IR-DIM) + Magazynek 6,5 mm 200rd Smugacz IR-DIM + Bande 6,5 mm 200Cps Traçantes IR-DIM + Cinta de 200 balas trazadoras IR-DIM de 6.5 mm Магазин из 200-т 6,5 мм ИК-трассирующих - 6,5mm 200-Patronen-Gurt IR-DIM Leuchtspur - 6.5mm 200Rnd Tracer IR-DIM Belt - 6.5mm 200náb. Svítící IR-DIM Pás - Cinto de munição traçante 6.5mm IR-DIM com 200 cartuchos - 6,5mm 200-lövedékes infravörös nyomkövető heveder - 6.5mm 200発入り IR-DIM曳光弾ベルト - 200발들이 6.5mm IR-DIM 예광탄 탄창 + 6,5 mm 200-Patronen-Gurt IR-DIM Leuchtspur + 6.5 mm 200Rnd Belt Tracer (IR-DIM) + 6.5 mm 200náb. Svítící IR-DIM Pás + Cinto de munição traçante 6.5 mm IR-DIM com 200 cartuchos + 6,5 mm 200-lövedékes infravörös nyomkövető heveder + 6.5 mm 200発入り IR-DIM曳光弾ベルト + 200발들이 6.5 mm IR-DIM 예광탄 탄창 6.5毫米 200發 低視度紅外線曳光彈 彈鏈 - 6.5mm 200发 低视度红外线曳光弹 弹链 - 6.5mm 200Rnd Tracer IR-DIM Belt + 6.5 mm 200发 低视度红外线曳光弹 弹链 + 6.5 mm 200Rnd Belt Tracer (IR-DIM) - 6.5mm IR-DIM - 6,5mm IR-DIM - 6,5mm IR-DIM - 6.5mm IR-DIM + 6.5 mm IR-DIM + 6,5 mm IR-DIM + 6,5 mm IR-DIM + 6.5 mm IR-DIM 6,5 мм ИК-трассирующие - 6,5mm IR-DIM - 6.5mm IR-DIM - 6.5mm IR-DIM - 6.5mm IR-DIM - 6,5mm infravörös nyomkövető - 6.5mm IR-DIM曳光弾 - 6.5mm IR-DIM 예광탄 + 6,5 mm IR-DIM + 6.5 mm IR-DIM + 6.5 mm IR-DIM + 6.5 mm IR-DIM + 6,5 mm infravörös nyomkövető + 6.5 mm IR-DIM曳光弾 + 6.5 mm IR-DIM 예광탄 6.5毫米 低視紅外曳光彈 - 6.5mm 低视红外曳光弹 - 6.5mm IR-DIM + 6.5 mm 低视红外曳光弹 + 6.5 mm IR-DIM - 6.5mm 200Rnd Tracer IR-DIM Belt<br />Rounds: 200<br />Used in: Stoner 99 LMG - Magazynek 6,5mm 200rd Smugacz IR-DIM - Bande 6,5mm 200Cps Traçantes IR-DIM<br />Cartouches: 200<br />Utilisé avec: Stoner 99 LMG - Cinta de 200 balas trazadoras IR-DIM de 6.5mm + 6.5 mm 200Rnd Belt Tracer (IR-DIM)<br />Rounds: 200<br />Used in: Stoner 99 LMG + Magazynek 6,5 mm 200rd Smugacz IR-DIM + Bande 6,5 mm 200Cps Traçantes IR-DIM<br />Cartouches: 200<br />Utilisé avec: Stoner 99 LMG + Cinta de 200 balas trazadoras IR-DIM de 6.5 mm Магазин из 200-т 6,5 мм ИК-трассирующих - 6,5mm 200-Patronen-Gurt IR-DIM Leuchtspur<br />Patronen: 200<br />Eingesetzt von: Stoner 99 LMG - 6.5mm 200Rnd Tracer IR-DIM Belt<br />Munizioni: 200<br />In uso su: Stoner 99 LMG - 6.5mm 200náb. Svítící IR-DIM Pás<br />Nábojů: 200<br />Použití u: Stoner 99 LMG - Cinto de munição traçante 6.5mm IR-DIM com 200 cartuchos<br />Cartuchos: 200<br />Usado em: Stoner 99 LMG - 6.5mm 200-lövedékes infravörös nyomkövető heveder<br />Lövedékek: 200<br />Használható: Stoner 99 LMG - 6.5mm 200発入り IR-DIM曳光弾ベルト<br />装填数: 200<br />次で使用: Stoner 99 LMG - 200발들이 6.5mm IR-DIM 예광탄 벨트<br />장탄수: 200<br />사용처: Stoner 99 LMG + 6,5 mm 200-Patronen-Gurt IR-DIM Leuchtspur<br />Patronen: 200<br />Eingesetzt von: Stoner 99 LMG + 6.5 mm 200Rnd Belt Tracer (IR-DIM)<br />Munizioni: 200<br />In uso su: Stoner 99 LMG + 6.5 mm 200náb. Svítící IR-DIM Pás<br />Nábojů: 200<br />Použití u: Stoner 99 LMG + Cinto de munição traçante 6.5 mm IR-DIM com 200 cartuchos<br />Cartuchos: 200<br />Usado em: Stoner 99 LMG + 6.5 mm 200-lövedékes infravörös nyomkövető heveder<br />Lövedékek: 200<br />Használható: Stoner 99 LMG + 6.5 mm 200発入り IR-DIM曳光弾ベルト<br />装填数: 200<br />次で使用: Stoner 99 LMG + 200발들이 6.5 mm IR-DIM 예광탄 벨트<br />장탄수: 200<br />사용처: Stoner 99 LMG 6.5毫米 200發 低視度紅外線曳光彈<br />發數: 200<br />使用於: Stoner 99 重機槍 - 6.5mm 200发 低视度红外线曳光弹<br />发数: 200<br />使用于: Stoner 99 LMG - 6.5mm 200Rnd Tracer IR-DIM Belt<br />Mermi: 200<br />Kullanıyor: Stoner 99 LMG + 6.5 mm 200发 低视度红外线曳光弹<br />发数: 200<br />使用于: Stoner 99 LMG + 6.5 mm 200Rnd Belt Tracer (IR-DIM)<br />Mermi: 200<br />Kullanıyor: Stoner 99 LMG - 5.56mm 30Rnd Mag (Mk262) - Magazynek 5,56mm 30rd Mk262 - 5,56mm 30Cps (Mk262) - Cargador de 30 balas de 5.56mm (Mk262) + 5.56 mm 30Rnd Mag (Mk262) + Magazynek 5,56 mm 30rd Mk262 + 5,56 mm 30Cps (Mk262) + Cargador de 30 balas de 5.56 mm (Mk262) Магазин из 30-ти 5.56 мм Mk262 - 5,56mm 30-Patronen-Magazin (Mk262) - 5.56mm 30Rnd Mag (Mk262) - 5.56mm 30náb. Zásobník (Mk262) - Carregador 5.56mm com 30 cartuchos (Mk262) - 5,56mm 30-lövedékes tár (Mk262) - 5.56mm 30発入り 弾倉 (Mk262) - 30발들이 5.56mm 탄창 (Mk262) + 5,56 mm 30-Patronen-Magazin (Mk262) + 5.56 mm 30Rnd Mag (Mk262) + 5.56 mm 30náb. Zásobník (Mk262) + Carregador 5.56 mm com 30 cartuchos (Mk262) + 5,56 mm 30-lövedékes tár (Mk262) + 5.56 mm 30発入り 弾倉 (Mk262) + 30발들이 5.56 mm 탄창 (Mk262) 5.56毫米 30發 彈匣 (Mk262 狙擊專用彈) - 5.56mm 30发 弹匣 (Mk262 狙击专用弹) - 5.56mm 30Rnd Mag (Mk262) + 5.56 mm 30发 弹匣 (Mk262 狙击专用弹) + 5.56 mm 30Rnd Mag (Mk262) - 5.56mm Mk262 - 5,56mm Mk262 - 5,56mm Mk262 - 5.56mm Mk262 + 5.56 mm Mk262 + 5,56 mm Mk262 + 5,56 mm Mk262 + 5.56 mm Mk262 5,56 мм Mk262 - 5,56mm Mk262 - 5.56mm Mk262 - 5.56mm Mk262 - 5.56mm Mk262 - 5,56mm Mk262 - 5.56mm Mk262 - 5.56mm Mk262 + 5,56 mm Mk262 + 5.56 mm Mk262 + 5.56 mm Mk262 + 5.56 mm Mk262 + 5,56 mm Mk262 + 5.56 mm Mk262 + 5.56 mm Mk262 5.56毫米 Mk262 狙擊專用彈 - 5.56mm Mk262 狙击专用弹 - 5.56mm Mk262 + 5.56 mm Mk262 狙击专用弹 + 5.56 mm Mk262 - Caliber: 5.56x45mm NATO (Mk262)<br />Rounds: 30 - Kaliber: 5,56x45mm NATO (Mk262)<br />Pociski: 30 - Calibre: 5,56x45mm NATO (Mk262)<br />Cartouches: 30 - Calibre: 5.56x45mm NATO (Mk262)<br />Balas: 30 + Caliber: 5.56x45 mm NATO (Mk262)<br />Rounds: 30 + Kaliber: 5,56x45 mm NATO (Mk262)<br />Pociski: 30 + Calibre: 5,56x45 mm NATO (Mk262)<br />Cartouches: 30 + Calibre: 5.56x45 mm NATO (Mk262)<br />Balas: 30 Калибр: 5,56x45 мм NATO (Mk262)<br />Патронов: 30 - Kaliber: 5,56x45mm NATO (Mk262)<br />Patronen: 30 + Kaliber: 5,56x45 mm NATO (Mk262)<br />Patronen: 30 Calibro: 5.56x45 mm NATO (Mk262)<br />Munizioni: 30 - Ráže: 5.56x45mm NATO (Mk262)<br />Nábojů: 30 - Calibre: 5.56x45mm NATO (Mk262)<br/>Cartuchos: 30 - Kaliber: 5,56x45mm NATO (Mk262)<br />Lövedékek: 30 - 口径: 5.56x45mm NATO (Mk262)<br />装填数: 30 - 구경: 5.56x45mm NATO (Mk262)<br />장탄수: 30 + Ráže: 5.56x45 mm NATO (Mk262)<br />Nábojů: 30 + Calibre: 5.56x45 mm NATO (Mk262)<br/>Cartuchos: 30 + Kaliber: 5,56x45 mm NATO (Mk262)<br />Lövedékek: 30 + 口径: 5.56x45 mm NATO (Mk262)<br />装填数: 30 + 구경: 5.56x45 mm NATO (Mk262)<br />장탄수: 30 口徑: 5.56x45毫米 NATO標準 (Mk262 狙擊專用彈)<br />發數: 30 - 口径: 5.56x45mm NATO标准 (Mk262 狙击专用弹)<br />发数: 30 - Kalibre: 5.56x45mm NATO (Mk262)<br />Mermi: 30 + 口径: 5.56x45 mm NATO标准 (Mk262 狙击专用弹)<br />发数: 30 + Kalibre: 5.56x45 mm NATO (Mk262)<br />Mermi: 30 - 5.56mm 30Rnd Mag (Mk318) - Magazynek 5,56mm 30rd (Mk318) - Ch. 5,56mm 30Cps (Mk318) - Cargador de 30 balas de 5.56mm (Mk318) + 5.56 mm 30Rnd Mag (Mk318) + Magazynek 5,56 mm 30rd (Mk318) + Ch. 5,56 mm 30Cps (Mk318) + Cargador de 30 balas de 5.56 mm (Mk318) Магазин из 30-ти 5.56 мм (Mk318) - 5,56mm 30-Patronen-Magazin (Mk318) - 5.56mm 30Rnd Mag (Mk318) - 5.56mm 30Rnd Zásobník (Mk318) - Carregador 5.56mm com 30 cartuchos (Mk318) - 5,56mm 30-lövedékes tár (Mk318) - 5.56mm 30発入り 弾倉 (Mk318) - 30발들이 5.56mm 탄창 (Mk318) + 5,56 mm 30-Patronen-Magazin (Mk318) + 5.56 mm 30Rnd Mag (Mk318) + 5.56 mm 30Rnd Zásobník (Mk318) + Carregador 5.56 mm com 30 cartuchos (Mk318) + 5,56 mm 30-lövedékes tár (Mk318) + 5.56 mm 30発入り 弾倉 (Mk318) + 30발들이 5.56 mm 탄창 (Mk318) 5.56毫米 30發 彈匣 (Mk318 特戰專用彈) - 5.56mm 30发 弹匣 (Mk318 特战专用弹) - 5.56mm 30Rnd Mag (Mk318) + 5.56 mm 30发 弹匣 (Mk318 特战专用弹) + 5.56 mm 30Rnd Mag (Mk318) - 5.56mm Mk318 - 5,56mm Mk318 - 5,56mm Mk318 - 5.56mm Mk318 + 5.56 mm Mk318 + 5,56 mm Mk318 + 5,56 mm Mk318 + 5.56 mm Mk318 5.56 мм Mk318 - 5,56mm Mk318 - 5.56mm Mk318 - 5.56mm Mk318 - 5.56mm Mk318 - 5,56mm Mk318 - 5.56mm Mk318 - 5.56mm Mk318 + 5,56 mm Mk318 + 5.56 mm Mk318 + 5.56 mm Mk318 + 5.56 mm Mk318 + 5,56 mm Mk318 + 5.56 mm Mk318 + 5.56 mm Mk318 5.56毫米 Mk318 特戰專用彈 - 5.56mm Mk318 特战专用弹 - 5.56mm Mk318 + 5.56 mm Mk318 特战专用弹 + 5.56 mm Mk318 - Caliber: 5.56x45mm NATO (Mk318)<br />Rounds: 30 - Kaliber: 5,56x45mm NATO (Mk318)<br />Pociski: 30 - Calibre: 5,56x45mm NATO (Mk318)<br />Cartouches: 30 - Calibre: 5.56x45mm NATO (Mk318)<br />Balas: 30 + Caliber: 5.56x45 mm NATO (Mk318)<br />Rounds: 30 + Kaliber: 5,56x45 mm NATO (Mk318)<br />Pociski: 30 + Calibre: 5,56x45 mm NATO (Mk318)<br />Cartouches: 30 + Calibre: 5.56x45 mm NATO (Mk318)<br />Balas: 30 Калибр: 5,56x45 мм NATO (Mk318)<br />Патронов: 30 - Kaliber: 5,56x45mm NATO (Mk318)<br />Patronen: 30 + Kaliber: 5,56x45 mm NATO (Mk318)<br />Patronen: 30 Calibro: 5.56x45 mm NATO (Mk318)<br />Munizioni: 30 - Ráže: 5.56x45mm NATO (Mk318)<br />Nábojů: 30 - Calibre: 5.56x45mm NATO (Mk318)<br/>Cartuchos: 30 - Kaliber: 5,56x45mm NATO (Mk318)<br />Lövedékek: 30 - 口径: 5.56x45mm NATO (Mk318)<br />装填数: 30 - 구경: 5.56x45mm NATO (Mk318)<br />장탄수: 30 + Ráže: 5.56x45 mm NATO (Mk318)<br />Nábojů: 30 + Calibre: 5.56x45 mm NATO (Mk318)<br/>Cartuchos: 30 + Kaliber: 5,56x45 mm NATO (Mk318)<br />Lövedékek: 30 + 口径: 5.56x45 mm NATO (Mk318)<br />装填数: 30 + 구경: 5.56x45 mm NATO (Mk318)<br />장탄수: 30 口徑: 5.56x45毫米 NATO標準 (Mk318 特戰專用彈)<br />發數: 30 - 口径: 5.56x45mm NATO标准 (Mk318 特战专用弹)<br />发数: 30 - Kalibre: 5.56x45mm NATO (Mk318)<br />Mermi: 30 + 口径: 5.56x45 mm NATO标准 (Mk318 特战专用弹)<br />发数: 30 + Kalibre: 5.56x45 mm NATO (Mk318)<br />Mermi: 30 - 5.56mm 30Rnd Mag (M995 AP) - Magazynek 5,56mm 30rd (M995 AP) - Ch. 5,56mm 30Cps (M995 AP) - Cargador de 30 balas de 5.56mm (M995 AP) + 5.56 mm 30Rnd Mag (M995 AP) + Magazynek 5,56 mm 30rd (M995 AP) + Ch. 5,56 mm 30Cps (M995 AP) + Cargador de 30 balas de 5.56 mm (M995 AP) Магазин из 30-ти 5.56 мм (M995 бронебойные) - 5,56mm 30-Patronen-Magazin (M995AP) - 5.56mm 30Rnd Mag (M995 AP) - 5.56mm 30náb. Zásobník (M995 AP) - Carregador 5.56mm com 30 cartuchos (M995 AP) - 5,56mm 30-lövedékes tár (M995 páncéltörő) - 5.56mm 30発入り 弾倉 (M995 徹甲弾) - 30발들이 5.56mm 탄창 (Mk995 철갑탄) + 5,56 mm 30-Patronen-Magazin (M995AP) + 5.56 mm 30Rnd Mag (M995 AP) + 5.56 mm 30náb. Zásobník (M995 AP) + Carregador 5.56 mm com 30 cartuchos (M995 AP) + 5,56 mm 30-lövedékes tár (M995 páncéltörő) + 5.56 mm 30発入り 弾倉 (M995 徹甲弾) + 30발들이 5.56 mm 탄창 (Mk995 철갑탄) 5.56毫米 30發 彈匣 (M995 穿甲彈) - 5.56mm 30发 弹匣 (M995 穿甲弹) - 5.56mm 30Rnd Mag (M995 AP) + 5.56 mm 30发 弹匣 (M995 穿甲弹) + 5.56 mm 30Rnd Mag (M995 AP) - 5.56mm AP - 5,56mm AP - 5,56mm AP - 5.56mm AP + 5.56 mm AP + 5,56 mm AP + 5,56 mm AP + 5.56 mm AP 5.56 мм бронебойные - 5,56mm AP - 5.56mm AP - 5.56mm AP - 5.56mm M995 AP - 5,56mm páncéltörő - 5.56mm 徹甲弾 - 5.56mm 철갑탄 + 5,56 mm AP + 5.56 mm AP + 5.56 mm AP + 5.56 mm M995 AP + 5,56 mm páncéltörő + 5.56 mm 徹甲弾 + 5.56 mm 철갑탄 5.56毫米 M995 穿甲彈 - 5.56mm M995 穿甲弹 - 5.56mm AP + 5.56 mm M995 穿甲弹 + 5.56 mm AP - Caliber: 5.56x45mm NATO (M995 AP)<br />Rounds: 30 - Kaliber: 5,56x45mm NATO (M995 AP)<br />Pociski: 30 - Calibre: 5,56x45mm NATO (M995 AP)<br />Cartouches: 30 - Calibre: 5.56x45mm NATO (M995 AP)<br />Balas: 30 + Caliber: 5.56x45 mm NATO (M995 AP)<br />Rounds: 30 + Kaliber: 5,56x45 mm NATO (M995 AP)<br />Pociski: 30 + Calibre: 5,56x45 mm NATO (M995 AP)<br />Cartouches: 30 + Calibre: 5.56x45 mm NATO (M995 AP)<br />Balas: 30 Калибр: 5,56x45 мм NATO (M995 бронебойные)<br />Патронов: 30 - Kaliber: 5,56x45mm NATO (M995 AP)<br />Patronen: 30 + Kaliber: 5,56x45 mm NATO (M995 AP)<br />Patronen: 30 Calibro: 5.56x45 mm NATO (M995 AP)<br />Munizioni: 30 - Ráže: 5.56x45mm NATO (M995 AP)<br />Nábojů: 30 - Calibre: 5.56x45mm NATO (M995 AP)<br/>Cartuchos: 30 - Kaliber: 5,56x45mm NATO (M995 páncéltörő)<br />Lövedékek: 30 - 口径: 5.56x45mm NATO (M995 徹甲弾)<br />装填数: 30 - 구경: 5.56x45mm NATO (Mk995 철갑탄)<br />장탄수: 30 + Ráže: 5.56x45 mm NATO (M995 AP)<br />Nábojů: 30 + Calibre: 5.56x45 mm NATO (M995 AP)<br/>Cartuchos: 30 + Kaliber: 5,56x45 mm NATO (M995 páncéltörő)<br />Lövedékek: 30 + 口径: 5.56x45 mm NATO (M995 徹甲弾)<br />装填数: 30 + 구경: 5.56x45 mm NATO (Mk995 철갑탄)<br />장탄수: 30 口徑: 5.56x45毫米 NATO標準 (M995 穿甲彈)<br />發數: 30 - 口径: 5.56x45mm NATO标准 (M995 穿甲弹)<br />发数: 30 - Kalibre: 5.56x45mm NATO (M995 AP)<br />Mermi: 30 + 口径: 5.56x45 mm NATO标准 (M995 穿甲弹)<br />发数: 30 + Kalibre: 5.56x45 mm NATO (M995 AP)<br />Mermi: 30 - 7.62mm 10Rnd Mag (M118LR) - Magazynek 7,62mm 10rd (M118LR) - Ch. 7,62mm 10Cps (M118LR) - Cargador de 10 balas de 7.62mm (M118LR) + 7.62 mm 10Rnd Mag (M118LR) + Magazynek 7,62 mm 10rd (M118LR) + Ch. 7,62 mm 10Cps (M118LR) + Cargador de 10 balas de 7.62 mm (M118LR) Магазин из 10-ти 7,62 мм (M118LR) - 7,62mm 10-Patronen-Magazin (M118LR) - 7.62mm 10Rnd Mag (M118LR) - 7.62mm 10náb. Zásobník (M118LR) - Carregador 7.62mm com 10 cartuchos (M118LR) - 7,62mm 10-lövedékes tár (M118LR) - 7.62mm 10発入り 弾倉 (M118LR) - 10발들이 7.62mm 탄창 (M118LR) + 7,62 mm 10-Patronen-Magazin (M118LR) + 7.62 mm 10Rnd Mag (M118LR) + 7.62 mm 10náb. Zásobník (M118LR) + Carregador 7.62 mm com 10 cartuchos (M118LR) + 7,62 mm 10-lövedékes tár (M118LR) + 7.62 mm 10発入り 弾倉 (M118LR) + 10발들이 7.62 mm 탄창 (M118LR) 7.62毫米 10發 彈匣 (M118LR 狙擊專用彈) - 7.62mm 10发 弹匣 (M118LR 狙击专用弹) - 7.62mm 10Rnd Mag (M118LR) + 7.62 mm 10发 弹匣 (M118LR 狙击专用弹) + 7.62 mm 10Rnd Mag (M118LR) - 7.62mm M118LR - 7,62mm M118LR - 7,62mm M118LR - 7.62mm M118LR + 7.62 mm M118LR + 7,62 mm M118LR + 7,62 mm M118LR + 7.62 mm M118LR 7,62 мм M118LR - 7,62mm M118LR - 7.62mm M118LR - 7.62mm M118LR - 7.62mm M118LR - 7,62mm M118LR - 7.62mm M118LR - 7.62mm M118LR + 7,62 mm M118LR + 7.62 mm M118LR + 7.62 mm M118LR + 7.62 mm M118LR + 7,62 mm M118LR + 7.62 mm M118LR + 7.62 mm M118LR 7.62m毫米 M118LR 狙擊專用彈 - 7.62mm M118LR 狙击专用弹 - 7.62mm M118LR + 7.62 mm M118LR 狙击专用弹 + 7.62 mm M118LR - Caliber: 7.62x51mm NATO (M118LR)<br />Rounds: 10 - Kaliber: 7,62x51mm NATO (M118LR)<br />Pociski: 10 - Calibre: 7,62x51mm NATO (M118LR)<br />Cartouches: 10 - Calibre: 7.62x51mm NATO (M118LR)<br />Balas: 10 + Caliber: 7.62x51 mm NATO (M118LR)<br />Rounds: 10 + Kaliber: 7,62x51 mm NATO (M118LR)<br />Pociski: 10 + Calibre: 7,62x51 mm NATO (M118LR)<br />Cartouches: 10 + Calibre: 7.62x51 mm NATO (M118LR)<br />Balas: 10 Калибр: 7,62x51 мм NATO (M118LR)<br />Патронов: 10 - Kaliber: 7,62x51mm NATO (M118LR)<br />Patronen: 10 + Kaliber: 7,62x51 mm NATO (M118LR)<br />Patronen: 10 Calibro: 7.62x51 mm NATO (M118LR)<br />Munizioni: 10 - Ráže: 7.62x51mm NATO (M118LR)<br />Nábojů: 10 - Calibre: 7.26x51mm NATO (M118LR)<br/>Cartuchos: 10 - Kaliber: 7,62x51mm NATO (M118LR)<br />Lövedékek: 10 - 口径: 7.62x51mm NATO (M118LR)<br />装填数: 10 - 구경: 7.62x51mm NATO (M118LR)<br />장탄수: 10 + Ráže: 7.62x51 mm NATO (M118LR)<br />Nábojů: 10 + Calibre: 7.26x51 mm NATO (M118LR)<br/>Cartuchos: 10 + Kaliber: 7,62x51 mm NATO (M118LR)<br />Lövedékek: 10 + 口径: 7.62x51 mm NATO (M118LR)<br />装填数: 10 + 구경: 7.62x51 mm NATO (M118LR)<br />장탄수: 10 口徑: 7.62x51毫米 NATO標準 (M118LR 狙擊專用彈)<br />發數: 10 - 口径: 7.62x51mm NATO标准 (M118LR 狙击专用弹)<br />发数: 10 - Kalibre: 7.62x51mm NATO (M118LR)<br />Mermi: 10 + 口径: 7.62x51 mm NATO标准 (M118LR 狙击专用弹)<br />发数: 10 + Kalibre: 7.62x51 mm NATO (M118LR)<br />Mermi: 10 - 7.62mm 20Rnd Mag (M118LR) - Magazynek 7,62mm 20rd (M118LR) - Ch. 7,62mm 20Cps (M118LR) - Cargador de 20 balas de 7.62mm (M118LR) + 7.62 mm 20Rnd Mag (M118LR) + Magazynek 7,62 mm 20rd (M118LR) + Ch. 7,62 mm 20Cps (M118LR) + Cargador de 20 balas de 7.62 mm (M118LR) Магазин из 20-ти 7,62 мм (M118LR) - 7,62mm 20-Patronen-Magazin (M118LR) - 7.62mm 20Rnd Mag (M118LR) - 7.62mm 20náb. Zásobník (M118LR) - Carregador 7.62mm com 20 cartuchos (M118LR) - 7,62mm 20-lövedékes tár (M118LR) - 7.62mm 20発入り 弾倉 (M118LR) - 20발들이 7.62mm 탄창 (M118LR) + 7,62 mm 20-Patronen-Magazin (M118LR) + 7.62 mm 20Rnd Mag (M118LR) + 7.62 mm 20náb. Zásobník (M118LR) + Carregador 7.62 mm com 20 cartuchos (M118LR) + 7,62 mm 20-lövedékes tár (M118LR) + 7.62 mm 20発入り 弾倉 (M118LR) + 20발들이 7.62 mm 탄창 (M118LR) 7.62毫米 20發 彈匣 (M118LR 狙擊專用彈) - 7.62mm 20发 弹匣 (M118LR 狙击专用弹) - 7.62mm 20Rnd Mag (M118LR) + 7.62 mm 20发 弹匣 (M118LR 狙击专用弹) + 7.62 mm 20Rnd Mag (M118LR) - 7.62mm M118LR - 7,62mm M118LR - 7,62mm M118LR - 7.62mm M118LR + 7.62 mm M118LR + 7,62 mm M118LR + 7,62 mm M118LR + 7.62 mm M118LR 7,62 мм M118LR - 7,62mm M118LR - 7.62mm M118LR - 7.62mm M118LR - 7.62mm M118LR - 7,62mm M118LR - 7.62mm M118LR - 7.62mm M118LR + 7,62 mm M118LR + 7.62 mm M118LR + 7.62 mm M118LR + 7.62 mm M118LR + 7,62 mm M118LR + 7.62 mm M118LR + 7.62 mm M118LR 7.62毫米 M118LR 狙擊專用彈 - 7.62mm M118LR 狙击专用弹 - 7.62mm M118LR + 7.62 mm M118LR 狙击专用弹 + 7.62 mm M118LR - Caliber: 7.62x51mm NATO (M118LR)<br />Rounds: 20 - Kaliber: 7,62x51mm NATO (M118LR)<br />Pociski: 20 - Calibre: 7,62x51mm NATO (M118LR)<br />Cartouches: 20 - Calibre: 7.62x51mm NATO (M118LR)<br />Balas: 20 + Caliber: 7.62x51 mm NATO (M118LR)<br />Rounds: 20 + Kaliber: 7,62x51 mm NATO (M118LR)<br />Pociski: 20 + Calibre: 7,62x51 mm NATO (M118LR)<br />Cartouches: 20 + Calibre: 7.62x51 mm NATO (M118LR)<br />Balas: 20 Калибр: 7,62x51 мм NATO (M118LR)<br />Патронов: 20 - Kaliber: 7,62x51mm NATO (M118LR)<br />Patronen: 20 + Kaliber: 7,62x51 mm NATO (M118LR)<br />Patronen: 20 Calibro: 7.62x51 mm NATO (M118LR)<br />Munizioni: 20 - Ráže: 7.62x51mm NATO (M118LR)<br />Nábojů: 20 - Calibre: 7.26x51mm NATO (M118LR)<br/>Cartuchos: 20 - Kaliber: 7,62x51mm NATO (M118LR)<br />Lövedékek: 20 - 口径: 7.62x51mm NATO (M118LR)<br />装填数: 20 - 구경: 7.62x51mm NATO (M118LR)<br />장탄수: 20 + Ráže: 7.62x51 mm NATO (M118LR)<br />Nábojů: 20 + Calibre: 7.26x51 mm NATO (M118LR)<br/>Cartuchos: 20 + Kaliber: 7,62x51 mm NATO (M118LR)<br />Lövedékek: 20 + 口径: 7.62x51 mm NATO (M118LR)<br />装填数: 20 + 구경: 7.62x51 mm NATO (M118LR)<br />장탄수: 20 口徑: 7.62x51毫米 NATO標準 (M118LR 狙擊專用彈)<br />發數: 20 - 口径: 7.62x51mm NATO标准 (M118LR 狙击专用弹)<br />发数: 20 - Kalibre: 7.62x51mm NATO (M118LR)<br />Mermi: 20 + 口径: 7.62x51 mm NATO标准 (M118LR 狙击专用弹)<br />发数: 20 + Kalibre: 7.62x51 mm NATO (M118LR)<br />Mermi: 20 - 7.62mm 10Rnd Mag (Mk316 Mod 0) - Magazynek 7,62mm 10rd (Mk316 Mod 0) - Ch. 7,62mm 10Cps (Mk316 Mod 0) - Cargador de 10 balas de 7.62mm (Mk316 Mod 0) + 7.62 mm 10Rnd Mag (Mk316 Mod 0) + Magazynek 7,62 mm 10rd (Mk316 Mod 0) + Ch. 7,62 mm 10Cps (Mk316 Mod 0) + Cargador de 10 balas de 7.62 mm (Mk316 Mod 0) Магазин из 10-ти 7,62 мм (Mk316 Mod 0) - 7,62mm 10-Patronen-Magazin (Mk316 Mod 0) - 7.62mm 10Rnd Mag (Mk316 Mod 0) - 7.62mm 10náb. Zásobník (Mk316 Mod 0) - Carregador 7.62mm com 10 cartuchos (Mk316 Mod 0) - 7,62mm 10-lövedékes tár (Mk316 Mod 0) - 7.62mm 10発入り 弾倉 (Mk316 Mod 0) - 10발들이 7.62mm 탄창 (Mk316 Mod 0) + 7,62 mm 10-Patronen-Magazin (Mk316 Mod 0) + 7.62 mm 10Rnd Mag (Mk316 Mod 0) + 7.62 mm 10náb. Zásobník (Mk316 Mod 0) + Carregador 7.62 mm com 10 cartuchos (Mk316 Mod 0) + 7,62 mm 10-lövedékes tár (Mk316 Mod 0) + 7.62 mm 10発入り 弾倉 (Mk316 Mod 0) + 10발들이 7.62 mm 탄창 (Mk316 Mod 0) 7.62毫米 10發 彈匣 (Mk316 Mod 0 狙擊專用彈) - 7.62mm 10发 弹匣 (Mk316 Mod 0 狙击专用弹) - 7.62mm 10Rnd Mag (Mk316 Mod 0) + 7.62 mm 10发 弹匣 (Mk316 Mod 0 狙击专用弹) + 7.62 mm 10Rnd Mag (Mk316 Mod 0) - 7.62mm Mk316 - 7,62mm Mk316 - 7,62mm Mk316 - 7.62mm Mk316 + 7.62 mm Mk316 + 7,62 mm Mk316 + 7,62 mm Mk316 + 7.62 mm Mk316 7,62 мм Mk316 - 7,62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 - 7,62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 + 7,62 mm Mk316 + 7.62 mm Mk316 + 7.62 mm Mk316 + 7.62 mm Mk316 + 7,62 mm Mk316 + 7.62 mm Mk316 + 7.62 mm Mk316 7.62毫米 Mk316 狙擊專用彈 - 7.62mm Mk316 狙击专用弹 - 7.62mm Mk316 + 7.62 mm Mk316 狙击专用弹 + 7.62 mm Mk316 - Caliber: 7.62x51mm NATO (Mk316 Mod 0)<br />Rounds: 10 - Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Pociski: 10 - Calibre: 7,62x51mm NATO (Mk316 Mod 0)<br />Cartouches: 10 - Calibre: 7.62x51mm NATO (Mk316 Mod 0)<br />Balas: 10 + Caliber: 7.62x51 mm NATO (Mk316 Mod 0)<br />Rounds: 10 + Kaliber: 7,62x51 mm NATO (Mk316 Mod 0)<br />Pociski: 10 + Calibre: 7,62x51 mm NATO (Mk316 Mod 0)<br />Cartouches: 10 + Calibre: 7.62x51 mm NATO (Mk316 Mod 0)<br />Balas: 10 Калибр: 7,62x51 мм NATO (Mk316 Mod 0)<br />Патронов: 10 - Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Patronen: 10 + Kaliber: 7,62x51 mm NATO (Mk316 Mod 0)<br />Patronen: 10 Calibro: 7.62x51 mm NATO (Mk316 Mod 0)<br />Munizioni: 10 - Ráže: 7.62x51mm NATO (Mk316 Mod 0)<br />Nábojů: 10 - Calibre: 7.26x51mm NATO (Mk316 Mod 0)<br/>Cartuchos: 10 - Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Lövedékek: 10 - 口径: 7.62x51mm NATO (Mk316 Mod 0)<br />装填数: 10 - 구경: 7.62x51mm NATO (Mk316 Mod 0)<br />장탄수: 10 + Ráže: 7.62x51 mm NATO (Mk316 Mod 0)<br />Nábojů: 10 + Calibre: 7.26x51 mm NATO (Mk316 Mod 0)<br/>Cartuchos: 10 + Kaliber: 7,62x51 mm NATO (Mk316 Mod 0)<br />Lövedékek: 10 + 口径: 7.62x51 mm NATO (Mk316 Mod 0)<br />装填数: 10 + 구경: 7.62x51 mm NATO (Mk316 Mod 0)<br />장탄수: 10 口徑: 7.62x51毫米 NATO標準 (Mk316 Mod 0 狙擊專用彈)<br />發數: 10 - 口径: 7.62x51mm NATO标准 (Mk316 Mod 0 狙击专用弹)<br />发数: 10 - Kalibre: 7.62x51mm NATO (Mk316 Mod 0)<br />Mermi: 10 + 口径: 7.62x51 mm NATO标准 (Mk316 Mod 0 狙击专用弹)<br />发数: 10 + Kalibre: 7.62x51 mm NATO (Mk316 Mod 0)<br />Mermi: 10 - 7.62mm 20Rnd Mag (Mk316 Mod 0) - Magazynek 7,62mm 20rd (Mk316 Mod 0) - Ch. 7,62mm 20Cps (Mk316 Mod 0) - Cargador de 20 balas de 7.62mm (Mk316 Mod 0) + 7.62 mm 20Rnd Mag (Mk316 Mod 0) + Magazynek 7,62 mm 20rd (Mk316 Mod 0) + Ch. 7,62 mm 20Cps (Mk316 Mod 0) + Cargador de 20 balas de 7.62 mm (Mk316 Mod 0) Магазин из 20-ти 7,62 мм (Mk316 Mod 0) - 7,62mm 20-Patronen-Magazin (Mk316 Mod 0) - 7.62mm 20Rnd Mag (Mk316 Mod 0) - 7.62mm 20náb. Zásobník (Mk316 Mod 0) - Carregador 7.62mm com 20 cartuchos (Mk316 Mod 0) - 7,62mm 20-lövedékes tár (Mk316 Mod 0) - 7.62mm 20発入り 弾倉 (Mk316 Mod 0) - 20발들이 7.62mm 탄창 (Mk316 Mod 0) + 7,62 mm 20-Patronen-Magazin (Mk316 Mod 0) + 7.62 mm 20Rnd Mag (Mk316 Mod 0) + 7.62 mm 20náb. Zásobník (Mk316 Mod 0) + Carregador 7.62 mm com 20 cartuchos (Mk316 Mod 0) + 7,62 mm 20-lövedékes tár (Mk316 Mod 0) + 7.62 mm 20発入り 弾倉 (Mk316 Mod 0) + 20발들이 7.62 mm 탄창 (Mk316 Mod 0) 7.62毫米 20發 彈匣 (Mk316 Mod 0 狙擊專用彈) - 7.62mm 20发 弹匣 (Mk316 Mod 0 狙击专用弹) - 7.62mm 20Rnd Mag (Mk316 Mod 0) + 7.62 mm 20发 弹匣 (Mk316 Mod 0 狙击专用弹) + 7.62 mm 20Rnd Mag (Mk316 Mod 0) - 7.62mm Mk316 - 7,62mm Mk316 - 7,62mm Mk316 - 7.62mm Mk316 + 7.62 mm Mk316 + 7,62 mm Mk316 + 7,62 mm Mk316 + 7.62 mm Mk316 7,62 мм Mk316 - 7,62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 - 7,62mm Mk316 - 7.62mm Mk316 - 7.62mm Mk316 + 7,62 mm Mk316 + 7.62 mm Mk316 + 7.62 mm Mk316 + 7.62 mm Mk316 + 7,62 mm Mk316 + 7.62 mm Mk316 + 7.62 mm Mk316 7.62毫米 Mk316 狙擊專用彈 - 7.62mm Mk316 狙击专用弹 - 7.62mm Mk316 + 7.62 mm Mk316 狙击专用弹 + 7.62 mm Mk316 - Caliber: 7.62x51mm NATO (Mk316 Mod 0)<br />Rounds: 20 - Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Pociski: 20 - Calibre: 7,62x51mm NATO (Mk316 Mod 0)<br />Cartouches: 20 - Calibre: 7.62x51mm NATO (Mk316 Mod 0)<br />Balas: 20 + Caliber: 7.62x51 mm NATO (Mk316 Mod 0)<br />Rounds: 20 + Kaliber: 7,62x51 mm NATO (Mk316 Mod 0)<br />Pociski: 20 + Calibre: 7,62x51 mm NATO (Mk316 Mod 0)<br />Cartouches: 20 + Calibre: 7.62x51 mm NATO (Mk316 Mod 0)<br />Balas: 20 Калибр: 7,62x51 мм NATO (Mk316 Mod 0)<br />Патронов: 20 - Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Patronen: 20 + Kaliber: 7,62x51 mm NATO (Mk316 Mod 0)<br />Patronen: 20 Calibro: 7.62x51 mm NATO (Mk316 Mod 0)<br />Munizioni: 20 - Ráže: 7.62x51mm NATO (Mk316 Mod 0)<br />Nábojů: 20 - Calibre: 7.26x51mm NATO (Mk316 Mod 0)<br/>Cartuchos: 20 - Kaliber: 7,62x51mm NATO (Mk316 Mod 0)<br />Lövedékek: 20 - 口径: 7.62x51mm NATO (Mk316 Mod 0)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk316 Mod 0)<br />장탄수: 20 + Ráže: 7.62x51 mm NATO (Mk316 Mod 0)<br />Nábojů: 20 + Calibre: 7.26x51 mm NATO (Mk316 Mod 0)<br/>Cartuchos: 20 + Kaliber: 7,62x51 mm NATO (Mk316 Mod 0)<br />Lövedékek: 20 + 口径: 7.62x51 mm NATO (Mk316 Mod 0)<br />装填数: 20 + 구경: 7.62x51 mm NATO (Mk316 Mod 0)<br />장탄수: 20 口徑: 7.62x51毫米 NATO標準 (Mk316 Mod 0 狙擊專用彈)<br />發數: 20 - 口径: 7.62x51mm NATO标准 (Mk316 Mod 0 狙击专用弹)<br />发数: 20 - Kalibre: 7.62x51mm NATO (Mk316 Mod 0)<br />Mermi: 20 + 口径: 7.62x51 mm NATO标准 (Mk316 Mod 0 狙击专用弹)<br />发数: 20 + Kalibre: 7.62x51 mm NATO (Mk316 Mod 0)<br />Mermi: 20 - 7.62mm 10Rnd Mag (Mk319 Mod 0) - Magazynek 7,62mm 10rd (Mk319 Mod 0) - Ch. 7,62mm 10Cps (Mk319 Mod 0) - Cargador de 10 balas de 7.62mm (Mk319 Mod 0) + 7.62 mm 10Rnd Mag (Mk319 Mod 0) + Magazynek 7,62 mm 10rd (Mk319 Mod 0) + Ch. 7,62 mm 10Cps (Mk319 Mod 0) + Cargador de 10 balas de 7.62 mm (Mk319 Mod 0) Магазин из 10-ти 7,62 мм (Mk319 Mod 0) - 7,62mm 10-Patronen-Magazin (Mk319 Mod 0) - 7.62mm 10Rnd Mag (Mk319 Mod 0) - 7.62mm 10náb. Zásobník (Mk319 Mod 0) - Carregador 7.62mm com 10 cartuchos (Mk319 Mod 0) - 7,62mm 10-lövedékes tár (Mk319 Mod 0) - 7.62mm 10発入り 弾倉 (Mk319 Mod 0) - 10발들이 7.62mm 탄창 (Mk319 Mod 0) + 7,62 mm 10-Patronen-Magazin (Mk319 Mod 0) + 7.62 mm 10Rnd Mag (Mk319 Mod 0) + 7.62 mm 10náb. Zásobník (Mk319 Mod 0) + Carregador 7.62 mm com 10 cartuchos (Mk319 Mod 0) + 7,62 mm 10-lövedékes tár (Mk319 Mod 0) + 7.62 mm 10発入り 弾倉 (Mk319 Mod 0) + 10발들이 7.62 mm 탄창 (Mk319 Mod 0) 7.62毫米 10發 彈匣 (Mk319 Mod 0 特戰專用彈) - 7.62mm 10发 弹匣 (Mk319 Mod 0 特战专用弹) - 7.62mm 10Rnd Mag (Mk319 Mod 0) + 7.62 mm 10发 弹匣 (Mk319 Mod 0 特战专用弹) + 7.62 mm 10Rnd Mag (Mk319 Mod 0) - 7.62mm Mk319 - 7,62mm Mk319 - 7,62mm Mk319 - 7.62mm Mk319 + 7.62 mm Mk319 + 7,62 mm Mk319 + 7,62 mm Mk319 + 7.62 mm Mk319 7,62 мм Mk319 - 7,62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 - 7,62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 + 7,62 mm Mk319 + 7.62 mm Mk319 + 7.62 mm Mk319 + 7.62 mm Mk319 + 7,62 mm Mk319 + 7.62 mm Mk319 + 7.62 mm Mk319 7.62毫米 Mk319 特戰專用彈 - 7.62mm Mk319 特战专用弹 - 7.62mm Mk319 + 7.62 mm Mk319 特战专用弹 + 7.62 mm Mk319 - Caliber: 7.62x51mm NATO (Mk319 Mod 0)<br />Rounds: 10 - Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Pociski: 10 - Calibre: 7,62x51mm NATO (Mk319 Mod 0)<br />Cartouches: 10 - Calibre: 7.62x51mm NATO (Mk319 Mod 0)<br />Balas: 10 + Caliber: 7.62x51 mm NATO (Mk319 Mod 0)<br />Rounds: 10 + Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)<br />Pociski: 10 + Calibre: 7,62x51 mm NATO (Mk319 Mod 0)<br />Cartouches: 10 + Calibre: 7.62x51 mm NATO (Mk319 Mod 0)<br />Balas: 10 Калибр: 7,62x51 мм NATO (Mk319 Mod 0)<br />Патронов: 10 - Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Patronen: 10 + Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)<br />Patronen: 10 Calibro: 7.62x51 mm NATO (Mk319 Mod 0)<br />Munizioni: 10 - Ráže: 7.62x51mm NATO (Mk319 Mod 0)<br />Nábojů: 10 - Calibre: 7.26x51mm NATO (Mk319 Mod 0)<br/>Cartuchos: 10 - Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Lövedékek: 10 - 口径: 7.62x51mm NATO (Mk319 Mod 0)<br />装填数: 10 - 구경: 7.62x51mm NATO (Mk319 Mod 0)<br />장탄수: 10 + Ráže: 7.62x51 mm NATO (Mk319 Mod 0)<br />Nábojů: 10 + Calibre: 7.26x51 mm NATO (Mk319 Mod 0)<br/>Cartuchos: 10 + Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)<br />Lövedékek: 10 + 口径: 7.62x51 mm NATO (Mk319 Mod 0)<br />装填数: 10 + 구경: 7.62x51 mm NATO (Mk319 Mod 0)<br />장탄수: 10 口徑: 7.62x51毫米 NATO標準 (Mk319 Mod 0 特戰專用彈)<br />發數: 10 - 口径: 7.62x51mm NATO标准 (Mk319 Mod 0 特战专用弹)<br />发数: 10 - Kalibre: 7.62x51mm NATO (Mk319 Mod 0)<br />Mermi: 20 + 口径: 7.62x51 mm NATO标准 (Mk319 Mod 0 特战专用弹)<br />发数: 10 + Kalibre: 7.62x51 mm NATO (Mk319 Mod 0)<br />Mermi: 20 - 7.62mm 20Rnd Mag (Mk319 Mod 0) - Magazynek 7,62mm 20rd (Mk319 Mod 0) - Ch. 7,62mm 20Cps (Mk319 Mod 0) - Cargador de 20 balas de 7.62mm (Mk319 Mod 0) + 7.62 mm 20Rnd Mag (Mk319 Mod 0) + Magazynek 7,62 mm 20rd (Mk319 Mod 0) + Ch. 7,62 mm 20Cps (Mk319 Mod 0) + Cargador de 20 balas de 7.62 mm (Mk319 Mod 0) Магазин из 20-ти 7,62 мм (Mk319 Mod 0) - 7,62mm 20-Patronen-Magazin (Mk319 Mod 0) - 7.62mm 20Rnd Mag (Mk319 Mod 0) - 7.62mm 20náb. Zásobník (Mk319 Mod 0) - Carregador 7.62mm com 20 cartuchos (Mk319 Mod 0) - 7,62mm 20-lövedékes tár (Mk319 Mod 0) - 7.62mm 20発入り 弾倉 (Mk319 Mod 0) - 20발들이 7.62mm 탄창 (Mk319 Mod 0) + 7,62 mm 20-Patronen-Magazin (Mk319 Mod 0) + 7.62 mm 20Rnd Mag (Mk319 Mod 0) + 7.62 mm 20náb. Zásobník (Mk319 Mod 0) + Carregador 7.62 mm com 20 cartuchos (Mk319 Mod 0) + 7,62 mm 20-lövedékes tár (Mk319 Mod 0) + 7.62 mm 20発入り 弾倉 (Mk319 Mod 0) + 20발들이 7.62 mm 탄창 (Mk319 Mod 0) 7.62毫米 20發 彈匣 (Mk319 Mod 0 特戰專用彈) - 7.62mm 20发 弹匣 (Mk319 Mod 0 特战专用弹) - 7.62mm 20Rnd Mag (Mk319 Mod 0) + 7.62 mm 20发 弹匣 (Mk319 Mod 0 特战专用弹) + 7.62 mm 20Rnd Mag (Mk319 Mod 0) - 7.62mm Mk319 - 7,62mm Mk319 - 7,62mm Mk319 - 7.62mm Mk319 + 7.62 mm Mk319 + 7,62 mm Mk319 + 7,62 mm Mk319 + 7.62 mm Mk319 7,62 мм Mk319 - 7,62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 - 7,62mm Mk319 - 7.62mm Mk319 - 7.62mm Mk319 + 7,62 mm Mk319 + 7.62 mm Mk319 + 7.62 mm Mk319 + 7.62 mm Mk319 + 7,62 mm Mk319 + 7.62 mm Mk319 + 7.62 mm Mk319 7.62毫米 Mk319 特戰專用彈 - 7.62mm Mk319 特战专用弹 - 7.62mm Mk319 + 7.62 mm Mk319 特战专用弹 + 7.62 mm Mk319 - Caliber: 7.62x51mm NATO (Mk319 Mod 0)<br />Rounds: 20 - Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Pociski: 20 - Calibre: 7,62x51mm NATO (Mk319 Mod 0)<br />Cartouches: 20 - Calibre: 7.62x51mm NATO (Mk319 Mod 0)<br />Balas: 20 + Caliber: 7.62x51 mm NATO (Mk319 Mod 0)<br />Rounds: 20 + Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)<br />Pociski: 20 + Calibre: 7,62x51 mm NATO (Mk319 Mod 0)<br />Cartouches: 20 + Calibre: 7.62x51 mm NATO (Mk319 Mod 0)<br />Balas: 20 Калибр: 7,62x51 мм NATO (Mk319 Mod 0)<br />Патронов: 20 - Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Patronen: 20 + Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)<br />Patronen: 20 Calibro: 7.62x51 mm NATO (Mk319 Mod 0)<br />Munizioni: 20 - Ráže: 7.62x51mm NATO (Mk319 Mod 0)<br />Nábojů: 20 - Calibre: 7.26x51mm NATO (Mk319 Mod 0)<br/>Cartuchos: 20 - Kaliber: 7,62x51mm NATO (Mk319 Mod 0)<br />Lövedékek: 20 - 口径: 7.62x51mm NATO (Mk319 Mod 0)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk319 Mod 0)<br />장탄수: 20 + Ráže: 7.62x51 mm NATO (Mk319 Mod 0)<br />Nábojů: 20 + Calibre: 7.26x51 mm NATO (Mk319 Mod 0)<br/>Cartuchos: 20 + Kaliber: 7,62x51 mm NATO (Mk319 Mod 0)<br />Lövedékek: 20 + 口径: 7.62x51 mm NATO (Mk319 Mod 0)<br />装填数: 20 + 구경: 7.62x51 mm NATO (Mk319 Mod 0)<br />장탄수: 20 口徑: 7.62x51毫米 NATO標準 (Mk319 Mod 0 特戰專用彈)<br />發數: 20 - 口径: 7.62x51mm NATO标准 (Mk319 Mod 0 特战专用弹)<br />发数: 20 - Kalibre: 7.62x51mm NATO (Mk319 Mod 0)<br />Mermi: 20 + 口径: 7.62x51 mm NATO标准 (Mk319 Mod 0 特战专用弹)<br />发数: 20 + Kalibre: 7.62x51 mm NATO (Mk319 Mod 0)<br />Mermi: 20 - 7.62mm 10Rnd Mag (M993 AP) - Magazynek 7,62mm 10rd (M993 AP) - Ch. 7,62mm 10Cps (M993 AP) - Cargador de 10 balas de 7.62mm (M993 AP) + 7.62 mm 10Rnd Mag (M993 AP) + Magazynek 7,62 mm 10rd (M993 AP) + Ch. 7,62 mm 10Cps (M993 AP) + Cargador de 10 balas de 7.62 mm (M993 AP) Магазин из 10-ти 7,62 мм (M993 бронебойные) - 7,62mm 10-Patronen-Magazin (M993 AP) - 7.62mm 10Rnd Mag (M993 AP) + 7,62 mm 10-Patronen-Magazin (M993 AP) + 7.62 mm 10Rnd Mag (M993 AP) 7.62 10náb. Zásobník (M993 AP) - Carregador 7.62mm com 10 cartuchos (M993 AP) - 7,62mm 10-lövedékes tár (M993 páncéltörő) - 7.62mm 10発入り 弾倉 (M993 徹甲弾) - 10발들이 7.62mm 탄창 (M993 철갑탄) + Carregador 7.62 mm com 10 cartuchos (M993 AP) + 7,62 mm 10-lövedékes tár (M993 páncéltörő) + 7.62 mm 10発入り 弾倉 (M993 徹甲弾) + 10발들이 7.62 mm 탄창 (M993 철갑탄) 7.62毫米 10發 彈匣 (M993 穿甲專用彈) - 7.62mm 10发 弹匣 (M993 穿甲专用弹) - 7.62mm 10Rnd Mag (M993 AP) + 7.62 mm 10发 弹匣 (M993 穿甲专用弹) + 7.62 mm 10Rnd Mag (M993 AP) - 7.62mm AP - 7,62mm AP - 7,62mm AP - 7.62mm AP - 7,62mm бронебойные - 7,62mm AP - 7.62mm AP - 7.62mm AP - 7.62mm AP - 7,62mm páncéltörő - 7.62mm 徹甲弾 - 7.62mm 철갑탄 + 7.62 mm AP + 7,62 mm AP + 7,62 mm AP + 7.62 mm AP + 7,62 mm бронебойные + 7,62 mm AP + 7.62 mm AP + 7.62 mm AP + 7.62 mm AP + 7,62 mm páncéltörő + 7.62 mm 徹甲弾 + 7.62 mm 철갑탄 7.62毫米 M993 穿甲專用彈 - 7.62mm M993 穿甲专用弹 - 7.62mm AP + 7.62 mm M993 穿甲专用弹 + 7.62 mm AP - Caliber: 7.62x51mm NATO (M993 AP)<br />Rounds: 10 - Kaliber: 7,62x51mm NATO (M993 AP)<br />Pociski: 10 - Calibre: 7,62x51mm NATO (M993 AP)<br />Cartouches: 10 - Calibre: 7.62x51mm NATO (M993 AP)<br />Balas: 10 + Caliber: 7.62x51 mm NATO (M993 AP)<br />Rounds: 10 + Kaliber: 7,62x51 mm NATO (M993 AP)<br />Pociski: 10 + Calibre: 7,62x51 mm NATO (M993 AP)<br />Cartouches: 10 + Calibre: 7.62x51 mm NATO (M993 AP)<br />Balas: 10 Калибр: 7,62x51 мм NATO (M993 бронебойные)<br />Патронов: 10 - Kaliber: 7,62x51mm NATO (M993 AP)<br />Patronen: 10 + Kaliber: 7,62x51 mm NATO (M993 AP)<br />Patronen: 10 Calibro: 7.62x51 mm NATO (M993 AP)<br />Munizioni: 10 - Ráže: 7.62x51mm NATO (M993 AP)<br />Nábojů: 10 - Calibre: 7.26x51mm NATO (M993 AP)<br/>Cartuchos: 10 - Kaliber: 7,62x51mm NATO (M993 páncéltörő)<br />Lövedékek: 10 - 口径: 7.62x51mm NATO (Mk319 Mod 0)<br />装填数: 10 - 구경: 7.62x51mm NATO (M993 철갑탄)<br />장탄수: 10 + Ráže: 7.62x51 mm NATO (M993 AP)<br />Nábojů: 10 + Calibre: 7.26x51 mm NATO (M993 AP)<br/>Cartuchos: 10 + Kaliber: 7,62x51 mm NATO (M993 páncéltörő)<br />Lövedékek: 10 + 口径: 7.62x51 mm NATO (Mk319 Mod 0)<br />装填数: 10 + 구경: 7.62x51 mm NATO (M993 철갑탄)<br />장탄수: 10 口徑: 7.62x51毫米 NATO標準 (M993 穿甲專用彈)<br />發數: 10 - 口径: 7.62x51mm NATO标准 (M993 穿甲专用弹)<br />发数: 10 - Kalibre: 7.62x51mm NATO (M993 AP)<br />Mermi: 10 + 口径: 7.62x51 mm NATO标准 (M993 穿甲专用弹)<br />发数: 10 + Kalibre: 7.62x51 mm NATO (M993 AP)<br />Mermi: 10 - 7.62mm 20Rnd Mag (M993 AP) - Magazynek 7,62mm 20rd (M993 AP) - Ch. 7,62mm 20Cps (M993 AP) - Cargador de 20 balas de 7.62mm (M993 AP) + 7.62 mm 20Rnd Mag (M993 AP) + Magazynek 7,62 mm 20rd (M993 AP) + Ch. 7,62 mm 20Cps (M993 AP) + Cargador de 20 balas de 7.62 mm (M993 AP) Магазин из 20-ти 7,62 мм (M993 бронебойные) - 7,62mm 20-Patronen-Magazin (M993 AP) - 7.62mm 20Rnd Mag (M993 AP) - 7.62mm 20náb. Zásobník (M993 AP) - Carregador 7.62mm com 20 cartuchos (M993 AP) - 7,62mm 20-lövedékes tár (M993 páncéltörő) - 7.62mm 20発入り 弾倉 (M993 徹甲弾) - 20발들이 7.62mm 탄창 (M993 철갑탄) + 7,62 mm 20-Patronen-Magazin (M993 AP) + 7.62 mm 20Rnd Mag (M993 AP) + 7.62 mm 20náb. Zásobník (M993 AP) + Carregador 7.62 mm com 20 cartuchos (M993 AP) + 7,62 mm 20-lövedékes tár (M993 páncéltörő) + 7.62 mm 20発入り 弾倉 (M993 徹甲弾) + 20발들이 7.62 mm 탄창 (M993 철갑탄) 7.62毫米 20發 彈匣 (M993 穿甲專用彈) - 7.62mm 20发 弹匣 (M993 穿甲专用弹) - 7.62mm 20Rnd Mag (M993 AP) + 7.62 mm 20发 弹匣 (M993 穿甲专用弹) + 7.62 mm 20Rnd Mag (M993 AP) - 7.62mm AP - 7,62mm AP - 7,62mm AP - 7.62mm AP + 7.62 mm AP + 7,62 mm AP + 7,62 mm AP + 7.62 mm AP 7,62 мм бронебойные - 7,62mm AP - 7.62mm AP - 7.62mm AP - 7.62mm AP - 7,62mm páncéltörő - 7.62mm 徹甲弾 - 7.62mm 철갑탄 + 7,62 mm AP + 7.62 mm AP + 7.62 mm AP + 7.62 mm AP + 7,62 mm páncéltörő + 7.62 mm 徹甲弾 + 7.62 mm 철갑탄 7.62毫米 M993 穿甲專用彈 - 7.62mm M993 穿甲专用弹 - 7.62mm AP + 7.62 mm M993 穿甲专用弹 + 7.62 mm AP - Caliber: 7.62x51mm NATO (M993 AP)<br />Rounds: 20 - Kaliber: 7,62x51mm NATO (M993 AP)<br />Pociski: 20 - Calibre: 7,62x51mm NATO (M993 AP)<br />Cartouches: 20 + Caliber: 7.62x51 mm NATO (M993 AP)<br />Rounds: 20 + Kaliber: 7,62x51 mm NATO (M993 AP)<br />Pociski: 20 + Calibre: 7,62x51 mm NATO (M993 AP)<br />Cartouches: 20 Калибр: 7,62x51 мм NATO (M993 бронебойные)<br />Патронов: 20 - Kaliber: 7,62x51mm NATO (M993 AP)<br />Patronen: 20 + Kaliber: 7,62x51 mm NATO (M993 AP)<br />Patronen: 20 Calibro: 7.62x51 mm NATO (M993 AP)<br />Munizioni: 20 Calibre: 7.62x51 mm NATO (M993 AP)<br />Balas: 20 - Ráže: 7.62x51mm NATO (M993 AP)<br />Nábojů: 20 - Calibre: 7.26x51mm NATO (M993 AP)<br/>Cartuchos: 20 - Kaliber: 7,62x51mm NATO (M993 páncéltörő)<br />Lövedékek: 20 - 口径: 7.62x51mm NATO (M993 徹甲弾)<br />装填数: 20 - 구경: 7.62x51mm NATO (M993 철갑탄)<br />장탄수: 20 + Ráže: 7.62x51 mm NATO (M993 AP)<br />Nábojů: 20 + Calibre: 7.26x51 mm NATO (M993 AP)<br/>Cartuchos: 20 + Kaliber: 7,62x51 mm NATO (M993 páncéltörő)<br />Lövedékek: 20 + 口径: 7.62x51 mm NATO (M993 徹甲弾)<br />装填数: 20 + 구경: 7.62x51 mm NATO (M993 철갑탄)<br />장탄수: 20 口徑: 7.62x51毫米 NATO標準 (M993 穿甲專用彈)<br />發數: 20 - 口径: 7.62x51mm NATO标准 (M993 穿甲专用弹)<br />发数: 20 - Kalibre: 7.62x51mm NATO (M993 AP)<br />Mermi: 20 + 口径: 7.62x51 mm NATO标准 (M993 穿甲专用弹)<br />发数: 20 + Kalibre: 7.62x51 mm NATO (M993 AP)<br />Mermi: 20 - 7.62mm 20Rnd Mag (Mk248 Mod 0) - Magazynek 7,62mm 20rd (Mk248 Mod 0) - Ch. 7,62mm 20Cps (Mk248 Mod 0) - Cargador de 20 balas de 7.62mm (Mk248 Mod 0) - Магазин из 20-ти 7,62 мм (Mk248 Mod 0) - 7,62mm 20-Patronen-Magazin (Mk248 Mod 0) - 7.62mm 20Rnd Mag (Mk248 Mod 0) - 7.62mm 20náb. Zásobník (Mk248 Mod 0) - Carregador 7.62mm com 20 cartuchos (Mk248 Mod 0) - 7,62mm 20-lövedékes tár (Mk248 Mod 0) - 7.62mm 20発入り 弾倉 (Mk248 Mod 0) - 20발들이 7.62mm 탄창 (Mk248 Mod 0) - 7.62毫米 20發 彈匣 (Mk248 Mod 0 狙擊專用彈) - 7.62mm 20发 弹匣 (Mk248 Mod 0 狙击专用弹) - 7.62mm 20Rnd Mag (Mk248 Mod 0) + .300 WM 20Rnd Mag (Mk248 Mod 0) + Magazynek .300 WM 20rd (Mk248 Mod 0) + Ch. .300 WM 20Cps (Mk248 Mod 0) + Cargador de 20 balas de .300 WM (Mk248 Mod 0) + Магазин из 20-ти .300 WM (Mk248 Mod 0) + .300 WM 20-Patronen-Magazin (Mk248 Mod 0) + .300 WM 20Rnd Mag (Mk248 Mod 0) + .300 WM 20náb. Zásobník (Mk248 Mod 0) + Carregador .300 WM com 20 cartuchos (Mk248 Mod 0) + .300 WM 20-lövedékes tár (Mk248 Mod 0) + .300 WM 20発入り 弾倉 (Mk248 Mod 0) + 20발들이 .300 WM 탄창 (Mk248 Mod 0) + .300 萬能(WM) 20發 彈匣 (Mk248 Mod 0 狙擊專用彈) + .300 WM 20发 弹匣 (Mk248 Mod 0 狙击专用弹) + .300 WM 20Rnd Mag (Mk248 Mod 0) - 7.62mm Mk248 - 7,62mm Mk248 - 7,62mm Mk248 - 7.62mm Mk248 - 7,62 мм Mk248 - 7,62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 - 7,62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 - 7.62毫米 Mk248 狙擊專用彈 - 7.62mm Mk248 狙击专用弹 - 7.62mm Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 西米 Mk248 狙擊專用彈 + .300 WM Mk248 狙击专用弹 + .300 WM Mk248 - Caliber: 7.62x67mm NATO (Mk248 Mod 0)<br />Rounds: 20 - Kaliber: 7,62x67mm NATO (Mk248 Mod 0)<br />Pociski: 20 - Calibre: 7,62x67mm NATO (Mk248 Mod 0)<br />Cartouches: 20 - Calibre: 7.62x67mm NATO (Mk248 Mod 0)<br />Balas: 20 - Калибр: 7,62x67 мм NATO (Mk248 Mod 0)<br />Патронов: 20 - Kaliber: 7,62x51mm NATO (Mk248 Mod 0)<br />Patronen: 20 - Calibro: 7.62x67 mm NATO (Mk248 Mod 0)<br />Munizioni: 20 - Ráže: 7.62x67mm NATO (Mk248 Mod 0)<br />Nábojů: 20 - Calibre: 7.26x67mm NATO (Mk248 Mod 0)<br/>Cartuchos: 20 - Kaliber: 7,62x51mm NATO (Mk248 Mod 0)<br />Lövedékek: 20 - 口径: 7.62x67mm NATO (Mk248 Mod 0)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk248 Mod 0)<br />장탄수: 20 - 口徑: 7.62x67毫米 NATO標準 (Mk248 Mod 0 狙擊專用彈)<br />發數: 20 - 口径: 7.62x67mm NATO标准 (Mk248 Mod 0 狙击专用弹)<br />发数: 20 - Kalibre: 7.62x67mm NATO (Mk248 Mod 0)<br />Mermi: 20 + Caliber: .300 WM NATO (Mk248 Mod 0)<br />Rounds: 20 + Kaliber: .300 WM NATO (Mk248 Mod 0)<br />Pociski: 20 + Calibre: .300 WM NATO (Mk248 Mod 0)<br />Cartouches: 20 + Calibre: .300 WM NATO (Mk248 Mod 0)<br />Balas: 20 + Калибр: .300 WM NATO (Mk248 Mod 0)<br />Патронов: 20 + Kaliber: .300 WM NATO (Mk248 Mod 0)<br />Patronen: 20 + Calibro: .300 WM NATO (Mk248 Mod 0)<br />Munizioni: 20 + Ráže: .300 WM (Mk248 Mod 0)<br />Nábojů: 20 + Calibre: .300 WM NATO (Mk248 Mod 0)<br/>Cartuchos: 20 + Kaliber: .300 WM NATO (Mk248 Mod 0)<br />Lövedékek: 20 + 口径: .300 WM NATO (Mk248 Mod 0)<br />装填数: 20 + 구경: .300 WM NATO (Mk248 Mod 0)<br />장탄수: 20 + 口徑: .300 西米 NATO標準 (Mk248 Mod 0 狙擊專用彈)<br />發數: 20 + 口径: .300 WM NATO标准 (Mk248 Mod 0 狙击专用弹)<br />发数: 20 + Kalibre: .300 WM NATO (Mk248 Mod 0)<br />Mermi: 20 - 7.62mm 20Rnd Mag (Mk248 Mod 1) - Magazynek 7,62mm 20rd (Mk248 Mod 1) - Ch. 7,62mm 20Cps (Mk248 Mod 1) - Cargador de 20 balas de 7.62mm (Mk248 Mod 1) - Магазин из 20-ти 7,62 мм (Mk248 Mod 1) - 7,62mm 20-Patronen-Magazin (Mk248 Mod 1) - 7.62mm 20Rnd Mag (Mk248 Mod 1) - 7.62mm 20náb. Zásobník (Mk248 Mod 1) - Carregador 7.62mm com 20 cartuchos (Mk248 Mod 1) - 7,62mm 20-lövedékes tár (Mk248 Mod 1) - 7.62mm 20発入り 弾倉 (Mk248 Mod 1) - 20발들이 7.62mm 탄창 (Mk248 Mod 1) - 7.62毫米 20發 彈匣 (Mk248 Mod 1 狙擊專用彈) - 7.62mm 20发 弹匣 (Mk248 Mod 1 狙击专用弹) - 7.62mm 20Rnd Mag (Mk248 Mod 1) + .300 WM 20Rnd Mag (Mk248 Mod 1) + Magazynek .300 WM 20rd (Mk248 Mod 1) + Ch. .300 WM 20Cps (Mk248 Mod 1) + Cargador de 20 balas de .300 WM (Mk248 Mod 1) + Магазин из 20-ти .300 WM (Mk248 Mod 1) + .300 WM 20-Patronen-Magazin (Mk248 Mod 1) + .300 WM 20Rnd Mag (Mk248 Mod 1) + .300 WM 20náb. Zásobník (Mk248 Mod 1) + Carregador .300 WM com 20 cartuchos (Mk248 Mod 1) + .300 WM 20-lövedékes tár (Mk248 Mod 1) + .300 WM 20発入り 弾倉 (Mk248 Mod 1) + 20발들이 .300 WM 탄창 (Mk248 Mod 1) + .300 西米 20發 彈匣 (Mk248 Mod 1 狙擊專用彈) + .300 WM 20发 弹匣 (Mk248 Mod 1 狙击专用弹) + .300 WM 20Rnd Mag (Mk248 Mod 1) - 7.62mm Mk248 - 7,62mm Mk248 - 7,62mm Mk248 - 7.62mm Mk248 - 7,62 мм Mk248 - 7,62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 - 7,62mm Mk248 - 7.62mm Mk248 - 7.62mm Mk248 - 7.62毫米 Mk248 狙擊專用彈 - 7.62mm Mk248 狙击专用弹 - 7.62mm Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 西米 Mk248 狙擊專用彈 + .300 WM Mk248 狙击专用弹 + .300 WM Mk248 - Caliber: 7.62x67mm NATO (Mk248 Mod 1)<br />Rounds: 20 - Kaliber: 7,62x67mm NATO (Mk248 Mod 1)<br />Pociski: 20 - Calibre: 7,62x67mm NATO (Mk248 Mod 1)<br />Cartouches: 20 - Calibre: 7.62x67mm NATO (Mk248 Mod 1)<br />Balas: 20 - Калибр: 7,62x67 мм NATO (Mk248 Mod 1)<br />Патронов: 20 - Kaliber: 7,62x51mm NATO (Mk248 Mod 1)<br />Patronen: 20 - Calibro: 7.62x67 mm NATO (Mk248 Mod 1)<br />Munizioni: 20 - Ráže: 7.62x67mm NATO (Mk248 Mod 1)<br />Nábojů: 20 - Calibre: 7.26x67mm NATO (Mk248 Mod 1)<br/>Cartuchos: 20 - Kaliber: 7,62x51mm NATO (Mk248 Mod 1)<br />Lövedékek: 20 - 口径: 7.62x67mm NATO (Mk248 Mod 1)<br />装填数: 20 - 구경: 7.62x51mm NATO (Mk248 Mod 1)<br />장탄수: 20 - 口徑: 7.62x67毫米 NATO標準 (Mk248 Mod 1 狙擊專用彈)<br />發數: 20 - 口径: 7.62x67mm NATO标准 (Mk248 Mod 1 狙击专用弹)<br />发数: 20 - Kalibre: 7.62x67mm NATO (Mk248 Mod 1)<br />Mermi: 20 + Caliber: .300 WM NATO (Mk248 Mod 1)<br />Rounds: 20 + Kaliber: .300 WM NATO (Mk248 Mod 1)<br />Pociski: 20 + Calibre: .300 WM NATO (Mk248 Mod 1)<br />Cartouches: 20 + Calibre: .300 WM NATO (Mk248 Mod 1)<br />Balas: 20 + Калибр: .300 WM NATO (Mk248 Mod 1)<br />Патронов: 20 + Kaliber: .300 WM NATO (Mk248 Mod 1)<br />Patronen: 20 + Calibro: .300 WM NATO (Mk248 Mod 1)<br />Munizioni: 20 + Ráže: .300 WM NATO (Mk248 Mod 1)<br />Nábojů: 20 + Calibre: .300 WM NATO (Mk248 Mod 1)<br/>Cartuchos: 20 + Kaliber: .300 WM NATO (Mk248 Mod 1)<br />Lövedékek: 20 + 口径: .300 WM NATO (Mk248 Mod 1)<br />装填数: 20 + 구경: .300 WM NATO (Mk248 Mod 1)<br />장탄수: 20 + 口徑: .300 西米 NATO標準 (Mk248 Mod 1 狙擊專用彈)<br />發數: 20 + 口径: .300 WM NATO标准 (Mk248 Mod 1 狙击专用弹)<br />发数: 20 + Kalibre: .300 WM NATO (Mk248 Mod 1)<br />Mermi: 20 - 7.62mm 20Rnd Mag (Berger Hybrid OTM) - Magazynek 7,62mm 20rd (Berger Hybrid OTM) - Ch. 7,62 20Cps (Berger Hybrid OTM) - Cargador de 20 balas de 7.62mm (Berger Hybrid OTM) - Магазин из 20-ти 7,62 мм (Berger Hybrid OTM) - 7,62mm 20-Patronen-Magazin (Berger Hybrid OTM) - 7.62mm 20Rnd Mag (Berger Hybrid OTM) - 7.62mm 20náb. Zásobník (Berger Hybrid OTM) - Carregador 7.62mm com 20 cartuchos (Berger Hybrid OTM) - 7,62mm 20-lövedékes tár (Berger Hybrid OTM) - 7.62mm 20発入り 弾倉 (Berger Hybrid OTM) - 20발들이 7.62mm 탄창 (Berger Hybrid OTM) - 7.62毫米 20發 彈匣 (Berger Hybrid 空尖比賽專用彈) - 7.62mm 20发 弹匣 (Berger Hybrid 空尖比赛专用弹) - 7.62mm 20Rnd Mag (Berger Hybrid OTM) + .300 WM 20Rnd Mag (Berger Hybrid OTM) + Magazynek .300 WM 20rd (Berger Hybrid OTM) + Ch. .300 WM 20Cps (Berger Hybrid OTM) + Cargador de 20 balas de .300 WM (Berger Hybrid OTM) + Магазин из 20-ти .300 WM (Berger Hybrid OTM) + .300 WM 20-Patronen-Magazin (Berger Hybrid OTM) + .300 WM 20Rnd Mag (Berger Hybrid OTM) + .300 WM 20náb. Zásobník (Berger Hybrid OTM) + Carregador .300 WM com 20 cartuchos (Berger Hybrid OTM) + .300 WM 20-lövedékes tár (Berger Hybrid OTM) + .300 WM 20発入り 弾倉 (Berger Hybrid OTM) + 20발들이 .300 WM 탄창 (Berger Hybrid OTM) + .300 西米 20發 彈匣 (Berger Hybrid 空尖比賽專用彈) + .300 WM 20发 弹匣 (Berger Hybrid 空尖比赛专用弹) + .300 WM 20Rnd Mag (Berger Hybrid OTM) - 7.62mm OTM - 7,62mm OTM - 7,62mm OTM - 7.62mm OTM - 7,62 мм OTM - 7,62mm OTM - 7.62mm OTM - 7.62mm OTM - 7.62mm OTM - 7,62mm OTM - 7.62mm OTM - 7.62mm OTM - 7.62毫米 空尖比賽專用彈 - 7.62mm 空尖比赛专用弹 - 7.62mm OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 西米 空尖比賽專用彈 + .300 WM 空尖比赛专用弹 + .300 WM OTM - Caliber: 7.62x67mm NATO (Berger Hybrid OTM)<br />Rounds: 20 - Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)<br />Pociski: 20 - Calibre: 7,62x67mm NATO (Berger Hybrid OTM)<br />Cartouches: 20 - Calibre: 7.62x67mm NATO (Berger Hybrid OTM)<br />Balas: 20 - Калибр: 7,62x67 мм NATO (Berger Hybrid OTM)<br />Патронов: 20 - Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)<br />Patronen: 20 - Calibro: 7.62x67 mm NATO (Berger Hybrid OTM)<br />Munizioni: 20 - Ráže: 7.62x67mm NATO (Berger Hybrid OTM)<br />Nábojů: 20 - Calibre: 7.26x67mm NATO (Berger Hybrid OTM)<br/>Cartuchos: 20 - Kaliber: 7,62x67mm NATO (Berger Hybrid OTM)<br />Lövedékek: 20 - 口径: 7.62x67mm NATO (Berger Hybrid OTM)<br />装填数: 20 - 구경: 7.62x51mm NATO (Berger Hybrid OTM)<br />장탄수: 20 - 口徑: 7.62x67毫米 NATO標準 (Berger Hybrid 空尖比賽專用彈)<br />發數: 20 - 口径: 7.62x67mm NATO标准 (Berger Hybrid 空尖比赛专用弹)<br />发数: 20 - Kalibre: 7.62x67mm NATO (Berger Hybrid OTM)<br />Mermi: 20 + Caliber: .300 WM NATO (Berger Hybrid OTM)<br />Rounds: 20 + Kaliber: .300 WM NATO (Berger Hybrid OTM)<br />Pociski: 20 + Calibre: .300 WM NATO (Berger Hybrid OTM)<br />Cartouches: 20 + Calibre: .300 WM NATO (Berger Hybrid OTM)<br />Balas: 20 + Калибр: .300 WM NATO (Berger Hybrid OTM)<br />Патронов: 20 + Kaliber: .300 WM NATO (Berger Hybrid OTM)<br />Patronen: 20 + Calibro: .300 WM NATO (Berger Hybrid OTM)<br />Munizioni: 20 + Ráže: .300 WM NATO (Berger Hybrid OTM)<br />Nábojů: 20 + Calibre: .300 WM OTM NATO (Berger Hybrid OTM)<br/>Cartuchos: 20 + Kaliber: .300 WM NATO (Berger Hybrid OTM)<br />Lövedékek: 20 + 口径: .300 WM NATO (Berger Hybrid OTM)<br />装填数: 20 + 구경: .300 WM NATO (Berger Hybrid OTM)<br />장탄수: 20 + 口徑: .300 西米 NATO標準 (Berger Hybrid 空尖比賽專用彈)<br />發數: 20 + 口径: .300 WM NATO标准 (Berger Hybrid 空尖比赛专用弹)<br />发数: 20 + Kalibre: .300 WM NATO (Berger Hybrid OTM)<br />Mermi: 20 + + + .300 WM 10Rnd Mag (Mk248 Mod 0) + Magazynek .300 WM 10rd (Mk248 Mod 0) + Ch. .300 WM 10Cps (Mk248 Mod 0) + Cargador de 10 balas de .300 WM (Mk248 Mod 0) + Магазин из 10-ти .300 WM (Mk248 Mod 0) + .300 WM 10-Patronen-Magazin (Mk248 Mod 0) + .300 WM 10Rnd Mag (Mk248 Mod 0) + .300 WM 10náb. Zásobník (Mk248 Mod 0) + Carregador .300 WM com 10 cartuchos (Mk248 Mod 0) + .300 WM 10-lövedékes tár (Mk248 Mod 0) + .300 WM 10発入り 弾倉 (Mk248 Mod 0) + 10발들이 .300 WM 탄창 (Mk248 Mod 0) + .300 萬能(WM) 10發 彈匣 (Mk248 Mod 0 狙擊專用彈) + .300 WM 10发 弹匣 (Mk248 Mod 0 狙击专用弹) + .300 WM 10Rnd Mag (Mk248 Mod 0) + + + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 西米 Mk248 狙擊專用彈 + .300 WM Mk248 狙击专用弹 + .300 WM Mk248 + + + Caliber: .300 WM NATO (Mk248 Mod 0)<br />Rounds: 10 + Kaliber: .300 WM NATO (Mk248 Mod 0)<br />Pociski: 10 + Calibre: .300 WM NATO (Mk248 Mod 0)<br />Cartouches: 10 + Calibre: .300 WM NATO (Mk248 Mod 0)<br />Balas: 10 + Калибр: .300 WM NATO (Mk248 Mod 0)<br />Патронов: 10 + Kaliber: .300 WM NATO (Mk248 Mod 0)<br />Patronen: 10 + Calibro: .300 WM NATO (Mk248 Mod 0)<br />Munizioni: 10 + Ráže: .300 WM (Mk248 Mod 0)<br />Nábojů: 10 + Calibre: .300 WM NATO (Mk248 Mod 0)<br/>Cartuchos: 10 + Kaliber: .300 WM NATO (Mk248 Mod 0)<br />Lövedékek: 10 + 口径: .300 WM NATO (Mk248 Mod 0)<br />装填数: 10 + 구경: .300 WM NATO (Mk248 Mod 0)<br />장탄수: 10 + 口徑: .300 西米 NATO標準 (Mk248 Mod 0 狙擊專用彈)<br />發數: 10 + 口径: .300 WM NATO标准 (Mk248 Mod 0 狙击专用弹)<br />发数: 10 + Kalibre: .300 WM NATO (Mk248 Mod 0)<br />Mermi: 10 + + + .300 WM 10Rnd Mag (Mk248 Mod 1) + Magazynek .300 WM 10rd (Mk248 Mod 1) + Ch. .300 WM 10Cps (Mk248 Mod 1) + Cargador de 10 balas de .300 WM (Mk248 Mod 1) + Магазин из 10-ти .300 WM (Mk248 Mod 1) + .300 WM 10-Patronen-Magazin (Mk248 Mod 1) + .300 WM 10Rnd Mag (Mk248 Mod 1) + .300 WM 10náb. Zásobník (Mk248 Mod 1) + Carregador .300 WM com 10 cartuchos (Mk248 Mod 1) + .300 WM 10-lövedékes tár (Mk248 Mod 1) + .300 WM 10発入り 弾倉 (Mk248 Mod 1) + 10발들이 .300 WM 탄창 (Mk248 Mod 1) + .300 西米 10發 彈匣 (Mk248 Mod 1 狙擊專用彈) + .300 WM 10发 弹匣 (Mk248 Mod 1 狙击专用弹) + .300 WM 10Rnd Mag (Mk248 Mod 1) + + + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 WM Mk248 + .300 西米 Mk248 狙擊專用彈 + .300 WM Mk248 狙击专用弹 + .300 WM Mk248 + + + Caliber: .300 WM NATO (Mk248 Mod 1)<br />Rounds: 10 + Kaliber: .300 WM NATO (Mk248 Mod 1)<br />Pociski: 10 + Calibre: .300 WM NATO (Mk248 Mod 1)<br />Cartouches: 10 + Calibre: .300 WM NATO (Mk248 Mod 1)<br />Balas: 10 + Калибр: .300 WM NATO (Mk248 Mod 1)<br />Патронов: 10 + Kaliber: .300 WM NATO (Mk248 Mod 1)<br />Patronen: 10 + Calibro: .300 WM NATO (Mk248 Mod 1)<br />Munizioni: 10 + Ráže: .300 WM NATO (Mk248 Mod 1)<br />Nábojů: 10 + Calibre: .300 WM NATO (Mk248 Mod 1)<br/>Cartuchos: 10 + Kaliber: .300 WM NATO (Mk248 Mod 1)<br />Lövedékek: 10 + 口径: .300 WM NATO (Mk248 Mod 1)<br />装填数: 10 + 구경: .300 WM NATO (Mk248 Mod 1)<br />장탄수: 10 + 口徑: .300 西米 NATO標準 (Mk248 Mod 1 狙擊專用彈)<br />發數: 10 + 口径: .300 WM NATO标准 (Mk248 Mod 1 狙击专用弹)<br />发数: 10 + Kalibre: .300 WM NATO (Mk248 Mod 1)<br />Mermi: 10 + + + .300 WM 10Rnd Mag (Berger Hybrid OTM) + Magazynek .300 WM 10rd (Berger Hybrid OTM) + Ch. .300 WM 10Cps (Berger Hybrid OTM) + Cargador de 10 balas de .300 WM (Berger Hybrid OTM) + Магазин из 10-ти .300 WM (Berger Hybrid OTM) + .300 WM 10-Patronen-Magazin (Berger Hybrid OTM) + .300 WM 10Rnd Mag (Berger Hybrid OTM) + .300 WM 10náb. Zásobník (Berger Hybrid OTM) + Carregador .300 WM com 10 cartuchos (Berger Hybrid OTM) + .300 WM 10-lövedékes tár (Berger Hybrid OTM) + .300 WM 10発入り 弾倉 (Berger Hybrid OTM) + 10발들이 .300 WM 탄창 (Berger Hybrid OTM) + .300 西米 10發 彈匣 (Berger Hybrid 空尖比賽專用彈) + .300 WM 10发 弹匣 (Berger Hybrid 空尖比赛专用弹) + .300 WM 10Rnd Mag (Berger Hybrid OTM) + + + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 WM OTM + .300 西米 空尖比賽專用彈 + .300 WM 空尖比赛专用弹 + .300 WM OTM + + + Caliber: .300 WM NATO (Berger Hybrid OTM)<br />Rounds: 10 + Kaliber: .300 WM NATO (Berger Hybrid OTM)<br />Pociski: 10 + Calibre: .300 WM NATO (Berger Hybrid OTM)<br />Cartouches: 10 + Calibre: .300 WM NATO (Berger Hybrid OTM)<br />Balas: 10 + Калибр: .300 WM NATO (Berger Hybrid OTM)<br />Патронов: 10 + Kaliber: .300 WM NATO (Berger Hybrid OTM)<br />Patronen: 10 + Calibro: .300 WM NATO (Berger Hybrid OTM)<br />Munizioni: 10 + Ráže: .300 WM NATO (Berger Hybrid OTM)<br />Nábojů: 10 + Calibre: .300 WM OTM NATO (Berger Hybrid OTM)<br/>Cartuchos: 10 + Kaliber: .300 WM NATO (Berger Hybrid OTM)<br />Lövedékek: 10 + 口径: .300 WM NATO (Berger Hybrid OTM)<br />装填数: 10 + 구경: .300 WM NATO (Berger Hybrid OTM)<br />장탄수: 10 + 口徑: .300 西米 NATO標準 (Berger Hybrid 空尖比賽專用彈)<br />發數: 10 + 口径: .300 WM NATO标准 (Berger Hybrid 空尖比赛专用弹)<br />发数: 10 + Kalibre: .300 WM NATO (Berger Hybrid OTM)<br />Mermi: 10 - 6.5x47mm 30Rnd Mag (HPBT Scenar) - Ch. 6,5x47mm 30Cps (HPBT Scenar) - Cargador de 30 balas de 6.5x47mm (HPBT Scenar) - Magazynek 6,5x47mm 30rd (HPBT Scenar) - Магазин из 30-ти 6,5x47 мм (экспансивные Scenar) - 6,5x47mm 30-Patronen-Magazin (HPBT Scenar) - 6.5x47mm 30Rnd Mag (HPBT Scenar) - 6.5x47mm 30náb. Zásobník (HPBT Scenar) - Carregador 6.5x47mm com 30 cartuchos (HPBT Scenar) - 6,5x47mm 30-lövedékes tár (HPBT Scenar) - 6.5x47mm 30発入り 弾倉 (HPBT Scenar) - 30발들이 6.5x47mm 탄창 (HPBT Scenar) - 6.5x47毫米 30發 彈匣 (拉普 空尖艇尾狙擊專用彈) - 6.5x47mm 30发 弹匣 (Lapua 空尖艇尾狙击专用弹) - 6.5x47mm 30Rnd Mag (HPBT Scenar) + 6.5x47 mm 30Rnd Sand Mag (HPBT Scenar) + 6.5x47 mm 30発入り サンド 弾倉 (HPBT Scenar) + + + 6.5x47 mm 30Rnd Promet Mag (HPBT Scenar) + 6.5x47 mm 30発入り プロメット 弾倉 (HPBT Scenar) + + + 6.5x47 mm 30Rnd Black Mag (HPBT Scenar) + 6.5x47 mm 30発入り ブラック 弾倉 (HPBT Scenar) + + + 6.5x47 mm 30Rnd Khaki Mag (HPBT Scenar) + 6.5x47 mm 30発入り カーキ 弾倉 (HPBT Scenar) - 6.5mm Lapua - 6,5mm Lapua - 6.5mm Lapua - 6,5mm Lapua + 6.5 mm Lapua + 6,5 mm Lapua + 6.5 mm Lapua + 6,5 mm Lapua 6,5 мм Lapua - 6,5mm Lapua - 6.5mm Lapua - 6.5mm Lapua - 6.5mm Lapua - 6,5mm Lapua - 6.5mm Lapua - 6.5mm Lapua + 6,5 mm Lapua + 6.5 mm Lapua + 6.5 mm Lapua + 6.5 mm Lapua + 6,5 mm Lapua + 6.5 mm Lapua + 6.5 mm Lapua 6.5毫米 拉普 空尖艇尾狙擊專用彈 - 6.5mm Lapua 空尖艇尾狙击专用弹 - 6.5mm Lapua + 6.5 mm Lapua 空尖艇尾狙击专用弹 + 6.5 mm Lapua - Caliber: 6.5x47mm (HPBT Scenar)<br />Rounds: 30<br />Used in: MXM - Calibre: 6,5x47mm (HPBT Scenar)<br />Cartouches: 30<br />Utilisé avec: MXM - Calibre: 6.5x47mm (HPBT Scenar)<br />Balas: 30<br />Se usa en: MXM - Kaliber: 6,5x47mm (HPBT Scenar)<br />Pociski: 30 + Caliber: 6.5x47 mm (HPBT Scenar)<br />Rounds: 30<br />Used in: MXM + Calibre: 6,5x47 mm (HPBT Scenar)<br />Cartouches: 30<br />Utilisé avec: MXM + Calibre: 6.5x47 mm (HPBT Scenar)<br />Balas: 30<br />Se usa en: MXM + Kaliber: 6,5x47 mm (HPBT Scenar)<br />Pociski: 30 Калибр: 6,5x47 мм (экспансивные Scenar)<br />Патронов: 30<br />Используются с: MXM - Kaliber: 6,5x47mm (HPBT Scenar)<br />Patronen: 30<br />Eingesetzt von: MXM - Calibro: 6.5x47mm (HPBT Scenar)<br />Munizioni: 30<br />In uso su: MXM - Ráže: 6.5x47mm (HPBT Scenar)<br />Nábojů: 30<br />Použití u: MXM - Calibre: 6.5x47mm (HPBT Scenar)<br/>Cartuchos: 30<br/>Usado em: MXM - Kaliber: 6,5x47mm (HPBT Scenar)<br />Lövedékek: 30<br />Használható: MXM - 口径: 6.5x47mm (HPBT Scenar)<br />装填数: 30<br />次で使用: MXM - 구경: 6.5x47mm (HPBT Scenar)<br />장탄수: 30<br />사용처: MXM + Kaliber: 6,5x47 mm (HPBT Scenar)<br />Patronen: 30<br />Eingesetzt von: MXM + Calibro: 6.5x47 mm (HPBT Scenar)<br />Munizioni: 30<br />In uso su: MXM + Ráže: 6.5x47 mm (HPBT Scenar)<br />Nábojů: 30<br />Použití u: MXM + Calibre: 6.5x47 mm (HPBT Scenar)<br/>Cartuchos: 30<br/>Usado em: MXM + Kaliber: 6,5x47 mm (HPBT Scenar)<br />Lövedékek: 30<br />Használható: MXM + 口径: 6.5x47 mm (HPBT Scenar)<br />装填数: 30<br />次で使用: MXM + 구경: 6.5x47 mm (HPBT Scenar)<br />장탄수: 30<br />사용처: MXM 口徑: 6.5x47毫米 (拉普 空尖艇尾狙擊專用彈)<br />發數: 30<br />使用於: MXM - 口径: 6.5x47mm (Lapua 空尖艇尾狙击专用弹)<br />发数: 30<br />使用于: MXM - Kalibre: 6.5x47mm (HPBT Scenar)<br />Mermi: 30<br />Kullanıyor: MXM + 口径: 6.5x47 mm (Lapua 空尖艇尾狙击专用弹)<br />发数: 30<br />使用于: MXM + Kalibre: 6.5x47 mm (HPBT Scenar)<br />Mermi: 30<br />Kullanıyor: MXM + + + Caliber: 6.5x47 mm (HPBT Scenar)<br />Rounds: 30<br />Used in: Promet MR + Calibre: 6,5x47 mm (HPBT Scenar)<br />Cartouches: 30<br />Utilisé avec: Promet MR + Calibre: 6.5x47 mm (HPBT Scenar)<br />Balas: 30<br />Se usa en: Promet MR + Kaliber: 6,5x47 mm (HPBT Scenar)<br />Pociski: 30 + Калибр: 6,5x47 мм (экспансивные Scenar)<br />Патронов: 30<br />Используются с: Promet MR + Kaliber: 6,5x47 mm (HPBT Scenar)<br />Patronen: 30<br />Eingesetzt von: Promet MR + Calibro: 6.5x47 mm (HPBT Scenar)<br />Munizioni: 30<br />In uso su: Promet MR + Ráže: 6.5x47 mm (HPBT Scenar)<br />Nábojů: 30<br />Použití u: Promet MR + Calibre: 6.5x47 mm (HPBT Scenar)<br/>Cartuchos: 30<br/>Usado em: Promet MR + Kaliber: 6,5x47 mm (HPBT Scenar)<br />Lövedékek: 30<br />Használható: Promet MR + 口径: 6.5x47 mm (HPBT Scenar)<br />装填数: 30<br />次で使用: Promet MR + 구경: 6.5x47 mm (HPBT Scenar)<br />장탄수: 30<br />사용처: Promet MR + 口徑: 6.5x47毫米 (拉普 空尖艇尾狙擊專用彈)<br />發數: 30<br />使用於: Promet MR + 口径: 6.5x47 mm (Lapua 空尖艇尾狙击专用弹)<br />发数: 30<br />使用于: Promet MR + Kalibre: 6.5x47 mm (HPBT Scenar)<br />Mermi: 30<br />Kullanıyor: Promet MR - 6.5mm Creedmor 30Rnd Mag - Magazynek 6,5mm Creedmor 30rd - 6.5mm Creedmor 30Rnd Mag - Магазин из 30-ти 6,5 мм Creedmor - 6,5mm Creedmor 30-Patronen-Magazin - Cargador de 30 balas Creedmor de 6.5mm - Ch. 6,5mm Creedmor 30Cps - 6.5mm Creedmor 30náb. Zásobník - Carregador 6.5mm com 30 cartuchos Creedmor - 6,5mm Creedmor 30-lövedékes tár - 6.5mm Creedmor 30発入り 弾倉 - 30발들이 6.5mm Creedmor 탄창 - 6.5毫米 30發 彈匣 (克里德莫爾(CM) 狙擊專用彈) - 6.5mm 30发 弹匣 (Creedmor 狙击专用弹) - 6.5mm Creedmor 30Rnd Mag + 6.5 mm Creedmor 30Rnd Sand Mag + 6.5 mm クリードモア 30発入り サンド 弾倉 + + + 6.5 mm Creedmor 30Rnd Promet Mag + 6.5 mm クリードモア 30発入り プロメット 弾倉 + + + 6.5 mm Creedmor 30Rnd Black Mag + 6.5 mm クリードモア 30発入り ブラック 弾倉 + + + 6.5 mm Creedmor 30Rnd Khaki Mag + 6.5 mm クリードモア 30発入り カーキ 弾倉 - 6.5mm CM - 6,5mm CM - 6.5mm CM - 6,5mm CM + 6.5 mm CM + 6,5 mm CM + 6.5 mm CM + 6,5 mm CM 6,5 мм CM - 6,5mm CM - 6.5mm CM - 6.5mm CM - 6.5mm CM - 6,5mm CM - 6.5mm CM - 6.5mm CM + 6,5 mm CM + 6.5 mm CM + 6.5 mm CM + 6.5 mm CM + 6,5 mm CM + 6.5 mm CM + 6.5 mm CM 6.5毫米 CM狙擊專用彈 - 6.5mm CM 狙击专用弹 - 6.5mm CM + 6.5 mm CM 狙击专用弹 + 6.5 mm CM - Caliber: 6.5x47mm Creedmor<br />Rounds: 30<br />Used in: MXM - Kaliber: 6,5x47mm Creedmor<br />Pociski: 30<br />Używany w: MXM - Kaliber: 6,5x47mm Creedmor<br />Patronen: 30<br />Eingesetzt von: MXM - Calibre: 6,5x47mm Creedmor <br />Cartouches: 30<br />Utilisé avec: MXM - Calibro: 6.5mm Creedmor<br />Munizioni: 30<br />In uso su: MXM - Calibre: 6.5mm Creedmor<br />Balas: 30<br />Se usa en: MXM + Caliber: 6.5x47 mm Creedmor<br />Rounds: 30<br />Used in: MXM + Kaliber: 6,5x47 mm Creedmor<br />Pociski: 30<br />Używany w: MXM + Kaliber: 6,5x47 mm Creedmor<br />Patronen: 30<br />Eingesetzt von: MXM + Calibre: 6,5x47 mm Creedmor <br />Cartouches: 30<br />Utilisé avec: MXM + Calibro: 6.5 mm Creedmor<br />Munizioni: 30<br />In uso su: MXM + Calibre: 6.5 mm Creedmor<br />Balas: 30<br />Se usa en: MXM Калибр: 6,5x47мм Creedmor<br />Патронов: 30<br />Используются c: MXM - Ráže: 6.5x47mm Creedmor<br />Nábojů: 30<br />Použití u: MXM - Calibre: 6.5x47mm Creedmor<br/>Cartuchos: 30<br/>Usado em: MXM - Kaliber: 6,5x47mm Creedmor<br />Lövedékek: 30<br />Használható: MXM - 口径: 6.5x47mm Creedmor<br />装填数: 30<br />次で使用: MXM - 구경: 6.5x47mm Creedmor<br />장탄수: 30<br />사용처: MXM + Ráže: 6.5x47 mm Creedmor<br />Nábojů: 30<br />Použití u: MXM + Calibre: 6.5x47 mm Creedmor<br/>Cartuchos: 30<br/>Usado em: MXM + Kaliber: 6,5x47 mm Creedmor<br />Lövedékek: 30<br />Használható: MXM + 口径: 6.5x47 mm Creedmor<br />装填数: 30<br />次で使用: MXM + 구경: 6.5x47 mm Creedmor<br />장탄수: 30<br />사용처: MXM 口徑: 6.5x47毫米 克里德莫爾 狙擊專用彈<br />發數: 30<br />使用於: MXM - 口径: 6.5x47mm Creedmor 狙击专用弹<br />发数: 30<br />使用于: MXM - Kalibre: 6.5x47mm Creedmor<br />Mermi: 30<br />Kullanıyor: MXM + 口径: 6.5x47 mm Creedmor 狙击专用弹<br />发数: 30<br />使用于: MXM + Kalibre: 6.5x47 mm Creedmor<br />Mermi: 30<br />Kullanıyor: MXM + + + Caliber: 6.5x47 mm Creedmor<br />Rounds: 30<br />Used in: Promet MR + Kaliber: 6,5x47 mm Creedmor<br />Pociski: 30<br />Używany w: Promet MR + Kaliber: 6,5x47 mm Creedmor<br />Patronen: 30<br />Eingesetzt von: Promet MR + Calibre: 6,5x47 mm Creedmor <br />Cartouches: 30<br />Utilisé avec: Promet MR + Calibro: 6.5 mm Creedmor<br />Munizioni: 30<br />In uso su: Promet MR + Calibre: 6.5 mm Creedmor<br />Balas: 30<br />Se usa en: Promet MR + Калибр: 6,5x47мм Creedmor<br />Патронов: 30<br />Используются c: Promet MR + Ráže: 6.5x47 mm Creedmor<br />Nábojů: 30<br />Použití u: Promet MR + Calibre: 6.5x47 mm Creedmor<br/>Cartuchos: 30<br/>Usado em: Promet MR + Kaliber: 6,5x47 mm Creedmor<br />Lövedékek: 30<br />Használható: Promet MR + 口径: 6.5x47 mm Creedmor<br />装填数: 30<br />次で使用: Promet MR + 구경: 6.5x47 mm Creedmor<br />장탄수: 30<br />사용처: Promet MR + 口徑: 6.5x47毫米 克里德莫爾 狙擊專用彈<br />發數: 30<br />使用於: Promet MR + 口径: 6.5x47 mm Creedmor 狙击专用弹<br />发数: 30<br />使用于: Promet MR + Kalibre: 6.5x47 mm Creedmor<br />Mermi: 30<br />Kullanıyor: Promet MR - .338 10Rnd Mag (300gr Lapua Scenar) - Ch. .338 10 Cps (300gr Lapua Scenar) + .338 LM 10Rnd Mag (300gr Lapua Scenar) + Ch. .338 LM 10 Cps (300gr Lapua Scenar) Cargador de 10 balas de 8.6x70mm (300gr Lapua Scenar) - Magazynek .338 10rd (300gr Lapua Scenar) - Магазин из 10-ти .338 (300 гран Lapua Scenar) - .338 10-Patronen-Magazin (300gr Lapua Scenar) - .338 10Munizioni Mag (300gr Lapua Scenar) - .338 10náb. Zásobník (300gr Lapua Scenar) - Carregador .338 (300gr Lapua Scenar) com 10 cartuchos - .338 10-lövedékes tár (300gr Lapua Scenar) - .338 10発入り 弾倉 (300gr Lapua Scenar) + Magazynek .338 LM 10rd (300gr Lapua Scenar) + Магазин из 10-ти .338 LM (300 гран Lapua Scenar) + .338 LM 10-Patronen-Magazin (300gr Lapua Scenar) + .338 LM 10Munizioni Mag (300gr Lapua Scenar) + .338 LM 10náb. Zásobník (300gr Lapua Scenar) + Carregador .338 LM (300gr Lapua Scenar) com 10 cartuchos + .338 LM 10-lövedékes tár (300gr Lapua Scenar) + .338 LM 10発入り 弾倉 (300gr Lapua Scenar) 10발들이 .338 탄창 (300gr Lapua Scenar) .338 10發 彈匣 (300公克 Lapua Scenar) - .338 10发 弹匣 (300公克 Lapua Scenar) - .338 10Rnd Mag (300gr Lapua Scenar) + .338 LM 10发 弹匣 (300公克 Lapua Scenar) + .338 LM 10Rnd Mag (300gr Lapua Scenar) .338 Scenar @@ -2607,21 +2945,21 @@ Kalibre: 8.6x70mm (300gr Lapua Scenar)<br />Mermi: 10 - .338 10Rnd Mag (API526) - Ch. .338 10Cps (API526) - Cargador de 10 balas de .338 (API526) - Magazynek .338 10rd (API526) - Магазин из 10-ти .338 (API526) - .338 10-Patronen-Magazin (API526) - .338 10Rnd Mag (API526) - .338 10náb. Zásobník (API526) - Carregador .338 (API526) com 10 cartuchos - .338 10-lövedékes tár (API526) - .338 10発入り 弾倉 (API526) - 10발들이 .338 탄창 (API526) + .338 LM 10Rnd Mag (API526) + Ch. .338 LM 10Cps (API526) + Cargador de 10 balas de .338 LM (API526) + Magazynek .338 LM 10rd (API526) + Магазин из 10-ти .338 LM (API526) + .338 LM 10-Patronen-Magazin (API526) + .338 LM 10Rnd Mag (API526) + .338 LM 10náb. Zásobník (API526) + Carregador .338 LM (API526) com 10 cartuchos + .338 LM 10-lövedékes tár (API526) + .338 LM 10発入り 弾倉 (API526) + 10발들이 .338 LM 탄창 (API526) .338 10發 彈匣 (API526 穿甲燃燒彈) - .338 10发 弹匣 (API526 穿甲燃烧弹) - .338 10Rnd Mag (API526) + .338 LM 10发 弹匣 (API526 穿甲燃烧弹) + .338 LM 10Rnd Mag (API526) .338 AP @@ -2709,74 +3047,244 @@ Kalibre: .408 CheyTac (305gr)<br />Mermi: 7 - 12.7x99mm 5Rnd Mag - Ch. 12,7x99mm 5Cps - Cargador de 5 balas de 12.7x99mm - Magazynek 12,7x99mm 5rd + 12.7x99 mm 5Rnd Mag + Ch. 12,7x99 mm 5Cps + Cargador de 5 balas de 12.7x99 mm + Magazynek 12,7x99 mm 5rd Магазин из 5-ти 12,7x99 мм - 12,7x99mm 5-Patronen-Magazin - 12.7x99mm 5Rnd Mag - 12.7x99mm 5náb. Zásobník - Carregador 12.7x99mm com 5 cartuchos - 12,7x99mm 5-lövedékes tár - 12.7x99mm 5発入り 弾倉 - 5발들이 12.7x99mm 탄창 + 12,7x99 mm 5-Patronen-Magazin + 12.7x99 mm 5Rnd Mag + 12.7x99 mm 5náb. Zásobník + Carregador 12.7x99 mm com 5 cartuchos + 12,7x99 mm 5-lövedékes tár + 12.7x99 mm 5発入り 弾倉 + 5발들이 12.7x99 mm 탄창 12.7x99毫米 5發 彈匣 - 12.7x99mm 5发 弹匣 - 12.7x99mm 5Rnd Mag - - - 12.7mm - 12,7mm - 12.7mm - 12,7mm - 12,7 мм - 12,7mm - 12.7mm - 12.7mm - 12.7mm - 12,7mm - 12.7mm - 12.7mm - 12.7毫米 - 12.7mm - 12.7mm + 12.7x99 mm 5发 弹匣 + 12.7x99 mm 5Rnd Mag - Caliber: 12.7x99mm<br />Rounds: 5 - Calibre: 12,7x99mm<br />Cartouches: 5 - Calibre: 12.7x99mm<br />Balas: 5 - Kaliber: 12,7x99mm<br />Pociski: 5 + Caliber: 12.7x99 mm<br />Rounds: 5 + Calibre: 12,7x99 mm<br />Cartouches: 5 + Calibre: 12.7x99 mm<br />Balas: 5 + Kaliber: 12,7x99 mm<br />Pociski: 5 Калибр: 12,7x99 мм<br />Патронов: 5 - Kaliber: 12,7x99mm<br />Patronen: 5 - Calibro: 12.7x99mm<br />Munizioni: 5 - Ráže: 12.7x99mm<br />Nábojů: 5 - Calibre: 12.7x99mm<br/>Cartuchos: 5 - Kaliber: 12,7x99mm<br />Lövedékek: 5 - 口径: 12.7x99mm<br />装填数: 5 - 구경: 12.7x99mm<br />장탄수: 5 + Kaliber: 12,7x99 mm<br />Patronen: 5 + Calibro: 12.7x99 mm<br />Munizioni: 5 + Ráže: 12.7x99 mm<br />Nábojů: 5 + Calibre: 12.7x99 mm<br/>Cartuchos: 5 + Kaliber: 12,7x99 mm<br />Lövedékek: 5 + 口径: 12.7x99 mm<br />装填数: 5 + 구경: 12.7x99 mm<br />장탄수: 5 口徑: 12.7x99毫米<br />發數: 5 - 口径: 12.7x99mm<br />发数: 5 - Kalibre: 12.7x99mm<br />Mermi: 5 + 口径: 12.7x99 mm<br />发数: 5 + Kalibre: 12.7x99 mm<br />Mermi: 5 + + + 12.7x99 mm 10Rnd Mag + Ch. 12,7x99 mm 10Cps + Cargador de 10 balas de 12.7x99 mm + Magazynek 12,7x99 mm 10rd + Магазин из 10-ти 12,7x99 мм + 12,7x99 mm 10-Patronen-Magazin + 12.7x99 mm 10Rnd Mag + 12.7x99 mm 10náb. Zásobník + Carregador 12.7x99 mm com 10 cartuchos + 12,7x99 mm 10-lövedékes tár + 12.7x99 mm 10発入り 弾倉 + 10발들이 12.7x99 mm 탄창 + 12.7x99毫米 10發 彈匣 + 12.7x99 mm 10发 弹匣 + 12.7x99 mm 10Rnd Mag + + + Caliber: 12.7x99 mm<br />Rounds: 10 + Calibre: 12,7x99 mm<br />Cartouches: 10 + Calibre: 12.7x99 mm<br />Balas: 10 + Kaliber: 12,7x99 mm<br />Pociski: 10 + Калибр: 12,7x99 мм<br />Патронов: 10 + Kaliber: 12,7x99 mm<br />Patronen: 10 + Calibro: 12.7x99 mm<br />Munizioni: 10 + Ráže: 12.7x99 mm<br />Nábojů: 10 + Calibre: 12.7x99 mm<br/>Cartuchos: 10 + Kaliber: 12,7x99 mm<br />Lövedékek: 10 + 口径: 12.7x99 mm<br />装填数: 10 + 구경: 12.7x99 mm<br />장탄수: 10 + 口徑: 12.7x99毫米<br />發數: 10 + 口径: 12.7x99 mm<br />发数: 10 + Kalibre: 12.7x99 mm<br />Mermi: 10 + + + 12.7 mm + 12,7 mm + 12.7 mm + 12,7 mm + 12,7 мм + 12,7 mm + 12.7 mm + 12.7 mm + 12.7 mm + 12,7 mm + 12.7 mm + 12.7 mm + 12.7毫米 + 12.7 mm + 12.7 mm - 12.7x99mm API 5Rnd Mag - Ch. 12,7x99mm API 5Cps - Cargador de 5 balas de 12.7x99mm API - Magazynek 12,7x99mm API 5rd - 12.7x99mm API 5Rnd Mag + 12.7x99 mm API 5Rnd Mag + Ch. 12,7x99 mm API 5Cps + Cargador de 5 balas de 12.7x99 mm API + Magazynek 12,7x99 mm API 5rd + 12.7x99 mm API 5Rnd Mag Магазин из 5-ти 12,7x99 мм (бронебойно-зажигательные) - 12,7x99mm 5-Patronen-Magazin (API) - 12.7x99mm API 5náb. Zásobník - Carregador 12.7x99mm API com 5 cartuchos - 12,7x99mm 5-lövedékes tár (páncéltörő-gyújtó) - 12.7x99mm 5発入り焼夷徹甲弾 弾倉 - 5발들이 12.7x99mm 철갑소이탄 탄창 + 12,7x99 mm 5-Patronen-Magazin (API) + 12.7x99 mm API 5náb. Zásobník + Carregador 12.7x99 mm API com 5 cartuchos + 12,7x99 mm 5-lövedékes tár (páncéltörő-gyújtó) + 12.7x99 mm 5発入り焼夷徹甲弾 弾倉 + 5발들이 12.7x99 mm 철갑소이탄 탄창 12.7x99毫米 穿甲燃燒彈 5發 彈匣 - 12.7x99mm 穿甲燃烧弹 5发 弹匣 - 12.7x99mm API 5Rnd Mag + 12.7x99 mm 穿甲燃烧弹 5发 弹匣 + 12.7x99 mm API 5Rnd Mag - + + Caliber: 12.7x99 mm API<br />Rounds: 5 + Calibre: 12,7x99 mm API<br />Cartouches: 5 + Calibre: 12.7x99 mm API<br />Balas: 5 + Kaliber: 12,7x99 mm API<br />Pociski: 5 + Калибр: 12,7x99 мм бронебойно-зажигательные<br />Патронов: 5 + Kaliber:12,7x99 mm API<br />Patronen: 5 + Calibro: 12.7x99 mm API<br />Munizioni: 5 + Ráže: 12.7x99 mm API<br />Nábojů: 5 + Calibre: 12.7x99 mm API<br/>Cartuchos: 5 + Kaliber: 12,7x99 mm API<br />Lövedékek: 5 + 口径: 12.7x99 mm 焼夷徹甲弾<br />装填数: 5 + 구경: 12.7x99 mm 철갑소이탄<br />장탄수: 5 + 口徑: 12.7x99毫米 穿甲燃燒彈<br />發數: 5 + 口径: 12.7x99 mm 穿甲燃烧弹<br />发数: 5 + Kalibre: 12.7x99 mm API<br />Mermi: 5 + + + 12.7x99 mm API 10Rnd Mag + Ch. 12,7x99 mm API 10Cps + Cargador de 10 balas de 12.7x99 mm API + Magazynek 12,7x99 mm API 10rd + 12.7x99 mm API 10Rnd Mag + Магазин из 10-ти 12,7x99 мм (бронебойно-зажигательные) + 12,7x99 mm 10-Patronen-Magazin (API) + 12.7x99 mm API 10náb. Zásobník + Carregador 12.7x99 mm API com 10 cartuchos + 12,7x99 mm 10-lövedékes tár (páncéltörő-gyújtó) + 12.7x99 mm 10発入り焼夷徹甲弾 弾倉 + 10발들이 12.7x99 mm 철갑소이탄 탄창 + 12.7x99毫米 穿甲燃燒彈 10發 彈匣 + 12.7x99 mm 穿甲燃烧弹 10发 弹匣 + 12.7x99 mm API 10Rnd Mag + + + Caliber: 12.7x99 mm API<br />Rounds: 10 + Calibre: 12,7x99 mm API<br />Cartouches: 10 + Calibre: 12.7x99 mm API<br />Balas: 10 + Kaliber: 12,7x99 mm API<br />Pociski: 10 + Калибр: 12,7x99 мм бронебойно-зажигательные<br />Патронов: 10 + Kaliber:12,7x99 mm API<br />Patronen: 10 + Calibro: 12.7x99 mm API<br />Munizioni: 10 + Ráže: 12.7x99 mm API<br />Nábojů: 10 + Calibre: 12.7x99 mm API<br/>Cartuchos: 10 + Kaliber: 12,7x99 mm API<br />Lövedékek: 10 + 口径: 12.7x99 mm 焼夷徹甲弾<br />装填数: 10 + 구경: 12.7x99 mm 철갑소이탄<br />장탄수: 10 + 口徑: 12.7x99毫米 穿甲燃燒彈<br />發數: 10 + 口径: 12.7x99 mm 穿甲燃烧弹<br />发数: 10 + Kalibre: 12.7x99 mm API<br />Mermi: 10 + + + 12.7x99 mm 5Rnd Mag (AMAX) + Ch. 12,7x99 mm 5Cps (AMAX) + Cargador de 5 balas de 12.7x99 mm (AMAX) + Magazynek 12,7x99 mm 5rd (AMAX) + Магазин из 5-ти 12,7x99 мм (A-MAX) + 12,7x99 mm 5-Patronen-Magazin (AMAX) + 12.7x99 mm 5Rnd Mag (AMAX) + 12.7x99 mm 5náb. Zásobník (AMAX) + Carregador 12.7x99 mm (AMAX) com 5 cartuchos + 12,7x99 mm 5-lövedékes tár (AMAX) + 12.7x99 mm 5発入り 弾倉 (AMAX) + 5발들이 12.7x99 mm 탄창 (AMAX) + 12.7x99毫米 5發 彈匣 (AMAX 比賽專用彈) + 12.7x99 mm 5发 弹匣 (AMAX 比赛专用弹) + 12.7x99 mm 5Rnd Şarjör (AMAX) + + + Caliber: 12.7x99 mm (AMAX)<br />Rounds: 5 + Calibre: 12,7x99 mm (AMAX)<br />Cartouches: 5 + Calibre: 12.7x99 mm (AMAX)<br />Balas: 5 + Kaliber: 12,7x99 mm (AMAX)<br />Pociski: 5 + Калибр: 12,7x99 мм (A-MAX)<br />Патронов: 5 + Calibro: 12.7x99 mm (AMAX)<br />Munizioni: 5 + Kaliber:12,7x99 mm (AMAX)<br />Patronen: 5 + Ráže: 12.7x99 mm (AMAX)<br />Nábojů: 5 + Calibre: 12.7x99 mm (AMAX)<br/>Cartuchos: 5 + Kaliber: 12,7x99 mm (AMAX)<br />Lövedékek: 5 + 口径: 12.7x99 mm (AMAX)<br />装填数: 5 + 구경: 12.7x99 mm (AMAX)<br />장탄수: 5 + 口徑: 12.7x99毫米 (AMAX 比賽專用彈)<br />發數: 5 + 口径: 12.7x99 mm (AMAX 比赛专用弹)<br />发数: 5 + Kalibre: 12.7x99 mm (AMAX)<br />Mermi: 5 + + + 12.7x99 mm 10Rnd Mag (AMAX) + Ch. 12,7x99 mm 10Cps (AMAX) + Cargador de 10 balas de 12.7x99 mm (AMAX) + Magazynek 12,7x99 mm 10rd (AMAX) + Магазин из 10-ти 12,7x99 мм (A-MAX) + 12,7x99 mm 10-Patronen-Magazin (AMAX) + 12.7x99 mm 10Rnd Mag (AMAX) + 12.7x99 mm 10náb. Zásobník (AMAX) + Carregador 12.7x99 mm (AMAX) com 10 cartuchos + 12,7x99 mm 10-lövedékes tár (AMAX) + 12.7x99 mm 10発入り 弾倉 (AMAX) + 10발들이 12.7x99 mm 탄창 (AMAX) + 12.7x99毫米 10發 彈匣 (AMAX 比賽專用彈) + 12.7x99 mm 10发 弹匣 (AMAX 比赛专用弹) + 12.7x99 mm 10Rnd Şarjör (AMAX) + + + Caliber: 12.7x99 mm (AMAX)<br />Rounds: 10 + Calibre: 12,7x99 mm (AMAX)<br />Cartouches: 10 + Calibre: 12.7x99 mm (AMAX)<br />Balas: 10 + Kaliber: 12,7x99 mm (AMAX)<br />Pociski: 10 + Калибр: 12,7x99 мм (A-MAX)<br />Патронов: 10 + Calibro: 12.7x99 mm (AMAX)<br />Munizioni: 10 + Kaliber:12,7x99 mm (AMAX)<br />Patronen: 10 + Ráže: 12.7x99 mm (AMAX)<br />Nábojů: 10 + Calibre: 12.7x99 mm (AMAX)<br/>Cartuchos: 10 + Kaliber: 12,7x99 mm (AMAX)<br />Lövedékek: 10 + 口径: 12.7x99 mm (AMAX)<br />装填数: 10 + 구경: 12.7x99 mm (AMAX)<br />장탄수: 10 + 口徑: 12.7x99毫米 (AMAX 比賽專用彈)<br />發數: 10 + 口径: 12.7x99 mm (AMAX 比赛专用弹)<br />发数: 10 + Kalibre: 12.7x99 mm (AMAX)<br />Mermi: 10 + + + 12.7 mm + 12,7 mm + 12.7 mm + 12,7 mm + 12,7 мм + 12,7 mm + 12.7 mm + 12.7 mm + 12.7 mm + 12,7 mm + 12.7 mm + 12.7 mm + 12.7毫米 AMAX 比賽專用彈 + 12.7 mm AMAX 比赛专用弹 + 12.7 mm + + 12.7mm API 12,7mm API 12.7mm API @@ -2793,74 +3301,6 @@ 12.7mm 穿甲燃烧弹 12.7mm API - - Caliber: 12.7x99mm API<br />Rounds: 5 - Calibre: 12,7x99mm API<br />Cartouches: 5 - Calibre: 12.7x99mm API<br />Balas: 5 - Kaliber: 12,7x99mm API<br />Pociski: 5 - Калибр: 12,7x99 мм бронебойно-зажигательные<br />Патронов: 5 - Kaliber:12,7x99mm API<br />Patronen: 5 - Calibro: 12.7x99mm API<br />Munizioni: 5 - Ráže: 12.7x99mm API<br />Nábojů: 5 - Calibre: 12.7x99mm API<br/>Cartuchos: 5 - Kaliber: 12,7x99mm API<br />Lövedékek: 5 - 口径: 12.7x99mm 焼夷徹甲弾<br />装填数: 5 - 구경: 12.7x99mm 철갑소이탄<br />장탄수: 5 - 口徑: 12.7x99毫米 穿甲燃燒彈<br />發數: 5 - 口径: 12.7x99mm 穿甲燃烧弹<br />发数: 5 - Kalibre: 12.7x99mm API<br />Mermi: 5 - - - 12.7x99mm 5Rnd Mag (AMAX) - Ch. 12,7x99mm 5Cps (AMAX) - Cargador de 5 balas de 12.7x99mm (AMAX) - Magazynek 12,7x99mm 5rd (AMAX) - Магазин из 5-ти 12,7x99 мм (A-MAX) - 12,7x99mm 5-Patronen-Magazin (AMAX) - 12.7x99mm 5Rnd Mag (AMAX) - 12.7x99mm 5náb. Zásobník (AMAX) - Carregador 12.7x99mm (AMAX) com 5 cartuchos - 12,7x99mm 5-lövedékes tár (AMAX) - 12.7x99mm 5発入り 弾倉 (AMAX) - 5발들이 12.7x99mm 탄창 (AMAX) - 12.7x99毫米 5發 彈匣 (AMAX 比賽專用彈) - 12.7x99mm 5发 弹匣 (AMAX 比赛专用弹) - 12.7x99mm 5Rnd Şarjör (AMAX) - - - 12.7mm - 12,7mm - 12.7mm - 12,7mm - 12,7 мм - 12,7mm - 12.7mm - 12.7mm - 12.7mm - 12,7mm - 12.7mm - 12.7mm - 12.7毫米 AMAX 比賽專用彈 - 12.7mm AMAX 比赛专用弹 - 12.7mm - - - Caliber: 12.7x99mm (AMAX)<br />Rounds: 5 - Calibre: 12,7x99mm (AMAX)<br />Cartouches: 5 - Calibre: 12.7x99mm (AMAX)<br />Balas: 5 - Kaliber: 12,7x99mm (AMAX)<br />Pociski: 5 - Калибр: 12,7x99 мм (A-MAX)<br />Патронов: 5 - Calibro: 12.7x99mm (AMAX)<br />Munizioni: 5 - Kaliber:12,7x99mm (AMAX)<br />Patronen: 5 - Ráže: 12.7x99mm (AMAX)<br />Nábojů: 5 - Calibre: 12.7x99mm (AMAX)<br/>Cartuchos: 5 - Kaliber: 12,7x99mm (AMAX)<br />Lövedékek: 5 - 口径: 12.7x99mm (AMAX)<br />装填数: 5 - 구경: 12.7x99mm (AMAX)<br />장탄수: 5 - 口徑: 12.7x99毫米 (AMAX 比賽專用彈)<br />發數: 5 - 口径: 12.7x99mm (AMAX 比赛专用弹)<br />发数: 5 - Kalibre: 12.7x99mm (AMAX)<br />Mermi: 5 - [ACE] Ammo Supply Crate [ACE] Skrzynka z amunicją diff --git a/addons/captives/ACE_Settings.hpp b/addons/captives/ACE_Settings.hpp index 50d4c17aa7..f229d2385c 100644 --- a/addons/captives/ACE_Settings.hpp +++ b/addons/captives/ACE_Settings.hpp @@ -1,31 +1,14 @@ class ACE_Settings { class GVAR(allowHandcuffOwnSide) { - category = CSTRING(DisplayName); - displayName = CSTRING(ModuleSettings_handcuffSide_name); - description = CSTRING(ModuleSettings_handcuffSide_description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(requireSurrender) { - category = CSTRING(DisplayName); - displayName = CSTRING(ModuleSettings_requireSurrender_name); - description = CSTRING(ModuleSettings_requireSurrender_description); - typeName = "SCALAR"; - values[] = {ECSTRING(common,Disabled), CSTRING(SurrenderOnly), CSTRING(SurrenderOrNoWeapon)}; - value = 1; + movedToSQF = 1; }; class GVAR(allowSurrender) { - category = CSTRING(DisplayName); - displayName = CSTRING(ModuleSettings_allowSurrender_name); - description = CSTRING(ModuleSettings_allowSurrender_description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(requireSurrenderAi) { - category = CSTRING(DisplayName); - displayName = CSTRING(ModuleSettings_requireSurrenderAi_name); - description = CSTRING(ModuleSettings_requireSurrenderAi_description); - typeName = "BOOL"; - value = 0; + movedToSQF = 1; }; }; diff --git a/addons/captives/CfgEventHandlers.hpp b/addons/captives/CfgEventHandlers.hpp index 95453fe5d1..5e0d148c94 100644 --- a/addons/captives/CfgEventHandlers.hpp +++ b/addons/captives/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/captives/README.md b/addons/captives/README.md index 37c26db159..eed1408c72 100644 --- a/addons/captives/README.md +++ b/addons/captives/README.md @@ -5,10 +5,3 @@ Adds ability to handcuff and surrender. #### Items Added: `ACE_CableTie` - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf index 6adfef9dea..fc0880b794 100644 --- a/addons/captives/XEH_postInit.sqf +++ b/addons/captives/XEH_postInit.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" #include "\a3\ui_f\hpp\defineDIKCodes.inc" -["ace_settingsInitialized", { +["CBA_settingsInitialized", { // Hold on a little bit longer to ensure anims will work [{ GVAR(captivityEnabled) = true; diff --git a/addons/captives/XEH_preInit.sqf b/addons/captives/XEH_preInit.sqf index 641da1f5c8..61bd9788a3 100644 --- a/addons/captives/XEH_preInit.sqf +++ b/addons/captives/XEH_preInit.sqf @@ -8,4 +8,6 @@ PREP_RECOMPILE_END; GVAR(captivityEnabled) = false; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/captives/functions/fnc_addLoadCaptiveActions.sqf b/addons/captives/functions/fnc_addLoadCaptiveActions.sqf index d1ad8f603d..279ca0924e 100644 --- a/addons/captives/functions/fnc_addLoadCaptiveActions.sqf +++ b/addons/captives/functions/fnc_addLoadCaptiveActions.sqf @@ -22,4 +22,4 @@ private _statement = { [_player, _target, _vehicle] call FUNC(doLoadCaptive); }; -[_target call EFUNC(common,nearestVehiclesFreeSeat), _statement, _target] call EFUNC(interact_menu,createVehiclesActions) +[[_target, nil, true] call EFUNC(common,nearestVehiclesFreeSeat), _statement, _target] call EFUNC(interact_menu,createVehiclesActions) diff --git a/addons/captives/functions/fnc_canLoadCaptive.sqf b/addons/captives/functions/fnc_canLoadCaptive.sqf index 2129b36f5a..b1757884b7 100644 --- a/addons/captives/functions/fnc_canLoadCaptive.sqf +++ b/addons/captives/functions/fnc_canLoadCaptive.sqf @@ -34,7 +34,7 @@ if (isNull _target || {(vehicle _target) != _target} || {!(_target getVariable [ if (isNull _vehicle) then { // Looking at a captive unit, get nearest vehicle with valid seat: - _vehicle = (_target call EFUNC(common,nearestVehiclesFreeSeat)) param [0, objNull]; + _vehicle = ([_target, nil, true] call EFUNC(common,nearestVehiclesFreeSeat)) param [0, objNull]; } else { // We have a vehicle picked, make sure it has empty seats: if (_vehicle emptyPositions "cargo" == 0 && {_vehicle emptyPositions "gunner" == 0}) then { diff --git a/addons/captives/functions/fnc_doApplyHandcuffs.sqf b/addons/captives/functions/fnc_doApplyHandcuffs.sqf index 1731151ead..ad1ef3f2d6 100644 --- a/addons/captives/functions/fnc_doApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_doApplyHandcuffs.sqf @@ -21,6 +21,6 @@ params ["_unit", "_target"]; playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10]; -[QGVAR(setHandcuffed), [_target, true], [_target]] call CBA_fnc_targetEvent; +[QGVAR(setHandcuffed), [_target, true, _unit], [_target]] call CBA_fnc_targetEvent; _unit removeItem "ACE_CableTie"; diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf index 86d597aabe..700a68c42e 100644 --- a/addons/captives/functions/fnc_doEscortCaptive.sqf +++ b/addons/captives/functions/fnc_doEscortCaptive.sqf @@ -12,7 +12,7 @@ * The return value * * Example: - * [player, bob, true] call ACE_captives_fnc_doEscorteCaptive; + * [player, bob, true] call ACE_captives_fnc_doEscortCaptive; * * Public: No */ diff --git a/addons/captives/functions/fnc_doLoadCaptive.sqf b/addons/captives/functions/fnc_doLoadCaptive.sqf index e4e3b5f45b..7740610b6a 100644 --- a/addons/captives/functions/fnc_doLoadCaptive.sqf +++ b/addons/captives/functions/fnc_doLoadCaptive.sqf @@ -31,7 +31,7 @@ if (isNull _target || {(vehicle _target) != _target} || {!(_target getVariable [ if (isNull _vehicle) then { // Looking at a captive unit, get nearest vehicle with valid seat: - _vehicle = (_target call EFUNC(common,nearestVehiclesFreeSeat)) param [0, objNull]; + _vehicle = ([_target, nil, true] call EFUNC(common,nearestVehiclesFreeSeat)) param [0, objNull]; } else { // We have a vehicle picked, make sure it has empty seats: if (_vehicle emptyPositions "cargo" == 0 && {_vehicle emptyPositions "gunner" == 0}) then { diff --git a/addons/captives/functions/fnc_doRemoveHandcuffs.sqf b/addons/captives/functions/fnc_doRemoveHandcuffs.sqf index a5623535d2..3e9aac73e6 100644 --- a/addons/captives/functions/fnc_doRemoveHandcuffs.sqf +++ b/addons/captives/functions/fnc_doRemoveHandcuffs.sqf @@ -4,17 +4,18 @@ * Remove handcuffs from a target * * Arguments: - * 0: target + * 0: Caller + * 1: Target * * Return Value: * The return value * * Example: - * [bob, false] call ACE_captives_fnc_doRemoveHandcuffs + * [bob, bill] call ACE_captives_fnc_doRemoveHandcuffs * * Public: No */ params ["_unit", "_target"]; -[QGVAR(setHandcuffed), [_target, false], [_target]] call CBA_fnc_targetEvent; +[QGVAR(setHandcuffed), [_target, false, _unit], [_target]] call CBA_fnc_targetEvent; diff --git a/addons/captives/functions/fnc_handleGetIn.sqf b/addons/captives/functions/fnc_handleGetIn.sqf index 96a32031af..3fc2db1711 100644 --- a/addons/captives/functions/fnc_handleGetIn.sqf +++ b/addons/captives/functions/fnc_handleGetIn.sqf @@ -36,7 +36,7 @@ if (local _unit) then { _x params ["_xUnit", "", "", "_xTurretPath"]; if (_unit == _xUnit) exitWith {_turretPath = _xTurretPath}; } forEach (fullCrew (vehicle _unit)); - if (!(_turretPath isEqualTo [])) then { + if (_turretPath isNotEqualTo []) then { TRACE_1("Setting FFV Handcuffed Animation",_turretPath); [_unit, "ACE_HandcuffedFFV", 2] call EFUNC(common,doAnimation); [_unit, "ACE_HandcuffedFFV", 1] call EFUNC(common,doAnimation); diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index 5e0b634544..c0065438af 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -6,18 +6,19 @@ * Arguments: * 0: Unit * 1: True to take captive, false to release captive + * 2: Caller * * Return Value: * None * * Example: - * [bob, true] call ACE_captives_fnc_setHandcuffed; + * [bob, true, dave] call ACE_captives_fnc_setHandcuffed; * * Public: No */ -params ["_unit","_state"]; -TRACE_2("params",_unit,_state); +params ["_unit", "_state", ["_caller", objNull]]; +TRACE_3("params",_unit,_state,_caller); if (!local _unit) exitWith { WARNING("running setHandcuffed on remote unit"); @@ -41,6 +42,7 @@ 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); if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop [_unit, false] call FUNC(setSurrendered); @@ -81,6 +83,7 @@ if (_state) then { } 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); //remove AnimChanged EH private _animChangedEHID = _unit getVariable [QGVAR(handcuffAnimEHID), -1]; @@ -103,4 +106,4 @@ if (_state) then { }; //Global Event after changes: -["ace_captiveStatusChanged", [_unit, _state, "SetHandcuffed"]] call CBA_fnc_globalEvent; +["ace_captiveStatusChanged", [_unit, _state, "SetHandcuffed", _caller]] call CBA_fnc_globalEvent; diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index a9b4ef85a7..331a5ab231 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -45,6 +45,7 @@ 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); if (_unit == ACE_player) then { ["captive", [false, false, false, false, false, false, false, false, false, true]] call EFUNC(common,showHud); @@ -71,6 +72,7 @@ if (_state) then { } 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); //remove AnimChanged EH private _animChangedEHID = _unit getVariable [QGVAR(surrenderAnimEHID), -1]; diff --git a/addons/captives/initSettings.sqf b/addons/captives/initSettings.sqf new file mode 100644 index 0000000000..3a1fbfa6ed --- /dev/null +++ b/addons/captives/initSettings.sqf @@ -0,0 +1,33 @@ +private _category = format ["ACE %1", localize LSTRING(DisplayName)]; + +[ + QGVAR(allowHandcuffOwnSide), "CHECKBOX", + [LSTRING(ModuleSettings_handcuffSide_name), LSTRING(ModuleSettings_handcuffSide_description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(requireSurrender), "LIST", + [LSTRING(ModuleSettings_requireSurrender_name), LSTRING(ModuleSettings_requireSurrender_description)], + _category, + [[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(SurrenderOnly), LSTRING(SurrenderOrNoWeapon)], 1], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(allowSurrender), "CHECKBOX", + [LSTRING(ModuleSettings_allowSurrender_name), LSTRING(ModuleSettings_allowSurrender_description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(requireSurrenderAi), "CHECKBOX", + [LSTRING(ModuleSettings_requireSurrenderAi_name), LSTRING(ModuleSettings_requireSurrenderAi_description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; diff --git a/addons/cargo/CfgEden.hpp b/addons/cargo/CfgEden.hpp index 9144ba458b..4a64dee025 100644 --- a/addons/cargo/CfgEden.hpp +++ b/addons/cargo/CfgEden.hpp @@ -3,6 +3,18 @@ class Cfg3DEN { class AttributeCategories { class ace_attributes { class Attributes { + class GVAR(customName) { + displayName = CSTRING(customName_edenName); + tooltip = CSTRING(customName_edenDesc); + property = QGVAR(customName); + control = "Edit"; + + expression = QUOTE(_this setVariable [ARR_3(QQGVAR(customName), _value, true)];); + defaultValue = "''"; + + condition = "objectHasInventoryCargo - objectVehicle"; + typeName = "STRING"; + }; class GVAR(space) { displayName = CSTRING(space_edenName); tooltip = CSTRING(space_edenDesc); @@ -10,7 +22,7 @@ class Cfg3DEN { control = "Edit"; expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSpace);); - defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(space),0)); + defaultValue = QUOTE(GET_NUMBER(configOf _this >> QQGVAR(space),0)); validate = "number"; condition = "objectHasInventoryCargo"; @@ -24,7 +36,7 @@ class Cfg3DEN { // Expression only runs on the server, must handle actions for all machines and future JIPs (Why BI?!) expression = QUOTE([ARR_2(_this,_value)] call DFUNC(setSize);); - defaultValue = QUOTE(GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(size),-1)); + defaultValue = QUOTE(GET_NUMBER(configOf _this >> QQGVAR(size),-1)); validate = "number"; condition = "1-objectBrain"; diff --git a/addons/cargo/CfgEventHandlers.hpp b/addons/cargo/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/cargo/CfgEventHandlers.hpp +++ b/addons/cargo/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index ab41cac4db..1cbe96833b 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -356,8 +356,8 @@ class CfgVehicles { //Huron 20ft containers class Slingload_01_Base_F: Slingload_base_F { - GVAR(canLoad) = 0; - GVAR(size) = -1; + GVAR(canLoad) = 1; + GVAR(size) = 50; // Use same size value from 20ft containers for consistancy }; class B_Slingload_01_Cargo_F: Slingload_01_Base_F { // Huron Cargo GVAR(space) = 20; @@ -636,6 +636,15 @@ class CfgVehicles { GVAR(space) = 49; GVAR(size) = 50; }; + class Cargo_IDAP_base_F: Cargo_base_F {}; + class Land_Cargo20_IDAP_F: Cargo_IDAP_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + + GVAR(space) = 49; + GVAR(size) = 50; + }; class Land_Cargo40_blue_F: Cargo_base_F { class EventHandlers { diff --git a/addons/cargo/README.md b/addons/cargo/README.md index eda7079b7b..e506eda71f 100644 --- a/addons/cargo/README.md +++ b/addons/cargo/README.md @@ -2,11 +2,3 @@ ace_cargo ============ Adds cargo menu to vehicles and allows loading and unloading of cargo items. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [Glowbal](https://github.com/Glowbal) diff --git a/addons/cargo/XEH_PREP.hpp b/addons/cargo/XEH_PREP.hpp index ad22d5116f..aa1600b82d 100644 --- a/addons/cargo/XEH_PREP.hpp +++ b/addons/cargo/XEH_PREP.hpp @@ -3,6 +3,7 @@ PREP(addCargoVehiclesActions); PREP(canLoadItemIn); PREP(canUnloadItem); PREP(getCargoSpaceLeft); +PREP(getNameItem); PREP(getSizeItem); PREP(handleDeleted); PREP(handleDestroyed); @@ -13,6 +14,7 @@ PREP(moduleSettings); PREP(onMenuOpen); PREP(paradropItem); PREP(removeCargoItem); +PREP(renameObject); PREP(setSize); PREP(setSpace); PREP(startLoadIn); diff --git a/addons/cargo/XEH_postInit.sqf b/addons/cargo/XEH_postInit.sqf index 7ea978dc73..1a7fbbc4fb 100644 --- a/addons/cargo/XEH_postInit.sqf +++ b/addons/cargo/XEH_postInit.sqf @@ -1,7 +1,17 @@ #include "script_component.hpp" ["ace_addCargo", {_this call FUNC(addCargoItem)}] call CBA_fnc_addEventHandler; -[QGVAR(paradropItem), {_this call FUNC(paradropItem)}] call CBA_fnc_addEventHandler; +[QGVAR(paradropItem), { + params ["_item", "_vehicle"]; + + private _unloaded = [_item, _vehicle] call FUNC(paradropItem); + + if (_unloaded && {GVAR(openAfterUnload) in [2, 3]}) then { + GVAR(interactionVehicle) = _vehicle; + GVAR(interactionParadrop) = true; + createDialog QGVAR(menu); + }; +}] call CBA_fnc_addEventHandler; ["ace_loadCargo", { params ["_item", "_vehicle"]; @@ -11,8 +21,8 @@ // Show hint as feedback private _hint = [LSTRING(LoadingFailed), LSTRING(LoadedItem)] select _loaded; - private _itemName = getText (configFile >> "CfgVehicles" >> typeOf _item >> "displayName"); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _itemName = [_item, true] call FUNC(getNameItem); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured); @@ -28,18 +38,17 @@ private _unloaded = [_item, _vehicle, _unloader] call FUNC(unloadItem); //returns true if sucessful - private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item}; - // Show hint as feedback private _hint = [LSTRING(UnloadingFailed), LSTRING(UnloadedItem)] select _unloaded; - private _itemName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName"); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _itemName = [_item, true] call FUNC(getNameItem); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[_hint, _itemName, _vehicleName], 3.0] call EFUNC(common,displayTextStructured); - if (_unloaded) then { - // Invoke listenable event - ["ace_cargoUnloaded", [_item, _vehicle]] call CBA_fnc_globalEvent; + if (_unloaded && {GVAR(openAfterUnload) in [1, 3]}) then { + GVAR(interactionVehicle) = _vehicle; + GVAR(interactionParadrop) = false; + createDialog QGVAR(menu); }; // TOOO maybe drag/carry the unloaded item? @@ -70,7 +79,7 @@ GVAR(vehicleAction) = [ { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; GVAR(enable) && - {(_target getVariable [QGVAR(hasCargo), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(hasCargo)) == 1])} && + {(_target getVariable [QGVAR(hasCargo), getNumber (configOf _target >> QGVAR(hasCargo)) == 1])} && {locked _target < 2} && {([_player, _target] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} && {alive _target} && @@ -78,28 +87,46 @@ GVAR(vehicleAction) = [ } ] call EFUNC(interact_menu,createAction); -GVAR(objectAction) = [ - QGVAR(load), localize LSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa", - { - params ["_target", "_player"]; - [_player, _target] call FUNC(startLoadIn); - }, - { - //IGNORE_PRIVATE_WARNING ["_target", "_player"]; - GVAR(enable) && - {(_target getVariable [QGVAR(canLoad), getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(canLoad))]) in [true, 1]} && - {locked _target < 2} && - {alive _target} && - {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} && - {((nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) findIf { - private _hasCargoConfig = 1 == getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(hasCargo)); - private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; - (_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && {alive _x} && {locked _x < 2} && - {([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} - }) > -1} - }, - LINKFUNC(addCargoVehiclesActions) -] call EFUNC(interact_menu,createAction); +GVAR(objectActions) = [ + [QGVAR(renameObject), LELSTRING(common,rename), "", //TODO: add icon, maybe a pencil couldn't find it before. + { + //IGNORE_PRIVATE_WARNING ["_target", "_player"]; + GVAR(interactionVehicle) = _target; + createDialog QGVAR(renameMenu); + }, + { + //IGNORE_PRIVATE_WARNING ["_target", "_player"]; + GVAR(enable) && + {GVAR(enableRename)} && + {(_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad))]) in [true, 1]} && + {alive _target} && + {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} && + {!((typeOf _target) in ["ACE_Wheel", "ACE_Track"])} && // Exclude Wheel and Track + {!(_target iskindOf "Land_CanisterFuel_F")} // Exclude Fuel Canisters + } + ] call EFUNC(interact_menu,createAction), + [QGVAR(load), localize LSTRING(loadObject), "a3\ui_f\data\IGUI\Cfg\Actions\loadVehicle_ca.paa", + { + params ["_target", "_player"]; + [_player, _target] call FUNC(startLoadIn); + }, + { + //IGNORE_PRIVATE_WARNING ["_target", "_player"]; + GVAR(enable) && + {(_target getVariable [QGVAR(canLoad), getNumber (configOf _target >> QGVAR(canLoad))]) in [true, 1]} && + {locked _target < 2} && + {alive _target} && + {[_player, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} && + {((nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) findIf { + private _hasCargoConfig = 1 == getNumber (configOf _x >> QGVAR(hasCargo)); + private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; + (_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && {alive _x} && {locked _x < 2} && + {([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} + }) > -1} + }, + LINKFUNC(addCargoVehiclesActions) + ] call EFUNC(interact_menu,createAction) +]; // find all remaining configured classes and init them, see XEH_preStart.sqf private _vehicleClassesAddAction = call (uiNamespace getVariable [QGVAR(initializedVehicleClasses), {[]}]); @@ -110,7 +137,10 @@ GVAR(initializedVehicleClasses) append _vehicleClassesAddAction; private _objectClassesAddAction = call (uiNamespace getVariable [QGVAR(initializedItemClasses), {[]}]); { - [_x, 0, ["ACE_MainActions"], GVAR(objectAction)] call EFUNC(interact_menu,addActionToClass); + private _objectClass = _x; + { + [_objectClass, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToClass); + } forEach GVAR(objectActions); } forEach _objectClassesAddAction; GVAR(initializedItemClasses) append _objectClassesAddAction; diff --git a/addons/cargo/config.cpp b/addons/cargo/config.cpp index 31f01ffd72..2bdb3c7e65 100644 --- a/addons/cargo/config.cpp +++ b/addons/cargo/config.cpp @@ -19,3 +19,4 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "menu.hpp" +#include "renameMenu.hpp" diff --git a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf index d3a66794db..2bec4f4df3 100644 --- a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf +++ b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf @@ -23,7 +23,7 @@ private _statement = { }; private _vehicles = (nearestObjects [_target, GVAR(cargoHolderTypes), (MAX_LOAD_DISTANCE + 10)]) select { - private _hasCargoConfig = 1 == getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(hasCargo)); + private _hasCargoConfig = 1 == getNumber (configOf _x >> QGVAR(hasCargo)); private _hasCargoPublic = _x getVariable [QGVAR(hasCargo), false]; (_hasCargoConfig || {_hasCargoPublic}) && {_x != _target} && {alive _x} && {locked _x < 2} && {([_target, _x] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} diff --git a/addons/cargo/functions/fnc_canLoadItemIn.sqf b/addons/cargo/functions/fnc_canLoadItemIn.sqf index f7bc696d35..469dc45c9d 100644 --- a/addons/cargo/functions/fnc_canLoadItemIn.sqf +++ b/addons/cargo/functions/fnc_canLoadItemIn.sqf @@ -21,7 +21,7 @@ params [["_item", "", [objNull,""]], "_vehicle", ["_ignoreInteraction", false]]; if ((!_ignoreInteraction) && {speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}}) exitWith {TRACE_1("vehicle not stable",_vehicle); false}; -if (_item isEqualType objNull && {{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith { +if (_item isEqualType objNull && {{alive _x && {getText (configOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith { TRACE_1("item is occupied",_item); false }; diff --git a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf index d9452d4b01..b03108066d 100644 --- a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf +++ b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf @@ -18,4 +18,4 @@ params ["_object"]; // TRACE_1("params",_object); -(_object getVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(space))]) max 0 +(_object getVariable [QGVAR(space), getNumber (configOf _object >> QGVAR(space))]) max 0 diff --git a/addons/cargo/functions/fnc_getNameItem.sqf b/addons/cargo/functions/fnc_getNameItem.sqf new file mode 100644 index 0000000000..ac97dd51dc --- /dev/null +++ b/addons/cargo/functions/fnc_getNameItem.sqf @@ -0,0 +1,32 @@ +#include "script_component.hpp" +/* + * Author: JasperRab + * Gets the name of the item, and alternatively the custom name if requested and available. + * + * Arguments: + * 0: Target + * 1: Add custom name part (default: false) + * + * Return Value: + * Item Name + * + * Example: + * [crate_7] call ace_cargo_fnc_getNameItem + * + * Public: Yes + */ + +params ["_object", ["_addCustomPart", false]]; + +private _class = if (_object isEqualType "") then {_object} else {typeOf _object}; +private _displayName = getText (configFile >> "CfgVehicles" >> _class >> "displayName"); + +if (_addCustomPart && {!(_object isEqualType "")}) then { + private _customPart = _object getVariable [QGVAR(customName), ""]; + + if (_customPart isNotEqualTo "") then { + _displayName = _displayName + " [" + _customPart + "]"; + }; +}; + +_displayName diff --git a/addons/cargo/functions/fnc_initObject.sqf b/addons/cargo/functions/fnc_initObject.sqf index 611e3e6391..0df277c520 100644 --- a/addons/cargo/functions/fnc_initObject.sqf +++ b/addons/cargo/functions/fnc_initObject.sqf @@ -41,9 +41,13 @@ if (_object getVariable [QGVAR(initObject),false]) exitWith {}; if (_canLoadConfig) then { GVAR(initializedItemClasses) pushBack _type; TRACE_1("Adding load cargo action to class", _type); - [_type, 0, ["ACE_MainActions"], GVAR(objectAction)] call EFUNC(interact_menu,addActionToClass); + { + [_type, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToClass); + } forEach GVAR(objectActions); } else { _object setVariable [QGVAR(initObject),true]; TRACE_1("Adding load cargo action to object", _object); - [_object, 0, ["ACE_MainActions"], GVAR(objectAction)] call EFUNC(interact_menu,addActionToObject); + { + [_object, 0, ["ACE_MainActions"], _x] call EFUNC(interact_menu,addActionToObject); + } forEach GVAR(objectActions); }; diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index 60f204cb75..dac28a5ac9 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -76,7 +76,7 @@ if (_vehicle isKindOf "Air") then { private _turretPath = _player call CBA_fnc_turretPath; (_player == (driver _target)) || // pilot {(getNumber (([_target, _turretPath] call CBA_fnc_getTurret) >> "isCopilot")) == 1} || // coPilot - {_turretPath in (getArray (configFile >> "CfgVehicles" >> (typeOf _target) >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config + {_turretPath in (getArray (configOf _target >> QGVAR(loadmasterTurrets)))}} // loadMaster turret from config }; private _statement = { //IGNORE_PRIVATE_WARNING ["_target", "_player"]; diff --git a/addons/cargo/functions/fnc_onMenuOpen.sqf b/addons/cargo/functions/fnc_onMenuOpen.sqf index d611d18ff2..bc56c0fb96 100644 --- a/addons/cargo/functions/fnc_onMenuOpen.sqf +++ b/addons/cargo/functions/fnc_onMenuOpen.sqf @@ -44,7 +44,7 @@ if (GVAR(interactionParadrop)) then { lbClear _ctrl; { private _class = if (_x isEqualType "") then {_x} else {typeOf _x}; - private _displayName = getText (configfile >> "CfgVehicles" >> _class >> "displayName"); + private _displayName = [_x, true] call FUNC(getNameItem); if (GVAR(interactionParadrop)) then { _ctrl lbAdd format ["%1 (%2s)", _displayName, GVAR(paradropTimeCoefficent) * ([_class] call FUNC(getSizeItem))]; } else { diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index 4c873d189e..707ae42b69 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -38,75 +38,74 @@ TRACE_1("",_distBehind); private _posBehindVehicleAGL = _vehicle modelToWorld [0, _distBehind, -2]; -private _itemObject = if (_item isEqualType objNull) then { - detach _item; +private _object = _item; +if (_item isEqualType objNull) then { + detach _object; // hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly // do both on server to ensure they are executed in the correct order - [QGVAR(serverUnload), [_item, _posBehindVehicleAGL]] call CBA_fnc_serverEvent; - _item + [QGVAR(serverUnload), [_object, _posBehindVehicleAGL]] call CBA_fnc_serverEvent; } else { - private _newItem = createVehicle [_item, _posBehindVehicleAGL, [], 0, "NONE"]; - _newItem setPosASL (AGLtoASL _posBehindVehicleAGL); - _newItem + _object = createVehicle [_item, _posBehindVehicleAGL, [], 0, "NONE"]; + _object setPosASL (AGLtoASL _posBehindVehicleAGL); }; -_itemObject setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5)); +_object setVelocity ((velocity _vehicle) vectorAdd ((vectorNormalized (vectorDir _vehicle)) vectorMultiply -5)); // open parachute and ir light effect [{ - params ["_item"]; + params ["_object"]; - if (isNull _item || {getPos _item select 2 < 1}) exitWith {}; + if (isNull _object || {getPos _object select 2 < 1}) exitWith {}; private _parachute = createVehicle ["B_Parachute_02_F", [0,0,0], [], 0, "CAN_COLLIDE"]; // cannot use setPos on parachutes without them closing down - _parachute attachTo [_item, [0,0,0]]; + _parachute attachTo [_object, [0,0,0]]; detach _parachute; - private _velocity = velocity _item; + private _velocity = velocity _object; - _item attachTo [_parachute, [0,0,1]]; + _object attachTo [_parachute, [0,0,1]]; _parachute setVelocity _velocity; - if ((GVAR(disableParadropEffectsClasstypes) findIf {_item isKindOf _x}) == -1) then { + if ((GVAR(disableParadropEffectsClasstypes) findIf {_object isKindOf _x}) == -1) then { private _light = "Chemlight_yellow" createVehicle [0,0,0]; - _light attachTo [_item, [0,0,0]]; + _light attachTo [_object, [0,0,0]]; }; -}, [_itemObject], 0.7] call CBA_fnc_waitAndExecute; +}, [_object], 0.7] call CBA_fnc_waitAndExecute; // smoke effect when crate landed [{ - (_this select 0) params ["_item"]; + (_this select 0) params ["_object"]; - if (isNull _item) exitWith { + if (isNull _object) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; }; - if (getPos _item select 2 < 1) then { - if ((GVAR(disableParadropEffectsClasstypes) findIf {_item isKindOf _x}) == -1) then { + if (getPos _object select 2 < 1) then { + if ((GVAR(disableParadropEffectsClasstypes) findIf {_object isKindOf _x}) == -1) then { private _smoke = "SmokeshellYellow" createVehicle [0,0,0]; - _smoke attachTo [_item, [0,0,0]]; + _smoke attachTo [_object, [0,0,0]]; }; [_this select 1] call CBA_fnc_removePerFrameHandler; }; -}, 1, [_itemObject]] call CBA_fnc_addPerFrameHandler; +}, 1, [_object]] call CBA_fnc_addPerFrameHandler; if (_showHint) then { [ [ LSTRING(UnloadedItem), - getText (configFile >> "CfgVehicles" >> typeOf _itemObject >> "displayName"), - getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName") + [_object, true] call FUNC(getNameItem), + getText (configOf _vehicle >> "displayName") ], 3 ] call EFUNC(common,displayTextStructured); }; // Invoke listenable event -["ace_cargoUnloaded", [_item, _vehicle, "paradrop"]] call CBA_fnc_globalEvent; +["ace_cargoUnloaded", [_object, _vehicle, "paradrop"]] call CBA_fnc_globalEvent; true diff --git a/addons/cargo/functions/fnc_renameObject.sqf b/addons/cargo/functions/fnc_renameObject.sqf new file mode 100644 index 0000000000..e935620048 --- /dev/null +++ b/addons/cargo/functions/fnc_renameObject.sqf @@ -0,0 +1,27 @@ +#include "script_component.hpp" +/* + * Author: JasperRab + * Renames object. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_cargo_fnc_renameObject + * + * Public: Yes + */ + +private _display = uiNamespace getVariable QGVAR(menuDisplay); +if (isNil "_display") exitWith {}; + +private _ctrlEditText = ctrlText 100; +if (_ctrlEditText isEqualTo "") then { // custom name has been removed + [LSTRING(clearedCustomName), 3] call EFUNC(common,displayTextStructured); +} else { + [[LSTRING(renamedObject), _ctrlEditText], 3] call EFUNC(common,displayTextStructured); +}; +GVAR(interactionVehicle) setVariable [QGVAR(customName), _ctrlEditText, true]; diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 7cc7923696..b84ecd4df2 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -42,13 +42,13 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then { GVAR(loadTimeCoefficient) * _size, [_object, _vehicle], { - TRACE_1("load finish",_this); + TRACE_1("load finish",_this); [objNull, _this select 0 select 0, true] call EFUNC(common,claim); ["ace_loadCargo", _this select 0] call CBA_fnc_localEvent; }, { TRACE_1("load fail",_this); - [objNull, _this select 0 select 0, true] call EFUNC(common,claim) + [objNull, _this select 0 select 0, true] call EFUNC(common,claim); }, localize LSTRING(LoadingItem), { @@ -60,8 +60,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then { ] call EFUNC(common,progressBar); _return = true; } else { - private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName"); - + private _displayName = [_object, true] call FUNC(getNameItem); [[LSTRING(LoadingFailed), _displayName], 3] call EFUNC(common,displayTextStructured); }; diff --git a/addons/cargo/functions/fnc_startUnload.sqf b/addons/cargo/functions/fnc_startUnload.sqf index 5e7ada82c5..aa05b9f929 100644 --- a/addons/cargo/functions/fnc_startUnload.sqf +++ b/addons/cargo/functions/fnc_startUnload.sqf @@ -77,7 +77,7 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then localize LSTRING(UnloadingItem), { (_this select 0) params ["_item", "_target", "_player"]; - + (alive _target) && {locked _target < 2} && {([_player, _target] call EFUNC(interaction,getInteractionDistance)) < MAX_LOAD_DISTANCE} @@ -86,8 +86,7 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then ["isNotSwimming"] ] call EFUNC(common,progressBar); } else { - private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item}; - private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName"); + private _displayName = [_item, true] call FUNC(getNameItem); [[LSTRING(UnloadingFailed), _displayName], 3] call EFUNC(common,displayTextStructured); }; diff --git a/addons/cargo/functions/fnc_unloadItem.sqf b/addons/cargo/functions/fnc_unloadItem.sqf index 6f0f97cb43..94d94276ff 100644 --- a/addons/cargo/functions/fnc_unloadItem.sqf +++ b/addons/cargo/functions/fnc_unloadItem.sqf @@ -47,14 +47,19 @@ private _space = [_vehicle] call FUNC(getCargoSpaceLeft); private _itemSize = [_item] call FUNC(getSizeItem); _vehicle setVariable [QGVAR(space), (_space + _itemSize), true]; -if (_item isEqualType objNull) then { - detach _item; +private _object = _item; +if (_object isEqualType objNull) then { + detach _object; // hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly // do both on server to ensure they are executed in the correct order - [QGVAR(serverUnload), [_item, _emptyPosAGL]] call CBA_fnc_serverEvent; + [QGVAR(serverUnload), [_object, _emptyPosAGL]] call CBA_fnc_serverEvent; } else { - private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, "NONE"]; - _newItem setPosASL (AGLtoASL _emptyPosAGL); + _object = createVehicle [_item, _emptyPosAGL, [], 0, "NONE"]; + _object setPosASL (AGLtoASL _emptyPosAGL); + + [QEGVAR(common,fixCollision), _object] call CBA_fnc_localEvent; + [QEGVAR(common,fixPosition), _object] call CBA_fnc_localEvent; }; - +// Invoke listenable event +["ace_cargoUnloaded", [_object, _vehicle, "unload"]] call CBA_fnc_globalEvent; true diff --git a/addons/cargo/functions/fnc_validateCargoSpace.sqf b/addons/cargo/functions/fnc_validateCargoSpace.sqf index b83ccfe93a..4f996a30aa 100644 --- a/addons/cargo/functions/fnc_validateCargoSpace.sqf +++ b/addons/cargo/functions/fnc_validateCargoSpace.sqf @@ -34,4 +34,4 @@ if (count _loaded != count _newLoaded) then { _vehicle setVariable [QGVAR(loaded), _newLoaded, true]; }; -_vehicle setVariable [QGVAR(space), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true]; +_vehicle setVariable [QGVAR(space), getNumber (configOf _vehicle >> QGVAR(space)) - _totalSpaceOccupied, true]; diff --git a/addons/cargo/initSettings.sqf b/addons/cargo/initSettings.sqf index cbf0a121e5..cf40c55beb 100644 --- a/addons/cargo/initSettings.sqf +++ b/addons/cargo/initSettings.sqf @@ -5,7 +5,7 @@ true, true, {[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(loadTimeCoefficient), "SLIDER", @@ -14,7 +14,7 @@ [0, 10, 5, 1], true, {[QGVAR(loadTimeCoefficient), _this, true] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(paradropTimeCoefficent), "SLIDER", @@ -23,4 +23,22 @@ [0, 10, 2.5, 1], true, {[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(openAfterUnload), "LIST", + [LSTRING(openAfterUnload), LSTRING(openAfterUnload_description)], + [LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)], + [[0, 1, 2, 3], [ELSTRING(common,never), LSTRING(unloadObject), LSTRING(paradropButton), ELSTRING(common,both)], 0], + false, + {[QGVAR(openAfterUnload), _this, true] call EFUNC(common,cbaSettings_settingChanged)} +] call CBA_fnc_addSetting; + +[ + QGVAR(enableRename), "CHECKBOX", + [LSTRING(ModuleSettings_enableRename), LSTRING(ModuleSettings_enableRename_Description)], + [LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)], + true, + false, + {[QGVAR(enableRename), _this, true] call EFUNC(common,cbaSettings_settingChanged)} +] call CBA_fnc_addSetting; diff --git a/addons/cargo/menu.hpp b/addons/cargo/menu.hpp index 7496298371..a945f6e94c 100644 --- a/addons/cargo/menu.hpp +++ b/addons/cargo/menu.hpp @@ -2,11 +2,11 @@ class GVAR(menu) { idd = 314614; - movingEnable = true; + movingEnable = 1; onLoad = QUOTE([_this select 0] call FUNC(onMenuOpen)); onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuDisplay)),nil)];); class controlsBackground { - class HeaderBackground: ACE_gui_backgroundBase{ + class HeaderBackground: ACE_gui_backgroundBase { idc = -1; SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; diff --git a/addons/cargo/renameMenu.hpp b/addons/cargo/renameMenu.hpp new file mode 100644 index 0000000000..af54026e70 --- /dev/null +++ b/addons/cargo/renameMenu.hpp @@ -0,0 +1,85 @@ +#include "\z\ace\addons\common\define.hpp" + +class GVAR(renameMenu) { + idd = 314615; + movingEnable = 0; + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuDisplay)),_this select 0)];); + onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuDisplay)),nil)];); + class controlsBackground { + class HeaderBackground: ACE_gui_backgroundBase { + idc = -1; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + text = "#(argb,8,8,3)color(0,0,0,0)"; + }; + class CenterBackground: HeaderBackground { + y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + h = "2.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + text = "#(argb,8,8,3)color(0,0,0,0.8)"; + colorText[] = {0, 0, 0, "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + colorBackground[] = {0,0,0,"(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + }; + }; + + class controls { + class HeaderName { + idc = 1; + type = CT_STATIC; + x = "13 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "13 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + style = ST_LEFT + ST_SHADOW; + font = "RobotoCondensed"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {0.95, 0.95, 0.95, 0.75}; + colorBackground[] = {"(profilenamespace getVariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getVariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getVariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getVariable ['GUI_BCG_RGB_A',0.9])"}; + text = CSTRING(renameObjectUI); + }; + class edit: ACE_gui_editBase { + onLoad = QUOTE((_this select 0) ctrlSetText (GVAR(interactionVehicle) getVariable [ARR_2(QUOTE(QGVAR(customName)), '')])); + idc = 100; + canModify = 1; + x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "2.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "12.8 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + SizeEx = "1.5 * (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + }; + class btnCancel: ACE_gui_buttonBase { + text = "$STR_DISP_CANCEL"; + idc = 11; + x = "13.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + y = "3.9 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; + w = "5 * (((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)"; + animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)"; + animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)"; + animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; + animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; + color[] = {1, 1, 1, 1}; + color2[] = {0,0,0, 1}; + colorBackgroundFocused[] = {1,1,1,1}; + colorBackground[] = {1,1,1,1}; + colorbackground2[] = {1,1,1,1}; + colorDisabled[] = {1,1,1,1}; + colorFocused[] = {0,0,0,1}; + periodFocus = 1; + periodOver = 1; + action = QUOTE(closeDialog 0); + }; + class btnSave: btnCancel { + text = ECSTRING(Common,Save); + idc = 12; + x = "20.9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; + action = QUOTE(closeDialog 1; call FUNC(renameObject)); + }; + }; +}; diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 9e6e708e39..d1cb26a406 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -33,6 +33,26 @@ 卸载 Boşalt + + Renamed to:<br/>%1 + 名前を次に変更:<br/>%1 + + + Custom name has been cleared. + カスタム名が削除されました。 + + + Set New Name: + 新しい名前: + + + Enable Rename Action + 名前変更を有効化 + + + Enables the rename action for renamable objects. + 名前変更が可能なオブジェクトに対して、名前変更動作を有効化します。 + Cargo Fracht @@ -239,6 +259,14 @@ %1<br/>无法被卸载 %1<br/> kargo boşaltılamadı + + Custom Name + カスタム名 + + + Set a custom cargo name used in the cargo interface. + カーゴ欄で使われるカスタム名を設定します。 + Cargo Space Frachtraum @@ -387,5 +415,15 @@ Upravuje jak dlouho nakládají/vykládání trvá.\nVýsledkem je čas v sekundách - velikost objektu vynásobená touto hodnotou. Modifica el tiempo de carga/descarga de objetos.\n El Tiempo en segundos, es el tamño del objeto multiplicado por este valor. + + Reopen Cargo Menu + Kargo Menüsünü Tekrar Aç + カーゴ メニューを再度開く + + + Reopen the Cargo Menu after successful unload. + Başarılı bir yük indirmeden sonra Kargo Menüsünü tekrar göster. + カーゴを降ろした後に再びカーゴ メニューを開きます。 + diff --git a/addons/chemlights/CfgEventHandlers.hpp b/addons/chemlights/CfgEventHandlers.hpp index 4a25dcc26e..9f522ca135 100644 --- a/addons/chemlights/CfgEventHandlers.hpp +++ b/addons/chemlights/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/chemlights/CfgVehicles.hpp b/addons/chemlights/CfgVehicles.hpp index 02856b99e7..e01fb79b87 100644 --- a/addons/chemlights/CfgVehicles.hpp +++ b/addons/chemlights/CfgVehicles.hpp @@ -9,11 +9,8 @@ class CfgVehicles { class ACE_Chemlights { displayName = CSTRING(Action_Chemlights); icon = "\a3\ui_f\data\gui\cfg\Hints\chemlights_ca.paa"; - condition = QUOTE(count ([ACE_player] call FUNC(getShieldComponents)) > 0); - statement = "true"; exceptions[] = {"isNotDragging", "isNotSwimming", "notOnMap", "isNotInside", "isNotSitting"}; - insertChildren = QUOTE(_this call DFUNC(compileChemlightMenu)); - showDisabled = 0; + insertChildren = QUOTE(call DFUNC(compileChemlightMenu)); }; }; }; diff --git a/addons/chemlights/README.md b/addons/chemlights/README.md index a4b734b0d6..e35737f00c 100644 --- a/addons/chemlights/README.md +++ b/addons/chemlights/README.md @@ -2,10 +2,3 @@ ace_chemlights ============ Enhances chemlights and makes them more realistic. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [voiper](https://github.com/voiperr) diff --git a/addons/chemlights/functions/fnc_initIR.sqf b/addons/chemlights/functions/fnc_initIR.sqf index 29532f41f1..b6be8cf5fe 100644 --- a/addons/chemlights/functions/fnc_initIR.sqf +++ b/addons/chemlights/functions/fnc_initIR.sqf @@ -17,7 +17,7 @@ params ["_dummy"]; -private _chemlightClass = getText (configFile >> "CfgVehicles" >> typeOf _dummy >> "ACE_Attachable"); +private _chemlightClass = getText (configOf _dummy >> "ACE_Attachable"); private _config = configFile >> "CfgAmmo" >> _chemlightClass; private _delay = getNumber (_config >> "explosionTime"); private _lifeTime = getNumber (_config >> "timeToLive"); diff --git a/addons/chemlights/stringtable.xml b/addons/chemlights/stringtable.xml index 86deea0380..c1c6c930d8 100644 --- a/addons/chemlights/stringtable.xml +++ b/addons/chemlights/stringtable.xml @@ -49,23 +49,6 @@ %1<br/>Preparado %1<br/> Hazırlandı - - No inventory space - Kein Platz im Inventar - Sin espacio en inventario - Brak miejsca w ekwipunku - Pas de place dans l'inventaire - Nedostatek místa v inventáři - Sem espaço no inventário - Nessuno spazio nell'inventario - Nincs több hely - В инвентаре нет места - インベントリに空きがありません - 소지품 공간이 없음 - 已無存放空間 - 已无存放空间 - Envanter de alan yok - [ACE] Chemlights [ACE] ケミライト diff --git a/addons/common/ACE_Settings.hpp b/addons/common/ACE_Settings.hpp index 06cf6678e6..bc607e357e 100644 --- a/addons/common/ACE_Settings.hpp +++ b/addons/common/ACE_Settings.hpp @@ -17,29 +17,13 @@ class ACE_Settings { * }; */ class GVAR(checkPBOsAction) { - category = CSTRING(DisplayName); - value = 0; - typeName = "SCALAR"; - isClientSettable = 0; - displayName = CSTRING(CheckPBOsAction); - description = CSTRING(CheckPBOsActionDesc); - values[] = {CSTRING(CheckPBO_Action_WarnOnce), CSTRING(CheckPBO_Action_WarnPerm), CSTRING(CheckPBO_Action_Kick)}; + movedToSQF = 1; }; class GVAR(checkPBOsCheckAll) { - category = CSTRING(DisplayName); - value = 0; - typeName = "BOOL"; - isClientSettable = 0; - displayName = CSTRING(CheckPBOsCheckAll); - description = CSTRING(CheckPBOsCheckAllDesc); + movedToSQF = 1; }; class GVAR(checkPBOsWhitelist) { - category = CSTRING(DisplayName); - value = "[]"; - typeName = "STRING"; - isClientSettable = 0; - displayName = CSTRING(CheckPBOsWhitelist); - description = CSTRING(CheckPBOsWhitelistDesc); + movedToSQF = 1; }; /*class GVAR(enableNumberHotkeys) { value = 1; @@ -48,39 +32,15 @@ class ACE_Settings { displayName = CSTRING(EnableNumberHotkeys); };*/ class GVAR(settingFeedbackIcons) { - category = CSTRING(DisplayName); - value = 1; - typeName = "SCALAR"; - force = 0; - isClientSettable = 1; - displayName = CSTRING(SettingFeedbackIconsName); - description = CSTRING(SettingFeedbackIconsDesc); - values[] = {ECSTRING(optionsmenu,Hide), ECSTRING(optionsmenu,TopRightDown), ECSTRING(optionsmenu,TopRightLeft), ECSTRING(optionsmenu,TopLeftDown), ECSTRING(optionsmenu,TopLeftRight)}; + movedToSQF = 1; }; class GVAR(settingProgressBarLocation) { - category = CSTRING(DisplayName); - value = 0; - typeName = "SCALAR"; - force = 0; - isClientSettable = 1; - displayName = CSTRING(SettingProgressbarLocationName); - description = CSTRING(SettingProgressbarLocationDesc); - values[] = {ECSTRING(optionsmenu,Top), ECSTRING(optionsmenu,Bottom)}; + movedToSQF = 1; }; class GVAR(displayTextColor) { - category = CSTRING(DisplayName); - value[] = {0,0,0,0.1}; - typeName = "COLOR"; - isClientSettable = 1; - displayName = CSTRING(SettingDisplayTextColorName); - description = CSTRING(SettingDisplayTextColorDesc); + movedToSQF = 1; }; class GVAR(displayTextFontColor) { - category = CSTRING(DisplayName); - value[] = {1,1,1,1}; - typeName = "COLOR"; - isClientSettable = 1; - displayName = CSTRING(SettingDisplayTextFontColorName); - description = CSTRING(SettingDisplayTextFontColorDesc); + movedToSQF = 1; }; }; diff --git a/addons/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp index fa4f3dcacd..4d4b0c7b59 100644 --- a/addons/common/CfgEventHandlers.hpp +++ b/addons/common/CfgEventHandlers.hpp @@ -1,27 +1,25 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - disableModuload = true; + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); - disableModuload = true; + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; class Extended_DisplayLoad_EventHandlers { class RscDisplayMission { - ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + ADDON = QUOTE(_this call COMPILE_SCRIPT(XEH_missionDisplayLoad)); }; class RscUnitInfo { ADDON = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;); diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index 396d80b5c1..2e3a81d161 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -121,6 +121,7 @@ class CfgVehicles { class Land_HelipadEmpty_F; class ACE_LogicDummy: Land_HelipadEmpty_F { scope = 1; + scopeCurator = 0; SLX_XEH_DISABLED = 1; author = CSTRING(ACETeam); class EventHandlers { diff --git a/addons/common/CfgWrapperUI.hpp b/addons/common/CfgWrapperUI.hpp new file mode 100644 index 0000000000..fd2282bcf5 --- /dev/null +++ b/addons/common/CfgWrapperUI.hpp @@ -0,0 +1,10 @@ +class CfgWrapperUI { + class Cursors { + class Arrow; + class GVAR(blank): Arrow { + // This texture has a single 99% transparent pixel and is otherwise blank + // The single pixel is necessary, otherwise appears as a black 32 px square + texture = QPATHTOF(data\blank_cursor_ca.paa); + }; + }; +}; diff --git a/addons/common/DisableMouseDialog.hpp b/addons/common/DisableMouseDialog.hpp new file mode 100644 index 0000000000..c723ea759e --- /dev/null +++ b/addons/common/DisableMouseDialog.hpp @@ -0,0 +1,18 @@ +class ctrlMapEmpty; +class GVAR(DisableMouse_Dialog) { + idd = -1; + movingEnable = 0; + onLoad = QUOTE(with uiNameSpace do { GVAR(dlgDisableMouse) = _this # 0; };); + objects[] = {}; + class controlsBackground { + // Transparent map allows setting custom cursor + class Background: ctrlMapEmpty { + idc = 101; + fade = 1; + x = "safezoneXAbs"; + y = "safezoneY"; + w = "safezoneWAbs"; + h = "safezoneH"; + }; + }; +}; diff --git a/addons/common/HintConfig.hpp b/addons/common/HintConfig.hpp index e3912e56f3..f647b7b1de 100644 --- a/addons/common/HintConfig.hpp +++ b/addons/common/HintConfig.hpp @@ -23,7 +23,7 @@ class RscTitles { class ACE_RscHint { idd = -1; onLoad = "uiNamespace setVariable ['ACE_ctrlHint', (_this select 0) displayCtrl 1];"; - movingEnable = false; + movingEnable = 0; duration = 4; fadeIn = 0.2; fadeOut = 0.2; @@ -48,7 +48,7 @@ class RscTitles { class ACE_RscErrorHint { idd = -1; onLoad = "uiNamespace setVariable ['ACE_ctrlErrorHint', (_this select 0) displayCtrl 1];"; - movingEnable = false; + movingEnable = 0; duration = 999999; fadeIn = 0.2; fadeOut = 0.2; diff --git a/addons/common/ProgressScreen.hpp b/addons/common/ProgressScreen.hpp index 9b55ae33a3..6770ca598b 100644 --- a/addons/common/ProgressScreen.hpp +++ b/addons/common/ProgressScreen.hpp @@ -1,6 +1,6 @@ class GVAR(ProgressBar_Dialog) { idd = -1; - movingEnable = false; + movingEnable = 0; onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBG)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 2)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 3)];); objects[] = {}; @@ -49,29 +49,3 @@ class GVAR(ProgressBar_Dialog) { }; }; }; - -class GVAR(DisableMouse_Dialog) { - idd = -1; - movingEnable = false; - onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgDisableMouse)),_this select 0)];); - objects[] = {}; - class controlsBackground { - class Background { - idc = -1; - moving = 0; - font = "TahomaB"; - text = ""; - sizeEx = 0; - lineSpacing = 0; - type = 0; - style = 0; - size = 1; - colorBackground[] = {0, 0, 0, 0};//0.5 - colorText[] = {0, 0, 0, 0}; - x = "safezoneX"; - y = "safezoneY"; - w = "safezoneW"; - h = "safezoneH"; - }; - }; -}; diff --git a/addons/common/README.md b/addons/common/README.md index 04f0eb04c4..c340967821 100644 --- a/addons/common/README.md +++ b/addons/common/README.md @@ -2,13 +2,3 @@ ace_common ========== Common functions and systems used by other components. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [NouberNou](https://github.com/NouberNou) -- [commy2](https://github.com/commy2) -- [walterpearce](https://github.com/walterpearce) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 181b7099c6..78a5091369 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -26,6 +26,7 @@ ["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); ["setHidden", true, ["ace_unconscious"]] call FUNC(statusEffect_addType); +["blockRadio", false, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), "ace_unconscious"]] call FUNC(statusEffect_addType); [QGVAR(forceWalk), { params ["_object", "_set"]; @@ -71,6 +72,20 @@ }; }] call CBA_fnc_addEventHandler; +[QGVAR(blockRadio), { + params ["_object", "_set"]; + TRACE_2("blockRadio EH",_object,_set); + if (_object isEqualTo ACE_Player && {_set > 0}) then { + call FUNC(endRadioTransmission); + }; + if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then { + _object setVariable ["tf_unable_to_use_radio", _set > 0, true]; + }; + if (isClass (configFile >> "CfgPatches" >> "acre_main")) then { + _object setVariable ["acre_sys_core_isDisabled", _set > 0, true]; + }; +}] call CBA_fnc_addEventHandler; + [QGVAR(blockDamage), { //Name reversed from `allowDamage` because we want NOR logic params ["_object", "_set"]; if ((_object isKindOf "CAManBase") && {(["ace_medical"] call FUNC(isModLoaded))}) then { @@ -222,7 +237,7 @@ call FUNC(checkFiles); // Set up ace_settingsInitialized eventhandler ////////////////////////////////////////////////// -["ace_settingsInitialized", { +["CBA_settingsInitialized", { [ GVAR(checkPBOsAction), GVAR(checkPBOsCheckAll), @@ -252,8 +267,7 @@ enableCamShake true; //FUNC(showHud) needs to be refreshed if it was set during mission init ["ace_infoDisplayChanged", { - GVAR(showHudHash) params ["", "", "_masks"]; - if !(_masks isEqualTo []) then { + if (GVAR(showHudHash) isNotEqualTo createHashMap) then { [] call FUNC(showHud); }; }] call CBA_fnc_addEventHandler; @@ -397,45 +411,58 @@ addMissionEventHandler ["PlayerViewChanged", { ////////////////////////////////////////////////// GVAR(isReloading) = false; +GVAR(reloadMutex_lastMagazines) = []; +// When reloading, the new magazine is removed from inventory, an animation plays and then the old magazine is added +// If the animation is interrupted, the new magazine will be lost +["loadout", { + params ["_unit", "_newLoadout"]; + private _mags = magazines _unit; + // if our magazine count dropped by 1, we might be reloading + if ((count GVAR(reloadMutex_lastMagazines)) - (count _mags) == 1) then { + private _weapon = currentWeapon _unit; + private _muzzle = currentMuzzle _unit; + if (_weapon == "") exitWith {}; + private _wpnMzlConfig = configFile >> "CfgWeapons" >> _weapon; + if (_muzzle != _weapon) then { _wpnMzlConfig = _wpnMzlConfig >> _muzzle; }; -["keyDown", { - if ((_this select 1) in actionKeys "ReloadMagazine" && {alive ACE_player}) then { - //Ignore mounted (except ffv) - if (!(player call CBA_fnc_canUseWeapon)) exitWith {}; - private _weapon = currentWeapon ACE_player; + private _compatMags = [_wpnMzlConfig] call CBA_fnc_compatibleMagazines; + private _lastCompatMagCount = {_x in _compatMags} count GVAR(reloadMutex_lastMagazines); + private _curCompatMagCount = {_x in _compatMags} count _mags; + TRACE_3("",_wpnMzlConfig,_lastCompatMagCount,_curCompatMagCount); + if (_lastCompatMagCount - _curCompatMagCount != 1) exitWith {}; // check if magazines for our specific muzzle dropped by 1 - if (_weapon != "") then { - private _muzzle = currentMuzzle ACE_player; - private _wpnConfig = configFile >> "CfgWeapons" >> _weapon; - private _gesture = getText ([_wpnConfig >> _muzzle, _wpnConfig] select (_weapon isEqualTo _muzzle) >> "reloadAction"); - if (_gesture == "") exitWith {}; //Ignore weapons with no reload gesture (binoculars) - private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"]; - private _config = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher; - private _duration = getNumber (configfile >> _config >> "States" >> _gesture >> "speed"); + private _gesture = getText (_wpnMzlConfig >> "reloadAction"); + if (_gesture == "") exitWith {}; //Ignore weapons with no reload gesture (binoculars) + private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"]; + private _duration = 0; + if (_isLauncher) then { + _duration = getNumber (configfile >> "CfgMovesMaleSdr" >> "States" >> _gesture >> "speed"); + }; + if (_duration == 0) then { + _duration = getNumber (configfile >> "CfgGesturesMale" >> "States" >> _gesture >> "speed"); + }; - if (_duration != 0) then { - _duration = if (_duration < 0) then { abs _duration } else { 1 / _duration }; - } else { - _duration = 3; - }; + if (_duration != 0) then { + _duration = if (_duration < 0) then { abs _duration } else { 1 / _duration }; + } else { + _duration = 6; + }; - TRACE_2("Reloading, blocking gestures",_weapon,_duration); - GVAR(reloadingETA) = CBA_missionTime + _duration; + TRACE_2("Reloading, blocking gestures",_weapon,_duration); + GVAR(reloadingETA) = CBA_missionTime + _duration; - if (!GVAR(isReloading)) then { - GVAR(isReloading) = true; + if (!GVAR(isReloading)) then { + GVAR(isReloading) = true; - [{ - CBA_missionTime > GVAR(reloadingETA) - },{ - GVAR(isReloading) = false; - }] call CBA_fnc_waitUntilAndExecute; - }; + [{ + CBA_missionTime > GVAR(reloadingETA) + },{ + GVAR(isReloading) = false; + }] call CBA_fnc_waitUntilAndExecute; }; }; - - false -}] call CBA_fnc_addDisplayHandler; + GVAR(reloadMutex_lastMagazines) = _mags; +}, true] call CBA_fnc_addPlayerEventHandler; ////////////////////////////////////////////////// // Set up PlayerJIP eventhandler diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 7713ce07ee..536b6431d5 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -7,9 +7,9 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; -GVAR(syncedEvents) = [] call CBA_fnc_hashCreate; -GVAR(showHudHash) = [] call CBA_fnc_hashCreate; -GVAR(vehicleIconCache) = call CBA_fnc_createNamespace; // for getVehicleIcon +GVAR(syncedEvents) = createHashMap; +GVAR(showHudHash) = createHashMap; +GVAR(vehicleIconCache) = createHashMap; // for getVehicleIcon GVAR(settingsInitFinished) = false; GVAR(runAtSettingsInitialized) = []; diff --git a/addons/common/config.cpp b/addons/common/config.cpp index 557b45b732..0df756d034 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -14,18 +14,17 @@ class CfgPatches { }; }; -#include "CfgEventHandlers.hpp" - -#include "CfgLocationTypes.hpp" -#include "CfgSounds.hpp" -#include "CfgVehicles.hpp" -#include "CfgWeapons.hpp" -#include "CfgMagazines.hpp" - -#include "CfgMoves.hpp" -#include "CfgVoice.hpp" -#include "CfgUnitInsignia.hpp" #include "CfgEden.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgLocationTypes.hpp" +#include "CfgMagazines.hpp" +#include "CfgMoves.hpp" +#include "CfgSounds.hpp" +#include "CfgUnitInsignia.hpp" +#include "CfgVehicles.hpp" +#include "CfgVoice.hpp" +#include "CfgWeapons.hpp" +#include "CfgWrapperUI.hpp" class ACE_Rsc_Display_Base { idd = -1; @@ -61,9 +60,10 @@ class ACE_Rsc_Control_Base { #include "ACE_Settings.hpp" #include "define.hpp" -#include -#include -#include +#include "ProgressScreen.hpp" +#include "DisableMouseDialog.hpp" +#include "HintConfig.hpp" +#include "RscInfoType.hpp" #include "CompassControl.hpp" #include "CfgUIGrids.hpp" @@ -72,4 +72,5 @@ class ACE_Extensions {}; class ACE_Tests { vehicleTransportInventory = QPATHTOF(dev\test_vehicleInventory.sqf); mapConfigs = QPATHTOF(dev\test_mapConfigs.sqf); + cfgPatches = QPATHTOF(dev\test_cfgPatches.sqf); }; diff --git a/addons/common/data/blank_cursor_ca.paa b/addons/common/data/blank_cursor_ca.paa new file mode 100644 index 0000000000..8af652c087 Binary files /dev/null and b/addons/common/data/blank_cursor_ca.paa differ diff --git a/addons/common/define.hpp b/addons/common/define.hpp index f25892b6d7..9e9e92ecb5 100644 --- a/addons/common/define.hpp +++ b/addons/common/define.hpp @@ -92,8 +92,7 @@ class ACE_gui_backgroundBase { text = ""; sizeEx = 0.032; }; -class ACE_gui_editBase -{ +class ACE_gui_editBase { type = 2; x = 0; y = 0; @@ -159,7 +158,7 @@ class ACE_gui_buttonBase { colorBackgroundFocused[] = {1,1,1,1}; periodFocus = 1.2; periodOver = 0.8; - default = false; + default = 0; class HitZone { left = 0.00; top = 0.00; @@ -236,7 +235,7 @@ class ACE_gui_staticBase { }; class RscListBox; -class ACE_gui_listBoxBase : RscListBox{ +class ACE_gui_listBoxBase: RscListBox { type = CT_LISTBOX; style = ST_MULTI; font = FONT_ACE; @@ -379,8 +378,7 @@ class ACE_gui_comboBoxBase: RscCombo { soundExpand[] = {"\A3\ui_f\data\sound\RscCombo\soundExpand",0.1,1}; soundCollapse[] = {"\A3\ui_f\data\sound\RscCombo\soundCollapse",0.1,1}; maxHistoryDelay = 1.0; - class ScrollBar - { + class ScrollBar { color[] = {0.3,0.3,0.3,0.6}; colorActive[] = {0.3,0.3,0.3,1}; colorDisabled[] = {0.3,0.3,0.3,0.3}; @@ -485,8 +483,7 @@ onMouseButtonDblClick = ""; color[] = {0.30, 0.10, 0.90, 1.00}; size = 50; }; - class Legend - { + class Legend { x = "SafeZoneX + ( ((safezoneW / safezoneH) min 1.2) / 40)"; y = "SafeZoneY + safezoneH - 4.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; w = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; @@ -496,8 +493,7 @@ onMouseButtonDblClick = ""; colorBackground[] = {1,1,1,0.5}; color[] = {0,0,0,1}; }; - class Task - { + class Task { icon = "\A3\ui_f\data\map\mapcontrol\taskIcon_CA.paa"; iconCreated = "\A3\ui_f\data\map\mapcontrol\taskIconCreated_CA.paa"; iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa"; @@ -513,8 +509,7 @@ onMouseButtonDblClick = ""; coefMin = 1; coefMax = 1; }; - class Waypoint - { + class Waypoint { icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa"; color[] = {0,0,0,1}; size = 20; @@ -522,8 +517,7 @@ onMouseButtonDblClick = ""; coefMin = 0.900000; coefMax = 4; }; - class WaypointCompleted - { + class WaypointCompleted { icon = "\A3\ui_f\data\map\mapcontrol\waypointCompleted_ca.paa"; color[] = {0,0,0,1}; size = 20; @@ -531,8 +525,7 @@ onMouseButtonDblClick = ""; coefMin = 0.900000; coefMax = 4; }; - class CustomMark - { + class CustomMark { icon = "\A3\ui_f\data\map\mapcontrol\custommark_ca.paa"; size = 24; importance = 1; @@ -540,8 +533,7 @@ onMouseButtonDblClick = ""; coefMax = 1; color[] = {0,0,0,1}; }; - class Command - { + class Command { icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa"; size = 18; importance = 1; @@ -549,8 +541,7 @@ onMouseButtonDblClick = ""; coefMax = 1; color[] = {1,1,1,1}; }; - class Bush - { + class Bush { icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; color[] = {0.45,0.64,0.33,0.4}; size = "14/2"; @@ -558,8 +549,7 @@ onMouseButtonDblClick = ""; coefMin = 0.25; coefMax = 4; }; - class Rock - { + class Rock { icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa"; color[] = {0.1,0.1,0.1,0.8}; size = 12; @@ -567,8 +557,7 @@ onMouseButtonDblClick = ""; coefMin = 0.25; coefMax = 4; }; - class SmallTree - { + class SmallTree { icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; color[] = {0.45,0.64,0.33,0.4}; size = 12; @@ -576,8 +565,7 @@ onMouseButtonDblClick = ""; coefMin = 0.25; coefMax = 4; }; - class Tree - { + class Tree { icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; color[] = {0.45,0.64,0.33,0.4}; size = 12; @@ -585,8 +573,7 @@ onMouseButtonDblClick = ""; coefMin = 0.25; coefMax = 4; }; - class busstop - { + class busstop { icon = "\A3\ui_f\data\map\mapcontrol\busstop_CA.paa"; size = 24; importance = 1; @@ -594,8 +581,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class fuelstation - { + class fuelstation { icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_CA.paa"; size = 24; importance = 1; @@ -603,8 +589,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class hospital - { + class hospital { icon = "\A3\ui_f\data\map\mapcontrol\hospital_CA.paa"; size = 24; importance = 1; @@ -612,8 +597,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class church - { + class church { icon = "\A3\ui_f\data\map\mapcontrol\church_CA.paa"; size = 24; importance = 1; @@ -621,8 +605,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class lighthouse - { + class lighthouse { icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_CA.paa"; size = 24; importance = 1; @@ -630,8 +613,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class power - { + class power { icon = "\A3\ui_f\data\map\mapcontrol\power_CA.paa"; size = 24; importance = 1; @@ -639,8 +621,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class powersolar - { + class powersolar { icon = "\A3\ui_f\data\map\mapcontrol\powersolar_CA.paa"; size = 24; importance = 1; @@ -648,8 +629,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class powerwave - { + class powerwave { icon = "\A3\ui_f\data\map\mapcontrol\powerwave_CA.paa"; size = 24; importance = 1; @@ -657,8 +637,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class powerwind - { + class powerwind { icon = "\A3\ui_f\data\map\mapcontrol\powerwind_CA.paa"; size = 24; importance = 1; @@ -666,8 +645,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class quay - { + class quay { icon = "\A3\ui_f\data\map\mapcontrol\quay_CA.paa"; size = 24; importance = 1; @@ -675,8 +653,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class shipwreck - { + class shipwreck { icon = "\A3\ui_f\data\map\mapcontrol\shipwreck_CA.paa"; size = 24; importance = 1; @@ -684,8 +661,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class transmitter - { + class transmitter { icon = "\A3\ui_f\data\map\mapcontrol\transmitter_CA.paa"; size = 24; importance = 1; @@ -693,8 +669,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class watertower - { + class watertower { icon = "\A3\ui_f\data\map\mapcontrol\watertower_CA.paa"; size = 24; importance = 1; @@ -702,8 +677,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {1,1,1,1}; }; - class Cross - { + class Cross { icon = "\A3\ui_f\data\map\mapcontrol\Cross_CA.paa"; size = 24; importance = 1; @@ -711,8 +685,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {0,0,0,1}; }; - class Chapel - { + class Chapel { icon = "\A3\ui_f\data\map\mapcontrol\Chapel_CA.paa"; size = 24; importance = 1; @@ -720,8 +693,7 @@ onMouseButtonDblClick = ""; coefMax = 1.0; color[] = {0,0,0,1}; }; - class Bunker - { + class Bunker { icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa"; size = 14; importance = "1.5 * 14 * 0.05"; @@ -729,8 +701,7 @@ onMouseButtonDblClick = ""; coefMax = 4; color[] = {0,0,0,1}; }; - class Fortress - { + class Fortress { icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa"; size = 16; importance = "2 * 16 * 0.05"; @@ -738,8 +709,7 @@ onMouseButtonDblClick = ""; coefMax = 4; color[] = {0,0,0,1}; }; - class Fountain - { + class Fountain { icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa"; size = 11; importance = "1 * 12 * 0.05"; @@ -747,8 +717,7 @@ onMouseButtonDblClick = ""; coefMax = 4; color[] = {0,0,0,1}; }; - class Ruin - { + class Ruin { icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa"; size = 16; importance = "1.2 * 16 * 0.05"; @@ -756,8 +725,7 @@ onMouseButtonDblClick = ""; coefMax = 4; color[] = {0,0,0,1}; }; - class Stack - { + class Stack { icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa"; size = 20; importance = "2 * 16 * 0.05"; @@ -765,8 +733,7 @@ onMouseButtonDblClick = ""; coefMax = 4; color[] = {0,0,0,1}; }; - class Tourism - { + class Tourism { icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa"; size = 16; importance = "1 * 16 * 0.05"; @@ -774,8 +741,7 @@ onMouseButtonDblClick = ""; coefMax = 4; color[] = {0,0,0,1}; }; - class ViewTower - { + class ViewTower { icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa"; size = 16; importance = "2.5 * 16 * 0.05"; diff --git a/addons/common/dev/test_cfgPatches.sqf b/addons/common/dev/test_cfgPatches.sqf new file mode 100644 index 0000000000..9412651940 --- /dev/null +++ b/addons/common/dev/test_cfgPatches.sqf @@ -0,0 +1,72 @@ +#include "\z\ace\addons\common\script_component.hpp" + +// PabstMirror +// ["cfgPatches"] call ace_common_fnc_runTests; + +diag_log text format ["--- Checking CfgPatches --- "]; + +private _testPass = true; + +// All ace cfgPatches +private _allPatches = "(configName _x) select [0,3] == 'ace'" configClasses (configFile >> "CfgPatches"); + +// Get all units[] +private _allUnits = []; +{ + _allUnits append ((getArray (_x >> "units")) apply { toLower _x }); +} forEach _allPatches; +{ + private _class = configFile >> "CfgVehicles" >> _x; + if (isNull _class) then { + WARNING_1("in units[] but null - %1", _x); + _testPass = false; + } else { + // if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then { + // WARNING_2("in units[] but not public - %1 from %2", configName _class, configSourceMod _class); + // _testPass = false; + // }; + }; +} forEach _allUnits; + +// Get all weapons[] +private _allWeapons = []; +{ + _allWeapons append ((getArray (_x >> "weapons")) apply { toLower _x }); +} forEach _allPatches; +{ + private _class = configFile >> "CfgWeapons" >> _x; + if (isNull _class) then { + WARNING_1("in weapons[] but null - %1", _x); + _testPass = false; + } else { + // if (((getNumber (_class >> "scope")) != 2) && {((getNumber (_class >> "scopeCurator")) != 2)}) then { + // WARNING_2("in weapons[] but not public - %1 from %2", configName _class, configSourceMod _class); + // _testPass = false; + // }; + }; +} forEach _allWeapons; + +// Check if all public vics are defined in a cfgPatch +private _vics = "(configName _x) select [0,3] == 'ace'" configClasses (configFile >> "CfgVehicles"); +{ + if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then { + if (!((toLower configName _x) in _allUnits)) then { + WARNING_2("Not in any units[] - %1 from %2", configName _x, configSourceMod _x); + _testPass = false; + }; + }; +} forEach _vics; + +// Check if all public weapons are defined in a cfgPatch +private _weapons = "(configName _x) select [0,3] == 'ace'" configClasses (configFile >> "CfgWeapons"); +{ + private _type = toLower configName _x; + if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then { + if (!((toLower configName _x) in _allWeapons)) then { + WARNING_2("Not in any weapons[] - %1 from %2", configName _x, configSourceMod _x); + _testPass = false; + }; + }; +} forEach _weapons; + +_testPass diff --git a/addons/common/dev/test_mapConfigs.sqf b/addons/common/dev/test_mapConfigs.sqf index 1b114d79e3..1b5c8b04a9 100644 --- a/addons/common/dev/test_mapConfigs.sqf +++ b/addons/common/dev/test_mapConfigs.sqf @@ -22,7 +22,7 @@ private _maps = configProperties [configFile >> "CfgWorldList", "(isClass _x)", }; // Test MGRS grid step size (from ace_common_fnc_getMapGridData) - private _zoomMax = 1e99; + private _zoomMax = 1e38; private _formatX = ""; private _formatY = ""; private _stepX = 1e10; diff --git a/addons/common/dev/test_vehicleInventory.sqf b/addons/common/dev/test_vehicleInventory.sqf index fced35a987..7fdd0159c0 100644 --- a/addons/common/dev/test_vehicleInventory.sqf +++ b/addons/common/dev/test_vehicleInventory.sqf @@ -14,7 +14,7 @@ private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x) private _glassesConfig = configFile >> "CfgGlasses" >> _name; if (((!isClass _weaponConfig) || {(getNumber (_weaponConfig >> "type")) in [1,2,4]}) && {!isClass _glassesConfig}) then { diag_log text format ["%1 -> TransportItems -> %2 = Bad", _vehType, _name]; - _testPass = false; + if ("ace" in toLower (_vehType + _name)) then { _testPass = false; }; }; }; } forEach (configProperties [_x >> "TransportItems", "isClass _x", true]); @@ -23,7 +23,7 @@ private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x) private _weaponConfig = configFile >> "CfgWeapons" >> _name; if ((!isClass _weaponConfig) || {!((getNumber (_weaponConfig >> "type")) in [1,2,4])}) then { diag_log text format ["%1 -> TransportWeapons -> %2 = Bad", _vehType, _name]; - _testPass = false; + if ("ace" in toLower (_vehType + _name)) then { _testPass = false; }; }; } forEach (configProperties [_x >> "TransportWeapons", "isClass _x", true]); { @@ -31,7 +31,7 @@ private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x) private _magConfig = configFile >> "CfgMagazines" >> _name; if ((!isClass _magConfig)) then { diag_log text format ["%1 -> TransportMagazines -> %2 = Bad", _vehType, _name]; - _testPass = false; + if ("ace" in toLower (_vehType + _name)) then { _testPass = false; }; }; } forEach (configProperties [_x >> "TransportMagazines", "isClass _x", true]); { @@ -39,7 +39,7 @@ private _vehicles = configProperties [configFile >> "CfgVehicles", "(isClass _x) private _vehConfig = configFile >> "CfgVehicles" >> _name; if ((!isClass _vehConfig)) then { diag_log text format ["%1 -> TransportBackpacks -> %2 = Bad", _vehType, _name]; - _testPass = false; + if ("ace" in toLower (_vehType + _name)) then { _testPass = false; }; }; } forEach (configProperties [_x >> "TransportBackpacks", "isClass _x", true]); } forEach _vehicles; diff --git a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf index dfdbe4db54..f2c2d0ff2e 100644 --- a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf +++ b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf @@ -17,12 +17,11 @@ params ["_client"]; -[GVAR(syncedEvents), { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; - _value params ["", "_eventLog"]; - - ["ACEs", [_key, _eventLog], _client] call CBA_fnc_targetEvent; +{ + //IGNORE_PRIVATE_WARNING ["_x", "_y"]; + _y params ["", "_eventlog"]; + ["ACEs", [_x, _eventLog], _client] call CBA_fnc_targetEvent; false -}] call CBA_fnc_hashEachPair; +} forEach GVAR(syncedEvents); true diff --git a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf index 1e038c40bc..c86aa9feac 100644 --- a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf @@ -26,12 +26,12 @@ if (isServer) then { // Find the event name, and shovel out the events to the client params ["_eventName", "_client"]; - if !([GVAR(syncedEvents), _eventName] call CBA_fnc_hashHasKey) exitWith { + if !(_eventName in GVAR(syncedEvents)) exitWith { ERROR_1("Request for synced event - key [%1] not found.", _eventName); false }; - private _eventEntry = [GVAR(syncedEvents), _eventName] call CBA_fnc_hashGet; + private _eventEntry = GVAR(syncedEvents) get _eventName; _eventEntry params ["", "_eventLog"]; ["ACEs", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent; diff --git a/addons/common/functions/fnc__handleSyncedEvent.sqf b/addons/common/functions/fnc__handleSyncedEvent.sqf index a7fa657a5f..76e84ebdbb 100644 --- a/addons/common/functions/fnc__handleSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleSyncedEvent.sqf @@ -19,12 +19,12 @@ params ["_name", "_args", "_ttl"]; -if !([GVAR(syncedEvents), _name] call CBA_fnc_hashHasKey) exitWith { +if !(_name in GVAR(syncedEvents)) exitWith { ERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name); false }; -private _internalData = [GVAR(syncedEvents), _name] call CBA_fnc_hashGet; +private _internalData = GVAR(syncedEvents) get _name; _internalData params ["_eventCode", "_eventLog"]; if (isServer) then { diff --git a/addons/common/functions/fnc_addSyncedEventHandler.sqf b/addons/common/functions/fnc_addSyncedEventHandler.sqf index 3dd4f03152..4cf5163477 100644 --- a/addons/common/functions/fnc_addSyncedEventHandler.sqf +++ b/addons/common/functions/fnc_addSyncedEventHandler.sqf @@ -19,7 +19,7 @@ params ["_name", "_handler", ["_ttl", 0]]; -if ([GVAR(syncedEvents), _name] call CBA_fnc_hashHasKey) exitWith { +if (_name in GVAR(syncedEvents)) exitWith { ERROR_1("Duplicate synced event [%1] creation.",_name); false }; @@ -27,4 +27,4 @@ if ([GVAR(syncedEvents), _name] call CBA_fnc_hashHasKey) exitWith { private _eventId = [_name, FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler; private _data = [_handler, [], _ttl, _eventId]; -[GVAR(syncedEvents), _name, _data] call CBA_fnc_hashSet; +GVAR(syncedEvents) set [_name, _data]; diff --git a/addons/common/functions/fnc_addToInventory.sqf b/addons/common/functions/fnc_addToInventory.sqf index b8b5f93635..b514495b27 100644 --- a/addons/common/functions/fnc_addToInventory.sqf +++ b/addons/common/functions/fnc_addToInventory.sqf @@ -24,26 +24,43 @@ params ["_unit", "_classname", ["_container", ""], ["_ammoCount", -1]]; private _type = _classname call FUNC(getItemType); private _canAdd = false; +private _canFitWeaponSlot = false; private _addedToUnit = false; switch (_container) do { case "vest": { - _canAdd = _unit canAddItemToVest _classname; + _canAdd = [_unit, _classname, 1, false, true, false] call CBA_fnc_canAddItem; }; case "backpack": { - _canAdd = _unit canAddItemToBackpack _classname; + _canAdd = [_unit, _classname, 1, false, false, true] call CBA_fnc_canAddItem; }; case "uniform": { - _canAdd = _unit canAddItemToUniform _classname; + _canAdd = [_unit, _classname, 1, true, false, false] call CBA_fnc_canAddItem; }; default { - _canAdd = _unit canAdd _classname; + _canAdd = [_unit, _classname] call CBA_fnc_canAddItem; + if (_canAdd) then { + switch (_type select 1) do { + case "primary": { + _canFitWeaponSlot = primaryWeapon _unit == ""; + }; + case "secondary": { + _canFitWeaponSlot = secondaryWeapon _unit == ""; + }; + case "handgun": { + _canFitWeaponSlot = handgunWeapon _unit == ""; + }; + case "binocular": { + _canFitWeaponSlot = binocular _unit == ""; + }; + }; + }; }; }; switch (_type select 0) do { case "weapon": { - if (_canAdd) then { + if (_canAdd || {_canFitWeaponSlot}) then { _addedToUnit = true; switch (_container) do { @@ -57,7 +74,21 @@ switch (_type select 0) do { (uniformContainer _unit) addWeaponCargoGlobal [_classname, 1]; }; default { - _unit addWeaponGlobal _classname; + if (_canFitWeaponSlot) then { + _unit addWeaponGlobal _classname; + } else { + { + _x params ["_parameters", "_container"]; + + if (_parameters call CBA_fnc_canAddItem) exitWith { + _container addWeaponCargoGlobal [_classname, 1]; // addWeaponGlobal will replace the weapon currently in a slot + }; + } forEach [ + [[_unit, _classname, 1, false, false, true], backpackContainer _unit], + [[_unit, _classname, 1, false, true, false], vestContainer _unit], + [[_unit, _classname, 1, true, false, false], uniformContainer _unit] + ]; + }; }; }; } else { diff --git a/addons/common/functions/fnc_arithmeticGetResult.sqf b/addons/common/functions/fnc_arithmeticGetResult.sqf index ea5c2f3897..0263785789 100644 --- a/addons/common/functions/fnc_arithmeticGetResult.sqf +++ b/addons/common/functions/fnc_arithmeticGetResult.sqf @@ -21,7 +21,8 @@ params ["_namespace", "_setID", "_operation"]; TRACE_3("arithmeticGetResult",_namespace,_setID,_operation); -private _data = (_namespace getVariable _setID) param [2, [{0}]]; +private _hash = _namespace getVariable [_setID, createHashMapFromArray [["empty", {0}]]]; +private _data = values _hash; switch (_operation) do { case "max": { diff --git a/addons/common/functions/fnc_arithmeticSetSource.sqf b/addons/common/functions/fnc_arithmeticSetSource.sqf index ce24c408ef..388313ba11 100644 --- a/addons/common/functions/fnc_arithmeticSetSource.sqf +++ b/addons/common/functions/fnc_arithmeticSetSource.sqf @@ -25,16 +25,16 @@ TRACE_4("arithmeticSetSource",_namespace,_setID,_source,_variable); private _hash = _namespace getVariable _setID; if (isNil "_hash") then { - _hash = [] call CBA_fnc_hashCreate; + _hash = createHashMap; _namespace setVariable [_setID, _hash]; }; if (_variable isEqualTo {}) then { TRACE_1("removing",_source); - [_hash, _source] call CBA_fnc_hashRem; + _hash deleteAt _source; } else { TRACE_2("adding",_source,_variable); - [_hash, _source, _variable] call CBA_fnc_hashSet; + _hash set [_source, _variable]; }; nil diff --git a/addons/common/functions/fnc_canGetInPosition.sqf b/addons/common/functions/fnc_canGetInPosition.sqf index 22d885b38c..c8870cebd7 100644 --- a/addons/common/functions/fnc_canGetInPosition.sqf +++ b/addons/common/functions/fnc_canGetInPosition.sqf @@ -31,7 +31,7 @@ if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false}; private ["_selectionPosition", "_selectionPosition2"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _turret = []; private _radius = 0; diff --git a/addons/common/functions/fnc_canInteractWith.sqf b/addons/common/functions/fnc_canInteractWith.sqf index b67e57964f..62fbba322e 100644 --- a/addons/common/functions/fnc_canInteractWith.sqf +++ b/addons/common/functions/fnc_canInteractWith.sqf @@ -21,10 +21,11 @@ params ["_unit", "_target", ["_exceptions", []]]; _exceptions = _exceptions apply {toLower _x}; -private _owner = _target getVariable [QGVAR(owner), objNull]; - // exit if the target is not free to interact -if (!isNull _owner && {_unit != _owner}) exitWith {false}; +if ((!isNull _target) && { + private _owner = _target getVariable [QGVAR(owner), objNull]; + (!isNull _owner) && {_unit != _owner}} +) exitWith {false}; // check general conditions private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]]; diff --git a/addons/common/functions/fnc_cbaSettings_convertHelper.sqf b/addons/common/functions/fnc_cbaSettings_convertHelper.sqf index 8c892bcf13..6e7a4456c7 100644 --- a/addons/common/functions/fnc_cbaSettings_convertHelper.sqf +++ b/addons/common/functions/fnc_cbaSettings_convertHelper.sqf @@ -110,7 +110,6 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x private _gvarName = _varName select [_addonSearchCount]; - _output pushBack ""; _output pushBack format ["["]; _output pushBack format [" QGVAR(%1), ""%2"",", _gvarName, _cbaSettingType]; _output pushBack format [" [LSTRING(), LSTRING()], // %1, %2", _localizedName, _localizedDescription]; //IGNORE_STRING_WARNING(str_ace_common_); @@ -123,7 +122,8 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x _output pushBack format [" {[""%1"", _this] call ace_common_fnc_cbaSettings_settingChanged},", _varName]; }; _output pushBack format [" %1 // Needs mission restart", _warnIfChangedMidMission]; - _output pushBack "] call CBA_settings_fnc_init;"; + _output pushBack "] call CBA_fnc_addSetting;"; + _output pushBack ""; } forEach _settings; copyToClipboard (_output joinString endl); diff --git a/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf index 7f6637f622..a996f39158 100644 --- a/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf +++ b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf @@ -18,6 +18,7 @@ params ["_config"]; private _varName = configName _config; +INFO_1("Loading ace_setting from config [%1] - consider updating to native cba_settings",_varName); private _typeName = toUpper getText (_config >> "typeName"); if (_typeName == "") then { WARNING_1("Setting [%1] Has no typeName",_varName); @@ -98,8 +99,8 @@ private _code = compile format ['["%1", _this] call FUNC(cbaSettings_settingChan TRACE_2("setting",_cbaSettingType,_cbaValueInfo); TRACE_4("",_isForced,_cbaIsGlobal,_category,_cbaValueInfo); -private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code, _warnIfChangedMidMission] call CBA_settings_fnc_init; +private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code, _warnIfChangedMidMission] call CBA_fnc_addSetting; TRACE_1("returned",_return); -if ((isNil "_return") || {_return != 0}) then {ERROR_1("Setting [%1] - CBA Error",_varName);}; +if ((isNil "_return") || {!_return}) then {ERROR_1("Setting [%1] - CBA Error",_varName);}; _return diff --git a/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf b/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf index 703e0263dc..869668cc21 100644 --- a/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf +++ b/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf @@ -31,7 +31,7 @@ private _aceSettings = configProperties [configFile >> "ACE_Settings", "isClass if (!isNil "_profileVar") then { private _currentValue = [_settingName, "client"] call CBA_settings_fnc_get; - if (_isClientSettable && {!(_currentValue isEqualTo _profileVar)}) then { + if (_isClientSettable && {_currentValue isNotEqualTo _profileVar}) then { // CBA_settings_fnc_set will do type checking for the old profile var private _ret = [_settingName, _profileVar, 0, "client", true] call CBA_settings_fnc_set; INFO_3("Transfering setting [%1: %2] returned %3", _settingName, _profileVar, _ret); diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 3b6a02f33f..463ee20f0b 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -57,7 +57,7 @@ private _oldCompats = []; }; false } count _addons; -if (!(_oldCompats isEqualTo [])) then { +if (_oldCompats isNotEqualTo []) then { [{ // Lasts for ~10 seconds ERROR_WITH_TITLE_1("The following ACE compatiblity PBOs are outdated", "%1", _this); @@ -138,7 +138,7 @@ if (isMultiplayer) then { }; _addons = _addons - GVAR(ServerAddons); - if !(_addons isEqualTo []) then { + if (_addons isNotEqualTo []) then { private _errorMsg = format ["Client/Server Addon Mismatch. Client has extra addons: %1.",_addons]; ERROR(_errorMsg); diff --git a/addons/common/functions/fnc_claim.sqf b/addons/common/functions/fnc_claim.sqf index 3c30b8f28f..130bbac79b 100644 --- a/addons/common/functions/fnc_claim.sqf +++ b/addons/common/functions/fnc_claim.sqf @@ -30,7 +30,7 @@ _target setVariable [QGVAR(owner), _unit, true]; // lock target object if (_lockTarget) then { - private _canBeDisassembled = !([] isEqualTo getArray (_target call CBA_fnc_getObjectConfig >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) }; + private _canBeDisassembled = ([] isNotEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) }; if (!isNull _unit) then { [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent; if (_canBeDisassembled) then { diff --git a/addons/common/functions/fnc_claimSafeServer.sqf b/addons/common/functions/fnc_claimSafeServer.sqf index f3017f5bed..e6520aad87 100644 --- a/addons/common/functions/fnc_claimSafeServer.sqf +++ b/addons/common/functions/fnc_claimSafeServer.sqf @@ -36,7 +36,7 @@ _target setVariable [QGVAR(owner), _unit, true]; // lock target object if (_lockTarget) then { - private _canBeDisassembled = !([] isEqualTo getArray (_target call CBA_fnc_getObjectConfig >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) }; + private _canBeDisassembled = ([] isNotEqualTo getArray (configOf _target >> "assembleInfo" >> "dissasembleTo")) && { !([false, true] select (_target getVariable [QEGVAR(csw,assemblyMode), 0])) }; if (!isNull _unit) then { [QGVAR(lockVehicle), _target, _target] call CBA_fnc_targetEvent; if (_canBeDisassembled) then { diff --git a/addons/common/functions/fnc_disableUserInput.sqf b/addons/common/functions/fnc_disableUserInput.sqf index 379c1d6312..514fa3601c 100644 --- a/addons/common/functions/fnc_disableUserInput.sqf +++ b/addons/common/functions/fnc_disableUserInput.sqf @@ -41,6 +41,10 @@ if (_state) then { private _display = uiNamespace getVariable QGVAR(dlgDisableMouse); + // Hide cursor by using custom transparent cursor + private _map = _display displayCtrl 101; + _map ctrlMapCursor ["", QGVAR(blank)]; + _display displayAddEventHandler ["KeyDown", { params ["", "_key"]; diff --git a/addons/common/functions/fnc_endRadioTransmission.sqf b/addons/common/functions/fnc_endRadioTransmission.sqf index 16985a8773..196d0f4d4a 100644 --- a/addons/common/functions/fnc_endRadioTransmission.sqf +++ b/addons/common/functions/fnc_endRadioTransmission.sqf @@ -2,7 +2,7 @@ /* * Author: commy2 * - * End radio transmissions of addons TFAR and ACRE2. TFAR v0.9.x, ACRE Public Beta 2.0.3.571 + * End radio transmissions of addons TFAR and ACRE2. TFAR v0.9.x, ACRE Public Beta 2.0.3.571, TFAR v1.0.-1.x * * Arguments: * None @@ -28,6 +28,9 @@ if (isClass (configFile >> "CfgPatches" >> "acre_main")) then { // TFAR if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then { + if (isClass (configFile >> "CfgPatches" >> "tfar_core")) exitWith { // Beta TFAR, exit to avoid script errors from legacy functions not existing + ACE_Player call TFAR_fnc_releaseAllTangents; + }; call TFAR_fnc_onSwTangentReleased; call TFAR_fnc_onAdditionalSwTangentReleased; call TFAR_fnc_onLRTangentReleased; diff --git a/addons/common/functions/fnc_findUnloadPosition.sqf b/addons/common/functions/fnc_findUnloadPosition.sqf index 22e23c7f2b..50727b438f 100644 --- a/addons/common/functions/fnc_findUnloadPosition.sqf +++ b/addons/common/functions/fnc_findUnloadPosition.sqf @@ -78,7 +78,7 @@ while {_rangeToCheck < _maxDistance} do { //Shoot a ray down, and make sure we hit something solid like a building or the ground: private _belowRoundArray = lineIntersectsSurfaces [(AGLtoASL _roundAGL) vectorAdd [0,0,0.5], (AGLtoASL _roundAGL) vectorAdd [0,0,-1]]; TRACE_4("Testing for solid",_roundDistance,_roundAngle,_roundAGL,_belowRoundArray); - if (!(_belowRoundArray isEqualTo [])) then { + if (_belowRoundArray isNotEqualTo []) then { private _aboveBuilding = (_belowRoundArray select 0) select 2; //Point is above something: Terrain(null) or Building if ((isNull _aboveBuilding) || {_aboveBuilding isKindOf "Building"}) then { @@ -110,14 +110,14 @@ while {_rangeToCheck < _maxDistance} do { _testIntersections = []; }; }; - if (!(_testIntersections isEqualTo [])) exitWith { + if (_testIntersections isNotEqualTo []) exitWith { TRACE_2("collision low/high",_roundAGL,_testIntersections); _roundPointIsValid = false; }; _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.5]; _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, 1]; _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL]; - if (!(_testIntersections isEqualTo [])) exitWith { + if (_testIntersections isNotEqualTo []) exitWith { TRACE_2("collision mid",_roundAGL,_testIntersections); _roundPointIsValid = false; }; diff --git a/addons/common/functions/fnc_fixPosition.sqf b/addons/common/functions/fnc_fixPosition.sqf index ac152cf5c9..e4f956dadb 100644 --- a/addons/common/functions/fnc_fixPosition.sqf +++ b/addons/common/functions/fnc_fixPosition.sqf @@ -19,7 +19,7 @@ if (!local _this) exitWith {}; // Objects with disabled simulation and objects with simulation type "house" don't have gravity/physics, so make sure they are not floating -private _hasGravity = simulationEnabled _this && {getText (configFile >> "CfgVehicles" >> typeOf _this >> "simulation") != "house"}; +private _hasGravity = simulationEnabled _this && {getText (configOf _this >> "simulation") != "house"}; if (!_hasGravity) then { private _positionASL = getPosASL _this; diff --git a/addons/common/functions/fnc_getAwakeAnim.sqf b/addons/common/functions/fnc_getAwakeAnim.sqf index 7da2837759..c58e2796ba 100644 --- a/addons/common/functions/fnc_getAwakeAnim.sqf +++ b/addons/common/functions/fnc_getAwakeAnim.sqf @@ -23,7 +23,7 @@ private _vehicle = vehicle _unit; if (_vehicle isEqualTo _unit) exitWith {""}; // --- driver -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; if (_unit == driver _vehicle) exitWith { getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_config >> "driverAction")) // return @@ -32,7 +32,7 @@ if (_unit == driver _vehicle) exitWith { // --- turret private _turret = _unit call CBA_fnc_turretPath; -if !(_turret isEqualTo []) exitWith { +if (_turret isNotEqualTo []) exitWith { private _turretConfig = [_vehicle, _turret] call CBA_fnc_getTurret; getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getText (_turretConfig >> "gunnerAction")) // return @@ -42,7 +42,9 @@ if !(_turret isEqualTo []) exitWith { private _cargoIndex = _vehicle getCargoIndex _unit; if (_cargoIndex != -1) exitWith { - getText (configFile >> "CfgMovesBasic" >> "ManActions" >> getArray (_config >> "cargoAction") select _cargoIndex) // return + private _cargoAction = getArray (_config >> "cargoAction"); + _cargoIndex = _cargoIndex min (count _cargoAction - 1); // The array can be smaller than the max cargo index, just use last element + getText (configFile >> "CfgMovesBasic" >> "ManActions" >> (_cargoAction select _cargoIndex)) // return }; // --- default diff --git a/addons/common/functions/fnc_getConfigCommander.sqf b/addons/common/functions/fnc_getConfigCommander.sqf index f3d011c57a..a49664bcf2 100644 --- a/addons/common/functions/fnc_getConfigCommander.sqf +++ b/addons/common/functions/fnc_getConfigCommander.sqf @@ -17,7 +17,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _turret = _vehicle call FUNC(getTurretCommander); [_config, _turret] call FUNC(getTurretConfigPath) // return diff --git a/addons/common/functions/fnc_getConfigGunner.sqf b/addons/common/functions/fnc_getConfigGunner.sqf index 732256b8a1..d1e86a9bd0 100644 --- a/addons/common/functions/fnc_getConfigGunner.sqf +++ b/addons/common/functions/fnc_getConfigGunner.sqf @@ -17,7 +17,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _turret = _vehicle call FUNC(getTurretGunner); [_config, _turret] call FUNC(getTurretConfigPath) // return diff --git a/addons/common/functions/fnc_getDefinedVariableDefault.sqf b/addons/common/functions/fnc_getDefinedVariableDefault.sqf index edae4ef3ef..fc6108469a 100644 --- a/addons/common/functions/fnc_getDefinedVariableDefault.sqf +++ b/addons/common/functions/fnc_getDefinedVariableDefault.sqf @@ -19,7 +19,7 @@ params ["_varName"]; private _variableDefinition = _varName call FUNC(getDefinedVariableInfo); -if !(_variableDefinition isEqualTo []) exitWith { +if (_variableDefinition isNotEqualTo []) exitWith { _variableDefinition select 1; }; diff --git a/addons/common/functions/fnc_getDoorTurrets.sqf b/addons/common/functions/fnc_getDoorTurrets.sqf index 93b0360042..8fb872a6f7 100644 --- a/addons/common/functions/fnc_getDoorTurrets.sqf +++ b/addons/common/functions/fnc_getDoorTurrets.sqf @@ -22,7 +22,7 @@ private _turrets = allTurrets [_vehicle, true]; private _doorTurrets = []; { - private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; + private _config = configOf _vehicle; _config = [_config, _x] call FUNC(getTurretConfigPath); diff --git a/addons/common/functions/fnc_getInPosition.sqf b/addons/common/functions/fnc_getInPosition.sqf index a45b5546a6..ef012a33b4 100644 --- a/addons/common/functions/fnc_getInPosition.sqf +++ b/addons/common/functions/fnc_getInPosition.sqf @@ -28,7 +28,7 @@ _position = toLower _position; // general if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false}; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _turret = []; private _isInside = vehicle _unit == _vehicle; @@ -206,7 +206,7 @@ switch (_position) do { // this will execute all config based event handlers. Not script based ones unfortunately, but atleast we don't use any. private _fnc_getInEH = { // config based getIn EHs are assigned to the soldier, not the vehicle. Why Bis? Why? - private _config = configFile >> "CfgVehicles" >> typeOf _unit >> "EventHandlers"; + private _config = configOf _unit >> "EventHandlers"; if (isClass _config) then { //getIn is local effects with global arguments. It doesn't trigger if the unit was already inside and only switched seats diff --git a/addons/common/functions/fnc_getLightProperties.sqf b/addons/common/functions/fnc_getLightProperties.sqf index 002868dd4e..635284ade4 100644 --- a/addons/common/functions/fnc_getLightProperties.sqf +++ b/addons/common/functions/fnc_getLightProperties.sqf @@ -22,7 +22,7 @@ params ["_vehicle", "_light"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Reflectors" >> _light; +private _config = configOf _vehicle >> "Reflectors" >> _light; private _intensity = getNumber (_config >> "intensity"); private _position = getText (_config >> "position"); diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf index f6ca81175b..cbea1511eb 100644 --- a/addons/common/functions/fnc_getMGRSdata.sqf +++ b/addons/common/functions/fnc_getMGRSdata.sqf @@ -26,7 +26,7 @@ private _lat = -1 * getNumber (configFile >> "CfgWorlds" >> _map >> "latitude"); private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset"); private _mapData = _map call FUNC(getMapData); -if (!(_mapData isEqualTo [])) then { +if (_mapData isNotEqualTo []) then { _lat = _mapData select 0; _altitude = _mapData select 1; }; diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf index f5e91e427e..08d5820309 100644 --- a/addons/common/functions/fnc_getMapGridData.sqf +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -23,7 +23,7 @@ GVAR(mapGridData) = []; private _cfgGrid = configFile >> "CfgWorlds" >> worldName >> "Grid"; private _offsetX = getNumber (_cfgGrid >> "offsetX"); private _offsetY = getNumber (_cfgGrid >> "offsetY"); -private _zoomMax = 1e99; +private _zoomMax = 1e38; private _formatX = ""; private _formatY = ""; private _stepX = 1e10; diff --git a/addons/common/functions/fnc_getMarkerType.sqf b/addons/common/functions/fnc_getMarkerType.sqf index 1541074a07..7f44861769 100644 --- a/addons/common/functions/fnc_getMarkerType.sqf +++ b/addons/common/functions/fnc_getMarkerType.sqf @@ -23,9 +23,9 @@ private _side = side _leader; if (_vehicle == _leader) exitWith { if ( - getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "detectSkill") > 20 || - getNumber (configFile >> "CfgVehicles" >> typeOf _leader >> "camouflage") < 1 || - getText (configFile >> "CfgVehicles" >> typeOf _leader >> "textsingular") == "diver" + getNumber (configOf _leader >> "detectSkill") > 20 || + getNumber (configOf _leader >> "camouflage") < 1 || + getText (configOf _leader >> "textsingular") == "diver" ) then { ["n_recon", "b_recon", "o_recon"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) } else { @@ -33,16 +33,16 @@ if (_vehicle == _leader) exitWith { }; }; -if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") == 1) exitWith { +if (getNumber (configOf _vehicle >> "attendant") == 1) exitWith { ["n_med", "b_med", "o_med"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) }; if ( - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportRepair") > 0 || - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportFuel") > 0 || - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportAmmo") > 0 || - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "ACE_canRepair") > 0 || - getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "ACE_fuelCapacityCargo") > 0 + getNumber (configOf _vehicle >> "transportRepair") > 0 || + getNumber (configOf _vehicle >> "transportFuel") > 0 || + getNumber (configOf _vehicle >> "transportAmmo") > 0 || + getNumber (configOf _vehicle >> "ACE_canRepair") > 0 || + getNumber (configOf _vehicle >> "ACE_fuelCapacityCargo") > 0 ) exitWith { ["n_maint", "b_maint", "o_maint"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) }; @@ -59,7 +59,7 @@ if (_vehicle isKindOf "StaticMortar") exitWith { ["n_mortar", "b_mortar", "o_mortar"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) }; -if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "artilleryScanner") == 1) exitWith { +if (getNumber (configOf _vehicle >> "artilleryScanner") == 1) exitWith { ["n_art", "b_art", "o_art"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) }; @@ -68,7 +68,7 @@ if (_vehicle isKindOf "Car") exitWith { }; if (_vehicle isKindOf "Tank") exitWith { - if (getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "transportSoldier") > 0) then { + if (getNumber (configOf _vehicle >> "transportSoldier") > 0) then { ["n_mech_inf", "b_mech_inf", "o_mech_inf"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) } else { ["n_armor", "b_armor", "o_armor"] select ((["GUER", "WEST", "EAST"] find str _side) max 0) diff --git a/addons/common/functions/fnc_getName.sqf b/addons/common/functions/fnc_getName.sqf index 0bcce9d2c8..7d9dd35803 100644 --- a/addons/common/functions/fnc_getName.sqf +++ b/addons/common/functions/fnc_getName.sqf @@ -27,7 +27,7 @@ if (_unit isKindOf "CAManBase") then { if (_showEffective) then { _name = [effectiveCommander _unit, false, _useRaw] call FUNC(getName); } else { - _name = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName"); + _name = getText (configOf _unit >> "displayName"); }; }; diff --git a/addons/common/functions/fnc_getPylonTurret.sqf b/addons/common/functions/fnc_getPylonTurret.sqf index b27e6eb582..cc6d3c6635 100644 --- a/addons/common/functions/fnc_getPylonTurret.sqf +++ b/addons/common/functions/fnc_getPylonTurret.sqf @@ -1,14 +1,14 @@ #include "script_component.hpp" /* * Author: PabstMirror - * Finds turret owner of a pylon. + * Returns the turret path that owns the given pylon. * * Arguments: * 0: Vehicle * 1: Pylon Index (starting at 0) * * Return Value: - * * Turret index (either [-1] or [0]) + * Turret Path (either [-1] or [0]) * * Example: * [cursorObject, 0] call ace_common_fnc_getPylonTurret @@ -18,46 +18,4 @@ params ["_vehicle", "_pylonIndex"]; -// See if index is in ace_pylonTurrets setVar on vehicle -private _pylonTurrets = _vehicle getVariable ["ace_pylonTurrets", []]; -private _returnValue = _pylonTurrets param [_pylonIndex, []]; - -if (!(_returnValue isEqualTo [])) then { - TRACE_1("Using ace_pylonTurrets value",_returnValue); -} else { - // Attempt to determine turret owner based on magazines in the vehicle - private _pyMags = getPylonMagazines _vehicle; - private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> typeOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; - if (_pylonIndex >= (count _pyMags)) exitWith {ERROR("out of bounds");}; - if (_pylonIndex >= (count _pylonConfigs)) exitWith {ERROR("out of bounds");}; - - private _targetMag = _pyMags select _pylonIndex; - private _inPilot = _targetMag in (_vehicle magazinesTurret [-1]); - private _inGunner = _targetMag in (_vehicle magazinesTurret [0]); - - if (_inPilot) then { - if (_inGunner) then { - TRACE_3("ambiguous - in both",_targetMag,_inPilot,_inGunner); - } else { - TRACE_3("Pilot Mag",_targetMag,_inPilot,_inGunner); - _returnValue = [-1]; - }; - } else { - if (_inGunner) then { - TRACE_3("Gunner Mag",_targetMag,_inPilot,_inGunner); - _returnValue = [0]; - } else { - TRACE_3("ambiguous - in neither",_targetMag,_inPilot,_inGunner); - }; - }; - - if (_returnValue isEqualTo []) then { // If not sure, just use config value - _returnValue = getArray ((_pylonConfigs select _pylonIndex) >> "turret"); - if (_returnValue isEqualTo []) then { - _returnValue = [-1]; - }; - }; -}; - -TRACE_3("",_vehicle,_pylonIndex,_returnValue); -_returnValue +getAllPylonsInfo _vehicle param [_pylonIndex, []] param [2, [-1]] diff --git a/addons/common/functions/fnc_getReflectorsWithSelections.sqf b/addons/common/functions/fnc_getReflectorsWithSelections.sqf index 97feca6e19..8d40642ae5 100644 --- a/addons/common/functions/fnc_getReflectorsWithSelections.sqf +++ b/addons/common/functions/fnc_getReflectorsWithSelections.sqf @@ -21,7 +21,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _hitpoints = []; private _selections = []; diff --git a/addons/common/functions/fnc_getTurretDirection.sqf b/addons/common/functions/fnc_getTurretDirection.sqf index 78db8bc8e6..1678eeaa32 100644 --- a/addons/common/functions/fnc_getTurretDirection.sqf +++ b/addons/common/functions/fnc_getTurretDirection.sqf @@ -28,16 +28,16 @@ private _gunEnd = getText (_turret >> "gunEnd"); TRACE_3("", _pov, _gunBeg, _gunEnd); // Pull the PIP pov or barrel direction, depending on how the model is set up -private _povPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _pov)); //@todo AGLToASL ? +private _povPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _pov); private _povDir = [0,0,0]; if (_pov == "pip0_pos") then { - private _pipDir = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition "pip0_dir")); + private _pipDir = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition "pip0_dir"); _povDir = _pipDir vectorDiff _povPos; } else { - private _gunBeginPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunBeg)); - private _gunEndPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunEnd)); + private _gunBeginPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _gunBeg); + private _gunEndPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _gunEnd); _povDir = _gunBeginPos vectorDiff _gunEndPos; }; diff --git a/addons/common/functions/fnc_getVehicleIcon.sqf b/addons/common/functions/fnc_getVehicleIcon.sqf index ce17a66bc2..3c3e4aa727 100644 --- a/addons/common/functions/fnc_getVehicleIcon.sqf +++ b/addons/common/functions/fnc_getVehicleIcon.sqf @@ -25,7 +25,7 @@ private _objectType = if (_object isEqualType objNull) then { } else { _object }; -private _cachedValue = GVAR(vehicleIconCache) getVariable _objectType; +private _cachedValue = GVAR(vehicleIconCache) get _objectType; if (isNil "_cachedValue") then { private _vehicleValue = getText (configfile >> "CfgVehicles" >> _objectType >> "icon"); @@ -41,7 +41,7 @@ if (isNil "_cachedValue") then { _cachedValue = _vehicleIconValue; }; - GVAR(vehicleIconCache) setVariable [_objectType, _cachedValue]; + GVAR(vehicleIconCache) set [_objectType, _cachedValue]; }; _cachedValue diff --git a/addons/common/functions/fnc_getVehicleUAVCrew.sqf b/addons/common/functions/fnc_getVehicleUAVCrew.sqf index 45d151bc30..b1b1ae002e 100644 --- a/addons/common/functions/fnc_getVehicleUAVCrew.sqf +++ b/addons/common/functions/fnc_getVehicleUAVCrew.sqf @@ -17,4 +17,4 @@ params [["_vehicle", objNull, [objNull]]]; -crew _vehicle select {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") == "UAVPilot"} // return +crew _vehicle select {getText (configOf _x >> "simulation") == "UAVPilot"} // return diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_hasHatch.sqf index 90053f43d9..ab6a25035d 100644 --- a/addons/common/functions/fnc_hasHatch.sqf +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -21,7 +21,7 @@ private _vehicle = vehicle _unit; if (_unit == _vehicle) exitWith {false}; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; if (getNumber (_config >> "hideProxyInCombat") != 1) exitWith {false}; diff --git a/addons/common/functions/fnc_headBugFix.sqf b/addons/common/functions/fnc_headBugFix.sqf index edea791f24..2c6c072c34 100644 --- a/addons/common/functions/fnc_headBugFix.sqf +++ b/addons/common/functions/fnc_headBugFix.sqf @@ -25,6 +25,8 @@ private _anim = animationState _unit; if (_unit != vehicle _unit || {!([_unit, objNull, ["isNotSitting"]] call FUNC(canInteractWith))}) exitWith {false}; +["ace_headBugFix", true] call FUNC(setDisableUserInputStatus); + private _pos = getPosATL _unit; private _dir = getDir _unit; @@ -47,4 +49,7 @@ deleteVehicle _dummy; [_unit, "headBugFix"] call FUNC(unhideUnit); titleCut ["", "PLAIN"]; + +["ace_headBugFix", false] call FUNC(setDisableUserInputStatus); + true diff --git a/addons/common/functions/fnc_isMedic.sqf b/addons/common/functions/fnc_isMedic.sqf index 9618a15548..43d7f6a7ea 100644 --- a/addons/common/functions/fnc_isMedic.sqf +++ b/addons/common/functions/fnc_isMedic.sqf @@ -17,6 +17,6 @@ params ["_unit"]; -private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant")]; +private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configOf _unit >> "attendant")]; _isMedic > 0 diff --git a/addons/common/functions/fnc_lightIntensityFromObject.sqf b/addons/common/functions/fnc_lightIntensityFromObject.sqf index 246424ae4d..e2099def69 100644 --- a/addons/common/functions/fnc_lightIntensityFromObject.sqf +++ b/addons/common/functions/fnc_lightIntensityFromObject.sqf @@ -82,7 +82,7 @@ if (_lightSource isKindOf "CAManBase") then { if (isCollisionLightOn _lightSource) then { private _markerLights = [ _lightSource, - {configProperties [configFile >> "CfgVehicles" >> typeOf _this >> "MarkerLights", "isClass _x", true]}, + {configProperties [configOf _this >> "MarkerLights", "isClass _x", true]}, uiNamespace, format [QEGVAR(cache,MarkerLights_%1), typeOf _lightSource], 1E11 diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf index a2d810444d..160344258b 100644 --- a/addons/common/functions/fnc_loadPerson.sqf +++ b/addons/common/functions/fnc_loadPerson.sqf @@ -30,7 +30,15 @@ if (isNull _vehicle) then { }; if (!isNull _vehicle) then { - [_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide); + switch (true) do { + case ((crew _vehicle isEqualTo []) && {side group _caller != side group _unit}): { + [_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide); + }; + case (side group _vehicle != side group _unit): { + [_unit, true, GROUP_SWITCH_ID, side group _vehicle] call FUNC(switchToGroupSide); + }; + }; + TRACE_3("sending ace_loadPersonEvent",_unit,_vehicle,_caller); ["ace_loadPersonEvent", [_unit, _vehicle, _caller], _unit] call CBA_fnc_targetEvent; }; diff --git a/addons/common/functions/fnc_loadPersonLocal.sqf b/addons/common/functions/fnc_loadPersonLocal.sqf index 0426a94582..8490bf70e9 100644 --- a/addons/common/functions/fnc_loadPersonLocal.sqf +++ b/addons/common/functions/fnc_loadPersonLocal.sqf @@ -21,11 +21,30 @@ params ["_unit", "_vehicle", ["_caller", objNull]]; TRACE_3("loadPersonLocal",_unit,_vehicle,_caller); private _slotsOpen = false; -if ((_vehicle emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false])} || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "ejectDeadCargo")) == 0}) then { +if ((_vehicle emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false]) || {(getNumber (configOf _vehicle >> "ejectDeadCargo")) == 0}}) then { _unit moveInCargo _vehicle; + TRACE_1("moveInCargo",_vehicle); _slotsOpen = true; } else { - if (_vehicle emptyPositions "gunner" > 0) then { + // Check if an empty turret is available + // This already excludes FFV seats, which count as cargo positions + private _turrets = fullCrew [_vehicle, "turret", true]; + private _index = _turrets findIf {isNull (_x#0)}; + if (_index >= 0) exitWith { + _unit moveInTurret [_vehicle, _turrets#_index#3]; + TRACE_2("moveInTurret",_vehicle,_turrets#_index#3); + _slotsOpen = true; + }; + + // Check if the commander seat is available + if (_vehicle emptyPositions "commander" > 0) exitWith { + _unit moveInCommander _vehicle; + TRACE_1("moveInCommander",_vehicle); + _slotsOpen = true; + }; + + // Lastly, check if the gunner seat is available + if (_vehicle emptyPositions "gunner" > 0) exitWith { _unit moveInGunner _vehicle; _slotsOpen = true; }; diff --git a/addons/common/functions/fnc_moduleLSDVehicles.sqf b/addons/common/functions/fnc_moduleLSDVehicles.sqf index 97ce3833eb..e006463d1e 100644 --- a/addons/common/functions/fnc_moduleLSDVehicles.sqf +++ b/addons/common/functions/fnc_moduleLSDVehicles.sqf @@ -17,14 +17,14 @@ params ["", "_units", "_activated"]; -if !(_activated) exitWith {}; +if (!_activated || {GVAR(epilepsyFriendlyMode)}) exitWith {}; if (isNil QGVAR(LSD_Vehicles)) then { GVAR(LSD_Vehicles) = []; }; { - _hSCount = count (getArray (configFile >> "CfgVehicles" >> typeOf _x >> "hiddenSelections")); + _hSCount = count (getArray (configOf _x >> "hiddenSelections")); if (_hSCount > 0) then { GVAR(LSD_Vehicles) pushBack [_x, _hSCount]; }; diff --git a/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf b/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf index aba75ff60f..03a01cf395 100644 --- a/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf +++ b/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf @@ -5,22 +5,29 @@ * * Arguments: * 0: Unit - * 1: Distance + * 1: Distance + * 2: Restriceted to cargo only * * Return Value: * Nearest vehicles with a free seat * * Example: - * [bob] call ace_common_fnc_nearestVehiclesFreeSeat + * [cursorObject] call ace_common_fnc_nearestVehiclesFreeSeat * * Public: Yes */ -params ["_unit", ["_distance", 10]]; +params ["_unit", ["_distance", 10], ["_cargoOnly", false]]; private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F", "Pod_Heli_Transport_04_crewed_base_F"], _distance]; _nearVehicles select { // Filter cargo seats that will eject unconscious units (e.g. quad bike) - ((_x emptyPositions "cargo" > 0) && {!(_unit getVariable ['ACE_isUnconscious', false])} || {(getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> "ejectDeadCargo")) == 0}) - || {_x emptyPositions "gunner" > 0} + private _canSitInCargo = (!(_unit getVariable ['ACE_isUnconscious', false])) || {(getNumber (configOf _x >> "ejectDeadCargo")) == 0}; + ((fullCrew [_x, "", true]) findIf { + _x params ["_body", "_role", "_cargoIndex"]; + (isNull _body) // seat empty + && {_role != "DRIVER"} // not driver seat + && {_canSitInCargo || {_cargoIndex == -1}} // won't be ejected (uncon) + && {(!_cargoOnly) || {_cargoIndex != -1}} // not restricted (captive) + }) > -1 } diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index 9b52796569..6639b21948 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -44,7 +44,7 @@ _ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safezoneW / (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlCommit 0; [{ - (_this select 0) params ["_args", "_onFinish", "_onFail", "_condition", "_player", "_startTime", "_totalTime", "_exceptions"]; + (_this select 0) params ["_args", "_onFinish", "_onFail", "_condition", "_player", "_startTime", "_totalTime", "_exceptions", "_title"]; private _elapsedTime = CBA_missionTime - _startTime; private _errorCode = -1; @@ -95,6 +95,16 @@ _ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safezoneW / }; } else { //Update Progress Bar (ratio of elepased:total) - (uiNamespace getVariable QGVAR(ctrlProgressBar)) progressSetPosition (_elapsedTime / _totalTime); + private _ratio = _elapsedTime / _totalTime; + (uiNamespace getVariable QGVAR(ctrlProgressBar)) progressSetPosition _ratio; + switch (GVAR(progressBarInfo)) do { + case 0: {}; + case 1: { + (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText (_title + format [" (%1", floor (_ratio * 100)] + "%)"); + }; + case 2: { + (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText (_title + " " + format [localize LSTRING(TimeLeft), ceil (_totalTime - _elapsedTime)]); + }; + }; }; -}, 0, [_args, _onFinish, _onFail, _condition, _player, CBA_missionTime, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler; +}, 0, [_args, _onFinish, _onFail, _condition, _player, CBA_missionTime, _totalTime, _exceptions, _localizedTitle]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/common/functions/fnc_registerItemReplacement.sqf b/addons/common/functions/fnc_registerItemReplacement.sqf index d70a718193..4f8429678c 100644 --- a/addons/common/functions/fnc_registerItemReplacement.sqf +++ b/addons/common/functions/fnc_registerItemReplacement.sqf @@ -28,16 +28,22 @@ private _fnc_replaceItems = { if (_items isEqualTo GVAR(oldItems)) exitWith {}; private _newItems = _items - GVAR(oldItems); + _newItems = _newItems arrayIntersect _newItems; // Get unique items only if (_newItems isEqualTo []) exitWith { GVAR(oldItems) = _items; }; - _newItems sort true; // Sort so all items of current class can be replaced at once private _cfgWeapons = configFile >> "CfgWeapons"; // Microoptimization for "_i" from 0 to count _newItems - 1 do { private _item = _newItems#_i; + // Get count of item in each container + private _containerCount = []; + { + _containerCount pushBack ({_x == _item} count _x) + } forEach [uniformItems _unit, vestItems _unit, backpackItems _unit]; + // Determine replacement items: direct replacements, ... private _replacements = GVAR(itemReplacements) getVariable [_item, []]; @@ -54,21 +60,24 @@ private _fnc_replaceItems = { }; } forEach GVAR(inheritedReplacements); - // Skip lookup for all following items of this class - private _count = 1; - while {_newItems#(_i + 1) == _item} do { // (i+1) can be out of bounds, but should fail safely - _count = _count + 1; - _i = _i + 1; - }; - // Replace all items of current class in list - if !(_replacements isEqualTo []) then { + if (_replacements isNotEqualTo []) then { TRACE_3("replace",_item,_count,_replacements); _unit removeItems _item; - for "_j" from 1 to _count do { - { [_unit, _x] call FUNC(addToInventory) } forEach _replacements; - }; + { + if (_x == 0) then {continue}; + private _container = ["uniform", "vest", "backpack"] select _forEachIndex; + for "_j" from 1 to _x do { + { + if ([_unit, _x, 1, _container == "uniform", _container == "vest", _container == "backpack"] call CBA_fnc_canAddItem) then { + [_unit, _x, _container] call FUNC(addToInventory) // add to specific container + } else { + [_unit, _x, ""] call FUNC(addToInventory) // no room, add anywhere + } + } forEach _replacements; + } + } forEach _containerCount; }; }; @@ -98,7 +107,7 @@ if (_newItems isEqualType "") then { private _oldReplacements = GVAR(itemReplacements) getVariable [_oldItem, []]; _oldReplacements append _newItems; -GVAR(itemReplacements) setVariable [_oldItem, _newItems]; +GVAR(itemReplacements) setVariable [_oldItem, _oldReplacements]; // Force item scan when new replacement was registered in PostInit if (!isNull ACE_player) then { diff --git a/addons/common/functions/fnc_removeSpecificMagazine.sqf b/addons/common/functions/fnc_removeSpecificMagazine.sqf index 141aa28526..8da754ce32 100644 --- a/addons/common/functions/fnc_removeSpecificMagazine.sqf +++ b/addons/common/functions/fnc_removeSpecificMagazine.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" /* * Author: esteldunedain - * Removes a magazine from the unit that has an specific ammo count + * Removes a magazine from the unit or object that has a specific ammo count * * Arguments: * 0: Unit @@ -9,7 +9,7 @@ * 2: Ammo count * * Return Value: - * None + * Magazine Removed * * Example: * [bob, "magazine", 5] call ace_common_fnc_removeSpecificMagazine @@ -21,62 +21,35 @@ params [["_unit", objNull, [objNull]], ["_magazineType", "", [""]], ["_ammoCount private _isRemoved = false; -// Check uniform -private _magazines = magazinesAmmoCargo uniformContainer _unit select {_x select 0 == _magazineType}; -private _index = _magazines find [_magazineType, _ammoCount]; +private _fnc_removeMagazine = { + params ["_container", "_magArray"]; + _magArray params ["_magazineType", "_ammoCount"]; -if (_index > -1) exitWith { - { - _unit removeItemFromUniform (_x select 0); - false - } count _magazines; + private _allMagazines = magazinesAmmoCargo _container; + private _specificMagazineIndex = _allMagazines findIf {_x isEqualTo _magArray}; + _allMagazines deleteAt _specificMagazineIndex; - { - if (!_isRemoved && (_x isEqualTo [_magazineType,_ammoCount])) then { - _isRemoved = true; - } else { - (uniformContainer _unit) addMagazineAmmoCargo [_x select 0, 1, _x select 1]; + if (_specificMagazineIndex > -1) exitWith { + clearMagazineCargoGlobal _container; + private _containerType = typeOf _container; + if (_containerType in ["GroundWeaponHolder", "WeaponHolderSimulated"]) then { + _container = createVehicle [_containerType, getPosATL _container, [], 0, "CAN_COLLIDE"]; }; - false - } count _magazines; + { + _container addMagazineAmmoCargo [_x select 0, 1, _x select 1]; + } forEach _allMagazines; + true + }; + false }; -// Check vest -_magazines = magazinesAmmoCargo vestContainer _unit select {_x select 0 == _magazineType}; -_index = _magazines find [_magazineType, _ammoCount]; - -if (_index > -1) exitWith { - { - _unit removeItemFromVest (_x select 0); - false - } count _magazines; - - { - if (!_isRemoved && (_x isEqualTo [_magazineType,_ammoCount])) then { - _isRemoved = true; - } else { - (vestContainer _unit) addMagazineAmmoCargo [_x select 0, 1, _x select 1]; - }; - false - } count _magazines; +private _containerArray = [_unit]; +if (_unit isKindOf "CAManBase") then { + _containerArray = [uniformContainer _unit, vestContainer _unit, backpackContainer _unit]; }; -// Check backpack -_magazines = magazinesAmmoCargo backpackContainer _unit select {_x select 0 == _magazineType}; -_index = _magazines find [_magazineType, _ammoCount]; +{ + if ([_x, [_magazineType, _ammoCount]] call _fnc_removeMagazine) exitWith {_isRemoved = true}; +} forEach _containerArray; -if (_index > -1) exitWith { - { - _unit removeItemFromBackpack (_x select 0); - false - } count _magazines; - - { - if (!_isRemoved && (_x isEqualTo [_magazineType,_ammoCount])) then { - _isRemoved = true; - } else { - (backpackContainer _unit) addMagazineAmmoCargo [_x select 0, 1, _x select 1]; - }; - false - } count _magazines; -}; +_isRemoved diff --git a/addons/common/functions/fnc_removeSyncedEventHandler.sqf b/addons/common/functions/fnc_removeSyncedEventHandler.sqf index 5e9eb48aa7..51d7d1df66 100644 --- a/addons/common/functions/fnc_removeSyncedEventHandler.sqf +++ b/addons/common/functions/fnc_removeSyncedEventHandler.sqf @@ -17,13 +17,13 @@ params ["_name"]; -if !([GVAR(syncedEvents), _name] call CBA_fnc_hashHasKey) exitWith { +if !(_name in GVAR(syncedEvents)) exitWith { ERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name); false }; -private _data = [GVAR(syncedEvents), _name] call CBA_fnc_hashGet; +private _data = GVAR(syncedEvents) get _name; _data params ["", "", "", "_eventId"]; [_eventId] call CBA_fnc_removeEventHandler; -[GVAR(syncedEvents), _name] call CBA_fnc_hashRem; +GVAR(syncedEvents) deleteAt _name; diff --git a/addons/common/functions/fnc_runTests.sqf b/addons/common/functions/fnc_runTests.sqf index 4e937d87b6..019055443c 100644 --- a/addons/common/functions/fnc_runTests.sqf +++ b/addons/common/functions/fnc_runTests.sqf @@ -31,7 +31,7 @@ INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest); private _testFile = getText _x; diag_log text format ["----- Starting Testing %1 [%2] -----", _testName, _testFile]; private _return = ([nil] apply (compile preProcessFileLineNumbers _testFile)) select 0; - if ((isNil "_return") || {!(_return isEqualTo true)}) then { + if ((isNil "_return") || {_return isNotEqualTo true}) then { systemChat format ["Test [%1] Failed", _testName]; diag_log text format ["----- Finished Testing %1 [Failed] -----", _testName]; _fails pushBack _testName; @@ -43,6 +43,6 @@ INFO_1("ace_common_fnc_runTests starting for [%1]", _specificTest); INFO_1("ace_common_fnc_runTests finished in %1 ms", (1000 * (diag_tickTime - _startTime)) toFixed 1); INFO_2("[%1 / %2] Tests Passed", (_total - (count _fails)), _total); -if (!(_fails isEqualTo [])) then { +if (_fails isNotEqualTo []) then { INFO_1("Failed: %1", _fails); }; diff --git a/addons/common/functions/fnc_setVariablePublic.sqf b/addons/common/functions/fnc_setVariablePublic.sqf index 067765fc27..ba58308243 100644 --- a/addons/common/functions/fnc_setVariablePublic.sqf +++ b/addons/common/functions/fnc_setVariablePublic.sqf @@ -46,7 +46,7 @@ TRACE_2("Starting Embargo", _varName, _delay); TRACE_4("End of embargo", _object, _varName, _value, _curValue); //If value at start of embargo doesn't equal current, then broadcast and start new embargo - if (!(_value isEqualTo _curValue)) then { + if (_value isNotEqualTo _curValue) then { _this set [2, _curValue]; _this call FUNC(setVariablePublic); }; diff --git a/addons/common/functions/fnc_setVolume.sqf b/addons/common/functions/fnc_setVolume.sqf index 01de0b2802..b4d0423d0e 100644 --- a/addons/common/functions/fnc_setVolume.sqf +++ b/addons/common/functions/fnc_setVolume.sqf @@ -33,11 +33,9 @@ if (_setVolume) then { // TFAR _unit setVariable ["tf_voiceVolume", NORMAL_LEVEL, true]; _unit setVariable ["tf_globalVolume", NORMAL_LEVEL]; - _unit setVariable ["tf_unable_to_use_radio", false]; // ACRE2 if (!isNil "acre_api_fnc_setGlobalVolume") then { [NORMAL_LEVEL^0.33] call acre_api_fnc_setGlobalVolume; }; - _unit setVariable ["acre_sys_core_isDisabled", false, true]; } else { // Vanilla Game @@ -46,9 +44,7 @@ if (_setVolume) then { // TFAR _unit setVariable ["tf_voiceVolume", NO_SOUND, true]; _unit setVariable ["tf_globalVolume", MUTED_LEVEL]; - _unit setVariable ["tf_unable_to_use_radio", true]; // ACRE2 if (!isNil "acre_api_fnc_setGlobalVolume") then { [MUTED_LEVEL^0.33] call acre_api_fnc_setGlobalVolume; }; - _unit setVariable ["acre_sys_core_isDisabled", true, true]; }; diff --git a/addons/common/functions/fnc_showHud.sqf b/addons/common/functions/fnc_showHud.sqf index 86d9e3be8e..8d6bfb8e9d 100644 --- a/addons/common/functions/fnc_showHud.sqf +++ b/addons/common/functions/fnc_showHud.sqf @@ -42,15 +42,15 @@ if (_reason != "") then { _reason = toLower _reason; if (_mask isEqualTo []) then { TRACE_2("Removing", _reason, _mask); - [GVAR(showHudHash), _reason] call CBA_fnc_hashRem; + GVAR(showHudHash) deleteAt _reason; } else { while {(count _mask) < 10} do { _mask pushBack true; }; TRACE_2("Setting", _reason, _mask); - [GVAR(showHudHash), _reason, _mask] call CBA_fnc_hashSet; + GVAR(showHudHash) set [_reason, _mask]; }; }; -GVAR(showHudHash) params ["", "_reasons", "_masks"]; +private _masks = values GVAR(showHudHash); private _resultMask = []; for "_index" from 0 to 9 do { @@ -63,7 +63,7 @@ for "_index" from 0 to 9 do { _resultMask pushBack _set; }; -TRACE_2("showHud", _resultMask, _reasons); +TRACE_2("showHud", _resultMask, keys GVAR(showHudHash)); showHud _resultMask; _resultMask diff --git a/addons/common/functions/fnc_statusEffect_addType.sqf b/addons/common/functions/fnc_statusEffect_addType.sqf index 6be61967d9..2a1efdc9d8 100644 --- a/addons/common/functions/fnc_statusEffect_addType.sqf +++ b/addons/common/functions/fnc_statusEffect_addType.sqf @@ -27,7 +27,7 @@ GVAR(statusEffect_Names) pushBack _name; GVAR(statusEffect_isGlobal) pushBack _isGlobal; //We add reasons at any time, but more efficenet to add all common ones at one time during init -if (isServer && {!(_commonReasonsArray isEqualTo [])}) then { +if (isServer && {_commonReasonsArray isNotEqualTo []}) then { //Switch case to lower: _commonReasonsArray = _commonReasonsArray apply { toLower _x }; missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true]; diff --git a/addons/common/functions/fnc_syncedEvent.sqf b/addons/common/functions/fnc_syncedEvent.sqf index 9ddb071dac..dbcf7f621b 100644 --- a/addons/common/functions/fnc_syncedEvent.sqf +++ b/addons/common/functions/fnc_syncedEvent.sqf @@ -19,7 +19,7 @@ params ["_name", "_args", ["_ttl", 0]]; -if !([GVAR(syncedEvents), _name] call CBA_fnc_hashHasKey) exitWith { +if !(_name in GVAR(syncedEvents)) exitWith { ERROR_1("Synced event key [%1] not found (syncedEvent).", _name); false }; diff --git a/addons/common/functions/fnc_syncedEventPFH.sqf b/addons/common/functions/fnc_syncedEventPFH.sqf index 6d5d2ea12c..8f356ed433 100644 --- a/addons/common/functions/fnc_syncedEventPFH.sqf +++ b/addons/common/functions/fnc_syncedEventPFH.sqf @@ -21,9 +21,8 @@ if (!isServer) exitWith {false}; // Walk through the local synced events and clean up anything thats already EOL // @TODO: This should be iteration limited to prevent FPS lag -[GVAR(syncedEvents), { - _value params ["_eventTime", "_eventLog", "_globalEventTTL"]; - +{ + _y params ["_eventTime", "_eventLog", "_globalEventTTL"]; private _newEventLog = []; // @TODO: This should be iteration limited to prevent FPS lag @@ -52,11 +51,8 @@ if (!isServer) exitWith {false}; if (_ttlReturn) then { _newEventLog pushBack _x; }; - false - } count _eventLog; - - _value set [1, _newEventLog]; - false -}] call CBA_fnc_hashEachPair; + } forEach _eventLog; + _y set [1, _newEventLog]; +} forEach GVAR(syncedEvents); // @TODO: Next, detect if we had a new request from a JIP player, and we need to continue syncing events diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index d51f911eaf..21c16f8f6d 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -47,7 +47,22 @@ unassignVehicle _unit; [_unit] orderGetIn false; TRACE_1("Ejecting", alive _unit); -_unit action ["Eject", vehicle _unit]; +private _vehicle = vehicle _unit; +if (local _vehicle) then { + _unit action ["Eject", _vehicle]; + // Failsafe - sometimes eject alone doesn't work, but moveOut does + [{ + params ["_unit"]; + + if (vehicle _unit != _unit) then { + WARNING_1("UnloadPersonLocal [%1] did not eject normally",_unit); + moveOut _unit; + }; + }, [_unit], 1] call CBA_fnc_waitAndExecute; + +} else { + moveOut _unit; +}; [{ params ["_unit", "_emptyPos"]; diff --git a/addons/common/initSettings.sqf b/addons/common/initSettings.sqf index fcaa242ac3..77e1521e15 100644 --- a/addons/common/initSettings.sqf +++ b/addons/common/initSettings.sqf @@ -1,3 +1,68 @@ +private _category = localize LSTRING(ACEKeybindCategoryCommon); + +[ + QGVAR(checkPBOsAction), + "LIST", + [LSTRING(CheckPBOsAction), LSTRING(CheckPBOsActionDesc)], + _category, + [[0, 1, 2], [LSTRING(CheckPBO_Action_WarnOnce), LSTRING(CheckPBO_Action_WarnPerm), LSTRING(CheckPBO_Action_Kick)], 0], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(checkPBOsCheckAll), + "CHECKBOX", + [LSTRING(CheckPBOsCheckAll), LSTRING(CheckPBOsCheckAllDesc)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(checkPBOsWhitelist), + "EDITBOX", + [LSTRING(CheckPBOsWhitelist), LSTRING(CheckPBOsWhiteListDesc)], + _category, + "[]", + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(settingFeedbackIcons), + "LIST", + [LSTRING(SettingFeedbackIconsName), LSTRING(SettingFeedbackIconsDesc)], + _category, + [[0, 1, 2, 3, 4], [ELSTRING(optionsmenu,Hide), ELSTRING(optionsmenu,TopRightDown), ELSTRING(optionsmenu,TopRightLeft), ELSTRING(optionsmenu,TopLeftDown), ELSTRING(optionsmenu,TopLeftRight)], 1], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(settingProgressBarLocation), + "LIST", + [LSTRING(SettingProgressBarLocationName), LSTRING(SettingProgressBarLocationDesc)], + _category, + [[0, 1], [ELSTRING(optionsmenu,Top), ELSTRING(optionsmenu,Bottom)], 0], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(displayTextColor), + "COLOR", + [LSTRING(SettingDisplayTextColorName),LSTRING(SettingDisplayTextColorDesc)], + _category, + [0, 0, 0, 0.1], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(displayTextFontColor), + "COLOR", + [LSTRING(SettingDisplayTextFontColorName),LSTRING(SettingDisplayTextFontColorDesc)], + _category, + [1, 1, 1, 1], + 0 +] call CBA_fnc_addSetting; + [ QGVAR(persistentLaserEnabled), "CHECKBOX", @@ -6,13 +71,31 @@ false, false, LINKFUNC(switchPersistentLaser) -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowFadeMusic), "CHECKBOX", [LSTRING(AllowFadeMusic), LSTRING(AllowFadeMusicTooltip)], - localize LSTRING(ACEKeybindCategoryCommon), + _category, true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(epilepsyFriendlyMode), + "CHECKBOX", + [LSTRING(EpilepsyFriendlyMode), LSTRING(EpilepsyFriendlyModeTooltip)], + format ["ACE %1", localize LSTRING(DisplayName)], + false, + 2 +] call CBA_fnc_addSetting; + +[ + QGVAR(progressBarInfo), + "LIST", + [LSTRING(progressBarInfoName), LSTRING(progressBarInfoDesc)], + format ["ACE %1", localize LSTRING(DisplayName)], + [[0, 1, 2], [LSTRING(None), LSTRING(progressBarInfoPercentage), LSTRING(progressBarInfoTime)], 2], + 0 +] call CBA_fnc_addSetting; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index fb94add8b6..121d62805b 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -10,7 +10,7 @@ 通用 일반 Ogólny - Общий + Общие Comum Común Obecné @@ -27,7 +27,7 @@ ACE-Team ACE-Team ACE-Team - ACE-チーム + ACE チーム ACE-Team ACE-製作團隊 ACE-制作团队 @@ -1296,6 +1296,23 @@ 没有空间可卸载 언로드 할 공간이 없습니다. + + No inventory space + Kein Platz im Inventar + Sin espacio en inventario + Brak miejsca w ekwipunku + Pas de place dans l'inventaire + Nedostatek místa v inventáři + Sem espaço no inventário + Non hai più spazio + Nincs több hely + В инвентаре нет места + インベントリに空きがない + 넣을 공간이 없음 + 無可用空間 + 无可用空间 + Envanter de alan yok + Toggle переключить @@ -1362,6 +1379,18 @@ Permitir a los scripts de ACE reducir el volumen la música ACE scripti müziği kısmana izin verir + + Epilepsy friendly mode + Epilepsiefreundlicher Modus + けいれん回避モード + Tryb dla epileptyków + + + Disables some flashing light effects to reduce seizure risk. + Deaktiviert einige Lichtflackereffekte um das Risiko von Epilepsieanfällen zu reduzieren. + 点滅する光エフェクトを無効化し、けいれんする恐れを低下させます。 + Wyłącz część migających efektów w celu zredukowania ryzyka napadu epilepsji + Flag (ACE - Black) Flagge (Ace - Schwarz) @@ -1439,5 +1468,78 @@ Показывать действие в меню взаимодействия с собой. Kendi etkileşimim menüsünde animasyonları göster + + Both + İkisi de + 両方 + + + Additional progress bar information + プログレス バー詳細情報 + + + Controls extra information shown in progress bar. + プログレス バーへ表示される情報量を決定します。 + + + Percentage + パーセンテージ + + + Time remaining + 残り時間 + + + None + Žádná + Keine + Нет + Brak + Nessuna + Nada + Aucune + + なし + 활성화 없음 + Nenhuma + + Yok + + + Rename + Renombrar + Renommer + Umbenennen + Zmień nazwę + 改名 + Rinomina + 이름바꾸기 + 重新命名 + 重新命名 + Переименовать + Renomear + Přejmenovat + Yeniden adlandır + + + Time left: %1s + 残り時間: %1 秒 + + + Locations Boost Training + Zdravotnická místa zvyšují zdravotnickou úrovně + Sedi per potenziare la formazione + Örtliche Trainingssteigerung + Ubicación mejora entrenamiento. + Miejsca zwiększają wyszkolenie + Localização melhora treinamento + Le lieu améliore l'efficacité + Места ускоренного обучения + 衛生能力の上昇位置 + 교육 증가 지역 + 受所在位置影响提升医疗能力 + 受所在位置影響提升醫療能力 + Konumlar Tedaviyi Hızlandırır + diff --git a/addons/concertina_wire/CfgEventHandlers.hpp b/addons/concertina_wire/CfgEventHandlers.hpp index 18883ae839..b1d111b15e 100644 --- a/addons/concertina_wire/CfgEventHandlers.hpp +++ b/addons/concertina_wire/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/concertina_wire/CfgVehicles.hpp b/addons/concertina_wire/CfgVehicles.hpp index 77b2c97d18..d8c80f68a9 100644 --- a/addons/concertina_wire/CfgVehicles.hpp +++ b/addons/concertina_wire/CfgVehicles.hpp @@ -34,22 +34,22 @@ class CfgVehicles { source = "user"; animPeriod = 1e-007; }; - class wire_3: wire_2{}; - class wire_4: wire_2{}; - class wire_5: wire_2{}; - class wire_6: wire_2{}; - class wire_7: wire_2{}; - class wire_8: wire_2{}; - class wire_9: wire_2{}; - class wire_10: wire_2{}; - class wire_11: wire_2{}; - class wire_12: wire_2{}; - class wire_13: wire_2{}; - class wire_14: wire_2{}; - class wire_15: wire_2{}; - class wire_16: wire_2{}; - class wire_17: wire_2{}; - class wire_18: wire_2{}; + class wire_3: wire_2 {}; + class wire_4: wire_2 {}; + class wire_5: wire_2 {}; + class wire_6: wire_2 {}; + class wire_7: wire_2 {}; + class wire_8: wire_2 {}; + class wire_9: wire_2 {}; + class wire_10: wire_2 {}; + class wire_11: wire_2 {}; + class wire_12: wire_2 {}; + class wire_13: wire_2 {}; + class wire_14: wire_2 {}; + class wire_15: wire_2 {}; + class wire_16: wire_2 {}; + class wire_17: wire_2 {}; + class wire_18: wire_2 {}; class wire_2_1: wire_2 { animPeriod = 8; diff --git a/addons/concertina_wire/README.md b/addons/concertina_wire/README.md index e1e6530f5b..e21a61d291 100644 --- a/addons/concertina_wire/README.md +++ b/addons/concertina_wire/README.md @@ -2,10 +2,3 @@ ace_concertina_wire =============== Adds concertina wire. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf index b8beeb6a9e..58f04379fd 100644 --- a/addons/concertina_wire/functions/fnc_dismount.sqf +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -25,7 +25,7 @@ if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exit }; params ["_wire", "_unit"]; -private _config = (configFile >> "CfgVehicles" >> typeOf _unit); +private _config = (configOf _unit); private _delay = [45, 30] select ([_unit] call EFUNC(common,isEngineer) || {[_unit] call EFUNC(common,isEOD)}); // TODO: Animation? diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf index 6482ea718a..baaa8efe06 100644 --- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -96,8 +96,8 @@ if (_mode == 1) then { if (canMove _vehicle) then { { private _selectionPart = "hit" + _x; - if (isText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then { - private _selection = getText(configFile >> "CfgVehicles" >> typeOf _vehicle >> "hitpoints" >> _selectionPart >> "name"); + if (isText(configOf _vehicle >> "hitpoints" >> _selectionPart >> "name")) then { + private _selection = getText(configOf _vehicle >> "hitpoints" >> _selectionPart >> "name"); // TODO: Only the tires that have touched the wire should burst. _vehicle setHit [_selection, 1]; }; diff --git a/addons/cookoff/CfgEventHandlers.hpp b/addons/cookoff/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/cookoff/CfgEventHandlers.hpp +++ b/addons/cookoff/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/cookoff/CfgVehicles.hpp b/addons/cookoff/CfgVehicles.hpp index a4bdff1fd5..d2da771b01 100644 --- a/addons/cookoff/CfgVehicles.hpp +++ b/addons/cookoff/CfgVehicles.hpp @@ -15,24 +15,6 @@ class CfgVehicles { sound = QGVAR(CookOff_high); }; - class ThingX; - class GVAR(Turret_MBT_01): ThingX { - author = ECSTRING(common,ACETeam); - _generalMacro = QGVAR(Turret_MBT_01); - scope = 1; - displayName = CSTRING(generic_turret_wreck); - model = "\A3\Structures_F\Wrecks\Wreck_Slammer_turret_F.p3d"; - icon = "\A3\armor_f_gamma\MBT_01\Data\ui\map_slammer_mk4_ca.paa"; - }; - class GVAR(Turret_MBT_02): ThingX { - author = ECSTRING(common,ACETeam); - _generalMacro = QGVAR(Turret_MBT_02); - scope = 1; - displayName = CSTRING(generic_turret_wreck); - model = "\A3\Structures_F\Wrecks\Wreck_T72_turret_F.p3d"; - icon = "\A3\armor_f_gamma\MBT_02\Data\UI\map_MBT_02_ca.paa"; - }; - class Tank; class Tank_F: Tank { GVAR(ammoLocation) = "HitHull"; @@ -60,15 +42,6 @@ class CfgVehicles { GVAR(ignoreTurret) = 1; }; - class B_MBT_01_base_F; - class B_MBT_01_cannon_F: B_MBT_01_base_F { - GVAR(turret)[] = {QGVAR(Turret_MBT_01),{0,-1,0.5}}; - }; - - class O_MBT_02_base_F; - class O_MBT_02_cannon_F: O_MBT_02_base_F { - GVAR(turret)[] = {QGVAR(Turret_MBT_02),{0,-1,0}}; - }; class MRAP_01_base_F: Car_F { GVAR(engineSmokeOffset)[] = {0,-2,0}; diff --git a/addons/cookoff/XEH_PREP.hpp b/addons/cookoff/XEH_PREP.hpp index d2b63ac65d..b9708b7c58 100644 --- a/addons/cookoff/XEH_PREP.hpp +++ b/addons/cookoff/XEH_PREP.hpp @@ -1,9 +1,10 @@ -PREP(handleDamage); +PREP(handleDamageBox); PREP(engineFire); PREP(cookOff); +PREP(smoke); +PREP(cookOffEffect); PREP(cookOffBox); -PREP(blowOffTurret); PREP(detonateAmmunition); PREP(getVehicleAmmo); -PREP(handleDamageEjectIfDestroyed); + diff --git a/addons/cookoff/XEH_postInit.sqf b/addons/cookoff/XEH_postInit.sqf index 94fe8899de..889e252d90 100644 --- a/addons/cookoff/XEH_postInit.sqf +++ b/addons/cookoff/XEH_postInit.sqf @@ -1,114 +1,44 @@ #include "script_component.hpp" [QGVAR(engineFire), FUNC(engineFire)] call CBA_fnc_addEventHandler; -[QGVAR(cookOff), FUNC(cookOff)] call CBA_fnc_addEventHandler; +[QGVAR(cookOff), { + params ["_vehicle"]; + if (local _vehicle) then { + _this call FUNC(cookOff); + }; +}] call CBA_fnc_addEventHandler; +[QGVAR(cookOffEffect), FUNC(cookOffEffect)] call CBA_fnc_addEventHandler; +[QGVAR(smoke), FUNC(smoke)] call CBA_fnc_addEventHandler; [QGVAR(cookOffBox), FUNC(cookOffBox)] call CBA_fnc_addEventHandler; +[QGVAR(cleanupEffects), { + params ["_vehicle", ["_effects", []]]; + + _effects = _effects + (_vehicle getVariable [QGVAR(effects), []]); + if !(_effects isEqualTo []) then { + { deleteVehicle _x } count _effects; + }; +}] call CBA_fnc_addEventHandler; + GVAR(cacheTankDuplicates) = call CBA_fnc_createNamespace; -// cookoff and burning engine -["Tank", "init", { - params ["_vehicle"]; - - private _typeOf = typeOf _vehicle; - - if (isNil {GVAR(cacheTankDuplicates) getVariable _typeOf}) then { - private _hitpoints = (getAllHitPointsDamage _vehicle param [0, []]) apply {toLower _x}; - private _duplicateHitpoints = []; - - { - if ((_x != "") && {_x in (_hitpoints select [0,_forEachIndex])}) then { - _duplicateHitpoints pushBack _forEachIndex; - }; - } forEach _hitpoints; - - TRACE_2("dupes",_typeOf,_duplicateHitpoints); - GVAR(cacheTankDuplicates) setVariable [_typeOf, _duplicateHitpoints]; - }; - - _vehicle addEventHandler ["HandleDamage", { - ["tank", _this] call FUNC(handleDamage); - }]; -}, nil, nil, true] call CBA_fnc_addClassEventHandler; - -["Wheeled_APC_F", "init", { - params ["_vehicle"]; - - private _typeOf = typeOf _vehicle; - - if (isNil {GVAR(cacheTankDuplicates) getVariable _typeOf}) then { - private _hitpoints = (getAllHitPointsDamage _vehicle param [0, []]) apply {toLower _x}; - private _duplicateHitpoints = []; - - { - if ((_x != "") && {_x in (_hitpoints select [0,_forEachIndex])}) then { - _duplicateHitpoints pushBack _forEachIndex; - }; - } forEach _hitpoints; - - TRACE_2("dupes",_typeOf,_duplicateHitpoints); - GVAR(cacheTankDuplicates) setVariable [_typeOf, _duplicateHitpoints]; - }; - - _vehicle addEventHandler ["HandleDamage", { - ["tank", _this] call FUNC(handleDamage); - }]; -}, nil, nil, true] call CBA_fnc_addClassEventHandler; - -["Car", "init", { - params ["_vehicle"]; - - _vehicle addEventHandler ["HandleDamage", { - ["car", _this] call FUNC(handleDamage); - }]; -}, nil, ["Wheeled_APC_F"], true] call CBA_fnc_addClassEventHandler; - ["ReammoBox_F", "init", { (_this select 0) addEventHandler ["HandleDamage", { if ((_this select 0) getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmobox)]) then { - ["box", _this] call FUNC(handleDamage); + _this call FUNC(handleDamageBox); }; }]; }, nil, nil, true] call CBA_fnc_addClassEventHandler; // secondary explosions ["AllVehicles", "killed", { - params ["_vehicle"]; - if (_vehicle getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmoCookoff)]) then { + params ["_vehicle", "", "", "_useEffects"]; + if ( + _useEffects && + _vehicle getVariable [QGVAR(enableAmmoCookoff), GVAR(enableAmmoCookoff)] + ) then { if (GVAR(ammoCookoffDuration) == 0) exitWith {}; ([_vehicle] call FUNC(getVehicleAmmo)) params ["_mags", "_total"]; [_vehicle, _mags, _total] call FUNC(detonateAmmunition); }; }, nil, ["Man","StaticWeapon"]] call CBA_fnc_addClassEventHandler; - -// blow off turret effect -["Tank", "killed", { - if ((_this select 0) getVariable [QGVAR(enable), GVAR(enable)] in [1, 2, true]) then { - if (random 1 < 0.15) then { - (_this select 0) call FUNC(blowOffTurret); - }; - }; -}] call CBA_fnc_addClassEventHandler; - -// event to add a turret to a curator if the vehicle already belonged to that curator -if (isServer) then { - [QGVAR(addTurretToEditable), { - params ["_vehicle", "_turret"]; - - { - if (_vehicle in curatorEditableObjects _x) then { - _x addCuratorEditableObjects [[_turret], false]; - }; - } forEach allCurators; - }] call CBA_fnc_addEventHandler; -}; - -// 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; diff --git a/addons/cookoff/config.cpp b/addons/cookoff/config.cpp index 0673efaffe..4fba15f5e1 100644 --- a/addons/cookoff/config.cpp +++ b/addons/cookoff/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {QGVAR(Sound),QGVAR(Turret_MBT_01),QGVAR(Turret_MBT_02)}; + units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; diff --git a/addons/cookoff/functions/fnc_cookOff.sqf b/addons/cookoff/functions/fnc_cookOff.sqf index 51f35ea813..6c8ace548a 100644 --- a/addons/cookoff/functions/fnc_cookOff.sqf +++ b/addons/cookoff/functions/fnc_cookOff.sqf @@ -1,140 +1,119 @@ #include "script_component.hpp" /* - * Author: KoffeinFlummi, commy2 + * Author: Brandon (TCVM) * Start a cook-off in the given vehicle. * * Arguments: * 0: Vehicle + * 1: Intensity of fire * * Return Value: * None * * Example: - * [(vehicle player)] call ace_cookoff_fnc_cookOff + * [(vehicle player), 3] call ace_cookoff_fnc_cookOff * * Public: No */ -params ["_vehicle"]; +params ["_vehicle", "_intensity", ["_instigator", objNull], ["_smokeDelayEnabled", true], ["_ammoDetonationChance", 0], ["_detonateAfterCookoff", false], ["_fireSource", ""], ["_canRing", true]]; + +if (GVAR(enable) == 0) exitWith {}; +if !(GVAR(enableFire)) exitWith {}; + +TRACE_8("cooking off",_vehicle,_intensity,_instigator,_smokeDelayEnabled,_ammoDetonationChance,_detonateAfterCookoff,_fireSource,_canRing); if (_vehicle getVariable [QGVAR(isCookingOff), false]) exitWith {}; -_vehicle setVariable [QGVAR(isCookingOff), true]; +_vehicle setVariable [QGVAR(isCookingOff), true, true]; -if (local _vehicle) then { - [QGVAR(cookOff), _vehicle] call CBA_fnc_globalEvent; -}; - -[{ - params ["_vehicle"]; - - private _config = _vehicle call CBA_fnc_getObjectConfig; - private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {!((_vehicle selectionPosition _x) isEqualTo [0,0,0])}; +private _config = _vehicle call CBA_fnc_getObjectConfig; +private _positions = getArray (_config >> QGVAR(cookoffSelections)) select {!((_vehicle selectionPosition _x) isEqualTo [0,0,0])}; +if (_positions isEqualTo []) then { + WARNING_1("no valid selection for cookoff found. %1",typeOf _vehicle); + { + private _pos = _vehicle selectionPosition _x; + if (_pos isEqualTo [0, 0, 0]) exitWith {}; + _positions pushBack _x; + } forEach DEFAULT_COMMANDER_HATCHES; + if (_positions isEqualTo []) then { - WARNING_1("no valid selection for cookoff found. %1", typeOf _vehicle); _positions pushBack "#noselection"; }; +}; - private _turretConfig = [_vehicle, [0]] call CBA_fnc_getTurret; - private _positionBarrelEnd = getText (_turretConfig >> "gunBeg"); +private _delay = 0; +if (_smokeDelayEnabled) then { + _delay = SMOKE_TIME + random SMOKE_TIME; +}; +[QGVAR(smoke), [_vehicle, _positions]] call CBA_fnc_globalEvent; - // smoke out of cannon and hatches - private _smokeBarrel = "#particlesource" createVehicleLocal [0,0,0]; - _smokeBarrel setParticleClass "MediumDestructionSmoke"; - _smokeBarrel attachTo [_vehicle, [0,0,0], _positionBarrelEnd]; - - private _effects = [_smokeBarrel]; - - { - private _position = [0,-2,0]; - - if !(_x isEqualTo "#noselection") then { - _position = _vehicle selectionPosition _x; - }; - - private _smoke = "#particlesource" createVehicleLocal [0,0,0]; - _smoke setParticleClass "ObjectDestructionSmoke1_2Smallx"; - _smoke attachTo [_vehicle, _position]; - - _effects pushBack _smoke; - } forEach _positions; +[{ + params ["_vehicle", "_positions", "_intensity", "_ammoDetonationChance", "_detonateAfterCookoff", "_instigator", "_fireSource", "_canRing"]; + _vehicle setVariable [QGVAR(intensity), _intensity]; + private _smokeEffects = _vehicle getVariable [QGVAR(effects), []]; [{ - params ["_vehicle", "_effects", "_positions"]; - - // this shit is busy being on fire, can't go driving around all over the place - if (local _vehicle) then { - _vehicle setFuel 0; - }; - - private _light = "#lightpoint" createVehicleLocal [0,0,0]; - _light setLightBrightness 0.7; - _light setLightAmbient [1,0.4,0.15]; - _light setLightColor [1,0.4,0.15]; - _light lightAttachObject [_vehicle, [0,0,4]]; - - _effects pushBack _light; - - // cookoffs - { - private _position = [0,-2,0]; - - if !(_x isEqualTo "#noselection") then { - _position = _vehicle selectionPosition _x; - }; - - private _fire = "#particlesource" createVehicleLocal [0,0,0]; - _fire setParticleClass QGVAR(CookOff); - _fire attachTo [_vehicle, _position]; - - _effects pushBack _fire; - } forEach _positions; - - if (isServer) then { - private _soundName = selectRandomWeighted [QGVAR(Sound_low), 0.1, QGVAR(Sound_mid), 0.25, QGVAR(Sound_high), 0.65]; - // TODO - Players in the vehicle hear no sound (even after exiting the vehicle) - private _sound = createSoundSource [_soundName, position _vehicle, [], 0]; - - _effects pushBack _sound; - }; - - // indicator for the crew - yo, your shit's on fire - private _fnc_FlameEffect = { - params ["_vehicle", "_fnc_FlameEffect", "_counter"]; - - if (_vehicle == cameraOn) then { - [] call BIS_fnc_flamesEffect; - }; - - DEC(_counter); - - if (_counter > 0) then { - [_fnc_FlameEffect, [_vehicle, _fnc_FlameEffect, _counter], FLAME_EFFECT_DELAY] call CBA_fnc_waitAndExecute - }; - }; - - // Recursive function, occurs for duration of cookoff - [_vehicle, _fnc_FlameEffect, ceil(COOKOFF_TIME/FLAME_EFFECT_DELAY)] call _fnc_FlameEffect; - - private _randomPosition = _vehicle getPos [100, random 360]; - - { - if (local _x && {!(_x call EFUNC(common,isPlayer))}) then { - _x leaveVehicle _vehicle; - _x doMove _randomPosition; - }; - } forEach crew _vehicle; - - [{ - params ["_vehicle", "_effects"]; - - { - deleteVehicle _x; - } forEach _effects; - - if (local _vehicle) then { + params ["_args", "_pfh"]; + _args params ["_vehicle", "_positions", "_ammoDetonationChance", "_detonateAfterCookoff", "_instigator", "_fireSource", "_canRing", "_smokeEffects"]; + private _intensity = _vehicle getVariable [QGVAR(intensity), 0]; + if (isNull _vehicle || {_intensity <= 1}) exitWith { + [QGVAR(cleanupEffects), [_vehicle, _smokeEffects]] call CBA_fnc_globalEvent; + _vehicle setVariable [QGVAR(isCookingOff), false, true]; + [_pfh] call CBA_fnc_removePerFrameHandler; + + if (_detonateAfterCookoff) then { _vehicle setDamage 1; }; - }, [_vehicle, _effects], COOKOFF_TIME] call CBA_fnc_waitAndExecute; // TODO: Randomise cook off time with locality in mind - }, [_vehicle, _effects, _positions], SMOKE_TIME] call CBA_fnc_waitAndExecute; -}, _vehicle, IGNITE_TIME] call CBA_fnc_waitAndExecute; + }; + + private _lastFlameTime = _vehicle getVariable [QGVAR(lastFlame), 0]; + private _nextFlameTime = _vehicle getVariable [QGVAR(nextFlame), 0]; + + // Wait until we are ready for the next flame + // dt = Tcurrent - Tlast + // dt >= Tnext + if ((CBA_missionTime - _lastFlameTime) >= _nextFlameTime) then { + private _ring = (0.2 > random 1); + if (!_ring && _intensity >= 2) then { + _ring = (0.7 > random 1); + }; + + if !(_canRing) then { + _ring = false; + }; + + private _time = linearConversion [0, 10, _intensity, 3, 20] + random COOKOFF_TIME; + + if (_fireSource isEqualTo "") then { + _fireSource = selectRandom _positions; + }; + + [QGVAR(cookOffEffect), [_vehicle, true, _ring, _time, _fireSource]] call CBA_fnc_globalEvent; + + _intensity = _intensity - (0.5 max random 1); + _vehicle setVariable [QGVAR(intensity), _intensity]; + _vehicle setVariable [QGVAR(lastFlame), CBA_missionTime]; + _vehicle setVariable [QGVAR(nextFlame), _time + (MIN_TIME_BETWEEN_FLAMES max random MAX_TIME_BETWEEN_FLAMES)]; + + { + [QEGVAR(fire,burn), [_x, _intensity * 1.5, _instigator]] call CBA_fnc_globalEvent; + } forEach crew _vehicle + }; + + if (_ammoDetonationChance > random 1) then { + private _lastExplosiveDetonationTime = _vehicle getVariable [QGVAR(lastExplosiveDetonation), 0]; + private _nextExplosiveDetonation = _vehicle getVariable [QGVAR(nextExplosiveDetonation), 0]; + + if ((CBA_missionTime - _lastExplosiveDetonationTime) > _nextExplosiveDetonation) then { + if (_fireSource isEqualTo "") then { + _fireSource = selectRandom _positions; + }; + createVehicle ["ACE_ammoExplosionLarge", (_vehicle modelToWorld (_vehicle selectionPosition _fireSource)), [], 0 , "CAN_COLLIDE"]; + + _vehicle setVariable [QGVAR(lastExplosiveDetonation), CBA_missionTime]; + _vehicle setVariable [QGVAR(nextExplosiveDetonation), random 60]; + }; + }; + }, 0.25, [_vehicle, _positions, _ammoDetonationChance, _detonateAfterCookoff, _instigator, _fireSource, _canRing, _smokeEffects]] call CBA_fnc_addPerFrameHandler +}, [_vehicle, _positions, _intensity, _ammoDetonationChance, _detonateAfterCookoff, _instigator, _fireSource, _canRing], _delay] call CBA_fnc_waitAndExecute; diff --git a/addons/cookoff/functions/fnc_cookOffEffect.sqf b/addons/cookoff/functions/fnc_cookOffEffect.sqf new file mode 100644 index 0000000000..4c32c8713d --- /dev/null +++ b/addons/cookoff/functions/fnc_cookOffEffect.sqf @@ -0,0 +1,187 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Spawn cook-off effects + * + * Arguments: + * 0: Vehicle + * 1: Spawn fire jet + * 2: Spawn fire ring + * 3: How long effect will last (Max 20 seconds) + * 4: What selection will fire originate from + * + * Return Value: + * None + * + * Example: + * [vehicle player, true, false, 15, "commander_turret"] call ace_cookoff_fnc_cookOffEffect + * + * Public: No + */ + +params ["_obj", "_jet", "_ring", "_time", "_fireSelection"]; +private _light = "#lightpoint" createVehicleLocal [0,0,0]; +_light setLightBrightness 5; +_light setLightAmbient [0.8, 0.6, 0.2]; +_light setLightColor [1, 0.5, 0.2]; +_light lightAttachObject [_obj, [0,0,0]]; +_time = 0 max (_time min 20); + +private _sound = objNull; +if (isServer) then { + // ironically biggest performance hit is this. Creating a new sound source takes up aprox 400 milliseconds. + // I dont think there is an alternative that takes into effect distance and whatever, but if you find one please fix! + private _soundName = selectRandomWeighted [QGVAR(Sound_low), 0.1, QGVAR(Sound_mid), 0.25, QGVAR(Sound_high), 0.65]; + _sound = createSoundSource [_soundName, position _obj, [], 0]; + + if (_ring) then { + private _intensity = 6; + private _radius = 1.5 * ((boundingBoxReal _obj) select 2); + [QEGVAR(fire,addFireSource), [_obj, _radius, _intensity, _obj]] call CBA_fnc_localEvent; + }; +}; + +[{ + params ["_args", "_pfh"]; + _args params ["_obj", "_jet", "_ring", "_time", "_startTime", "_light", "_fireSelection", "_sound"]; + private _elapsedTime = CBA_missionTime - _startTime; + if (_elapsedTime >= _time) exitWith { + deleteVehicle _light; + deleteVehicle _sound; + [QEGVAR(fire,removeFireSource), [_obj]] call CBA_fnc_globalEvent; + [_pfh] call CBA_fnc_removePerFrameHandler; + }; + private _factor = (1 + (_elapsedTime / 2) min 2); + private _flameSize = 1.5; + + if (_elapsedTime > (_time * (3 / 4))) then { + _factor = _factor * linearConversion [_time * (3 / 4), _time, _elapsedTime, 1, 0.5]; + }; + + _light setLightBrightness 5 * (_factor / 5); + + if (_jet) then { + private _particlePosition = (_obj selectionPosition _fireSelection) vectorAdd [-0.1 + random 0.2, -0.1 + random 0.2, 0]; + + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], + "", + "Billboard", + 1, + (0.1 + (random 0.2)) * _factor, + _particlePosition, + [0, 0, 15 * (_factor / 2)], + 0, + 10, + 7.9, + 0.075, + [1.25 * _factor, 2.5 * _factor], + [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], + [2 + random 1], + 1, + 0, + "", + "", + _obj + ]; + + // make flame push object into ground to make effect seem more "alive" + if (!isGamePaused && { local _obj }) then { + private _force = [0, 0, _factor * -(0.5 min random 1.5) * (0.3 min random 1)] vectorMultiply getMass _obj; + _obj addForce [_force, vectorUpVisual _obj]; + }; + }; + + if (_ring) then { + private _ringOrigin = (_obj selectionPosition _fireSelection) vectorAdd [-0.1 + random 0.2, -0.1 + random 0.2, -1]; + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal",16,2,32], + "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, + _ringOrigin, + [0, 20 * (_factor / 2), 0], + 0, 10, 7.9, 0.075, + [1.25 * _factor, _flameSize * _factor], + [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], + [2 + random 1], 1, 0, "", "", _obj + ]; + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], + "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, + _ringOrigin, + [0, -20 * (_factor / 2), 0], + 0, 10, 7.9, 0.075, + [1.25 * _factor, _flameSize * _factor], + [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], + [2 + random 1], 1, 0, "", "", _obj + ]; + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], + "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, + _ringOrigin, + [20 * (_factor / 2), 0, 0], + 0, 10, 7.9, 0.075, + [1.25 * _factor, _flameSize * _factor], + [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], + [2 + random 1], 1, 0, "", "", _obj + ]; + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], + "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, + [-0.1 + random 0.2, -0.1 + random 0.2, -1], + [-20 * (_factor / 2), 0, 0], + 0, 10, 7.9, 0.075, + [1.25 * _factor, _flameSize * _factor], + [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], + [2 + random 1], 1, 0, "", "", _obj + ]; + + private _dir = 20 * (_factor / 2); + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], + "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, + _ringOrigin, + [_dir, _dir, 0], + 0, 10, 7.9, 0.075, + [1.25 * _factor, _flameSize * _factor], + [[1, 1, 1, -2],[1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], + [2 + random 1], 1, 0, "", "", _obj + ]; + + _dir = -20 * (_factor / 2); + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], + "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, + _ringOrigin, + [_dir, _dir, 0], + 0, 10, 7.9, 0.075, + [1.25 * _factor, _flameSize * _factor], + [[1, 1, 1, -2],[1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], + [2 + random 1], 1, 0, "", "", _obj + ]; + + _dir = 20 * (_factor / 2); + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal",16,2,32], + "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, + _ringOrigin, + [_dir, -_dir, 0], + 0, 10, 7.9, 0.075, + [1.25 * _factor, _flameSize * _factor], + [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], + [2 + random 1], 1, 0, "", "", _obj + ]; + + _dir = 20 * (_factor / 2); + drop [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 2, 32], + "", "Billboard", 1, (0.1 + (random 0.2)) * _factor, + _ringOrigin, + [-_dir, _dir, 0], + 0, 10, 7.9, 0.075, + [1.25 * _factor, _flameSize * _factor], + [[1, 1, 1, -2], [1, 1, 1, -2], [1, 1, 1, -1], [1, 1, 1, -0]], + [2 + random 1], 1, 0, "", "", _obj + ]; + }; +}, 0, [_obj, _jet, _ring, _time, CBA_missionTime, _light, _fireSelection, _sound]] call cba_fnc_addPerFrameHandler; + diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf index 0d944958d2..9cbe1c9f17 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunition.sqf @@ -18,10 +18,12 @@ * * Public: No */ -#define MAX_TIME_BETWEEN_AMMO_DET 25 params ["_vehicle", "_magazines", "_totalAmmo"]; +if (GVAR(enable) == 0) exitWith {}; +if !(GVAR(enableAmmoCookoff)) exitWith {}; + if (isNull _vehicle) exitWith {}; // vehicle got deleted if (_magazines isEqualTo []) exitWith {}; // nothing to detonate anymore if (underwater _vehicle) exitWith {}; diff --git a/addons/cookoff/functions/fnc_engineFire.sqf b/addons/cookoff/functions/fnc_engineFire.sqf index f5ad3e1cf9..67c932d4bc 100644 --- a/addons/cookoff/functions/fnc_engineFire.sqf +++ b/addons/cookoff/functions/fnc_engineFire.sqf @@ -43,7 +43,7 @@ _smoke attachTo [_vehicle, _position]; [{ (_this select 0) params ["_vehicle", "_smoke", "_time"]; - if (!alive _vehicle || {_vehicle getHitPointDamage "HitEngine" < 0.9} || {CBA_missionTime > _time}) then { + if (isNull _vehicle || {!alive _vehicle} || {_vehicle getHitPointDamage "HitEngine" < 0.9} || {CBA_missionTime > _time}) then { deleteVehicle _smoke; _vehicle setVariable [QGVAR(isEngineSmoking), false]; [_this select 1] call CBA_fnc_removePerFrameHandler; diff --git a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf index 810084fe71..62015cadae 100644 --- a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf +++ b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf @@ -24,10 +24,14 @@ TRACE_1("getVehicleAmmo",_vehicle); private _ammoToDetonate = []; private _totalAmmo = 0; +// from ace_common, tweaked becasue command is busted +private _ffvTurrets = fullCrew [_vehicle, "", true] select {_x select 4} apply {_x select 3}; + // Get ammo from turrets { - _x params ["_mag", "", "_count"]; - if (_count > 0) then { + _x params ["_mag", "_turret", "_count"]; + // if the turret is an FFV seat, it takes magazines from the soldier + if (!(_turret in _ffvTurrets) && {_count > 0}) then { private _ammo = getText (configFile >> "CfgMagazines" >> _mag >> "ammo"); private _model = getText (configFile >> "CfgAmmo" >> _ammo >> "model"); if (_model == "\A3\weapons_f\empty") exitWith {TRACE_3("skipping",_mag,_ammo,_model);}; @@ -43,10 +47,10 @@ private _totalAmmo = 0; _ammoToDetonate pushBack [_mag, _count]; _totalAmmo = _totalAmmo + _count; }; -} forEach (magazinesAmmoCargo _vehicle); +} forEach (magazinesAmmoCargo _vehicle); // Get ammo from transportAmmo / ace_rearm -private _vehCfg = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _vehCfg = configOf _vehicle; private _configSupply = (getNumber (_vehCfg >> "transportAmmo")) max (getNumber (_vehCfg >> QEGVAR(rearm,defaultSupply))); if (_vehicle getVariable [QEGVAR(rearm,isSupplyVehicle), (_configSupply > 0)]) then { @@ -56,6 +60,8 @@ if (_vehicle getVariable [QEGVAR(rearm,isSupplyVehicle), (_configSupply > 0)]) t _totalAmmo = _totalAmmo + 2000; _ammoToDetonate pushBack ["20Rnd_105mm_HEAT_MP", 100]; _totalAmmo = _totalAmmo + 100; + _ammoToDetonate pushBack ["SatchelCharge_Remote_Mag", 10]; + _totalAmmo = _totalAmmo + 10; }; [_ammoToDetonate, _totalAmmo] diff --git a/addons/cookoff/functions/fnc_handleDamage.sqf b/addons/cookoff/functions/fnc_handleDamage.sqf deleted file mode 100644 index 88ea717d90..0000000000 --- a/addons/cookoff/functions/fnc_handleDamage.sqf +++ /dev/null @@ -1,135 +0,0 @@ -#include "script_component.hpp" -/* - * Author: KoffeinFlummi, commy2 - * Handles all incoming damage for tanks (including wheeled APCs). - * - * Arguments: - * HandleDamage EH - * - * Return Value: - * Damage to be inflicted. - * - * Example: - * _this call ace_cookoff_fnc_handleDamage - * - * Public: No - */ - -params ["_simulationType", "_thisHandleDamage"]; -_thisHandleDamage params ["_vehicle", "", "_damage", "_source", "_ammo", "_hitIndex", "_shooter"]; - -// it's already dead, who cares? -if (damage _vehicle >= 1) exitWith {}; - -// If cookoff is disabled exit -if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith {}; - -// Check for players and exit if none found and the enable for players only setting is true -if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] isEqualTo 1 && {fullCrew [_vehicle, "", false] findIf {isPlayer (_x select 0)} == -1}) exitWith {}; - -// get hitpoint name -private _hitpoint = "#structural"; - -if (_hitIndex != -1) then { - _hitpoint = toLower ((getAllHitPointsDamage _vehicle param [0, []]) select _hitIndex); -}; - -// get change in damage -private _oldDamage = 0; - -if (_hitpoint isEqualTo "#structural") then { - _oldDamage = damage _vehicle; -} else { - _oldDamage = _vehicle getHitIndex _hitIndex; -}; - -private _newDamage = _damage - _oldDamage; - -// handle different types of vehicles -// note: exitWith only works here, because this is not the main scope of handleDamage -// you cannot use the return value together with exitWith in the main scope, it's a bug -// also, we add this event handler with the addEventHandler SQF command, -// because the config version ignores the return value completely -if (_simulationType == "car") exitWith { - // prevent destruction, let cook-off handle it if necessary - if (_hitpoint in ["hithull", "hitfuel", "#structural"] && {!IS_EXPLOSIVE_AMMO(_ammo)}) then { - _damage min 0.89 - } else { - if (_hitpoint isEqualTo "hitengine" && {_damage > 0.9}) then { - _vehicle call FUNC(engineFire); - }; - _damage - }; -}; - -if (_simulationType == "tank") exitWith { - // determine ammo storage location - private _ammoLocationHitpoint = getText (_vehicle call CBA_fnc_getObjectConfig >> QGVAR(ammoLocation)); - - if (_hitIndex in (GVAR(cacheTankDuplicates) getVariable (typeOf _vehicle))) then { - _hitpoint = "#subturret"; - }; - - // ammo was hit, high chance for cook-off - if (_hitpoint == _ammoLocationHitpoint) then { - if (_damage > 0.5) then { - // get cookoff probability for vehicle - private _probability = [_vehicle call CBA_fnc_getObjectConfig >> QGVAR(probability), "number", 0.7] call CBA_fnc_getConfigEntry; - // probability multiplied by coef for global probability control (higher coef = more probable cookoff) - if (GVAR(probabilityCoef) > 1) then { - _probability = 1 - (1 - _probability) / GVAR(probabilityCoef); - } else { - _probability = _probability * GVAR(probabilityCoef); - }; - if (random 1 < _probability) then { - _vehicle call FUNC(cookOff); - }; - }; - } else { - if (_hitpoint in ["hithull", "hitturret", "#structural"] && {_newDamage > 0.8 + random 0.2}) then { - if ((_hitpoint == "hitturret") && {(getNumber (_vehicle call CBA_fnc_getObjectConfig >> QGVAR(ignoreTurret))) == 1}) exitWith {}; // ignore turrets like RCWS - _vehicle setDamage 1; - }; - }; - - // prevent destruction, let cook-off handle it if necessary - if (_hitpoint in ["hithull", "hitfuel", "#structural"]) then { - _damage min 0.89 - } else { - _damage - }; -}; - -if (_simulationType == "box") exitWith { - if (_hitpoint == "#structural" && _damage > 0.5) then { - // Almost always catch fire when hit by an explosive - if (IS_EXPLOSIVE_AMMO(_ammo)) then { - _vehicle call FUNC(cookOffBox); - } else { - // Need magazine to check for tracers - private _mag = ""; - if (_source == _shooter) then { - _mag = currentMagazine _source; - } else { - _mag = _source currentMagazineTurret ([_shooter] call CBA_fnc_turretPath); - }; - private _magCfg = configFile >> "CfgMagazines" >> _mag; - - // Magazine could have changed during flight time (just ignore if so) - if (getText (_magCfg >> "ammo") == _ammo) then { - // If magazine's tracer density is high enough then low chance for cook off - private _tracers = getNumber (_magCfg >> "tracersEvery"); - if (_tracers >= 1 && {_tracers <= 4}) then { - if (random 1 < _oldDamage*0.05) then { - _vehicle call FUNC(cookOffBox); - }; - }; - }; - }; - - // prevent destruction, let cook-off handle it if necessary - _damage min 0.89 - } else { - _damage - }; -}; diff --git a/addons/cookoff/functions/fnc_handleDamageBox.sqf b/addons/cookoff/functions/fnc_handleDamageBox.sqf new file mode 100644 index 0000000000..2bbb6f4b6b --- /dev/null +++ b/addons/cookoff/functions/fnc_handleDamageBox.sqf @@ -0,0 +1,72 @@ +#include "script_component.hpp" +/* + * Author: KoffeinFlummi, commy2 + * Handles all incoming damage for boxi + * + * Arguments: + * HandleDamage EH + * + * Return Value: + * Damage to be inflicted. + * + * Example: + * _this call ace_cookoff_fnc_handleDamageBox + * + * Public: No + */ + +params ["_vehicle", "", "_damage", "_source", "_ammo", "_hitIndex", "_shooter"]; + +// it's already dead, who cares? +if (damage _vehicle >= 1) exitWith {}; + +// If cookoff is disabled exit +if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith {}; + +// get hitpoint name +private _hitpoint = "#structural"; + +if (_hitIndex != -1) then { + _hitpoint = toLower ((getAllHitPointsDamage _vehicle param [0, []]) select _hitIndex); +}; + +// get change in damage +private _oldDamage = 0; + +if (_hitpoint isEqualTo "#structural") then { + _oldDamage = damage _vehicle; +} else { + _oldDamage = _vehicle getHitIndex _hitIndex; +}; + +if (_hitpoint == "#structural" && _damage > 0.5) then { + // Almost always catch fire when hit by an explosive + if (IS_EXPLOSIVE_AMMO(_ammo)) then { + _vehicle call FUNC(cookOffBox); + } else { + // Need magazine to check for tracers + private _mag = ""; + if (_source == _shooter) then { + _mag = currentMagazine _source; + } else { + _mag = _source currentMagazineTurret ([_shooter] call CBA_fnc_turretPath); + }; + private _magCfg = configFile >> "CfgMagazines" >> _mag; + + // Magazine could have changed during flight time (just ignore if so) + if (getText (_magCfg >> "ammo") == _ammo) then { + // If magazine's tracer density is high enough then low chance for cook off + private _tracers = getNumber (_magCfg >> "tracersEvery"); + if (_tracers >= 1 && {_tracers <= 4}) then { + if (random 1 < _oldDamage*0.05) then { + _vehicle call FUNC(cookOffBox); + }; + }; + }; + }; + + // prevent destruction, let cook-off handle it if necessary + _damage min 0.89 +} else { + _damage +}; diff --git a/addons/cookoff/functions/fnc_smoke.sqf b/addons/cookoff/functions/fnc_smoke.sqf new file mode 100644 index 0000000000..93a9b9a0cb --- /dev/null +++ b/addons/cookoff/functions/fnc_smoke.sqf @@ -0,0 +1,45 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Starts vehicle barrel smoke effect. + * + * Arguments: + * 0: Vehicle + * 1. Selections for smoke to come out of (default: []) + * + * Return Value: + * None + * + * Example: + * [vehicle player, ["commander_turret"]] call ace_cookoff_fnc_barrelSmoke + * + * Public: No + */ + +params ["_vehicle", ["_positions", []]]; + +private _turretConfig = [_vehicle, [0]] call CBA_fnc_getTurret; +private _positionBarrelEnd = getText (_turretConfig >> "gunBeg"); + +// smoke out of cannon and hatches +private _smokeBarrel = "#particlesource" createVehicleLocal [0, 0, 0]; +_smokeBarrel setParticleClass "MediumDestructionSmoke"; +_smokeBarrel attachTo [_vehicle, [0, 0, 0], _positionBarrelEnd]; + +private _effects = [_smokeBarrel]; + +{ + private _position = [0, -2, 0]; + + if !(_x isEqualTo "#noselection") then { + _position = _vehicle selectionPosition _x; + }; + + private _smoke = "#particlesource" createVehicleLocal [0, 0, 0]; + _smoke setParticleClass "ObjectDestructionSmoke1_2Smallx"; + _smoke attachTo [_vehicle, _position]; + + _effects pushBack _smoke; +} forEach _positions; + +_vehicle setVariable [QGVAR(effects), _effects]; diff --git a/addons/cookoff/initSettings.sqf b/addons/cookoff/initSettings.sqf index ce510a299d..54eb89be54 100644 --- a/addons/cookoff/initSettings.sqf +++ b/addons/cookoff/initSettings.sqf @@ -4,11 +4,31 @@ QGVAR(enable), "LIST", [LSTRING(enable_hd_name), LSTRING(enable_hd_tooltip)], LSTRING(category_displayName), - [[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", ELSTRING(common,playerOnly), ELSTRING(common,playersAndAI)], 0], + [[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", ELSTRING(common,playerOnly), ELSTRING(common,playersAndAI)], 2], true, // isGlobal {[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(enableFire), "CHECKBOX", + [LSTRING(enableFire_name), LSTRING(enableFire_tooltip)], + LSTRING(category_displayName), + true, // default value + true, // isGlobal + {[QGVAR(enableFire), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false // Needs mission restart +] call CBA_fnc_addSetting; + +[ + QGVAR(enableAmmoCookoff), "CHECKBOX", + [LSTRING(enableAmmoCookoff_name), LSTRING(enableAmmoCookoff_tooltip)], + LSTRING(category_displayName), + true, // default value + true, // isGlobal + {[QGVAR(enableAmmoCookoff), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false // Needs mission restart +] call CBA_fnc_addSetting; [ QGVAR(enableAmmobox), "CHECKBOX", @@ -18,17 +38,7 @@ true, // isGlobal {[QGVAR(enableAmmobox), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; - -[ - QGVAR(enableAmmoCookoff), "CHECKBOX", - [LSTRING(enableAmmoCookoff_name), LSTRING(enableAmmoCookoff_tooltip)], - LSTRING(category_displayName), - true, // default value - true, // isGlobal - {[QGVAR(enableAmmoCookoff), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(ammoCookoffDuration), "SLIDER", @@ -38,7 +48,7 @@ true, // isGlobal {[QGVAR(ammoCookoffDuration), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(probabilityCoef), "SLIDER", @@ -48,4 +58,4 @@ true, // isGlobal {[QGVAR(probabilityCoef), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/cookoff/script_component.hpp b/addons/cookoff/script_component.hpp index 3c28864932..1bf61761b4 100644 --- a/addons/cookoff/script_component.hpp +++ b/addons/cookoff/script_component.hpp @@ -24,8 +24,12 @@ #define SMOKE_TIME 10.5 #define COOKOFF_TIME 14 // Cook off time should be 20s at most due to length of sound files #define COOKOFF_TIME_BOX 82.5 // Cook off time for boxes should be significant to allow time for ammo to burn +#define MIN_TIME_BETWEEN_FLAMES 5 +#define MAX_TIME_BETWEEN_FLAMES 15 +#define MAX_TIME_BETWEEN_AMMO_DET 25 // Delay between flame effect for players in a cooking off vehicle #define FLAME_EFFECT_DELAY 0.4 -#define EJECT_IF_DESTROYED_VEHICLES ["Boat_Transport_02_base_F", "Rubber_duck_base_F"] +// Common commander hatch defines for default vehicles +#define DEFAULT_COMMANDER_HATCHES ["osa_poklop_commander", "hatch_commander_axis"] diff --git a/addons/cookoff/stringtable.xml b/addons/cookoff/stringtable.xml index 2db0e9cd9a..5979373f83 100644 --- a/addons/cookoff/stringtable.xml +++ b/addons/cookoff/stringtable.xml @@ -42,21 +42,6 @@ Změní poškození ovládání a efekty výbuchu veže Zmienia obsługę obrażeń podczas samozapłonu i eksplozji wieży - - Wreck (Turret) - Épave (tourelle) - Restos (torreta) - Rottami (torretta) - Wrak (wieżyczka) - Обломки (башня) - Wrack (Geschützturm) - Vrak (věž) - Ruínas (torre) - 잔해(포탑) - 残骸 (砲塔) - 殘骸 (砲塔) - 残骸 (炮塔) - Enable ammo box cook off Habilitar detonación inducida por calor en las cajas de munición @@ -175,5 +160,13 @@ Multiplicador para a chance de cozinhamento. Valores mais altos aumentam as chances de ocorrer. Multiplikátor pro pravděpodobnost vznícení munice. Vyšší hodnota znamená vyšší šanci vznícení munice. + + Enable Cook-Off Vehicle Fire + 誘爆火災を有効化 + + + Whether or not vehicles will catch on fire during cook-off + 誘爆により車両が炎上するかどうかを設定します。 + diff --git a/addons/csw/Cfg3den.hpp b/addons/csw/Cfg3den.hpp index a72c585fde..5d15e19d6b 100644 --- a/addons/csw/Cfg3den.hpp +++ b/addons/csw/Cfg3den.hpp @@ -9,7 +9,7 @@ class Cfg3DEN { }; class Combo: Title { class Controls: Controls { - class Title: Title{}; + class Title: Title {}; class Value; }; }; diff --git a/addons/csw/CfgEventHandlers.hpp b/addons/csw/CfgEventHandlers.hpp index afe6392a7c..2a3f71f852 100644 --- a/addons/csw/CfgEventHandlers.hpp +++ b/addons/csw/CfgEventHandlers.hpp @@ -1,15 +1,15 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE( call COMPILE_FILE(XEH_postInit) ); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/csw/CfgWeapons.hpp b/addons/csw/CfgWeapons.hpp index 5c4e9c8f2f..80f8706376 100644 --- a/addons/csw/CfgWeapons.hpp +++ b/addons/csw/CfgWeapons.hpp @@ -246,7 +246,7 @@ class CfgWeapons { EGVAR(javelin,enabled) = 1; // needs to be explicitly enabled magazineReloadTime = 0.5; }; - class GVAR(Titan_AA_Static) : missiles_titan_static { + class GVAR(Titan_AA_Static): missiles_titan_static { magazineReloadTime = 0.5; }; diff --git a/addons/csw/README.md b/addons/csw/README.md index 8729a7fa31..b47a978e79 100644 --- a/addons/csw/README.md +++ b/addons/csw/README.md @@ -2,11 +2,3 @@ ace_csw =============== Crew Served Weapons - Static weapons that are served by multiple people - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [TCVM](https://github.com/TheCandianVendingMachine) - diff --git a/addons/csw/XEH_postInit.sqf b/addons/csw/XEH_postInit.sqf index 69137296c5..d2dda6b0d1 100644 --- a/addons/csw/XEH_postInit.sqf +++ b/addons/csw/XEH_postInit.sqf @@ -2,7 +2,7 @@ GVAR(vehicleMagCache) = call CBA_fnc_createNamespace; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_3("settingsInit",GVAR(defaultAssemblyMode),GVAR(handleExtraMagazines),GVAR(ammoHandling)); ["StaticWeapon", "init", LINKFUNC(staticWeaponInit), true, [], true] call CBA_fnc_addClassEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/csw/config.cpp b/addons/csw/config.cpp index 47f8313668..98abcea5c0 100644 --- a/addons/csw/config.cpp +++ b/addons/csw/config.cpp @@ -4,8 +4,8 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; - weapons[] = {"ace_csw_carryTripod", "ace_csw_staticATWeapon"}; + units[] = {QGVAR(m3Tripod),QGVAR(m3TripodLow),QGVAR(kordTripod),QGVAR(kordTripodLow),QGVAR(sag30Tripod),QGVAR(m220Tripod),QGVAR(spg9Tripod),QGVAR(mortarBaseplate)}; + weapons[] = {QGVAR(m3CarryTripod),QGVAR(m3CarryTripodLow),QGVAR(kordCarryTripod),QGVAR(kordCarryTripodLow),QGVAR(m220CarryTripod),QGVAR(spg9CarryTripod),QGVAR(sag30CarryTripod),QGVAR(carryMortarBaseplate),QGVAR(staticATCarry),QGVAR(staticAACarry),QGVAR(staticHMGCarry),QGVAR(staticM2ShieldCarry),QGVAR(staticGMGCarry),QGVAR(staticMortarCarry)}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; author = ECSTRING(common,ACETeam); diff --git a/addons/csw/data/model.cfg b/addons/csw/data/model.cfg index 7adabdac10..2104dca5a5 100644 --- a/addons/csw/data/model.cfg +++ b/addons/csw/data/model.cfg @@ -20,37 +20,37 @@ class CfgModels { sections[] = {}; skeletonName = ""; }; - class ACE_CSW_Tripod : Default { + class ACE_CSW_Tripod: Default { sectionsInherit = ""; sections[] = {}; skeletonName = "ACE_CSW_Tripod_Skeleton"; }; - class ACE_CSW_M3_Tripod : Default { + class ACE_CSW_M3_Tripod: Default { sectionsInherit = ""; sections[] = {}; skeletonName = "ACE_CSW_M3_Tripod_Skeleton"; }; - class ace_csw_tripod_ags30 : Default { + class ace_csw_tripod_ags30: Default { sectionsInherit = ""; sections[] = {}; skeletonName = "ace_csw_tripod_ags30_Skeleton"; }; - class ace_csw_tripod_kord : Default { + class ace_csw_tripod_kord: Default { sectionsInherit = ""; sections[] = {}; skeletonName = "ace_csw_tripod_kord_Skeleton"; }; - class ace_csw_tripod_m122 : Default { + class ace_csw_tripod_m122: Default { sectionsInherit = ""; sections[] = {}; skeletonName = "ace_csw_tripod_m122_Skeleton"; }; - class ace_csw_tripod_m220 : Default { + class ace_csw_tripod_m220: Default { sectionsInherit = ""; sections[] = {}; skeletonName = "ace_csw_tripod_m220_Skeleton"; }; - class ace_csw_tripod_spg9 : Default { + class ace_csw_tripod_spg9: Default { sectionsInherit = ""; sections[] = {}; skeletonName = "ace_csw_tripod_spg9_Skeleton"; diff --git a/addons/csw/dev/checkStaticWeapons.sqf b/addons/csw/dev/checkStaticWeapons.sqf index 5a6f8d2b90..0406cb7034 100644 --- a/addons/csw/dev/checkStaticWeapons.sqf +++ b/addons/csw/dev/checkStaticWeapons.sqf @@ -42,7 +42,7 @@ private _inherited = []; INFO("------ Logging static magazines with no carry version -------"); -private _hash = [] call CBA_fnc_hashCreate; +private _hash = createHashMap; // private _logAll = true; // logs all possible weapon magazines (even if not used in a static weapon) private _logAll = false; { @@ -57,20 +57,19 @@ private _logAll = false; private _groups = "getNumber (_x >> _xMag) == 1 && {isClass (configFile >> 'CfgMagazines' >> configName _x)}" configClasses (configFile >> QGVAR(groups)); private _carryMag = configName (_groups param [0, configNull]); if ((_carryMag == "") && {_logAll || {_xMag in _loadedMags}}) then { - private _vehs = [_hash, _xMag] call CBA_fnc_hashGet; - if (isNil "_vehs") then {_vehs = [];}; + private _vehs = _hash getOrDefault [_xMag, []]; if (_xMag in _loadedMags) then { _vehs pushBack _vehicleType; }; - [_hash, _xMag, _vehs] call CBA_fnc_hashSet; + _hash set [_xMag, _vehs]; }; } forEach _weapMags; } forEach _weapons; } forEach _staticWeaponConfigs; -[_hash, { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; - INFO_2("[%1] has no carry varient - Used in %2",_key,_value); -}] call CBA_fnc_hashEachPair; +{ + //IGNORE_PRIVATE_WARNING ["_x", "_y"]; + INFO_2("[%1] has no carry varient - Used in %2",_x,_y); +} forEach _hash; INFO("------ End -------"); diff --git a/addons/csw/functions/fnc_ai_handleFired.sqf b/addons/csw/functions/fnc_ai_handleFired.sqf index f85c74fd20..eb41ed3831 100644 --- a/addons/csw/functions/fnc_ai_handleFired.sqf +++ b/addons/csw/functions/fnc_ai_handleFired.sqf @@ -56,7 +56,7 @@ private _reloadNeededAmmo = -1; }; } forEach _cswMagazines; } forEach _compatibleMags; -} forEach ([_gunner] + (_staticWeapon nearEntities [["groundWeaponHolder", "ReammoBox_F"], 10])); +} forEach ([_gunner] + (_staticWeapon nearSupplies 10)); if (_reloadMag == "") exitWith {TRACE_1("could not find mag",_reloadMag);}; // Figure out what we can add from the magazines we have @@ -74,15 +74,11 @@ TRACE_4("",_reloadSource,_reloadMag,_reloadNeededAmmo,_bestAmmoToSend); if (_bestAmmoToSend == -1) exitWith {ERROR("No ammo");}; // Remove the mag from the source -if (_reloadSource isKindOf "CaManBase") then { - [_reloadSource, _reloadMag, _bestAmmoToSend] call EFUNC(common,removeSpecificMagazine); -} else { - [_reloadSource, _reloadMag, 1, _bestAmmoToSend] call CBA_fnc_removeMagazineCargo; -}; +[_reloadSource, _reloadMag, _bestAmmoToSend] call EFUNC(common,removeSpecificMagazine); private _timeToLoad = 1; -if (!isNull(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "ammoLoadTime")) then { - _timeToLoad = getNumber(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "ammoLoadTime"); +if (!isNull(configOf _staticWeapon >> QUOTE(ADDON) >> "ammoLoadTime")) then { + _timeToLoad = getNumber(configOf _staticWeapon >> QUOTE(ADDON) >> "ammoLoadTime"); }; TRACE_1("Reloading in progress",_timeToLoad); diff --git a/addons/csw/functions/fnc_assemble_pickupTripod.sqf b/addons/csw/functions/fnc_assemble_pickupTripod.sqf index 0167254795..4f06b6e406 100644 --- a/addons/csw/functions/fnc_assemble_pickupTripod.sqf +++ b/addons/csw/functions/fnc_assemble_pickupTripod.sqf @@ -20,7 +20,7 @@ params ["_tripod", "_player"]; TRACE_2("assemble_pickupTripod",_tripod,_player); - private _tripodClassname = getText(configFile >> "CfgVehicles" >> (typeof _tripod) >> QUOTE(ADDON) >> "disassembleTo"); + private _tripodClassname = getText(configOf _tripod >> QUOTE(ADDON) >> "disassembleTo"); private _pickupTime = getNumber(configFile >> "CfgWeapons" >> _tripodClassname >> QUOTE(ADDON) >> "pickupTime"); private _onFinish = { diff --git a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf index eb70371b59..4763f646ad 100644 --- a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf @@ -19,14 +19,14 @@ params ["_staticWeapon", "_player"]; TRACE_2("assemble_pickupWeapon",_staticWeapon,_player); - private _onDisassembleFunc = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleFunc"); - private _carryWeaponClassname = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleWeapon"); - private _turretClassname = getText(configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "disassembleTurret"); + private _onDisassembleFunc = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleFunc"); + private _carryWeaponClassname = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleWeapon"); + private _turretClassname = getText(configOf _staticWeapon >> QUOTE(ADDON) >> "disassembleTurret"); private _pickupTime = getNumber(configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "pickupTime"); TRACE_4("",typeOf _staticWeapon,_carryWeaponClassname,_turretClassname,_pickupTime); if (!isClass (configFile >> "CfgWeapons" >> _carryWeaponClassname)) exitWith {ERROR_1("bad weapon classname [%1]",_carryWeaponClassname);}; // Turret classname can equal nothing if the deploy bag is the "whole" weapon. e.g Kornet, Metis, other ATGMs - if (!(_turretClassname isEqualTo "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith {ERROR_1("bad turret classname [%1]",_turretClassname);}; + if ((_turretClassname isNotEqualTo "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith {ERROR_1("bad turret classname [%1]",_turretClassname);}; private _onFinish = { params ["_args"]; @@ -54,7 +54,7 @@ }; } forEach (magazinesAllTurrets _staticWeapon); - if !(_turretClassname isEqualTo "") then { + if (_turretClassname isNotEqualTo "") then { private _cswTripod = createVehicle [_turretClassname, [0, 0, 0], [], 0, "NONE"]; // Delay a frame so weapon has a chance to be deleted [{ diff --git a/addons/csw/functions/fnc_reload_actionsUnload.sqf b/addons/csw/functions/fnc_reload_actionsUnload.sqf index 12d2cd2f9a..24e60b1a38 100644 --- a/addons/csw/functions/fnc_reload_actionsUnload.sqf +++ b/addons/csw/functions/fnc_reload_actionsUnload.sqf @@ -24,8 +24,8 @@ private _statement = { TRACE_5("starting unload",_target,_turretPath,_player,_carryMag,_vehMag); private _timeToUnload = 1; - if (!isNull(configFile >> "CfgVehicles" >> (typeOf _target) >> QUOTE(ADDON) >> "ammoUnloadTime")) then { - _timeToUnload = getNumber(configFile >> "CfgVehicles" >> (typeOf _target) >> QUOTE(ADDON) >> "ammoUnloadTime"); + if (!isNull(configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime")) then { + _timeToUnload = getNumber(configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime"); }; [ diff --git a/addons/csw/functions/fnc_reload_canLoadMagazine.sqf b/addons/csw/functions/fnc_reload_canLoadMagazine.sqf index 505c920333..69f8e6c93a 100644 --- a/addons/csw/functions/fnc_reload_canLoadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_canLoadMagazine.sqf @@ -26,7 +26,7 @@ if (!alive _vehicle) exitWith { [false, "", -1, false] }; // Verify unit has carry magazine if ((!isNull _unit) && {((_vehicle distance _unit) > 5) || {((magazines _unit) findIf {_x == _carryMag}) == -1}}) exitWith { [false, "", -2, false] }; -private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "desiredAmmo"); +private _desiredAmmo = getNumber (configOf _vehicle >> QUOTE(ADDON) >> "desiredAmmo"); if (_desiredAmmo == 0) then { _desiredAmmo = 100; }; private _ammoNeeded = _desiredAmmo min getNumber (configFile >> "CfgMagazines" >> _carryMag >> "count"); // assume it needs full carry mag private _loadedMag = ""; diff --git a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf index b6265852c9..2b28535f0a 100644 --- a/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf +++ b/addons/csw/functions/fnc_reload_getVehicleMagazine.sqf @@ -20,7 +20,7 @@ params ["_vehicle", "_turret", "_carryMag"]; TRACE_3("reload_getVehicleMagazine",_vehicle,_turret,_carryMag); private _carryGroupCfg = configFile >> QGVAR(groups) >> _carryMag; -private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "desiredAmmo"); +private _desiredAmmo = getNumber (configOf _vehicle >> QUOTE(ADDON) >> "desiredAmmo"); if (_desiredAmmo == 0) then { _desiredAmmo = 100; }; private _bestMag = "#"; diff --git a/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf b/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf index 1a88c7f115..313e65dc9b 100644 --- a/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf +++ b/addons/csw/functions/fnc_reload_handleRemoveTurretMag.sqf @@ -37,7 +37,7 @@ TRACE_1("",_magsInWeapon); // Remove any empty mags from start: private _ammoInFirstMag = 0; -while {(!(_magsInWeapon isEqualTo [])) && {_ammoInFirstMag = _magsInWeapon deleteAt 0; (_ammoInFirstMag == 0)}} do { +while {(_magsInWeapon isNotEqualTo []) && {_ammoInFirstMag = _magsInWeapon deleteAt 0; (_ammoInFirstMag == 0)}} do { TRACE_1("Removing empty mag",_ammoInFirstMag); _vehicle removeMagazineTurret [_vehMag, _turretPath]; }; diff --git a/addons/csw/functions/fnc_reload_handleReturnAmmo.sqf b/addons/csw/functions/fnc_reload_handleReturnAmmo.sqf index 1d288b863f..464a7fc65d 100644 --- a/addons/csw/functions/fnc_reload_handleReturnAmmo.sqf +++ b/addons/csw/functions/fnc_reload_handleReturnAmmo.sqf @@ -25,11 +25,11 @@ private _fullMagazines = floor (_ammo / _carryMaxAmmo); private _bulletsRemaining = _ammo % _carryMaxAmmo; if (_unloadTo isKindOf "CaManBase") then { - while {(_fullMagazines > 0) && {_unloadTo canAdd _carryMag}} do { + while {(_fullMagazines > 0) && {[_unloadTo, _carryMag] call CBA_fnc_canAddItem}} do { _unloadTo addMagazine [_carryMag, _carryMaxAmmo]; _fullMagazines = _fullMagazines - 1; }; - if ((_bulletsRemaining > 0) && {_unloadTo canAdd _carryMag}) then { + if ((_bulletsRemaining > 0) && {[_unloadTo, _carryMag] call CBA_fnc_canAddItem}) then { _unloadTo addMagazine [_carryMag, _bulletsRemaining]; _bulletsRemaining = 0; }; diff --git a/addons/csw/functions/fnc_reload_loadMagazine.sqf b/addons/csw/functions/fnc_reload_loadMagazine.sqf index 25032a08f4..2b34d38a24 100644 --- a/addons/csw/functions/fnc_reload_loadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_loadMagazine.sqf @@ -22,8 +22,8 @@ params ["_vehicle", "_turret", "_carryMag", "_unit"]; TRACE_4("loadMagazine",_vehicle,_turret,_carryMag,_unit); private _timeToLoad = 1; -if (!isNull(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "ammoLoadTime")) then { - _timeToLoad = getNumber(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QUOTE(ADDON) >> "ammoLoadTime"); +if (!isNull(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime")) then { + _timeToLoad = getNumber(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime"); }; private _displayName = format [localize LSTRING(loadX), getText (configFile >> "CfgMagazines" >> _carryMag >> "displayName")]; diff --git a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf index a1e7ca9715..e1cba376f4 100644 --- a/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf +++ b/addons/csw/functions/fnc_staticWeaponInit_unloadExtraMags.sqf @@ -20,7 +20,7 @@ params ["_staticWeapon", "_assemblyMode", "_emptyWeapon"]; TRACE_3("staticWeaponInit_unloadExtraMags",_staticWeapon,_assemblyMode,_emptyWeapon); if (!_assemblyMode) exitWith {}; -private _desiredAmmo = getNumber (configFile >> "CfgVehicles" >> (typeOf _staticWeapon) >> QUOTE(ADDON) >> "desiredAmmo"); +private _desiredAmmo = getNumber (configOf _staticWeapon >> QUOTE(ADDON) >> "desiredAmmo"); private _storeExtraMagazines = GVAR(handleExtraMagazines); if (_emptyWeapon) then { _desiredAmmo = 0; diff --git a/addons/csw/initSettings.sqf b/addons/csw/initSettings.sqf index 28397a6e9b..10030b68da 100644 --- a/addons/csw/initSettings.sqf +++ b/addons/csw/initSettings.sqf @@ -10,7 +10,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; true, // isGlobal {[QGVAR(defaultAssemblyMode), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(handleExtraMagazines), "CHECKBOX", @@ -20,7 +20,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; true, // isGlobal {[QGVAR(handleExtraMagazines), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(ammoHandling), "LIST", @@ -30,7 +30,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; true, // isGlobal {[QGVAR(ammoHandling), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(progressBarTimeCoefficent), "SLIDER", @@ -40,7 +40,7 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; true, // isGlobal {[QGVAR(progressBarTimeCoefficent), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(dragAfterDeploy), "CHECKBOX", @@ -50,4 +50,4 @@ private _categoryArray = [format ["ACE %1", localize LSTRING(DisplayName)]]; false, // isGlobal {[QGVAR(dragAfterDeploy), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/dagr/CfgEventHandlers.hpp b/addons/dagr/CfgEventHandlers.hpp index 7694c8e745..0612f3abed 100644 --- a/addons/dagr/CfgEventHandlers.hpp +++ b/addons/dagr/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; \ No newline at end of file diff --git a/addons/dagr/CfgVehicles.hpp b/addons/dagr/CfgVehicles.hpp index 6b0188a178..562aeaa53e 100644 --- a/addons/dagr/CfgVehicles.hpp +++ b/addons/dagr/CfgVehicles.hpp @@ -9,7 +9,7 @@ class CfgVehicles { statement = QUOTE(call FUNC(menuInit)); showDisabled = 0; icon = QPATHTOF(UI\DAGR_Icon.paa); - exceptions[] = {"isNotInside", "isNotSitting"}; + exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; class GVAR(toggle) { displayName = CSTRING(ToggleDAGR); condition = QUOTE([ARR_2(_player,'ACE_DAGR')] call EFUNC(common,hasItem)); diff --git a/addons/dagr/Dialog.hpp b/addons/dagr/Dialog.hpp index 52e3a8f683..6ed57d4d12 100644 --- a/addons/dagr/Dialog.hpp +++ b/addons/dagr/Dialog.hpp @@ -139,7 +139,7 @@ class DAGR_Menu_Text { class DAGR_Menu { idd = 266860; - movingEnable = false; + movingEnable = 0; duration = 100000; fadein = 0; fadeout = 0; @@ -152,7 +152,7 @@ class DAGR_Menu { "DAGR_MENU_SELECTION3", "DAGR_MENU_SELECTION4", "DAGR_MENU_Main_Text", "DAGR_MENU_PSELECTION1", "DAGR_MENU_PSELECTION2", "DAGR_MENU_PSELECTION3", "DAGR_MENU_PSELECTION4", "DAGR_MENU_PSELECTION5", "DAGR_MENU_PSELECTION6","DAGR_MENU_PSELECTION7", "DAGR_MENU_PSELECTION8"}; - class DAGR_MENU_UI : DAGR_Menu_Pic { + class DAGR_MENU_UI: DAGR_Menu_Pic { idc = 266861; x = 0.175; y = -0.173; @@ -160,28 +160,28 @@ class DAGR_Menu { sizeEx = 0.1; }; - class DAGR_PWR_Button : DAGR_Button { + class DAGR_PWR_Button: DAGR_Button { idc = 266863; action = QUOTE(GVAR(PWR) = true); x = 0.40; y = 0.65; }; - class DAGR_UP_Button : DAGR_Button { + class DAGR_UP_Button: DAGR_Button { idc = 266864; action = QUOTE(GVAR(UP) = true); x = 0.50; y = 0.675; }; - class DAGR_DOWN_Button : DAGR_Button { + class DAGR_DOWN_Button: DAGR_Button { idc = 266865; action = QUOTE(GVAR(DOWN) = true); x = 0.50; y = 0.81; }; - class DAGR_LEFT_Button : DAGR_Button { + class DAGR_LEFT_Button: DAGR_Button { idc = 266866; action = QUOTE(GVAR(LEFT) = true); x = 0.40; @@ -190,7 +190,7 @@ class DAGR_Menu { h = 0.07; }; - class DAGR_RIGHT_Button : DAGR_Button { + class DAGR_RIGHT_Button: DAGR_Button { idc = 266867; action = QUOTE(GVAR(RIGHT) = true); x = 0.62; @@ -199,14 +199,13 @@ class DAGR_Menu { h = 0.07; }; - class DAGR_NEXT_Button : DAGR_Button { + class DAGR_NEXT_Button: DAGR_Button { idc = 266868; - action = QUOTE(DAGR_NEXT = true); x = 0.60; y = 0.65; }; - class DAGR_SEL_Button : DAGR_Button { + class DAGR_SEL_Button: DAGR_Button { idc = 266869; action = QUOTE(GVAR(SEL) = true); x = 0.54; @@ -215,7 +214,7 @@ class DAGR_Menu { h = 0.06; }; - class DAGR_MENU_Button : DAGR_Button { + class DAGR_MENU_Button: DAGR_Button { idc = 266870; action = QUOTE(GVAR(MENU_B) = true); x = 0.46; @@ -224,47 +223,47 @@ class DAGR_Menu { h = 0.06; }; - class DAGR_F1_Button : DAGR_Button { + class DAGR_F1_Button: DAGR_Button { idc = 266871; action = QUOTE(GVAR(F1) = true); x = 0.40; y = 0.575; }; - class DAGR_F2_Button : DAGR_Button { + class DAGR_F2_Button: DAGR_Button { idc = 266872; action = QUOTE(GVAR(F2) = true); x = 0.495; y = 0.575; }; - class DAGR_F3_Button : DAGR_Button { + class DAGR_F3_Button: DAGR_Button { idc = 266873; action = QUOTE(GVAR(F3) = true); x = 0.59; y = 0.575; }; - class DAGR_F1_Text : DAGR_Menu_Text { + class DAGR_F1_Text: DAGR_Menu_Text { idc = 266874; x = 0.388; y = 0.38; text = ""; }; - class DAGR_F2_Text : DAGR_Menu_Text { + class DAGR_F2_Text: DAGR_Menu_Text { idc = 266875; x = 0.506; y = 0.38; }; - class DAGR_F3_Text : DAGR_Menu_Text { + class DAGR_F3_Text: DAGR_Menu_Text { idc = 266876; x = 0.612; y = 0.38; }; - class DAGR_MENU_OPTION0 : DAGR_Menu_Text { + class DAGR_MENU_OPTION0: DAGR_Menu_Text { idc = 2668777; style = 0x02; sizeEx = 0.035; @@ -272,7 +271,7 @@ class DAGR_Menu { y = 0.19; }; - class DAGR_MENU_OPTION1 : DAGR_Menu_Text { + class DAGR_MENU_OPTION1: DAGR_Menu_Text { idc = 2668778; style = 0x02; sizeEx = 0.035; @@ -280,7 +279,7 @@ class DAGR_Menu { y = 0.225; }; - class DAGR_MENU_OPTION2 : DAGR_Menu_Text { + class DAGR_MENU_OPTION2: DAGR_Menu_Text { idc = 2668779; style = 0x02; sizeEx = 0.035; @@ -288,7 +287,7 @@ class DAGR_Menu { y = 0.26; }; - class DAGR_MENU_OPTION3 : DAGR_Menu_Text { + class DAGR_MENU_OPTION3: DAGR_Menu_Text { idc = 2668780; style = 0x02; sizeEx = 0.035; @@ -296,14 +295,14 @@ class DAGR_Menu { y = 0.295; }; - class DAGR_MENU_OPTION4 : DAGR_Menu_Text { + class DAGR_MENU_OPTION4: DAGR_Menu_Text { idc = 2668781; style = 0x02; sizeEx = 0.035; x = 0.43; y = 0.33; }; - class DAGR_MENU_SELECTION0 : DAGR_Menu_Pic { + class DAGR_MENU_SELECTION0: DAGR_Menu_Pic { idc = 2668783; x = 0.42; y = 0.246; @@ -312,7 +311,7 @@ class DAGR_Menu { sizeEx = 0.05; }; - class DAGR_MENU_SELECTION1 : DAGR_Menu_Pic { + class DAGR_MENU_SELECTION1: DAGR_Menu_Pic { idc = 2668784; x = 0.42; y = 0.281; @@ -321,7 +320,7 @@ class DAGR_Menu { sizeEx = 0.05; }; - class DAGR_MENU_SELECTION2 : DAGR_Menu_Pic { + class DAGR_MENU_SELECTION2: DAGR_Menu_Pic { idc = 2668785; x = 0.42; y = 0.316; @@ -330,7 +329,7 @@ class DAGR_Menu { sizeEx = 0.05; }; - class DAGR_MENU_SELECTION3 : DAGR_Menu_Pic { + class DAGR_MENU_SELECTION3: DAGR_Menu_Pic { idc = 2668786; x = 0.42; y = 0.351; @@ -339,7 +338,7 @@ class DAGR_Menu { sizeEx = 0.05; }; - class DAGR_MENU_SELECTION4 : DAGR_Menu_Pic { + class DAGR_MENU_SELECTION4: DAGR_Menu_Pic { idc = 2668787; x = 0.42; y = 0.386; @@ -348,7 +347,7 @@ class DAGR_Menu { sizeEx = 0.05; }; - class DAGR_MENU_Main_Text : DAGR_Menu_Text { + class DAGR_MENU_Main_Text: DAGR_Menu_Text { idc = 2668782; style = ST_CENTER; x = 0.38; @@ -358,67 +357,68 @@ class DAGR_Menu { sizeEx = 0.04; }; - class DAGR_MENU_PSELECTION1 : DAGR_Menu_Pic { +//Waypoint adding and modification digits underline + class DAGR_MENU_PSELECTION1: DAGR_Menu_Pic { idc = 2668788; - x = 0.451; - y = 0.352; - w = 0.01; - h = 0.003; - }; - - class DAGR_MENU_PSELECTION2 : DAGR_Menu_Pic { - idc = 2668789; x = 0.465; y = 0.352; w = 0.01; h = 0.003; }; - class DAGR_MENU_PSELECTION3 : DAGR_Menu_Pic { + class DAGR_MENU_PSELECTION2: DAGR_Menu_Pic { + idc = 2668789; + x = 0.475; + y = 0.352; + w = 0.01; + h = 0.003; + }; + + class DAGR_MENU_PSELECTION3: DAGR_Menu_Pic { idc = 2668790; - x = 0.479; + x = 0.485; y = 0.352; w = 0.01; h = 0.003; }; - class DAGR_MENU_PSELECTION4 : DAGR_Menu_Pic { + class DAGR_MENU_PSELECTION4: DAGR_Menu_Pic { idc = 2668791; - x = 0.493; + x = 0.495; y = 0.352; w = 0.01; h = 0.003; }; - class DAGR_MENU_PSELECTION5 : DAGR_Menu_Pic { + class DAGR_MENU_PSELECTION5: DAGR_Menu_Pic { idc = 2668792; - x = 0.507; + x = 0.505; y = 0.352; w = 0.01; h = 0.003; }; - class DAGR_MENU_PSELECTION6 : DAGR_Menu_Pic { + class DAGR_MENU_PSELECTION6: DAGR_Menu_Pic { idc = 2668793; - x = 0.521; + x = 0.515; y = 0.352; w = 0.01; h = 0.003; }; - class DAGR_MENU_PSELECTION7 : DAGR_Menu_Pic { + class DAGR_MENU_PSELECTION7: DAGR_Menu_Pic { idc = 2668794; + x = 0.525; + y = 0.352; + w = 0.01; + h = 0.003; + }; + + class DAGR_MENU_PSELECTION8: DAGR_Menu_Pic { + idc = 2668795; x = 0.535; y = 0.352; w = 0.01; h = 0.003; }; - - class DAGR_MENU_PSELECTION8 : DAGR_Menu_Pic { - idc = 2668795; - x = 0.549; - y = 0.352; - w = 0.01; - h = 0.003; - }; }; diff --git a/addons/dagr/README.md b/addons/dagr/README.md index eb502e7a24..7de32ecec2 100644 --- a/addons/dagr/README.md +++ b/addons/dagr/README.md @@ -2,10 +2,3 @@ ace_dagr =============== Adds Defense Advanced GPS Receiver. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/dagr/RscTitles.hpp b/addons/dagr/RscTitles.hpp index ab70517c9a..609b546af4 100644 --- a/addons/dagr/RscTitles.hpp +++ b/addons/dagr/RscTitles.hpp @@ -32,7 +32,7 @@ class RscTitles { class DAGR_Display { idd = 266850; - movingEnable = false; + movingEnable = 0; duration = 100000; fadein = 0; fadeout = 0; @@ -40,13 +40,13 @@ class RscTitles { onLoad="uiNamespace setVariable ['DAGR_Display', _this select 0]"; controls[] = {"DAGR_UI", "DAGR_Grid", "DAGR_Speed", "DAGR_Elevation", "DAGR_Heading", "DAGR_Time", "DAGR_WP", "DAGR_Bearing", "DAGR_DIST"}; - class DAGR_UI : DAGR_Pic { + class DAGR_UI: DAGR_Pic { idc = 266856; x = "(SafeZoneW + SafeZoneX) - 0.45"; y = "(SafeZoneH + SafeZoneY) - 0.47"; }; - class DAGR_Grid : DAGR_Text { + class DAGR_Grid: DAGR_Text { idc = 266851; x = "(SafeZoneW + SafeZoneX) - 0.370";// 0.830 y = "(SafeZoneH + SafeZoneY)- 0.250";// 0.845 @@ -54,39 +54,39 @@ class RscTitles { h = 0.06; sizeEx = 0.07; }; - class DAGR_Speed : DAGR_Text { + class DAGR_Speed: DAGR_Text { idc = 266852; x = "(SafeZoneW + SafeZoneX) - 0.388"; //0.812 y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 }; - class DAGR_Elevation : DAGR_Text { + class DAGR_Elevation: DAGR_Text { idc = 266853; x = "(SafeZoneW + SafeZoneX) - 0.270"; //0.930 y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 }; - class DAGR_Heading : DAGR_Text { + class DAGR_Heading: DAGR_Text { idc = 266854; x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787 y = "(SafeZoneH + SafeZoneY) - 0.1294"; //0.9656 }; - class DAGR_Time : DAGR_Text { + class DAGR_Time: DAGR_Text { idc = 266855; x = "(SafeZoneW + SafeZoneX) - 0.275"; //0.925 y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965 }; - class DAGR_WP : DAGR_Text { + class DAGR_WP: DAGR_Text { idc = 266857; x = "(SafeZoneW + SafeZoneX) - 0.235"; //0.965 y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 }; - class DAGR_Bearing : DAGR_Text { + class DAGR_Bearing: DAGR_Text { idc = 266858; x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787 y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 }; - class DAGR_DIST : DAGR_Text { + class DAGR_DIST: DAGR_Text { idc = 266859; x = "(SafeZoneW + SafeZoneX) - 0.265"; //0.935 y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965 diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index c535ac1349..498d6614d4 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -596,7 +596,6 @@ GVAR(menuRun) = true; GVAR(F1) = false; GVAR(MENU_B) = false; GVAR(SEL) = false; - DAGR_NEXT = false; GVAR(RIGHT) = false; GVAR(LEFT) = false; GVAR(UP) = false; diff --git a/addons/dagr/initKeybinds.sqf b/addons/dagr/initKeybinds.sqf index d99e0f15c7..fb9d8dd771 100644 --- a/addons/dagr/initKeybinds.sqf +++ b/addons/dagr/initKeybinds.sqf @@ -35,7 +35,7 @@ private _conditonCode = { }; private _toggleCode = { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {}; + if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Statement [] call FUNC(toggleOverlay); diff --git a/addons/disarming/CfgEventHandlers.hpp b/addons/disarming/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/disarming/CfgEventHandlers.hpp +++ b/addons/disarming/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/disarming/README.md b/addons/disarming/README.md index 0423aa48bd..bcca67231e 100644 --- a/addons/disarming/README.md +++ b/addons/disarming/README.md @@ -1,11 +1,4 @@ ace_disarming ============ -Adds ability to make units drop items/weapons/magazines. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) +Adds ability to make units drop items/weapons/magazines. diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index 4c8fb3bf2d..8f358e8b43 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -92,7 +92,6 @@ if (({((_x select 0) in _listOfItemsToRemove) && {(getNumber (configFile >> "Cfg }; //Verify holder has mags unit had if (!([_targetMagazinesStart, _targetMagazinesEnd, _holderMagazinesStart, _holderMagazinesEnd] call FUNC(verifyMagazinesMoved))) then { - ERR = [_targetMagazinesStart, _targetMagazinesEnd, _holderMagazinesStart, _holderMagazinesEnd]; _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Crate Magazines not in holder"] call FUNC(eventTargetFinish); }; @@ -220,7 +219,7 @@ if (_holderIsEmpty) then { }; //If we added a dummy item, remove it now - if (_holderIsEmpty && {!((getItemCargo _holder) isEqualTo [[DUMMY_ITEM],[1]])}) exitWith { + if (_holderIsEmpty && {(getItemCargo _holder) isNotEqualTo [[DUMMY_ITEM],[1]]}) exitWith { _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Holder should only have dummy item"] call FUNC(eventTargetFinish); }; @@ -238,7 +237,7 @@ if (_holderIsEmpty) then { _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Target cannot be disarmed"] call FUNC(eventTargetFinish); }; - if (_needToRemoveVest && {!((vestItems _target) isEqualTo [])}) exitWith { + if (_needToRemoveVest && {(vestItems _target) isNotEqualTo []}) exitWith { _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Vest Not Empty"] call FUNC(eventTargetFinish); }; @@ -246,7 +245,7 @@ if (_holderIsEmpty) then { _holder addItemCargoGlobal [(vest _target), 1]; removeVest _target; }; - if (_needToRemoveUniform && {!((uniformItems _target) isEqualTo [])}) exitWith { + if (_needToRemoveUniform && {(uniformItems _target) isNotEqualTo []}) exitWith { _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Uniform Not Empty"] call FUNC(eventTargetFinish); }; diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index 0b66009949..16d73d25a2 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -40,8 +40,15 @@ GVAR(disarmTarget) = _target; if (isNull GVAR(disarmTarget)) exitWith {ERROR("disarmTarget is null");}; + private _textRight = ""; + for "_i" from 0 to (lbSize _idc) - 1 do { + if (lbData [_idc, _i] isEqualTo _data) exitWith { + _textRight = lbTextRight [_idc, _i]; + }; + }; + TRACE_2("Debug: Droping %1 from %2",_data,GVAR(disarmTarget)); - [QGVAR(dropItems), [ACE_player, GVAR(disarmTarget), [_data]], [GVAR(disarmTarget)]] call CBA_fnc_targetEvent; + [QGVAR(dropItems), [ACE_player, GVAR(disarmTarget), [_data], parseNumber _textRight], [GVAR(disarmTarget)]] call CBA_fnc_targetEvent; false //not sure what this does }]; diff --git a/addons/disposable/README.md b/addons/disposable/README.md index b75ecb112d..d7eee46bc8 100644 --- a/addons/disposable/README.md +++ b/addons/disposable/README.md @@ -2,11 +2,3 @@ ace_disposable ============== Makes the NLAW a disposable one-shot weapon using the [CBA Disposable Framework](https://github.com/CBATeam/CBA_A3/wiki/Disposable-Launchers). - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/disposable/config.cpp b/addons/disposable/config.cpp index 2cc4f4202c..b4561fd8b3 100644 --- a/addons/disposable/config.cpp +++ b/addons/disposable/config.cpp @@ -4,7 +4,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; units[] = {}; - weapons[] = {"ACE_launch_NLAW_loaded_F","ACE_launch_NLAW_used_F"}; + weapons[] = {"ACE_launch_NLAW_ready_F","ACE_launch_NLAW_used_F"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); diff --git a/addons/dogtags/CfgEventHandlers.hpp b/addons/dogtags/CfgEventHandlers.hpp index e90bed419e..2a3f71f852 100644 --- a/addons/dogtags/CfgEventHandlers.hpp +++ b/addons/dogtags/CfgEventHandlers.hpp @@ -1,15 +1,15 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/dogtags/CfgWeapons.hpp b/addons/dogtags/CfgWeapons.hpp index ec8d9e6ee4..0f795d8d08 100644 --- a/addons/dogtags/CfgWeapons.hpp +++ b/addons/dogtags/CfgWeapons.hpp @@ -1,5 +1,5 @@ #define ACE_DOGTAG_ITEM(DOGTAGBASE,DOGTAGID) \ - class DOGTAGBASE##_##DOGTAGID : DOGTAGBASE { \ + class DOGTAGBASE##_##DOGTAGID: DOGTAGBASE { \ author = ECSTRING(common,ACETeam); \ scope = 1; \ scopeArsenal = 0; \ diff --git a/addons/dogtags/README.md b/addons/dogtags/README.md index 176b60750d..da24dd53d4 100644 --- a/addons/dogtags/README.md +++ b/addons/dogtags/README.md @@ -2,11 +2,3 @@ ace_dogtags ========== Adds options to check and take dog tag from dead or unconscious units - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [SzwedzikPL](https://github.com/SzwedzikPL) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/dogtags/functions/fnc_checkDogtag.sqf b/addons/dogtags/functions/fnc_checkDogtag.sqf index fb722361a4..52b08e1947 100644 --- a/addons/dogtags/functions/fnc_checkDogtag.sqf +++ b/addons/dogtags/functions/fnc_checkDogtag.sqf @@ -22,7 +22,7 @@ params ["_player", "_target"]; _player call EFUNC(common,goKneeling); // sound -private _position = AGLToASL (_target modelToWorld (_target selectionPosition "neck")); +private _position = _target modelToWorldWorld (_target selectionPosition "neck"); playSound3D [ selectRandom RUSTLING_SOUNDS, diff --git a/addons/dogtags/functions/fnc_takeDogtag.sqf b/addons/dogtags/functions/fnc_takeDogtag.sqf index 464f282334..4538115633 100644 --- a/addons/dogtags/functions/fnc_takeDogtag.sqf +++ b/addons/dogtags/functions/fnc_takeDogtag.sqf @@ -23,7 +23,7 @@ params ["_player", "_target"]; _player call EFUNC(common,goKneeling); // sound -private _position = AGLToASL (_target modelToWorld (_target selectionPosition "neck")); +private _position = _target modelToWorldWorld (_target selectionPosition "neck"); playSound3D [ selectRandom RUSTLING_SOUNDS, diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp index 233c4bf79d..d1f8a87636 100644 --- a/addons/dragging/CfgEventHandlers.hpp +++ b/addons/dragging/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; @@ -29,12 +29,13 @@ class Extended_Init_EventHandlers { init = QUOTE(_this call DFUNC(initObject)); }; }; - class ThingX { + class Thing { class ADDON { init = QUOTE(_this call DFUNC(initObject)); + exclude[] = {"ModuleEmpty_F", "ThingEffect", "Wreck"}; }; }; - class Land_PortableLight_single_F { + class NonStrategic { class ADDON { init = QUOTE(_this call DFUNC(initObject)); }; diff --git a/addons/dragging/CfgMovesBasic.hpp b/addons/dragging/CfgMovesBasic.hpp index de15271416..6b55e82c2d 100644 --- a/addons/dragging/CfgMovesBasic.hpp +++ b/addons/dragging/CfgMovesBasic.hpp @@ -1,8 +1,56 @@ class CfgMovesBasic { + class ManActions { + ACE_dragWithPistol = "ace_dragging"; + ACE_dragWithRifle = "AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2"; + }; + class Actions { class MoveWithInjuredManDragger; class MoveWithInjuredManDraggerRfl: MoveWithInjuredManDragger { Up = "amovpercmstpsraswrfldnon"; }; + + class MoveWithInjuredManDraggerPst; + class ACE_MoveWithInjuredManDraggerPst: MoveWithInjuredManDraggerPst { + Default = "ace_dragging_static"; + FastB = "ace_dragging"; + FastLB = "ace_dragging"; + FastRB = "ace_dragging"; + grabDrag = "ace_dragging_static"; + grabCarry = "Helper_SwitchToCarrynon_pst"; + HandGunOn = "ace_dragging_static"; + PlayerSlowB = "ace_dragging"; + PlayerSlowLB = "ace_dragging"; + PlayerSlowRB = "ace_dragging"; + PlayerTactB = "AmovPknlMtacSrasWpstDb"; + PlayerTactF = "AmovPknlMtacSrasWpstDf"; + PlayerTactL = "AmovPknlMtacSrasWpstDl"; + PlayerTactLB = "AmovPknlMtacSrasWpstDbl"; + PlayerTactLF = "AmovPknlMtacSrasWpstDfl"; + PlayerTactR = "AmovPknlMtacSrasWpstDr"; + PlayerTactRB = "AmovPknlMtacSrasWpstDbr"; + PlayerTactRF = "AmovPknlMtacSrasWpstDfr"; + PlayerWalkB = "ace_dragging"; + PlayerWalkLB = "ace_dragging"; + PlayerWalkRB = "ace_dragging"; + released = "ace_dragging_drop"; + SlowB = "ace_dragging"; + SlowLB = "ace_dragging"; + SlowRB = "ace_dragging"; + Stop = "ace_dragging_static"; + StopRelaxed = "ace_dragging_static"; + TactB = "AmovPknlMtacSrasWpstDb"; + TactF = "AmovPknlMtacSrasWpstDf"; + TactL = "AmovPknlMtacSrasWpstDl"; + TactLB = "AmovPknlMtacSrasWpstDbl"; + TactLF = "AmovPknlMtacSrasWpstDfl"; + TactR = "AmovPknlMtacSrasWpstDr"; + TactRB = "AmovPknlMtacSrasWpstDbr"; + TactRF = "AmovPknlMtacSrasWpstDfr"; + Up = "ace_dragging_static"; + WalkB = "ace_dragging"; + WalkLB = "ace_dragging"; + WalkRB = "ace_dragging"; + }; }; }; diff --git a/addons/dragging/CfgMovesMaleSdr.hpp b/addons/dragging/CfgMovesMaleSdr.hpp index 715765679f..d19d210f49 100644 --- a/addons/dragging/CfgMovesMaleSdr.hpp +++ b/addons/dragging/CfgMovesMaleSdr.hpp @@ -1,13 +1,127 @@ class CfgMovesMaleSdr: CfgMovesBasic { class InjuredMovedBase; class AgonyBaseRfl; + class StandBase; + class AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_1; + class DraggerBase; class States { class AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon: InjuredMovedBase { speed = -10; // 1/10 }; + class AinjPfalMstpSnonWrflDnon_carried_Up: AgonyBaseRfl { speed = -10; // 1/10 }; + + class AmovPercMstpSrasWpstDnon: StandBase { + ConnectTo[] = { + "AmovPercMstpSrasWpstDnon", + 0.02, + "AovrPercMstpSrasWpstDf", + 0.025, + "AmovPercMstpSrasWpstDnon_AidlPercMstpSlowWpstDnon", + 0.0099999998, + "PistolMagazineReloadStand", + 0.1, + "AmovPercMstpSrasWpstDnon_AmovPercMstpSlowWpstDnon", + 0.02, + "AmovPercMstpSrasWpstDnon_AmovPercMstpSrasWrflDnon", + 0.02, + "AmovPercMstpSrasWpstDnon_AwopPercMstpSoptWbinDnon", + 0.02, + "AmovPercMstpSrasWpstDnon_AmovPercMstpSnonWnonDnon", + 0.02, + "AmovPercMstpSrasWpstDnon_SaluteIn", + 0.02, + "AwopPercMstpSgthWpstDnon_Part1", + 0.1, + "AmovPercMstpSrasWpstDnon_AinvPknlMstpSnonWnonDnon", + 0.02, + "AmovPercMstpSrasWpstDnon_AmovPercMstpSrasWlnrDnon", + 0.02, + "AmovPercMstpSrasWpstDnon_AadjPercMstpSrasWpstDup", + 0.02, + "AmovPercMstpSrasWpstDnon_AadjPercMstpSrasWpstDdown", + 0.02, + "AmovPercMstpSrasWpstDnon_AadjPercMstpSrasWpstDleft", + 0.02, + "AmovPercMstpSrasWpstDnon_AadjPercMstpSrasWpstDright", + 0.02, + "AmovPercMstpSrasWpstDnon_AmovPercMstpSrasWpstDnon_gear", + 0.02, + "Acts_starterPistol_in", + 0.001, + "Acts_PistolRaisedStand_Default", + 1, + "ace_dragging", + 0.1 + }; + }; + + class AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_2: AmovPercMstpSlowWrflDnon_AcinPknlMwlkSlowWrflDb_1 { + aiming = "aimingDefault"; + aimingBody = "aimingUpDefault"; + aimPrecision = 5; // default: 1 + }; + + class ace_dragging: DraggerBase { + actions = "ace_MoveWithInjuredManDraggerPst"; + aiming = "aimingPistol"; + aimingBody = "aimingPistol"; + aimPrecision = 2; // default: 1 + canPullTrigger = 1; + canReload = 0; + ConnectTo[] = { + "ace_dragging", + 0.1, + "ace_dragging_drop", + 0.2 + }; + disableWeapons = 0; + duty = 0.6; + enableBinocular = 0; + file = QPATHTO_T(anim\ace_dragging.rtm); + InterpolateTo[] = { + "ace_dragging_static", + 0.1 + }; + interpolationSpeed = 5; + limitGunMovement = 0.2; + looped = 1; + showHandGun = 1; + turnSpeed = 0.5; + }; + + class ace_dragging_static: ace_dragging { + ConnectTo[] = { + "ace_dragging", + 0.1, + "ace_dragging_drop", + 0.2 + }; + InterpolateTo[] = { + "ace_dragging", + 0.1, + "ace_dragging_drop", + 0.2 + }; + looped = 1; + speed = 0; + }; + + class ace_dragging_drop: ace_dragging { + ConnectTo[] = { + "AmovPknlMstpSrasWpstDnon", + 0.1 + }; + file = QPATHTO_T(anim\ace_dragging_drop.rtm); + InterpolateTo[] = { + "Unconscious", + 0.02 + }; + interpolationSpeed = 5; + looped = 0; + }; }; }; diff --git a/addons/dragging/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp index 4c43dd814e..076c5fb640 100644 --- a/addons/dragging/CfgVehicles.hpp +++ b/addons/dragging/CfgVehicles.hpp @@ -1,3 +1,4 @@ +#define XEH_INHERITED class EventHandlers {class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {};} class CBA_Extended_EventHandlers; @@ -7,11 +8,9 @@ class CfgVehicles { class StaticWeapon: LandVehicle { GVAR(canCarry) = 1; GVAR(carryPosition)[] = {0,1.2,0}; - GVAR(carryDirection) = 0; GVAR(canDrag) = 1; GVAR(dragPosition)[] = {0,1.2,0}; - GVAR(dragDirection) = 0; }; class StaticCannon: StaticWeapon { @@ -23,11 +22,9 @@ class CfgVehicles { class Mortar_01_base_F: StaticMortar { GVAR(canCarry) = 1; GVAR(carryPosition)[] = {0,1.2,0}; - GVAR(carryDirection) = 0; GVAR(canDrag) = 1; GVAR(dragPosition)[] = {0,1.2,0}; - GVAR(dragDirection) = 0; }; // Big 1.70 and 1.84 Autonomous AA Turrets @@ -74,12 +71,9 @@ class CfgVehicles { class Items_base_F; class ReammoBox_F: ThingX { GVAR(canCarry) = 0; - GVAR(carryPosition)[] = {0,1,1}; - GVAR(carryDirection) = 0; GVAR(canDrag) = 0; GVAR(dragPosition)[] = {0,1.2,0}; - GVAR(dragDirection) = 0; }; class Slingload_base_F: ReammoBox_F { @@ -162,43 +156,27 @@ class CfgVehicles { //Plastic and metal case class PlasticCase_01_base_F: Items_base_F { - class EventHandlers { - class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; - }; GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1,1}; GVAR(carryDirection) = 270; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.2,0}; + GVAR(dragPosition)[] = {0,1.2,0}; GVAR(dragDirection) = 270; }; class MetalCase_01_base_F: Items_base_F { - class EventHandlers { - class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; - }; GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1,1}; GVAR(carryDirection) = 270; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.2,0}; - GVAR(dragDirection) = 0; + GVAR(dragPosition)[] = {0,1.2,0}; }; // Barrier class RoadCone_F: ThingX { - class EventHandlers { - class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; - }; - GVAR(canCarry) = 1; - GVAR(carryPosition)[] = {0,1,1}; - GVAR(carryDirection) = 0; GVAR(canDrag) = 1; GVAR(dragPosition)[] = {0,1.2,0}; - GVAR(dragDirection) = 0; }; class RoadBarrier_F: RoadCone_F { @@ -208,59 +186,38 @@ class CfgVehicles { // Misc crates class Constructions_base_F; class Land_WoodenBox_F: Constructions_base_F { - class EventHandlers { - class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; - }; + EGVAR(interaction,replaceTerrainObject) = 1; GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1,1}; - GVAR(carryDirection) = 0; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.4,0}; - GVAR(dragDirection) = 0; + GVAR(dragPosition)[] = {0,1.4,0}; }; class Land_WoodenCrate_01_F: ThingX { - class EventHandlers { - class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; - }; GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1,1}; GVAR(carryDirection) = 270; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.5,0}; GVAR(dragDirection) = 90; }; class Land_PaperBox_01_small_closed_base_F: Items_base_F { GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1,1}; - GVAR(carryDirection) = 0; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.5,0}; GVAR(dragDirection) = 90; }; class Box_UAV_06_base_F: Items_base_F { GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1,1}; - GVAR(carryDirection) = 0; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.5,0}; - GVAR(dragDirection) = 0; }; class ACE_RepairItem_Base: ThingX {}; class ACE_Track: ACE_RepairItem_Base { GVAR(canCarry) = 1; - GVAR(carryPosition)[] = {0,1,1}; - GVAR(carryDirection) = 0; }; class ACE_Wheel: ACE_RepairItem_Base { GVAR(canCarry) = 1; - GVAR(carryPosition)[] = {0,1,1}; - GVAR(carryDirection) = 0; }; class Lamps_base_F; @@ -278,19 +235,157 @@ class CfgVehicles { GVAR(canCarry) = 1; // if y < 0.9 player gets damage GVAR(carryPosition)[] = {0,0.9,1}; - GVAR(carryDirection) = 0; GVAR(canDrag) = 1; GVAR(dragPosition)[] = {0,0.7,0}; - GVAR(dragDirection) = 0; }; class Land_Camping_Light_off_F: ThingX { GVAR(canCarry) = 1; GVAR(carryPosition)[] = {0,0.9,1}; - GVAR(carryDirection) = 0; GVAR(canDrag) = 1; GVAR(dragPosition)[] = {0,0.7,0}; - GVAR(dragDirection) = 0; + }; + + // some terrain objects + + class Land_CampingTable_F: ThingX { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,1,0.5}; + }; + class Land_CampingTable_small_F: ThingX { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,1,0.5}; + }; + class Land_GarbageContainer_closed_F: ThingX { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + GVAR(dragDirection) = 180; + }; + class Land_GarbageContainer_open_F: ThingX { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + GVAR(dragDirection) = 180; + }; + class Land_Sun_chair_F: ThingX { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryDirection) = 90; + + GVAR(canDrag) = 1; + GVAR(dragPosition)[] = {0,1,0}; + GVAR(dragDirection) = 90; + }; + class Land_TablePlastic_01_F: ThingX { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,1,0}; + + GVAR(canDrag) = 1; + }; + class Land_Tyre_F: ThingX { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,0.6,1}; + }; + class Land_WoodenTable_large_F: ThingX { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + GVAR(dragDirection) = 90; + }; + class Land_BarrelSand_F: Items_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + GVAR(dragPosition)[] = {0,1,0}; + }; + class Land_BarrelWater_F: Items_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + GVAR(dragPosition)[] = {0,1,0}; + }; + class Land_Bucket_F: Items_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,0.6,1}; + }; + class Land_CanisterPlastic_F: Items_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,0.6,0}; + }; + class Land_GarbageBarrel_01_english_F: Items_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + }; + class Land_MetalBarrel_F: Items_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + GVAR(dragPosition)[] = {0,1,0}; + }; + class Land_Pallet_F: Constructions_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + + GVAR(canDrag) = 1; + }; + class Land_Pallet_vertical_F: Constructions_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,0.6,0.6}; + GVAR(carryDirection) = 180; + }; + class Land_WheelCart_F: Constructions_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + }; + class Land_WorkStand_F: Constructions_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,1,0}; + + GVAR(canDrag) = 1; + GVAR(dragPosition)[] = {0,1,0}; + }; + class Market_base_F; + class Land_Basket_F: Market_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,0.6,0.5}; + }; + class Land_WoodenCart_F: Market_base_F { + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + }; + + // static classes need XEH + + class NonStrategic; + class Land_Pallets_F: NonStrategic { + XEH_INHERITED; + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + }; + class Camping_base_F; + class Land_CampingChair_V1_folded_F: Camping_base_F { + XEH_INHERITED; + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,0.6,1}; + }; + class Stall_base_F; + class Land_CratesPlastic_F: Stall_base_F { + XEH_INHERITED; + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,0.6,1}; + }; + class House_Small_F; + class Land_MetalBarrel_empty_F: House_Small_F { + XEH_INHERITED; + EGVAR(interaction,replaceTerrainObject) = 1; + GVAR(canDrag) = 1; + GVAR(dragPosition)[] = {0,1,0}; }; }; diff --git a/addons/dragging/README.md b/addons/dragging/README.md index b69484eccf..48a64bbc7e 100644 --- a/addons/dragging/README.md +++ b/addons/dragging/README.md @@ -2,11 +2,3 @@ ace_dragging ============== Adds ability to drag and carry objects. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Garth "L-H" de Wet](https://github.com/CorruptedHeart) -- [commy2](https://github.com/commy2) diff --git a/addons/dragging/XEH_preInit.sqf b/addons/dragging/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/dragging/XEH_preInit.sqf +++ b/addons/dragging/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/dragging/anim/ace_dragging.rtm b/addons/dragging/anim/ace_dragging.rtm new file mode 100644 index 0000000000..e3f5f6f611 Binary files /dev/null and b/addons/dragging/anim/ace_dragging.rtm differ diff --git a/addons/dragging/anim/ace_dragging_drop.rtm b/addons/dragging/anim/ace_dragging_drop.rtm new file mode 100644 index 0000000000..4d0b1d3a85 Binary files /dev/null and b/addons/dragging/anim/ace_dragging_drop.rtm differ diff --git a/addons/dragging/anim/model.cfg b/addons/dragging/anim/model.cfg new file mode 100644 index 0000000000..6be7f511b5 --- /dev/null +++ b/addons/dragging/anim/model.cfg @@ -0,0 +1,119 @@ +class cfgSkeletons { + class OFP2_ManSkeleton { + isDiscrete = 0; + skeletonInherit = ""; + skeletonBones[] = { + "Pelvis","", + "Spine","Pelvis", + "Spine1","Spine", + "Spine2","Spine1", + "Spine3","Spine2", + "camera","Pelvis",// case has changed for arma3 + "weapon","Spine1", + "launcher","Spine1", + "Neck","Spine3", + "Neck1","Neck", + "Head","Neck1", //Head skeleton in hierarchy + //Left upper side + "LeftShoulder","Spine3", + "LeftArm","LeftShoulder", + "LeftArmRoll","LeftArm", + "LeftForeArm","LeftArmRoll", + "LeftForeArmRoll","LeftForeArm", + "LeftHand","LeftForeArmRoll", + "LeftHandRing","LeftHand", + "LeftHandRing1","LeftHandRing", + "LeftHandRing2","LeftHandRing1", + "LeftHandRing3","LeftHandRing2", + "LeftHandPinky1","LeftHandRing", + "LeftHandPinky2","LeftHandPinky1", + "LeftHandPinky3","LeftHandPinky2", + "LeftHandMiddle1","LeftHand", + "LeftHandMiddle2","LeftHandMiddle1", + "LeftHandMiddle3","LeftHandMiddle2", + "LeftHandIndex1","LeftHand", + "LeftHandIndex2","LeftHandIndex1", + "LeftHandIndex3","LeftHandIndex2", + "LeftHandThumb1","LeftHand", + "LeftHandThumb2","LeftHandThumb1", + "LeftHandThumb3","LeftHandThumb2", + //Right upper side + "RightShoulder","Spine3", + "RightArm","RightShoulder", + "RightArmRoll","RightArm", + "RightForeArm","RightArmRoll", + "RightForeArmRoll","RightForeArm", + "RightHand","RightForeArmRoll", + "RightHandRing","RightHand", + "RightHandRing1","RightHandRing", + "RightHandRing2","RightHandRing1", + "RightHandRing3","RightHandRing2", + "RightHandPinky1","RightHandRing", + "RightHandPinky2","RightHandPinky1", + "RightHandPinky3","RightHandPinky2", + "RightHandMiddle1","RightHand", + "RightHandMiddle2","RightHandMiddle1", + "RightHandMiddle3","RightHandMiddle2", + "RightHandIndex1","RightHand", + "RightHandIndex2","RightHandIndex1", + "RightHandIndex3","RightHandIndex2", + "RightHandThumb1","RightHand", + "RightHandThumb2","RightHandThumb1", + "RightHandThumb3","RightHandThumb2", + //Left lower side + "LeftUpLeg","Pelvis", + "LeftUpLegRoll","LeftUpLeg", + "LeftLeg","LeftUpLegRoll", + "LeftLegRoll","LeftLeg", + "LeftFoot","LeftLegRoll", + "LeftToeBase","LeftFoot", + //Right lower side + "RightUpLeg","Pelvis", + "RightUpLegRoll","RightUpLeg", + "RightLeg","RightUpLegRoll", + "RightLegRoll","RightLeg", + "RightFoot","RightLegRoll", + "RightToeBase","RightFoot", + //New facial features arma3 only + "Face_Hub","Head", + "Face_Jawbone","Face_Hub", + "Face_Jowl","Face_Jawbone", + "Face_chopRight","Face_Jawbone", + "Face_chopLeft","Face_Jawbone", + "Face_LipLowerMiddle","Face_Jawbone", + "Face_LipLowerLeft","Face_Jawbone", + "Face_LipLowerRight","Face_Jawbone", + "Face_Chin","Face_Jawbone", + "Face_Tongue","Face_Jawbone", + "Face_CornerRight","Face_Hub", + "Face_CheekSideRight","Face_CornerRight", + "Face_CornerLeft","Face_Hub", + "Face_CheekSideLeft","Face_CornerLeft", + "Face_CheekFrontRight","Face_Hub", + "Face_CheekFrontLeft","Face_Hub", + "Face_CheekUpperRight","Face_Hub", + "Face_CheekUpperLeft","Face_Hub", + "Face_LipUpperMiddle","Face_Hub", + "Face_LipUpperRight","Face_Hub", + "Face_LipUpperLeft","Face_Hub", + "Face_NostrilRight","Face_Hub", + "Face_NostrilLeft","Face_Hub", + "Face_Forehead","Face_Hub", + "Face_BrowFrontRight","Face_Forehead", + "Face_BrowFrontLeft","Face_Forehead", + "Face_BrowMiddle","Face_Forehead", + "Face_BrowSideRight","Face_Forehead", + "Face_BrowSideLeft","Face_Forehead", + "Face_Eyelids","Face_Hub", + "Face_EyelidUpperRight","Face_Hub", + "Face_EyelidUpperLeft","Face_Hub", + "Face_EyelidLowerRight","Face_Hub", + "Face_EyelidLowerLeft","Face_Hub", + "EyeLeft","Face_Hub", + "EyeRight","Face_Hub" + };// end of skeleton array + // location of pivot points (local axes) for hierarchical animation + pivotsModel="A3\anims_f\data\skeleton\SkeletonPivots.p3d"; + }; +}; + diff --git a/addons/dragging/config.cpp b/addons/dragging/config.cpp index 188f3916f2..26e5e2c88f 100644 --- a/addons/dragging/config.cpp +++ b/addons/dragging/config.cpp @@ -8,7 +8,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; author = ECSTRING(common,ACETeam); - authors[] = {"Garth 'L-H' de Wet", "commy2", "PiZZADOX"}; + authors[] = {"Garth 'L-H' de Wet", "commy2", "PiZZADOX", "Malbryn"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index b5edbd800c..2483903eef 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -25,6 +25,6 @@ if !([_unit, _target, []] call EFUNC(common,canInteractWith)) exitWith {false}; if ((_unit getHitPointDamage "HitLegs") >= 0.5) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) -if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; +if (((typeOf _target) isKindOf "StaticWeapon") && {{(getText (configOf _x >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; alive _target && {vehicle _target isEqualto _target} && {_target getVariable [QGVAR(canCarry), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index dbae83521b..afc679e375 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -21,6 +21,6 @@ params ["_unit", "_target"]; if !([_unit, _target, ["isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; // a static weapon has to be empty for dragging (ignore UAV AI) -if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; +if ((typeOf _target) isKindOf "StaticWeapon" && {{(getText (configOf _x >> "simulation")) != "UAVPilot"} count crew _target > 0}) exitWith {false}; alive _target && {vehicle _target isEqualto _target} && {_target getVariable [QGVAR(canDrag), false]} && {animationState _target in ["", "unconscious"] || (_target getVariable ["ACE_isUnconscious", false]) || (_target isKindOf "CAManBase" && {(_target getHitPointDamage "HitLegs") > 0.4})} diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf index e3f8c2b61e..c819f20347 100644 --- a/addons/dragging/functions/fnc_carryObject.sqf +++ b/addons/dragging/functions/fnc_carryObject.sqf @@ -27,8 +27,8 @@ private _direction = _target getVariable [QGVAR(carryDirection), 0]; // handle objects vs persons if (_target isKindOf "CAManBase") then { - [_unit, "AcinPercMstpSnonWnonDnon", 2, true] call EFUNC(common,doAnimation); - [_target, "AinjPfalMstpSnonWnonDf_carried_dead", 2, true] call EFUNC(common,doAnimation); + [_unit, "AcinPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation); + [_target, "AinjPfalMstpSnonWnonDf_carried_dead", 2] call EFUNC(common,doAnimation); // attach person _target attachTo [_unit, _position, "LeftShoulder"]; @@ -75,7 +75,7 @@ GVAR(currentHeightChange) = 0; // prevent UAVs from firing private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew); -if !(_UAVCrew isEqualTo []) then { +if (_UAVCrew isNotEqualTo []) then { {_target deleteVehicleCrew _x} count _UAVCrew; _target setVariable [QGVAR(isUAV), true, true]; }; diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index ae52838e9b..499bcc8b36 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: commy2 + * Author: commy2, Malbryn * Drag an object. Called from ace_dragging_fnc_startDrag * * Arguments: @@ -36,25 +36,34 @@ _target attachTo [_unit, _position]; [QEGVAR(common,setDir), [_target, _direction], _target] call CBA_fnc_targetEvent; if (_target isKindOf "CAManBase") then { - [_target, "AinjPpneMrunSnonWnonDb_still", 0, true] call EFUNC(common,doAnimation); + [_target, "AinjPpneMrunSnonWnonDb_still", 0] call EFUNC(common,doAnimation); }; _unit setVariable [QGVAR(isDragging), true, true]; _unit setVariable [QGVAR(draggedObject), _target, true]; // add drop action -_unit setVariable [QGVAR(ReleaseActionID), [ - _unit, "DefaultAction", - {!isNull ((_this select 0) getVariable [QGVAR(draggedObject), objNull])}, - {[_this select 0, (_this select 0) getVariable [QGVAR(draggedObject), objNull]] call FUNC(dropObject)} -] call EFUNC(common,addActionEventHandler)]; +GVAR(unit) = _unit; + +GVAR(releaseActionID) = [0xF1, [false, false, false], { + [GVAR(unit), GVAR(unit) getVariable [QGVAR(draggedObject), objNull]] call FUNC(dropObject); +}, "keydown", "", false, 0] call CBA_fnc_addKeyHandler; + +// show mouse hint +["", localize LSTRING(Drop)] call EFUNC(interaction,showMouseHint); + +// block firing +if !(GVAR(dragAndFire)) then { + _unit setVariable [QGVAR(blockFire), [ + _unit, "DefaultAction", + {true}, + {} + ] call EFUNC(common,addActionEventHandler)]; +}; // add anim changed EH [_unit, "AnimChanged", FUNC(handleAnimChanged), [_unit]] call CBA_fnc_addBISEventHandler; -// show mouse hint -[localize LSTRING(Drop), ""] call EFUNC(interaction,showMouseHint); - // check everything [FUNC(dragObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; @@ -67,7 +76,7 @@ private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew); // fixes not being able to move when in combat pace [_unit, "forceWalk", "ACE_dragging", true] call EFUNC(common,statusEffect_set); -if !(_UAVCrew isEqualTo []) then { +if (_UAVCrew isNotEqualTo []) then { {_target deleteVehicleCrew _x} count _UAVCrew; _target setVariable [QGVAR(isUAV), true, true]; }; diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 4ecc876afd..175c2bc4e8 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: commy2 + * Author: commy2, Malbryn * Drop a dragged object. * * Arguments: @@ -20,7 +20,12 @@ params ["_unit", "_target"]; TRACE_2("params",_unit,_target); // remove drop action -[_unit, "DefaultAction", _unit getVariable [QGVAR(ReleaseActionID), -1]] call EFUNC(common,removeActionEventHandler); +[GVAR(releaseActionID), "keydown"] call CBA_fnc_removeKeyHandler; + +// stop blocking +if !(GVAR(dragAndFire)) then { + [_unit, "DefaultAction", _unit getVariable [QGVAR(blockFire), -1]] call EFUNC(common,removeActionEventHandler); +}; private _inBuilding = [_unit] call FUNC(isObjectOnObject); @@ -38,9 +43,9 @@ detach _target; if (_target isKindOf "CAManBase") then { if (_target getVariable ["ACE_isUnconscious", false]) then { - [_target, "unconscious", 2, true] call EFUNC(common,doAnimation); + [_target, "unconscious", 2] call EFUNC(common,doAnimation); } else { - [_target, "", 2, true] call EFUNC(common,doAnimation); //@todo "AinjPpneMrunSnonWnonDb_release" seems to fall back to unconsciousness anim. + [_target, "", 2] call EFUNC(common,doAnimation); //@todo "AinjPpneMrunSnonWnonDb_release" seems to fall back to unconsciousness anim. }; }; @@ -69,7 +74,7 @@ if !(_target isKindOf "CAManBase") then { }; if (_unit getVariable ["ACE_isUnconscious", false]) then { - [_unit, "unconscious", 2, true] call EFUNC(common,doAnimation); + [_unit, "unconscious", 2] call EFUNC(common,doAnimation); }; // recreate UAV crew @@ -84,5 +89,5 @@ if (_target getVariable [QGVAR(isUAV), false]) then { private _mass = _target getVariable [QGVAR(originalMass), 0]; if (_mass != 0) then { - [QEGVAR(common,setMass), [_target, _mass], _target] call CBA_fnc_targetEvent; + [QEGVAR(common,setMass), [_target, _mass]] call CBA_fnc_globalEvent; // force global sync }; diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index 5235b7e66d..e0f4f4308b 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -34,13 +34,13 @@ detach _target; // fix anim when aborting carrying persons if (_target isKindOf "CAManBase" || {animationState _unit in CARRY_ANIMATIONS}) then { if (vehicle _unit == _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { - [_unit, "", 2, true] call EFUNC(common,doAnimation); + [_unit, "", 2] call EFUNC(common,doAnimation); }; if (_target getVariable ["ACE_isUnconscious", false]) then { - [_target, "unconscious", 2, true] call EFUNC(common,doAnimation); + [_target, "unconscious", 2] call EFUNC(common,doAnimation); } else { - [_target, "", 2, true] call EFUNC(common,doAnimation); //@todo + [_target, "", 2] call EFUNC(common,doAnimation); //@todo }; }; @@ -81,7 +81,7 @@ if (_target getVariable [QGVAR(isUAV), false]) then { private _mass = _target getVariable [QGVAR(originalMass), 0]; if (_mass != 0) then { - [QEGVAR(common,setMass), [_target, _mass], _target] call CBA_fnc_targetEvent; + [QEGVAR(common,setMass), [_target, _mass]] call CBA_fnc_globalEvent; // force global sync }; // reset temp direction diff --git a/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf b/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf index 7d07583ddf..beaed397e7 100644 --- a/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf +++ b/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf @@ -21,8 +21,8 @@ TRACE_2("params",_unit,_weapon); if (_unit getVariable [QGVAR(isDragging), false]) then { - // drop dragged object when selecting a non-primary weapon - if (_weapon != primaryWeapon _unit) then { + // drop dragged object when changing weapon + if (_weapon != _unit getVariable [QGVAR(currentWeapon), ""]) then { private _draggedObject = _unit getVariable [QGVAR(draggedObject), objNull]; [_unit, _draggedObject] call FUNC(dropObject); diff --git a/addons/dragging/functions/fnc_initObject.sqf b/addons/dragging/functions/fnc_initObject.sqf index 8e352a00bb..054f016a67 100644 --- a/addons/dragging/functions/fnc_initObject.sqf +++ b/addons/dragging/functions/fnc_initObject.sqf @@ -17,17 +17,17 @@ params ["_object"]; -private _config = configFile >> "CfgVehicles" >> typeOf _object; +private _config = configOf _object; if (getNumber (_config >> QGVAR(canDrag)) == 1) then { - private _position = getArray (_config >> QGVAR(dragPosition)); + private _position = [_config >> QGVAR(dragPosition), "ARRAY", [0, 1.5, 0]] call CBA_fnc_getConfigEntry; private _direction = getNumber (_config >> QGVAR(dragDirection)); [_object, true, _position, _direction] call FUNC(setDraggable); }; if (getNumber (_config >> QGVAR(canCarry)) == 1) then { - private _position = getArray (_config >> QGVAR(carryPosition)); + private _position = [_config >> QGVAR(carryPosition), "ARRAY", [0, 1, 1]] call CBA_fnc_getConfigEntry; private _direction = getNumber (_config >> QGVAR(carryDirection)); [_object, true, _position, _direction] call FUNC(setCarryable); diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf index 50a07b515b..99729ebd63 100644 --- a/addons/dragging/functions/fnc_setDraggable.sqf +++ b/addons/dragging/functions/fnc_setDraggable.sqf @@ -6,7 +6,7 @@ * Arguments: * 0: Any object * 1: true to enable dragging, false to disable - * 2: Position offset for attachTo command (optional; default: [0,0,0]) + * 2: Position offset for attachTo command (optional; default: [0, 1.5, 0]) * 3: Direction in degree to rotate the object after attachTo (optional; default: 0) * 4: Override weight limit (optional; default: false) * @@ -23,7 +23,7 @@ params ["_object", "_enableDrag", "_position", "_direction", ["_ignoreWeightDrag", false, [false]]]; if (isNil "_position") then { - _position = _object getVariable [QGVAR(dragPosition), [0,0,0]]; + _position = _object getVariable [QGVAR(dragPosition), [0, 1.5, 0]]; }; if (isNil "_direction") then { diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index a52afd1c27..335e421bb2 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -45,8 +45,8 @@ if (_target isKindOf "CAManBase") then { _target setDir (getDir _unit + 180); _target setPosASL (getPosASL _unit vectorAdd (vectorDir _unit)); - [_unit, "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon", 2, true] call EFUNC(common,doAnimation); - [_target, "AinjPfalMstpSnonWrflDnon_carried_Up", 2, true] call EFUNC(common,doAnimation); + [_unit, "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon", 2] call EFUNC(common,doAnimation); + [_target, "AinjPfalMstpSnonWrflDnon_carried_Up", 2] call EFUNC(common,doAnimation); _timer = CBA_missionTime + 10; @@ -79,5 +79,5 @@ private _mass = getMass _target; if (_mass > 1) then { _target setVariable [QGVAR(originalMass), _mass, true]; - [QEGVAR(common,setMass), [_target, 1e-12], _target] call CBA_fnc_targetEvent; + [QEGVAR(common,setMass), [_target, 1e-12]] call CBA_fnc_globalEvent; // force global sync }; diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 7a4c8908d3..31159a2b62 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: commy2, PiZZADOX + * Author: commy2, PiZZADOX, Malbryn * Start the dragging process. * * Arguments: @@ -28,14 +28,34 @@ if (!GETVAR(_target,GVAR(ignoreWeightDrag),false) && { [localize LSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured); }; -// add a primary weapon if the unit has none. -// @todo prevent opening inventory when equipped with a fake weapon -if (primaryWeapon _unit isEqualto "") then { - _unit addWeapon "ACE_FakePrimaryWeapon"; +// Add a primary weapon if the unit has none +if !(GVAR(dragAndFire)) then { + if (primaryWeapon _unit isEqualto "") then { + _unit addWeapon "ACE_FakePrimaryWeapon"; + _unit selectWeapon primaryWeapon _unit; + } else { + _unit selectWeapon primaryWeapon _unit; + }; +} else { // Making sure the unit is holding a primary weapon or handgun + if !(currentWeapon _unit in [primaryWeapon _unit, handgunWeapon _unit]) then { + if (primaryWeapon _unit != "") then { + // Use primary if possible + _unit selectWeapon primaryWeapon _unit; + } else { + if (handgunWeapon _unit != "") then { + // Use pistol if unit has no primary + _unit selectWeapon handgunWeapon _unit; + } else { + // Add fake weapon if no weapons besides launcher are available + _unit addWeapon "ACE_FakePrimaryWeapon"; + _unit selectWeapon primaryWeapon _unit; + }; + }; + }; }; -// select primary, otherwise the drag animation actions don't work. -_unit selectWeapon primaryWeapon _unit; +// Save the weapon so we can monitor if it changes +_unit setVariable [QGVAR(currentWeapon), currentWeapon _unit]; [_unit, "blockThrow", "ACE_dragging", true] call EFUNC(common,statusEffect_set); @@ -45,7 +65,13 @@ _unit selectWeapon primaryWeapon _unit; // can't play action that depends on weapon if it was added the same frame if !(_unit call EFUNC(common,isSwimming)) then { [{ - [_this, "grabDrag"] call EFUNC(common,doGesture); + private _unitWeapon = _this getVariable [QGVAR(currentWeapon), ""]; + + if (_unitWeapon isKindOf ["Pistol", configFile >> "CfgWeapons"]) then { + [_this, "ACE_dragWithPistol"] call EFUNC(common,doGesture); + } else { + [_this, "ACE_dragWithRifle"] call EFUNC(common,doGesture); + }; }, _unit] call CBA_fnc_execNextFrame; }; @@ -54,7 +80,7 @@ if (_target isKindOf "CAManBase") then { _target setDir (getDir _unit + 180); _target setPosASL (getPosASL _unit vectorAdd (vectorDir _unit vectorMultiply 1.5)); - [_target, "AinjPpneMrunSnonWnonDb_grab", 2, true] call EFUNC(common,doAnimation); + [_target, "AinjPpneMrunSnonWnonDb_grab", 2] call EFUNC(common,doAnimation); }; // prevents draging and carrying at the same time @@ -67,5 +93,5 @@ private _mass = getMass _target; if (_mass > 1) then { _target setVariable [QGVAR(originalMass), _mass, true]; - [QEGVAR(common,setMass), [_target, 1e-12], _target] call CBA_fnc_targetEvent; + [QEGVAR(common,setMass), [_target, 1e-12]] call CBA_fnc_globalEvent; // force global sync }; diff --git a/addons/dragging/initSettings.sqf b/addons/dragging/initSettings.sqf new file mode 100644 index 0000000000..b33dbab3f7 --- /dev/null +++ b/addons/dragging/initSettings.sqf @@ -0,0 +1,8 @@ +[ + QGVAR(dragAndFire), + "CHECKBOX", + [LSTRING(DragAndFire_DisplayName), LSTRING(DragAndFire_Description)], + localize LSTRING(SettingsName), + true, + false +] call CBA_fnc_addSetting; diff --git a/addons/dragging/script_component.hpp b/addons/dragging/script_component.hpp index e7ad88c825..12ed8efff3 100644 --- a/addons/dragging/script_component.hpp +++ b/addons/dragging/script_component.hpp @@ -16,5 +16,5 @@ #include "\z\ace\addons\main\script_macros.hpp" -#define DRAG_ANIMATIONS ["amovpercmstpslowwrfldnon_acinpknlmwlkslowwrfldb_2", "amovpercmstpsraswpstdnon_acinpknlmwlksnonwpstdb_2", "amovpercmstpsnonwnondnon_acinpknlmwlksnonwnondb_2", "acinpknlmstpsraswrfldnon", "acinpknlmstpsnonwpstdnon", "acinpknlmstpsnonwnondnon", "acinpknlmwlksraswrfldb", "acinpknlmwlksnonwnondb"] +#define DRAG_ANIMATIONS ["amovpercmstpslowwrfldnon_acinpknlmwlkslowwrfldb_2", "amovpercmstpsraswpstdnon_acinpknlmwlksnonwpstdb_2", "amovpercmstpsnonwnondnon_acinpknlmwlksnonwnondb_2", "acinpknlmstpsraswrfldnon", "acinpknlmstpsnonwpstdnon", "acinpknlmstpsnonwnondnon", "acinpknlmwlksraswrfldb", "acinpknlmwlksnonwnondb", "ace_dragging", "ace_dragging_static", "ace_dragging_drop"] #define CARRY_ANIMATIONS ["acinpercmstpsnonwnondnon", "acinpknlmstpsnonwnondnon_acinpercmrunsnonwnondnon"] diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index 7d10e561bd..dccc758a5d 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -59,6 +59,7 @@ Nieś/Puść objekt オブジェクトを運ぶ/離す Objeyi Taşı/Bırak + Arrastrar/Soltar Objeto Item too heavy @@ -103,6 +104,37 @@ Поднять/Опустить | (Ctrl + Скролл) Крутить Wyżej/niżej | (Ctrl + Kółko myszy) obracanie Yükselt/Alçalt | (Ctrl + Tekerlek) Döndür + Subir/Bajar | (Ctrl + Scroll) Rotar + + + ACE Dragging + ACE Traînage d'objets et d'unités + ACE Ziehen + ACE Húzás + ACE Перетаскивание + ACE Arrastrar + ACE Przeciąganie + ACE ドラッグ + + + Allow firing while dragging + Arme utilisable durant le traînage + Schießen während des Ziehens erlauben + Húzás közbeni tüzelés engedélyezése + Стрельба во время перетаскивания + Permitir disparar mientras se arrastra + Pozwól na strzelanie podczas przeciągania + 搬送中に射撃許可 + + + Allow the player to fire their gun while dragging. + Cette option permet aux joueurs de faire usage de leur arme pendant qu'ils traînent un objet ou une unité.\nL'arme secondaire est utilisée si le joueur en est équipé. + Erlaubt dem Spieler während des Ziehens das Abfeuern der Waffe. + Húzás közben a játékos elsütheti a fegyverét. + Позволяет игроку стрелять во время перетаскивания + Permite al jugador disparar mientras está arrastrando. + Pozwala graczom strzelać z broni podczas przeciągania obiektów. + プレイヤーが引きずっている最中でも射撃できるようにします。 diff --git a/addons/dragon/CfgAmmo.hpp b/addons/dragon/CfgAmmo.hpp index 033239013f..09858b4fff 100644 --- a/addons/dragon/CfgAmmo.hpp +++ b/addons/dragon/CfgAmmo.hpp @@ -34,6 +34,8 @@ class CfgAmmo { cost = 500; simulationStep = 0.005; maxControlRange = 1500; + + EGVAR(vehicle_damage,incendiary) = 1.0; class ace_missileguidance { minDeflection = 0; @@ -70,7 +72,7 @@ class CfgAmmo { }; }; - class GVAR(super) : GVAR(dragonBase) { + class GVAR(super): GVAR(dragonBase) { submunitionAmmo = QGVAR(penetrator_super); submunitionDirectionType = "SubmunitionModelDirection"; submunitionInitSpeed = 1000; @@ -108,7 +110,7 @@ class CfgAmmo { }; class ShellBase; - class GVAR(serviceCharge) : ShellBase { + class GVAR(serviceCharge): ShellBase { hit = 1; indirectHit = 2; indirectHitRange = 1; diff --git a/addons/dragon/CfgEventHandlers.hpp b/addons/dragon/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/dragon/CfgEventHandlers.hpp +++ b/addons/dragon/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/dragon/CfgMagazines.hpp b/addons/dragon/CfgMagazines.hpp index e4b59a9304..605501376d 100644 --- a/addons/dragon/CfgMagazines.hpp +++ b/addons/dragon/CfgMagazines.hpp @@ -1,6 +1,6 @@ class CfgMagazines { class 1Rnd_GAA_missiles; - class GVAR(super) : 1Rnd_GAA_missiles { + class GVAR(super): 1Rnd_GAA_missiles { sound[] = {}; soundFly[] = {}; soundHit[] = {}; diff --git a/addons/dragon/README.md b/addons/dragon/README.md index 84a82ad820..8b46440b0d 100644 --- a/addons/dragon/README.md +++ b/addons/dragon/README.md @@ -2,11 +2,3 @@ ace_dragon =================== Adds M47 Dragon Missile. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Brandon-TCVM](https://github.com/TheCandianVendingMachine) - diff --git a/addons/dragon/config.cpp b/addons/dragon/config.cpp index 78d836936e..9d329f6be7 100644 --- a/addons/dragon/config.cpp +++ b/addons/dragon/config.cpp @@ -3,8 +3,8 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; - weapons[] = {}; + units[] = {"ace_dragon_staticAssembled"}; + weapons[] = {"ace_dragon_super","ace_dragon_sight"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_hot","ace_csw"}; author = ECSTRING(common,ACETeam); diff --git a/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf b/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf index b7adb597f5..f8420fa114 100644 --- a/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf +++ b/addons/dragon/functions/fnc_attackProfile_DRAGON.sqf @@ -30,7 +30,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || _wireCut || { !alive _shoote // wire snap, random direction if (!_wireCut) then { _attackProfileStateParams set [1, true]; - playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, AGLtoASL (_shooter modelToWorld _wireCutSource), 5, 1, 25]; + playSound3D ["a3\sounds_f\air\sfx\SL_rope_break.wss", objNull, false, _shooter modelToWorldWorld _wireCutSource, 5, 1, 25]; }; if (_serviceChargeCount > 0 && {(_lastTime - CBA_missionTime) <= 0}) then { diff --git a/addons/dragon/functions/fnc_onFired.sqf b/addons/dragon/functions/fnc_onFired.sqf index 78d9d15b91..1fa24c1925 100644 --- a/addons/dragon/functions/fnc_onFired.sqf +++ b/addons/dragon/functions/fnc_onFired.sqf @@ -23,7 +23,7 @@ _seekerParams params ["", "", "_seekerMaxRange", "_seekerMinRange"]; _shooter setVariable [QGVAR(fired), true, true]; _shooter animate ["missile_hide", 1]; -private _config = ([_projectile] call CBA_fnc_getObjectConfig) >> "ace_missileguidance"; +private _config = configOf _projectile >> "ace_missileguidance"; private _serviceInterval = [_config >> "serviceInterval", "NUMBER", 0.33] call CBA_fnc_getConfigEntry; private _serviceChargeCount = [_config >> "serviceCharges", "NUMBER", 60] call CBA_fnc_getConfigEntry; diff --git a/addons/dragon/stringtable.xml b/addons/dragon/stringtable.xml index 2e2e3de470..a99e3fb49c 100644 --- a/addons/dragon/stringtable.xml +++ b/addons/dragon/stringtable.xml @@ -13,6 +13,7 @@ [CSW] M47 Super-Dragon [CSW] M47 Super-Dragon [CSW] M47 Super-Dragon + [CSW] M47 Super-Dragon M47 Super-Dragon @@ -26,6 +27,7 @@ M47 Super-Dragon M47 Super-Dragon M47 Super-Dragon + M47 Super-Dragon Attach Sight @@ -38,6 +40,7 @@ Připojit puškohled Dołącz Optykę Прикрепить прицел + Acoplar visor Detach Sight @@ -50,6 +53,7 @@ Odpojit puškohled Odczep Optykę Открепить прицел + Desacoplar visor SU-36/P Daysight @@ -63,6 +67,7 @@ SU-36/P Celownik dzienny SU-36/P Daysight SU-36/P Дневной + Visor diurno SU-36/P A light, cheap sight used for daytime operations. Contains the guidance computer for the whole system @@ -75,6 +80,7 @@ Lehký a levný puškohled pro použití za denního světla. Obsahuje navigační počítač pro celý systém. Lekki, tani celownik używany do działania w trakcie dnia. Zawiera komputer naprowadząjący dla całego systemu Легкий дешёвый прицел, используемый для дневных операций. Содержит компьютер для всей системы + Un visor ligero y barato utilizado en operaciones diurnas. Contiene el ordenador de guiado para todo el sistema. A Wire-Guided SACLOS missile with a unique flight characteristic @@ -87,6 +93,7 @@ Drátem naváděná SACLOS raketa s unikátními letovými vlastnostmi Naprowadzany przewodowo rakietowy pocisk SACLOS o unikalnej charakterystyce lotu Ракета SACLOS с проводным наведением с уникальной характеристикой полета + Misil SACLOS guiado por hilo con una característica de vuelo única. diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp index d2137371ec..78da7be599 100644 --- a/addons/explosives/CfgEventHandlers.hpp +++ b/addons/explosives/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/explosives/CfgMagazines.hpp b/addons/explosives/CfgMagazines.hpp index 1784e80433..7bb2c6ff02 100644 --- a/addons/explosives/CfgMagazines.hpp +++ b/addons/explosives/CfgMagazines.hpp @@ -86,13 +86,13 @@ class CfgMagazines { GVAR(SetupObject) = "ACE_Explosives_Place_SLAM"; class ACE_Triggers { SupportedTriggers[] = {"IRSensor", "PressurePlate", "Timer", "Command", "MK16_Transmitter"}; - class PressurePlate{ + class PressurePlate { displayName = CSTRING(SLAME_Magnetic); digDistance = 0; ammo = "ACE_SLAMDirectionalMine_Magnetic_Ammo"; pitch = 90; }; - class IRSensor{ + class IRSensor { displayName = CSTRING(SLAME_IRSensor); }; class Timer { diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 97562dc836..96889784b9 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -78,6 +78,7 @@ class CfgVehicles { vehicleClass = "Cargo"; class ACE_Actions { class ACE_MainActions { + displayName = ECSTRING(interaction,MainAction); selection = ""; distance = 1.5; condition = "true"; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index 56ef154661..d45b484c59 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -2,7 +2,7 @@ class CfgWeapons { class Default; class Put: Default { muzzles[] += {QGVAR(muzzle)}; - class PutMuzzle: Default{}; + class PutMuzzle: Default {}; class GVAR(muzzle): PutMuzzle { magazines[] = {"ACE_FlareTripMine_Mag"}; }; diff --git a/addons/explosives/README.md b/addons/explosives/README.md index 5e85f19427..9f136b6735 100644 --- a/addons/explosives/README.md +++ b/addons/explosives/README.md @@ -2,11 +2,3 @@ ace_explosives ============== Completely replaces the vanilla explosives system, allowing precise placement and different trigger types. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [CorruptedHeart](https://github.com/CorruptedHeart) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/explosives/XEH_PREP.hpp b/addons/explosives/XEH_PREP.hpp index c04e0d3133..d549118623 100644 --- a/addons/explosives/XEH_PREP.hpp +++ b/addons/explosives/XEH_PREP.hpp @@ -37,3 +37,5 @@ PREP(spawnFlare); PREP(startDefuse); PREP(startTimer); PREP(triggerType); +PREP(allowDefuse); +PREP(isAllowedDefuse); diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index f01a3ad20d..d5bf418235 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -46,6 +46,7 @@ if (isServer) then { if (!hasInterface) exitWith {}; GVAR(PlacedCount) = 0; +GVAR(excludedMines) = []; GVAR(Setup) = objNull; GVAR(pfeh_running) = false; GVAR(CurrentSpeedDial) = 0; @@ -65,3 +66,8 @@ GVAR(CurrentSpeedDial) = 0; params ["_player"]; [_player, QGVAR(explosiveActions)] call EFUNC(common,eraseCache); }] call CBA_fnc_addPlayerEventHandler; + +["ace_allowDefuse", { + params["_mine", "_allow"]; + [_mine, _allow] call FUNC(allowDefuse); +}] call CBA_fnc_addEventHandler; diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index 08042297dc..b60186ab68 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -41,10 +41,10 @@ class CfgActions { class ActivateMine: None { show = 0; }; - class Deactivate:None { + class Deactivate: None { show = 0; }; - class DeactivateMine:None { + class DeactivateMine: None { show = 0; }; class UseContainerMagazine: None { diff --git a/addons/explosives/functions/fnc_addClacker.sqf b/addons/explosives/functions/fnc_addClacker.sqf index 684161d7ee..6b48980d54 100644 --- a/addons/explosives/functions/fnc_addClacker.sqf +++ b/addons/explosives/functions/fnc_addClacker.sqf @@ -46,3 +46,5 @@ _unit setVariable [QGVAR(Clackers), _clacker, true]; //display clacker code message: [format [localize LSTRING(DetonateCode), GVAR(PlacedCount)]] call EFUNC(common,displayTextStructured); + +[QGVAR(clackerAdded), [_unit, _explosive, GVAR(PlacedCount)]] call CBA_fnc_localEvent; diff --git a/addons/explosives/functions/fnc_allowDefuse.sqf b/addons/explosives/functions/fnc_allowDefuse.sqf new file mode 100644 index 0000000000..15042e4ca5 --- /dev/null +++ b/addons/explosives/functions/fnc_allowDefuse.sqf @@ -0,0 +1,33 @@ +#include "script_component.hpp" +/* + * Author: Walthzer + * Sets if a dynamic defuse action is allowed to be added to a mine. + * + * Arguments: + * 0: Mine + * 1: Allow defusal + * + * Return Value: + * Succes + * + * Example: + * [_mine, false] call ace_explosives_fnc_allowDefuse + * + * Public: Yes + */ + +params [["_mine", objNull, [objNull]], ["_allow", true, [true]]]; +TRACE_2("params",_mine,_allow); + +if !(_mine in allMines) exitWith {false}; + +if (_allow && {!([_mine] call FUNC(isAllowedDefuse))}) exitWith { + GVAR(excludedMines) = GVAR(excludedMines) - [_mine]; + true +}; + +if (!_allow) exitWith { + GVAR(excludedMines) pushBackUnique _mine != -1 +}; + +false diff --git a/addons/explosives/functions/fnc_dialingPhone.sqf b/addons/explosives/functions/fnc_dialingPhone.sqf index 6956505df7..0a30a298bb 100644 --- a/addons/explosives/functions/fnc_dialingPhone.sqf +++ b/addons/explosives/functions/fnc_dialingPhone.sqf @@ -22,7 +22,8 @@ params ["_args", "_pfID"]; _args params ["_unit", "_i", "_arr", "_code"]; if ((_i mod 4) == 0) then { - playSound3D [QUOTE(PATHTO_R(Data\Audio\DialTone.wss)), objNull, false, (_unit modelToWorldVisual [0,0.2,2]), 5,1,5]; + private _pos = _unit modelToWorldVisualWorld (_unit selectionPosition "RightHand"); + playSound3D [QUOTE(PATHTO_R(Data\Audio\DialTone.wss)), objNull, false, _pos, 5, 1, 5]; }; ctrlSetText [1400,format["Calling%1",_arr select (_i - 4)]]; diff --git a/addons/explosives/functions/fnc_interactEH.sqf b/addons/explosives/functions/fnc_interactEH.sqf index 59ddaff432..da7215bb81 100644 --- a/addons/explosives/functions/fnc_interactEH.sqf +++ b/addons/explosives/functions/fnc_interactEH.sqf @@ -47,7 +47,7 @@ if ( if (_playerPos distanceSqr _setPosition > 25) then { private _cfgAmmo = configFile >> "CfgAmmo"; { - if (_x distanceSqr _player < 225 && {!(_x in _minesHelped)} && {!(getModelInfo _x select 0 isEqualTo "empty.p3d")}) then { + if (_x distanceSqr _player < 225 && {!(_x in _minesHelped)} && {!(_x in GVAR(excludedMines))} && {getModelInfo _x select 0 isNotEqualTo "empty.p3d"}) then { private _config = _cfgAmmo >> typeOf _x; private _size = getNumber (_config >> QGVAR(size)); private _defuseClass = ["ACE_DefuseObject", "ACE_DefuseObject_Large"] select (_size == 1); diff --git a/addons/explosives/functions/fnc_isAllowedDefuse.sqf b/addons/explosives/functions/fnc_isAllowedDefuse.sqf new file mode 100644 index 0000000000..2d2846d27c --- /dev/null +++ b/addons/explosives/functions/fnc_isAllowedDefuse.sqf @@ -0,0 +1,21 @@ +#include "script_component.hpp" +/* + * Author: Walthzer + * Check if a mine is allowed to recieve a dynamic defuse action. + * + * Arguments: + * 0: Mine + * + * Return Value: + * Allowed + * + * Example: + * [_mine] call ace_explosives_fnc_isAllowedDefuse + * + * Public: Yes + */ + +params [["_mine", objNull, [objNull]]]; +TRACE_1("params",_mine); + +!(_mine in GVAR(excludedMines)) diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index 96fc4820e4..2961c8d101 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -80,7 +80,7 @@ GVAR(TweakedAngle) = 0; #ifdef DEBUG_MODE_FULL drawLine3d [(eyePos _unit) call EFUNC(common,ASLToPosition), (_testPos) call EFUNC(common,ASLToPosition), [1,0,0,1]]; #endif - if !((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) isEqualTo []) exitWith {_return = false;}; + if ((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) isNotEqualTo []) exitWith {_return = false;}; } forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]]; _return }; @@ -95,7 +95,7 @@ GVAR(TweakedAngle) = 0; { private _testPos = _testBase vectorAdd [0.1 * (_x select 0) * (cos _cameraAngle), 0.1 * (_x select 0) * (sin _cameraAngle), 0.1 * (_x select 1)]; private _intersectObject = ((lineIntersectsSurfaces [eyePos _unit, _testPos, _unit]) param [0, objNull]) param [3, objNull]; - if !(_intersectObject isEqualTo objNull) exitWith {_attachVehicle = _intersectObject}; + if (_intersectObject isNotEqualTo objNull) exitWith {_attachVehicle = _intersectObject}; } forEach [[0,0], [-1,-1], [1,-1], [-1,1], [1,1]]; if ((!isNull _attachVehicle) && {[PLACE_RANGE_MIN] call _testPositionIsValid} && {(_attachVehicle isKindOf "Car") || {_attachVehicle isKindOf "Tank"} || {_attachVehicle isKindOf "Air"} || {_attachVehicle isKindOf "Ship"}}) then { diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 684b0f8b1a..f9c684d303 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -894,14 +894,8 @@ M6 SLAM Mine (Bottom Attack) - - /!\ Module obsolète /!\ - Mine M6 SLAM (par le bas) + Mine M6 SLAM (par le bas) M6-SLAM-Mine (Bodenangriff) - - - - - Mina M6 SLAM (atak od dołu) Mina M6 SLAM (Ataque Inferior) Mina M6 SLAM (base) @@ -915,14 +909,8 @@ M6 SLAM Mine (Side Attack) - - /!\ Module obsolète /!\ - Mine M6 SLAM (de flanc) + Mine M6 SLAM (de flanc) M6-SLAM-Mine (Seitenangriff) - - - - - Mina M6 SLAM (atak od boku) Mina M6 SLAM (Ataque Lateral) Mina M6 SLAM (Laterale) @@ -936,14 +924,8 @@ Large IED (Urban, Pressure Plate) - - /!\ Module obsolète /!\ - Grand EEI (urbain, plaque de pression) + Grand EEI (urbain, plaque de pression) Große USBV (Stadt, Druckplatte) - - - - - Duży IED (miejski, płyta naciskowa) IED Grande (Urbano, Placa de presión) IED grande (urbano, a pressione) @@ -957,14 +939,8 @@ Large IED (Dug-in, Pressure Plate) - - /!\ Module obsolète /!\ - Grand EEI (enterré, plaque de pression) + Grand EEI (enterré, plaque de pression) Große USBV (Eingegraben, Druckplatte) - - - - - Duży IED (zakopany, płyta naciskowa) IED Grande (Enterrado, Placa de presión) IED grande (interrato, a pressione) @@ -978,14 +954,8 @@ Small IED (Urban, Pressure Plate) - - /!\ Module obsolète /!\ - Petit EEI (Urbain, plaque de pression) + Petit EEI (Urbain, plaque de pression) Kleine USBV (Stadt, Druckplatte) - - - - - Mały IED (miejski, płyta naciskowa) IED Pequeño (Urbano, Placa de presión) IED piccolo (urbano, a pressione) @@ -999,14 +969,8 @@ Small IED (Dug-in, Pressure Plate) - - /!\ Module obsolète /!\ - Petit EEI (Enterré, plaque de pression) + Petit EEI (Enterré, plaque de pression) Kleine USBV (Eingegraben, Druckplatte) - - - - - Mały IED (zakopany, płyta naciskowa) IED Pequeño (Enterrado, Placa de presión) IED piccolo (interrato, a pressione) @@ -1048,6 +1012,7 @@ 絆線閃光地雷 Tripwire (Sinalizador) Světlice na nástražném drátu + Bengala con cable trampa Type: Tripwire flare - Ignites a non-lethal flare when triggered.<br />Rounds: 1<br />Used on: Ground @@ -1062,6 +1027,7 @@ 類型: 絆線閃光地雷 - 觸發後產生非致命性的強光.<br />發數: 1<br />使用於: 地面 Tipo: Flare de Tripwire - Acende um sinalizador não letal quando acionado.<br/>Usos: 1<br/>Usado em: Chão Typ: Světlice na nástražném drátu - Zapálí světlici při aktivaci.<br/>Pouze 1 použití<br/>Použít na zem + Tipo: Bengala con cable trampa - Enciende una bengala no letal cuando es activado.<br />Rondas: 1<br />Usado en: Tierra Explosive range @@ -1076,6 +1042,7 @@ Alcance do explosivo Dosah exploze Patlayıcı menzili + Alcance explosivo Explosive Timer @@ -1089,6 +1056,7 @@ 引爆倒數 Časovač exploze Patlayıcı Zamanlayıcı + Temporizador de explosivo Is EOD @@ -1100,6 +1068,7 @@ Je specilista na výbušniny (EOD) Jest EOD Сапёр + ¿Es EOD? Controls whether the unit is an explosive specialist. @@ -1111,30 +1080,55 @@ Určuje jestli je jednotka specialista na výbušniny. Kontroluje, czy jednostka jest specjalistą od materiałów wybuchowych. Определяет, является ли юнит сапёром. + Controla si la unidad es un especialista en explosivos Minimum Time + Минимальное время Durée minimale + 最短時間 + Tiempo mínimo + Minimalny czas Maximum Time + Максимальное время Durée maximale + 最長時間 + Tiempo máximo + Maksymalny czas Default Time + Стандартное время Durée par défaut + 標準時間 + Tiempo por defecto + Domyślny czas Minimum time value (in seconds) for the explosive timer. + Минимальное время до взрыва в секундах Définit la durée minimale paramétrable sur le minuteur. + 起爆タイマーの最低時間 (秒) を設定します。 + Tiempo mínimo (en segundos) para el temporizador del explosivo. + Minimalna wartość czasomierza dla ładunku (w sekundach). Maximum time value (in seconds) for the explosive timer. + Макисмальное время до взрыва в секундах Définit la durée maximale paramétrable sur le minuteur. + 起爆タイマーの最長時間 (秒) を設定します。 + Tiempo máximo (en segundos) para el temporizador del explosivo. + Maksymalna wartość czasomierza dla ładunku (w sekundach). Default time value (in seconds) for the explosive timer. + Стандартное время до взрыва в секундах Définit la durée paramétrée par défaut sur le minuteur. + 起爆タイマーの標準時間 (秒) を設定します。 + Tiempo por defecto (en segundos) para el temporizador del explosivo. + Domyślna wartość czasomierza dla ładunku (w sekundach). diff --git a/addons/fastroping/CfgEventHandlers.hpp b/addons/fastroping/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/fastroping/CfgEventHandlers.hpp +++ b/addons/fastroping/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/fastroping/CfgVehicles.hpp b/addons/fastroping/CfgVehicles.hpp index 2a130b37f9..fc4aed6ae4 100644 --- a/addons/fastroping/CfgVehicles.hpp +++ b/addons/fastroping/CfgVehicles.hpp @@ -48,6 +48,16 @@ class CfgVehicles { condition = QUOTE([_target] call FUNC(canStowFRIES)); statement = QUOTE([_target] call FUNC(stowFRIES)); }; + class ACE_deployRopes3 { + displayName = CSTRING(Interaction_deployRopes3); + condition = QUOTE([ARR_3(_target,_player,'ACE_rope3')] call FUNC(canDeployRopes)); + statement = QUOTE([ARR_2(QQGVAR(deployRopes),[ARR_3(_target,_player,'ACE_rope3')])] call CBA_fnc_serverEvent); + }; + class ACE_deployRopes6 { + displayName = CSTRING(Interaction_deployRopes6); + condition = QUOTE([ARR_3(_target,_player,'ACE_rope6')] call FUNC(canDeployRopes)); + statement = QUOTE([ARR_2(QQGVAR(deployRopes),[ARR_3(_target,_player,'ACE_rope6')])] call CBA_fnc_serverEvent); + }; class ACE_deployRopes12 { displayName = CSTRING(Interaction_deployRopes12); condition = QUOTE([ARR_3(_target,_player,'ACE_rope12')] call FUNC(canDeployRopes)); @@ -75,8 +85,9 @@ class CfgVehicles { }; class ACE_cutRopes { displayName = CSTRING(Interaction_cutRopes); - condition = QUOTE(true); - statement = ""; + condition = QUOTE([_target] call FUNC(canCutRopes)); + // should not be empty to work with EGVAR(interact_menu,consolidateSingleChild) setting + statement = QUOTE(true); class confirmCutRopes { displayName = ECSTRING(common,confirm); condition = QUOTE([_target] call FUNC(canCutRopes)); diff --git a/addons/fastroping/CfgWeapons.hpp b/addons/fastroping/CfgWeapons.hpp deleted file mode 100644 index 116497c6fa..0000000000 --- a/addons/fastroping/CfgWeapons.hpp +++ /dev/null @@ -1,60 +0,0 @@ -class CfgWeapons { - class ACE_ItemCore; - class CBA_MiscItem_ItemInfo; - - class ACE_rope12: ACE_ItemCore { - scope = 2; - GVAR(ropeLength) = 12.2; - picture = QPATHTOF(data\m_rope_ca); - model = "\A3\Structures_F_Heli\Items\Tools\Rope_01_F.p3d"; - displayName = CSTRING(Rope_12_Display); - descriptionShort = CSTRING(descriptionShort); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 36; - }; - }; - class ACE_rope15: ACE_ItemCore { - scope = 2; - GVAR(ropeLength) = 15.2; - picture = QPATHTOF(data\m_rope_ca); - model = "\A3\Structures_F_Heli\Items\Tools\Rope_01_F.p3d"; - displayName = CSTRING(Rope_15_Display); - descriptionShort = CSTRING(descriptionShort); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 45; - }; - }; - class ACE_rope18: ACE_ItemCore { - scope = 2; - GVAR(ropeLength) = 18.3; - picture = QPATHTOF(data\m_rope_ca); - model = "\A3\Structures_F_Heli\Items\Tools\Rope_01_F.p3d"; - displayName = CSTRING(Rope_18_Display); - descriptionShort = CSTRING(descriptionShort); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 54; - }; - }; - class ACE_rope27: ACE_ItemCore { - scope = 2; - GVAR(ropeLength) = 27.4; - picture = QPATHTOF(data\m_rope_ca); - model = "\A3\Structures_F_Heli\Items\Tools\Rope_01_F.p3d"; - displayName = CSTRING(Rope_27_Display); - descriptionShort = CSTRING(descriptionShort); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 81; - }; - }; - class ACE_rope36: ACE_ItemCore { - scope = 2; - GVAR(ropeLength) = 36.6; - picture = QPATHTOF(data\m_rope_ca); - model = "\A3\Structures_F_Heli\Items\Tools\Rope_01_F.p3d"; - displayName = CSTRING(Rope_36_Display); - descriptionShort = CSTRING(descriptionShort); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 108; - }; - }; -}; diff --git a/addons/fastroping/README.md b/addons/fastroping/README.md index 49fcf00960..51b1a41375 100644 --- a/addons/fastroping/README.md +++ b/addons/fastroping/README.md @@ -3,9 +3,3 @@ ace_fastroping Introducing the ability to fastrope out of heliocopters. -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [BaerMitUmlaut](https://github.com/BaerMitUmlaut) -- [KoffeinFlummi](https://github.com/KoffeinFlummi) diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 72ded1b267..43e5de24f9 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -35,7 +35,7 @@ #ifdef DRAW_FASTROPE_INFO addMissionEventHandler ["Draw3D", { if (!(cursorObject isKindOf "Helicopter")) exitWith {}; - private _config = configFile >> "CfgVehicles" >> (typeOf cursorObject); + private _config = configOf cursorObject; private _enabled = getNumber (_config >> QGVAR(enabled)); drawIcon3D ["", [.5,.5,1,1], (ASLtoAGL getPosASL cursorObject), 0.5, 0.5, 0, format ["%1 = %2", typeOf cursorObject, _enabled], 0.5, 0.025, "TahomaB"]; if (_enabled > 0) then { diff --git a/addons/fastroping/config.cpp b/addons/fastroping/config.cpp index 98dfd26742..be8f70a482 100644 --- a/addons/fastroping/config.cpp +++ b/addons/fastroping/config.cpp @@ -3,10 +3,10 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; + units[] = {"ACE_fastropingSupplyCrate"}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_interaction"}; + requiredAddons[] = {"ace_interaction","ace_logistics_rope"}; author = ECSTRING(common,ACETeam); authors[] = {"KoffeinFlummi", "BaerMitUmlaut", "Pokertour"}; url = ECSTRING(main,URL); @@ -19,4 +19,4 @@ class CfgPatches { #include "CfgSounds.hpp" #include "CfgVehicles.hpp" #include "CfgWaypoints.hpp" -#include "CfgWeapons.hpp" + diff --git a/addons/fastroping/functions/fnc_canCutRopes.sqf b/addons/fastroping/functions/fnc_canCutRopes.sqf index 8107b8066b..f65f2ef89a 100644 --- a/addons/fastroping/functions/fnc_canCutRopes.sqf +++ b/addons/fastroping/functions/fnc_canCutRopes.sqf @@ -18,5 +18,5 @@ params ["_vehicle"]; private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; -!(_deployedRopes isEqualTo []) && +(_deployedRopes isNotEqualTo []) && {{(_x select 5)} count (_deployedRopes) == 0} diff --git a/addons/fastroping/functions/fnc_canDeployRopes.sqf b/addons/fastroping/functions/fnc_canDeployRopes.sqf index 26b514368b..4338ac0130 100644 --- a/addons/fastroping/functions/fnc_canDeployRopes.sqf +++ b/addons/fastroping/functions/fnc_canDeployRopes.sqf @@ -19,7 +19,7 @@ */ params ["_vehicle", "_player", "_ropeClass", ["_defaultOption", false]]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; (driver _vehicle != _player) && {getPos _vehicle select 2 > 2} && { diff --git a/addons/fastroping/functions/fnc_canFastRope.sqf b/addons/fastroping/functions/fnc_canFastRope.sqf index b4f5e20474..a071160821 100644 --- a/addons/fastroping/functions/fnc_canFastRope.sqf +++ b/addons/fastroping/functions/fnc_canFastRope.sqf @@ -20,6 +20,6 @@ params ["_unit", "_vehicle"]; private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; ((driver _vehicle != _unit) && -{!(_deployedRopes isEqualTo [])} && +{_deployedRopes isNotEqualTo []} && {{!(_x select 5) && !(_x select 6)} count (_deployedRopes) > 0} && {getPos _vehicle select 2 > 2}) diff --git a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf index 881996b5a1..b6068f5341 100644 --- a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf @@ -16,7 +16,7 @@ */ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; ((getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}) && {(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0} && diff --git a/addons/fastroping/functions/fnc_canStowFRIES.sqf b/addons/fastroping/functions/fnc_canStowFRIES.sqf index 6f26fc1ed5..462799eb01 100644 --- a/addons/fastroping/functions/fnc_canStowFRIES.sqf +++ b/addons/fastroping/functions/fnc_canStowFRIES.sqf @@ -16,7 +16,7 @@ */ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; (_vehicle getVariable [QGVAR(deploymentStage), 0]) == 2 && {getText (_config >> QGVAR(onCut)) != ""} diff --git a/addons/fastroping/functions/fnc_cutRopes.sqf b/addons/fastroping/functions/fnc_cutRopes.sqf index ae1b58638a..f17d08dc18 100644 --- a/addons/fastroping/functions/fnc_cutRopes.sqf +++ b/addons/fastroping/functions/fnc_cutRopes.sqf @@ -25,7 +25,7 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; private _attachedObjects = attachedObjects _dummy; //Rope is considered occupied when it's broken as well, so check if array is empty //Note: ropes are not considered attached objects by Arma - if !(_attachedObjects isEqualTo []) then { + if (_attachedObjects isNotEqualTo []) then { detach ((attachedObjects _dummy) select 0); }; }; @@ -40,5 +40,5 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; _vehicle setVariable [QGVAR(deployedRopes), [], true]; // Set new state (0 if no FRIES, 2 if FRIES for manual stowing) -private _newState = [0, 2] select (isText (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(onCut))); +private _newState = [0, 2] select (isText (configOf _vehicle >> QGVAR(onCut))); _vehicle setVariable [QGVAR(deploymentStage), _newState, true]; diff --git a/addons/fastroping/functions/fnc_deployAI.sqf b/addons/fastroping/functions/fnc_deployAI.sqf index 8101a99dae..d1546aad63 100644 --- a/addons/fastroping/functions/fnc_deployAI.sqf +++ b/addons/fastroping/functions/fnc_deployAI.sqf @@ -26,7 +26,7 @@ if (isNull _vehicle || {!(_vehicle isKindOf "Helicopter")}) exitWith { ERROR('FUNC(deployAI): deployAI was called with an invalid or non-existant vehicle.'); }; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _configEnabled = getNumber (_config >> QGVAR(enabled)); if (_configEnabled == 0) exitWith { if (hasInterface) then { @@ -75,7 +75,7 @@ DFUNC(deployAIRecursive) = { unassignVehicle _unit; [_unit, _vehicle] call FUNC(fastRope); - if !(_unitsToDeploy isEqualTo []) then { + if (_unitsToDeploy isNotEqualTo []) then { [{ [{ params ["_vehicle"]; diff --git a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf index 73dbee6ea4..273d148329 100644 --- a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf +++ b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf @@ -33,7 +33,7 @@ if (_vehicle distance2D _position > 50) then { // - Deployment --------------------------------------------------------------- [_vehicle] call FUNC(deployAI); -waitUntil {!((_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo [])}; +waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isNotEqualTo []}; waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo []}; _group setSpeedMode _speedMode; diff --git a/addons/fastroping/functions/fnc_deployRopes.sqf b/addons/fastroping/functions/fnc_deployRopes.sqf index 27ad76a0f9..d6f3afbf98 100644 --- a/addons/fastroping/functions/fnc_deployRopes.sqf +++ b/addons/fastroping/functions/fnc_deployRopes.sqf @@ -20,13 +20,13 @@ params ["_vehicle", ["_player", objNull], ["_ropeClass", ""]]; TRACE_3("deployRopes",_vehicle,_player,_ropeClass); -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _ropeOrigins = getArray (_config >> QGVAR(ropeOrigins)); private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; private _hookAttachment = _vehicle getVariable [QGVAR(FRIES), _vehicle]; -private _ropeLength = getNumber (configfile >> "CfgWeapons" >> _ropeClass >> QGVAR(ropeLength)); +private _ropeLength = getNumber (configfile >> "CfgWeapons" >> _ropeClass >> QEGVAR(logistics_rope,length)); if (_ropeLength <= 0) then { _ropeLength = DEFAULT_ROPE_LENGTH; diff --git a/addons/fastroping/functions/fnc_equipFRIES.sqf b/addons/fastroping/functions/fnc_equipFRIES.sqf index 002a32364c..6dcb29e3e7 100644 --- a/addons/fastroping/functions/fnc_equipFRIES.sqf +++ b/addons/fastroping/functions/fnc_equipFRIES.sqf @@ -17,7 +17,7 @@ params ["_vehicle"]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; if !(isNumber (_config >> QGVAR(enabled))) then { ["%1 has not been configured for ACE_Fastroping.", getText (_config >> "displayName")] call BIS_fnc_error; } else { diff --git a/addons/fastroping/functions/fnc_prepareFRIES.sqf b/addons/fastroping/functions/fnc_prepareFRIES.sqf index c5bac4deb1..9f1c1b941a 100644 --- a/addons/fastroping/functions/fnc_prepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_prepareFRIES.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; //Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed _vehicle setVariable [QGVAR(deploymentStage), 1, true]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _waitTime = 0; if (isText (_config >> QGVAR(onPrepare))) then { _waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare)))); diff --git a/addons/fastroping/functions/fnc_stowFRIES.sqf b/addons/fastroping/functions/fnc_stowFRIES.sqf index 3b18a6dbe1..297cb925d1 100644 --- a/addons/fastroping/functions/fnc_stowFRIES.sqf +++ b/addons/fastroping/functions/fnc_stowFRIES.sqf @@ -19,7 +19,7 @@ params ["_vehicle"]; //Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed _vehicle setVariable [QGVAR(deploymentStage), 1, true]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configOf _vehicle; private _waitTime = 0; if (isText (_config >> QGVAR(onCut))) then { _waitTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onCut)))); diff --git a/addons/fastroping/functions/fnc_unequipFRIES.sqf b/addons/fastroping/functions/fnc_unequipFRIES.sqf index 7fade927b6..540ebb2f3f 100644 --- a/addons/fastroping/functions/fnc_unequipFRIES.sqf +++ b/addons/fastroping/functions/fnc_unequipFRIES.sqf @@ -20,6 +20,6 @@ params ["_vehicle"]; deleteVehicle (_vehicle getVariable [QGVAR(FRIES), objNull]); _vehicle setVariable [QGVAR(FRIES), nil, true]; -if !(_vehicle getVariable [QGVAR(deployedRopes), []] isEqualTo []) then { +if (_vehicle getVariable [QGVAR(deployedRopes), []] isNotEqualTo []) then { [_vehicle] call FUNC(cutRopes); }; diff --git a/addons/fastroping/initSettings.sqf b/addons/fastroping/initSettings.sqf index eac47639c6..5888f49aa2 100644 --- a/addons/fastroping/initSettings.sqf +++ b/addons/fastroping/initSettings.sqf @@ -10,4 +10,4 @@ private _category = ["ACE Uncategorized", LLSTRING(setting_categoryMenu_displayN true, // isGlobal {[QGVAR(requireRopeItems), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // needRestart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index f9041b1da8..dc349d6778 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -154,6 +154,33 @@ 讓單位快速繩降 패스트 로프를 놓음 UMOŽNIT JEDNOTKÁM SLAŇOVAT + INDICAR A LAS UNIDADES DESCENDER POR LA CUERDA + + + Deploy 3m ropes + 3m Seile einsetzen + Déployer les cordes de 3 m + Wysuń linę o długości 3 m. + Выпустить 3 м канат + Jogar cordar (3m) + Dispiegamento corde 3m + Připravit 3m lana + 3m halat sal + Desplegar cuerdas de 3m + 3m ロープを展開 + + + Deploy 6m ropes + 6m Seile einsetzen + Déployer les cordes de 6 m + Wysuń linę o długości 6 m. + Выпустить 6 м канат + Jogar cordar (6m) + Dispiegamento corde 6m + Připravit 6m lana + 6m halat sal + Desplegar cuerdas de 6m + 6m ロープを展開 Deploy 12m ropes @@ -239,90 +266,6 @@ [ACE] Halat Sandığı [ACE] Caja de suministros - cuerdas - - Used to do deploy ropes from a compatibile helicopter - Wird zum Bereitstellen von Seilen aus einem kompatiblen Hubschrauber verwendet - Utilisé pour déployer des cordes depuis un hélicoptère compatible. - 対応するヘリコプターからロープを展開する為に使用されます - Używane do opuszczania lin z kompatybilnych smigłowców - Используется для выпуска канатов с совместимого вертолета - Usado para fazer descida rápida de corda em helicópteros compatíveis com FRIES - 在可相容的直升機上部屬繩索 - Utilizzato per distribuire corde da un elicottero compatibile - Používané na přípravu lan na slaňování z kompatibilních helikoptér - Usar para desplegar cuerdas desde helicopteros compatibles - Halatları uyumlu helikopterlerden salmak için kullanır - - - Rope 12.2 meters - 12.2 Meter Seil - Corde de 12,2 mètres - ロープ (12.2 メートル) - Lina, długość 12,2 m. - Канат 12.2 метров - Corda (12.2m) - 繩索(12.2公尺長) - Corda da 12.2 metri - Lano 12.2 metrů - 12.2 metre halat - Cuerda de 12.2 metros - - - Rope 15.2 meters - 15.2 Meter Seil - Corde de 15,2 mètres - ロープ (15.2 メートル) - Lina, długość 15,2 m. - Канат 15.2 метров - Corda (15.2m) - 繩索(15.2公尺長) - Corda da 15.2 metri - Lano 15.2 metrů - 15.2 metre halat - Cuerda de 15.2 metros - - - Rope 18.3 meters - 18.3 Meter Seil - Corde de 18,3 mètres - ロープ (18.3 メートル) - Lina, długość 18,3 m. - Канат 18.3 метров - Corda (18.3m) - 繩索(18.3公尺長) - Corda da 18.3 metri - Lano 18.3 metrů - 18.3 metre halat - Cuerda de 18.3 metros - - - Rope 27.4 meters - 27.4 Meter Seil - Corde de 27,4 mètres - ロープ (27.4 メートル) - Lina, długość 27,4 m. - Канат 27.4 метров - Corda (27.4m) - 繩索(27.4公尺長) - Corda da 27.4 metri - Lano 27.4 metrů - 27.4 metre halat - Cuerda de 27.4 metros - - - Rope 36.6 meters - 36.6 Meter Seil - Corde de 36,6 mètres - ロープ (36.6 メートル) - Lina, długość 36,6 m. - Канат 36.6 метров - Corda (36.6m) - 繩索(36.6公尺長) - Corda da 36.6 metri - Lano 36.6 metrů - 36.6 metre halat - Cuerda 36.6 metros - Fast-roping Hélicordage diff --git a/addons/fcs/CfgEventHandlers.hpp b/addons/fcs/CfgEventHandlers.hpp index 9c5c368307..d82354ea52 100644 --- a/addons/fcs/CfgEventHandlers.hpp +++ b/addons/fcs/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/fcs/README.md b/addons/fcs/README.md index c4abbe3253..abe08d726e 100644 --- a/addons/fcs/README.md +++ b/addons/fcs/README.md @@ -2,11 +2,3 @@ ace_fcs ======= Adds a fire control system to armoured vehicles and helicopters, allowing precise engagement of stationary and moving targets. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/fcs/dev/test_debugConfigs.sqf b/addons/fcs/dev/test_debugConfigs.sqf index 89fa6b0d31..c373912363 100644 --- a/addons/fcs/dev/test_debugConfigs.sqf +++ b/addons/fcs/dev/test_debugConfigs.sqf @@ -30,7 +30,7 @@ private _problemUIs = []; }; } forEach _weapons; - if (!(_weapons isEqualTo [])) then { + if (_weapons isNotEqualTo []) then { private _fcsMsg = switch (true) do { // case ((!_vanillaFCS) && {!_aceFCS}): {"No FCS"}; // case ((_vanillaFCS) && {_aceFCS}): {"CONFLICT FCS"}; diff --git a/addons/fcs/functions/fnc_adjustRange.sqf b/addons/fcs/functions/fnc_adjustRange.sqf index cb0e00c9c1..30f9c86305 100644 --- a/addons/fcs/functions/fnc_adjustRange.sqf +++ b/addons/fcs/functions/fnc_adjustRange.sqf @@ -19,7 +19,7 @@ params ["_vehicle", "_turret", "_delta"]; -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); private _min = getNumber (_turretConfig >> QGVAR(MinDistance)); private _max = getNumber (_turretConfig >> QGVAR(MaxDistance)); diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index 8ceb0c62cf..478b34f502 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -23,7 +23,7 @@ TRACE_4("params",_vehicle,_turret,_distance,_angleTarget); private _FCSInitSpeed = []; private _FCSMagazines = []; private _FCSElevation = []; -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); { private _magazine = _x; diff --git a/addons/fcs/functions/fnc_canUseFCS.sqf b/addons/fcs/functions/fnc_canUseFCS.sqf index a246d51f0c..a5a1543de9 100644 --- a/addons/fcs/functions/fnc_canUseFCS.sqf +++ b/addons/fcs/functions/fnc_canUseFCS.sqf @@ -15,7 +15,7 @@ * Public: No */ -getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1 +getNumber ([configOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1 && {cameraView == "GUNNER"} && {!([ACE_player] call CBA_fnc_canUseWeapon)} //Not Turned Out && {cameraOn != (getConnectedUAV ACE_player)} //Not Controlling a UAV diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index 0959708bb0..e432944855 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -39,7 +39,7 @@ private _initSpeed = 0; private _zeroDistance = currentZeroing _gunner; if (_zeroDistance > 0) then { private _weaponCombo = [_weapon, _magazine, _ammo, _zeroDistance]; - if !(_weaponCombo isEqualTo (_gunner getVariable [QGVAR(lastWeaponCombo), []])) then { + 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]; _antiOffset = parseNumber _antiOffset; diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index 0e141c0968..2e40b64a84 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -18,7 +18,7 @@ params ["_vehicle", "_turret"]; -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); // Update display for infantry rangefinders if (_vehicle == ACE_player) exitWith {[5,5500,25,true] call FUNC(getRange)}; diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index fb3ce99974..d96b6d5307 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -19,7 +19,7 @@ params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]]; TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound); -private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); +private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); if (isNil "_distance") then { _distance = [ diff --git a/addons/fcs/functions/fnc_vehicleInit.sqf b/addons/fcs/functions/fnc_vehicleInit.sqf index 3314228729..b6e8eff316 100644 --- a/addons/fcs/functions/fnc_vehicleInit.sqf +++ b/addons/fcs/functions/fnc_vehicleInit.sqf @@ -18,7 +18,7 @@ params ["_vehicle"]; { - private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _x] call EFUNC(common,getTurretConfigPath); + private _turretConfig = [configOf _vehicle, _x] call EFUNC(common,getTurretConfigPath); if (getNumber (_turretConfig >> QGVAR(Enabled)) == 1) then { if (isNil QGVAR(jipID)) then { diff --git a/addons/field_rations/$PBOPREFIX$ b/addons/field_rations/$PBOPREFIX$ new file mode 100644 index 0000000000..26d4a0f4b6 --- /dev/null +++ b/addons/field_rations/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\field_rations diff --git a/addons/field_rations/Cfg3DEN.hpp b/addons/field_rations/Cfg3DEN.hpp new file mode 100644 index 0000000000..af25bbd021 --- /dev/null +++ b/addons/field_rations/Cfg3DEN.hpp @@ -0,0 +1,24 @@ +#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) +#define DEFAULT_WATER_SUPPLY GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQXGVAR(waterSupply),REFILL_WATER_DISABLED) + +class Cfg3DEN { + class Object { + class AttributeCategories { + class ace_attributes { + class Attributes { + class XGVAR(waterSupply) { + displayName = CSTRING(WaterSupply_3DEN_DisplayName); + tooltip = CSTRING(WaterSupply_3DEN_Description); + property = QXGVAR(waterSupply); + control = "EditShort"; + expression = QUOTE(if (_value != DEFAULT_WATER_SUPPLY) then {_this setVariable [ARR_3(QQGVAR(currentWaterSupply),_value,true)]}); + defaultValue = QUOTE(DEFAULT_WATER_SUPPLY); + validate = "NUMBER"; + condition = "(1 - objectBrain) * (1 - objectAgent)"; + typeName = "NUMBER"; + }; + }; + }; + }; + }; +}; diff --git a/addons/field_rations/CfgEventHandlers.hpp b/addons/field_rations/CfgEventHandlers.hpp new file mode 100644 index 0000000000..f6503c2479 --- /dev/null +++ b/addons/field_rations/CfgEventHandlers.hpp @@ -0,0 +1,17 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/field_rations/CfgMoves.hpp b/addons/field_rations/CfgMoves.hpp new file mode 100644 index 0000000000..7fc9ebf3ec --- /dev/null +++ b/addons/field_rations/CfgMoves.hpp @@ -0,0 +1,67 @@ +class CfgMovesBasic; +class CfgMovesMaleSdr: CfgMovesBasic { + class States { + class CutSceneAnimationBase; + class GVAR(drinkStand): CutSceneAnimationBase { + file = QPATHTOF(anim\drink_stand.rtm); + actions = "CivilStandActions"; + speed = 0.1; + disableWeapons = 1; + disableWeaponsLong = 1; + canReload = 0; + canPullTrigger = 0; + showWeaponAim = 0; + looped = 0; + head = "headNo"; + aiming = "aimingNo"; + legs = "legsNo"; + connectTo[] = {"AmovPercMstpSnonWnonDnon", 0.1}; + interpolateFrom[] = {"AmovPercMstpSnonWnonDnon", 0.1}; + interpolateTo[] = {"Unconscious", 0.1}; + }; + class GVAR(drinkCrouch): GVAR(drinkStand) { + file = QPATHTOF(anim\drink_crouch.rtm); + actions = "CivilKneelActions"; + connectTo[] = {"AmovPknlMstpSnonWnonDnon", 0.1}; + interpolateFrom[] = {"AmovPknlMstpSnonWnonDnon", 0.1}; + }; + class GVAR(drinkProne): GVAR(drinkStand) { + file = QPATHTOF(anim\drink_prone.rtm); + actions = "CivilProneActions"; + connectTo[] = {"AmovPpneMstpSnonWnonDnon", 0.1}; + interpolateFrom[] = {"AmovPpneMstpSnonWnonDnon", 0.1}; + }; + class GVAR(drinkStandCan): GVAR(drinkStand) { + file = QPATHTOF(anim\drink_stand_can.rtm); + speed = 1/9; + }; + class GVAR(drinkCrouchCan): GVAR(drinkCrouch) { + file = QPATHTOF(anim\drink_crouch_can.rtm); + speed = 1/9; + }; + class GVAR(drinkProneCan): GVAR(drinkProne) { + file = QPATHTOF(anim\drink_prone_can.rtm); + speed = 1/9; + }; + class GVAR(drinkFromSource): GVAR(drinkStand) { + file = QPATHTOF(anim\drink_source.rtm); + speed = 1/8; + }; + class GVAR(drinkFromSourceHigh): GVAR(drinkFromSource) { + file = QPATHTOF(anim\drink_source_high.rtm); + }; + class GVAR(drinkFromSourceLow): GVAR(drinkFromSource) { + file = QPATHTOF(anim\drink_source_low.rtm); + }; + class GVAR(drinkFromSourceSquat): GVAR(drinkFromSource) { + file = QPATHTOF(anim\drink_source_squat.rtm); + interpolateFrom[] = {"AmovPercMstpSnonWnonDnon", 0.1, "AmovPknlMstpSnonWnonDnon", 0.1}; + }; + class GVAR(drinkFromSourceSquatHigh): GVAR(drinkFromSourceSquat) { + file = QPATHTOF(anim\drink_source_squat_high.rtm); + }; + class GVAR(drinkFromSourceSquatLow): GVAR(drinkFromSourceSquat) { + file = QPATHTOF(anim\drink_source_squat_low.rtm); + }; + }; +}; diff --git a/addons/field_rations/CfgSounds.hpp b/addons/field_rations/CfgSounds.hpp new file mode 100644 index 0000000000..ca937d5e54 --- /dev/null +++ b/addons/field_rations/CfgSounds.hpp @@ -0,0 +1,22 @@ +class CfgSounds { + class GVAR(drink1) { + name = QGVAR(drink1); + sound[] = {QPATHTOF(sounds\drink1.ogg), 1, 1}; + titles[] = {}; + }; + class GVAR(drink2) { + name = QGVAR(drink2); + sound[] = {QPATHTOF(sounds\drink2.ogg), 1, 1}; + titles[] = {}; + }; + class GVAR(drinkCan1) { + name = QGVAR(drinkCan1); + sound[] = {QPATHTOF(sounds\drink_can1.ogg), 1, 1}; + titles[] = {}; + }; + class GVAR(drinkCan2) { + name = QGVAR(drinkCan2); + sound[] = {QPATHTOF(sounds\drink_can2.ogg), 1, 1}; + titles[] = {}; + }; +}; diff --git a/addons/field_rations/CfgUIGrids.hpp b/addons/field_rations/CfgUIGrids.hpp new file mode 100644 index 0000000000..ce5d3d6440 --- /dev/null +++ b/addons/field_rations/CfgUIGrids.hpp @@ -0,0 +1,29 @@ +class CfgUIGrids { + class IGUI { + class Presets { + class Arma3 { + class Variables { + XGVAR(grid)[] = { + { + safeZoneX + safeZoneW - 4.2 * GUI_GRID_W, + safeZoneY + safeZoneH - 2.2 * GUI_GRID_H, + 4 * GUI_GRID_W, + 2 * GUI_GRID_H + }, + GUI_GRID_W, + GUI_GRID_H + }; + }; + }; + }; + class Variables { + class XGVAR(grid) { + displayName = CSTRING(IGUI_DisplayName); + description = CSTRING(IGUI_Description); + preview = QPATHTOF(ui\igui_preview.paa); + saveToProfile[] = {0, 1}; + canResize = 0; + }; + }; + }; +}; diff --git a/addons/field_rations/CfgVehicles.hpp b/addons/field_rations/CfgVehicles.hpp new file mode 100644 index 0000000000..0b0d3828cc --- /dev/null +++ b/addons/field_rations/CfgVehicles.hpp @@ -0,0 +1,280 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ADDON { + displayName = CSTRING(MainInteractionText); + condition = QUOTE(XGVAR(enabled)); + exceptions[] = {"isNotInside"}; + statement = QUOTE(GVAR(hudInteractionHover) = true; [] call FUNC(handleHUD)); + runOnHover = 1; + insertChildren = QUOTE(_player call FUNC(getConsumableChildren)); + icon = QPATHTOF(ui\icon_survival.paa); + }; + }; + }; + + class ACE_LogicDummy; + class GVAR(helper): ACE_LogicDummy {}; + + class Items_base_F; + class Land_WaterBarrel_F: Items_base_F { + XGVAR(waterSupply) = 200; + XGVAR(offset)[] = {0, 0, 0.6}; + }; + class Land_BarrelWater_F: Items_base_F { + XGVAR(waterSupply) = 160; + XGVAR(offset)[] = {0, 0, 0.25}; + }; + class Land_BarrelWater_grey_F: Items_base_F { + XGVAR(waterSupply) = 160; + XGVAR(offset)[] = {0, 0, 0.25}; + }; + class Land_WaterTank_F: Items_base_F { + XGVAR(waterSupply) = 600; + XGVAR(offset)[] = {1.15, 0, 0.65}; + }; + class Land_WaterCooler_01_new_F: Items_base_F { + XGVAR(waterSupply) = 20; + XGVAR(offset)[] = {0, -0.13, 0.1}; + }; + + class Infrastructure_base_F; + class Land_WaterTank_01_F: Infrastructure_base_F { + XGVAR(waterSupply) = 2400; + XGVAR(offset)[] = {0, -1.42, -0.78}; + }; + class Land_WaterTank_02_F: Infrastructure_base_F { + XGVAR(waterSupply) = 2400; + XGVAR(offset)[] = {-0.09, -1.45, 0.53}; + }; + class Land_WaterTank_03_F: Infrastructure_base_F { + XGVAR(waterSupply) = 200; + XGVAR(offset)[] = {0, 0, 0.44}; + }; + class Land_WaterTank_04_F: Infrastructure_base_F { + XGVAR(waterSupply) = 200; + XGVAR(offset)[] = {-0.155, -0.72, 0.37}; + }; + + class Stall_base_F; + class Land_StallWater_F: Stall_base_F { + XGVAR(waterSupply) = 250; + XGVAR(offset)[] = {0, -0.33, 0.4}; + }; + + class StorageBladder_base_F; + class Land_StorageBladder_02_F: StorageBladder_base_F { + XGVAR(offset)[] = {-2.02, 1.47, -0.02}; + }; + class StorageBladder_02_water_forest_F: Land_StorageBladder_02_F { + XGVAR(waterSupply) = 10000; + }; + class StorageBladder_02_water_sand_F: Land_StorageBladder_02_F { + XGVAR(waterSupply) = 10000; + }; + + class NonStrategic; + class Land_Water_source_F: NonStrategic { + XGVAR(waterSupply) = REFILL_WATER_INFINITE; + XGVAR(offset)[] = {0, -0.12, -0.25}; + }; + + class Land_WaterPump_01_F; + class WaterPump_01_forest_F: Land_WaterPump_01_F { + XGVAR(waterSupply) = REFILL_WATER_INFINITE; + XGVAR(offset)[] = {0, -1.8, 0.06}; + }; + class WaterPump_01_sand_F: Land_WaterPump_01_F { + XGVAR(waterSupply) = REFILL_WATER_INFINITE; + XGVAR(offset)[] = {0, -1.8, 0.06}; + }; + + class Truck_02_water_base_F; + class C_IDAP_Truck_02_water_F: Truck_02_water_base_F { + XGVAR(waterSupply) = 10000; + XGVAR(offset)[] = {-0.03, -3.72, -1.05}; + }; + + class Item_Base_F; + class ACE_WaterBottle_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(WaterBottle_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_WaterBottle,1); + }; + }; + class ACE_WaterBottle_Half_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(WaterBottleHalf_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_WaterBottle_Half,1); + }; + }; + class ACE_WaterBottle_Empty_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(WaterBottleEmpty_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_WaterBottle_Empty,1); + }; + }; + class ACE_Canteen_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(Canteen_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_Canteen,1); + }; + }; + class ACE_Canteen_Half_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(CanteenHalf_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_Canteen_Half,1); + }; + }; + class ACE_Canteen_Empty_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(CanteenEmpty_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_Canteen_Empty,1); + }; + }; + class ACE_Can_Spirit_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = "$STR_a3_cfgvehicles_land_can_v1_f0"; + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_Can_Spirit,1); + }; + }; + class ACE_Can_Franta_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = "$STR_a3_cfgvehicles_land_can_v2_f0"; + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_Can_Franta,1); + }; + }; + class ACE_Can_RedGull_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = "$STR_a3_cfgvehicles_land_can_v3_f0"; + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_Can_RedGull,1); + }; + }; + class ACE_MRE_LambCurry_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MRE_LambCurry_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_MRE_LambCurry,1); + }; + }; + class ACE_MRE_BeefStew_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MRE_BeefStew_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_MRE_BeefStew,1); + }; + }; + class ACE_MRE_CreamTomatoSoup_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MRE_CreamTomatoSoup_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_MRE_CreamTomatoSoup,1); + }; + }; + class ACE_MRE_CreamChickenSoup_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MRE_CreamChickenSoup_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_MRE_CreamChickenSoup,1); + }; + }; + class ACE_MRE_ChickenTikkaMasala_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MRE_ChickenTikkaMasala_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_MRE_ChickenTikkaMasala,1); + }; + }; + class ACE_MRE_SteakVegetables_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MRE_SteakVegetables_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_MRE_SteakVegetables,1); + }; + }; + class ACE_MRE_MeatballsPasta_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MRE_MeatballsPasta_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_MRE_MeatballsPasta,1); + }; + }; + class ACE_MRE_ChickenHerbDumplings_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(MRE_ChickenHerbDumplings_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_MRE_ChickenHerbDumplings,1); + }; + }; + class ACE_Humanitarian_Ration_Item: Item_Base_F { + author = ECSTRING(common,ACETeam); + scope = 2; + scopeCurator = 2; + displayName = CSTRING(Humanitarian_Ration_DisplayName); + vehicleClass = "Items"; + class TransportItems { + MACRO_ADDITEM(ACE_Humanitarian_Ration,1); + }; + }; +}; diff --git a/addons/field_rations/CfgWeapons.hpp b/addons/field_rations/CfgWeapons.hpp new file mode 100644 index 0000000000..5e397760ed --- /dev/null +++ b/addons/field_rations/CfgWeapons.hpp @@ -0,0 +1,228 @@ +class CfgWeapons { + /* + * Consumable Items Config Entries: + * -------------------------------- + * XGVAR(consumeText) - Text displayed for consumption progress bar + * XGVAR(consumeTime) - Time in seconds to consume item + * XGVAR(consumeAnims) - Array of animations [stand, crouch, prone] + * XGVAR(consumeSounds) - Array of sounds [stand, crouch, prone] + * XGVAR(thirstQuenched) - Thirst quenched on consumption + * XGVAR(hungerSatiated) - Hunger satiated on consumption + * XGVAR(replacementItem) - Replacement item on consumption (if any) + * XGVAR(refillItem) - Item added when refilled (makes item refillable) + * XGVAR(refillAmount) - Amount of water required to refill item + * XGVAR(refillTime) - Time in seconds to refill item + */ + + class ACE_ItemCore; + class CBA_MiscItem_ItemInfo; + + class ACE_Banana: ACE_ItemCore { + XGVAR(consumeTime) = 10; + XGVAR(hungerSatiated) = 3; + XGVAR(consumeText) = CSTRING(EatingX); + }; + + // - Water Bottles -------------------------------------------------------- + class ACE_WaterBottle: ACE_ItemCore { + author = ECSTRING(common,ACETeam); + scope = 2; + displayName = CSTRING(WaterBottle_DisplayName); + descriptionShort = CSTRING(WaterBottle_Description); + model = "\a3\structures_f_epa\items\food\bottleplastic_v2_f.p3d"; + picture = QPATHTOF(ui\item_waterbottle_full_co.paa); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 5; + }; + XGVAR(consumeTime) = 10; + XGVAR(thirstQuenched) = 10; + XGVAR(consumeText) = CSTRING(DrinkingFromX); + XGVAR(replacementItem) = "ACE_WaterBottle_Half"; + XGVAR(consumeAnims)[] = {QGVAR(drinkStand), QGVAR(drinkCrouch), QGVAR(drinkProne)}; + XGVAR(consumeSounds)[] = {QGVAR(drink1), QGVAR(drink1), QGVAR(drink2)}; + }; + + class ACE_WaterBottle_Half: ACE_WaterBottle { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(WaterBottleHalf_DisplayName); + descriptionShort = CSTRING(WaterBottleHalf_Description); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 3; + }; + XGVAR(replacementItem) = "ACE_WaterBottle_Empty"; + XGVAR(refillItem) = "ACE_WaterBottle"; + XGVAR(refillAmount) = 0.5; + XGVAR(refillTime) = 8; + }; + + class ACE_WaterBottle_Empty: ACE_WaterBottle { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(WaterBottleEmpty_DisplayName); + descriptionShort = CSTRING(WaterBottleEmpty_Description); + picture = QPATHTOF(ui\item_waterbottle_empty_co.paa); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + XGVAR(thirstQuenched) = 0; + XGVAR(replacementItem) = ""; + XGVAR(refillItem) = "ACE_WaterBottle"; + XGVAR(refillAmount) = 1; + XGVAR(refillTime) = 8; + }; + + // - Canteens ------------------------------------------------------------- + class ACE_Canteen: ACE_ItemCore { + author = ECSTRING(common,ACETeam); + scope = 2; + displayName = CSTRING(Canteen_DisplayName); + descriptionShort = CSTRING(Canteen_Description); + model = "\a3\structures_f_epa\items\food\canteen_f.p3d"; + picture = QPATHTOF(ui\item_canteen_co.paa); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 5; + }; + XGVAR(consumeTime) = 10; + XGVAR(thirstQuenched) = 10; + XGVAR(consumeText) = CSTRING(DrinkingFromX); + XGVAR(replacementItem) = "ACE_Canteen_Half"; + XGVAR(consumeAnims)[] = {QGVAR(drinkStand), QGVAR(drinkCrouch), QGVAR(drinkProne)}; + XGVAR(consumeSounds)[] = {QGVAR(drink1), QGVAR(drink1), QGVAR(drink2)}; + }; + + class ACE_Canteen_Half: ACE_Canteen { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(CanteenHalf_DisplayName); + descriptionShort = CSTRING(CanteenHalf_Description); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 3; + }; + XGVAR(replacementItem) = "ACE_Canteen_Empty"; + XGVAR(refillItem) = "ACE_Canteen"; + XGVAR(refillAmount) = 0.5; + XGVAR(refillTime) = 8; + }; + + class ACE_Canteen_Empty: ACE_Canteen { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(CanteenEmpty_DisplayName); + descriptionShort = CSTRING(CanteenEmpty_Description); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 1; + }; + XGVAR(thirstQuenched) = 0; + XGVAR(replacementItem) = ""; + XGVAR(refillItem) = "ACE_Canteen"; + XGVAR(refillAmount) = 1; + XGVAR(refillTime) = 8; + }; + + // - Soda Cans ------------------------------------------------------------ + class ACE_Can_Spirit: ACE_ItemCore { + author = ECSTRING(common,ACETeam); + scope = 2; + displayName = "$STR_a3_cfgvehicles_land_can_v1_f0"; + descriptionShort = CSTRING(Can_Spirit_Description); + model = "\a3\structures_f\items\food\can_v1_f.p3d"; + picture = QPATHTOF(ui\icon_can_spirit_ca.paa); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 3; + }; + XGVAR(consumeTime) = 10; + XGVAR(thirstQuenched) = 5; + XGVAR(consumeText) = CSTRING(DrinkingX); + XGVAR(consumeAnims)[] = {QGVAR(drinkStandCan), QGVAR(drinkCrouchCan), QGVAR(drinkProneCan)}; + XGVAR(consumeSounds)[] = {QGVAR(drinkCan1), QGVAR(drinkCan1), QGVAR(drinkCan2)}; + }; + + class ACE_Can_Franta: ACE_Can_Spirit { + author = ECSTRING(common,ACETeam); + displayName = "$STR_a3_cfgvehicles_land_can_v2_f0"; + descriptionShort = CSTRING(Can_Franta_Description); + model = "\a3\structures_f\items\food\can_v2_f.p3d"; + picture = QPATHTOF(ui\icon_can_franta_ca.paa); + }; + + class ACE_Can_RedGull: ACE_Can_Spirit { + author = ECSTRING(common,ACETeam); + displayName = "$STR_a3_cfgvehicles_land_can_v3_f0"; + descriptionShort = CSTRING(Can_RedGull_Description); + model = "\a3\structures_f\items\food\can_v3_f.p3d"; + picture = QPATHTOF(ui\icon_can_redgull_ca.paa); + }; + + // - MREs ----------------------------------------------------------------- + class ACE_MRE_LambCurry: ACE_ItemCore { + author = ECSTRING(common,ACETeam); + scope = 2; + displayName = CSTRING(MRE_LambCurry_DisplayName); + descriptionShort = CSTRING(MRE_LambCurry_Description); + model = QPATHTOF(data\mre_type1.p3d); + picture = QPATHTOF(ui\item_mre_type1_co.paa); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 5; + }; + XGVAR(consumeTime) = 10; + XGVAR(hungerSatiated) = 20; + XGVAR(consumeText) = CSTRING(EatingX); + }; + + class ACE_MRE_BeefStew: ACE_MRE_LambCurry { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(MRE_BeefStew_DisplayName); + descriptionShort = CSTRING(MRE_BeefStew_Description); + model = QPATHTOF(data\mre_type2.p3d); + picture = QPATHTOF(ui\item_mre_type2_co.paa); + }; + + class ACE_MRE_CreamTomatoSoup: ACE_MRE_LambCurry { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(MRE_CreamTomatoSoup_DisplayName); + descriptionShort = CSTRING(MRE_CreamTomatoSoup_Description); + model = QPATHTOF(data\mre_type3.p3d); + picture = QPATHTOF(ui\item_mre_type3_co.paa); + }; + + class ACE_MRE_CreamChickenSoup: ACE_MRE_CreamTomatoSoup { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(MRE_CreamChickenSoup_DisplayName); + descriptionShort = CSTRING(MRE_CreamChickenSoup_Description); + }; + + class ACE_MRE_ChickenTikkaMasala: ACE_MRE_LambCurry { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(MRE_ChickenTikkaMasala_DisplayName); + descriptionShort = CSTRING(MRE_ChickenTikkaMasala_Description); + model = QPATHTOF(data\mre_type4.p3d); + picture = QPATHTOF(ui\item_mre_type4_co.paa); + }; + + class ACE_MRE_SteakVegetables: ACE_MRE_LambCurry { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(MRE_SteakVegetables_DisplayName); + descriptionShort = CSTRING(MRE_SteakVegetables_Description); + model = QPATHTOF(data\mre_type5.p3d); + picture = QPATHTOF(ui\item_mre_type5_co.paa); + }; + + class ACE_MRE_MeatballsPasta: ACE_MRE_LambCurry { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(MRE_MeatballsPasta_DisplayName); + descriptionShort = CSTRING(MRE_MeatballsPasta_Description); + model = QPATHTOF(data\mre_type6.p3d); + picture = QPATHTOF(ui\item_mre_type6_co.paa); + }; + + class ACE_MRE_ChickenHerbDumplings: ACE_MRE_MeatballsPasta { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(MRE_ChickenHerbDumplings_DisplayName); + descriptionShort = CSTRING(MRE_ChickenHerbDumplings_Description); + }; + + class ACE_Humanitarian_Ration: ACE_MRE_LambCurry { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(Humanitarian_Ration_DisplayName); + descriptionShort = CSTRING(Humanitarian_Ration_Description); + model = QPATHTOF(data\mre_human.p3d); + picture = QPATHTOF(ui\item_mre_human_co.paa); + }; +}; diff --git a/addons/field_rations/README.md b/addons/field_rations/README.md new file mode 100644 index 0000000000..b178343e99 --- /dev/null +++ b/addons/field_rations/README.md @@ -0,0 +1,13 @@ +ace_field_rations +================== + +Provides a survival style, hunger and thirst system. +Adds consumable items such as MREs. + +## ACEX Conversion - things still using acex prefix +- All settings +- CfgUIGrids Entry +- CfgWeapon Configs (e.g. `acex_field_rations_thirstQuenched`) +- CfgVehicles Configs (e.g. `acex_field_rations_waterSupply`) +- Events (`acex_rationConsumed`, `acex_rationRefilled`) +- Player setVars for thirst/hunger (e.g. `player getVariable "acex_field_rations_thirst"`) diff --git a/addons/field_rations/RscTitles.hpp b/addons/field_rations/RscTitles.hpp new file mode 100644 index 0000000000..d578b16653 --- /dev/null +++ b/addons/field_rations/RscTitles.hpp @@ -0,0 +1,80 @@ +class RscPicture; +class RscControlsGroupNoScrollbars; + +class RscTitles { + class GVAR(hudColoredIcons) { + idd = -1; + fadeIn = 0.5; + fadeOut = 0.5; + duration = 999999; + movingEnable = 0; + onLoad = QUOTE(SETUVAR(QGVAR(hudDisplay),_this select 0)); + class controls { + class Thirst: RscPicture { + idc = IDC_COLORED_HUD_THIRST; + x = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]; + y = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H]; + w = 2 * GUI_GRID_W; + h = 2 * GUI_GRID_H; + text = QPATHTOF(ui\icon_hud_thirststatus.paa); + }; + class Hunger: Thirst { + idc = IDC_COLORED_HUD_HUNGER; + x = 2 * GUI_GRID_W + (profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]); + text = QPATHTOF(ui\icon_hud_hungerstatus.paa); + }; + }; + }; + class GVAR(hudDrainingIcons) { + idd = -1; + fadeIn = 0.5; + fadeOut = 0.5; + duration = 999999; + movingEnable = 0; + onLoad = QUOTE(SETUVAR(QGVAR(hudDisplay),_this select 0)); + class controlsBackground { + class Thirst: RscPicture { + idc = -1; + x = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]; + y = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H]; + w = 2 * GUI_GRID_W; + h = 2 * GUI_GRID_H; + text = QPATHTOF(ui\icon_hud_thirststatus.paa); + colorText[] = {1, 1, 1, 0.2}; + }; + class Hunger: Thirst { + x = 2 * GUI_GRID_W + (profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]); + text = QPATHTOF(ui\icon_hud_hungerstatus.paa); + }; + }; + class controls { + class ThirstGroup: RscControlsGroupNoScrollbars { + idc = IDC_DRAINING_HUD_THIRST_GROUP; + x = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]; + y = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H]; + w = 2 * GUI_GRID_W; + h = 2 * GUI_GRID_H; + class controls { + class Icon: RscPicture { + idc = IDC_DRAINING_HUD_THIRST_ICON; + x = 0; + y = 0; + w = 2 * GUI_GRID_W; + h = 2 * GUI_GRID_H; + text = QPATHTOF(ui\icon_hud_thirststatus.paa); + }; + }; + }; + class HungerGroup: ThirstGroup { + idc = IDC_DRAINING_HUD_HUNGER_GROUP; + x = 2 * GUI_GRID_W + (profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),X)), safeZoneX + safeZoneW - 4.2 * GUI_GRID_W]); + class controls: controls { + class Icon: Icon { + idc = IDC_DRAINING_HUD_HUNGER_ICON; + text = QPATHTOF(ui\icon_hud_hungerstatus.paa); + }; + }; + }; + }; + }; +}; diff --git a/addons/field_rations/XEH_PREP.hpp b/addons/field_rations/XEH_PREP.hpp new file mode 100644 index 0000000000..68833a495b --- /dev/null +++ b/addons/field_rations/XEH_PREP.hpp @@ -0,0 +1,18 @@ +ACEX_PREP(addStatusModifier); +ACEX_PREP(addWaterSourceInteractions); +ACEX_PREP(canDrinkFromSource); +ACEX_PREP(canRefillItem); +ACEX_PREP(checkWater); +ACEX_PREP(consumeItem); +ACEX_PREP(drinkFromSource); +ACEX_PREP(getActionOffset); +ACEX_PREP(getConsumableChildren); +ACEX_PREP(getDrinkAnimation); +ACEX_PREP(getRefillChildren); +ACEX_PREP(getRemainingWater); +ACEX_PREP(handleEffects); +ACEX_PREP(handleHUD); +ACEX_PREP(handleRespawn); +ACEX_PREP(refillItem); +ACEX_PREP(setRemainingWater); +ACEX_PREP(update); diff --git a/addons/field_rations/XEH_postInit.sqf b/addons/field_rations/XEH_postInit.sqf new file mode 100644 index 0000000000..be81985bc4 --- /dev/null +++ b/addons/field_rations/XEH_postInit.sqf @@ -0,0 +1,142 @@ +#include "script_component.hpp" + +if !(hasInterface) exitWith {}; + +["ace_settingsInitialized", { + // Exit if not enabled + if (!XGVAR(enabled)) exitWith {}; + + // Add Advanced Fatigue duty factor + if (XGVAR(affectAdvancedFatigue) && {missionNamespace getVariable [QEGVAR(advanced_fatigue,enabled), false]}) then { + [QUOTE(ADDON), { + linearConversion [50, 100, _this getVariable [QXGVAR(thirst), 0], 1, 1.4, true] * linearConversion [50, 100, _this getVariable [QXGVAR(hunger), 0], 1, 1.1, true] + }] call EFUNC(advanced_fatigue,addDutyFactor); + TRACE_1("Added duty factor",XGVAR(affectAdvancedFatigue)); + }; + + // Compile water source actions + private _mainAction = [ + QGVAR(waterSource), + LLSTRING(WaterSource), + QPATHTOF(ui\icon_water_tap.paa), + {true}, + { + private _waterSource = _target getVariable [QGVAR(waterSource), objNull]; + + alive _waterSource + && {XGVAR(waterSourceActions) != 0} + && {_waterSource call FUNC(getRemainingWater) != REFILL_WATER_DISABLED} + && {[_player, _waterSource] call EFUNC(common,canInteractWith)} + }, + { + private _waterSource = _target getVariable [QGVAR(waterSource), objNull]; + [_waterSource, _player] call FUNC(getRefillChildren); + }, + [], + {[0, 0, 0]}, + 2, + [false, false, false, false, true] + ] call EFUNC(interact_menu,createAction); + + private _subActions = [ + [ + QGVAR(checkWater), + LLSTRING(CheckWater), + QPATHTOF(ui\icon_water_tap.paa), + { + private _waterSource = _target getVariable [QGVAR(waterSource), objNull]; + [_player, _waterSource] call FUNC(checkWater); + }, + { + private _waterSource = _target getVariable [QGVAR(waterSource), objNull]; + (_waterSource call FUNC(getRemainingWater)) != REFILL_WATER_INFINITE + } + ] call EFUNC(interact_menu,createAction), + [ + QGVAR(drinkFromSource), + LLSTRING(DrinkFromSource), + QPATHTOF(ui\icon_water_tap.paa), + { + private _waterSource = _target getVariable [QGVAR(waterSource), objNull]; + [_player, _waterSource] call FUNC(drinkFromSource); + }, + { + private _waterSource = _target getVariable [QGVAR(waterSource), objNull]; + [_player, _waterSource] call FUNC(canDrinkFromSource); + } + ] call EFUNC(interact_menu,createAction) + ]; + + // Add water source actions to helper + [QGVAR(helper), 0, [], _mainAction] call EFUNC(interact_menu,addActionToClass); + { + [QGVAR(helper), 0, [QGVAR(waterSource)], _x] call EFUNC(interact_menu,addActionToClass); + } forEach _subActions; + + // Add inventory context menu option to consume items + ["ACE_ItemCore", ["CONTAINER"], LSTRING(EatDrink), [], QPATHTOF(ui\icon_survival.paa), + [ + {true}, + { + params ["", "", "_item"]; + + XGVAR(enabled) && { + private _config = configFile >> "CfgWeapons" >> _item; + getNumber (_config >> QXGVAR(thirstQuenched)) > 0 + || {getNumber (_config >> QXGVAR(hungerSatiated)) > 0} + } + } + ], + { + params ["_unit", "", "_item"]; + [objNull, _unit, _item] call FUNC(consumeItem); + false + } + ] call CBA_fnc_addItemContextMenuOption; + + // Add water source helpers when interaction menu is opened + ["ace_interactMenuOpened", {call FUNC(addWaterSourceInteractions)}] call CBA_fnc_addEventHandler; + + // Add status modifiers + if (["ace_medical"] call EFUNC(common,isModLoaded)) then { + [0, { + if (_this getVariable [QEGVAR(medical,isBleeding), false]) exitWith { + 0.5 + }; + -1 * count (_this getVariable [QEGVAR(medical,ivBags), []]); + }] call FUNC(addStatusModifier); + }; + + if (["ace_weather"] call EFUNC(common,isModLoaded)) then { + [0, { + linearConversion [40, 60, missionNamespace getVariable [QEGVAR(weather,currentTemperature), 25], 0, 1.5, true]; + }] call FUNC(addStatusModifier); + }; + + if (["ace_dragging"] call EFUNC(common,isModLoaded)) then { + [2, { + if (_this getVariable [QEGVAR(dragging,isDragging), false] || {_this getVariable [QEGVAR(dragging,isCarrying), false]}) exitWith { + 1 + }; + 0 + }] call FUNC(addStatusModifier); + }; + + // Handle returning to normal transparency once interaction menu is closed + GVAR(hudInteractionHover) = false; + + ["ace_interactMenuClosed", { + GVAR(hudInteractionHover) = false; + }] call CBA_fnc_addEventHandler; + + // Add respawn eventhandler to reset necessary variables, done through script so only added if field rations is enabled + ["CAManBase", "respawn", LINKFUNC(handleRespawn)] call CBA_fnc_addClassEventHandler; + + // Start update loop + [FUNC(update), CBA_missionTime + MP_SYNC_INTERVAL, 1] call CBA_fnc_waitAndExecute; + + #ifdef DEBUG_MODE_FULL + ["ACE_player thirst", {ACE_player getVariable [QXGVAR(thirst), 0]}, [true, 0, 100]] call EFUNC(common,watchVariable); + ["ACE_player hunger", {ACE_player getVariable [QXGVAR(hunger), 0]}, [true, 0, 100]] call EFUNC(common,watchVariable); + #endif +}] call CBA_fnc_addEventHandler; diff --git a/addons/field_rations/XEH_preInit.sqf b/addons/field_rations/XEH_preInit.sqf new file mode 100644 index 0000000000..c4efb567ed --- /dev/null +++ b/addons/field_rations/XEH_preInit.sqf @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#include "initSettings.sqf" + +// Init arrays of status modifiers +GVAR(thirstModifiers) = []; +GVAR(hungerModifiers) = []; + +private _cache = call (uiNamespace getVariable [QGVAR(cacheP3Ds), {ERROR("no cache")}]); // cache built at preStart +// List of p3d water sources (case sensitive) for objects that report `typeOf == ""` +GVAR(waterSourceP3Ds) = _cache select 0; +// List of refill action offsets corresponding to the p3ds in the array above +GVAR(waterSourceOffsets) = _cache select 1; + +ADDON = true; diff --git a/addons/field_rations/XEH_preStart.sqf b/addons/field_rations/XEH_preStart.sqf new file mode 100644 index 0000000000..eec59ff8f7 --- /dev/null +++ b/addons/field_rations/XEH_preStart.sqf @@ -0,0 +1,32 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" + +// List of p3d water sources (case sensitive) for objects that report `typeOf == ""` +private _waterSourceP3Ds = [ + "misc_wellpump.p3d" // [11899, 9150, 0] on chenarus +]; + +// List of refill action offsets corresponding to the p3ds in the array above +private _waterSourceOffsets = [ + [0, 0, 0] +]; + +// Fill water source arrays from CfgVehicles +{ + private _split = (getText (_x >> "model")) splitString "\"; + private _string = toLower (_split param [((count _split) - 1), ""]); + + // Append extension if necessary + if ((_string select [count _string - 4]) != ".p3d") then { + _string = _string + ".p3d" + }; + + private _index = _waterSourceP3Ds pushBackUnique _string; + if (_index != -1) then { + _waterSourceOffsets pushBack ([_x >> QXGVAR(offset), "ARRAY", [0, 0, 0]] call CBA_fnc_getConfigEntry); + }; +} forEach (QUOTE(isNumber (_x >> 'XGVAR(waterSupply)') && {(getNumber (_x >> 'XGVAR(waterSupply)')) != REFILL_WATER_DISABLED}) configClasses (configFile >> "CfgVehicles")); + +uiNamespace setVariable [QGVAR(cacheP3Ds), compileFinal str [_waterSourceP3Ds, _waterSourceOffsets]]; +TRACE_1("compiled",count _waterSourceP3Ds); diff --git a/addons/field_rations/anim/drink_crouch.rtm b/addons/field_rations/anim/drink_crouch.rtm new file mode 100644 index 0000000000..4d8930355a Binary files /dev/null and b/addons/field_rations/anim/drink_crouch.rtm differ diff --git a/addons/field_rations/anim/drink_crouch_can.rtm b/addons/field_rations/anim/drink_crouch_can.rtm new file mode 100644 index 0000000000..bed20d6392 Binary files /dev/null and b/addons/field_rations/anim/drink_crouch_can.rtm differ diff --git a/addons/field_rations/anim/drink_prone.rtm b/addons/field_rations/anim/drink_prone.rtm new file mode 100644 index 0000000000..6c3eb26ccc Binary files /dev/null and b/addons/field_rations/anim/drink_prone.rtm differ diff --git a/addons/field_rations/anim/drink_prone_can.rtm b/addons/field_rations/anim/drink_prone_can.rtm new file mode 100644 index 0000000000..150cae95e5 Binary files /dev/null and b/addons/field_rations/anim/drink_prone_can.rtm differ diff --git a/addons/field_rations/anim/drink_source.rtm b/addons/field_rations/anim/drink_source.rtm new file mode 100644 index 0000000000..dcbf78800a Binary files /dev/null and b/addons/field_rations/anim/drink_source.rtm differ diff --git a/addons/field_rations/anim/drink_source_high.rtm b/addons/field_rations/anim/drink_source_high.rtm new file mode 100644 index 0000000000..8053834a85 Binary files /dev/null and b/addons/field_rations/anim/drink_source_high.rtm differ diff --git a/addons/field_rations/anim/drink_source_low.rtm b/addons/field_rations/anim/drink_source_low.rtm new file mode 100644 index 0000000000..a97e9373b3 Binary files /dev/null and b/addons/field_rations/anim/drink_source_low.rtm differ diff --git a/addons/field_rations/anim/drink_source_squat.rtm b/addons/field_rations/anim/drink_source_squat.rtm new file mode 100644 index 0000000000..574c4e1f16 Binary files /dev/null and b/addons/field_rations/anim/drink_source_squat.rtm differ diff --git a/addons/field_rations/anim/drink_source_squat_high.rtm b/addons/field_rations/anim/drink_source_squat_high.rtm new file mode 100644 index 0000000000..b91cf4d2a9 Binary files /dev/null and b/addons/field_rations/anim/drink_source_squat_high.rtm differ diff --git a/addons/field_rations/anim/drink_source_squat_low.rtm b/addons/field_rations/anim/drink_source_squat_low.rtm new file mode 100644 index 0000000000..33e71498c3 Binary files /dev/null and b/addons/field_rations/anim/drink_source_squat_low.rtm differ diff --git a/addons/field_rations/anim/drink_stand.rtm b/addons/field_rations/anim/drink_stand.rtm new file mode 100644 index 0000000000..005399a79d Binary files /dev/null and b/addons/field_rations/anim/drink_stand.rtm differ diff --git a/addons/field_rations/anim/drink_stand_can.rtm b/addons/field_rations/anim/drink_stand_can.rtm new file mode 100644 index 0000000000..c68a6ba5e2 Binary files /dev/null and b/addons/field_rations/anim/drink_stand_can.rtm differ diff --git a/addons/field_rations/anim/model.cfg b/addons/field_rations/anim/model.cfg new file mode 100644 index 0000000000..0359a94284 --- /dev/null +++ b/addons/field_rations/anim/model.cfg @@ -0,0 +1,124 @@ +class cfgSkeletons +{ + class OFP2_ManSkeleton + { + isDiscrete = 0; + skeletonInherit = ""; + SkeletonBones[]= + { + "Pelvis","", + "Spine","Pelvis", + "Spine1","Spine", + "Spine2","Spine1", + "Spine3","Spine2", + "camera","Pelvis",// case has changed for arma3 + "weapon","Spine1", + "launcher","Spine1", + //Head skeleton in hierarchy + "Neck","Spine3", + "Neck1","Neck", + "Head","Neck1", + + //Left upper side + "LeftShoulder","Spine3", + "LeftArm","LeftShoulder", + "LeftArmRoll","LeftArm", + "LeftForeArm","LeftArmRoll", + "LeftForeArmRoll","LeftForeArm", + "LeftHand","LeftForeArmRoll", + "LeftHandRing","LeftHand", + "LeftHandRing1","LeftHandRing", + "LeftHandRing2","LeftHandRing1", + "LeftHandRing3","LeftHandRing2", + "LeftHandPinky1","LeftHandRing", + "LeftHandPinky2","LeftHandPinky1", + "LeftHandPinky3","LeftHandPinky2", + "LeftHandMiddle1","LeftHand", + "LeftHandMiddle2","LeftHandMiddle1", + "LeftHandMiddle3","LeftHandMiddle2", + "LeftHandIndex1","LeftHand", + "LeftHandIndex2","LeftHandIndex1", + "LeftHandIndex3","LeftHandIndex2", + "LeftHandThumb1","LeftHand", + "LeftHandThumb2","LeftHandThumb1", + "LeftHandThumb3","LeftHandThumb2", + //Right upper side + "RightShoulder","Spine3", + "RightArm","RightShoulder", + "RightArmRoll","RightArm", + "RightForeArm","RightArmRoll", + "RightForeArmRoll","RightForeArm", + "RightHand","RightForeArmRoll", + "RightHandRing","RightHand", + "RightHandRing1","RightHandRing", + "RightHandRing2","RightHandRing1", + "RightHandRing3","RightHandRing2", + "RightHandPinky1","RightHandRing", + "RightHandPinky2","RightHandPinky1", + "RightHandPinky3","RightHandPinky2", + "RightHandMiddle1","RightHand", + "RightHandMiddle2","RightHandMiddle1", + "RightHandMiddle3","RightHandMiddle2", + "RightHandIndex1","RightHand", + "RightHandIndex2","RightHandIndex1", + "RightHandIndex3","RightHandIndex2", + "RightHandThumb1","RightHand", + "RightHandThumb2","RightHandThumb1", + "RightHandThumb3","RightHandThumb2", + //Left lower side + "LeftUpLeg","Pelvis", + "LeftUpLegRoll","LeftUpLeg", + "LeftLeg","LeftUpLegRoll", + "LeftLegRoll","LeftLeg", + "LeftFoot","LeftLegRoll", + "LeftToeBase","LeftFoot", + //Right lower side + "RightUpLeg","Pelvis", + "RightUpLegRoll","RightUpLeg", + "RightLeg","RightUpLegRoll", + "RightLegRoll","RightLeg", + "RightFoot","RightLegRoll", + "RightToeBase","RightFoot", + + //New facial features arma3 only + "Face_Hub","Head", + "Face_Jawbone","Face_Hub", + "Face_Jowl","Face_Jawbone", + "Face_chopRight","Face_Jawbone", + "Face_chopLeft","Face_Jawbone", + "Face_LipLowerMiddle","Face_Jawbone", + "Face_LipLowerLeft","Face_Jawbone", + "Face_LipLowerRight","Face_Jawbone", + "Face_Chin","Face_Jawbone", + "Face_Tongue","Face_Jawbone", + "Face_CornerRight","Face_Hub", + "Face_CheekSideRight","Face_CornerRight", + "Face_CornerLeft","Face_Hub", + "Face_CheekSideLeft","Face_CornerLeft", + "Face_CheekFrontRight","Face_Hub", + "Face_CheekFrontLeft","Face_Hub", + "Face_CheekUpperRight","Face_Hub", + "Face_CheekUpperLeft","Face_Hub", + "Face_LipUpperMiddle","Face_Hub", + "Face_LipUpperRight","Face_Hub", + "Face_LipUpperLeft","Face_Hub", + "Face_NostrilRight","Face_Hub", + "Face_NostrilLeft","Face_Hub", + "Face_Forehead","Face_Hub", + "Face_BrowFrontRight","Face_Forehead", + "Face_BrowFrontLeft","Face_Forehead", + "Face_BrowMiddle","Face_Forehead", + "Face_BrowSideRight","Face_Forehead", + "Face_BrowSideLeft","Face_Forehead", + "Face_Eyelids","Face_Hub", + "Face_EyelidUpperRight","Face_Hub", + "Face_EyelidUpperLeft","Face_Hub", + "Face_EyelidLowerRight","Face_Hub", + "Face_EyelidLowerLeft","Face_Hub", + "EyeLeft","Face_Hub", + "EyeRight","Face_Hub" + };// end of skeleton array + // location of pivot points (local axes) for hierarchical animation + pivotsModel="A3\anims_f\data\skeleton\SkeletonPivots.p3d"; + }; +}; diff --git a/addons/field_rations/config.cpp b/addons/field_rations/config.cpp new file mode 100644 index 0000000000..d7acbb66b1 --- /dev/null +++ b/addons/field_rations/config.cpp @@ -0,0 +1,64 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = { + "ACE_WaterBottle_Item", + "ACE_WaterBottle_Half_Item", + "ACE_WaterBottle_Empty_Item", + "ACE_Canteen_Item", + "ACE_Canteen_Half_Item", + "ACE_Canteen_Empty_Item", + "ACE_Can_Spirit_Item", + "ACE_Can_Franta_Item", + "ACE_Can_RedGull_Item", + "ACE_MRE_LambCurry_Item", + "ACE_MRE_BeefStew_Item", + "ACE_MRE_CreamTomatoSoup_Item", + "ACE_MRE_CreamChickenSoup_Item", + "ACE_MRE_ChickenTikkaMasala_Item", + "ACE_MRE_SteakVegetables_Item", + "ACE_MRE_MeatballsPasta_Item", + "ACE_MRE_ChickenHerbDumplings_Item", + "ACE_Humanitarian_Ration_Item" + }; + weapons[] = { + "ACE_WaterBottle", + "ACE_WaterBottle_Half", + "ACE_WaterBottle_Empty", + "ACE_Canteen", + "ACE_Canteen_Half", + "ACE_Canteen_Empty", + "ACE_Can_Spirit", + "ACE_Can_Franta", + "ACE_Can_RedGull", + "ACE_MRE_LambCurry", + "ACE_MRE_BeefStew", + "ACE_MRE_CreamTomatoSoup", + "ACE_MRE_CreamChickenSoup", + "ACE_MRE_ChickenTikkaMasala", + "ACE_MRE_SteakVegetables", + "ACE_MRE_MeatballsPasta", + "ACE_MRE_ChickenHerbDumplings", + "ACE_Humanitarian_Ration" + }; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interact_menu"}; + author = ECSTRING(common,ACETeam); + authors[] = {"mharis001", "Glowbal", "PabstMirror"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; + + BWC_CONFIG(XADDON); +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "CfgSounds.hpp" +#include "CfgMoves.hpp" +#include "Cfg3DEN.hpp" +#include "RscTitles.hpp" +#include "CfgUIGrids.hpp" diff --git a/addons/field_rations/data/mre.rvmat b/addons/field_rations/data/mre.rvmat new file mode 100644 index 0000000000..296e544f1f --- /dev/null +++ b/addons/field_rations/data/mre.rvmat @@ -0,0 +1,28 @@ +ambient[] = {1,1,1,1}; +diffuse[] = {0.5,0.5,0.5,1}; +forcedDiffuse[] = {0.5,0.5,0.5,0}; +emmisive[] = {0,0,0,1}; +specular[] = {0.30000001,0.30000001,0.30000001,0}; +specularPower = 17; +PixelShaderID = "NormalMapSpecularDIMap"; +VertexShaderID = "NormalMap"; +class Stage1 { + texture = "z\ace\addons\field_rations\data\mre_nohq.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; +class Stage2 { + texture = "z\ace\addons\field_rations\data\mre_smdi.paa"; + uvSource = "tex"; + class uvTransform { + aside[] = {1,0,0}; + up[] = {0,1,0}; + dir[] = {0,0,1}; + pos[] = {0,0,0}; + }; +}; diff --git a/addons/field_rations/data/mre_human.p3d b/addons/field_rations/data/mre_human.p3d new file mode 100644 index 0000000000..089b90bd55 Binary files /dev/null and b/addons/field_rations/data/mre_human.p3d differ diff --git a/addons/field_rations/data/mre_human_co.paa b/addons/field_rations/data/mre_human_co.paa new file mode 100644 index 0000000000..e713006bb3 Binary files /dev/null and b/addons/field_rations/data/mre_human_co.paa differ diff --git a/addons/field_rations/data/mre_nohq.paa b/addons/field_rations/data/mre_nohq.paa new file mode 100644 index 0000000000..6972636a3d Binary files /dev/null and b/addons/field_rations/data/mre_nohq.paa differ diff --git a/addons/field_rations/data/mre_smdi.paa b/addons/field_rations/data/mre_smdi.paa new file mode 100644 index 0000000000..f450605958 Binary files /dev/null and b/addons/field_rations/data/mre_smdi.paa differ diff --git a/addons/field_rations/data/mre_type1.p3d b/addons/field_rations/data/mre_type1.p3d new file mode 100644 index 0000000000..f65c2ec3e3 Binary files /dev/null and b/addons/field_rations/data/mre_type1.p3d differ diff --git a/addons/field_rations/data/mre_type1_co.paa b/addons/field_rations/data/mre_type1_co.paa new file mode 100644 index 0000000000..27c94eaf2b Binary files /dev/null and b/addons/field_rations/data/mre_type1_co.paa differ diff --git a/addons/field_rations/data/mre_type2.p3d b/addons/field_rations/data/mre_type2.p3d new file mode 100644 index 0000000000..aa322a3d92 Binary files /dev/null and b/addons/field_rations/data/mre_type2.p3d differ diff --git a/addons/field_rations/data/mre_type3.p3d b/addons/field_rations/data/mre_type3.p3d new file mode 100644 index 0000000000..457ed0e878 Binary files /dev/null and b/addons/field_rations/data/mre_type3.p3d differ diff --git a/addons/field_rations/data/mre_type3_co.paa b/addons/field_rations/data/mre_type3_co.paa new file mode 100644 index 0000000000..367f7e7c9e Binary files /dev/null and b/addons/field_rations/data/mre_type3_co.paa differ diff --git a/addons/field_rations/data/mre_type4.p3d b/addons/field_rations/data/mre_type4.p3d new file mode 100644 index 0000000000..257d5b7b83 Binary files /dev/null and b/addons/field_rations/data/mre_type4.p3d differ diff --git a/addons/field_rations/data/mre_type4_co.paa b/addons/field_rations/data/mre_type4_co.paa new file mode 100644 index 0000000000..34a674c4c0 Binary files /dev/null and b/addons/field_rations/data/mre_type4_co.paa differ diff --git a/addons/field_rations/data/mre_type5.p3d b/addons/field_rations/data/mre_type5.p3d new file mode 100644 index 0000000000..4412262c47 Binary files /dev/null and b/addons/field_rations/data/mre_type5.p3d differ diff --git a/addons/field_rations/data/mre_type6.p3d b/addons/field_rations/data/mre_type6.p3d new file mode 100644 index 0000000000..b2d34d9901 Binary files /dev/null and b/addons/field_rations/data/mre_type6.p3d differ diff --git a/addons/field_rations/data/mre_type6_co.paa b/addons/field_rations/data/mre_type6_co.paa new file mode 100644 index 0000000000..87e97ea62f Binary files /dev/null and b/addons/field_rations/data/mre_type6_co.paa differ diff --git a/addons/field_rations/functions/fnc_addStatusModifier.sqf b/addons/field_rations/functions/fnc_addStatusModifier.sqf new file mode 100644 index 0000000000..adeaadd07b --- /dev/null +++ b/addons/field_rations/functions/fnc_addStatusModifier.sqf @@ -0,0 +1,30 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Adds a status modifier. Should be called on all machines. + * Code must return a NUMBER which will be applied additively with other status changes. + * + * Arguments: + * 0: Status to modify (0 - Thirst, 1 - Hunger, 2 - Both) + * 1: Code (is passed the unit ) + * + * Return Value: + * None + * + * Example: + * [0, {}] call ace_field_rations_fnc_addStatusModifier + * + * Public: Yes + */ + +params [["_type", -1, [0]], ["_code", {}, [{}]]]; + +if (_type isEqualTo -1 || {_code isEqualTo {}}) exitWith {}; + +if (_type isEqualTo 2) then { + GVAR(thirstModifiers) pushBack _code; + GVAR(hungerModifiers) pushBack _code; +} else { + private _modifierArray = [GVAR(thirstModifiers), GVAR(hungerModifiers)] select _type; + _modifierArray pushBack _code; +}; diff --git a/addons/field_rations/functions/fnc_addWaterSourceInteractions.sqf b/addons/field_rations/functions/fnc_addWaterSourceInteractions.sqf new file mode 100644 index 0000000000..0d320b0610 --- /dev/null +++ b/addons/field_rations/functions/fnc_addWaterSourceInteractions.sqf @@ -0,0 +1,68 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror, mharis001 + * Dynamically adds actions to nearby water sources when interact_menu is opened. + * Called by the "ace_interactMenuOpened" event. + * + * Arguments: + * Interact Menu Type (0 - World, 1 - Self) + * + * Return Value: + * None + * + * Example: + * [0] call ace_field_rations_fnc_addWaterSourceInteractions + * + * Public: No + */ + +params ["_interactionType"]; + +// Ignore when self-interaction, mounted vehicle interaction, or water source actions are disabled +if ( + _interactionType != 0 + || {vehicle ACE_player != ACE_player} + || {XGVAR(waterSourceActions) == 0} +) exitWith {}; + +TRACE_1("Starting interact PFH",_interactionType); + +[{ + BEGIN_COUNTER(interactEH); + params ["_args", "_pfhID"]; + _args params ["_setPosition", "_addedHelpers", "_sourcesHelped"]; + + if (!EGVAR(interact_menu,keyDown)) then { + TRACE_1("Ending interact PFH",_pfhID); + {detach _x; deleteVehicle _x} forEach _addedHelpers; + [_pfhID] call CBA_fnc_removePerFrameHandler; + } else { + // Prevent rare error when ending mission with interact key down + if (isNull ACE_player) exitWith {}; + + // Rescan if player has moved more than 5 meters from last position + if (getPosASL ACE_player distanceSqr _setPosition > 25) then { + BEGIN_COUNTER(updatePosition); + { + if (!(_x in _sourcesHelped) && {XGVAR(terrainObjectActions) || {!(_x call CBA_fnc_isTerrainObject)}}) then { + private _waterRemaining = [_x] call FUNC(getRemainingWater); + + if (_waterRemaining != REFILL_WATER_DISABLED) then { + private _offset = [_x] call FUNC(getActionOffset); + private _helper = QGVAR(helper) createVehicleLocal [0, 0, 0]; + _helper setVariable [QGVAR(waterSource), _x]; + _helper attachTo [_x, _offset]; + + _addedHelpers pushBack _helper; + _sourcesHelped pushBack _x; + TRACE_3("Added interaction helper",_x,typeOf _x,_waterRemaining); + }; + }; + } forEach nearestObjects [ACE_player, [], 15]; + + _args set [0, getPosASL ACE_player]; + END_COUNTER(updatePosition); + }; + }; + END_COUNTER(interactEH); +}, 0.5, [getPosASL ACE_player vectorAdd [-100, 0, 0], [], []]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/field_rations/functions/fnc_canDrinkFromSource.sqf b/addons/field_rations/functions/fnc_canDrinkFromSource.sqf new file mode 100644 index 0000000000..7ef256f4be --- /dev/null +++ b/addons/field_rations/functions/fnc_canDrinkFromSource.sqf @@ -0,0 +1,24 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Checks if the player can drink directly from the given water source. + * + * Arguments: + * 0: Player + * 1: Water Source + * + * Return Value: + * Can Drink From Source + * + * Example: + * [_player, _source] call ace_field_rations_canDrinkFromSource + * + * Public: No + */ + +params ["_player", "_source"]; + +XGVAR(waterSourceActions) == 2 && { + private _water = _source call FUNC(getRemainingWater); + _water == REFILL_WATER_INFINITE || {_water >= DRINK_FROM_SOURCE_AMOUNT} +} diff --git a/addons/field_rations/functions/fnc_canRefillItem.sqf b/addons/field_rations/functions/fnc_canRefillItem.sqf new file mode 100644 index 0000000000..13a859337f --- /dev/null +++ b/addons/field_rations/functions/fnc_canRefillItem.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror + * Checks whether the player can refill an item from given water source. + * + * Arguments: + * 0: Water source + * 1: Player + * 2: Item classname + * + * Return Value: + * Can refill item + * + * Example: + * [_source, _player, "ACE_WaterBottle_Empty"] call ace_field_rations_fnc_canRefillItem + * + * Public: No + */ + +params ["_source", "_player", "_item"]; + +alive _source +&& {XGVAR(waterSourceActions) != 0} +&& {_item in (_player call EFUNC(common,uniqueItems))} +&& { + private _water = _source call FUNC(getRemainingWater); + _water == REFILL_WATER_INFINITE || {_water >= getNumber (configFile >> "CfgWeapons" >> _item >> QXGVAR(refillAmount))} +} diff --git a/addons/field_rations/functions/fnc_checkWater.sqf b/addons/field_rations/functions/fnc_checkWater.sqf new file mode 100644 index 0000000000..97ffade604 --- /dev/null +++ b/addons/field_rations/functions/fnc_checkWater.sqf @@ -0,0 +1,38 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Displays the remaining water in the given water source. + * + * Arguments: + * 0: Player + * 1: Water source + * + * Return Value: + * None + * + * Example: + * [_player, _source] call ace_field_rations_fnc_checkWater + * + * Public: No + */ + +params ["_player", "_source"]; + +[ + CHECK_WATER_TIME, + [_player, _source], + { + params ["_args"]; + _args params ["_player", "_source"]; + + private _water = _source call FUNC(getRemainingWater); + + if (_water > 0) then { + [[LSTRING(RemainingWater), _water], 1.5, _player] call EFUNC(common,displayTextStructured); + } else { + [LSTRING(NoWaterRemaining), 1.5, _player] call EFUNC(common,displayTextStructured); + }; + }, + {}, + LLSTRING(CheckingWater) +] call EFUNC(common,progressBar); diff --git a/addons/field_rations/functions/fnc_consumeItem.sqf b/addons/field_rations/functions/fnc_consumeItem.sqf new file mode 100644 index 0000000000..8e727e75a2 --- /dev/null +++ b/addons/field_rations/functions/fnc_consumeItem.sqf @@ -0,0 +1,146 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror + * Consumes an item. Creates a progress bar and handles relevant thirst/hunger values. + * + * Arguments: + * 0: Target (not used) + * 1: Player + * 2: Item classname + * + * Return Value: + * None + * + * Example: + * [objNull, ACE_player, "ACE_WaterBottle"] call ace_field_rations_fnc_consumeItem + * + * Public: No + */ + +params ["", "_player", "_consumeItem"]; +TRACE_2("Consume item started",_player,_consumeItem); + +private _config = configFile >> "CfgWeapons" >> _consumeItem; + +// Get consume time for item +private _consumeTime = getNumber (_config >> QXGVAR(consumeTime)); + +// Get restored values and replacement item +private _thirstQuenched = XGVAR(thirstQuenched) * getNumber (_config >> QXGVAR(thirstQuenched)); +private _hungerSatiated = XGVAR(hungerSatiated) * getNumber (_config >> QXGVAR(hungerSatiated)); +private _replacementItem = getText (_config >> QXGVAR(replacementItem)); + +// Create consume text for item +private _displayName = getText (_config >> "displayName"); +private _consumeText = getText (_config >> QXGVAR(consumeText)); + +if (_consumeText == "") then { + _consumeText = if (_hungerSatiated > 0) then { + LLSTRING(EatingX); + } else { + LLSTRING(DrinkingX); + }; +}; + +// Format displayName onto consume text +// Allows for common strings to be used for multiple items +_consumeText = format [_consumeText, _displayName]; + +// Get consume animation and sound for item +private _stanceIndex = ["STAND", "CROUCH", "PRONE"] find stance _player; + +// Handle in vehicle when stance is UNDEFINED +if (vehicle _player != _player) then {_stanceIndex = 0}; + +private _consumeAnim = getArray (_config >> QXGVAR(consumeAnims)) param [_stanceIndex, "", [""]]; +private _consumeSound = getArray (_config >> QXGVAR(consumeSounds)) param [_stanceIndex, "", [""]]; + +private _soundPlayed = if (_consumeAnim != "" && {vehicle _player == _player && {!(_player call EFUNC(common,isSwimming))}}) then { + // Store current animation for resetting + _player setVariable [QGVAR(previousAnim), animationState _player]; + [_player, _consumeAnim, 1] call EFUNC(common,doAnimation); + false +} else { + // No animation to sync sound to + if (_consumeSound != "") then { + playSound _consumeSound; + }; + true +}; + +private _fnc_onSuccess = { + params ["_args"]; + _args params ["_player", "_consumeItem", "_replacementItem", "_thirstQuenched", "_hungerSatiated"]; + TRACE_1("Consume item successful",_args); + + // Remove consumed item + _player removeItem _consumeItem; + + // Add replacement item if needed + if (_replacementItem != "") then { + [_player, _replacementItem] call EFUNC(common,addToInventory); + }; + + // Handle thirst and hunger values + if (_thirstQuenched > 0) then { + private _thirst = _player getVariable [QXGVAR(thirst), 0]; + _player setVariable [QXGVAR(thirst), (_thirst - _thirstQuenched) max 0]; + }; + + if (_hungerSatiated > 0) then { + private _hunger = _player getVariable [QXGVAR(hunger), 0]; + _player setVariable [QXGVAR(hunger), (_hunger - _hungerSatiated) max 0]; + }; + + ["acex_rationConsumed", [_player, _consumeItem, _replacementItem, _thirstQuenched, _hungerSatiated]] call CBA_fnc_localEvent; + + _player setVariable [QGVAR(previousAnim), nil]; +}; + +private _fnc_onFailure = { + params ["_args"]; + _args params ["_player"]; + TRACE_1("Consume item failed",_args); + + // Reset animation if needed + if (vehicle _player == _player && {!(_player call EFUNC(common,isSwimming))}) then { + private _previousAnim = _player getVariable [QGVAR(previousAnim), ""]; + if (_previousAnim != "") then { + [_player, _previousAnim, 2] call EFUNC(common,doAnimation); + }; + }; + + _player setVariable [QGVAR(previousAnim), nil]; +}; + +private _fnc_condition = { + params ["_args"]; + _args params ["_player", "_consumeItem", "", "", "", "_consumeAnim", "_consumeSound", "_soundPlayed"]; + + // Attempt to sync sound with animation start + if (!_soundPlayed && {_consumeSound != "" && {_consumeAnim == "" || {animationState _player == _consumeAnim}}}) then { + playSound _consumeSound; + _args set [7, true]; + }; + + _consumeItem in (_player call EFUNC(common,uniqueItems)) +}; + +[ + _consumeTime, + [ + _player, + _consumeItem, + _replacementItem, + _thirstQuenched, + _hungerSatiated, + _consumeAnim, + _consumeSound, + _soundPlayed + ], + _fnc_onSuccess, + _fnc_onFailure, + _consumeText, + _fnc_condition, + ["isNotInside"] +] call EFUNC(common,progressBar); diff --git a/addons/field_rations/functions/fnc_drinkFromSource.sqf b/addons/field_rations/functions/fnc_drinkFromSource.sqf new file mode 100644 index 0000000000..e4a2c3ff67 --- /dev/null +++ b/addons/field_rations/functions/fnc_drinkFromSource.sqf @@ -0,0 +1,80 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Makes the player drink directly from the given water source. + * + * Arguments: + * 0: Player + * 1: Water Source + * + * Return Value: + * None + * + * Example: + * [_player, _source] call ace_field_rations_drinkFromSource + * + * Public: No + */ + +params ["_player", "_source"]; + +// Store current animation for resetting +_player setVariable [QGVAR(previousAnim), animationState _player]; + +private _animation = [_player, _source] call FUNC(getDrinkAnimation); +[_player, _animation, 1] call EFUNC(common,doAnimation); + +private _fnc_onSuccess = { + params ["_args"]; + _args params ["_player", "_source"]; + + // Reduce player thirst + private _thirst = _player getVariable [QXGVAR(thirst), 0]; + _player setVariable [QXGVAR(thirst), (_thirst - (DRINK_FROM_SOURCE_QUENCHED * XGVAR(thirstQuenched))) max 0]; + _player setVariable [QGVAR(previousAnim), nil]; + + // Update remaining water in source + private _waterInSource = _source call FUNC(getRemainingWater); + + if (_waterInSource != REFILL_WATER_INFINITE) then { + [_source, (_waterInSource - DRINK_FROM_SOURCE_AMOUNT) max 0] call FUNC(setRemainingWater); + }; +}; + +private _fnc_onFailure = { + params ["_args"]; + _args params ["_player"]; + + // Reset animation if needed + if (vehicle _player == _player && {!(_player call EFUNC(common,isSwimming))}) then { + private _previousAnim = _player getVariable [QGVAR(previousAnim), ""]; + if (_previousAnim != "") then { + [_player, _previousAnim, 2] call EFUNC(common,doAnimation); + }; + }; + + _player setVariable [QGVAR(previousAnim), nil]; +}; + +private _fnc_condition = { + params ["_args"]; + _args params ["_player", "_source"]; + + [_player, _source] call FUNC(canDrinkFromSource) +}; + +private _sourceType = typeOf _source; +private _progressText = if (_sourceType == "") then { + LLSTRING(DrinkingFromSource) +} else { + format [LLSTRING(DrinkingFromX), getText (configFile >> "CfgVehicles" >> _sourceType >> "displayName")] +}; + +[ + DRINK_FROM_SOURCE_TIME, + [_player, _source], + _fnc_onSuccess, + _fnc_onFailure, + _progressText, + _fnc_condition +] call EFUNC(common,progressBar); diff --git a/addons/field_rations/functions/fnc_getActionOffset.sqf b/addons/field_rations/functions/fnc_getActionOffset.sqf new file mode 100644 index 0000000000..f8cc392660 --- /dev/null +++ b/addons/field_rations/functions/fnc_getActionOffset.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Returns the refill action offset for given object. + * + * Arguments: + * 0: Water source + * + * Return Value: + * Action offset + * + * Example: + * [cursorObject] call ace_field_rations_fnc_getActionOffset + * + * Public: No + */ + +params ["_object"]; + +private _typeOf = typeOf _object; +if (_typeOf != "") then { + // Check for offset in config since we have valid typeOf + private _offset = getArray (configFile >> "CfgVehicles" >> _typeOf >> QXGVAR(offset)); + if (_offset isEqualTo []) then {[0, 0, 0]} else {_offset}; +} else { + // Check for offset corresponding to p3d list + GVAR(waterSourceOffsets) param [GVAR(waterSourceP3ds) find (getModelInfo _object select 0), [0, 0, 0], [[]]]; +}; diff --git a/addons/field_rations/functions/fnc_getConsumableChildren.sqf b/addons/field_rations/functions/fnc_getConsumableChildren.sqf new file mode 100644 index 0000000000..9d9dc8d62a --- /dev/null +++ b/addons/field_rations/functions/fnc_getConsumableChildren.sqf @@ -0,0 +1,41 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror + * Returns children actions for consumable items in player's inventory. + * + * Arguments: + * 0: Player + * + * Return Value: + * Actions + * + * Example: + * [_player] call ace_field_rations_fnc_getConsumableChildren + * + * Public: No + */ + +params ["_player"]; + +private _fnc_getActions = { + TRACE_1("Creating consumable item actions",_player); + + private _actions = []; + private _cfgWeapons = configFile >> "CfgWeapons"; + + { + private _config = _cfgWeapons >> _x; + if (getNumber (_config >> QXGVAR(thirstQuenched)) > 0 || {getNumber (_config >> QXGVAR(hungerSatiated)) > 0}) then { + private _displayName = getText (_config >> "displayName"); + private _picture = getText (_config >> "picture"); + + // Exec next frame so closing interaction menu doesn't block progressBar + private _action = [_x, _displayName, _picture, {[FUNC(consumeItem), _this] call CBA_fnc_execNextFrame}, {true}, {}, _x] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _player]; + }; + } forEach (_player call EFUNC(common,uniqueItems)); + + _actions +}; + +[[], _fnc_getActions, _player, QGVAR(consumableActionsCache), 9999, "cba_events_loadoutEvent"] call EFUNC(common,cachedCall); diff --git a/addons/field_rations/functions/fnc_getDrinkAnimation.sqf b/addons/field_rations/functions/fnc_getDrinkAnimation.sqf new file mode 100644 index 0000000000..ae1befb7c6 --- /dev/null +++ b/addons/field_rations/functions/fnc_getDrinkAnimation.sqf @@ -0,0 +1,35 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Returns an appropriate animation for drinking directly from the given water source. + * + * Arguments: + * 0: Player + * 1: Water Source + * + * Return Value: + * Animation + * + * Example: + * [_player, _source] call ace_field_rations_getDrinkAnimation + * + * Public: No + */ + +params ["_player", "_source"]; + +private _offset = _source call FUNC(getActionOffset); +private _actionPos = _source modelToWorld _offset; +private _playerPos = _player modelToWorld [0, 0, 0]; + +private _difference = (_actionPos vectorDiff _playerPos) select 2; + +// Experimentally determined values to try to match height difference to different animations +switch (true) do { + case (_difference < 0.1): {QGVAR(drinkFromSourceSquatLow)}; + case (_difference < 0.4): {QGVAR(drinkFromSourceSquat)}; + case (_difference < 0.8): {QGVAR(drinkFromSourceSquatHigh)}; + case (_difference < 1.2): {QGVAR(drinkFromSourceLow)}; + case (_difference < 1.4): {QGVAR(drinkFromSource)}; + default {QGVAR(drinkFromSourceHigh)}; +}; diff --git a/addons/field_rations/functions/fnc_getRefillChildren.sqf b/addons/field_rations/functions/fnc_getRefillChildren.sqf new file mode 100644 index 0000000000..58d94637ac --- /dev/null +++ b/addons/field_rations/functions/fnc_getRefillChildren.sqf @@ -0,0 +1,38 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Returns children actions for refillable items in player's inventory for given water source. + * + * Arguments: + * 0: Water source + * 1: Player + * + * Return Value: + * Actions + * + * Example: + * [_source, _player] call ace_field_rations_fnc_getRefillChildren + * + * Public: No + */ + +params ["_source", "_player"]; + +// Exit if disabled or source has no water +private _water = _source call FUNC(getRemainingWater); +if (_water == 0 || {_water == REFILL_WATER_DISABLED}) exitWith {[]}; + +private _actions = []; +private _cfgWeapons = configFile >> "CfgWeapons"; + +{ + private _config = _cfgWeapons >> _x; + if (getText (_config >> QXGVAR(refillItem)) != "" && {_water == REFILL_WATER_INFINITE || {getNumber (_config >> QXGVAR(refillAmount)) <= _water}}) then { + private _displayName = format ["%1: %2", LLSTRING(Refill), getText (_config >> "displayName")]; + private _picture = getText (_config >> "picture"); + private _action = [_x, _displayName, _picture, FUNC(refillItem), FUNC(canRefillItem), {}, _x] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _source]; + }; +} forEach (_player call EFUNC(common,uniqueItems)); + +_actions diff --git a/addons/field_rations/functions/fnc_getRemainingWater.sqf b/addons/field_rations/functions/fnc_getRemainingWater.sqf new file mode 100644 index 0000000000..e2b2d56ed5 --- /dev/null +++ b/addons/field_rations/functions/fnc_getRemainingWater.sqf @@ -0,0 +1,44 @@ +#include "script_component.hpp" +/* + * Author: mharis001, PabstMirror + * Returns the remaining water in a source. + * + * Arguments: + * 0: Water source + * + * Return Value: + * Remaining water + * + * Example: + * [_source] call ace_field_rations_fnc_getRemainingWater + * + * Public: Yes + */ + +params [["_source", objNull, [objNull]]]; + +if (!alive _source) exitWith {0}; + +private _water = _source getVariable QGVAR(currentWaterSupply); + +if (isNil "_water") then { + private _typeOf = typeOf _source; + if (_typeOf != "") then { + // Check for waterSupply entry since we have valid typeOf + _water = getNumber (configFile >> "CfgVehicles" >> _typeOf >> QXGVAR(waterSupply)); + if (_water == 0) then {_water = REFILL_WATER_DISABLED}; + + if (_water != REFILL_WATER_DISABLED) then { + if (_source call CBA_fnc_isTerrainObject) then { + _water = REFILL_WATER_INFINITE; + } else { + _source setVariable [QGVAR(currentWaterSupply), _water, true]; + }; + }; + } else { + // Check the p3d name against list + _water = if ((getModelInfo _source select 0) in GVAR(waterSourceP3ds)) then {REFILL_WATER_INFINITE} else {REFILL_WATER_DISABLED}; + }; +}; + +_water diff --git a/addons/field_rations/functions/fnc_handleEffects.sqf b/addons/field_rations/functions/fnc_handleEffects.sqf new file mode 100644 index 0000000000..881414da48 --- /dev/null +++ b/addons/field_rations/functions/fnc_handleEffects.sqf @@ -0,0 +1,44 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror + * Handles the effects/consequences of high thirst/hunger. + * + * Arguments: + * 0: Player + * 1: Thirst + * 2: Hunger + * + * Return Value: + * None + * + * Example: + * [_player, _thirst, _hunger] call ace_field_rations_fnc_handleEffects + * + * Public: No + */ + +params ["_player", "_thirst", "_hunger"]; + +// Kill unit with max thirst or hunger +if ((_thirst > 99.9 || {_hunger > 99.9}) && {random 1 < 0.5}) exitWith { + if (["ace_medical"] call EFUNC(common,isModLoaded)) then { + [_player, "Hunger/Thirst empty"] call EFUNC(medical_status,setDead); + } else { + _player setDamage 1; + }; +}; + +// Exit if unit is not awake, below are animation based consequences +if !(_player call EFUNC(common,isAwake)) exitWith {}; + +// Set unit unconscious (chance based on how high thirst/hunger are) +if ((_thirst > 85 || {_hunger > 85}) && {random 1 < linearConversion [85, 100, _thirst max _hunger, 0.05, 0.1, true]}) exitWith { + if (["ace_medical"] call EFUNC(common,isModLoaded)) then { + [_player, true, 5, true] call EFUNC(medical,setUnconscious); + }; +}; + +// Make unit fall if moving fast +if ((_thirst > 93 || {_hunger > 93}) && {speed _player > 1} && {vehicle _player == _player}) exitWith { + [_player, "down"] call EFUNC(common,doGesture); +}; diff --git a/addons/field_rations/functions/fnc_handleHUD.sqf b/addons/field_rations/functions/fnc_handleHUD.sqf new file mode 100644 index 0000000000..2412d35432 --- /dev/null +++ b/addons/field_rations/functions/fnc_handleHUD.sqf @@ -0,0 +1,77 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Handles creating and updating the visuals of the HUD. + * + * Arguments: + * 0: Thirst (default: getVariable from ACE_player) + * 1: Hunger (default: getVariable from ACE_player) + * + * Return Value: + * None + * + * Example: + * [_thirst, _hunger] call ace_field_rations_fnc_handleHUD + * + * Public: No + */ + +params [["_thirst", ACE_player getVariable [QXGVAR(thirst), 0]], ["_hunger", ACE_player getVariable [QXGVAR(hunger), 0]]]; + +private _display = uiNamespace getVariable [QGVAR(hudDisplay), displayNull]; + +// Create HUD if display is null +if (isNull _display) then { + private _rscType = [QGVAR(hudColoredIcons), QGVAR(hudDrainingIcons)] select XGVAR(hudType); + QGVAR(hud) cutRsc [_rscType, "PLAIN", -1, false]; + _display = uiNamespace getVariable [QGVAR(hudDisplay), displayNull]; +}; + +if (XGVAR(hudType) == 0) then { + // Get HUD transparency based on setting + private _fade = if (XGVAR(hudTransparency) == -1) then { + linearConversion [0, 70, _thirst max _hunger, 1, 0, true]; + } else { + XGVAR(hudTransparency); + }; + + // Reduce transparency if hovering on interaction + if (GVAR(hudInteractionHover)) then { + _fade = _fade min 0.5; + }; + + // Update HUD icon colors (White -> Yellow -> Orange -> Red) + { + _x params ["_status", "_iconIDC"]; + + private _iconCtrl = _display displayCtrl _iconIDC; + private _color = [1, linearConversion [35, 90, _status, 1, 0, true], linearConversion [0, 40, _status, 1, 0, true], 1]; + _iconCtrl ctrlSetTextColor _color; + _iconCtrl ctrlSetFade _fade; + _iconCtrl ctrlCommit 1; + } forEach [ + [_thirst, IDC_COLORED_HUD_THIRST], + [_hunger, IDC_COLORED_HUD_HUNGER] + ]; +} else { + // Reposition controls group and icon to create draining effect + private _defaultY = profileNamespace getVariable [QUOTE(TRIPLES(IGUI,GVAR(grid),Y)), safeZoneY + safeZoneH - 2.2 * GUI_GRID_H]; + { + _x params ["_status", "_groupIDC", "_iconIDC"]; + + private _changeY = _status / 50 * GUI_GRID_H; + + private _groupCtrl = _display displayCtrl _groupIDC; + private _groupPos = ctrlPosition _groupCtrl; + _groupPos set [1, _defaultY + _changeY]; + _groupCtrl ctrlSetPosition _groupPos; + _groupCtrl ctrlCommit 0; + + private _iconCtrl = _display displayCtrl _iconIDC; + _iconCtrl ctrlSetPosition [0, -_changeY]; + _iconCtrl ctrlCommit 0; + } forEach [ + [_thirst, IDC_DRAINING_HUD_THIRST_GROUP, IDC_DRAINING_HUD_THIRST_ICON], + [_hunger, IDC_DRAINING_HUD_HUNGER_GROUP, IDC_DRAINING_HUD_HUNGER_ICON] + ]; +}; diff --git a/addons/field_rations/functions/fnc_handleRespawn.sqf b/addons/field_rations/functions/fnc_handleRespawn.sqf new file mode 100644 index 0000000000..9b9e3c374a --- /dev/null +++ b/addons/field_rations/functions/fnc_handleRespawn.sqf @@ -0,0 +1,25 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror + * Handles the respawning of a unit by resetting necessary variables. + * + * Arguments: + * 0: Unit + * 1: Corpse + * + * Return Value: + * None + * + * Example: + * [newUnit, oldUnit] call ace_field_rations_fnc_handleRespawn + * + * Public: No + */ + +params ["_unit", "_corpse"]; +TRACE_2("Handle Respawn",_unit,_corpse); + +if !(local _unit) exitWith {}; + +_unit setVariable [QXGVAR(thirst), 0]; +_unit setVariable [QXGVAR(hunger), 0]; diff --git a/addons/field_rations/functions/fnc_refillItem.sqf b/addons/field_rations/functions/fnc_refillItem.sqf new file mode 100644 index 0000000000..cea91f4e96 --- /dev/null +++ b/addons/field_rations/functions/fnc_refillItem.sqf @@ -0,0 +1,75 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror + * Refills an item from given water source. + * + * Arguments: + * 0: Water source + * 1: Player + * 2: Item classname + * + * Return Value: + * None + * + * Example: + * [_source, _player, "ACE_WaterBottle_Empty"] call ace_field_rations_fnc_refillItem + * + * Public: No + */ + +params ["_source", "_player", "_item"]; +TRACE_3("Item refill started",_source,_player,_item); + +private _config = configFile >> "CfgWeapons" >> _item; + +// Get config values for refill +private _refillItem = getText (_config >> QXGVAR(refillItem)); +private _refillAmount = getNumber (_config >> QXGVAR(refillAmount)); +private _refillTime = getNumber (_config >> QXGVAR(refillTime)); + +private _fnc_onSuccess = { + params ["_args"]; + _args params ["_source", "_player", "_item", "_refillItem", "_refillAmount"]; + TRACE_1("Refill item successful",_args); + + // Replace item with refilled one + _player removeItem _item; + [_player, _refillItem] call EFUNC(common,addToInventory); + + // Update remaining water in source + private _waterInSource = _source call FUNC(getRemainingWater); + if (_waterInSource != REFILL_WATER_INFINITE) then { + _waterInSource = (_waterInSource - _refillAmount) max 0; + [_source, _waterInSource] call FUNC(setRemainingWater); + }; + + ["acex_rationRefilled", [_source, _player, _item, _refillItem, _refillAmount]] call CBA_fnc_localEvent; + + // Show refilled item hint + private _picture = getText (configFile >> "CfgWeapons" >> _refillItem >> "picture"); + [LSTRING(ItemRefilled), _picture] call EFUNC(common,displayTextPicture); +}; + +private _fnc_onFailure = { + TRACE_1("Refill item failed",_this); +}; + +private _fnc_condition = { + params ["_args"]; + _args call FUNC(canRefillItem); +}; + +[ + _refillTime, + [ + _source, + _player, + _item, + _refillItem, + _refillAmount + ], + _fnc_onSuccess, + _fnc_onFailure, + LLSTRING(Refilling), + _fnc_condition +] call EFUNC(common,progressBar); diff --git a/addons/field_rations/functions/fnc_setRemainingWater.sqf b/addons/field_rations/functions/fnc_setRemainingWater.sqf new file mode 100644 index 0000000000..728a73c1e3 --- /dev/null +++ b/addons/field_rations/functions/fnc_setRemainingWater.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" +/* + * Author: mharis001, PabstMirror + * Sets the remaining water supply for given water source. + * + * Arguments: + * 0: Water source + * 1: Amount (-10 - Infinite, -1 - Disabled) + * + * Return Value: + * None + * + * Example: + * [_source, 1000] call ace_field_rations_fnc_setRemainingWater + * + * Public: Yes + */ + +params [["_source", objNull, [objNull]], ["_water", nil, [0]]]; + +if (!alive _source || {isNil "_water"}) exitWith {}; + +_source setVariable [QGVAR(currentWaterSupply), _water, true]; diff --git a/addons/field_rations/functions/fnc_update.sqf b/addons/field_rations/functions/fnc_update.sqf new file mode 100644 index 0000000000..8b289b12f7 --- /dev/null +++ b/addons/field_rations/functions/fnc_update.sqf @@ -0,0 +1,76 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror + * Main looping function that updates thirst/hunger status. + * + * Arguments: + * 0: Next MP sync + * + * Return Value: + * None + * + * Example: + * [60] call ace_field_rations_fnc_update + * + * Public: No + */ + +// 1 sec (update interval) * 100 (max thirst/hunger) / 3600 (sec in hour) = 0.02777778 +#define CHANGE_CONSTANT 0.02777778 + +params ["_nextMpSync"]; + +// Access global variable once +private _player = ACE_player; + +// Exit if player is not alive or a virtual unit +if (!alive _player || {_player isKindOf "VirtualMan_F"}) exitWith { + [FUNC(update), _nextMpSync, 1] call CBA_fnc_waitAndExecute; + QGVAR(hud) cutFadeOut 0.5; +}; + +// Get current thirst and hunger +private _thirst = _player getVariable [QXGVAR(thirst), 0]; +private _hunger = _player getVariable [QXGVAR(hunger), 0]; + +// Determine base change based on work multiplier +private _currentWork = 1; +if (vehicle _player == _player && {isTouchingGround _player}) then { + private _speed = vectorMagnitude velocity _player; + _currentWork = linearConversion [2, 7, _speed, 1, 2, true]; +}; + +private _thirstChange = _currentWork * CHANGE_CONSTANT / XGVAR(timeWithoutWater); +private _hungerChange = _currentWork * CHANGE_CONSTANT / XGVAR(timeWithoutFood); + +// Run status modifiers +{_thirstChange = _thirstChange + (_player call _x) * CHANGE_CONSTANT / XGVAR(timeWithoutWater)} forEach GVAR(thirstModifiers); +{_hungerChange = _hungerChange + (_player call _x) * CHANGE_CONSTANT / XGVAR(timeWithoutFood)} forEach GVAR(hungerModifiers); + +// Change thirst and hunger status +_thirst = _thirst + _thirstChange min 100 max 0; +_hunger = _hunger + _hungerChange min 100 max 0; + +// Check if we want to do a MP sync +private _doSync = false; + +if (CBA_missionTime >= _nextMpSync) then { + _doSync = true; + _nextMpSync = CBA_missionTime + MP_SYNC_INTERVAL; +}; + +// Set new thirst and hunger values +_player setVariable [QXGVAR(thirst), _thirst, _doSync]; +_player setVariable [QXGVAR(hunger), _hunger, _doSync]; + +// Handle any effects/consequences of high thirst or hunger +[_player, _thirst, _hunger] call FUNC(handleEffects); + +// Handle showing/updating or hiding of HUD +if (!EGVAR(common,OldIsCamera) && {_thirst > XGVAR(hudShowLevel) || {_hunger > XGVAR(hudShowLevel)} || {GVAR(hudInteractionHover)}}) then { + [_thirst, _hunger] call FUNC(handleHUD); +} else { + QGVAR(hud) cutFadeOut 0.5; +}; + +[FUNC(update), _nextMpSync, 1] call CBA_fnc_waitAndExecute; diff --git a/addons/field_rations/functions/script_component.hpp b/addons/field_rations/functions/script_component.hpp new file mode 100644 index 0000000000..3469a67426 --- /dev/null +++ b/addons/field_rations/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\field_rations\script_component.hpp" diff --git a/addons/field_rations/initSettings.sqf b/addons/field_rations/initSettings.sqf new file mode 100644 index 0000000000..86bf04aed2 --- /dev/null +++ b/addons/field_rations/initSettings.sqf @@ -0,0 +1,103 @@ +[ + QXGVAR(enabled), + "CHECKBOX", + [ELSTRING(common,Enabled), LSTRING(Enabled_Description)], + LSTRING(DisplayName), + false, + true, + {}, + true // Needs restart +] call CBA_fnc_addSetting; + +[ + QXGVAR(timeWithoutWater), + "SLIDER", + [LSTRING(TimeWithoutWater_DisplayName), LSTRING(TimeWithoutWater_Description)], + LSTRING(DisplayName), + [0.1, 168, 2, 1], + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(timeWithoutFood), + "SLIDER", + [LSTRING(TimeWithoutFood_DisplayName), LSTRING(TimeWithoutFood_Description)], + LSTRING(DisplayName), + [0.1, 504, 2, 1], + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(thirstQuenched), + "SLIDER", + [LSTRING(ThirstQuenched_DisplayName), LSTRING(ThirstQuenched_Description)], + LSTRING(DisplayName), + [0.1, 10, 1, 1], + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(hungerSatiated), + "SLIDER", + [LSTRING(HungerSatiated_DisplayName), LSTRING(HungerSatiated_Description)], + LSTRING(DisplayName), + [0.1, 10, 1, 1], + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(waterSourceActions), + "LIST", + [LSTRING(WaterSourceActions_DisplayName), LSTRING(WaterSourceActions_Description)], + LSTRING(DisplayName), + [[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(RefillOnly), ELSTRING(common,Enabled)], 2], + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(terrainObjectActions), + "CHECKBOX", + [LSTRING(TerrainObjectActions_DisplayName), LSTRING(TerrainObjectActions_Description)], + LSTRING(DisplayName), + true, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(affectAdvancedFatigue), + "CHECKBOX", + [LSTRING(AffectAdvancedFatigue_DisplayName), LSTRING(AffectAdvancedFatigue_Description)], + LSTRING(DisplayName), + true, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(hudType), + "LIST", + [LSTRING(HudType_DisplayName), LSTRING(HudType_Description)], + LSTRING(DisplayName), + [[0, 1], [LSTRING(ColoredIcons), LSTRING(DrainingIcons)], 0], + false, + { + QGVAR(hud) cutFadeOut 0; + } +] call CBA_fnc_addSetting; + +[ + QXGVAR(hudShowLevel), + "LIST", + [LSTRING(HudShowLevel_DisplayName), LSTRING(HudShowLevel_Description)], + LSTRING(DisplayName), + [[0, 10, 20, 30, 40, 50, 60, 70], [LSTRING(Always), "10%", "20%", "30%", "40%", "50%", "60%", "70%"], 0], + false +] call CBA_fnc_addSetting; + +[ + QXGVAR(hudTransparency), + "LIST", + [LSTRING(HudTransparency_DisplayName), LSTRING(HudTransparency_Description)], + LSTRING(DisplayName), + [[-1, 0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8], [LSTRING(Dynamic), "0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", 0], 0], + false +] call CBA_fnc_addSetting; diff --git a/addons/field_rations/script_component.hpp b/addons/field_rations/script_component.hpp new file mode 100644 index 0000000000..9811493029 --- /dev/null +++ b/addons/field_rations/script_component.hpp @@ -0,0 +1,35 @@ +#define COMPONENT field_rations +#define COMPONENT_BEAUTIFIED Field Rations +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_FIELD_RATIONS + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_FIELD_RATIONS + #define DEBUG_SETTINGS DEBUG_SETTINGS_FIELD_RATIONS +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#include "\a3\ui_f\hpp\defineCommonGrids.inc" + +#define MP_SYNC_INTERVAL (60 + random 60) + +#define REFILL_WATER_INFINITE -10 +#define REFILL_WATER_DISABLED -1 +#define CHECK_WATER_TIME 2 +#define DRINK_FROM_SOURCE_AMOUNT 1 +#define DRINK_FROM_SOURCE_QUENCHED 10 +#define DRINK_FROM_SOURCE_TIME 10 + +#define IDC_COLORED_HUD_THIRST 6740 +#define IDC_COLORED_HUD_HUNGER 6750 +#define IDC_DRAINING_HUD_THIRST_GROUP 7740 +#define IDC_DRAINING_HUD_THIRST_ICON 7750 +#define IDC_DRAINING_HUD_HUNGER_GROUP 7840 +#define IDC_DRAINING_HUD_HUNGER_ICON 7850 diff --git a/addons/field_rations/sounds/drink1.ogg b/addons/field_rations/sounds/drink1.ogg new file mode 100644 index 0000000000..eb27f1dda1 Binary files /dev/null and b/addons/field_rations/sounds/drink1.ogg differ diff --git a/addons/field_rations/sounds/drink2.ogg b/addons/field_rations/sounds/drink2.ogg new file mode 100644 index 0000000000..7266e478de Binary files /dev/null and b/addons/field_rations/sounds/drink2.ogg differ diff --git a/addons/field_rations/sounds/drink_can1.ogg b/addons/field_rations/sounds/drink_can1.ogg new file mode 100644 index 0000000000..ea91602284 Binary files /dev/null and b/addons/field_rations/sounds/drink_can1.ogg differ diff --git a/addons/field_rations/sounds/drink_can2.ogg b/addons/field_rations/sounds/drink_can2.ogg new file mode 100644 index 0000000000..d66e03f5fd Binary files /dev/null and b/addons/field_rations/sounds/drink_can2.ogg differ diff --git a/addons/field_rations/stringtable.xml b/addons/field_rations/stringtable.xml new file mode 100644 index 0000000000..33f487a99f --- /dev/null +++ b/addons/field_rations/stringtable.xml @@ -0,0 +1,1026 @@ + + + + + ACE Field Rations + ACE 戰地口糧 + ACE 干粮 + ACE Poměrové pole + ACE Rations sur le terrain + ACE Feld Rationen + ACE Terepi adagok + ACE Razioni di campo + ACE フィールド レーション + ACE 필드 식량 + ACE Racje polowe + ACE Rações de campo + ACE Полевые рационы + ACE Raciones de campo + ACE Gıda Ihtiyaçları + + + ACE Field Rations HUD + ACE Feldrationen HUD + ACE 戰地口糧界面 + ACE フィールド レーション HUD + ACE HUD Racji Polowych + Индикаторы жажды и голода + ACE Gıda Göstergesi + + + Indicates current hunger and thirst status. + 顯示目前的飲食需求程度。 + 指示当前的饥饿和渴望状态。 + Označuje aktuální stav hladovění a žízní. + Indique l'état actuel de la faim et de la soif. + Zeigt den aktuellen Hunger- und Durststatus an. + Jelzi az éhínség és a szomjúság állapotát. + Indica lo stato attuale di fame e sete. + 現在の空腹感と渇きの状態を示します。 + 현재의 굶주림과 갈증 상태를 나타냅니다. + Wskazuje bieżący status głodu i pragnienia. + Indica o status atual de fome e sede. + Указывают на текущий статус жажды и голода. + Indica el estado actual de hambre y sed. + Mevcut açlık ve susuzluk durumunu gösterir. + + + Survival + 生存 + 生存 + Přežití + Survie + Überleben + Túlélés + Sopravvivenza + サバイバル + 활착 + Przetrwanie + Sobrevivência + Выживание + Supervivencia + Hayatta kalma + + + Eat/Drink + Essen/Trinken + Jeść/Pić + Есть/Пить + Yeme / Içme + 食べる/飲む + + + Enable/Disable Field Rations + 啟用/禁用戰地口糧。 + 启用/禁用字段口粮 + Povolit / zakázat příděly v polích + Activer / désactiver les rations de champ + Feldrationen aktivieren / deaktivieren + Terepi adagok engedélyezése / letiltása + Abilita / disabilita le razioni di campo + フィールド レーションを有効/無効化します + 필드 배급량 활성화 / 비활성화 + Włącz / wyłącz racje polowe + Ativar / Desativar rações de campo + Включение/отключение жажды и голода + Habilitar / deshabilitar las raciones de campo + Gıda Ihtiyaçlarını Etkinleştir/Devre Dışı Bırak + + + Time Without Water + 水份需時 + 没有水的时候 + Czas bez wody + Temps sans eau + Zeit ohne Wasser + Víz nélküli idő + Tempo senza acqua + 水なしの時間 + 물없는 시간 + Czas bez wody + Tempo sem água + Время без воды + Tiempo sin agua + Susuz Kalma Süresi + + + How long should a person be able to go without water (hours). + 一個單位脫水之前能支撐多久(單位為小時)。 + 一个单位能够没有水的时间多少(小时) + Jak dlouho by měla jednotka jít bez vody (hodiny) + Combien de temps une unité devrait-elle pouvoir se passer d'eau (heures)? + Wie lange sollte eine Einheit ohne Wasser auskommen (Stunden)? + Mennyi ideig kell egy egység víz nélkül (óra) + Mennyi ideig kell egy egység víz nélkül (óra) + ユニットが水なしでどれくらい時間を過ごすことができるか (一時間単位) + 한 유닛이 물없이 얼마나 오래 갈 수 있어야 하는가? (시간) + Jak długo jednostka powinna przetrwać bez wody (godziny) + Quanto tempo uma unidade pode passar sem água (horas) + Как долго персонаж может обходиться без воды (часы) + ¿Cuánto tiempo debería una unidad ir sin agua (horas)? + Bir kişi susuz ne kadar süre dayanabilir (saat). + + + Time Without Food + 飢餓需時 + 没有食物的时间 + Čas bez jídla + Temps sans nourriture + Zeit ohne Essen + Élelmiszer nélkül + Tempo senza cibo + 食べ物なしの時間 + 음식없는 시간 + Czas bez jedzenia + Tempo sem comida + Время без еды + Tiempo sin comida + Aç Kalma Süresi + + + How long should a person be able to go without food (hours). + 一個單位挨餓之前能支撐多久(單位為小時)。 + 一个单位能够没有食物的时间多少(小时) + Jak dlouho by měla jednotka jít bez jídla (hodiny) + Combien de temps une unité doit-elle pouvoir se passer de nourriture (heures)? + Wie lange sollte eine Einheit ohne Essen gehen können (Stunden)? + Mennyi ideig kell egy egység élni nélkül (óra) + Per quanto tempo un'unità dovrebbe essere in grado di andare senza cibo (ore) + ユニットが食糧なしでどれくらい時間を過ごすことができるか (一時間単位) + 한 음식물이 음식 없이도 갈 수있는 시간 (시간) + Jak długo jednostka powinna przetrwać bez jedzenia (godziny) + Quanto tempo uma unidade pode ir sem alimentos (horas) + Как долго персонаж может обходиться без пищи (часы) + ¿Cuánto tiempo debería una unidad ir sin comida (horas)? + Bir kişi aç ne kadar süre dayanabilir (saat). + + + Thirst Quenched + Durst gestillt + 止渴程度 + 乾きの満たし + Утоление жажды + Pragnienie zaspokojone + Susuzluk Giderme Katsayısı + + + Coefficient for the amount of thirst quenched from drinking. + Koeffizient für die Menge des Dursts, der durch Trinken gestillt wird. + 從飲用中能夠攝取多少水份。 + 飲むことによって得られる乾きの満たし量の係数を設定します + Коэффициент утоления жажды от питья + Współczynnik ilości zaspokojnego pragnienia od picia + Bir şey içince, susuzluğunun ne kadar giderileceğini belirler. + + + Hunger Satiated + Hunger gesättigt + 飽足感 + 満腹感 + Утоление голода + Głód Zaspokojony + Açlık Giderme Katsayısı + + + Coefficient for the amount of hunger satiated from eating. + Koeffizient für die Menge des Hungers, der durch essen gesättigt wird. + 從飲食中獲取多少飽食感。 + 食べることによって得られる満腹感の量の係数を設定します + Коэффициент утоления голода от принятия пищи + Współczynnik ilosci zaspokojnego głodu od jedzenia + Bir şey yiyince, açlığın ne kadar giderileceğini belirler. + + + Water Source Actions + Действия с источником воды + Akcje przy źrodle wody + Su Içme Animasyonu + 水源動作 + + + Controls what actions are available on water sources. + Определяет какие действия будут доступны с источником воды. + Kontroluje jakie akcje są dostępne przy źrodle wody. + Su içerken hangi animasyonu yapacağını belirler + 水源で可能な動作を設定します。 + + + Refill Only + Только пополнить + Tylko napełnij + Sadece içeceği iç + 汲むだけ + + + Terrain Object Actions + Действия с объектами ландшафта + Akcje Objektu terenu + Varsayılan Nesne Animasyonu + マップ オブジェクト動作 + + + Enables water source actions for terrain objects. + Включает действия с источниками воды для объектов ландшафта. + Umożliwia akcje przy źrodle wody na obiektach terenu. + Varsayılan nesneler için animasyonu etkinleştir + マップに存在するオブジェクトを水源として動作するよう設定できます。 + + + Affect Advanced Fatigue + Beeinflusst die erweiterte Ausdauer + 與進階疲勞聯動 + アドバンスド ファティーグへの影響 + Влияние на продвинутую усталость + Wpływ na zaawansowane zmęczenie + Gelişmiş Yorgunluk + + + Controls if thirst and hunger should affect ACE Advanced Fatigue. + Bestimmt, ob Durst und Hunger ACE Erweiterte Ausdauer beeinflussen sollen. + 是否讓飲食影響到ACE的進階疲勞。 + 喉の渇きと空腹感が ACE アドバンスド ファティーグへ与える影響を決定します + Определяет, будет ли жажда и голод влиять на продвинутую усталость ACE. + Kontroluje czy pragnienie i głód mają wpływ na zaawansowane zmęczenie ACE. + Acıkınca veya susayınca kişinin yorulup yorulmayacağını belirler. + + + HUD Type + HUD Typ + 界面類型 + HUD タイプ + Typ HUD + Тип индикаторов + HUD Tipi + + + Selects which HUD style will be used. + Wählt, welcher HUD Stil benutzt wird. + 選擇妳想使用的界面類型。 + 使用する HUD のタイプを選択できます + Wybierz który styl HUD będzie używany + Выберите какой стиль индикаторов будет использован. + Hangi HUD sitilini kullanılacağını seçer. + + + Colored Icons + Farbige Icons + 顏色化圖示 + 色付きアイコン + Kolorowe ikony + Цветные иконки + Renkli Ikonlar + + + Draining Icons + Farblose Icons + 增減化圖示 + ドレイン アイコン + Ubywające ikony + Исчезающие иконки + Içi Boşalan Ikonlar + + + HUD Show Level + HUD zeigen Level + 界面顯示程度 + HUD 表示レベル + Widok HUD + Уровень для отображения иконок + HUD Gösterilme Seviyesi + + + Automatically show the HUD when either thirst or hunger are above this level. + Zeigt automatisch das HUD an, sobald Durst oder Hunger über diesem Level sind. + 在飲食低於多少程度時顯示界面。 + この値以上に空腹感か乾きを感じると自動的に HUD を表示します + Automatycznie pokaż HUD kiedy pragnienie albo głód przekroczy ten poziom + Автоматически отображает иконки при достижении определенных уровней голода и жажды. + Susuzluk veya açlık belli bir seviyenin altına inince otomatik olarak HUD u göster. + + + Always + 總是 + 总是 + Vždy + Toujours + Immer + Mindig + Sempre + 常に + 항상 + Zawsze + Sempre + Всегда + Siempre + Her Zaman + + + Colored Icons - Transparency + Farbige Icons - Transparenz + 顏色化圖示 - 透明度 + 色付きアイコン - 透明度 + Kolorowe ikony - transparentność + Прозрачность цветных иконок + Renkli Ikonlar - Şeffaflaşan + + + Controls the transparency of the Colored Icons HUD. Dynamic setting makes the HUD less transparent as thirst or hunger increase. + Bestimmt die Tranzparenz der farbigen HUD Icons. Die Dynamische Einstellung macht das HUD weniger transparent, wenn Hunger oder Durst steigen. + 控制顏色化圖示的透明度。設定為動態使其界面透明度與飲食需求一樣,越透明越需要。 + Kontroluje transparentność kolorowych ikon HUD. Dynamiczne ustawienie zmniejsza przejrzystość wraz z zwiększeniem głodu czy pragnienia. + 色付きアイコンの透明度を決定できます。動的に設定されると、喉の渇きや空腹感が増すにつれて、アイコンの透明度を下げます。 + Настраивает прозрачность цветных иконок. «Динамическая» делает иконки менее прозрачными при увеличении жажды и голода. + Renkli Simgeler Gösterge Paneli'nin şeffaflığını kontrol eder. Dinamik ayar, susuzluk veya açlık arttıkça HUD'yi daha az şeffaf hale getirir. + + + Dynamic + 動態 + 动态 + Dynamický + Dynamique + Dynamisch + Dinamikus + Dinamico + 動的 + 동적 + Dynamiczny + Dinâmico + Динамическая + Dinámica + Dinamik + + + Water Supply + Wasservorrat + 飲用水補給 + 水資源 + Водные ресурсы + Źródło wody + + + The amount of water available for ACE Field Rations water source actions (-1 disabled, -10 infinite) + Die Menge des für ACE Feldrationen Wasserquellenaktionen verfügbaren Wassers (-1 ausgeschaltet, -10 unendlich) + 水源可供補充飲用水的次數(-1為關閉,-10為無限次)。 + ACE フィールド レーションで利用できる水源の量を設定できます。(-1で無効化、-10で無限) + Количество воды, доступной для использования в ACE Полевые рационы. (-1 - отключено, -10 - бесконечно) + Ilość wody dostępnej dla Akcji ACE Źródła wody (-1 wyłączone, -10 nieskończone) + + + Water Source + Wasserquelle + 水源 + 水源 + Źródło wody + Источник воды + Matara + + + Check Remaining Water + Überprüfe verbleibendes Wasser + 檢查剩餘飲用水 + 残っている水を確認 + Sprawdź ilość wody + Проверить остаток воды + Kalan Suyu Kontrol Et + + + Checking remaining water... + Überprüfe verbleibendes Wasser... + 檢查剩下的飲用水... + 残っている水量を確認中です・・・ + Sprawdzanie ilości wody + Проверяется остаток воды... + Kalan Su Kontrol Ediliyor... + + + There are %1 litres left. + Es sind %1 Liter übrig. + 那還有 %1 公升 + 残り %1 リットル残っています。 + Pozostało %1 litrów. + Осталось %1 л воды + %1 Litre kaldı. + + + There is no water left. + Es ist kein Wasser mehr übrig. + 水已經用完了 + 水はもうありません。 + Nie ma wody + Воды больше не осталось + Hiç su kalmadı. + + + Drink From Source + Trinke direkt + Выпить из источника + Pij z źródła wody + Mataradan Iç + 水源から飲む + + + Refill + 重新補充 + 笔芯 + Doplňte + Recharge + Nachfüllung + Utántöltés + Ricarica + 汲む + 다시 채우다 + Uzupełnij + Recarga + Наполнить ёмкость + Rellenar + Yeniden Doldur + + + Refilling... + 補充中... + 加... + Doplňování... + Remplissage ... + Nachfüllen... + Utántöltés ... + Ricarica ... + 汲んでいます・・・ + 리필 중 ... + Uzupełnianie ... + Recarga ... + Наполнение... + Rellenar ... + Yeniden Dolduruluyor... + + + Item Refilled + 物品重新補充 + 项目重新填充 + Položka je vyplněna + Article rechargé + Artikel nachgefüllt + Újratöltött tétel + Articolo riempito + 中身がいっぱいになりました + 리필 품목 + Przedmiot uzupełniony + Item Recarregado + Ёмкость наполнена + Artículo Rellenado + Eşya Yeniden Dolduruldu + + + Eating %1... + Esse %1... + 食用 %1... + %1を食べています・・・ + Jedzenie %1... + Поедание %1... + %1 Yeniyor... + + + Drinking %1... + Trinke %1... + 飲用自 %1... + %1を飲んでいます・・・ + Picie %1... + Выпивание %1... + %1 Içiliyor... + + + Drinking from %1... + Trinke von %1... + 飲用%1的水中... + %1から飲んでいます・・・ + Picie z %1... + Выпивание из %1... + %1 den içiliyor... + + + Drinking from source... + Выпивание из источника... + Picie z źródła + Mataradan Içiliyor... + 水源から飲んでいます・・・ + + + Water Bottle + 飲用水 + 水瓶 + Láhev na vodu + Bouteille d'eau + Wasserflasche + Vizesüveg + Bottiglia d'acqua + ウォーターボトル + 물 병 + Butelka wody + Garrafa de agua + Бутылка воды (полная) + Botella de agua + Su Şişesi + + + A water bottle + 一罐裝滿水的寶特瓶 + 一个水瓶 + Láhev s vodou + Une bouteille d'eau + Eine Wasserflasche + Egy vizes palackot + Una bottiglia d'acqua + ウォーター ボトル + 물병 + Butelka wody + Uma garrafa de água + Полная бутылка с водой + Una botella de agua + Bir Su Şişesi + + + Water Bottle (Half) + 飲用水(半罐) + 水瓶(一半) + Vodní láhev (poloviční) + Bouteille d'eau (la moitié) + Wasserflasche (Hälfte) + Vízpalack (fél) + Bottiglia d'acqua (metà) + ウォーター ボトル (半分) + Garrafa de água (meio) + Butelka wody (połowa) + Garrafa de água (meio) + Бутылка воды (половина) + Botella de agua (mitad) + Su Şişesi (Yarım) + + + A half full water bottle + 一罐裝滿半罐水的寶特瓶 + 半满水瓶 + Polní plná láhev s vodou + Une bouteille d'eau à moitié pleine + Eine halbvolle Wasserflasche + Fél-teljes vizes palack + Una mezza bottiglia piena d'acqua + 半分入っているウォーター ボトル + 반만 물병 + Pół butelki z wodą + Uma garrafa de água meia cheia + Половина бутылки с водой + Una botella de agua media llena + Yarım dolu Su Şişesi + + + Water Bottle (Empty) + 空寶特瓶 + 水瓶(空) + Láhev s vodou (prázdné) + Bouteille d'eau (vide) + Wasserflasche (leer) + Vízpalack (üres) + Bottiglia d'acqua (vuota) + ウォーター ボトル (空) + 물병 (비어 있음) + Butelka na wodę (pusta) + Garrafa de água (vazia) + Бутылка воды (пустая) + Botella de agua (vacía) + Su Şişesi (Boş) + + + An empty water bottle + 一個空寶特瓶 + 一个空的水瓶 + Prázdná láhev s vodou + Une bouteille d'eau vide + Eine leere Wasserflasche + Egy üres palack + Una bottiglia d'acqua vuota + 空のウォーター ボトル + 빈 물병 + Pusta butelka wody + Uma garrafa de água vazia + Пустая бутылка + Una botella de agua vacía + Boş Su Şişesi + + + Canteen + 水壺 + 食堂 + Jídelna + Cantine + Feldflasche + Kantin + Mensa + 水筒 + 반합 + Manierka + Cantina + Фляга (полная) + Cantina + Matara + + + A canteen filled with water + 一個裝滿水的水壺 + 一个装满水的食堂 + Jídelna naplněná vodou + Une cantine remplie d'eau + Eine Feldflasche mit Wasser gefüllt + Vízzel töltött kantin + Una mensa piena d'acqua + 水で一杯の水筒 + 물이 채워진 식당 + Manierka wypełniona wodą + Uma cantina cheia de água + Фляга с водой + Una cantina llena de agua + Su Dolu Matara + + + Canteen (Half) + 水壺(半罐) + 食堂(一半) + Jídelna (poloviční) + Cantine (Demi) + Feldflasche (halb) + Étkezés (fél) + Mensa (metà) + 水筒 (半分) + 캔틴 (하프) + Manierka (połowa) + Cantina (meio) + Фляга (половина) + Cantina (Mitad) + Matara (Yarım) + + + A canteen half filled with water + 剩下一半水的水壺 + 食堂一半装满了水 + Jídelna naplněná vodou + Une cantine à moitié remplie d'eau + Eine Feldflasche zur Hälfte mit Wasser gefüllt + A vízzel töltött kantin + Una mensa riempita per metà di acqua + 半分入っている水筒 + 물이 담긴 식당 절반 + Manierka w połowie wypełniona wodą + Uma meia cantina cheia de água + Наполовину заполненая водой фляга + Una cantina medio llena de agua + Yarım Dolu Matara + + + Canteen (Empty) + 水壺(空) + 食堂(空) + Jídelna (prázdné) + Cantine (Vide) + Feldflasche (leer) + Étkezde (üres) + Mensa (vuota) + 水筒 (空) + 캔틴 (비어 있음) + Manierka (pusta) + Cantina (vazia) + Фляга (пустая) + Cantina (Vacío) + Matara (Boş) + + + An empty canteen + 一個空的水壺 + 一个空的食堂 + Prázdná jídelna + Une cantine vide + Eine leere Feldflasche + Egy üres kantin + Una mensa vuota + 空の水筒 + 빈 수통 + Pusta manierka + Uma cantina vazia + Пустая фляга + Una cantina vacía + Boş Matara + + + Refreshing lemon and lime flavored soft drink + Ein erfrischender Softdrink mit Zitronen- und Limettengeschmack. + 清新檸檬以及有著酸橙味的汽水 + 新鮮なレモンとライムの風味を味わえるソフト ドリンク + Odświeżający napój cytronowo-limonkowy + Освежающий напиток со вкусом лимона и лайма + Limon Ve Yeşil Limondan Yapılmış Gazlı Bir Içecek + + + Orange flavored soft drink with a tingly, fruity taste + Ein nach Orange schmeckender Softdrink mit einem prickelndem und fruchtigem Geschmack + 有著微微的橘子水果味的汽水 + 口いっぱいに果物を感じるオレンジ風味のソフト ドリンク + Napój pomarańczowy + Напиток с апельсиновым вкусом + Gazlı Portakallı Bir Içecek + + + Red Gull gives you wings + Red Gull verleiht Flügel + 紅鷹讓你猛虎添翼 + レッドガルは翼をさずける + Red Gull doda ci skrzydeł + Рэд Гулл окрыляет! + Red Gull kanatlandırrrrr + + + MRE Lamb Curry + 軍糧 羊肉咖哩 + MRE羊肉咖喱 + MRE jehněčí kari + MRE Curry d'agneau + EPA Lamm Curry + MRE bárány Curry + MRE Curry di agnello + MRE 羊カレー + MRE 양고기 카레 + MRE jagnięcina Curry + MRE cordeiro ao Curry + ИРП Ягненок карри + MRE cordero Curry + MRE Kuzu Köri + + + An MRE containing Lamb Curry. Heat for best effect + 含有羊肉咖哩的軍用口糧。加熱以達到最佳效果 + 含有羊肉咖喱的MRE。加热以达到最佳效果 + MRE obsahující Lamb Curry. Teplo pro nejlepší efekt + Un MRE contenant du Curry d'agneau. Chaleur pour le meilleur effet + Eine EPA mit Lamm Curry. Für den besten Geschmack erhitzen. + Egy MRE, amely Lamb Curry-t tartalmaz. Hő a legjobb hatás érdekében + Un MRE contenente Lamb Curry. Calore per il miglior effetto + 羊カレーの MRE。温めるとなお美味しい + 램 카레가 들어있는 MRE. 효과를 극대화하기위한 열기 + MRE zawierające jagnięcine Curry. Podgrzej dla najlepszego efektu + Um MRE contendo Lamb Curry. Calor para melhor efeito + Сухой паёк, содержащий ягнятину карри. Перед употреблением рекомендуется разогреть + Un MRE que contiene cordero al curry. Calor para el mejor efecto + Kuzu Köri içeren bir MRE. + + + MRE Beef Stew + EPA Rindereintopf + 軍糧 牛肉燉湯 + MRE ビーフ シチュー + MRE Gulasz wołowy + ИРП Тушеная говядина + MRE Dana Yahni + + + An MRE containing Beef Stew. Heat for best effect + Eine EPA, welche Rindereintopf beeinhaltet. Für den besten Geschmack erhitzen. + 含有牛肉燉湯的軍用口糧。加熱以達到最佳效果 + ビーフ シチューの MRE。温めるとなお美味しい + MRE zawierające gulasz wołowy. Podgrzej dla najlepszego efektu + Сухой паёк, содержащий тушеную говядину. Перед употреблением рекомендуется разогреть + Sığır Yahni içeren bir MRE. + + + MRE Cream Tomato Soup + 軍糧 奶油番茄湯 + MRE奶油西红柿汤 + MRE krémová rajská polévka + MRE Soupe de tomate crème + EPA Cremige Tomatensuppe + MRE krémes paradicsomleves + MRE Crema di pomodoro + MRE クリーム トマト スープ + MRE 크림 토마토 수프 + MRE Kremowa Zupa Pomidorowa + MRE Sopa de creme de tomate + ИРП Томатный крем-суп + MRE Sopa de tomate crema + MRE Kremalı Domates Çorbası + + + An MRE containing Cream Tomato Soup. Mix with water and heat for best effect + 含有奶油番茄湯的軍用口糧。 用水和熱混合以獲得最佳效果 + 含有奶油番茄汤的MRE。 用水和热混合以获得最佳效果 + MRE obsahující krémovou rajčatovou polévku. Směs s vodou a teplem pro nejlepší efekt + Un MRE contenant de la soupe à la tomate et à la crème. Mélanger avec de l'eau et chauffer pour obtenir le meilleur effet + Eine EPA mit Creme Tomatensuppe. Für beste Wirkung mit Wasser und Hitze mischen. + Egy krémes paradicsomleveset tartalmazó MRE. Keverjük össze vízzel és hővel a legjobb hatás érdekében + Un MRE contenente zuppa di pomodoro crema. Mescolare con acqua e calore per ottenere il massimo effetto + クリーム トマト スープの MRE。水と混ぜて温めるとなお美味しい + 크림 토마토 수프가 들어있는 MRE. 최상의 효과를 위해 물과 열을 함께 섞으십시오. + MRE zawierające śmietanową zupę pomidorową. Wymieszaj z wodą i podgrzej, aby uzyskać najlepszy efekt + Uma MRE contendo Cream Tomato Soup. Misture com água e calor para melhor efeito + Сухой паёк, содержащий сублимированный томатный крем-суп. Перед употреблением растворить в воде и разогреть + Una MRE que contiene Sopa de Tomate Crema. Mezcle con agua y calor para un mejor efecto + Kremalı Domates Çorbası içeren bir MRE. + + + MRE Cream Chicken Soup + 軍糧 奶油雞湯 + MRE奶油鸡汤 + MRE krémová kuřecí polévka + MRE Soupe à la crème au poulet + EPA Cream Hühnersuppe + MRE krémes csirke leves + MRE Zuppa di pollo crema + MRE クリーム チキン スープ + MRE 크림 치킨 스프 + MRE Kremowy Rosół + MRE Sopa de creme de galinha + ИРП Куриный крем-суп + MRE Sopa de pollo crema + MRE Kremalı Tavuk Çorbası + + + An MRE containing Chicken Soup. Mix with water and heat for best effect + 含有雞湯的軍用口糧。 用水和熱混合以獲得最佳效果 + 含有鸡汤的MRE。 用水和热混合以获得最佳效果 + MRE obsahující kuřecí polévku. Směs s vodou a teplem pro nejlepší efekt + Un MRE contenant une soupe au poulet. Mélanger avec de l'eau et chauffer pour obtenir le meilleur effet + Eine EPA mit Hühnersuppe. Für beste Wirkung mit Wasser und Hitze mischen. + A csirke leves tartalmú MRE. Keverjük össze vízzel és hővel a legjobb hatás érdekében + Un MRE contenente zuppa di pollo. Mescolare con acqua e calore per ottenere il massimo effetto + チキン スープの MRE。水と混ぜて温めるとなお美味しい + 치킨 수프를 포함한 MRE. 최상의 효과를 위해 물과 열을 섞으십시오. + MRE zawierające rosół. Wymieszaj z wodą i podgrzej, aby uzyskać najlepszy efekt + Um MRE contendo Sopa de Frango. Misture com água e calor para melhor efeito + Сухой паёк, содержащий сублимированный куриный крем-суп. Перед употреблением растворить в воде и разогреть + Un MRE que contiene sopa de pollo. Mezcle con agua y calor para un mejor efecto + Tavuk Çorbası içeren bir MRE. + + + MRE Chicken Tikka Masala + 軍糧 瑪撒拉雞 + MRE鸡蒂卡Masala + MRE Kuře Tikka Masala + MRE Poulet Tikka Masala + EPA Huhn Tikka Masala + MRE csirke Tikka Masala + MRE pollo Tikka Masala + MRE チキン ティッカ マサラ + MRE 치킨 티카 마샬 라 + MRE kurczak Tikka Masala + MRE frango Tikka Masala + ИРП Курица Тикка Масала + MRE Pollo Tikka Masala + MRE Tikka Masala Soslu Tavuk + + + An MRE with Chicken Tikka Masala. Heat for best effect + 含有瑪撒拉雞的軍用口糧。 用水和熱混合以獲得最佳效果 + 与鸡Tikka马萨拉MRE。 加热以达到最佳效果 + MRE s kuřecím masem Tikka Masala. Teplo pro nejlepší efekt + Un MRE avec du poulet Tikka Masala. Chaleur pour le meilleur effet + Eine EPA mit Hühnchen Tikka Masala. Für den besten Geschmack erhitzen. + Egy MRE csirkével Tikka Masala. Hő a legjobb hatás érdekében + Un MRE con pollo Tikka Masala. Calore per effetto migliore + チキン ティッカ マサラの MRE。温めるとなお美味しい + 치킨 티 카 Masala와 MRE입니다. 최고의 효과 대 한 열 + MRE z kurczakiem Tikka Masala. Podgrzej dla najlepszego efektu + Um MRE com Frango Tikka Masala. Calor para melhor efeito + Сухой паёк, содержащий Курицу Тикка Масала. Перед употреблением рекомендуется разогреть + Un ERM con Pollo Tikka Masala. Calor para un mejor efecto + Tikka Masala Soslu Tavuk içeren bir MRE. + + + MRE Steak Vegetables + 軍糧 牛排蔬菜 + MRE牛排蔬菜 + MRE Steak zelenina + MRE Steak légumes + EPA Steak Gemüse + MRE Steak zöldségek + MRE Verdura di bistecca + MRE 野菜添えステーキ + MRE 스테이크 야채 + MRE Stek Warzywny + MRE bife legumes + ИРП Стейк с овощами + ERM de ternera verduras + MRE Sebzeli Biftek + + + An MRE containing Steak and Vegetables. Heat for best effect + 包含牛排和蔬菜的軍用口糧。 加熱以達到最佳效果 + 包含牛排和蔬菜的MRE。 加热以达到最佳效果 + MRE obsahující steak a zeleninu. Teplo pro nejlepší efekt + Un MRE contenant du bifteck et des légumes. Chaleur pour le meilleur effet + Eine EPA mit Steak und Gemüse. Für den besten Geschmack erhitzen. + Egy MRE, amely Steak és Zöldségeket tartalmaz. Hő a legjobb hatás érdekében + Un MRE contenente bistecche e verdure. Calore per il miglior effetto + 野菜とステーキの MRE。温めるとなお美味しい + 스테이크와 채소가 들어있는 MRE. 효과를 극대화하기위한 열기 + MRE zawierający stek i warzywa. Podgrzej dla najlepszego efektu + Um MRE contendo Bife e Legumes. Calor para melhor efeito + Сухой паёк, содержащий стейк с овощами. Перед употреблением рекомендуется разогреть + Un MRE que contiene carne y verduras. Calor para el mejor efecto + Sebzeli Biftek içeren bir MRE. + + + MRE Meatballs and Pasta + 軍糧 肉丸和意大利麵 + MRE肉丸和意大利面 + MRE karbanátky a těstoviny + MRE Pâtes aux boulettes de viande + EPA Frikadellen und Pasta + MRE húsgombóc és tészta + MRE Pasta e polpette + MRE ミートボールとパスタ + MRE 미트볼과 파스타 + MRE Klopsiki i makaron + MRE Macarrão com almôndegas + ИРП Макароны с фрикадельками + MRE Albóndigas y pastas + MRE Köfte Ve Makarna + + + An MRE containing Meatballs and Pasta. Heat for best effect + 含有肉丸和意大利麵的軍用口糧。 加熱以達到最佳效果 + 含有肉丸和意大利面的MRE。 加热以达到最佳效果 + MRE obsahující maso a těstoviny. Teplo pro nejlepší efekt + Un MRE contenant des boulettes de viande et des pâtes. Chaleur pour le meilleur effet + Eine EPA mit Fleischbällchen und Pasta. Für den besten Geschmack erhitzen. + Húsgombócokat és tésztát tartalmazó MRE. Hő a legjobb hatás érdekében + Un MRE contenente polpette e pasta. Calore per il miglior effetto + ミートボールとパスタの MRE。温めるとなお美味しい + 미트볼과 파스타를 포함한 MRE. 효과를 극대화하기위한 열기 + MRE zawierające klopsiki i makaron. Podgrzej dla najlepszego efektu + Um MRE contendo Meatballs e Pasta. Calor para melhor efeito + Сухой паёк, содержащий макароны с фрикадельками. Перед употреблением рекомендуется разогреть + Un MRE que contiene albóndigas y pasta. Calor para el mejor efecto + Köfte ve makarnadan oluşan bir MRE. + + + MRE Chicken with Herb Dumplings + 軍糧 雞肉香草餃子 + MRE鸡肉香草饺子 + MRE kuře s bylinkovým knedlíkem + MRE de poulet avec des boulettes aux herbes + EPA Huhn mit Kraut Knödel + MRE csirke Herb galuskával + MRE pollo con gnocchi alle erbe + MRE 鶏肉団子 + MRE 치킨 약초만 두 + MRE kurczak z pierogami ziołowymi. + MRE Frango com Dumplings de ervas + ИРП Курица с клёцками + MRE pollo con bolas de masa hervida + MRE Tavuk ve Herb Mantısı + + + An MRE containing Chicken with Herb Dumplings. Heat for best effect + 含有雞肉和香草餃子的軍用口糧。 加熱以達到最佳效果 + 含有鸡肉和香草饺子的MRE。 加热以达到最佳效果 + MRE obsahující kuře s bylinkovými knedlíky. Teplo pro nejlepší efekt + Un MRE contenant du poulet et des dumplings aux fines herbes. Chaleur pour le meilleur effet + Eine EPA mit Hühnchen mit Kräuterknödeln. Für den besten Geschmack erhitzen. + Egy MRE, amely csirkét és fűszeres gombócokat tartalmaz. Hő a legjobb hatás érdekében + Un MRE contenente pollo con gnocchi alle erbe. Calore per il miglior effetto + 鶏肉を団子で包んだ MRE。温めるとなお美味しい + 치킨과 허브 만두가 포함 된 MRE. 효과를 극대화하기위한 열기 + MRE z kurczakiem i pierogamii ziołowymi. Podgrzej dla najlepszego efektu + Uma MRE que contém Bolinhos De Frango Com Erva. Calor para melhor efeito + Сухой паёк, содержащий курицу с клёцками. Перед употреблением рекомендуется разогреть + Un MRE que contiene pollo con bolas de masa hervida. Calor para el mejor efecto + Tavuk ve Herb Mantısı içeren bir MRE. + + + Humanitarian Ration + 人道主義口糧 + 人道主义配给 + Humanitární poměr + Ration humanitaire + Humanitäre Ration + Humanitárius értelemben + Razione umanitaria + 人道支援配給レーション + 인도주의 배급 + Racja humanitarna + Ração Humanitária + Гуманитарный сухой паёк + Ración humanitaria + + + A Humanitarian Ration intended to serve as a person's food supply during crises + 人道主義口糧意圖在危機期間充當人的食物供應 + 人道主义配额意图在危机期间充当人的食物供应 + Humanitární rada, která má sloužit jako zásobování potravinami během krizí + Une ration humanitaire destinée à servir d'approvisionnement alimentaire en cas de crise + Eine humanitäre Ration, die dazu bestimmt ist, in Krisenzeiten als Nahrung für eine Person zu dienen + Humanitárius eloszlás, amelynek célja az ember élelmezési ellátottsága a válság idején + Una razione umanitaria destinata a servire come riserva di cibo di una persona durante le crisi + 人道危機を救う為に配布された食料品 + 위기 상황에서 식량 공급을위한 인도 주의적 식량 배급 + Racja humanitarna, która ma służyć jako żywność dla danej osoby podczas kryzysów + Uma Ração Humanitária destinada a servir como alimento alimentar de uma pessoa durante as crises + Суточный рацион питания для обеспечения населения районов, охваченных гуманитарной катастрофой или стоящих на ее грани + Una ración humanitaria destinada a servir como el suministro de alimentos de una persona durante las crisis + + + diff --git a/addons/field_rations/ui/icon_can_franta_ca.paa b/addons/field_rations/ui/icon_can_franta_ca.paa new file mode 100644 index 0000000000..ae2605dd35 Binary files /dev/null and b/addons/field_rations/ui/icon_can_franta_ca.paa differ diff --git a/addons/field_rations/ui/icon_can_redgull_ca.paa b/addons/field_rations/ui/icon_can_redgull_ca.paa new file mode 100644 index 0000000000..7c18aedbf9 Binary files /dev/null and b/addons/field_rations/ui/icon_can_redgull_ca.paa differ diff --git a/addons/field_rations/ui/icon_can_spirit_ca.paa b/addons/field_rations/ui/icon_can_spirit_ca.paa new file mode 100644 index 0000000000..9794c7ee15 Binary files /dev/null and b/addons/field_rations/ui/icon_can_spirit_ca.paa differ diff --git a/addons/field_rations/ui/icon_hud_hungerstatus.paa b/addons/field_rations/ui/icon_hud_hungerstatus.paa new file mode 100644 index 0000000000..949dd5a37a Binary files /dev/null and b/addons/field_rations/ui/icon_hud_hungerstatus.paa differ diff --git a/addons/field_rations/ui/icon_hud_thirststatus.paa b/addons/field_rations/ui/icon_hud_thirststatus.paa new file mode 100644 index 0000000000..3f4d901aa7 Binary files /dev/null and b/addons/field_rations/ui/icon_hud_thirststatus.paa differ diff --git a/addons/field_rations/ui/icon_survival.paa b/addons/field_rations/ui/icon_survival.paa new file mode 100644 index 0000000000..aa9299df7f Binary files /dev/null and b/addons/field_rations/ui/icon_survival.paa differ diff --git a/addons/field_rations/ui/icon_water_tap.paa b/addons/field_rations/ui/icon_water_tap.paa new file mode 100644 index 0000000000..0808fc9dde Binary files /dev/null and b/addons/field_rations/ui/icon_water_tap.paa differ diff --git a/addons/field_rations/ui/igui_preview.paa b/addons/field_rations/ui/igui_preview.paa new file mode 100644 index 0000000000..58ffe038bd Binary files /dev/null and b/addons/field_rations/ui/igui_preview.paa differ diff --git a/addons/field_rations/ui/item_canteen_co.paa b/addons/field_rations/ui/item_canteen_co.paa new file mode 100644 index 0000000000..f9b6ad6887 Binary files /dev/null and b/addons/field_rations/ui/item_canteen_co.paa differ diff --git a/addons/field_rations/ui/item_mre_human_co.paa b/addons/field_rations/ui/item_mre_human_co.paa new file mode 100644 index 0000000000..349a133b9a Binary files /dev/null and b/addons/field_rations/ui/item_mre_human_co.paa differ diff --git a/addons/field_rations/ui/item_mre_type1_co.paa b/addons/field_rations/ui/item_mre_type1_co.paa new file mode 100644 index 0000000000..ec397cea4c Binary files /dev/null and b/addons/field_rations/ui/item_mre_type1_co.paa differ diff --git a/addons/field_rations/ui/item_mre_type2_co.paa b/addons/field_rations/ui/item_mre_type2_co.paa new file mode 100644 index 0000000000..3c75c24f2c Binary files /dev/null and b/addons/field_rations/ui/item_mre_type2_co.paa differ diff --git a/addons/field_rations/ui/item_mre_type3_co.paa b/addons/field_rations/ui/item_mre_type3_co.paa new file mode 100644 index 0000000000..5a941e7edf Binary files /dev/null and b/addons/field_rations/ui/item_mre_type3_co.paa differ diff --git a/addons/field_rations/ui/item_mre_type4_co.paa b/addons/field_rations/ui/item_mre_type4_co.paa new file mode 100644 index 0000000000..f90514a1c1 Binary files /dev/null and b/addons/field_rations/ui/item_mre_type4_co.paa differ diff --git a/addons/field_rations/ui/item_mre_type5_co.paa b/addons/field_rations/ui/item_mre_type5_co.paa new file mode 100644 index 0000000000..08fde02f9a Binary files /dev/null and b/addons/field_rations/ui/item_mre_type5_co.paa differ diff --git a/addons/field_rations/ui/item_mre_type6_co.paa b/addons/field_rations/ui/item_mre_type6_co.paa new file mode 100644 index 0000000000..267b8a9b6e Binary files /dev/null and b/addons/field_rations/ui/item_mre_type6_co.paa differ diff --git a/addons/field_rations/ui/item_waterbottle_empty_co.paa b/addons/field_rations/ui/item_waterbottle_empty_co.paa new file mode 100644 index 0000000000..2ccb6e2607 Binary files /dev/null and b/addons/field_rations/ui/item_waterbottle_empty_co.paa differ diff --git a/addons/field_rations/ui/item_waterbottle_full_co.paa b/addons/field_rations/ui/item_waterbottle_full_co.paa new file mode 100644 index 0000000000..d9f49d2596 Binary files /dev/null and b/addons/field_rations/ui/item_waterbottle_full_co.paa differ diff --git a/addons/finger/ACE_Settings.hpp b/addons/finger/ACE_Settings.hpp index b818c76d60..a8c52e69ee 100644 --- a/addons/finger/ACE_Settings.hpp +++ b/addons/finger/ACE_Settings.hpp @@ -1,33 +1,14 @@ class ACE_Settings { class GVAR(enabled) { - category = CSTRING(DisplayName); - value = 0; - typeName = "BOOL"; - displayName = CSTRING(enabled_displayName); - description = CSTRING(enabled_description); + movedToSQF = 1; }; class GVAR(maxRange) { - category = CSTRING(DisplayName); - value = 4; - typeName = "SCALAR"; - displayName = CSTRING(maxRange_displayName); - description = CSTRING(maxRange_description); - sliderSettings[] = {0, 50, 4, 1}; + movedToSQF = 1; }; class GVAR(indicatorForSelf) { - category = CSTRING(DisplayName); - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(indicatorForSelf_name); - description = CSTRING(indicatorForSelf_description); + movedToSQF = 1; }; class GVAR(indicatorColor) { - category = CSTRING(DisplayName); - value[] = {0.83, 0.68, 0.21, 0.75}; - typeName = "COLOR"; - isClientSettable = 1; - displayName = CSTRING(indicatorColor_name); - description = CSTRING(indicatorColor_description); + movedToSQF = 1; }; }; diff --git a/addons/finger/CfgEventHandlers.hpp b/addons/finger/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/finger/CfgEventHandlers.hpp +++ b/addons/finger/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/finger/README.md b/addons/finger/README.md index 6c5d55b7aa..bfd4ab4153 100644 --- a/addons/finger/README.md +++ b/addons/finger/README.md @@ -2,11 +2,3 @@ ace_finger =========== Allows players to point and show a virtual spot in the distance to nearby players. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Drill](https://github.com/TheDrill/) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/finger/XEH_postInit.sqf b/addons/finger/XEH_postInit.sqf index ba4e5a99fc..caa2ab54e8 100644 --- a/addons/finger/XEH_postInit.sqf +++ b/addons/finger/XEH_postInit.sqf @@ -2,15 +2,15 @@ if (!hasInterface) exitWith {}; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { //If not enabled, dont't bother adding eventhandler - TRACE_1("ace_settingsInitialized eh", GVAR(enabled)); + TRACE_1("CBA_settingsInitialized eh", GVAR(enabled)); if (!GVAR(enabled)) exitWith {}; - + GVAR(lastFPTime) = -1; - GVAR(fingersHash) = [] call CBA_fnc_hashCreate; + GVAR(fingersHash) = createHashMap; GVAR(pfeh_id) = -1; - + [QGVAR(fingered), {_this call FUNC(incomingFinger)}] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/finger/XEH_preInit.sqf b/addons/finger/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/finger/XEH_preInit.sqf +++ b/addons/finger/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/finger/functions/fnc_incomingFinger.sqf b/addons/finger/functions/fnc_incomingFinger.sqf index 4706798f40..24afac3c34 100644 --- a/addons/finger/functions/fnc_incomingFinger.sqf +++ b/addons/finger/functions/fnc_incomingFinger.sqf @@ -28,7 +28,7 @@ private _fingerPos = if (_sourceUnit == ACE_player) then { TRACE_3("incoming finger:", _sourceUnit, _fingerPosPrecise, _fingerPos); private _data = [diag_tickTime, _fingerPos, ([_sourceUnit, false, true] call EFUNC(common,getName))]; -[GVAR(fingersHash), _sourceUnit, _data] call CBA_fnc_hashSet; +GVAR(fingersHash) set [hashValue _sourceUnit, _data]; if (GVAR(pfeh_id) == -1) then { GVAR(pfeh_id) = [DFUNC(perFrameEH), 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf index faef2f00a3..4278bec2cb 100644 --- a/addons/finger/functions/fnc_keyPress.sqf +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -32,7 +32,7 @@ GVAR(lastFPTime) = diag_tickTime; private _originASL = AGLtoASL positionCameraToWorld [0, 0, 0]; private _fingerPosASL = AGLtoASL positionCameraToWorld [0, 0, FP_DISTANCE]; private _intersections = lineIntersectsSurfaces [_originASL, _fingerPosASL, ACE_player, vehicle ACE_player, true, 1]; -if !(_intersections isEqualTo []) then { +if (_intersections isNotEqualTo []) then { _fingerPosASL = _intersections select 0 select 0; }; diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf index bfb9995720..e6056393b0 100644 --- a/addons/finger/functions/fnc_perFrameEH.sqf +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -15,20 +15,20 @@ * Public: No */ -if (!alive ACE_player) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;}; +if (!alive ACE_player) then {GVAR(fingersHash) = createHashMap}; // Conditions: canInteract -if !([ACE_player, ACE_player, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;}; +if !([ACE_player, ACE_player, ["isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) then {GVAR(fingersHash) = createHashMap}; // Make sure player is dismounted or in a static weapon: -if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;}; +if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = createHashMap}; private _iconSize = BASE_SIZE * 0.10713 * (call EFUNC(common,getZoom)); -[+GVAR(fingersHash), { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; - _value params ["_lastTime", "_pos", "_name"]; +{ + //IGNORE_PRIVATE_WARNING ["_x", "_y"]; + _y params ["_lastTime", "_pos", "_name"]; private _timeLeftToShow = _lastTime + FP_TIMEOUT - diag_tickTime; if (_timeLeftToShow <= 0) then { - [GVAR(fingersHash), _key] call CBA_fnc_hashRem; + GVAR(fingersHash) deleteAt _x; } else { private _drawColor = + GVAR(indicatorColor); // Fade out: @@ -36,9 +36,9 @@ private _iconSize = BASE_SIZE * 0.10713 * (call EFUNC(common,getZoom)); drawIcon3D [QPATHTOF(UI\fp_icon2.paa), _drawColor, ASLtoAGL _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "RobotoCondensed"]; }; -}] call CBA_fnc_hashEachPair; +} forEach GVAR(fingersHash); -if ((GVAR(fingersHash) select 1) isEqualTo []) then { +if (GVAR(fingersHash) isEqualTo createHashMap) then { TRACE_1("Ending PFEH", GVAR(pfeh_id)); [GVAR(pfeh_id)] call CBA_fnc_removePerFrameHandler; GVAR(pfeh_id) = -1; diff --git a/addons/finger/initSettings.sqf b/addons/finger/initSettings.sqf new file mode 100644 index 0000000000..592b045629 --- /dev/null +++ b/addons/finger/initSettings.sqf @@ -0,0 +1,33 @@ +private _category = format ["ACE %1", localize LSTRING(DisplayName)]; + +[ + QGVAR(enabled), "CHECKBOX", + [LSTRING(enabled_displayName), LSTRING(enabled_description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(maxRange), "SLIDER", + [LSTRING(maxRange_displayName), LSTRING(maxRange_description)], + _category, + [0, 50, 4, 1], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(indicatorForSelf), "CHECKBOX", + [LSTRING(indicatorForSelf_name), LSTRING(indicatorForSelf_description)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(indicatorColor), "COLOR", + [LSTRING(indicatorColor_name), LSTRING(indicatorColor_description)], + _category, + [0.83, 0.68, 0.21, 0.75], + 0 +] call CBA_fnc_addSetting; diff --git a/addons/fire/$PBOPREFIX$ b/addons/fire/$PBOPREFIX$ new file mode 100644 index 0000000000..ec282b453b --- /dev/null +++ b/addons/fire/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\fire diff --git a/addons/fire/ACE_Medical_Treatment_Actions.hpp b/addons/fire/ACE_Medical_Treatment_Actions.hpp new file mode 100644 index 0000000000..434a794fa7 --- /dev/null +++ b/addons/fire/ACE_Medical_Treatment_Actions.hpp @@ -0,0 +1,20 @@ +class EGVAR(medical_treatment,actions) { + class BasicBandage; + class PatDown: BasicBandage { + displayName = CSTRING(Actions_PatDown); + displayNameProgress = CSTRING(Actions_PerformingPatDown); + icon = ""; + category = "advanced"; + treatmentLocations = 0; + allowedSelections[] = {"All"}; + allowSelfTreatment = 1; + medicRequired = 0; + treatmentTime = 5; + items[] = {}; + condition = QFUNC(medical_canPatDown); + callbackSuccess = QFUNC(medical_success); + callbackProgress = QFUNC(medical_progress); + consumeItem = 0; + litter[] = {}; + }; +}; diff --git a/addons/fire/CfgEventHandlers.hpp b/addons/fire/CfgEventHandlers.hpp new file mode 100644 index 0000000000..f6503c2479 --- /dev/null +++ b/addons/fire/CfgEventHandlers.hpp @@ -0,0 +1,17 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/fire/CfgSounds.hpp b/addons/fire/CfgSounds.hpp new file mode 100644 index 0000000000..c4b821144a --- /dev/null +++ b/addons/fire/CfgSounds.hpp @@ -0,0 +1,26 @@ +// weird ass concatenation syntax. PBO Project complains otherwise... +#define CONCAT(a,b) a####b +#define CREATE_SCREAM(no)\ +class GVAR(DOUBLES(scream,no)) { \ + name = QUOTE(GVAR(CONCAT(scream,no)));\ + sound[] = {QUOTE(PATHTOF(CONCAT(sounds\scream,no).ogg)), db + 8, 1};\ + titles[] = {}; \ +} + +class CfgSounds { + CREATE_SCREAM(1); + CREATE_SCREAM(2); + CREATE_SCREAM(3); + CREATE_SCREAM(4); + CREATE_SCREAM(5); + CREATE_SCREAM(6); + CREATE_SCREAM(7); + CREATE_SCREAM(8); + CREATE_SCREAM(9); + CREATE_SCREAM(10); + CREATE_SCREAM(11); + CREATE_SCREAM(12); + CREATE_SCREAM(13); + CREATE_SCREAM(14); + CREATE_SCREAM(15); +}; diff --git a/addons/fire/RscTitles.hpp b/addons/fire/RscTitles.hpp new file mode 100644 index 0000000000..3ccb8c349f --- /dev/null +++ b/addons/fire/RscTitles.hpp @@ -0,0 +1,41 @@ +class RscTitles { + class RscPicture; + class GVAR(onFire1) { + idd = -1; + movingEnable = "true"; + duration = 0.1; + fadein = 0.15; + fadeout = 0.75; + name = QGVAR(onFire1); + onload = QUOTE(with uiNamespace do {GVAR(onFireIndicator1) = _this select 0}); + + class controls { + class GVAR(indicator): RscPicture { + idc = -1; + type = 0; + style = 48; + colorBackground[] = {0, 0, 0, 0}; + colorText[] = {0.9, 0.9, 0.9, 0.6}; + font = "LucidaConsoleB"; + sizeEx = 0.023; + x = "SafeZoneX"; + y = "SafeZoneY"; + w = "SafeZoneW + 0.05"; + h = "SafeZoneH + 0.05"; + text = PATHTOF(data\overlay_burn_1.paa); + }; + }; + }; + + class GVAR(onFire2): GVAR(onFire1) { + idd = -1; + name = QGVAR(onFire2); + onload = QUOTE(with uiNamespace do {GVAR(onFireIndicator2) = _this select 0}); + + class controls: controls { + class GVAR(indicator): GVAR(indicator) { + text = PATHTOF(data\overlay_burn_2.paa); + }; + }; + }; +}; diff --git a/addons/fire/XEH_PREP.hpp b/addons/fire/XEH_PREP.hpp new file mode 100644 index 0000000000..511c9c0bb6 --- /dev/null +++ b/addons/fire/XEH_PREP.hpp @@ -0,0 +1,9 @@ +PREP(burn); +PREP(isBurning); +PREP(isPlant); +PREP(burnIndicator); +PREP(fireManagerPFH); + +PREP(medical_progress); +PREP(medical_success); +PREP(medical_canPatDown); diff --git a/addons/fire/XEH_postInit.sqf b/addons/fire/XEH_postInit.sqf new file mode 100644 index 0000000000..f89a062eff --- /dev/null +++ b/addons/fire/XEH_postInit.sqf @@ -0,0 +1,34 @@ +#include "script_component.hpp" + +[QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler; +[QGVAR(playScream), { + params ["_scream", "_source"]; + _source say3D _scream; +}] call CBA_fnc_addEventHandler; + +["ace_settingsInitialized", { + TRACE_1("settingsInit", GVAR(enabled)); + if (!GVAR(enabled)) exitWith {}; + + if (isServer) then { + [QGVAR(addFireSource), { + params ["_source", "_radius", "_intensity", "_key", ["_condition", { true }], ["_conditionArgs", []]]; + private _fireLogic = createVehicle ["ACE_LogicDummy", [0, 0, 0], [], 0, "NONE"]; + if (_source isEqualType objNull) then { + _fireLogic attachTo [_source]; + } else { + _fireLogic setPosASL _source; + }; + + [GVAR(fireSources), _key, [_fireLogic, _radius, _intensity, _condition, _conditionArgs]] call CBA_fnc_hashSet; + }] call CBA_fnc_addEventHandler; + + [QGVAR(removeFireSource), { + params ["_key"]; + [GVAR(fireSources), _key] call CBA_fnc_hashRem; + }] call CBA_fnc_addEventHandler; + + [{ _this call FUNC(fireManagerPFH) }, FIRE_MANAGER_PFH_DELAY, []] call CBA_fnc_addPerFrameHandler; + GVAR(fireSources) = [[], nil] call CBA_fnc_hashCreate; + }; +}] call CBA_fnc_addEventHandler; diff --git a/addons/fire/XEH_preInit.sqf b/addons/fire/XEH_preInit.sqf new file mode 100644 index 0000000000..e69c115927 --- /dev/null +++ b/addons/fire/XEH_preInit.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#include "initSettings.sqf" + +GVAR(burningPlants) = []; + +ADDON = true; diff --git a/addons/medical_vitals/XEH_postInit.sqf b/addons/fire/XEH_preStart.sqf similarity index 57% rename from addons/medical_vitals/XEH_postInit.sqf rename to addons/fire/XEH_preStart.sqf index 6eccf9d1dd..022888575e 100644 --- a/addons/medical_vitals/XEH_postInit.sqf +++ b/addons/fire/XEH_preStart.sqf @@ -1,2 +1,3 @@ #include "script_component.hpp" +#include "XEH_PREP.hpp" diff --git a/addons/fire/config.cpp b/addons/fire/config.cpp new file mode 100644 index 0000000000..ad67f9beab --- /dev/null +++ b/addons/fire/config.cpp @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common", "ace_medical_engine"}; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2", "Brandon (TCVM)"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgSounds.hpp" +#include "ACE_Medical_Treatment_Actions.hpp" +#include "RscTitles.hpp" diff --git a/addons/fire/data/overlay_burn_1.paa b/addons/fire/data/overlay_burn_1.paa new file mode 100644 index 0000000000..d3871b4b7b Binary files /dev/null and b/addons/fire/data/overlay_burn_1.paa differ diff --git a/addons/fire/data/overlay_burn_2.paa b/addons/fire/data/overlay_burn_2.paa new file mode 100644 index 0000000000..7f87ec9458 Binary files /dev/null and b/addons/fire/data/overlay_burn_2.paa differ diff --git a/addons/fire/functions/fnc_burn.sqf b/addons/fire/functions/fnc_burn.sqf new file mode 100644 index 0000000000..e520880966 --- /dev/null +++ b/addons/fire/functions/fnc_burn.sqf @@ -0,0 +1,348 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Makes object catch fire. Only call from events. Local effects only. + * Arbitrary values to ignite people. Assumed maximum is "10". + * + * Arguments: + * 0: Vehicle + * 1: Intensity of fire + * 2: Instigator of fire (default: objNull) + * + * Return Value: + * None + * + * Example: + * [player, 4] call ace_fire_fnc_burn + * + * Public: No + */ + +#define INTENSITY_LOSS 0.03 +#define INTENSITY_UPDATE 3 +#define BURN_PROPOGATE_UPDATE 1 +#define BURN_PROPOGATE_DISTANCE 2 +#define BURN_PROPOGATE_COUNTER_MAX 5 +#define MAX_INTENSITY 10 +#define MIN_INTENSITY 1 + +params ["_unit", "_intensity", ["_instigator", objNull]]; + +if (!GVAR(enabled)) exitWith {}; + +private _isBurning = [_unit] call FUNC(isBurning); +if (_isBurning) exitWith {}; + +[{ + // looped function + (_this getVariable "params") params ["_unit", "", "_instigator"]; + private _unitPos = getPosASL _unit; + + _intensity = _unit getVariable [QGVAR(intensity), 0]; + + if (surfaceIsWater _unitPos && {(_unitPos#2) < 1}) then { + _intensity = 0; + }; + + _fireParticle setDropInterval (0.01 max linearConversion [MAX_INTENSITY, MIN_INTENSITY, _intensity, 0.03, 0.1, false]); + _fireParticle setParticleParams [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 10, 32], // sprite sheet values + "", // animation name + "Billboard", // particle type + 1, // timer period + 0.7, // lifetime + "destructionEffect2", // position + [0, 0, 1], // move velocity + 0, // rotation velocity + 10, // weight + 7.9, // volume + 1, // rubbing + [0.3, 0.3], // size + [ + [1, 1, 1, -0], + [1, 1, 1, -1], + [1, 1, 1, -1], + [1, 1, 1, -1], + [1, 1, 1, -0] + ], // colour + [0.5, 1], // animation speed + 1, // random dir period + 0, // random dir intensity + "", // on timer script + "", // before destroy script + _unit, // particle source + 0, + false, + 0, + [[0.8, 0.6, 0.2, 1]] // emissive color + ]; + _fireParticle setParticleRandom [ + 0.04 * _intensity, // life time + [0.05, 0.05, 2], // position + [0.05 * _intensity, 0.05 * _intensity, 0.05 * _intensity], // move velocity + 0, // rotation velocity + 0.06 * _intensity, // size + [0, 0, 0, 0], // color + 0, // random direction period + 0 // random direction intensity + ]; + + _smokeParticle setParticleCircle [0, [0, 0, 0]]; + _smokeParticle setParticleRandom [ + 0, // life time + [0.25, 0.25, 0], // position + [0.2, 0.2, 0], // move velocity + 0, // rotation velocity + 0.25, // size + [0, 0, 0, 0.1], // color + 0, // random direction period + 0 // random direction intensity + ]; + _smokeParticle setParticleParams [ + ["\A3\data_f\ParticleEffects\Universal\Universal", 16, 7, 48], // sprite sheet values + "", // animation name + "Billboard", // particle type + 1, // timer period + 8, // lifetime + [0, 0, 1.1], // position + [0, 0, 1], // move velocity + 0, // rotation velocity + 10, // weight + 7.9, // volume + 0.066, // rubbing + [1, 3, 6], // size + [ + [0.5, 0.5, 0.5, 0.15], + [0.75, 0.75, 0.75, 0.075], + [1, 1, 1, 0] + ], // colour + [0.125], // animation speed + 1, // random dir period + 0, // random dir intensity + "", // on timer script + "", // before destroy script + _unit // particle source + ]; + _smokeParticle setDropInterval 0.15; + + _fireLight setLightBrightness ((_intensity * 3) / 10); + _lightFlare setLightBrightness (_intensity / 30); + + private _distanceToUnit = (_unit distance ace_player); + _fireLight setLightAttenuation [1, 10 max (5 min (10 - _intensity)), 0, 15]; + _lightFlare setLightFlareSize (_intensity * (3 / 4)) * FLARE_SIZE_MODIFIER; + + if (!GVAR(enableFlare)) then { + _lightFlare setLightFlareSize 0; + }; + + // always keep flare visible to perceiving unit as long as it isnt the player + if !(_unit isEqualTo ace_player) then { + private _relativeAttachPoint = [0, 0, 0.3]; + if (_distanceToUnit > 1.5) then { + _relativeAttachPoint = (vectorNormalized (_unit worldToModelVisual (getPos ace_player))) vectorMultiply linearConversion [5, 30, _distanceToUnit, 0.5, 1.5]; + _relativeAttachPoint set [2, 0.3 + ((_unit selectionPosition "pelvis") select 2)]; + }; + _lightFlare attachTo [_unit, _relativeAttachPoint]; + }; + + if (!isGamePaused) then { + // If the unit goes to spectator alive _unit == true and they will be on fire and still take damage + // Only workaround I could think of, kinda clunky + if (_isThisUnitAlive) then { + _isThisUnitAlive = (alive _unit) && { getNumber ((configOf _unit) >> "isPlayableLogic") != 1 }; + }; + + // propagate fire + if ((CBA_missionTime - _lastPropogateUpdate) >= BURN_PROPOGATE_UPDATE) then { + _lastPropogateUpdate = CBA_missionTime; + if !([ace_player] call FUNC(isBurning)) then { + if ((vehicle _unit) isEqualTo (vehicle ace_player)) then { + if (0.5 > random 1) then { + [QGVAR(burn), [ace_player, _intensity * (7 / 8), _instigator]] call CBA_fnc_globalEvent; + }; + } else { + if ((ace_player isKindOf "Man") && { !(_unit isEqualTo ace_player) }) then { + private _burnCounter = ace_player getVariable [QGVAR(burnCounter), 0]; + if (_distanceToUnit < BURN_PROPOGATE_DISTANCE) then { + if (_burnCounter < BURN_PROPOGATE_COUNTER_MAX) then { + _burnCounter = _burnCounter + 1; + } else { + [QGVAR(burn), [ace_player, _intensity * (3 / 4), _instigator]] call CBA_fnc_globalEvent; + }; + } else { + _burnCounter = 0; + }; + ace_player setVariable [QGVAR(burnCounter), _burnCounter]; + }; + }; + }; + }; + + // update intensity/fire reactions + if ((CBA_missionTime - _lastIntensityUpdate) >= INTENSITY_UPDATE) then { + _lastIntensityUpdate = CBA_missionTime; + _intensity = _intensity - INTENSITY_LOSS - (rain / 10); + if (local _unit) then { + if (_isThisUnitAlive) then { + if !(IS_UNCONSCIOUS(_unit)) then { + if !(isPlayer _unit) then { + private _sdr = _unit getVariable [QGVAR(stopDropRoll), false]; + if ((_unit isEqualTo vehicle _unit) && (_sdr || ({ 0.05 > random 1 }))) then { + _unit setVariable [QGVAR(stopDropRoll), true]; + if !(_sdr) then { + TRACE_1("stop, drop, roll!", _unit); + _unit setUnitPos "DOWN"; + doStop _unit; + }; + // queue up a bunch of animations + for "_i" from 0 to 2 do { + [_unit, selectRandom ["amovppnemstpsnonwnondnon_amovppnemevasnonwnondl", "amovppnemstpsnonwnondnon_amovppnemevasnonwnondr"], 0] call EFUNC(common,doAnimation); + }; + _intensity = _intensity - (1 / _intensity); + } else { + private _group = (group _unit); + private _vehicle = vehicle _unit; + + if (_vehicle != _unit) then { + TRACE_1("Ejecting", _unit); + _unit leaveVehicle _vehicle; + unassignVehicle _unit; + _unit action ["eject",_vehicle]; + }; + _unit disableAI "TARGET"; + _unit disableAI "AUTOTARGET"; + + // Run away + if (leader _group != _unit) then { + [_unit] join grpNull; + }; + _unit doMove ((getPosATL _unit) getPos [20 + random 35, floor (random 360)]); + _unit setSpeedMode "FULL"; + _unit setSuppression 1; + }; + } else { + if ((animationState _unit) in PRONE_ROLLING_ANIMS) then { + // decrease intensity of burn, but if its too high this wont do anything substantial + _intensity = _intensity - (1 / _intensity); + }; + }; + + if ((_unit isEqualTo vehicle _unit) && { !(currentWeapon _unit isEqualTo "") }) then { + [_unit] call EFUNC(hitreactions,throwWeapon); + }; + + private _soundID = floor (1 + random 15); + private _sound = format [QGVAR(scream_%1), _soundID]; + [QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent; + }; + + // Common burn areas are the hands and face https://www.ncbi.nlm.nih.gov/pubmed/16899341/ + private _woundSelection = ["Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"] selectRandomWeighted [0.77, 0.5, 0.8, 0.8, 0.3, 0.3]; + if (GET_PAIN_PERCEIVED(_unit) < (PAIN_UNCONSCIOUS + random 0.2)) then { + // keep pain around unconciousness limit to allow for more fun interactions + [_unit, _intensity / MAX_INTENSITY, _woundSelection, "burn", _instigator] call EFUNC(medical,addDamageToUnit); + } else { + [_unit, 0.15, _woundSelection, "unknown", _instigator] call EFUNC(medical,addDamageToUnit); + }; + }; + _unit setVariable [QGVAR(intensity), _intensity, true]; // globally sync intensity across all clients to make sure simulation is deterministic + }; + }; + + private _burnIndicatorPFH = _unit getVariable [QGVAR(burnUIPFH), -1]; + if (_unit isEqualTo ace_player && { _isThisUnitAlive } && { _burnIndicatorPFH < 0 }) then { + _burnIndicatorPFH = [FUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler; + _unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH]; + }; + }; +}, 0, [_unit, _intensity, _instigator], { + TRACE_1("burn init",GVAR(enableFlare)); + // init function + private _params = _this getVariable "params"; + _params params ["_unit", "_startingIntensity"]; + + _intensity = _startingIntensity; + private _unitPos = getPos _unit; + + _fireParticle = "#particlesource" createVehicleLocal _unitPos; + _fireParticle attachTo [_unit, [0, 0, 0]]; + _fireParticle setDropInterval 0.03; + + _smokeParticle = "#particlesource" createVehicleLocal _unitPos; + + _fireLight = "#lightpoint" createVehicleLocal _unitPos; + _fireLight setLightIntensity 0; + _fireLight setLightAmbient [0.8, 0.6, 0.2]; + _fireLight setLightColor [1, 0.5, 0.4]; + _fireLight attachTo [_unit, [0, 0, 0]]; + _fireLight setLightDayLight false; + + _lightFlare = "#lightpoint" createVehicleLocal _unitPos; + _lightFlare setLightIntensity 0; + _lightFlare setLightColor [1, 0.8, 0.8]; + _lightFlare setLightUseFlare true; + _lightFlare setLightFlareMaxDistance 100; + _lightFlare setLightFlareSize 0; + + if !(_unit isEqualTo ace_player) then { + private _relativeAttachPoint = (vectorNormalized (_unit worldToModelVisual (getPos ace_player))) vectorMultiply 1; + _relativeAttachPoint set [2, 0.5]; + _lightFlare attachTo [_unit, _relativeAttachPoint]; + } else { + _lightFlare attachTo [_unit, [0, 0, 0.3]]; + }; + + if (isServer) then { + _fireSound = createSoundSource ["Sound_Fire", _unitPos, [], 0]; + _fireSound attachTo [_unit, [0, 0, 0], "destructionEffect1"]; + }; + + _unit setVariable [QGVAR(burning), true]; + _unit setVariable [QGVAR(intensity), _intensity]; + _unit setVariable [QGVAR(burnUIPFH), -1]; + + if (local _unit) then { + if (_unit isEqualTo ace_player) then { + private _burnIndicatorPFH = [FUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler; + _unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH]; + }; + + private _soundID = floor (1 + random 15); + private _sound = format [QGVAR(scream_%1), _soundID]; + [QGVAR(playScream), [_sound, _unit]] call CBA_fnc_globalEvent; + }; + + _lastIntensityUpdate = 0; + _lastPropogateUpdate = 0; + + _isThisUnitAlive = true; +}, { + (_this getVariable "params") params ["_unit"]; + + // deinit function + deleteVehicle _fireParticle; + deleteVehicle _smokeParticle; + deleteVehicle _fireLight; + deleteVehicle _lightFlare; + deleteVehicle _fireSound; + + if (local _unit) then { + if (!isPlayer _unit) then { + _unit setUnitPos "AUTO"; + _unit setVariable [QGVAR(stopDropRoll), false]; + }; + }; + _unit setVariable [QGVAR(burning), false]; +}, { + // run condition + true +}, { + // exit condition + (_this getVariable "params") params ["_unit"]; + + private _unitAlive = (alive _unit) && { getNumber ((configOf _unit) >> "isPlayableLogic") != 1 }; + private _unitIsUnit = { (_unit != vehicle _unit) && { isNull vehicle _unit } }; + + !_unitAlive || _unitIsUnit || { _intensity <= MIN_INTENSITY } || { !([_unit] call FUNC(isBurning)) } +}, ["_intensity", "_fireParticle", "_smokeParticle", "_fireLight", "_fireSound", "_lightFlare", "_lastIntensityUpdate", "_lastPropogateUpdate", "_isThisUnitAlive"]] call CBA_fnc_createPerFrameHandlerObject; diff --git a/addons/fire/functions/fnc_burnIndicator.sqf b/addons/fire/functions/fnc_burnIndicator.sqf new file mode 100644 index 0000000000..d5c9de25f3 --- /dev/null +++ b/addons/fire/functions/fnc_burnIndicator.sqf @@ -0,0 +1,36 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Run once per second in a PFH. Update screen effects with burn indicator. + * + * Arguments: + * 0: Unit on fire + * 1: PFH Handle + * + * Return Value: + * None + * + * Example: + * [player, 4] call ace_fire_fnc_burnIndicator + * + * Public: No + */ + +params ["_unit", "_pfhHandle"]; + +if !(IS_UNCONSCIOUS(_unit)) then { + private _iteration = _unit getVariable [QGVAR(indicatorIteration), 0]; + if (_iteration == 0) then { + QGVAR(indicatorLayer) cutRsc [QGVAR(onFire1), "PLAIN"]; + _iteration = 1; + } else { + QGVAR(indicatorLayer) cutRsc [QGVAR(onFire2), "PLAIN"]; + _iteration = 0; + }; + _unit setVariable [QGVAR(indicatorIteration), _iteration]; +}; + +if (!([_unit] call FUNC(isBurning)) || { !alive _unit }) then { + [_pfhHandle] call CBA_fnc_removePerFrameHandler; + _unit setVariable [QGVAR(burnUIPFH), -1]; +}; diff --git a/addons/fire/functions/fnc_fireManagerPFH.sqf b/addons/fire/functions/fnc_fireManagerPFH.sqf new file mode 100644 index 0000000000..8f75091190 --- /dev/null +++ b/addons/fire/functions/fnc_fireManagerPFH.sqf @@ -0,0 +1,43 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Handles various fire objects and determines if local units deserves to get burned. + * Used to handle external burning objects, not used internally because internal methods are more performant. + * + * Arguments: + * 0: Unit on fire + * 1: PFH Handle + * + * Return Value: + * None + * + * Example: + * [FUNC(fireManagerPFH), 0.25, [_unit]] call CBA_fnc_addPerFrameHandler + * + * Public: No + */ + +params ["_args", "_handle"]; + +[GVAR(fireSources), { + _value params ["", "", "", "_condition", "_conditionArgs"]; + _conditionArgs call _condition; +}] call CBA_fnc_hashFilter; + +[GVAR(fireSources), { + _value params ["_source", "_radius", "_intensity"]; + private _attachedObject = attachedTo _source; + private _sourcePos = getPosATL _source; + if !(_attachedObject isEqualTo objNull) then { + _sourcePos = getPosATL _attachedObject; + }; + + private _nearEntities = _sourcePos nearEntities ["Man", _radius]; + { + private _burning = [_x] call FUNC(isBurning); + if !(_burning) then { + private _distancePercent = 1 - ((_sourcePos distance _x) / _radius); + [QGVAR(burn), [_x, _intensity * _distancePercent]] call CBA_fnc_globalEvent; + }; + } forEach _nearEntities; +}] call CBA_fnc_hashEachPair; diff --git a/addons/fire/functions/fnc_isBurning.sqf b/addons/fire/functions/fnc_isBurning.sqf new file mode 100644 index 0000000000..1e62f39309 --- /dev/null +++ b/addons/fire/functions/fnc_isBurning.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" +/* + * Author: commy2 + * Check if object is burning. + * + * Arguments: + * 0: Vehicle + * + * Return Value: + * None + * + * Example: + * player call ace_fire_fnc_isBurning + * + * Public: Yes + */ + +params [["_unit", objNull, [objNull]]]; + +_unit getVariable [QGVAR(burning), false] || { + GVAR(burningPlants) = GVAR(burningPlants) select {!isNull _x}; + _unit in GVAR(burningPlants) +} diff --git a/addons/fire/functions/fnc_isPlant.sqf b/addons/fire/functions/fnc_isPlant.sqf new file mode 100644 index 0000000000..4fd982a7ce --- /dev/null +++ b/addons/fire/functions/fnc_isPlant.sqf @@ -0,0 +1,20 @@ +#include "script_component.hpp" +/* + * Author: commy2 + * Check if object is a map placed bush or tree. + * + * Arguments: + * 0: Object + * + * Return Value: + * Is bush or tree? + * + * Example: + * cursorObject call ace_fire_fnc_isPlant + * + * Public: No + */ + +params [["_object", objNull, [objNull]]]; + +_object in nearestTerrainObjects [_object, ["TREE", "SMALL TREE", "BUSH"], 0.1] diff --git a/addons/fire/functions/fnc_medical_canPatDown.sqf b/addons/fire/functions/fnc_medical_canPatDown.sqf new file mode 100644 index 0000000000..3bf959330f --- /dev/null +++ b/addons/fire/functions/fnc_medical_canPatDown.sqf @@ -0,0 +1,21 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Returns if unit can pat down fire or not. + * + * Arguments: + * 0: Medic (not used) + * 1: Patient + * + * Return Value: + * Can Pat-Down + * + * Example: + * [nil, player] call ace_fire_fnc_medical_canPatDown + * + * Public: No + */ + +params ["", "_patient"]; + +[_patient] call FUNC(isBurning) diff --git a/addons/fire/functions/fnc_medical_progress.sqf b/addons/fire/functions/fnc_medical_progress.sqf new file mode 100644 index 0000000000..fc78befea0 --- /dev/null +++ b/addons/fire/functions/fnc_medical_progress.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Checks if patient is still burning for medical progress to continue. + * + * Arguments: + * 0: Arguments + * 0: Medic + * 1: Patient + * + * Return Value: + * Continue pat down + * + * Example: + * [[player, cursorObject]] call ace_fire_fnc_medical_progress + * + * Public: No + */ + +params ["_args"]; +_args params ["_medic", "_patient"]; + +[_patient] call FUNC(isBurning) diff --git a/addons/fire/functions/fnc_medical_success.sqf b/addons/fire/functions/fnc_medical_success.sqf new file mode 100644 index 0000000000..8a37ebd76d --- /dev/null +++ b/addons/fire/functions/fnc_medical_success.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Decreases burning intensity on successful medical action. + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call ace_fire_fnc_medical_success + * + * Public: No + */ + +params ["_medic", "_patient"]; + +private _intensity = _patient getVariable [QGVAR(intensity), 0]; +_intensity = _intensity * (4/5); +_patient setVariable [QGVAR(intensity), _intensity, true]; diff --git a/addons/fire/functions/script_component.hpp b/addons/fire/functions/script_component.hpp new file mode 100644 index 0000000000..782fabed76 --- /dev/null +++ b/addons/fire/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\fire\script_component.hpp" diff --git a/addons/fire/initSettings.sqf b/addons/fire/initSettings.sqf new file mode 100644 index 0000000000..6919c35f10 --- /dev/null +++ b/addons/fire/initSettings.sqf @@ -0,0 +1,19 @@ +[ + QGVAR(enabled), "CHECKBOX", + ["STR_A3_OPTIONS_ENABLED", LSTRING(setting_description)], + LSTRING(category_displayName), + true, // default value + true, // isGlobal + {[QGVAR(fireEnabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart +] call CBA_settings_fnc_init; + +[ + QGVAR(enableFlare), "CHECKBOX", + [LSTRING(setting_flareEnable), LSTRING(setting_flareDescription)], + LSTRING(category_displayName), + false, // default value + true, // isGlobal + {[QGVAR(flareEnabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart +] call CBA_settings_fnc_init; diff --git a/addons/fire/script_component.hpp b/addons/fire/script_component.hpp new file mode 100644 index 0000000000..289e3d13f1 --- /dev/null +++ b/addons/fire/script_component.hpp @@ -0,0 +1,32 @@ +#define COMPONENT fire +#define COMPONENT_BEAUTIFIED Fire +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_FIRE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_FIRE + #define DEBUG_SETTINGS DEBUG_SETTINGS_FIRE +#endif + +#include "\z\ace\addons\main\script_macros.hpp" +#include "\z\ace\addons\medical_engine\script_macros_medical.hpp" + +#define FIRE_MANAGER_PFH_DELAY 0.25 +#define FLARE_SIZE_MODIFIER 5 +#define PRONE_ROLLING_ANIMS [\ + "amovppnemstpsnonwnondnon_amovppnemevasnonwnondl",\ + "amovppnemstpsnonwnondnon_amovppnemevasnonwnondr",\ + "amovppnemstpsraswrfldnon_amovppnemevaslowwrfldl",\ + "amovppnemstpsraswrfldnon_amovppnemevaslowwrfldr",\ + "amovppnemstpsraswpstdnon_amovppnemevaslowwpstdl",\ + "amovppnemstpsraswpstdnon_amovppnemevaslowwpstdr",\ + "amovppnemstpsoptwbindnon_amovppnemevasoptwbindl",\ + "amovppnemstpsoptwbindnon_amovppnemevasoptwbindr"\ +] diff --git a/addons/fire/sounds/scream1.ogg b/addons/fire/sounds/scream1.ogg new file mode 100644 index 0000000000..c705370958 Binary files /dev/null and b/addons/fire/sounds/scream1.ogg differ diff --git a/addons/fire/sounds/scream10.ogg b/addons/fire/sounds/scream10.ogg new file mode 100644 index 0000000000..1c42e762e1 Binary files /dev/null and b/addons/fire/sounds/scream10.ogg differ diff --git a/addons/fire/sounds/scream11.ogg b/addons/fire/sounds/scream11.ogg new file mode 100644 index 0000000000..c215ad3a61 Binary files /dev/null and b/addons/fire/sounds/scream11.ogg differ diff --git a/addons/fire/sounds/scream12.ogg b/addons/fire/sounds/scream12.ogg new file mode 100644 index 0000000000..11bc13fd91 Binary files /dev/null and b/addons/fire/sounds/scream12.ogg differ diff --git a/addons/fire/sounds/scream13.ogg b/addons/fire/sounds/scream13.ogg new file mode 100644 index 0000000000..726cd87be5 Binary files /dev/null and b/addons/fire/sounds/scream13.ogg differ diff --git a/addons/fire/sounds/scream14.ogg b/addons/fire/sounds/scream14.ogg new file mode 100644 index 0000000000..eff98f7ebc Binary files /dev/null and b/addons/fire/sounds/scream14.ogg differ diff --git a/addons/fire/sounds/scream15.ogg b/addons/fire/sounds/scream15.ogg new file mode 100644 index 0000000000..fa7c5d884b Binary files /dev/null and b/addons/fire/sounds/scream15.ogg differ diff --git a/addons/fire/sounds/scream2.ogg b/addons/fire/sounds/scream2.ogg new file mode 100644 index 0000000000..8f79081fcd Binary files /dev/null and b/addons/fire/sounds/scream2.ogg differ diff --git a/addons/fire/sounds/scream3.ogg b/addons/fire/sounds/scream3.ogg new file mode 100644 index 0000000000..2749b01a74 Binary files /dev/null and b/addons/fire/sounds/scream3.ogg differ diff --git a/addons/fire/sounds/scream4.ogg b/addons/fire/sounds/scream4.ogg new file mode 100644 index 0000000000..c92497e869 Binary files /dev/null and b/addons/fire/sounds/scream4.ogg differ diff --git a/addons/fire/sounds/scream5.ogg b/addons/fire/sounds/scream5.ogg new file mode 100644 index 0000000000..23fb6c7ed9 Binary files /dev/null and b/addons/fire/sounds/scream5.ogg differ diff --git a/addons/fire/sounds/scream6.ogg b/addons/fire/sounds/scream6.ogg new file mode 100644 index 0000000000..9a14a69e74 Binary files /dev/null and b/addons/fire/sounds/scream6.ogg differ diff --git a/addons/fire/sounds/scream7.ogg b/addons/fire/sounds/scream7.ogg new file mode 100644 index 0000000000..ab1970ee53 Binary files /dev/null and b/addons/fire/sounds/scream7.ogg differ diff --git a/addons/fire/sounds/scream8.ogg b/addons/fire/sounds/scream8.ogg new file mode 100644 index 0000000000..688460e934 Binary files /dev/null and b/addons/fire/sounds/scream8.ogg differ diff --git a/addons/fire/sounds/scream9.ogg b/addons/fire/sounds/scream9.ogg new file mode 100644 index 0000000000..72ef6e4f7c Binary files /dev/null and b/addons/fire/sounds/scream9.ogg differ diff --git a/addons/fire/stringtable.xml b/addons/fire/stringtable.xml new file mode 100644 index 0000000000..7292b1fe40 --- /dev/null +++ b/addons/fire/stringtable.xml @@ -0,0 +1,29 @@ + + + + + ACE Fire + ACE 火災 + + + Pat Down Fire + 火を叩き消す + + + Patting Down Fire + 火を叩き消しています + + + Allow units to catch fire + ユニットへ着火を許可 + + + Enable fire-flare at night + 夜間にフレア効果を有効化 + + + Uses a flare effect to increase fire intensity at night + 夜間に火災の強さを上昇させるフレア効果を有効化します。 + + + diff --git a/addons/flashlights/CfgEventHandlers.hpp b/addons/flashlights/CfgEventHandlers.hpp index bf70b57b88..123f7553aa 100644 --- a/addons/flashlights/CfgEventHandlers.hpp +++ b/addons/flashlights/CfgEventHandlers.hpp @@ -1,5 +1,5 @@ class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_postInitClient)); }; }; diff --git a/addons/flashlights/CfgVehicles.hpp b/addons/flashlights/CfgVehicles.hpp index dbdf5421bc..6c3e32c1c7 100644 --- a/addons/flashlights/CfgVehicles.hpp +++ b/addons/flashlights/CfgVehicles.hpp @@ -59,8 +59,8 @@ class CfgVehicles { editorSubcategory = "EdSubcat_InventoryItems"; vehicleClass = "Items"; - class TransportItems { - MACRO_ADDITEM(ACE_Flashlight_Maglite_ML300L,1); + class TransportWeapons { + MACRO_ADDWEAPON(ACE_Flashlight_Maglite_ML300L,1); }; }; @@ -97,7 +97,9 @@ class CfgVehicles { MACRO_ADDITEM(ACE_Flashlight_MX991,12); MACRO_ADDITEM(ACE_Flashlight_KSF1,12); MACRO_ADDITEM(ACE_Flashlight_XL50,12); - MACRO_ADDITEM(ACE_Flashlight_Maglite_ML300L,2); + }; + class TransportWeapons { + MACRO_ADDWEAPON(ACE_Flashlight_Maglite_ML300L,2); }; }; }; diff --git a/addons/flashlights/README.md b/addons/flashlights/README.md index 6a04b78091..214dc3dea1 100644 --- a/addons/flashlights/README.md +++ b/addons/flashlights/README.md @@ -2,10 +2,3 @@ ace_flashlights ======= Flashlights for use on map and to attach to player. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [voiper](https://github.com/voiperr) diff --git a/addons/flashlights/stringtable.xml b/addons/flashlights/stringtable.xml index 478b1da2c8..16aaea33e4 100644 --- a/addons/flashlights/stringtable.xml +++ b/addons/flashlights/stringtable.xml @@ -133,7 +133,7 @@ Torcia a LED ad alta potenza Silná LED svítilna. Puissante lampe torche à LED. - 協力な LED のフラッシュライト。 + 強力な LED のフラッシュライト。 Güçlü LED el feneri Linterna LED potente Мощный светодиодный фонарь. diff --git a/addons/flashsuppressors/CfgWeapons.hpp b/addons/flashsuppressors/CfgWeapons.hpp index 957bbd7def..aba24e1809 100644 --- a/addons/flashsuppressors/CfgWeapons.hpp +++ b/addons/flashsuppressors/CfgWeapons.hpp @@ -70,20 +70,6 @@ class MuzzleSlot_762: MuzzleSlot { }; class CfgWeapons { - class Rifle_Base_F; - class Rifle_Long_Base_F: Rifle_Base_F { - class WeaponSlotsInfo; - }; - /* Other */ - class LMG_Mk200_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot_65 { - compatibleItems[] += {"ACE_muzzle_mzls_H"}; // uses array instead of inherited class - }; - }; - }; - - /* Flashsuppressors */ class ItemCore; diff --git a/addons/flashsuppressors/README.md b/addons/flashsuppressors/README.md index 29b66420c5..f366b2d821 100644 --- a/addons/flashsuppressors/README.md +++ b/addons/flashsuppressors/README.md @@ -2,11 +2,3 @@ ace_flashsuppressors ==================== Allows the flash suppressors that are already in the game to be used. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/fonts/README.md b/addons/fonts/README.md index 7e6f704d67..98e530a75d 100644 --- a/addons/fonts/README.md +++ b/addons/fonts/README.md @@ -2,10 +2,3 @@ ace_fonts ======== Custom fonts including fixed-width font. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [jaynus](https://github.com/jaynus/) diff --git a/addons/fortify/$PBOPREFIX$ b/addons/fortify/$PBOPREFIX$ new file mode 100644 index 0000000000..9d0a9e26d8 --- /dev/null +++ b/addons/fortify/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\fortify diff --git a/addons/fortify/ACEX_Fortify_Presets.hpp b/addons/fortify/ACEX_Fortify_Presets.hpp new file mode 100644 index 0000000000..889939bb1c --- /dev/null +++ b/addons/fortify/ACEX_Fortify_Presets.hpp @@ -0,0 +1,67 @@ +class ACEX_Fortify_Presets { + class small { + displayName = CSTRING(small); + objects[] = { + {"Land_BagFence_Round_F", 5}, + {"Land_BagFence_Short_F", 5}, + {"Land_BagFence_Long_F", 10}, + {"Land_Plank_01_4m_F", 10}, + {"Land_BagBunker_Small_F", 25} + }; + }; + class smallGreen { + displayName = CSTRING(smallGreen); + objects[] = { + {"Land_BagFence_01_round_green_F", 5}, + {"Land_BagFence_01_short_green_F", 5}, + {"Land_BagFence_01_long_green_F", 10}, + {"Land_Plank_01_4m_F", 10}, + {"Land_WoodenShelter_01_F", 25} + }; + }; + class medium { + displayName = CSTRING(medium); + objects[] = { + {"Land_HBarrierTower_F", 100}, + {"Land_HBarrierWall4_F", 25}, + {"Land_HBarrierWall_corner_F", 25}, + {"Land_HBarrier_1_F", 5} + }; + }; + class mediumGreen { + displayName = CSTRING(mediumGreen); + objects[] = { + {"Land_HBarrier_01_big_tower_green_F", 100}, + {"Land_HBarrier_01_wall_4_green_F", 25}, + {"Land_HBarrier_01_wall_corner_green_F", 25}, + {"Land_HBarrier_01_line_1_green_F", 5} + }; + }; + class big { + displayName = CSTRING(big); + objects[] = { + {"Land_BagBunker_Tower_F", 50}, + {"Land_BagBunker_Large_F", 100}, + {"Land_BagBunker_Small_F", 25}, + {"Land_Cargo_Patrol_V1_F", 100}, + {"Land_BagFence_Round_F", 5}, + {"Land_BagFence_Short_F", 5}, + {"Land_BagFence_Long_F", 10} + }; + }; + class bigGreen { + displayName = CSTRING(bigGreen); + objects[] = { + {"Land_PillboxBunker_01_big_F", 100}, + {"Land_PillboxWall_01_3m_F", 10}, + {"Land_PillboxWall_01_6m_F", 15}, + {"Land_PillboxBunker_01_hex_F", 50}, + {"Land_PillboxBunker_01_rectangle_F", 50}, + {"Land_Plank_01_8m_F", 10}, + {"Land_Plank_01_4m_F", 5}, + {"Land_BagFence_01_round_green_F", 5}, + {"Land_BagFence_01_short_green_F", 5}, + {"Land_BagFence_01_long_green_F", 10} + }; + }; +}; diff --git a/addons/fortify/Cfg3DEN.hpp b/addons/fortify/Cfg3DEN.hpp new file mode 100644 index 0000000000..ce6085cf77 --- /dev/null +++ b/addons/fortify/Cfg3DEN.hpp @@ -0,0 +1,30 @@ +class Cfg3DEN { + class Attributes { + class Default; + class Title: Default { + class Controls { + class Title; + }; + }; + class Combo: Title { + class Controls: Controls { + class Title: Title {}; + class Value; + }; + }; + class GVAR(presetSelection): Combo { + class Controls: Controls { + class Title: Title {}; + class Value: Value { + delete Items; + class ItemsConfig { + path[] = {"ACEX_Fortify_Presets"}; + localConfig = 1; + propertyText = "displayName"; + sort = 1; + }; + }; + }; + }; + }; +}; diff --git a/addons/fortify/CfgEventHandlers.hpp b/addons/fortify/CfgEventHandlers.hpp new file mode 100644 index 0000000000..b468b9e8b5 --- /dev/null +++ b/addons/fortify/CfgEventHandlers.hpp @@ -0,0 +1,23 @@ +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)); + }; +}; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_SCRIPT(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/fortify/CfgVehicles.hpp b/addons/fortify/CfgVehicles.hpp new file mode 100644 index 0000000000..db739c4dbb --- /dev/null +++ b/addons/fortify/CfgVehicles.hpp @@ -0,0 +1,101 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ADDON { + displayName = CSTRING(Fortify); + condition = QUOTE([_player] call FUNC(canFortify)); + modifierFunction = QUOTE(call FUNC(modifyAction)); + insertChildren = QUOTE(_this call FUNC(addActions)); + statement = ""; + exceptions[] = {}; + showDisabled = 0; + priority = 1; + }; + }; + }; + class Logic; + class Module_F: Logic { + class AttributesBase { + class Default; + class Combo; + class Edit; + class Checkbox; + class ModuleDescription; + }; + class ModuleDescription; + }; + class ACE_Module: Module_F {}; + class XGVAR(setupModule): ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACEX"; + displayName = CSTRING(Fortify); + function = QFUNC(setupModule); + scope = 2; + isGlobal = 0; + class Attributes: AttributesBase { + class Side: Combo { + displayName = "$STR_eval_typeside"; + property = QGVAR(setupModule_Side); + typeName = "NUMBER"; + defaultValue = 1; + class values { + class West { + name = "$STR_WEST"; + value = 1; + }; + class East { + name = "$STR_east"; + value = 2; + }; + class Indp { + name = "$STR_guerrila"; + value = 3; + }; + class Civ { + name = "$STR_civilian"; + value = 4; + }; + }; + }; + class Preset: Default { + displayName = "$STR_controls_presets"; + property = QGVAR(setupModule_Preset); + control = QGVAR(presetSelection); + typeName = "STRING"; + defaultValue = 0; + }; + class Budget: Edit { + property = QGVAR(setupModule_Budget); + displayName = CSTRING(budget); + typeName = "NUMBER"; + defaultValue = -1; + }; + class AddToolItem: Checkbox { + property = QGVAR(setupModule_AddToolItem); + displayName = CSTRING(addToolItem); + typeName = "BOOL"; + }; + class ModuleDescription: ModuleDescription {}; + }; + + class ModuleDescription: ModuleDescription { + description = CSTRING(moduleDescription); + }; + }; + + class XGVAR(buildLocationModule): ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACEX"; + displayName = CSTRING(buildLocationModule); + scope = 2; + isGlobal = 1; + canSetArea = 1; + function = QFUNC(buildLocationModule); + class AttributeValues { + size3[] = {300, 300, -1}; + IsRectangle = 1; + }; + }; + +}; diff --git a/addons/fortify/CfgWeapons.hpp b/addons/fortify/CfgWeapons.hpp new file mode 100644 index 0000000000..4c2bb9eaa7 --- /dev/null +++ b/addons/fortify/CfgWeapons.hpp @@ -0,0 +1,16 @@ +class CfgWeapons { + class ACE_ItemCore; + class CBA_MiscItem_ItemInfo; + + class ACE_Fortify: ACE_ItemCore { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(FortifyItem_name); + descriptionShort = ""; + model = "\A3\Structures_F\Items\Tools\Hammer_F.p3d"; + picture = QPATHTOF(UI\hammer_ca.paa); + scope = 2; + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 0; + }; + }; +}; diff --git a/addons/fortify/README.md b/addons/fortify/README.md new file mode 100644 index 0000000000..988699a706 --- /dev/null +++ b/addons/fortify/README.md @@ -0,0 +1,10 @@ +ace_fortify +============ + +Allows quick placement of fortifications. + +## ACEX Conversion - things still using acex prefix +- **Some** settings +- CfgVehicles Module Classnames +- `ACEX_Fortify_Presets` config +- Events (`acex_fortify_objectPlaced`, `acex_fortify_objectDeleted`, `acex_fortify_onDeployStart`) diff --git a/addons/fortify/UI/hammer_ca.paa b/addons/fortify/UI/hammer_ca.paa new file mode 100644 index 0000000000..a71d5fb197 Binary files /dev/null and b/addons/fortify/UI/hammer_ca.paa differ diff --git a/addons/fortify/XEH_PREP.hpp b/addons/fortify/XEH_PREP.hpp new file mode 100644 index 0000000000..b2feda35fa --- /dev/null +++ b/addons/fortify/XEH_PREP.hpp @@ -0,0 +1,17 @@ +ACEX_PREP(addDeployHandler); +ACEX_PREP(registerObjects); +ACEX_PREP(canFortify); +ACEX_PREP(deployObject); +ACEX_PREP(deployConfirm); +ACEX_PREP(handleScrollWheel); +ACEX_PREP(addActions); +ACEX_PREP(getCost); +ACEX_PREP(getBudget); +ACEX_PREP(updateBudget); +ACEX_PREP(axisLengths); +ACEX_PREP(handleChatCommand); +ACEX_PREP(parseSide); +ACEX_PREP(getPlaceableSet); +ACEX_PREP(modifyAction); +ACEX_PREP(setupModule); +ACEX_PREP(buildLocationModule); diff --git a/addons/fortify/XEH_missionDisplayLoad.sqf b/addons/fortify/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..9f07b0bc29 --- /dev/null +++ b/addons/fortify/XEH_missionDisplayLoad.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", { + (_this select 1) call FUNC(handleScrollWheel); +}]; + +_display displayAddEventHandler ["MouseButtonDown", { + if (GVAR(isPlacing) != PLACE_WAITING) exitWith {false}; + if ((_this select 1) != 1) exitWith {false}; + GVAR(isPlacing) = PLACE_CANCEL +}]; diff --git a/addons/fortify/XEH_postInit.sqf b/addons/fortify/XEH_postInit.sqf new file mode 100644 index 0000000000..f14c4cb8f7 --- /dev/null +++ b/addons/fortify/XEH_postInit.sqf @@ -0,0 +1,65 @@ +#include "script_component.hpp" + +if (isServer) then { + [QGVAR(registerObjects), LINKFUNC(registerObjects)] call CBA_fnc_addEventHandler; + [QXGVAR(objectPlaced), { + params ["_unit", "_side", "_object"]; + TRACE_3("objectPlaced",_unit,_side,_object); + private _jipID = [QGVAR(addActionToObject), [_side, _object]] call CBA_fnc_globalEventJIP; + [_jipID, _object] call CBA_fnc_removeGlobalEventJIP; // idealy this function should be called on the server + }] call CBA_fnc_addEventHandler; +}; + +if (!hasInterface) exitWith {}; + +GVAR(isPlacing) = PLACE_CANCEL; +["ace_interactMenuOpened", {GVAR(isPlacing) = PLACE_CANCEL}] call CBA_fnc_addEventHandler; + +GVAR(objectRotationX) = 0; +GVAR(objectRotationY) = 0; +GVAR(objectRotationZ) = 0; + +// Register CBA Chat command for admins (Example: #ace-fortify west small 200) +["ace-fortify", LINKFUNC(handleChatCommand), "admin"] call CBA_fnc_registerChatCommand; + +[QGVAR(sideBudgetHint), { + params ["_side"]; + if (_side isEqualTo side group ACE_player && {XGVAR(settingHint) isEqualTo 2 || {XGVAR(settingHint) isEqualTo 1 && {"ACE_Fortify" in (ACE_player call EFUNC(common,uniqueItems))}}}) then { + private _budget = [_side] call FUNC(getBudget); + TRACE_2("sideBudgetHint",_side,_budget); + [format ["%1 $%2", LLSTRING(Budget), _budget]] call EFUNC(common,displayTextStructured); + }; +}] call CBA_fnc_addEventHandler; + +[QGVAR(addActionToObject), { + params ["_side", "_object"]; + TRACE_2("addActionToObject EH",_side,_object); + if (isNull _object) exitWith {}; + if (_side isEqualTo side group ace_player) then { + private _budget = [_side] call FUNC(getBudget); + private _cost = [_side, typeOf _object] call FUNC(getCost); + private _text = [format ["Remove Object +$%1", _cost], "Remove Object"] select (_budget == -1); + + // Remove object action + private _removeAction = [ + QGVAR(removeObject), + _text, + "", + { + params ["_target", "_player", "_params"]; + _params params ["_side"]; + TRACE_2("deleting placed object",_target,_params); + [QXGVAR(objectDeleted), [_player, _side, _target]] call CBA_fnc_globalEvent; + deleteVehicle _target; + _params call FUNC(updateBudget); + }, + {(missionNamespace getVariable [QGVAR(fortifyAllowed), true]) && {"ACE_Fortify" in (_player call EFUNC(common,uniqueItems))}}, + {}, + [_side, _cost], + {[0, 0, 0]}, + 5 + ] call EFUNC(interact_menu,createAction); + + [_object, 0, ["ACE_MainActions"], _removeAction] call EFUNC(interact_menu,addActionToObject); + }; +}] call CBA_fnc_addEventHandler; diff --git a/addons/fortify/XEH_preInit.sqf b/addons/fortify/XEH_preInit.sqf new file mode 100644 index 0000000000..a28aee8445 --- /dev/null +++ b/addons/fortify/XEH_preInit.sqf @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +// Init array of build locations at preinit +// Can add anything that would work in inArea (triggers, markers or array format [center, a, b, angle, isRectangle, c]) +GVAR(locations) = []; + +// Custom deploy handlers +GVAR(deployHandlers) = []; + +#include "initSettings.sqf" + +ADDON = true; diff --git a/addons/spottingscope/XEH_postInit.sqf b/addons/fortify/XEH_preStart.sqf similarity index 56% rename from addons/spottingscope/XEH_postInit.sqf rename to addons/fortify/XEH_preStart.sqf index 421c54b49f..022888575e 100644 --- a/addons/spottingscope/XEH_postInit.sqf +++ b/addons/fortify/XEH_preStart.sqf @@ -1 +1,3 @@ #include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/fortify/config.cpp b/addons/fortify/config.cpp new file mode 100644 index 0000000000..ab12338982 --- /dev/null +++ b/addons/fortify/config.cpp @@ -0,0 +1,23 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {QXGVAR(setupModule), QXGVAR(buildLocationModule)}; + weapons[] = {"ACE_Fortify"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Kingsley"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; + + BWC_CONFIG(XADDON); +}; + +#include "Cfg3DEN.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" + +#include "ACEX_Fortify_Presets.hpp" diff --git a/addons/fortify/functions/fnc_addActions.sqf b/addons/fortify/functions/fnc_addActions.sqf new file mode 100644 index 0000000000..312e37e8fe --- /dev/null +++ b/addons/fortify/functions/fnc_addActions.sqf @@ -0,0 +1,49 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Adds the child actions. + * + * Arguments: + * 0: Player + * + * Return Value: + * Actions + * + * Example: + * [player] call ace_fortify_fnc_addActions + * + * Public: No + */ + +params ["_player"]; + +private _side = side group _player; +private _objects = missionNamespace getVariable [format [QGVAR(Objects_%1), _side], []]; +private _actions = []; +private _infiniteBudget = ([side group _player] call FUNC(getBudget)) == -1; + +{ + _x params ["_classname", "_cost"]; + + private _displayName = getText (configFile >> "CfgVehicles" >> _classname >> "displayName"); + + private _action = [ + _classname, + if (_infiniteBudget) then { _displayName } else { format ["$%1 - %2", _cost, _displayName] }, + "", + LINKFUNC(deployObject), + { + params ["", "_player", "_args"]; + + private _cost = _args call FUNC(getCost); + private _budget = [side group _player] call FUNC(getBudget); + _budget == -1 || {_budget >= _cost} + }, + {}, + [_side, _classname] + ] call EFUNC(interact_menu,createAction); + + _actions pushBack [_action, [], _player]; +} forEach _objects; + +_actions diff --git a/addons/fortify/functions/fnc_addDeployHandler.sqf b/addons/fortify/functions/fnc_addDeployHandler.sqf new file mode 100644 index 0000000000..176579e661 --- /dev/null +++ b/addons/fortify/functions/fnc_addDeployHandler.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" +/* + * Author: Cuel, mharis001 + * Adds a custom deploy handler. + * Code needs to return BOOL: true (allowed) / false (blocked). + * + * Arguments: + * 0: Code + * - Passed [Unit , Object being placed , Cost ] + * + * Return Value: + * None + * + * Example: + * [{(_this select 0) getVariable ["isBobTheBuilder", false]}] call ace_fortify_fnc_addDeployHandler + * + * Public: Yes + */ + +params [["_code", {}, [{}]]]; + +if (_code isEqualTo {} || {_code isEqualTo {true}}) exitWith {}; +GVAR(deployHandlers) pushBack _code; diff --git a/addons/fortify/functions/fnc_axisLengths.sqf b/addons/fortify/functions/fnc_axisLengths.sqf new file mode 100644 index 0000000000..90cc5d7c2b --- /dev/null +++ b/addons/fortify/functions/fnc_axisLengths.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Gets the longest axis of the bounding box of the given object. + * + * Arguments: + * 0: Object + * + * Return Value: + * Lengths + * + * Example: + * [_object] call ace_fortify_fnc_axisLengths; + * + * Public: Yes + */ + +params [["_object", objNull, [objNull]]]; + +(boundingBoxReal _object) params ["_p1", "_p2"]; + +[ + (abs ((_p2 select 0) - (_p1 select 0))), + (abs ((_p2 select 1) - (_p1 select 1))), + (abs ((_p2 select 2) - (_p1 select 2))) +] diff --git a/addons/fortify/functions/fnc_buildLocationModule.sqf b/addons/fortify/functions/fnc_buildLocationModule.sqf new file mode 100644 index 0000000000..c141ae44c0 --- /dev/null +++ b/addons/fortify/functions/fnc_buildLocationModule.sqf @@ -0,0 +1,27 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror + * Handles build location module + * + * Arguments: + * 0: The module logic + * + * Return Value: + * None + * + * Example: + * [logic] call ace_fortify_fnc_buildLocationModule + * + * Public: No + */ + +params ["_logic"]; +TRACE_1("buildLocations",_logic); + +private _area = _logic getvariable ["objectArea",[0,0,0,false,0]]; // seems to be set via the canSetArea config +if ((_area param [0, 0]) == 0) exitWith {WARNING_1("Bad size? %1",_area);}; +private _locationArray = [_logic]; +_locationArray append _area; + +TRACE_1("Adding build location",_locationArray); +GVAR(locations) pushBack _locationArray; diff --git a/addons/fortify/functions/fnc_canFortify.sqf b/addons/fortify/functions/fnc_canFortify.sqf new file mode 100644 index 0000000000..eb19eb6139 --- /dev/null +++ b/addons/fortify/functions/fnc_canFortify.sqf @@ -0,0 +1,32 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Checks whether the given player can fortify. + * + * Arguments: + * 0: Player + * 1: Cost (default: 0) + * + * Return Value: + * Can Fortify + * + * Example: + * [player] call ace_fortify_fnc_canFortify + * + * Public: Yes + */ + +params ["_player", ["_cost", 0]]; + +(missionNamespace getVariable [QGVAR(fortifyAllowed), true]) && +{"ACE_Fortify" in (_player call EFUNC(common,uniqueItems))} && +{ + private _budget = [side group _player] call FUNC(getBudget); + ((_budget == -1) || {_budget >= _cost}) +} && { + private _inArea = GVAR(locations) isEqualTo []; + { + if (_player inArea _x) exitWith {_inArea = true}; + } forEach GVAR(locations); + _inArea +} diff --git a/addons/fortify/functions/fnc_deployConfirm.sqf b/addons/fortify/functions/fnc_deployConfirm.sqf new file mode 100644 index 0000000000..d04124fd93 --- /dev/null +++ b/addons/fortify/functions/fnc_deployConfirm.sqf @@ -0,0 +1,43 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Confirms the deployment. + * + * Arguments: + * 0: Player + * 1: Fortify Object + * + * Return Value: + * None + * + * Example: + * [player, wall] call ace_fortify_fnc_deployConfirm + * + * Public: No + */ + +params ["_unit", "_object"]; +TRACE_2("deployConfirm",_unit,_object); + +private _side = side group _unit; +private _cost = [_side, typeOf _object] call FUNC(getCost); +[_side, -_cost] call FUNC(updateBudget); + +private _typeOf = typeOf _object; +private _posASL = getPosASL _object; +private _vectorUp = vectorUp _object; +private _vectorDir = vectorDir _object; + +deleteVehicle _object; + +private _newObject = _typeOf createVehicle _posASL; +_newObject setPosASL _posASL; +_newObject setVectorDirAndUp [_vectorDir, _vectorUp]; + +// Server will use this event to run the jip compatible QGVAR(addActionToObject) event +[QXGVAR(objectPlaced), [_unit, _side, _newObject]] call CBA_fnc_globalEvent; + +if (cba_events_control) then { + // Re-run if ctrl key held + [_unit, _unit, [_side, _typeOf, [GVAR(objectRotationX), GVAR(objectRotationY), GVAR(objectRotationZ)]]] call FUNC(deployObject); +}; diff --git a/addons/fortify/functions/fnc_deployObject.sqf b/addons/fortify/functions/fnc_deployObject.sqf new file mode 100644 index 0000000000..cff46df6d9 --- /dev/null +++ b/addons/fortify/functions/fnc_deployObject.sqf @@ -0,0 +1,98 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Deploys the object to the player for them to move it around. + * + * Arguments: + * 0: Target + * 1: Player + * 2: Object params (side, classname, rotations) + * + * Return Value: + * None + * + * Example: + * [player, player, [west, "Land_BagBunker_Small_F"]] call ace_fortify_fnc_deployObject + * + * Public: No + */ + +params ["", "_player", "_params"]; +_params params [["_side", sideUnknown, [sideUnknown]], ["_classname", "", [""]], ["_rotations", [0,0,0]]]; +TRACE_4("deployObject",_player,_side,_classname,_rotations); + +private _budget = [_side] call FUNC(getBudget); +private _cost = [_side, _classname] call FUNC(getCost); + +// Create a local only copy of the object +private _object = _classname createVehicleLocal [0, 0, 0]; +_object disableCollisionWith _player; + +GVAR(objectRotationX) = _rotations select 0; +GVAR(objectRotationY) = _rotations select 1; +GVAR(objectRotationZ) = _rotations select 2; + +GVAR(isPlacing) = PLACE_WAITING; + +private _lmb = LLSTRING(confirm); +if (_budget > -1) then {_lmb = _lmb + format [" -$%1", _cost];}; +private _rmb = localize ELSTRING(Common,Cancel); +private _wheel = LLSTRING(rotate); +private _xAxis = localize "str_disp_conf_xaxis"; +private _icons = [["alt", localize "str_3den_display3den_entitymenu_movesurface_text"], ["shift", localize "str_disp_conf_xaxis" + " " + _wheel], ["control", localize "str_disp_conf_yaxis" + " " + _wheel]]; +[_lmb, _rmb, _wheel, _icons] call EFUNC(interaction,showMouseHint); + +private _mouseClickID = [_player, "DefaultAction", {GVAR(isPlacing) == PLACE_WAITING}, {GVAR(isPlacing) = PLACE_APPROVE}] call EFUNC(common,addActionEventHandler); +[QXGVAR(onDeployStart), [_player, _object, _cost]] call CBA_fnc_localEvent; + +[{ + params ["_args", "_pfID"]; + _args params ["_unit", "_object", "_cost", "_mouseClickID"]; + + if (_unit != ACE_player || {isNull _object} || {!([_unit, _object, []] call EFUNC(common,canInteractWith))} || {!([_unit, _cost] call FUNC(canFortify))}) then { + GVAR(isPlacing) = PLACE_CANCEL; + }; + + // If place approved, verify deploy handlers + if (GVAR(isPlacing) == PLACE_APPROVE && {(GVAR(deployHandlers) findIf {([_unit, _object, _cost] call _x) isEqualTo false}) > -1}) then { + GVAR(isPlacing) = PLACE_WAITING; + }; + + if (GVAR(isPlacing) != PLACE_WAITING) exitWith { + TRACE_3("exiting PFEH",GVAR(isPlacing),_pfID,_mouseClickID); + [_pfID] call CBA_fnc_removePerFrameHandler; + call EFUNC(interaction,hideMouseHint); + [_unit, "DefaultAction", _mouseClickID] call EFUNC(common,removeActionEventHandler); + + if (GVAR(isPlacing) == PLACE_APPROVE) then { + TRACE_1("deploying object",_object); + GVAR(isPlacing) = PLACE_CANCEL; + [_unit, _object] call FUNC(deployConfirm); + } else { + TRACE_1("deleting object",_object); + deleteVehicle _object; + }; + }; + + ([_object] call FUNC(axisLengths)) params ["_width", "_length", "_height"]; + private _distance = (_width max _length) + 0.5; // for saftey, move it a bit extra away from player's center + + private _start = eyePos _unit; + private _camViewDir = getCameraViewDirection _unit; + private _basePos = _start vectorAdd (_camViewDir vectorMultiply _distance); + _basePos set [2, ((_basePos select 2) - (_height / 2)) max (getTerrainHeightASL _basePos - 0.05)]; + + _object setPosASL _basePos; + + private _vZ = 180 + GVAR(objectRotationZ) + getDir _unit; + if (cba_events_alt) then { + // Snap to terrain surface dir + _object setDir _vZ; + _object setVectorUp (surfaceNormal _basePos); + } else { + [_object, GVAR(objectRotationX), GVAR(objectRotationY), _vZ] call EFUNC(common,setPitchBankYaw); + }; + #ifdef DEBUG_MODE_FULL + hintSilent format ["Rotation:\nX: %1\nY: %2\nZ: %3", GVAR(objectRotationX), GVAR(objectRotationY), GVAR(objectRotationZ)]; + #endif +}, 0, [_player, _object, _cost, _mouseClickID]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/fortify/functions/fnc_getBudget.sqf b/addons/fortify/functions/fnc_getBudget.sqf new file mode 100644 index 0000000000..2e7e73dca4 --- /dev/null +++ b/addons/fortify/functions/fnc_getBudget.sqf @@ -0,0 +1,20 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Gets the budget for the given side. + * + * Arguments: + * 0: Side + * + * Return Value: + * Budget + * + * Example: + * [west] call ace_fortify_fnc_getBudget + * + * Public: Yes + */ + +params ["_side"]; + +(missionNamespace getVariable [format [QGVAR(Budget_%1), _side], -1]) diff --git a/addons/fortify/functions/fnc_getCost.sqf b/addons/fortify/functions/fnc_getCost.sqf new file mode 100644 index 0000000000..d0a3abc6a7 --- /dev/null +++ b/addons/fortify/functions/fnc_getCost.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Gets the cost for the given side and classname. + * + * Arguments: + * 0: Side + * 1: Classname + * + * Return Value: + * Cost + * + * Example: + * [west, "Sandbag"] call ace_fortify_fnc_getCost + * + * Public: Yes + */ + +params ["_side", "_classname"]; + +private _objects = missionNamespace getVariable [format [QGVAR(Objects_%1), _side], []]; + +(((_objects select {(_x select 0) == _classname}) param [0, []]) param [1, 0]) diff --git a/addons/fortify/functions/fnc_getPlaceableSet.sqf b/addons/fortify/functions/fnc_getPlaceableSet.sqf new file mode 100644 index 0000000000..df0e1b24c5 --- /dev/null +++ b/addons/fortify/functions/fnc_getPlaceableSet.sqf @@ -0,0 +1,48 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Gets placeable object classnames and values. + * + * Arguments: + * 0: Size + * + * Return Value: + * Pairs of classnames and costs + * + * Example: + * ["small"] call ace_fortify_fnc_getPlaceableSet + * + * Public: No + */ + +params ["_preset"]; +TRACE_1("getPlaceableSet",_preset); + +private _config = missionConfigFile >> "ACEX_Fortify_Presets" >> _preset; +if (!isClass _config) then { + _config = configfile >> "ACEX_Fortify_Presets" >> _preset; +}; +if (!isClass _config) exitWith { + private _msg = format ["Could not find [%1]", _preset]; + ERROR_WITH_TITLE("Preset not found",_msg); + [] +}; + +private _objects = getArray (_config >> "objects"); + +// Attemp to filter bad input +_objects = _objects select { + if ((_x isEqualTypeParams ["", 0])) then { + _x params [["_classname", "#", [""]], ["_cost", -1, [0]]]; + if (isClass (configFile >> "CfgVehicles" >> _classname)) then { + true + } else { + ERROR_2("Preset [%1] - Classname does not exist",_preset,_classname); + }; + } else { + ERROR_2("Preset [%1] - Bad data in objects array %2",_preset,_x); + false + }; +}; + +_objects diff --git a/addons/fortify/functions/fnc_handleChatCommand.sqf b/addons/fortify/functions/fnc_handleChatCommand.sqf new file mode 100644 index 0000000000..48759ef608 --- /dev/null +++ b/addons/fortify/functions/fnc_handleChatCommand.sqf @@ -0,0 +1,48 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Handles the chat command usage by admin. + * + * Arguments: + * 0: Chat Text + * + * Return Value: + * None + * + * Example: + * [""] call ace_fortify_fnc_handleChatCommand + * + * Public: No + */ + +params ["_args"]; +TRACE_1("handleChatCommand",_args); + +_args = _args splitString " "; +if (_args isEqualTo []) exitWith {ERROR("Bad command");}; +private _command = toLower (_args select 0); +_args deleteAt 0; + +switch (_command) do { + // Turns fortify mode on + case "on": { + missionNamespace setVariable [QGVAR(fortifyAllowed), true, true]; + }; + + // Turns fortify mode off + case "off": { + missionNamespace setVariable [QGVAR(fortifyAllowed), false, true]; + }; + + // Registers fortify presets for given side + default { + _args params [["_preset", "small"], ["_budget", "-1"]]; + + private _side = [_command] call FUNC(parseSide); + _budget = parseNumber _budget; + + private _objects = [_preset] call FUNC(getPlaceableSet); + + [QGVAR(registerObjects), [_side, _budget, _objects]] call CBA_fnc_serverEvent; + }; +}; diff --git a/addons/fortify/functions/fnc_handleScrollWheel.sqf b/addons/fortify/functions/fnc_handleScrollWheel.sqf new file mode 100644 index 0000000000..e8e7ec6189 --- /dev/null +++ b/addons/fortify/functions/fnc_handleScrollWheel.sqf @@ -0,0 +1,33 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Handles the object direction. + * + * Arguments: + * 0: Scroll + * + * Return Value: + * Handled + * + * Example: + * [5] call ace_fortify_fnc_handleScrollWheel + * + * Public: No + */ + +if (GVAR(isPlacing) != PLACE_WAITING) exitWith {false}; + +params ["_scroll"]; + +if (cba_events_shift) exitWith { + GVAR(objectRotationX) = GVAR(objectRotationX) + (_scroll * 5); + true +}; + +if (cba_events_control) exitWith { + GVAR(objectRotationY) = GVAR(objectRotationY) + (_scroll * 5); + true +}; + +GVAR(objectRotationZ) = GVAR(objectRotationZ) + (_scroll * 5); +true diff --git a/addons/fortify/functions/fnc_modifyAction.sqf b/addons/fortify/functions/fnc_modifyAction.sqf new file mode 100644 index 0000000000..4587840396 --- /dev/null +++ b/addons/fortify/functions/fnc_modifyAction.sqf @@ -0,0 +1,30 @@ +#include "script_component.hpp" + /* + * Author: PabstMirror + * Modifies the fortify action, shows current budget. + * + * Arguments: + * 0: Target + * 1: Player + * 2: Args + * 3: Action Data + * + * Return Value: + * None + * + * Example: + * [player, player, [], []] call ace_fortify_fnc_modifyAction + * + * Public: No + */ + +params ["", "_player", "", "_actionData"]; + +private _budget = [side group _player] call FUNC(getBudget); +private _actionText = if (_budget > 0) then { + format ["%1 [$%2]", LLSTRING(fortify), _budget]; +} else { + LLSTRING(fortify); +}; + +_actionData set [1, _actionText]; diff --git a/addons/fortify/functions/fnc_parseSide.sqf b/addons/fortify/functions/fnc_parseSide.sqf new file mode 100644 index 0000000000..32d408cc19 --- /dev/null +++ b/addons/fortify/functions/fnc_parseSide.sqf @@ -0,0 +1,39 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Parses the given text and returns a side. + * + * Arguments: + * 0: Text + * + * Return Value: + * Side + * + * Example: + * ["blufor"] call ace_fortify_fnc_parseSide; + * ["west"] call ace_fortify_fnc_parseSide; + * ["b"] call ace_fortify_fnc_parseSide; + * + * Public: Yes + */ + +params ["_side"]; +TRACE_1("parseSide",_side); + +if (_side isEqualType sideUnknown) exitWith {_side}; + +private _char = toLower (_side select [0, 1]); + +private _return = switch (_char) do { + case ("b"); + case ("w"): {west}; + case ("o"); + case ("e"): {east}; + case ("r"); + case ("i"): {resistance}; + case ("c"): {civilian}; + default {sideUnknown}; +}; + +TRACE_2("",_char,_return); +_return diff --git a/addons/fortify/functions/fnc_registerObjects.sqf b/addons/fortify/functions/fnc_registerObjects.sqf new file mode 100644 index 0000000000..92d5772b5f --- /dev/null +++ b/addons/fortify/functions/fnc_registerObjects.sqf @@ -0,0 +1,49 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Registers the given objects in the given side's player interaction menu. + * Players on that side must have the pickaxe item in their inventory to access the menu. + * Classnames must be in the format [, ] + * MUST BE CALLED ON SERVER! + * + * Arguments: + * 0: Side + * 1: Budget + * 2: Object Classnames + * + * Return Value: + * None + * + * Example: + * [west, 5000, [["Land_BagFence_Long_F", 5], ["Land_BagBunker_Small_F", 50]]] call ace_fortify_fnc_registerObjects + * + * Public: Yes + */ + +if (!isServer) exitWith {}; + +params [["_side", sideUnknown, [sideUnknown]], ["_budget", -1, [0]], ["_objects", [], [[]]]]; +TRACE_3("registerObjects",_side,_budget,_objects); + +if (_side isEqualTo sideUnknown) exitWith {ERROR_1("Bad Side %1",_this);}; + +_objects select { + private _isValid = _x params [["_xClassname", "", [""]], ["_xCost", 0, [0]]]; + if (_isValid) then { + _isValid = isClass (configFile >> "CfgVehicles" >> _xClassname); + if (!_isValid) then {WARNING_1("Classname does not exist in CfgVehicles %1",_x);}; + } else { + WARNING_1("Bad classname/cost input %1, should be [,]",_x); + }; + _isValid +}; + +if (!isNil {missionNamespace getVariable format [QGVAR(Budget_%1), _side]}) then { + INFO_1("Overwriting previous budget for side [%1]",_side); +}; +if (!isNil {missionNamespace getVariable format [QGVAR(Objects_%1), _side]}) then { + INFO_1("Overwriting previous objects for side [%1]",_side); +}; + +missionNamespace setVariable [format [QGVAR(Budget_%1), _side], _budget, true]; +missionNamespace setVariable [format [QGVAR(Objects_%1), _side], _objects, true]; diff --git a/addons/fortify/functions/fnc_setupModule.sqf b/addons/fortify/functions/fnc_setupModule.sqf new file mode 100644 index 0000000000..a57d202588 --- /dev/null +++ b/addons/fortify/functions/fnc_setupModule.sqf @@ -0,0 +1,72 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror + * Handles setup module. + * + * Arguments: + * 0: The module logic + * 1: Synchronized units + * 2: Activated + * + * Return Value: + * None + * + * Example: + * [logic, [], true] call ace_fortify_fnc_setupModule + * + * Public: No + */ + +params ["_logic", "", "_activated"]; +TRACE_2("setupModule",_logic,_activated); + +// Note: no changes needed here for cba-setting switch +if (!isServer) exitWith {}; +if (!_activated) exitWith {}; + + +private _side = _logic getVariable ["Side", 1]; +_side = switch (_side) do { + case (1): {west}; + case (2): {east}; + case (3): {resistance}; + case (4): {civilian}; + default {sideUnknown}; +}; + +private _preset = _logic getVariable ["Preset", "small"]; +if IS_NUMBER(_preset) then { // Legacy support + _preset = switch (_preset) do { + case 1: {"small"}; + case 2: {"medium"}; + case 3: {"big"}; + case 4: {"smallGreen"}; + case 5: {"mediumGreen"}; + case 6: {"bigGreen"}; + default {"?"}; + }; +}; + +private _budget = _logic getVariable ["Budget", -1]; +if (!(_budget isEqualType 0)) then {_budget = -1}; + +private _addToolItem = _logic getVariable ["AddToolItem", false]; +if (!(_addToolItem isEqualType false)) then {_addToolItem = false}; + + +private _objects = [_preset] call FUNC(getPlaceableSet); +[QGVAR(registerObjects), [_side, _budget, _objects]] call CBA_fnc_serverEvent; + +if (_addToolItem) then { + [{ + params ["_side"]; + TRACE_1("Adding tool",_side); + { + if (((side group _x) == _side) && {!("ACE_Fortify" in (_x call EFUNC(common,uniqueItems)))}) then { + _x addItem "ACE_Fortify"; + }; + } forEach allUnits; + }, [_side], 3] call CBA_fnc_waitAndExecute; +}; + +INFO_4("Fortify Module Actived [Side: %1][Preset: %2][Budget: %3][AutoAdd: %4]",_side,_preset,_budget,_addToolItem); diff --git a/addons/fortify/functions/fnc_updateBudget.sqf b/addons/fortify/functions/fnc_updateBudget.sqf new file mode 100644 index 0000000000..c75073af0b --- /dev/null +++ b/addons/fortify/functions/fnc_updateBudget.sqf @@ -0,0 +1,36 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Updates the given sides budget. + * + * Arguments: + * 0: Side + * 1: Change (default: 0) + * 2: Display hint (default: true) + * + * Return Value: + * None + * + * Example: + * [west, -250, false] call ace_fortify_fnc_updateBudget + * + * Public: Yes + */ + +params [["_side", sideUnknown, [sideUnknown]], ["_change", 0, [0]], ["_hint", true, [true]]]; +TRACE_3("updateBudget",_side,_change,_hint); + +if (_side isEqualTo sideUnknown) exitWith {ERROR("Unknown side");}; + +private _budget = [_side] call FUNC(getBudget); +private _newBudget = _budget + _change; + +_newBudget = 0 max _newBudget; + +if (_budget != -1) then { + missionNamespace setVariable [format [QGVAR(Budget_%1), _side], _newBudget, true]; + + if (_hint) then { + [QGVAR(sideBudgetHint), [_side]] call CBA_fnc_globalEvent; + }; +}; diff --git a/addons/fortify/functions/script_component.hpp b/addons/fortify/functions/script_component.hpp new file mode 100644 index 0000000000..d69a852d6e --- /dev/null +++ b/addons/fortify/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\fortify\script_component.hpp" diff --git a/addons/fortify/initSettings.sqf b/addons/fortify/initSettings.sqf new file mode 100644 index 0000000000..6ecb47444a --- /dev/null +++ b/addons/fortify/initSettings.sqf @@ -0,0 +1,11 @@ +[ + QXGVAR(settingHint), + "LIST", + [LLSTRING(settingHint), LLSTRING(settingHintDesc)], + LLSTRING(settingsCategory), + [ + [0, 1, 2], + [LLSTRING(settingHintNone), LLSTRING(settingHintHasTool), LLSTRING(settingHintEveryone)], + 2 + ] +] call CBA_fnc_addSetting; diff --git a/addons/fortify/script_component.hpp b/addons/fortify/script_component.hpp new file mode 100644 index 0000000000..82dddfab77 --- /dev/null +++ b/addons/fortify/script_component.hpp @@ -0,0 +1,24 @@ +#define COMPONENT fortify +#define COMPONENT_BEAUTIFIED Fortify +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_FORTIFY + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_FORTIFY + #define DEBUG_SETTINGS DEBUG_SETTINGS_FORTIFY +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + + +#include "\a3\ui_f\hpp\defineDIKCodes.inc" + +#define PLACE_WAITING -1 +#define PLACE_CANCEL 0 +#define PLACE_APPROVE 1 diff --git a/addons/fortify/stringtable.xml b/addons/fortify/stringtable.xml new file mode 100644 index 0000000000..514af4a683 --- /dev/null +++ b/addons/fortify/stringtable.xml @@ -0,0 +1,202 @@ + + + + + Fortify + Verstärken + 要塞 + 요새화 + 要塞 + 要塞 + Fortyfikowanie + Фортификация + Inşa Etme + + + Fortify Tool + Bauwerkzeug + 要塞ツール + 요새화 도구 + 要塞工具 + 要塞工具 + Narzędzie do fortyfikowania + Инструмент строителя + Inşa Etme Aleti + + + Budget + Budget + 予算 + 예산 + 預算 + 预算 + Budżet + Бюджет + Bütçe + + + Auto add fortify item + Füge das Bauwerkzeug automatisch hinzu + 自動的に要塞ツールを追加 + 자동 추가 요새 항목 + 自動增加要塞物品 + 自动增加要塞物品 + Automatycznie dodaj narzędzie do fortyfikowania + Автоматически добавлять Инструмент строителя + Otomatik olarak inşa etme aletini ekle + + + Initializes the Fortify system, with some basic parameters.<br/>Presets are pulled from configFile and missionConfigFile, see wiki for format. + Inicjalizuje system fortyfikacji, z podstawowymi parametrami.<br/>Domyślne ustawienia są załadowane z configFile oraz missionConfigFile, odwiedź wiki aby znaleźć format + Инициализирует систему фортификации с некоторыми базовыми параметрами.<br/>Предустановки взяты из configFile и missionConfigFile, формат смотри на wiki. + Inşa etme sistemini bazı temel parametrelerle başlatır. <br/> Ön ayarlar configFile ve missionConfigFile'dan alınır, format için wiki'ye bakın. + 要塞システムを初期設定に戻します。<br/>プリセットは configfile と missionConfigFile から参照されます。詳細は wiki を参照してください。 + + + Rotate + Drehen + Girar + Tourner + Rotazione + Otočit + Forgatás + Obrót + Rotaciona + Bращать + 回転 + 회전 + 旋转 + 旋轉 + Yönlendir + + + Confirm Deployment + Aufbauen + Подтвердить размещение + Potwierdź rozłożenie + Confirmar despliegue + Confirmer Déploiement + Potvrdit Položení + Conferma Posizionamento + Lerak + Confirmar implantação + ここで作る + 설치 확인 + 确认布署 + 確認佈署 + Yerleştirmeyi Onayla + + + Fortify: Limit Build Area + Verstärken: Beschränke Baubereich + 要塞: 構築制限エリア + 要塞: 限制建造區 + 要塞: 限制建造区 + Fortyfikowanie: Limituj strefe budowania + Фортификация: ограничить зону постройки + Inşa Etme : Bölgede Inşa Etmeyi Limitle + + + ACE Fortify + ACE Verstärken + ACE 要塞 + ACE 要塞 + ACE 要塞 + ACE Fortyfikowanie + ACE Фортификация + ACE Inşa Etme + + + Show budget updates + Zeige Budgetveränderungen + 顯示預算更新 + 显示预算更新 + 予算の更新を表示 + Pokaż aktualizacje budżetu + Показывать обновления бюджета + Bütçe güncellenmelerini göster + + + Controls when budget update hints are shown + Bestimmt wann Budgetveränderungen angezeigt werden + 決定預算變更時是否會顯示提示 + 决定预算变更时是否会显示提示 + 予算が更新されヒント表示時の操作を決定します + Kontroluje kiedy aktualizacje budżetu są wyświetlane + Настраивает сообщения об обновлении бюджета + Bütçe güncellenince bilgi verilip verilmeyeceğini kontrol eder. + + + Never show + Niemals anzeigen + 永不顯示 + 永不显示 + 非表示 + Nigdy + Не показывать никогда + Asla Gösterme + + + Has fortify tool + Hat Bauewerkzeug + 有要塞工具 + 有要塞工具 + 要塞ツール所持の時 + Posiada narzędzie do fortyfikowania + Если имеется Инструмент + Insa Etme Aleti Olanlara Göster + + + Always show + Immer anzeigen + 總是顯示 + 总是显示 + 常に表示 + Zawsze + Показывать всегда + Her Zaman Göster + + + Small + Małe + Малый + Küçük + 小型 + + + Small (Green) + Малый (Зеленый) + Małe (Zielone) + Küçük (Yeşil) + 小型 (グリーン) + + + Medium + Średnie + Средний + Orta + 中型 + + + Medium (Green) + Средний (Зеленый) + Średnie (Zielone) + Orta (Yeşil) + 中型 (グリーン) + + + Big + Duże + Большой + Büyük + 大型 + + + Big (Green) + Duże (Zielone) + Большой (Зеленый) + Büyük (Yeşil) + 大型 (グリーン) + + + diff --git a/addons/frag/ACE_Settings.hpp b/addons/frag/ACE_Settings.hpp index 6d511d3c3d..a6018ee859 100644 --- a/addons/frag/ACE_Settings.hpp +++ b/addons/frag/ACE_Settings.hpp @@ -1,39 +1,17 @@ class ACE_Settings { class GVAR(enabled) { - category = CSTRING(Module_DisplayName); - displayName = CSTRING(EnableFrag); - description = CSTRING(EnableFrag_Desc); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(spallEnabled) { - category = CSTRING(Module_DisplayName); - displayName = CSTRING(EnableSpall); - description = CSTRING(EnableSpall_Desc); - typeName = "BOOL"; - value = 0; + movedToSQF = 1; }; class GVAR(reflectionsEnabled) { - category = CSTRING(Module_DisplayName); - displayName = CSTRING(EnableReflections); - description = CSTRING(EnableReflections_Desc); - typeName = "BOOL"; - value = 0; + movedToSQF = 1; }; class GVAR(maxTrack) { - category = CSTRING(Module_DisplayName); - displayName = CSTRING(MaxTrack); - description = CSTRING(MaxTrack_Desc); - typeName = "SCALAR"; - value = 10; - sliderSettings[] = {0, 50, 10, -1}; + movedToSQF = 1; }; class GVAR(maxTrackPerFrame) { - category = CSTRING(Module_DisplayName); - displayName = CSTRING(MaxTrackPerFrame); - description = CSTRING(MaxTrackPerFrame_Desc); - typeName = "SCALAR"; - value = 10; - sliderSettings[] = {0, 50, 10, -1}; + movedToSQF = 1; }; }; diff --git a/addons/frag/CfgAmmo.hpp b/addons/frag/CfgAmmo.hpp index fe4dddf9d1..2c42e805ec 100644 --- a/addons/frag/CfgAmmo.hpp +++ b/addons/frag/CfgAmmo.hpp @@ -87,6 +87,7 @@ class CfgAmmo { class ACE_G_40mm_Practice: ACE_G_40mm_HE { GVAR(skip) = 1; GVAR(force) = 0; + EGVAR(vehicle_damage,incendiary) = 0; }; class ACE_G40mm_HE_VOG25P: G_40mm_HE { GVAR(skip) = 0; diff --git a/addons/frag/CfgAmmoReflections.hpp b/addons/frag/CfgAmmoReflections.hpp index 513b58d544..41bd0d5c31 100644 --- a/addons/frag/CfgAmmoReflections.hpp +++ b/addons/frag/CfgAmmoReflections.hpp @@ -1,5 +1,5 @@ #define ACE_EXPLOSION_REFLECTION(range, hit)\ -class ace_explosion_reflection_##range##_##hit : ace_explosion_reflection_base {\ +class ace_explosion_reflection_##range##_##hit: ace_explosion_reflection_base {\ indirectHitRange = range;\ indirectHit = hit;\ dangerRadiusHit = range*3;\ @@ -58,7 +58,7 @@ class ace_explosion_reflection_##range##_##hit : ace_explosion_reflection_base { ACE_EXPLOSION_REFLECTION(range,490);\ ACE_EXPLOSION_REFLECTION(range,500) -class ace_explosion_reflection_base : Sh_120mm_HE { +class ace_explosion_reflection_base: Sh_120mm_HE { CraterWaterEffects = ""; CraterEffects = ""; effectsMissile = ""; diff --git a/addons/frag/CfgEventhandlers.hpp b/addons/frag/CfgEventhandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/frag/CfgEventhandlers.hpp +++ b/addons/frag/CfgEventhandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/frag/README.md b/addons/frag/README.md index 2bcccda913..ca62771f00 100644 --- a/addons/frag/README.md +++ b/addons/frag/README.md @@ -2,11 +2,3 @@ ace_frag ======== Shrapnel system for explosives. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [NouberNou](https://github.com/NouberNou) -- [walterpearce](https://github.com/walterpearce) diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index 4126ca328c..ecebd793ce 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -5,7 +5,7 @@ if (isServer) then { [QGVAR(frag_eh), {_this call FUNC(frago);}] call CBA_fnc_addEventHandler; }; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { if (!GVAR(enabled)) exitWith {}; // Register fire event handler diff --git a/addons/frag/XEH_preInit.sqf b/addons/frag/XEH_preInit.sqf index 7cbd6092a1..f4f59e681a 100644 --- a/addons/frag/XEH_preInit.sqf +++ b/addons/frag/XEH_preInit.sqf @@ -20,4 +20,6 @@ GVAR(lastIterationIndex) = 0; GVAR(objects) = []; GVAR(arguments) = []; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/frag/functions/fnc_dev_trackTrace.sqf b/addons/frag/functions/fnc_dev_trackTrace.sqf index 6481b89310..5d8ee3dee0 100644 --- a/addons/frag/functions/fnc_dev_trackTrace.sqf +++ b/addons/frag/functions/fnc_dev_trackTrace.sqf @@ -18,7 +18,7 @@ params ["_args", "_pfhID"]; _args params ["_tracerObj", "_index"]; -if (alive _tracerObj && {!(GVAR(traces) isEqualTo [])}) then { +if (alive _tracerObj && {GVAR(traces) isNotEqualTo []}) then { private _data = GVAR(traces) select _index; private _positions = _data select 4; _positions pushBack [getPos _tracerObj, vectorMagnitude (velocity _tracerObj)]; diff --git a/addons/frag/functions/fnc_findReflections.sqf b/addons/frag/functions/fnc_findReflections.sqf index 8b4a5922a5..af7155984d 100644 --- a/addons/frag/functions/fnc_findReflections.sqf +++ b/addons/frag/functions/fnc_findReflections.sqf @@ -117,7 +117,7 @@ if (_zIndex < 5) then { if (count _explosions > (_radi * 2) / _depth) exitWith {}; } forEach _buckets; // _can = "Land_Bricks_V4_F" createVehicle (ASLtoATL _pos); - // _dirvec = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3")))); + // _dirvec = _pos vectorFromTo ((player modelToWorldVisualWorld (player selectionPosition "Spine3"))); // _dirvec = _dirvec vectorMultiply 100; // _can setVelocity _dirvec; [DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index 8c90445411..a2744d60fd 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -95,7 +95,7 @@ private _fragArcs = []; _fragArcs set [360, 0]; private _doRandom = true; -if (!(_objects isEqualTo [])) then { +if (_objects isNotEqualTo []) then { if (GVAR(reflectionsEnabled)) then { [_lastPos, _shellType] call FUNC(doReflections); }; diff --git a/addons/frag/initSettings.sqf b/addons/frag/initSettings.sqf new file mode 100644 index 0000000000..421d5d4566 --- /dev/null +++ b/addons/frag/initSettings.sqf @@ -0,0 +1,40 @@ +private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)]; + +[ + QGVAR(enabled), "CHECKBOX", + [LSTRING(EnableFrag), LSTRING(EnableFrag_Desc)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(spallEnabled), "CHECKBOX", + [LSTRING(EnableSpall), LSTRING(EnableSpall_Desc)], + _category, + false, + 1 +] call CBA_fnc_addSetting; +[ + QGVAR(reflectionsEnabled), "CHECKBOX", + [LSTRING(EnableReflections), LSTRING(EnableReflections_Desc)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(maxTrack), "SLIDER", + [LSTRING(MaxTrack), LSTRING(MaxTrack_Desc)], + _category, + [0, 50, 10, -1], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(maxTrackPerFrame), "SLIDER", + [LSTRING(MaxTrackPerFrame), LSTRING(MaxTrackPerFrame_Desc)], + _category, + [0, 50, 10, -1], + 1 +] call CBA_fnc_addSetting; diff --git a/addons/gestures/ACE_Settings.hpp b/addons/gestures/ACE_Settings.hpp index 8ed8aedb6b..3c31060781 100644 --- a/addons/gestures/ACE_Settings.hpp +++ b/addons/gestures/ACE_Settings.hpp @@ -1,11 +1,5 @@ class ACE_Settings { class GVAR(showOnInteractionMenu) { - value = 2; - typeName = "SCALAR"; - isClientSettable = 1; - category = ECSTRING(interact_menu,Category_InteractionMenu); - displayName = CSTRING(ShowOnInteractionMenu_displayName); - description = CSTRING(ShowOnInteractionMenu_description); - values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(JustKeybinds), CSTRING(KeysAndInteractionMenu)}; + movedToSQF = 1; }; }; diff --git a/addons/gestures/CfgEventHandlers.hpp b/addons/gestures/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/gestures/CfgEventHandlers.hpp +++ b/addons/gestures/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/gestures/README.md b/addons/gestures/README.md index e224ff6d69..cb274c7a85 100644 --- a/addons/gestures/README.md +++ b/addons/gestures/README.md @@ -2,10 +2,3 @@ ace_gestures ======== Gestures system in interaction menu and keybinds. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [jokoho48](https://github.com/jokoho48) diff --git a/addons/gestures/XEH_preInit.sqf b/addons/gestures/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/gestures/XEH_preInit.sqf +++ b/addons/gestures/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/gestures/initSettings.sqf b/addons/gestures/initSettings.sqf new file mode 100644 index 0000000000..994bb4abc7 --- /dev/null +++ b/addons/gestures/initSettings.sqf @@ -0,0 +1,7 @@ +[ + QGVAR(showOnInteractionMenu), "LIST", + [LSTRING(ShowOnInteractionMenu_displayName), LSTRING(ShowOnInteractionMenu_description)], + format ["ACE %1", localize ELSTRING(interact_menu,Category_InteractionMenu)], + [[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", LSTRING(JustKeybinds), LSTRING(KeysAndInteractionMenu)], 2], + 0 +] call CBA_fnc_addSetting; diff --git a/addons/gforces/CfgEventHandlers.hpp b/addons/gforces/CfgEventHandlers.hpp index f82caf47dd..e4e7d86951 100644 --- a/addons/gforces/CfgEventHandlers.hpp +++ b/addons/gforces/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/gforces/README.md b/addons/gforces/README.md index 15aa7116aa..a22854006c 100644 --- a/addons/gforces/README.md +++ b/addons/gforces/README.md @@ -2,11 +2,3 @@ ace_gforces =========== Adds G-force induced tunnel vision and unconsciousness. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/gforces/XEH_postInit.sqf b/addons/gforces/XEH_postInit.sqf index f7d532c288..a2f69dd608 100644 --- a/addons/gforces/XEH_postInit.sqf +++ b/addons/gforces/XEH_postInit.sqf @@ -5,15 +5,15 @@ if (!hasInterface) exitWith {}; GVAR(pfID) = -1; GVAR(playerIsVirtual) = false; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_1("SettingsInitialized eh",GVAR(enabledFor)); if (GVAR(enabledFor) == 0) exitWith {}; //Module has no effect if enabledFor is "None" ["unit", { // Add unit changed EH to check if player is either virtual (logic) or a UAV AI params ["_unit"]; - GVAR(playerIsVirtual) = ((getNumber (configFile >> "CfgVehicles" >> (typeOf _unit) >> "isPlayableLogic")) == 1) || - {(getText (configFile >> "CfgVehicles" >> (typeOf _unit) >> "simulation")) == "UAVPilot"}; + GVAR(playerIsVirtual) = ((getNumber (configOf _unit >> "isPlayableLogic")) == 1) || + {(getText (configOf _unit >> "simulation")) == "UAVPilot"}; TRACE_3("unit changed",_unit,typeOf _unit,GVAR(playerIsVirtual)); }, true] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/gforces/stringtable.xml b/addons/gforces/stringtable.xml index 3825045880..b2344067de 100644 --- a/addons/gforces/stringtable.xml +++ b/addons/gforces/stringtable.xml @@ -8,6 +8,7 @@ ACE Перегрузки ACE G フォース ACE G-Kuvveti + ACE Fuerza G Gforces Effects @@ -63,6 +64,7 @@ Коэффициент перегрузки G 効果係数 G-Kuvvet Katsayısı + Coeficiente de Fuerza G Controls strength of G-Force affecting players. @@ -71,6 +73,7 @@ Определяет силу перегрузок, влияющих на игроков. G 効果がプレイヤーに与える影響量を設定できます。 Oyuncuları etkileyen G-Force'un gücünü kontrol eder. + Controla la intensidad de fuerza G que afecta a los jugadores. diff --git a/addons/goggles/ACE_Settings.hpp b/addons/goggles/ACE_Settings.hpp index aac712791c..f45d13caa8 100644 --- a/addons/goggles/ACE_Settings.hpp +++ b/addons/goggles/ACE_Settings.hpp @@ -1,18 +1,9 @@ class ACE_Settings { class GVAR(effects) { - category = CSTRING(DisplayName); - displayName = CSTRING(effects_displayName); - typeName = "SCALAR"; - value = 2; - isClientSettable = 1; - values[] = {ECSTRING(common,Disabled), CSTRING(effects_tintOnly), CSTRING(enabled_tintAndEffects), CSTRING(effects_effectsOnly)}; + movedToSQF = 1; }; class GVAR(showInThirdPerson) { - category = CSTRING(DisplayName); - value = 0; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(ShowInThirdPerson); + movedToSQF = 1; }; }; diff --git a/addons/goggles/CfgEventHandlers.hpp b/addons/goggles/CfgEventHandlers.hpp index 99cbf2f8ad..6b26f3c2f1 100644 --- a/addons/goggles/CfgEventHandlers.hpp +++ b/addons/goggles/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/goggles/CfgVehicles.hpp b/addons/goggles/CfgVehicles.hpp index c9cdf70293..68506d3269 100644 --- a/addons/goggles/CfgVehicles.hpp +++ b/addons/goggles/CfgVehicles.hpp @@ -7,6 +7,7 @@ class CfgVehicles { displayName = CSTRING(WipeGlasses); condition = QUOTE(GVAR(showClearGlasses) && {call FUNC(canWipeGlasses)}); statement = QUOTE(call FUNC(clearGlasses)); + exceptions[] = {"isNotInside", "isNotSitting", "isNotSwimming", "isNotEscorting"}; }; }; }; diff --git a/addons/goggles/README.md b/addons/goggles/README.md index 959459f58e..627e750297 100644 --- a/addons/goggles/README.md +++ b/addons/goggles/README.md @@ -2,11 +2,3 @@ ace_goggles =========== Adds various effects to different kinds of goggles and ambient effects like dirt thrown up by explosions. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [esteldunedain](https://github.com/esteldunedain) -- [CorruptedHeart](https://github.com/CorruptedHeart) diff --git a/addons/goggles/RscTitles.hpp b/addons/goggles/RscTitles.hpp index 5544b9b132..0716892312 100644 --- a/addons/goggles/RscTitles.hpp +++ b/addons/goggles/RscTitles.hpp @@ -1,37 +1,37 @@ -class RscTitles{ +class RscTitles { #include "define.hpp" - class RscACE_Goggles_BaseTitle{ + class RscACE_Goggles_BaseTitle { idd = -1; onLoad = "uiNamespace setVariable ['ACE_Goggles_Display', _this select 0]"; onUnload = "uiNamespace setVariable ['ACE_Goggles_Display', displayNull]"; fadeIn=0.5; fadeOut=0.5; - movingEnable = false; + movingEnable = 0; duration = 10e10; name = "RscACE_Goggles_BaseTitle"; class controls; }; - class RscACE_Goggles:RscACE_Goggles_BaseTitle{ + class RscACE_Goggles: RscACE_Goggles_BaseTitle { idd = 1044; name = "RscACE_Goggles"; - class controls{ - class gogglesImage: RscPicture{ + class controls { + class gogglesImage: RscPicture { idc = 10650; }; }; }; - class RscACE_GogglesEffects:RscACE_Goggles_BaseTitle{ + class RscACE_GogglesEffects: RscACE_Goggles_BaseTitle { idd = 1045; onLoad = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', _this select 0]"; onUnload = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', displayNull]"; name = "RscACE_GogglesEffects"; fadeIn=0; fadeOut=0.5; - class controls{ - class dirtImage: RscPicture { + class controls { + class dirtImage: RscPicture { idc = 10660; }; class dustImage: RscPicture { diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index 540d817f0c..7700d4cc81 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -14,8 +14,8 @@ if (!hasInterface) exitWith {}; [20, [true, true, false]], false] call CBA_fnc_addKeybind; -["ace_settingsInitialized", { - TRACE_2("ace_settingsInitialized eh",GVAR(effects),GVAR(showInThirdPerson)); +["CBA_settingsInitialized", { + TRACE_2("CBA_settingsInitialized eh",GVAR(effects),GVAR(showInThirdPerson)); if (GVAR(effects) == 0) exitWith {}; diff --git a/addons/goggles/config.cpp b/addons/goggles/config.cpp index 88ebe3f8f8..4718662e62 100644 --- a/addons/goggles/config.cpp +++ b/addons/goggles/config.cpp @@ -42,7 +42,7 @@ class CfgGlasses { ACE_Protection = 1; }; - class G_Combat:None { + class G_Combat: None { COMBAT_GOGGLES }; @@ -57,135 +57,135 @@ class CfgGlasses { ACE_Protection = 1; }; - class G_Lowprofile:None { + class G_Lowprofile: None { ACE_TintAmount=COLOUR*2; ACE_Resistance = 2; ACE_Protection = 1; }; - class G_Shades_Black:None { + class G_Shades_Black: None { ACE_TintAmount=COLOUR*2; ACE_Resistance = 1; }; - class G_Shades_Blue:None{ + class G_Shades_Blue: None { ACE_Color[] = {0,0,1}; ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Shades_Green:None{ + class G_Shades_Green: None { ACE_Color[] = {0,1,0}; ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Shades_Red:None{ + class G_Shades_Red: None { ACE_Color[] = {1,0,0}; ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Spectacles:None{ + class G_Spectacles: None { ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Spectacles_Tinted:None{ + class G_Spectacles_Tinted: None { ACE_TintAmount=COLOUR*2; ACE_Resistance = 1; }; - class G_Sport_Blackred:None{ + class G_Sport_Blackred: None { ACE_Color[] = {1,0,0}; ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Sport_BlackWhite:None{ + class G_Sport_BlackWhite: None { ACE_Color[] = {0,0,1}; ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Sport_Blackyellow:None{ + class G_Sport_Blackyellow: None { ACE_TintAmount=COLOUR*2; ACE_Resistance = 1; }; - class G_Sport_Checkered:None{ + class G_Sport_Checkered: None { ACE_TintAmount=COLOUR*2; ACE_Resistance = 1; }; - class G_Sport_Greenblack:None{ + class G_Sport_Greenblack: None { ACE_TintAmount=COLOUR*2; ACE_Resistance = 1; }; - class G_Sport_Red:None{ + class G_Sport_Red: None { ACE_TintAmount=COLOUR*2; ACE_Color[] = {0,0,0}; ACE_Resistance = 1; }; - class G_Squares:None{ + class G_Squares: None { ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Squares_Tinted:None{ + class G_Squares_Tinted: None { ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Tactical_Black:None{ + class G_Tactical_Black: None { ACE_TintAmount=COLOUR; ACE_Color[] = {0,0,-1.5}; ACE_Resistance = 1; }; - class G_Tactical_Clear:None{ + class G_Tactical_Clear: None { ACE_TintAmount=COLOUR; ACE_Color[] = {0,0,-1}; ACE_Resistance = 1; }; - class G_Aviator:None{ + class G_Aviator: None { ACE_Color[] = {0,0,-1}; ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Lady_Blue:None{ + class G_Lady_Blue: None { ACE_Color[] = {0,0,1}; ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Lady_Red:None{ + class G_Lady_Red: None { ACE_Color[] = {1,0,0}; ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; - class G_Lady_Dark:None{ + class G_Lady_Dark: None { ACE_TintAmount=COLOUR*2; ACE_Resistance = 1; }; - class G_Lady_Mirror:None{ + class G_Lady_Mirror: None { ACE_TintAmount=COLOUR; ACE_Resistance = 1; }; class G_Balaclava_blk; - class G_Balaclava_combat:G_Balaclava_blk { + class G_Balaclava_combat: G_Balaclava_blk { COMBAT_GOGGLES }; - class G_Balaclava_lowprofile:G_Balaclava_blk { + class G_Balaclava_lowprofile: G_Balaclava_blk { ACE_TintAmount=COLOUR*2; ACE_Resistance = 2; ACE_Protection = 1; @@ -202,7 +202,7 @@ class CfgGlasses { }; class G_Bandanna_blk; - class G_Bandanna_shades:G_Bandanna_blk { + class G_Bandanna_shades: G_Bandanna_blk { ACE_TintAmount=COLOUR*2; ACE_Resistance = 1; ACE_Protection = 1; @@ -265,13 +265,13 @@ class CfgGesturesMale { class CfgWeapons { class H_HelmetB; - class H_CrewHelmetHeli_B:H_HelmetB { + class H_CrewHelmetHeli_B: H_HelmetB { ACE_Protection = 1; }; - class H_PilotHelmetHeli_B:H_HelmetB { + class H_PilotHelmetHeli_B: H_HelmetB { ACE_Protection = 1; }; - class H_PilotHelmetFighter_B:H_HelmetB { + class H_PilotHelmetFighter_B: H_HelmetB { ACE_Protection = 1; }; }; @@ -290,7 +290,7 @@ class SniperCloud { class CfgCloudlets { class Default; - class ACERainEffect:Default { + class ACERainEffect: Default { interval = 0.001; particleShape = "\A3\data_f\ParticleEffects\Universal\Refract"; particleFSNtieth = 1; diff --git a/addons/goggles/functions/fnc_applyGlassesEffect.sqf b/addons/goggles/functions/fnc_applyGlassesEffect.sqf index f60eb79581..4c0b8dd1df 100644 --- a/addons/goggles/functions/fnc_applyGlassesEffect.sqf +++ b/addons/goggles/functions/fnc_applyGlassesEffect.sqf @@ -24,7 +24,7 @@ TRACE_2("applyGlassesEffect",_player,_glasses); // remove old effect call FUNC(removeGlassesEffect); -if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith { +if ((getNumber (configOf _player >> "isPlayableLogic")) == 1) exitWith { TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator) }; diff --git a/addons/goggles/initSettings.sqf b/addons/goggles/initSettings.sqf index c8e88548ad..9b2fba6ef7 100644 --- a/addons/goggles/initSettings.sqf +++ b/addons/goggles/initSettings.sqf @@ -1,6 +1,21 @@ [ - QGVAR(showClearGlasses), - "CHECKBOX", + QGVAR(effects), "LIST", + LSTRING(effects_displayName), + localize LSTRING(SettingsName), + [[0, 1, 2, 3], [ELSTRING(common,Disabled), LSTRING(effects_tintOnly), LSTRING(enabled_tintAndEffects), LSTRING(effects_effectsOnly)], 2], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(showInThirdPerson), "CHECKBOX", + LSTRING(ShowInThirdPerson), + localize LSTRING(SettingsName), + false, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(showClearGlasses), "CHECKBOX", [LSTRING(SettingShowClearGlasses), LELSTRING(common,showActionInSelfInteraction)], localize LSTRING(SettingsName), false, // default value diff --git a/addons/grenades/CfgEventHandlers.hpp b/addons/grenades/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/grenades/CfgEventHandlers.hpp +++ b/addons/grenades/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/grenades/README.md b/addons/grenades/README.md index c58ac19683..97addb3268 100644 --- a/addons/grenades/README.md +++ b/addons/grenades/README.md @@ -2,11 +2,3 @@ ace_grenades ============ Introduces different throwing modes for grenades, as well as a flashbang and hand flares. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/grenades/XEH_postInit.sqf b/addons/grenades/XEH_postInit.sqf index b4657f4c9b..7f67e181cc 100644 --- a/addons/grenades/XEH_postInit.sqf +++ b/addons/grenades/XEH_postInit.sqf @@ -27,7 +27,7 @@ GVAR(flashbangPPEffectCC) ppEffectForceInNVG true; [] call FUNC(nextMode); }, {false}, [9, [false, false, false]], false] call CBA_fnc_addKeybind; //8 Key -["ace_settingsInitialized", { +["CBA_settingsInitialized", { if (GVAR(convertExplosives)) then { [] call FUNC(addChangeFuseItemContextMenuOptions); }; diff --git a/addons/grenades/functions/fnc_addChangeFuseItemContextMenuOptions.sqf b/addons/grenades/functions/fnc_addChangeFuseItemContextMenuOptions.sqf index 407d029c0e..99a28d91f4 100644 --- a/addons/grenades/functions/fnc_addChangeFuseItemContextMenuOptions.sqf +++ b/addons/grenades/functions/fnc_addChangeFuseItemContextMenuOptions.sqf @@ -33,9 +33,25 @@ } ], { - params ["_unit", "", "", "", "_magArr"]; - _unit addMagazine (_magArr select 1); - false; + params ["_unit", "", "", "_slot", "_magArr"]; + private _container = ""; + switch _slot do { + case "UNIFORM_CONTAINER": { + _container = "uniform"; + }; + case "VEST_CONTAINER": { + _container = "vest"; + }; + case "BACKPACK_CONTAINER": { + _container = "backpack"; + }; + }; + + if (_container != "") then { + [_unit, _magArr select 1, _container] call EFUNC(common,addToInventory); + }; + + false }, true, [_mag,_throwableMag] @@ -55,9 +71,25 @@ } ], { - params ["_unit", "", "", "", "_magArr"]; - _unit addMagazine (_magArr select 0); - false; + params ["_unit", "", "", "_slot", "_magArr"]; + private _container = ""; + switch _slot do { + case "UNIFORM_CONTAINER": { + _container = "uniform"; + }; + case "VEST_CONTAINER": { + _container = "vest"; + }; + case "BACKPACK_CONTAINER": { + _container = "backpack"; + }; + }; + + if (_container != "") then { + [_unit, _magArr select 0, _container] call EFUNC(common,addToInventory); + }; + + false }, true, [_mag,_throwableMag] diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 39ad6fb706..07b74b7bcc 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -74,7 +74,7 @@ _affected = _affected - [ACE_player]; // Affect local player, independently of distance if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf ACE_player) >> "isPlayableLogic")) == 1) exitWith { + if ((getNumber (configOf ACE_player >> "isPlayableLogic")) == 1) exitWith { TRACE_1("skipping playable logic",typeOf ACE_player); // VirtualMan_F (placeable logic zeus / spectator) }; // Do effects for player @@ -122,8 +122,10 @@ if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { // Blind player if (_strength > 0.1) then { + private _blend = [[1,1,1,0], [0.3,0.3,0.3,1]] select EGVAR(common,epilepsyFriendlyMode); + GVAR(flashbangPPEffectCC) ppEffectEnable true; - GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,(0.8 + _strength) min 1,[1,1,1,0],[0,0,0,1],[0,0,0,0]]; + GVAR(flashbangPPEffectCC) ppEffectAdjust [1, 1, (0.8 + _strength) min 1, _blend, [0,0,0,1], [0,0,0,0]]; GVAR(flashbangPPEffectCC) ppEffectCommit 0.01; //PARTIALRECOVERY - start decreasing effect over time diff --git a/addons/grenades/functions/fnc_incendiary.sqf b/addons/grenades/functions/fnc_incendiary.sqf index d454001031..d6f689e4f2 100644 --- a/addons/grenades/functions/fnc_incendiary.sqf +++ b/addons/grenades/functions/fnc_incendiary.sqf @@ -196,7 +196,7 @@ private _vehicle = _position nearestObject "Car"; if (!local _vehicle) exitWith {}; -private _config = _vehicle call CBA_fnc_getObjectConfig; +private _config = configOf _vehicle; // --- burn tyres private _fnc_isWheelHitPoint = { diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index 1c8066dec2..3a8c8ef5bf 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -31,7 +31,7 @@ private _config = configFile >> "CfgAmmo" >> _ammo; if (local _unit) then { // handle priming sound, if present private _soundConfig = getArray (configFile >> "CfgAmmo" >> _ammo >> QGVAR(pullPinSound)); - if !(_soundConfig isEqualTo []) then { + if (_soundConfig isNotEqualTo []) then { _soundConfig params ["_file", "_volume", "_pitch", "_distance"]; playSound3D [_file, objNull, false, getPosASL _projectile, _volume, _pitch, _distance]; }; diff --git a/addons/grenades/stringtable.xml b/addons/grenades/stringtable.xml index 362e9b0273..c78dfff13b 100644 --- a/addons/grenades/stringtable.xml +++ b/addons/grenades/stringtable.xml @@ -166,6 +166,7 @@ Granada de Luz CTS 7290 9-Explosões CTS 7290 9- Flaş Bombası CTS 7290-9 Светошумовая граната + Granada aturdidora CTS 7290 9-explosiones CTS 7290-9 @@ -402,6 +403,7 @@ Granada Incendiária AN-M14 AN-M14 zápalný granát AN-M14 Yangın Bombası + Granada incendiaria AN-M14 AN-M14 @@ -417,6 +419,7 @@ AN-M14 AN-M14 AN-M14 + AN-M14 Incendiary grenade used to destroy weapons, ammunition and other equipment. @@ -432,6 +435,7 @@ Granada Incendiária utilizada para destruir armas, munições e outros equipamentos. Zápalný granát používaný ke zničení zbraní, munice a další výbavy. Yangın bombaları, cephaneleri ve diğer teçhizatı yok etmek için kullanılır + Granada incendiaria utilizada para destruir armamento, municiones y otros equipamientos Type: Star Parachute Flare @@ -445,6 +449,7 @@ Type : Fusée éclairante à parachute Typ: Světlice s padákem Tür: Yıldız Paraşüt Fişeği + Tipo: Bengala de paracaidas M583 Illumination Flare (White) @@ -458,6 +463,7 @@ M583 Fusée éclairante (Blanche) M583 Světlice (Bílá) M583 Aydınlatma Fişeği (Beyaz) + M583 Bengala de iluminación (Blanca) M662 Illumination Flare (Red) @@ -471,6 +477,7 @@ M662 Fusée éclairante (Rouge) M662 Světlice (Červená) M662 Aydınlatma Fişeği (Kırmızı) + M662 Bengala de iluminación (Roja) M661 Illumination Flare (Green) @@ -484,6 +491,7 @@ M661 Fusée éclairante (Verte) M661 Světlice (Zelená) M661 Aydınlatma Fişeği (Yeşil) + M661 Bengala de iluminación (Verde) Type: Parachute IR Flare @@ -497,6 +505,7 @@ Type : Fusée IR à parachute Typ: Infračervená světlice s padákem Tip : Paraşüt IR Flare + Tipo: Bengala infrarroja de paracaidas M992 Illumination IR Flare @@ -510,41 +519,63 @@ M992 Fusée IR M992 Infračervená světlice M992 Illumination IR Flare + M992 Bengala de iluminación infrarroja Explosive Satchel (Throwable) + Ранец со взрывчаткой (Метательный) Charge en sacoche (lançable) 梱包爆薬 (投てき仕様) + Carga de mochila explosiva (Lanzable) + Pakiet ładunków wybuchowych (Rzucany) Type: Charge<br />Rounds: 1<br />Used on: Things that need to die + Тип: Взрывчатка<br />Боеприпасы 1<br />Применение: На предметах, которые должны быть уничтожены Type : Charge<br />Munitions : 1<br />Application : à balancer sur des trucs qui doivent mourir 種類: 爆薬<br />弾数: 1<br />次で使用: 破壊すべき物に + Tipo: Carga<br />Unidades: 1<br />Usada: Cosas que necesitan morir + Typ: Ładunek<br/>Naboje: 1<br/>Użycie: Na rzeczach które mają zginąć An explosive satchel that is throwable. 7 second fixed fuse + Ранец со взрывчаткой. Детонация через 7 секунд Charge explosive lançable. Détonation après 7 secondes. 投げられる梱包爆薬。起爆までの時間は 7 秒間 + Carga de mochila explosiva que se puede lanzar. Espoleta fija de 7 segundos + Rzucany pakiet ładunków wybuchowych. 7 sekundowy zapalnik Explosive Charge (Throwable) + Заряд со взрывчаткой (Метательный) Charge explosive (lançable) 爆薬ブロック (投てき仕様) + Carga explosiva (Lanzable) + Ładunek wybuchowy (Rzucany) An explosive charge that is throwable. 7 second fixed fuse + Заряд со взрывчаткой. Детонация через 7 секунд Bloc explosif lançable. Détonation après 7 secondes. 投げられる爆薬ブロック。起爆までの時間は 7 秒間 + Carga explosiva que se puede lanzar. Espoleta fija de 7 segundos + Rzucany ładunkek wybuchowy. 7 sekundowy zapalnik Convert to short fuse + Применить фитиль Appliquer une mèche 短信管へ変更 + Convertir a espoleta corta + Konwertuj na krótki zapalnik Remove short fuse + Убрать фитиль Retirer la mèche 短信管を削除 + Quitar espoleta corta + Usuń krótki zapalnik ACE Grenades @@ -564,13 +595,19 @@ Allow Explosive Conversion + Разрешить фитили Autoriser les mèches (charges lançables) 爆薬変更を許可 + Permitir conversión de explosivos + Pozwól na konwersję ładunków wybuchowych Allow converting explosives to throwables + Разрешает преобразовывать взрывчатку в метательные снаряды Cette option permet de rendre les charges explosives lançables, à la manière des grenades.\nPour celà, ouvrir l'inventaire et double-cliquer sur les charges, afin de leur appliquer une mèche.\nLa mèche peut se retirer en suivant la même procédure. 爆発物を投てき仕様へ交換できるようにします。 + Permitir convertir explosivos a lanzables + Zezwala na konwersje ładunków wybuchowych na rzucane wersje diff --git a/addons/gunbag/CfgEventHandlers.hpp b/addons/gunbag/CfgEventHandlers.hpp index be284a9d70..b5ee7b4774 100644 --- a/addons/gunbag/CfgEventHandlers.hpp +++ b/addons/gunbag/CfgEventHandlers.hpp @@ -1,12 +1,28 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; + +//EH must be loaded this way to get ace_gunbag_gunbagWeapon before it is deleted upon opening the BI arsenal. May cause instability with other mods. +class RscPicture; +class RscDisplayArsenal { + class Controls { + class IconBackgroundPrimaryWeapon: RscPicture { + onLoad = QUOTE([ACE_player] call FUNC(BIArsenalOpen)); + }; + }; +}; + +class Extended_DisplayUnload_EventHandlers { + class RscDisplayArsenal { + ADDON = QUOTE([ACE_player] call FUNC(BIArsenalClose)); }; }; diff --git a/addons/gunbag/README.md b/addons/gunbag/README.md index 734c18f3c5..2dd0e03bf7 100644 --- a/addons/gunbag/README.md +++ b/addons/gunbag/README.md @@ -2,10 +2,3 @@ ace_gunbag =============== Adds a gunbag for DMRs. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/addons/gunbag/XEH_PREP.hpp b/addons/gunbag/XEH_PREP.hpp index 45d55207d6..2e2c57a056 100644 --- a/addons/gunbag/XEH_PREP.hpp +++ b/addons/gunbag/XEH_PREP.hpp @@ -10,3 +10,5 @@ PREP(canInteract); PREP(calculateMass); PREP(hasGunbag); PREP(isMachineGun); +PREP(BIArsenalClose); +PREP(BIArsenalOpen); diff --git a/addons/gunbag/XEH_preInit.sqf b/addons/gunbag/XEH_preInit.sqf index 582d64f7e5..63968a30f8 100644 --- a/addons/gunbag/XEH_preInit.sqf +++ b/addons/gunbag/XEH_preInit.sqf @@ -16,11 +16,11 @@ PREP_RECOMPILE_END; private _newBackpack = backpackContainer _unit; private _oldBackpack = backpackContainer _corpse; - if !(typeOf _newBackpack isEqualTo typeOf _oldBackpack) exitWith {}; + if (typeOf _newBackpack isNotEqualTo typeOf _oldBackpack) exitWith {}; private _state = _oldBackpack getVariable [QGVAR(gunbagWeapon), []]; - if !(_state isEqualTo []) then { + if (_state isNotEqualTo []) then { _newBackpack setVariable [QGVAR(gunbagWeapon), _state, true]; }; }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/gunbag/functions/fnc_BIArsenalClose.sqf b/addons/gunbag/functions/fnc_BIArsenalClose.sqf new file mode 100644 index 0000000000..011593aaa0 --- /dev/null +++ b/addons/gunbag/functions/fnc_BIArsenalClose.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: mjc4wilton + * Handle BI arsenal closing + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [] call ace_gunbag_fnc_BIArsenalClose + * + * Public: No + */ + +params ["_unit"]; + +if (!isNil QGVAR(arsenalCache)) then { + backpackContainer _unit setVariable [QGVAR(gunbagWeapon), GVAR(arsenalCache), true]; +}; + +GVAR(arsenalCache) = nil; + +nil diff --git a/addons/gunbag/functions/fnc_BIArsenalOpen.sqf b/addons/gunbag/functions/fnc_BIArsenalOpen.sqf new file mode 100644 index 0000000000..713e9eb8aa --- /dev/null +++ b/addons/gunbag/functions/fnc_BIArsenalOpen.sqf @@ -0,0 +1,22 @@ +#include "script_component.hpp" +/* + * Author: mjc4wilton + * Handle BI arsenal opening + * + * Arguments: + * 0: Unit + * + * Return Value: + * None + * + * Example: + * [] call ace_gunbag_fnc_BIArsenalOpen + * + * Public: No + */ + +params ["_unit"]; + +if ([_unit] call FUNC(hasGunBag)) then { + GVAR(arsenalCache) = backpackContainer _unit getVariable [QGVAR(gunbagWeapon), []]; +}; diff --git a/addons/gunbag/functions/fnc_canInteract.sqf b/addons/gunbag/functions/fnc_canInteract.sqf index 04313f6741..a003afce86 100644 --- a/addons/gunbag/functions/fnc_canInteract.sqf +++ b/addons/gunbag/functions/fnc_canInteract.sqf @@ -26,10 +26,10 @@ if ((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo [] && {_weapon != _result = 0; }; -if (!((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo []) && {_weapon == ""}) then { +if ((_gunbag getVariable [QGVAR(gunbagWeapon), []] isNotEqualTo []) && {_weapon == ""}) then { _result = 1; }; -if (!((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo []) && {_weapon != ""}) then { +if ((_gunbag getVariable [QGVAR(gunbagWeapon), []] isNotEqualTo []) && {_weapon != ""}) then { _result = 2; }; _result diff --git a/addons/gunbag/stringtable.xml b/addons/gunbag/stringtable.xml index 4276ebcfcc..7d2050c52d 100644 --- a/addons/gunbag/stringtable.xml +++ b/addons/gunbag/stringtable.xml @@ -72,6 +72,7 @@ Échanger les armes ガンバッグ内の武器を交換 Silah çantasında silah değişimi + Intercambiar arma en funda de arma Enable Weapon Swap @@ -80,6 +81,7 @@ Activer l'échange d'arme 武器交換を有効化 Silah Değiştirmeyi Etkinleştir + Habilitar cambio de arma Allows interaction to directly swap the primary weapon and stored weapon. @@ -88,6 +90,7 @@ Active le menu d'interaction personnelle permettant d'échanger directement l'arme primaire et l'arme rangée dans la housse. 持っている武器とガンバッグ内の武器を交換できるようにします。 Etkileşimin doğrudan birincil silahı ve depolanan silahı değiştirmesine izin verir. + Permitir interacción para intercambiar el arma principal y el arma guardada. Get weapon out of gunbag diff --git a/addons/headless/$PBOPREFIX$ b/addons/headless/$PBOPREFIX$ new file mode 100644 index 0000000000..553c595da0 --- /dev/null +++ b/addons/headless/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\headless diff --git a/addons/headless/ACE_Settings.hpp b/addons/headless/ACE_Settings.hpp new file mode 100644 index 0000000000..ec7130c2a3 --- /dev/null +++ b/addons/headless/ACE_Settings.hpp @@ -0,0 +1,14 @@ +class ACE_Settings { + class XGVAR(enabled) { + movedToSQF = 1; + }; + class XGVAR(delay) { + movedToSQF = 1; + }; + class XGVAR(endMission) { + movedToSQF = 1; + }; + class XGVAR(log) { + movedToSQF = 1; + }; +}; diff --git a/addons/headless/CfgEden.hpp b/addons/headless/CfgEden.hpp new file mode 100644 index 0000000000..30ee16fdc2 --- /dev/null +++ b/addons/headless/CfgEden.hpp @@ -0,0 +1,35 @@ +class Cfg3DEN { + class Object { + class AttributeCategories { + class ace_attributes { + class Attributes { + class XGVAR(blacklist) { + displayName = CSTRING(BlacklistEden); + tooltip = CSTRING(BlacklistEdenDesc); + property = QXGVAR(blacklist); + control = "Checkbox"; + condition = "objectControllable"; + expression = QUOTE(_this setVariable [ARR_3(QQXGVAR(blacklist), _value, true)]); + defaultValue = "(false)"; + }; + }; + }; + }; + }; + class Group { + class AttributeCategories { + class ace_attributes { + class Attributes { + class XGVAR(blacklist) { + displayName = CSTRING(BlacklistEden); + tooltip = CSTRING(BlacklistEdenDesc); + property = QXGVAR(blacklist); + control = "Checkbox"; + expression = QUOTE(_this setVariable [ARR_3(QQXGVAR(blacklist), _value, true)]); + defaultValue = "(false)"; + }; + }; + }; + }; + }; +}; diff --git a/addons/headless/CfgEventHandlers.hpp b/addons/headless/CfgEventHandlers.hpp new file mode 100644 index 0000000000..f6503c2479 --- /dev/null +++ b/addons/headless/CfgEventHandlers.hpp @@ -0,0 +1,17 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/headless/CfgVehicles.hpp b/addons/headless/CfgVehicles.hpp new file mode 100644 index 0000000000..4db23b20eb --- /dev/null +++ b/addons/headless/CfgVehicles.hpp @@ -0,0 +1,57 @@ +class CfgVehicles { + class ACE_Module; + class XGVAR(module): ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACEX"; + displayName = CSTRING(Module); + function = QFUNC(moduleInit); + scope = 1; + isGlobal = 1; // Global + isTriggerActivated = 0; + isDisposable = 0; + icon = QPATHTOF(UI\Icon_Module_Headless_ca.paa); + class Arguments { + class enabled { + displayName = ECSTRING(common,Enabled); + description = CSTRING(EnabledDesc); + typeName = "BOOL"; + defaultValue = 0; + }; + class delay { + displayName = CSTRING(Delay); + description = CSTRING(DelayDesc); + typeName = "NUMBER"; + defaultValue = DELAY_DEFAULT; + }; + class endMission { + displayName = CSTRING(EndMission); + description = CSTRING(EndMissionDesc); + typeName = "NUMBER"; + class values { + class disabled { + name = ECSTRING(Common,Disabled); + value = 0; + default = 1; + }; + class instant { + name = CSTRING(Instant); + value = 1; + }; + class delayed { + name = CSTRING(Delayed); + value = 2; + }; + }; + }; + class log { + displayName = CSTRING(Log); + description = CSTRING(LogDesc); + typeName = "BOOL"; + defaultValue = 0; + }; + }; + class ModuleDescription { + description = CSTRING(ModuleDesc); + }; + }; +}; diff --git a/addons/headless/README.md b/addons/headless/README.md new file mode 100644 index 0000000000..6d0cf28bd8 --- /dev/null +++ b/addons/headless/README.md @@ -0,0 +1,14 @@ +ace_headless +============ + +Adds automatic passing of AI groups to (up to 3) Headless Clients. +- Automatic Headless Client recognition +- Event-based transferring (on unit spawn, Headless Client connect and disconnect) +- Round-robin transferring when more than 1 Headless Client is present +- Mission makers can use the following to prevent a group from transferring to a Headless Client: + `this setVariable ["acex_headless_blacklist", true, true];` + +## ACEX Conversion - things still using acex prefix +- All settings +- 3DEN attribute config name +- Object SetVar (`acex_headless_blacklist`) diff --git a/addons/headless/UI/Icon_Module_Headless_ca.paa b/addons/headless/UI/Icon_Module_Headless_ca.paa new file mode 100644 index 0000000000..a3e23a8537 Binary files /dev/null and b/addons/headless/UI/Icon_Module_Headless_ca.paa differ diff --git a/addons/headless/XEH_PREP.hpp b/addons/headless/XEH_PREP.hpp new file mode 100644 index 0000000000..11e09adf10 --- /dev/null +++ b/addons/headless/XEH_PREP.hpp @@ -0,0 +1,7 @@ +ACEX_PREP(endMissionNoPlayers); +ACEX_PREP(handleConnectHC); +ACEX_PREP(handleDisconnect); +ACEX_PREP(handleSpawn); +ACEX_PREP(moduleInit); +ACEX_PREP(rebalance); +ACEX_PREP(transferGroups); diff --git a/addons/headless/XEH_postInit.sqf b/addons/headless/XEH_postInit.sqf new file mode 100644 index 0000000000..6e9a531899 --- /dev/null +++ b/addons/headless/XEH_postInit.sqf @@ -0,0 +1,37 @@ +#include "script_component.hpp" + +["ace_settingsInitialized", { + // Register and remove HCs if not client that is not server and distribution or end mission enabled + if ((!hasInterface || isServer) && {XGVAR(enabled) || XGVAR(endMission) != 0}) then { + if (isServer) then { + // Request rebalance on any unit spawn (only if distribution enabled) + if (XGVAR(enabled)) then { + ["AllVehicles", "init", FUNC(handleSpawn), nil, nil, true] call CBA_fnc_addClassEventHandler; + }; + // Add disconnect EH + addMissionEventHandler ["HandleDisconnect", {call FUNC(handleDisconnect)}]; + } else { + // Register HC (this part happens on HC only) + [QXGVAR(headlessClientJoined), [player]] call CBA_fnc_globalEvent; // Global event for API purposes + }; + + // Transfer loadouts (naked unit work-around) + if (XGVAR(transferLoadout) > 0) then { + ["CAManBase", "Local", { + params ["_unit", "_local"]; + + // Check if naked unit bug happened + if (_local && {uniform _unit == ""}) then { + INFO_1("Unit [%1] became local with broken loadout - attempting to fix",_unit); + if (XGVAR(transferLoadout) == 1) then { + // Transferred loadout, if unavailable reset to config default (still better than naked) + _unit setUnitLoadout (_unit getVariable [QGVAR(loadout), typeOf _unit]); + } else { + // Config default loadout + _unit setUnitLoadout (typeOf _unit); + }; + }; + }] call CBA_fnc_addClassEventHandler; + }; + }; +}] call CBA_fnc_addEventHandler; diff --git a/addons/headless/XEH_preInit.sqf b/addons/headless/XEH_preInit.sqf new file mode 100644 index 0000000000..3c18740cc8 --- /dev/null +++ b/addons/headless/XEH_preInit.sqf @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#include "initSettings.sqf" + +if (isServer) then { + GVAR(headlessClients) = []; + GVAR(inRebalance) = false; + GVAR(endMissionCheckDelayed) = false; + GVAR(blacklistType) = [BLACKLIST_UAV]; + [QXGVAR(headlessClientJoined), FUNC(handleConnectHC)] call CBA_fnc_addEventHandler; +}; + +ADDON = true; diff --git a/addons/headless/XEH_preStart.sqf b/addons/headless/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/headless/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/headless/config.cpp b/addons/headless/config.cpp new file mode 100644 index 0000000000..1491c330b5 --- /dev/null +++ b/addons/headless/config.cpp @@ -0,0 +1,26 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + authors[]= {"Jonpas"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; + + BWC_CONFIG(XADDON); +}; + +#include "ACE_Settings.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgEden.hpp" + +class ACE_newEvents { + ACE_HeadlessClientJoined = QXGVAR(headlessClientJoined); +}; diff --git a/addons/headless/functions/fnc_endMissionNoPlayers.sqf b/addons/headless/functions/fnc_endMissionNoPlayers.sqf new file mode 100644 index 0000000000..7b026081b3 --- /dev/null +++ b/addons/headless/functions/fnc_endMissionNoPlayers.sqf @@ -0,0 +1,29 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Ends mission on server if no players are connected. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_headless_fnc_endMissionNoPlayers + * + * Public: No + */ + +// Exit if no players of virtual curators present +if (call CBA_fnc_players isEqualTo [] && {(allCurators select {isPlayer getAssignedCuratorUnit _x}) isEqualTo []}) exitWith { + // End mission + [] call BIS_fnc_endMissionServer; + if (XGVAR(log)) then { + INFO("Ended Mission on all players leaving."); + }; +}; + +// Delay mission end otherwise +GVAR(endMissionCheckDelayed) = false; +TRACE_2("Players are present",count (call CBA_fnc_players),count allCurators); diff --git a/addons/headless/functions/fnc_handleConnectHC.sqf b/addons/headless/functions/fnc_handleConnectHC.sqf new file mode 100644 index 0000000000..48335cdb86 --- /dev/null +++ b/addons/headless/functions/fnc_handleConnectHC.sqf @@ -0,0 +1,35 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Registers connected Headless Client for use. + * + * Arguments: + * 0: Headless Client + * + * Return Value: + * None + * + * Example: + * [headlessClient] call ace_headless_fnc_handleConnectHC + * + * Public: No + */ + +params ["_headlessClient"]; + +// Exit if HC already registered +// No need to check if distribution or end mission enabled, as if disabled this will never run +if (_headlessClient in GVAR(headlessClients)) exitWith {}; + +// Register for use +GVAR(headlessClients) pushBack _headlessClient; + +if (XGVAR(log)) then { + INFO_1("Registered HC: %1",_headlessClient); +}; + +// Exit if AI distribution is disabled +if (!XGVAR(enabled)) exitWith {true}; + +// Rebalance +[true] call FUNC(rebalance); diff --git a/addons/headless/functions/fnc_handleDisconnect.sqf b/addons/headless/functions/fnc_handleDisconnect.sqf new file mode 100644 index 0000000000..154b51cd0b --- /dev/null +++ b/addons/headless/functions/fnc_handleDisconnect.sqf @@ -0,0 +1,63 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Removes Headless Client from use. + * Ends mission if setting enabled and only Headless Clients are still connected. + * + * Arguments: + * 0: Object + * + * Return Value: + * Transfer To Server + * + * Example: + * [unit] call ace_headless_fnc_handleDisconnect + * + * Public: No + */ + +params ["_object"]; +TRACE_1("HandleDisconnect",_this); + +// Exit if not HC +if !(_object in GVAR(headlessClients)) exitWith { + TRACE_2("Object not in HC list",_object,GVAR(headlessClients)); + // End mission when no players present + if (XGVAR(endMission) != 0 && {!GVAR(endMissionCheckDelayed)}) then { + // Delay check until 2.5 minutes into the mission - wait for allPlayers to sync + if (CBA_missionTime < 150) then { + TRACE_1("Mission start delay",CBA_missionTime); + GVAR(endMissionCheckDelayed) = true; + [{ + call FUNC(endMissionNoPlayers); + }, [], 150 - CBA_missionTime] call CBA_fnc_waitAndExecute; + } else { + // End instantly or after delay + if (XGVAR(endMission) == 1) then { + TRACE_2("Instant end",GVAR(endMission),CBA_missionTime); + call FUNC(endMissionNoPlayers); + } else { + TRACE_2("Delayed 60s end",GVAR(endMission),CBA_missionTime); + GVAR(endMissionCheckDelayed) = true; + [FUNC(endMissionNoPlayers), [], 60] call CBA_fnc_waitAndExecute; + }; + }; + }; + false +}; + +// Exit if AI distribution is disabled +if (!XGVAR(enabled)) exitWith {true}; + +// Remove HC +GVAR(headlessClients) deleteAt (GVAR(headlessClients) find _object); + +if (XGVAR(log)) then { + INFO_1("Removed HC: %1",_object); +}; + +// Rebalance +[true] call FUNC(rebalance); + +// Prevent transferring of HC to server +false diff --git a/addons/headless/functions/fnc_handleSpawn.sqf b/addons/headless/functions/fnc_handleSpawn.sqf new file mode 100644 index 0000000000..bc168025d9 --- /dev/null +++ b/addons/headless/functions/fnc_handleSpawn.sqf @@ -0,0 +1,30 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Handles AI spawn and requests a rebalance if applicable. + * + * Arguments: + * 0: Object + * + * Return Value: + * None + * + * Example: + * [object] call ace_headless_fnc_handleSpawn + * + * Public: No + */ + +params ["_object"]; +TRACE_1("Spawn",_object); + +// Exit if HC transferring disabled or object not a unit (including unit inside vehicle) or is player +if (!(_object in allUnits) || {isPlayer _object}) exitWith {}; + +// Exit and blacklist if of blacklist type +if ({_object isKindOf _x} count GVAR(blacklistType) > 0) exitWith { + _object setVariable [QXGVAR(blacklist), true]; +}; + +// Rebalance +[false] call FUNC(rebalance); diff --git a/addons/headless/functions/fnc_moduleInit.sqf b/addons/headless/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..b8bedde1ae --- /dev/null +++ b/addons/headless/functions/fnc_moduleInit.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Initializes the Headless module. + * + * Arguments: + * 0: The module logic + * 1: Units (Unused) + * 2: Activated + * + * Return Value: + * None + * + * Public: No + */ + +params ["_logic", "", "_activated"]; + +if (!_activated) exitWith {}; + +[_logic, QXGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); +[_logic, QXGVAR(delay), "delay"] call EFUNC(common,readSettingFromModule); +[_logic, QXGVAR(endMission), "endMission"] call EFUNC(common,readSettingFromModule); +[_logic, QXGVAR(log), "log"] call EFUNC(common,readSettingFromModule); + +INFO("Headless Module Initialized."); diff --git a/addons/headless/functions/fnc_rebalance.sqf b/addons/headless/functions/fnc_rebalance.sqf new file mode 100644 index 0000000000..c3f3b1c2a9 --- /dev/null +++ b/addons/headless/functions/fnc_rebalance.sqf @@ -0,0 +1,29 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Rebalance AI groups accross HCs. + * + * Arguments: + * 0: Force + * + * Return Value: + * None + * + * Example: + * [false] call ace_headless_fnc_rebalance + * + * Public: No + */ + +params ["_force"]; + +TRACE_3("Rebalance",GVAR(inRebalance),GVAR(headlessClients),_force); + +// Exit if waiting for rebalance or no HCs present +if (GVAR(inRebalance) || {GVAR(headlessClients) isEqualTo []}) exitWith {}; + +// Transfer after rebalance delay +[FUNC(transferGroups), [_force], XGVAR(Delay)] call CBA_fnc_waitAndExecute; + +// Currently in rebalance flag +GVAR(inRebalance) = true; diff --git a/addons/headless/functions/fnc_transferGroups.sqf b/addons/headless/functions/fnc_transferGroups.sqf new file mode 100644 index 0000000000..94cd2627d4 --- /dev/null +++ b/addons/headless/functions/fnc_transferGroups.sqf @@ -0,0 +1,147 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Transfers AI groups to Headess Client(s). + * + * Arguments: + * 0: Force + * + * Return Value: + * None + * + * Example: + * [false] call ace_headless_fnc_transferGroups + * + * Public: No + */ + +params ["_force"]; + +GVAR(headlessClients) params [ + ["_HC1", objNull, [objNull]], + ["_HC2", objNull, [objNull]], + ["_HC3", objNull, [objNull]] +]; + +if (XGVAR(log)) then { + INFO_2("Present HCs: %1 - Full Rebalance: %2",GVAR(headlessClients),_force); +}; + +// Enable round-robin load balancing if more than one HC is present +private _loadBalance = [false, true] select (count GVAR(headlessClients) > 1); + +// Get IDs and determine first HC to start with +private _idHC1 = -1; +private _idHC2 = -1; +private _idHC3 = -1; +private _currentHC = 0; + +if (!local _HC1) then { + _idHC1 = owner _HC1; + _currentHC = 1; +}; + +if (!local _HC2) then { + _idHC2 = owner _HC2; + + if (_currentHC == 0) then { + _currentHC = 2; + }; +}; + +if (!local _HC3) then { + _idHC3 = owner _HC3; + + if (_currentHC == 0) then { + _currentHC = 3; + }; +}; + +// Prepare statistics +private _numTransferredHC1 = 0; +private _numTransferredHC2 = 0; +private _numTransferredHC3 = 0; + +// Transfer AI groups +{ + // No transfer if empty group + private _transfer = !(units _x isEqualTo []) && {!(_x getVariable [QXGVAR(blacklist), false])}; + if (_transfer) then { + // No transfer if waypoints with synchronized triggers exist for the group + private _allWaypointsWithTriggers = (waypoints _x) select {!((synchronizedTriggers _x) isEqualTo [])}; + if !(_allWaypointsWithTriggers isEqualTo []) exitWith { + _transfer = false; + }; + + { + // No transfer if already transferred + if (!_force && {(owner _x) in [_idHC1, _idHC2, _idHC3]}) exitWith { + _transfer = false; + }; + + // No transfer if player in this group + if (isPlayer _x) exitWith { + _transfer = false; + }; + + // No transfer if any unit in group is blacklisted + if (_x getVariable [QXGVAR(blacklist), false]) exitWith { + _transfer = false; + }; + + // No transfer if vehicle unit is in or crew in that vehicle is blacklisted + if (vehicle _x != _x && {(vehicle _x) getVariable [QXGVAR(blacklist), false]}) exitWith { + _transfer = false; + }; + + // Save gear if unit about to be transferred with current loadout (naked unit work-around) + if (XGVAR(transferLoadout) == 1) then { + _x setVariable [QGVAR(loadout), getUnitLoadout _x, true]; + }; + } forEach (units _x); + }; + + // Round robin between HCs if load balance enabled, else pass all to one HC + if (_transfer) then { + switch (_currentHC) do { + case 1: { + private _transferred = _x setGroupOwner _idHC1; + if (_loadBalance) then { + _currentHC = [3, 2] select (!local _HC2); + }; + if (_transferred) then { + _numTransferredHC1 = _numTransferredHC1 + 1; + }; + }; + case 2: { + private _transferred = _x setGroupOwner _idHC2; + if (_loadBalance) then { + _currentHC = [1, 3] select (!local _HC3); + }; + if (_transferred) then { + _numTransferredHC2 = _numTransferredHC2 + 1; + }; + }; + case 3: { + private _transferred = _x setGroupOwner _idHC3; + if (_loadBalance) then { + _currentHC = [2, 1] select (!local _HC1); + }; + if (_transferred) then { + _numTransferredHC3 = _numTransferredHC3 + 1; + }; + }; + default { + TRACE_1("No Valid HC to transfer to", _currentHC); + }; + }; + }; +} forEach allGroups; + +if (XGVAR(log)) then { + private _numTransferredTotal = _numTransferredHC1 + _numTransferredHC2 + _numTransferredHC3; + INFO_4("Groups Transferred: Total: %1 - HC1: %2 - HC2: %3 - HC3: %4", _numTransferredTotal, _numTransferredHC1, _numTransferredHC2, _numTransferredHC3); +}; + +// Allow rebalance flag +GVAR(inRebalance) = false; diff --git a/addons/headless/functions/script_component.hpp b/addons/headless/functions/script_component.hpp new file mode 100644 index 0000000000..a38efad3a9 --- /dev/null +++ b/addons/headless/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\headless\script_component.hpp" diff --git a/addons/headless/initSettings.sqf b/addons/headless/initSettings.sqf new file mode 100644 index 0000000000..cb5fe6e53d --- /dev/null +++ b/addons/headless/initSettings.sqf @@ -0,0 +1,54 @@ +[ + QXGVAR(enabled), + "CHECKBOX", + [ELSTRING(common,Enabled), LSTRING(EnabledDesc)], + format ["ACE %1", LLSTRING(Module)], + false, + true, + {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(delay), + "SLIDER", + [LSTRING(Delay), LSTRING(DelayDesc)], + format ["ACE %1", LLSTRING(Module)], + [0, 60, 15, -1], + true, + {[QGVAR(delay), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(endMission), + "LIST", + [LSTRING(EndMission), LSTRING(EndMissionDesc)], + format ["ACE %1", LLSTRING(Module)], + [[0, 1, 2], [ELSTRING(Common,Disabled), LSTRING(Instant), LSTRING(Delayed)], 0], + true, + {[QGVAR(delay), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(log), + "CHECKBOX", + [LSTRING(Log), LSTRING(LogDesc)], + format ["ACE %1", LLSTRING(Module)], + false, + true, + {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(transferLoadout), + "LIST", + [LSTRING(TransferLoadout), LSTRING(TransferLoadoutDesc)], + format ["ACE %1", LLSTRING(Module)], + [[0, 1, 2], [ELSTRING(Common,Disabled), LSTRING(TransferLoadoutCurrent), LSTRING(TransferLoadoutConfig)], 0], + true, + {}, + true // needs mission restart +] call CBA_fnc_addSetting; diff --git a/addons/headless/script_component.hpp b/addons/headless/script_component.hpp new file mode 100644 index 0000000000..c73e2260de --- /dev/null +++ b/addons/headless/script_component.hpp @@ -0,0 +1,20 @@ +#define COMPONENT headless +#define COMPONENT_BEAUTIFIED Headless +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_HEADLESS + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_HEADLESS + #define DEBUG_SETTINGS DEBUG_SETTINGS_HEADLESS +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define DELAY_DEFAULT 15 +#define BLACKLIST_UAV "UAV", "UAV_AI_base_F", "B_UAV_AI", "O_UAV_AI", "I_UAV_AI" diff --git a/addons/headless/stringtable.xml b/addons/headless/stringtable.xml new file mode 100644 index 0000000000..660067a293 --- /dev/null +++ b/addons/headless/stringtable.xml @@ -0,0 +1,193 @@ + + + + + Headless + Headless + Headless + 헤드리스 + ヘッドレス + Headless + 无头客户端 + 無頭客戶端 + Headless + Headless клиент + + + This module allows you to setup automatic transferring of AI to Headless Clients. (Default: No) + Dieses Modul erlaubt es dir, die KI automatisch auf einen Headless Client zu transferieren. (Standard: Nein) + Ten moduł zezwala na automatyczny transfer AI do Headless Cient. (Domyślnie: Nie) + 이 모듈을 사용하면 헤드리스 클라이언트에 AI 자동 전송을 설정할 수 있습니다. (기본값 : No) + モジュールは AI を自動的にヘッドレス クライアントへ移行します。(標準: 無効) + Ce module permet de mettre en place un transfert aotmatique de l'IA vers le Headless Clients. (Défaut: Non) + 此模块能让你自动转换AI的控制权给其他无头客户端。(预设:关闭) + 此模塊能讓你自動轉換AI的控制權給其他無頭客戶端。(預設:關閉) + Questo modulo ti consente di impostare il trasferimento automatico delle AI su dei Client Headless. (Default: No) + Этот модуль позволяет настроить автоматическую передачу управления ИИ Headless клиентам. (По умолчанию: Откл) + + + Enables transferring of AI to Headless Clients. + Aktiviert den Transfer der KI auf die Headless Clients. + Włącza transfer AI do Headless Client. + AI를 헤드리스 클라이언트로 전송할 수 있습니다. + AI をヘッドレス クライアントへ移行を有効化 + Permet le transfert des IA au Headless Clients. + 开启转换AI控制权给无头客户端。 + 開啟轉換AI控制權給無頭客戶端。 + Abilita il trasferimento delle AI sugli Headless Client. + Передает управление ИИ Headless клиентам. + + + Delay + Verzögerung + Opóźnienie + 지연 + 遅延 + Délai + 延迟 + 延遲 + Latenza + Задержка + + + Minimal delay between transfers, in seconds. (Default: 15) + Minimale Verzögerung zwischen Transfers in Sekunden. (Standard: 15) + Minimalny odstęp pomiędzy transferami w sekundach. (Domyślnie: 15) + 전송 간 최소 지연 시간, 초당. (기본값: 15) + 移行する際の最低遅延を秒数で設定します。(標準: 15) + Délai minimum entres les transferts, en secondes. (Défaut: 15) + 设定每次转换间隔多少秒。(预设:15秒) + 設定每次轉換間隔多少秒。(預設:15秒) + Latenza minima tra i trasferimenti, in secondi. (Default: 15) + Минимальная задержка в секундах между передачами. (По умолчанию: 15) + + + End Mission + Beende Mission + 미션 종료 + ミッション終了 + Termine la Mission + 结束任务 + 結束任務 + Termina Missione + Koniec misji + Завершать миссию + + + End mission when there are no players connected (same as 'persistent = 0' in server configuration but with Headless Client support). + Beende die Mission, wenn keine Spieler mehr verbunden sind (das gleiche wie 'persitent = 0' in den Serverkonfigurationen aber mit Headless Client Unterstützung). + 연결된 플레이어가 없을 때 임무 종료. (서버 구성에서는 'persistent = 0'과 같지만 Headless Client는 지원함) + プレイヤーが接続していない場合はミッション終了します。(サーバ設定の'presistent =0'と同じですが、ヘッドレス クライアントは適用されます) + Termine la mission lorsqu'il n'y a plus de joueur connecté (idem que 'persistent = 0' dans la config serveur mais avec la gestion du Headless Client). + 当伺服器里没有任何玩家还连线时自动结束任务(效果同于伺服器设定的'persistent = 0',但支援无头客户端)。 + 當伺服器裡沒有任何玩家還連線時自動結束任務(效果同於伺服器設定的'persistent = 0',但支援無頭客戶端)。 + Termina la missione quando non ci sono più giocatori connessi (come 'persistent = 0' nella configurazione dei server ma con il supporto dell'Headless Client). + Kończy misje kiedy nie ma połączonych graczy(tak samo jak 'persistent = 0' w konfiguracji serwer ale z wsparciem Headless Client + Завершает миссию, если нет присоединенных игроков (аналогично 'persistent = 0' в настройках сервера, но с включенной поддержкой Headless клиентов). + + + Instant + Sofort + 즉시 + 即座 + Instantané + 立即 + 立即 + Istantaneo + Natychmiastowy + Мгновенно + + + Delayed (60s) + Verzögert (60s) + 지연 (60초) + 遅延 (60秒) + Retardé (60s) + 延迟 (60秒) + 延遲 (60秒) + Ritardato (60s) + Opóźniony (60s) + С задержкой (60 с) + + + Log + Protokolldatei anlegen + Dziennik zdarzeń + 로그 + ログ + Archive + 日志 + 日誌 + Registra + Журнал + + + Log transfer statistics and Headless Client (dis)connections to RPT. (Default: No) + Zeichnet Transferstatistiken, Verbindungen und Verbindungsabbrüche in einer RPT-Datei auf. (Standard: Nein) + Zapisz statystyki transferu i status połączenia Headless Clienta do RPT. (Domyślnie: Tak) + 전송 통계 및 헤드리스 클라이언트 연결(해제) 로그 RPT. (기본값: No) + 統計とヘッドレス クライアントの接続有無を PRT へ記録します。(標準: 無効) + Archive les statistiques de transfert et de (dé)connections du Headless Client dans le RPT. (Défaut: Non) + 记录无头客户端间的转换数量与连线/断线等记录到RPT报告档中。(预设:关闭) + 記錄無頭客戶端間的轉換數量與連線/斷線等記錄到RPT報告檔中。(預設:關閉) + Registra le statistiche del trasferimento e delle (dis)connessioni dell'Headless Clienti su RPT. (Default: No) + Вести журнал передач и подключений Headless клиентов в файл RPT. (По умолчанию: Откл) + + + Transfer Loadout + Transferiere Ausrüstung + 装備の移送 + 裝備傳輸 + Передавать снаряжение + Transfer Wyposażenia + + + Transfer loadout of units attempts to work around an issue where units appear naked after transferring to a Headless Client. + Transferiere die Ausrüstung einer Einheit, um einen Fehler zu umgehen, bei welchem Einheiten nach dem Transfer auf einen Headless Client nackt erscheinen. + 装備の移送はヘッドレス クライアントへの移行後にユニットが裸で出現する問題の回避を試みます。 + Передача снаряжения юнитов позволяет обходить проблему, при которой юниты оказываются без снаряжения после передачи управления Headless клиенту. + 裝備傳輸用於試著暫時應付單位透過無頭客戶端傳輸時所導致裸裝之問題。 + Transfer Wyposażenia jednostek usiłuje uniknąć problemu z nagimi jednostkami po transferze do Headless Clienta + + + Current Loadout + Derzeitige Ausrüstung + 現在の装備 + 目前裝備 + Текущее снаряжение + Obecne wyposażenie + + + Config Loadout + Konfiguriere Ausrüstung + コンフィグの装備 + 設置裝備 + Снаряжение из настроек + Konfiguracja Wyposażenia + + + Headless Blacklist + Headless Blacklist + ヘッドレス ブラックリスト + Liste noire Headless + 无头客户端黑名单 + 無頭客戶端黑名單 + Lista Nera Headless + 헤드리스 블랙리스트 + Czarna lista Headless + Черный список Headless + + + Disables transferring of this AI unit/group to Headless Clients. No effect on player units. + Schaltet das Übertragen dieser KI Einheit/Gruppe zu einem Headless Client aus. Hat keinen Effekt auf Spielereinheiten. + ヘッドレス クライアントへ移行させない AI ユニット/グループを指定します。プレイヤー ユニットへ効果はありません。 + Désactive le transfert de ce(tte) unité/groupe au Headless Clients. Sans effet sur les unités des joueurs. + 禁止转换黑名单中的AI单位/群组到无头客户端上。此功能对玩家单位无用。 + 禁止轉換黑名單中的AI單位/群組到無頭客戶端上。此功能對玩家單位無用。 + Disabilita il trasferimento di questa unità/gruppo di AI negli Headless Client. Non ha effetto sui giocatori. + 이 AI 유닛 / 그룹을 헤드리스 클라이언트로 전송하지 못하도록합니다. 플레이어 유닛에는 영향을주지 않습니다. + Wyłącza transfer tych jednostek/grup AI do Headless Clients. Bez efektu na jednostkach gracza. + Отключает передачу управления этого юнита/группы Headless клиентам. Не влияет на юниты игроков. + + + diff --git a/addons/hearing/ACE_Settings.hpp b/addons/hearing/ACE_Settings.hpp index a395ddd99f..46202c46f5 100644 --- a/addons/hearing/ACE_Settings.hpp +++ b/addons/hearing/ACE_Settings.hpp @@ -1,47 +1,20 @@ class ACE_Settings { class GVAR(enableCombatDeafness) { - category = CSTRING(Module_DisplayName); - value = 1; - typeName = "BOOL"; - displayName = CSTRING(EnableCombatDeafness_DisplayName); - description = CSTRING(EnableCombatDeafness_Description); + movedToSQF = 1; }; class GVAR(earplugsVolume) { - category = CSTRING(Module_DisplayName); - displayName = CSTRING(earplugsVolume_DisplayName); - description = CSTRING(earplugsVolume_Description); - value = 0.5; - typeName = "SCALAR"; - sliderSettings[] = {0, 1, 0.5, 1}; + movedToSQF = 1; }; class GVAR(unconsciousnessVolume) { - category = CSTRING(Module_DisplayName); - displayName = CSTRING(unconsciousnessVolume_DisplayName); - description = CSTRING(unconsciousnessVolume_Description); - value = 0.4; - typeName = "SCALAR"; - sliderSettings[] = {0, 1, 0.4, 1}; + movedToSQF = 1; }; class GVAR(disableEarRinging) { - category = CSTRING(Module_DisplayName); - value = 0; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(DisableEarRinging_DisplayName); - description = CSTRING(DisableEarRinging_Description); + movedToSQF = 1; }; class GVAR(enabledForZeusUnits) { - category = CSTRING(Module_DisplayName); - value = 1; - typeName = "BOOL"; - displayName = CSTRING(enabledForZeusUnits_DisplayName); - description = CSTRING(enabledForZeusUnits_Description); + movedToSQF = 1; }; class GVAR(autoAddEarplugsToUnits) { - category = CSTRING(Module_DisplayName); - value = 1; - typeName = "BOOL"; - displayName = CSTRING(autoAddEarplugsToUnits_DisplayName); - description = CSTRING(autoAddEarplugsToUnits_Description); + movedToSQF = 1; }; }; diff --git a/addons/hearing/CfgEventHandlers.hpp b/addons/hearing/CfgEventHandlers.hpp index cacaee8bce..f046e6495f 100644 --- a/addons/hearing/CfgEventHandlers.hpp +++ b/addons/hearing/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientinit = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientinit = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/hearing/README.md b/addons/hearing/README.md index 711a522559..7655b22e3b 100644 --- a/addons/hearing/README.md +++ b/addons/hearing/README.md @@ -2,12 +2,3 @@ ace_hearing =========== Introduces combat deafness. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index 17548a973b..d8b21f214a 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -13,7 +13,7 @@ GVAR(damageCoefficent) = 1; GVAR(volumeAttenuation) = 1; GVAR(lastPlayerVehicle) = objNull; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_1("settingInit",GVAR(EnableCombatDeafness)); // Only run PFEH and install event handlers if combat deafness is enabled if (!GVAR(EnableCombatDeafness)) exitWith {}; @@ -60,7 +60,7 @@ GVAR(lastPlayerVehicle) = objNull; }; // Don't add a new EH if the unit respawned if ((_player getVariable [QGVAR(firedEH), -1]) == -1) then { - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _player) >> "isPlayableLogic")) == 1) exitWith { + if ((getNumber (configOf _player >> "isPlayableLogic")) == 1) exitWith { TRACE_1("skipping playable logic",typeOf _player); // VirtualMan_F (placeable logic zeus / spectator) }; private _firedEH = _player addEventHandler ["FiredNear", {call FUNC(firedNear)}]; diff --git a/addons/hearing/XEH_preInit.sqf b/addons/hearing/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/hearing/XEH_preInit.sqf +++ b/addons/hearing/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/hearing/functions/fnc_removeEarplugs.sqf b/addons/hearing/functions/fnc_removeEarplugs.sqf index 5e8064e767..8399a3a84f 100644 --- a/addons/hearing/functions/fnc_removeEarplugs.sqf +++ b/addons/hearing/functions/fnc_removeEarplugs.sqf @@ -20,8 +20,8 @@ params ["_player", ["_displayHint", false, [false]]]; if (!GVAR(EnableCombatDeafness)) exitWith {}; -if !(_player canAdd "ACE_EarPlugs") exitWith { // inventory full - [localize LSTRING(Inventory_Full)] call EFUNC(common,displayTextStructured); +if !([_player, "ACE_EarPlugs"] call CBA_fnc_canAddItem) exitWith { // inventory full + [LELSTRING(common,Inventory_Full)] call EFUNC(common,displayTextStructured); }; // Plugs already in and removing them. diff --git a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf index 9f33633462..76f685df81 100644 --- a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf +++ b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf @@ -22,10 +22,10 @@ if (isNull _vehicle) exitWith {}; private _newAttenuation = 1; if (ACE_player != _vehicle) then { private _turretPath = [ACE_player] call EFUNC(common,getTurretIndex); - private _effectType = getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "attenuationEffectType"); + private _effectType = getText (configOf _vehicle >> "attenuationEffectType"); - if (!(_turretPath isEqualTo [])) then { - private _turretConfig = [(configFile >> "CfgVehicles" >> (typeOf _vehicle)), _turretPath] call EFUNC(common,getTurretConfigPath); + if (_turretPath isNotEqualTo []) then { + private _turretConfig = [(configOf _vehicle), _turretPath] call EFUNC(common,getTurretConfigPath); if ((getNumber (_turretConfig >> "disableSoundAttenuation")) == 1) then { _effectType = ""; @@ -40,7 +40,7 @@ if (ACE_player != _vehicle) then { case (_effectType == ""): {1}; case (_effectType == "CarAttenuation"); case (_effectType == "RHS_CarAttenuation"): { // Increase protection for armored cars - private _armor = getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "HitPoints" >> "HitBody" >> "armor"); + private _armor = getNumber (configOf _vehicle >> "HitPoints" >> "HitBody" >> "armor"); linearConversion [2, 8, _armor, 0.5, 0.3, true];}; case (_effectType == "OpenCarAttenuation"): {1}; case (_effectType == "TankAttenuation"): {0.1}; diff --git a/addons/hearing/initSettings.sqf b/addons/hearing/initSettings.sqf new file mode 100644 index 0000000000..f22a7b4eda --- /dev/null +++ b/addons/hearing/initSettings.sqf @@ -0,0 +1,49 @@ +private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)]; + +[ + QGVAR(enableCombatDeafness), "CHECKBOX", + [LSTRING(EnableCombatDeafness_DisplayName), LSTRING(EnableCombatDeafness_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(earplugsVolume), "SLIDER", + [LSTRING(earplugsVolume_DisplayName), LSTRING(earplugsVolume_Description)], + _category, + [0, 1, 0.5, 1], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(unconsciousnessVolume), "SLIDER", + [LSTRING(unconsciousnessVolume_DisplayName), LSTRING(unconsciousnessVolume_Description)], + _category, + [0, 1, 0.4, 1], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(disableEarRinging), "CHECKBOX", + [LSTRING(DisableEarRinging_DisplayName), LSTRING(DisableEarRinging_Description)], + _category, + false, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(enabledForZeusUnits), "CHECKBOX", + [LSTRING(enabledForZeusUnits_DisplayName), LSTRING(enabledForZeusUnits_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(autoAddEarplugsToUnits), "CHECKBOX", + [LSTRING(autoAddEarplugsToUnits_DisplayName), LSTRING(autoAddEarplugsToUnits_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index e5a8ca2bab..3d77dd879d 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -119,23 +119,6 @@ 你沒有耳塞 Kulak Tıkacın Yok - - No inventory space - Kein Platz im Inventar - Sin espacio en el inventario - Brak miejsca w ekwipunku - Il n'y a plus de place dans l'inventaire. - Není místo v inventáři - Non hai abbastanza spazio - Não há espaço no inventário - Nincs több hely - Нет места в инвентаре - インベントリに空きがありません - 넣을 공간이 없습니다 - 无可用空间 - 無可用空間 - Envanterin de alan yok - Disable ear ringing Désactiver les bourdonnements @@ -302,6 +285,7 @@ Защита слуха Proteção Auditiva Ochrana sluchu + Protección auditiva Volume muffling @@ -315,6 +299,7 @@ Глушение звука Abafamento de Volume Snížení hlasitosti + Atenuación de volumen Earplugs Volume @@ -328,6 +313,7 @@ Volume do Protetor Auricular Volume bouchons anti bruit Hlasitost se špunty + Volumen de protectores auditivos Volume when using earplugs. @@ -341,6 +327,7 @@ Volume quando estiver utilizando um Protetor Auricular Volume audio perçu par les joueurs portant des bouchons anti bruit. Hlasitost při používání špuntů do uší. + Volumen cuando se utilizan protectores auditivos. Unconscious Volume @@ -354,6 +341,7 @@ Volume Inconsciente Volume inconscience Hlasitost při ztrátě vědomí + Volumen inconsciente Volume when unconscious. @@ -367,6 +355,7 @@ Volume enquanto inconsciente Volume perçu par les joueurs inconscients. Hlasitost během ztráty vědomí. + Volumen durante la inconsciencia. diff --git a/addons/hellfire/CfgAmmo.hpp b/addons/hellfire/CfgAmmo.hpp index 8a50594ffa..5eef9ad47e 100644 --- a/addons/hellfire/CfgAmmo.hpp +++ b/addons/hellfire/CfgAmmo.hpp @@ -61,6 +61,7 @@ class CfgAmmo { indirectHitRange = 12; submunitionAmmo = ""; explosionEffects = "BombExplosion"; + EGVAR(vehicle_damage,incendiary) = 0.3; class ace_missileguidance: ace_missileguidance { enabled = 1; // Missile Guidance must be explicitly enabled }; diff --git a/addons/hellfire/CfgEventHandlers.hpp b/addons/hellfire/CfgEventHandlers.hpp index 77ea0239bd..cfa4d5fe32 100644 --- a/addons/hellfire/CfgEventHandlers.hpp +++ b/addons/hellfire/CfgEventHandlers.hpp @@ -1,15 +1,15 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInit)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/hellfire/CfgMagazines.hpp b/addons/hellfire/CfgMagazines.hpp index 51dba52661..6d1651604f 100644 --- a/addons/hellfire/CfgMagazines.hpp +++ b/addons/hellfire/CfgMagazines.hpp @@ -7,7 +7,7 @@ class CfgMagazines { ammo = "ACE_Hellfire_AGM114K"; displayName = "AGM-114K [ACE]"; displayNameShort = "AGM-114K"; - descriptionShort = "AGM-114K"; + descriptionShort = CSTRING(KDescriptionShort); }; // 1.70 pylon magazines: @@ -52,35 +52,35 @@ class CfgMagazines { ammo = "ACE_Hellfire_AGM114N"; displayName = "AGM-114N [ACE]"; displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; + descriptionShort = CSTRING(NDescriptionShort); }; // 1.70 pylon magazines: class PylonMissile_1Rnd_ACE_Hellfire_AGM114N: PylonMissile_1Rnd_ACE_Hellfire_AGM114K { // Bare missle displayName = "1x AGM-114N [ACE]"; displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; + descriptionShort = CSTRING(NDescriptionShort); ammo = "ACE_Hellfire_AGM114N"; pylonWeapon = QGVAR(launcher_N); }; class PylonRack_1Rnd_ACE_Hellfire_AGM114N: PylonRack_1Rnd_ACE_Hellfire_AGM114K { // 1x Launcher Support Rack displayName = "1x AGM-114N [ACE]"; displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; + descriptionShort = CSTRING(NDescriptionShort); ammo = "ACE_Hellfire_AGM114N"; pylonWeapon = QGVAR(launcher_N); }; class PylonRack_3Rnd_ACE_Hellfire_AGM114N: PylonRack_3Rnd_ACE_Hellfire_AGM114K { // 3x Launcher Support Rack displayName = "3x AGM-114N [ACE]"; displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; + descriptionShort = CSTRING(NDescriptionShort); ammo = "ACE_Hellfire_AGM114N"; pylonWeapon = QGVAR(launcher_N); }; class PylonRack_4Rnd_ACE_Hellfire_AGM114N: PylonRack_4Rnd_ACE_Hellfire_AGM114K { // 4x Launcher Support Rack displayName = "4x AGM-114N [ACE]"; displayNameShort = "AGM-114N"; - descriptionShort = "AGM-114N"; + descriptionShort = CSTRING(NDescriptionShort); ammo = "ACE_Hellfire_AGM114N"; pylonWeapon = QGVAR(launcher_N); }; @@ -91,35 +91,35 @@ class CfgMagazines { ammo = "ACE_Hellfire_AGM114L"; displayName = "AGM-114L [ACE]"; displayNameShort = "AGM-114L"; - descriptionShort = "AGM-114L"; + descriptionShort = CSTRING(LDescriptionShort); }; // 1.70 pylon magazines: class PylonMissile_1Rnd_ACE_Hellfire_AGM114L: PylonMissile_1Rnd_ACE_Hellfire_AGM114K { // Bare missle displayName = "1x AGM-114L [ACE]"; displayNameShort = "AGM-114L"; - descriptionShort = "AGM-114L"; + descriptionShort = CSTRING(LDescriptionShort); ammo = "ACE_Hellfire_AGM114L"; pylonWeapon = QGVAR(launcher_L); }; class PylonRack_1Rnd_ACE_Hellfire_AGM114L: PylonRack_1Rnd_ACE_Hellfire_AGM114K { // 1x Launcher Support Rack displayName = "1x AGM-114L [ACE]"; displayNameShort = "AGM-114L"; - descriptionShort = "AGM-114L"; + descriptionShort = CSTRING(LDescriptionShort); ammo = "ACE_Hellfire_AGM114L"; pylonWeapon = QGVAR(launcher_L); }; class PylonRack_3Rnd_ACE_Hellfire_AGM114L: PylonRack_3Rnd_ACE_Hellfire_AGM114K { // 3x Launcher Support Rack displayName = "3x AGM-114L [ACE]"; displayNameShort = "AGM-114L"; - descriptionShort = "AGM-114L"; + descriptionShort = CSTRING(LDescriptionShort); ammo = "ACE_Hellfire_AGM114L"; pylonWeapon = QGVAR(launcher_L); }; class PylonRack_4Rnd_ACE_Hellfire_AGM114L: PylonRack_4Rnd_ACE_Hellfire_AGM114K { // 4x Launcher Support Rack displayName = "4x AGM-114L [ACE]"; displayNameShort = "AGM-114L"; - descriptionShort = "AGM-114L"; + descriptionShort = CSTRING(LDescriptionShort); ammo = "ACE_Hellfire_AGM114L"; pylonWeapon = QGVAR(launcher_L); }; diff --git a/addons/hellfire/README.md b/addons/hellfire/README.md index bb9eef711e..b894c0050c 100644 --- a/addons/hellfire/README.md +++ b/addons/hellfire/README.md @@ -3,8 +3,3 @@ ace_hellfire Adds AGM-114K Hellfire missiles. -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/hellfire/XEH_postInit.sqf b/addons/hellfire/XEH_postInit.sqf index e89bf7a3e3..020e4dc2fc 100644 --- a/addons/hellfire/XEH_postInit.sqf +++ b/addons/hellfire/XEH_postInit.sqf @@ -2,7 +2,7 @@ if (!hasInterface) exitWith {}; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { ["turret", LINKFUNC(setupVehicle), false] call CBA_fnc_addPlayerEventHandler; ["vehicle", LINKFUNC(setupVehicle), true] call CBA_fnc_addPlayerEventHandler; // only one of these needs the retro flag diff --git a/addons/hellfire/functions/fnc_attackProfile.sqf b/addons/hellfire/functions/fnc_attackProfile.sqf index 7d4980a1b3..b2a08f24a3 100644 --- a/addons/hellfire/functions/fnc_attackProfile.sqf +++ b/addons/hellfire/functions/fnc_attackProfile.sqf @@ -56,7 +56,7 @@ switch (_attackStage) do { _returnTargetPos = _projectilePos getPos [100, getDir _projectile]; _returnTargetPos set [2, (_projectilePos select 2) + _cruiseHeight]; - if (!(_seekerTargetPos isEqualTo [0,0,0])) then { + if (_seekerTargetPos isNotEqualTo [0,0,0]) then { _attackProfileStateParams set [0, STAGE_ATTACK_CRUISE]; TRACE_1("New Stage: STAGE_ATTACK_CRUISE",_distanceFromLaunch2d); }; @@ -67,7 +67,7 @@ switch (_attackStage) do { private _distToGoRatio = _distanceToTarget2d / (_launchPos distance2d _seekerTargetPos); // arcing up at 7 degrees to start until 50% left, then smooth curve to a downward attack - private _gainSlope = linearConversion [0.5, 0.1, _distToGoRatio, 7, -7, true]; + private _gainSlope = linearConversion [0.5, 0.1, _distToGoRatio, 7, -7, true]; _returnTargetPos = +_seekerTargetPos; _returnTargetPos set [2, ((_projectilePos select 2) + (_distanceToTarget2d * sin _gainSlope)) max (_seekerTargetPos select 2)]; diff --git a/addons/hellfire/functions/fnc_setupVehicle.sqf b/addons/hellfire/functions/fnc_setupVehicle.sqf index e824542021..cf0a17a2e7 100644 --- a/addons/hellfire/functions/fnc_setupVehicle.sqf +++ b/addons/hellfire/functions/fnc_setupVehicle.sqf @@ -41,7 +41,7 @@ if (!_enabled) exitWith {TRACE_3("Not enabled",_enabled,_vehicle,_turretPath);}; // Add laser if vehicle is configured for one: -if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> QGVAR(addLaserDesignator))) == 1) then { +if ((getNumber (configOf _vehicle >> QGVAR(addLaserDesignator))) == 1) then { [{ params ["_vehicle", "_turretPath"]; TRACE_3("checking for laser",_vehicle,_turretPath,_vehicle turretLocal _turretPath); diff --git a/addons/hellfire/stringtable.xml b/addons/hellfire/stringtable.xml index c621e6ddb4..1f5b495b06 100644 --- a/addons/hellfire/stringtable.xml +++ b/addons/hellfire/stringtable.xml @@ -17,5 +17,29 @@ Hellfire modunu ayarla Ajustar modo Hellfire + + Semi-active laser homing missile with high explosive anti-tank warhead + Самонаводящаяся Ракета с фугасной противотанковой боевой частью и полуактивной лазерной системой наведения + Misil de guiado láser semi-activo con cabeza de alto explosivo anti-tanque + Missile antichar à guidage laser semi-actif (charge HEAT) + セミ アクティブ レーダー誘導の対戦車弾頭 + Rakieta naprowadzana laserowo z głowicą przeciwpancerną + + + Millimeter-wave radar guided missile with high explosive anti-tank warhead + Радиолокационная управляемая ракета миллиметрового диапазона с фугасной противотанковой боевой частью + Misil guiado por radar de onda milimétrica con cabeza de alto explosivo anti-tanque + Missile antichar à guidage radar à ondes courtes (charge HEAT) + ミリ波レーダー誘導の対戦車弾頭 + Rakieta namierzana radarowo z głowicą przeciwpancerną + + + Semi-active laser homing missile with metal augmented charge anti-personnel warhead + Самонаводящаяся ракета с металлической увеличенной зарядной противопехотной боевой частью и полуактивной лазерной системой наведения + Misil guiado por láser semi-activo con cabeza de carga de metal aumentada anti-persona + Missile antipersonnel thermobarique à guidage laser semi-actif + セミ アクティブ レーダー誘導の対人弾 + Rakieta naprowadzana laserowo z głowicą odłamkową + diff --git a/addons/hitreactions/ACE_Settings.hpp b/addons/hitreactions/ACE_Settings.hpp index 0220e09629..90c1445eba 100644 --- a/addons/hitreactions/ACE_Settings.hpp +++ b/addons/hitreactions/ACE_Settings.hpp @@ -1,10 +1,6 @@ class ACE_Settings { class GVAR(minDamageToTrigger) { - //Minimum mamage needed to trigger falling down while moving. Set to -1 to disable completely. - typeName = "SCALAR"; - value = 0.1; - displayName = CSTRING(minDamageToTrigger_displayName); - sliderSettings[] = {-1, 1, 0.1, 1}; + movedToSQF = 1; }; }; diff --git a/addons/hitreactions/CfgEventHandlers.hpp b/addons/hitreactions/CfgEventHandlers.hpp index bb990cafea..eecf08c69d 100644 --- a/addons/hitreactions/CfgEventHandlers.hpp +++ b/addons/hitreactions/CfgEventHandlers.hpp @@ -1,13 +1,13 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/hitreactions/README.md b/addons/hitreactions/README.md index f770470e44..2d69ce0a89 100644 --- a/addons/hitreactions/README.md +++ b/addons/hitreactions/README.md @@ -2,10 +2,3 @@ ace_hitreactions =========== Adds reactions when getting shot. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/addons/hitreactions/XEH_preInit.sqf b/addons/hitreactions/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/hitreactions/XEH_preInit.sqf +++ b/addons/hitreactions/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/hitreactions/functions/fnc_fallDown.sqf b/addons/hitreactions/functions/fnc_fallDown.sqf index 4b305700e0..d0f93f6f95 100644 --- a/addons/hitreactions/functions/fnc_fallDown.sqf +++ b/addons/hitreactions/functions/fnc_fallDown.sqf @@ -22,6 +22,9 @@ params ["_unit", "_firer", "_damage"]; // exit if system is disabled if (GVAR(minDamageToTrigger) == -1) exitWith {}; +// exit if damage is disabled on unit +if !(isDamageAllowed _unit && {_unit getVariable [QEGVAR(medical,allowDamage), true]}) exitWith {}; + // don't fall after minor damage if (_damage < GVAR(minDamageToTrigger)) exitWith {}; diff --git a/addons/hitreactions/initSettings.sqf b/addons/hitreactions/initSettings.sqf new file mode 100644 index 0000000000..9c067bf5f7 --- /dev/null +++ b/addons/hitreactions/initSettings.sqf @@ -0,0 +1,7 @@ +[ + QGVAR(minDamageToTrigger), "SLIDER", + LSTRING(minDamageToTrigger_displayName), + "ACE Uncategorized", + [-1, 1, 0.1, 1], + 1 +] call CBA_fnc_addSetting; diff --git a/addons/hot/CfgAmmo.hpp b/addons/hot/CfgAmmo.hpp index 4ee29bec6d..dee076be0e 100644 --- a/addons/hot/CfgAmmo.hpp +++ b/addons/hot/CfgAmmo.hpp @@ -53,6 +53,7 @@ class CfgAmmo { initTime = 0.3; EGVAR(rearm,caliber) = 178; + EGVAR(vehicle_damage,incendiary) = 1.0; class ace_missileguidance { enabled = 1; @@ -118,6 +119,8 @@ class CfgAmmo { displayNameShort = CSTRING(hot2mp); description = CSTRING(missileType_Description_AP); + EGVAR(vehicle_damage,incendiary) = 0.1; + class ace_missileguidance: ace_missileguidance { enabled = 1; }; diff --git a/addons/hot/README.md b/addons/hot/README.md index 217dfc2f6f..c94e369c7d 100644 --- a/addons/hot/README.md +++ b/addons/hot/README.md @@ -2,11 +2,3 @@ ace_hot =================== Adds HOT1/2/3 Missiles - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Brandon-TCVM](https://github.com/TheCandianVendingMachine) - diff --git a/addons/huntir/CfgEventhandlers.hpp b/addons/huntir/CfgEventhandlers.hpp index becf395052..6c29240403 100644 --- a/addons/huntir/CfgEventhandlers.hpp +++ b/addons/huntir/CfgEventhandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/huntir/Dialog.hpp b/addons/huntir/Dialog.hpp index 17578bbb3e..18c5ac1339 100644 --- a/addons/huntir/Dialog.hpp +++ b/addons/huntir/Dialog.hpp @@ -60,7 +60,7 @@ class GVAR(cam_dialog) { idd = 18880; - movingEnable = true; + movingEnable = 1; controlsBackground[] = { }; objects[] = { }; controls[] = { diff --git a/addons/huntir/README.md b/addons/huntir/README.md index b6c8128cbc..66b837c8d9 100644 --- a/addons/huntir/README.md +++ b/addons/huntir/README.md @@ -2,10 +2,3 @@ ace_huntir =========== Adds High-altitude Unit Navigated Tactical Imaging Round and its Monitor. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/huntir/RscTitles.hpp b/addons/huntir/RscTitles.hpp index e93eb9b508..7d2e06fa6b 100644 --- a/addons/huntir/RscTitles.hpp +++ b/addons/huntir/RscTitles.hpp @@ -3,7 +3,7 @@ class RscTitles { class GVAR(cam_rose) { idd=-1; - movingEnable = true; + movingEnable = 1; fadein = 0; fadeout = 1; duration = 1e+011; diff --git a/addons/huntir/config.cpp b/addons/huntir/config.cpp index 89992d5f52..4e9f5952cc 100644 --- a/addons/huntir/config.cpp +++ b/addons/huntir/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {"ACE_HuntIR", "ACE_HuntIRBox"}; + units[] = {"ACE_HuntIR", "ACE_HuntIR_Box", "ACE_Item_HuntIR_monitor"}; weapons[] = {"ACE_HuntIR_monitor"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; diff --git a/addons/huntir/stringtable.xml b/addons/huntir/stringtable.xml index 6fde6d9077..0ee91b8b95 100644 --- a/addons/huntir/stringtable.xml +++ b/addons/huntir/stringtable.xml @@ -36,15 +36,15 @@ HuntIR Mermisi - HuntIR monitor + HuntIR Monitor HuntIR Monitor Monitor HuntIR - HuntIR monitor + HuntIR Monitor HuntIR монитор Monitor HuntIR Odbiornik HuntIR Ecran HuntIR - HuntIR monitor + HuntIR Monitor Monitor HuntIR HuntIR モニタ HuntIR 모니터 diff --git a/addons/intelitems/$PBOPREFIX$ b/addons/intelitems/$PBOPREFIX$ new file mode 100644 index 0000000000..0ff9becd8a --- /dev/null +++ b/addons/intelitems/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\intelitems diff --git a/addons/intelitems/CfgEditorSubcategories.hpp b/addons/intelitems/CfgEditorSubcategories.hpp new file mode 100644 index 0000000000..3fca5e183e --- /dev/null +++ b/addons/intelitems/CfgEditorSubcategories.hpp @@ -0,0 +1,5 @@ +class CfgEditorSubcategories { + class XADDON { + displayName = CSTRING(Category); + }; +}; diff --git a/addons/intelitems/CfgEventHandlers.hpp b/addons/intelitems/CfgEventHandlers.hpp new file mode 100644 index 0000000000..f6503c2479 --- /dev/null +++ b/addons/intelitems/CfgEventHandlers.hpp @@ -0,0 +1,17 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/intelitems/CfgMagazines.hpp b/addons/intelitems/CfgMagazines.hpp new file mode 100644 index 0000000000..48a130efa9 --- /dev/null +++ b/addons/intelitems/CfgMagazines.hpp @@ -0,0 +1,38 @@ +class CfgMagazines { + class CA_Magazine; + class GVAR(base): CA_Magazine { + count = 1; + mass = 1; + ACE_isUnique = 1; + GVAR(intel) = 1; + GVAR(control) = ""; + }; + + class XGVAR(notepad): GVAR(base) { + author = ECSTRING(common,ACETeam); + scope = 2; // Allows players to access from arsenal + displayName = CSTRING(Notepad_DisplayName); + descriptionShort = CSTRING(Notepad_Description); + picture = QPATHTOF(ui\notepad_ca.paa); + model = "\a3\structures_f\items\documents\notepad_f.p3d"; + GVAR(control) = QGVAR(RscNotepad); + }; + + class XGVAR(document): GVAR(base) { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(Document_DisplayName); + descriptionShort = CSTRING(Document_Description); + picture = QPATHTOF(ui\document_ca.paa); + model = "\a3\structures_f\items\documents\file2_f.p3d"; + GVAR(control) = QGVAR(RscDocument); + }; + + class XGVAR(photo): GVAR(base) { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(Photo_DisplayName); + descriptionShort = CSTRING(Photo_Description); + picture = QPATHTOF(ui\photo_ca.paa); + model = "\a3\structures_f\items\documents\filephotos_f.p3d"; + GVAR(control) = QGVAR(RscPhoto); + }; +}; diff --git a/addons/intelitems/CfgVehicles.hpp b/addons/intelitems/CfgVehicles.hpp new file mode 100644 index 0000000000..81a0917406 --- /dev/null +++ b/addons/intelitems/CfgVehicles.hpp @@ -0,0 +1,83 @@ +class CfgVehicles { + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class ADDON { + displayName = CSTRING(DisplayName); + condition = QUOTE(visibleMap); + exceptions[] = {"isNotInside", "notOnMap"}; + statement = ""; + insertChildren = QUOTE(_player call FUNC(addActions)); + icon = ""; + }; + }; + }; + + class ThingX; + class GVAR(base): ThingX { + XEH_ENABLED; + icon = "iconObject_2x3"; + mapSize = 0.3; + simulation = "House"; // Needed because the objects don't have good collision physx + destrType = "DesturctNo"; + curatorInfoTypeEmpty = QGVAR(RscSetData); + editorSubcategory = QUOTE(XADDON); + GVAR(magazine) = ""; + class Attributes { + class GVAR(data) { + displayName = CSTRING(Text); + property = QGVAR(data); + control = "EditMulti5"; + expression = QUOTE([ARR_2(_this,_value)] call FUNC(setObjectData)); + defaultValue = "''"; + validate = "STRING"; + typeName = "STRING"; + }; + }; + class ACE_Actions { + class GVAR(pickup) { + displayName = CSTRING(Pickup); + icon = "\a3\ui_f\data\igui\cfg\actions\take_ca.paa"; + distance = 2; + condition = QUOTE(_this call FUNC(canPickup)); + statement = QUOTE(_this call FUNC(pickup)); + }; + }; + }; + + class XGVAR(notepad): GVAR(base) { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(Notepad_DisplayName); + model = "\a3\structures_f\items\documents\notepad_f.p3d"; + editorPreview = "\a3\editorpreviews_f\data\cfgvehicles\land_notepad_f.jpg"; + scope = 2; + scopeCurator = 2; + GVAR(magazine) = QXGVAR(notepad); + }; + + class XGVAR(document): GVAR(base) { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(Document_DisplayName); + model = "\a3\structures_f\items\documents\file2_f.p3d"; + editorPreview = "\a3\editorpreviews_f\data\cfgvehicles\intel_file2_f.jpg"; + scope = 2; + scopeCurator = 2; + GVAR(magazine) = QXGVAR(document); + }; + + class XGVAR(photo): GVAR(base) { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(Photo_DisplayName); + model = "\a3\structures_f\items\documents\filephotos_f.p3d"; + editorPreview = "\a3\editorpreviews_f\data\cfgvehicles\land_filephotos_f.jpg"; + scope = 2; + scopeCurator = 2; + GVAR(magazine) = QXGVAR(photo); + class Attributes: Attributes { + class GVAR(data): GVAR(data) { + displayName = CSTRING(Photo_Filename); + control = "Edit"; + }; + }; + }; +}; diff --git a/addons/intelitems/README.md b/addons/intelitems/README.md new file mode 100644 index 0000000000..0149937739 --- /dev/null +++ b/addons/intelitems/README.md @@ -0,0 +1,7 @@ +ace_intelitems +=============== + +Implements an intel system with unique items. + +## ACEX Conversion - things still using acex prefix +- All CfgWeapon Items (e.g. `acex_intelitems_notepad`) diff --git a/addons/intelitems/XEH_PREP.hpp b/addons/intelitems/XEH_PREP.hpp new file mode 100644 index 0000000000..cef76045d3 --- /dev/null +++ b/addons/intelitems/XEH_PREP.hpp @@ -0,0 +1,13 @@ +ACEX_PREP(addActions); +ACEX_PREP(addIntel); +ACEX_PREP(attributeFocus); +ACEX_PREP(canPickup); +ACEX_PREP(createControl); +ACEX_PREP(deleteControl); +ACEX_PREP(handleLoadout); +ACEX_PREP(handleMagIndex); +ACEX_PREP(onMouseButtonDown); +ACEX_PREP(onMouseButtonUp); +ACEX_PREP(onMouseMoving); +ACEX_PREP(pickup); +ACEX_PREP(setObjectData); diff --git a/addons/intelitems/XEH_postInit.sqf b/addons/intelitems/XEH_postInit.sqf new file mode 100644 index 0000000000..f416b3667e --- /dev/null +++ b/addons/intelitems/XEH_postInit.sqf @@ -0,0 +1,13 @@ +#include "script_component.hpp" + +// Only handle loadout change when on map or have open controls +["loadout", { + if (!visibleMap && {GVAR(controlsGroups) isEqualTo []}) exitWith {}; + call FUNC(handleLoadout); +}, true] call CBA_fnc_addPlayerEventHandler; + +// Check loadout when map is opened +["visibleMap", { + params ["", "_visibleMap"]; + if (_visibleMap) then {call FUNC(handleLoadout)}; +}, true] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/intelitems/XEH_preInit.sqf b/addons/intelitems/XEH_preInit.sqf new file mode 100644 index 0000000000..76f13135d9 --- /dev/null +++ b/addons/intelitems/XEH_preInit.sqf @@ -0,0 +1,33 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +if (isServer) then { + // Master Count - only on server and needed before postInit + GVAR(intelCount) = 0; + + // Map of all magazine ids and their corresponding intel index + GVAR(intelMap) = [true] call CBA_fnc_createNamespace; + publicVariable QGVAR(intelMap); + + // Namespace of intel indices and their corresponding data + GVAR(intelData) = [true] call CBA_fnc_createNamespace; + publicVariable QGVAR(intelData); + + [QGVAR(handleMagIndex), FUNC(handleMagIndex)] call CBA_fnc_addEventHandler; + [QGVAR(setObjectData), FUNC(setObjectData)] call CBA_fnc_addEventHandler; +}; + +if (hasInterface) then { + // Array of all open controls groups + GVAR(controlsGroups) = []; + + // Hash to track controls group positions on map between closing + GVAR(controlsData) = [] call CBA_fnc_hashCreate; +}; + +ADDON = true; diff --git a/addons/intelitems/XEH_preStart.sqf b/addons/intelitems/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/intelitems/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/intelitems/config.cpp b/addons/intelitems/config.cpp new file mode 100644 index 0000000000..3b9b37b5b6 --- /dev/null +++ b/addons/intelitems/config.cpp @@ -0,0 +1,27 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = { + QXGVAR(notepad), + QXGVAR(document), + QXGVAR(photo) + }; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interact_menu", "ace_zeus"}; + author = ECSTRING(common,ACETeam); + authors[] = {"PabstMirror", "mharis001"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; + + BWC_CONFIG(XADDON); +}; + +#include "CfgEventHandlers.hpp" +#include "CfgEditorSubcategories.hpp" +#include "CfgMagazines.hpp" +#include "CfgVehicles.hpp" +#include "gui.hpp" diff --git a/addons/intelitems/functions/fnc_addActions.sqf b/addons/intelitems/functions/fnc_addActions.sqf new file mode 100644 index 0000000000..d43d7fc927 --- /dev/null +++ b/addons/intelitems/functions/fnc_addActions.sqf @@ -0,0 +1,58 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Returns children actions for intel items in the player's inventory. + * + * Arguments: + * 0: Player + * + * Return Value: + * Actions + * + * Example: + * [player] call ace_intelitems_fnc_addActions + * + * Public: No + */ + +params ["_player"]; + +private _actions = []; + +private _cfgMagazines = configFile >> "CfgMagazines"; +private _magazines = magazines _player; + +private _openIndices = GVAR(controlsGroups) apply {_x getVariable QGVAR(index)}; + +{ + private _config = _cfgMagazines >> _x; + + if (getNumber (_config >> QGVAR(intel)) == 1) then { + private _displayName = getText (_config >> "displayName"); + private _picture = getText (_config >> "picture"); + private _controlType = getText (_config >> QGVAR(control)); + + private _magazineIds = [_player, _x] call CBA_fnc_getMagazineIndex; + + { + private _index = GVAR(intelMap) getVariable _x; + + // Only add actions for intel indices that are not open + if !(_index in _openIndices) then { + private _action = [ + format [QGVAR(%1), _index], + _displayName, + _picture, + {(_this select 2) call FUNC(createControl)}, + {true}, + {}, + [_controlType, _index] + ] call EFUNC(interact_menu,createAction); + + _actions pushBack [_action, [], _player]; + }; + } forEach _magazineIds; + }; +} forEach (_magazines arrayIntersect _magazines); + +_actions diff --git a/addons/intelitems/functions/fnc_addIntel.sqf b/addons/intelitems/functions/fnc_addIntel.sqf new file mode 100644 index 0000000000..101370e135 --- /dev/null +++ b/addons/intelitems/functions/fnc_addIntel.sqf @@ -0,0 +1,46 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Adds the given intel item (magazine) to the given unit. + * Must be called on the server. + * + * Arguments: + * 0: Unit + * 1: Item + * 3: Data + * + * Return Value: + * Successful + * + * Example: + * [_unit, "acex_intelitems_notepad", "Notes!"] call ace_intelitems_fnc_addIntel + * + * Public: Yes + */ + +if (canSuspend) exitWith { + [FUNC(addIntel), _this] call CBA_fnc_directCall; +}; + +params [["_unit", objNull, [objNull]], ["_item", "", [""]], ["_data", "", [""]]]; + +if ( + !isServer + || {!(_unit isKindOf "CAManBase")} + || {!(_unit canAdd _item)} + || {getNumber (configFile >> "CfgMagazines" >> _item >> QGVAR(intel)) != 1} +) exitWith { ERROR_1("addIntel failed - %1",_this); false }; + +// Add the magazine item to the unit's inventory and get its id +private _magazinesBefore = [_unit, _item] call CBA_fnc_getMagazineIndex; +_unit addMagazine [_item, 1]; +private _magazinesAfter = [_unit, _item] call CBA_fnc_getMagazineIndex; + +private _magazineId = _magazinesAfter - _magazinesBefore; +if (_magazineId isEqualTo []) exitWith {false}; + +// Assign an intel index to the added magazine id and set its data +private _index = [_magazineId select 0] call FUNC(handleMagIndex); +SET_DATA(_index,_data); + +true diff --git a/addons/intelitems/functions/fnc_attributeFocus.sqf b/addons/intelitems/functions/fnc_attributeFocus.sqf new file mode 100644 index 0000000000..798a4d9b28 --- /dev/null +++ b/addons/intelitems/functions/fnc_attributeFocus.sqf @@ -0,0 +1,47 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror, mharis001 + * Initializes the Zeus attributes display for intel objects. + * + * Arguments: + * 0: Controls group + * + * Return Value: + * None + * + * Example: + * [CONTROL] call ace_intelitems_fnc_attributeFocus + * + * Public: No + */ + +params ["_control"]; + +private _display = ctrlParent _control; +private _ctrlButtonOK = _display displayCtrl 1; // IDC_OK +private _object = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); + +_control ctrlRemoveAllEventHandlers "SetFocus"; + +private _ctrlLabel = _display displayCtrl IDC_ATTRIBUTE_LABEL; +private _labelText = getText (configFile >> "CfgVehicles" >> typeOf _object >> "Attributes" >> QGVAR(data) >> "displayName"); +_ctrlLabel ctrlSetText _labelText; + +private _index = _object getVariable [QGVAR(index), -1]; + +if (_index != -1) then { + private _ctrlEdit = _display displayCtrl IDC_ATTRIBUTE_EDIT; + _ctrlEdit ctrlSetText GET_DATA(_index); +}; + +private _fnc_onConfirm = { + params ["_ctrlButtonOK"]; + + private _display = ctrlParent _ctrlButtonOK; + private _object = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); + private _data = ctrlText (_display displayCtrl IDC_ATTRIBUTE_EDIT); + + [QGVAR(setObjectData), [_object, _data]] call CBA_fnc_serverEvent; +}; + +_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; diff --git a/addons/intelitems/functions/fnc_canPickup.sqf b/addons/intelitems/functions/fnc_canPickup.sqf new file mode 100644 index 0000000000..5ca78e0045 --- /dev/null +++ b/addons/intelitems/functions/fnc_canPickup.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror, mharis001 + * Checks if the player can pickup an intel object. + * + * Arguments: + * 0: Object + * 1: Player + * + * Return Value: + * Can pickup + * + * Example: + * [cursorObject, player] call ace_intelitems_fnc_canPickup + * + * Public: No + */ + +params ["_object", "_player"]; + +private _magazineClass = getText (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(magazine)); + +_magazineClass != "" && {_player canAdd _magazineClass} diff --git a/addons/intelitems/functions/fnc_createControl.sqf b/addons/intelitems/functions/fnc_createControl.sqf new file mode 100644 index 0000000000..c24e9d74e2 --- /dev/null +++ b/addons/intelitems/functions/fnc_createControl.sqf @@ -0,0 +1,55 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror, mharis001 + * Creates an intel controls group. + * + * Arguments: + * 0: Control type + * 1: Intel index + * + * Return Value: + * None + * + * Example: + * ["RscNotepad", 1] call ace_intelitems_fnc_createControl + * + * Public: No + */ + +params ["_controlType", "_index"]; + +private _display = findDisplay IDD_MAIN_MAP; +private _controlsGroup = _display ctrlCreate [_controlType, -1]; +_controlsGroup setVariable [QGVAR(index), _index]; + +GVAR(controlsGroups) pushBack _controlsGroup; + +// Add event handlers to header to allow moving controls group +private _ctrlHeader = _controlsGroup controlsGroupCtrl IDC_HEADER; +_ctrlHeader ctrlAddEventHandler ["MouseButtonDown", {call FUNC(onMouseButtonDown)}]; +_ctrlHeader ctrlAddEventHandler ["MouseButtonUp", {call FUNC(onMouseButtonUp)}]; +_ctrlHeader ctrlAddEventHandler ["MouseMoving", {call FUNC(onMouseMoving)}]; + +// Add event handler to close controls group +private _ctrlClose = _controlsGroup controlsGroupCtrl IDC_CLOSE; +_ctrlClose ctrlAddEventHandler ["ButtonClick", { + params ["_ctrlClose"]; + + private _controlsGroup = ctrlParentControlsGroup _ctrlClose; + [_controlsGroup] call FUNC(deleteControl); +}]; + +// Set data in content control +private _ctrlContent = _controlsGroup controlsGroupCtrl IDC_CONTENT; +_ctrlContent ctrlSetText GET_DATA(_index); + +// Restore position of controls group (center if not saved) +private _position = [GVAR(controlsData), _index] call CBA_fnc_hashGet; + +if (isNil "_position") then { + ctrlPosition _controlsGroup params ["", "", "_posW", "_posH"]; + _position = [0.5 - _posW / 2, 0.5 - _posH / 2]; +}; + +_controlsGroup ctrlSetPosition _position; +_controlsGroup ctrlCommit 0; diff --git a/addons/intelitems/functions/fnc_deleteControl.sqf b/addons/intelitems/functions/fnc_deleteControl.sqf new file mode 100644 index 0000000000..8c93f85fa6 --- /dev/null +++ b/addons/intelitems/functions/fnc_deleteControl.sqf @@ -0,0 +1,36 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror, mharis001 + * Deletes an intel controls group. + * + * Arguments: + * 0: Controls group + * + * Return Value: + * None + * + * Example: + * [CONTROL] call ace_intelitems_fnc_deleteControl + * + * Public: No + */ + +params ["_controlsGroup"]; + +private _index = _controlsGroup getVariable QGVAR(index); + +// Save position of controls group +ctrlPosition _controlsGroup params ["_posX", "_posY"]; +[GVAR(controlsData), _index, [_posX, _posY]] call CBA_fnc_hashSet; + +// Update data if modified +private _ctrlContent = _controlsGroup controlsGroupCtrl IDC_CONTENT; +private _data = ctrlText _ctrlContent; + +if !(_data isEqualTo GET_DATA(_index)) then { + SET_DATA(_index,_data); +}; + +// Delete the controls group +GVAR(controlsGroups) deleteAt (GVAR(controlsGroups) find _controlsGroup); +ctrlDelete _controlsGroup; diff --git a/addons/intelitems/functions/fnc_handleLoadout.sqf b/addons/intelitems/functions/fnc_handleLoadout.sqf new file mode 100644 index 0000000000..01650d6db4 --- /dev/null +++ b/addons/intelitems/functions/fnc_handleLoadout.sqf @@ -0,0 +1,51 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Handles the player loadout changed event. + * + * Arguments: + * 0: Player + * + * Return Value: + * None + * + * Example: + * [player] call ace_intelitems_fnc_handleLoadout + * + * Public: No + */ + +params ["_player"]; + +private _allIndices = []; + +// Handle magazine ids with missing index assignments +private _cfgMagazines = configFile >> "CfgMagazines"; +private _magazines = magazines _player; + +{ + if (getNumber (_cfgMagazines >> _x >> QGVAR(intel)) == 1) then { + private _magazineIds = [_player, _x] call CBA_fnc_getMagazineIndex; + + { + private _index = GVAR(intelMap) getVariable _x; + + if (isNil "_index") then { + // Need new intel index from server + [QGVAR(handleMagIndex), _x] call CBA_fnc_serverEvent; + } else { + // Add valid index to array of all indices + _allIndices pushBack _index; + }; + } forEach _magazineIds; + }; +} forEach (_magazines arrayIntersect _magazines); + +// Close any open controls if player no longer has needed magazine +{ + private _index = _x getVariable QGVAR(index); + + if !(_index in _allIndices) then { + [_x] call FUNC(deleteControl); + }; +} forEach +GVAR(controlsGroups); diff --git a/addons/intelitems/functions/fnc_handleMagIndex.sqf b/addons/intelitems/functions/fnc_handleMagIndex.sqf new file mode 100644 index 0000000000..4982130428 --- /dev/null +++ b/addons/intelitems/functions/fnc_handleMagIndex.sqf @@ -0,0 +1,29 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror, mharis001 + * Handles assigning a unique intel index to a magazine id. + * + * Arguments: + * 0: Magazine id + * + * Return Value: + * Intel Index + * + * Example: + * ["001"] call ace_intelitems_fnc_handleMagIndex + * + * Public: No + */ + +params ["_magazineId"]; + +private _index = GVAR(intelMap) getVariable _magazineId; + +if (isNil "_index") then { + _index = GVAR(intelCount); + GVAR(intelCount) = GVAR(intelCount) + 1; +}; + +GVAR(intelMap) setVariable [_magazineId, _index, true]; + +_index diff --git a/addons/intelitems/functions/fnc_onMouseButtonDown.sqf b/addons/intelitems/functions/fnc_onMouseButtonDown.sqf new file mode 100644 index 0000000000..9a0339bff0 --- /dev/null +++ b/addons/intelitems/functions/fnc_onMouseButtonDown.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Handles the mouse button down event for an intel control. + * + * Arguments: + * 0: Header control + * 1: Button + * 2: X position + * 3: Y position + * + * Return Value: + * None + * + * Example: + * [CONTROL, 0, 0.5, 0.5] call ace_intelitems_fnc_onMouseButtonDown + * + * Public: No + */ + +params ["_ctrlHeader", "_button", "_posX", "_posY"]; + +if (_button != 0) exitWith {}; + +private _controlsGroup = ctrlParentControlsGroup _ctrlHeader; +_controlsGroup setVariable [QGVAR(clickPos), [_posX, _posY]]; diff --git a/addons/intelitems/functions/fnc_onMouseButtonUp.sqf b/addons/intelitems/functions/fnc_onMouseButtonUp.sqf new file mode 100644 index 0000000000..d8a04c0784 --- /dev/null +++ b/addons/intelitems/functions/fnc_onMouseButtonUp.sqf @@ -0,0 +1,24 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Handles the mouse button up event for an intel control. + * + * Arguments: + * 0: Header control + * 1: Button + * + * Return Value: + * None + * + * Example: + * [CONTROL, 0] call ace_intelitems_fnc_onMouseButtonUp + * + * Public: No + */ + +params ["_ctrlHeader", "_button"]; + +if (_button != 0) exitWith {}; + +private _controlsGroup = ctrlParentControlsGroup _ctrlHeader; +_controlsGroup setVariable [QGVAR(clickPos), nil]; diff --git a/addons/intelitems/functions/fnc_onMouseMoving.sqf b/addons/intelitems/functions/fnc_onMouseMoving.sqf new file mode 100644 index 0000000000..1147261e12 --- /dev/null +++ b/addons/intelitems/functions/fnc_onMouseMoving.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Handles the mouse moving event for an intel control. + * + * Arguments: + * 0: Header control + * 1: X position + * 2: Y position + * + * Return Value: + * None + * + * Example: + * [CONTROL, 0.1, 0.2] call ace_intelitems_fnc_onMouseMoving + * + * Public: No + */ + +params ["_ctrlHeader", "_posX", "_posY"]; + +private _controlsGroup = ctrlParentControlsGroup _ctrlHeader; + +private _clickPos = _controlsGroup getVariable QGVAR(clickPos); +if (isNil "_clickPos") exitWith {}; + +ctrlPosition _controlsGroup params ["_groupX", "_groupY"]; +_clickPos params ["_clickX", "_clickY"]; + +_controlsGroup ctrlSetPosition [_groupX + _posX - _clickX, _groupY + _posY - _clickY]; +_controlsGroup ctrlCommit 0; diff --git a/addons/intelitems/functions/fnc_pickup.sqf b/addons/intelitems/functions/fnc_pickup.sqf new file mode 100644 index 0000000000..4d61e3a281 --- /dev/null +++ b/addons/intelitems/functions/fnc_pickup.sqf @@ -0,0 +1,43 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror, mharis001 + * Picks up an intel object by converting it into a unique magazine. + * + * Arguments: + * 0: Object + * 1: Player + * + * Return Value: + * None + * + * Example: + * [cursorObject, player] call ace_intelitems_fnc_pickup + * + * Public: No + */ + +params ["_object", "_player"]; + +private _magazineClass = getText (configFile >> "CfgVehicles" >> typeOf _object >> QGVAR(magazine)); +private _index = _object getVariable [QGVAR(index), -1]; + +// Add magazine to inventory and get its id +private _magazinesBefore = [_player, _magazineClass] call CBA_fnc_getMagazineIndex; +_player addMagazine _magazineClass; +private _magazinesAfter = [_player, _magazineClass] call CBA_fnc_getMagazineIndex; + +private _magazineId = _magazinesAfter - _magazinesBefore; +if (_magazineId isEqualTo []) exitWith {}; + +_magazineId = _magazineId select 0; + +// Delete object as it now exists as a magazine +deleteVehicle _object; + +if (_index == -1) then { + // Need new intel index from server + [QGVAR(handleMagIndex), _magazineId] call CBA_fnc_serverEvent; +} else { + // Can simply broadcast index for magazine id + GVAR(intelMap) setVariable [_magazineId, _index, true]; +}; diff --git a/addons/intelitems/functions/fnc_setObjectData.sqf b/addons/intelitems/functions/fnc_setObjectData.sqf new file mode 100644 index 0000000000..b055e3202c --- /dev/null +++ b/addons/intelitems/functions/fnc_setObjectData.sqf @@ -0,0 +1,30 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror, mharis001 + * Sets the intel data for an object. Used by 3DEN and Zeus attributes. + * + * Arguments: + * 0: Object + * 1: Data + * + * Return Value: + * None + * + * Example: + * [cursorObject, "123"] call ace_intelitems_fnc_setObjectData + * + * Public: No + */ + +params ["_object", "_data"]; + +private _index = _object getVariable [QGVAR(index), -1]; + +if (_index == -1) then { + _index = GVAR(intelCount); + GVAR(intelCount) = GVAR(intelCount) + 1; + + _object setVariable [QGVAR(index), _index, true]; +}; + +SET_DATA(_index,_data); diff --git a/addons/intelitems/functions/script_component.hpp b/addons/intelitems/functions/script_component.hpp new file mode 100644 index 0000000000..46ffa36f0b --- /dev/null +++ b/addons/intelitems/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\intelitems\script_component.hpp" diff --git a/addons/intelitems/gui.hpp b/addons/intelitems/gui.hpp new file mode 100644 index 0000000000..2c26b8ccc9 --- /dev/null +++ b/addons/intelitems/gui.hpp @@ -0,0 +1,189 @@ +class ctrlStatic; +class ctrlStaticMulti; +class ctrlEditMulti; +class ctrlButtonPicture; +class ctrlStaticPictureKeepAspect; +class ctrlControlsGroupNoScrollbars; + +class GVAR(RscBase): ctrlControlsGroupNoScrollbars { + idc = -1; + x = 0; + y = 0; + w = POS_W(15); + h = POS_H(18); + class controls { + class Border: ctrlStatic { + idc = IDC_BORDER; + x = 0; + y = 0; + w = POS_W(15); + h = POS_H(18); + colorBackground[] = {0, 0, 0, 1}; + }; + class Background: ctrlStatic { + idc = IDC_BACKGROUND; + x = pixelW; + y = pixelH; + w = POS_W(15) - 2 * pixelW; + h = POS_H(18) - 2 * pixelH; + colorBackground[] = {1, 1, 1, 1}; + }; + class Header: ctrlStatic { + idc = IDC_HEADER; + style = ST_MULTI + ST_NO_RECT; + x = 0; + y = 0; + w = POS_W(14.3); + h = POS_H(0.7); + sizeEx = POS_H(0.65); + colorBackground[] = {0.1, 0.1, 0.1, 1}; + }; + class Close: ctrlButtonPicture { + idc = IDC_CLOSE; + text = "\a3\3DEN\Data\Displays\Display3DEN\search_end_ca.paa"; + x = POS_W(14.3); + y = 0; + w = POS_W(0.7); + h = POS_H(0.7); + offsetPressedX = 0; + offsetPressedY = 0; + colorBackground[] = {0.1, 0.1, 0.1, 1}; + }; + }; +}; + +class GVAR(RscNotepad): GVAR(RscBase) { + class controls: controls { + class Border: Border {}; + class Background: Background { + colorBackground[] = {0.97, 0.91, 0.77, 1}; + }; + class Header: Header { + text = CSTRING(Notepad_DisplayName); + }; + class Close: Close {}; + class Content: ctrlEditMulti { + idc = IDC_CONTENT; + style = ST_MULTI + ST_NO_RECT; + font = "EtelkaMonospaceProBold"; + x = pixelW; + y = POS_H(0.7); + w = POS_W(15) - 2 * pixelW; + h = POS_H(17.3) - pixelH; + sizeEx = POS_H(0.9); + shadow = 0; + colorText[] = {0, 0, 0, 1}; + colorBackground[] = {0, 0, 0, 0}; + }; + }; +}; + +class GVAR(RscDocument): GVAR(RscBase) { + class controls: controls { + class Border: Border {}; + class Background: Background { + colorBackground[] = {0.95, 0.95, 0.95, 1}; + }; + class Header: Header { + text = CSTRING(Document_DisplayName); + }; + class Close: Close {}; + class Content: ctrlStaticMulti { + idc = IDC_CONTENT; + font = "EtelkaMonospaceProBold"; + x = pixelW; + y = POS_H(0.7); + w = POS_W(15) - 2 * pixelW; + h = POS_H(17.3) - pixelH; + sizeEx = POS_H(0.9); + shadow = 0; + colorText[] = {0, 0, 0, 1}; + colorBackground[] = {0, 0, 0, 0}; + }; + }; +}; + +class GVAR(RscPhoto): GVAR(RscBase) { + w = POS_W(18); + class controls: controls { + class Border: Border { + w = POS_W(18); + }; + class Background: Background { + w = POS_W(18) - 2 * pixelW; + }; + class Header: Header { + text = CSTRING(Photo_DisplayName); + w = POS_W(17.3); + }; + class Close: Close { + x = POS_W(17.3); + }; + class Content: ctrlStaticPictureKeepAspect { + idc = IDC_CONTENT; + x = pixelW; + y = POS_H(0.7); + w = POS_W(18) - 2 * pixelW; + h = POS_H(17.3) - pixelH; + }; + }; +}; + +// Zeus Attributes Display +class RscText; +class RscEditMulti; +class RscControlsGroup; +class RscControlsGroupNoScrollbars; + +class RscDisplayAttributes { + class Controls { + class Background; + class Title; + class Content: RscControlsGroup { + class controls; + }; + class ButtonOK; + class ButtonCancel; + }; +}; + +class GVAR(RscSetData): RscDisplayAttributes { + onLoad = QUOTE([ARR_3('onLoad', _this, QQGVAR(RscSetData))] call EFUNC(zeus,zeusAttributes)); + onUnload = QUOTE([ARR_3('onUnload', _this, QQGVAR(RscSetData))] call EFUNC(zeus,zeusAttributes)); + class Controls: Controls { + class Background: Background {}; + class Title: Title {}; + class Content: Content { + class Controls { + class setData: RscControlsGroupNoScrollbars { + onSetFocus = QUOTE(_this call FUNC(attributeFocus)); + idc = IDC_ATTRIBUTE_GROUP; + x = 0; + y = 0; + w = POS_W(26); + h = POS_H(6); + class controls { + class Label: RscText { + idc = IDC_ATTRIBUTE_LABEL; + x = 0; + y = 0; + w = POS_W(26); + h = POS_H(1); + colorBackground[] = {0, 0, 0, 0.5}; + }; + class Edit: RscEditMulti { + idc = IDC_ATTRIBUTE_EDIT; + x = pixelW; + y = POS_H(1) + pixelH; + w = POS_W(26) - pixelW; + h = POS_H(5) - pixelH; + sizeEx = POS_H(0.9); + }; + }; + }; + }; + }; + class ButtonOK: ButtonOK {}; + class ButtonCancel: ButtonCancel {}; + }; +}; diff --git a/addons/intelitems/script_component.hpp b/addons/intelitems/script_component.hpp new file mode 100644 index 0000000000..f053d00d98 --- /dev/null +++ b/addons/intelitems/script_component.hpp @@ -0,0 +1,39 @@ +#define COMPONENT intelitems +#define COMPONENT_BEAUTIFIED Intel Items +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_INTELITEMS + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_INTELITEMS + #define DEBUG_SETTINGS DEBUG_SETTINGS_INTELITEMS +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#include "\a3\ui_f\hpp\defineResincl.inc" +#include "\a3\ui_f\hpp\defineCommonGrids.inc" + +#define POS_X(N) ((N) * GUI_GRID_W + GUI_GRID_CENTER_X) +#define POS_Y(N) ((N) * GUI_GRID_H + GUI_GRID_CENTER_Y) +#define POS_W(N) ((N) * GUI_GRID_W) +#define POS_H(N) ((N) * GUI_GRID_H) + +#define IDC_BORDER 10 +#define IDC_BACKGROUND 20 +#define IDC_HEADER 30 +#define IDC_CLOSE 40 +#define IDC_CONTENT 50 + +#define IDC_ATTRIBUTE_GROUP 4800 +#define IDC_ATTRIBUTE_LABEL 4801 +#define IDC_ATTRIBUTE_EDIT 4802 + +#define SYS_DATA(index) (format [QGVAR(%1), index]) +#define SET_DATA(index,data) (GVAR(intelData) setVariable [SYS_DATA(index), data, true]) +#define GET_DATA(index) (GVAR(intelData) getVariable [SYS_DATA(index), ""]) diff --git a/addons/intelitems/stringtable.xml b/addons/intelitems/stringtable.xml new file mode 100644 index 0000000000..17b705bf79 --- /dev/null +++ b/addons/intelitems/stringtable.xml @@ -0,0 +1,114 @@ + + + + + ACE Intel Items + ACE Aufklärungsgegenstände + ACE 情報物品 + ACE 機密アイテム + ACE Предметы с данными + ACE Przedmioty Wywiadu + ACE Istihbarat Eşyaları + + + Intel Items + Aufklärungsgegenstände + 情報物品 + 機密アイテム + Предметы с данными + Przedmioty Wywiadu + Istihbarat Eşyaları + + + Notepad + Notizblock + 筆記本 + メモ + Блокнот + Notes + Not Defteri + + + Notepad - Can access from the map screen + Notizblock - Über die Karte abrufbar + 筆記本 - 可以透過地圖界面來存取 + メモ - マップ画面から確認可能 + Блокнот - Можно получить доступ с экрана карты + Notes - Dostępne z mapy + Not Defteri - Haritadan erişim sağlanabilinir + + + Document + Dokument + 文件 + 資料 + Документ + Dokument + Döküman + + + Printed Document - Can access from the map screen + Bedrucktes Dokument - Über die Karte abrufbar + 影印文件 - 可以透過地圖界面來存取 + メモ - マップ画面から確認可能 + Распечатанный документ - Можно получить доступ с экрана карты + Wydrukowane Dokumenty - Dostępne z mapy + Yazılı Döküman - Haritadan erişim sağlanabilinir + + + Photo + Foto + 相片 + 写真 + Фотография + Zdjęcie + Fotoğraf + + + Photo - Can access from the map screen + Foto - Über die Karte abrufbar + 相片 - 可以透過地圖界面來存取 + 写真 - マップ画面から確認可能 + Фотография - Можно получить доступ с экрана карты + Zdjęcie - Dostępne z mapy + Fotoğraf - Haritadan erişim sağlanabilinir + + + Text + Text + Texte + Text + Testo + Tekst + Texto + Текст + Texto + 文字 + テキスト + Yazı + + + Photo Filename + Foto-Dateiname + 相片名稱 + 写真名 + Имя файла фотографии + Zdjęcie Nazwa Pliku + Fotoğraf Dosya Adı + + + Pick Up + Vyzvednout + Ramasser + Aufnehmen + Prelevare + Podnieś + Pegar + Подобрать + Recoger + 撿起 + 拾う + Al + + + diff --git a/addons/intelitems/ui/document_ca.paa b/addons/intelitems/ui/document_ca.paa new file mode 100644 index 0000000000..0d04cd303a Binary files /dev/null and b/addons/intelitems/ui/document_ca.paa differ diff --git a/addons/intelitems/ui/notepad_ca.paa b/addons/intelitems/ui/notepad_ca.paa new file mode 100644 index 0000000000..3724da4cc1 Binary files /dev/null and b/addons/intelitems/ui/notepad_ca.paa differ diff --git a/addons/intelitems/ui/photo_ca.paa b/addons/intelitems/ui/photo_ca.paa new file mode 100644 index 0000000000..8548876e32 Binary files /dev/null and b/addons/intelitems/ui/photo_ca.paa differ diff --git a/addons/interact_menu/ACE_Settings.hpp b/addons/interact_menu/ACE_Settings.hpp index 9f555f3ed1..580d494722 100644 --- a/addons/interact_menu/ACE_Settings.hpp +++ b/addons/interact_menu/ACE_Settings.hpp @@ -15,72 +15,30 @@ class ACE_Settings { movedToSQF = 1; }; class GVAR(colorTextMax) { - value[] = {1, 1, 1, 1}; - typeName = "COLOR"; - isClientSettable = 1; - category = CSTRING(Category_InteractionMenu); - displayName = CSTRING(ColorTextMax); + movedToSQF = 1; }; class GVAR(colorTextMin) { - value[] = {1, 1, 1, 0.25}; - typeName = "COLOR"; - isClientSettable = 1; - category = CSTRING(Category_InteractionMenu); - displayName = CSTRING(ColorTextMin); + movedToSQF = 1; }; class GVAR(colorShadowMax) { - value[] = {0, 0, 0, 1}; - typeName = "COLOR"; - isClientSettable = 1; - category = CSTRING(Category_InteractionMenu); - displayName = CSTRING(ColorShadowMax); + movedToSQF = 1; }; class GVAR(colorShadowMin) { - value[] = {0, 0, 0, 0.25}; - typeName = "COLOR"; - isClientSettable = 1; - category = CSTRING(Category_InteractionMenu); - displayName = CSTRING(ColorShadowMin); + movedToSQF = 1; }; class GVAR(textSize) { - value = 2; - typeName = "SCALAR"; - isClientSettable = 1; - category = CSTRING(Category_InteractionMenu); - displayName = CSTRING(textSize); - values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"}; + movedToSQF = 1; }; class GVAR(shadowSetting) { - value = 2; - typeName = "SCALAR"; - isClientSettable = 1; - category = CSTRING(Category_InteractionMenu); - displayName = CSTRING(shadowSetting); - description = CSTRING(shadowSettingDescription); - values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_A3_OPTIONS_ENABLED", CSTRING(shadowOutline)}; + movedToSQF = 1; }; class GVAR(actionOnKeyRelease) { - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - category = CSTRING(Category_InteractionMenu); - displayName = CSTRING(ActionOnKeyRelease); + movedToSQF = 1; }; class GVAR(addBuildingActions) { - value = 0; - typeName = "BOOL"; - isClientSettable = 1; - category = CSTRING(Category_InteractionMenu); - displayName = CSTRING(addBuildingActions); - description = CSTRING(addBuildingActionsDescription); + movedToSQF = 1; }; class GVAR(menuAnimationSpeed) { - value = 0; - typeName = "SCALAR"; - isClientSettable = 1; - category = CSTRING(Category_InteractionMenu); - displayName = CSTRING(menuAnimationSpeed); - description = CSTRING(menuAnimationSpeed_Description); - values[] = {"$str_speed_normal", "2x", "3x"}; + movedToSQF = 1; }; }; diff --git a/addons/interact_menu/CfgEventHandlers.hpp b/addons/interact_menu/CfgEventHandlers.hpp index b5880fb05b..0704097f25 100644 --- a/addons/interact_menu/CfgEventHandlers.hpp +++ b/addons/interact_menu/CfgEventHandlers.hpp @@ -1,25 +1,25 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_clientInit)); }; }; class Extended_DisplayLoad_EventHandlers { class RscDiary { - ADDON = QUOTE(call COMPILE_FILE(XEH_displayLoad)); + ADDON = QUOTE(call COMPILE_SCRIPT(XEH_displayLoad)); }; class RscDisplayInterrupt { ADDON = QUOTE(_this call FUNC(handleEscapeMenu)); diff --git a/addons/interact_menu/CursorMenus.hpp b/addons/interact_menu/CursorMenus.hpp index 385c3a0f75..98f05082a9 100644 --- a/addons/interact_menu/CursorMenus.hpp +++ b/addons/interact_menu/CursorMenus.hpp @@ -12,7 +12,7 @@ class RscTitles { onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuBackground)),displayNull)]); fadeIn = 0.25; fadeOut = 0.25; - movingEnable = false; + movingEnable = 0; duration = 10e10; name = QGVAR(menuBackground); class controls {}; diff --git a/addons/interact_menu/README.md b/addons/interact_menu/README.md index 77ac2d814a..d22647f059 100644 --- a/addons/interact_menu/README.md +++ b/addons/interact_menu/README.md @@ -2,11 +2,3 @@ ace_interact_menu =========== Base framework for interaction menu. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [NouberNou](https://github.com/NouberNou) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/interact_menu/XEH_PREP.hpp b/addons/interact_menu/XEH_PREP.hpp index 840acbf10d..03114b37e8 100644 --- a/addons/interact_menu/XEH_PREP.hpp +++ b/addons/interact_menu/XEH_PREP.hpp @@ -12,6 +12,7 @@ PREP(createVehiclesActions); PREP(ctrlSetParsedTextCached); PREP(findActionNode); PREP(handleEscapeMenu); +PREP(initMenuReorder); PREP(isSubPath); PREP(keyDown); PREP(keyUp); diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index bc4870ef54..a76bf90e1c 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -32,11 +32,11 @@ GVAR(cachedBuildingActionPairs) = []; GVAR(ParsedTextCached) = []; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { // Setup text/shadow/size/color settings matrix [] call FUNC(setupTextColors); // Setting changed added here so color setup happens once at init - ["ace_settingChanged", { + ["CBA_SettingChanged", { params ["_name"]; if (_name in [QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]) then { [] call FUNC(setupTextColors); @@ -112,3 +112,11 @@ format ["%1 (%2)", (localize LSTRING(SelfInteractKey)), localize ELSTRING(common if (_menuBackgroundSetting == 1) exitWith {[QGVAR(menuBackground), false] call EFUNC(common,blurScreen);}; if (_menuBackgroundSetting == 2) exitWith {(uiNamespace getVariable [QGVAR(menuBackground), displayNull]) closeDisplay 0;}; }] call CBA_fnc_addEventHandler; + + +// init menu reordering +[QGVAR(newControllableObject), { + params ["_class"]; + if !(_class isKindOf "CAManBase") exitWith {}; + _class call FUNC(initMenuReorder); +}] call CBA_fnc_addEventHandler; diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp index ff29cfc850..756e8775ab 100644 --- a/addons/interact_menu/config.cpp +++ b/addons/interact_menu/config.cpp @@ -27,8 +27,4 @@ class ACE_Extensions { windows = 1; client = 1; }; - class ace_parse_imagepath { - windows = 1; - client = 1; - }; }; diff --git a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf index e7fecfcac8..892c26f1d0 100644 --- a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf +++ b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf @@ -13,7 +13,7 @@ * Active children * * Example: - * [bob, [array], [array], 5] call ACE_interact_menu_fnc_collectActoveActionTree + * [bob, [array], [array], 5] call ACE_interact_menu_fnc_collectActiveActionTree * * Public: No */ @@ -25,13 +25,23 @@ private _target = _object; private _player = ACE_player; // Check if the function should be modified first -if !((_origActionData select 10) isEqualTo {}) then { +if ((_origActionData select 10) isNotEqualTo {}) then { // It should, so make a copy and pass it to the modifierFunction _origActionData = +_origActionData; [_target, ACE_player, _origActionData select 6, _origActionData] call (_origActionData select 10); }; -_origActionData params ["_actionName", "", "", "_statementCode", "_conditionCode", "_insertChildrenCode", "_customParams", "", "_distance"]; +_origActionData params [ + "_actionName", + "_displayName", + "", + "_statementCode", + "_conditionCode", + "_insertChildrenCode", + "_customParams", + "_position", + "_distance" +]; // Return nothing if the action itself is not active if !([_target, ACE_player, _customParams] call _conditionCode) exitWith { @@ -48,7 +58,7 @@ _fullPath pushBack _actionName; private _activeChildren = []; // If there's a statement to dynamically insert children then execute it -if !({} isEqualTo _insertChildrenCode) then { +if (_insertChildrenCode isNotEqualTo {}) then { private _dynamicChildren = [_target, ACE_player, _customParams] call _insertChildrenCode; // Collect dynamic children class actions @@ -91,5 +101,23 @@ if ((_activeChildren isEqualTo []) && {_statementCode isEqualTo {}}) exitWith { [] }; +if (GVAR(consolidateSingleChild) && {count _activeChildren == 1} && {_statementCode isEqualTo {}}) then { + _activeChildren select 0 params ["_childActionData", "_childChildren", "_childObject"]; + _childActionData params ["", "_displayNameChild", "_iconChild", "_statementChild", "", "", "_customParamsChild", "", "", "_paramsChild"]; + _origActionData = [ + _actionName, + format ["%1 > %2", _displayName, _displayNameChild], + _iconChild, + _statementChild, + _conditionCode, + _insertChildrenCode, + _customParamsChild, + _position, + _distance, + _paramsChild + ]; + _activeChildren = _childChildren; + _object = _childObject; +}; [_origActionData, _activeChildren, _object] diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 7f36247e22..1e1924d8fd 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -69,11 +69,14 @@ private _recurseFnc = { }; private _condition = getText (_entryCfg >> "condition"); - if (_condition == "") then {_condition = "true"}; - // Add canInteract (including exceptions) and canInteractWith to condition - if ((configName _entryCfg) != "ACE_MainActions") then { - _condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, _target, %1)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")]; + if (configName _entryCfg == "ACE_MainActions") then { + if (_condition isEqualTo "") then {_condition = "true"}; + } else { + // Add canInteract (including exceptions) and canInteractWith to condition + private _canInteractCondition = format [QUOTE([ARR_3(ACE_player,_target,%1)] call EFUNC(common,canInteractWith)), getArray (_entryCfg >> "exceptions")]; + private _conditionFormatPattern = ["%1 && {%2}", "%2"] select (_condition isEqualTo "" || {_condition == "true"}); + _condition = format [_conditionFormatPattern, _condition, _canInteractCondition]; }; private _insertChildren = compile (getText (_entryCfg >> "insertChildren")); diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 879ca7b138..c3ad9b35e7 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -45,10 +45,11 @@ private _recurseFnc = { private _statement = compile (getText (_entryCfg >> "statement")); private _condition = getText (_entryCfg >> "condition"); - if (_condition == "") then {_condition = "true"}; // Add canInteract (including exceptions) and canInteractWith to condition - _condition = _condition + format [QUOTE( && {[ARR_3(ACE_player, _target, %1)] call EFUNC(common,canInteractWith)} ), getArray (_entryCfg >> "exceptions")]; + private _canInteractCondition = format [QUOTE([ARR_3(ACE_player,_target,%1)] call EFUNC(common,canInteractWith)), getArray (_entryCfg >> "exceptions")]; + private _conditionFormatPattern = ["%1 && {%2}", "%2"] select (_condition isEqualTo "" || {_condition == "true"}); + _condition = compile format [_conditionFormatPattern, _condition, _canInteractCondition]; private _insertChildren = compile (getText (_entryCfg >> "insertChildren")); private _modifierFunction = compile (getText (_entryCfg >> "modifierFunction")); @@ -63,7 +64,6 @@ private _recurseFnc = { _runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0; }; - _condition = compile _condition; private _children = [_entryCfg] call _recurseFnc; private _entry = [ diff --git a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf index c1f4dc0858..675cebe61f 100644 --- a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf @@ -35,7 +35,11 @@ private _recurseFnc = { private _statement = compile (getText (_entryCfg >> "statement")); private _condition = getText (_entryCfg >> "condition"); - if (_condition == "") then {_condition = "true"}; + if (_condition == "") then { + _condition = {true}; + } else { + _condition = compile _condition; + }; private _insertChildren = compile (getText (_entryCfg >> "insertChildren")); private _modifierFunction = compile (getText (_entryCfg >> "modifierFunction")); @@ -50,7 +54,6 @@ private _recurseFnc = { _runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0; }; - private _condition = compile _condition; private _children = [_entryCfg] call _recurseFnc; private _entry = [ diff --git a/addons/interact_menu/functions/fnc_initMenuReorder.sqf b/addons/interact_menu/functions/fnc_initMenuReorder.sqf new file mode 100644 index 0000000000..4e328bb045 --- /dev/null +++ b/addons/interact_menu/functions/fnc_initMenuReorder.sqf @@ -0,0 +1,89 @@ +#include "script_component.hpp" +/* + * Author: Dystopian + * Initializes "More" and "Move to Root" settings and menu. + * + * Arguments: + * 0: Class name + * + * Return Value: + * None + * + * Example: + * [typeOf player] call ace_interact_menu_fnc_initMenuReorder + * + * Public: No + */ + +params ["_class"]; + +private _actionTrees = GVAR(ActSelfNamespace) getVariable _class; +private _rootNode = [_actionTrees, ["ACE_SelfActions"]] call FUNC(findActionNode); +private _rootActions = _rootNode select 1; +private _settingCategoryPrefix = format ["ACE %1 - ", LELSTRING(Interaction,InteractionMenuSelf)]; + + +// init "Move to Root" settings +private _settingCategory = _settingCategoryPrefix + localize "STR_3DEN_Display3DEN_RemoveLayer_tooltip"; + +private _fnc_processNode = { + params ["_node", "_parentVarName", "_titlePrefix", "_parentConditionString"]; + + _node params ["_actionData", "_actionChildren"]; + _actionData params ["_name", "_title", "", "", "_condition"]; + private _varName = _parentVarName + "__" + _name; + private _titleFull = _titlePrefix + _title; + private _conditionFullString = format ["%1 && {%2}", _parentConditionString, _condition call EFUNC(common,codeToString)]; + + // don't add already added setting + if (isNil {missionNamespace getVariable _varName}) then { + [_varName, "CHECKBOX", _titleFull, [_settingCategory, _rootActionTitle], false, 2, {}, true] call CBA_fnc_addSetting; + }; + + if (missionNamespace getVariable [_varName, false]) then { + private _newActionData = +(_actionData); + _newActionData set [4, compile _conditionFullString]; + _rootActions pushBack [_newActionData, _actionChildren]; + }; + + { + [_x, _varName, _titleFull + " / ", _conditionFullString] call _fnc_processNode; + } forEach _actionChildren; +}; + +private _rootActionsCount = count _rootActions; +{ + _x params ["_actionData", "_actionChildren"]; + _actionData params ["_name", "_rootActionTitle", "", "", "_condition"]; + private _parentVarName = QGVAR(moveToRoot__) + _name; + private _conditionString = _condition call EFUNC(common,codeToString); + { + [_x, _parentVarName, "", _conditionString] call _fnc_processNode; + } forEach _actionChildren; +} forEach _rootActions; + + +// init "More" menu +private _action = [QGVAR(more), localize "str_more_menu", "", {}, {true}] call FUNC(createAction); +private _morePath = [_class, 1, ["ACE_SelfActions"], _action] call FUNC(addActionToClass); +private _moreNode = [_actionTrees, _morePath] call FUNC(findActionNode); +private _moreActions = _moreNode select 1; +private _settingCategory = _settingCategoryPrefix + localize "str_more_menu"; + +{ + // prevent moved to root actions processing + if (_forEachIndex >= _rootActionsCount) then {break}; + + _x params ["_actionData", "_actionChildren"]; + _actionData params ["_name", "_title"]; + if (_name isEqualTo QGVAR(more)) then {continue}; + + private _varName = QGVAR(more__) + _name; + [_varName, "CHECKBOX", _title, _settingCategory, false, 2, {}, true] call CBA_fnc_addSetting; + if !(missionNamespace getVariable [_varName, false]) then {continue}; + + private _newActionData = +(_actionData); + // disable action instead of deleting because it can be used as parent lately + _actionData set [4, {false}]; + _moreActions pushBack [_newActionData, _actionChildren]; +} forEach _rootActions; diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index 72857f3070..2a0cbe664b 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -24,7 +24,7 @@ if (count _shortPath > count _longPath) exitWith {false}; //IGNORE_PRIVATE_WARNING ["_i"]; for [{private _i = 0},{_i < count _shortPath},{_i = _i + 1}] do { - if !((_longPath select _i) isEqualTo (_shortPath select _i)) exitWith { + if ((_longPath select _i) isNotEqualTo (_shortPath select _i)) exitWith { _isSubPath = false; }; }; diff --git a/addons/interact_menu/functions/fnc_keyUp.sqf b/addons/interact_menu/functions/fnc_keyUp.sqf index 2504ca2b78..9ed14d66d3 100644 --- a/addons/interact_menu/functions/fnc_keyUp.sqf +++ b/addons/interact_menu/functions/fnc_keyUp.sqf @@ -25,8 +25,6 @@ if (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]) then { }; if (GVAR(actionSelected)) then { - this = GVAR(selectedTarget); - private _player = ACE_Player; private _target = GVAR(selectedTarget); @@ -38,6 +36,11 @@ if (GVAR(actionSelected)) then { // Check the action conditions private _actionData = GVAR(selectedAction) select 0; + + // Use global variable this for action condition and action code + private _savedThis = this; + this = GVAR(selectedTarget); + if ([_target, _player, _actionData select 6] call (_actionData select 4)) then { // Call the statement [_target, _player, _actionData select 6] call (_actionData select 3); @@ -45,6 +48,9 @@ if (GVAR(actionSelected)) then { // Clear the conditions caches again if the action was performed [QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent; }; + + // Restore this variable + this = _savedThis; }; ["ace_interactMenuClosed", [GVAR(openedMenuType)]] call CBA_fnc_localEvent; diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index 687498e7cd..651aaef47d 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -62,7 +62,7 @@ if (GVAR(openedMenuType) >= 0) then { GVAR(selectedAction) = _action select 1; GVAR(selectedTarget) = (GVAR(selectedAction)) select 2; - private _misMatch = !(GVAR(lastPath) isEqualTo _hoverPath); + private _misMatch = (GVAR(lastPath) isNotEqualTo _hoverPath); if(_misMatch && {diag_tickTime-GVAR(expandedTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then { GVAR(startHoverTime) = diag_tickTime; @@ -91,13 +91,16 @@ if (GVAR(openedMenuType) >= 0) then { }; }; if (_runOnHover) then { - this = GVAR(selectedTarget); private _player = ACE_Player; private _target = GVAR(selectedTarget); // Clear the conditions caches [QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent; + // Use global variable this for action condition and action code + private _savedThis = this; + this = GVAR(selectedTarget); + // Check the action conditions private _actionData = GVAR(selectedAction) select 0; if ([_target, _player, _actionData select 6] call (_actionData select 4)) then { @@ -107,6 +110,9 @@ if (GVAR(openedMenuType) >= 0) then { // Clear the conditions caches again if the action was performed [QGVAR(clearConditionCaches), []] call CBA_fnc_localEvent; }; + + // Restore this variable + this = _savedThis; }; }; }; diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index f4aa8927f6..987ad3f99c 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -29,57 +29,54 @@ private _fnc_renderNearbyActions = { GVAR(foundActions) = []; GVAR(lastTimeSearchedActions) = diag_tickTime; + QGVAR(renderNearbyActions) call CBA_fnc_localEvent; + private _numInteractObjects = 0; private _nearestObjects = nearestObjects [ACE_player, ["All"], 13]; { private _target = _x; // Quick oclussion test. Skip objects more than 1 m behind the camera plane - private _lambda = ((getPosASL _x) vectorDiff GVAR(cameraPosASL)) vectorDotProduct GVAR(cameraDir); - if ((_lambda > -1) && {!isObjectHidden _target}) then { - private _numInteractions = 0; + private _lambda = getPosASL _target vectorDiff GVAR(cameraPosASL) vectorDotProduct GVAR(cameraDir); + if ( + _lambda <= -1 + || {isObjectHidden _target} // Prevent interacting with yourself or your own vehicle - if (_target != ACE_player && {_target != vehicle ACE_player}) then { + || {_target in [ACE_player, vehicle ACE_player]} + ) then {continue}; - // Iterate through object actions, find base level actions and render them if appropiate - GVAR(objectActionList) = _target getVariable [QGVAR(actions), []]; - { - // Only render them directly if they are base level actions - if ((_x select 1) isEqualTo []) then { - // Try to render the menu - private _action = _x; - if ([_target, _action] call FUNC(renderBaseMenu)) then { - _numInteractions = _numInteractions + 1; - GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; - }; - }; - nil - } count GVAR(objectActionList); + private _hasInteractions = false; - // Iterate through base level class actions and render them if appropiate - private _namespace = GVAR(ActNamespace); - private _classActions = _namespace getVariable typeOf _target; - - { - private _action = _x; - // Try to render the menu - if ([_target, _action] call FUNC(renderBaseMenu)) then { - _numInteractions = _numInteractions + 1; - GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; - }; - nil - } count _classActions; - - // Limit the amount of objects the player can interact with - if (_numInteractions > 0) then { - _numInteractObjects = _numInteractObjects + 1; - }; + // Iterate through object actions, find base level actions and render them if appropiate + GVAR(objectActionList) = _target getVariable [QGVAR(actions), []]; + { + // Only render them directly if they are base level actions + if (_x select 1 isNotEqualTo []) then {continue}; + // Try to render the menu + private _action = _x; + if ([_target, _action] call FUNC(renderBaseMenu)) then { + _hasInteractions = true; + GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; }; - }; - if (_numInteractObjects >= MAXINTERACTOBJECTS) exitWith {}; + } forEach GVAR(objectActionList); - nil - } count _nearestObjects; + // Iterate through base level class actions and render them if appropiate + private _classActions = GVAR(ActNamespace) getVariable [typeOf _target, []]; + { + private _action = _x; + // Try to render the menu + if ([_target, _action] call FUNC(renderBaseMenu)) then { + _hasInteractions = true; + GVAR(foundActions) pushBack [_target, _action, GVAR(objectActionList)]; + }; + } forEach _classActions; + + // Limit the amount of objects the player can interact with + if (_hasInteractions) then { + INC(_numInteractObjects); + if (_numInteractObjects >= MAXINTERACTOBJECTS) then {break}; + }; + } forEach _nearestObjects; }; private _fnc_renderLastFrameActions = { @@ -88,8 +85,7 @@ private _fnc_renderLastFrameActions = { GVAR(objectActionList) = _objectActionList; [_target, _action] call FUNC(renderBaseMenu); - nil - } count GVAR(foundActions); + } forEach GVAR(foundActions); }; private _fnc_renderSelfActions = { @@ -112,16 +108,14 @@ private _fnc_renderSelfActions = { { _action = _x; [_target, _action, _pos] call FUNC(renderBaseMenu); - nil - } count _classActions; + } forEach _classActions; }; private _fnc_renderZeusActions = { { private _action = _x; [_this, _action, [0.5, 0.5]] call FUNC(renderBaseMenu); - nil - } count GVAR(ZeusActions); + } forEach GVAR(ZeusActions); }; @@ -178,5 +172,4 @@ if (count GVAR(collectedActionPoints) > 1) then { { _x params ["_z", "_sPos", "_activeActionTree"]; [[], _activeActionTree, _sPos, [180,360]] call FUNC(renderMenu); - nil -} count GVAR(collectedActionPoints); +} forEach GVAR(collectedActionPoints); diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index d51766548f..17f9ad5145 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -36,7 +36,7 @@ private _menuInSelectedPath = true; if (_forEachIndex >= (count GVAR(menuDepthPath))) exitWith { _menuInSelectedPath = false; }; - if !(_x isEqualTo (GVAR(menuDepthPath) select _forEachIndex)) exitWith { + if (_x isNotEqualTo (GVAR(menuDepthPath) select _forEachIndex)) exitWith { _menuInSelectedPath = false; }; } forEach _path; diff --git a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf index 2497021e00..1f2e0c5da1 100644 --- a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf @@ -38,7 +38,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {}; //Make the common case fast (cursorTarget is looking at a door): if ((!isNull cursorTarget) && {cursorTarget isKindOf "Static"} && {!(cursorTarget in _housesScaned)}) then { - if (((count (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "UserActions")) > 0) || {(count (getArray (configFile >> "CfgVehicles" >> (typeOf cursorTarget) >> "ladders"))) > 0}) then { + if (((count (configOf cursorTarget >> "UserActions")) > 0) || {(count (getArray (configOf cursorTarget >> "ladders"))) > 0}) then { _housesToScanForActions = [cursorTarget]; } else { _housesScaned pushBack cursorTarget; @@ -79,7 +79,7 @@ if ((vehicle ACE_player) != ACE_player) exitWith {}; // systemChat format ["Add Actions for [%1] (count %2) @ %3", _typeOfHouse, (count _memPoints), diag_tickTime]; { - private _helperPos = AGLtoASL (_houseBeingScaned modelToWorld (_houseBeingScaned selectionPosition _x)); + private _helperPos = _houseBeingScaned modelToWorldWorld (_houseBeingScaned selectionPosition _x); private _helperObject = "ACE_LogicDummy" createVehicleLocal [0,0,0]; _addedHelpers pushBack _helperObject; _helperObject setVariable [QGVAR(building), _houseBeingScaned]; diff --git a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf index 46667857f5..2b646e8eca 100644 --- a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf @@ -41,15 +41,34 @@ private _fnc_getMemPointOffset = { private _fnc_userAction_Statement = { params ["_target", "_player", "_variable"]; _variable params ["_actionStatement", "_actionCondition"]; + + // Use global variable this for action condition and action code + private _savedThis = this; this = _target getVariable [QGVAR(building), objNull]; + call _actionStatement; + + // Restore this variable + this = _savedThis; }; + private _fnc_userAction_Condition = { params ["_target", "_player", "_variable"]; _variable params ["_actionStatement", "_actionCondition"]; + + private _building = _target getVariable [QGVAR(building), objNull]; + if (isNull _building) exitWith {false}; + + // Use global variable this for action condition and action code + private _savedThis = this; this = _target getVariable [QGVAR(building), objNull]; - if (isNull this) exitWith {false}; - call _actionCondition; + + private _result = call _actionCondition; + + // Restore this variable + this = _savedThis; + + _result }; private _configPath = configFile >> "CfgVehicles" >> _typeOfBuilding >> "UserActions"; @@ -72,8 +91,7 @@ for "_index" from 0 to ((count _configPath) - 1) do { _actionCondition = compile _actionCondition; _actionMaxDistance = _actionMaxDistance + 0.1; //increase range slightly - //extension ~4x as fast: - private _iconImage = "ace_parse_imagepath" callExtension _actionDisplayNameDefault; + private _iconImage = ((_actionDisplayNameDefault regexFind ["[\w\-\\\/]+.paa/gi", 0]) param [0, [""]]) select 0; private _actionOffset = [_actionPosition] call _fnc_getMemPointOffset; private _memPointIndex = _memPoints find _actionPosition; diff --git a/addons/interact_menu/initSettings.sqf b/addons/interact_menu/initSettings.sqf index 8d353906f6..e070f38bda 100644 --- a/addons/interact_menu/initSettings.sqf +++ b/addons/interact_menu/initSettings.sqf @@ -1,81 +1,154 @@ +private _category = format ["ACE %1", LLSTRING(Category_InteractionMenu)]; + [ - QGVAR(selectorColor), - "COLOR", + QGVAR(selectorColor), "COLOR", LSTRING(SelectorColor), - format ["ACE %1", LLSTRING(Category_InteractionMenu)], + _category, [1, 0, 0], false, {GVAR(selectorColorHex) = _this call BIS_fnc_colorRGBtoHTML} // Stored in Hex to avoid constant conversion -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ - QGVAR(alwaysUseCursorInteraction), - "CHECKBOX", + QGVAR(colorTextMax), "COLOR", + LSTRING(ColorTextMax), + _category, + [1, 1, 1, 1], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(colorTextMin), "COLOR", + LSTRING(ColorTextMin), + _category, + [1, 1, 1, 0.25], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(colorShadowMax), "COLOR", + LSTRING(ColorShadowMax), + _category, + [0, 0, 0, 1], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(colorShadowMin), "COLOR", + LSTRING(ColorShadowMin), + _category, + [0, 0, 0, 0.25], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(textSize), "LIST", + LSTRING(textSize), + _category, + [[0, 1, 2, 3, 4], ["str_very_small", "str_small", "str_medium", "str_large", "str_very_large"], 2], + 0, + {[QGVAR(textSize), _this] call EFUNC(common,cbaSettings_settingChanged)} +] call CBA_fnc_addSetting; + +[ + QGVAR(shadowSetting), "LIST", + [LSTRING(shadowSetting), LSTRING(shadowSettingDescription)], + _category, + [[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", "STR_A3_OPTIONS_ENABLED", LSTRING(shadowOutline)], 2], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(actionOnKeyRelease), "CHECKBOX", + LSTRING(ActionOnKeyRelease), + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(addBuildingActions), "CHECKBOX", + [LSTRING(addBuildingActions), LSTRING(addBuildingActionsDescription)], + _category, + false, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(menuAnimationSpeed), "LIST", + [LSTRING(menuAnimationSpeed), LSTRING(menuAnimationSpeed_Description)], + _category, + [[0, 1, 2], ["str_speed_normal", "2x", "3x"], 0], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(consolidateSingleChild), "CHECKBOX", + [LSTRING(consolidateSingleChild), LSTRING(consolidateSingleChild_Description)], + _category, + false +] call CBA_fnc_addSetting; + +[ + QGVAR(alwaysUseCursorInteraction), "CHECKBOX", LSTRING(AlwaysUseCursorInteraction), - [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)], + [_category, LLSTRING(Category_InteractionMenu)], false, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ - QGVAR(cursorKeepCentered), - "CHECKBOX", + QGVAR(cursorKeepCentered), "CHECKBOX", [LSTRING(cursorKeepCentered), LSTRING(cursorKeepCenteredDescription)], - [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)], + [_category, LLSTRING(Category_InteractionMenu)], false, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ - QGVAR(useListMenu), - "CHECKBOX", + QGVAR(useListMenu), "CHECKBOX", LSTRING(UseListMenu), - [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)], - false, - false -] call CBA_settings_fnc_init; - -[ - QGVAR(menuBackground), - "LIST", - LSTRING(background), - [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LLSTRING(Category_InteractionMenu)], - [[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", LLSTRING(backgroundBlur), LLSTRING(backgroundBlack)], 0], - false -] call CBA_settings_fnc_init; - -[ - QGVAR(alwaysUseCursorSelfInteraction), - "CHECKBOX", - LSTRING(AlwaysUseCursorInteraction), - [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)], + [_category, LLSTRING(Category_InteractionMenu)], true, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ - QGVAR(cursorKeepCenteredSelfInteraction), - "CHECKBOX", - [LSTRING(cursorKeepCentered), LSTRING(cursorKeepCenteredDescription)], - [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)], - false, - false -] call CBA_settings_fnc_init; - -[ - QGVAR(useListMenuSelf), - "CHECKBOX", - LSTRING(UseListMenu), - [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)], - false, - false -] call CBA_settings_fnc_init; - -[ - QGVAR(menuBackgroundSelf), - "LIST", + QGVAR(menuBackground), "LIST", LSTRING(background), - [format ["ACE %1", LLSTRING(Category_InteractionMenu)], LELSTRING(Interaction,InteractionMenuSelf)], + [_category, LLSTRING(Category_InteractionMenu)], [[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", LLSTRING(backgroundBlur), LLSTRING(backgroundBlack)], 0], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(alwaysUseCursorSelfInteraction), "CHECKBOX", + LSTRING(AlwaysUseCursorInteraction), + [_category, LELSTRING(Interaction,InteractionMenuSelf)], + true, + false +] call CBA_fnc_addSetting; + +[ + QGVAR(cursorKeepCenteredSelfInteraction), "CHECKBOX", + [LSTRING(cursorKeepCentered), LSTRING(cursorKeepCenteredDescription)], + [_category, LELSTRING(Interaction,InteractionMenuSelf)], + false, + false +] call CBA_fnc_addSetting; + +[ + QGVAR(useListMenuSelf), "CHECKBOX", + LSTRING(UseListMenu), + [_category, LELSTRING(Interaction,InteractionMenuSelf)], + false, + false +] call CBA_fnc_addSetting; + +[ + QGVAR(menuBackgroundSelf), "LIST", + LSTRING(background), + [_category, LELSTRING(Interaction,InteractionMenuSelf)], + [[0, 1, 2], ["STR_A3_OPTIONS_DISABLED", LLSTRING(backgroundBlur), LLSTRING(backgroundBlack)], 0], + false +] call CBA_fnc_addSetting; diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 106fb1aebc..5a9964fa59 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -489,5 +489,19 @@ Selector de color Seçici Renk + + Consolidate single child actions + Объединять с единственным дочерним действием + サブ動作を統合 + Consolidar acciones hijo únicas + Combiner les sous-actions uniques + + + Combines parent action with only one child action together. + Объединять родительское действие с единственным дочерним действием в одно. + メインの動作とサブ動作一つを統合して表示します。 + Combina acciones padre con una única accion hijo de forma conjunta + Lorsqu'un menu ne contient qu'une seule sous-action, elle est combinée avec son menu parent. + diff --git a/addons/interaction/ACE_Settings.hpp b/addons/interaction/ACE_Settings.hpp index 3efb745a6b..67497ec23b 100644 --- a/addons/interaction/ACE_Settings.hpp +++ b/addons/interaction/ACE_Settings.hpp @@ -1,24 +1,12 @@ class ACE_Settings { class GVAR(enableTeamManagement) { - category = CSTRING(DisplayName); - displayName = CSTRING(EnableTeamManagement_DisplayName); - description = CSTRING(EnableTeamManagement_Description); - value = 1; - typeName = "BOOL"; + movedToSQF = 1; }; class GVAR(enableMagazinePassing) { - category = CSTRING(DisplayName); - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(PassMagazineSetting); + movedToSQF = 1; }; class GVAR(disableNegativeRating) { - category = CSTRING(DisplayName); - displayName = CSTRING(DisableNegativeRating_DisplayName); - description = CSTRING(DisableNegativeRating_Description); - value = 0; - typeName = "BOOL"; + movedToSQF = 1; }; }; diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index c05b6fe973..8cc386fbc1 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -3,7 +3,7 @@ class ACE_ZeusActions { class ZeusUnits { displayName = "$STR_A3_RscDisplayCurator_ModeUnits_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeUnits_ca.paa"; - condition = QUOTE(!([] isEqualTo (curatorSelected select 0))); + condition = QUOTE([] isNotEqualTo (curatorSelected select 0)); class stance { displayName = "$STR_A3_RscAttributeUnitPos_Title"; @@ -49,7 +49,7 @@ class ACE_ZeusActions { class ZeusGroups { displayName = "$STR_A3_RscDisplayCurator_ModeGroups_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa"; - condition = QUOTE(!([] isEqualTo (curatorSelected select 1))); + condition = QUOTE([] isNotEqualTo (curatorSelected select 1)); class behaviour { displayName = "$STR_Combat_Mode"; @@ -157,7 +157,7 @@ class ACE_ZeusActions { class ZeusWaypoints { displayName = "Waypoints"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeRecent_ca.paa"; - condition = QUOTE(!([] isEqualTo (curatorSelected select 2))); + condition = QUOTE([] isNotEqualTo (curatorSelected select 2)); class behaviour { displayName = "$STR_Combat_Mode"; @@ -265,6 +265,6 @@ class ACE_ZeusActions { class ZeusMarkers { displayName = "$STR_A3_RscDisplayCurator_ModeMarkers_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeMarkers_ca.paa"; - condition = QUOTE(!([] isEqualTo (curatorSelected select 3))); + condition = QUOTE([] isNotEqualTo (curatorSelected select 3)); }; }; diff --git a/addons/interaction/CfgEventHandlers.hpp b/addons/interaction/CfgEventHandlers.hpp index f4febe40e9..16f82ea741 100644 --- a/addons/interaction/CfgEventHandlers.hpp +++ b/addons/interaction/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 3239badbdd..67599370a4 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -303,6 +303,13 @@ class CfgVehicles { showDisabled = 1; icon = QPATHTOF(UI\team\team_management_ca.paa); }; + class ACE_RenameGroup { + displayName = CSTRING(RenameGroup); + condition = QUOTE(_player call FUNC(canRenameGroup)); + exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting", "isNotOnLadder", "isNotRefueling"}; + statement = QUOTE(_player call FUNC(renameGroupUI)); + showDisabled =1; + }; }; class ACE_Equipment { @@ -312,6 +319,14 @@ class CfgVehicles { statement = ""; showDisabled = 1; icon = ""; // @todo + + class GVAR(weaponAttachments) { + displayName = "$STR_A3_CfgEditorSubcategories_EdSubcat_SideSlot0"; + condition = QGVAR(enableWeaponAttachments); + exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"}; + insertChildren = QUOTE(call DFUNC(getWeaponAttachmentsActions)); + modifierFunction = QUOTE(_this select 3 set [ARR_2(2, getText (configFile >> 'CfgWeapons' >> currentWeapon (_this select 0) >> 'picture'))];); + }; }; }; }; @@ -350,7 +365,7 @@ class CfgVehicles { }; }; - class Car_F: Car{}; + class Car_F: Car {}; class Quadbike_01_base_F: Car_F { class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { @@ -620,7 +635,7 @@ class CfgVehicles { condition = "true"; class ACE_OpenBox { displayName = CSTRING(OpenBox); - condition = QUOTE((alive _target) && {(getNumber (configFile >> 'CfgVehicles' >> (typeOf _target) >> 'disableInventory')) == 0}); + condition = QUOTE(alive _target && {!lockedInventory _target} && {getNumber (configOf _target >> 'disableInventory') == 0}); statement = QUOTE(_player action [ARR_2(QUOTE(QUOTE(Gear)), _target)]); showDisabled = 0; }; diff --git a/addons/interaction/README.md b/addons/interaction/README.md index 92401b2547..6a58b15a62 100644 --- a/addons/interaction/README.md +++ b/addons/interaction/README.md @@ -2,12 +2,3 @@ ace_interaction =============== Provides interaction options between units. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) -- [NouberNou](https://github.com/NouberNou) diff --git a/addons/interaction/RscTitles.hpp b/addons/interaction/RscTitles.hpp index e157fd696c..0ac0e18241 100644 --- a/addons/interaction/RscTitles.hpp +++ b/addons/interaction/RscTitles.hpp @@ -57,7 +57,7 @@ class RscACE_SelectAnItem { h = 0.71; colorBackground[] = {0, 0, 0, 0.2}; }; - class header: RscText{ + class header: RscText { idc = 8870; x = X_OFFSET + 0.005; y = 0.005; diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp index a63bfc48f8..8f68aa79cf 100644 --- a/addons/interaction/XEH_PREP.hpp +++ b/addons/interaction/XEH_PREP.hpp @@ -32,6 +32,13 @@ PREP(canPardon); PREP(pardon); PREP(canPullOutBody); PREP(pullOutBody); +PREP(canRenameGroup); +PREP(renameGroupUI); +PREP(renameGroup); + +// Weapon Attachments +PREP(getWeaponAttachmentsActions); +PREP(switchWeaponAttachment); // interaction with doors PREP(getDoor); @@ -44,4 +51,6 @@ PREP(openDoor); PREP(canPush); PREP(push); +// misc PREP(canFlip); +PREP(replaceTerrainObject); diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 7a9f2b6572..1639d79bbf 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -77,10 +77,30 @@ ACE_Modifier = 0; }; }] call CBA_fnc_addEventHandler; +if (isServer) then { + [QGVAR(replaceTerrainObject), FUNC(replaceTerrainObject)] call CBA_fnc_addEventHandler; +}; + if (!hasInterface) exitWith {}; GVAR(isOpeningDoor) = false; +[QEGVAR(interact_menu,renderNearbyActions), { + if (!GVAR(interactWithTerrainObjects)) exitWith {}; + { + if ( + isObjectHidden _x // after hiding on server + || {_x getVariable [QGVAR(terrainObjectReplaced), false]} // after checking but before hiding + || {typeOf _x isNotEqualTo ""} + ) then {continue}; + private _model = getModelInfo _x select 1; + private _class = GVAR(replaceTerrainModels) get _model; + if (isNil "_class") then {continue}; + _x setVariable [QGVAR(terrainObjectReplaced), true]; + [QGVAR(replaceTerrainObject), [_x, _class]] call CBA_fnc_serverEvent; + } forEach nearestTerrainObjects [ACE_player, [], 5, false]; +}] call CBA_fnc_addEventHandler; + [QGVAR(tapShoulder), { params ["_unit", "_shoulderNum"]; @@ -128,10 +148,16 @@ GVAR(isOpeningDoor) = false; ["isNotSwimming", {!(_this call EFUNC(common,isSwimming))}] call EFUNC(common,addCanInteractWithCondition); ["isNotOnLadder", {getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "ACE_isLadder") != 1}] call EFUNC(common,addCanInteractWithCondition); -["ace_settingsInitialized", { +["CBA_settingsInitialized", { if (GVAR(disableNegativeRating)) then { player addEventHandler ["HandleRating", { (_this select 1) max 0 }]; }; }] call CBA_fnc_addEventHandler; + +{ + [_x, { + [QGVAR(clearWeaponAttachmentsActionsCache)] call CBA_fnc_localEvent; + }] call CBA_fnc_addPlayerEventHandler; +} forEach ["loadout", "weapon"]; diff --git a/addons/interaction/XEH_preInit.sqf b/addons/interaction/XEH_preInit.sqf index dbc37e2bb6..4dd0bb13e6 100644 --- a/addons/interaction/XEH_preInit.sqf +++ b/addons/interaction/XEH_preInit.sqf @@ -6,6 +6,8 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + DFUNC(repair_Statement) = { // moved from config because of build problems TRACE_1("repair_Statement",_this); { @@ -13,4 +15,8 @@ DFUNC(repair_Statement) = { // moved from config because of build problems } forEach (curatorSelected select 0) }; +if (hasInterface) then { + GVAR(replaceTerrainModels) = createHashMapFromArray call (uiNamespace getVariable QGVAR(cacheReplaceTerrainModels)); +}; + ADDON = true; diff --git a/addons/interaction/XEH_preStart.sqf b/addons/interaction/XEH_preStart.sqf index 022888575e..799e9e5986 100644 --- a/addons/interaction/XEH_preStart.sqf +++ b/addons/interaction/XEH_preStart.sqf @@ -1,3 +1,25 @@ #include "script_component.hpp" #include "XEH_PREP.hpp" + +if (!hasInterface) exitWith {}; + +private _replaceTerrainClasses = QUOTE( + getNumber (_x >> QQGVAR(replaceTerrainObject)) > 0 + && {getNumber (_x >> 'scope') == 2} +) configClasses (configFile >> "CfgVehicles"); + +private _cacheReplaceTerrainModels = createHashMap; +{ + private _model = toLower getText (_x >> "model"); + if (_model select [0, 1] == "\") then { + _model = _model select [1]; + }; + if ((_model select [count _model - 4]) != ".p3d") then { + _model = _model + ".p3d" + }; + if (_model in _cacheReplaceTerrainModels) then {continue}; + _cacheReplaceTerrainModels set [_model, configName _x]; +} forEach _replaceTerrainClasses; + +uiNamespace setVariable [QGVAR(cacheReplaceTerrainModels), compileFinal str _cacheReplaceTerrainModels]; diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp index 77c2b408af..93711a57ce 100644 --- a/addons/interaction/config.cpp +++ b/addons/interaction/config.cpp @@ -19,3 +19,4 @@ class CfgPatches { #include "RscTitles.hpp" #include "ACE_Settings.hpp" #include "ACE_ZeusActions.hpp" +#include "groupRename_GUI.hpp" diff --git a/addons/interaction/dev/initReplaceTerrainCursorObject.sqf b/addons/interaction/dev/initReplaceTerrainCursorObject.sqf new file mode 100644 index 0000000000..c0221b2d38 --- /dev/null +++ b/addons/interaction/dev/initReplaceTerrainCursorObject.sqf @@ -0,0 +1,59 @@ +// execVM "z\ace\addons\interaction\dev\initReplaceTerrainCursorObject.sqf"; +// use "J" key to replace terrain cursorObject and add dragging actions to it + +#include "\z\ace\addons\interaction\script_component.hpp" + +DFUNC(replaceTerrainModelsAdd) = { + params ["_model", ["_class", ""]]; + if (_model isEqualType objNull) then { + _model = getModelInfo _model select 1; + }; + if (_model isEqualTo "") exitWith {systemChat "fail model"; false}; + + private _savedClass = GVAR(replaceTerrainModels) get _model; + if (!isNil "_savedClass") exitWith {systemChat ("was " + _savedClass); true}; + + private _parent = ""; + if (_class isEqualTo "") then { + private _configClasses = QUOTE(getNumber (_x >> 'scope') == 2 && {!(configName _x isKindOf 'AllVehicles')}) configClasses (configFile >> "CfgVehicles"); + { + private _xmodel = toLower getText (_x >> "model"); + if (_xmodel select [0, 1] == "\") then { + _xmodel = _xmodel select [1]; + }; + if ((_xmodel select [count _xmodel - 4]) != ".p3d") then { + _xmodel = _xmodel + ".p3d" + }; + if (_model == _xmodel) then { + _class = configName _x; + _parent = configName inheritsFrom _x; + break; + }; + } forEach _configClasses; + }; + if (_class isEqualTo "") exitWith {systemChat "fail class"; false}; + GVAR(replaceTerrainModels) set [_model, _class]; + QEGVAR(interact_menu,renderNearbyActions) call CBA_fnc_localEvent; + systemChat ("found " + _class); + diag_log format ["replaceTerrain: class %1: %2", _class, _parent]; + true +}; + +// DIK_J +[0x24, [false, false, false], { + if ( + cursorObject call FUNC(replaceTerrainModelsAdd) + && {["ace_dragging"] call EFUNC(common,isModLoaded)} + ) then { + // wait while server replaces object, then init dragging on all clients + [{ + if (typeOf cursorObject == "") exitwith {}; + [cursorObject, { + if !hasInterface exitWith {}; + [_this, true] call EFUNC(dragging,setDraggable); + [_this, true] call EFUNC(dragging,setCarryable); + }] remoteExec ["call", 0]; + }, [], 1] call CBA_fnc_waitAndExecute; + }; + true +}, nil, nil, false] call CBA_fnc_addKeyHandler; diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 05e5ebfd55..93a8364415 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -24,7 +24,7 @@ private _actions = []; { private _unit = _x; - if (_unit != _player && {getText (configFile >> "CfgVehicles" >> typeOf _unit >> "simulation") != "UAVPilot"}) then { + if (_unit != _player && {getText (configOf _unit >> "simulation") != "UAVPilot"}) then { private _icon = [ "", "A3\ui_f\data\IGUI\RscIngameUI\RscUnitInfo\role_driver_ca.paa", @@ -40,7 +40,7 @@ private _actions = []; [ format ["%1", _unit], [_unit, true] call EFUNC(common,getName), - _icon, + [_icon, "#FFFFFF"], { //statement (Run on hover) - reset the cache so we will insert actions immedietly when hovering over new unit TRACE_2("Cleaning Cache",_target,vehicle _target); @@ -57,7 +57,8 @@ private _actions = []; [_unit], {[0, 0, 0]}, 2, - [false,false,false,true,false] //add run on hover (4th bit true) + [false,false,false,true,false], //add run on hover (4th bit true) + {if (["ace_medical_gui"] call EFUNC(common,isModLoaded)) then {call EFUNC(medical_gui,modifyActionTriageLevel)}} ] call EFUNC(interact_menu,createAction), [], _unit diff --git a/addons/interaction/functions/fnc_canPassMagazine.sqf b/addons/interaction/functions/fnc_canPassMagazine.sqf index 5cc1ed96e2..a76e7fb409 100644 --- a/addons/interaction/functions/fnc_canPassMagazine.sqf +++ b/addons/interaction/functions/fnc_canPassMagazine.sqf @@ -26,5 +26,5 @@ private _compatibleMags = [_weapon] call CBA_fnc_compatibleMagazines; (magazinesAmmoFull _player) findIf { _x params ["_className", "", "_loaded"]; - (_className in _compatibleMags) && {!_loaded} && {_target canAdd _className} + (_className in _compatibleMags) && {!_loaded} && {[_target, _className] call CBA_fnc_canAddItem} } > -1 diff --git a/addons/interaction/functions/fnc_canPullOutBody.sqf b/addons/interaction/functions/fnc_canPullOutBody.sqf index bb61cb2545..7b7d93418c 100644 --- a/addons/interaction/functions/fnc_canPullOutBody.sqf +++ b/addons/interaction/functions/fnc_canPullOutBody.sqf @@ -34,7 +34,7 @@ if ( ((fullCrew [_vehicle, ""] select {_body == _x select 0}) select 0) params ["", "", "_cargoIndex", "_turretPath"]; -private _locked = if (!(_turretPath isEqualTo [])) then { +private _locked = if (_turretPath isNotEqualTo []) then { _vehicle lockedTurret _turretPath; } else { if (_cargoIndex > -1) then { diff --git a/addons/interaction/functions/fnc_canPush.sqf b/addons/interaction/functions/fnc_canPush.sqf index 0032296a50..c8f82b65a5 100644 --- a/addons/interaction/functions/fnc_canPush.sqf +++ b/addons/interaction/functions/fnc_canPush.sqf @@ -18,5 +18,5 @@ params ["_target"]; alive _target && -{getMass _target <= 2600 || getNumber (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(canPush)) == 1} && +{getMass _target <= 2600 || getNumber (configOf _target >> QGVAR(canPush)) == 1} && {vectorMagnitude velocity _target < 3} diff --git a/addons/interaction/functions/fnc_canRenameGroup.sqf b/addons/interaction/functions/fnc_canRenameGroup.sqf new file mode 100644 index 0000000000..bc6d423435 --- /dev/null +++ b/addons/interaction/functions/fnc_canRenameGroup.sqf @@ -0,0 +1,20 @@ +#include "script_component.hpp" +/* + * Author: Seb + * Checks if the unit is allowed to rename its group. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Is this unit allowed to rename its group? + * + * Example: + * player call ace_interaction_fnc_canRenameGroup + * + * Public: No + */ + +params [["_unit", objNull, [objNull]]]; + +GVAR(enableGroupRenaming) && {_unit == leader _unit} diff --git a/addons/interaction/functions/fnc_getDoorAnimations.sqf b/addons/interaction/functions/fnc_getDoorAnimations.sqf index 003cce7664..f23a4f0ffd 100644 --- a/addons/interaction/functions/fnc_getDoorAnimations.sqf +++ b/addons/interaction/functions/fnc_getDoorAnimations.sqf @@ -23,10 +23,13 @@ params ["_house", "_door"]; private _animate = animationNames _house; private _animations = []; private _lockedVariable = []; +private _numberStrings = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; { private _animName = toLower _x; - if ((_animName find (toLower _door)) != -1) then { + private _index = _animName find toLower _door; + + if (_index != -1 && {!(_animName select [_index + count _door, 1] in _numberStrings)}) then { if (((_animName find "disabled") != -1) || ((_animName find "locked") != -1)) then { _lockedVariable pushBack _animName; } else { diff --git a/addons/interaction/functions/fnc_getInteractionDistance.sqf b/addons/interaction/functions/fnc_getInteractionDistance.sqf index fa15577ed2..86a9f8050f 100644 --- a/addons/interaction/functions/fnc_getInteractionDistance.sqf +++ b/addons/interaction/functions/fnc_getInteractionDistance.sqf @@ -26,7 +26,7 @@ if (!((_target isKindOf "Car") || {_target isKindOf "Tank"} || {_target isKindOf private _unitEyeASL = eyePos _unit; private _targetModelPos = [_target, _unitEyeASL] call FUNC(getVehiclePosComplex); -private _distance = _unitEyeASL distance (AGLtoASL (_target modelToWorld _targetModelPos)); +private _distance = _unitEyeASL distance (_target modelToWorldWorld _targetModelPos); TRACE_2("",_targetModelPos,_distance); diff --git a/addons/interaction/functions/fnc_getVehiclePos.sqf b/addons/interaction/functions/fnc_getVehiclePos.sqf index bd25fc710b..ea5b03a54e 100644 --- a/addons/interaction/functions/fnc_getVehiclePos.sqf +++ b/addons/interaction/functions/fnc_getVehiclePos.sqf @@ -67,7 +67,7 @@ if (cursorObject isEqualTo _target) exitWith { private _dest = EGVAR(interact_menu,cameraPosASL) vectorAdd (EGVAR(interact_menu,cameraDir) vectorMultiply 50); private _origin = EGVAR(interact_menu,cameraPosASL); //private _origin = EGVAR(interact_menu,cameraPosASL) vectorAdd [0, 0, -0.35] vectorDiff (EGVAR(interact_menu,cameraDir) vectorMultiply 1.5); - //private _dest = AGLtoASL (_target modelToWorldVisual [0,0,0]); + //private _dest = _target modelToWorldVisualWorld [0,0,0]; private _results = lineIntersectsSurfaces [_origin, _dest, ACE_player, objNull, true, 5]; private _finalPos = [0,0,0]; { diff --git a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf index 17f77922b9..a3ec0b46ee 100644 --- a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf +++ b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf @@ -22,7 +22,7 @@ TRACE_2("params",_target,_cameraPosASL); private _bb = boundingBoxReal _target; (_bb select 0) params ["_bbX", "_bbY", "_bbZ"]; -private _config = configFile >> "CfgVehicles" >> (typeOf _target); +private _config = configOf _target; if (isNumber (_config >> QGVAR(bodyWidth))) then {_bbX = getNumber (_config >> QGVAR(bodyWidth));}; if (isNumber (_config >> QGVAR(bodyLength))) then {_bbY = getNumber (_config >> QGVAR(bodyLength));}; diff --git a/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf b/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf new file mode 100644 index 0000000000..cd0e8f9730 --- /dev/null +++ b/addons/interaction/functions/fnc_getWeaponAttachmentsActions.sqf @@ -0,0 +1,68 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Dystopian + * Returns children actions for weapon attachment switching. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Actions + * + * Example: + * player call ace_interaction_fnc_getWeaponAttachmentsActions + * + * Public: No + */ + +params ["_unit"]; + +[_unit, { + params ["_unit"]; + + private _currentWeapon = currentWeapon _unit; + if (_currentWeapon isEqualTo "") exitWith {[]}; + private _weaponItems = _unit weaponAccessories _currentWeapon; + private _cfgWeapons = configFile >> "CfgWeapons"; + private _actions = []; + + // "attach" actions + private _items = _unit call EFUNC(common,uniqueItems); + private _compatibleItems = _currentWeapon call CBA_fnc_compatibleItems; + { + private _config = _cfgWeapons >> _x; + private _name = format [LLSTRING(weaponAttachmentsAttach), getText (_config >> "displayName")]; + private _picture = getText (_config >> "picture"); + private _type = getNumber (_config >> "itemInfo" >> "type"); + private _oldAttachment = _weaponItems select ([TYPE_MUZZLE, TYPE_FLASHLIGHT, TYPE_OPTICS, TYPE_BIPOD] find _type); + + private _action = [ + _x, _name, _picture, + LINKFUNC(switchWeaponAttachment), + {true}, + {}, + [_currentWeapon, _x, _oldAttachment] + ] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _unit]; + } forEach ((_items arrayIntersect _compatibleItems) - _weaponItems); + + // "detach" actions + { + if (_x isEqualTo "") then {continue}; + + private _config = _cfgWeapons >> _x; + private _name = format [LLSTRING(weaponAttachmentsDetach), getText (_config >> "displayName")]; + private _picture = getText (_config >> "picture"); + + private _action = [ + _x, _name, _picture, + LINKFUNC(switchWeaponAttachment), + {true}, + {}, + [_currentWeapon, "", _x] + ] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _unit]; + } forEach _weaponItems; + + _actions +}, _unit, QGVAR(weaponAttachmentsActions), 5, QGVAR(clearWeaponAttachmentsActionsCache)] call EFUNC(common,cachedCall); diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index 73cf4e0a37..cffb9e2410 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -23,7 +23,7 @@ TRACE_2("openDoor",_house,_door); if (isNull _house) exitWith {}; -if ((configProperties [configFile >> "CfgVehicles" >> (typeOf _house) >> "UserActions"]) isEqualTo []) exitWith { +if ((configProperties [configOf _house >> "UserActions"]) isEqualTo []) exitWith { TRACE_1("Ignore houses with no UserActions",typeOf _house); // Fix problem with Shoothouse Walls }; @@ -38,8 +38,8 @@ private _lockedVariable = format ["bis_disabled_%1", _door]; // Check if the door can be locked aka have locked variable, otherwhise cant lock it if ((_house animationPhase (_animations select 0) <= 0) && {_house getVariable [_lockedVariable, 0] == 1}) exitWith { private _lockedAnimation = format ["%1_locked_source", _door]; - TRACE_3("locked",_house,_lockedAnimation,isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)); - if (isClass (configfile >> "CfgVehicles" >> (typeOf _house) >> "AnimationSources" >> _lockedAnimation)) then { + TRACE_3("locked",_house,_lockedAnimation,isClass (configOf _house >> "AnimationSources" >> _lockedAnimation)); + if (isClass (configOf _house >> "AnimationSources" >> _lockedAnimation)) then { // from: a3\structures_f\scripts\fn_door.sqf: - wiggles the door handle (A3 buildings) _house animateSource [_lockedAnimation, (1 - (_house animationSourcePhase _lockedAnimation))]; }; diff --git a/addons/interaction/functions/fnc_passMagazine.sqf b/addons/interaction/functions/fnc_passMagazine.sqf index 07db3dba3c..f6438211fa 100644 --- a/addons/interaction/functions/fnc_passMagazine.sqf +++ b/addons/interaction/functions/fnc_passMagazine.sqf @@ -21,7 +21,7 @@ params ["_player", "_target", "_weapon"]; private _compatibleMags = [_weapon] call CBA_fnc_compatibleMagazines; private _filteredMags = magazinesAmmoFull _player select { _x params ["_className", "", "_loaded"]; - (_className in _compatibleMags) && {!_loaded} && {_target canAdd _className} + (_className in _compatibleMags) && {!_loaded} && {[_target, _className] call CBA_fnc_canAddItem} }; //select magazine with most ammo diff --git a/addons/interaction/functions/fnc_pullOutBody.sqf b/addons/interaction/functions/fnc_pullOutBody.sqf index 6f754eae67..0ab901c916 100644 --- a/addons/interaction/functions/fnc_pullOutBody.sqf +++ b/addons/interaction/functions/fnc_pullOutBody.sqf @@ -37,7 +37,7 @@ TRACE_3("",_cargoIndex,_cargoNumber,_turretPath); private _preserveEngineOn = false; // first get in to target seat -if (!(_turretPath isEqualTo [])) then { +if (_turretPath isNotEqualTo []) then { _unit action ["GetInTurret", _vehicle, _turretPath]; } else { if (_cargoIndex > -1) then { diff --git a/addons/interaction/functions/fnc_renameGroup.sqf b/addons/interaction/functions/fnc_renameGroup.sqf new file mode 100644 index 0000000000..100e02e0b8 --- /dev/null +++ b/addons/interaction/functions/fnc_renameGroup.sqf @@ -0,0 +1,39 @@ +#include "script_component.hpp" +/* + * Author: Seb + * Renames a group to a given string (groupID), whilst checking that it is not an invalid name. + * + * Arguments: + * 0: The group to be renamed + * 1: The new name of the group + * + * Return Value: + * Whether the group was succesfully renamed + * + * Example: + * [group player, "leet squad"] call ace_interaction_fnc_renameGroup + * + * Public: No + */ + +params [ + ["_group", grpNull, [grpNull]], + ["_newName", "", [""]] +]; +if (_newName isEqualTo (groupID _group)) exitWith {true}; + +private _lowerName = toLower _newName; // Case insensitive name search +private _nameAlreadyTaken = allGroups findIf { + side _x isEqualTo side _group + && {_lowerName isEqualTo toLower (groupID _x)} + && {_group != _x} +} != -1; + + +if (_nameAlreadyTaken) then { + [LLSTRING(RenameGroupAlreadyExists)] call EFUNC(common,displayTextStructured); +} else { + _group setGroupIdGlobal [_newName]; +}; + +!_nameAlreadyTaken diff --git a/addons/interaction/functions/fnc_renameGroupUI.sqf b/addons/interaction/functions/fnc_renameGroupUI.sqf new file mode 100644 index 0000000000..d67aff3322 --- /dev/null +++ b/addons/interaction/functions/fnc_renameGroupUI.sqf @@ -0,0 +1,36 @@ +#include "script_component.hpp" +/* + * Author: Seb + * Shows a UI to allow a unit to change its group ID. + * + * Arguments: + * 0: The unit renaming their group + * + * Return Value: + * None + * + * Example: + * player call ace_interaction_fnc_renameGroupUI + * + * Public: No + */ + +// delay a frame so we don't overlap with interaction-menu as it closes +[{ + params [["_unit", objNull, [objNull]]]; + + private _display = findDisplay 46 createDisplay QGVAR(groupNameDisplay); + private _textCtrl = _display displayCtrl 451; + _textCtrl ctrlSetText (groupID group _unit); + _display setVariable [QGVAR(renamedGroup), group _unit]; + _display displayAddEventHandler ["Unload", { + params ["_display", "_exitCode"]; + + if !(_exitCode isEqualTo 1) exitWith {}; + + private _group = _display getVariable QGVAR(renamedGroup); + private _textCtrl = _display displayCtrl 451; + private _newName = ctrlText _textCtrl; + [_group, _newName] call FUNC(renameGroup); + }]; +}, _this] call CBA_fnc_execNextFrame; diff --git a/addons/interaction/functions/fnc_replaceTerrainObject.sqf b/addons/interaction/functions/fnc_replaceTerrainObject.sqf new file mode 100644 index 0000000000..7a164e4212 --- /dev/null +++ b/addons/interaction/functions/fnc_replaceTerrainObject.sqf @@ -0,0 +1,37 @@ +#include "script_component.hpp" +/* + * Author: Dystopian + * Replaces terrain object with created one. + * Run on server only. + * + * Arguments: + * 0: Terrain object + * 1: New object class + * + * Return Value: + * None + * + * Example: + * [cursorObject, "Land_Bucket_F"] call ace_interaction_fnc_replaceTerrainObject + * + * Public: No + */ + +params ["_terrainObject", "_class"]; +TRACE_2("",_terrainObject,_class); + +if (isObjectHidden _terrainObject) exitWith {}; + +private _position = getPosATL _terrainObject; +if (_position select 2 < 0) then { + _position set [2, 0]; +}; +private _vectorDirAndUp = [vectorDir _terrainObject, vectorUp _terrainObject]; + +hideObjectGlobal _terrainObject; +// prevent new object clipping with old one +_terrainObject setDamage [1, false]; + +private _newObject = createVehicle [_class, [0,0,0]]; +_newObject setVectorDirAndUp _vectorDirAndUp; +_newObject setPosATL _position; diff --git a/addons/interaction/functions/fnc_switchWeaponAttachment.sqf b/addons/interaction/functions/fnc_switchWeaponAttachment.sqf new file mode 100644 index 0000000000..4f9a9f2514 --- /dev/null +++ b/addons/interaction/functions/fnc_switchWeaponAttachment.sqf @@ -0,0 +1,59 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Dystopian + * Switches weapon attachment. + * + * Arguments: + * 0: Target + * 1: Player (not used) + * 2: Action params + * + * Return Value: + * None + * + * Example: + * [player, player, [currentWeapon player, "acc_flashlight", ""]] call ace_interaction_fnc_switchWeaponAttachment + * + * Public: No + */ + +params ["_unit", "", "_actionParams"]; +_actionParams params ["_weapon", "_newAttachment", "_oldAttachment"]; +TRACE_3("Switching attachment",_weapon,_newAttachment,_oldAttachment); + +[_unit, "Gear"] call EFUNC(common,doGesture); + +private _addNew = _newAttachment isNotEqualTo ""; +private _removeOld = _oldAttachment isNotEqualTo ""; + +if (_addNew) then { + _unit removeItem _newAttachment; +}; + +if (_removeOld && {!([_unit, _oldAttachment] call CBA_fnc_canAddItem)}) exitWith { + LOG("no space"); + [LELSTRING(common,Inventory_Full)] call EFUNC(common,displayTextStructured); + if (_addNew) then { + _unit addItem _newAttachment; + }; +}; + +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;}; + }; + _unit addItem _oldAttachment; + }, [_unit, _weapon, _oldAttachment], 0.3] call CBA_fnc_waitAndExecute; +}; + +if (!_addNew) exitWith {}; + +[{ + params ["_unit", "_weapon", "_newAttachment"]; + _unit addWeaponItem [_weapon, _newAttachment]; + [[getText (configFile >> "CfgWeapons" >> _newAttachment >> "picture"), 4], true] call CBA_fnc_notify; +}, [_unit, _weapon, _newAttachment], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/interaction/groupRename_GUI.hpp b/addons/interaction/groupRename_GUI.hpp new file mode 100644 index 0000000000..a0b332b505 --- /dev/null +++ b/addons/interaction/groupRename_GUI.hpp @@ -0,0 +1,66 @@ +#define FONT_H (((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) +#define FONT_W (FONT_H / pixelH * pixelW) +#define GAP_W (pixelW * 2) +#define GAP_H (pixelH * 2) +#define ELEMENT_HEIGHT FONT_H + FONT_W +#define TOTAL_W FONT_W * 25 +#define TOTAL_H FONT_H * 3 + GAP_H + +class ctrlStatic; +class ctrlButton; +class ctrlEdit; +class ctrlStaticTitle; + +class GVAR(groupNameDisplay) { + idd = -1; + enableSimulation = 1; + + class ControlsBackground { + class Title: ctrlStaticTitle { + x = QUOTE(safeZoneX + (safeZoneW / 2) - TOTAL_W/2); + y = QUOTE(safeZoneY + (safeZoneH / 2) - (FONT_H * 1.2) - GAP_H); + w = QUOTE(TOTAL_W); + h = QUOTE(FONT_H * 1.2); + sizeEx = QUOTE(FONT_H * 1.2); + text = CSTRING(renameGroupInput); + }; + class Background: ctrlStatic { + colorBackground[] = {0, 0, 0, 0.8}; + x = QUOTE(safeZoneX + (safeZoneW / 2) - TOTAL_W/2); + y = QUOTE(safeZoneY + (safeZoneH / 2)); + w = QUOTE(TOTAL_W); + h = QUOTE(ELEMENT_HEIGHT); + }; + }; + + class controls { + class Input: ctrlEdit { + idc = 451; + x = QUOTE(safeZoneX + (safeZoneW / 2) - TOTAL_W/2 + FONT_W/2); + y = QUOTE(safeZoneY + (safeZoneH / 2) + FONT_W/2); + w = QUOTE(TOTAL_W - FONT_W); + h = QUOTE(ELEMENT_HEIGHT - FONT_W); + sizeEx = QUOTE(FONT_H); + }; + + class OkButton: ctrlButton { + idc = 1; + x = QUOTE(safeZoneX + (safeZoneW / 2) + TOTAL_W/2 - FONT_W * 15); + y = QUOTE(safeZoneY + (safeZoneH / 2) + ELEMENT_HEIGHT + GAP_H); + w = QUOTE(FONT_W * 15); + h = QUOTE(ELEMENT_HEIGHT - FONT_W); + sizeEx = QUOTE(FONT_H); + text = CSTRING(RenameGroup); + }; + + class CancelButton: ctrlButton { + idc = 2; + x = QUOTE(safeZoneX + (safeZoneW / 2) - TOTAL_W/2); + y = QUOTE(safeZoneY + (safeZoneH / 2) + ELEMENT_HEIGHT + GAP_H); + w = QUOTE(FONT_W * 6); + h = QUOTE(ELEMENT_HEIGHT - FONT_W); + sizeEx = QUOTE(FONT_H); + text = CSTRING(CancelSelection); + }; + }; +}; diff --git a/addons/interaction/initSettings.sqf b/addons/interaction/initSettings.sqf new file mode 100644 index 0000000000..b502ed36b0 --- /dev/null +++ b/addons/interaction/initSettings.sqf @@ -0,0 +1,47 @@ +[ + QGVAR(enableTeamManagement), "CHECKBOX", + [LSTRING(EnableTeamManagement_DisplayName), LSTRING(EnableTeamManagement_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + true, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enableMagazinePassing), "CHECKBOX", + LSTRING(PassMagazineSetting), + format ["ACE %1", LLSTRING(DisplayName)], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(disableNegativeRating), "CHECKBOX", + [LSTRING(DisableNegativeRating_DisplayName), LSTRING(DisableNegativeRating_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + false, + true, + {[QGVAR(disableNegativeRating), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enableWeaponAttachments), "CHECKBOX", + ["str_a3_cfgeditorcategories_edcat_weaponattachments0", LSTRING(weaponAttachments_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(enableGroupRenaming), "CHECKBOX", + [LSTRING(EnableRenameGroup_DisplayName), LSTRING(EnableRenameGroup_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + true, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(interactWithTerrainObjects), "CHECKBOX", + ["str_a3_modules_moduleomquest_defend_f_attributes_useterrainobject0", LSTRING(interactWithTerrainObjects_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + false, + true +] call CBA_fnc_addSetting; diff --git a/addons/interaction/script_component.hpp b/addons/interaction/script_component.hpp index 8114dc37a2..9c0ab4c764 100644 --- a/addons/interaction/script_component.hpp +++ b/addons/interaction/script_component.hpp @@ -30,6 +30,6 @@ #define IDC_MOUSEHINT_EXTRA_NAME 2510 #define IDC_MOUSEHINT_EXTRA_TEXT 2520 -#define MACRO_DOOR_REACH_DISTANCE (AGLToASL positionCameraToWorld [0,0,0] vectorDistance AGLToASL (ACE_player modelToWorld (ACE_player selectionPosition "Head"))) + 2 +#define MACRO_DOOR_REACH_DISTANCE ((AGLToASL positionCameraToWorld [0, 0, 0]) vectorDistance (ACE_player modelToWorldWorld (ACE_player selectionPosition "Head"))) + 2 #define DISABLED_LAMP_DAMAGE 0.95 diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 06c18cbaf0..1f2adaeaa4 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -323,6 +323,18 @@ 成為隊長 Lider ol + + Rename Group + グループ名変更 + + + This group name is already in use. + このグループ名は既に使われています。 + + + NEW GROUP NAME: + 新しいグループ名: + DANCE! TANZEN! @@ -1203,5 +1215,42 @@ Romper parabrisas Ön camı parçala + + Attach %1 + Установить %1 + %1 を取り付け + Acoplar %1 + Fixer %1 + Przyczep %1 + + + Detach %1 + Снять %1 + %1 を外す + Desacoplar %1 + Retirer %1 + Odczep %1 + + + Enables attach/detach weapon attachment actions for current weapon. + Включает действия Установить/Снять для приспособлений текущего оружия. + インタラクションから使用中の武器に対してのアタッチメント取り外しを可能にします。 + Activar acciones de acoplar/desacoplar accesorios para el arma actual. + Cette option permet de fixer/retirer des accessoires d'arme à partir du menu d'interaction personnel. + Włącza akcje przyczepienia/odczepienia dodatków dla obecnej broni + + + Allow group rename + グループ名変更を許可 + + + Allows a group leader to rename their group if the name is not already taken. + グループ リーダーによるグループ名の変更を許可します。 + + + Warning: can cause some objects to collide with others. + Внимание: может вызвать отталкивание некоторых объектов друг от друга. + 警告: 一部のオブジェクトが干渉する可能性があります。 + diff --git a/addons/inventory/ACE_Settings.hpp b/addons/inventory/ACE_Settings.hpp index 87f2b59550..8f907bfd91 100644 --- a/addons/inventory/ACE_Settings.hpp +++ b/addons/inventory/ACE_Settings.hpp @@ -1,10 +1,5 @@ class ACE_Settings { class GVAR(inventoryDisplaySize) { - value = 0; - typeName = "SCALAR"; - isClientSettable = 1; - displayName = CSTRING(SettingName); - description = CSTRING(SettingDescription); - values[] = {"$str_medium", "$str_large", "$str_very_large"}; + movedToSQF = 1; }; -}; \ No newline at end of file +}; diff --git a/addons/inventory/CfgEventHandlers.hpp b/addons/inventory/CfgEventHandlers.hpp index 369f47e1dd..5b92811746 100644 --- a/addons/inventory/CfgEventHandlers.hpp +++ b/addons/inventory/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/inventory/README.md b/addons/inventory/README.md index 7d644143cf..7027e5cf52 100644 --- a/addons/inventory/README.md +++ b/addons/inventory/README.md @@ -2,11 +2,3 @@ ace_inventory ============= Adds options to increase the size of the inventory dialog. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/inventory/XEH_preInit.sqf b/addons/inventory/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/inventory/XEH_preInit.sqf +++ b/addons/inventory/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/inventory/functions/fnc_currentItemListBox.sqf b/addons/inventory/functions/fnc_currentItemListBox.sqf index 3a0889865c..3419c8dfff 100644 --- a/addons/inventory/functions/fnc_currentItemListBox.sqf +++ b/addons/inventory/functions/fnc_currentItemListBox.sqf @@ -30,4 +30,4 @@ scopeName "main"; false } count [IDC_ITEMLIST_GROUND, IDC_ITEMLIST_SOLDIER, IDC_ITEMLIST_UNIFORM, IDC_ITEMLIST_VEST, IDC_ITEMLIST_BACKPACK]; --1 +controlNull diff --git a/addons/inventory/initSettings.sqf b/addons/inventory/initSettings.sqf new file mode 100644 index 0000000000..21f8c3efe3 --- /dev/null +++ b/addons/inventory/initSettings.sqf @@ -0,0 +1,7 @@ +[ + QGVAR(inventoryDisplaySize), "LIST", + [LSTRING(SettingName), LSTRING(SettingDescription)], + "ACE Uncategorized", + [[0, 1, 2], ["str_medium", "str_large", "str_very_large"], 0], + 0 +] call CBA_fnc_addSetting; diff --git a/addons/javelin/CfgEventhandlers.hpp b/addons/javelin/CfgEventhandlers.hpp index 789cfeb05c..e325095c32 100644 --- a/addons/javelin/CfgEventhandlers.hpp +++ b/addons/javelin/CfgEventhandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_clientInit)); }; }; diff --git a/addons/javelin/README.md b/addons/javelin/README.md index ecbf3743b4..cf39b60bd0 100644 --- a/addons/javelin/README.md +++ b/addons/javelin/README.md @@ -2,11 +2,3 @@ ace_javelin =============== Adds the Javelin AT launcher. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [jaynus](https://github.com/walterpearce) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/javelin/functions/fnc_getTarget.sqf b/addons/javelin/functions/fnc_getTarget.sqf index 7230aae64a..9aff228391 100644 --- a/addons/javelin/functions/fnc_getTarget.sqf +++ b/addons/javelin/functions/fnc_getTarget.sqf @@ -35,10 +35,10 @@ if (!isNull _lastTarget) then { for "_xOffset" from -2.5 to 2.5 step 0.5 do { for "_yOffset" from -2 to 1 step 0.5 do { // Find test points in the model based on the angle that we are viewing it from (not true 3d projection, but not bad) - private _testPosASL = AGLtoASL (_lastTarget modelToWorld [_xOffset * - cos _relAngle, _xOffset * sin _relAngle, _yOffset]); + private _testPosASL = _lastTarget modelToWorldWorld [_xOffset * - cos _relAngle, _xOffset * sin _relAngle, _yOffset]; private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1]; // drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,1,1], [1,0,1,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"]; - if (!(_intersectionsToCursorTarget isEqualTo [])) then { + if (_intersectionsToCursorTarget isNotEqualTo []) then { (_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"]; if (_intersectedObject isKindOf "AllVehicles") then { _intersectedObject breakOut "main"; @@ -68,7 +68,7 @@ for "_xOffset" from -14 to 14 step 2 do { private _testPosASL = AGLtoASL (positionCameraToWorld [_xOffset, _yOffset, _maxRange]); private _intersectionsToCursorTarget = lineIntersectsSurfaces [_viewASL, _testPosASL, ace_player, vehicle ace_player, true, 1]; // drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [[0,1,0,1], [1,0,0,1]] select (count _intersectionsToCursorTarget), (ASLtoAGL _testPosASL), 0.25, 0.25, 0, "", 0.5, 0.025, "TahomaB"]; - if (!(_intersectionsToCursorTarget isEqualTo [])) then { + if (_intersectionsToCursorTarget isNotEqualTo []) then { (_intersectionsToCursorTarget select 0) params ["", "", "_intersectedObject"]; if (_intersectedObject isKindOf "AllVehicles") then { _intersectedObject breakOut "main"; diff --git a/addons/javelin/stringtable.xml b/addons/javelin/stringtable.xml index 77b6d4a623..4200722da0 100644 --- a/addons/javelin/stringtable.xml +++ b/addons/javelin/stringtable.xml @@ -12,7 +12,7 @@ Aggangia il bersaglio Fijar objetivo (Mantener) Travar Alvo(Segurar) - 目標を捕捉 (押しっぱ) + 目標を捕捉 (長押し) 표적 획득 (누르기) 锁定目标 (按住) 鎖定目標 (按住) diff --git a/addons/kestrel4500/CfgEventHandlers.hpp b/addons/kestrel4500/CfgEventHandlers.hpp index 2bed8a2eef..851e58197c 100644 --- a/addons/kestrel4500/CfgEventHandlers.hpp +++ b/addons/kestrel4500/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/kestrel4500/CfgSound.hpp b/addons/kestrel4500/CfgSound.hpp index 957863bc9d..5f7569647f 100644 --- a/addons/kestrel4500/CfgSound.hpp +++ b/addons/kestrel4500/CfgSound.hpp @@ -1,39 +1,32 @@ -class CfgSounds -{ - class kestrel4500_center_button_click - { +class CfgSounds { + class kestrel4500_center_button_click { name="kestrel4500_center_button_click"; sound[]={PATHTOF(sound\kestrel_center_button_click.wav),1,1}; titles[]={}; }; - class kestrel4500_top_button_click - { + class kestrel4500_top_button_click { name="kestrel4500_top_button_click"; sound[]={PATHTOF(sound\kestrel_top_button_click.wav),1,1}; titles[]={}; }; - class kestrel4500_right_button_click - { + class kestrel4500_right_button_click { name="kestrel4500_right_button_click"; sound[]={PATHTOF(sound\kestrel_right_button_click.wav),1,1}; titles[]={}; }; - class kestrel4500_bottom_button_click - { + class kestrel4500_bottom_button_click { name="kestrel4500_bottom_button_click"; sound[]={PATHTOF(sound\kestrel_bottom_button_click.wav),1,1}; titles[]={}; }; - class kestrel4500_left_button_click - { + class kestrel4500_left_button_click { name="kestrel4500_left_button_click"; sound[]={PATHTOF(sound\kestrel_left_button_click.wav),1,1}; titles[]={}; }; - class kestrel4500_exit_button_click - { + class kestrel4500_exit_button_click { name="kestrel4500_exit_button_click"; sound[]={PATHTOF(sound\kestrel_exit_button_click.wav),1,1}; titles[]={}; }; -}; \ No newline at end of file +}; diff --git a/addons/kestrel4500/README.md b/addons/kestrel4500/README.md index c0b50a3555..3e4d8a94e2 100644 --- a/addons/kestrel4500/README.md +++ b/addons/kestrel4500/README.md @@ -2,10 +2,3 @@ ace_kestrel4500 =============== Adds Kestrel 4500 Pocket Weather Tracker. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/kestrel4500/initKeybinds.sqf b/addons/kestrel4500/initKeybinds.sqf index 8be7464615..fe0c23aa18 100644 --- a/addons/kestrel4500/initKeybinds.sqf +++ b/addons/kestrel4500/initKeybinds.sqf @@ -32,7 +32,7 @@ private _conditonCode = { }; private _toggleCode = { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {}; + if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Statement if (!GVAR(Overlay)) then { diff --git a/addons/killtracker/$PBOPREFIX$ b/addons/killtracker/$PBOPREFIX$ new file mode 100644 index 0000000000..889d45df48 --- /dev/null +++ b/addons/killtracker/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\killtracker diff --git a/addons/killtracker/CfgEventHandlers.hpp b/addons/killtracker/CfgEventHandlers.hpp new file mode 100644 index 0000000000..9cc1b0427b --- /dev/null +++ b/addons/killtracker/CfgEventHandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/killtracker/README.md b/addons/killtracker/README.md new file mode 100644 index 0000000000..f96e43e2a2 --- /dev/null +++ b/addons/killtracker/README.md @@ -0,0 +1,10 @@ +ace_killtracker +============ + +Tracks deaths/kills and logs to the end mission disaplay. Attemps to log kills from Medical by using `ace_medical_lastDamageSource`. + +Note: Requires config setup in a mission, see `killtracker.inc` - has no effect if mission is not setup correctly. + +## ACEX Conversion - things still using acex prefix +- Global Var `acex_killTracker_outputText` +- `acex_killTracker` classname for `CfgDebriefingSections` diff --git a/addons/killtracker/XEH_postInit.sqf b/addons/killtracker/XEH_postInit.sqf new file mode 100644 index 0000000000..63801c1506 --- /dev/null +++ b/addons/killtracker/XEH_postInit.sqf @@ -0,0 +1,131 @@ +#include "script_component.hpp" +/* + * Author: PabstMirror + * Tracks deaths/kills and logs to the end mission disaplay + * Attemps to log kills from Medical by using "ace_killed" event. + * + * Note: Requires config setup in a mission's description.ext + * Has no effect if mission is not setup correctly. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Public: No + */ + +if ((getText (missionconfigfile >> "CfgDebriefingSections" >> QUOTE(XADDON) >> "variable")) != QXGVAR(outputText)) exitWith { + TRACE_1("no mission debriefing config",_this); +}; + +INFO("Running Kill Tracking"); + +// Variables: +GVAR(eventsArray) = []; +XGVAR(outputText) = format ["%1 0", LLSTRING(TotalKills)]; +GVAR(killCount) = 0; + +// Add Event Handlers: +[QGVAR(kill), { + params ["_name", "_killInfo"]; + TRACE_2("kill eh",_name,_killInfo); + // Increment kill counter + GVAR(killCount) = GVAR(killCount) + 1; + GVAR(eventsArray) pushBack format [LLSTRING(Kill), _name, _killInfo]; + XGVAR(outputText) = (format ["%1 %2
", LLSTRING(TotalKills), GVAR(killCount)]) + (GVAR(eventsArray) joinString "
"); +}] call CBA_fnc_addEventHandler; + +[QGVAR(death), { + params ["_name", "_killInfo"]; + TRACE_2("death eh",_name,_killInfo); + GVAR(eventsArray) pushBack format [LLSTRING(Killer), _name, _killInfo]; + XGVAR(outputText) = (format ["%1 %2
", LLSTRING(TotalKills), GVAR(killCount)]) + (GVAR(eventsArray) joinString "
"); +}] call CBA_fnc_addEventHandler; + +["ace_killed", { + params ["_unit", "_causeOfDeath", "_killer", "_instigator"]; + TRACE_4("ace_killed EH",_unit,_causeOfDeath,_killer,_instigator); + + if (!local _unit) exitWith {}; + + private _killInfo = []; + + if (!isNull _killer) then { + if (!(_killer isKindof "CAManBase")) then { // If killer is a vehicle log the vehicle type + _killInfo pushBack format [LLSTRING(Vehicle), getText (configfile >> "CfgVehicles" >> (typeOf _killer) >> "displayName")]; + }; + if (isNull _instigator) then { + _instigator = effectiveCommander _killer; + TRACE_2("using effectiveCommander",_instigator,_killer); + }; + }; + private _unitIsPlayer = hasInterface && {_unit in [player, ace_player]}; // isPlayer check will fail at this point + private _killerIsPlayer = (!isNull _instigator) && {_unit != _instigator} && {[_instigator] call EFUNC(common,isPlayer)}; + TRACE_2("",_unitIsPlayer,_killerIsPlayer); + + // Don't do anything if neither are players + if (!(_unitIsPlayer || _killerIsPlayer)) exitWith {}; + + // Log firendly fire + private _fnc_getSideFromConfig = { + params ["_object"]; + switch (getNumber (configFile >> "CfgVehicles" >> (typeOf _object) >> "side")) do { + case (0): {east}; + case (1): {west}; + case (2): {resistance}; + default {civilian}; + }; + }; + if ((!isNull _instigator) && {_unit != _instigator} && {_instigator isKindOf "CAManBase"}) then { + // Because of unconscious group switching/captives it's probably best to just use unit's config side + private _unitSide = [_unit] call _fnc_getSideFromConfig; + private _killerSide = [_instigator] call _fnc_getSideFromConfig; + if ([_unitSide, _killerSide] call BIS_fnc_areFriendly) then { + _killInfo pushBack format["%1", LLSTRING(FriendlyFire)]; + }; + }; + + // Rough cause of death from statemachine (e.g. "CardiacArrest:Timeout"), could parse this to be more human readable + _killInfo pushBack _causeOfDeath; + + // Parse info into text + _killInfo = if (_killInfo isEqualTo []) then { + "" + } else { + format [" - [%1]", (_killInfo joinString ", ")]; + }; + + // If unit was player then send event to self + if (_unitIsPlayer) then { + private _killerName = "Self?"; + if ((!isNull _killer) && {_unit != _killer}) then { + if (_killerIsPlayer) then { + _killerName = [_killer, true, false] call EFUNC(common,getName); + } else { + _killerName = _killer getVariable [QGVAR(aiName), ""]; // allow setting a custom AI name (e.g. VIP Target) + if (_killerName == "") then { + _killerName = format ["*AI* - %1", getText (configfile >> "CfgVehicles" >> (typeOf _killer) >> "displayName")]; + }; + }; + }; + TRACE_3("send death event",_unit,_killerName,_killInfo); + [QGVAR(death), [_killerName, _killInfo]] call CBA_fnc_localEvent; + }; + + // If killer was player then send event to killer + if (_killerIsPlayer) then { + private _unitName = ""; + if (_unitIsPlayer) then { + _unitName = [_unit, true, false] call EFUNC(common,getName); // should be same as profileName + } else { + _unitName = _unit getVariable [QGVAR(aiName), ""]; // allow setting a custom AI name (e.g. VIP Target) + if (_unitName == "") then { + _unitName = format ["*AI* - %1", getText (configfile >> "CfgVehicles" >> (typeOf _unit) >> "displayName")]; + }; + }; + TRACE_3("send kill event",_killer,_unitName,_killInfo); + [QGVAR(kill), [_unitName, _killInfo], _killer] call CBA_fnc_targetEvent; + }; +}] call CBA_fnc_addEventHandler; diff --git a/addons/killtracker/config.cpp b/addons/killtracker/config.cpp new file mode 100644 index 0000000000..8164c08f7c --- /dev/null +++ b/addons/killtracker/config.cpp @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_medical"}; + author = ECSTRING(common,ACETeam); + authors[]= {"PabstMirror"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" diff --git a/addons/killtracker/killtracker.inc b/addons/killtracker/killtracker.inc new file mode 100644 index 0000000000..003537177f --- /dev/null +++ b/addons/killtracker/killtracker.inc @@ -0,0 +1,20 @@ +/* + * Author: Freddo, PabstMirror + * + * Creates a killtracker debriefing section, displayed at the end mission debriefing screen. + * Include this file in description.ext of your mission. + * + * Example: + * class CfgDebriefingSections { + * #if __has_include("\z\ace\addons\killtracker\killtracker.inc") + * #include "\z\ace\addons\killtracker\killtracker.inc" + * #endif + * }; + * + * Public: Yes + */ + +class acex_killTracker { + title = "$STR_ACE_KillTracker_Title"; + variable = "acex_killTracker_outputText"; +}; diff --git a/addons/killtracker/script_component.hpp b/addons/killtracker/script_component.hpp new file mode 100644 index 0000000000..2195faa79f --- /dev/null +++ b/addons/killtracker/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT killtracker +#define COMPONENT_BEAUTIFIED KillTracker +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_KILLTRACKER + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_KILLTRACKER + #define DEBUG_SETTINGS DEBUG_SETTINGS_KILLTRACKER +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/killtracker/stringtable.xml b/addons/killtracker/stringtable.xml new file mode 100644 index 0000000000..c5776d67f4 --- /dev/null +++ b/addons/killtracker/stringtable.xml @@ -0,0 +1,53 @@ + + + + + ACE Killed Events + ACE キルトラッカー + + + Total Kills: + Всего убийств: + Liczba zabójstw: + Toplam Öldürme: + 総キル: + + + Kill: %1 %2 + Убил: %1 %2 + Zabójstwo: %1 %2 + Öldürülen: %1 %2 + キル: %1 %2 + + + Killer: %1 %2 + Убийца: %1 %2 + Zabójca: %1 %2 + Öldüren: %1 %2 + キラー: %1 %2 + + + Vehicle: %1 + Техника: %1 + Pojazd: %1 + Araç :%1 + 車両: %1 + + + Friendly Fire + 誤擊友方 + Tir fratricide + Fuego aliado + Fuoco amico + Ostrzał sojuszniczy + Дружественный огонь + Teambeschuss + Střelba do vlastních! + Fogo amigo + 아군 오인사격 + 友军误射 + 同士討ち + Dost Atışı + + + diff --git a/addons/laser/ACE_Settings.hpp b/addons/laser/ACE_Settings.hpp index 3584a2086f..e9755d3bb5 100644 --- a/addons/laser/ACE_Settings.hpp +++ b/addons/laser/ACE_Settings.hpp @@ -1,8 +1,5 @@ class ACE_Settings { class GVAR(dispersionCount) { - value = 2; - typeName = "SCALAR"; - displayName = CSTRING(dispersionCount_displayName); - sliderSettings[] = {0, 5, 2, -1}; + movedToSQF = 1; }; }; diff --git a/addons/laser/CfgEventhandlers.hpp b/addons/laser/CfgEventhandlers.hpp index 0e652d2459..a4f59670a9 100644 --- a/addons/laser/CfgEventhandlers.hpp +++ b/addons/laser/CfgEventhandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/laser/CfgWeapons.hpp b/addons/laser/CfgWeapons.hpp index 385f842a59..ced98b9592 100644 --- a/addons/laser/CfgWeapons.hpp +++ b/addons/laser/CfgWeapons.hpp @@ -1,7 +1,7 @@ class CfgWeapons { class Binocular; - class Laserdesignator : Binocular { + class Laserdesignator: Binocular { visionMode[] = {"Normal","NVG"}; }; }; diff --git a/addons/laser/README.md b/addons/laser/README.md index 64ea8fe045..a47c15f3a1 100644 --- a/addons/laser/README.md +++ b/addons/laser/README.md @@ -2,13 +2,3 @@ ace_laser ========= Contains various functions necessary for the realistic portrayal of laser mechanics in other components. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [walterpearce](https://github.com/walterpearce) -- [NouberNou](https://github.com/NouberNou) -- [esteldunedain](https://github.com/esteldunedain) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/laser/RscInGameUI.hpp b/addons/laser/RscInGameUI.hpp index 16d3dfcd91..49ce3fdf5b 100644 --- a/addons/laser/RscInGameUI.hpp +++ b/addons/laser/RscInGameUI.hpp @@ -112,13 +112,13 @@ class RscInGameUI { h = "1.6 * (0.025 * SafezoneH)"; }; - class ACE_LaserCode_Helper : RscMapControl { + class ACE_LaserCode_Helper: RscMapControl { idc = -1; onDraw = QUOTE(_this call FUNC(onLaserDesignatorDraw)); w = 0; h = 0; }; - class ACE_LaserCode : RscText { + class ACE_LaserCode: RscText { idc = 123001; style = 0; sizeEx = "0.038*SafezoneH"; diff --git a/addons/laser/XEH_postInit.sqf b/addons/laser/XEH_postInit.sqf index 709682853b..84a3416e50 100644 --- a/addons/laser/XEH_postInit.sqf +++ b/addons/laser/XEH_postInit.sqf @@ -5,7 +5,7 @@ if (hasInterface) then { GVAR(pfID) = -1; - ["ace_settingsInitialized", { + ["CBA_settingsInitialized", { ["turret", LINKFUNC(showVehicleHud), false] call CBA_fnc_addPlayerEventHandler; ["vehicle", LINKFUNC(showVehicleHud), true] call CBA_fnc_addPlayerEventHandler; // only one of these needs the retro flag @@ -26,22 +26,20 @@ if (hasInterface) then { ["ace_laserOn", { params ["_uuid", "_args"]; TRACE_2("ace_laserOn eh",_uuid,_args); - [GVAR(laserEmitters), _uuid, _args] call CBA_fnc_hashSet; + GVAR(laserEmitters) set [_uuid, _args]; }] call CBA_fnc_addEventHandler; ["ace_laserOff", { params ["_uuid"]; TRACE_1("ace_laserOn eh",_uuid); - if ([GVAR(laserEmitters), _uuid] call CBA_fnc_hashHasKey) then { - [GVAR(laserEmitters), _uuid] call CBA_fnc_hashRem; - }; + GVAR(laserEmitters) deleteAt _uuid; }] call CBA_fnc_addEventHandler; [QGVAR(updateCode), { params ["_uuid", "_newCode"]; TRACE_2("ace_laser_updateCode eh",_uuid,_newCode); - if ([GVAR(laserEmitters), _uuid] call CBA_fnc_hashHasKey) then { - private _laserArray = [GVAR(laserEmitters), _uuid] call CBA_fnc_hashGet; + if (_uuid in GVAR(laserEmitters)) then { + private _laserArray = GVAR(laserEmitters) get _uuid; TRACE_2("updating",_newCode,_laserArray select 4); _laserArray set [4, _newCode]; }; diff --git a/addons/laser/XEH_preInit.sqf b/addons/laser/XEH_preInit.sqf index 2c4e7c7f4f..4fe49c5db4 100644 --- a/addons/laser/XEH_preInit.sqf +++ b/addons/laser/XEH_preInit.sqf @@ -11,8 +11,10 @@ ACE_DEFAULT_LASER_CODE = 1111; ACE_DEFAULT_LASER_WAVELENGTH = 1550; ACE_DEFAULT_LASER_BEAMSPREAD = 1; -GVAR(laserEmitters) = [] call CBA_fnc_hashCreate; +GVAR(laserEmitters) = createHashMap; GVAR(trackedLaserTargets) = []; GVAR(pfehID) = -1; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf index 4613f510ef..1a84ee7eb9 100644 --- a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf +++ b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf @@ -27,7 +27,7 @@ // Try searching for lasers from a given vehicle position [BLUE]: private _seekerVehicle = vehicle ace_player; -private _testSeekerPosASL = AGLtoASL (_seekerVehicle modelToWorldVisual [0,0,1]); +private _testSeekerPosASL = _seekerVehicle modelToWorldVisualWorld [0,0,1]; private _testSeekerDir = vectorDirVisual _seekerVehicle; { private _code = _x; @@ -42,10 +42,10 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle; // Draw all lasers -[GVAR(laserEmitters), { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; - // TRACE_2("",_key,_value); - _value params ["_obj", "_owner", "_laserMethod", "_waveLength", "_laserCode", "_beamSpread"]; +{ + //IGNORE_PRIVATE_WARNING ["_x", "_y]; + // TRACE_2("",_x,_y); + _y params ["_obj", "_owner", "_laserMethod", "_waveLength", "_laserCode", "_beamSpread"]; // Draw vanila lasers [RED] if (_laserMethod isEqualTo QFUNC(findLaserSource)) then { // Normal vanilla laserTarget func @@ -53,7 +53,7 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle; private _targetPosASL = getPosASL _targetObject; drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (ASLtoAGL _targetPosASL), 0.5, 0.5, 0, "", 0.5, 0.025, "TahomaB"]; - (_value call FUNC(findLaserSource)) params ["_laserPosASL", "_laserDir"]; + (_y call FUNC(findLaserSource)) params ["_laserPosASL", "_laserDir"]; private _resultsRay = [_laserPosASL, _laserDir, _obj] call FUNC(shootRay); private _rayPos = _resultsRay select 0; @@ -67,7 +67,7 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle; // Draw array weapon lasers [YELLOW] if ((_laserMethod isEqualType []) && {(count _laserMethod) == 2}) then { _laserMethod params ["_modelPosition", "_weaponName"]; - private _laserPosASL = AGLtoASL (_obj modelToWorldVisual _modelPosition); + private _laserPosASL = _obj modelToWorldVisualWorld _modelPosition; drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLtoAGL _laserPosASL), 0.5, 0.5, 0, _weaponName, 0.5, 0.025, "TahomaB"]; private _laserDir = _obj weaponDirection _weaponName; private _resultsRay = [_laserPosASL, _laserDir, _obj] call FUNC(shootRay); @@ -76,4 +76,4 @@ private _testSeekerDir = vectorDirVisual _seekerVehicle; drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,1,0,1], (ASLtoAGL _rayPos), 2, 2, 0, _weaponName, 0.5, 0.025, "TahomaB"]; }; }; -}] call CBA_fnc_hashEachPair; +} forEach GVAR(laserEmitters); diff --git a/addons/laser/functions/fnc_findLaserSource.sqf b/addons/laser/functions/fnc_findLaserSource.sqf index dcb137fb69..878b3e91db 100644 --- a/addons/laser/functions/fnc_findLaserSource.sqf +++ b/addons/laser/functions/fnc_findLaserSource.sqf @@ -28,7 +28,7 @@ if (surfaceIsWater _targetPos && {(_targetPos select 2) < 0}) then { _targetPos set [2, 0.25]; }; -private _povPos = AGLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _ownerSelection)); +private _povPos = _vehicle modelToWorldVisualWorld (_vehicle selectionPosition _ownerSelection); private _povDir = _povPos vectorFromTo _targetPos; TRACE_4("",_vehicle,_targetObject,_povPos,_povDir); diff --git a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf index c619024ed4..3a797d28c8 100644 --- a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf +++ b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf @@ -42,7 +42,7 @@ TRACE_1("params",_this); if ((alive ACE_player) && {_vehicle != ACE_player}) then { private _turretPath = if (ACE_player == (driver _vehicle)) then {[-1]} else {ACE_player call CBA_fnc_turretPath}; TRACE_1("",_turretPath); - if (!(_turretPath isEqualTo [])) then { + if (_turretPath isNotEqualTo []) then { private _currentWeapon = _vehicle currentWeaponTurret _turretPath; TRACE_1("",_currentWeapon); if ((getNumber (configFile >> "CfgWeapons" >> _currentWeapon >> "laser")) == 1) then { diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index 7fa64665ab..089c25e0a0 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -56,10 +56,10 @@ private _finalOwner = objNull; if (IS_ARRAY(_laserMethod)) then { if (count _laserMethod == 2) then { // [modelPosition, weaponName] for _obj - _laser = [AGLtoASL (_obj modelToWorldVisual (_laserMethod select 0)), _obj weaponDirection (_laserMethod select 1)]; + _laser = [_obj modelToWorldVisualWorld (_laserMethod select 0), _obj weaponDirection (_laserMethod select 1)]; } else { if (count _laserMethod == 3) then { - _laser = [AGLtoASL (_obj modelToWorldVisual (_laserMethod select 0)), (AGLtoASL (_obj modelToWorldVisual (_laserMethod select 1))) vectorFromTo (AGLtoASL (_obj modelToWorldVisual (_laserMethod select 2)))]; + _laser = [_obj modelToWorldVisualWorld (_laserMethod select 0), (_obj modelToWorldVisualWorld (_laserMethod select 1)) vectorFromTo (_obj modelToWorldVisualWorld (_laserMethod select 2))]; }; }; }; @@ -95,7 +95,7 @@ private _finalOwner = objNull; }; }; }; -} forEach (GVAR(laserEmitters) select 2); // Go through all values in hash +} forEach (values GVAR(laserEmitters)); // Go through all values in hash TRACE_2("",count _spots, _spots); @@ -154,7 +154,7 @@ if ((count _spots) > 0) then { } forEach _buckets; private _finalBucket = _finalBuckets select _largestIndex; - private _ownersHash = [] call CBA_fnc_hashCreate; + private _ownersHash = createHashMap; TRACE_2("",_finalBucket,_finalBuckets); @@ -164,24 +164,20 @@ if ((count _spots) > 0) then { { _x params ["_xPos", "_owner"]; _finalPos = _finalPos vectorAdd _xPos; - if ([_ownersHash, _owner] call CBA_fnc_hashHasKey) then { - private _count = [_ownersHash, _owner] call CBA_fnc_hashGet; - [_ownersHash, _owner, _count + 1] call CBA_fnc_hashSet; - } else { - [_ownersHash, _owner, 1] call CBA_fnc_hashSet; - }; + private _count = _ownersHash getOrDefault [hashValue _owner, 0]; + _ownersHash set [hashValue _owner, _count + 1]; } forEach _finalBucket; _finalPos = _finalPos vectorMultiply (1 / (count _finalBucket)); private _maxOwnerCount = -1; - [_ownersHash, { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; - if (_value > _maxOwnerCount) then { - _finalOwner = _key; + { + //IGNORE_PRIVATE_WARNING ["_x", "_y"]; + if (_y > _maxOwnerCount) then { + _finalOwner = _x; }; - }] call CBA_fnc_hashEachPair; + } forEach _ownersHash; }; }; diff --git a/addons/laser/functions/fnc_shootRay.sqf b/addons/laser/functions/fnc_shootRay.sqf index 1fff8d5718..03c3afd69a 100644 --- a/addons/laser/functions/fnc_shootRay.sqf +++ b/addons/laser/functions/fnc_shootRay.sqf @@ -36,7 +36,7 @@ if (_intersects isEqualTo []) then { }; }; -if (!(_intersects isEqualTo [])) then { +if (_intersects isNotEqualTo []) then { (_intersects select 0) params ["_intersectPosASL", "", "_intersectObject"]; // Move back slightly to prevents issues with it going below terrain _distance = (_posASL vectorDistance _intersectPosASL) - 0.005; diff --git a/addons/laser/functions/fnc_showVehicleHud.sqf b/addons/laser/functions/fnc_showVehicleHud.sqf index 3b9f0adc2f..39e0a92586 100644 --- a/addons/laser/functions/fnc_showVehicleHud.sqf +++ b/addons/laser/functions/fnc_showVehicleHud.sqf @@ -90,7 +90,7 @@ GVAR(pfID) = [{ // Do Laser Scan: private _ammo = getText (configFile >> "CfgMagazines" >> _vehicle currentMagazineTurret _turretPath >> "ammo"); - private _laserSource = AGLtoASL (_vehicle modelToWorld (_vehicle selectionPosition _seekerSource)); + private _laserSource = _vehicle modelToWorldWorld (_vehicle selectionPosition _seekerSource); private _laserCode = _vehicle getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; private _seekerAngle = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_missileguidance" >> "seekerAngle"); private _seekerMaxRange = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ace_missileguidance" >> "seekerMaxRange"); diff --git a/addons/laser/initSettings.sqf b/addons/laser/initSettings.sqf new file mode 100644 index 0000000000..519e04e6b1 --- /dev/null +++ b/addons/laser/initSettings.sqf @@ -0,0 +1,7 @@ +[ + QGVAR(dispersionCount), "SLIDER", + LSTRING(dispersionCount_displayName), + "ACE Uncategorized", + [0, 5, 2, -1], + 1 +] call CBA_fnc_addSetting; diff --git a/addons/laserpointer/ACE_Settings.hpp b/addons/laserpointer/ACE_Settings.hpp index 833167ba28..94d6fcf40f 100644 --- a/addons/laserpointer/ACE_Settings.hpp +++ b/addons/laserpointer/ACE_Settings.hpp @@ -1,8 +1,5 @@ class ACE_Settings { class GVAR(enabled) { - category = ECSTRING(common,ACEKeybindCategoryWeapons); - displayName = CSTRING(DisplayName); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; }; diff --git a/addons/laserpointer/CfgEventHandlers.hpp b/addons/laserpointer/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/laserpointer/CfgEventHandlers.hpp +++ b/addons/laserpointer/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/laserpointer/README.md b/addons/laserpointer/README.md index f4e711513b..22d2eadf43 100644 --- a/addons/laserpointer/README.md +++ b/addons/laserpointer/README.md @@ -2,11 +2,3 @@ ace_laserpointer ================ Adds a laser pointer visible during the day. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/laserpointer/XEH_postInit.sqf b/addons/laserpointer/XEH_postInit.sqf index 7e90e29259..3a8d611364 100644 --- a/addons/laserpointer/XEH_postInit.sqf +++ b/addons/laserpointer/XEH_postInit.sqf @@ -12,7 +12,7 @@ GVAR(laserClassesCache) = [] call CBA_fnc_createNamespace; GVAR(redLaserUnits) = []; GVAR(greenLaserUnits) = []; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { // If not enabled, dont't add draw eventhandler or PFEH (for performance) if (!GVAR(enabled)) exitWith { ["CBA_attachmentSwitched", { @@ -45,7 +45,7 @@ GVAR(greenLaserUnits) = []; GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); GVAR(greenLaserUnits) deleteAt (GVAR(greenLaserUnits) find _unit); }; - + private _laser = [(_unit weaponAccessories _weapon) select 1] param [0, ""]; if (_laser isEqualTo "") exitWith { GVAR(redLaserUnits) deleteAt (GVAR(redLaserUnits) find _unit); diff --git a/addons/laserpointer/XEH_preInit.sqf b/addons/laserpointer/XEH_preInit.sqf index d2efe43e9c..b5e9d9b58f 100644 --- a/addons/laserpointer/XEH_preInit.sqf +++ b/addons/laserpointer/XEH_preInit.sqf @@ -13,4 +13,6 @@ PREP_RECOMPILE_END; GVAR(isTI) = _visionMode isEqualTo 2; }] call CBA_fnc_addPlayerEventHandler; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf index ab7724fda5..918bcf9f02 100644 --- a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf +++ b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf @@ -22,7 +22,7 @@ params ["_target", "_range", "_isGreen", "_brightness"]; private _unit = ACE_player; -private _p0 = AGLToASL (_target modelToWorldVisual (_target selectionPosition "righthand")); +private _p0 = _target modelToWorldVisualWorld (_target selectionPosition "righthand"); // Find a system of orthogonal reference vectors // _v1 points in the direction of the weapon @@ -46,7 +46,7 @@ private _p1 = _p0 vectorAdd (_v1 vectorMultiply _range); private _pL = lineIntersectsSurfaces [_p0, _p1, _unit, vehicle _unit] select 0 select 0; -// no intersection found, quit +// no intersection found, quit (pointed to the sky or too far) if (isNil "_pL") exitWith {}; private _distance = _p0 vectorDistance _pL; @@ -72,12 +72,25 @@ drawLine3D [ private _camPos = positionCameraToWorld [0,0,0.2]; -if (count ([_target, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {}; -if (count ([_unit, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {}; +// Check for blocking laser by player or external laser source (other player) +private _blocked = false; +if (_unit isEqualTo _target && {cameraView in ["INTERNAL","GUNNER"]}) then { + // Laser belongs to player: check VIEW LOD + // (it's less detailed & fallbacks to GEO if not present, but allows to draw laser mark behind bulletproof glass) + if (count ([_unit, "VIEW"] intersect [_camPos, _pL]) > 0) exitWith { _blocked = true; }; +} else { + // External laser: check FIRE GEO LOD (more detailed) + if (count ([_target, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith { _blocked = true; }; + if (count ([_unit, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith { _blocked = true; }; +}; + +// Exit due to LOS blocked by source/player +if (_blocked) exitWith {}; // Convert _camPos to ASL _camPos = AGLToASL _camPos; +// Check for blocking by terrain or object if (terrainIntersectASL [_camPos, _pL2]) exitWith {}; if (lineIntersects [_camPos, _pL2]) exitWith {}; diff --git a/addons/laserpointer/initSettings.sqf b/addons/laserpointer/initSettings.sqf new file mode 100644 index 0000000000..edf9138b7b --- /dev/null +++ b/addons/laserpointer/initSettings.sqf @@ -0,0 +1,7 @@ +[ + QGVAR(enabled), "CHECKBOX", + LSTRING(DisplayName), + localize ELSTRING(common,ACEKeybindCategoryWeapons), + true, + 1 +] call CBA_fnc_addSetting; diff --git a/addons/logistics_rope/$PBOPREFIX$ b/addons/logistics_rope/$PBOPREFIX$ new file mode 100644 index 0000000000..12790e5206 --- /dev/null +++ b/addons/logistics_rope/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\logistics_rope \ No newline at end of file diff --git a/addons/logistics_rope/CfgWeapons.hpp b/addons/logistics_rope/CfgWeapons.hpp new file mode 100644 index 0000000000..1b492be2a2 --- /dev/null +++ b/addons/logistics_rope/CfgWeapons.hpp @@ -0,0 +1,67 @@ +class CfgWeapons { + class CBA_MiscItem_ItemInfo; + class ACE_ItemCore; + class ACE_ropeBase: ACE_ItemCore { + scope = 1; + picture = QPATHTOF(data\m_rope_ca); + model = "\A3\Structures_F_Heli\Items\Tools\Rope_01_F.p3d"; + descriptionShort = CSTRING(descriptionShort); + }; + + class ACE_rope3: ACE_ropeBase { + scope = 2; + GVAR(length) = 3.2; + displayName = CSTRING(Rope_3_Display); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 6; + }; + }; + class ACE_rope6: ACE_ropeBase { + scope = 2; + GVAR(length) = 6.2; + displayName = CSTRING(Rope_6_Display); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 18; + }; + }; + class ACE_rope12: ACE_ropeBase { + scope = 2; + GVAR(length) = 12.2; + displayName = CSTRING(Rope_12_Display); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 36; + }; + }; + class ACE_rope15: ACE_ropeBase { + scope = 2; + GVAR(length) = 15.2; + displayName = CSTRING(Rope_15_Display); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 45; + }; + }; + class ACE_rope18: ACE_ropeBase { + scope = 2; + GVAR(length) = 18.3; + displayName = CSTRING(Rope_18_Display); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 54; + }; + }; + class ACE_rope27: ACE_ropeBase { + scope = 2; + GVAR(length) = 27.4; + displayName = CSTRING(Rope_27_Display); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 81; + }; + }; + class ACE_rope36: ACE_ropeBase { + scope = 2; + GVAR(length) = 36.6; + displayName = CSTRING(Rope_36_Display); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 108; + }; + }; +}; \ No newline at end of file diff --git a/addons/logistics_rope/README.md b/addons/logistics_rope/README.md new file mode 100644 index 0000000000..948e8bb2a2 --- /dev/null +++ b/addons/logistics_rope/README.md @@ -0,0 +1,4 @@ +ace_logistics_rope +=================== + +Adds ropes. diff --git a/addons/logistics_rope/config.cpp b/addons/logistics_rope/config.cpp new file mode 100644 index 0000000000..5765cee2cb --- /dev/null +++ b/addons/logistics_rope/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {"ACE_rope3","ACE_rope6","ACE_rope12","ACE_rope15","ACE_rope18","ACE_rope27","ACE_rope36"}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + authors[] = {""}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgWeapons.hpp" + diff --git a/addons/fastroping/data/m_rope_ca.paa b/addons/logistics_rope/data/m_rope_ca.paa similarity index 100% rename from addons/fastroping/data/m_rope_ca.paa rename to addons/logistics_rope/data/m_rope_ca.paa diff --git a/addons/logistics_rope/script_component.hpp b/addons/logistics_rope/script_component.hpp new file mode 100644 index 0000000000..b5c11e5b20 --- /dev/null +++ b/addons/logistics_rope/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT logistics_rope +#define COMPONENT_BEAUTIFIED Rope +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_LOGISTICS_ROPE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_LOGISTICS_ROPE + #define DEBUG_SETTINGS DEBUG_SETTINGS_LOGISTICS_ROPE +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/logistics_rope/stringtable.xml b/addons/logistics_rope/stringtable.xml new file mode 100644 index 0000000000..ac05508402 --- /dev/null +++ b/addons/logistics_rope/stringtable.xml @@ -0,0 +1,105 @@ + + + + + A twisted braid of fibers. Usually used for rappelling or towing. + 組み紐されたロープ。ラペリングやけん引に使用されます。 + + + Rope 3.2 meters + 3.2 Meter Seil + Corde de 3,2 mètres + Lina, długość 3,2 m. + Канат 3.2 метров + Corda (3.2m) + Corda da 3.2 metri + Lano 3.2 metrů + 3.2 metre halat + Cuerda de 3.2 metros + ロープ (3.2 メートル) + + + Rope 6.2 meters + 6.2 Meter Seil + Corde de 6,2 mètres + Lina, długość 6,2 m. + Канат 6.2 метров + Corda (6.2m) + Corda da 6.2 metri + Lano 6.2 metrů + 6.2 metre halat + Cuerda de 6.2 metros + ロープ (6.2 メートル) + + + Rope 12.2 meters + 12.2 Meter Seil + Corde de 12,2 mètres + ロープ (12.2 メートル) + Lina, długość 12,2 m. + Канат 12.2 метров + Corda (12.2m) + 繩索(12.2公尺長) + Corda da 12.2 metri + Lano 12.2 metrů + 12.2 metre halat + Cuerda de 12.2 metros + + + Rope 15.2 meters + 15.2 Meter Seil + Corde de 15,2 mètres + ロープ (15.2 メートル) + Lina, długość 15,2 m. + Канат 15.2 метров + Corda (15.2m) + 繩索(15.2公尺長) + Corda da 15.2 metri + Lano 15.2 metrů + 15.2 metre halat + Cuerda de 15.2 metros + + + Rope 18.3 meters + 18.3 Meter Seil + Corde de 18,3 mètres + ロープ (18.3 メートル) + Lina, długość 18,3 m. + Канат 18.3 метров + Corda (18.3m) + 繩索(18.3公尺長) + Corda da 18.3 metri + Lano 18.3 metrů + 18.3 metre halat + Cuerda de 18.3 metros + + + Rope 27.4 meters + 27.4 Meter Seil + Corde de 27,4 mètres + ロープ (27.4 メートル) + Lina, długość 27,4 m. + Канат 27.4 метров + Corda (27.4m) + 繩索(27.4公尺長) + Corda da 27.4 metri + Lano 27.4 metrů + 27.4 metre halat + Cuerda de 27.4 metros + + + Rope 36.6 meters + 36.6 Meter Seil + Corde de 36,6 mètres + ロープ (36.6 メートル) + Lina, długość 36,6 m. + Канат 36.6 метров + Corda (36.6m) + 繩索(36.6公尺長) + Corda da 36.6 metri + Lano 36.6 metrů + 36.6 metre halat + Cuerda 36.6 metros + + + diff --git a/addons/logistics_uavbattery/CfgEventHandlers.hpp b/addons/logistics_uavbattery/CfgEventHandlers.hpp index be284a9d70..8e27a9f14f 100644 --- a/addons/logistics_uavbattery/CfgEventHandlers.hpp +++ b/addons/logistics_uavbattery/CfgEventHandlers.hpp @@ -1,12 +1,12 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/logistics_uavbattery/README.md b/addons/logistics_uavbattery/README.md index d32175cb44..fbab339fd9 100644 --- a/addons/logistics_uavbattery/README.md +++ b/addons/logistics_uavbattery/README.md @@ -5,10 +5,3 @@ Adds an item that allows refueling/recharging of the Darter quadcopter UAVs. #### Items Added: `ACE_UAVBattery` - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/logistics_wirecutter/CfgEventHandlers.hpp b/addons/logistics_wirecutter/CfgEventHandlers.hpp index 36c0fca8a3..f6503c2479 100644 --- a/addons/logistics_wirecutter/CfgEventHandlers.hpp +++ b/addons/logistics_wirecutter/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/logistics_wirecutter/CfgVehicles.hpp b/addons/logistics_wirecutter/CfgVehicles.hpp index 7dd57f207f..ab27440384 100644 --- a/addons/logistics_wirecutter/CfgVehicles.hpp +++ b/addons/logistics_wirecutter/CfgVehicles.hpp @@ -80,4 +80,19 @@ class CfgVehicles { class Land_BackAlley_01_l_1m_F: Wall_F { GVAR(isFence) = 1; }; + class Land_GameProofFence_01_l_5m_F: Wall_F { + GVAR(isFence) = 1; + }; + class Land_NetFence_03_m_3m_F: Wall_F { + GVAR(isFence) = 1; + }; + class Land_NetFence_03_m_3m_corner_F: Wall_F { + GVAR(isFence) = 1; + }; + class Land_NetFence_03_m_3m_hole_F: Wall_F { + GVAR(isFence) = 1; + }; + class Land_NetFence_03_m_9m_F: Wall_F { + GVAR(isFence) = 1; + }; }; diff --git a/addons/logistics_wirecutter/README.md b/addons/logistics_wirecutter/README.md index b40242cd86..32a33c9337 100644 --- a/addons/logistics_wirecutter/README.md +++ b/addons/logistics_wirecutter/README.md @@ -5,10 +5,3 @@ Adds an item that allows cutting of fences in Arma 3 and AiA/CUP maps. #### Items Added: `ACE_wirecutter` - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/logistics_wirecutter/XEH_PREP.hpp b/addons/logistics_wirecutter/XEH_PREP.hpp index 6ab95824ff..09cbc1c05d 100644 --- a/addons/logistics_wirecutter/XEH_PREP.hpp +++ b/addons/logistics_wirecutter/XEH_PREP.hpp @@ -1,3 +1,4 @@ PREP(cutDownFence); +PREP(destroyFence); PREP(interactEH); PREP(isFence); diff --git a/addons/logistics_wirecutter/XEH_clientInit.sqf b/addons/logistics_wirecutter/XEH_clientInit.sqf deleted file mode 100644 index 45e93bc6bd..0000000000 --- a/addons/logistics_wirecutter/XEH_clientInit.sqf +++ /dev/null @@ -1,5 +0,0 @@ -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -["ace_interactMenuOpened", {_this call FUNC(interactEH)}] call CBA_fnc_addEventHandler; diff --git a/addons/logistics_wirecutter/XEH_postInit.sqf b/addons/logistics_wirecutter/XEH_postInit.sqf new file mode 100644 index 0000000000..a22479e7e1 --- /dev/null +++ b/addons/logistics_wirecutter/XEH_postInit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +if (hasInterface) then { + ["ace_interactMenuOpened", {_this call FUNC(interactEH)}] call CBA_fnc_addEventHandler; +}; + +if (isServer) then { + [QGVAR(destroyFence), {_this call FUNC(destroyFence)}] call CBA_fnc_addEventHandler; +}; diff --git a/addons/logistics_wirecutter/XEH_preInit.sqf b/addons/logistics_wirecutter/XEH_preInit.sqf index b47cf6628d..cd05369d60 100644 --- a/addons/logistics_wirecutter/XEH_preInit.sqf +++ b/addons/logistics_wirecutter/XEH_preInit.sqf @@ -6,4 +6,28 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +if (isServer) then { + GVAR(replacements) = createHashMapFromArray [ + ["gameprooffence_01_l_5m_f.p3d", [["Land_GameProofFence_01_l_d_F", [0, 0, 0], 0]]], + ["indfnc_3_f.p3d", [["Land_IndFnc_3_D_F", [0.039, -0.221, 0], 0]]], + ["indfnc_3_hole_f.p3d", [["Land_IndFnc_3_D_F", [0.042, -0.252, 0], 0]]], + ["indfnc_9_f.p3d", [["Land_IndFnc_3_F", [-3, -0.06, 0], 0], ["Land_IndFnc_3_D_F", [0.039, -0.281, 0], 0], ["Land_IndFnc_3_F", [3, -0.06, 0], 0]]], + ["indfnc_corner_f.p3d", [["Land_IndFnc_3_D_F", [0.116, -0.223, 0], 0]]], + ["mil_wiredfence_f.p3d", [["Land_Mil_WiredFenceD_F", [0, 0, 0], 0]]], + ["net_fence_8m_f.p3d", [["Land_Net_FenceD_8m_F", [0, 0.1, 0], 0]]], + ["netfence_01_m_4m_f.p3d", [["Land_NetFence_01_m_d_F", [0, 0, 0], 0]]], + ["netfence_01_m_8m_f.p3d", [["Land_NetFence_01_m_4m_F", [-2, 0, 0], 0], ["Land_NetFence_01_m_d_F", [2, 0, 0], 0]]], + ["netfence_03_m_3m_corner_f.p3d", [["Land_NetFence_03_m_3m_d_F", [0.104, -0.183, 0], 0]]], + ["netfence_03_m_3m_f.p3d", [["Land_NetFence_03_m_3m_d_F", [0.042, -0.236, 0], 0]]], + ["netfence_03_m_3m_hole_f.p3d", [["Land_NetFence_03_m_3m_d_F", [0.045, -0.273, 0], 0]]], + ["netfence_03_m_9m_f.p3d", [["Land_NetFence_03_m_3m_F", [-3.006, -0.073, 0], 0], ["Land_NetFence_03_m_3m_d_F", [0.038, -0.309, 0], 0], ["Land_NetFence_03_m_3m_F", [2.995, -0.073, 0], 0]]], + ["plasticnetfence_01_long_f.p3d", [["Land_PlasticNetFence_01_long_d_F", [0, 0, -0.1], 0]]], + ["wired_fence_4m_f.p3d", [["Land_Wired_Fence_4mD_F", [0, 0, 0], 0]]], + ["wired_fence_8m_f.p3d", [["Land_Wired_Fence_4m_F", [-2, 0, 0], 0], ["Land_Wired_Fence_4mD_F", [3, 0, 0], 0]]], + ["wiredfence_01_16m_f.p3d", [["Land_WiredFence_01_4m_F", [-6, 0, 0], 0], ["Land_WiredFence_01_8m_d_F", [0.34, -0.1, 0], 0]]], + ["wiredfence_01_4m_f.p3d", [["Land_WiredFence_01_pole_F", [-2, 0, 0], 150]]], + ["wiredfence_01_8m_f.p3d", [["Land_WiredFence_01_4m_F", [-2, 0, 0], 0], ["Land_WiredFence_01_pole_F", [0, 0, 0], 0]]] + ]; +}; + ADDON = true; diff --git a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf index 79da93cf79..170c628d18 100644 --- a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf @@ -35,7 +35,7 @@ if !(_unit call EFUNC(common,isSwimming)) then { TRACE_1("Fence cutting successful",_this); (_this select 0) params ["_unit", "_fence"]; - _fence setDamage 1; + [QGVAR(destroyFence), [_fence]] call CBA_fnc_serverEvent; if !(_unit call EFUNC(common,isSwimming)) then { [_unit, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation); }; diff --git a/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf b/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf new file mode 100644 index 0000000000..9098acb743 --- /dev/null +++ b/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf @@ -0,0 +1,42 @@ +#include "script_component.hpp" +/* + * Author: BaerMitUmlaut + * Destroys the given fence and replaces it with a destroyed fence if possible. + * + * Arguments: + * 0: Fence + * + * Return Value: + * None + * + * Example: + * [fence] call ace_logistics_wirecutter_fnc_destroyFence + * + * Public: No + */ + +params ["_fence"]; + +private _fenceModel = toLower ((getModelInfo _fence)#0); + +// If fence cannot be replaced with destroyed model, just knock it over +if !(_fenceModel in GVAR(replacements)) exitWith { + _fence setDamage 1; +}; + +// Remove old fence +if ([_fence] call CBA_fnc_isTerrainObject) then { + _fence setDamage 1; + _fence hideObjectGlobal true; +} else { + deleteVehicle _fence; +}; + +// Create replacement(s) +{ + _x params ["_type", "_position", "_dir"]; + + private _replacement = _type createVehicle [0, 0, 0]; + _replacement setPosWorld (_fence modelToWorldWorld _position); + _replacement setDir (direction _fence + _dir); +} forEach (GVAR(replacements) get _fenceModel); diff --git a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf index 87b2a84016..640034f851 100644 --- a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf +++ b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf @@ -57,8 +57,8 @@ TRACE_1("Starting wirecuter interact PFH",_interactionType); && {[_player, _attachedFence, ["isNotSwimming"]] call EFUNC(common,canInteractWith)} && { // Custom LOS check for fence - private _headPos = AGLtoASL (_player modelToWorldVisual (_player selectionPosition "pilot")); - !lineIntersects [_headPos, AGLtoASL (_helper modelToWorldVisual [0, 0, 1.25]), _attachedFence, _player] + private _headPos = _player modelToWorldVisualWorld (_player selectionPosition "pilot"); + !lineIntersects [_headPos, _helper modelToWorldVisualWorld [0, 0, 1.25], _attachedFence, _player] || {!lineIntersects [_headPos, getPosASL _attachedFence, _attachedFence, _player]} } }; diff --git a/addons/logistics_wirecutter/script_component.hpp b/addons/logistics_wirecutter/script_component.hpp index be397a8519..38ed1dd077 100644 --- a/addons/logistics_wirecutter/script_component.hpp +++ b/addons/logistics_wirecutter/script_component.hpp @@ -70,6 +70,7 @@ "gm_gc_g501_sm70_02.p3d",\ "gm_gc_g501_sm70_03.p3d",\ "netfence_03_m_3m_f.p3d",\ + "netfence_03_m_3m_hole_f.p3d",\ "netfence_03_m_3m_corner_f.p3d",\ "netfence_03_m_9m_f.p3d",\ "vineyardfence_01_f.p3d",\ diff --git a/addons/magazinerepack/ACE_Settings.hpp b/addons/magazinerepack/ACE_Settings.hpp index b66fe5f254..dc82f4e200 100644 --- a/addons/magazinerepack/ACE_Settings.hpp +++ b/addons/magazinerepack/ACE_Settings.hpp @@ -1,26 +1,14 @@ class ACE_Settings { //Time to move a round from one magazine to another class GVAR(timePerAmmo) { - category = CSTRING(DisplayName); - displayName = CSTRING(timePerAmmo); - value = 1.5; - typeName = "SCALAR"; - sliderSettings[] = {1, 10, 1.5, 1}; + movedToSQF = 1; }; //Time to swap between magazines when repacking class GVAR(timePerMagazine) { - category = CSTRING(DisplayName); - displayName = CSTRING(timePerMagazine); - value = 2.0; - typeName = "SCALAR"; - sliderSettings[] = {1, 10, 2, 1}; + movedToSQF = 1; }; //Time to relink 2 belts together class GVAR(timePerBeltLink) { - category = CSTRING(DisplayName); - displayName = CSTRING(timePerBeltLink); - value = 8.0; - typeName = "SCALAR"; - sliderSettings[] = {1, 10, 8, 1}; + movedToSQF = 1; }; }; diff --git a/addons/magazinerepack/CfgEventHandlers.hpp b/addons/magazinerepack/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/magazinerepack/CfgEventHandlers.hpp +++ b/addons/magazinerepack/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/magazinerepack/README.md b/addons/magazinerepack/README.md index e86adcd976..948188f328 100644 --- a/addons/magazinerepack/README.md +++ b/addons/magazinerepack/README.md @@ -2,12 +2,3 @@ ace_magazinerepack ================== Adds the ability to consolidate multiple unfull magazines. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/magazinerepack/XEH_preInit.sqf b/addons/magazinerepack/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/magazinerepack/XEH_preInit.sqf +++ b/addons/magazinerepack/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf b/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf index 034de578be..b5b159b7c2 100644 --- a/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_canRepackMagazine.sqf @@ -25,5 +25,5 @@ private _maxAmmoCount = getNumber (configFile >> "CfgMagazines" >> _magazine >> _magazineType == _magazine // Magazine is of given type && {_ammoCount > 0 && {_ammoCount < _maxAmmoCount}} // Is a partial magazine - && {!_isLoaded || {_unit canAdd _magazineType}} // In inventory or can be moved into it + && {!_isLoaded || {GVAR(repackLoadedMagazines) && {[_unit, _magazineType] call CBA_fnc_canAddItem}}} // In inventory or can be moved into it } count magazinesAmmoFull _unit > 1 diff --git a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf index b1cdef9829..70018cd31d 100644 --- a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf +++ b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf @@ -27,7 +27,7 @@ private _unitMagCounts = []; private _xFullMagazineCount = getNumber (configFile >> "CfgMagazines" >> _xClassname >> "count"); //for every partial magazine, that is either in inventory or can be moved there - if ((_xCount < _xFullMagazineCount) && {_xCount > 0} && {(!_xLoaded) || {_player canAdd _xClassname}}) then { + if ((_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/magazinerepack/functions/fnc_startRepackingMagazine.sqf b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf index cd9df9b2a9..f62e6dc0e3 100644 --- a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf @@ -39,7 +39,7 @@ private _startingAmmoCounts = []; if (_xClassname == _magazineClassname && {_xCount != _fullMagazineCount && {_xCount > 0}}) then { if (_xLoaded) then { //Try to Remove from weapon and add to inventory, otherwise ignore - if (_player canAdd _magazineClassname) then { + if (GVAR(repackLoadedMagazines) && {[_player, _magazineClassname] call CBA_fnc_canAddItem}) then { switch (_xType) do { case (1): {_player removePrimaryWeaponItem _magazineClassname}; case (2): {_player removeHandgunItem _magazineClassname}; @@ -48,6 +48,7 @@ private _startingAmmoCounts = []; }; _player addMagazine [_magazineClassname, _xCount]; _startingAmmoCounts pushBack _xCount; + [LLSTRING(repackLoadedMagazinesHint)] call EFUNC(common,displayTextStructured); }; } else { _startingAmmoCounts pushBack _xCount; diff --git a/addons/magazinerepack/initSettings.sqf b/addons/magazinerepack/initSettings.sqf new file mode 100644 index 0000000000..d489864a44 --- /dev/null +++ b/addons/magazinerepack/initSettings.sqf @@ -0,0 +1,33 @@ +private _category = format ["ACE %1", localize LSTRING(DisplayName)]; + +[ + QGVAR(timePerAmmo), "SLIDER", + LSTRING(timePerAmmo), + _category, + [1, 10, 1.5, 1], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(timePerMagazine), "SLIDER", + LSTRING(timePerMagazine), + _category, + [1, 10, 2, 1], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(timePerBeltLink), "SLIDER", + LSTRING(timePerBeltLink), + _category, + [1, 10, 8, 1], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(repackLoadedMagazines), "CHECKBOX", + LSTRING(repackLoadedMagazines), + _category, + true, + 0 +] call CBA_fnc_addSetting; diff --git a/addons/magazinerepack/stringtable.xml b/addons/magazinerepack/stringtable.xml index f26b18d058..35af14f472 100644 --- a/addons/magazinerepack/stringtable.xml +++ b/addons/magazinerepack/stringtable.xml @@ -15,6 +15,7 @@ Remplissage des chargeurs Přepáskování zásobníků Şarjör Yeniden Doldurma + Reempaquetado de cargadores Time per round @@ -30,6 +31,7 @@ Temps par cartouche Čas na náboj Süre başına mermi + Tiempo por cartucho Time per magazine @@ -45,6 +47,7 @@ Temps par chargeur Čas na zásobník Süre başına şarjör + Tiempo por cargador Time per belt link @@ -59,6 +62,7 @@ Tempo por carregador de cinto Temps par bande Čas na článek pásu + Tiempo por enganche de cinta Repack Magazines @@ -162,5 +166,13 @@ %1個滿的與%2個部分的 %1 Dolu ve %2 Partial + + Repack Loaded Magazines + 装填済み弾倉を詰め替え + + + Repacking magazines, weapon unloaded + 弾倉を詰め替えし、<br />非装填状態です + diff --git a/addons/main/CfgSettings.hpp b/addons/main/CfgSettings.hpp index 75ebfbec4b..3d62f2d224 100644 --- a/addons/main/CfgSettings.hpp +++ b/addons/main/CfgSettings.hpp @@ -12,6 +12,10 @@ class CfgSettings { compat_rhs_usf3[] = {"ace_compat_rhs_usf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhsusf_main')"}; compat_rhs_gref3[] = {"ace_compat_rhs_gref3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhsgref_main')"}; compat_rhs_saf3[] = {"ace_compat_rhs_saf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhssaf_main')"}; + + //Warnings for missing DLC compat + ace_compat_sog[] = {"ace_compat_sog", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'data_f_vietnam')"}; + ace_compat_gm[] = {"ace_compat_gm", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'gm_core')"}; }; }; }; diff --git a/addons/main/README.md b/addons/main/README.md index aa401a81fa..a3589b2afd 100644 --- a/addons/main/README.md +++ b/addons/main/README.md @@ -2,12 +2,3 @@ ace_main ======== Backbone of other components, defining most of the commonly used macros. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [walterpearce](https://github.com/walterpearce) -- [NouberNou](https://github.com/NouberNou) diff --git a/addons/main/config.cpp b/addons/main/config.cpp index 7dda3f1f4c..7aa06bc69d 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -11,6 +11,11 @@ class CfgPatches { url = CSTRING(URL); VERSION_CONFIG; }; + + class XADDON: ADDON { // just in-case anything requires "acex_main" + units[] = {}; + weapons[] = {}; + }; }; class CfgMods { diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index ac111ce7b2..58ae338aae 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -39,6 +39,17 @@ #define ARR_SELECT(ARRAY,INDEX,DEFAULT) (if (count ARRAY > INDEX) then {ARRAY select INDEX} else {DEFAULT}) +// ACEX Merge +#define ACEX_PREFIX acex +#define XADDON DOUBLES(ACEX_PREFIX,COMPONENT) +#define XGVAR(var) DOUBLES(XADDON,var) +#define EXGVAR(var1,var2) TRIPLES(ACEX_PREFIX,var1,var2) +#define QXGVAR(var) QUOTE(XGVAR(var)) +#define QEXGVAR(var1,var2) QUOTE(EXGVAR(var1,var2)) +#define QQXGVAR(var) QUOTE(QXGVAR(var)) +#define QQEXGVAR(var1,var2) QUOTE(QEXGVAR(var1,var2)) +#define ACEX_PREP(func) PREP(func); TRIPLES(XADDON,fnc,func) = DFUNC(func) + #define MACRO_ADDWEAPON(WEAPON,COUNT) class _xx_##WEAPON { \ weapon = #WEAPON; \ diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 4123688015..8e598ffeef 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -10,8 +10,8 @@ #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 1.98 -#define REQUIRED_CBA_VERSION {3,15,0} +#define REQUIRED_VERSION 2.06 +#define REQUIRED_CBA_VERSION {3,15,6} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 2719f4d842..861a028d34 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 3 #define MINOR 13 -#define PATCHLVL 4 -#define BUILD 55 +#define PATCHLVL 6 +#define BUILD 60 diff --git a/addons/map/CfgEventHandlers.hpp b/addons/map/CfgEventHandlers.hpp index 6764ab5e7d..b3f4a0296e 100644 --- a/addons/map/CfgEventHandlers.hpp +++ b/addons/map/CfgEventHandlers.hpp @@ -1,20 +1,20 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); - serverInit = QUOTE(call COMPILE_FILE(XEH_postInitServer)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_postInitClient)); + serverInit = QUOTE(call COMPILE_SCRIPT(XEH_postInitServer)); }; }; diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 3da69a1216..181978551a 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -5,11 +5,9 @@ class CfgVehicles { class ACE_MapFlashlight { displayName = CSTRING(Action_Flashlights); icon = QUOTE(\a3\ui_f\data\IGUI\Cfg\VehicleToggles\lightsiconon_ca.paa); - condition = QUOTE(GVAR(mapIllumination) && visibleMap && {!([] isEqualTo (_player call FUNC(getUnitFlashlights)))}); - statement = "true"; + condition = QUOTE(GVAR(mapIllumination) && visibleMap); exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; - insertChildren = QUOTE(_this call DFUNC(compileFlashlightMenu)); - showDisabled = 0; + insertChildren = QUOTE(call DFUNC(compileFlashlightMenu)); }; }; }; diff --git a/addons/map/README.md b/addons/map/README.md index 7567986ba5..617bf875a4 100644 --- a/addons/map/README.md +++ b/addons/map/README.md @@ -7,12 +7,3 @@ Various tweaks to the in-game map, including: - Map shaking while walking (optional) - Map illumination (optional) - Blue Force Tracker (optional) - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [esteldunedain](https://github.com/esteldunedain) -- [NouberNou](https://github.com/NouberNou) diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index a30da81a40..56b2b560f4 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -10,7 +10,7 @@ call FUNC(determineZoom); GVAR(flashlights) = [] call CBA_fnc_createNamespace; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { if (isMultiplayer && {GVAR(DefaultChannel) != -1}) then { //Set the chat channel once the map has finished loading [{ @@ -47,7 +47,7 @@ GVAR(flashlights) = [] call CBA_fnc_createNamespace; private _unitLight = _player getVariable [QGVAR(flashlight), ["", objNull]]; _unitLight params ["_flashlight", "_glow"]; if (_mapOn) then { - if (!(_flashlight isEqualTo "") && {isNull _glow}) then { + if (_flashlight isNotEqualTo "" && {isNull _glow}) then { [_player, _flashlight] call FUNC(flashlightGlow); if ([_player, _flashlight] call FUNC(needPlaySound)) then {playSound QGVAR(flashlightClick)}; }; @@ -86,7 +86,7 @@ GVAR(vehicleLightColor) = [1,1,1,0]; ["vehicle", { params ["_unit", "_vehicle"]; if ((isNull _vehicle) || {_unit == _vehicle}) exitWith {}; - private _cfg = configfile >> "CfgVehicles" >> (typeOf _vehicle); + private _cfg = configOf _vehicle; GVAR(vehicleExteriorTurrets) = getArray (_cfg >> QGVAR(vehicleExteriorTurrets)); GVAR(vehicleLightColor) = [_cfg >> QGVAR(vehicleLightColor), "array", [1,1,1,0]] call CBA_fnc_getConfigEntry; @@ -94,9 +94,12 @@ GVAR(vehicleLightColor) = [1,1,1,0]; private _vehicleLightCondition = getText (_cfg >> QGVAR(vehicleLightCondition)); if (_vehicleLightCondition == "") then { private _userAction = toLower getText (_cfg >> "UserActions" >> "ToggleLight" >> "statement"); - switch (true) do { - case ((_userAction find "cabinlights_hide") > 0): {_vehicleLightCondition = "(_vehicle animationSourcePhase 'cabinlights_hide') == 1";}; - case ((_userAction find "cargolights_hide") > 0): {_vehicleLightCondition = "(_vehicle animationSourcePhase 'cargolights_hide') == 1";}; + if ( + false // isClass (_cfg >> "compartmentsLights") + || {_userAction find "cabinlights_hide" > 0} + || {_userAction find "cargolights_hide" > 0} + ) then { + _vehicleLightCondition = "false"; }; }; @@ -109,7 +112,7 @@ GVAR(vehicleLightColor) = [1,1,1,0]; } else { switch (true) do { case (_vehicle isKindOf "Tank"); - case (_vehicle isKindOf "Wheeled_APC"): { {true} }; + case (_vehicle isKindOf "Wheeled_APC_F"): { {true} }; case (_vehicle isKindOf "ParachuteBase"): { {false} }; case (_vehicle isKindOf "Helicopter"); case (_vehicle isKindOf "Plane"): { {(driver _vehicle == _unit) || {gunner _vehicle == _unit}} }; @@ -117,3 +120,17 @@ GVAR(vehicleLightColor) = [1,1,1,0]; }; }; }, true] call CBA_fnc_addPlayerEventHandler; + +// compartmentsLights work only when cameraView == "INTERNAL" so we switch it on map opening +["visibleMap", { + params ["_player", "_mapOn"]; + if (_mapOn) then { + if (!isClass (configOf vehicle _player >> "compartmentsLights") || {cameraView == "INTERNAL"}) exitWith {}; + GVAR(cameraViewLast) = cameraView; + vehicle _player switchCamera "INTERNAL"; + } else { + if (isNil QGVAR(cameraViewLast)) exitWith {}; + vehicle _player switchCamera GVAR(cameraViewLast); + GVAR(cameraViewLast) = nil; + }; +}] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/map/config.cpp b/addons/map/config.cpp index aab52c3536..943a63c228 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -100,7 +100,7 @@ class RscDisplayMainMap { class objects { class Compass: RscObject { scale = 0.7; - zoomDuration = 0; + zoomDuration = 0.1; // 0 (instant transition) breaks Arma saving position/size }; }; }; diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index d6a0f09a08..732cb394cf 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -18,82 +18,45 @@ params ["_unit"]; -// Blend two colors -private _fnc_blendColor = { - params ["_c1", "_c2", "_alpha"]; - [(_c1 select 0) * (1 - _alpha) + (_c2 select 0) * _alpha, - (_c1 select 1) * (1 - _alpha) + (_c2 select 1) * _alpha, - (_c1 select 2) * (1 - _alpha) + (_c2 select 2) * _alpha, - (_c1 select 3) * (1 - _alpha) + (_c2 select 3) * _alpha] -}; - -// Ambient light tint depending on time of day -private _lightTint = call { - if (sunOrMoon == 1.0) exitWith {[0.5,0.5,0.5,1]}; - if (sunOrMoon > 0.80) exitWith {[[1.0 - overcast,0.2,0,1], [1,1,1,1], (sunOrMoon - 0.8) / 0.2] call _fnc_blendColor}; - if (sunOrMoon > 0.50) exitWith {[[0,0,0.1,1], [1.0 - overcast,0.2,0,1], (sunOrMoon - 0.5) / 0.3] call _fnc_blendColor}; - if (sunOrMoon <= 0.5) exitWith {[0,0,0.1,1]}; - [0,0,0,0] -}; - -private _lightLevel = 0.04 + (0.96 * call EFUNC(common,ambientBrightness)); - -// Do not obscure the map if the ambient light level is above 0.95 -if (_lightLevel > 0.95) exitWith { - [false, [1,1,1,0]] -}; - private _vehicle = vehicle _unit; // Do not obscure the map if the player is on a enclosed vehicle (assume internal illumination) -if ((_vehicle != _unit) && {(!isTurnedOut _unit)} && GVAR(vehicleLightCondition) && {!((_unit call CBA_fnc_turretPath) in GVAR(vehicleExteriorTurrets))}) exitWith { +if ( + _vehicle != _unit + && {!isTurnedOut _unit} + && GVAR(vehicleLightCondition) + && {!((_unit call CBA_fnc_turretPath) in GVAR(vehicleExteriorTurrets))} +) exitWith { TRACE_1("Player in a enclosed vehicle",GVAR(vehicleLightColor)); - [!(GVAR(vehicleLightColor) isEqualTo [1,1,1,0]), GVAR(vehicleLightColor)] + [GVAR(vehicleLightColor) isNotEqualTo [1,1,1,0], GVAR(vehicleLightColor)] }; // Player is not in a vehicle TRACE_1("Player is on foot or in an open vehicle",""); -// Check if player is near a campfires, streetlamps, units with flashlights, vehicles with lights on, etc. - 40m +getLightingAt _unit params ["_ambientLightColor", "_ambientLightBrightness", "_dynamicLightColor", "_dynamicLightBrightness"]; + +private _brightness = _ambientLightBrightness + _dynamicLightBrightness; +if (_brightness > 3000) exitWith {[false, [1,1,1,0]]}; + +private _alfa = switch (true) do { + case (_brightness <= 0.2): { 1 }; + case (_brightness <= 2): { linearConversion [0.2, 2, _brightness, 1, 0.86] }; + case (_brightness <= 10): { linearConversion [2, 10, _brightness, 0.86, 0.6] }; + case (_brightness <= 100): { linearConversion [10, 100, _brightness, 0.6, 0.3] }; + case (_brightness <= 200): { linearConversion [100, 200, _brightness, 0.3, 0.14] }; + default { linearConversion [200, 3000, _brightness, 0.14, 0] }; +}; + +private _finalLightColor = []; { - _lightLevel = _lightLevel max ([_unit, _x] call EFUNC(common,lightIntensityFromObject)); -} forEach nearestObjects [_unit, ["All"], 40]; - -// @todo: Illumination flares (timed) - -// Using chemlights -private _nearObjects = (_unit nearObjects ["Chemlight_base", 4]) select {alive _x}; - -if !(_nearObjects isEqualTo []) then { - private _nearestlight = _nearObjects select 0; - private _lightLevelTemp = (1 - ((((_unit distance _nearestlight) - 2) / 2) max 0)) * 0.4; - if (_lightLevelTemp > _lightLevel) then { - private _flareTint = getArray (configFile >> "CfgLights" >> (getText (configFile >> (getText (configFile >> "CfgAmmo" >> typeOf _nearestlight >> "EffectsSmoke")) >> "Light1" >> "type")) >> "color"); - _lightTint = [_lightTint, _flareTint, (_lightLevelTemp - _lightLevel) / (1 - _lightLevel)] call _fnc_blendColor; - _lightLevel = _lightLevelTemp; - TRACE_1("player near chemlight",""); + private _finalColor = (_ambientLightBrightness * _x + _dynamicLightBrightness * (_dynamicLightColor select _forEachIndex)) / _brightness; + if (_alfa > 0.5) then { + _finalColor = _finalColor * (1 - _alfa) / 3; }; -}; + _finalLightColor pushBack _finalColor; +} forEach _ambientLightColor; -// Do not obscure the map if the ambient light level is above 0.95 -if (_lightLevel > 0.95) exitWith { - [false, [1,1,1,0]] -}; +_finalLightColor pushBack _alfa; -// Calculate resulting map color from tint and light level -private _halfLight = _lightLevel / 0.5; - -private _finalLevel = if (_lightLevel < 0.5) then { - [(_lightTint select 0) * _halfLight, - (_lightTint select 1) * _halfLight, - (_lightTint select 2) * _halfLight, - (_lightTint select 3) * (1 - _lightLevel)] -} else { - _halfLight = (_lightLevel - 0.5) / 0.5; - [(_lightTint select 0) * (1 - _halfLight) + _halfLight, - (_lightTint select 1) * (1 - _halfLight) + _halfLight, - (_lightTint select 2) * (1 - _halfLight) + _halfLight, - (_lightTint select 3) * (1 - _lightLevel)] -}; - -[true, _finalLevel] +[true, _finalLightColor] diff --git a/addons/map/functions/fnc_flashlightGlow.sqf b/addons/map/functions/fnc_flashlightGlow.sqf index 32615d014b..9457865bc2 100644 --- a/addons/map/functions/fnc_flashlightGlow.sqf +++ b/addons/map/functions/fnc_flashlightGlow.sqf @@ -27,7 +27,7 @@ if (!isNull _glow) then { deleteVehicle _glow; }; -if !(_flashlightType isEqualTo "") then { +if (_flashlightType isNotEqualTo "") then { private _color = getText (configFile >> "CfgWeapons" >> _flashlightType >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour"); if !(_color in ["white", "red", "green", "blue", "yellow", "orange"]) then {_color = "white"}; private _class = format ["ACE_FlashlightProxy_%1", _color]; diff --git a/addons/map/functions/fnc_simulateMapLight.sqf b/addons/map/functions/fnc_simulateMapLight.sqf index 7ec9d573a2..2e80d83815 100644 --- a/addons/map/functions/fnc_simulateMapLight.sqf +++ b/addons/map/functions/fnc_simulateMapLight.sqf @@ -41,12 +41,15 @@ _lightLevel params ["_r", "_g", "_b", "_a"]; private _colourAlpha = (_r + _g + _b) min _a; private _shadeAlpha = _a; -private _colourList = [_r, _g, _b]; -_colourList sort false; -private _maxColour = _colourList select 0; +private _maxColour = selectMax [_r, _g, _b]; +private _ambientColor = if (_maxColour == 0) then { + [1, 1, 1, _colourAlpha]; +} else { + [_r / _maxColour, _g / _maxColour, _b / _maxColour, _colourAlpha]; +}; //ambient colour fill -_mapCtrl drawIcon ["#(rgb,8,8,3)color(1,1,1,1)", [_r / _maxColour, _g / _maxColour, _b / _maxColour, _colourAlpha], _mapCentre, _screenSize, _screenSize, 0, "", 0]; +_mapCtrl drawIcon ["#(rgb,8,8,3)color(1,1,1,1)", _ambientColor, _mapCentre, _screenSize, _screenSize, 0, "", 0]; if (_flashlight == "") then { //ambient shade fill diff --git a/addons/map/functions/fnc_updateMapEffects.sqf b/addons/map/functions/fnc_updateMapEffects.sqf index 4e8d65bee2..bebb15ac4f 100644 --- a/addons/map/functions/fnc_updateMapEffects.sqf +++ b/addons/map/functions/fnc_updateMapEffects.sqf @@ -4,13 +4,13 @@ * On map draw, updates the effects * * Arguments: - * None + * 0: Map control * * Return Value: * None * * Example: - * call ACE_map_fnc_updateMapEffects + * _mapControl call ACE_map_fnc_updateMapEffects * * Public: No */ diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 973cd9cac0..c2f827e7de 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -524,6 +524,7 @@ Отключить BFT Desativar BFT Vypnout sledování přátelských jednotek (BFT). + Desabilitar BFT Always disable Blue Force Tracking for this group. @@ -538,6 +539,7 @@ Всегда отключать Blue Force Tracking для этой группы Sempre desativar Rastreio Blue Force (BFT) para esse grupo. Vždy vypne sledování přátelských jednotek (BFT) pro tuto skupinu. + Deshabilitar siempre Blue Force Tracking para este grupo. diff --git a/addons/map_gestures/CfgEventHandlers.hpp b/addons/map_gestures/CfgEventHandlers.hpp index 4a54dffabe..d24c68ad4b 100644 --- a/addons/map_gestures/CfgEventHandlers.hpp +++ b/addons/map_gestures/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/map_gestures/config.cpp b/addons/map_gestures/config.cpp index b7bbf791e7..50efc35265 100644 --- a/addons/map_gestures/config.cpp +++ b/addons/map_gestures/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; + units[] = {QGVAR(moduleGroupSettings)}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; diff --git a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf index f687dfdfca..f057c000bc 100644 --- a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf +++ b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf @@ -37,7 +37,7 @@ switch (_this) do { _proximityPlayers append allUnits; }; case (1): { // Players in Group - _proximityPlayers append group ace_player; + _proximityPlayers append units ace_player; }; case (2): { // Players on Side _proximityPlayers append (allUnits select {side (group _x) == side (group ace_player)}); diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index c3627d84a0..0613ac27bb 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -271,57 +271,87 @@ Pokazuj jedynie sojusznicze gesty Afficher uniquement le pointage des alliés 友軍ジェスチャーのみ表示 + Mostrar sólo gestos de aliados Shows only Gestures from Units that are from the same side or a Friendly side. Показывать жесты только от игроков союзной стороны. Affiche uniquement les pointages effectués par des unités qui sont du même camp, ou d'un camp allié. 友軍ユニットのみからジェスチャーを表示します。 + Muestra únicamente gestos de las unidades que son del mismo bando o de un bando aliado + Pokazuj tylko Gesty od jednostek z tej samej lub sojuszniczej strony Max range Camera + Макс. дальность действия камеры Portée de la caméra カメラ最大範囲 + Máximo alcance de cámara + Maksymalny zasięg kamery Max range between a Camera and players to show the map gesture indicator + Устанавливает макс. дальность между игроком и камерой для отображения жестов на карте Définit le rayon au-delà duquel une caméra ne verra plus l'indicateur de pointage des autres joueurs. プレイヤーが行うマップ ジェスチャーをカメラから確認できる最大範囲を設定します。 + Máxima distancia entre una cámara y los jugadores para mostrar el indicador de gestos en mapa + Maksymalny zasięg pomiędzy kamerą a graczami do pokazania gestów na mapie Allow Spectator + Разрешить видеть в спектаторе Autoriser les spectateurs スペクテイターに許可 + Permitir espectador + Zezwól na Obserwatora Allows Spectator to See Map Gestures + Позволяет наблюдателю видеть жесты на карте Permet aux spectateurs de voir le pointage des autres joueurs. スペクテイターからマップ ジェスチャーを表示できるようにします。 + Permitir al espectador ver los gestos de mapa + Zezwól Obserwatorowi widzieć Gesty na mapie Allow Curator + Разрешить куратору Autoriser les curateurs キュレーターに許可 + Permitir Curador + Zezwól na Zeusa Allows Curator to See Map Gestures + Позволяет куратору видеть жесты на карте Permet aux curateurs de voir le pointage des autres joueurs. キュレーターからマップ ジェスチャーを表示できるようにします。 + Permitir al Curador ver los gestos de mapa + Zezwól Zeusowi widzieć gesty na mapie Briefing Mode + Режим брифинга Visibilité lors du briefing ブリーフィング モード + Modo de briefing + Tryb Odprawy What player can see what + Определяет, какая группа игроков может видеть жесты на карте во время брифинга Définit quels pointages les joueurs peuvent voir lors du briefing. プレイヤーが見ることができる対象を決定します。 + Qué puede ver cada jugador + Co mogą widzieć gracze Disabled + Отключить Pointage désactivé 無効化 + Deshabilitado + Zablokowany Group @@ -349,8 +379,10 @@ Proximity + Все, кто рядом Proximité 付近のみ + Proximidad All diff --git a/addons/maptools/ACE_Settings.hpp b/addons/maptools/ACE_Settings.hpp index c0642ed4e7..ba6633e941 100644 --- a/addons/maptools/ACE_Settings.hpp +++ b/addons/maptools/ACE_Settings.hpp @@ -1,19 +1,8 @@ class ACE_Settings { class GVAR(rotateModifierKey) { - category = CSTRING(Name); - value = 1; - typeName = "SCALAR"; - isClientSettable = 1; - displayName = CSTRING(rotateModifierKey_displayName); - description = CSTRING(rotateModifierKey_description); - values[] = {"$STR_A3_OPTIONS_DISABLED", "ALT", "CTRL", "SHIFT"}; + movedToSQF = 1; }; class GVAR(drawStraightLines) { - category = CSTRING(Name); - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(drawStraightLines_displayName); - description = CSTRING(drawStraightLines_description); + movedToSQF = 1; }; }; diff --git a/addons/maptools/CfgEventHandlers.hpp b/addons/maptools/CfgEventHandlers.hpp index 1f53a9b2ec..db25394390 100644 --- a/addons/maptools/CfgEventHandlers.hpp +++ b/addons/maptools/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_postInitClient)); }; }; diff --git a/addons/maptools/README.md b/addons/maptools/README.md index f03474b5c0..a11f57a1a5 100644 --- a/addons/maptools/README.md +++ b/addons/maptools/README.md @@ -5,11 +5,3 @@ Adds the following map tools: - Roamer - Map drawing - Showing GPS on map - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [esteldunedain](https://github.com/esteldunedain) -- [NouberNou](https://github.com/NouberNou) diff --git a/addons/maptools/RscDisplayMainMap.hpp b/addons/maptools/RscDisplayMainMap.hpp index db54ab6bf8..94a5d2a8d4 100644 --- a/addons/maptools/RscDisplayMainMap.hpp +++ b/addons/maptools/RscDisplayMainMap.hpp @@ -51,7 +51,7 @@ class RscDisplayMainMap { shadow = 0; sizeEx = 0.18; }; - class altitude: RscText{ + class altitude: RscText { idc = 913591; x = 0.5; y = 0; @@ -66,7 +66,7 @@ class RscDisplayMainMap { shadow = 0; sizeEx = 0.18; }; - class coordinates: RscText{ + class coordinates: RscText { idc = 913592; x = 0; y = 0.225; diff --git a/addons/maptools/XEH_preInit.sqf b/addons/maptools/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/maptools/XEH_preInit.sqf +++ b/addons/maptools/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf index a2ec5bfe78..334ecb4d5c 100644 --- a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf +++ b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf @@ -137,7 +137,7 @@ _theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopRight,24,24,getDir player,'1,1 _theMap drawIcon ['iconStaticMG',[1,0,0,1],_posTopLeft,24,24,getDir player,'-1,1',1,0.03,'TahomaB','right']; _theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomLeft,24,24,getDir player,'-1,-1',1,0.03,'TahomaB','right']; _theMap drawIcon ['iconStaticMG',[1,0,0,1],_posBottomRight,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; -if !(GVAR(freeDrawingData) isEqualTo []) then { +if (GVAR(freeDrawingData) isNotEqualTo []) then { _theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 1,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; _theMap drawIcon ['iconStaticMG',[0,0,1,1],GVAR(freeDrawingData) select 2,24,24,getDir player,'1,-1',1,0.03,'TahomaB','right']; }; diff --git a/addons/maptools/initSettings.sqf b/addons/maptools/initSettings.sqf new file mode 100644 index 0000000000..cbb8e9c1b8 --- /dev/null +++ b/addons/maptools/initSettings.sqf @@ -0,0 +1,17 @@ +private _category = format ["ACE %1", localize LSTRING(Name)]; + +[ + QGVAR(rotateModifierKey), "LIST", + [LSTRING(rotateModifierKey_displayName), LSTRING(rotateModifierKey_description)], + _category, + [[0, 1, 2, 3], ["STR_A3_OPTIONS_DISABLED", "ALT", "CTRL", "SHIFT"], 1], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(drawStraightLines), "CHECKBOX", + [LSTRING(drawStraightLines_displayName), LSTRING(drawStraightLines_description)], + _category, + true, + 0 +] call CBA_fnc_addSetting; diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml index 56ee4daa18..4145954df9 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -202,6 +202,7 @@ Tecla para girar Ferramentas de Mapa Klávesa pro otáčení pomůcky k mapě Harita Aracının Yönünü Değiştirme Tuşu + Tecla para rotar herramientas de mapa Modifier key to allow rotating map tools @@ -217,6 +218,7 @@ Tecla de Modificador para permitir girar as ferramentas de mapa Klávesa která umožnuje otáčení pomůcky k mapě Dönen harita araçlarına izin veren değiştirici tuş + Tecla modificadora para permitir rotar herramientas de mapa Draw straight lines with maptools @@ -232,6 +234,7 @@ Desenhar linhas retas com as ferramentas de mapa Kreslit rovné čáry s pomůckou k mapě Maptools ile düz çizgiler çizme + Dibujar línea recta con las herramientas de mapa Draw on the edge of maptools to draw straight lines. Note: Must hover at midpoint to delete. @@ -247,6 +250,7 @@ Desenhe no canto da ferramenta de mapa para desenhar linhas retas. Observação: Sobreponha o meio com o mouse para deletar. Povolit kreslení rovných čar při kreslení na okraji pomůcky k mapě. Poznámka: Pro smazání musíte mít kurzor nad středem čáry. Düz çizgiler çizmek için maptools'un kenarına çizin. Not: Silmek için orta noktada fareyle üzerine gelmeniz gerekir. + Dibujar sobre el borde de las herramientas de mapa para dibujar líneas rectas. Nota: Debe situarse en el punto intermedio para eliminarla. diff --git a/addons/markers/ACE_Settings.hpp b/addons/markers/ACE_Settings.hpp index d8d72a5975..847d3eacde 100644 --- a/addons/markers/ACE_Settings.hpp +++ b/addons/markers/ACE_Settings.hpp @@ -1,7 +1,4 @@ class ACE_Settings { - class GVAR(movableMarkersEnabled) { - movedToSQF = 1; - }; class GVAR(moveRestriction) { movedToSQF = 1; }; diff --git a/addons/markers/CfgEventHandlers.hpp b/addons/markers/CfgEventHandlers.hpp index e1f9294767..818c34b9dd 100644 --- a/addons/markers/CfgEventHandlers.hpp +++ b/addons/markers/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/markers/InsertMarker.hpp b/addons/markers/InsertMarker.hpp index 5d7cc987e2..9dd8005ce0 100644 --- a/addons/markers/InsertMarker.hpp +++ b/addons/markers/InsertMarker.hpp @@ -5,6 +5,7 @@ class RscStructuredText; class RscButtonMenuOK; class RscButtonMenuCancel; class RscButtonMenu; +class RscCheckBox; class RscEdit; class RscCombo; class RscSlider; @@ -16,17 +17,29 @@ class RscDisplayInsertMarker { movingEnable = 1; class controls { + class TimeStampText: RscStructuredText { + idc = IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT; + }; + class TimeStamp: RscCheckBox { + idc = IDC_ACE_INSERT_MARKER_TIMESTAMP; + }; class MarkerShape: RscCombo { - idc = 1210; + idc = IDC_ACE_INSERT_MARKER_SHAPE; }; class MarkerColor: RscCombo { - idc = 1211; + idc = IDC_ACE_INSERT_MARKER_COLOR; }; class MarkerAngle: RscXSliderH { - idc = 1220; + idc = IDC_ACE_INSERT_MARKER_ANGLE; }; class MarkerAngleText: RscText { - idc = 1221; + idc = IDC_ACE_INSERT_MARKER_ANGLE_TEXT; + }; + class MarkerScale: RscXSliderH { + idc = IDC_ACE_INSERT_MARKER_SCALE; + }; + class MarkerScaleText: RscText { + idc = IDC_ACE_INSERT_MARKER_SCALE_TEXT; }; }; }; diff --git a/addons/markers/README.md b/addons/markers/README.md index aa9538f8bb..42fbfa29a1 100644 --- a/addons/markers/README.md +++ b/addons/markers/README.md @@ -2,12 +2,3 @@ ace_markers =========== Completely replaces the default marker system, allowing quicker and more precise placement of markers. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/markers/XEH_PREP.hpp b/addons/markers/XEH_PREP.hpp index bbac954b66..113b48bb82 100644 --- a/addons/markers/XEH_PREP.hpp +++ b/addons/markers/XEH_PREP.hpp @@ -6,6 +6,9 @@ PREP(onLBSelChangedChannel); PREP(onLBSelChangedColor); PREP(onLBSelChangedShape); PREP(onSliderPosChangedAngle); +PREP(onSliderMouseButtonUpAngle); +PREP(onSliderPosChangedScale); +PREP(onSliderMouseButtonUpScale); PREP(placeMarker); PREP(sendMarkersJIP); PREP(setMarkerJIP); @@ -14,3 +17,7 @@ PREP(canMove); PREP(onMouseButtonDown); PREP(onMouseButtonUp); PREP(movePFH); +PREP(canTimestamp); +PREP(onButtonClickConfirm); +PREP(onCheckedChangedTimestamp); +PREP(removeTimestamp); diff --git a/addons/markers/XEH_postInit.sqf b/addons/markers/XEH_postInit.sqf index 7f644691d3..25e8317b75 100644 --- a/addons/markers/XEH_postInit.sqf +++ b/addons/markers/XEH_postInit.sqf @@ -15,6 +15,7 @@ if (isMultiplayer && {!isServer} && {hasInterface}) then { GVAR(mapDisplaysWithDrawEHs) = []; GVAR(currentMarkerPosition) = []; GVAR(currentMarkerAngle) = 0; +GVAR(currentMarkerScale) = 1; GVAR(currentMarkerColorConfigName) = ""; GVAR(currentMarkerConfigName) = ""; diff --git a/addons/markers/functions/fnc_canTimestamp.sqf b/addons/markers/functions/fnc_canTimestamp.sqf new file mode 100644 index 0000000000..21e80c0921 --- /dev/null +++ b/addons/markers/functions/fnc_canTimestamp.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: Freddo + * Checks whether a unit is able to timestamp. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Whether unit is able to timestamp + * + * Example: + * [ACE_Player] call ace_markers_fnc_canTimestamp + * + * Public: No + */ + +params [["_unit", ACE_player]]; + +private _assignedItems = assignedItems _unit; + +private _index = _assignedItems findIf { + ([_x] call EFUNC(common,getItemType)) isEqualTo ["item", "watch"] +}; + +_index != -1 diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 8a7a5f21fb..2aa7a0155e 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -25,37 +25,39 @@ //Can't place markers when can't interact if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith { - _display closeDisplay 2; //emulate "Cancel" button + _display closeDisplay 2; //emulate "Cancel" button }; //BIS Controls: - private _text = _display displayctrl 101; - private _picture = _display displayctrl 102; - private _channel = _display displayctrl 103; - private _buttonOK = _display displayctrl 1; - private _buttonCancel = _display displayctrl 2; + private _text = _display displayctrl IDC_INSERT_MARKER; + private _picture = _display displayctrl IDC_INSERT_MARKER_PICTURE; + private _channel = _display displayctrl IDC_INSERT_MARKER_CHANNELS; + private _buttonOK = _display displayctrl IDC_OK; + private _buttonCancel = _display displayctrl IDC_CANCEL; private _description = _display displayctrl 1100; private _title = _display displayctrl 1001; private _descriptionChannel = _display displayctrl 1101; //ACE Controls: - // _sizeX = _display displayctrl 1200; - // _sizeY = _display displayctrl 1201; - private _aceShapeLB = _display displayctrl 1210; - private _aceColorLB = _display displayctrl 1211; - private _aceAngleSlider = _display displayctrl 1220; - private _aceAngleSliderText = _display displayctrl 1221; + private _ctrlTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; + private _ctrlTimestampText = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT; + private _aceShapeLB = _display displayctrl IDC_ACE_INSERT_MARKER_SHAPE; + private _aceColorLB = _display displayctrl IDC_ACE_INSERT_MARKER_COLOR; + private _aceAngleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE; + private _aceAngleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT; + private _aceScaleSlider = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE; + private _aceScaleSliderText = _display displayctrl IDC_ACE_INSERT_MARKER_SCALE_TEXT; private _mapDisplay = displayParent _display; if (isNull _mapDisplay) exitWith {ERROR("No Map");}; - private _mapCtrl = _mapDisplay displayCtrl 51; + private _mapCtrl = _mapDisplay displayCtrl IDC_MAP; GVAR(editingMarker) = ""; (ctrlMapMouseOver _mapCtrl) params ["_mouseOverType", "_marker"]; //check if entity under mouse is a user marker if (_mouseOverType isEqualTo "marker") then { - if (!((_marker find "_USER_DEFINED") isEqualTo -1) && ((markerShape _marker) isEqualTo "ICON")) then { + if (((_marker find "_USER_DEFINED") isNotEqualTo -1) && ((markerShape _marker) isEqualTo "ICON")) then { GVAR(editingMarker) = _marker; //hide marker which is being edited because if the user cancels editing, it will still exist unchanged GVAR(editingMarker) setMarkerAlphaLocal 0; @@ -71,12 +73,15 @@ //////////////////// // Calculate center position of the marker placement ctrl - if !(GVAR(editingMarker) isEqualTo "") then { + if (GVAR(editingMarker) isNotEqualTo "") then { //prevent changing the original marker position GVAR(currentMarkerPosition) = markerPos GVAR(editingMarker); } else { private _pos = ctrlPosition _picture; - _pos = [(_pos select 0) + (_pos select 2) / 2, (_pos select 1) + (_pos select 3) / 2]; + _pos = [ + (_pos select 0) + (_pos select 2) / 2, + (_pos select 1) + (_pos select 3) / 2 + ]; GVAR(currentMarkerPosition) = _mapCtrl ctrlMapScreenToWorld _pos; }; @@ -86,9 +91,11 @@ // prevent vanilla key input _display displayAddEventHandler ["KeyDown", {(_this select 1) in [200, 208]}]; - if !((markerText GVAR(editingMarker)) isEqualTo "") then { - //fill text input with text from marker which is being edited - _text ctrlSetText (markerText GVAR(editingMarker)); + private _markerText = markerText GVAR(editingMarker); + if (_markerText != "") then { + // fill text input with text from marker which is being edited + _markerText = _markerText call FUNC(removeTimestamp); + _text ctrlSetText _markerText; }; //Focus on the text input @@ -98,7 +105,8 @@ private _pos = ctrlposition _text; _pos params ["_posX", "_posY", "_posW", "_posH"]; _posX = _posX + 0.01; - _posY = _posY min ((safeZoneH + safeZoneY) - (8 * _posH + 8 * BORDER)); //prevent buttons being placed below bottom edge of screen + _posY = _posY min ((safeZoneH + safeZoneY) - (11 * _posH + 11 * BORDER)); //prevent buttons being placed below bottom edge of screen + _pos set [0, _posX]; _pos set [1, _posY]; _text ctrlSetPosition _pos; @@ -112,47 +120,98 @@ //--- Description _pos set [1, _posY - 1 * _posH]; - _pos set [3,6 * _posH + 6 * BORDER]; + if (GVAR(timestampEnabled)) then { + _pos set [3,9 * _posH + 9 * BORDER]; + } else { + _pos set [3,10 * _posH + 10 * BORDER]; + }; _description ctrlEnable false; _description ctrlSetPosition _pos; _description ctrlSetStructuredText parseText format ["%1", localize "str_lib_label_description"]; _description ctrlCommit 0; + //--- Timestamp + private _timestampOffset = 0; + if (GVAR(timestampEnabled)) then { + _timestampOffset = _posH + BORDER; + + private _left = _posX; + private _top = _posY + 1 * _posH + 2 * BORDER; + private _width = _posH * safeZoneH / safeZoneW; + private _height = _posH; + + _ctrlTimestamp ctrlSetPosition [_left, _top, _width, _height]; + _ctrlTimestamp ctrlCommit 0; + + _ctrlTimestampText ctrlSetStructuredText parseText format ["%1", LLSTRING(Timestamp)]; + + _left = _left + _width; + _width = _posW - _width; + _top = _top + 0.1 * _height; + _ctrlTimestampText ctrlSetPosition [_left, _top, _width, _height]; + _ctrlTimestampText ctrlCommit 0; + + if !([ACE_player] call FUNC(canTimestamp)) then { + _ctrlTimestamp ctrlEnable false; + _ctrlTimestamp ctrlSetTooltip LLSTRING(TimestampTooltipNoWatch); + } else { + _ctrlTimestamp cbSetChecked (uiNamespace getVariable [QGVAR(timestampChecked), false]); + }; + } else { + _ctrlTimestampText ctrlEnable false; + _ctrlTimestampText ctrlShow false; + _ctrlTimestamp ctrlEnable false; + _ctrlTimestamp ctrlShow false; + }; + //--- Shape - _pos set [1, _posY + 1 * _posH + 2 * BORDER]; + _pos set [0, _posX]; + _pos set [1, _posY + 1 * _posH + 2 * BORDER + _timestampOffset]; _pos set [2, _posW]; _pos set [3, _posH]; _aceShapeLB ctrlSetPosition _pos; _aceShapeLB ctrlCommit 0; //--- Color - _pos set [1, _posY + 2 * _posH + 3 * BORDER]; + _pos set [1, _posY + 2 * _posH + 3 * BORDER + _timestampOffset]; _pos set [2, _posW]; _aceColorLB ctrlSetPosition _pos; _aceColorLB ctrlCommit 0; //--- Angle - _pos set [1, _posY + 3 * _posH + 4 * BORDER]; + _pos set [1, _posY + 3 * _posH + 4 * BORDER + _timestampOffset]; _pos set [2, _posW]; _aceAngleSlider ctrlSetPosition _pos; _aceAngleSlider ctrlCommit 0; //--- Angle Text - _pos set [1, _posY + 4 * _posH + 5 * BORDER]; + _pos set [1, _posY + 4 * _posH + 5 * BORDER + _timestampOffset]; _pos set [2, _posW]; _aceAngleSliderText ctrlSetPosition _pos; _aceAngleSliderText ctrlCommit 0; + //--- Scale + _pos set [1, _posY + 5 * _posH + 6 * BORDER + _timestampOffset]; + _pos set [2, _posW]; + _aceScaleSlider ctrlSetPosition _pos; + _aceScaleSlider ctrlCommit 0; + + //--- Scale Text + _pos set [1, _posY + 6 * _posH + 7 * BORDER + _timestampOffset]; + _pos set [2, _posW]; + _aceScaleSliderText ctrlSetPosition _pos; + _aceScaleSliderText ctrlCommit 0; + private _offsetButtons = 0; if (isMultiplayer) then { - _pos set [1,_posY + 5 * _posH + 7 * BORDER]; + _pos set [1,_posY + 7 * _posH + 9 * BORDER + _timestampOffset]; _pos set [3,_posH]; _descriptionChannel ctrlSetStructuredText parseText format ["%1:", localize "str_a3_cfgvehicles_modulerespawnposition_f_arguments_marker_0"]; _descriptionChannel ctrlSetPosition _pos; _descriptionChannel ctrlCommit 0; - _pos set [1,_posY + 6 * _posH + 7 * BORDER]; + _pos set [1,_posY + 8 * _posH + 9 * BORDER + _timestampOffset]; _pos set [3,_posH]; _channel ctrlSetPosition _pos; _channel ctrlCommit 0; @@ -172,7 +231,7 @@ }; }; - private _selectChannel = if !(GVAR(editingMarker) isEqualTo "") then { + private _selectChannel = if (GVAR(editingMarker) isNotEqualTo "") then { //get the channel where the marker was placed in parseNumber ((GVAR(editingMarker) splitString "/") param [2, "3"]) } else { @@ -191,15 +250,15 @@ _channel ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedChannel)}]; - _offsetButtons = 7 * _posH + 8 * BORDER; + _offsetButtons = 9 * _posH + 10 * BORDER; } else { _descriptionChannel ctrlShow false; _channel ctrlShow false; - _offsetButtons = 5 * _posH + 7 * BORDER; + _offsetButtons = 7 * _posH + 9 * BORDER; }; //--- ButtonOK - _pos set [1, _posY + _offsetButtons]; + _pos set [1, _posY + _offsetButtons + _timestampOffset]; _pos set [2, _posW / 2 - BORDER]; _pos set [3, _posH]; _buttonOk ctrlSetPosition _pos; @@ -207,12 +266,17 @@ //--- ButtonCancel _pos set [0, _posX + _posW / 2]; - _pos set [1, _posY + _offsetButtons]; + _pos set [1, _posY + _offsetButtons + _timestampOffset]; _pos set [2, _posW / 2]; _pos set [3, _posH]; _buttonCancel ctrlSetPosition _pos; _buttonCancel ctrlCommit 0; + //////////////////// + // init marker timestamp cb + _buttonOK ctrlAddEventHandler ["ButtonClick", FUNC(onButtonClickConfirm)]; + _ctrlTimestamp ctrlAddEventHandler ["CheckedChanged", FUNC(onCheckedChangedTimestamp)]; + //////////////////// // init marker shape lb lbClear _aceShapeLB; @@ -261,15 +325,35 @@ // init marker angle slider _aceAngleSlider sliderSetRange [-180, 180]; - if !(GVAR(editingMarker) isEqualTo "") then { + if (GVAR(editingMarker) isNotEqualTo "") then { //get the original direction GVAR(currentMarkerAngle) = markerDir GVAR(editingMarker); }; private _curSelAngle = GETGVAR(currentMarkerAngle,0); _aceAngleSlider sliderSetPosition _curSelAngle; + _aceAngleSlider ctrlSetTooltip LLSTRING(MarkerDirectionScaleSlider_Tooltip); //Update now and add eventHandler: [_aceAngleSlider, _curSelAngle] call FUNC(onSliderPosChangedAngle); _aceAngleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}]; + _aceAngleSlider ctrlAddEventHandler ["MouseButtonUp", {_this call FUNC(onSliderMouseButtonUpAngle)}]; + + //////////////////// + // init marker scale slider + _aceScaleSlider sliderSetRange [0.5, 2.0]; + + if !(GVAR(editingMarker) isEqualTo "") then { + //get the original scale + GVAR(currentMarkerScale) = (markerSize GVAR(editingMarker)) param [0, 1]; + }; + + private _curSelScale = GETGVAR(currentMarkerScale,1); + _aceScaleSlider sliderSetPosition _curSelScale; + _aceScaleSlider ctrlSetTooltip LLSTRING(MarkerDirectionScaleSlider_Tooltip); + + //Update now and add eventHandler: + [_aceScaleSlider, _curSelScale] call FUNC(onSliderPosChangedScale); + _aceScaleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedScale)}]; + _aceScaleSlider ctrlAddEventHandler ["MouseButtonUp", {_this call FUNC(onSliderMouseButtonUpScale)}]; }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/markers/functions/fnc_mapDrawEH.sqf b/addons/markers/functions/fnc_mapDrawEH.sqf index 5f3c6aed15..02540b699f 100644 --- a/addons/markers/functions/fnc_mapDrawEH.sqf +++ b/addons/markers/functions/fnc_mapDrawEH.sqf @@ -1,7 +1,7 @@ #include "script_component.hpp" /* * Author: PabstMirror - * Draws the current temp marker. Allows rotation. + * Draws the current temp marker. Allows rotation and scale. * * Arguments: * 0: TheMap @@ -25,8 +25,8 @@ if (GVAR(currentMarkerConfigName) == "" || {GVAR(currentMarkerColorConfigName) = ERROR("Bad Data"); }; -private _sizeX = 1; -private _sizeY = 1; +private _sizeX = GVAR(currentMarkerScale); +private _sizeY = GVAR(currentMarkerScale); private _textureConfig = configFile >> "CfgMarkers" >> GVAR(currentMarkerConfigName); private _texture = getText (_textureConfig >> "icon"); diff --git a/addons/markers/functions/fnc_onButtonClickConfirm.sqf b/addons/markers/functions/fnc_onButtonClickConfirm.sqf new file mode 100644 index 0000000000..12c6f37d06 --- /dev/null +++ b/addons/markers/functions/fnc_onButtonClickConfirm.sqf @@ -0,0 +1,53 @@ +#include "script_component.hpp" +/* + * Author: Freddo + * When the confirm button is pressed. + * + * Arguments: + * 0: Confirm button + * + * Return Value: + * None + * + * Example: + * [_buttonOk] call ACE_markers_fnc_onButtonClickConfirm + * + * Public: No + */ +params ["_buttonOk"]; + +private _display = ctrlParent _buttonOk; +private _description = _display displayctrl IDC_INSERT_MARKER; +private _aceTimestamp = _display displayCtrl IDC_ACE_INSERT_MARKER_TIMESTAMP; + +// handle timestamp +if (cbChecked _aceTimestamp && {ACE_player call FUNC(canTimestamp)}) then { + private _time = daytime; + + // add timestamp suffix + private _periodPostfix = ""; + if (GVAR(timestampHourFormat) == 12) then { + if (floor _time == 0) exitWith { + _time = _time + 12; + _periodPostfix = " am"; + }; + + if (floor _time == 12) exitWith { + _periodPostfix = " pm"; + }; + + if (_time < 12) then { + _periodPostfix = " am"; + } else { + _time = _time - 12; + _periodPostfix = " pm"; + }; + }; + + _description ctrlSetText format [ + "%1 [%2%3]", + ctrlText _description, + [_time, GVAR(timestampFormat)] call BIS_fnc_timeToString, + _periodPostfix + ]; +}; diff --git a/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf b/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf new file mode 100644 index 0000000000..5980e875cd --- /dev/null +++ b/addons/markers/functions/fnc_onCheckedChangedTimestamp.sqf @@ -0,0 +1,20 @@ +#include "script_component.hpp" +/* + * Author: Freddo, commy2 + * When the timestamp checkbox is toggled. + * + * Arguments: + * 0: Checkbox + * 1: Value + * + * Return Value: + * None + * + * Example: + * [controlNull, 1] call ACE_markers_fnc_onCheckedChangedTimestamp; + * + * Public: No + */ +params ["", "_checked"]; + +uiNamespace setVariable [QGVAR(timestampChecked), _checked == 1] diff --git a/addons/markers/functions/fnc_onLBSelChangedColor.sqf b/addons/markers/functions/fnc_onLBSelChangedColor.sqf index a141f7e72d..ceb3cfe0b5 100644 --- a/addons/markers/functions/fnc_onLBSelChangedColor.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedColor.sqf @@ -29,10 +29,10 @@ GVAR(currentMarkerColorConfigName) = configName _config; //Set map display to same color: private _bisColorLB = switch (false) do { - case (isNull findDisplay 12): {(findDisplay 12) displayCtrl 1090}; - case (isNull findDisplay 52): {(findDisplay 52) displayCtrl 1090}; - case (isNull findDisplay 53): {(findDisplay 53) displayCtrl 1090}; - case (isNull findDisplay 37): {(findDisplay 37) displayCtrl 1090}; + case (isNull findDisplay 12): {(findDisplay 12) displayCtrl IDC_DIARY_MARKER_COLOR}; + case (isNull findDisplay 52): {(findDisplay 52) displayCtrl IDC_DIARY_MARKER_COLOR}; + case (isNull findDisplay 53): {(findDisplay 53) displayCtrl IDC_DIARY_MARKER_COLOR}; + case (isNull findDisplay 37): {(findDisplay 37) displayCtrl IDC_DIARY_MARKER_COLOR}; default {controlNull}; }; if (_ctrl != _bisColorLB) then { //Don't set what we got a EH from diff --git a/addons/markers/functions/fnc_onLBSelChangedShape.sqf b/addons/markers/functions/fnc_onLBSelChangedShape.sqf index 52a85e5c8d..5dfbbabd01 100644 --- a/addons/markers/functions/fnc_onLBSelChangedShape.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedShape.sqf @@ -29,10 +29,10 @@ GVAR(currentMarkerConfigName) = configName _config; //Set map display to same shape: private _bisShapeLB = switch (false) do { - case (isNull findDisplay 12): {(findDisplay 12) displayCtrl 1091}; - case (isNull findDisplay 52): {(findDisplay 52) displayCtrl 1091}; - case (isNull findDisplay 53): {(findDisplay 53) displayCtrl 1091}; - case (isNull findDisplay 37): {(findDisplay 37) displayCtrl 1091}; + case (isNull findDisplay 12): {(findDisplay 12) displayCtrl IDC_DIARY_MARKER_ICON}; + case (isNull findDisplay 52): {(findDisplay 52) displayCtrl IDC_DIARY_MARKER_ICON}; + case (isNull findDisplay 53): {(findDisplay 53) displayCtrl IDC_DIARY_MARKER_ICON}; + case (isNull findDisplay 37): {(findDisplay 37) displayCtrl IDC_DIARY_MARKER_ICON}; default {controlNull}; }; if (_ctrl != _bisShapeLB) then { //Don't set what we got a EH from diff --git a/addons/markers/functions/fnc_onMouseButtonDown.sqf b/addons/markers/functions/fnc_onMouseButtonDown.sqf index ce6f99ee00..df56154ad6 100644 --- a/addons/markers/functions/fnc_onMouseButtonDown.sqf +++ b/addons/markers/functions/fnc_onMouseButtonDown.sqf @@ -23,7 +23,7 @@ params ["_ctrlMap", "_button", "_x", "_y", "_shift", "_ctrl", "_alt"]; -if (_button != 0 || {!([_shift, _ctrl, _alt] isEqualTo [false, false, true])}) exitWith {}; +if (_button != 0 || {[_shift, _ctrl, _alt] isNotEqualTo [false, false, true]}) exitWith {}; ctrlMapMouseOver _ctrlMap params [["_type", ""], "_marker"]; diff --git a/addons/markers/functions/fnc_onSliderMouseButtonUpAngle.sqf b/addons/markers/functions/fnc_onSliderMouseButtonUpAngle.sqf new file mode 100644 index 0000000000..b6c29cfd1a --- /dev/null +++ b/addons/markers/functions/fnc_onSliderMouseButtonUpAngle.sqf @@ -0,0 +1,25 @@ +#include "script_component.hpp" +/* + * Author: 10Dozen + * Angle slider clicked handler. Resets slider pos to 0 on RMB button up. + * + * Arguments: + * 0: Slider (idc 1210) is expected + * 1: Button released (0 - Left mouse btn, 1 - Right mouse btn) + * + * Return Value: + * None + * + * Example: + * [Slider, 1] call ace_markers_fnc_onSliderMouseButtonUpAngle + * + * Public: No + */ + +params ["_aceAngleSlider", "_button"]; +TRACE_2("params",_aceAngleSlider,_button); + +if (_button isNotEqualTo 1) exitWith {}; + +_aceAngleSlider sliderSetPosition 0; +[_aceAngleSlider, 0] call FUNC(onSliderPosChangedAngle); diff --git a/addons/markers/functions/fnc_onSliderMouseButtonUpScale.sqf b/addons/markers/functions/fnc_onSliderMouseButtonUpScale.sqf new file mode 100644 index 0000000000..144f1c4909 --- /dev/null +++ b/addons/markers/functions/fnc_onSliderMouseButtonUpScale.sqf @@ -0,0 +1,25 @@ +#include "script_component.hpp" +/* + * Author: 10Dozen + * Scale slider clicked handler. Resets slider pos to 1 on RMB button up. + * + * Arguments: + * 0: Slider (idc 1420) is expected + * 1: Button released (0 - Left mouse btn, 1 - Right mouse btn) + * + * Return Value: + * None + * + * Example: + * [Slider, 1] call ace_markers_fnc_onSliderMouseButtonUpScale + * + * Public: No + */ + +params ["_aceScaleSlider", "_button"]; +TRACE_2("params",_aceScaleSlider,_button); + +if (_button isNotEqualTo 1) exitWith {}; + +_aceScaleSlider sliderSetPosition 1; +[_aceScaleSlider, 1] call FUNC(onSliderPosChangedScale); diff --git a/addons/markers/functions/fnc_onSliderPosChangedAngle.sqf b/addons/markers/functions/fnc_onSliderPosChangedAngle.sqf index c334d0a8f0..20f63e7115 100644 --- a/addons/markers/functions/fnc_onSliderPosChangedAngle.sqf +++ b/addons/markers/functions/fnc_onSliderPosChangedAngle.sqf @@ -25,6 +25,6 @@ if (_direction < 0) then { _direction = _direction + 360; }; -((ctrlParent _ctrl) displayCtrl 1221) ctrlSetText format [localize LSTRING(MarkerDirection), _direction]; +((ctrlParent _ctrl) displayCtrl IDC_ACE_INSERT_MARKER_ANGLE_TEXT) ctrlSetText format [localize LSTRING(MarkerDirection), _direction]; GVAR(currentMarkerAngle) = _data; diff --git a/addons/markers/functions/fnc_onSliderPosChangedScale.sqf b/addons/markers/functions/fnc_onSliderPosChangedScale.sqf new file mode 100755 index 0000000000..8f386729d0 --- /dev/null +++ b/addons/markers/functions/fnc_onSliderPosChangedScale.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" +/* + * Author: frankplow + * Applies scale from on slider position change. + * + * Arguments: + * 0: Slider (idc 1420) + * 1: Slider Data (scale: 0.5...2.0) + * + * Return Value: + * None + * + * Example: + * [slider, 1.5] call ace_markers_fnc_onSliderPosChangedScale + * + * Public: No + */ + +params ["_ctrl", "_data"]; +TRACE_2("params",_ctrl,_data); + +private _scale = _data * 100; +_scale = round _scale; +_scale = _scale / 100; + +((ctrlParent _ctrl) displayCtrl IDC_ACE_INSERT_MARKER_SCALE_TEXT) ctrlSetText format [localize LSTRING(MarkerScale), _scale]; + +GVAR(currentMarkerScale) = _data; diff --git a/addons/markers/functions/fnc_placeMarker.sqf b/addons/markers/functions/fnc_placeMarker.sqf index a1b136aad5..77942343ad 100644 --- a/addons/markers/functions/fnc_placeMarker.sqf +++ b/addons/markers/functions/fnc_placeMarker.sqf @@ -19,7 +19,7 @@ params ["_display", "_closeNum"]; TRACE_2("params",_display,_closeNum); -private _editingMarker = !(GVAR(editingMarker) isEqualTo ""); +private _editingMarker = (GVAR(editingMarker) isNotEqualTo ""); if (_closeNum isEqualTo 1) then { if (_editingMarker) then { @@ -48,7 +48,7 @@ if (_closeNum isEqualTo 1) then { // provide hook for external scripts [QGVAR(markerPlaced),[_newestMarker, _editingMarker]] call CBA_fnc_localEvent; - + // Add to list of user placed markers, and then filter for deleted GVAR(userPlacedMarkers) pushBack _newestMarker; GVAR(userPlacedMarkers) = GVAR(userPlacedMarkers) select {!((getMarkerPos _x) isEqualTo [0,0,0])}; @@ -58,7 +58,8 @@ if (_closeNum isEqualTo 1) then { GETGVAR(currentMarkerConfigName,""), GETGVAR(currentMarkerColorConfigName,""), GETGVAR(currentMarkerPosition,[]), - GETGVAR(currentMarkerAngle,0) + GETGVAR(currentMarkerAngle,0), + GETGVAR(currentMarkerScale,1) ] ]] call CBA_fnc_globalEvent; diff --git a/addons/markers/functions/fnc_removeTimestamp.sqf b/addons/markers/functions/fnc_removeTimestamp.sqf new file mode 100644 index 0000000000..9f9d6ab438 --- /dev/null +++ b/addons/markers/functions/fnc_removeTimestamp.sqf @@ -0,0 +1,70 @@ +#include "script_component.hpp" +/* + * Author: commy2 + * Removes timestamp from end of a string. + * + * Arguments: + * 0: Marker text string + * + * Return Value: + * Input with timestamp removed + * + * Example: + * "abc [12:00 am]" call ace_markers_fnc_removeTimestamp // "abc" + * "[13:37]" call ace_markers_fnc_removeTimestamp // "" + * "xyz [123]" call ace_markers_fnc_removeTimestamp // "xyz [123]" + * "xyz [12]" call ace_markers_fnc_removeTimestamp // "xyz" + * "xyz [12 pm]" call ace_markers_fnc_removeTimestamp // "xyz" + * + * Public: No + */ +#define DIGITS "0123456789" + +params ["_original"]; + +// @todo, 2.02 reverse command will support STRING types +private _string = toArray _original; +reverse _string; +_string = toString _string; + +if (_string select [0, 1] != "]") exitWith {_original}; + +private _timestampLength = (_string find "[") + 1; +_string = _string select [0, _timestampLength]; + +// @todo +_string = toArray _string; +reverse _string; +_string = toString _string; + +if (_string select [0, 1] != "[") exitWith {_original}; + +private _index = 1; +private _keepCheckingDigits = true; +private _validTimestamp = true; +while {_keepCheckingDigits} do { + if (!(_string select [_index, 1] in DIGITS)) exitWith { _validTimestamp = false; }; + if (!(_string select [_index+1, 1] in DIGITS)) exitWith { _validTimestamp = false; }; + switch (_string select [_index+2, 1]) do { + case (":"): { + _index = _index + 3; + }; + case ("]"): { + _keepCheckingDigits = false; + }; + case (" "): { + _keepCheckingDigits = false; + if (!(_string select [_index+3, 3] in ["am]", "pm]"])) then {_validTimestamp = false; }; + }; + default { + _keepCheckingDigits = false; + _validTimestamp = false; + }; + }; +}; + +if (_validTimestamp) then { + [_original select [0, count _original - _timestampLength], " "] call CBA_fnc_rightTrim // return +} else { + _original // return +} diff --git a/addons/markers/functions/fnc_setMarkerJIP.sqf b/addons/markers/functions/fnc_setMarkerJIP.sqf index 9c9aea9fd7..a4c2e9631e 100644 --- a/addons/markers/functions/fnc_setMarkerJIP.sqf +++ b/addons/markers/functions/fnc_setMarkerJIP.sqf @@ -25,7 +25,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); if (_index != -1) then { private _data = _allMapMarkersProperties select _index; - _data params ["_markerClassname", "_colorClassname", "_pos", "_dir"]; + _data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; private _config = (configfile >> "CfgMarkers") >> _markerClassname; @@ -47,6 +47,7 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); _x setMarkerPosLocal _pos; _x setMarkerDirLocal _dir; + _x setMarkerSizeLocal [_scale, _scale]; }; false } count allMapMarkers; diff --git a/addons/markers/functions/fnc_setMarkerNetwork.sqf b/addons/markers/functions/fnc_setMarkerNetwork.sqf index eb0b547bb0..a8e8453525 100644 --- a/addons/markers/functions/fnc_setMarkerNetwork.sqf +++ b/addons/markers/functions/fnc_setMarkerNetwork.sqf @@ -19,7 +19,7 @@ params ["_marker", "_data"]; TRACE_2("params",_marker,_data); -_data params ["_markerClassname", "_colorClassname", "_pos", "_dir"]; +_data params ["_markerClassname", "_colorClassname", "_pos", "_dir", "_scale"]; private _config = configfile >> "CfgMarkers" >> _markerClassname; @@ -41,6 +41,7 @@ _marker setMarkerColorLocal configName _config; _marker setMarkerPosLocal _pos; _marker setMarkerDirLocal _dir; +_marker setMarkerSizeLocal [_scale, _scale]; // save properties on server machine for JIP, marker editing ready if (isMultiplayer && {isServer}) then { diff --git a/addons/markers/initSettings.sqf b/addons/markers/initSettings.sqf index e4aa16b00f..ce8e8e0473 100644 --- a/addons/markers/initSettings.sqf +++ b/addons/markers/initSettings.sqf @@ -1,7 +1,9 @@ +private _categoryName = format ["ACE %1", localize ELSTRING(map,Module_DisplayName)]; + [ QGVAR(moveRestriction), "LIST", [LSTRING(MoveRestriction), LSTRING(MoveRestriction_Description)], - [format ["ACE %1", localize ELSTRING(map,Module_DisplayName)], localize LSTRING(Module_DisplayName)], + [_categoryName, LLSTRING(Module_DisplayName)], [ [ MOVE_RESTRICTION_NOBODY, @@ -21,4 +23,41 @@ ], 1 ] -] call cba_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(timestampEnabled), "CHECKBOX", + [LSTRING(TimestampEnabled), LSTRING(TimestampEnabledDescription)], + [_categoryName, LLSTRING(Module_DisplayName)], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(timestampHourFormat), "LIST", + [LSTRING(TimestampHourFormat), LSTRING(TimestampHourFormatDescription)], + [_categoryName, LLSTRING(Module_DisplayName)], + [ + [24, 12], + [LSTRING(TimestampHourFormat24), LSTRING(TimestampHourFormat12)], + 0 + ] +] call CBA_fnc_addSetting; + +private _formatDescription = [ + LLSTRING(TimestampFormatDescription0), + LLSTRING(TimestampFormatDescription1), + LLSTRING(TimestampFormatDescription2), + LLSTRING(TimestampFormatDescription3), + LLSTRING(TimestampFormatDescription4) +] joinString endl; + +[ + QGVAR(timestampFormat), "LIST", + [LSTRING(timestampFormat), _formatDescription], + [_categoryName, LLSTRING(Module_DisplayName)], + [ + ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], + ["HH", "HH:MM", "HH:MM:SS", "HH:MM:SS:MM"], + 1 + ] +] call CBA_fnc_addSetting; diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp index 8b268e2d03..8da334153d 100644 --- a/addons/markers/script_component.hpp +++ b/addons/markers/script_component.hpp @@ -15,6 +15,7 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" +#include "\a3\ui_f\hpp\defineResincl.inc" #define CHANNEL_NAMES [ \ localize "str_channel_global", \ @@ -30,3 +31,12 @@ #define MOVE_RESTRICTION_GROUP_LEADERS 2 #define MOVE_RESTRICTION_GROUP_LEADERS_ADMINS 3 #define MOVE_RESTRICTION_OWNER 4 + +#define IDC_ACE_INSERT_MARKER_TIMESTAMP 1210 +#define IDC_ACE_INSERT_MARKER_TIMESTAMP_TEXT 1211 +#define IDC_ACE_INSERT_MARKER_SHAPE 1220 +#define IDC_ACE_INSERT_MARKER_COLOR 1221 +#define IDC_ACE_INSERT_MARKER_ANGLE 1230 +#define IDC_ACE_INSERT_MARKER_ANGLE_TEXT 1231 +#define IDC_ACE_INSERT_MARKER_SCALE 1240 +#define IDC_ACE_INSERT_MARKER_SCALE_TEXT 1241 diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index 2add6e468e..fed0c0c96f 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -1,6 +1,14 @@ + + Scale: %1 + Escala: %1 + Échelle : %1 + Масштаб: %1 + スケール: %1 + Skala: %1 + Direction: %1° Drehung: %1° @@ -18,6 +26,13 @@ 方位: %1° Yön: %1° + + Click RMB to reset + Нажми ПКМ чтобы сбросить + Clic droit pour réinitialiser + 右クリックでリセット + Naciśnij PPM żeby zresetować + Markers Markierungen @@ -32,6 +47,7 @@ Marqueurs Značky Işaretleyiciler + Marcadores Allow moving markers for @@ -46,6 +62,7 @@ Permitir que movam marcadores Permettre le déplacement des marqueurs pour Povolit pohyb se značkami pro + Permitir marcadores en movimiento para Restricts which players are able to move markers while holding the Alt key. @@ -61,6 +78,7 @@ Définit quels joueurs peuvent déplacer des marqueurs en maintenant la touche Alt enfoncée. Omezuje kdo může pohybovat se značkami při podržení klávesy Alt. Alt tuşunu basılı tutarken hangi işaretçilerin hareket edebileceğini sınırlar. + Reestringir qué jugadores son capaces de mover los marcadores manteniendo pulsada la tecla Alt. Nobody @@ -76,6 +94,7 @@ Personne Nikdo Hiçkimse + Ninguno All players @@ -91,6 +110,7 @@ Tous les joueurs Všichni hráči Bütün Oyuncular + Todos los jugadores Admins @@ -106,6 +126,7 @@ Admins Administrátoři Adminler + Admins Group leaders @@ -121,6 +142,7 @@ Chefs de groupe Velitelé jednotek Grup Liderleri + Líderes de grupo Group leaders and Admins @@ -136,6 +158,7 @@ Chefs de groupe et Admins Velitelé jednotek a Administrátoři Grup Liderleri Ve Adminler + Líderes de grupo y administradores Creator @@ -149,6 +172,119 @@ Creatore Tvůrce Yaratıcı + Creador + + + Allow Timestamps + Включить отображение времени на метках + Permettre l'horodatage + タイムスタンプ許可 + Permitir marcas de tiempo + Zezwól na znaczniki czasu + + + Whether to allow timestamps to be automatically applied to markers + Автоматическое отображение времени, когда поставлена метка + Active une interface permettant d'apposer un horodatage sur les marqueurs. + マーカーへ自動的にタイムスタンプを付与するかどうかを設定できます。 + Permitir que las marcas de tiempo sean automáticamente aplicadas a los marcadores + Zezwól na automatyczne stosowanie znaczników czasu do markerów + + + Timestamp + Время постановки метки + Horodatage + タイムスタンプ + Marca de tiempo + Znacznik czasu + + + Watch Required + Необходимы часы + Une montre est requise. + 時計の要求 + Reloj requerido + Wymagany zegarek + + + Timestamp Format + Формат времени + Horodatage - Format + タイムスタンプ形式 + Formato de marca de tiempo + Format znacznika czasu + + + Changes the timestamp format + Изменение формата времени + Modifie le format de l'horodatage. + タイムスタンプの形式を変更します + Cambia el formato de marca de tiempo + Zmienia format znacznika czasu + + + "HH" - Hour + "ЧЧ" - Час + "HH" - Heures + "HH" - 時間 + "HH" - Hora + "HH" - Godziny + + + "MM" - Minute + "ММ" - Минута + "MM" - Minutes + "MM" - 分 + "MM" - Minuto + "MM" - Minuty + + + "SS" - Seconds + "СС" - Секунда + "SS" - Secondes + "SS" - 秒 + "SS" - Segundos + "SS" - Sekundy + + + "MM" - Milliseconds + "МС" - Миллисекунда + "MM" - Millisecondes + "MM" - ミリ秒 + "MM" - Milisegundos + "MM" - Milisekundy + + + Timestamp Hour Format + Часовой формат времени + Horodatage - Système horaire + タイムスタンプ時刻形式 + Formato de hora de marca de tiempo + Format Godzinnych znaczników czasu + + + 24-Hour Clock + 24 часовой формат + Format 24 heures + 24 時間表記 + Reloj 24-Horas + Zegar 24-godzinny + + + 12-Hour Clock + 12 часовой формат + Format 12 heures + 12 時間表記 + Reloj 12-Horas + Zegar 12-godzinny + + + Changes timestamp to use either 24-hour or 12-hour clock format + Изменяет формат времени на маркере на 24 часовой, либо 12 часовой + Permet de choisir le système d'horodatage souhaité, au format 12 ou 24 heures. + タイムスタンプの時刻を 24 時間か 12 時間表記のどちらかに変更できます。 + Cambia que la marca de tiempo sea en formato de reloj 24-horas o 12-horas + Zmienia znacznik czasu tak, aby używał formatu 24-godzinnego lub 12-godzinnego diff --git a/addons/maverick/CfgAmmo.hpp b/addons/maverick/CfgAmmo.hpp index a741501540..654c1fbe80 100644 --- a/addons/maverick/CfgAmmo.hpp +++ b/addons/maverick/CfgAmmo.hpp @@ -1,11 +1,11 @@ class CfgAmmo { class MissileCore; - class MissileBase : MissileCore { + class MissileBase: MissileCore { class Components; }; - class Missile_AGM_02_F : MissileBase {}; + class Missile_AGM_02_F: MissileBase {}; - class GVAR(L) : Missile_AGM_02_F { + class GVAR(L): Missile_AGM_02_F { author = "xrufix"; autoSeekTarget = 0; irLock = 0; diff --git a/addons/maverick/CfgMagazines.hpp b/addons/maverick/CfgMagazines.hpp index 3254f605c0..524b3e0094 100644 --- a/addons/maverick/CfgMagazines.hpp +++ b/addons/maverick/CfgMagazines.hpp @@ -1,19 +1,19 @@ class CfgMagazines { class CA_Magazine; - class VehicleMagazine : CA_Magazine {}; + class VehicleMagazine: CA_Magazine {}; - class magazine_Missile_AGM_02_x1 : VehicleMagazine {}; - class PylonMissile_Missile_AGM_02_x1 : magazine_Missile_AGM_02_x1 {}; - class PylonMissile_Missile_AGM_02_x2 : magazine_Missile_AGM_02_x1 {}; + class magazine_Missile_AGM_02_x1: VehicleMagazine {}; + class PylonMissile_Missile_AGM_02_x1: magazine_Missile_AGM_02_x1 {}; + class PylonMissile_Missile_AGM_02_x2: magazine_Missile_AGM_02_x1 {}; - class 6Rnd_Missile_AGM_02_F : VehicleMagazine {}; - class PylonRack_1Rnd_Missile_AGM_02_F : 6Rnd_Missile_AGM_02_F {}; - class PylonRack_3Rnd_Missile_AGM_02_F : PylonRack_1Rnd_Missile_AGM_02_F{}; + class 6Rnd_Missile_AGM_02_F: VehicleMagazine {}; + class PylonRack_1Rnd_Missile_AGM_02_F: 6Rnd_Missile_AGM_02_F {}; + class PylonRack_3Rnd_Missile_AGM_02_F: PylonRack_1Rnd_Missile_AGM_02_F {}; - class PylonRack_Missile_AGM_02_x1 : magazine_Missile_AGM_02_x1 {}; - class PylonRack_Missile_AGM_02_x2 : magazine_Missile_AGM_02_x1 {}; + class PylonRack_Missile_AGM_02_x1: magazine_Missile_AGM_02_x1 {}; + class PylonRack_Missile_AGM_02_x2: magazine_Missile_AGM_02_x1 {}; - class GVAR(L_magazine_x1) : magazine_Missile_AGM_02_x1 { + class GVAR(L_magazine_x1): magazine_Missile_AGM_02_x1 { ammo = QGVAR(L); author = "xrufix"; descriptionShort = CSTRING(L_MAG_DESCR); @@ -21,7 +21,7 @@ class CfgMagazines { displayNameShort = CSTRING(L_MAG_short); }; - class GVAR(L_pylonmissile_x1) : PylonMissile_Missile_AGM_02_x1 { + class GVAR(L_pylonmissile_x1): PylonMissile_Missile_AGM_02_x1 { ammo = QGVAR(L); author = "xrufix"; descriptionShort = CSTRING(L_MAG_DESCR); @@ -29,7 +29,7 @@ class CfgMagazines { displayNameShort = CSTRING(L_MAG_short); pylonWeapon = QGVAR(L_Launcher); }; - class GVAR(L_pylonmissile_x2) : PylonMissile_Missile_AGM_02_x2 { + class GVAR(L_pylonmissile_x2): PylonMissile_Missile_AGM_02_x2 { ammo = QGVAR(L); author = "xrufix"; descriptionShort = CSTRING(L_MAG_DESCR); @@ -38,7 +38,7 @@ class CfgMagazines { pylonWeapon = QGVAR(L_Launcher); }; - class GVAR(L_pylonRack_1Rnd) : PylonRack_1Rnd_Missile_AGM_02_F { + class GVAR(L_pylonRack_1Rnd): PylonRack_1Rnd_Missile_AGM_02_F { ammo = QGVAR(L); author = "xrufix"; descriptionShort = CSTRING(L_MAG_DESCR); @@ -46,7 +46,7 @@ class CfgMagazines { displayNameShort = CSTRING(L_MAG_short); pylonWeapon = QGVAR(L_Launcher_Plane); }; - class GVAR(L_PylonRack_3Rnd) : PylonRack_3Rnd_Missile_AGM_02_F { + class GVAR(L_PylonRack_3Rnd): PylonRack_3Rnd_Missile_AGM_02_F { ammo = QGVAR(L); author = "xrufix"; descriptionShort = CSTRING(L_MAG_DESCR); @@ -55,7 +55,7 @@ class CfgMagazines { pylonWeapon = QGVAR(L_Launcher_Plane); }; - class GVAR(L_PylonRack_x1) : PylonRack_Missile_AGM_02_x1 { + class GVAR(L_PylonRack_x1): PylonRack_Missile_AGM_02_x1 { ammo = QGVAR(L); author = "xrufix"; descriptionShort = CSTRING(L_MAG_DESCR); @@ -63,7 +63,7 @@ class CfgMagazines { displayNameShort = CSTRING(L_MAG_short); pylonWeapon = QGVAR(L_Launcher); }; - class GVAR(L_PylonRack_x2) : PylonRack_Missile_AGM_02_x2 { + class GVAR(L_PylonRack_x2): PylonRack_Missile_AGM_02_x2 { ammo = QGVAR(L); author = "xrufix"; descriptionShort = CSTRING(L_MAG_DESCR); @@ -74,12 +74,12 @@ class CfgMagazines { // KH-25 class 4Rnd_Missile_AGM_01_F; - class PylonRack_1Rnd_Missile_AGM_01_F : 4Rnd_Missile_AGM_01_F {}; - class magazine_Missile_AGM_KH25_x1 : VehicleMagazine {}; - class PylonMissile_Missile_AGM_KH25_x1 : magazine_Missile_AGM_KH25_x1 {}; - class PylonMissile_Missile_AGM_KH25_INT_x1 : PylonMissile_Missile_AGM_KH25_x1 {}; + class PylonRack_1Rnd_Missile_AGM_01_F: 4Rnd_Missile_AGM_01_F {}; + class magazine_Missile_AGM_KH25_x1: VehicleMagazine {}; + class PylonMissile_Missile_AGM_KH25_x1: magazine_Missile_AGM_KH25_x1 {}; + class PylonMissile_Missile_AGM_KH25_INT_x1: PylonMissile_Missile_AGM_KH25_x1 {}; - class ace_kh25ml_pylonrack_x1 : PylonRack_1Rnd_Missile_AGM_01_F { + class ace_kh25ml_pylonrack_x1: PylonRack_1Rnd_Missile_AGM_01_F { ammo = "ace_kh25ml"; author = "xrufix"; descriptionShort = CSTRING(KH25ML_MAG_DESCR); @@ -87,14 +87,14 @@ class CfgMagazines { displayNameShort = CSTRING(L_MAG_short); pylonWeapon = "ace_kh25ml_launcher"; }; - class ace_kh25ml_magazine_x1 : magazine_Missile_AGM_KH25_x1 { + class ace_kh25ml_magazine_x1: magazine_Missile_AGM_KH25_x1 { ammo = "ace_kh25ml"; author = "xrufix"; descriptionShort = CSTRING(KH25ML_MAG_DESCR); displayName = CSTRING(KH25ML_MAG_x1); displayNameShort = CSTRING(L_MAG_short); }; - class ace_kh25ml_pylonmissile_x1 : PylonMissile_Missile_AGM_KH25_x1 { + class ace_kh25ml_pylonmissile_x1: PylonMissile_Missile_AGM_KH25_x1 { ammo = "ace_kh25ml"; author = "xrufix"; descriptionShort = CSTRING(KH25ML_MAG_DESCR); @@ -102,7 +102,7 @@ class CfgMagazines { displayNameShort = CSTRING(L_MAG_short); pylonWeapon = "ace_kh25ml_launcher"; }; - class ace_kh25ml_pylonmissile_int_x1 : PylonMissile_Missile_AGM_KH25_INT_x1 { + class ace_kh25ml_pylonmissile_int_x1: PylonMissile_Missile_AGM_KH25_INT_x1 { ammo = "ace_kh25ml"; author = "xrufix"; descriptionShort = CSTRING(KH25ML_MAG_DESCR); diff --git a/addons/maverick/CfgWeapons.hpp b/addons/maverick/CfgWeapons.hpp index c3157f34dd..e05c380381 100644 --- a/addons/maverick/CfgWeapons.hpp +++ b/addons/maverick/CfgWeapons.hpp @@ -1,12 +1,12 @@ class CfgWeapons { class LauncherCore; - class RocketPods : LauncherCore {}; - class weapon_AGM_65Launcher : RocketPods{}; + class RocketPods: LauncherCore {}; + class weapon_AGM_65Launcher: RocketPods {}; - class MissileLauncher : LauncherCore {}; - class Missile_AGM_02_Plane_CAS_01_F : MissileLauncher {}; + class MissileLauncher: LauncherCore {}; + class Missile_AGM_02_Plane_CAS_01_F: MissileLauncher {}; - class GVAR(L_Launcher) : weapon_AGM_65Launcher { + class GVAR(L_Launcher): weapon_AGM_65Launcher { author = "xrufix"; displayname = CSTRING(L); magazines[] = { @@ -26,7 +26,7 @@ class CfgWeapons { GVAR(enabled) = 1; }; - class GVAR(L_Launcher_Plane) : Missile_AGM_02_Plane_CAS_01_F { + class GVAR(L_Launcher_Plane): Missile_AGM_02_Plane_CAS_01_F { author = "xrufix"; displayname = CSTRING(L); magazines[] = { @@ -46,8 +46,8 @@ class CfgWeapons { GVAR(enabled) = 1; }; - class weapon_AGM_KH25Launcher : MissileLauncher {}; - class ace_kh25ml_launcher : weapon_AGM_KH25Launcher { + class weapon_AGM_KH25Launcher: MissileLauncher {}; + class ace_kh25ml_launcher: weapon_AGM_KH25Launcher { author = "xrufix"; displayName = CSTRING(KH25ML); magazines[] = { diff --git a/addons/maverick/README.md b/addons/maverick/README.md index a931a2bc08..313ced8388 100644 --- a/addons/maverick/README.md +++ b/addons/maverick/README.md @@ -10,8 +10,3 @@ Adds pylon magazines with laser guided AGM-65 Maverick L and KH25ML. ![Laser guided Maverick](https://upload.wikimedia.org/wikipedia/commons/thumb/c/c3/US_Navy_041128-N-5345W-016_Aviation_Ordnanceman_3rd_Class_William_Miller_arms_a_AGM-65_Maverick_laser-guided_missile.jpg/1280px-US_Navy_041128-N-5345W-016_Aviation_Ordnanceman_3rd_Class_William_Miller_arms_a_AGM-65_Maverick_laser-guided_missile.jpg) -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [xrufix](https://github.com/xrufix) diff --git a/addons/maverick/stringtable.xml b/addons/maverick/stringtable.xml index 45d50ef5a8..0a94999c7a 100644 --- a/addons/maverick/stringtable.xml +++ b/addons/maverick/stringtable.xml @@ -16,6 +16,7 @@ AGM-65L Maverick, Missile Air-Sol à Guidage Laser AGM-65 Maverick L, Laserem naváděná střela vzduch-země AGM-65 Maverick L, Laser Guided Anti-Ground-Missile + AGM-65 Maverick L, Misil Aire-Tierra guiado por Láser AGM-65 Maverick L [ACE] @@ -31,6 +32,7 @@ 1x AGM-65L Maverick [ACE] AGM-65 Maverick L [ACE] AGM-65 Maverick L [ACE] + AGM-65 Maverick L [ACE] 2x AGM-65 Maverick L [ACE] @@ -46,6 +48,7 @@ 2x AGM-65L Maverick [ACE] 2x AGM-65 Maverick L [ACE] 2x AGM-65 Maverick L [ACE] + 2x AGM-65 Maverick L [ACE] 3x AGM-65 Maverick L [ACE] @@ -61,21 +64,15 @@ 3x AGM-65L Maverick [ACE] 3x AGM-65 Maverick L [ACE] 3x AGM-65 Maverick L [ACE] + 3x AGM-65 Maverick L [ACE] - Laser Guided - Lasergelenkt - Guida Laser - レーザー誘導 - 雷射導引 - 雷射导引 - 레이저 유도 - Kierowany laserowo - С лазерным наведением - Guiado a laser - Guidage Laser - Laserem naváděná - Lazer Güdümlü + MAVL + MAVL + MAVL + MAVL + MAVL + MAVL Kh-25ML, Laser Guided Air-to-Ground-Missile @@ -91,6 +88,7 @@ Kh-25ML, Missile Air-Sol à Guidage Laser Kh-25ML, Laserem naváděná střela vzduch-země Kh-25ML, Laser Guided Air-to-Ground-Missile + Kh-25ML, Misil Aire-Tierra guiado por Láser 1x Kh-25ML [ACE] @@ -106,6 +104,7 @@ 1x Kh-25ML [ACE] 1x Kh-25ML [ACE] 1x Kh-25ML [ACE] + 1x Kh-25ML [ACE] @@ -123,6 +122,7 @@ AGM-65L Maverick AGM-65 Maverick L AGM-65 Maverick L + AGM-65 Maverick L Kh-25ML @@ -138,6 +138,7 @@ Kh-25ML Kh-25ML Kh-25ML + Kh-25ML diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index eb84ee7f10..a1322f48e5 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -9,15 +9,9 @@ class ACE_Settings { values[] = {"Players only", "Players and AI"}; }; */ - /* @todo class GVAR(enableVehicleCrashes) { - category = CSTRING(Category_Medical); - displayName = CSTRING(MedicalSettings_enableVehicleCrashes_DisplayName); - description = CSTRING(MedicalSettings_enableVehicleCrashes_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; - */ class GVAR(spontaneousWakeUpChance) { movedToSQF = 1; }; diff --git a/addons/medical/CfgEventHandlers.hpp b/addons/medical/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/medical/CfgEventHandlers.hpp +++ b/addons/medical/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp index 8cdc7feecf..dcbb9b016a 100644 --- a/addons/medical/XEH_PREP.hpp +++ b/addons/medical/XEH_PREP.hpp @@ -1,3 +1,5 @@ PREP(addDamageToUnit); PREP(adjustPainLevel); +PREP(deserializeState); +PREP(serializeState); PREP(setUnconscious); diff --git a/addons/medical/dev/reportSettings.sqf b/addons/medical/dev/reportSettings.sqf index 97350121a3..eb489fab6a 100644 --- a/addons/medical/dev/reportSettings.sqf +++ b/addons/medical/dev/reportSettings.sqf @@ -7,7 +7,7 @@ { private _currentValue = missionNamespace getVariable [_x, "$"]; private _defaultValue = (cba_settings_default getVariable [_x, []]) param [0, "#"]; - if !(_currentValue isEqualTo _defaultValue) then { + if (_currentValue isNotEqualTo _defaultValue) then { diag_log text format ["%1: [Current %2] [Default: %3]", _x, _currentValue, _defaultValue]; }; } forEach _medicalSettings; diff --git a/addons/medical/functions/fnc_deserializeState.sqf b/addons/medical/functions/fnc_deserializeState.sqf new file mode 100644 index 0000000000..938c18e8fa --- /dev/null +++ b/addons/medical/functions/fnc_deserializeState.sqf @@ -0,0 +1,100 @@ +#include "script_component.hpp" +/* + * Author: BaerMitUmlaut + * Deserializes the medical state of a unit and applies it. + * + * Arguments: + * 0: Unit + * 1: State as JSON + * + * Return Value: + * None + * + * Example: + * [player, _json] call ace_medical_fnc_deserializeState + * + * Public: Yes + */ +params [["_unit", objNull, [objNull]], ["_json", "{}", [""]]]; + +if (isNull _unit) exitWith {}; +if (!local _unit) exitWith { ERROR_1("unit [%1] is not local",_unit) }; + +// If unit is not initialized yet, wait until event is raised +if !(_unit getVariable [QGVAR(initialized), false]) exitWith { + [QEGVAR(medical_status,initialized), { + params ["_unit"]; + _thisArgs params ["_target"]; + + if (_unit == _target) then { + _thisArgs call FUNC(deserializeState); + [_thisType, _thisId] call CBA_fnc_removeEventHandler; + }; + }, _this] call CBA_fnc_addEventHandlerArgs; +}; + +private _state = [_json] call CBA_fnc_parseJSON; + +// Set medical variables +{ + _x params ["_var", "_default"]; + private _value = _state getVariable _x; + + // Treat null as nil + if (_value isEqualTo objNull) then { + _value = _default; + }; + + _unit setVariable [_var, _value, true]; +} forEach [ + [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME], + [VAR_HEART_RATE, DEFAULT_HEART_RATE], + [VAR_BLOOD_PRESS, [80, 120]], + [VAR_PERIPH_RES, DEFAULT_PERIPH_RES], + // State transition should handle this + // [VAR_CRDC_ARRST, false], + [VAR_HEMORRHAGE, 0], + [VAR_PAIN, 0], + [VAR_IN_PAIN, false], + [VAR_PAIN_SUPP, 0], + [VAR_OPEN_WOUNDS, []], + [VAR_BANDAGED_WOUNDS, []], + [VAR_STITCHED_WOUNDS, []], + [VAR_FRACTURES, DEFAULT_FRACTURE_VALUES], + // State transition should handle this + // [VAR_UNCON, false], + [VAR_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES], + [QEGVAR(medical,occludedMedications), nil], + [QEGVAR(medical,ivBags), nil], + [QEGVAR(medical,triageLevel), 0], + [QEGVAR(medical,triageCard), []], + [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]] + // Offset needs to be converted + // [VAR_MEDICATIONS, []] +]; + +// Reset timers +_unit setVariable [QEGVAR(medical,lastWakeUpCheck), nil]; + +// Convert medications offset to time +private _medications = _state getVariable [VAR_MEDICATIONS, []]; +{ + _x set [1, _x#1 + CBA_missionTime]; +} forEach _medications; +_unit setVariable [VAR_MEDICATIONS, _medications, true]; + +// Update effects +[_unit] call EFUNC(medical_engine,updateDamageEffects); +[_unit] call EFUNC(medical_status,updateWoundBloodLoss); + +// Transition within statemachine +private _currentState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; +private _targetState = _state getVariable [QGVAR(statemachineState), "Default"]; +[_unit, GVAR(STATE_MACHINE), _currentState, _targetState] call CBA_statemachine_fnc_manualTransition; + +// Manually call wake up tranisition if necessary +if (_currentState in ["Unconscious", "CardiacArrest"] && {_targetState in ["Default", "Injured"]}) then { + [_unit, false] call EFUNC(medical_status,setUnconsciousState); +}; + +_state call CBA_fnc_deleteNamespace; diff --git a/addons/medical/functions/fnc_serializeState.sqf b/addons/medical/functions/fnc_serializeState.sqf new file mode 100644 index 0000000000..f48a714f9e --- /dev/null +++ b/addons/medical/functions/fnc_serializeState.sqf @@ -0,0 +1,66 @@ +#include "script_component.hpp" +/* + * Author: BaerMitUmlaut + * Serializes the medical state of a unit into a string. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Serialized state as JSON string + * + * Example: + * [player] call ace_medical_fnc_serializeState + * + * Public: Yes + */ +params [["_unit", objNull, [objNull]]]; + +private _state = [] call CBA_fnc_createNamespace; + +// For variables, see: EFUNC(medical_status,initUnit) +{ + _x params ["_var"]; + _state setVariable [_var, _unit getVariable _x]; +} forEach [ + [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME], + [VAR_HEART_RATE, DEFAULT_HEART_RATE], + [VAR_BLOOD_PRESS, [80, 120]], + [VAR_PERIPH_RES, DEFAULT_PERIPH_RES], + // State transition should handle this + // [VAR_CRDC_ARRST, false], + [VAR_HEMORRHAGE, 0], + [VAR_PAIN, 0], + [VAR_IN_PAIN, false], + [VAR_PAIN_SUPP, 0], + [VAR_OPEN_WOUNDS, []], + [VAR_BANDAGED_WOUNDS, []], + [VAR_STITCHED_WOUNDS, []], + [VAR_FRACTURES, DEFAULT_FRACTURE_VALUES], + // State transition should handle this + // [VAR_UNCON, false], + [VAR_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES], + [QEGVAR(medical,occludedMedications), nil], + [QEGVAR(medical,ivBags), nil], + [QEGVAR(medical,triageLevel), 0], + [QEGVAR(medical,triageCard), []], + [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]] + // Time needs to be converted + // [VAR_MEDICATIONS, []] +]; + +// Convert medications time to offset +private _medications = _unit getVariable [VAR_MEDICATIONS, []]; +{ + _x set [1, _x#1 - CBA_missionTime]; +} forEach _medications; +_state setVariable [VAR_MEDICATIONS, _medications]; + +// Medical statemachine state +private _currentState = [_unit, GVAR(STATE_MACHINE)] call CBA_statemachine_fnc_getCurrentState; +_state setVariable [QGVAR(statemachineState), _currentState]; + +// Serialize & return +private _json = [_state] call CBA_fnc_encodeJSON; +_state call CBA_fnc_deleteNamespace; +_json diff --git a/addons/medical/initSettings.sqf b/addons/medical/initSettings.sqf index 065314fcf9..3c54f47cee 100644 --- a/addons/medical/initSettings.sqf +++ b/addons/medical/initSettings.sqf @@ -7,7 +7,7 @@ true, {}, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fractures), @@ -18,7 +18,7 @@ true, {}, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fractureChance), @@ -27,7 +27,7 @@ LSTRING(Category), [0, 1, 0.8, 2, true], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(spontaneousWakeUpChance), @@ -36,7 +36,7 @@ LSTRING(Category), [0, 1, 0.05, 2, true], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(spontaneousWakeUpEpinephrineBoost), @@ -45,4 +45,4 @@ LSTRING(Category), [1, 30, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 667050ae9b..6c61ce2ee4 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -59,6 +59,7 @@ Zvýšení pravděpodobnosti probuzení s Epinefrinem Увеличение шанса очнуться от адреналина Epinefrin Uyanma Şansı Artışı + Aumento de probabilidad de despertarse por epinefrina Increases how often spontaneous wake up checks happen when patient has Epinephrine in their system. @@ -200,6 +201,9 @@ Les attelles guérissent les fractures, mais empêchent de courir 添え木で治癒可能、駆け足できないように Ateller İyileştirir, Ama Koşu Yapamaz + Las férulas sanan, pero no pueden trotar + Шины вылечивают, но не дают бежать трусцой + Szyny leczą, ale uniemożliwiają trucht Fracture Chance @@ -210,6 +214,7 @@ Шанс перелома Szansa na złamanie Kırılma Şansı + Probabilidad de fractura The probability of a fracture causing wound resulting in a fracture. @@ -220,6 +225,7 @@ Вероятность перелома при получении соответствующих ран. Prawdopodobieństwo złamania kości w wyniku rany mogącej powodować złamania. Yaraya neden olan bir kırığın kırılma olasılığı. + La probabilidad de que una herida que pueda provocar una fractura, provoque una fractura. Enabled for diff --git a/addons/medical_ai/CfgEventHandlers.hpp b/addons/medical_ai/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/medical_ai/CfgEventHandlers.hpp +++ b/addons/medical_ai/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/medical_ai/README.md b/addons/medical_ai/README.md index db0073b208..689c18a031 100644 --- a/addons/medical_ai/README.md +++ b/addons/medical_ai/README.md @@ -3,8 +3,3 @@ ace_medical_ai Makes AI units heal themselves and each other. -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [BaerMitUmlaut](https://github.com/BaerMitUmlaut) diff --git a/addons/medical_ai/XEH_postInit.sqf b/addons/medical_ai/XEH_postInit.sqf index d8676e9695..06a6f95e5e 100644 --- a/addons/medical_ai/XEH_postInit.sqf +++ b/addons/medical_ai/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_1("settingsInitialized", GVAR(enabledFor)); if (GVAR(enabledFor) == 0) exitWith {}; // 0: disabled if ((GVAR(enabledFor) == 1) && {!isServer} && {hasInterface}) exitWith {}; // 1: Don't Run on non-hc Clients @@ -9,6 +9,11 @@ _unit setVariable [QGVAR(lastFired), CBA_missionTime]; }] call CBA_fnc_addEventHandler; + ["CAManBase", "Hit", { + params ["_unit"]; + _unit setVariable [QGVAR(lastHit), CBA_missionTime]; + }] call CBA_fnc_addClassEventHandler; + #include "stateMachine.sqf" }] call CBA_fnc_addEventHandler; diff --git a/addons/medical_ai/XEH_preInit.sqf b/addons/medical_ai/XEH_preInit.sqf index 9361d05015..8dcb0111d7 100644 --- a/addons/medical_ai/XEH_preInit.sqf +++ b/addons/medical_ai/XEH_preInit.sqf @@ -8,4 +8,8 @@ PREP_RECOMPILE_END; #include "initSettings.sqf" +// default time values for AI being ready to heal, used in fnc_isSafe +if (isNil QGVAR(timeSafe_shoot)) then { GVAR(timeSafe_shoot) = 30; }; +if (isNil QGVAR(timeSafe_hit)) then { GVAR(timeSafe_hit) = 30; }; + ADDON = true; diff --git a/addons/medical_ai/functions/fnc_canRequestMedic.sqf b/addons/medical_ai/functions/fnc_canRequestMedic.sqf index c2a29c1c9f..135c345750 100644 --- a/addons/medical_ai/functions/fnc_canRequestMedic.sqf +++ b/addons/medical_ai/functions/fnc_canRequestMedic.sqf @@ -19,7 +19,8 @@ // we ignore this here. We need to "notice" the medic that he should // treat other units, or else he won't do anything on his own. -if ([_this] call EFUNC(medical_treatment,isMedic) || {vehicle _this != _this}) exitWith {false}; +private _isMedic = [_this] call EFUNC(medical_treatment,isMedic); +if (_isMedic && {!IS_UNCONSCIOUS(_this)} || {vehicle _this != _this}) exitWith {false}; // Search for a medic, prioritize unitReady private _medic = objNull; diff --git a/addons/medical_ai/functions/fnc_isSafe.sqf b/addons/medical_ai/functions/fnc_isSafe.sqf index 3c6c9f5dca..93ac425602 100644 --- a/addons/medical_ai/functions/fnc_isSafe.sqf +++ b/addons/medical_ai/functions/fnc_isSafe.sqf @@ -16,5 +16,6 @@ */ (getSuppression _this == 0) -&& {CBA_missionTime - (_this getVariable [QGVAR(lastFired), -30]) > 30} +&& {CBA_missionTime - (_this getVariable [QGVAR(lastFired), -999999]) > GVAR(timeSafe_shoot)} +&& {CBA_missionTime - (_this getVariable [QGVAR(lastHit), -999999]) > GVAR(timeSafe_hit)} && {!(_this getVariable [QEGVAR(captives,isHandcuffed), false])} diff --git a/addons/medical_ai/functions/fnc_wasRequested.sqf b/addons/medical_ai/functions/fnc_wasRequested.sqf index 479dc0c880..38efdd8121 100644 --- a/addons/medical_ai/functions/fnc_wasRequested.sqf +++ b/addons/medical_ai/functions/fnc_wasRequested.sqf @@ -16,4 +16,4 @@ */ private _healQueue = _this getVariable [QGVAR(healQueue), []]; -!(_healQueue isEqualTo []) +(_healQueue isNotEqualTo []) diff --git a/addons/medical_ai/initSettings.sqf b/addons/medical_ai/initSettings.sqf index 6fada00db5..7d583382d7 100644 --- a/addons/medical_ai/initSettings.sqf +++ b/addons/medical_ai/initSettings.sqf @@ -14,4 +14,4 @@ private _categoryArray = [ELSTRING(medical,Category), "STR_TEAM_SWITCH_AI"]; true, // isGlobal {[QGVAR(enabledFor), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_ai/stateMachine.sqf b/addons/medical_ai/stateMachine.sqf index 48d5a6ef8e..03483f4981 100644 --- a/addons/medical_ai/stateMachine.sqf +++ b/addons/medical_ai/stateMachine.sqf @@ -1,3 +1,5 @@ +//pragma SKIP_COMPILE - Inline file + GVAR(stateMachine) = [{call EFUNC(common,getLocalUnits)}, true] call CBA_statemachine_fnc_create; // Add states [statemachine, onState, onStateEntered, onStateLeaving, name] diff --git a/addons/medical_blood/CfgEventHandlers.hpp b/addons/medical_blood/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/medical_blood/CfgEventHandlers.hpp +++ b/addons/medical_blood/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/medical_blood/README.md b/addons/medical_blood/README.md index 848f8f0308..edc127ee0c 100644 --- a/addons/medical_blood/README.md +++ b/addons/medical_blood/README.md @@ -3,9 +3,3 @@ ace_medical_blood Creates blood drops on the ground near bleeding units. -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Glowbal](https://github.com/Glowbal) -- [commy2](https://github.com/commy2) diff --git a/addons/medical_blood/initSettings.sqf b/addons/medical_blood/initSettings.sqf index c2c52f93b8..c4ad57d4d7 100644 --- a/addons/medical_blood/initSettings.sqf +++ b/addons/medical_blood/initSettings.sqf @@ -6,7 +6,7 @@ [[BLOOD_DISABLED, BLOOD_ONLY_PLAYERS, BLOOD_ENABLED], [ELSTRING(Common,Disabled), LSTRING(OnlyPlayers), ELSTRING(Common,Enabled)], 2], true, LINKFUNC(init) -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(maxBloodObjects), @@ -15,7 +15,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [[50, 100, 200, 300, 400, 500, 1000, 2000, 3000, 4000, 5000], [/* settings function will auto create names */], 5], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(bloodLifetime), @@ -24,4 +24,4 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [1, 3600, 900], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_damage/ACE_Medical_Injuries.hpp b/addons/medical_damage/ACE_Medical_Injuries.hpp index fd03981398..c85040ba29 100644 --- a/addons/medical_damage/ACE_Medical_Injuries.hpp +++ b/addons/medical_damage/ACE_Medical_Injuries.hpp @@ -69,6 +69,13 @@ class ACE_Medical_Injuries { minDamage = 0.02; causeLimping = 1; }; + // Pain wound that is caused by making or being in contact with heat + class ThermalBurn { + causes[] = {"burn"}; + bleeding = 0; + pain = 0.7; + minDamage = 0; + }; }; class damageTypes { // thresholds[] {{, }, {...}} @@ -120,6 +127,10 @@ class ACE_Medical_Injuries { thresholds[] = {{0.1, 1}}; selectionSpecific = 1; }; + class burn { + thresholds[] = {{0, 1}}; + selectionSpecific = 0; + }; //No related wounds as drowning should not cause wounds/bleeding. Can be extended for internal injuries if they are added. class drowning { thresholds[] = {{0, 0}}; diff --git a/addons/medical_damage/CfgEventHandlers.hpp b/addons/medical_damage/CfgEventHandlers.hpp index 93e3311cf2..865276cfba 100644 --- a/addons/medical_damage/CfgEventHandlers.hpp +++ b/addons/medical_damage/CfgEventHandlers.hpp @@ -1,11 +1,11 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/medical_damage/functions/fnc_handleIncapacitation.sqf b/addons/medical_damage/functions/fnc_handleIncapacitation.sqf index bdfa3fe4de..4e87e749df 100644 --- a/addons/medical_damage/functions/fnc_handleIncapacitation.sqf +++ b/addons/medical_damage/functions/fnc_handleIncapacitation.sqf @@ -32,6 +32,6 @@ _bodyPartDamage params ["_headDamage", "_bodyDamage", "_leftArmDamage", "_rightA private _damageThreshold = GET_DAMAGE_THRESHOLD(_unit); -if ((_headDamage > _damageThreshold / 2) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < 0.1}}) then { +if ((_headDamage > _damageThreshold / 2) || {_bodyDamage > _damageThreshold} || {(_painLevel >= PAIN_UNCONSCIOUS) && {random 1 < EGVAR(medical,painUnconsciousChance)}}) then { [QEGVAR(medical,CriticalInjury), _unit] call CBA_fnc_localEvent; }; diff --git a/addons/medical_damage/functions/fnc_parseConfigForInjuries.sqf b/addons/medical_damage/functions/fnc_parseConfigForInjuries.sqf index 8618a41b5d..af932581be 100644 --- a/addons/medical_damage/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical_damage/functions/fnc_parseConfigForInjuries.sqf @@ -38,7 +38,7 @@ private _classID = 0; private _causeLimping = GET_NUMBER(_entry >> "causeLimping",0) == 1; private _causeFracture = GET_NUMBER(_entry >> "causeFracture",0) == 1; - if !(_causes isEqualTo []) then { + if (_causes isNotEqualTo []) then { GVAR(woundClassNames) pushBack _className; GVAR(woundsData) pushBack [_classID, _selections, _bleeding, _pain, [_minDamage, _maxDamage], _causes, _className, _causeLimping, _causeFracture]; { diff --git a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf index 93472f1d7a..b0de1f6e4a 100644 --- a/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandlerSQF.sqf @@ -122,8 +122,10 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra _critialDamage = true; }; if ([_unit, _bodyPartNToAdd, _bodyPartDamage, _woundDamage] call FUNC(determineIfFatal)) then { - TRACE_1("determineIfFatal returned true",_woundDamage); - [QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent; + if (!isPlayer _unit || {random 1 < EGVAR(medical,deathChance)}) then { + TRACE_1("determineIfFatal returned true",_woundDamage); + [QEGVAR(medical,FatalInjury), _unit] call CBA_fnc_localEvent; + }; }; #ifdef DEBUG_MODE_FULL diff --git a/addons/medical_damage/initSettings.sqf b/addons/medical_damage/initSettings.sqf index e508f74621..14dac50f1a 100644 --- a/addons/medical_damage/initSettings.sqf +++ b/addons/medical_damage/initSettings.sqf @@ -5,7 +5,7 @@ [ELSTRING(medical,Category)], [[0, 1, 2], [LSTRING(fatalDamageSource_vitalShotsOnly), LSTRING(fatalDamageSource_trauma), LSTRING(fatalDamageSource_both)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QEGVAR(medical,playerDamageThreshold), @@ -14,7 +14,7 @@ ELSTRING(medical,Category), [0, 25, 1, 2], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QEGVAR(medical,AIDamageThreshold), @@ -23,4 +23,22 @@ ELSTRING(medical,Category), [0, 25, 1, 2], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QEGVAR(medical,painUnconsciousChance), + "SLIDER", + [LSTRING(PainUnconsciousChance_DisplayName), LSTRING(PainUnconsciousChance_Description)], + ELSTRING(medical,Category), + [0, 1, 0.1, 2, true], + true +] call CBA_fnc_addSetting; + +[ + QEGVAR(medical,deathChance), + "SLIDER", + [LSTRING(deathChance_DisplayName), LSTRING(deathChance_Description)], + ELSTRING(medical,Category), + [0, 1, 1, 2, true], + true +] call CBA_fnc_addSetting; diff --git a/addons/medical_damage/stringtable.xml b/addons/medical_damage/stringtable.xml index 1406ef4dbe..718b97c746 100644 --- a/addons/medical_damage/stringtable.xml +++ b/addons/medical_damage/stringtable.xml @@ -667,6 +667,22 @@ Ikisinden biri Beide + + Thermal Burn + 熱傷 + + + Minor Thermal Burn + 小さな熱傷 + + + Medium Thermal Burn + 中くらいの熱傷 + + + Major Thermal Burn + 大きな熱傷 + Unit Damage Threshold Schwelle für Schaden @@ -676,6 +692,7 @@ Порог урона Próg obrażeń jednostki Birim Hasar Katsayısı + Umbral de daño de unidad Sets the amount of damage a unit can receive before going unconscious. (0 for mission default) @@ -686,6 +703,39 @@ Устанавливает количество урона, которое может получить юнит перед тем, как потерять сознание. (0 для значения миссии) Ustawia próg obrażeń jakie może otrzymać jednostka przed utratą przytomności. (0 jako ustawienie domyślne misji) Bilinçsiz duruma geçmeden önce bir birimin alabileceği hasar miktarını ayarlar. (Görev varsayılanı için 0) + Determina la cantidad de daño que puede recibir una unidad antes de quedar inconsciente (0 para predeterminado de misión) + + + Pain Unconscious Chance + Шанс потерять сознание от боли + Szansa na nieprzytomność przez ból + 気絶確率 + Probabilidad de inconsciencia por dolor + Douleur - Chance d'évanouissement + + + The probability of a person falling unconscious when their pain is above the tolerance threshold upon receiving damage. + Шанс, что человек потеряет сознание, когда его боль выше допустимого порога при получении травмы. + Szansa że osoba straci przytomność gdy jej ból jest powyżej tolerowalnego progu podczas otrzymywania obrażeń. + ユニットがダメージを受けた時に痛みが許容しきい値を超えた場合、気絶をする確率を設定します。 + La probabilidad de que una persona caiga inconsciente cuando su dolor está por encima del umbral al haber recibido daño. + La probabilité pour qu'une personne perde connaissance lorsque la douleur ressentie est supérieure à son seuil de tolérance. + + + Fatal Injury Death Chance + Вероятность смерти от смертельной травмы + Probabilidad de muerte por herida fatal + Blessure mortelle - Chance de décès + Szana na śmierć przy śmiertelej ranie + 致命傷による死亡確率 + + + The chance of dying to a fatal injury. + Шанс умереть от смертельной травмы. + La probabilidad de morir a causa de una herida fatal. + La probabilité de mourir lors d'une "blessure mortelle".\nUne blessure mortelle est définie par des dommages importants à la tête ou au cœur. + Szansa na śmierć po otrzymaniu śmiertelnej rany. + 致命傷による死亡確率を設定します。 diff --git a/addons/medical_engine/CfgActions.hpp b/addons/medical_engine/CfgActions.hpp index 64ecf717db..425b33dbce 100644 --- a/addons/medical_engine/CfgActions.hpp +++ b/addons/medical_engine/CfgActions.hpp @@ -13,4 +13,25 @@ class CfgActions { class FirstAid: None { show = 0; }; + class UnloadUnconsciousUnits: None { + show = 0; + }; + class UnloadFromDriver: None { + show = 0; + }; + class UnloadFromPilot: None { + show = 0; + }; + class UnloadFromCargo: None { + show = 0; + }; + class UnloadFromCommander: None { + show = 0; + }; + class UnloadFromGunner: None { + show = 0; + }; + class UnloadFromTurret: None { + show = 0; + }; }; diff --git a/addons/medical_engine/CfgEventHandlers.hpp b/addons/medical_engine/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/medical_engine/CfgEventHandlers.hpp +++ b/addons/medical_engine/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/medical_engine/CfgFunctions.hpp b/addons/medical_engine/CfgFunctions.hpp new file mode 100644 index 0000000000..7b6fc41278 --- /dev/null +++ b/addons/medical_engine/CfgFunctions.hpp @@ -0,0 +1,10 @@ +class CfgFunctions { + class A3_Mark { + class Revive { + class reviveInit { + // Disable BI medical system + postInit = 0; + }; + }; + }; +}; diff --git a/addons/medical_engine/README.md b/addons/medical_engine/README.md index c609f506cc..e3a128d9f4 100644 --- a/addons/medical_engine/README.md +++ b/addons/medical_engine/README.md @@ -2,10 +2,3 @@ ace_medical_engine =============== Links Arma 3 soldier health simulation to ACE medical system. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/addons/medical_engine/XEH_PREP.hpp b/addons/medical_engine/XEH_PREP.hpp index cb6874c5b6..63faaf7bbe 100644 --- a/addons/medical_engine/XEH_PREP.hpp +++ b/addons/medical_engine/XEH_PREP.hpp @@ -1,9 +1,10 @@ -PREP(handleDamage); +PREP(applyAnimAfterRagdoll); PREP(damageBodyPart); -PREP(updateBodyPartVisuals); -PREP(updateDamageEffects); -PREP(setStructuralDamage); -PREP(setUnconsciousAnim); +PREP(disableThirdParty); PREP(getHitpointArmor); PREP(getItemArmor); -PREP(applyAnimAfterRagdoll); +PREP(handleDamage); +PREP(setStructuralDamage); +PREP(setUnconsciousAnim); +PREP(updateBodyPartVisuals); +PREP(updateDamageEffects); diff --git a/addons/medical_engine/XEH_postInit.sqf b/addons/medical_engine/XEH_postInit.sqf index 0467202b88..fec92ca620 100644 --- a/addons/medical_engine/XEH_postInit.sqf +++ b/addons/medical_engine/XEH_postInit.sqf @@ -15,7 +15,7 @@ reverse _allHitPoints; if (_allHitPoints param [0, ""] != "ACE_HDBracket") then { - private _config = [_unit] call CBA_fnc_getObjectConfig; + private _config = configOf _unit; if (getText (_config >> "simulation") == "UAVPilot") exitWith {TRACE_1("ignore UAV AI",typeOf _unit);}; if (getNumber (_config >> "isPlayableLogic") == 1) exitWith {TRACE_1("ignore logic unit",typeOf _unit)}; ERROR_1("Bad hitpoints for unit type ""%1""",typeOf _unit); @@ -53,7 +53,7 @@ ["Air", "Killed", { params ["_vehicle", "_killer"]; TRACE_3("air killed",_vehicle,typeOf _vehicle,velocity _vehicle); - if ((getText (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "destrType")) == "") exitWith {}; + if ((getText (configOf _vehicle >> "destrType")) == "") exitWith {}; if (unitIsUAV _vehicle) exitWith {}; private _lethality = linearConversion [0, 25, (vectorMagnitude velocity _vehicle), 0.5, 1]; diff --git a/addons/medical_engine/XEH_preInit.sqf b/addons/medical_engine/XEH_preInit.sqf index 96481be0e7..71c7a86595 100644 --- a/addons/medical_engine/XEH_preInit.sqf +++ b/addons/medical_engine/XEH_preInit.sqf @@ -6,6 +6,8 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + // Define "Constants" variables (both are macros defined in script_macros_medical.hpp, look there for actual variable names) if (isNil QUOTE(HEAD_DAMAGE_THRESHOLD)) then {HEAD_DAMAGE_THRESHOLD = HEAD_DAMAGE_THRESHOLD_DEFAULT}; if (isNil QUOTE(ORGAN_DAMAGE_THRESHOLD)) then {ORGAN_DAMAGE_THRESHOLD = ORGAN_DAMAGE_THRESHOLD_DEFAULT}; @@ -78,4 +80,6 @@ addMissionEventHandler ["Loaded", { }; }] call CBA_fnc_addEventhandler; +[] call FUNC(disableThirdParty); + ADDON = true; diff --git a/addons/medical_engine/config.cpp b/addons/medical_engine/config.cpp index 698428a632..be5dc54040 100644 --- a/addons/medical_engine/config.cpp +++ b/addons/medical_engine/config.cpp @@ -14,10 +14,10 @@ class CfgPatches { }; }; -#include "CfgEventHandlers.hpp" - #include "CfgActions.hpp" -#include "CfgMoves.hpp" +#include "CfgEventHandlers.hpp" #include "CfgExtendedAnimation.hpp" +#include "CfgFunctions.hpp" +#include "CfgMoves.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" diff --git a/addons/medical_engine/functions/fnc_disableThirdParty.sqf b/addons/medical_engine/functions/fnc_disableThirdParty.sqf new file mode 100644 index 0000000000..5caa2fd74d --- /dev/null +++ b/addons/medical_engine/functions/fnc_disableThirdParty.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" +/* + * Author: BaerMitUmlaut + * Detects and disables third party medical systems. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_medical_engine_fnc_disableThirdParty + * + * Public: No + */ + +// SOG:PF CDLC revive system +// Pretend revive system was already initialized. +// See: vn_fnc_module_advancedrevive +vn_advanced_revive_started = true; + +// Farooq Revive +// Overwrite player initialization. +far_player_init = compileFinal ""; +[{!isNil "far_debugging"}, { + far_isDragging = nil; // Disable "Drag & Carry animation fix" loop - cannot be killed because spawned while true. + far_muteRadio = nil; // Disable initialization hint. + far_muteACRE = nil; // Same, but for very old versions. + far_debugging = false; // Disable adding event handlers to AI in SP. +}, [], 5] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/medical_engine/functions/fnc_getHitpointArmor.sqf b/addons/medical_engine/functions/fnc_getHitpointArmor.sqf index 1f6f3c0550..62954a1b56 100644 --- a/addons/medical_engine/functions/fnc_getHitpointArmor.sqf +++ b/addons/medical_engine/functions/fnc_getHitpointArmor.sqf @@ -21,7 +21,7 @@ params ["_unit", "_hitpoint"]; private _uniform = uniform _unit; // If unit is naked, use its underwear class instead if (_uniform isEqualTo "") then { - _uniform = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "nakedUniform"); + _uniform = getText (configOf _unit >> "nakedUniform"); }; private _gear = [ diff --git a/addons/medical_engine/functions/fnc_handleDamage.sqf b/addons/medical_engine/functions/fnc_handleDamage.sqf index 1975bde0c5..9eb799cdcd 100644 --- a/addons/medical_engine/functions/fnc_handleDamage.sqf +++ b/addons/medical_engine/functions/fnc_handleDamage.sqf @@ -94,7 +94,7 @@ if (_hitPoint isEqualTo "ace_hdbracket") exitWith { // represents all incoming damage for selecting a non-selectionSpecific wound location, (used for selectRandomWeighted [value1,weight1,value2....]) private _damageSelectionArray = [ - HITPOINT_INDEX_HEAD, _damageHead select 1, HITPOINT_INDEX_BODY, _damageBody select 1, HITPOINT_INDEX_LARM, _damageLeftArm select 1, + HITPOINT_INDEX_HEAD, _damageHead select 1, HITPOINT_INDEX_BODY, _damageBody select 1, HITPOINT_INDEX_LARM, _damageLeftArm select 1, HITPOINT_INDEX_RARM, _damageRightArm select 1, HITPOINT_INDEX_LLEG, _damageLeftLeg select 1, HITPOINT_INDEX_RLEG, _damageRightLeg select 1 ]; @@ -204,14 +204,15 @@ if ( // It does fire the EH multiple times, but this seems to scale with the intensity of the crash private _vehicle = vehicle _unit; if ( - _hitPoint isEqualTo "#structural" && + EGVAR(medical,enableVehicleCrashes) && + {_hitPoint isEqualTo "#structural"} && {_ammo isEqualTo ""} && {_vehicle != _unit} && {vectorMagnitude (velocity _vehicle) > 5} // todo: no way to detect if stationary and another vehicle hits you ) exitWith { private _damageSelectionArray = [ - HITPOINT_INDEX_HEAD, 1, HITPOINT_INDEX_BODY, 1, HITPOINT_INDEX_LARM, 1, + HITPOINT_INDEX_HEAD, 1, HITPOINT_INDEX_BODY, 1, HITPOINT_INDEX_LARM, 1, HITPOINT_INDEX_RARM, 1, HITPOINT_INDEX_LLEG, 1, HITPOINT_INDEX_RLEG, 1 ]; [QEGVAR(medical,woundReceived), [_unit, "Body", _newDamage, _unit, "vehiclecrash", _damageSelectionArray]] call CBA_fnc_localEvent; diff --git a/addons/medical_engine/functions/fnc_setUnconsciousAnim.sqf b/addons/medical_engine/functions/fnc_setUnconsciousAnim.sqf index 27ed364bf5..f71c550add 100644 --- a/addons/medical_engine/functions/fnc_setUnconsciousAnim.sqf +++ b/addons/medical_engine/functions/fnc_setUnconsciousAnim.sqf @@ -27,7 +27,7 @@ _unit setUnconscious _isUnconscious; if (_isUnconscious) then { // eject from static weapon - if (vehicle _unit isKindOf "StaticWeapon") then { + if (vehicle _unit isKindOf "StaticWeapon" && {!(vehicle _unit isKindOf "Pod_Heli_Transport_04_crewed_base_F")}) then { TRACE_2("ejecting from static weapon",_unit,vehicle _unit); [_unit] call EFUNC(common,unloadPerson); }; diff --git a/addons/medical_engine/initSettings.sqf b/addons/medical_engine/initSettings.sqf new file mode 100644 index 0000000000..9fe80afcb0 --- /dev/null +++ b/addons/medical_engine/initSettings.sqf @@ -0,0 +1,8 @@ +[ + QEGVAR(medical,enableVehicleCrashes), + "CHECKBOX", + [LSTRING(EnableVehicleCrashes_DisplayName), LSTRING(EnableVehicleCrashes_Description)], + ELSTRING(medical,Category), + true, + true +] call CBA_fnc_addSetting; diff --git a/addons/medical_engine/script_component.hpp b/addons/medical_engine/script_component.hpp index 5166324b1e..e5e03e6d1f 100644 --- a/addons/medical_engine/script_component.hpp +++ b/addons/medical_engine/script_component.hpp @@ -19,11 +19,11 @@ #include "\z\ace\addons\medical_engine\script_macros_config.hpp" #define PRELOAD_CLASS(class) \ - INFO_1("Starting preload for (%1)",class);\ + TRACE_1("Starting preload",class);\ [{\ 1 preloadObject _this;\ }, {\ - INFO_1("Preload done for (%1)",_this);\ + TRACE_1("Preload done",_this);\ }, class] call CBA_fnc_waitUntilAndExecute #define PRIORITY_HEAD 3 diff --git a/addons/medical_engine/script_macros_medical.hpp b/addons/medical_engine/script_macros_medical.hpp index d93baf4f2a..f2d4fb9a09 100644 --- a/addons/medical_engine/script_macros_medical.hpp +++ b/addons/medical_engine/script_macros_medical.hpp @@ -113,9 +113,6 @@ #define DEFAULT_BANDAGE_REOPENING_MIN_DELAY 120 #define DEFAULT_BANDAGE_REOPENING_MAX_DELAY 200 -// Time it takes to stitch one wound -#define WOUND_STITCH_TIME 5 - #define DEFAULT_TOURNIQUET_VALUES [0,0,0,0,0,0] #define DEFAULT_FRACTURE_VALUES [0,0,0,0,0,0] diff --git a/addons/medical_engine/stringtable.xml b/addons/medical_engine/stringtable.xml new file mode 100644 index 0000000000..c90e6c57cf --- /dev/null +++ b/addons/medical_engine/stringtable.xml @@ -0,0 +1,21 @@ + + + + + Enable Vehicle Crash Damage + Включить урон при аварии в транспортном средстве. + Activar daño por accidente de vehículo + Blessures de collision (véhicules) + Włącz obrażenia od kolizji pojazdu + 車両衝突ダメージを有効化 + + + Controls whether crew receives damage from vehicle collisions. + Контролирует, получает ли экипаж урон от столкновения транспортного средства. + Controla si la tripulación recibe daño debido a colisiones en vehículo. + Définit si les passagers à bord des véhicules peuvent être blessés en cas d'accident. + Kontroluje czy załoga pojazdu otrzyma obrażenia podczas kolizji pojazdu. + 車両が衝突をすると乗員がダメージを受けるかどうかを決定します。 + + + diff --git a/addons/medical_feedback/CfgEventHandlers.hpp b/addons/medical_feedback/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/medical_feedback/CfgEventHandlers.hpp +++ b/addons/medical_feedback/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/medical_feedback/RscInGameUI.hpp b/addons/medical_feedback/RscInGameUI.hpp index 275117ca8e..cc2712d8ab 100644 --- a/addons/medical_feedback/RscInGameUI.hpp +++ b/addons/medical_feedback/RscInGameUI.hpp @@ -1,7 +1,12 @@ class RscPictureKeepAspect; class RscInGameUI { class RscStanceInfo { - controls[] += {QGVAR(bloodVolumeIndicator)}; + controls[] += { + QGVAR(bloodVolumeIndicator), + QGVAR(stateIndicator1), + QGVAR(stateIndicator2), + QGVAR(stateIndicator3) + }; class GVAR(bloodVolumeIndicator): RscPictureKeepAspect { onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(bloodVolumeIndicator),_this select 0)]); x = IGUI_GRID_STANCE_X; @@ -9,5 +14,21 @@ class RscInGameUI { w = IGUI_GRID_STANCE_WAbs / 4; h = IGUI_GRID_STANCE_HAbs / 4; }; + + class GVAR(stateIndicator1): RscPictureKeepAspect { + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(stateIndicator1), _this select 0)]); + x = IGUI_GRID_STANCE_X + IGUI_GRID_STANCE_WAbs * 3 / 4; + y = IGUI_GRID_STANCE_Y; + w = IGUI_GRID_STANCE_WAbs / 4; + h = IGUI_GRID_STANCE_HAbs / 4; + }; + class GVAR(stateIndicator2): GVAR(stateIndicator1) { + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(stateIndicator2), _this select 0)]); + y = IGUI_GRID_STANCE_Y + IGUI_GRID_STANCE_HAbs / 4; + }; + class GVAR(stateIndicator3): GVAR(stateIndicator1) { + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(stateIndicator3), _this select 0)]); + y = IGUI_GRID_STANCE_Y + IGUI_GRID_STANCE_HAbs * 2 / 4; + }; }; }; diff --git a/addons/medical_feedback/XEH_PREP.hpp b/addons/medical_feedback/XEH_PREP.hpp index e6c48d6506..85dcd64d43 100644 --- a/addons/medical_feedback/XEH_PREP.hpp +++ b/addons/medical_feedback/XEH_PREP.hpp @@ -5,6 +5,7 @@ PREP(effectHeartBeat); PREP(effectIncapacitated); PREP(effectPain); PREP(effectUnconscious); +PREP(handleHUDIndicators); PREP(handleEffects); PREP(initEffects); PREP(playInjuredSound); diff --git a/addons/medical_feedback/XEH_postInit.sqf b/addons/medical_feedback/XEH_postInit.sqf index f57478f88c..c482be9ad1 100644 --- a/addons/medical_feedback/XEH_postInit.sqf +++ b/addons/medical_feedback/XEH_postInit.sqf @@ -49,6 +49,7 @@ GVAR(bloodTickCounter) = 0; private _volume = missionNamespace getVariable [QEGVAR(hearing,unconsciousnessVolume), VOL_UNCONSCIOUS]; [QUOTE(ADDON), _volume, _unconscious] call EFUNC(common,setHearingCapability); + [_unconscious, 1] call FUNC(effectUnconscious); [true] call FUNC(handleEffects); ["unconscious", _unconscious] call EFUNC(common,setDisableUserInputStatus); }] call CBA_fnc_addEventHandler; @@ -77,6 +78,27 @@ GVAR(bloodTickCounter) = 0; ["unconscious", _status] call EFUNC(common,setDisableUserInputStatus); }] call CBA_fnc_addPlayerEventHandler; +// Update effects for featureCamera (curator, arsenal, etc) +["featureCamera", { + params ["_unit", "_newCamera"]; + + [true] call FUNC(handleEffects); + + private _volume = missionNamespace getVariable [QEGVAR(hearing,unconsciousnessVolume), VOL_UNCONSCIOUS]; + + if (_newCamera == "") then { // switched back to player view + private _status = IS_UNCONSCIOUS(_unit); + [!_status, _unit] call EFUNC(common,setVolume); + + [QUOTE(ADDON), _volume, _status] call EFUNC(common,setHearingCapability); + + ["unconscious", _status] call EFUNC(common,setDisableUserInputStatus); + } else { // camera view + [true, _unit] call EFUNC(common,setVolume); + [QUOTE(ADDON), 1, false] call EFUNC(common,setHearingCapability); + }; +}] call CBA_fnc_addPlayerEventHandler; + // Forced say3D [QGVAR(forceSay3D), { params ["_unit", "_sound", "_distance"]; diff --git a/addons/medical_feedback/data/fracture.paa b/addons/medical_feedback/data/fracture.paa new file mode 100644 index 0000000000..b1a48138d7 Binary files /dev/null and b/addons/medical_feedback/data/fracture.paa differ diff --git a/addons/medical_feedback/data/splint.paa b/addons/medical_feedback/data/splint.paa new file mode 100644 index 0000000000..a82349885d Binary files /dev/null and b/addons/medical_feedback/data/splint.paa differ diff --git a/addons/medical_feedback/data/tourniquet.paa b/addons/medical_feedback/data/tourniquet.paa new file mode 100644 index 0000000000..59e0076ed2 Binary files /dev/null and b/addons/medical_feedback/data/tourniquet.paa differ diff --git a/addons/medical_feedback/functions/fnc_effectHeartBeat.sqf b/addons/medical_feedback/functions/fnc_effectHeartBeat.sqf index 6156adb4f6..c92a377c13 100644 --- a/addons/medical_feedback/functions/fnc_effectHeartBeat.sqf +++ b/addons/medical_feedback/functions/fnc_effectHeartBeat.sqf @@ -15,8 +15,12 @@ * Public: No */ -private _heartRate = GET_HEART_RATE(ACE_player); +if (EGVAR(common,OldIsCamera)) exitWith { + TRACE_2("Ending heart beat effect - scripted camera",_heartRate,EGVAR(common,OldIsCamera)); + GVAR(heartBeatEffectRunning) = false; +}; +private _heartRate = GET_HEART_RATE(ACE_player); if (_heartRate == 0) exitWith { TRACE_1("Ending heart beat effect - zero",_heartRate); GVAR(heartBeatEffectRunning) = false; diff --git a/addons/medical_feedback/functions/fnc_effectPain.sqf b/addons/medical_feedback/functions/fnc_effectPain.sqf index 96f233a4b9..9b8320244d 100644 --- a/addons/medical_feedback/functions/fnc_effectPain.sqf +++ b/addons/medical_feedback/functions/fnc_effectPain.sqf @@ -19,10 +19,10 @@ params ["_enable", "_intensity"]; if (!_enable || {_intensity == 0}) exitWith { - GVAR(ppPain) ppEffectEnable false; + if (GVAR(ppPain) != -1) then { GVAR(ppPain) ppEffectEnable false; }; GVAR(ppPainBlur) ppEffectEnable false; }; -GVAR(ppPain) ppEffectEnable true; +if (GVAR(ppPain) != -1) then { GVAR(ppPain) ppEffectEnable true; }; GVAR(ppPainBlur) ppEffectEnable true; // Trigger effect every 2s diff --git a/addons/medical_feedback/functions/fnc_handleEffects.sqf b/addons/medical_feedback/functions/fnc_handleEffects.sqf index 77c8d9f1ae..4f81ba4689 100644 --- a/addons/medical_feedback/functions/fnc_handleEffects.sqf +++ b/addons/medical_feedback/functions/fnc_handleEffects.sqf @@ -58,4 +58,9 @@ if ((!GVAR(heartBeatEffectRunning)) && {_heartRate != 0} && {(_heartRate > 160) [!_unconscious, _pain] call FUNC(effectPain); [!_unconscious, _bleedingStrength, _manualUpdate] call FUNC(effectBleeding); +// - Tourniquets, fractures and splints indication --------------------------------------- +if (GVAR(enableHUDIndicators)) then { + [] call FUNC(handleHUDIndicators); +}; + END_COUNTER(handleEffects); diff --git a/addons/medical_feedback/functions/fnc_handleHUDIndicators.sqf b/addons/medical_feedback/functions/fnc_handleHUDIndicators.sqf new file mode 100644 index 0000000000..5579c62110 --- /dev/null +++ b/addons/medical_feedback/functions/fnc_handleHUDIndicators.sqf @@ -0,0 +1,64 @@ +#include "script_component.hpp" +/* + * Author: 10Dozen + * Handles indication of the fractures, applied tourniquets and splints over Stance indicator. + * Draws an icon if there is at least 1 fracture/splint/tourniquet applied. + * + * Arguments: + * 0: Flag to drop all indicators (optional) + * + * Return Value: + * None + * + * Example: + * [false] call ace_medical_feedback_fnc_handleHUDIndicators + * + * Public: No + */ +params [["_dropAllIndicators", false]]; + +private _indicatorSlots = [ + uiNamespace getVariable [QGVAR(stateIndicator1), controlNull], + uiNamespace getVariable [QGVAR(stateIndicator2), controlNull], + uiNamespace getVariable [QGVAR(stateIndicator3), controlNull] +]; + +// --- Removes any indication and exit +if (_dropAllIndicators) exitWith { + { + _x ctrlSetText ""; + } forEach _indicatorSlots; +}; + +// --- Tourniquets +private _hasTourniquets = GET_TOURNIQUETS(ACE_player) findIf {_x > 0} > -1; +private _tourniquetIcon = ["", ICON_TOURNIQUET_PATH] select _hasTourniquets; + +// --- Fractures and Splints +private _fractureSettings = EGVAR(medical,fractures); +private _fractureIcon = ""; +private _splintIcon = ""; + +if (_fractureSettings > 0) then { + // --- Fractures enabled: check for fracture indication + private _hasFractures = GET_FRACTURES(ACE_player) findIf {_x > 0} > -1; + _fractureIcon = ["", ICON_FRACTURE_PATH] select _hasFractures; + + if (_fractureSettings > 1) then { + // --- Fractures can not be fully healed: check for splint indication + private _hasSplints = GET_FRACTURES(ACE_player) findIf {_x == -1} > -1; + _splintIcon = ["", ICON_SPLINT_PATH] select _hasSplints; + }; +}; + +// --- Get prioritized list of icons to apply +private _icons = [ + _fractureIcon, + _tourniquetIcon, + _splintIcon +] select {_x isNotEqualTo ""}; + +// --- Apply icons to indicator slots, if no icon for slot - remove slot's text +{ + _x ctrlSetText (_icons param [_forEachIndex, ""]); +} forEach _indicatorSlots; diff --git a/addons/medical_feedback/functions/fnc_initEffects.sqf b/addons/medical_feedback/functions/fnc_initEffects.sqf index 1d908c529d..eb2dc31f8b 100644 --- a/addons/medical_feedback/functions/fnc_initEffects.sqf +++ b/addons/medical_feedback/functions/fnc_initEffects.sqf @@ -33,7 +33,7 @@ private _fnc_createEffect = { // - Pain --------------------------------------------------------------------- if (!isNil QGVAR(ppPain)) then { TRACE_1("delete pain",GVAR(ppPain)); - ppEffectDestroy GVAR(ppPain) + if (GVAR(ppPain) != -1) then { ppEffectDestroy GVAR(ppPain); }; }; switch (GVAR(painEffectType)) do { case FX_PAIN_WHITE_FLASH: { @@ -57,6 +57,7 @@ switch (GVAR(painEffectType)) do { [0, 0, false] ] call _fnc_createEffect; }; + default { GVAR(ppPain) = -1; }; }; // Base blur on high pain if (isNil QGVAR(ppPainBlur)) then { diff --git a/addons/medical_feedback/functions/fnc_playInjuredSound.sqf b/addons/medical_feedback/functions/fnc_playInjuredSound.sqf index 5773f904ff..44f60b496f 100644 --- a/addons/medical_feedback/functions/fnc_playInjuredSound.sqf +++ b/addons/medical_feedback/functions/fnc_playInjuredSound.sqf @@ -33,7 +33,7 @@ private _distance = if (_type == "hit") then { } else { [10, 15, 20] select _severity; }; -private _targets = allPlayers inAreaArray [getPosWorld _unit, _distance, _distance, 0, false, _distance]; +private _targets = allPlayers inAreaArray [ASLToAGL getPosASL _unit, _distance, _distance, 0, false, _distance]; if (_targets isEqualTo []) exitWith {}; // Handle timeout diff --git a/addons/medical_feedback/initSettings.sqf b/addons/medical_feedback/initSettings.sqf index 128f1f6b91..997a5f061b 100644 --- a/addons/medical_feedback/initSettings.sqf +++ b/addons/medical_feedback/initSettings.sqf @@ -39,3 +39,18 @@ [true] call FUNC(initEffects); } ] call CBA_fnc_addSetting; + +[ + QGVAR(enableHUDIndicators), + "CHECKBOX", + [LSTRING(EnableHUDIndicators_DisplayName), LSTRING(EnableHUDIndicators_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory)], + true, + false, + { + // --- Drop indication on disabling + if (!_this) exitWith { + [true] call FUNC(handleHUDIndicators); + }; + } +] call CBA_fnc_addSetting; diff --git a/addons/medical_feedback/script_component.hpp b/addons/medical_feedback/script_component.hpp index 54127b6619..99167c08a7 100644 --- a/addons/medical_feedback/script_component.hpp +++ b/addons/medical_feedback/script_component.hpp @@ -55,3 +55,7 @@ #define ICON_BLOODVOLUME_COLOR_WHITE [1, 1, 1, 1] #define ICON_BLOODVOLUME_COLOR_ORANGE [1, 0.6, 0, 1] #define ICON_BLOODVOLUME_COLOR_RED [0.8, 0.2, 0, 1] + +#define ICON_TOURNIQUET_PATH QPATHTOF(data\tourniquet.paa) +#define ICON_SPLINT_PATH QPATHTOF(data\splint.paa) +#define ICON_FRACTURE_PATH QPATHTOF(data\fracture.paa) diff --git a/addons/medical_feedback/stringtable.xml b/addons/medical_feedback/stringtable.xml index d2ef55ecd7..bf24005976 100644 --- a/addons/medical_feedback/stringtable.xml +++ b/addons/medical_feedback/stringtable.xml @@ -112,6 +112,7 @@ Efekt pro nízké množství krve Efekt po utracie znacznej ilości krwi Düşük Kan Efekt Türü + Tipo de efecto por volumen bajo de sangre Selects the used low blood volume effect type. @@ -121,6 +122,7 @@ Nastavuje který efekt pro nízké množství krve bude používán. Wybiera efekt ktory będzie pokazywany po utracie znacznej ilości krwi. Kullanılan düşük kan hacmi efekt türünü seçer. + Selecciona el tipo de efecto a causa de un volumen bajo de sangre. Color Fading @@ -130,6 +132,7 @@ Ztráta barev Zanikanie kolorów Renk Soldurma + Atenuación del color Icon @@ -139,6 +142,7 @@ Ikona Ikona Simge + Icono Icon + Color Fading @@ -148,6 +152,7 @@ Ikona + Ztráta barev Ikona + Zanikanie kolorów Simge + Renk Soldurma + Icono + Atenuación del color @@ -184,6 +189,16 @@ 啟用傷者的尖叫聲 Yaralı birimler tarafından çığlık atmayı etkinleştir + + Enable Fracture/Tourniquet/Splint Indicators + Включить индикаторы переломов/жгутов/шин + 骨折/止血帯の表記を有効化 + + + Enables indicators for fractures and applied tourniquets and splints over the Stance Indicator. + Включает индикацию переломов, наложенных шин и жгутов поверх индикатора положения тела. + 体勢インジケータに骨折や添え木、止血帯の有無を表示するかどうかを設定できます。 + diff --git a/addons/medical_gui/CfgEventHandlers.hpp b/addons/medical_gui/CfgEventHandlers.hpp index da45b1d12e..e681bffde5 100644 --- a/addons/medical_gui/CfgEventHandlers.hpp +++ b/addons/medical_gui/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/medical_gui/CfgVehicles.hpp b/addons/medical_gui/CfgVehicles.hpp index eecae9a359..f30f9908ce 100644 --- a/addons/medical_gui/CfgVehicles.hpp +++ b/addons/medical_gui/CfgVehicles.hpp @@ -19,6 +19,7 @@ class CfgVehicles { exceptions[] = {"isNotInside", "isNotSwimming"}; statement = QUOTE(_target call FUNC(openMenu)); icon = QPATHTOF(ui\cross.paa); + modifierFunction = QUOTE(call FUNC(modifyActionTriageLevel)); }; }; class ACE_Actions { @@ -26,12 +27,14 @@ class CfgVehicles { #include "InteractionBodyParts.hpp" #undef ACTION_CONDITION class ACE_MainActions { + modifierFunction = QUOTE(call FUNC(modifyActionTriageLevel)); class ACE_Medical_Menu { displayName = CSTRING(MedicalMenu); condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu)); exceptions[] = {"isNotInside", "isNotSwimming"}; statement = QUOTE(_target call FUNC(openMenu)); icon = QPATHTOF(ui\cross.paa); + modifierFunction = QUOTE(call FUNC(modifyActionTriageLevel)); }; class ACE_Medical_Radial { displayName = CSTRING(Medical); diff --git a/addons/medical_gui/README.md b/addons/medical_gui/README.md index 37bd6250fd..71b194c80d 100644 --- a/addons/medical_gui/README.md +++ b/addons/medical_gui/README.md @@ -3,9 +3,3 @@ ace_medical_gui Implements the interaction menu actions, medical menu, information display, and triage card. -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Glowbal](https://github.com/Glowbal) -- [mharis001](https://github.com/mharis001) diff --git a/addons/medical_gui/XEH_PREP.hpp b/addons/medical_gui/XEH_PREP.hpp index c53b693bdf..857e72315b 100644 --- a/addons/medical_gui/XEH_PREP.hpp +++ b/addons/medical_gui/XEH_PREP.hpp @@ -9,6 +9,7 @@ PREP(handleToggle); PREP(handleTriageSelect); PREP(menuPFH); PREP(modifyAction); +PREP(modifyActionTriageLevel); PREP(onMenuClose); PREP(onMenuOpen); PREP(openMenu); diff --git a/addons/medical_gui/XEH_postInit.sqf b/addons/medical_gui/XEH_postInit.sqf index c6dd4e2722..6127a1a013 100644 --- a/addons/medical_gui/XEH_postInit.sqf +++ b/addons/medical_gui/XEH_postInit.sqf @@ -33,13 +33,26 @@ GVAR(selfInteractionActions) = []; }] call CBA_fnc_addEventHandler; ["ACE3 Common", QGVAR(openMedicalMenuKey), localize LSTRING(OpenMedicalMenu), { - // Get target (cursorTarget and cursorObject), if not valid then target is ACE_player + // 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 { - _target = ACE_player; + 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; + }; }; }; diff --git a/addons/medical_gui/functions/fnc_bloodLossToRGBA.sqf b/addons/medical_gui/functions/fnc_bloodLossToRGBA.sqf index b2852e1a2a..71c40bc2ae 100644 --- a/addons/medical_gui/functions/fnc_bloodLossToRGBA.sqf +++ b/addons/medical_gui/functions/fnc_bloodLossToRGBA.sqf @@ -2,8 +2,6 @@ /* * Author: ShackTac, SilentSpike * Converts a blood loss value into a representative RGBA colour. - * Blood loss colouring follows a "white, yellow, red" colour scale with 10 steps, Bezier interpolation and Correct lightness gradient. - * See: https://gka.github.io/palettes * * Arguments: * 0: The blood loss value (range [0,1]) @@ -22,15 +20,4 @@ params ["_bloodLoss"]; private _frBL = 0 max (_bloodLoss / BLOOD_LOSS_RED_THRESHOLD) min 1; private _colorInt = ceil (_frBL * (BLOOD_LOSS_TOTAL_COLORS - 1)); -[ - [1.00, 1.00, 1.00, 1], // #ffffff - [1.00, 0.95, 0.63, 1], // #fff1a1 - [1.00, 0.88, 0.46, 1], // #ffe075 - [1.00, 0.80, 0.33, 1], // #ffcb55 - [1.00, 0.72, 0.24, 1], // #ffb73c - [1.00, 0.63, 0.15, 1], // #ffa127 - [1.00, 0.53, 0.08, 1], // #ff8815 - [1.00, 0.43, 0.02, 1], // #ff6d05 - [1.00, 0.29, 0.00, 1], // #ff4b00 - [1.00, 0.00, 0.00, 1] // #ff0000 -] select _colorInt; +missionNamespace getVariable format ["%1_%2", QGVAR(bloodLossColor), _colorInt] diff --git a/addons/medical_gui/functions/fnc_damageToRGBA.sqf b/addons/medical_gui/functions/fnc_damageToRGBA.sqf index f487a332d1..236b8a8f98 100644 --- a/addons/medical_gui/functions/fnc_damageToRGBA.sqf +++ b/addons/medical_gui/functions/fnc_damageToRGBA.sqf @@ -2,8 +2,6 @@ /* * Author: ShackTac, SilentSpike * Converts a damage value into a representative RGBA colour. - * Damage colouring follows a "white, cyan, blue" colour scale with 10 steps, Bezier interpolation and Correct lightness gradient. - * See: https://gka.github.io/palettes * * Arguments: * 0: The damage value (range [0,1]) @@ -22,15 +20,4 @@ params ["_damage"]; private _frD = 0 max (_damage / DAMAGE_BLUE_THRESHOLD) min 1; private _colorInt = ceil (_frD * (DAMAGE_TOTAL_COLORS - 1)); -[ - [1.00, 1.00, 1.00, 1], // #ffffff - [0.75, 0.95, 1.00, 1], // #bff2ff - [0.63, 0.87, 1.00, 1], // #a0ddff - [0.54, 0.77, 1.00, 1], // #8ac4ff - [0.48, 0.67, 1.00, 1], // #7aacff - [0.42, 0.57, 1.00, 1], // #6c91ff - [0.37, 0.47, 1.00, 1], // #5e77ff - [0.31, 0.35, 1.00, 1], // #4e5aff - [0.22, 0.23, 1.00, 1], // #383bff - [0.00, 0.00, 1.00, 1] // #0000ff -] select _colorInt +missionNamespace getVariable format ["%1_%2", QGVAR(damageColor), _colorInt] diff --git a/addons/medical_gui/functions/fnc_modifyActionTriageLevel.sqf b/addons/medical_gui/functions/fnc_modifyActionTriageLevel.sqf new file mode 100644 index 0000000000..1d07f79de2 --- /dev/null +++ b/addons/medical_gui/functions/fnc_modifyActionTriageLevel.sqf @@ -0,0 +1,46 @@ +#include "script_component.hpp" +/* + * Author: Brett Mayson + * Modifies the action color to match the triage level. + * + * Arguments: + * 0: Target + * 1: Player + * 2: Args + * 3: Action Data + * + * Return Value: + * None + * + * Example: + * [cursorObject, player, [], []] call ace_medical_gui_fnc_modifyActionTriageLevel + * + * Public: No + */ + +params ["_target", "_player", "", "_actionData"]; +if ( + GVAR(interactionMenuShowTriage) == 1 // Anyone + || {GVAR(interactionMenuShowTriage) == 2 && {[_player] call EFUNC(medical_treatment,isMedic)}} // Medics & Doctors +) then { + private _colorHex = switch (_target getVariable [QEGVAR(medical,triageLevel), 0]) do { + case 1: { + [TRIAGE_COLOR_MINIMAL] call BIS_fnc_colorRGBtoHTML + }; + case 2: { + [TRIAGE_COLOR_DELAYED] call BIS_fnc_colorRGBtoHTML + }; + case 3: { + [TRIAGE_COLOR_IMMEDIATE] call BIS_fnc_colorRGBtoHTML + }; + case 4: { + [TRIAGE_COLOR_DECEASED] call BIS_fnc_colorRGBtoHTML + }; + default { + "#FFFFFF" + }; + }; + + _actionData params ["", "", "_icon"]; + _icon set [1, _colorHex]; +}; diff --git a/addons/medical_gui/functions/fnc_updateInjuryList.sqf b/addons/medical_gui/functions/fnc_updateInjuryList.sqf index 66d78c253e..7e8ed55e40 100644 --- a/addons/medical_gui/functions/fnc_updateInjuryList.sqf +++ b/addons/medical_gui/functions/fnc_updateInjuryList.sqf @@ -41,13 +41,13 @@ if (IS_BLEEDING(_target)) then { // Give a qualitative description of the blood volume lost switch (GET_HEMORRHAGE(_target)) do { case 1: { - _entries pushBack [localize LSTRING(Lost_Blood1), [1, 0, 0, 1]]; + _entries pushBack [localize LSTRING(Lost_Blood1), [1, 1, 0, 1]]; }; case 2: { - _entries pushBack [localize LSTRING(Lost_Blood2), [1, 0, 0, 1]]; + _entries pushBack [localize LSTRING(Lost_Blood2), [1, 0.67, 0, 1]]; }; case 3: { - _entries pushBack [localize LSTRING(Lost_Blood3), [1, 0, 0, 1]]; + _entries pushBack [localize LSTRING(Lost_Blood3), [1, 0.33, 0, 1]]; }; case 4: { _entries pushBack [localize LSTRING(Lost_Blood4), [1, 0, 0, 1]]; diff --git a/addons/medical_gui/initSettings.sqf b/addons/medical_gui/initSettings.sqf index be7dc60fa6..16d0bdc4a9 100644 --- a/addons/medical_gui/initSettings.sqf +++ b/addons/medical_gui/initSettings.sqf @@ -5,7 +5,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [[0, 1, 2], [LSTRING(Selections3D), LSTRING(Radial), ELSTRING(common,Disabled)], 0], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(enableSelfActions), @@ -14,7 +14,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], true, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(enableMedicalMenu), @@ -23,7 +23,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), ELSTRING(common,VehiclesOnly)], 1], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(openAfterTreatment), @@ -32,7 +32,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], true, false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(maxDistance), @@ -41,4 +41,69 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [0, 10, 3, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(interactionMenuShowTriage), + "LIST", + [LSTRING(InteractionMenuShowTriage_DisplayName), LSTRING(InteractionMenuShowTriage_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory)], + [[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(Medical_Treatment,Anyone), ELSTRING(Medical_Treatment,Medics)], 1], + false +] call CBA_fnc_addSetting; + +/* +* Default blood loss colouring follows a "white, yellow, red" colour scale with 10 steps, Bezier interpolation and Correct lightness gradient. +* See: https://gka.github.io/palettes +*/ +private _bloodLossColors = [ + [1.00, 1.00, 1.00, 1], + [1.00, 0.95, 0.64, 1], + [1.00, 0.87, 0.46, 1], + [1.00, 0.80, 0.33, 1], + [1.00, 0.72, 0.24, 1], + [1.00, 0.63, 0.15, 1], + [1.00, 0.54, 0.08, 1], + [1.00, 0.43, 0.02, 1], + [1.00, 0.30, 0.00, 1], + [1.00, 0.00, 0.00, 1] +]; + +/* +* Default damage colouring follows a "white, cyan, blue" colour scale with 10 steps, Bezier interpolation and Correct lightness gradient. +* See: https://gka.github.io/palettes +*/ +private _damageColors = [ + [1.00, 1.00, 1.00, 1], + [0.75, 0.95, 1.00, 1], + [0.62, 0.86, 1.00, 1], + [0.54, 0.77, 1.00, 1], + [0.48, 0.67, 1.00, 1], + [0.42, 0.57, 1.00, 1], + [0.37, 0.47, 1.00, 1], + [0.31, 0.36, 1.00, 1], + [0.22, 0.23, 1.00, 1], + [0.00, 0.00, 1.00, 1] +]; + +{ + [ + format ["%1_%2", QGVAR(bloodLossColor), _forEachIndex], + "COLOR", + [format [localize LSTRING(BloodLossColorX_DisplayName), _forEachIndex], LSTRING(BloodLossColor_Description)], + [ELSTRING(medical,Category), LSTRING(BloodLossColors)], + _x, + false // isGlobal + ] call CBA_fnc_addSetting; +} forEach _bloodLossColors; + +{ + [ + format ["%1_%2", QGVAR(damageColor), _forEachIndex], + "COLOR", + [format [localize LSTRING(DamageColorX_DisplayName), _forEachIndex], LSTRING(DamageColor_Description)], + [ELSTRING(medical,Category), LSTRING(DamageColors)], + _x, + false // isGlobal + ] call CBA_fnc_addSetting; +} forEach _damageColors; diff --git a/addons/medical_gui/stringtable.xml b/addons/medical_gui/stringtable.xml index 0963c1a6db..a4d3a67c45 100644 --- a/addons/medical_gui/stringtable.xml +++ b/addons/medical_gui/stringtable.xml @@ -189,6 +189,22 @@ Distancia máxima desde el paciente para que el menú pueda ser abierto Tıbbi Menünün açılabileceği maksimum mesafe. + + Show Triage Level in Interaction Menu + Couleur de triage dans le menu d'interaction + インタラクションにトリアージ レベル表示 + Mostrar nivel de triado en menú de interacción + Показывать группу триажа в меню взаимодействий + Pokaż poziom Triażu w menu interakcji + + + Shows the patient's triage level by changing the color of the main and medical menu actions. + Modifie la couleur du menu d'interactions et du sous-menu médical en fonction de la fiche de triage du patient. + メニューと医療メニューの色を変更し、患者のトリアージ レベルを表示します。 + Mostrar el nivel de triado en el paciente cambiando el color de acciones de menú principales y médicas + Отображает установленную группу карты медицинской сортировки (триажа), изменяя цвет действий основного и медицинского меню. + Pokazuje poziom Triażu pacjenta poprzez zmianę koloru ikony w menu interakcji. + Medical Lékařské @@ -1108,6 +1124,37 @@ 伤员信息 患者情報 Hasta Bilgileri + Información de paciente + + + Blood Loss Colors + Цвета кровопотери + 失血量カラー + + + Blood Loss Colors, That Used in Medical GUI. 10 Color Gradient. + Цвета кровопотери, которые используются в Медицинском интерфейсе. Градиент из 10 цветов. + 医療 GUI 内で失血量を 10 段階のカラーで表します。 + + + Blood Loss Color %1 + Цвет кровопотери %1 + 失血量カラー %1 + + + Damage Colors + Цвета урона + 負傷カラー + + + Damage Colors, That Used in Medical GUI. 10 Color Gradient. + Цвета урона, которые используются в Медицинском интерфейсе. Градиент из 10 цветов. + 医療 GUI 内で負傷を 10 段階のカラーで表します。 + + + Damage Color %1 + Цвет урона %1 + 負傷カラー %1 diff --git a/addons/medical_statemachine/CfgEventHandlers.hpp b/addons/medical_statemachine/CfgEventHandlers.hpp index 7196bf8aaf..98c29f77dc 100644 --- a/addons/medical_statemachine/CfgEventHandlers.hpp +++ b/addons/medical_statemachine/CfgEventHandlers.hpp @@ -1,12 +1,12 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/medical_statemachine/Statemachine.hpp b/addons/medical_statemachine/Statemachine.hpp index 17a4baaf07..eecb6a236c 100644 --- a/addons/medical_statemachine/Statemachine.hpp +++ b/addons/medical_statemachine/Statemachine.hpp @@ -103,6 +103,7 @@ class ACE_Medical_StateMachine { }; class Bleedout { targetState = "Dead"; + condition = QUOTE((GVAR(cardiacArrestBleedoutEnabled))); // wrap to ensure cba uses this as code and not a direct variable events[] = {QEGVAR(medical,Bleedout)}; }; }; diff --git a/addons/medical_statemachine/functions/fnc_localityChangedEH.sqf b/addons/medical_statemachine/functions/fnc_localityChangedEH.sqf index 9e5fb3c9b5..80486601f5 100644 --- a/addons/medical_statemachine/functions/fnc_localityChangedEH.sqf +++ b/addons/medical_statemachine/functions/fnc_localityChangedEH.sqf @@ -56,7 +56,7 @@ if (_isLocal) then { /* // Not sure if this is even needed, idea is that on locality transfer we broadcast more up to date info - private _lastTimeUpdated = _unit getVariable [QEGVAR(medical_vitals,lastTimeUpdated), 1e99]; + private _lastTimeUpdated = _unit getVariable [QEGVAR(medical_vitals,lastTimeUpdated), 1e38]; private _deltaT = CBA_missionTime - _lastTimeUpdated; TRACE_1("not local",_deltaT); if (_deltaT < 5) then { diff --git a/addons/medical_statemachine/functions/fnc_resetStateDefault.sqf b/addons/medical_statemachine/functions/fnc_resetStateDefault.sqf index 4cffd47076..b29adcb9f4 100644 --- a/addons/medical_statemachine/functions/fnc_resetStateDefault.sqf +++ b/addons/medical_statemachine/functions/fnc_resetStateDefault.sqf @@ -17,7 +17,4 @@ params ["_unit"]; -// Statemachine only handles local units -if !(local _unit) exitWith {}; - [_unit, EGVAR(medical,STATE_MACHINE), "Dead", "Default"] call CBA_statemachine_fnc_manualTransition; diff --git a/addons/medical_statemachine/initSettings.sqf b/addons/medical_statemachine/initSettings.sqf index df66002ff9..c129223931 100644 --- a/addons/medical_statemachine/initSettings.sqf +++ b/addons/medical_statemachine/initSettings.sqf @@ -9,7 +9,7 @@ 0 ], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fatalInjuriesAI), @@ -22,7 +22,7 @@ 0 ], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(AIUnconsciousness), @@ -31,7 +31,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(cardiacArrestTime), @@ -40,4 +40,13 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [1, 3600, 300], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(cardiacArrestBleedoutEnabled), + "CHECKBOX", + [LSTRING(CardiacArrestBleedout_DisplayName), LSTRING(CardiacArrestBleedout_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory)], + true, + true +] call CBA_fnc_addSetting; diff --git a/addons/medical_statemachine/stringtable.xml b/addons/medical_statemachine/stringtable.xml index 6952f16dd5..724ecd3f4f 100644 --- a/addons/medical_statemachine/stringtable.xml +++ b/addons/medical_statemachine/stringtable.xml @@ -13,6 +13,7 @@ Stavy Stany Devletler + Estados Player Fatal Injuries @@ -26,6 +27,7 @@ Oyuncu Ölümcül Yaralanmaları Tödliche Spielerverletzungen Смертельные травмы игрока + Heridas mortales del jugador Controls when players can receive fatal injuries. A fatal injury is caused by significant damage to the head or torso. @@ -39,6 +41,7 @@ Definiuje, kiedy gracze mogą otrzymać śmiertelne obrażenia. Śmiertelne obrażenia są spowodowane znacznym uszkodzeniem głowy lub torsu. Legt fest, wann Spieler tödliche Verletzungen erleiden können. Eine tödliche Verletzung wird bei erheblichem Schaden an Kopf oder Torso verursacht. Определяет, могут ли игроки получить смертельные травмы. Смертельная травма вызывается значительным повреждением головы или туловища. + Controla cuándo los jugadores pueden sufrir lesiones fatales. Una lesión fatal es causada por un daño significativo en la cabeza o el cuerpo. AI Fatal Injuries @@ -52,6 +55,7 @@ AI Ölümcül Yaralanmaları Tödliche KI-Verletzungen Смертельные травмы ИИ + Heridas mortales IA Controls when AI can receive fatal injuries. A fatal injury is caused by significant damage to the head or troso.\nWhen set to "Always", this effectively produces "AI Instant Death" behaviour as AI will immediately die from any fatal injury.\nNOTE: Any mode other than "Always" requires AI Unconsciousness to be enabled. @@ -65,6 +69,7 @@ Definiuje, kiedy AI może otrzymać śmiertelne obrażenia. Śmiertelne obrażenia są spowodowane znacznym uszkodzeniem głowy lub torsu.\n Ustawienie "Zawsze" powoduje "Natychmiastową śmierć AI", ponieważ AI natychmiast umiera z powodu śmiertelnych obrażeń.\n UWAGA: Każdy inny tryb niż "Zawsze" wymaga włączenia nieprzytomności AI. Legt fest, wann KI-Einheiten tödliche Verletzungen erleiden können. Eine tödliche Verletzung wird bei erheblichem Schaden an Kopf oder Körper verursacht.\nWenn "Immer" eingestellt ist, erzeugt diese Einstellung das "KI Sofort-Tod" Verhalten. KI-Einheiten sterben sofort durch jede tödliche Verletzung.\nBEACHTE: Eine andere Einstellung als "Immer" bedingt, dass "KI-Bewusstlosigkeit" verwendet wird. Определяет могут ли игроки получить смертельные травмы. Смертельная травма вызывается значительным повреждением головы или туловища.\nКогда установлено «Всегда», это вызывает поведение «Мгновенной смерти ИИ», так как ИИ немедленно умрет от любой смертельной травмы.\nПРИМЕЧАНИЕ: Любой режим, кроме «Всегда», требует включения функции «Потеря сознания». + Controla cuándo la IA puede sufrir lesiones fatales. Una lesión fatal es causada por un daño significativo en la cabeza o el cuerpo. \n Cuando se establece en "Siempre", esto produce efectivamente un comportamiento de "Muerte instantánea de IA", ya que la IA morirá inmediatamente por cualquier lesión fatal. \n NOTA: Cualquier modo que no sea "Siempre" requiere que la inconsciencia de la IA esté habilitada. AI Unconsciousness @@ -95,10 +100,11 @@ Kontrolliert, ob KI bewusstlos werden kann anstatt sofort zu sterben.\nDiese Einstellung funktioniert zusammen mit der Einstellung "Tödliche KI-Verletzungen". Denn wenn eine Einheit einen Herzstillstand erleiden soll, muss diese auch in der Lage sein, bewusstlos zu werden.\nDennoch sind diese beiden Einstellungen voneinander getrennt, da Einheiten auch durch kritische Vitalwerte bewusstlos werden können, die durch nicht tödliche Verletzungen aufgetreten sind.\nZusammengefasst bedeutet das, dass wenn KI-Einheiten einen Herzstillstand erleiden sollen, diese Einstellung aktiviert sein muss. Управляет тем, может ли ИИ потерять сознание, вместо того, чтобы немедленно умереть.\nЭтот параметр работает вместе с параметром «Смертельные раны ИИ», поскольку при остановке сердца требуется, чтобы юнит мог потерять сознание.\nОднако эти настройки разделены, потому что юниты могут потерять сознание из-за критических ранений жизненно важных органов, полученных в результате несмертельных травм.\nВ сущности, это означает, что для включения остановки сердца для ИИ этот параметр должен быть включен. Yapay zekanın hemen ölmek yerine bilinçsiz duruma geçip geçemeyeceğini kontrol eder. \ Bu ayar, "Yapay Zeka Ölümcül Yaralanmalar" ayarı ile birlikte çalışır, çünkü kalp durması, ünitenin bilinçsiz duruma geçebilmesini gerektirir. \ Özünde, bunun anlamı şudur: AI birimleri için kalp durmasını etkinleştirirseniz, bu ayar etkinleştirilmelidir. + Controla si la IA puede quedar inconsciente en lugar de morir de inmediato. \n Esta configuración funciona junto con la configuración de "Heridas mortales IA", ya que, sufrir un paro cardíaco requiere que la unidad pueda quedar inconsciente. \n Sin embargo, estas configuraciones están separadas porque las unidades pueden perder el conocimiento de los signos vitales críticos como resultado de lesiones no mortales. \n En esencia, esto significa que para habilitar el paro cardíaco en las unidades de IA, esta configuración debe estar habilitada. Cardiac Arrest Time - Zeit bis zum Herzstillstand + Überlebenszeit im Herzstillstand 心停止時間 Длительность остановки сердца Durée de l'arrêt cardiaque @@ -108,6 +114,7 @@ Délka srdeční zástavy Czas Zatrzymania Akcji Serca Kalp Durma Süresi + Tiempo de paro cardíaco Controls how long it takes to die from cardiac arrest. @@ -119,7 +126,9 @@ Controlla quanto tempo ci vuole per morire di arresto cardiaco. Nastavuje po jak dlouhé době pacient zemře kvůli srdeční zástavě. Definiuje czas potrzebny na śmierć z powodu zatrzymania akcji serca. + Bestimmt die Dauer bis zum Tod durch Herzstillstand. Ne kadar süre de kalbi durarak ölmesini belirleyin. + Controla cuanto tiempo dura el paro cardiaco antes de morir. In Cardiac Arrest @@ -133,6 +142,25 @@ V srdeční zástavě Zatrzymanie Akcji Serca Kalbi Durdu + En parada cardíaca + + + Bleedout During Cardiac Arrest + Кровотечение во время остановки сердца + Ausbluten im Herzstillstand + Saignement durant l'arrêt cardiaque + 心停止中の失血 + Desangrado durante parada cardíaca + Wykrwawienie podczas zatrzymanej akcji serca + + + Controls whether a person can die in cardiac arrest by blood loss before the cardiac arrest time runs out. + Определяет, можно ли умереть от потери крови во время остановки сердца, даже если время жизни при остановке сердца еще не истекло. + Legt fest, ob man während des Herzstillstands durch Blutverlust sterben kann, auch wenn die Überlebenszeit im Herzstillstand noch nicht ausgelaufen ist. + Définit si un joueur en arrêt cardiaque peut mourir par exsanguination, avant que la durée de l'arrêt cardiaque définie ci-dessus ne soit écoulée. + 心停止時間を超え死亡する前に、失血による心停止で死亡するかどうかを決定します。 + COntrola si una persona puede morir en parada cardíaca por causa de pérdida de sangre antes de que se termine el contador de parada cardíaca + Kontroluje czy śmierć osoby może nastąpić poprzez wykrwawienie zanim wyczerpię się Czas Zatrzymania Akcji Serca. diff --git a/addons/medical_status/CfgEventHandlers.hpp b/addons/medical_status/CfgEventHandlers.hpp index 94a04d1af3..48c1c11877 100644 --- a/addons/medical_status/CfgEventHandlers.hpp +++ b/addons/medical_status/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/medical_status/XEH_preInit.sqf b/addons/medical_status/XEH_preInit.sqf index aab312470d..89386bf4fa 100644 --- a/addons/medical_status/XEH_preInit.sqf +++ b/addons/medical_status/XEH_preInit.sqf @@ -12,7 +12,7 @@ PREP_RECOMPILE_END; ["CAManBase", "init", { params ["_unit"]; - private _config = [_unit] call CBA_fnc_getObjectConfig; + private _config = configOf _unit; if (getText (_config >> "simulation") == "UAVPilot") exitWith {TRACE_1("ignore UAV AI",typeOf _unit);}; if (getNumber (_config >> "isPlayableLogic") == 1) exitWith {TRACE_1("ignore logic unit",typeOf _unit)}; @@ -25,4 +25,20 @@ PREP_RECOMPILE_END; addMissionEventHandler ["EntityKilled", {_this call FUNC(handleKilledMission)}]; +if (hasInterface) then { + //Add Inventory action to uncon units + ["CAManBase", "init", { + params ["_unit"]; + + private _id = _unit addAction ["", { + params ["_target", "_caller", "_actionId", "_arguments"]; + + _caller action ["Gear", _target]; + }, nil, 5.1, true, true, "gear", "_target getVariable ['ACE_isUnconscious',false] && {alive _target}", 3.5]; + + _unit setUserActionText [_id, localize "STR_ACTION_GEAR", ""]; + + }, nil, nil, true] call CBA_fnc_addClassEventHandler; +}; + ADDON = true; diff --git a/addons/medical_status/functions/fnc_handleKilled.sqf b/addons/medical_status/functions/fnc_handleKilled.sqf index fb695d6f2b..a78c82bf55 100644 --- a/addons/medical_status/functions/fnc_handleKilled.sqf +++ b/addons/medical_status/functions/fnc_handleKilled.sqf @@ -41,6 +41,8 @@ if (_causeOfDeath != "#scripted") then { _this set [1, _killer]; _this set [2, _instigator]; }; +} else { // in that case, call setDead manually to prevent any issues + [_unit, "#scripted"] call FUNC(setDead); }; TRACE_3("killer info",_killer,_instigator,_causeOfDeath); diff --git a/addons/medical_status/functions/fnc_initUnit.sqf b/addons/medical_status/functions/fnc_initUnit.sqf index 4700d78393..73ff2ce8b6 100644 --- a/addons/medical_status/functions/fnc_initUnit.sqf +++ b/addons/medical_status/functions/fnc_initUnit.sqf @@ -80,5 +80,7 @@ if (_isRespawn) then { [{ params ["_unit"]; TRACE_3("Unit Init",_unit,local _unit,typeOf _unit); + + _unit setVariable [QEGVAR(medical,initialized), true, true]; [QGVAR(initialized), [_unit]] call CBA_fnc_localEvent; }, [_unit], 0.5] call CBA_fnc_waitAndExecute; diff --git a/addons/medical_status/functions/fnc_setUnconsciousState.sqf b/addons/medical_status/functions/fnc_setUnconsciousState.sqf index 715041d701..0a10a29a5d 100644 --- a/addons/medical_status/functions/fnc_setUnconsciousState.sqf +++ b/addons/medical_status/functions/fnc_setUnconsciousState.sqf @@ -31,6 +31,9 @@ _unit setVariable [VAR_UNCON, _active, true]; // Stop AI firing at unconscious units in most situations (global effect) [_unit, "setHidden", "ace_unconscious", _active] call EFUNC(common,statusEffect_set); +// Block radio on unconsciousness for compatibility with captive module +[_unit, "blockRadio", "ace_unconscious", _active] call EFUNC(common,statusEffect_set); + if (_active) then { // Don't bother setting this if not used if (EGVAR(medical,spontaneousWakeUpChance) > 0) then { @@ -52,9 +55,20 @@ if (_active) then { // Do "Unlock controls" user action, co-pilot will then have to do the "Take Controls" actions _unit action ["UnlockVehicleControl", vehicle _unit]; }; + + // Disable AI aiming + if (!isPlayer _unit && {_unit checkAIFeature "WEAPONAIM"}) then { + _unit disableAI "WEAPONAIM"; + _unit setVariable [QGVAR(reenableWeaponAim), true, true]; + }; } else { // Unit has woken up, no longer need to track this _unit setVariable [QEGVAR(medical,lastWakeUpCheck), nil]; + + // Reenable AI aiming + if (_unit getVariable [QGVAR(reenableWeaponAim), false]) then { + _unit enableAI "WEAPONAIM"; + }; }; // This event doesn't correspond to unconscious in statemachine diff --git a/addons/medical_status/initSettings.sqf b/addons/medical_status/initSettings.sqf index 95231b0acc..743c55cc00 100644 --- a/addons/medical_status/initSettings.sqf +++ b/addons/medical_status/initSettings.sqf @@ -5,7 +5,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [0, 25, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QEGVAR(medical,painCoefficient), @@ -14,7 +14,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [0, 25, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QEGVAR(medical,ivFlowRate), @@ -23,4 +23,4 @@ [ELSTRING(medical,Category), LSTRING(SubCategory)], [0, 25, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_treatment/ACE_Medical_Facilities.hpp b/addons/medical_treatment/ACE_Medical_Facilities.hpp index 32ab19d233..443fa93d17 100644 --- a/addons/medical_treatment/ACE_Medical_Facilities.hpp +++ b/addons/medical_treatment/ACE_Medical_Facilities.hpp @@ -23,4 +23,9 @@ class EGVAR(medical,facilities) { "RU_WarfareBFieldhHospital", "USMC_WarfareBFieldhHospital" }; + GM[] = { + "gm_ge_army_shelteraceI_medic", + "gm_ge_army_shelteraceII_medic", + "gm_gc_army_shelterlakII_medic" + }; }; diff --git a/addons/medical_treatment/ACE_Medical_Treatment.hpp b/addons/medical_treatment/ACE_Medical_Treatment.hpp index 1c84e6be0e..f3a498c8e2 100644 --- a/addons/medical_treatment/ACE_Medical_Treatment.hpp +++ b/addons/medical_treatment/ACE_Medical_Treatment.hpp @@ -494,7 +494,6 @@ class ADDON { }; class CutMinor: Cut { effectiveness = 2; - reopeningChance = 0.3; }; class CutMedium: Cut { effectiveness = 1; diff --git a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp index f080c19079..433e8a5a62 100644 --- a/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp +++ b/addons/medical_treatment/ACE_Medical_Treatment_Actions.hpp @@ -79,7 +79,7 @@ class GVAR(actions) { icon = QPATHTOEF(medical_gui,ui\tourniquet.paa); allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; items[] = {"ACE_tourniquet"}; - treatmentTime = 7; + treatmentTime = QGVAR(treatmentTimeTourniquet); condition = QUOTE(!([ARR_2(_patient,_bodyPart)] call FUNC(hasTourniquetAppliedTo))); callbackSuccess = QFUNC(tourniquet); litter[] = {}; @@ -100,7 +100,7 @@ class GVAR(actions) { icon = QPATHTOEF(medical_gui,ui\splint.paa); allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"}; items[] = {"ACE_splint"}; - treatmentTime = 7; + treatmentTime = QGVAR(treatmentTimeSplint); callbackSuccess = QFUNC(splint); condition = QFUNC(canSplint); litter[] = { @@ -117,7 +117,7 @@ class GVAR(actions) { category = "medication"; items[] = {"ACE_morphine"}; condition = ""; - treatmentTime = 5; + treatmentTime = QGVAR(treatmentTimeAutoinjector); callbackSuccess = QFUNC(medication); animationMedic = "AinvPknlMstpSnonWnonDnon_medic1"; sounds[] = {{QPATHTO_R(sounds\Inject.ogg),1,1,50}}; @@ -148,8 +148,9 @@ class GVAR(actions) { allowSelfTreatment = QGVAR(allowSelfIV); category = "advanced"; medicRequired = QGVAR(medicIV); - treatmentTime = 12; + treatmentTime = QGVAR(treatmentTimeIV); items[] = {"ACE_bloodIV"}; + treatmentLocations = QGVAR(locationIV); condition = ""; callbackSuccess = QFUNC(ivBag); animationMedic = "AinvPknlMstpSnonWnonDnon_medic1"; @@ -203,7 +204,7 @@ class GVAR(actions) { medicRequired = 0; treatmentTime = 2.5; items[] = {}; - condition = QUOTE(!GVAR(advancedDiagnose)); + condition = QUOTE(GVAR(advancedDiagnose) == 0); callbackSuccess = QFUNC(diagnose); callbackFailure = ""; callbackProgress = ""; @@ -215,7 +216,7 @@ class GVAR(actions) { displayName = CSTRING(Actions_CheckPulse); displayNameProgress = CSTRING(Check_Pulse_Content); allowedSelections[] = {"All"}; - condition = QGVAR(advancedDiagnose); + condition = QUOTE(GVAR(advancedDiagnose) != 0); callbackSuccess = QFUNC(checkPulse); animationMedicProne = ""; animationMedicSelfProne = ""; @@ -243,11 +244,9 @@ class GVAR(actions) { treatmentLocations = TREATMENT_LOCATIONS_ALL; allowSelfTreatment = 0; medicRequired = 0; - treatmentTime = 15; + treatmentTime = QGVAR(treatmentTimeBodyBag); items[] = {"ACE_bodyBag"}; - // 'vehicle _patient' always returns the body - // '_patient in _patient' always false for body - condition = QUOTE(!alive _patient && {isNull objectParent _patient}); + condition = QFUNC(canPlaceInBodyBag); callbackSuccess = QFUNC(placeInBodyBag); consumeItem = 1; litter[] = {}; @@ -261,7 +260,7 @@ class GVAR(actions) { allowedSelections[] = {"Body"}; allowSelfTreatment = 0; medicRequired = 0; - treatmentTime = 15; + treatmentTime = QGVAR(treatmentTimeCPR); items[] = {}; condition = QFUNC(canCPR); callbackSuccess = QFUNC(cprSuccess); diff --git a/addons/medical_treatment/CfgEventHandlers.hpp b/addons/medical_treatment/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/medical_treatment/CfgEventHandlers.hpp +++ b/addons/medical_treatment/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/medical_treatment/XEH_PREP.hpp b/addons/medical_treatment/XEH_PREP.hpp index 480a65f2cb..0c0f11742f 100644 --- a/addons/medical_treatment/XEH_PREP.hpp +++ b/addons/medical_treatment/XEH_PREP.hpp @@ -6,6 +6,7 @@ PREP(bandageLocal); PREP(bodyCleanupLoop); PREP(canBandage); PREP(canCPR); +PREP(canPlaceInBodyBag); PREP(canSplint); PREP(canStitch); PREP(canTreat); diff --git a/addons/medical_treatment/XEH_postInit.sqf b/addons/medical_treatment/XEH_postInit.sqf index 413f96cd43..3d01cb7158 100644 --- a/addons/medical_treatment/XEH_postInit.sqf +++ b/addons/medical_treatment/XEH_postInit.sqf @@ -34,8 +34,8 @@ if (isServer) then { [QGVAR(addToTriageCard), LINKFUNC(addToTriageCard)] call CBA_fnc_addEventHandler; // replace medical items with their ACE equivalents -["ace_settingsInitialized", { - TRACE_1("ace_settingsInitialized EH",GVAR(convertItems)); // 0: Enabled 1: RemoveOnly 2:Disabled +["CBA_settingsInitialized", { + TRACE_1("CBA_settingsInitialized EH",GVAR(convertItems)); // 0: Enabled 1: RemoveOnly 2:Disabled if (GVAR(convertItems) == 2) exitWith {}; { // turn [["stuff", 2], ...] into ["stuff", "stuff", ...] diff --git a/addons/medical_treatment/config.cpp b/addons/medical_treatment/config.cpp index 29c11c18ad..7506903b46 100644 --- a/addons/medical_treatment/config.cpp +++ b/addons/medical_treatment/config.cpp @@ -3,8 +3,8 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; - weapons[] = {}; + units[] = {"ACE_fieldDressingItem","ACE_packingBandageItem","ACE_elasticBandageItem","ACE_tourniquetItem","ACE_splintItem","ACE_morphineItem","ACE_adenosineItem","ACE_epinephrineItem","ACE_plasmaIVItem","ACE_bloodIVItem","ACE_salineIVItem","ACE_quikClotItem","ACE_personalAidKitItem","ACE_surgicalKitItem","ACE_bodyBagItem","ACE_medicalSupplyCrate","ACE_medicalSupplyCrate_advanced"}; + weapons[] = {"ACE_fieldDressing","ACE_packingBandage","ACE_elasticBandage","ACE_tourniquet","ACE_splint","ACE_morphine","ACE_adenosine","ACE_epinephrine","ACE_plasmaIV","ACE_plasmaIV_500","ACE_plasmaIV_250","ACE_bloodIV","ACE_bloodIV_500","ACE_bloodIV_250","ACE_salineIV","ACE_salineIV_500","ACE_salineIV_250","ACE_quikclot","ACE_personalAidKit","ACE_surgicalKit","ACE_bodyBag"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_medical_status", "ace_medical_damage", "ace_apl"}; author = ECSTRING(common,ACETeam); diff --git a/addons/medical_treatment/functions/fnc_bandageLocal.sqf b/addons/medical_treatment/functions/fnc_bandageLocal.sqf index 61f1d695b5..d02ab8f749 100644 --- a/addons/medical_treatment/functions/fnc_bandageLocal.sqf +++ b/addons/medical_treatment/functions/fnc_bandageLocal.sqf @@ -55,25 +55,25 @@ if (EGVAR(medical,limping) == 1 && {_partIndex > 3} && {_amountOf <= 0} && {_pat [_patient] call EFUNC(medical_engine,updateDamageEffects); }; -if (GVAR(clearTraumaAfterBandage)) then { - TRACE_2("clearTraumaAfterBandage - checking open wounds",_partIndex,_openWounds); - if ((_openWounds findIf { - _x params ["", "_xBodyPartN", "_xAmountOf"]; - (_partIndex ==_xBodyPartN) && {_xAmountOf > 0} - }) == -1) then { - - private _bodyPartDamage = _patient getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]]; +if (GVAR(clearTrauma) == 2) then { + TRACE_2("clearTrauma - clearing trauma after bandage",_partIndex,_openWounds); + private _treatedDamageOf = (_wound select 4) * _impact; + private _bodyPartDamage = _patient getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]]; + private _newDam = (_bodyPartDamage select _partIndex) - _treatedDamageOf; + if (_newDam < 0.05) then { // Prevent obscenely small damage from lack of floating precision _bodyPartDamage set [_partIndex, 0]; - _patient setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true]; - TRACE_2("fully healed",_partIndex,_bodyPartDamage); + } else { + _bodyPartDamage set [_partIndex, _newDam]; + }; + _patient setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true]; + TRACE_2("clearTrauma - healed damage",_partIndex,_treatedDamageOf); - switch (_partIndex) do { - case 0: { [_patient, true, false, false, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; - case 1: { [_patient, false, true, false, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; - case 2; - case 3: { [_patient, false, false, true, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; - default { [_patient, false, false, false, true] call EFUNC(medical_engine,updateBodyPartVisuals); }; - }; + switch (_partIndex) do { + case 0: { [_patient, true, false, false, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; + case 1: { [_patient, false, true, false, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; + case 2; + case 3: { [_patient, false, false, true, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; + default { [_patient, false, false, false, true] call EFUNC(medical_engine,updateBodyPartVisuals); }; }; }; diff --git a/addons/medical_treatment/functions/fnc_canCPR.sqf b/addons/medical_treatment/functions/fnc_canCPR.sqf index 406bccdb67..6efd2f268b 100644 --- a/addons/medical_treatment/functions/fnc_canCPR.sqf +++ b/addons/medical_treatment/functions/fnc_canCPR.sqf @@ -19,5 +19,5 @@ params ["", "_patient"]; !(_patient call EFUNC(common,isAwake)) -&& {GVAR(advancedDiagnose) || {IN_CRDC_ARRST(_patient)}} // if basic diagnose, then only show action if appropriate (they can't tell difference between uncon/ca) +&& {(GVAR(advancedDiagnose) != 0) || {IN_CRDC_ARRST(_patient)}} // if basic diagnose, then only show action if appropriate (they can't tell difference between uncon/ca) && {isNull (_patient getVariable [QEGVAR(medical,CPR_provider), objNull])} diff --git a/addons/medical_treatment/functions/fnc_canPlaceInBodyBag.sqf b/addons/medical_treatment/functions/fnc_canPlaceInBodyBag.sqf new file mode 100644 index 0000000000..2fa3b01939 --- /dev/null +++ b/addons/medical_treatment/functions/fnc_canPlaceInBodyBag.sqf @@ -0,0 +1,24 @@ +#include "script_component.hpp" +/* + * Author: Brett Mayson + * Checks if the patient can be placed in a bodybag. + * + * 'vehicle _patient' always returns the body + * '_patient in _patient' always false for body + * + * Arguments: + * 0: Medic (not used) + * 1: Patient + * + * Return Value: + * Can Place in Bodybag + * + * Example: + * [player, cursorObject] call ace_medical_treatment_fnc_canPlaceInBodybag + * + * Public: No + */ + +params ["", "_patient"]; + +(isNull objectParent _patient) && {!(_patient call EFUNC(common,isAwake))} diff --git a/addons/medical_treatment/functions/fnc_canStitch.sqf b/addons/medical_treatment/functions/fnc_canStitch.sqf index ea4318874d..a542de23f1 100644 --- a/addons/medical_treatment/functions/fnc_canStitch.sqf +++ b/addons/medical_treatment/functions/fnc_canStitch.sqf @@ -18,4 +18,4 @@ params ["", "_patient"]; -!(_patient call FUNC(getStitchableWounds) isEqualTo []) +(_patient call FUNC(getStitchableWounds) isNotEqualTo []) diff --git a/addons/medical_treatment/functions/fnc_checkResponse.sqf b/addons/medical_treatment/functions/fnc_checkResponse.sqf index 0fe0bbd60e..fd661f0809 100644 --- a/addons/medical_treatment/functions/fnc_checkResponse.sqf +++ b/addons/medical_treatment/functions/fnc_checkResponse.sqf @@ -18,7 +18,15 @@ params ["_medic", "_patient"]; -private _output = [LSTRING(Check_Response_Unresponsive), LSTRING(Check_Response_Responsive)] select (_patient call EFUNC(common,isAwake)); + +private _output = if (_patient call EFUNC(common,isAwake)) then { + LSTRING(Check_Response_Responsive) +} else { + if ((GVAR(advancedDiagnose) == 2) && {IN_CRDC_ARRST(_patient)}) exitWith { LSTRING(Check_Response_CardiacArrest) }; + if ((GVAR(advancedDiagnose) == 2) && {!alive _patient}) exitWith { LSTRING(Check_Response_Dead) }; + LSTRING(Check_Response_Unresponsive) +}; + [[_output, _patient call EFUNC(common,getName)], 2] call EFUNC(common,displayTextStructured); [_patient, "quick_view", _output, [[_patient, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); diff --git a/addons/medical_treatment/functions/fnc_cprLocal.sqf b/addons/medical_treatment/functions/fnc_cprLocal.sqf index 3d9dfd1e32..89abfdeacf 100644 --- a/addons/medical_treatment/functions/fnc_cprLocal.sqf +++ b/addons/medical_treatment/functions/fnc_cprLocal.sqf @@ -21,10 +21,12 @@ TRACE_2("cprLocal",_medic,_patient); [_patient, "activity", LSTRING(Activity_CPR), [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); -if ((random 1) < GVAR(cprSuccessChance)) then { - TRACE_1("CPR random success",GVAR(cprSuccessChance)); +private _bloodVolume = GET_BLOOD_VOLUME(_patient); +private _successChance = linearConversion [BLOOD_VOLUME_CLASS_4_HEMORRHAGE, BLOOD_VOLUME_CLASS_2_HEMORRHAGE, _bloodVolume, GVAR(cprSuccessChanceMin), GVAR(cprSuccessChanceMax), true]; +if ((random 1) < _successChance) then { + TRACE_2("CPR random success",_bloodVolume,_successChance); [QEGVAR(medical,CPRSucceeded), _patient] call CBA_fnc_localEvent; } else { - TRACE_1("CPR random fail",GVAR(cprSuccessChance)); + TRACE_2("CPR random fail",_bloodVolume,_successChance); }; diff --git a/addons/medical_treatment/functions/fnc_cprProgress.sqf b/addons/medical_treatment/functions/fnc_cprProgress.sqf index f41fefe5bf..f3d565f99a 100644 --- a/addons/medical_treatment/functions/fnc_cprProgress.sqf +++ b/addons/medical_treatment/functions/fnc_cprProgress.sqf @@ -23,5 +23,5 @@ _args params ["_medic", "_patient"]; // Cancel CPR if patient wakes up !(_patient call EFUNC(common,isAwake)) -&& {(GVAR(advancedDiagnose)) || {IN_CRDC_ARRST(_patient)}} // if basic diagnose, then only show action if appropriate (they can't tell difference between uncon/ca) +&& {(GVAR(advancedDiagnose) != 0) || {IN_CRDC_ARRST(_patient)}} // if basic diagnose, then only show action if appropriate (they can't tell difference between uncon/ca) && {_medic == (_patient getVariable [QEGVAR(medical,CPR_provider), objNull])} diff --git a/addons/medical_treatment/functions/fnc_fullHealLocal.sqf b/addons/medical_treatment/functions/fnc_fullHealLocal.sqf index b1e64afa42..0a1c498d41 100644 --- a/addons/medical_treatment/functions/fnc_fullHealLocal.sqf +++ b/addons/medical_treatment/functions/fnc_fullHealLocal.sqf @@ -36,6 +36,11 @@ _patient setVariable [VAR_PAIN, 0, true]; _patient setVariable [VAR_BLOOD_VOL, DEFAULT_BLOOD_VOLUME, true]; // Tourniquets +{ + if (_x != 0) then { + [_patient, "ACE_tourniquet"] call EFUNC(common,addToInventory); + }; +} forEach GET_TOURNIQUETS(_patient); _patient setVariable [VAR_TOURNIQUET, DEFAULT_TOURNIQUET_VALUES, true]; _patient setVariable [QGVAR(occludedMedications), nil, true]; diff --git a/addons/medical_treatment/functions/fnc_getStitchTime.sqf b/addons/medical_treatment/functions/fnc_getStitchTime.sqf index 9d0254605a..12c770eb95 100644 --- a/addons/medical_treatment/functions/fnc_getStitchTime.sqf +++ b/addons/medical_treatment/functions/fnc_getStitchTime.sqf @@ -18,4 +18,4 @@ params ["", "_patient"]; -count (_patient call FUNC(getStitchableWounds)) * WOUND_STITCH_TIME +count (_patient call FUNC(getStitchableWounds)) * GVAR(woundStitchTime) diff --git a/addons/medical_treatment/functions/fnc_handleBandageOpening.sqf b/addons/medical_treatment/functions/fnc_handleBandageOpening.sqf index daa8b5f2ef..31affbb311 100644 --- a/addons/medical_treatment/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical_treatment/functions/fnc_handleBandageOpening.sqf @@ -118,6 +118,24 @@ if (random 1 <= _reopeningChance * GVAR(woundReopenChance)) then { [_target] call EFUNC(medical_status,updateWoundBloodLoss); + // Re-add trauma and damage visuals + if (GVAR(clearTrauma) == 2) then { + private _injuryDamage = (_selectedInjury select 4) * _impact; + private _bodyPartDamage = _target getVariable [QEGVAR(medical,bodyPartDamage), [0,0,0,0,0,0]]; + private _newDam = (_bodyPartDamage select _selBodyPart) + _injuryDamage; + _bodyPartDamage set [_selBodyPart, _newDam]; + + _target setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true]; + + switch (_selBodyPart) do { + case 0: { [_target, true, false, false, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; + case 1: { [_target, false, true, false, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; + case 2; + case 3: { [_target, false, false, true, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; + default { [_target, false, false, false, true] call EFUNC(medical_engine,updateBodyPartVisuals); }; + }; + }; + // Check if we gained limping from this wound re-opening if ((EGVAR(medical,limping) == 1) && {_bodyPartN > 3}) then { [_target] call EFUNC(medical_engine,updateDamageEffects); diff --git a/addons/medical_treatment/functions/fnc_isInMedicalFacility.sqf b/addons/medical_treatment/functions/fnc_isInMedicalFacility.sqf index fe144ea78a..d2789f5d38 100644 --- a/addons/medical_treatment/functions/fnc_isInMedicalFacility.sqf +++ b/addons/medical_treatment/functions/fnc_isInMedicalFacility.sqf @@ -21,7 +21,7 @@ params ["_unit"]; private _fnc_check = { private _position = _unit modelToWorldVisual [0, 0, eyePos _unit select 2]; - CHECK_OBJECTS(ARR_5(lineIntersectsWith [_position, _position vectorAdd [0, 0, 10], _unit])) || {CHECK_OBJECTS(_unit nearObjects 7.5)} + CHECK_OBJECTS(lineIntersectsWith [ARR_3(_position, _position vectorAdd [ARR_3(0, 0, 10)], _unit)]) || {CHECK_OBJECTS(_unit nearObjects 7.5)} }; [[], _fnc_check, _unit, QGVAR(inMedicalFacilityCache), IN_MEDICAL_FACILITY_CACHE_EXPIRY] call EFUNC(common,cachedCall); diff --git a/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf b/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf index 4b06ffdb55..dda930a4f4 100644 --- a/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf +++ b/addons/medical_treatment/functions/fnc_isMedicalVehicle.sqf @@ -17,4 +17,4 @@ params ["_vehicle"]; -_vehicle getVariable [QEGVAR(medical,isMedicalVehicle), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant") > 0] +_vehicle getVariable [QEGVAR(medical,isMedicalVehicle), getNumber (configOf _vehicle >> "attendant") > 0] diff --git a/addons/medical_treatment/functions/fnc_loadUnit.sqf b/addons/medical_treatment/functions/fnc_loadUnit.sqf index 74e66d517b..8b556014e1 100644 --- a/addons/medical_treatment/functions/fnc_loadUnit.sqf +++ b/addons/medical_treatment/functions/fnc_loadUnit.sqf @@ -43,7 +43,7 @@ if (isNull _vehicle) exitWith { TRACE_1("no vehicle found",_vehicle); }; params ["_unit", "_vehicle"]; TRACE_2("success",_unit,_vehicle); private _patientName = [_unit, false, true] call EFUNC(common,getName); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[LSTRING(LoadedInto), _patientName, _vehicleName], 3] call EFUNC(common,displayTextStructured); }, [_patient, _vehicle], 3, { params ["_unit", "_emptyPos"]; diff --git a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf index 1f9ef981dd..da2253ca18 100644 --- a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf @@ -41,7 +41,7 @@ if (_maxDosage > 0) then { }; } forEach _incompatibleMedication; -if !(_overdosedMedications isEqualTo []) then { +if (_overdosedMedications isNotEqualTo []) then { private _medicationConfig = (configFile >> "ace_medical_treatment" >> "Medication"); private _onOverDose = getText (_medicationConfig >> "onOverDose"); if (isClass (_medicationConfig >> _className)) then { diff --git a/addons/medical_treatment/functions/fnc_placeInBodyBag.sqf b/addons/medical_treatment/functions/fnc_placeInBodyBag.sqf index 02feb52025..3154107e01 100644 --- a/addons/medical_treatment/functions/fnc_placeInBodyBag.sqf +++ b/addons/medical_treatment/functions/fnc_placeInBodyBag.sqf @@ -4,7 +4,7 @@ * Places a dead body inside a body bag. * * Arguments: - * 0: Medic (not used) + * 0: Medic * 1: Patient * * Return Value: @@ -16,9 +16,14 @@ * Public: No */ -params ["", "_patient"]; +params ["_medic", "_patient"]; TRACE_1("placeInBodyBag",_patient); +if ((alive _patient) && {!GVAR(allowBodyBagUnconscious)}) exitWith { + [_medic, "ACE_bodyBag"] call EFUNC(common,addToInventory); // re-add slighly used bodybag? + [LSTRING(bodybagWhileStillAlive)] call EFUNC(common,displayTextStructured); +}; + if (!local _patient) exitWith { TRACE_1("Calling where local",local _patient); [QGVAR(placeInBodyBag), [nil, _patient], _patient] call CBA_fnc_targetEvent; diff --git a/addons/medical_treatment/functions/fnc_surgicalKitProgress.sqf b/addons/medical_treatment/functions/fnc_surgicalKitProgress.sqf index 9dcd7265e1..9928936f30 100644 --- a/addons/medical_treatment/functions/fnc_surgicalKitProgress.sqf +++ b/addons/medical_treatment/functions/fnc_surgicalKitProgress.sqf @@ -28,14 +28,14 @@ private _stitchableWounds = _patient call FUNC(getStitchableWounds); if (_stitchableWounds isEqualTo []) exitWith {false}; // Not enough time has elapsed to stitch a wound -if (_totalTime - _elapsedTime > (count _stitchableWounds - 1) * WOUND_STITCH_TIME) exitWith {true}; +if (_totalTime - _elapsedTime > (count _stitchableWounds - 1) * GVAR(woundStitchTime)) exitWith {true}; private _bandagedWounds = GET_BANDAGED_WOUNDS(_patient); private _stitchedWounds = GET_STITCHED_WOUNDS(_patient); // Remove the first stitchable wound from the bandaged wounds private _treatedWound = _bandagedWounds deleteAt (_bandagedWounds find (_stitchableWounds select 0)); -_treatedWound params ["_treatedID", "_treatedBodyPartN", "_treatedAmountOf"]; +_treatedWound params ["_treatedID", "_treatedBodyPartN", "_treatedAmountOf", "", "_treatedDamageOf"]; // Check if we need to add a new stitched wound or increase the amount of an existing one private _woundIndex = _stitchedWounds findIf { @@ -51,6 +51,22 @@ if (_woundIndex == -1) then { _wound set [2, (_wound select 2) + _treatedAmountOf]; }; +if (GVAR(clearTrauma) == 1) then { + TRACE_2("clearTrauma - clearing trauma after stitching",_partIndex,_treatedWound); + private _bodyPartDamage = _patient getVariable [QEGVAR(medical,bodyPartDamage), []]; + _bodyPartDamage set [_treatedBodyPartN, (_bodyPartDamage select _treatedBodyPartN) - _treatedDamageOf]; + _patient setVariable [QEGVAR(medical,bodyPartDamage), _bodyPartDamage, true]; + TRACE_2("clearTrauma - healed damage",_partIndex,_treatedDamageOf); + + switch (_treatedBodyPartN) do { + case 0: { [_patient, true, false, false, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; + case 1: { [_patient, false, true, false, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; + case 2; + case 3: { [_patient, false, false, true, false] call EFUNC(medical_engine,updateBodyPartVisuals); }; + default { [_patient, false, false, false, true] call EFUNC(medical_engine,updateBodyPartVisuals); }; + }; +}; + _patient setVariable [VAR_BANDAGED_WOUNDS, _bandagedWounds, true]; _patient setVariable [VAR_STITCHED_WOUNDS, _stitchedWounds, true]; diff --git a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf index aebf56a6ff..2eb620bf77 100644 --- a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf +++ b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf @@ -40,7 +40,7 @@ TRACE_1("clearConditionCaches: tourniquetRemove",_nearPlayers); // Add tourniquet item to medic's inventory // todo: should there be a setting to select who receives the removed tourniquet? -[_medic, "ACE_tourniquet", true] call EFUNC(common,addToInventory); +[_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/functions/fnc_treatment.sqf b/addons/medical_treatment/functions/fnc_treatment.sqf index 01d3cabc8d..b99e703f22 100644 --- a/addons/medical_treatment/functions/fnc_treatment.sqf +++ b/addons/medical_treatment/functions/fnc_treatment.sqf @@ -147,6 +147,8 @@ if (_callbackProgress isEqualTo {}) then { [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem] call _callbackStart; +["ace_treatmentStarted", [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem]] call CBA_fnc_localEvent; + [ _treatmentTime, [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem], diff --git a/addons/medical_treatment/functions/fnc_treatmentFailure.sqf b/addons/medical_treatment/functions/fnc_treatmentFailure.sqf index f59331fc77..3519c3fba0 100644 --- a/addons/medical_treatment/functions/fnc_treatmentFailure.sqf +++ b/addons/medical_treatment/functions/fnc_treatmentFailure.sqf @@ -48,3 +48,5 @@ if (!isNil QEGVAR(advanced_fatigue,setAnimExclusions)) then { GET_FUNCTION(_callbackFailure,configFile >> QGVAR(actions) >> _classname >> "callbackFailure"); _args call _callbackFailure; + +["ace_treatmentFailed", [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem]] call CBA_fnc_localEvent; diff --git a/addons/medical_treatment/functions/fnc_treatmentSuccess.sqf b/addons/medical_treatment/functions/fnc_treatmentSuccess.sqf index 07dd5261b3..06ad566d5c 100644 --- a/addons/medical_treatment/functions/fnc_treatmentSuccess.sqf +++ b/addons/medical_treatment/functions/fnc_treatmentSuccess.sqf @@ -19,7 +19,7 @@ */ params ["_args"]; -_args params ["_medic", "_patient", "_bodyPart", "_classname"]; +_args params ["_medic", "_patient", "_bodyPart", "_classname", "_itemUser", "_usedItem"]; // Switch medic to end animation immediately private _endInAnim = _medic getVariable QGVAR(endInAnim); @@ -48,4 +48,4 @@ _args call _callbackSuccess; _args call FUNC(createLitter); // Emit local event for medical API -["ace_treatmentSucceded", [_medic, _patient, _bodyPart, _classname]] call CBA_fnc_localEvent; +["ace_treatmentSucceded", [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem]] call CBA_fnc_localEvent; diff --git a/addons/medical_treatment/functions/fnc_unloadUnit.sqf b/addons/medical_treatment/functions/fnc_unloadUnit.sqf index 6baeb005ca..07410493ad 100644 --- a/addons/medical_treatment/functions/fnc_unloadUnit.sqf +++ b/addons/medical_treatment/functions/fnc_unloadUnit.sqf @@ -36,7 +36,7 @@ if (_patient call EFUNC(common,isAwake)) exitWith { params ["_unit", "_vehicle"]; TRACE_2("success",_unit,_vehicle); private _patientName = [_unit, false, true] call EFUNC(common,getName); - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); [[LSTRING(UnloadedFrom), _patientName, _vehicleName], 3] call EFUNC(common,displayTextStructured); }, [_patient, vehicle _patient], 3, { params ["_unit", "_vehicle"]; diff --git a/addons/medical_treatment/initSettings.sqf b/addons/medical_treatment/initSettings.sqf index 3b68a0409f..40e8dcaf87 100644 --- a/addons/medical_treatment/initSettings.sqf +++ b/addons/medical_treatment/initSettings.sqf @@ -1,11 +1,11 @@ [ QGVAR(advancedDiagnose), - "CHECKBOX", + "LIST", [LSTRING(AdvancedDiagnose_DisplayName), LSTRING(AdvancedDiagnose_Description)], [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], - true, + [[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), LSTRING(AdvancedDiagnose_DiagnoseCardiacArrest)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(advancedMedication), @@ -14,7 +14,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(advancedBandages), @@ -23,7 +23,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), LSTRING(AdvancedBandages_EnabledCanReopen)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(woundReopenChance), @@ -32,26 +32,26 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0, 5, 1, 2], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ - QGVAR(clearTraumaAfterBandage), - "CHECKBOX", - [LSTRING(ClearTraumaAfterBandage_DisplayName), LSTRING(ClearTraumaAfterBandage_Description)], + QGVAR(clearTrauma), + "LIST", + [LSTRING(ClearTrauma_DisplayName), LSTRING(ClearTrauma_Description)], [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], - false, + [[0, 1, 2], [ELSTRING(common,Never), LSTRING(ClearTrauma_AfterStitch), LSTRING(ClearTrauma_AfterBandage)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; // todo: should this setting differentiate between medical vehicles and facilities? [ QGVAR(locationsBoostTraining), "CHECKBOX", - [LSTRING(LocationsBoostTraining_DisplayName), LSTRING(LocationsBoostTraining_Description)], + [ELSTRING(common,LocationsBoostTraining_DisplayName), LSTRING(LocationsBoostTraining_Description)], [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], false, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowSharedEquipment), @@ -60,7 +60,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(AllowSharedEquipment_PriorityPatient), LSTRING(AllowSharedEquipment_PriorityMedic), ELSTRING(common,No)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(convertItems), @@ -69,7 +69,43 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [ELSTRING(common,Enabled), LSTRING(ConvertItems_RemoveOnly), ELSTRING(common,Disabled)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(treatmentTimeAutoinjector), + "SLIDER", + [LSTRING(TreatmentTimeAutoinjector_DisplayName), LSTRING(TreatmentTimeAutoinjector_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [0.1, 60, 5, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(treatmentTimeTourniquet), + "SLIDER", + [LSTRING(TreatmentTimeTourniquet_DisplayName), LSTRING(TreatmentTimeTourniquet_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [0.1, 60, 7, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(treatmentTimeSplint), + "SLIDER", + [LSTRING(TreatmentTimeSplint_DisplayName), LSTRING(TreatmentTimeSplint_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [0.1, 60, 7, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(treatmentTimeBodyBag), + "SLIDER", + [LSTRING(TreatmentTimeBodyBag_DisplayName), LSTRING(TreatmentTimeBodyBag_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [0.1, 60, 15, 1], + true +] call CBA_fnc_addSetting; [ QGVAR(medicEpinephrine), @@ -78,7 +114,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(locationEpinephrine), @@ -87,7 +123,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(medicPAK), @@ -96,7 +132,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(locationPAK), @@ -105,7 +141,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 3], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(consumePAK), @@ -114,7 +150,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowSelfPAK), @@ -123,7 +159,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(timeCoefficientPAK), @@ -132,7 +168,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0, 5, 1, 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(medicSurgicalKit), @@ -141,7 +177,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(locationSurgicalKit), @@ -150,7 +186,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 2], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(consumeSurgicalKit), @@ -159,7 +195,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowSelfStitch), @@ -168,7 +204,16 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(woundStitchTime), + "SLIDER", + [LSTRING(WoundStitchTime_DisplayName), LSTRING(WoundStitchTime_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [0.1, 60, 5, 1], + true +] call CBA_fnc_addSetting; [ QGVAR(medicIV), @@ -177,7 +222,16 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2], [LSTRING(Anyone), LSTRING(Medics), LSTRING(Doctors)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(locationIV), + "LIST", + [LSTRING(LocationIV_DisplayName), LSTRING(LocationIV_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [[0, 1, 2, 3, 4], [ELSTRING(common,Anywhere), ELSTRING(common,Vehicle), LSTRING(MedicalFacilities), LSTRING(VehiclesAndFacilities), ELSTRING(common,Disabled)], 0], + 1 +] call CBA_fnc_addSetting; [ QGVAR(allowSelfIV), @@ -186,16 +240,52 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1], [ELSTRING(common,No), ELSTRING(common,Yes)], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ - QGVAR(cprSuccessChance), + QGVAR(treatmentTimeIV), "SLIDER", - [LSTRING(CPRSuccessChance_DisplayName), LSTRING(CPRSuccessChance_Description)], + [LSTRING(TreatmentTimeIV_DisplayName), LSTRING(TreatmentTimeIV_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [0.1, 60, 12, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(cprSuccessChanceMin), + "SLIDER", + [LSTRING(CPRSuccessChanceMin_DisplayName), LSTRING(CPRSuccessChanceMin_Description)], [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [0, 1, 0.4, 2, true], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(cprSuccessChanceMax), + "SLIDER", + [LSTRING(CPRSuccessChanceMax_DisplayName), LSTRING(CPRSuccessChanceMax_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [0, 1, 0.4, 2, true], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(treatmentTimeCPR), + "SLIDER", + [LSTRING(TreatmentTimeCPR_DisplayName), LSTRING(TreatmentTimeCPR_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + [0.1, 60, 15, 1], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(allowBodyBagUnconscious), + "CHECKBOX", + [LSTRING(AllowBodyBagUnconscious_DisplayName), LSTRING(AllowBodyBagUnconscious_Description)], + [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], + false, + true +] call CBA_fnc_addSetting; [ QGVAR(holsterRequired), @@ -204,7 +294,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Treatment)], [[0, 1, 2, 3, 4], [ELSTRING(common,Disabled), LSTRING(HolsterRequired_Lowered), LSTRING(HolsterRequired_LoweredExam), LSTRING(HolsterRequired_Holstered), LSTRING(HolsterRequired_HolsteredExam)], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowLitterCreation), @@ -213,7 +303,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Litter)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(maxLitterObjects), @@ -222,7 +312,7 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Litter)], [[50, 100, 200, 300, 400, 500, 1000, 2000, 3000, 4000, 5000], [/* settings function will auto create names */], 5], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(litterCleanupDelay), @@ -231,4 +321,4 @@ [ELSTRING(medical,Category), LSTRING(SubCategory_Litter)], [-1, 3600, 600, 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/medical_treatment/stringtable.xml b/addons/medical_treatment/stringtable.xml index 4f36baec44..2e6d800858 100644 --- a/addons/medical_treatment/stringtable.xml +++ b/addons/medical_treatment/stringtable.xml @@ -13,6 +13,7 @@ Léčba Leczenie Tedavi + Tratamiento Litter @@ -26,6 +27,7 @@ Śmieci Abfall Cöp + Basura Advanced Diagnose @@ -39,6 +41,7 @@ Pokročilá diagnóza Zaawansowana Diagnoza Gelişmiş Teşhis + Diagnóstico avanzado Enables the Check Pulse, Check Blood Pressure, and Check Response treatment actions instead of the generic Diagnose action.\nWhen disabled, the CPR action will only be shown when performing CPR is appropriate.\nThe actions this setting enables are needed to determine whether a person is unconscious or in cardiac arrest. @@ -52,6 +55,13 @@ Włącza opcje sprawdzania Pulsu, Ciśnienia Tętniczego Krwi i Reakcje Na Ból, zamiast bardziej ogólnej akcji Diagnozuj.\n Po wyłączeniu tej opcji akcja RKO będzie wyświetlana tylko wtedy, gdy jej wykonanie będzie odpowiednie.\n Opcja, która włącza to ustawienie jest potrzebna do ustalenia, czy osoba jest nieprzytomna lub ma zatrzymanie krążenia. Ermöglicht die 'Überprüfe Puls', 'Überprüfe Blutdruck' und 'Überprüfe Reaktionen' Behandlungsaktionen anstatt der einfachen 'Diagnose' Behandlungsaktion.\nWenn diese Einstellung nicht aktiviert ist, wird die "HLW"-Aktion nur angezeigt, wenn die Anwendung von HLW angemessen ist.\nDie Aktionen, die das Aktivieren dieser Einstellung ermöglicht, werden benötigt um zu bestimmen, ob eine Person bewusstlos ist oder einen Herzstillstand erleidet. Genel Teşhis eylemi yerine Nabzı Kontrol Et, Kan Basıncını Kontrol Et ve Yanıtı Kontrol Et tedavi eylemlerini etkinleştirir. \ Devre dışı bırakıldığında, CPR eylemi yalnızca CPR gerçekleştirilmesi uygun olduğunda gösterilecektir. + Habilita la comprobación del pulso, presión sanguinea y rsepuesta a las acciones del tratamiento en lugar de la acción de diagnóstico genérico. \n Cuando se deshabilita, la acción RCP solo se mostrará cuando realizar un RCP sea apropiado. \n Las acciones activadas de este ajuste son necesarias para determinar si una persona está inconsciente o en parada cardiaca. + + + Enabled & Can Diagnose Death/Cardiac Arrest + Activé & Diagnostic du décès/de l'arrêt cardiaque + Włączone i pozwala zdiagnozować Śmierć/Zatrzymanie Akcji Serca + 死亡/心停止状態でも診断許可 Advanced Medication @@ -65,6 +75,7 @@ Medicazione avanzata Zaawansowane leki Gelişmiş Ilaç + Medicación avanzada Enables extended, more in-depth medication handling. Also, enables the use of Adenosine. @@ -77,6 +88,7 @@ Abilita una gestione della medicazione più estesa e approfondita. Permette inoltre l'utilizzo dell'Adenosina. Ermöglicht erweiterte, mehr tiefgründigere Anwendung von Medikationen. Ebenso ermöglicht es die Benutzung von Adenosin. Pozwala na zaawansowane uzycie leków. Pozwala na używanie Adenozyny. + Habilita el manejo de la medicación más avanzada y en profundidad. Tambien permite el uso de Adenosina. Advanced Bandages @@ -90,6 +102,7 @@ Pokročilé obvazy Zaawansowane Bandaże Gelişmiş Bandajlar + Vendaje avanzado Enables treatment actions for different bandage types instead of the generic Bandage action.\nAdditionally, the reopening of bandaged wounds can also be enabled. @@ -103,6 +116,7 @@ Povoluje specifické obvazy s různými vlastnostmi namísto jednoho univerzálního obvazu. Umożliwia wybranie konkretnego rodzaju bandaża zamiast ogólnej akcji bandażowania. Genel Bandaj eylemi yerine farklı bandaj türleri için tedavi eylemlerini etkinleştirir. \ Ek olarak, bandajlı yaraların yeniden açılması da etkinleştirilebilir. + Habilita las acciones de ttratamiento para distintos tipos de vendajes en lugar de la acción de vendaje genérico Enabled & Can Reopen @@ -112,6 +126,7 @@ Включено и может открыться заново Aktywne & możliwe ponowne otwarcie Etkinleştirildi ve Yeniden Açılabilir + Habilitada y pueden reabrirse Wound Reopening Coefficient @@ -122,6 +137,7 @@ Współczynnik ponownego otwierania ran 再開放係数 Yara Yeniden Açılma Katsayısı + Coeficiente de reapertura de heridas 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. @@ -132,46 +148,23 @@ Współczynnik kontroluje szanse na ponowne otworzenie rany. Końcowa szansa na otworzenie jest ustalana przez pomnożenie tej wartości z wartością szansy na otworzenie rany dla typu rany oraz typu bandaża. 傷が再開放する確率の係数を設定できます。再開放は、この数値と傷の種類、そして使用した包帯に応じて左右されます。 Yaranın yeniden açılma şansını kontrol etme katsayısı. Son yeniden açılma şansı, bu değerin kullanılan yara tipi ve bandaj için spesifik yeniden açılma şansı ile çarpılmasıyla belirlenir. + 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. - - Clear Trauma After Bandage - 治療後に外傷を削除 - 包紮即痊癒 - Guérir les blessures pansées - Odebrat úraz po obvázání - Usuń uraz po zabandażowaniu - Rimozione ferite bendate - Entferne Trauma nach Bandagierung. - Удалять травму после перевязки - Bandaj Sonrası Travmayı Temizle + + Clear Trauma + 外傷の削除 - - Controls whether fully bandaged body parts are healed. - 全ての傷に対して包帯を巻いた部分を治癒するかどうかを決定します。 - Kontroluje czy w pełni zabandażowane części ciała są uleczone. - Définit s'il faut guérir les parties du corps entièrement bandées. - Controlla se le parti del corpo completamente bendate sono guarite. - Kontrolliert, ob voll bandagierte Körperteile geheilt werden. - 控制說當傷口處理好的時候是否直接痊癒。 - Nastavuje zda jsou plně obvázané části těla vyléčena. - Контролирует то, что полностью перевязанные раны целиком исцеляют часть тела. - Tamamen sargılı vücut kısımlarının iyileşip iyileşmediğini kontrol eder. + + Controls when hitpoint damage from wounds is healed. + 治療後に負傷箇所にある外傷の状態を決定できます。 - - Locations Boost Training - Zdravotnická místa zvyšují zdravotnickou úrovně - Sedi per potenziare la formazione - Örtliche Trainingssteigerung - Ubicación mejora entrenamiento. - Miejsca zwiększają wyszkolenie - Localização melhora treinamento - Le lieu améliore l'efficacité - Места ускоренного обучения - 衛生能力の上昇位置 - 교육 증가 지역 - 受所在位置影响提升医疗能力 - 受所在位置影響提升醫療能力 - Konumlar Tedaviyi Hızlandırır + + After Bandage + 包帯を巻いた後 + + + After Stitch + 縫合後 Boost medical training when in medical vehicles or facilities. Untrained becomes medic, medic becomes doctor. @@ -185,6 +178,7 @@ Zwiększ wyszkolenie medyczne w pojazdach lub obiektach medycznych. Niewytrenowana jednostka zostaje medykiem, medyk zostaje lekarzem. Verbessere 'Fähigkeiten-Level' in medizinischen Fahrzeugen oder Einrichtungen. Untrainiert wird zu Sanitäter, Sanitäter wird zu Arzt. Tıbbi araçlar veya tesislerdeyken tıbbi müdaheleyi artırın. Eğitimsizler sıhhiye olur, sıhhiyeler doktor olur. + Aumente la formación médica cuando se encuentre en vehículos o instalaciones médicas. Sin entrenamiento se convierte en médico, médico se convierte en médico. Allow Shared Equipment @@ -198,6 +192,7 @@ Zezwalaj na współdzielenie sprzętu Erlaube geteilte Ausrüstung Paylaşılan Ekipmana İzin Ver + Permite compartir material médico. Controls whether medical equipment can be shared between the patient and the medic. @@ -211,6 +206,7 @@ Kontroluje, czy sprzęt medyczny ma być dzielony między pacjentem a medykiem. Legt fest, ob medizinische Ausrüstung zwischen Patient und Sanitäter geteilt werden kann. Tıbbi ekipmanın hasta ve sağlık görevlisi arasında paylaşılıp paylaşılamayacağını kontrol eder. + Controla si el equipo médico se puede compartir entre el paciente y el médico. Patient's Equipment First @@ -224,6 +220,7 @@ Najpierw sprzęt pacjenta Ausrüstung des Patienten zuerst Önce Hastanın Ekipmanı + Usar equipo médico del paciente en primer lugar. Medic's Equipment First @@ -237,6 +234,95 @@ Najpierw sprzęt medyka Ausrüstung des Sanitäters zuerst İlk Sıhhiyenin Ekipmanı + Usar equipo médico del santiario en primer lugar. + + + Autoinjector Treatment Time + Durée d'interaction - Auto-injecteurs + 注射器の使用時間 + Tiempo de tratamiento de autoinyección + Время ввода автоинъектора + Czas aplikacji autostrzykawki + + + Time, in seconds, required to administer medication using an autoinjector. + Définit le temps nécessaire à l'administration d'une substance auto-injectable (en secondes). + 注射器の使用に掛かる時間 (秒) を決定します。 + Tiempo, en segundos, requerido para administrar medicación utilizando un autoinyectador. + Время, необходимое для введения медикаментов автоинъектором (в секундах). + Czas w sekundach potrzebny do aplikacji medykamentów za pomocą autostrzykawki. + + + Tourniquet Treatment Time + Durée d'interaction - Garrots + Tourniquet-Behandlungszeit + 止血帯の使用時間 + Tiempo de tratamiento de torniquete + Время наложения/снятия жгута + Czas aplikacji stazy + + + Time, in seconds, required to apply/remove a tourniquet. + Définit le temps nécessaire à l'application ou au retrait d'un garrot (en secondes). + Zeit in Sekunden, die benötigt wird, um ein Tourniquet anzuwenden. + 止血帯の使用/排除に掛かる時間 (秒) を決定します。 + Tiempo, en segundos, requerido para aplicar/quitar un torniquete. + Время, необходимое для наложения/снятия жгута (в секундах). + Czas w sekundach potrzebny do założenia/zdjęcia stazy. + + + IV Bag Treatment Time + Durée d'interaction - IVs + IV Beutelbehandlungszeit + 点滴の使用時間 + Tiempo de tratamiento de bolsa de IV + Время применения пакета внутривенного переливания + Czas aplikacji IV + + + Time, in seconds, required to administer an IV bag. + Définit le temps nécessaire à la pose d'une perfusion IV (en secondes). + Zeit in Sekunden, die benötigt wird, um einen Infusionsbeutel aufzutragen. + 点滴の投与に掛かる時間 (秒) を決定します。 + Tiempo, en segundos, requerido para administrar una bolsa de IV. + Время, необходимое для применения пакета внутривенного переливания (в секундах). + Czas w sekundach potrzebny na aplikację transfuzji IV. + + + Splint Treatment Time + Durée d'interaction - Attelles + Schienenbehandlungszeit + 添え木の使用時間 + TIempo de tratamiento de férula + Время наложения шины + Czas aplikacji szyny + + + Time, in seconds, required to apply a splint. + Définit le temps nécessaire à l'application d'une attelle (en secondes). + Zeit in Sekunden, die zum Anbringen einer Schiene benötigt wird. + 添え木の使用に掛かる時間 (秒) を決定します。 + TIempo, en segundos, requerido para aplicar una férula. + Время, необходимое для наложения шины (в секундах). + Czas w sekundach potrzebny na aplikację szyny. + + + Body Bag Use Time + Durée d'interaction - Housses mortuaires + Anwendungszeit für Leichensack + 死体袋の使用時間 + TIempo de uso de bolsa para cuerpos + Время использования мешка для трупов + Czas użycia worka na ciało + + + Time, in seconds, required to put a patient in a body bag. + Définit le temps nécessaire à la mise en housse d'un corps (en secondes). + Zeit in Sekunden, die benötigt wird, um einen Leichensack aufzutragen. + 死体袋の使用に掛かる時間 (秒) を決定します。 + Tiempo, en segundos, requerido para poner a un paciente en una bolsa para cuerpos. + Время, необходимое для того чтобы упаковать труп в мешок (в секундах). + Czas w sekundach potrzebny na spakowanie ciała do worka na ciało. Allow Epinephrine @@ -257,7 +343,7 @@ Training level required to use epinephrine. アドレナリンの使用に訓練レベルを必要とさせます。 - Définit quelle qualification médicale est requise pour pouvoir utiliser l'épinéphrine. + Définit la qualification médicale requise pour utiliser l'épinéphrine. Уровень подготовки, необходимый для использования Адреналина. É necessária uma qualificação médica para usar epinefrina. 要受過何種程度的醫療訓練才可以使用腎上腺素 @@ -266,6 +352,7 @@ Poziom wyszkolenia wymagany do korzystania z epinefryny. 'Fähigkeiten-Level', das benötigt wird, um Epinephrin zu nutzen. Epinefrin kullanmak için gerekli eğitim seviyesi. + Nivel de entrenamiento médico requerido para usar Epinefrina. Locations Epinephrine @@ -286,7 +373,7 @@ Controls where epinephrine can be used. アドレナリンが使える場所を決定します。 - Définit où l'épinéphrine peut être utilisée. + Définit les lieux où l'usage d'épinéphrine est autorisé. Контролирует, где можно использовать Адреналин. Controla onde Epinefrina pode ser utilizada. 控制何處能使用腎上腺素 @@ -295,6 +382,7 @@ Kontroluje, gdzie można stosować epinefrynę. Legt fest, wo Epinephrin genutzt werden kann. Epinefrinin nerelerde kullanılabileceğini kontrol eder + Controla donde puede sr usada la Epinefrina. Allow PAK @@ -316,7 +404,7 @@ Training level required to use a PAK. 応急処置キットの使用に訓練レベルを必要とさせます。 - Définit quelle qualification médicale est requise pour pouvoir utiliser la trousse sanitaire. + Définit la qualification médicale requise pour utiliser la trousse sanitaire. Уровень подготовки, необходимый для использования Аптечки. É necessária uma qualificação médica para usar KPS 要受過何種程度的醫療訓練才可以使用個人急救包 @@ -325,6 +413,7 @@ Poziom wyszkolenia wymagany do korzystania z apteczek osobistych. 'Fähigkeiten-Level', das benötigt wird, um ein Erste-Hilfe-Set zu nutzen. PAK kullanmak için gerekli eğitim seviyesi. + Nivel de entrenamiento requerido para usar EPA Locations PAK @@ -346,7 +435,7 @@ Controls where a PAK can be used. 応急処置キットが使える場所を決定します。 - Définit où la trousse sanitaire peut être utilisée. + Définit les lieux où l'usage de la trousse sanitaire est autorisé. Контролирует, где можно использовать Аптечку. Controla onde o KPS pode ser utilizado. 控制何處能使用個人急救包 @@ -355,6 +444,7 @@ Kontroluje, gdzie można korzystać z apteczek osobistych. Kontrolliert, wo ein Erste-Hilfe-Set benutzt werden kann. PAK'ın nerelerde kullanılabileceğini kontrol eder + Controla donde puede usarse el EPA Consume PAK @@ -368,6 +458,7 @@ Zużycie apteczek osobistych Verbrauche Erste-Hilfe-Set PAK Tüketimi + Consumir EPA Controls whether a PAK should be consumed after use. @@ -381,6 +472,7 @@ Kontroluje, czy apteczka osobista powinna być zużyta po użyciu. Kontrolliert, ob ein Erste-Hilfe-Set nach der Benutzung verbraucht werden soll. Kullanımdan sonra bir PAK tüketilip tüketilmeyeceğini kontrol eder. + Controla si se debe consumir un EPA después de su uso. Self PAK Usage @@ -393,6 +485,7 @@ Samo-použití osobní lékárničky (PAK) Использование аптечки на себе Kendi PAK Kullanımı + Usar EPA sobre uno mismo Enables the use of PAKs to heal oneself. @@ -405,6 +498,7 @@ Umožňuje použít osobní lékárničku (PAK) na sama sebe. Позволяют использовать аптечку на себе в одиночку. Kendini iyileştirmek için PAK'ların kullanılmasını sağlar. + Habilita el uso de EPA para curarse a uno mismo. Time Coefficient PAK @@ -418,6 +512,7 @@ Współczynnik czasu apteczek osobistych Zeit-Koeffizient Erste-Hilfe-Set PAK Zaman Katsayısı + EPA coheficiente de tiempo Modifies how long a PAK takes to apply.\nThe treatment time is based on the total body part damage multiplied by this coefficient, with a minimum of 10 seconds. @@ -431,6 +526,7 @@ Zmienia czas potrzebny na zastosowanie apteczki osobistej.\n Czas leczenia jest oparty na całkowitym uszkodzeniu części ciała pomnożonym przez ten współczynnik, wynosi minimum 10 sekund. Modifiziert, wie lange ein Erste-Hilfe-Set für die Anwendung benötigt.\nDie Behandlungszeit basiert auf der Anzahl des Gesamtkörperschadens multipliziert mit diesem Koeffizienten, mit einen Minimum von 10 Sekunden. Bir PAK'ın uygulanmasının ne kadar süreceğini değiştirir. \ Tedavi süresi, toplam vücut parçası hasarının bu katsayı ile en az 10 saniye çarpımına dayanır. + Modifica el tiempo que tarda en aplicarse un EPA. \n El tiempo de tratamiento se basa en el daño total de la parte del cuerpo multiplicado por este coeficiente, con un mínimo de 10 segundos. Allow Surgical Kit @@ -444,11 +540,12 @@ Ograniczenia Użycia Zestawu Chirurgicznego Erlaube Operations-Set Cerrahi Kitine İzin Ver + Permitir kit quirúrjico Training level required to use a surgical kit. 縫合キットの使用に訓練レベルを必要とさせます。 - Définit quelle qualification médicale est requise pour pouvoir utiliser une trousse chirurgicale. + Définit la qualification médicale requise pour utiliser la trousse chirurgicale. Уровень медицинской подготовки, необходимый для использования Хирургического набора. É necessária uma qualificação médica para usar Kit Cirúrgico 要受過多少程度的醫療訓練才能使用手術包。 @@ -457,6 +554,7 @@ Poziom wyszkolenia wymagany do korzystania z Zestawu Chirurgicznego. 'Fähigkeiten-Level', das benötigt wird um ein Operations-Set zu nutzen. Cerrahi kit kullanmak için gerekli eğitim seviyesi. + Nivel de entrenamiento requerido para usar el kit quirúrgico Locations Surgical Kit @@ -470,11 +568,12 @@ Miejsca użycia Zestawu Chirurgicznego Orte für Operations-Set Cerrahi Kitin kullanılabileceği yerler + Localización de los kits quirúrgicos Controls where a surgical kit can be used. 縫合キットが使える場所を決定します。 - Définit où la trousse chirurgicale peut être utilisée. + Définit les lieux où l'usage de la trousse chirurgicale est autorisé. Контролирует, где можно использовать Хирургический набор Controle onde o Kit Cirúrgico pode ser utilizado. 控制何處能使用手術包 @@ -483,6 +582,7 @@ Kontroluje, gdzie można użyć Zestawu Chirurgicznego. Legt fest, wo ein Operations-Set genutzt werden kann. Cerrahi Kitin nerelerde kullanılabileceğini kontrol eder + Controla donde puede usarse un kit quirúrgico. Consume Surgical Kit @@ -495,6 +595,7 @@ Spotřebuj sešívací sadu Zużycie Zestawów Chirurgicznych Verbrauche Operations-Set + Consumir kit quirúrgico Controls whether a surgical kit should be consumed after use. @@ -507,10 +608,11 @@ Nastavuje Kontroluje, czy Zestaw Chirurgiczny powinien być zużyty po użyciu. Legt fest, ob ein Operations-Set nach der Anwendung verbraucht werden soll. + Controla si un kit quirúrgico debería ser consumido tras su uso Self Stitching - Suturer soi-même + Réaliser des sutures sur soi-même Auto-Cirurgia 自己縫合 自我縫合 @@ -519,6 +621,7 @@ Zszywanie własnych ran Selbstnähen Зашивание своей раны + Auto cosido Enables the use of surgical kits to stitch oneself. @@ -531,50 +634,103 @@ Permette l'uso di kit chirurgici per ricucirsi. Ermöglicht die Benutzung des Operations-Sets, um sich selbst zu nähen. Включает использование хирургического набора на себе. + Permite el uso de kits quirúrgicos sobre uno mismo + + + Wound Stitch Time + Durée d'interaction - Sutures + 縫合時間 + Tiempo de sutura de herida + Время зашивания ран + Czas szycia rany + + + Time, in seconds, required to stitch a single wound. + Définit le temps nécessaire à la suture d'une plaie (en secondes). + 縫合に掛かる時間 (秒) を決定します。 + Tiempo, en segundos, requerido para suturar una única herida. + Время, необходимое для зашивания одной раны (в секундах). + Czas w sekundach potrzebny na zaszycie pojedyńczej rany. Self IV Transfusion Eigennutzung von Bluttransfusionen Внутривенное переливание на себе 自己 IV 輸血 - Autotransfusion d'IV + Pose d'IV sur soi-même Autotransfusão de IV 自我注射點滴 Samoaplikace IV transfuze Samotransfuzja IV Trasfusione endovena su se stessi + Autotransfusión intravenosa (IV) Enables the use of IV transfusions on oneself. Erlaube Bluttransfusionen an sich selbst zu benutzen Позволяет использовать внутривенные переливания на себе 自らに対して IV 輸血を可能にします。 - Permet de poser des IV sur soi-même. + Active la possibilité de s'auto-poser des IVs. Permite utilizar bolsas de IV para transfusão em si mesmo 啟用是否能對自己注射點滴 Umožňuje aplikovat IV transfuze na sama sebe. Pozwala przetoczyć płyny IV samemu sobie Abilita la trasfusione in endovena su se stessi. + Habilita el uso de las transfusiones IV sobre uno mismo + + + Allow Unconscious Body Bag + Housse mortuaire - Autoriser patients inconscients + 無意識者を死体袋に + Permitir bolsa para cuerpos inconsciente + Разрешить упаковывать пациентов без сознания в мешки для трупов + Nieprzytomni w worku na ciało + + + Enables placing an unconscious patient in a body bag. + Active la possibilité de placer des patients inconscients dans les housses mortuaires.\nAttention : le cas échéant cela provoquera la mort du patient. + 気絶しているプレイヤーを死体袋へ入れられるかどうかを決定します。 + Permitir colocar a un paciente inconsciente en una bolsa para cuerpos. + Разрешает упаковывать пациентов без сознания в мешки для трупов. + Zezwalaj na pakowanie nieprzytomnych osób do worka na ciało. Allow IV Transfusion Erlaube Bluttransfusionen Zezwalaj na przetaczanie płynów IV - Pose de perfusion autorisée pour + Pose de perfusions autorisée pour 允許操作點滴 IV 輸血の制限 Povolit IV transfuzi - Разрешить переливание IV группы крови + Разрешить внутривенное переливание + Permitir transfusión de IV Training level required to transfuse IVs. 'Fähigkeiten-Level', das benötigt wird, um Blut zu transfundieren. Poziom wyszkolenia potrzebny aby móc przetaczać płyny IV. - Définit quelle qualification médicale est requise pour pouvoir poser des perfusions intraveineuses. + Définit la qualification médicale requise pour poser des perfusions intraveineuses. 要有何種醫療水準才可注射點滴。 IV 輸血を行うのに訓練済レベルを要求とします。 Úroveň výcviku nutná pro IV transfuzi. - Уровень навыка требуемый для переливания крови IV группы. + Уровень навыка, требуемый для осуществления внутривенного переливания. + Nivel de capacitación requerido para transfusiones de IV. + + + Locations IV Transfusion + IV 輸血の場所制限 + Ubicación para transfusiones IV + Lieux perfusions IV + Места введения пакетов внутривенного переливания + Miejsca do transfuzji IV + + + Controls where IV transfusions can be performed. + IV 輸血を行える場所を決定できます。 + Controla dónde pueden ser realizadas las transfusiones IV. + Définit les lieux où la pose de perfusions est autorisée. + Определяет к каким частям тела разрешено применять пакеты внутренного переливания. + Kontroluje w jakich miejscach można robić transfuzje IV. Convert Vanilla Items @@ -587,6 +743,7 @@ Converti oggetti vanilla Přeměnit zdravotnické předměty ze základní hry Konwertuj przedmioty z vanili + Convierte los objetos estándars de A3 en objetos ACE Controls whether vanilla medical items are converted to ACE Medical items, removed only, or ignored. @@ -599,6 +756,7 @@ Controlla se gli articoli medicali vanilla vengono convertiti in articoli medicali ACE, rimossi o ignorati. Nastavuje zda zdravotnické předměty ze základní hry budou přeměněny na ACE předměty, odstraněny nebo ignorovány. Kontroluje, czy podstawowe przedmioty medyczne z Arma są konwertowane na przedmioty medyczne ACE, tylko usuwane lub ignorowane. + Controla si los artículos médicos básicos se convierten en artículos médicos de ACE, solo se eliminan o se ignoran. Remove Only @@ -611,6 +769,7 @@ Pouze odstranit Tylko Usuwaj Nur Entfernen + Solo eliminar Enable Litter @@ -638,6 +797,7 @@ Umožňuje vytvořit odpadky při léčbě. Umożliwia tworzenie śmieci po przeprowadzaniu zabiegu. Ermöglicht das Produzieren von Abfall während einer Behandlung. + Habilita la opción de basura durante el tratamiento Max Litter Objects @@ -651,6 +811,7 @@ Maksymalna Ilość Śmieci Maximale Anzahl an Abfall-Objekten Maks. Çöp Objesi + Número máximo de objetos de basura Sets the maximum number of litter objects which can be spawned, excessive amounts can cause FPS lag. @@ -663,6 +824,7 @@ Nastavuje maximum odpadků, které se mohou objevit. Vysoká hodnota m§že negativně ovlivnit FPS. Definiuje maksymalną liczbę śmieci, które mogą zostać stworzone, nadmierne ilości mogą powodować spadki FPS. Bestimmt die maximal Anzahl an Abfall-Objekten, die erstellt werden können. Eine zu hohe Anzahl kann Lag verursachen. + Establece el número máximo de objetos de basura que se pueden generar, cantidades excesivas pueden causar saltos de FPS. Litter Lifetime @@ -676,6 +838,7 @@ Czas trwania Śmieci Abfall Anzeigedauer Cöp Silinme Süresi + Tiempo de vida de la basura Controls the lifetime of litter objects, in seconds. -1 is forever. @@ -688,6 +851,7 @@ Nastavuje za jak dlouho zdravotnické odpadky zmizí. -1 je navždy. Kontroluje czas trwania śmieci w sekundach. -1 pozostawia je na zawsze. Kontrolliert die Anzeigedauer von Abfall-Objekten in Sekunden. -1 ist für immer. + Controla el tiempo de vida de la basura (segundos). -1 es igual a permanentes Anyone @@ -718,6 +882,7 @@ Medycy Sanitäter Sıhhiye + Médicos Doctors @@ -731,6 +896,7 @@ Doktorzy Ärzte Doktor + Doctores Medical Facilities @@ -744,6 +910,7 @@ Obiekty Medyczne Medizinische Einrichtungen Tıbbi tesisler + Instalaciones médicas Vehicles & Facilities @@ -757,32 +924,51 @@ Pojazdy i Obiekty Fahrzeuge und Einrichtungen Araçlar ve Tesisler + Vehículos e instalaciones médicas - - CPR Success Chance - 心肺蘇生の成功率 - Chance de réussite de la RCP - Шанс успешной реанимации - Chance de ter sucesso com SBV - 心肺復甦術成功率 - Pravděpodobnost úspěchu CPR - Possibilità di successo della RCP - Szansa powodzenia RKO - HLW Erfolgsrate - CPR Başarı Şansı + + CPR Success Chance Minimum + RCP - Chance minimale de réussite + Минимальные шансы успеха СЛР + Szansa na powodzenie CPR - Minimum + 心肺蘇生の最低成功確率 - - Probability that CPR will be successful in restoring heart rhythm. - 心肺蘇生によって心拍を戻せる確率を決定できます。 - Probabilité de rétablir un rythme cardiaque suite à une RCP. - Вероятность успешного проведения сердечно-лёгочной реанимации (СЛР). - Probabilidade que um SBV restaurará o batimento cardíaco. - 心肺復甦術恢復心率的機率。 - Pravděpodobnost, že CPR obnoví srdeční tep. - E' probabile che la rianimazione RCP abbia successo nel ripristinare il ritmo cardiaco. - Prawdopodobieństwo przwyrócenia akcji serca poprzez wykonanie RKO - Wahrscheinlichkeit, dass HLW bei der Wiederherstellung des Herzrhythmus erfolgreich sein wird. - Kalp ritmini geri kazanmada CPR'nin başarılı olma olasılığı. + + CPR Success Chance Maximum + RCP - Chance maximale de réussite + Максимальные шансы успеха СЛР + Szansa na powodzenie CPR - Maksimum + 心肺蘇生の最高成功確率 + + + 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. + Probabilité minimale de rétablir un rythme cardiaque suite à une RCP.\nCette valeur minimale est définie pour un patient à l'état "A perdu une quantité critique de sang".\nUne interpolation est faite entre la chance minimale et maximale, en fonction du volume sanguin du patient. + Минимальная вероятность того, что выполнение искусственного дыхания восстановит сердечный ритм.\nЭто минимальное значение используется, когда пациент, по крайней мере, получил статус "Фатальная кровопотеря".\n Интерполированная вероятность используется, когда объем крови пациента находится между минимальным и максимальным порогами. + Minimalna wartość szansy na to że CPR przywróci bicie serca.\nTa minimalna wartość jest używana gdy pacjent ma status "Stracił krytyczną ilość krwi".\nInterpolowana wartość szansy jest używana gdy pacjent ma poziom krwi będący pomiędzy minimum a maksimum. + 心肺蘇生を行うことで心拍が回復する最低成功確率を設定します。\nこの値は患者が"致命的な程失血している"時に使用されます。\n患者の血液量が最低値と最大値の間だった場合は、補完確率が適用されます。 + + + 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. + Probabilité maximale de rétablir un rythme cardiaque suite à une RCP.\nCette valeur maximale est définie pour un patient à l'état "A perdu une faible quantité de sang".\nUne interpolation est faite entre la chance minimale et maximale, en fonction du volume sanguin du patient. + Максимальная вероятность того, что выполнение искусственного дыхания восстановит сердечный ритм.\nЭто максимальное значение используется, когда пациент, по крайней мере, получил статус "Фатальная кровопотеря".\n Интерполированная вероятность используется, когда объем крови пациента находится между минимальным и максимальным порогами. + Maksymalna wartość szansy na to że CPR przywróci bicie serca.\nTa maksymalna wartość jest używana gdy pacjent ma status "Stracił trochę krwi".\nInterpolowana wartość szansy jest używana gdy pacjent ma poziom krwi będący pomiędzy minimum a maksimum. + 心肺蘇生を行うことで心拍が回復する最高成功確率を設定します。\nこの値は患者が"いくらか失血している"時以上の場合に使用されます。\n患者の血液量が最低値と最大値の間だった場合は、補完確率が適用されます。 + + + CPR Treatment Time + RCP - Durée d'interaction + 心肺蘇生の動作時間 + Tiempo de tratamiento de RCP + Время проведения СЛР + Czas potrzebny na wykonanie CPR + + + Time, in seconds, required to perform CPR on a patient. + Définit le temps nécessaire à la mise en œuvre d'une RCP (en secondes). + 心肺蘇生にかかる時間 (秒) を決定します。 + Tiempo, en segundos, requerido para realizar RCP en un paciente. + Время, необходимое для проведения сердечно-лёгочной реанимации (СЛР) (в секундах). + Czas w sekundach jaki jest potrzebny do wykonania CPR na pacjencie. Holster Required @@ -794,6 +980,7 @@ Wymagana broń w kaburze Holstern benötigt Необходимость убирать оружие + Requiere enfundar 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. @@ -805,6 +992,7 @@ Controlla se le armi devono essere tenute nella fondina / abbassate per poter eseguire le azioni mediche.\Except Exam - Permette azioni di esame (controllo del polso, della pressione sanguigna, della risposta) in ogni momento indipendentemente dall'impostazione della fondina richiesta. Kontrolliert, ob Waffen geholstert/gesenkt werden müssen, um medizinische Aktionen durchzuführen.\nAusgenommen die eingestellten Untersuchungsoptionen erlauben Diagnose-Aktionen (Überprüfung von Puls, Blutdruck, Reaktion) jederzeit. Нужно ли убирать оружие для проведения медицинских действий.\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. Lowered or Holstered @@ -816,6 +1004,7 @@ Opuszczona lub w kaburze Gesenkt oder Geholstert Опущено или убрано + Bajada o enfundada Lowered or Holstered (Except Exam) @@ -827,6 +1016,7 @@ Opuszczona lub w kaburze (oprócz diagnozowania) Gesenkt oder Geholstert (Ausnahme Untersuchung) Опущено или убрано (Проверка разрешена) + Bajada o enfundada (excepto examen) Holstered Only @@ -838,6 +1028,7 @@ Tylko w Kaburze Nur geholstert Только убрано + Solo enfundada Holstered Only (Except Exam) @@ -849,6 +1040,7 @@ Tylko w Kaburze (oprócz diagnozowania) Nur geholstert (Ausnahme Untersuchung) Только убрано (Проверка разрешена) + Solo enfundada (excepto examen) [ACE] Medical Supply Crate (Basic) @@ -1283,6 +1475,7 @@ Schiene 夹板 Atel + Férula Stabilizes a fractured limb @@ -1297,9 +1490,10 @@ Stabilisiere einen Bruch 用于固定骨折的肢体 Kırık bir uzvu stabilize eder + Estabilizar un hueso roto - Morphine autoinjector + Morphine Autoinjector Morphium-Autoinjektor Морфин в пневмошприце Morfina auto-inyectable @@ -1348,7 +1542,7 @@ 止痛藥的一種, 用於減低中度至重度的疼痛感 - Adenosine autoinjector + Adenosine Autoinjector Adenosin-Autoinjektor Asenosina auto-inyectable Autostrzykawka z adenozyną @@ -1394,7 +1588,7 @@ 一種藥物用於減低腎上腺素的效果 - Atropine autoinjector + Atropine Autoinjector Атропин в пневмошприце Atropina auto-inyectable Auto-injecteur d'atropine @@ -1443,7 +1637,7 @@ 軍用神經解毒針, 用來應付核生化汙染的情況. - Epinephrine autoinjector + Epinephrine Autoinjector Адреналин в пневмошприце Epinefrina auto-inyectable Auto-injecteur d'épinéphrine @@ -2410,7 +2604,7 @@ Zárókötszer Bendaggio rapido Curativo de Campo - 緊急圧迫包帯 + 緊急圧迫包帯を巻く 필드 드레싱 绷带 (基础型) 基礎繃帶 @@ -2426,7 +2620,7 @@ Bandage compressif Bandagem de Compressão Obvaz Tlakový - 弾性包帯 + 弾性包帯を巻く 거즈 붕대 绷带 (包扎型) 包紮繃帶 @@ -2443,7 +2637,7 @@ Rögzitő kötszer Bendaggio elastico Bandagem Elástica - 伸縮包帯 + 伸縮包帯を巻く 압박 붕대 绷带 (弹性型) 彈性繃帶 @@ -2460,7 +2654,7 @@ QuikClot QuikClot (polvere emostatica) QuikClot - クイッククロット + クイッククロットを巻く 퀵 클롯 绷带 (止血型) 止血粉 @@ -3550,6 +3744,18 @@ %1 沒有反應 %1 tepki vermiyor + + %1 is not responsive, taking shallow gasps and convulsing + %1 est inconscient, respire par intermittence et convulse. + %1 jest nieresponsywny, ma płytki oddech oraz jest w konwulsjach + %1 は反応せず、浅い呼吸とけいれんをしている + + + %1 is not responsive, motionless and cold + %1 est inconscient, inanimé et froid. + %1 jest nieresponsywny, nieruchomy oraz zimny + %1 は反応せず、動かず冷たくなっている + You checked %1 Вы осмотрели раненого %1 @@ -3628,7 +3834,7 @@ Valamennyi vért vesztett Ztratil trochu krve Ele perdeu um pouco de sangue - 彼は出血している + 患者は出血している 적은 양의 피를 잃었다 他轻微失血 他流失一些血液 @@ -3645,7 +3851,7 @@ Ztratil hodně krve Ele perdeu muito sangue Ha perso molto sangue - 彼は大量失血している + 患者は大量失血している 많은 양의 피를 잃었다 他大量失血 他流失大量血液 @@ -3662,7 +3868,7 @@ Nem vesztett vért Neztratil žádnou krev Ele não perdeu sangue - 彼は失血していない + 患者は失血していない 피를 잃지 않았다 他没有失血 他並沒有失血 @@ -3679,7 +3885,7 @@ Fájdalmai vannak Je v bolestech Ele está com dor - 彼には痛みがあるようだ + 患者は痛いようだ 통증이 있다 他感到疼痛 他感到疼痛中 @@ -3696,7 +3902,7 @@ Nincsenek fájdalmai Nemá žádné bolesti Ele não está com dor - 彼には痛みがないようだ + 患者は痛くないようだ 통증이 없다 他没有感到疼痛 他沒感到疼痛中 @@ -4232,5 +4438,13 @@ 這部位沒有止血帶! Bu vücut kısmında turnike yok! + + The body twitched and may not be dead! + Тело дернулось и, возможно, пациент жив! + L'unité a bougé et n'est peut-être pas morte ! + 身体が動き死んでないようだ! + ¡El cuerpo se retorció y puede que no esté muerto! + Ciało drgnęło i może nie być martwe! + diff --git a/addons/medical_vitals/CfgEventHandlers.hpp b/addons/medical_vitals/CfgEventHandlers.hpp index 0d3301d6e0..865276cfba 100644 --- a/addons/medical_vitals/CfgEventHandlers.hpp +++ b/addons/medical_vitals/CfgEventHandlers.hpp @@ -1,17 +1,11 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); - }; -}; - -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf index cdb57b3dfe..850ff41607 100644 --- a/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical_vitals/functions/fnc_handleUnitVitals.sqf @@ -53,7 +53,7 @@ if (_hemorrhage != GET_HEMORRHAGE(_unit)) then { private _woundBloodLoss = GET_WOUND_BLEEDING(_unit); private _inPain = GET_PAIN_PERCEIVED(_unit) > 0; -if !(_inPain isEqualTo IS_IN_PAIN(_unit)) then { +if (_inPain isNotEqualTo IS_IN_PAIN(_unit)) then { _unit setVariable [VAR_IN_PAIN, _inPain, true]; }; @@ -75,7 +75,7 @@ private _painSupressAdjustment = 0; private _peripheralResistanceAdjustment = 0; private _adjustments = _unit getVariable [VAR_MEDICATIONS,[]]; -if !(_adjustments isEqualTo []) then { +if (_adjustments isNotEqualTo []) then { private _deleted = false; { _x params ["_medication", "_timeAdded", "_timeTillMaxEffect", "_maxTimeInSystem", "_hrAdjust", "_painAdjust", "_flowAdjust"]; diff --git a/addons/metis/CfgMagazines.hpp b/addons/metis/CfgMagazines.hpp index e1c26d844f..2d20d942dc 100644 --- a/addons/metis/CfgMagazines.hpp +++ b/addons/metis/CfgMagazines.hpp @@ -1,9 +1,9 @@ class CfgMagazines { class CA_LauncherMagazine; - class Vorona_HEAT : CA_LauncherMagazine { + class Vorona_HEAT: CA_LauncherMagazine { ammo = QGVAR(HEAT); }; - class Vorona_HE : Vorona_HEAT { + class Vorona_HE: Vorona_HEAT { ammo = QGVAR(HE); }; }; diff --git a/addons/metis/README.md b/addons/metis/README.md index c494b9f8f9..4f735d21a8 100644 --- a/addons/metis/README.md +++ b/addons/metis/README.md @@ -2,11 +2,3 @@ ace_metis =================== Converts vanilla "Vorona" Missile Guidance into ACE SACLOS Guidance - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Brandon-TCVM](https://github.com/TheCandianVendingMachine) - diff --git a/addons/microdagr/CfgEventHandlers.hpp b/addons/microdagr/CfgEventHandlers.hpp index 789cfeb05c..e325095c32 100644 --- a/addons/microdagr/CfgEventHandlers.hpp +++ b/addons/microdagr/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_clientInit)); }; }; diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf index 7a8d775a05..8a5db92e0b 100644 --- a/addons/microdagr/XEH_clientInit.sqf +++ b/addons/microdagr/XEH_clientInit.sqf @@ -17,6 +17,22 @@ private _closeCode = { }; [(localize LSTRING(itemName)), QPATHTOF(images\microDAGR_item.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); +// Mode keybinds: +["ACE3 Equipment", QGVAR(previousMode), LLSTRING(previousMode), { + private _newMode = GVAR(currentApplicationPage) - 1; + if (_newMode < APP_MODE_INFODISPLAY) then { + _newMode = APP_MODE_SETUP; + }; + [_newMode] call FUNC(saveCurrentAndSetNewMode); +}, ""] call CBA_fnc_addKeybind; + +["ACE3 Equipment", QGVAR(nextMode), LLSTRING(nextMode), { + private _newMode = GVAR(currentApplicationPage) + 1; + if (_newMode > APP_MODE_SETUP) then { + _newMode = APP_MODE_INFODISPLAY; + }; + [_newMode] call FUNC(saveCurrentAndSetNewMode); +}, ""] call CBA_fnc_addKeybind; //Add Eventhandler: [QEGVAR(vector,rangefinderData), {_this call FUNC(recieveRangefinderData)}] call CBA_fnc_addEventHandler; diff --git a/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf b/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf index 973e0ac7fb..068b8d2cd2 100644 --- a/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf +++ b/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf @@ -20,7 +20,7 @@ params ["_newMode"]; disableSerialization; private _display = uiNamespace getVariable [[QGVAR(RscTitleDisplay), QGVAR(DialogDisplay)] select (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG), displayNull]; -if (isNull _display) exitWith {ERROR("No Display");}; +if (isNull _display) exitWith {LOG("No Display");}; if (GVAR(currentApplicationPage) == 2) then { private _theMap = [_display displayCtrl IDC_MAPDETAILS, _display displayCtrl IDC_MAPPLAIN] select (!GVAR(mapShowTexture)); diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index 877bbb2bcc..d4cc5000c3 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -70,7 +70,7 @@ case (APP_MODE_INFODISPLAY): { _aboveSeaLevelText = "----"; if (GVAR(currentWaypoint) == -2) then { - if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { + if (GVAR(rangeFinderPositionASL) isNotEqualTo []) then { private _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos); _targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1]; _targetPosLocationASL = GVAR(rangeFinderPositionASL); @@ -81,7 +81,7 @@ case (APP_MODE_INFODISPLAY): { _targetPosLocationASL = (_waypoints select GVAR(currentWaypoint)) select 1; }; - if (!(_targetPosLocationASL isEqualTo [])) then { + if (_targetPosLocationASL isNotEqualTo []) then { private _bearing = [(getPosASL ACE_player), _targetPosLocationASL] call BIS_fnc_dirTo; _bearingText = if (GVAR(settingUseMils)) then { [(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber; @@ -123,7 +123,7 @@ case (APP_MODE_COMPASS): { private _targetPosLocationASL = []; if (GVAR(currentWaypoint) == -2) then { - if (!(GVAR(rangeFinderPositionASL) isEqualTo [])) then { + if (GVAR(rangeFinderPositionASL) isNotEqualTo []) then { private _targetPos = [GVAR(rangeFinderPositionASL)] call EFUNC(common,getMapGridFromPos); _targetPosName = format ["[%1 %2 %3]", EGVAR(common,MGRS_data) select 1, _targetPos select 0, _targetPos select 1]; _targetPosLocationASL = GVAR(rangeFinderPositionASL); @@ -137,7 +137,7 @@ case (APP_MODE_COMPASS): { _bearingText = "---"; _rangeText = "---"; - if (!(_targetPosLocationASL isEqualTo [])) then { + if (_targetPosLocationASL isNotEqualTo []) then { private _bearing = [(getPosASL ACE_player), _targetPosLocationASL] call BIS_fnc_dirTo; _bearingText = if (GVAR(settingUseMils)) then { [(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber; diff --git a/addons/microdagr/initSettings.sqf b/addons/microdagr/initSettings.sqf index 5138637645..85614c9821 100644 --- a/addons/microdagr/initSettings.sqf +++ b/addons/microdagr/initSettings.sqf @@ -8,7 +8,7 @@ true, // isGlobal {[QGVAR(mapDataAvailable), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // require mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(waypointPrecision), "LIST", @@ -18,4 +18,4 @@ true, // isGlobal {[QGVAR(waypointPrecision), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // require mission restart -] call cba_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/microdagr/readme.md b/addons/microdagr/readme.md index d7bcf01b40..e85159f23d 100644 --- a/addons/microdagr/readme.md +++ b/addons/microdagr/readme.md @@ -1,7 +1,7 @@ ace_microdagr =============== -Adds a MicroDAGR infantry GPS device. +Adds a MicroDAGR infantry GPS device. Press home to open. Then home again to toggle an interactive version. Press CTRL+Home to close. Info/Compass/Minimap modes are selectable by the bottom buttons. Tap the top bar to open the menu and access Mark/Waypoints/Connect To/Settings modes. Tap the minimap button again to toggle map modes (if available). @@ -11,15 +11,7 @@ Can interface with the `ace_vector`. Hold Azimuth+Range and release (see page 14 #### Items Added: `ACE_microDAGR` - ## For Mission Makers: #### Modules: - MicroDAGR Map Fill - Controls the amount of map data available for the minimap. Can limit to just roads/topographical or disable entirely. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index 63672ca1a2..6bb267df13 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -511,6 +511,7 @@ Précision des points de passage 微型軍用GPS接收器 - 導航精確度 MicroDAGR - přesnost Waypointů + Micro DAGR - precisión del waypoint Controls how precise the waypointdistance can be displayed @@ -523,6 +524,7 @@ Définit la précision d'affichage des points de passage. 控制顯示的導航點精確度為多少 Nastavuje jak přesně je vzdálenost waypointů zobrazena. + Controla cómo de precisa se mostrará la distancia al waypoint 100m @@ -536,6 +538,7 @@ 一百公尺 100 m 100m + 100m 10m @@ -549,6 +552,7 @@ 十公尺 10 m 10m + 10m 1m @@ -562,6 +566,7 @@ 一公尺 1 m 1m + 1m Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap. @@ -579,5 +584,19 @@ 设定有多少数据会显示在微型军用GPS接收器上。这些资料的多寡会反映在迷你地图的显示上。 設定有多少數據會顯示在微型軍用GPS接收器上。這些資料的多寡會反映在迷你地圖的顯示上。 + + MicroDAGR - Previous Mode + MicroDAGR - Предыдущий режим + MicroDAGR - Modo anterior + MicroDAGR - Mode précédent + MicroDAGR - 前のモードに + + + MicroDAGR - Next Mode + MicroDAGR - Следующий режим + MicroDAGR - Modo siguiente + MicroDAGR - Mode suivant + MicroDAGR - 次のモードに + diff --git a/addons/minedetector/CfgEventHandlers.hpp b/addons/minedetector/CfgEventHandlers.hpp index e90bed419e..2a3f71f852 100644 --- a/addons/minedetector/CfgEventHandlers.hpp +++ b/addons/minedetector/CfgEventHandlers.hpp @@ -1,15 +1,15 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/minedetector/README.md b/addons/minedetector/README.md index 5de7970013..e4607a92c8 100644 --- a/addons/minedetector/README.md +++ b/addons/minedetector/README.md @@ -3,9 +3,3 @@ ace_minedetector Add mine detectors -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Glowbal](https://github.com/Glowbal) -- [Grey](https://github.com/Grey-Soldierman) diff --git a/addons/minedetector/XEH_postInit.sqf b/addons/minedetector/XEH_postInit.sqf index 1c448794cc..0b8a521155 100644 --- a/addons/minedetector/XEH_postInit.sqf +++ b/addons/minedetector/XEH_postInit.sqf @@ -24,7 +24,7 @@ addMissionEventHandler ["Draw3D", { drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [0,0,1,1], _detectorPointAGL, 1, 1, 0, "detector", 1, 0.02, "PuristaMedium"]; { private _name = format ["%1@%2", typeOf _x, (floor ((_x distance _detectorPointAGL) * 10)) / 10]; - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _x) >> QGVAR(detectable))) == 1) then { + if ((getNumber (configOf _x >> QGVAR(detectable))) == 1) then { drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,0,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; } else { drawIcon3D ["\A3\ui_f\data\map\markers\military\dot_CA.paa", [1,1,0,1], (ASLtoAGL (getPosASL _x)), 1, 1, 0, _name, 1, 0.02, "PuristaMedium"]; diff --git a/addons/minedetector/functions/fnc_hasDetector.sqf b/addons/minedetector/functions/fnc_hasDetector.sqf index 4752284196..c7ebd5b9f0 100644 --- a/addons/minedetector/functions/fnc_hasDetector.sqf +++ b/addons/minedetector/functions/fnc_hasDetector.sqf @@ -17,4 +17,4 @@ params ["_unit"]; -!(([currentWeapon _unit] call FUNC(getDetectorConfig)) isEqualTo []); +([currentWeapon _unit] call FUNC(getDetectorConfig)) isNotEqualTo []; diff --git a/addons/minedetector/functions/fnc_playDetectorSound.sqf b/addons/minedetector/functions/fnc_playDetectorSound.sqf index 8e47508209..dc0be60015 100644 --- a/addons/minedetector/functions/fnc_playDetectorSound.sqf +++ b/addons/minedetector/functions/fnc_playDetectorSound.sqf @@ -28,6 +28,6 @@ if (!alive _unit) exitWith { if (_unit getVariable [QGVAR(isUsingHeadphones), false] && {_unit == ACE_player}) then { playSound _soundClass; } else { - private _posASL = AGLtoASL (_unit modelToWorld (_unit selectionPosition "granat")); + private _posASL = _unit modelToWorldWorld (_unit selectionPosition "granat"); [_soundClass, _posASL, 3, 15] call EFUNC(common,playConfigSound3D); }; diff --git a/addons/missileguidance/CfgAmmo.hpp b/addons/missileguidance/CfgAmmo.hpp index d2d5c1ecf0..a2b07b7fff 100644 --- a/addons/missileguidance/CfgAmmo.hpp +++ b/addons/missileguidance/CfgAmmo.hpp @@ -63,7 +63,7 @@ class CfgAmmo { //trackOversteer = 1; //trackLead = 0; - initTime = 2; + initTime = 0.5; // Begin ACE guidance Configs class ADDON { diff --git a/addons/missileguidance/CfgEventhandlers.hpp b/addons/missileguidance/CfgEventhandlers.hpp index 7fba1f43c4..449681e8df 100644 --- a/addons/missileguidance/CfgEventhandlers.hpp +++ b/addons/missileguidance/CfgEventhandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_pre_init)); + init = QUOTE(call COMPILE_SCRIPT(XEH_pre_init)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_post_init)); + init = QUOTE(call COMPILE_SCRIPT(XEH_post_init)); }; }; diff --git a/addons/missileguidance/CfgMagazines.hpp b/addons/missileguidance/CfgMagazines.hpp index 7cc33b17a3..74d75e8d4a 100644 --- a/addons/missileguidance/CfgMagazines.hpp +++ b/addons/missileguidance/CfgMagazines.hpp @@ -1,7 +1,7 @@ class CfgMagazines { class 12Rnd_PG_missiles; - class 6Rnd_ACE_Hydra70_DAGR : 12Rnd_PG_missiles { + class 6Rnd_ACE_Hydra70_DAGR: 12Rnd_PG_missiles { ammo = "ACE_Hydra70_DAGR"; count = 12; displayName = "6 Round DAGR"; @@ -10,14 +10,14 @@ class CfgMagazines { weight = 36; }; - class 12Rnd_ACE_Hydra70_DAGR : 6Rnd_ACE_Hydra70_DAGR { + class 12Rnd_ACE_Hydra70_DAGR: 6Rnd_ACE_Hydra70_DAGR { count = 12; displayName = "16 Round DAGR"; displayNameShort = "16 Round DAGR"; descriptionShort = "16 Round DAGR"; weight = 72; }; - class 24Rnd_ACE_Hydra70_DAGR : 6Rnd_ACE_Hydra70_DAGR { + class 24Rnd_ACE_Hydra70_DAGR: 6Rnd_ACE_Hydra70_DAGR { count = 24; displayName = "24 Round DAGR"; displayNameShort = "24 Round DAGR"; diff --git a/addons/missileguidance/README.md b/addons/missileguidance/README.md index bb8047bdf2..b21a5c2408 100644 --- a/addons/missileguidance/README.md +++ b/addons/missileguidance/README.md @@ -2,11 +2,3 @@ ace_missileguidance =================== Various new modes for different missiles. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [walterpearce](https://github.com/walterpearce) -- [NouberNou](https://github.com/NouberNou) diff --git a/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf b/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf index 200e398133..10c3bd5892 100644 --- a/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf +++ b/addons/missileguidance/functions/fnc_SACLOS_onFired.sqf @@ -18,7 +18,7 @@ params ["_firedEH", "", "", "", "_stateParams"]; _firedEH params ["_shooter","_weapon","","","","","_projectile"]; _stateParams params ["", "_seekerStateParams"]; -private _usePilotCamera = getNumber (([_shooter] call CBA_fnc_getObjectConfig) >> "pilotCamera" >> QGVAR(usePilotCameraForTargeting)) == 1; +private _usePilotCamera = getNumber (configOf _shooter >> "pilotCamera" >> QGVAR(usePilotCameraForTargeting)) == 1; private _turretPath = [_shooter, _weapon] call CBA_fnc_turretPathWeapon; private _turretConfig = [_shooter, _turretPath] call CBA_fnc_getTurret; diff --git a/addons/missileguidance/functions/fnc_ahr_onFired.sqf b/addons/missileguidance/functions/fnc_ahr_onFired.sqf index 331484f4a2..c7a3e5561c 100644 --- a/addons/missileguidance/functions/fnc_ahr_onFired.sqf +++ b/addons/missileguidance/functions/fnc_ahr_onFired.sqf @@ -30,7 +30,7 @@ if !(_target isKindOf "AllVehicles") then { _launchParams set [0, _target]; _projectile setMissileTarget objNull; // to emulate a no launch warning -private _projectileConfig = [_projectile] call CBA_fnc_getObjectConfig; +private _projectileConfig = configOf _projectile; private _config = _projectileConfig >> "ace_missileguidance"; private _isActive = false; diff --git a/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf b/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf index 6d88197819..4f0324597f 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_WIRE.sqf @@ -41,7 +41,7 @@ if ((_distanceToProjectile > _seekerMaxRangeSqr) || { _wireCut }) exitWith { if (_seekerTargetPos isEqualTo [0, 0, 0] || { _distanceToProjectile < _seekerMinRangeSqr }) exitWith { // cut wire if its caught on terrain - /*if !(lineIntersectsSurfaces [getPosASL _shooter, _projectilePos, _shooter] isEqualTo []) then { + /*if (lineIntersectsSurfaces [getPosASL _shooter, _projectilePos, _shooter] isNotEqualTo []) then { _attackProfileStateParams set [1, true]; };*/ // return position 50m infront of projectile diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf index e107805496..de01b476b6 100644 --- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf +++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf @@ -27,7 +27,7 @@ private _seekerFunction = getText (configFile >> QGVAR(SeekerTypes) >> _seekerTy private _seekerTargetPos = _this call (missionNamespace getVariable _seekerFunction); if ((isNil "_seekerTargetPos") || {_seekerTargetPos isEqualTo [0,0,0]}) then { // A return of nil or [0,0,0] indicates the seeker has no target - if (_seekLastTargetPos && {!(_lastKnownPos isEqualTo [0,0,0])}) then { // if enabled for the ammo, use last known position if we have one stored + if (_seekLastTargetPos && {_lastKnownPos isNotEqualTo [0,0,0]}) then { // if enabled for the ammo, use last known position if we have one stored TRACE_2("seeker returned bad pos - using last known",_seekLastTargetPos,_lastKnownPos); _seekerTargetPos = _lastKnownPos; #ifdef DRAW_GUIDANCE_INFO diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index e218e27e54..8050dfcff5 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -56,7 +56,7 @@ private _profileAdjustedTargetPos = [_seekerTargetPos, _args, _attackProfileStat // If we have no seeker target, then do not change anything // If there is no deflection on the missile, this cannot change and therefore is redundant. Avoid calculations for missiles without any deflection -if ((_minDeflection != 0 || {_maxDeflection != 0}) && {!(_profileAdjustedTargetPos isEqualTo [0,0,0])}) then { +if ((_minDeflection != 0 || {_maxDeflection != 0}) && {_profileAdjustedTargetPos isNotEqualTo [0,0,0]}) then { private _targetVector = _projectilePos vectorFromTo _profileAdjustedTargetPos; private _adjustVector = _targetVector vectorDiff (vectorDir _projectile); diff --git a/addons/missileguidance/functions/fnc_seekerType_ARH.sqf b/addons/missileguidance/functions/fnc_seekerType_ARH.sqf index 9244090af7..a3bda11258 100644 --- a/addons/missileguidance/functions/fnc_seekerType_ARH.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_ARH.sqf @@ -30,6 +30,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { _seekerStateParams set [6, true]; TRACE_1("Missile Pitbull",_seekerStateParams); }; + // Internal radar homing // For performance reasons only poll for target every so often instead of each frame if ((_lastTargetPollTime + ACTIVE_RADAR_POLL_FREQUENCY) - CBA_missionTime < 0) then { @@ -59,7 +60,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { _seekerBaseRadiusAdjusted = _seekerBaseRadiusAtGround; }; // Look in front of seeker for any targets - private _nearestObjects = nearestObjects [_searchPos, ["Air", "LandVehicle", "Ship"], _seekerBaseRadiusAdjusted, false]; + private _nearestObjects = nearestObjects [ASLtoAGL _searchPos, ["Air", "LandVehicle", "Ship"], _seekerBaseRadiusAdjusted, false]; _nearestObjects = _nearestObjects apply { // I check both Line of Sight versions to make sure that a single bush doesnt make the target lock dissapear but at the same time ensure that this can see through smoke. Should work 80% of the time @@ -70,7 +71,6 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { }; }; _nearestObjects = _nearestObjects select { !isNull _x }; - // Select closest object to the expected position to be the current radar target if ((count _nearestObjects) <= 0) exitWith { _projectile setMissileTarget objNull; @@ -83,6 +83,7 @@ if (_isActive || { CBA_missionTime >= _timeWhenActive }) then { _target = _x; }; } forEach _nearestObjects; + _expectedTargetPos = _searchPos; }; diff --git a/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf b/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf index 9f470c1960..2d0a1e9170 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SACLOS.sqf @@ -53,7 +53,7 @@ private _testDotProduct = (_lookDirection vectorDotProduct _testPointVector); private _testIntersections = lineIntersectsSurfaces [_shooterPos, _projPos, _shooter]; -if ((_testDotProduct < (cos _seekerAngle)) || { !(_testIntersections isEqualTo []) }) exitWith { +if ((_testDotProduct < (cos _seekerAngle)) || {_testIntersections isNotEqualTo []}) exitWith { // out of LOS of seeker [0, 0, 0] }; diff --git a/addons/missileguidance/functions/fnc_wire_onFired.sqf b/addons/missileguidance/functions/fnc_wire_onFired.sqf index 295d6a2b5a..cb4020bd0f 100644 --- a/addons/missileguidance/functions/fnc_wire_onFired.sqf +++ b/addons/missileguidance/functions/fnc_wire_onFired.sqf @@ -19,7 +19,7 @@ _firedEH params ["_shooter","_weapon","","","","","_projectile", "_gunner"]; _stateParams params ["", "", "_attackProfileStateParams"]; _seekerParams params ["", "", "_seekerMaxRange", "_seekerMinRange"]; -private _config = ([_projectile] call CBA_fnc_getObjectConfig) >> "ace_missileguidance"; +private _config = configOf _projectile >> "ace_missileguidance"; private _maxCorrectableDistance = [_config >> "correctionDistance", "NUMBER", DEFAULT_CORRECTION_DISTANCE] call CBA_fnc_getConfigEntry; private _distanceAheadOfMissile = [_config >> "missileLeadDistance", "NUMBER", DEFAULT_LEAD_DISTANCE] call CBA_fnc_getConfigEntry; private _maxDistanceSqr = _seekerMaxRange * _seekerMaxRange; diff --git a/addons/missionmodules/CfgEventHandlers.hpp b/addons/missionmodules/CfgEventHandlers.hpp index be284a9d70..8e27a9f14f 100644 --- a/addons/missionmodules/CfgEventHandlers.hpp +++ b/addons/missionmodules/CfgEventHandlers.hpp @@ -1,12 +1,12 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/missionmodules/README.md b/addons/missionmodules/README.md index 0b8950d3fe..3389702453 100644 --- a/addons/missionmodules/README.md +++ b/addons/missionmodules/README.md @@ -2,10 +2,3 @@ ace_missionmodules =========== Adds mission modules. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Glowbal](https://github.com/Glowbal) diff --git a/addons/mk6mortar/CfgEventHandlers.hpp b/addons/mk6mortar/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/mk6mortar/CfgEventHandlers.hpp +++ b/addons/mk6mortar/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/mk6mortar/README.md b/addons/mk6mortar/README.md index 3e5109f38f..2c3be4cd97 100644 --- a/addons/mk6mortar/README.md +++ b/addons/mk6mortar/README.md @@ -1,11 +1,4 @@ ace_mk6mortar ========== -Tweaks the Nk6 Mortar system. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) +Tweaks the Mk6 Mortar system. diff --git a/addons/mk6mortar/XEH_postInit.sqf b/addons/mk6mortar/XEH_postInit.sqf index 3ea9911893..9f24a12a3b 100644 --- a/addons/mk6mortar/XEH_postInit.sqf +++ b/addons/mk6mortar/XEH_postInit.sqf @@ -4,8 +4,8 @@ if (hasInterface) then { ["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler; }; -["ace_settingsInitialized", { - TRACE_4("ace_settingsInitialized",GVAR(airResistanceEnabled),GVAR(allowComputerRangefinder),GVAR(allowCompass),GVAR(useAmmoHandling)); +["CBA_settingsInitialized", { + TRACE_4("CBA_settingsInitialized",GVAR(airResistanceEnabled),GVAR(allowComputerRangefinder),GVAR(allowCompass),GVAR(useAmmoHandling)); ["vehicle", FUNC(handlePlayerVehicleChanged), true] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/mk6mortar/functions/fnc_csw_getProxyWeapon.sqf b/addons/mk6mortar/functions/fnc_csw_getProxyWeapon.sqf index f6d11334b3..fd4804b98f 100644 --- a/addons/mk6mortar/functions/fnc_csw_getProxyWeapon.sqf +++ b/addons/mk6mortar/functions/fnc_csw_getProxyWeapon.sqf @@ -55,7 +55,7 @@ if (_proxyWeaponNeeded || GVAR(useAmmoHandling)) then { }; }; } else { - WARNING("unknown mag %1", _xMag); + WARNING_1("unknown mag %1", _xMag); }; }; } forEach (magazinesAllTurrets _mortar); diff --git a/addons/mk6mortar/initSettings.sqf b/addons/mk6mortar/initSettings.sqf index 1e48575b97..1b22600cbe 100644 --- a/addons/mk6mortar/initSettings.sqf +++ b/addons/mk6mortar/initSettings.sqf @@ -11,7 +11,7 @@ private _category = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], l true, // isGlobal {[QGVAR(airResistanceEnabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowComputerRangefinder), "CHECKBOX", @@ -21,7 +21,7 @@ private _category = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], l true, // isGlobal {[QGVAR(allowComputerRangefinder), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(allowCompass), "CHECKBOX", @@ -31,7 +31,7 @@ private _category = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], l true, // isGlobal {[QGVAR(allowCompass), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(useAmmoHandling), "CHECKBOX", @@ -41,4 +41,4 @@ private _category = [format ["ACE %1", localize "str_a3_cfgmarkers_nato_art"], l true, // isGlobal {[QGVAR(useAmmoHandling), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index dcf83627ca..15d8f0b4bc 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -82,6 +82,7 @@ Morteiro Mk6 Minomet Mk6 Mk6 Havan + Mortero MK6 Mk6 Settings diff --git a/addons/modules/CfgEventHandlers.hpp b/addons/modules/CfgEventHandlers.hpp index dc1da95f37..9675998bd4 100644 --- a/addons/modules/CfgEventHandlers.hpp +++ b/addons/modules/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class _ACE_modules { // using a _ so it is the first postInit to be executed - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/modules/README.md b/addons/modules/README.md index b13743b981..e490449dc3 100644 --- a/addons/modules/README.md +++ b/addons/modules/README.md @@ -2,10 +2,3 @@ ace_modules =========== Provides framework for module handling. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Glowbal](https://github.com/Glowbal) diff --git a/addons/movement/CfgEventHandlers.hpp b/addons/movement/CfgEventHandlers.hpp index 6aee79933c..2608d0260b 100644 --- a/addons/movement/CfgEventHandlers.hpp +++ b/addons/movement/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/movement/README.md b/addons/movement/README.md index 658e4a357a..abf381552a 100644 --- a/addons/movement/README.md +++ b/addons/movement/README.md @@ -2,11 +2,3 @@ ace_movement ============ Various tweaks to movement animations. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/movement/functions/fnc_handleVirtualMass.sqf b/addons/movement/functions/fnc_handleVirtualMass.sqf index 8f035cc5ad..f2c0655b5c 100644 --- a/addons/movement/functions/fnc_handleVirtualMass.sqf +++ b/addons/movement/functions/fnc_handleVirtualMass.sqf @@ -23,7 +23,9 @@ if (isNull _unit) exitWith {}; private _virtualLoad = 0; { - _virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]); + if (!isNull _x) then { + _virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]); + }; } forEach [ _unit, uniformContainer _unit, diff --git a/addons/mx2a/README.md b/addons/mx2a/README.md index f03edf1849..d3eb882348 100644 --- a/addons/mx2a/README.md +++ b/addons/mx2a/README.md @@ -2,10 +2,3 @@ ace_mx2a ========== Adds the MX-2A thermal imaging device. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/nametags/ACE_Settings.hpp b/addons/nametags/ACE_Settings.hpp index c7ca9f7378..452005ae3d 100644 --- a/addons/nametags/ACE_Settings.hpp +++ b/addons/nametags/ACE_Settings.hpp @@ -3,78 +3,30 @@ class ACE_Settings { movedToSQF = 1; }; class GVAR(showPlayerNames) { - value = 1; - typeName = "SCALAR"; - isClientSettable = 1; - displayName = CSTRING(ShowPlayerNames); - description = CSTRING(ShowPlayerNames_Desc); - values[] = {ECSTRING(common,Disabled), ECSTRING(common,Enabled), CSTRING(OnlyCursor), CSTRING(OnlyKeypress), CSTRING(OnlyCursorAndKeypress), CSTRING(FadeOnBorder)}; - category = CSTRING(Module_DisplayName); + movedToSQF = 1; }; class GVAR(showPlayerRanks) { - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(ShowPlayerRanks); - category = CSTRING(Module_DisplayName); + movedToSQF = 1; }; class GVAR(showVehicleCrewInfo) { - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(ShowVehicleCrewInfo); - description = CSTRING(ShowVehicleCrewInfo_Desc); - category = CSTRING(Module_DisplayName); + movedToSQF = 1; }; class GVAR(showNamesForAI) { - value = 0; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(ShowNamesForAI); - description = CSTRING(ShowNamesForAI_Desc); - category = CSTRING(Module_DisplayName); + movedToSQF = 1; }; class GVAR(showCursorTagForVehicles) { - value = 0; - typeName = "BOOL"; - isClientSettable = 0; - displayName = CSTRING(showCursorTagForVehicles_DisplayName); - description = CSTRING(showCursorTagForVehicles_Description); - category = CSTRING(Module_DisplayName); + movedToSQF = 1; }; class GVAR(showSoundWaves) { - value = 1; - typeName = "SCALAR"; - isClientSettable = 1; - displayName = CSTRING(ShowSoundWaves); - description = CSTRING(ShowSoundWaves_Desc); - values[] = {ECSTRING(common,Disabled), CSTRING(NameTagSettings), CSTRING(AlwaysShowAll)}; - category = CSTRING(Module_DisplayName); + movedToSQF = 1; }; class GVAR(playerNamesViewDistance) { - value = 5; - typeName = "SCALAR"; - isClientSettable = 0; - displayName = CSTRING(PlayerNamesViewDistance_DisplayName); - description = CSTRING(PlayerNamesViewDistance_Description); - category = CSTRING(Module_DisplayName); - sliderSettings[] = {0, 50, 5, 1}; + movedToSQF = 1; }; class GVAR(playerNamesMaxAlpha) { - value = 0.8; - typeName = "SCALAR"; - isClientSettable = 0; - displayName = CSTRING(playerNamesMaxAlpha); - category = CSTRING(Module_DisplayName); - sliderSettings[] = {0, 1, 0.8, 2}; + movedToSQF = 1; }; class GVAR(tagSize) { - value = 2; - typeName = "SCALAR"; - isClientSettable = 1; - displayName = CSTRING(TagSize_Name); - description = CSTRING(TagSize_Description); - values[] = {"$str_very_small", "$str_small", "$str_medium", "$str_large", "$str_very_large"}; - category = CSTRING(Module_DisplayName); + movedToSQF = 1; }; }; diff --git a/addons/nametags/CfgEventHandlers.hpp b/addons/nametags/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/nametags/CfgEventHandlers.hpp +++ b/addons/nametags/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/nametags/README.md b/addons/nametags/README.md index b3ee538ce1..f659b1d5ed 100644 --- a/addons/nametags/README.md +++ b/addons/nametags/README.md @@ -2,11 +2,3 @@ ace_nametags ============ Adds nametags above other players to simulate the familiarity with the faces with others one would have in real life. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index e73794600d..e663274dbd 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -23,13 +23,13 @@ GVAR(showNamesTime) = -10; [29, [false, false, false]], false] call CBA_fnc_addKeybind; //LeftControl Key // Wait until the colors are defined before starting to draw the nametags -["ace_settingsInitialized", { +["CBA_settingsInitialized", { // Draw handle call FUNC(updateSettings); }] call CBA_fnc_addEventHandler; // Change settings accordingly when they are changed -["ace_settingChanged", { +["CBA_SettingChanged", { params ["_name"]; if (_name == QGVAR(showPlayerNames)) then { call FUNC(updateSettings); diff --git a/addons/nametags/config.cpp b/addons/nametags/config.cpp index 2db10c7eeb..30b8415787 100644 --- a/addons/nametags/config.cpp +++ b/addons/nametags/config.cpp @@ -19,4 +19,4 @@ class CfgPatches { #include "CfgFactionClasses.hpp" #include "CfgVehicles.hpp" -#include +#include "RscTitles.hpp" diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index 55fb2d960f..338f8b37fc 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" /* - * Author: commy2, esteldunedain + * Author: commy2, esteldunedain, Drift_91 * Draw the nametag and rank icon. * * Arguments: @@ -33,12 +33,15 @@ _fnc_parameters = { if (_drawSoundwave) then { _icon = format [QPATHTOF(UI\soundwave%1.paa), floor random 10]; } else { - if (_drawRank && {rank _target != ""}) then { - _icon = GVAR(factionRanks) getVariable (_target getVariable [QGVAR(faction), faction _target]); - if (!isNil "_icon") then { - _icon = _icon param [ALL_RANKS find rank _target, ""]; - } else { - _icon = format ["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", rank _target]; + if (_drawRank) then { + _icon = _target getVariable "ace_nametags_rankIcon"; + if (isNil "_icon" && {rank _target != ""}) then { + _icon = GVAR(factionRanks) getVariable (_target getVariable [QGVAR(faction), faction _target]); + if (!isNil "_icon") then { + _icon = _icon param [ALL_RANKS find rank _target, ""]; + } else { + _icon = format ["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", rank _target]; + }; }; }; }; diff --git a/addons/nametags/functions/fnc_getCachedFlags.sqf b/addons/nametags/functions/fnc_getCachedFlags.sqf index 3fc13256e0..979517f6a0 100644 --- a/addons/nametags/functions/fnc_getCachedFlags.sqf +++ b/addons/nametags/functions/fnc_getCachedFlags.sqf @@ -50,7 +50,13 @@ switch (GVAR(showPlayerNames)) do { }; }; -private _ambientBrightness = ((([] call EFUNC(common,ambientBrightness)) + ([0, 0.4] select ((currentVisionMode ace_player) != 0))) min 1) max 0; -private _maxDistance = _ambientBrightness * GVAR(PlayerNamesViewDistance); +private _maxDistance = GVAR(playerNamesViewDistance); +if (GVAR(ambientBrightnessAffectViewDist) != 0) then { + private _ambientBrightness = [] call EFUNC(common,ambientBrightness); + if (currentVisionMode ace_player != 0) then { + _ambientBrightness = _ambientBrightness + 0.4; + }; + _maxDistance = _maxDistance * linearConversion [0, 1, _ambientBrightness, 1 - GVAR(ambientBrightnessAffectViewDist), 1, true]; +}; [_drawName, GVAR(showPlayerRanks),_enabledTagsNearby,_enabledTagsCursor,_maxDistance] diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index b400e2d6fa..a3d7f80ed2 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -56,7 +56,7 @@ if (isClass (configFile >> "CfgPatches" >> "acre_api")) then { [{ private _oldSetting = ACE_player getVariable [QGVAR(isSpeakingInGame), false]; private _newSetting = (!(isNull findDisplay 55)); - if (!(_oldSetting isEqualTo _newSetting)) then { + if (_oldSetting isNotEqualTo _newSetting) then { ACE_player setVariable [QGVAR(isSpeakingInGame), _newSetting, true]; }; } , 0.1, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index fb5d29807a..3b348fa824 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -113,7 +113,7 @@ if (_enabledTagsNearby) then { private _centerOffsetFactor = 1; if (GVAR(showPlayerNames) == 5) then { private _screenPos = worldToScreen (_target modelToWorld (_target selectionPosition "head")); - if !(_screenPos isEqualTo []) then { + if (_screenPos isNotEqualTo []) then { // Distance from center / half of screen width _centerOffsetFactor = 1 - ((_screenPos distance2D [0.5, 0.5]) / (safezoneW / 3)); } else { diff --git a/addons/nametags/initSettings.sqf b/addons/nametags/initSettings.sqf index b2cf482ce1..3fd5e5b465 100644 --- a/addons/nametags/initSettings.sqf +++ b/addons/nametags/initSettings.sqf @@ -1,49 +1,116 @@ // CBA Settings [ADDON: ace_nametags]: +[ + QGVAR(showPlayerNames), "LIST", + [LSTRING(ShowPlayerNames), LSTRING(ShowPlayerNames_Desc)], + format ["ACE %1", localize LSTRING(Module_DisplayName)], + [[0, 1, 2, 3, 4, 5], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), LSTRING(OnlyCursor), LSTRING(OnlyKeypress), LSTRING(OnlyCursorAndKeypress), LSTRING(FadeOnBorder)], 1], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(showPlayerRanks), "CHECKBOX", + LSTRING(ShowPlayerRanks), + format ["ACE %1", localize LSTRING(Module_DisplayName)], + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(showVehicleCrewInfo), "CHECKBOX", + [LSTRING(ShowVehicleCrewInfo), LSTRING(ShowVehicleCrewInfo_Desc)], + format ["ACE %1", localize LSTRING(Module_DisplayName)], + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(showNamesForAI), "CHECKBOX", + [LSTRING(ShowNamesForAI), LSTRING(ShowNamesForAI_Desc)], + format ["ACE %1", localize LSTRING(Module_DisplayName)], + false, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(showCursorTagForVehicles), "CHECKBOX", + [LSTRING(showCursorTagForVehicles_DisplayName), LSTRING(showCursorTagForVehicles_Description)], + format ["ACE %1", localize LSTRING(Module_DisplayName)], + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(showSoundWaves), "LIST", + [LSTRING(ShowSoundWaves), LSTRING(ShowSoundWaves_Desc)], + format ["ACE %1", localize LSTRING(Module_DisplayName)], + [[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(NameTagSettings), LSTRING(AlwaysShowAll)], 1], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(playerNamesViewDistance), "SLIDER", + [LSTRING(PlayerNamesViewDistance_DisplayName), LSTRING(PlayerNamesViewDistance_Description)], + format ["ACE %1", localize LSTRING(Module_DisplayName)], + [0, 50, 5, 1], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(playerNamesMaxAlpha), "SLIDER", + LSTRING(playerNamesMaxAlpha), + format ["ACE %1", localize LSTRING(Module_DisplayName)], + [0, 1, 0.8, 2], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(tagSize), "LIST", + [LSTRING(TagSize_Name), LSTRING(TagSize_Description)], + format ["ACE %1", localize LSTRING(Module_DisplayName)], + [[0, 1, 2, 3, 4], ["str_very_small", "str_small", "str_medium", "str_large", "str_very_large"], 2], + 0 +] call CBA_fnc_addSetting; + [ QGVAR(defaultNametagColor), "COLOR", [LSTRING(DefaultNametagColor)], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize "str_a3_rscdisplaygameoptions_buttongui"], [0.77, 0.51, 0.08, 1], - false, // isGlobal - {[QGVAR(defaultNametagColor), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; + false // isGlobal +] call CBA_fnc_addSetting; [ QGVAR(nametagColorMain), "COLOR", ["str_team_main"], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize "str_a3_rscdisplaygameoptions_buttongui"], [1.00, 1.00, 1.00, 1], - false, // isGlobal - {[QGVAR(nametagColorMain), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; + false // isGlobal +] call CBA_fnc_addSetting; [ QGVAR(nametagColorRed), "COLOR", ["str_team_red"], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize "str_a3_rscdisplaygameoptions_buttongui"], [1.00, 0.67, 0.67, 1], - false, // isGlobal - {[QGVAR(nametagColorRed), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; + false // isGlobal +] call CBA_fnc_addSetting; [ QGVAR(nametagColorGreen), "COLOR", ["str_team_green"], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize "str_a3_rscdisplaygameoptions_buttongui"], [0.67, 1.00, 0.67, 1], - false, // isGlobal - {[QGVAR(nametagColorGreen), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; + false // isGlobal +] call CBA_fnc_addSetting; [ QGVAR(nametagColorBlue), "COLOR", ["str_team_blue"], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize "str_a3_rscdisplaygameoptions_buttongui"], [0.67, 0.67, 1.00, 1], - false, // isGlobal - {[QGVAR(nametagColorBlue), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; + false // isGlobal +] call CBA_fnc_addSetting; [ QGVAR(nametagColorYellow), @@ -51,6 +118,14 @@ ["str_team_yellow"], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize "str_a3_rscdisplaygameoptions_buttongui"], [1.00, 1.00, 0.67, 1], - false, // isGlobal - {[QGVAR(nametagColorYellow), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; + false // isGlobal +] call CBA_fnc_addSetting; + +[ + QGVAR(ambientBrightnessAffectViewDist), + "SLIDER", + [LSTRING(AmbientBrightnessAffectsViewDist_DisplayName), LSTRING(AmbientBrightnessAffectsViewDist_Description)], + format ["ACE %1", localize LSTRING(Module_DisplayName)], + [0, 1, 1, 0, true], + true +] call CBA_fnc_addSetting; diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index 263f093e0a..f2113e1f6a 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -524,5 +524,15 @@ 強制顯示在準心指到和按按鍵時 Göstermeyi Yalnızca İmleç ve Tuşa Basmaya Zorla + + Nametag Ambient Brightness Coefficient + Коэффициент окружающего освещения для меток игроков + 環境名札明るさ係数 + + + Adjusts how strongly ambient brightness affects nametag view distance. + Определяет как сильно окружающее освещение влияет на дальность отображения меток игроков. + 環境光の強さによって名札の描画距離を調整します。 + diff --git a/addons/nightvision/CfgEventHandlers.hpp b/addons/nightvision/CfgEventHandlers.hpp index 5f8c191f66..27d0d9ed28 100644 --- a/addons/nightvision/CfgEventHandlers.hpp +++ b/addons/nightvision/CfgEventHandlers.hpp @@ -1,16 +1,16 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/nightvision/CfgWeapons.hpp b/addons/nightvision/CfgWeapons.hpp index a81835996f..52c3d32d18 100644 --- a/addons/nightvision/CfgWeapons.hpp +++ b/addons/nightvision/CfgWeapons.hpp @@ -27,23 +27,63 @@ class CfgWeapons { }; class ACE_NVG_Gen1: NVGoggles_OPFOR { author = ECSTRING(common,ACETeam); - displayName = CSTRING(NVG_Gen1); + displayName = CSTRING(NVG_Gen1_black); GVAR(generation) = 1; }; + class ACE_NVG_Gen1_Brown: NVGoggles { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(NVG_Gen1_brown); + GVAR(generation) = 1; + }; + class ACE_NVG_Gen1_Green: NVGoggles_INDEP { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(NVG_Gen1_green); + GVAR(generation) = 1; + }; + class ACE_NVG_Gen2_Black: NVGoggles_OPFOR { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(NVG_Gen2_black); + GVAR(generation) = 2; + }; + class ACE_NVG_Gen2_Brown: NVGoggles { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(NVG_Gen2_brown); + GVAR(generation) = 2; + }; class ACE_NVG_Gen2: NVGoggles_INDEP { author = ECSTRING(common,ACETeam); - displayName = CSTRING(NVG_Gen2); + displayName = CSTRING(NVG_Gen2_green); GVAR(generation) = 2; }; + class ACE_NVG_Gen4_Black: NVGoggles_OPFOR { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(NVG_Gen4_black); + GVAR(generation) = 4; + }; class ACE_NVG_Gen4: NVGoggles { author = ECSTRING(common,ACETeam); - displayName = CSTRING(NVG_Gen4); + displayName = CSTRING(NVG_Gen4_brown); GVAR(generation) = 4; }; + class ACE_NVG_Gen4_Green: NVGoggles_INDEP { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(NVG_Gen4_green); + GVAR(generation) = 4; + }; + class ACE_NVG_Wide_Black: NVGoggles_OPFOR { + author = ECSTRING(common,ACETeam); + modelOptics = QPATHTOF(models\ACE_nvg_wide_optics); + displayName = CSTRING(NVG_Wide_black); + }; class ACE_NVG_Wide: NVGoggles { author = ECSTRING(common,ACETeam); modelOptics = QPATHTOF(models\ACE_nvg_wide_optics); - displayName = CSTRING(NVG_FullScreen); + displayName = CSTRING(NVG_Wide_brown); + }; + class ACE_NVG_Wide_Green: NVGoggles_INDEP { + author = ECSTRING(common,ACETeam); + modelOptics = QPATHTOF(models\ACE_nvg_wide_optics); + displayName = CSTRING(NVG_Wide_green); }; diff --git a/addons/nightvision/README.md b/addons/nightvision/README.md index 469d83d942..85e5c530f0 100644 --- a/addons/nightvision/README.md +++ b/addons/nightvision/README.md @@ -2,11 +2,3 @@ ace_nightvision =============== Adds different types of NVGs with different levels of quality. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/nightvision/XEH_postInit.sqf b/addons/nightvision/XEH_postInit.sqf index dd6e2922f3..12d31a1f0f 100644 --- a/addons/nightvision/XEH_postInit.sqf +++ b/addons/nightvision/XEH_postInit.sqf @@ -23,7 +23,7 @@ GVAR(ppeffectBlur) = -1; GVAR(isUsingMagnification) = false; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_5("settingsInitialized",GVAR(disableNVGsWithSights),GVAR(fogScaling),GVAR(noiseScaling),GVAR(effectScaling),GVAR(scotopicEffects)); ["visionMode", LINKFUNC(onVisionModeChanged), false] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/nightvision/config.cpp b/addons/nightvision/config.cpp index ffdb3d16a0..f416af9d38 100644 --- a/addons/nightvision/config.cpp +++ b/addons/nightvision/config.cpp @@ -4,7 +4,21 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; units[] = {}; - weapons[] = {"ACE_NVG_Gen1", "ACE_NVG_Gen2", /*"ACE_NVG_Gen3",*/ "ACE_NVG_Gen4", "ACE_NVG_Wide"}; + weapons[] = { + "ACE_NVG_Gen1", + "ACE_NVG_Gen1_Brown", + "ACE_NVG_Gen1_Green", + "ACE_NVG_Gen2_Black", + "ACE_NVG_Gen2_Brown", + "ACE_NVG_Gen2", + /*"ACE_NVG_Gen3",*/ + "ACE_NVG_Gen4_Black", + "ACE_NVG_Gen4", + "ACE_NVG_Gen4_Green", + "ACE_NVG_Wide_Black", + "ACE_NVG_Wide", + "ACE_NVG_Wide_Green" + }; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); diff --git a/addons/nightvision/functions/fnc_onFiredPlayer.sqf b/addons/nightvision/functions/fnc_onFiredPlayer.sqf index 19750891c9..12bca77392 100644 --- a/addons/nightvision/functions/fnc_onFiredPlayer.sqf +++ b/addons/nightvision/functions/fnc_onFiredPlayer.sqf @@ -18,7 +18,12 @@ //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile); -if ((!GVAR(running)) || {!GVAR(shutterEffects)} || {_weapon == "throw"} || {_weapon == "put"}) exitWith {}; +if ((!GVAR(running)) + || {!GVAR(shutterEffects)} + || {EGVAR(common,epilepsyFriendlyMode)} + || {_weapon == "throw"} + || {_weapon == "put"} +) exitWith {}; private _visibleFireCoef = 1; if (_unit == ace_player) then { diff --git a/addons/nightvision/functions/fnc_pfeh.sqf b/addons/nightvision/functions/fnc_pfeh.sqf index 82e6a3cf34..794fe9b555 100644 --- a/addons/nightvision/functions/fnc_pfeh.sqf +++ b/addons/nightvision/functions/fnc_pfeh.sqf @@ -45,7 +45,7 @@ if (!GVAR(running)) then { // Scale Border / Hex BEGIN_COUNTER(borderScaling); private _scale = (call EFUNC(common,getZoom)) * 1.12513; -if (!(GVAR(defaultPositionBorder) isEqualTo [])) then { +if (GVAR(defaultPositionBorder) isNotEqualTo []) then { // Prevents issues when "zooming out" on ultra wide monitors - The square mask would be narrower than the screen if ((GVAR(defaultPositionBorder) select 2) * _scale < safeZoneW) then { _scale = safeZoneW / (GVAR(defaultPositionBorder) select 2); @@ -57,7 +57,7 @@ if (!(GVAR(defaultPositionBorder) isEqualTo [])) then { }; END_COUNTER(borderScaling); -if !(IS_MAGNIFIED isEqualTo GVAR(isUsingMagnification)) then { +if (IS_MAGNIFIED isNotEqualTo GVAR(isUsingMagnification)) then { GVAR(isUsingMagnification) = IS_MAGNIFIED; GVAR(nextEffectsUpdate) = -1; }; diff --git a/addons/nightvision/functions/fnc_refreshGoggleType.sqf b/addons/nightvision/functions/fnc_refreshGoggleType.sqf index c367d7a2f5..6bb9e35fdb 100644 --- a/addons/nightvision/functions/fnc_refreshGoggleType.sqf +++ b/addons/nightvision/functions/fnc_refreshGoggleType.sqf @@ -31,7 +31,7 @@ if (alive ACE_player) then { // Test if we are using player's nvg or if sourced from vehicle: private _currentVehicle = vehicle ACE_player; - private _vehConfig = configFile >> "CfgVehicles" >> (typeOf _currentVehicle); + private _vehConfig = configOf _currentVehicle; if (cameraView != "GUNNER") exitWith {true}; // asume hmd usage outside of gunner view if ([ACE_player] call CBA_fnc_canUseWeapon) exitWith {true}; // FFV diff --git a/addons/nightvision/initSettings.sqf b/addons/nightvision/initSettings.sqf index 6a82fcf595..994e0f2fef 100644 --- a/addons/nightvision/initSettings.sqf +++ b/addons/nightvision/initSettings.sqf @@ -44,14 +44,14 @@ }; }; } -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fogScaling), "SLIDER", [LSTRING(fogScaling_DisplayName), LSTRING(fogScaling_Description)], localize LSTRING(Category), [0,2,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(noiseScaling), "SLIDER", @@ -59,7 +59,7 @@ localize LSTRING(Category), [0,2,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(aimDownSightsBlur), "SLIDER", @@ -67,7 +67,7 @@ localize LSTRING(Category), [0,2,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(disableNVGsWithSights), "CHECKBOX", @@ -75,7 +75,7 @@ localize LSTRING(Category), false, // default value true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(shutterEffects), "CHECKBOX", @@ -83,7 +83,7 @@ localize LSTRING(Category), true, // default value false // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(scotopicEffects), "CHECKBOX", @@ -91,4 +91,4 @@ localize LSTRING(Category), false, // default value true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index 555f346c81..b54b00d7e7 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -14,40 +14,49 @@ ACE Visão Noturna ACE Noční vidění ACE Gece Görüşü + ACE visión nocturna - - NV Goggles (Gen1) - Noktovizor (Gen1) - JVN (Gen1) - NS-Brille (1. Gen.) - Occhiali notturni (Gen1) - Gogle noktowizyjne (Gen1) - Óculos de visão noturna (Gen1) - ПНВ (Gen1) - Gafas de visión nocturna (Gen1) - Éjjellátó szemüveg (1. Gen.) - 暗視装置 (第1世代) - 야투경 (1세대) - 夜视镜 (初代) - 夜視鏡 (初代) - GG Gözlüğü (1. Jen) + + NV Goggles (Gen1, Brown) + JVN (Gen1, marron) + ПНВ (Gen1, Коричневый) + 暗視装置 (第1世代、ブラウン) + Gogle noktowizyjne (Gen 1, Brązowe) - - NV Goggles (Gen2) - Noktovizor (Gen2) - JVN (Gen2) - NS-Brille (2. Gen.) - Occhiali notturni (Gen2) - Gogle noktowizyjne (Gen2) - Óculos de visão noturna (Gen2) - ПНВ (Gen2) - Gafas de visión nocturna (Gen2) - Éjjellátó szemüveg (2. Gen.) - 暗視装置 (第2世代) - 야투경 (2세대) - 夜视镜 (二代) - 夜視鏡 (二代) - GG Gözlüğü (2. Jen) + + NV Goggles (Gen1, Black) + JVN (Gen1, noires) + ПНВ (Gen1, Чёрный) + 暗視装置 (第1世代、ブラック) + Gogle noktowizyjne (Gen 1, Czarne) + + + NV Goggles (Gen1, Green) + JVN (Gen1, vertes) + ПНВ (Gen1, Зелёный) + 暗視装置 (第1世代、グリーン) + Gogle noktowizyjne (Gen 1, Zielone) + + + NV Goggles (Gen2, Brown) + JVN (Gen2, marron) + ПНВ (Gen2, Коричневый) + 暗視装置 (第2世代、ブラウン) + Gogle noktowizyjne (Gen 2, Brązowe) + + + NV Goggles (Gen2, Black) + JVN (Gen2, noires) + ПНВ (Gen2, Чёрный) + 暗視装置 (第2世代、ブラック) + Gogle noktowizyjne (Gen 2, Czarne) + + + NV Goggles (Gen2, Green) + NV Goggles (Gen2, vertes) + ПНВ (Gen2, Зелёный) + 暗視装置 (第2世代、グリーン) + Gogle noktowizyjne (Gen 2, Zielone) NV Goggles (Gen3) @@ -117,39 +126,47 @@ 夜視鏡 (三代, 黑色) GG Gözlüğü (3. Jen Siyah) - - NV Goggles (Gen4) - Noktovizor (Gen4) - JVN (Gen4) - NS-Brille (4. Gen.) - Occhiali notturni (Gen4) - Gogle noktowizyjne (Gen4) - Óculos de visão noturna (Gen4) - ПНВ (Gen4) - Gafas de visión nocturna (Gen4) - Éjjellátó szemüveg (4. Gen.) - 暗視装置 (第4世代) - 야투경 (4세대) - 夜视镜 (四代) - 夜視鏡 (四代) - GG Gözlüğü (4. Jen) + + NV Goggles (Gen4, Brown) + JVN (Gen4, marron) + ПНВ (Gen4, Коричневый) + 暗視装置 (第4世代、ブラウン) + Gogle noktowizyjne (Gen 4, Brązowe) - - NV Goggles (Wide) - NS-Brille (Weitwinkel) - Gafas de visión nocturna (Panorámicas) - Gogle noktowizyjne (panoramiczne) - Noktovizor (Širokoúhlý) - ПНВ (Широкоугольный) - JVN (Large) - Éjjellátó szemüveg (széles látószögű) - Óculos de visão noturna (Panorâmico) - Occhiali notturni (Larghi) - 暗視装置 (ワイド) - 야투경 (넓음) - 夜视镜 (宽版) - 夜視鏡 (寬版) - GG Gözlüğü (Geniş) + + NV Goggles (Gen4, Black) + JVN (Gen4, noires) + ПНВ (Gen4, Чёрный) + 暗視装置 (第3世代、ブラック) + Gogle noktowizyjne (Gen 4, Czarne) + + + NV Goggles (Gen4, Green) + JVN (Gen4, vertes) + ПНВ (Gen4, Зелёный) + 暗視装置 (第3世代、グリーン) + Gogle noktowizyjne (Gen 4, Zielone) + + + NV Goggles (Wide, Brown) + JVN (Large, marron) + ПНВ (Широкий, Коричневый) + 暗視装置 (ワイド、ブラウン) + Gogle noktowizyjne (Szerokie, Brązowe) + + + NV Goggles (Wide, Black) + JVN (Large, noires) + ПНВ (Широкий, Чёрный) + 暗視装置 (ワイド、ブラック) + Gogle noktowizyjne (Szerokie, Czarne) + + + NV Goggles (Wide, Green) + JVN (Large, vertes) + ПНВ (Широкий, Зелёный) + 暗視装置 (ワイド、グリーン) + Gogle noktowizyjne (Szerokie, Zielone) Brightness: %1 diff --git a/addons/nlaw/CfgEventhandlers.hpp b/addons/nlaw/CfgEventhandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/nlaw/CfgEventhandlers.hpp +++ b/addons/nlaw/CfgEventhandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/nlaw/README.md b/addons/nlaw/README.md index dd62b36014..2123e79be5 100644 --- a/addons/nlaw/README.md +++ b/addons/nlaw/README.md @@ -3,8 +3,3 @@ ace_nlaw Adds Predicted Line Of Sight guidance to the NLAW. -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/nlaw/functions/fnc_attackProfile.sqf b/addons/nlaw/functions/fnc_attackProfile.sqf index acc4330083..21f77f0ff5 100644 --- a/addons/nlaw/functions/fnc_attackProfile.sqf +++ b/addons/nlaw/functions/fnc_attackProfile.sqf @@ -24,7 +24,7 @@ _targetLaunchParams params ["", "", "_launchPos"]; _firedEH params ["","","","","","","_projectile"]; // Use seeker (if terminal) -if (!(_seekerTargetPos isEqualTo [0,0,0])) exitWith {_seekerTargetPos}; +if (_seekerTargetPos isNotEqualTo [0,0,0]) exitWith {_seekerTargetPos}; _attackProfileStateParams params ["_startTime", "_startLOS", "_yawChange", "_pitchChange"]; (_startLOS call CBA_fnc_vect2Polar) params ["", "_yaw", "_pitch"]; diff --git a/addons/nlaw/functions/fnc_seeker.sqf b/addons/nlaw/functions/fnc_seeker.sqf index eeb2e0794c..af9b349cc2 100644 --- a/addons/nlaw/functions/fnc_seeker.sqf +++ b/addons/nlaw/functions/fnc_seeker.sqf @@ -54,7 +54,7 @@ if ((_projPos distance _launchPos) >= 20) then { // Limit scan to 5 meters directly down (shaped charge jet has a very limited range) private _res = lineIntersectsSurfaces [_virtualPos, (_virtualPos vectorAdd [0,0,-5]), _projectile]; - if (!(_res isEqualTo [])) then { + if (_res isNotEqualTo []) then { (_res select 0) params ["_targetPos", "", "_target"]; if ((_target isKindOf "Tank") || {_target isKindOf "Car"} || {_target isKindOf "Air"}) exitWith { TRACE_3("Firing shaped charge down",_target,_targetPos distance _virtualPos,_frameDistance); @@ -74,7 +74,7 @@ if ((_projPos distance _launchPos) >= 20) then { _shapedCharage setVelocity [0,0,-300]; _seekerStateParams set [1, true]; - + END_COUNTER(targetScan); breakOut "targetScan"; }; diff --git a/addons/nlaw/stringtable.xml b/addons/nlaw/stringtable.xml index a53d21050c..6ac169dcc8 100644 --- a/addons/nlaw/stringtable.xml +++ b/addons/nlaw/stringtable.xml @@ -15,6 +15,7 @@ NLAW suivre la cible (maintenir) NLAW sledování cíle (držet) NLAW Track Target (Basılı Tut) + NLAW Seguir objetivo (Mantener) Direct Attack @@ -30,6 +31,7 @@ Attaque directe Přímý útok Doğrudan Saldırı + Ataque directo Overfly Top Attack @@ -45,6 +47,7 @@ Attaque par le haut Útok zvrchu při přeletu Yüksek Uçuş Saldırı + Ataque desde arriba diff --git a/addons/noidle/README.md b/addons/noidle/README.md index 4ea313bd57..3d6a40ec37 100644 --- a/addons/noidle/README.md +++ b/addons/noidle/README.md @@ -2,10 +2,3 @@ ace_noidle =========== Removes idle animations. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/addons/noradio/CfgEventhandlers.hpp b/addons/noradio/CfgEventhandlers.hpp index b928bc2de6..9b160c1600 100644 --- a/addons/noradio/CfgEventhandlers.hpp +++ b/addons/noradio/CfgEventhandlers.hpp @@ -1,5 +1,5 @@ class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/noradio/README.md b/addons/noradio/README.md index 95abf72b6f..98a2fb5c66 100644 --- a/addons/noradio/README.md +++ b/addons/noradio/README.md @@ -2,11 +2,3 @@ ace_noradio =========== Disables the automatic callouts for player units. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [bux578](https://github.com/bux578) diff --git a/addons/noradio/XEH_preInit.sqf b/addons/noradio/XEH_preInit.sqf index 61492aa36d..48463b70ef 100644 --- a/addons/noradio/XEH_preInit.sqf +++ b/addons/noradio/XEH_preInit.sqf @@ -36,4 +36,4 @@ if (hasInterface) then { [ACE_player, "isPlayer"] call EFUNC(common,unmuteUnit); }; }, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/noradio/stringtable.xml b/addons/noradio/stringtable.xml index 7e788a9f3f..affc778e6a 100644 --- a/addons/noradio/stringtable.xml +++ b/addons/noradio/stringtable.xml @@ -14,6 +14,7 @@ Joueur en sourdine Ztlumit hráče Oyuncuyu Sustur + Ensordecer jugador Mutes the controlled player avatar. @@ -28,6 +29,7 @@ Met en sourdine l'avatar du joueur. Vypne hlas charakteru hráče. Oyuncuları Susturur + Ensordecer el avatar del jugador controlado diff --git a/addons/norearm/README.md b/addons/norearm/README.md index f0035e5749..f83eea021b 100644 --- a/addons/norearm/README.md +++ b/addons/norearm/README.md @@ -2,10 +2,3 @@ ace_norearm =========== Removes rearm action. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/addons/optics/CfgEventHandlers.hpp b/addons/optics/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/optics/CfgEventHandlers.hpp +++ b/addons/optics/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/optics/README.md b/addons/optics/README.md index a5224267b7..da4acac567 100644 --- a/addons/optics/README.md +++ b/addons/optics/README.md @@ -2,10 +2,3 @@ ace_optics =============== Adds animated 2D and PiP (picture-in-picture) optics. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/addons/optionsmenu/ACE_Settings.hpp b/addons/optionsmenu/ACE_Settings.hpp index bab67cd37f..cd5bed07ee 100644 --- a/addons/optionsmenu/ACE_Settings.hpp +++ b/addons/optionsmenu/ACE_Settings.hpp @@ -1,8 +1,5 @@ class ACE_Settings { class GVAR(showNewsOnMainMenu) { - value = 1; - typeName = "BOOL"; - isClientSettable = 1; - displayName = CSTRING(showNewsOnMainMenu_name); + movedToSQF = 1; }; }; diff --git a/addons/optionsmenu/CfgEventHandlers.hpp b/addons/optionsmenu/CfgEventHandlers.hpp index 4f50c9613f..e656fd8a0d 100644 --- a/addons/optionsmenu/CfgEventHandlers.hpp +++ b/addons/optionsmenu/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_DisplayLoad_EventHandlers { class RscDisplayMain { - GVAR(loadMainMenuBox) = QUOTE(_this call COMPILE_FILE(init_loadMainMenuBox)); + GVAR(loadMainMenuBox) = QUOTE(_this call COMPILE_SCRIPT(init_loadMainMenuBox)); }; }; diff --git a/addons/optionsmenu/README.md b/addons/optionsmenu/README.md index e274229053..02977228c8 100644 --- a/addons/optionsmenu/README.md +++ b/addons/optionsmenu/README.md @@ -3,11 +3,3 @@ ace_optionsmenu Previously held the options menu. Now just handles version display on main menu and debug/headbug on options menu. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) -- [NouberNou](https://github.com/NouberNou) diff --git a/addons/optionsmenu/XEH_preInit.sqf b/addons/optionsmenu/XEH_preInit.sqf index 46d58b5a8a..d25516a277 100644 --- a/addons/optionsmenu/XEH_preInit.sqf +++ b/addons/optionsmenu/XEH_preInit.sqf @@ -11,4 +11,6 @@ if (hasInterface) then { [[format ["ACE %1", localize LSTRING(headBugFix)], localize LSTRING(headBugFixTooltip)], QGVAR(MainMenuHelperHeadBugFix)] call CBA_fnc_addPauseMenuOption; }; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/optionsmenu/initSettings.sqf b/addons/optionsmenu/initSettings.sqf new file mode 100644 index 0000000000..7a15e892ff --- /dev/null +++ b/addons/optionsmenu/initSettings.sqf @@ -0,0 +1,7 @@ +[ + QGVAR(showNewsOnMainMenu), "CHECKBOX", + LSTRING(showNewsOnMainMenu_name), + "ACE Uncategorized", + true, + 0 +] call CBA_fnc_addSetting; diff --git a/addons/overheating/ACE_Settings.hpp b/addons/overheating/ACE_Settings.hpp index e0681f42c5..5febcd6f7f 100644 --- a/addons/overheating/ACE_Settings.hpp +++ b/addons/overheating/ACE_Settings.hpp @@ -1,55 +1,41 @@ class ACE_Settings { class GVAR(enabled) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 1; - displayName = CSTRING(enabled_displayName); - description = CSTRING(enabled_description); + movedToSQF = 1; + }; + class GVAR(heatCoef) { + movedToSQF = 1; }; class GVAR(showParticleEffects) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - isClientSettable = 1; - value = 1; - displayName = CSTRING(showParticleEffects_displayName); - description = CSTRING(showParticleEffects_description); + movedToSQF = 1; }; class GVAR(showParticleEffectsForEveryone) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - isClientSettable = 1; - value = 0; - displayName = CSTRING(showParticleEffectsForEveryone_displayName); - description = CSTRING(showParticleEffectsForEveryone_description); + movedToSQF = 1; }; class GVAR(overheatingDispersion) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 1; - displayName = CSTRING(overheatingDispersion_displayName); - description = CSTRING(overheatingDispersion_description); + movedToSQF = 1; + }; + class GVAR(particleEffectsAndDispersionDistance) { + movedToSQF = 1; + }; + class GVAR(overheatingRateOfFire) { + movedToSQF = 1; }; class GVAR(displayTextOnJam) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - isClientSettable = 1; - value = 1; - displayName = CSTRING(DisplayTextOnJam_displayName); - description = CSTRING(DisplayTextOnJam_description); + movedToSQF = 1; }; - class GVAR(unJamOnreload) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 0; - displayName = CSTRING(unJamOnreload_displayName); - description = CSTRING(unJamOnreload_description); + class GVAR(jamChanceCoef) { + movedToSQF = 1; + }; + class GVAR(unJamOnReload) { + movedToSQF = 1; + }; + class GVAR(unJamOnSwapBarrel) { + movedToSQF = 1; }; class GVAR(unJamFailChance) { - category = CSTRING(DisplayName); - typeName = "SCALAR"; - value = 0.1; - displayName = CSTRING(unJamFailChance_displayName); - description = CSTRING(unJamFailChance_description); - sliderSettings[] = {0, 1, 0.1, 2}; + movedToSQF = 1; + }; + class GVAR(cookoffCoef) { + movedToSQF = 1; }; }; diff --git a/addons/overheating/CfgEventHandlers.hpp b/addons/overheating/CfgEventHandlers.hpp index becf395052..8143e2ce0d 100644 --- a/addons/overheating/CfgEventHandlers.hpp +++ b/addons/overheating/CfgEventHandlers.hpp @@ -1,18 +1,26 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; + +class Extended_Respawn_EventHandlers { + class CAManBase { + class ADDON { + respawn = QUOTE(_this call FUNC(handleRespawn)); + }; }; }; diff --git a/addons/overheating/CfgSounds.hpp b/addons/overheating/CfgSounds.hpp index bd2831eeb6..2b333c3381 100644 --- a/addons/overheating/CfgSounds.hpp +++ b/addons/overheating/CfgSounds.hpp @@ -23,4 +23,26 @@ class CfgSounds { sound[]={QPATHTOF(sounds\fixing_pistol.wav),1,1}; titles[]={}; }; + /* // to be added when licence compatible audio can be found or recorded + class GVAR(pouring_long) { + name= QGVAR(pouring_long); + sound[]={QPATHTOF(sounds\pouring_long.ogg),5,1}; + titles[]={}; + }; + class GVAR(pouring_short) { + name= QGVAR(pouring_short); + sound[]={QPATHTOF(sounds\pouring_short.ogg),5,1}; + titles[]={}; + }; + class GVAR(sizzling_long) { + name= QGVAR(sizzling_long); + sound[]={QPATHTOF(sounds\sizzling_long.ogg),5,1}; + titles[]={}; + }; + class GVAR(sizzling_short) { + name= QGVAR(sizzling_short); + sound[]={QPATHTOF(sounds\sizzling_short.ogg),5,1}; + titles[]={}; + }; + */ }; diff --git a/addons/overheating/CfgVehicles.hpp b/addons/overheating/CfgVehicles.hpp index e142b71a89..5a854699e2 100644 --- a/addons/overheating/CfgVehicles.hpp +++ b/addons/overheating/CfgVehicles.hpp @@ -36,6 +36,15 @@ class CfgVehicles { showDisabled = 0; icon = QUOTE(PATHTOF(UI\temp_ca.paa)); }; + class GVAR(CoolWeaponWithItem) { + displayName = CSTRING(CoolWeaponWithItem); + condition = QUOTE(GVAR(enabled) && {isClass (configfile >> 'CfgPatches' >> 'acex_field_rations')}); + exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"}; + statement = "true"; + showDisabled = 0; + insertChildren = QUOTE(_player call FUNC(getConsumableChildren)); + icon = QPATHTOF(UI\pour_water_ca.paa); + }; }; }; @@ -55,6 +64,15 @@ class CfgVehicles { statement = QUOTE( [ARR_3(_player, _target, currentWeapon _target)] call FUNC(checkTemperature); ); icon = QUOTE(PATHTOF(UI\temp_ca.paa)); }; + class GVAR(CoolWeaponWithItem) { + displayName = CSTRING(CoolWeaponWithItem); + condition = QUOTE(GVAR(enabled) && {isClass (configfile >> 'CfgPatches' >> 'acex_field_rations')}); + exceptions[] = {"isNotInside", "isNotSwimming", "isNotSitting"}; + statement = "true"; + showDisabled = 0; + insertChildren = QUOTE(_player call FUNC(getConsumableChildren)); + icon = QPATHTOF(UI\pour_water_ca.paa); + }; }; }; }; diff --git a/addons/overheating/CfgWeapons.hpp b/addons/overheating/CfgWeapons.hpp index f094ec7b27..67a2f0c765 100644 --- a/addons/overheating/CfgWeapons.hpp +++ b/addons/overheating/CfgWeapons.hpp @@ -1,4 +1,19 @@ class CfgWeapons { + class PistolCore; + class Pistol: PistolCore { + //Closed Bolt (Closed Bolt will cook off if too hot) + //Pistols are nearly universally closed bolt. + GVAR(closedBolt) = 1; + }; + + class Pistol_Base_F: Pistol {}; + class hgun_Pistol_heavy_02_F: Pistol_Base_F { + GVAR(jamTypesAllowed)[] = {"Fire", "Dud"}; + }; + class hgun_Pistol_Signal_F: Pistol_Base_F { + GVAR(jamTypesAllowed)[] = {"Fire", "Dud"}; + }; + class RifleCore; class Rifle: RifleCore { //Mean Rounds Between Stoppages (this will be scaled based on the barrel temp) @@ -9,33 +24,89 @@ class CfgWeapons { //Slowdown Factor (this will be scaled based on the barrel temp) GVAR(slowdownFactor) = 1; + + //Closed Bolt, most weapons are closed bolt + GVAR(closedBolt) = 1; }; - class Rifle_Base_F : Rifle {}; - class Rifle_Long_Base_F : Rifle_Base_F { + class Rifle_Base_F; + class Rifle_Long_Base_F: Rifle_Base_F { GVAR(dispersion) = 0.75; + + // Open Bolt, most machine guns are open bolt, which cannot normally cook off, and use this as a parent class + // A lot of sniper rifles also use this as a parent class, they will need to be indivisually set to closed bolt, but it's probably not an issue as they are unlikely to overheat + GVAR(closedBolt) = 0; }; - class arifle_MX_Base_F : Rifle_Base_F { + class arifle_MX_Base_F: Rifle_Base_F { // Custom jam clearing action. Default uses reload animation. ACE_clearJamAction = "GestureReloadMX"; }; - class arifle_MX_SW_F : arifle_MX_Base_F { + class arifle_MX_SW_F: arifle_MX_Base_F { // Custom jam clearing action. Use empty string to undefine. ACE_clearJamAction = ""; // 1 to enable barrel swap. 0 to disable. Meant for machine guns where you can easily swap the barrel without dismantling the whole weapon. GVAR(allowSwapBarrel) = 1; GVAR(dispersion) = 0.75; }; + class DMR_01_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; + class DMR_02_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; + class DMR_03_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; + class DMR_04_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; + class DMR_05_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; + class DMR_06_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; + class DMR_07_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; + class EBR_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; + class GM6_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; + class LRR_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + }; class MMG_01_base_F: Rifle_Long_Base_F { GVAR(allowSwapBarrel) = 1; }; class MMG_02_base_F: Rifle_Long_Base_F { GVAR(allowSwapBarrel) = 1; }; - class LMG_Zafir_F : Rifle_Long_Base_F { + class LMG_Zafir_F: Rifle_Long_Base_F { GVAR(allowSwapBarrel) = 1; }; - class LMG_Mk200_F : Rifle_Long_Base_F { + class LMG_Mk200_F: Rifle_Long_Base_F { GVAR(allowSwapBarrel) = 1; }; + class LMG_03_Base_F: Rifle_Long_Base_F { + GVAR(allowSwapBarrel) = 1; + }; + class sgun_HunterShotgun_01_base_F: Rifle_Long_Base_F { + GVAR(closedBolt) = 1; + GVAR(jamTypesAllowed)[] = {"Fire", "Dud"}; + }; + class ACE_ItemCore; + class CBA_MiscItem_ItemInfo; + class ACE_SpareBarrel_Item: ACE_ItemCore { + displayName = CSTRING(SpareBarrelName); + author = ECSTRING(common,ACETeam); + scope = 2; + descriptionshort = CSTRING(SpareBarrelDescription); + picture = QUOTE(PATHTOF(UI\spare_barrel_ca.paa)); + class ItemInfo: CBA_MiscItem_ItemInfo { + mass = 60; + }; + }; }; diff --git a/addons/overheating/README.md b/addons/overheating/README.md index fa18f9dc20..181f6bcc08 100644 --- a/addons/overheating/README.md +++ b/addons/overheating/README.md @@ -2,11 +2,3 @@ ace_overheating =============== Introduces weapon overheating and jamming, as well as the ability to swap the barrel on some weapons. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/overheating/UI/pour_water_ca.paa b/addons/overheating/UI/pour_water_ca.paa new file mode 100644 index 0000000000..060a4572d1 Binary files /dev/null and b/addons/overheating/UI/pour_water_ca.paa differ diff --git a/addons/overheating/XEH_PREP.hpp b/addons/overheating/XEH_PREP.hpp index 2436e390db..f4b56c3c3f 100644 --- a/addons/overheating/XEH_PREP.hpp +++ b/addons/overheating/XEH_PREP.hpp @@ -6,10 +6,15 @@ PREP(canCheckSpareBarrelsTemperatures); PREP(checkSpareBarrelsTemperatures); PREP(checkTemperature); PREP(clearJam); +PREP(coolWeaponWithItem); +PREP(coolWeaponWithWaterSource); PREP(displayTemperature); PREP(firedEH); +PREP(getBarrelMass); +PREP(getConsumableChildren); PREP(getWeaponData); PREP(handleTakeEH); +PREP(handleRespawn); PREP(jamWeapon); PREP(loadCoolestSpareBarrel); PREP(overheat); @@ -17,6 +22,8 @@ PREP(sendSpareBarrelsTemperaturesHint); PREP(swapBarrel); PREP(swapBarrelAssistant); PREP(swapBarrelCallback); +PREP(updateAmmoTemperature); +PREP(updateAmmoTemperatureThread); PREP(updateSpareBarrelsTemperaturesThread); PREP(updateTemperature); PREP(updateTemperatureThread); diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 34390cbe20..fbd0f94f1c 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -1,6 +1,9 @@ // by esteldunedain #include "script_component.hpp" +// Spare barrel item to magazine +["ACE_SpareBarrel_Item", "ACE_SpareBarrel"] call EFUNC(common,registerItemReplacement); + if (hasInterface) then { // Add keybinds ["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon), { @@ -16,7 +19,7 @@ if (hasInterface) then { }, {false}, [19, [true, false, false]], false] call CBA_fnc_addKeybind; //SHIFT + R Key }; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_1("SettingsInitialized eh", GVAR(enabled)); if (!GVAR(enabled)) exitWith {}; @@ -29,7 +32,7 @@ if (hasInterface) then { publicVariable QGVAR(pseudoRandomList); // Keep track of the temperature of stored spare barrels - GVAR(storedSpareBarrels) = [] call CBA_fnc_hashCreate; + GVAR(storedSpareBarrels) = createHashMap; // Install event handlers for spare barrels [QGVAR(sendSpareBarrelTemperatureHint), FUNC(sendSpareBarrelsTemperaturesHint)] call CBA_fnc_addEventHandler; @@ -45,22 +48,64 @@ if (hasInterface) then { GVAR(cacheAmmoData) = call CBA_fnc_createNamespace; GVAR(cacheSilencerData) = call CBA_fnc_createNamespace; - //Add Take EH (for reload) - ["CAManBase", "Take", {_this call FUNC(handleTakeEH);}] call CBA_fnc_addClassEventHandler; + //Add Take EH if required + if (GVAR(unJamOnReload) || {GVAR(cookoffCoef) > 0}) then { + ["CAManBase", "Take", {_this call FUNC(handleTakeEH);}] call CBA_fnc_addClassEventHandler; + }; // Register fire event handler ["ace_firedPlayer", DFUNC(firedEH)] call CBA_fnc_addEventHandler; // Only add eh to non local players if dispersion is enabled - if (GVAR(overheatingDispersion)) then { + if (GVAR(overheatingDispersion) || {GVAR(showParticleEffectsForEveryone)}) then { ["ace_firedPlayerNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler; }; // Schedule cool down calculation of player weapons at (infrequent) regular intervals [] call FUNC(updateTemperatureThread); + //Add event handlers and start ammo heating loop for cookoff + if (GVAR(cookoffCoef) > 0) then { + [] call FUNC(updateAmmoTemperatureThread); + + // Reset ammo temperature on reload, unless the reload is a second muzzle. + ["CAManBase", "Reloaded", { + params ["_unit", "_weapon", "_muzzle"]; + if (_muzzle == _weapon) then { + _unit setVariable [format [QGVAR(%1_ammoTemp), _weapon], 0]; + }; + }] call CBA_fnc_addClassEventHandler; + }; + // Install event handler to display temp when a barrel was swapped [QGVAR(showWeaponTemperature), DFUNC(displayTemperature)] call CBA_fnc_addEventHandler; // Install event handler to initiate an assisted barrel swap [QGVAR(initiateSwapBarrelAssisted), DFUNC(swapBarrel)] call CBA_fnc_addEventHandler; + // Add an action to allow hot weapons to be cooled off in AceX Field Rations water sources + if (isClass (configfile >> "CfgPatches" >> "acex_field_rations")) then { + [ + {EXGVAR(field_rations,enabled) || CBA_missionTime > 1}, + { + if (!EXGVAR(field_rations,enabled)) exitWith {}; + + private _coolWeaponWithWaterSourceAction = [ + QGVAR(CoolWeaponWithWaterSource), + LLSTRING(CoolWeaponWithWaterSource), + QPATHTOEF(field_rations,ui\icon_water_tap.paa), + { + private _waterSource = _target getVariable [QEGVAR(field_rations,waterSource), objNull]; + [_player, _waterSource] call FUNC(coolWeaponWithWaterSource); + }, + { + private _waterSource = _target getVariable [QEGVAR(field_rations,waterSource), objNull]; + [_player, _waterSource] call EFUNC(field_rations,canDrinkFromSource); + } + ] call EFUNC(interact_menu,createAction); + + [QEGVAR(field_rations,helper), 0, [QEGVAR(field_rations,waterSource)], _coolWeaponWithWaterSourceAction] call EFUNC(interact_menu,addActionToClass); + }, + [] + ] call CBA_fnc_waitUntilAndExecute; + }; + }] call CBA_fnc_addEventHandler; diff --git a/addons/overheating/XEH_preInit.sqf b/addons/overheating/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/overheating/XEH_preInit.sqf +++ b/addons/overheating/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp index bedd96fa30..f04238fd10 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -4,7 +4,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; units[] = {}; - weapons[] = {}; + weapons[] = {"ACE_SpareBarrel_Item"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; author = ECSTRING(common,ACETeam); diff --git a/addons/overheating/functions/fnc_calculateCooling.sqf b/addons/overheating/functions/fnc_calculateCooling.sqf index 01983814f5..8fd39c7024 100644 --- a/addons/overheating/functions/fnc_calculateCooling.sqf +++ b/addons/overheating/functions/fnc_calculateCooling.sqf @@ -30,6 +30,15 @@ if (_totalTime > 1800) exitWith {0}; //So Area = 210 * 1.1 * (mass / 7850) = mass * 0.029427 (for steel near that diameter) private _barrelSurface = _barrelMass * 0.029427; +private _convectionRate = 25; + +//provide additional cooling if swimming or raining or windy +if (ACE_player call EFUNC(common,isSwimming)) then { + _convectionRate = 500; +} else { + // this will give a convection rate between 25 (no wind or rain) and 125 (max rain and >=50 m/s wind) + _convectionRate = _convectionRate * ((linearConversion [0,1,rain,1,5,true] + (5 min (vectorMagnitude wind / 10))) / 2); +}; TRACE_4("cooling",_temperature,_totalTime,_barrelMass,_barrelSurface); @@ -38,13 +47,10 @@ while {true} do { private _deltaTime = (_totalTime - _time) min 20; _temperature = _temperature - ( - // Convective cooling - 25 * _barrelSurface * _temperature - // Radiative cooling - + 0.4 * 5.67e-8 * _barrelSurface * - ( (_temperature + 273.15)*(_temperature + 273.15) - * (_temperature + 273.15)*(_temperature + 273.15) - - 273.15 * 273.15 * 273.15 *273.15 ) + // Convective cooling + _convectionRate * _barrelSurface * _temperature + // Radiative cooling + + 0.4 * 5.67e-8 * _barrelSurface * ((_temperature + 273.15) ^ 4 - 273.15 ^ 4) ) * _deltaTime / (_barrelMass * 466); if (_temperature < 1) exitWith {0}; diff --git a/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf b/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf index ca4d76e77b..0f8775ae25 100644 --- a/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf +++ b/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf @@ -20,7 +20,7 @@ params ["_player"]; //Get the classname of the spare barrel for the weapon private _weaponBarrelClass = getText (configFile >> 'CfgWeapons' >> currentWeapon _player >> QGVAR(barrelClassname)); //If the weapon has no defined classname then use the ACE one -if(_weaponBarrelClass == "") then { +if (_weaponBarrelClass == "") then { _weaponBarrelClass = "ACE_SpareBarrel"; }; //Check if the player has the barrel and the weapon can have its barrel swapped diff --git a/addons/overheating/functions/fnc_canSwapBarrel.sqf b/addons/overheating/functions/fnc_canSwapBarrel.sqf index 53104e19d5..38115f6f7a 100644 --- a/addons/overheating/functions/fnc_canSwapBarrel.sqf +++ b/addons/overheating/functions/fnc_canSwapBarrel.sqf @@ -18,12 +18,12 @@ params ["_unit","_weapon"]; //Check if weapon can have its barrel swapped. If not exit out of function -if( !GVAR(enabled) || {getNumber (configFile >> 'CfgWeapons' >> _weapon >> QGVAR(allowSwapBarrel)) != 1}) exitWith{false}; +if ( !GVAR(enabled) || {getNumber (configFile >> 'CfgWeapons' >> _weapon >> QGVAR(allowSwapBarrel)) != 1}) exitWith{false}; //Get the classname of the spare barrel for the weapon private _weaponBarrelClass = getText (configFile >> 'CfgWeapons' >> _weapon >> QGVAR(barrelClassname)); //If the weapon has no defined classname then use the ACE one -if(_weaponBarrelClass == "") then { +if (_weaponBarrelClass == "") then { _weaponBarrelClass = "ACE_SpareBarrel"; }; //If the player has the spare barrel then it can be swapped diff --git a/addons/overheating/functions/fnc_checkTemperature.sqf b/addons/overheating/functions/fnc_checkTemperature.sqf index b7be4f4c13..b771293e6b 100644 --- a/addons/overheating/functions/fnc_checkTemperature.sqf +++ b/addons/overheating/functions/fnc_checkTemperature.sqf @@ -12,7 +12,7 @@ * None * * Example: - * [player, currentWeapon player] call ace_overheating_fnc_checkTemperature + * [player, player, currentWeapon player] call ace_overheating_fnc_checkTemperature * * Public: No */ diff --git a/addons/overheating/functions/fnc_clearJam.sqf b/addons/overheating/functions/fnc_clearJam.sqf index 61e84fe906..3e63ed5cb7 100644 --- a/addons/overheating/functions/fnc_clearJam.sqf +++ b/addons/overheating/functions/fnc_clearJam.sqf @@ -33,6 +33,7 @@ if (_weapon in _jammedWeapons) then { }; [_unit, _clearJamAction, 1] call EFUNC(common,doGesture); + if (_weapon == primaryWeapon _unit) then { playSound QGVAR(fixing_rifle); } else { @@ -42,21 +43,33 @@ if (_weapon in _jammedWeapons) then { }; }; - // Check if the jam will be successfull + // Check if the jam clearing will be successfull if (random 1 > GVAR(unJamFailChance)) then { // Success - _jammedWeapons = _jammedWeapons - [_weapon]; - _unit setVariable [QGVAR(jammedWeapons), _jammedWeapons]; - if (_jammedWeapons isEqualTo []) then { - private _id = _unit getVariable [QGVAR(JammingActionID), -1]; - [_unit, "DefaultAction", _id] call EFUNC(common,removeActionEventHandler); - _unit setVariable [QGVAR(JammingActionID), -1]; - }; - if (GVAR(DisplayTextOnJam)) then { - [{ + + [{ + params ["_unit", "_weapon", "_jammedWeapons"]; + _jammedWeapons = _jammedWeapons - [_weapon]; + _unit setVariable [QGVAR(jammedWeapons), _jammedWeapons]; + + // If the round is a dud eject the round + if (_unit getVariable [format [QGVAR(%1_jamType), _weapon], "None"] isEqualTo "Dud") then { + private _ammo = _unit ammo _weapon; + _unit setAmmo [_weapon, _ammo - 1]; + }; + + _unit setVariable [format [QGVAR(%1_jamType), _weapon], "None"]; + + if (_jammedWeapons isEqualTo []) then { + private _id = _unit getVariable [QGVAR(JammingActionID), -1]; + [_unit, "DefaultAction", _id] call EFUNC(common,removeActionEventHandler); + _unit setVariable [QGVAR(JammingActionID), -1]; + }; + + if (GVAR(DisplayTextOnJam)) then { [localize LSTRING(WeaponUnjammed)] call EFUNC(common,displayTextStructured); - }, [], _delay] call CBA_fnc_waitAndExecute; - }; + }; + }, [_unit, _weapon, _jammedWeapons], _delay] call CBA_fnc_waitAndExecute; } else { // Failure if (GVAR(DisplayTextOnJam)) then { diff --git a/addons/overheating/functions/fnc_coolWeaponWithItem.sqf b/addons/overheating/functions/fnc_coolWeaponWithItem.sqf new file mode 100644 index 0000000000..8558303829 --- /dev/null +++ b/addons/overheating/functions/fnc_coolWeaponWithItem.sqf @@ -0,0 +1,98 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror, drofseh + * Cool a weapon with an item and consume the item being used to cool it. + * + * Arguments: + * 0: Target + * 1: Player + * 2: Item + * + * Return Value: + * None + * + * Example: + * [ACE_player, ACE_player, "ACE_WaterBottle"] call ace_overheating_fnc_coolWeaponWithItem + * + * Public: No + */ + +params ["_target", "_unit", "_item"]; + +private _config = configFile >> "CfgWeapons" >> _item; + +// Get values +private _weapon = currentWeapon _target; +private _tempVarName = format [QGVAR(%1_temp), _weapon]; +private _temperature = _target getVariable [_tempVarName, 0]; +private _replacementItem = getText (_config >> QEXGVAR(field_rations,replacementItem)); +private _liquidAmount = getNumber (_config >> QEXGVAR(field_rations,thirstQuenched)); +private _consumeText = format [LLSTRING(CoolingWeaponWithItem), getText (configFile >> "CfgWeapons" >> _weapon >> "displayName"), getText (_config >> "displayName")]; + +/* // to be added when licence compatible audio can be found or recorded +private _pouringSound = QPATHTO_R(sounds\sizzling_short.ogg); + +if (_temperature < 100) then { + if (_liquidAmount > 5) then { + _pouringSound = QPATHTO_R(sounds\pouring_long.ogg); + } else { + _pouringSound = QPATHTO_R(sounds\pouring_short.ogg); + }; +} else { + if (_liquidAmount > 5) then { + _pouringSound = QPATHTO_R(sounds\sizzling_long.ogg); + }; +}; + +playSound3D [_pouringSound, _target, false, AGLToASL (_target modelToWorld (_target selectionPosition "RightHand")), 5, 1, 10]; +*/ + +private _fnc_onSuccess = { + params ["_args"]; + _args params ["_target", "_unit", "_item", "_weapon", "_tempVarName", "_temperature", "_replacementItem", "_liquidAmount"]; + TRACE_1("Cool weapon with item successful",_args); + + // remove the item + _unit removeItem _item; + + // Add replacement item if needed + if (_replacementItem != "") then { + [_unit, _replacementItem] call EFUNC(common,addToInventory); + }; + + // cool the weapon + private _barrelMass = _weapon call FUNC(getBarrelMass); + _temperature = [_temperature, _barrelMass, _liquidAmount * 10] call FUNC(calculateCooling); + [_target, _tempVarName, _temperature, TEMP_TOLERANCE] call EFUNC(common,setApproximateVariablePublic); +}; + +/* +private _fnc_onFailure = { + params ["_args","_elapsedTime"]; + _args params ["_target", "_unit"]; +}; +*/ + +private _fnc_condition = { + params ["_args"]; + _args params ["", "_unit", "_item"]; + _item in (_unit call EFUNC(common,uniqueItems)) +}; + +[ + _liquidAmount, + [ + _target, + _unit, + _item, + _weapon, + _tempVarName, + _temperature, + _replacementItem, + _liquidAmount + ], + _fnc_onSuccess, + {}, //_fnc_onFailure, + _consumeText, + _fnc_condition +] call EFUNC(common,progressBar); \ No newline at end of file diff --git a/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf b/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf new file mode 100644 index 0000000000..2e142602ec --- /dev/null +++ b/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf @@ -0,0 +1,117 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror, drofseh + * Cool a weapon with an AceX water source. + * + * Arguments: + * 0: Target + * 1: Player + * + * Return Value: + * None + * + * Example: + * [ACE_player, WaterTank] call ace_overheating_fnc_coolWeaponWithWaterSource + * + * Public: No +*/ + +params ["_player", "_target"]; + +private _weapon = currentWeapon _player; +private _tempVarName = format [QGVAR(%1_temp), _weapon]; +private _temperature = _player getVariable [_tempVarName, 0]; +private _consumeText = LLSTRING(CoolingWeaponWithWaterSource); +GVAR(coolingWeaponWithWaterSource) = false; + +private _fnc_onFinish = { + params ["_args"]; + _args params ["_player", "_target", "_weapon", "_tempVarName"]; + + private _water = _target call EFUNC(field_rations,getRemainingWater); + + if (_water <= 0 && {_water != -10}) exitWith { + [ + [LLSTRING(CoolWeaponNotEnoughWater)], + true + ] call CBA_fnc_notify; + }; + + [_player, _player, currentWeapon _player] call ace_overheating_fnc_checkTemperature; + GVAR(coolingWeaponWithWaterSource) = false; +}; + +private _fnc_condition = { + params ["_args"]; + _args params ["_player", "_target", "_weapon", "_tempVarName"]; + + private _temperature = _player getVariable [_tempVarName, 0]; + private _water = _target call EFUNC(field_rations,getRemainingWater); + + if (_water <= 0 && {_water != -10}) exitWith {false}; + + if !(GVAR(coolingWeaponWithWaterSource)) then { + GVAR(coolingWeaponWithWaterSource) = true; + + //Remove water from the source, unless it's unlimited + if (_water != -10) then { + [_target, _water - 1] call EFUNC(field_rations,setRemainingWater); + }; + + //Cool the weapon down + private _barrelMass = _weapon call FUNC(getBarrelMass); + _temperature = [_temperature, _barrelMass, 20] call FUNC(calculateCooling); + [_player, _tempVarName, _temperature, TEMP_TOLERANCE] call EFUNC(common,setApproximateVariablePublic); + +/* // to be added when licence compatible audio can be found or recorded + // water sound, either boiling or not + if (_temperature < 100) then { + [ + [LLSTRING(CoolWeaponIsCool)], + true // allows the hint to be overwritten by another hint, such as a jam or another cookoff + ] call CBA_fnc_notify; + + playSound3D [ + QPATHTO_R(sounds\pouring_short.ogg), + _player, + false, + AGLToASL (_player modelToWorld (_player selectionPosition "RightHand")), + 5, 1, 10 + ]; + } else { + playSound3D [ + QPATHTO_R(sounds\sizzling_short.ogg), + _player, + false, + AGLToASL (_player modelToWorld (_player selectionPosition "RightHand")), + 5, 1, 10 + ]; + }; +*/ + + // wait 1 second before allowing cooling to happen again + [ + { + GVAR(coolingWeaponWithWaterSource) = false; + }, + [], + 1 + ] call CBA_fnc_waitAndExecute; + }; + + true +}; + +[ + 1 max (_temperature / 10), + [ + _player, + _target, + _weapon, + _tempVarName + ], + _fnc_onFinish, + _fnc_onFinish, + _consumeText, + _fnc_condition +] call EFUNC(common,progressBar); diff --git a/addons/overheating/functions/fnc_firedEH.sqf b/addons/overheating/functions/fnc_firedEH.sqf index dd6b408a21..5f43ca1881 100644 --- a/addons/overheating/functions/fnc_firedEH.sqf +++ b/addons/overheating/functions/fnc_firedEH.sqf @@ -20,7 +20,7 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectil BEGIN_COUNTER(firedEH); -if ((_unit distance ACE_player) > 3000 +if ((_unit distance ACE_player) > GVAR(particleEffectsAndDispersionDistance) || {(_muzzle != (primaryWeapon _unit)) && {_muzzle != (handgunWeapon _unit)}}) exitWith { // Only rifle or pistol muzzles (ignore grenades / GLs) END_COUNTER(firedEH); }; @@ -54,12 +54,12 @@ if (_scaledTemperature > 0.1) then { [_projectile, _dispersionX * _dispersion, _dispersionY * _dispersion, _slowdownFactor * vectorMagnitude (velocity _projectile)] call EFUNC(common,changeProjectileDirection); TRACE_PROJECTILE_INFO(_projectile); }; - + // Particle Effects if (GVAR(showParticleEffects) && {GVAR(showParticleEffectsForEveryone) || {_unit == ACE_player} || {_unit distance ACE_player <= 20}} && {CBA_missionTime > (_unit getVariable [QGVAR(lastDrop), -1000]) + 0.40}) then { - + _unit setVariable [QGVAR(lastDrop), CBA_missionTime]; private _direction = (_unit weaponDirection _weapon) vectorMultiply 0.25; @@ -94,9 +94,24 @@ if ((_unit ammo _weapon) % 3 == 0) then { _this call FUNC(overheat); }; +// reset cookoff heat +if (GVAR(cookoffCoef) > 0) then { + _unit setVariable [format [QGVAR(%1_ammoTemp), _weapon], 0]; + [_unit, _weapon, _temperature] call FUNC(updateAmmoTemperature); +}; + +// decrease time to next shot as heat increases, value is a coef where 1 is unchanged and 0 is instant, 0.8 is a 25% faster ROF. +// this could be filtered by weapon type, but I think the heat gain and rate of fire on non-automatic weapons is low enough not to bother +if (GVAR(overheatingRateOfFire)) then { + _unit setWeaponReloadingTime [_unit, _muzzle, linearConversion [0, 0.5, _scaledTemperature, 1, 0.909, true]]; +}; + +// Don't bother with jamming if coef makes the chance 0. +if (GVAR(jamChanceCoef) == 0) exitWith {END_COUNTER(firedEH);}; + private _value = 5 * _scaledTemperature; private _array = [0.5, 1, 2, 8, 20, 150]; -_jamChance = _jamChance * linearConversion [0, 1, _value % 1, _array select floor _value, _array select ceil _value]; +_jamChance = _jamChance * GVAR(jamChanceCoef) * linearConversion [0, 1, _value % 1, _array select floor _value, _array select ceil _value]; TRACE_3("check for random jam",_unit,_weapon,_jamChance); diff --git a/addons/overheating/functions/fnc_getBarrelMass.sqf b/addons/overheating/functions/fnc_getBarrelMass.sqf new file mode 100644 index 0000000000..1504442a60 --- /dev/null +++ b/addons/overheating/functions/fnc_getBarrelMass.sqf @@ -0,0 +1,20 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror, drofseh + * Get the mass of the weapons barrel. + * + * Arguments: + * 0: Weapon + * + * Return Value: + * Barrel Mass + * + * Example: + * [currentWeapon ACE_player] call ace_overheating_fnc_getBarrelMass + * + * Public: No + */ + +params ["_weapon"]; + +METAL_MASS_RATIO * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0; diff --git a/addons/overheating/functions/fnc_getConsumableChildren.sqf b/addons/overheating/functions/fnc_getConsumableChildren.sqf new file mode 100644 index 0000000000..697b4bccd9 --- /dev/null +++ b/addons/overheating/functions/fnc_getConsumableChildren.sqf @@ -0,0 +1,41 @@ +#include "script_component.hpp" +/* + * Author: mharis001, Glowbal, PabstMirror + * Returns children actions for consumable items in player's inventory. + * + * Arguments: + * 0: Player + * + * Return Value: + * Actions + * + * Example: + * [_unit] call ace_overheating_fnc_getConsumableChildren + * + * Public: No + */ + +params ["_unit"]; + +private _fnc_getActions = { + TRACE_1("Creating overheating consumable item actions",_unit); + + private _actions = []; + private _cfgWeapons = configFile >> "CfgWeapons"; + + { + private _config = _cfgWeapons >> _x; + if (getNumber (_config >> QEXGVAR(field_rations,thirstQuenched)) > 0) then { + private _displayName = getText (_config >> "displayName"); + private _picture = getText (_config >> "picture"); + + // Exec next frame so closing interaction menu doesn't block progressBar + private _action = [_x, _displayName, _picture, {[FUNC(coolWeaponWithItem), _this] call CBA_fnc_execNextFrame}, {true}, {}, _x] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _unit]; + }; + } forEach (_unit call EFUNC(common,uniqueItems)); + + _actions +}; + +[[], _fnc_getActions, _unit, QGVAR(overheatingConsumableActionsCache), 9999, "cba_events_loadoutEvent"] call EFUNC(common,cachedCall); diff --git a/addons/overheating/functions/fnc_getWeaponData.sqf b/addons/overheating/functions/fnc_getWeaponData.sqf index a055f65b1e..c5cfb40d4a 100644 --- a/addons/overheating/functions/fnc_getWeaponData.sqf +++ b/addons/overheating/functions/fnc_getWeaponData.sqf @@ -65,8 +65,16 @@ if (isArray _property) then { }; }; +// for cookoff +private _modes = getArray (configFile >> "CfgWeapons" >> _weapon >> "modes"); +private _muzzle = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles") select 0; +if (_muzzle == "this") then { + _muzzle = _weapon; +}; +private _reloadTime = getNumber (configfile >> "CfgWeapons" >> _weapon >> (_modes select 0) >> "reloadTime"); + // Cache the values -_weaponData = [_dispersion, _slowdownFactor, _jamChance]; +_weaponData = [_dispersion, _slowdownFactor, _jamChance, _modes, _muzzle, _reloadTime]; TRACE_2("building cache",_weapon,_weaponData); GVAR(cacheWeaponData) setVariable [_weapon, _weaponData]; diff --git a/addons/overheating/functions/fnc_handleRespawn.sqf b/addons/overheating/functions/fnc_handleRespawn.sqf new file mode 100644 index 0000000000..6de713761a --- /dev/null +++ b/addons/overheating/functions/fnc_handleRespawn.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: 10Dozen + * Handle respawn events and clears list of jammed weapons. + * DefaultAction that blocks firing is removed by the game (remains on corpse?), + * but variables need to be cleared manually. + * + * Arguments: + * 0: Unit + * 1: Corpse + * + * Return Value: + * None + * + * Example: + * [alive, body] call ace_overheating_fnc_handleRespawn + * + * Public: No + */ + +params ["_unit","_dead"]; +if !(local _unit) exitWith {}; + +// --- Reset variables related to jamming +_unit setVariable [QGVAR(jammedWeapons), nil]; +_unit setVariable [QGVAR(JammingActionID), nil]; diff --git a/addons/overheating/functions/fnc_handleTakeEH.sqf b/addons/overheating/functions/fnc_handleTakeEH.sqf index d347e5f071..266274e5bf 100644 --- a/addons/overheating/functions/fnc_handleTakeEH.sqf +++ b/addons/overheating/functions/fnc_handleTakeEH.sqf @@ -18,16 +18,20 @@ * Public: No */ -if !(GVAR(unJamOnreload)) exitWith {}; - params ["_unit", "_container", "_item"]; TRACE_3("params",_unit,_container,_item); if ((_unit == ACE_player) - && {_container in [uniformContainer _unit, vestContainer _unit, backpackContainer _unit]} - && {_item == currentMagazine _unit}) then { //Todo: should this be any valid magazine for any jammed gun? + && {_container in [uniformContainer _unit, vestContainer _unit, backpackContainer _unit]} + && {_item == currentMagazine _unit} +) then { //Todo: should this be any valid magazine for any jammed gun? - TRACE_1("clearing jam",currentWeapon _unit); - [_unit, currentWeapon _unit, true] call FUNC(clearJam) + if (GVAR(unJamOnReload)) then { + TRACE_1("clearing jam",currentWeapon _unit); + [_unit, currentWeapon _unit, true] call FUNC(clearJam); + }; + if (GVAR(cookoffCoef) > 0) then { + _unit setVariable [format [QGVAR(%1_ammoTemp), currentWeapon _unit], 0]; + }; }; diff --git a/addons/overheating/functions/fnc_jamWeapon.sqf b/addons/overheating/functions/fnc_jamWeapon.sqf index e3a5bb793a..ea77e11ba4 100644 --- a/addons/overheating/functions/fnc_jamWeapon.sqf +++ b/addons/overheating/functions/fnc_jamWeapon.sqf @@ -21,24 +21,45 @@ TRACE_2("params",_unit,_weapon); // don't jam a weapon with no rounds left private _ammo = _unit ammo _weapon; -if (_ammo == 0) exitWith {}; +if (_ammo < 1) exitWith {}; private _jammedWeapons = _unit getVariable [QGVAR(jammedWeapons), []]; _jammedWeapons pushBack _weapon; _unit setVariable [QGVAR(jammedWeapons), _jammedWeapons]; +// Get jam types, select one from available types +// Cookoffs only happen on Fire and Dud, dud rounds are lost on jam clear. +// Reduce chance of duds as temp increases (functionally increasing the chance of the others but with fewer commands) +private _temp = 1 max (_unit getVariable [format [QGVAR(%1_temp), _weapon], 0]); +private _jamTypesAllowed = getArray (configFile >> 'CfgWeapons' >> currentWeapon _unit >> QGVAR(jamTypesAllowed)); +if (_jamTypesAllowed isEqualTo []) then { + _jamTypesAllowed = ["Eject", 1, "Extract", 1, "Feed", 1, "Fire", 1, "Dud", (5 / (_temp / 5))]; +} else { + for "_i" from count _jamTypesAllowed to 1 step -1 do { + private _jamCurretType = _jamTypesAllowed select _i; + if !(_jamCurretType in ["Eject", "Extract", "Feed", "Fire", "Dud"]) exitWith { // check config values and switch to default values if unusual value found + ERROR_2("Weapon '%1' has unexpected value %2 in QQGVAR(jamTypesAllowed). Expected values are 'Eject', 'Extract', 'Feed', 'Fire', 'Dud'.",_weapon,_jamCurretType); + _jamTypesAllowed = ["Eject", 1, "Extract", 1, "Feed", 1, "Fire", 1, "Dud", (5 / (_temp / 5))]; + }; + if (_jamCurretType == "Dud") then { + _jamTypesAllowed insert [_i, [5 / (_temp / 5)]]; + } else { + _jamTypesAllowed insert [_i, [1]]; + }; + }; +}; + +_unit setVariable [format [QGVAR(%1_jamType), _weapon], selectRandomWeighted _jamTypesAllowed]; // Stop current burst -if (_ammo > 0) then { - _unit setAmmo [_weapon, 0]; - // this is to re-activate the 'DefaultAction', so you can jam a weapon while full auto shootin - [{ - params ["_unit", "_weapon", "_ammo"]; - _unit setAmmo [_weapon, _ammo]; - }, [_unit, _weapon, _ammo]] call CBA_fnc_execNextFrame; -}; +_unit setAmmo [_weapon, 0]; +// this is to re-activate the 'DefaultAction', so you can jam a weapon while full auto shooting +[{ + params ["_unit", "_weapon", "_ammo"]; + _unit setAmmo [_weapon, _ammo]; +}, [_unit, _weapon, _ammo]] call CBA_fnc_execNextFrame; if (_weapon == primaryWeapon _unit) then { playSound QGVAR(jamming_rifle); @@ -53,20 +74,32 @@ GVAR(knowAboutJam) = false; ["ace_weaponJammed", [_unit,_weapon]] call CBA_fnc_localEvent; - if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then { private _condition = { - [_this select 1] call CBA_fnc_canUseWeapon - && {currentMuzzle (_this select 1) in ((_this select 1) getVariable [QGVAR(jammedWeapons), []])} - && {!(currentMuzzle (_this select 1) in ((_this select 1) getVariable [QEGVAR(safemode,safedWeapons), []]))} + 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), []]))} }; private _statement = { - playSound3D ["a3\sounds_f\weapons\Other\dry9.wss", _this select 0, false, eyePos (_this select 0), 1, 1, 15]; + params ["_zero","_one"]; - if (!(missionNamespace getVariable [QGVAR(knowAboutJam), false]) && {(_this select 1) ammo currentWeapon (_this select 1) > 0} && {GVAR(DisplayTextOnJam)}) then { - [localize LSTRING(WeaponJammed)] call EFUNC(common,displayTextStructured); + playSound3D ["a3\sounds_f\weapons\Other\dry9.wss", _zero, false, eyePos _zero, 1, 1, 15]; + + if (!(missionNamespace getVariable [QGVAR(knowAboutJam), false]) && {_one ammo currentWeapon _one > 0} && {GVAR(DisplayTextOnJam)}) then { + private _jamType = _one getVariable [format [QGVAR(%1_jamType), currentWeapon _one], "None"]; + private _jamMessage = localize LSTRING(FailureToFire); + switch true do { + case (_jamType isEqualTo "Eject"): {_jamMessage = localize LSTRING(FailureToEject)}; + case (_jamType isEqualTo "Extract"): {_jamMessage = localize LSTRING(FailureToExtract)}; + case (_jamType isEqualTo "Feed"): {_jamMessage = localize LSTRING(FailureToFeed)}; + }; + [ + [localize LSTRING(WeaponJammed)], + [_jamMessage] + ] call CBA_fnc_notify; GVAR(knowAboutJam) = true; }; }; diff --git a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf index 5b7ce31571..f356fb254b 100644 --- a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf +++ b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf @@ -25,7 +25,7 @@ params ["_assistant", "_gunner", "_weapon", "_weaponTemp", "_barrelMass"]; TRACE_5("loadCoolestSpareBarrel1",_assistant,_gunner,_weapon,_weaponTemp,_barrelMass); private _weaponBarrelClass = getText (configFile >> 'CfgWeapons' >> _weapon >> QGVAR(barrelClassname)); //If the weapon has no defined classname then use the ACE one -if(_weaponBarrelClass == "") then { +if (_weaponBarrelClass == "") then { _weaponBarrelClass = "ACE_SpareBarrel"; }; // Find all spare barrel the player has @@ -37,10 +37,7 @@ if ((count _allBarrels) < 1) exitWith {}; private _coolestTemp = 10000; private _coolestMag = _allBarrels select 0; { - private _temp = 0; - if ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashHasKey) then { - _temp = ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashGet) select 0; - }; + private _temp = GVAR(storedSpareBarrels) getOrDefault [_x, [0]] select 0; TRACE_2("loadCoolestSpareBarrel4",_x,_temp); if (_temp < _coolestTemp) then { _coolestTemp = _temp; @@ -54,7 +51,7 @@ TRACE_3("loadCoolestSpareBarrel5",_coolestTemp,_coolestMag,_weaponTemp); _gunner setVariable [format [QGVAR(%1_temp), _weapon], _coolestTemp, true]; // Heat up the coolest barrel to the former weapon temperature -[GVAR(storedSpareBarrels), _coolestMag, [_weaponTemp, CBA_missionTime, _barrelMass]] call CBA_fnc_hashSet; +GVAR(storedSpareBarrels) set [_coolestMag, [_weaponTemp, CBA_missionTime, _barrelMass]]; // Send an event so the machines of the assistant and gunner can show the hint [QGVAR(showWeaponTemperature), [_gunner, _weapon], [_assistant, _gunner]] call CBA_fnc_targetEvent; diff --git a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf index 71cacbd047..7eaf62d0e7 100644 --- a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf +++ b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf @@ -27,7 +27,7 @@ private _weapon = currentWeapon _player; //Get the classname of the spare barrel of that weapon private _weaponBarrelClass = getText (configFile >> 'CfgWeapons' >> _weapon >> QGVAR(barrelClassname)); //If the weapon has no defined classname then use the ACE one -if(_weaponBarrelClass == "") then { +if (_weaponBarrelClass == "") then { _weaponBarrelClass = "ACE_SpareBarrel"; }; private _allBarrels = [_unit, _weaponBarrelClass] call CBA_fnc_getMagazineIndex; @@ -37,10 +37,7 @@ if ((count _allBarrels) < 1) exitWith {}; // Determine the temp of each barrel private _temps = []; { - private _temp = 0; - if ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashHasKey) then { - _temp = ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashGet) select 0; - }; + private _temp = GVAR(storedSpareBarrels) getOrDefault [_x, [0]] select 0; _temps pushBack _temp; } forEach _allBarrels; TRACE_1("_temps",_temps); diff --git a/addons/overheating/functions/fnc_swapBarrelCallback.sqf b/addons/overheating/functions/fnc_swapBarrelCallback.sqf index 0b0dec4916..1f458bcc26 100644 --- a/addons/overheating/functions/fnc_swapBarrelCallback.sqf +++ b/addons/overheating/functions/fnc_swapBarrelCallback.sqf @@ -26,11 +26,15 @@ if (_assistant isEqualTo _gunner) then { playSound "ACE_BarrelSwap"; }; +if (GVAR(unJamOnSwapBarrel) && {[_gunner] call FUNC(canUnjam)}) then { + [_gunner, currentMuzzle _gunner, true] call FUNC(clearJam); +}; + // don't consume the barrel, but rotate through them. [localize LSTRING(SwappedBarrel), QPATHTOF(UI\spare_barrel_ca.paa)] call EFUNC(common,displayTextPicture); private _temp = _gunner getVariable [format [QGVAR(%1_temp), _weapon], 0]; -private _barrelMass = METAL_MASS_RATIO * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0; +private _barrelMass = _weapon call FUNC(getBarrelMass); // Instruct the server to load the coolest spare barrel into the weapon and // store the removed barrel with the former weapon temperature. The server diff --git a/addons/overheating/functions/fnc_updateAmmoTemperature.sqf b/addons/overheating/functions/fnc_updateAmmoTemperature.sqf new file mode 100644 index 0000000000..12944774b7 --- /dev/null +++ b/addons/overheating/functions/fnc_updateAmmoTemperature.sqf @@ -0,0 +1,106 @@ +#include "script_component.hpp" +/* + * Author: drofseh + * Update temperature of the round in the chamber and determine if a cookoff should occur. + * + * Arguments: + * 0: Unit + * 1: Weapon + * 2: Barrel Temperature + * + * Return Value: + * Current ammunition temperature + * + * Example: + * [player, currentWeapon player, 600] call ace_overheating_fnc_updateAmmoTemperature + * + * Public: No + */ + +params ["_unit", "_weapon", "_barrelTemperature"]; +TRACE_3("params",_unit,_weapon,_barrelTemperature); + +private _closedBolt = getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(closedBolt)); +private _canUnjam = [_unit] call FUNC(canUnjam); + +// Skip if no ammo in chamber +if ( + _unit ammo _weapon < 1 + // closed bolt, and jammed and type not failure to fire + || {_closedBolt == 1 && {_canUnjam} && {!(_unit getVariable [format [QGVAR(%1_jamType), _weapon], "None"] in ["Fire","Dud"])}} + // open bolt, and not jammed, or jammed and type not failure to fire + || {_closedBolt == 0 && {!_canUnjam || {_canUnjam && {!(_unit getVariable [format [QGVAR(%1_jamType), _weapon], "None"] in ["Fire","Dud"])}}}} +) exitWith { + _unit setVariable [format [QGVAR(%1_ammoTemp), _weapon], 0]; + 0 +}; + +private _ammoTempVarName = format [QGVAR(%1_ammoTemp), _weapon]; +private _ammoTemperature = _unit getVariable [_ammoTempVarName, 0]; + +// heat or cool the ammo +if (_ammoTemperature < _barrelTemperature) then { + // this is functional and feels ok, but someone please do better heat transfer math here, my head hurts. + private _temperatureDifference = _barrelTemperature - _ammoTemperature; + _ammoTemperature = _ammoTemperature + (1 max ((_temperatureDifference / 2.75) - 100)); +} else { + _ammoTemperature = _barrelTemperature; +}; + +// check for cook off +if (_ammoTemperature > (GUNPOWDER_IGNITION_TEMP * GVAR(cookoffCoef))) then { + + // a weapon with a failure to fire or dud type jam will be unjammed from cooking off + // this is first so that the fired event from the cookoff can also cause a jam + private _jamType = _unit getVariable [format [QGVAR(%1_jamType), _weapon], "None"]; + if (_canUnjam && {_jamType in ["Fire","Dud"]}) then { + + [_unit, currentMuzzle _unit, true] call FUNC(clearJam); + + // clearJam will remove a dud round, but so will the forced fire, so give back the lost round and shoot it + if (_jamType isEqualTo "Dud") then { + private _ammo = _unit ammo _weapon; + _unit setAmmo [_weapon, _ammo + 1]; + }; + }; + + // get valid mode and muzzle for the main weapon, we don't want the cookoff to come from an underbarrel launcher + ([_weapon] call FUNC(getWeaponData)) params ["", "", "", "_modes", "_muzzle", "_reloadTime"]; + + // get an appropriate firemode and muzzle, cache the current muzzle + // trying to match firemodes and switching back to the cached muzzle will hide the change from the player and prevent unexpected mode/muzzle changes (going from full auto to semi auto, or from underbarrel GL to rifle for example) + private _muzzleCache = currentMuzzle _unit; + private _mode = currentWeaponMode _unit; + if !(_mode in _modes) then { + _mode = _modes select 0; + }; + + // delay cookoff to ensure any previous animation from a fired event is finished + [ + { + params ["_unit", "_muzzleCache", "_mode", "_muzzle"]; + + // fire the cookoff + _unit forceWeaponFire [_muzzle, _mode]; + + // switch back to the cached muzzle if required + if (_muzzle != _muzzleCache) then { + _unit selectWeapon _muzzleCache; + }; + + [ + [localize LSTRING(WeaponCookedOff)], + true // allows the hint to be overwritten by another hint, such as a jam or another cookoff + ] call CBA_fnc_notify; + }, + [_unit, _muzzleCache, _mode, _muzzle], + _reloadTime + ] call CBA_fnc_waitAndExecute; + + // if the cookoff happened then the next round should start at 0 + _ammoTemperature = 0; +}; + +_unit setVariable [_ammoTempVarName, _ammoTemperature]; + +_ammoTemperature diff --git a/addons/overheating/functions/fnc_updateAmmoTemperatureThread.sqf b/addons/overheating/functions/fnc_updateAmmoTemperatureThread.sqf new file mode 100644 index 0000000000..2b191102d5 --- /dev/null +++ b/addons/overheating/functions/fnc_updateAmmoTemperatureThread.sqf @@ -0,0 +1,25 @@ +#include "script_component.hpp" +/* + * Author: esteldunedain & drofseh + * Update . + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_overheating_fnc_updateAmmoTemperatureThread + * + * Public: No + */ + +private _currentWeapon = currentWeapon ACE_player; +if ((_currentWeapon != "") && {_currentWeapon == primaryWeapon ACE_player || {_currentWeapon == handgunWeapon ACE_player}}) then { + private _temperature = ACE_player getVariable [format [QGVAR(%1_temp), _currentWeapon], 0]; + [ACE_player, _currentWeapon, _temperature] call FUNC(updateAmmoTemperature); +}; + +// Schedule for execution again after 1 seconds. A quick loop is needed for ammo temperature in order to have faster cookoffs at higher barrel temps +[DFUNC(updateAmmoTemperatureThread), [], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf index d2a499fb94..5fb65366a4 100644 --- a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf +++ b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf @@ -15,28 +15,21 @@ * Public: No */ -private _pairs = []; TRACE_1("updateSpareBarrelsTemperaturesThread1",GVAR(storedSpareBarrels)); -[GVAR(storedSpareBarrels), { - //IGNORE_PRIVATE_WARNING ["_key", "_value"]; - _pairs pushBack [_key, _value]; -}] call CBA_fnc_hashEachPair; -TRACE_1("updateSpareBarrelsTemperaturesThread2",_pairs); { - _x params ["_barrelMagazineID","_value"]; - _value params ["_initialTemp","_initialTime", "_barrelMass"]; + _y params ["_initialTemp","_initialTime", "_barrelMass"]; // Calculate cooling private _finalTemp = [_initialTemp, _barrelMass, CBA_missionTime - _initialTime] call FUNC(calculateCooling); - TRACE_4("updateSpareBarrelsTemperaturesThread3",_barrelMagazineID,_initialTemp,_finalTemp,_barrelMass); + TRACE_4("updateSpareBarrelsTemperaturesThread2",_barrelMagazineID,_initialTemp,_finalTemp,_barrelMass); if (_finalTemp < 5) then { // The barrel is cool enough to keep calculating. Remove it from the hash - [GVAR(storedSpareBarrels), _barrelMagazineID] call CBA_fnc_hashRem; + GVAR(storedSpareBarrels) deleteAt _x; } else { // Store the new temp - [GVAR(storedSpareBarrels), _barrelMagazineID, [_finalTemp, CBA_missionTime, _barrelMass]] call CBA_fnc_hashSet; + GVAR(storedSpareBarrels) set [_x, [_finalTemp, CBA_missionTime, _barrelMass]]; }; -} forEach _pairs; +} forEach GVAR(storedSpareBarrels); // Schedule for execution again after 10 seconds [DFUNC(updateSpareBarrelsTemperaturesThread), [], 10] call CBA_fnc_waitAndExecute; diff --git a/addons/overheating/functions/fnc_updateTemperature.sqf b/addons/overheating/functions/fnc_updateTemperature.sqf index 475f0454f9..351323d54a 100644 --- a/addons/overheating/functions/fnc_updateTemperature.sqf +++ b/addons/overheating/functions/fnc_updateTemperature.sqf @@ -27,7 +27,7 @@ private _timeVarName = format [QGVAR(%1_time), _weapon]; private _temperature = _unit getVariable [_tempVarName, 0]; private _lastTime = _unit getVariable [_timeVarName, 0]; -private _barrelMass = METAL_MASS_RATIO * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0; +private _barrelMass = _weapon call FUNC(getBarrelMass); // Calculate cooling _temperature = [_temperature, _barrelMass, CBA_missionTime - _lastTime] call FUNC(calculateCooling); @@ -35,7 +35,7 @@ _temperature = [_temperature, _barrelMass, CBA_missionTime - _lastTime] call FUN TRACE_1("cooledTo",_temperature); // Calculate heating // Steel Heat Capacity = 466 J/(Kg.K) -_temperature = _temperature + _heatIncrement / (_barrelMass * 466); +_temperature = _temperature + _heatIncrement * GVAR(heatCoef) / (_barrelMass * 466); // Publish the temperature variable [_unit, _tempVarName, _temperature, TEMP_TOLERANCE] call EFUNC(common,setApproximateVariablePublic); diff --git a/addons/overheating/functions/fnc_updateTemperatureThread.sqf b/addons/overheating/functions/fnc_updateTemperatureThread.sqf index 03f2bee53f..670a330c51 100644 --- a/addons/overheating/functions/fnc_updateTemperatureThread.sqf +++ b/addons/overheating/functions/fnc_updateTemperatureThread.sqf @@ -15,9 +15,20 @@ * Public: No */ -private _currentWeapon = currentWeapon ACE_player; -if ((_currentWeapon != "") && {_currentWeapon == primaryWeapon ACE_player || {_currentWeapon == handgunWeapon ACE_player}}) then { - [ACE_player, _currentWeapon, 0] call FUNC(updateTemperature); +if (ACE_player call EFUNC(common,isSwimming)) then { // cool off both weapons while swimming because currentWeapon == "" + private _primaryWeapon = primaryWeapon ACE_player; + private _handgunWeapon = handgunWeapon ACE_player; + if (_primaryWeapon != "") then { + [ACE_player, _primaryWeapon, 0] call FUNC(updateTemperature); + }; + if (_handgunWeapon != "") then { + [ACE_player, _handgunWeapon, 0] call FUNC(updateTemperature); + }; +} else { + private _currentWeapon = currentWeapon ACE_player; + if ((_currentWeapon != "") && {_currentWeapon == primaryWeapon ACE_player || {_currentWeapon == handgunWeapon ACE_player}}) then { + [ACE_player, _currentWeapon, 0] call FUNC(updateTemperature); + }; }; // Schedule for execution again after 5 seconds diff --git a/addons/overheating/initSettings.sqf b/addons/overheating/initSettings.sqf new file mode 100644 index 0000000000..b351a8bed7 --- /dev/null +++ b/addons/overheating/initSettings.sqf @@ -0,0 +1,115 @@ +private _category = format ["ACE %1", localize LSTRING(DisplayName)]; + +[ + QGVAR(enabled), "CHECKBOX", + [LSTRING(enabled_displayName), LSTRING(enabled_description)], + _category, + true, + 1, + {}, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(heatCoef), "SLIDER", + [LSTRING(heatCoef_displayName), LSTRING(heatCoef_description)], + _category, + [0, 5, 1, 2], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(showParticleEffects), "CHECKBOX", + [LSTRING(showParticleEffects_displayName), LSTRING(showParticleEffects_description)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(showParticleEffectsForEveryone), "CHECKBOX", + [LSTRING(showParticleEffectsForEveryone_displayName), LSTRING(showParticleEffectsForEveryone_description)], + _category, + false, + 0, + {}, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(overheatingDispersion), "CHECKBOX", + [LSTRING(overheatingDispersion_displayName), LSTRING(overheatingDispersion_description)], + _category, + true, + 1, + {}, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(particleEffectsAndDispersionDistance), "SLIDER", + [LSTRING(particleEffectsAndDispersionDistance_displayName), LSTRING(particleEffectsAndDispersionDistance_description)], + _category, + [1, 5000, 3000, 0], + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(overheatingRateOfFire), "CHECKBOX", + [LSTRING(overheatingRateOfFire_displayName), LSTRING(overheatingRateOfFire_description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(displayTextOnJam), "CHECKBOX", + [LSTRING(DisplayTextOnJam_displayName), LSTRING(displayTextOnJam_description)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(jamChanceCoef), "SLIDER", + [LSTRING(jamChanceCoef_displayName), LSTRING(jamChanceCoef_description)], + _category, + [0, 5, 1, 2], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(unJamOnreload), "CHECKBOX", + [LSTRING(unJamOnreload_displayName), LSTRING(unJamOnreload_description)], + _category, + false, + 1, + {}, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(unJamOnSwapBarrel), "CHECKBOX", + [LSTRING(unJamOnSwapBarrel_displayName), LSTRING(unJamOnSwapBarrel_description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(unJamFailChance), "SLIDER", + [LSTRING(unJamFailChance_displayName), LSTRING(unJamFailChance_description)], + _category, + [0, 1, 0.1, 2], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(cookoffCoef), "SLIDER", + [LSTRING(cookoffCoef_displayName), LSTRING(cookoffCoef_description)], + _category, + [0, 5, 1, 2], + 1, + {}, + true +] call CBA_fnc_addSetting; diff --git a/addons/overheating/script_component.hpp b/addons/overheating/script_component.hpp index d7dde59da2..0837733cd3 100644 --- a/addons/overheating/script_component.hpp +++ b/addons/overheating/script_component.hpp @@ -18,6 +18,7 @@ #define TEMP_TOLERANCE 50 #define METAL_MASS_RATIO 0.55 +#define GUNPOWDER_IGNITION_TEMP 180 #ifdef DEBUG_MODE_FULL #define TRACE_PROJECTILE_INFO(BULLET) _vdir = vectorNormalized velocity BULLET; _dir = (_vdir select 0) atan2 (_vdir select 1); _up = asin (_vdir select 2); _mv = vectorMagnitude velocity BULLET; TRACE_3("adjusted projectile",_dir,_up,_mv); diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index ff7e2c1152..1025f14b12 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -16,8 +16,46 @@ Surchauffe Přehřívání + + Overheating Enabled + Überhitzung aktiviert + Activado Sobrecalentamiento + Superaquecimento ativado + Surchauffe activée + Перегрев включен + Přehřívání povoleno + 過熱を有効化 + Przegrzewanie włączone + 과열 활성화 + Surriscaldamento Abilitato + 启用过热 + 啟用過熱 + + + Master enable for the overheating/jamming module + Activación maestra para Sobrecalentamiento + Chave mestra para o módulo de superaquecimento/emperramento + Active le module de surchauffe/d'enrayement. + Главный включатель для модуля перегрева/заклинивания + 過熱と弾詰まりモジュールを全て有効化します + Główny włącznik modułu przegrzewania/zacinania się broni + Hauptschalter, um die Überhitzung-/Ladehemmung-Module zu aktivieren + 과열/탄걸림 최종 활성화 + Abilitazione master per il modulo di surriscaldamento / inceppamento + 启用枪管过热/干扰模块 + 啟用槍管過熱/干擾模塊 + Hlavní přepínač pro modul přehřívání/zasekávání + + + Heating Coefficient + 過熱係数 + + + Coefficient for the amount of heat a weapon generates per shot.\nHigher value increases heat. + 射撃毎に武器が生み出す熱量の係数を設定します。\n高い値であるほど熱量が増加します。 + - Display text on jam + Display Text on Jam Zeige Text bei Ladehemmung Mostrar texto al encasquillarse Показывать текст, когда клинит оружие @@ -81,7 +119,7 @@ Fegyvertúlmelegedést okozó részecskehatások mutatása - Overheating Particle Effects for everyone + Overheating Particle Effects for Everyone Zeige Partikeleffekt bei Überhitzung für jeden Pokaż efekty cząsteczkowe dla wszystkich Effetti Particellari Surriscaldamento per tutti @@ -144,8 +182,32 @@ 過熱的武器將會有打不準和減少射擊初速的情況。適用於所有玩家 A túlmelegedett fegyverek kevésbé lesznek pontosak és csökkent a lövés sebessége. Minden játékosra vonatkozik. - - Unjam weapon on reload + + Distance for Effects and Dispersion + エフェクトと分散用距離 + + + The distance, in meters, from the player within which overheating particle effects and dispersion are visible. + プレイヤーが過熱パーティクル エフェクトと分散を見えるようになる距離 (m) を設定します。 + + + Heat Increases Fire Rate + 熱による連射速度上昇 + + + As weapons heat up, their rate of fire increases by up to 10%. + 武器が熱を帯び始めると、連射速度が 10% 上昇します。 + + + Jam Chance Coefficient + 弾詰まり係数 + + + Coefficient for the chance that a weapon will jam from overheating.\nHigher value make jams more likely.\nSet to 0 to disable jamming. + 武器が過熱によって弾詰まりする確立係数を設定します。\n高い値では弾詰まりが起こりやすくなり、0 で弾詰まりが無効化されます。 + + + Unjam Weapon on Reload Behebt Ladehemmung beim Nachladen Desencasquillar el arma al recargar. Usuń zacięcie przy przeładowaniu @@ -160,7 +222,7 @@ 重裝彈匣以解決卡彈 Távolítsa el az akadályt újratöltéskor - + Reloading clears a weapon jam. Nachladen behebt eine Ladehemmung. Recargar el arma la desencasquilla. @@ -176,8 +238,16 @@ 利用重裝彈匣來解決卡彈 Az újratöltés megszünteti a fegyver elakadását. + + Unjam on Barrel Swap + 銃身交換で弾詰まり解消 + + + Controls whether swapping barrels clears a weapon jam. + 銃身を交換して弾詰まりの解消をできるようにします。 + - Chance of unjam failing + Chance of Unjam Failing Wahrscheinlichkeit, dass Ladehemmung nicht behoben wird Probabilidad de falla al desencasquillar. Szansa na porażkę usuw. zacięcia @@ -208,6 +278,14 @@ 清除卡彈時有可能會失敗,需要反覆進行清槍。 Valószínűsége annak, hogy egy akadály eltávolítás művelet kudarcot vall, megismétlést igényel. + + Overheating Cookoff Coefficient + 過熱誘爆係数 + + + Coefficient for the heat required for cookoffs to occur.\nHigher values require more heat to cookoff.\nSet to 0 to disable cookoff. + 過熱によって誘爆が起きる確立係数を設定します。\n高い値では誘爆までに必要な過熱量が増加し、0 で誘爆が無効化されます。 + Spare barrel Ersatzlauf @@ -256,6 +334,26 @@ 武器卡弹! 武器卡彈! + + Weapon cooked off! + 武器が誘爆した! + + + Failure to eject. + 排莢に失敗しました。 + + + Failure to extract. + 排出に失敗しました。 + + + Failure to feed. + 給弾に失敗しました。 + + + Failure to fire. + 撃発に失敗しました。 + Clear jam Ladehemmung beheben @@ -429,6 +527,30 @@ 正在检查枪管温度... 檢查槍管溫度中... + + Cool weapon with... + 次で武器を冷ます・・・ + + + Cooling %1 with %2. + %1 を %2 で冷ましています。 + + + Cool weapon in water source. + 水源で武器を冷ます + + + Cooling weapon in water source. + 水源で武器を冷ましています・・・ + + + Container doesn't have enough water. + 水源には十分な水量がありません。 + + + Weapon is cool enough the water has stopped boiling. + 武器が冷まりきり、水が沸騰していません。 + Temperature Temperatur @@ -520,35 +642,5 @@ 备用枪管温度超级热 備用槍管溫度超級熱 - - Overheating Enabled - Überhitzung aktiviert - Activado Sobrecalentamiento - Superaquecimento ativado - Surchauffe activée - Перегрев включен - Přehřívání povoleno - 過熱を有効化 - Przegrzewanie włączone - 과열 활성화 - Surriscaldamento Abilitato - 启用过热 - 啟用過熱 - - - Master enable for the overheating/jamming module - Activación maestra para Sobrecalentamiento - Chave mestra para o módulo de superaquecimento/emperramento - Active le module de surchauffe/d'enrayement. - Главный включатель для модуля перегрева/заклинивания - 過熱と弾詰まりモジュールを全て有効化します - Główny włącznik modułu przegrzewania/zacinania się broni - Hauptschalter, um die Überhitzung-/Ladehemmung-Module zu aktivieren - 과열/탄걸림 최종 활성화 - Abilitazione master per il modulo di surriscaldamento / inceppamento - 启用枪管过热/干扰模块 - 啟用槍管過熱/干擾模塊 - Hlavní přepínač pro modul přehřívání/zasekávání - diff --git a/addons/overpressure/ACE_Settings.hpp b/addons/overpressure/ACE_Settings.hpp index 58e0d3d8ac..d46cae7498 100644 --- a/addons/overpressure/ACE_Settings.hpp +++ b/addons/overpressure/ACE_Settings.hpp @@ -1,9 +1,5 @@ class ACE_Settings { class GVAR(distanceCoefficient) { - displayName = CSTRING(distanceCoefficient_displayName); - description = CSTRING(distanceCoefficient_toolTip); - typeName = "SCALAR"; - value = 1; - sliderSettings[] = {-1, 10, 5, 1}; + movedToSQF = 1; }; }; diff --git a/addons/overpressure/CfgEventHandlers.hpp b/addons/overpressure/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/overpressure/CfgEventHandlers.hpp +++ b/addons/overpressure/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/overpressure/README.md b/addons/overpressure/README.md index fce4db7d3f..d79899a8d0 100644 --- a/addons/overpressure/README.md +++ b/addons/overpressure/README.md @@ -2,11 +2,3 @@ ace_overpressure ============= Adds backblast area to AT launchers and overpressure zones to tank cannons. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [KoffeinFlummi](https://github.com/KoffeinFlummi) diff --git a/addons/overpressure/XEH_postInit.sqf b/addons/overpressure/XEH_postInit.sqf index 02b0e71bb6..bf3758ab3d 100644 --- a/addons/overpressure/XEH_postInit.sqf +++ b/addons/overpressure/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_1("settingsInit eh",GVAR(distanceCoefficient)); if (GVAR(distanceCoefficient) <= 0) exitWith {}; diff --git a/addons/overpressure/XEH_preInit.sqf b/addons/overpressure/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/overpressure/XEH_preInit.sqf +++ b/addons/overpressure/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/overpressure/initSettings.sqf b/addons/overpressure/initSettings.sqf new file mode 100644 index 0000000000..df93c5ac3a --- /dev/null +++ b/addons/overpressure/initSettings.sqf @@ -0,0 +1,7 @@ +[ + QGVAR(distanceCoefficient), "SLIDER", + [LSTRING(distanceCoefficient_displayName), LSTRING(distanceCoefficient_toolTip)], + "ACE Uncategorized", + [-1, 10, 5, 1], + 1 +] call CBA_fnc_addSetting; diff --git a/addons/overpressure/stringtable.xml b/addons/overpressure/stringtable.xml index b701337cb2..c5683598e2 100644 --- a/addons/overpressure/stringtable.xml +++ b/addons/overpressure/stringtable.xml @@ -15,6 +15,7 @@ Coeficiente de Distância de Sobrepressão Túlnyomás-távolság együtthatója Koeficient vzdálenosti přetlaku + Coeficiente de distancia de sobrepresión Scales the overpressure effect [Default: 1] @@ -30,6 +31,7 @@ Escala o efeito de sobrepressão [Padrão: 1] Állítja a túlnyomás hatását [Alapértelmezett: 1] Nastavuje jak velký je efekt přetlaku [Standard: 1] + Escala el efecto de sobrepresión [Predeterminado: 1] Backblast range @@ -44,6 +46,7 @@ Utóhatás távolsága Portée du backblast Dosah zpětné tlakové vlny (backblast) + Alcance del cono de fuego Backblast angle @@ -58,6 +61,7 @@ Utóhatás aránya Angle du backblast Úhel zpětné tlakové vlny (backblast) + Ángulo del cono de fuego diff --git a/addons/parachute/CfgEventHandlers.hpp b/addons/parachute/CfgEventHandlers.hpp index 8fa46b49f3..b1f81bfc20 100644 --- a/addons/parachute/CfgEventHandlers.hpp +++ b/addons/parachute/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/parachute/CfgVehicles.hpp b/addons/parachute/CfgVehicles.hpp index 5f1b750377..f764494224 100644 --- a/addons/parachute/CfgVehicles.hpp +++ b/addons/parachute/CfgVehicles.hpp @@ -21,6 +21,7 @@ class CfgVehicles { }; }; MACRO_HASRESERVE + GVAR(failureDelay) = 2; }; class ParachuteWest: ParachuteBase { MACRO_HASRESERVE @@ -56,7 +57,7 @@ class CfgVehicles { MACRO_HASRESERVE }; class Bag_Base; - class B_Parachute:Bag_Base { + class B_Parachute: Bag_Base { MACRO_HASRESERVE }; class B_B_Parachute_02_F: B_Parachute { diff --git a/addons/parachute/README.md b/addons/parachute/README.md index 3dd2608152..5bb3fd0050 100644 --- a/addons/parachute/README.md +++ b/addons/parachute/README.md @@ -2,11 +2,3 @@ ace_parachute =========== Improves parachutes and adds an altimeter. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [CorruptedHeart](https://github.com/CorruptedHeart) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/parachute/XEH_PREP.hpp b/addons/parachute/XEH_PREP.hpp index 6edd22c260..916aa1ccdb 100644 --- a/addons/parachute/XEH_PREP.hpp +++ b/addons/parachute/XEH_PREP.hpp @@ -1,4 +1,5 @@ PREP(cutParachute); +PREP(handleFailureChance); PREP(handleInfoDisplayChanged); PREP(handleReserve); PREP(hideAltimeter); diff --git a/addons/parachute/XEH_postInit.sqf b/addons/parachute/XEH_postInit.sqf index 06e02f0757..1217fa3cab 100644 --- a/addons/parachute/XEH_postInit.sqf +++ b/addons/parachute/XEH_postInit.sqf @@ -38,3 +38,5 @@ if (!hasInterface) exitWith {}; // Don't show vanilla speed and height when in expert mode ["ace_infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call CBA_fnc_addEventHandler; + +["vehicle", {_this call FUNC(handleFailureChance)}] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/parachute/XEH_preInit.sqf b/addons/parachute/XEH_preInit.sqf index 5a10c0bd83..ee8e31486b 100644 --- a/addons/parachute/XEH_preInit.sqf +++ b/addons/parachute/XEH_preInit.sqf @@ -12,10 +12,19 @@ PREP_RECOMPILE_END; QGVAR(hideAltimeter), "CHECKBOX", [LSTRING(HideAltimeter), LSTRING(HideAltimeter_tooltip)], - format ["ACE %1", localize ELSTRING(common,DisplayName)], + ["ACE Uncategorized", localize "str_dn_parachute"], true, false, {[QGVAR(hideAltimeter), _this, false] call EFUNC(common,cbaSettings_settingChanged)} -] call cba_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(failureChance), + "SLIDER", + LSTRING(FailureChance), + ["ACE Uncategorized", localize "str_dn_parachute"], + [0, 1, 0, 2, true], + 1 +] call CBA_fnc_addSetting; ADDON = true; diff --git a/addons/parachute/functions/fnc_cutParachute.sqf b/addons/parachute/functions/fnc_cutParachute.sqf index 286673af41..711a8ddb80 100644 --- a/addons/parachute/functions/fnc_cutParachute.sqf +++ b/addons/parachute/functions/fnc_cutParachute.sqf @@ -4,16 +4,20 @@ * Perform the cut parachute action (move unit out and delete) * * Arguments: - * 0: Object + * 0: Player + * 1: Parachute * * Return Value: * None * * Example: - * [player, vehicle player] call FUNC(cutParachute); + * [player, vehicle player] call ace_parachute_fnc_cutParachute; * * Public: No */ params ["_unit", "_parachute"]; +TRACE_2("cutParachute", _unit, _parachute); + +playSound3d ["A3\Sounds_F\characters\parachute\parachute_landing.wss", _unit]; _unit action ["GetOut", _parachute]; deleteVehicle _parachute; diff --git a/addons/parachute/functions/fnc_handleFailureChance.sqf b/addons/parachute/functions/fnc_handleFailureChance.sqf new file mode 100644 index 0000000000..e5ec0b5cde --- /dev/null +++ b/addons/parachute/functions/fnc_handleFailureChance.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: JoramD + * Handles percentage chance parachute failure. + * + * Arguments: + * 0: Unit + * 1: Vehicle + * + * Return Value: + * None + * + * Example: + * [player, vehicle player] call ace_parachute_fnc_handleFailureChance + * + * Public: No + */ + +params ["_unit", "_vehicle"]; + +if !(_vehicle isKindOf "ParachuteBase") exitWith {}; + +if (random 1 < GVAR(failureChance)) then { + private _failureDelay = getNumber (configOf _vehicle >> QGVAR(failureDelay)); + [FUNC(cutParachute), [_unit, _vehicle], _failureDelay] call CBA_fnc_waitAndExecute; +}; diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index f5c1015425..fd937d70e5 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -133,5 +133,12 @@ Oculta la altitud y la velocidad que se muestran en caída libre o en paracaídas. Serbest düşme veya paraşütle atlama sırasında gösterilen yüksekliği ve hızı gizler. + + Parachute Failure Chance + Вероятность отказа парашюта + Chance de défaillance du parachute + 開傘失敗率 + Szansa na nieotwarcie się spadochronu + diff --git a/addons/pylons/CfgEventHandlers.hpp b/addons/pylons/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/addons/pylons/CfgEventHandlers.hpp +++ b/addons/pylons/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/pylons/README.md b/addons/pylons/README.md index b2b6d9d064..bbca9d7e2b 100644 --- a/addons/pylons/README.md +++ b/addons/pylons/README.md @@ -2,10 +2,3 @@ ace_pylons ============ Adds an interface that allows players to configure aircraft pylons. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [654wak654](https://github.com/654wak654) diff --git a/addons/pylons/functions/fnc_onButtonLoad.sqf b/addons/pylons/functions/fnc_onButtonLoad.sqf index af3183073a..f689c8bf82 100644 --- a/addons/pylons/functions/fnc_onButtonLoad.sqf +++ b/addons/pylons/functions/fnc_onButtonLoad.sqf @@ -37,7 +37,7 @@ private _fnc_setSelections = { } forEach GVAR(comboBoxes); }; -private _pylonComponent = configFile >> "CfgVehicles" >> typeOf GVAR(currentAircraft) >> "Components" >> "TransportPylonsComponent"; +private _pylonComponent = configOf GVAR(currentAircraft) >> "Components" >> "TransportPylonsComponent"; private _loadoutFound = { if (getText (_x >> "displayName") isEqualTo _loadoutName) exitWith { // Get default turrets from config diff --git a/addons/pylons/functions/fnc_showDialog.sqf b/addons/pylons/functions/fnc_showDialog.sqf index 119489f4d8..146238a1b7 100644 --- a/addons/pylons/functions/fnc_showDialog.sqf +++ b/addons/pylons/functions/fnc_showDialog.sqf @@ -48,7 +48,7 @@ if (GVAR(rearmNewPylons) || {_isCurator}) then { ctrlShow [ID_TEXT_BANNER, false]; }; -private _config = configFile >> "CfgVehicles" >> typeOf _aircraft; +private _config = configOf _aircraft; private _pylonComponent = _config >> "Components" >> "TransportPylonsComponent"; ctrlSetText [ID_PICTURE_AIRCRAFT, getText (_pylonComponent >> "uiPicture")]; diff --git a/addons/pylons/initSettings.sqf b/addons/pylons/initSettings.sqf index 57a2a79efb..70b158957f 100644 --- a/addons/pylons/initSettings.sqf +++ b/addons/pylons/initSettings.sqf @@ -5,7 +5,7 @@ LSTRING(Category_Pylons), [true], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(enabledForZeus), @@ -14,7 +14,7 @@ LSTRING(Category_Pylons), [true], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(rearmNewPylons), @@ -23,7 +23,7 @@ LSTRING(Category_Pylons), [false], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(requireEngineer), @@ -32,7 +32,7 @@ LSTRING(Category_Pylons), [false], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(requireToolkit), @@ -41,7 +41,7 @@ LSTRING(Category_Pylons), [true], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(searchDistance), @@ -54,7 +54,7 @@ params ["_searchDistance"]; GVAR(searchDistanceSqr) = _searchDistance ^ 2; } -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(timePerPylon), @@ -63,4 +63,4 @@ LSTRING(Category_Pylons), [1, 10, 5, 0], true -] call CBA_Settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/pylons/stringtable.xml b/addons/pylons/stringtable.xml index 87ccaf6f49..d6f2823643 100644 --- a/addons/pylons/stringtable.xml +++ b/addons/pylons/stringtable.xml @@ -14,6 +14,7 @@ СНАРЯЖЕНИЕ САМОЛЕТА LOADOUT DA AERONAVE VÝZBROJ LETADLA + ARMAMENTO DE AERONAVE Loadouts for %1 @@ -28,6 +29,7 @@ Оснащение %1 Loadouts para %1 Sady výzbroje pro %1 + Armamento para %1 Configure Pylons @@ -42,6 +44,7 @@ Настройка Пилонов Configurar Pylons Nastavit pylony + Configurar pilones ACE Pylons @@ -56,6 +59,7 @@ ACE Пилоны ACE Pylons ACE Pylony + ACE Pilones <empty> @@ -71,6 +75,7 @@ <vazio> <prázdné> <boş> + <vacío> Pylons that are colored red will have to be manually rearmed. @@ -85,6 +90,7 @@ Пилоны, окрашенные красным, должны быть переоборудованы вручную Pylons que estão coloridos de vermelho, precisarão ser rearmados manualmente. Pylony označené červeně budou muset být manuálně přezbrojeny. + Pilones de color rojo deben ser rearmados manualmente. %1 is already configuring this aircraft! @@ -99,6 +105,7 @@ %1 уже настраивает эту авиатехнику! %1 já está configurando essa aeronave! %1 už nastavuje výzbroj tohoto letadla! + %1 ya está configurando esta aeronave! Replacing pylon %1 out of %2... @@ -113,6 +120,7 @@ Замена пилона %1 из %2... Substituindo pylon %1 de %2... Nahrazuji pylon %1 z %2... + Reemplazando pilón %1 de %2... Stopped at pylon %1! @@ -127,6 +135,7 @@ Остановлено на пилоне %1! Parado no pylon %1! Přerušeno na pylonu %1! + Parado en pilón %1! Vehicle too far @@ -141,6 +150,7 @@ Техника слишком далеко Veículo muito longe Vozidlo je příliš daleko + Vehículo demasiado alejado Enable Pylons Menu for Zeus @@ -154,6 +164,7 @@ Активировать Меню пилонов для Зевса Ativar Menu de Pylon para Zeus Povolit menu s pylony pro Zeuse + Habilitar menú de pilones para Zeus Enables use of the zeus module. @@ -167,6 +178,7 @@ Позволяет использовать модуль Зевса Permite usar o módulo de Zeus Povoluje použití daného Zeus modulu. + Habilita el uso del módulo de Zeus. Enable Pylons Menu from Ammo Trucks @@ -180,6 +192,7 @@ Меню пилонов из грузовика боеприпасов Ativar Menu de Pylons de Caminhões de Munição Povolit menu s pylony z muničních náklaďáků. + Habilitar menú de pilones desde camiones de munición Enables use of pylons menu from ammo trucks. @@ -193,6 +206,7 @@ Позволяет использовать меню пилонов из грузовика с боеприпасами Permite abrir o menu de pylons através de veículos de munição. Povoluje použití menu na nastavení pylonů z náklaďáků s municí. + Habilita el uso del menú de pilones desde camiones de munición. This aircraft doesn't have pylons @@ -206,6 +220,7 @@ Эта авиатехника не имеет пилонов Essa aeronave não possui pylons Toto letadlo nemá pylony + Esta aeronave no tiene pilones Configure pylons module is disabled for zeus @@ -219,6 +234,7 @@ Модуль Настройка пилонов отключен для Zeus O Módulo de configurar pylons está desativado para o Zeus Nastavení pylonů je vypnuto pro Zeuse + La configuración del módulo de pilones está deshabilitada para Zeus Rearm New Pylons @@ -233,6 +249,7 @@ Перевооружать новые пилоны Rearmar novos pylons Přezbrojit nové pylony + Rearmar nuevos pilones Automatically rearm new pylons from the nearest rearm vehicle. @@ -247,6 +264,7 @@ Автоматически перевооружать новые пилоны из ближайшей техники с боеприпасами Automaticamente rearmas novos pylons com o veículo de munição mais próximo Automaticky přezbrojit nové pylony z nejbližšího vozidla s municí. + Rearma automáticamente nuevos pilones desde el vehículo de rearme más cercano. Time Per Pylon @@ -261,6 +279,7 @@ Время на пилон Tempo por pylon Čas na pylon + Tiempo por pilón The time it takes to replace each pylon (in seconds). @@ -275,6 +294,7 @@ Время для замены каждого пилона (в секундах) O tempo necessário para substituir cada pylon (em segundos) Udává čas jaký trvá nahrazení každého pylonu (ve vteřinách). + El tiempo que lleva reemplazar cada pilón (en segundos). Search Distance @@ -289,6 +309,7 @@ Дальность поиска Distância de procura Vzdálenost hledání munice + Distancia de búsqueda The distance an aircraft needs to be from a rearm vehicle. @@ -303,6 +324,7 @@ Дальность от авиатехники до грузовика (пункта) с боеприпасами A distância que a aeronave precisa estar de um veículo de munições. Maximální vzdálenost ze které je možné letadlo přezbrojit s vozidlem s municí. + La distancia a la que debe estar una aeronave de un vehículo de rearme. Require Engineer @@ -317,6 +339,7 @@ Требуется Инженер Requer um engenheiro Vyžadovat Inženýra + Requerir Ingeniero Require an engineer. @@ -331,6 +354,7 @@ Требуется роль Инженера É necessário uma unidade definida como engenheiro para interagir com pylons. Vyžaduje, aby hráč byl Inženýr. + Requerir un Ingeniero. Require Toolkit @@ -345,6 +369,7 @@ Требуется Набор инструментов Requer Kit de Ferramentas Vyžadovat sadu nářadí (toolkit). + Requerir Kit de herramientas Require a toolkit in inventory. @@ -359,6 +384,7 @@ Требуется наличие Набора инструментов в инвентаре Requer um Kit de Ferramentas no inventário. Vyžaduje, aby hráč měl ve svém inventáři sadu nářadí (toolkit). + Requiere un Kit de herramientas en el inventario diff --git a/addons/quickmount/CfgEventHandlers.hpp b/addons/quickmount/CfgEventHandlers.hpp index 9426fa861e..bff1c64e94 100644 --- a/addons/quickmount/CfgEventHandlers.hpp +++ b/addons/quickmount/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_postInitClient)); }; }; diff --git a/addons/quickmount/CfgVehicles.hpp b/addons/quickmount/CfgVehicles.hpp index a0b54df48b..a52f17cf5a 100644 --- a/addons/quickmount/CfgVehicles.hpp +++ b/addons/quickmount/CfgVehicles.hpp @@ -50,9 +50,9 @@ class CfgVehicles { class ACE_SelfActions { \ class GVAR(ChangeSeat) { \ displayName = CSTRING(ChangeSeat); \ + icon = QPATHTOF(UI\Seats_ca.paa); \ condition = QUOTE(call DFUNC(canShowFreeSeats)); \ - statement = ""; \ - insertChildren = QUOTE((_this select 2) param [ARR_2(0, [])]); \ + insertChildren = QUOTE(call DFUNC(addFreeSeatsActions)); \ }; \ } diff --git a/addons/quickmount/README.md b/addons/quickmount/README.md index 6e11fc8ae4..5b2a69f303 100644 --- a/addons/quickmount/README.md +++ b/addons/quickmount/README.md @@ -2,8 +2,3 @@ ace_quickmount ============ Adds a keybind to quickly enter the vehicle you are directly looking at. -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Kingsley](https://github.com/jameslkingsley) diff --git a/addons/quickmount/UI/Seats_ca.paa b/addons/quickmount/UI/Seats_ca.paa new file mode 100644 index 0000000000..8e4678d5ca Binary files /dev/null and b/addons/quickmount/UI/Seats_ca.paa differ diff --git a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf index 422afece6d..a4ccc737e7 100644 --- a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf +++ b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf @@ -59,8 +59,8 @@ #define MOVE_IN_CODE(command) (_this select 0) command (_this select 1) private _fnc_move = { - (_this select 2) params ["_moveInCode", "_moveInParams", "_currentTurret", "_moveBackCode", "_moveBackParams", ["_enabledByAnimationSource", ""]]; - TRACE_7("fnc_move params",_moveInCode,_moveInParams,_currentTurret,_moveBackCode,_moveBackParams,_enabledByAnimationSource,call {GVAR(frame)=diag_frameno}); + (_this select 2) params ["_moveInCode", "_moveInParams", "_currentTurret", "_moveBackCode", "_moveBackParams"]; + TRACE_6("fnc_move params",_moveInCode,_moveInParams,_currentTurret,_moveBackCode,_moveBackParams,call {GVAR(frame)=diag_frameno}); // workaround getting damage when moveOut while vehicle is moving // also this helps with arma bug when unit is stuck in wrong anim when move in turret with configured enabledByAnimationSource @@ -94,7 +94,7 @@ scopeName "main"; params ["_vehicle", "_player"]; -private _vehicleConfig = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _vehicleConfig = configOf _vehicle; private _isInVehicle = _player in _vehicle; private _fullCrew = fullCrew [_vehicle, "", true]; @@ -208,7 +208,7 @@ private _cargoNumber = -1; private _gunnerCompartments = (_turretConfig >> "gunnerCompartments") call BIS_fnc_getCfgData; TO_COMPARTMENT_STRING(_gunnerCompartments); if (_compartment != _gunnerCompartments) then {breakTo "crewLoop"}; - _params = [{MOVE_IN_CODE(moveInTurret)}, [_vehicle, _turretPath], _currentTurret, _moveBackCode, _moveBackParams, _enabledByAnimationSource]; + _params = [{MOVE_IN_CODE(moveInTurret)}, [_vehicle, _turretPath], _currentTurret, _moveBackCode, _moveBackParams]; _statement = _fnc_move; }; _name = getText (_turretConfig >> "gunnerName"); diff --git a/addons/quickmount/functions/fnc_canShowFreeSeats.sqf b/addons/quickmount/functions/fnc_canShowFreeSeats.sqf index 506dbd78ac..94f5ff6de5 100644 --- a/addons/quickmount/functions/fnc_canShowFreeSeats.sqf +++ b/addons/quickmount/functions/fnc_canShowFreeSeats.sqf @@ -19,7 +19,6 @@ params ["_vehicle", "_unit", "_args"]; -_args set [0, []]; private _isInVehicle = _unit in _vehicle; GVAR(enabled) @@ -40,7 +39,12 @@ GVAR(enabled) || {_vehicle isKindOf "Air"} // except Air } && { - private _subActions = _this call FUNC(addFreeSeatsActions); - _args set [0, _subActions]; - !([] isEqualTo _subActions) + _isInVehicle + || { + // because Get In action has its own statement + // we have to cache subactions in args and reuse them in insertChildren code + private _subActions = _this call FUNC(addFreeSeatsActions); + _args set [0, _subActions]; + [] isNotEqualTo _subActions + } } diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf index 7b1ac71868..0a1794a4d8 100644 --- a/addons/quickmount/functions/fnc_getInNearest.sqf +++ b/addons/quickmount/functions/fnc_getInNearest.sqf @@ -25,7 +25,7 @@ if (!GVAR(enabled) || params [["_interactionTarget", objNull, [objNull]]]; TRACE_1("getInNearest",_interactionTarget); -private _start = AGLtoASL (ACE_player modelToWorldVisual (ACE_player selectionPosition "pilot")); +private _start = ACE_player modelToWorldVisualWorld (ACE_player selectionPosition "pilot"); private _end = (_start vectorAdd (getCameraViewDirection ACE_player vectorMultiply GVAR(distance))); private _objects = lineIntersectsSurfaces [_start, _end, ACE_player]; private _target = (_objects param [0, []]) param [2, objNull]; @@ -72,12 +72,12 @@ if (!isNull _target && private _effectiveRole = toLower _role; if ((_effectiveRole in ["driver", "gunner"]) && {unitIsUAV _target}) exitWith {}; // Ignoring UAV Driver/Gunner - if ((_effectiveRole == "driver") && {(getNumber (([_target] call CBA_fnc_getObjectConfig) >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons) + if ((_effectiveRole == "driver") && {(getNumber (configOf _target >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons) // Seats can be locked independently of the main vehicle if ((_role == "driver") && {lockedDriver _target}) exitWith {TRACE_1("lockedDriver",_x);}; if ((_cargoIndex >= 0) && {_target lockedCargo _cargoIndex}) exitWith {TRACE_1("lockedCargo",_x);}; - if ((!(_turretPath isEqualTo [])) && {_target lockedTurret _turretPath}) exitWith {TRACE_1("lockedTurret",_x);}; + if ((_turretPath isNotEqualTo []) && {_target lockedTurret _turretPath}) exitWith {TRACE_1("lockedTurret",_x);}; if (_effectiveRole == "turret") then { private _turretConfig = [_target, _turretPath] call CBA_fnc_getTurret; @@ -95,7 +95,7 @@ if (!isNull _target && TRACE_2("",_effectiveRole,_x); if (_effectiveRole != _desiredRole) exitWith {}; - if (!(_turretPath isEqualTo [])) then { + if (_turretPath isNotEqualTo []) then { // Using GetInTurret seems to solve problems with incorrect GetInEH params when gunner/commander ACE_player action ["GetInTurret", _target, _turretPath]; TRACE_3("Geting In Turret",_x,_role,_turretPath); diff --git a/addons/quickmount/initSettings.sqf b/addons/quickmount/initSettings.sqf index 742a45cb7e..88fa78bd64 100644 --- a/addons/quickmount/initSettings.sqf +++ b/addons/quickmount/initSettings.sqf @@ -5,7 +5,7 @@ format ["ACE %1", LLSTRING(Category)], true, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(distance), @@ -14,7 +14,7 @@ format ["ACE %1", LLSTRING(Category)], [0, 10, DEFAULT_DISTANCE, 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(speed), @@ -23,7 +23,7 @@ format ["ACE %1", LLSTRING(Category)], [0, 30, DEFAULT_SPEED, 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(priority), @@ -32,7 +32,7 @@ format ["ACE %1", LLSTRING(Category)], [[0, 1, 2, 3], ["str_getin_pos_driver", "str_getin_pos_gunn", "str_getin_pos_comm", "str_getin_pos_passenger"], DEFAULT_PRIORITY], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(enableMenu), @@ -49,4 +49,4 @@ ], 3 ] -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/quickmount/stringtable.xml b/addons/quickmount/stringtable.xml index d53a4b2b10..58c4f56e09 100644 --- a/addons/quickmount/stringtable.xml +++ b/addons/quickmount/stringtable.xml @@ -14,6 +14,7 @@ Entrada Rápida Entrée rapide Rychlé nastoupení + Entrada rápida Vehicle quick mount @@ -28,6 +29,7 @@ Entrada Rápida em Veículo Entrée rapide véhicules Rychlé nastoupení do vozidla + Entrada rápida vehículo Quickly enter the vehicle you are directly looking at. @@ -43,6 +45,7 @@ Permet d'entrer rapidement dans le véhicule que vous regardez. Rychle nastoupit do vozidla na které se díváte. Doğrudan bakmakta olduğunuz araca hızla girin. + Entrar rápidamente al vehículo al que estás mirando Vehicle Full @@ -58,6 +61,7 @@ Véhicule plein Vozidlo je plné Araç Dolu + Vehículo completo This option allows quick entry into the vehicle you are directly looking at. @@ -70,6 +74,7 @@ Bu seçenek, doğrudan bakmakta olduğunuz araca hızlı giriş sağlar. Tato možnost umožňuje rychle nastoupit do vozidla na které se díváte. Эта опция разрешает быстро залезть в транспорт, на который вы смотрите. + Esta opción permite entrar rápidamente al vehículo al que estás mirando Distance @@ -85,6 +90,7 @@ Distance Vzdálenost Mesafe + Distancia Maximum distance to check for vehicles. @@ -100,6 +106,7 @@ Distance de vérification maximale des véhicules. Maximální vzdálenost od vozidel. Araçların kontrol edilmesi için maksimum mesafe. + Distancia máxima para comprobar vehículos Vehicle Locked @@ -115,6 +122,7 @@ Véhicule verrouillé Vozidlo je zamčeno Araç Kilitli + Vehículo bloqueado Maximum Speed (km/h) @@ -130,6 +138,7 @@ Vitesse maximale (km/h) Maximální rychlost (km/h) Yüksek Hız (km/h) + Velocidad máxima (km/h) Maximum vehicle speed (km/h) allowed for player entry @@ -145,6 +154,7 @@ Définit la vitesse maximale que peut avoir un véhicule en mouvement pour qu'un joueur réussisse à y entrer. Maximální rychlost vozidla (km/h) při které hráči mohou nastoupit do vozidla Oyuncu binmesi için izin verilen maksimum araç hızı (km / s) + Máxima velocidad del vehículo (km/h) para permitir la entrada de jugadores Prioritize Seat @@ -160,6 +170,7 @@ Place prioritaire Priorita sedadel Koltuğa Öncelik Ver + Asiento prioritario Seat priority on entry @@ -175,6 +186,7 @@ Définit à quel poste s'asseoir en priorité lors de l'embarquement. Priorita sedadla při nástupu Araça binerken koltuk önceliği + Asiento prioritario en entrada Change seat @@ -188,6 +200,7 @@ Changer de place Změnit sedadlo Koltuk Değiştir + Cambiar asiento diff --git a/addons/rangecard/CfgEventHandlers.hpp b/addons/rangecard/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/rangecard/CfgEventHandlers.hpp +++ b/addons/rangecard/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/rangecard/CfgVehicles.hpp b/addons/rangecard/CfgVehicles.hpp index 5974e62e69..ef54c49428 100644 --- a/addons/rangecard/CfgVehicles.hpp +++ b/addons/rangecard/CfgVehicles.hpp @@ -20,14 +20,14 @@ class CfgVehicles { statement = QUOTE(false call FUNC(openRangeCard)); showDisabled = 0; icon = QPATHTOF(UI\RangeCard_Icon.paa); - exceptions[] = {"notOnMap"}; + exceptions[] = {"notOnMap", "isNotInside"}; class GVAR(openCopy) { displayName = CSTRING(OpenRangeCardCopy); condition = QUOTE(call FUNC(canShowCopy) && !GVAR(RangeCardOpened)); statement = QUOTE(true call FUNC(openRangeCard)); showDisabled = 0; icon = QPATHTOF(UI\RangeCard_Icon.paa); - exceptions[] = {"notOnMap"}; + exceptions[] = {"notOnMap", "isNotInside"}; }; class GVAR(makeCopy) { displayName = CSTRING(CopyRangeCard); @@ -35,7 +35,7 @@ class CfgVehicles { statement = QUOTE(GVAR(zeroRangeCopy)=GVAR(zeroRange); GVAR(boreHeightCopy)=GVAR(boreHeight); GVAR(ammoClassCopy)=GVAR(ammoClass); GVAR(magazineClassCopy)=GVAR(magazineClass); GVAR(weaponClassCopy)=GVAR(weaponClass);); showDisabled = 0; icon = QPATHTOF(UI\RangeCard_Icon.paa); - exceptions[] = {"notOnMap"}; + exceptions[] = {"notOnMap", "isNotInside"}; }; }; }; diff --git a/addons/rangecard/README.md b/addons/rangecard/README.md index 94169a3075..26046fc79a 100644 --- a/addons/rangecard/README.md +++ b/addons/rangecard/README.md @@ -2,10 +2,3 @@ ace_rangecards =============== Adds range cards. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/rangecard/RscTitles.hpp b/addons/rangecard/RscTitles.hpp index 8a2007b2b2..7c760bd993 100644 --- a/addons/rangecard/RscTitles.hpp +++ b/addons/rangecard/RscTitles.hpp @@ -54,7 +54,7 @@ class RangeCard_RscListNBox: RscListNBox { colorDisabled[]={1,1,1,0.3}; }; - class ListScrollBar : ScrollBar { + class ListScrollBar: ScrollBar { }; }; diff --git a/addons/realisticnames/CfgMagazines.hpp b/addons/realisticnames/CfgMagazines.hpp index dc34fe0b99..be7ce2b2a5 100644 --- a/addons/realisticnames/CfgMagazines.hpp +++ b/addons/realisticnames/CfgMagazines.hpp @@ -453,19 +453,19 @@ class CfgMagazines { class PylonRack_3Rnd_Missile_AGM_02_F: PylonRack_1Rnd_Missile_AGM_02_F { displayName = "AGM-65 Maverick G 3x"; // [vanilla: Macer 3x - Missile_AGM_02_Plane_CAS_01_F] }; - class magazine_Missile_AGM_02_x1 : VehicleMagazine { + class magazine_Missile_AGM_02_x1: VehicleMagazine { displayName = "AGM-65 Maverick G"; // [vanilla: Macer - Missile_AGM_02_Plane_CAS_01_F] }; - class PylonMissile_Missile_AGM_02_x1 : magazine_Missile_AGM_02_x1 { + class PylonMissile_Missile_AGM_02_x1: magazine_Missile_AGM_02_x1 { displayName = "AGM-65 Maverick G"; // [vanilla: Macer - Missile_AGM_02_Plane_CAS_01_F] }; - class PylonMissile_Missile_AGM_02_x2 : magazine_Missile_AGM_02_x1 { + class PylonMissile_Missile_AGM_02_x2: magazine_Missile_AGM_02_x1 { displayName = "AGM-65 Maverick G 2x"; // [vanilla: Macer 2x - Missile_AGM_02_Plane_CAS_01_F] }; - class PylonRack_Missile_AGM_02_x1 : magazine_Missile_AGM_02_x1 { + class PylonRack_Missile_AGM_02_x1: magazine_Missile_AGM_02_x1 { displayName = "AGM-65 Maverick G"; // [vanilla: Macer - Missile_AGM_02_Plane_CAS_01_F] }; - class PylonRack_Missile_AGM_02_x2 : magazine_Missile_AGM_02_x1 { + class PylonRack_Missile_AGM_02_x2: magazine_Missile_AGM_02_x1 { displayName = "AGM-65 Maverick G 2x"; // [vanilla: Macer 2x - Missile_AGM_02_Plane_CAS_01_F] }; class 2Rnd_LG_scalpel; diff --git a/addons/realisticnames/CfgVehicles.hpp b/addons/realisticnames/CfgVehicles.hpp index e0fa6af1de..8d4d0c2f4a 100644 --- a/addons/realisticnames/CfgVehicles.hpp +++ b/addons/realisticnames/CfgVehicles.hpp @@ -183,14 +183,14 @@ class CfgVehicles { }; class APC_Wheeled_02_base_F; - class O_APC_Wheeled_02_base_F : APC_Wheeled_02_base_F { + class O_APC_Wheeled_02_base_F: APC_Wheeled_02_base_F { displayName = CSTRING(APC_Wheeled_02_rcws_Name); }; class APC_Wheeled_02_base_v2_F; - class O_APC_Wheeled_02_rcws_v2_F : APC_Wheeled_02_base_v2_F { + class O_APC_Wheeled_02_rcws_v2_F: APC_Wheeled_02_base_v2_F { displayName = CSTRING(APC_Wheeled_02_rcws_Name); }; - class O_T_APC_Wheeled_02_rcws_v2_ghex_F : APC_Wheeled_02_base_v2_F { + class O_T_APC_Wheeled_02_rcws_v2_ghex_F: APC_Wheeled_02_base_v2_F { displayName = CSTRING(APC_Wheeled_02_rcws_Name); }; @@ -421,7 +421,7 @@ class CfgVehicles { }; class Plane_Fighter_04_Base_F; - class I_Plane_Fighter_04_F : Plane_Fighter_04_Base_F { + class I_Plane_Fighter_04_F: Plane_Fighter_04_Base_F { displayName = CSTRING(Plane_Fighter_04_Name); }; @@ -777,78 +777,78 @@ class CfgVehicles { // Polaris DAGOR (Prowler) class LSV_01_base_F; - class LSV_01_armed_base_F : LSV_01_base_F { + class LSV_01_armed_base_F: LSV_01_base_F { displayName = CSTRING(lsv_01_armed); }; - class LSV_01_unarmed_base_F : LSV_01_base_F { + class LSV_01_unarmed_base_F: LSV_01_base_F { displayName = CSTRING(lsv_01_unarmed); }; - class LSV_01_light_base_F : LSV_01_base_F { + class LSV_01_light_base_F: LSV_01_base_F { displayName = CSTRING(lsv_01_light); }; - class LSV_01_AT_base_F : LSV_01_base_F { + class LSV_01_AT_base_F: LSV_01_base_F { displayName = CSTRING(lsv_01_at); }; // Light Strike Vehicle Mk. II (Qilin) class LSV_02_base_F; - class LSV_02_armed_base_F : LSV_02_base_F { + class LSV_02_armed_base_F: LSV_02_base_F { displayName = CSTRING(lsv_02_armed); }; - class LSV_02_unarmed_base_F : LSV_02_base_F { + class LSV_02_unarmed_base_F: LSV_02_base_F { displayName = CSTRING(lsv_02_unarmed); }; - class LSV_02_AT_base_F : LSV_02_base_F { + class LSV_02_AT_base_F: LSV_02_base_F { 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 { + 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 { + 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 { + 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 { + 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 { + 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 { + 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 { + 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 { + class O_T_MBT_04_command_F: MBT_04_command_base_F { displayName = CSTRING(MBT_04_command); }; // Wiesel 2 (AWC 302 Nyx) class LT_01_AA_base_F; - class I_LT_01_AA_F : 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 { + 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 { + 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 { + class I_LT_01_scout_F: LT_01_scout_base_F { displayName = CSTRING(LT_01_scout); }; diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index e5a9a0785c..394f623f65 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -12,6 +12,9 @@ class CfgWeapons { class arifle_MX_Black_F: arifle_MX_F { displayName = CSTRING(arifle_MX_Black_Name); }; + class arifle_MX_khk_F: arifle_MX_Black_F { + displayName = CSTRING(arifle_MX_Khaki_Name); + }; class arifle_MXC_F: arifle_MX_Base_F { displayName = CSTRING(arifle_MXC_Name); @@ -19,6 +22,9 @@ class CfgWeapons { class arifle_MXC_Black_F: arifle_MXC_F { displayName = CSTRING(arifle_MXC_Black_Name); }; + class arifle_MXC_khk_F: arifle_MXC_Black_F { + displayName = CSTRING(arifle_MXC_Khaki_Name); + }; class arifle_MX_GL_F: arifle_MX_Base_F { displayName = CSTRING(arifle_MX_GL_Name); @@ -26,6 +32,9 @@ class CfgWeapons { class arifle_MX_GL_Black_F: arifle_MX_GL_F { displayName = CSTRING(arifle_MX_GL_Black_Name); }; + class arifle_MX_GL_khk_F: arifle_MX_GL_Black_F { + displayName = CSTRING(arifle_MX_GL_Khaki_Name); + }; class arifle_MX_SW_F: arifle_MX_Base_F { displayName = CSTRING(arifle_MX_SW_Name); @@ -33,6 +42,9 @@ class CfgWeapons { class arifle_MX_SW_Black_F: arifle_MX_SW_F { displayName = CSTRING(arifle_MX_SW_Black_Name); }; + class arifle_MX_SW_khk_F: arifle_MX_SW_Black_F { + displayName = CSTRING(arifle_MX_SW_Khaki_Name); + }; class arifle_MXM_F: arifle_MX_Base_F { displayName = CSTRING(arifle_MXM_Name); @@ -40,6 +52,9 @@ class CfgWeapons { class arifle_MXM_Black_F: arifle_MXM_F { displayName = CSTRING(arifle_MXM_Black_Name); }; + class arifle_MXM_khk_F: arifle_MXM_Black_F { + displayName = CSTRING(arifle_MXM_Khaki_Name); + }; // Katiba class arifle_katiba_Base_F; @@ -93,7 +108,7 @@ class CfgWeapons { class arifle_Mk20_GL_plain_F: arifle_Mk20_GL_F { displayName = CSTRING(arifle_Mk20_GL_plain_Name); }; - + // P90 (1.86) class SMG_03_TR_BASE; class SMG_03_TR_black: SMG_03_TR_BASE { @@ -145,8 +160,8 @@ class CfgWeapons { class SMG_03C_hex: SMG_03C_black { displayName = CSTRING(P90_Hex_Name); }; - - + + // Vector class SMG_01_Base; @@ -247,10 +262,10 @@ class CfgWeapons { }; class launch_Vorona_base_F; - class launch_O_Vorona_brown_F : launch_Vorona_base_F { + class launch_O_Vorona_brown_F: launch_Vorona_base_F { displayName = CSTRING(launch_Vorona_brown); }; - class launch_O_Vorona_green_F : launch_Vorona_base_F { + class launch_O_Vorona_green_F: launch_Vorona_base_F { displayName = CSTRING(launch_Vorona_green); }; @@ -418,7 +433,7 @@ class CfgWeapons { class Missile_AGM_01_Plane_CAS_02_F: Missile_AGM_02_Plane_CAS_01_F { displayName = "Kh-25MTP"; }; - class missiles_Vorona : MissileLauncher { + class missiles_Vorona: MissileLauncher { displayName = CSTRING(missiles_vorona); }; @@ -509,8 +524,8 @@ class CfgWeapons { }; }; - class HMG_127_APC : HMG_127 {}; - class ACE_HMG_127_KORD : HMG_127_APC { + class HMG_127_APC: HMG_127 {}; + class ACE_HMG_127_KORD: HMG_127_APC { displayName = "6P49 Kord"; }; @@ -557,7 +572,7 @@ class CfgWeapons { displayName = "Mini-Spike"; }; - class missiles_SAAMI : MissileLauncher { + class missiles_SAAMI: MissileLauncher { displayName = "FIM-92F"; }; @@ -596,8 +611,8 @@ class CfgWeapons { class cannon_125mm: CannonCore { displayName = "2A46"; }; - - class cannon_125mm_advanced : cannon_125mm { + + class cannon_125mm_advanced: cannon_125mm { displayName = "2A82-1M"; }; @@ -618,7 +633,7 @@ class CfgWeapons { class ACE_LMG_coax_ext_MG3: LMG_coax_ext { displayName = "Rheinmetall MG3"; }; - class ACE_LMG_coax_DenelMG4 : LMG_coax { + class ACE_LMG_coax_DenelMG4: LMG_coax { displayName = "Denel MG4"; }; @@ -666,16 +681,16 @@ class CfgWeapons { displayName = "L21A1 RARDEN"; }; }; - - class autocannon_30mm_RCWS : autocannon_Base_F { + + class autocannon_30mm_RCWS: autocannon_Base_F { displayName = "2A42"; }; - class cannon_20mm : autocannon_Base_F { - class AP : autocannon_Base_F {}; - class HE : 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 { + class ACE_cannon_20mm_Rh202: cannon_20mm { displayName = "MK20 Rh 202"; class AP: AP { displayName = "MK20 Rh 202"; @@ -693,52 +708,76 @@ class CfgWeapons { displayName = "UTG Defender 126"; }; - class optic_hamr : ItemCore { + class optic_hamr: ItemCore { displayName = CSTRING(optic_hamr); }; - class optic_Hamr_khk_F : optic_hamr { + class optic_Hamr_khk_F: optic_hamr { displayName = CSTRING(optic_hamr_khk); }; - class ACE_optic_Hamr_2D : 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 : ItemCore { + class optic_Arco: ItemCore { displayName = CSTRING(optic_arco); }; - class optic_Arco_blk_F : optic_Arco { + class optic_Arco_blk_F: optic_Arco { displayName = CSTRING(optic_arco_blk); }; - class optic_Arco_ghex_F : optic_Arco { + class optic_Arco_ghex_F: optic_Arco { displayName = CSTRING(optic_arco_ghex); }; - class ACE_optic_Arco_2D : 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_Arco_lush_F: optic_Arco { + displayName = CSTRING(optic_arco_lush); + }; + class optic_Arco_arid_F: optic_Arco { + displayName = CSTRING(optic_arco_arid); + }; + class optic_Arco_AK_blk_F: optic_Arco_blk_F { + displayName = CSTRING(optic_arco_ak_blk); + }; + class optic_Arco_AK_lush_F: optic_Arco_lush_F { + displayName = CSTRING(optic_arco_ak_lush); + }; + class optic_Arco_AK_arid_F: optic_Arco_arid_F { + displayName = CSTRING(optic_arco_ak_arid); + }; - class optic_ERCO_blk_f : optic_Arco { + class optic_ERCO_blk_f: optic_Arco { displayName = CSTRING(optic_erco_blk); }; - class optic_ERCO_khk_f : optic_ERCO_blk_f { + class optic_ERCO_khk_f: optic_ERCO_blk_f { displayName = CSTRING(optic_erco_khk); }; - class optic_ERCO_snd_f : optic_ERCO_blk_f { + class optic_ERCO_snd_f: optic_ERCO_blk_f { displayName = CSTRING(optic_erco_snd); }; - - class optic_LRPS : ItemCore { + + class optic_LRPS: ItemCore { displayName = CSTRING(optic_lrps); }; - class optic_LRPS_ghex_F : optic_LRPS { + class optic_LRPS_ghex_F: optic_LRPS { displayName = CSTRING(optic_lrps_ghex); }; - class optic_LRPS_tna_F : optic_LRPS { + class optic_LRPS_tna_F: optic_LRPS { displayName = CSTRING(optic_lrps_tna); }; - class ACE_optic_LRPS_2D : 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_AMS_base; class optic_AMS: optic_AMS_base { displayName = CSTRING(optic_ams); @@ -749,7 +788,7 @@ class CfgWeapons { class optic_AMS_snd: optic_AMS { displayName = CSTRING(optic_ams_snd); }; - + class optic_KHS_base; class optic_KHS_blk: optic_KHS_base { displayName = CSTRING(optic_khs_blk); @@ -763,54 +802,69 @@ class CfgWeapons { class optic_KHS_tan: optic_KHS_blk { displayName = CSTRING(optic_khs_tan); }; - - class optic_DMS : ItemCore { + + class optic_DMS: ItemCore { displayName = CSTRING(optic_dms); }; - class optic_DMS_ghex_F : optic_DMS { + class optic_DMS_ghex_F: optic_DMS { displayName = CSTRING(optic_dms_ghex); }; + class optic_DMS_weathered_F: optic_DMS { + displayName = CSTRING(optic_dms_weathered); + }; + class optic_DMS_weathered_Kir_F: optic_DMS_weathered_F { + displayName = CSTRING(optic_dms_weathered_kir); + }; - class optic_holosight : ItemCore { + class optic_holosight: ItemCore { displayName = CSTRING(optic_holosight); }; - class optic_Holosight_blk_F : optic_holosight { + class optic_Holosight_blk_F: optic_holosight { displayName = CSTRING(optic_holosight_blk); }; - class optic_Holosight_khk_F : optic_holosight { + class optic_Holosight_khk_F: optic_holosight { displayName = CSTRING(optic_holosight_khk); }; - class optic_Holosight_smg : ItemCore { + class optic_Holosight_lush_F: optic_holosight { + displayName = CSTRING(optic_holosight_lush); + }; + class optic_Holosight_arid_F: optic_holosight { + displayName = CSTRING(optic_holosight_arid); + }; + class optic_Holosight_smg: ItemCore { displayName = CSTRING(optic_holosight_smg); }; - class optic_Holosight_smg_blk_F : optic_Holosight_smg { + class optic_Holosight_smg_blk_F: optic_Holosight_smg { displayName = CSTRING(optic_holosight_smg_blk); }; - class optic_Holosight_smg_khk_F : optic_Holosight_smg { + class optic_Holosight_smg_khk_F: optic_Holosight_smg { displayName = CSTRING(optic_holosight_smg_khk); }; - class optic_MRCO : ItemCore { + class optic_MRCO: ItemCore { displayName = CSTRING(optic_MRCO); }; - class ACE_optic_MRCO_2D : 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 { + class optic_Yorris: ItemCore { displayName = CSTRING(optic_Yorris); }; - class optic_ACO : ItemCore { + class optic_ACO: ItemCore { displayName = CSTRING(optic_ACO); }; - class optic_ACO_grn : ItemCore { + class optic_ACO_grn: ItemCore { displayName = CSTRING(optic_ACO_grn); }; - class optic_ACO_smg : ItemCore { + class optic_ACO_smg: ItemCore { displayName = CSTRING(optic_ACO_smg); }; - class optic_ACO_grn_smg : ItemCore { + class optic_ACO_grn_smg: ItemCore { displayName = CSTRING(optic_ACO_grn_smg); }; @@ -934,6 +988,9 @@ class CfgWeapons { class hgun_P07_khk_F: hgun_P07_F { displayName = CSTRING(hgun_P07_khk); }; + class hgun_P07_blk_F: hgun_P07_F { + displayName = CSTRING(hgun_P07_blk); + }; // Makarov class hgun_Pistol_01_F: Pistol_Base_F { diff --git a/addons/realisticnames/README.md b/addons/realisticnames/README.md index 6cd05351f6..a22849cb35 100644 --- a/addons/realisticnames/README.md +++ b/addons/realisticnames/README.md @@ -2,11 +2,3 @@ ace_realisticnames ================== Changes the names of various weapons and vehicles to those of their real life counterparts. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 658868a026..d8efa1177e 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -1328,6 +1328,9 @@ M183 Charge de démolition (lançable) M183 梱包爆薬 (投てき仕様) M183 Demolition Charge (Throwable) + Carga de demolición M183 (Lanzable) + M183 Комплектный подрывной заряд (Бросаемый) + Ładunek burzący M183 (Rzucany) M112 Demolition Block @@ -1351,6 +1354,9 @@ M112 Bloc de démolition (lançable) M112 爆薬ブロック (投てき仕様) M112 Demolition Charge (Throwable) + Bloque de demolición M112 (Lanzable) + M112 подрывной заряд (Бросаемый) + Ładunek burzący M112 (Rzucany) M67 Fragmentation Grenade @@ -1650,7 +1656,7 @@ FNX-45 Tactical (Verde) FNX-45 Tactical (Verde) FNX-45 Tactical (Yeşil) - FNX-45 タクティカル (緑) + FNX-45 タクティカル (グリーン) FNX-45 Tactical (초록) FNX-45戰術型手槍 (綠色) FNX-45战术型手枪 (绿色) @@ -1735,7 +1741,7 @@ RPG-32 (Verde) RPG-32 (Verde) RPG-32 (Yeşil) - RPG-32 (緑) + RPG-32 (グリーン) RPG-32 (초록) RPG-32"哈希姆"火箭發射器 (綠色) RPG-32"哈希姆"火箭发射器 (绿色) @@ -1787,6 +1793,7 @@ Metis-M Metis-M Metis-M + Metis-M Metis-M (Brown) @@ -1796,7 +1803,7 @@ "麥士蒂索人"-M型反坦克導彈(棕色) "麦士蒂索人"-M型反坦克导弹(棕色) Metis-M (Marrone) - メチス-M (茶) + メチス-M (ブラウン) Metis-M (Brązowy) Metis-M (Marrom) Metis-M (hnědý) @@ -1811,7 +1818,7 @@ "麥士蒂索人"-M型反坦克導彈(綠色) "麦士蒂索人"-M型反坦克导弹(绿色) Metis-M (Verde) - メチス-M (緑) + メチス-M (グリーン) Metis-M (Zielony) Metis-M (Verde) Metis-M (zelený) @@ -1846,12 +1853,28 @@ MX (Чёрный) MX (Preto) MX (Nero) - MX (黒) + MX (ブラック) MX (검정) MX突擊步槍 (黑色) MX突击步枪 (黑色) MX (Siyah) + + MX (Khaki) + MX (Khaki) + MX(卡其) + MX (Kaki) + MX (Caqui) + MX (Kaki) + MX (Khaki) + MX (хаки) + MX (Khaki) + MX (Cáqui) + MX (카키) + MX(卡其色) + MX(カーキ) + MX (Haki) + MXC MXC @@ -1880,12 +1903,28 @@ MXC (Чёрный) MXC (Preto) MXC (Nero) - MXC (黒) + MXC (ブラック) MXC (검정) MXC卡賓步槍 (黑色) MXC卡宾步枪 (黑色) MXC (Siyah) + + MXC (Khaki) + MXC (Khaki) + MXC(卡其) + MXC (Kaki) + MXC (Caqui) + MXC (Kaki) + MXC (Khaki) + MXC (хаки) + MXC (Khaki) + MXC (Cáqui) + MXC (카키) + MXC(卡其色) + MXC(カーキ) + MXC (Haki) + MX 3GL MX 3GL @@ -1914,12 +1953,28 @@ MX 3GL (Чёрный) MX 3GL (Preto) MX 3GL (Nero) - MX 3GL (黒) + MX 3GL (ブラック) MX 3GL (검정) MX突擊步槍 (3連裝榴彈-黑色) MX突击步枪 (3连装榴弹-黑色) MX 3GL (Siyah) + + MX 3GL (Khaki) + MX 3GL (Khaki) + MX 3GL(卡其) + MX 3GL (Kaki) + MX 3GL (Caqui) + MX 3GL (Kaki) + MX 3GL (Khaki) + MX 3GL (хаки) + MX 3GL (Khaki) + MX 3GL (Cáqui) + MX 3GL (카키) + MX 3GL(卡其色) + MX 3GL(カーキ) + MX 3GL (Haki) + MX LSW MX LSW @@ -1948,12 +2003,28 @@ MX LSW (Чёрный) MX LSW (Preto) MX LSW (Nero) - MX LSW (黒) + MX LSW (ブラック) MX LSW (검정) MX輕型機槍 (黑色) MX轻型机枪 (黑色) MX LSW (Siyah) + + MX LSW (Khaki) + MX LSW (Khaki) + MX LSW(卡其) + MX LSW (Kaki) + MX LSW (Caqui) + MX LSW (Kaki) + MX LSW (Khaki) + MX LSW (хаки) + MX LSW (Khaki) + MX LSW (Cáqui) + MX LSW (카키) + MX LSW(卡其色) + MX LSW(カーキ) + MX LSW (Haki) + MXM MXM @@ -1988,6 +2059,22 @@ MXM精准步枪 (黑色) MXM (Siyah) + + MXM (Khaki) + MXM (Khaki) + MXM(卡其) + MXM (Kaki) + MXM (Caqui) + MXM (Kaki) + MXM (Khaki) + MXM (хаки) + MXM (Khaki) + MXM (Cáqui) + MXM (카키) + MXM(卡其色) + MXM(カーキ) + MXM (Haki) + KH2002 Sama KH2002 Sama @@ -2084,7 +2171,7 @@ F2000 Tactical (Камо) F2000 Tactical (Camo) F2000 Tactical (Camo) - F2000 タクティカル (迷彩) + F2000 タクティカル (カモフラージュ) F2000 Tactical (위장) F2000戰術型突擊步槍 (迷彩) F2000战术型突击步枪 (迷彩) @@ -2498,13 +2585,13 @@ SIG 556精准步枪 (黑色) SIG 556 (Siyah) - + SIG 556 (Khaki) SIG 556 (Khaki) SIG 556 (Kaki) SIG 556 (Caqui) SIG 556 (Хаки) - SIG 556 (khaki) + SIG 556 (Khaki) SIG 556 (Khaki) SIG 556 (Khaki) SIG 556 (Khaki) @@ -2662,7 +2749,7 @@ Cyrus (Hex) Cyrus (Hex) Cyrus (Hex) - サイラス (蜂巣) + サイラス (ヘックス) Cyrus (육각) "居鲁士"狙擊步槍 (數位蜂巢迷彩) "居鲁士"狙击步枪 (数位蜂巢迷彩) @@ -2885,6 +2972,7 @@ Jeep Wrangler (SPG-9) Jeep Wrangler (SPG-9) Jeep Wrangler (SPG-9) + Jeep Wrangler (SPG-9) Jeep Wrangler (LMG) @@ -2899,6 +2987,7 @@ Jeep Wrangler (LMG) Jeep Wrangler (LMG) Jeep Wrangler (LMG) + Jeep Wrangler (LMG) Cessna TTx @@ -3246,7 +3335,7 @@ HK416A5 11" (Kaki) HK416A5 11" (Caqui) HK416A5 11" (Хаки) - HK416A5 11" (khaki) + HK416A5 11" (Khaki) HK416A5 11" (Khaki) HK416A5 11" (Khaki) HK416A5 11" (Khaki) @@ -3297,7 +3386,7 @@ HK416A5 11" GL (Kaki) HK416A5 11" GL (Caqui) HK416A5 11" GL (Хаки) - HK416A5 11" GL (khaki) + HK416A5 11" GL (Khaki) HK416A5 11" GL (Khaki) HK416A5 11" GL (Khaki) HK416A5 11" GL (Khaki) @@ -3348,7 +3437,7 @@ HK416A5 14.5" (Kaki) HK416A5 14.5" (Caqui) HK416A5 14.5" (Хаки) - HK416A5 14.5" (khaki) + HK416A5 14.5" (Khaki) HK416A5 14.5" (Khaki) HK416A5 14.5" (Khaki) HK416A5 14.5" (Khaki) @@ -3399,7 +3488,7 @@ HK417A2 20" (Kaki) HK417A2 20" (Caqui) HK417A2 20" (Хаки) - HK417A2 20" (khaki) + HK417A2 20" (Khaki) HK417A2 20" (Khaki) HK417A2 20" (Khaki) HK417A2 20" (Khaki) @@ -3450,7 +3539,7 @@ P99 (Kaki) P99 (Caqui) P99 (Хаки) - P99 (khaki) + P99 (Khaki) P99 (Khaki) P99 (Khaki) P99 (Khaki) @@ -3461,6 +3550,23 @@ P99半自动手枪 (卡其色) P99 (Haki) + + P99 (Black) + P99 (Černá) + P99 (Noir) + P99 (Negro) + P99 (Чёрный) + P99 (czarny) + P99 (Schwarz) + P99 (Nero) + P99 (Fekete) + P99 (Preto) + P99 (ブラック) + P99 (검정) + P99半自動手槍 (黑色) + P99半自动手枪 (黑色) + P99 (Siyah) + Makarov PM Makarov PM @@ -3491,6 +3597,7 @@ Polaris DAGOR (XM312) Polaris DAGOR (XM312) Polaris DAGOR (XM312) + Polaris DAGOR (XM312) Polaris DAGOR (Mini-Spike AT) @@ -3505,6 +3612,7 @@ Polaris DAGOR (Mini-Spike AC) Polaris DAGOR (Mini-Spike AT) Polaris DAGOR (Mini-Spike AT) + Polaris DAGOR (Mini-Spike AT) Polaris DAGOR @@ -3519,6 +3627,7 @@ Polaris DAGOR Polaris DAGOR Polaris DAGOR + Polaris DAGOR Polaris DAGOR (light) @@ -3533,6 +3642,7 @@ Polaris DAGOR (léger) Polaris DAGOR (lehký) Polaris DAGOR (light) + Polaris DAGOR (ligero) LSV Mk. II (M134) @@ -3547,6 +3657,7 @@ LSV Mk. II (M134) LSV Mk. II (M134) LSV Mk. II (M134) + LSV Mk. II (M134) LSV Mk. II (Metis-M) @@ -3561,6 +3672,7 @@ LSV Mk. II (Metis-M) LSV Mk. II (Metis-M) LSV Mk. II (Metis-M) + LSV Mk. II (Metis-M) LSV Mk. II @@ -3575,6 +3687,7 @@ LSV Mk. II LSV Mk. II LSV Mk. II + LSV Mk. II Rooikat 120 @@ -3589,6 +3702,7 @@ Rooikat 120 Rooikat 120 Rooikat 120 + Rooikat 120 Rooikat 120 UP @@ -3603,6 +3717,7 @@ Rooikat 120 UP Rooikat 120 UP Rooikat 120 UP + Rooikat 120 UP T-14 Armata @@ -3617,6 +3732,7 @@ T-14 Armata T-14 Armata T-14 Armata + T-14 Armata T-14K Armata @@ -3631,6 +3747,7 @@ T-14K Armata T-14K Armata T-14K Armata + T-14K Armata Wiesel 2 Ozelot (AA) @@ -3645,6 +3762,7 @@ Wiesel 2 Ozelot (AA) Wiesel 2 Ozelot (AA) Wiesel 2 Ozelot (AA) + Wiesel 2 Ozelot (AA) Wiesel 2 (ATGM) @@ -3659,6 +3777,7 @@ Wiesel 2 (ATGM) Wiesel 2 (ATGM) Wiesel 2 (ATGM) + Wiesel 2 (ATGM) Wiesel 2 (MK20) @@ -3673,6 +3792,7 @@ Wiesel 2 (MK20) Wiesel 2 (MK20) Wiesel 2 (MK20) + Wiesel 2 (MK20) Wiesel 2 RFCV (Radar) @@ -3687,6 +3807,7 @@ Wiesel 2 RFCV (Radar) Wiesel 2 RFCV (Radar) Wiesel 2 RFCV (Radar) + Wiesel 2 RFCV (Radar) Leupold Mark 4 HAMR @@ -3701,6 +3822,7 @@ Leupold Mark 4 HAMR Leupold Mark 4 HAMR Leupold Mark 4 HAMR + Leupold Mark 4 HAMR Leupold Mark 4 HAMR (Khaki) @@ -3715,6 +3837,7 @@ Leupold Mark 4 HAMR (Kaki) Leupold Mark 4 HAMR (Khaki) Leupold Mark 4 HAMR (Haki) + Leupold Mark 4 HAMR (Caqui) Leupold Mark 4 HAMR (2D) @@ -3729,6 +3852,22 @@ Leupold Mark 4 HAMR (2D) Leupold Mark 4 HAMR (2D) Leupold Mark 4 HAMR (2D) + Leupold Mark 4 HAMR (2D) + + + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) + Leupold Mark 4 HAMR (PIP) ELCAN SpecterOS (Tan) @@ -3743,6 +3882,7 @@ ELCAN SpecterOS (Tan) ELCAN SpecterOS (Žlutohnědá) ELCAN SpecterOS (Tan) + ELCAN SpecterOS (Tan) ELCAN SpecterOS (Black) @@ -3757,6 +3897,7 @@ ELCAN SpecterOS (Noire) ELCAN SpecterOS (Černá) ELCAN SpecterOS (Siyah) + ELCAN SpecterOS (Negra) ELCAN SpecterOS (Green Hex) @@ -3770,6 +3911,7 @@ ELCAN SpecterOS (Hex Verte) ELCAN SpecterOS (Zelený Hex) ELCAN SpecterOS (Yeşil Hex) + ELCAN SpecterOS (Verde Hex) ELCAN SpecterOS (2D) @@ -3784,6 +3926,47 @@ ELCAN SpecterOS (2D) ELCAN SpecterOS (2D) ELCAN SpecterOS (2D) + ELCAN SpecterOS (2D) + + + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + ELCAN SpecterOS (PIP) + + + ELCAN SpecterOS (Lush) + ELCAN SpecterOS (Leśny) + ELCAN SpecterOS (緑地) + + + ELCAN SpecterOS (Arid) + ELCAN SpecterOS (Jałowy) + ELCAN SpecterOS (乾燥地帯) + + + ELCAN SpecterOS 7.62 (Black) + ELCAN SpecterOS 7.62 (Czarny) + ELCAN SpecterOS 7.62 (ブラック) + + + ELCAN SpecterOS 7.62 (Lush) + ELCAN SpecterOS 7.62 (Leśny) + ELCAN SpecterOS 7.62 (緑地) + + + ELCAN SpecterOS 7.62 (Arid) + ELCAN SpecterOS 7.62 (Jałowy) + ELCAN SpecterOS 7.62 (乾燥地帯) SIG BRAVO4 / ROMEO3 (Black) @@ -3798,6 +3981,7 @@ SIG BRAVO4 / ROMEO3 (Noire) SIG BRAVO4 / ROMEO3 (Černá) SIG BRAVO4 / ROMEO3 (Siyah) + SIG BRAVO4 / ROMEO3 (Negra) SIG BRAVO4 / ROMEO3 (Khaki) @@ -3812,6 +3996,7 @@ SIG BRAVO4 / ROMEO3 (Kaki) SIG BRAVO4 / ROMEO3 (Khaki) SIG BRAVO4 / ROMEO3 (Haki) + SIG BRAVO4 / ROMEO3 (Caqui) SIG BRAVO4 / ROMEO3 (Sand) @@ -3826,6 +4011,7 @@ SIG BRAVO4 / ROMEO3 (Beige) SIG BRAVO4 / ROMEO3 (Písková) SIG BRAVO4 / ROMEO3 (Kum) + SIG BRAVO4 / ROMEO3 (Arena) Nightforce NXS @@ -3839,6 +4025,7 @@ Nightforce NXS Nightforce NXS Nightforce NXS + Nightforce NXS Nightforce NXS (Green Hex) @@ -3852,6 +4039,7 @@ Nightforce NXS (Hex Verte) Nightforce NXS (Zelený Hex) Nightforce NXS (Yeşil Hex) + Nightforce NXS (Verde Hex) Nightforce NXS (Jungle) @@ -3866,6 +4054,7 @@ Nightforce NXS (Jungle) Nightforce NXS (Džungle) Nightforce NXS (Orman) + Nightforce NXS (Jungla) Nightforce NXS (2D) @@ -3879,6 +4068,21 @@ Nightforce NXS (2D) Nightforce NXS (2D) Nightforce NXS (2D) + Nightforce NXS (2D) + + + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) + Nightforce NXS (PIP) US Optics MR-10 (Black) @@ -3892,6 +4096,7 @@ US Optics MR-10 (Noire) US Optics MR-10 (Černá) US Optics MR-10 (Siyah) + US Optics MR-10 (Negra) US Optics MR-10 (Khaki) @@ -3905,6 +4110,7 @@ US Optics MR-10 (Kaki) US Optics MR-10 (Khaki) US Optics MR-10 (Haki) + US Optics MR-10 (Caqui) US Optics MR-10 (Sand) @@ -3918,6 +4124,7 @@ US Optics MR-10 (Beige) US Optics MR-10 (Písková) US Optics MR-10 (Kum) + US Optics MR-10 (Arena) KAHLES Helia (Black) @@ -3931,6 +4138,7 @@ KAHLES Helia (Noire) KAHLES Helia (Černá) KAHLES Helia (Siyah) + KAHLES Helia (Negra) KAHLES Helia (Hex) @@ -3944,6 +4152,7 @@ KAHLES Helia (Hex) KAHLES Helia (Hex) KAHLES Helia (Hex) + KAHLES Helia (Hex) KAHLES Helia (Old) @@ -3957,6 +4166,7 @@ KAHLES Helia (Usée) KAHLES Helia (Stará) KAHLES Helia (Eski) + KAHLES Helia (Vieja) KAHLES Helia (Tan) @@ -3970,6 +4180,7 @@ KAHLES Helia (Tan) KAHLES Helia (Žlutohnědá) KAHLES Helia (Tan) + KAHLES Helia (Tan) Burris XTR II @@ -3983,6 +4194,7 @@ Burris XTR II Burris XTR II Burris XTR II + Burris XTR II Burris XTR II (Green Hex) @@ -3996,6 +4208,17 @@ Burris XTR II (Hex Verte) Burris XTR II (Zelený Hex) Burris XTR II (Yeşil Hex) + Burris XTR II (Verde Hex) + + + Burris XTR II (Old) + Burris XTR II (Stary) + Burris XTR II (使い古し) + + + Burris XTR II (ASP-1 Kir) + Burris XTR II (ASP-1 Kir) + Burris XTR II (ASP-1 Kir) EOTech XPS3 (Tan) @@ -4010,6 +4233,7 @@ EOTech XPS3 (Tan) EOTech XPS3 (Žlutohnědá) EOTech XPS3 (Tan) + EOTech XPS3 (Tan) EOTech XPS3 (Black) @@ -4024,6 +4248,7 @@ EOTech XPS3 (Noire) EOTech XPS3 (Černá) EOTech XPS3 (Siyah) + EOTech XPS3 (Negra) EOTech XPS3 (Khaki) @@ -4038,6 +4263,17 @@ EOTech XPS3 (Kaki) EOTech XPS3 (Khaki) EOTech XPS3 (Haki) + EOTech XPS3 (Caqui) + + + EOTech XPS3 (Lush) + EOTech XPS3 (Leśny) + EOTech XPS3 (緑地) + + + EOTech XPS3 (Arid) + EOTech XPS3 (Jałowy) + EOTech XPS3 (乾燥地帯) EOTech XPS3 SMG (Tan) @@ -4052,6 +4288,7 @@ EOTech XPS3 SMG (Tan) EOTech XPS3 SMG (Žlutohnědá) EOTech XPS3 SMG (Tan) + EOTech XPS3 SMG (Tan) EOTech XPS3 SMG (Black) @@ -4066,6 +4303,7 @@ EOTech XPS3 SMG (Noire) EOTech XPS3 SMG (Černá) EOTech XPS3 SMG (Siyah) + EOTech XPS3 SMG (Negra) EOTech XPS3 SMG (Khaki) @@ -4080,6 +4318,7 @@ EOTech XPS3 SMG (Kaki) EOTech XPS3 SMG (Khaki) EOTech XPS3 SMG (Hakii) + EOTech XPS3 SMG (Caqui) IOR-Valdada Pitbull 2 @@ -4093,6 +4332,7 @@ IOR-Valdada Pitbull 2 IOR-Valdada Pitbull 2 IOR-Valdada Pitbull 2 + IOR-Valdada Pitbull 2 IOR-Valdada Pitbull 2 (2D) @@ -4106,6 +4346,21 @@ IOR-Valdada Pitbull 2 (2D) IOR-Valdada Pitbull 2 (2D) IOR-Valdada Pitbull 2 (2D) + IOR-Valdada Pitbull 2 (2D) + + + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada ピットブル 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) + IOR-Valdada Pitbull 2 (PIP) Burris FastFire 2 @@ -4119,13 +4374,14 @@ Burris FastFire 2 Burris FastFire 2 Burris FastFire 2 + Burris FastFire 2 C-More Railway (Red) C-More Railway (Rot) C-More Railway (紅色) C-More Railway (红色) - C-More レイルウェイ (赤) + C-More レイルウェイ (レッド) C-More Railway (Rosso) C-More Railway (Czerwony) C-More Railway (Красный) @@ -4133,13 +4389,14 @@ C-More Railway (Rouge) C-More Railway (Červený) C-More Railway (Kırmızı) + C-More Railway (Roja) C-More Railway (Green) C-More Railway (Grün) C-More Railway (綠色) C-More Railway (绿色) - C-More レイルウェイ (緑) + C-More レイルウェイ (グリーン) C-More Railway (Verde) C-More Railway (Zielony) C-More Railway (Зеленый) @@ -4147,13 +4404,14 @@ C-More Railway (Verte) C-More Railway (Zelený) C-More Railway (Yeşil) + C-More Railway (Verde) C-More Railway SMG (Red) C-More Railway SMG (Rot) C-More Railway SMG (紅色) C-More Railway SMG (红色) - C-More レイルウェイ SMG (赤) + C-More レイルウェイ SMG (レッド) C-More Railway SMG (Rosso) C-More Railway SMG (Czerwony) C-More Railway SMG (Красный) @@ -4161,13 +4419,14 @@ C-More Railway SMG (Rouge) C-More Railway SMG (Červený) C-More Railway SMG (Kırmızı) + C-More Railway SMG (Roja) C-More Railway SMG (Green) C-More Railway SMG (Grün) C-More Railway SMG (綠色) C-More Railway SMG (绿色) - C-More レイルウェイ SMG (緑) + C-More レイルウェイ SMG (グリーン) C-More Railway SMG (Verde) C-More Railway SMG (Zielony) C-More Railway SMG (Зеленый) @@ -4175,6 +4434,7 @@ C-More Railway SMG (Verte) C-More Railway SMG (Zelený) C-More Railway SMG (Yeşil) + C-More Railway SMG (Verde) P90 TR (Black) @@ -4199,7 +4459,7 @@ P90 TR (Kaki) P90 TR (Caqui) P90 TR (Хаки) - P90 TR (khaki) + P90 TR (Khaki) P90 TR (Khaki) P90 TR (Khaki) P90 TR (Khaki) @@ -4267,7 +4527,7 @@ P90 (Kaki) P90 (Caqui) P90 (Хаки) - P90 (khaki) + P90 (Khaki) P90 (Khaki) P90 (Khaki) P90 (Khaki) @@ -4335,7 +4595,7 @@ PS90 TR (Kaki) PS90 TR (Caqui) PS90 TR (Хаки) - PS90 TR (khaki) + PS90 TR (Khaki) PS90 TR (Khaki) PS90 TR (Khaki) PS90 TR (Khaki) @@ -4403,7 +4663,7 @@ PS90 (Kaki) PS90 (Caqui) PS90 (Хаки) - PS90 (khaki) + PS90 (Khaki) PS90 (Khaki) PS90 (Khaki) PS90 (Khaki) @@ -4767,7 +5027,7 @@ MSBS Grot MSBS Grot MSBS Grot - MSBS Grot + MSBS グロート MSBS Grot MSBS Grot @@ -4784,7 +5044,7 @@ MSBS Grot (Preto) MSBS Grot (검정) MSBS Grot(黑色) - MSBS Grot(ブラック) + MSBS グロート (ブラック) MSBS Grot (Siyah) MSBS Grot (Fekete) @@ -4801,7 +5061,7 @@ MSBS Grot (Camo) MSBS Grot (위장) MSBS Grot(迷彩) - MSBS Grot (カモフラージュ) + MSBS グロート (カモフラージュ) MSBS Grot (Kamuflaj) MSBS Grot (Terepmintás) @@ -4818,7 +5078,7 @@ MSBS Grot (Deserto) MSBS Grot (모래) MSBS Grot(沙色) - MSBS Grot (サンド) + MSBS グロート (サンド) MSBS Grot (Kum) MSBS Grot (Homok) @@ -4835,7 +5095,7 @@ MSBS Grot GL MSBS Grot GL MSBS Grot GL - MSBS Grot GL + MSBS グロート GL MSBS Grot GL MSBS Grot GL @@ -4852,7 +5112,7 @@ MSBS Grot GL (Preto) MSBS Grot GL (검정) MSBS Grot GL(黑色) - MSBS Grot GL(ブラック) + MSBS グロート GL(ブラック) MSBS Grot GL (Siyah) MSBS Grot GL (Fekete) @@ -4869,7 +5129,7 @@ MSBS Grot GL (Camo) MSBS Grot GL (위장) MSBS Grot GL(迷彩) - MSBS Grot GL (カモフラージュ) + MSBS グロート GL (カモフラージュ) MSBS Grot GL (Kamuflaj) MSBS Grot GL (Terepmintás) @@ -4886,7 +5146,7 @@ MSBS Grot GL (Deserto) MSBS Grot GL (모래) MSBS Grot GL(沙色) - MSBS Grot GL (サンド) + MSBS グロート GL (サンド) MSBS Grot GL (Kum) MSBS Grot GL (Homok) @@ -4903,7 +5163,7 @@ MSBS Grot MR MSBS Grot MR MSBS Grot MR - MSBS Grot MR + MSBS グロート MR MSBS Grot MR MSBS Grot MR @@ -4920,7 +5180,7 @@ MSBS Grot MR (Preto) MSBS Grot MR (검정) MSBS Grot MR(黑色) - MSBS Grot MR (ブラック) + MSBS グロート MR (ブラック) MSBS Grot MR (Siyah) MSBS Grot MR (Fekete) @@ -4937,7 +5197,7 @@ MSBS Grot MR (Camo) MSBS Grot MR (위장) MSBS Grot MR(迷彩) - MSBS Grot MR (カモフラージュ) + MSBS グロート MR (カモフラージュ) MSBS Grot MR (Kamuflaj) MSBS Grot MR (Terepmintás) @@ -4954,7 +5214,7 @@ MSBS Grot MR (Deserto) MSBS Grot MR (모래) MSBS Grot MR(沙色) - MSBS Grot MR (サンド) + MSBS グロート MR (サンド) MSBS Grot MR (Kum) MSBS Grot MR (Homok) @@ -4971,7 +5231,7 @@ MSBS Grot SG MSBS Grot SG MSBS Grot SG - MSBS Grot SG + MSBS グロート SG MSBS Grot SG MSBS Grot SG @@ -4988,7 +5248,7 @@ MSBS Grot SG (Preto) MSBS Grot SG (검정) MSBS Grot SG(黑色) - MSBS Grot SG(ブラック) + MSBS グロート SG (ブラック) MSBS Grot SG (Siyah) MSBS Grot SG (Fekete) @@ -5005,7 +5265,7 @@ MSBS Grot SG (Camo) MSBS Grot SG (위장) MSBS Grot SG(迷彩) - MSBS Grot SG (カモフラージュ) + MSBS グロート SG (カモフラージュ) MSBS Grot SG (Kamuflaj) MSBS Grot SG (Terepmintás) @@ -5022,7 +5282,7 @@ MSBS Grot SG (Deserto) MSBS Grot SG (모래) MSBS Grot SG(沙色) - MSBS Grot SG (サンド) + MSBS グロート SG (サンド) MSBS Grot SG (Kum) MSBS Grot SG (Homok) diff --git a/addons/realisticweights/CfgWeapons.hpp b/addons/realisticweights/CfgWeapons.hpp index 47b35410bb..02b44bbcc2 100644 --- a/addons/realisticweights/CfgWeapons.hpp +++ b/addons/realisticweights/CfgWeapons.hpp @@ -1,5 +1,8 @@ class CfgWeapons { - class Rifle_Base_F; + class Rifle; + class Rifle_Base_F: Rifle { + class WeaponSlotsInfo; + }; class Rifle_Long_Base_F: Rifle_Base_F { class WeaponSlotsInfo; }; @@ -112,6 +115,87 @@ class CfgWeapons { }; }; + // - HK416A5 -------------------------------------------------------------- + class arifle_SPAR_01_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 68.8; + }; + }; + class arifle_SPAR_01_GL_base_F: arifle_SPAR_01_base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 96.8; + }; + }; + class arifle_SPAR_02_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 76.9; + }; + }; + + // - HK417A2 -------------------------------------------------------------- + class arifle_SPAR_03_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 104.5; + }; + }; + + // - AK15 - Weights taken from the 2020 AK-15 ----------------------------- + class arifle_AK12_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 82.5; + }; + }; + class arifle_AK12_GL_base_F: arifle_AK12_base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 113.5; + }; + }; + class arifle_AK12U_base_F: arifle_AK12_base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 65; + }; + }; + class arifle_RPK12_base_F: arifle_AK12_base_F { // Estimated difference by comparing RPK to AKM (+1.5kg) + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 115.5; + }; + }; + + // - AKM ------------------------------------------------------------------ + class arifle_AKM_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 67; + }; + }; + + // - AKS-74U -------------------------------------------------------------- + class arifle_AKS_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 60; + }; + }; + + // - MSBS ----------------------------------------------------------------- + class arifle_MSBS65_base_F: Rifle_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 82.7; + }; + }; + class arifle_MSBS65_GL_base_F: arifle_MSBS65_base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 124.5; + }; + }; + class arifle_MSBS65_UBS_base_F: arifle_MSBS65_base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 115.7; + }; + }; + class arifle_MSBS65_Mark_base_F: arifle_MSBS65_base_F { + class WeaponSlotsInfo { + mass = 101; + }; + }; // - LMGs --------------------------------------------------------------------- @@ -129,6 +213,13 @@ class CfgWeapons { }; }; + // - FN Minimi SPW -------------------------------------------------------- + class LMG_03_base_F: Rifle_Long_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 154.4; + }; + }; + // - DMRs --------------------------------------------------------------------- @@ -250,6 +341,27 @@ class CfgWeapons { }; }; + // - RPG-7 ---------------------------------------------------------------- + class launch_RPG7_F: Launcher_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 139; + }; + }; + + // - MAAWS Mk4 ------------------------------------------------------------ + class launch_MRAWS_base_F: Launcher_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 145.5; + }; + }; + + // - Metis-M -------------------------------------------------------------- + class launch_Vorona_base_F: Launcher_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 224.8; + }; + }; + // - Pistols ------------------------------------------------------------------ @@ -323,9 +435,6 @@ class CfgWeapons { // - M14 ------------------------------------------------------------------ class DMR_06_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo; - }; - class srifle_DMR_06_camo_F: DMR_06_base_F { class WeaponSlotsInfo: WeaponSlotsInfo { mass = 92; }; diff --git a/addons/rearm/Cfg3DEN.hpp b/addons/rearm/Cfg3DEN.hpp index 05eb3c05ff..05581e7206 100644 --- a/addons/rearm/Cfg3DEN.hpp +++ b/addons/rearm/Cfg3DEN.hpp @@ -1,5 +1,5 @@ #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) -#define DEFAULT_REARMCARGO GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(defaultSupply),-1) +#define DEFAULT_REARMCARGO GET_NUMBER(configOf _this >> QQGVAR(defaultSupply),-1) class Cfg3DEN { diff --git a/addons/rearm/CfgAmmo.hpp b/addons/rearm/CfgAmmo.hpp index 78151796c0..9ea0290d38 100644 --- a/addons/rearm/CfgAmmo.hpp +++ b/addons/rearm/CfgAmmo.hpp @@ -1,183 +1,183 @@ class CfgAmmo { class BombCore; - class LaserBombCore : BombCore { + class LaserBombCore: BombCore { GVAR(caliber) = 250; // Default caliber for bombs }; class MissileCore; - class MissileBase : MissileCore { + class MissileBase: MissileCore { GVAR(caliber) = 250; // Default caliber for missiles }; - class Missile_AA_04_F : MissileBase { + class Missile_AA_04_F: MissileBase { GVAR(dummy) = QGVAR(Missile_AA_04_F); }; - class Missile_AA_03_F : Missile_AA_04_F { + class Missile_AA_03_F: Missile_AA_04_F { GVAR(dummy) = QGVAR(Missile_AA_03_F); }; - class Rocket_04_HE_F : MissileBase { + class Rocket_04_HE_F: MissileBase { GVAR(caliber) = 70; GVAR(dummy) = QGVAR(Rocket_04_HE_F); }; - class Rocket_03_HE_F : Rocket_04_HE_F { + class Rocket_03_HE_F: Rocket_04_HE_F { GVAR(dummy) = QGVAR(Rocket_03_HE_F); }; - class Rocket_04_AP_F : Rocket_04_HE_F { + class Rocket_04_AP_F: Rocket_04_HE_F { GVAR(dummy) = QGVAR(Rocket_04_AP_F); }; - class Rocket_03_AP_F : Rocket_04_AP_F { + class Rocket_03_AP_F: Rocket_04_AP_F { GVAR(dummy) = QGVAR(Rocket_03_AP_F); }; - class M_PG_AT : MissileBase { + class M_PG_AT: MissileBase { GVAR(caliber) = 70; GVAR(dummy) = QGVAR(M_PG_AT); }; - class Missile_AGM_02_F : MissileBase { + class Missile_AGM_02_F: MissileBase { GVAR(dummy) = QGVAR(Missile_AGM_02_F); }; - class Missile_AGM_01_F : Missile_AGM_02_F { + class Missile_AGM_01_F: Missile_AGM_02_F { GVAR(dummy) = QGVAR(Missile_AGM_01_F); }; class RocketCore; - class RocketBase : RocketCore { + class RocketBase: RocketCore { GVAR(caliber) = 70; // Default caliber for rockets }; - class R_80mm_HE : RocketBase { + class R_80mm_HE: RocketBase { GVAR(caliber) = 80; GVAR(dummy) = QGVAR(R_80mm_HE); }; - class R_60mm_HE : R_80mm_HE { + class R_60mm_HE: R_80mm_HE { GVAR(caliber) = 60; GVAR(dummy) = QGVAR(R_60mm_HE); }; class BulletBase; - class B_19mm_HE : BulletBase { + class B_19mm_HE: BulletBase { GVAR(caliber) = 19; }; - class B_20mm : BulletBase { + class B_20mm: BulletBase { GVAR(caliber) = 20; }; class B_20mm_AP: BulletBase { GVAR(caliber) = 20; }; - class B_25mm : BulletBase { + class B_25mm: BulletBase { GVAR(caliber) = 25; }; - class B_30mm_AP : BulletBase { + class B_30mm_AP: BulletBase { GVAR(caliber) = 30; }; - class B_30mm_HE : B_19mm_HE { + class B_30mm_HE: B_19mm_HE { GVAR(caliber) = 30; }; - class Gatling_30mm_HE_Plane_CAS_01_F : BulletBase { + class Gatling_30mm_HE_Plane_CAS_01_F: BulletBase { GVAR(caliber) = 30; }; - class B_35mm_AA : BulletBase { + class B_35mm_AA: BulletBase { GVAR(caliber) = 35; }; class B_30mm_APFSDS; - class B_40mm_APFSDS : B_30mm_APFSDS { + class B_40mm_APFSDS: B_30mm_APFSDS { GVAR(caliber) = 40; }; - class B_40mm_GPR : B_30mm_HE { + class B_40mm_GPR: B_30mm_HE { GVAR(caliber) = 40; }; class GrenadeBase; - class G_40mm_HE : GrenadeBase { + class G_40mm_HE: GrenadeBase { GVAR(caliber) = 39; }; class ShellBase; - class R_230mm_fly : ShellBase { + class R_230mm_fly: ShellBase { GVAR(dummy) = QGVAR(R_230mm_fly); }; - class Sh_120mm_APFSDS : Shellbase { + class Sh_120mm_APFSDS: Shellbase { GVAR(caliber) = 120; }; - class Sh_105mm_APFSDS : Sh_120mm_APFSDS { + class Sh_105mm_APFSDS: Sh_120mm_APFSDS { GVAR(caliber) = 105; }; - class Sh_125mm_APFSDS : Sh_120mm_APFSDS { + class Sh_125mm_APFSDS: Sh_120mm_APFSDS { GVAR(caliber) = 125; }; - class Sh_120mm_HE : ShellBase { + class Sh_120mm_HE: ShellBase { GVAR(caliber) = 120; }; - class Sh_125mm_HE : Sh_120mm_HE { + class Sh_125mm_HE: Sh_120mm_HE { GVAR(caliber) = 125; }; - class Sh_125mm_HEAT : Sh_125mm_HE { + class Sh_125mm_HEAT: Sh_125mm_HE { GVAR(caliber) = 125; }; - class Sh_105mm_HEAT_MP : Sh_125mm_HEAT { + class Sh_105mm_HEAT_MP: Sh_125mm_HEAT { GVAR(caliber) = 105; }; - class Sh_155mm_AMOS : ShellBase { + class Sh_155mm_AMOS: ShellBase { GVAR(caliber) = 155; }; - class Sh_82mm_AMOS : Sh_155mm_AMOS { + class Sh_82mm_AMOS: Sh_155mm_AMOS { GVAR(caliber) = 82; }; class Sh_82mm_AMOS_LG; - class Sh_155mm_AMOS_LG : Sh_82mm_AMOS_LG { + class Sh_155mm_AMOS_LG: Sh_82mm_AMOS_LG { GVAR(caliber) = 155; }; class ShotDeployBase; - class Smoke_82mm_AMOS_White : ShotDeployBase { + class Smoke_82mm_AMOS_White: ShotDeployBase { GVAR(caliber) = 82; }; class FlareCore; - class Flare_82mm_AMOS_White : FlareCore { + class Flare_82mm_AMOS_White: FlareCore { GVAR(caliber) = 82; }; - class SmokeLauncherAmmo : BulletBase { + class SmokeLauncherAmmo: BulletBase { GVAR(caliber) = 250; }; - class CMflareAmmo : BulletBase { + class CMflareAmmo: BulletBase { GVAR(caliber) = 39; }; class SubmunitionBase; - class Sh_82mm_AMOS_guided : SubmunitionBase { + class Sh_82mm_AMOS_guided: SubmunitionBase { GVAR(caliber) = 82; }; - class Sh_155mm_AMOS_guided : Sh_82mm_AMOS_guided { + class Sh_155mm_AMOS_guided: Sh_82mm_AMOS_guided { GVAR(caliber) = 155; }; - class R_230mm_HE : SubmunitionBase { + class R_230mm_HE: SubmunitionBase { GVAR(caliber) = 230; }; - class Mine_155mm_AMOS_range : SubmunitionBase { + class Mine_155mm_AMOS_range: SubmunitionBase { GVAR(caliber) = 155; }; - class Cluster_155mm_AMOS : SubmunitionBase { + class Cluster_155mm_AMOS: SubmunitionBase { GVAR(caliber) = 155; }; - class Smoke_120mm_AMOS_White : SubmunitionBase { + class Smoke_120mm_AMOS_White: SubmunitionBase { GVAR(caliber) = 155; }; - class AT_Mine_155mm_AMOS_range : SubmunitionBase { + class AT_Mine_155mm_AMOS_range: SubmunitionBase { GVAR(caliber) = 155; }; - class Bo_Mk82 : BombCore { + class Bo_Mk82: BombCore { GVAR(dummy) = QGVAR(Bo_Mk82); }; diff --git a/addons/rearm/CfgEventHandlers.hpp b/addons/rearm/CfgEventHandlers.hpp index 077779a642..a737ccd1f3 100644 --- a/addons/rearm/CfgEventHandlers.hpp +++ b/addons/rearm/CfgEventHandlers.hpp @@ -1,13 +1,13 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; @@ -21,7 +21,7 @@ class Extended_Init_EventHandlers { class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/rearm/CfgMagazines.hpp b/addons/rearm/CfgMagazines.hpp index a509377182..7f70238086 100644 --- a/addons/rearm/CfgMagazines.hpp +++ b/addons/rearm/CfgMagazines.hpp @@ -1,56 +1,56 @@ class CfgMagazines { class CA_Magazine; - class 60Rnd_CMFlareMagazine : CA_Magazine { + class 60Rnd_CMFlareMagazine: CA_Magazine { displayName = CSTRING(Mag_60Rnd_CMFlareMagazine); }; class VehicleMagazine; - class SmokeLauncherMag : VehicleMagazine { + class SmokeLauncherMag: VehicleMagazine { displayName = CSTRING(Mag_SmokeLauncherMag); }; - class SmokeLauncherMag_boat : VehicleMagazine { + class SmokeLauncherMag_boat: VehicleMagazine { displayName = CSTRING(Mag_SmokeLauncherMag); }; - class 1000Rnd_Gatling_30mm_Plane_CAS_01_F : VehicleMagazine { + class 1000Rnd_Gatling_30mm_Plane_CAS_01_F: VehicleMagazine { displayName = CSTRING(Mag_1000Rnd_Gatling_30mm_Plane_CAS_01_F); }; - class 500Rnd_Cannon_30mm_Plane_CAS_02_F : 1000Rnd_Gatling_30mm_Plane_CAS_01_F { + class 500Rnd_Cannon_30mm_Plane_CAS_02_F: 1000Rnd_Gatling_30mm_Plane_CAS_01_F { displayName = CSTRING(Mag_500Rnd_Cannon_30mm_Plane_CAS_02_F); }; - class 2Rnd_Missile_AA_04_F : VehicleMagazine { + class 2Rnd_Missile_AA_04_F: VehicleMagazine { displayName = CSTRING(Mag_2Rnd_Missile_AA_04_F); }; - class 2Rnd_Missile_AA_03_F : 2Rnd_Missile_AA_04_F { + class 2Rnd_Missile_AA_03_F: 2Rnd_Missile_AA_04_F { displayName = CSTRING(Mag_2Rnd_Missile_AA_03_F); }; - class 6Rnd_Missile_AGM_02_F : VehicleMagazine { + class 6Rnd_Missile_AGM_02_F: VehicleMagazine { displayName = CSTRING(Mag_6Rnd_Missile_AGM_02_F); }; - class 4Rnd_Missile_AGM_01_F : 6Rnd_Missile_AGM_02_F { + class 4Rnd_Missile_AGM_01_F: 6Rnd_Missile_AGM_02_F { displayName = CSTRING(Mag_4Rnd_Missile_AGM_01_F); }; - class 7Rnd_Rocket_04_HE_F : VehicleMagazine { + class 7Rnd_Rocket_04_HE_F: VehicleMagazine { displayName = CSTRING(Mag_7Rnd_Rocket_04_HE_F); }; - class 20Rnd_Rocket_03_HE_F : 7Rnd_Rocket_04_HE_F { + class 20Rnd_Rocket_03_HE_F: 7Rnd_Rocket_04_HE_F { displayName = CSTRING(Mag_20Rnd_Rocket_03_HE_F); }; - class 7Rnd_Rocket_04_AP_F : 7Rnd_Rocket_04_HE_F { + class 7Rnd_Rocket_04_AP_F: 7Rnd_Rocket_04_HE_F { displayName = CSTRING(Mag_7Rnd_Rocket_04_AP_F); }; - class 20Rnd_Rocket_03_AP_F : 7Rnd_Rocket_04_AP_F { + class 20Rnd_Rocket_03_AP_F: 7Rnd_Rocket_04_AP_F { displayName = CSTRING(Mag_20Rnd_Rocket_03_AP_F); }; - class 4Rnd_Bomb_04_F : VehicleMagazine { + class 4Rnd_Bomb_04_F: VehicleMagazine { displayName = CSTRING(Mag_4Rnd_Bomb_04_F); }; - class 2Rnd_Bomb_03_F : 4Rnd_Bomb_04_F { + class 2Rnd_Bomb_03_F: 4Rnd_Bomb_04_F { displayName = CSTRING(Mag_2Rnd_Bomb_03_F); }; }; diff --git a/addons/rearm/CfgVehicles.hpp b/addons/rearm/CfgVehicles.hpp index c12ee16066..221b01b249 100644 --- a/addons/rearm/CfgVehicles.hpp +++ b/addons/rearm/CfgVehicles.hpp @@ -143,21 +143,25 @@ class CfgVehicles { }; class ReammoBox_F; - class NATO_Box_Base: ReammoBox_F{}; + class NATO_Box_Base: ReammoBox_F {}; class Box_NATO_AmmoVeh_F: NATO_Box_Base { transportAmmo = 0; GVAR(defaultSupply) = 1200; }; - class EAST_Box_Base: ReammoBox_F{}; + class EAST_Box_Base: ReammoBox_F {}; class Box_East_AmmoVeh_F: EAST_Box_Base { transportAmmo = 0; GVAR(defaultSupply) = 1200; }; - class IND_Box_Base: ReammoBox_F{}; + class IND_Box_Base: ReammoBox_F {}; class Box_IND_AmmoVeh_F: IND_Box_Base { transportAmmo = 0; GVAR(defaultSupply) = 1200; }; + class Box_IND_AmmoOrd_F; + class Box_IDAP_AmmoOrd_F: Box_IND_AmmoOrd_F { + transportAmmo = 0; // not sure why this one has 240 + }; // Dummy Vehicles class ThingX; diff --git a/addons/rearm/README.md b/addons/rearm/README.md index 4d6dc966a1..010e9cf526 100644 --- a/addons/rearm/README.md +++ b/addons/rearm/README.md @@ -3,9 +3,3 @@ ace_rearm The Rearm module introduces ability to rearm vehicles on different realistic levels. -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [GitHawk] (https://github.com/GitHawk) -- [Jonpas] (https://github.com/jonpas) diff --git a/addons/rearm/XEH_postInit.sqf b/addons/rearm/XEH_postInit.sqf index 3da59af9bd..d85104e84f 100644 --- a/addons/rearm/XEH_postInit.sqf +++ b/addons/rearm/XEH_postInit.sqf @@ -2,14 +2,14 @@ GVAR(hardpointGroupsCache) = [] call CBA_fnc_createNamespace; GVAR(configTypesAdded) = []; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_2("settingsInit",GVAR(level),GVAR(supply)); ["LandVehicle", "Init", {_this call FUNC(initSupplyVehicle)}, true, ["StaticWeapon"], true] call CBA_fnc_addClassEventHandler; ["ReammoBox_F", "Init", {_this call FUNC(initSupplyVehicle)}, true, [], true] call CBA_fnc_addClassEventHandler; }] call CBA_fnc_addEventHandler; ["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler; -[QGVAR(initSupplyVehicle), { +[QGVAR(initSupplyVehicle), { TRACE_1("initSupplyVehicle EH",_this); // Warning: this can run before settings are init [FUNC(initSupplyVehicle), _this] call EFUNC(common,runAfterSettingsInit); }] call CBA_fnc_addEventHandler; diff --git a/addons/rearm/functions/fnc_addMagazineToSupply.sqf b/addons/rearm/functions/fnc_addMagazineToSupply.sqf index 1f646e3598..cb9156ef9a 100644 --- a/addons/rearm/functions/fnc_addMagazineToSupply.sqf +++ b/addons/rearm/functions/fnc_addMagazineToSupply.sqf @@ -49,7 +49,7 @@ if (GVAR(supply) == 2) then { private _magazineIdx = -1; { _x params ["_magazine", "_rounds"]; - if ((_magazine isEqualTo _magazineClass)) exitWith { + if (_magazine isEqualTo _magazineClass) exitWith { _magazineIdx = _forEachIndex; }; } forEach _magazineSupply; diff --git a/addons/rearm/functions/fnc_addRearmActions.sqf b/addons/rearm/functions/fnc_addRearmActions.sqf index 480cc90007..86db3eef78 100644 --- a/addons/rearm/functions/fnc_addRearmActions.sqf +++ b/addons/rearm/functions/fnc_addRearmActions.sqf @@ -43,8 +43,8 @@ private _vehicleActions = []; TRACE_2("can add",_x,_magazineHelper); - if (!(_magazineHelper isEqualTo [])) then { - private _icon = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Icon"); + if (_magazineHelper isNotEqualTo []) then { + private _icon = getText(configOf _vehicle >> "Icon"); if !((_icon select [0, 1]) == "\") then { _icon = ""; }; @@ -52,7 +52,7 @@ private _vehicleActions = []; // [Level 0] adds a single action to rearm the entire vic private _action = [ _vehicle, - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"), + getText(configOf _vehicle >> "displayName"), _icon, {_this call FUNC(rearmEntireVehicle)}, {true}, @@ -79,7 +79,7 @@ private _vehicleActions = []; private _action = [ _vehicle, - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName"), + getText(configOf _vehicle >> "displayName"), _icon, {}, {true}, @@ -92,7 +92,7 @@ private _vehicleActions = []; }; } forEach _vehicles; -if (!(_cswCarryMagazines isEqualTo [])) then { +if (_cswCarryMagazines isNotEqualTo []) then { _cswCarryMagazines = _cswCarryMagazines arrayIntersect _cswCarryMagazines; _cswCarryMagazines = _cswCarryMagazines select {[_truck, _x] call FUNC(hasEnoughSupply)}; private _baseAction = [QGVAR(cswTake), "CSW", "", {}, {true}] call EFUNC(interact_menu,createAction); diff --git a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf index 9dbcf463eb..e49729eac7 100644 --- a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf +++ b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf @@ -30,7 +30,7 @@ params ["_vehicle"]; private _magazineInfo = []; // 1.70 pylons -private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; +private _pylonConfigs = configProperties [configOf _vehicle >> "Components" >> "TransportPylonsComponent" >> "Pylons", "isClass _x"]; { private _pylonConfig = _x; @@ -41,14 +41,14 @@ private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf private _pylonMagazine = (getPylonMagazines _vehicle) select (_pylonIndex - 1); // Only care about pylons that have a magazine. - if (!(_pylonMagazine isEqualTo "")) then { + if (_pylonMagazine isNotEqualTo "") then { private _maxRounds = getNumber (configFile >> "CfgMagazines" >> _pylonMagazine >> "count"); private _currentRounds = _vehicle ammoOnPylon _pylonIndex; if (_currentRounds < _maxRounds) then { // getPylonTurret expects 0 based index, and returns driver turret as [-1] - private _pylonTurret = [_vehicle, (_pylonIndex - 1)] call EFUNC(common,getPylonTurret); + private _pylonTurret = [_vehicle, _forEachIndex] call EFUNC(common,getPylonTurret); _magazineInfo pushBack [_pylonMagazine, _pylonTurret, true, _pylonIndex, 1, 1, _maxRounds, [_currentRounds]]; }; @@ -58,10 +58,19 @@ private _pylonConfigs = configProperties [configFile >> "CfgVehicles" >> (typeOf private _turrets = [_vehicle] call FUNC(getAllRearmTurrets); { private _turretPath = _x; - private _magazines = [_vehicle, _turretPath] call FUNC(getTurretConfigMagazines); + private _magazineClasses = []; - // _magazines without duplicates - private _magazineClasses = _magazines arrayIntersect _magazines; + if (_vehicle getVariable [QGVAR(scriptedLoadout), false]) then { + { + _x params ["_className", "_turretCurrent"]; + if (_turretPath isEqualTo _turretCurrent) then { + _magazineClasses pushBackUnique _className; + }; + } forEach (magazinesAllTurrets _vehicle); + } else { + _magazineClasses = [_vehicle, _turretPath] call FUNC(getTurretConfigMagazines); + _magazineClasses = _magazineClasses arrayIntersect _magazineClasses; + }; { private _magazineClass = _x; diff --git a/addons/rearm/functions/fnc_getSupplyCount.sqf b/addons/rearm/functions/fnc_getSupplyCount.sqf index 892764b76f..87a1dd1ee8 100644 --- a/addons/rearm/functions/fnc_getSupplyCount.sqf +++ b/addons/rearm/functions/fnc_getSupplyCount.sqf @@ -25,8 +25,8 @@ if (GVAR(supply) != 1) exitWith { private _supply = _truck getVariable QGVAR(currentSupply); if (isNil "_supply") then { - if (isNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply))) then { - _supply = getNumber (configFile >> "CfgVehicles" >> typeOf _truck >> QGVAR(defaultSupply)); + if (isNumber (configOf _truck >> QGVAR(defaultSupply))) then { + _supply = getNumber (configOf _truck >> QGVAR(defaultSupply)); } else { _supply = 1200; }; diff --git a/addons/rearm/functions/fnc_isSource.sqf b/addons/rearm/functions/fnc_isSource.sqf index 175ab60f8e..c79c78308c 100644 --- a/addons/rearm/functions/fnc_isSource.sqf +++ b/addons/rearm/functions/fnc_isSource.sqf @@ -22,7 +22,7 @@ params [ if ((_target getVariable [QGVAR(currentSupply), 0]) < 0) exitWith {false}; -private _vehCfg = configFile >> "CfgVehicles" >> typeOf _target; +private _vehCfg = configOf _target; private _vanillaCargoConfig = getNumber (_vehCfg >> "transportAmmo"); private _rearmCargoConfig = getNumber (_vehCfg >> QGVAR(defaultSupply)); private _supplyVehicle = _target getVariable [QGVAR(isSupplyVehicle), false]; diff --git a/addons/rearm/functions/fnc_makeSource.sqf b/addons/rearm/functions/fnc_makeSource.sqf index c96c3a214a..36f3fba553 100644 --- a/addons/rearm/functions/fnc_makeSource.sqf +++ b/addons/rearm/functions/fnc_makeSource.sqf @@ -41,7 +41,7 @@ private _currentSupply = if (_addToCurrent) then { _source setVariable [QGVAR(currentSupply), _currentSupply + _rearmCargo, true]; -private _rearmCargoConfig = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(defaultSupply)); +private _rearmCargoConfig = getNumber (configOf _source >> QGVAR(defaultSupply)); // already initialized because this is a config rearm vehicle if (_rearmCargoConfig > 0 || _source getVariable [QGVAR(isSupplyVehicle), false]) exitWith {}; diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf index 6b5a3da12c..779ebf2d51 100644 --- a/addons/rearm/functions/fnc_rearm.sqf +++ b/addons/rearm/functions/fnc_rearm.sqf @@ -43,7 +43,7 @@ private _magazineDisplayName = _magazineClass call FUNC(getMagazineName); [_target, _unit, _turretPath, _magazineCount, _magazineClass, (REARM_COUNT select _idx), _pylon], {(_this select 0) call FUNC(rearmSuccess)}, "", - format [localize LSTRING(RearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _target) >> "displayName"), _magazineDisplayName], + format [localize LSTRING(RearmAction), getText(configOf _target >> "displayName"), _magazineDisplayName], { param [0] params ["_target", "_unit"]; _player distance _target <= GVAR(distance); diff --git a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf index df06d384d4..945a0c0632 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf @@ -25,7 +25,7 @@ TRACE_3("rearmEntireVehicle",_truck,_player,_vehicle); [_truck, _vehicle, _player], {(_this select 0) call FUNC(rearmEntireVehicleSuccess)}, "", - format [localize LSTRING(BasicRearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], + format [localize LSTRING(BasicRearmAction), getText(configOf _vehicle >> "displayName")], { param [0] params ["", "_vehicle", "_player"]; _player distance _vehicle <= GVAR(distance); diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf index 922d25b646..141fe3d60d 100644 --- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf @@ -34,7 +34,7 @@ if (_pylon > 0) exitWith { _vehicle setPylonLoadOut [_pylon, _magazineClass, true, _turretPath]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _rounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; } else { // Fill only at most _numRounds if (_turretPath isEqualTo [-1]) then {_turretPath = [];}; // Convert back to pylon turret format @@ -45,7 +45,7 @@ if (_pylon > 0) exitWith { _vehicle setAmmoOnPylon [_pylon, _newCount]; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _numRounds, getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"), - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; + getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; }; }; @@ -74,7 +74,7 @@ while {((count _ammoCounts) < _maxMagazines) && {_ammoToAdd > 0}} do { _ammoToAdd = _ammoToAdd - _xAdd; _ammoAdded = _ammoAdded + _xAdd; _ammoCounts pushBack _xAdd; - if (!_arrayModified) then { + if (_arrayModified) then { TRACE_1("adding new mag to array",_xAdd); } else { TRACE_1("adding new mag directly",_xAdd); @@ -90,4 +90,4 @@ if (_ammoAdded == 0) exitWith {ERROR_1("could not load any ammo - %1",_this);}; [QEGVAR(common,displayTextStructured), [[LSTRING(Hint_RearmedTriple), _ammoAdded, _magazineClass call FUNC(getMagazineName), -getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; +getText(configOf _vehicle >> "displayName")], 3, _unit], [_unit]] call CBA_fnc_targetEvent; diff --git a/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf b/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf index b6e6c4d0d2..af18dd8c47 100644 --- a/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf +++ b/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf @@ -57,7 +57,7 @@ if (GVAR(supply) == 2) then { private _magazineIdx = -1; { _x params ["_magazine"]; - if ((_magazine isEqualTo _magazineClass)) exitWith { + if (_magazine isEqualTo _magazineClass) exitWith { _magazineIdx = _forEachIndex; }; } forEach _magazineSupply; diff --git a/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf b/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf index a8b83c723a..a999077d57 100644 --- a/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf +++ b/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf @@ -77,7 +77,7 @@ if (!_magLoadedInWeapon) then { { _x params ["_loopMagClass", "_loopAmmoCounts"]; - if (!(_loopMagClass isEqualTo _magazineClass)) then { + if (_loopMagClass isNotEqualTo _magazineClass) then { { _vehicle addMagazineTurret [_loopMagClass, _turretPath, _x]; } forEach _loopAmmoCounts; diff --git a/addons/rearm/functions/fnc_storeAmmo.sqf b/addons/rearm/functions/fnc_storeAmmo.sqf index 18b316d601..f693724323 100644 --- a/addons/rearm/functions/fnc_storeAmmo.sqf +++ b/addons/rearm/functions/fnc_storeAmmo.sqf @@ -33,7 +33,7 @@ private _magazineClass = _attachedDummy getVariable [QGVAR(magazineClass), "#noV [_unit, true, true] call FUNC(dropAmmo); }, "", - format [localize LSTRING(StoreAmmoAction), _magazineClass call FUNC(getMagazineName), getText(configFile >> "CfgVehicles" >> (typeOf _truck) >> "displayName")], + format [localize LSTRING(StoreAmmoAction), _magazineClass call FUNC(getMagazineName), getText(configOf _truck >> "displayName")], {true}, ["isnotinside"] ] call EFUNC(common,progressBar); diff --git a/addons/rearm/functions/fnc_takeAmmo.sqf b/addons/rearm/functions/fnc_takeAmmo.sqf index 1c1e325de8..12678b48c6 100644 --- a/addons/rearm/functions/fnc_takeAmmo.sqf +++ b/addons/rearm/functions/fnc_takeAmmo.sqf @@ -30,7 +30,7 @@ REARM_HOLSTER_WEAPON; private _targetName = if (_vehicle == _unit) then { "CSW" } else { - getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName") + getText(configOf _vehicle >> "displayName") }; [ diff --git a/addons/rearm/initSettings.sqf b/addons/rearm/initSettings.sqf index 3cac2fead7..08494ae582 100644 --- a/addons/rearm/initSettings.sqf +++ b/addons/rearm/initSettings.sqf @@ -7,7 +7,7 @@ [[0,1,2],[LSTRING(RearmSettings_vehicle), LSTRING(RearmSettings_magazine), LSTRING(RearmSettings_caliber)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(level), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(supply), "LIST", @@ -16,7 +16,7 @@ [[0,1,2],[LSTRING(RearmSettings_unlimited), LSTRING(RearmSettings_limited), LSTRING(RearmSettings_magazineSupply)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(supply), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(distance), "SLIDER", @@ -25,4 +25,4 @@ [10, 50, 20, 0], true, // isGlobal {[QGVAR(supply), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/rearm/stringtable.xml b/addons/rearm/stringtable.xml index bed3517f83..4aae2a1aeb 100644 --- a/addons/rearm/stringtable.xml +++ b/addons/rearm/stringtable.xml @@ -13,6 +13,7 @@ Перевооружение Rearme Přezbrojení + Rearmar Rearm Settings @@ -132,6 +133,7 @@ Запас боеприпасов Suprimento de Munições Zásoba munice + Suministro de munición How much ammunition does an ammo truck carry? @@ -146,6 +148,7 @@ Какой боезапас перевозит грузовик с боеприпасами? Quanta munição um caminhão de munições carrega? Kolik munice naklaďák uveze? + ¿Cuánta munición carga el camión de armamento? Unlimited ammo supply @@ -160,6 +163,7 @@ Неограниченный боезапас Suprimento Ilimitado de Munição Nekonečná zásoba + Suministro de munición ilimitado Limited ammo supply based on caliber @@ -174,6 +178,7 @@ Ограниченный боезапас в зависимости от калибра Munição Limitada ao Calibre Konečná zásoba v závislosti na kalibru + Suministro de munición limitado en base al calibre Only specific Magazines @@ -188,6 +193,7 @@ Только определенные магазины Apenas carregadores específicos Pouze specifické zásobníky + Únicamente cargadores específicos Check remaining ammunition @@ -202,6 +208,7 @@ Проверить остаток БК Checar munição restante Zkontrolovat zbývající munici + Comprobar munición restante Checking remaining ammunition... @@ -216,6 +223,7 @@ Проверка остатка боекомплекта... Checando Munição... Kontroluji zbývající munici... + Comprobando munición restante... There is ammunition worth %1 points left. @@ -230,6 +238,7 @@ Остаток единиц БК: %1 Possui munição equivalente a %1 pontos restantes. Zbývá ještě %1 muničních bodů. + Queda munición equivalente a un 1% The following ammunition is left:%1 @@ -244,6 +253,7 @@ Оставшийся боекомплект: %1 A munição que restou: %1 Zbývá následující munice:%1 + Queda la siguiente munición: 1% There is no ammunition left. @@ -258,6 +268,7 @@ Запас боекомплекта пуст Não há munição sobrando. Už nezbývá žádná munice. + No queda munición Rearm @@ -647,6 +658,7 @@ 整裝用貨物 Stock de munitions Sklad munice + Cargar munición The cargo for rearming (-1 disable) @@ -659,6 +671,7 @@ 貨物可以提高多少次整裝(-1為停用) Le quantité de munitions (en points), qui est disponible pour du réarmement (-1 pour désactiver). Objekt pro přezbrojování (-1 pro vypnutí) + Cantidad de munición restante para rearmado (-1 para deshabilitar) Rearm distance @@ -671,6 +684,7 @@ Přezbrojovací vzdálenost Odległość przezbrojenia Дистанция перевооружения + Distancia de rearmado The maximum distance a vehicle can be rearmed at @@ -683,6 +697,7 @@ Maximální vzdálenost na jakou může být vozidlo přezbrojeno Maksymalna odległość na jakiej pojazd może zostać przezbrojony Максимальная дистанция для перевооружения + Máxima distancia a la que un vehículo puede ser rearmado diff --git a/addons/recoil/CfgEventHandlers.hpp b/addons/recoil/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/recoil/CfgEventHandlers.hpp +++ b/addons/recoil/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/recoil/README.md b/addons/recoil/README.md index 0c81cde34a..e6193e3f85 100644 --- a/addons/recoil/README.md +++ b/addons/recoil/README.md @@ -2,10 +2,3 @@ ace_recoil =========== Tweaks weapon recoils and adds camera shake. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/addons/refuel/Cfg3DEN.hpp b/addons/refuel/Cfg3DEN.hpp index 3dbc91c2cf..3383107995 100644 --- a/addons/refuel/Cfg3DEN.hpp +++ b/addons/refuel/Cfg3DEN.hpp @@ -1,8 +1,8 @@ #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) #define GET_1ST_ARRAY(config) (if (isArray (config)) then {getArray (config) select 0} else {[ARR_3(0,0,0)]}) -#define DEFAULT_FUELCARGO GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(fuelCargo),REFUEL_DISABLED_FUEL) -#define DEFAULT_HOOKS GET_1ST_ARRAY(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(hooks)) +#define DEFAULT_FUELCARGO GET_NUMBER(configOf _this >> QQGVAR(fuelCargo),REFUEL_DISABLED_FUEL) +#define DEFAULT_HOOKS GET_1ST_ARRAY(configOf _this >> QQGVAR(hooks)) class Cfg3DEN { class Object { @@ -25,7 +25,7 @@ class Cfg3DEN { tooltip = CSTRING(hooks_edenDesc); property = QGVAR(hooks); control = "EditXYZ"; - expression = QUOTE(if !(_value isEqualTo DEFAULT_HOOKS) then {_this setVariable [ARR_3('%s',[_value],true)]}); + expression = QUOTE(if (_value isNotEqualTo DEFAULT_HOOKS) then {_this setVariable [ARR_3('%s',[_value],true)]}); defaultValue = QUOTE(DEFAULT_HOOKS); condition = "(1-objectBrain)*(1-objectAgent)"; }; diff --git a/addons/refuel/CfgEventHandlers.hpp b/addons/refuel/CfgEventHandlers.hpp index c8d6e21596..dec955b5a8 100644 --- a/addons/refuel/CfgEventHandlers.hpp +++ b/addons/refuel/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index ddee2f0351..41c4f12625 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -485,6 +485,11 @@ class CfgVehicles { GVAR(hooks)[] = {{0, 0.4, -0.5}, {0, -0.4, -0.5}}; GVAR(fuelCargo) = REFUEL_INFINITE_FUEL; }; + class Land_FuelStation_03_pump_F: House_F { // Enoch + transportFuel = 0; //50k + GVAR(hooks)[] = {{0, 0.4, -0.5}, {0, -0.4, -0.5}}; + GVAR(fuelCargo) = REFUEL_INFINITE_FUEL; + }; // Helper object for non-AllVehicles objects class GVAR(helper): Helicopter_Base_F { diff --git a/addons/refuel/README.md b/addons/refuel/README.md index 6e3d226693..96d3a35914 100644 --- a/addons/refuel/README.md +++ b/addons/refuel/README.md @@ -3,9 +3,3 @@ ace_refuel The Refuel module introduces ability to refuel vehicles on different realistic levels. -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [GitHawk] (https://github.com/GitHawk) -- [Jonpas] (https://github.com/jonpas) diff --git a/addons/refuel/XEH_postInit.sqf b/addons/refuel/XEH_postInit.sqf index e6c0ad5b93..14e9b439c9 100644 --- a/addons/refuel/XEH_postInit.sqf +++ b/addons/refuel/XEH_postInit.sqf @@ -86,7 +86,7 @@ _cacheRefuelClasses params [["_staticClasses", [], [[]]], ["_dynamicClasses", [] #ifdef DRAW_HOOKS_POS addMissionEventHandler ["Draw3D", { private _source = cursorObject; - private _cfgPos = getArray (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(hooks)); + private _cfgPos = getArray (configOf _source >> QGVAR(hooks)); private _dynPos = _source getVariable [QGVAR(hooks), []]; { drawIcon3D ["\a3\ui_f\data\gui\cfg\hints\icon_text\group_1_ca.paa", [1,1,1,1], _source modelToWorldVisual _x, 1, 1, 0, format ["Hook %1", _forEachIndex]]; diff --git a/addons/refuel/config.cpp b/addons/refuel/config.cpp index 39765e323c..2697b53a09 100644 --- a/addons/refuel/config.cpp +++ b/addons/refuel/config.cpp @@ -3,8 +3,8 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; - weapons[] = {QGVAR(fuelNozzle)}; + units[] = {QGVAR(fuelNozzle)}; + weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; author = ECSTRING(common,ACETeam); diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index 7c626c2359..f2e38c34a0 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -23,10 +23,10 @@ params [["_unit", objNull, [objNull]], ["_sink", objNull, [objNull]], ["_startin private _bestPosASL = []; -private _bestPosDistance = 1e99; +private _bestPosDistance = 1e38; private _viewPos = _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0,0,1])) vectorMultiply 3); -private _modelVector = _startingPosASL vectorFromTo (AGLtoASL (_sink modelToWorld [0,0,0])); -private _modelVectorLow = _startingPosASL vectorFromTo (AGLtoASL (_sink modelToWorld [0,0,-1])); +private _modelVector = _startingPosASL vectorFromTo (_sink modelToWorldWorld [0,0,0]); +private _modelVectorLow = _startingPosASL vectorFromTo (_sink modelToWorldWorld [0,0,-1]); { private _endPosASL = _x; @@ -50,8 +50,8 @@ private _modelVectorLow = _startingPosASL vectorFromTo (AGLtoASL (_sink modelToW _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0,-0.25,1])) vectorMultiply 3), _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [-0.25,-0.25,1])) vectorMultiply 3), _startingPosASL vectorAdd (((positionCameraToWorld [0,0,0]) vectorFromTo (positionCameraToWorld [0.25,-0.25,1])) vectorMultiply 3), - AGLtoASL (_sink modelToWorld [0,0,0]), // Try old method of just using model center - AGLtoASL (_sink modelToWorld [0,0,-0.5]) + _sink modelToWorldWorld [0,0,0], // Try old method of just using model center + _sink modelToWorldWorld [0,0,-0.5] ]; //Checks (too close to center or can't attach) diff --git a/addons/refuel/functions/fnc_getFuel.sqf b/addons/refuel/functions/fnc_getFuel.sqf index ecba330363..a51b6df411 100644 --- a/addons/refuel/functions/fnc_getFuel.sqf +++ b/addons/refuel/functions/fnc_getFuel.sqf @@ -22,7 +22,7 @@ if (isNull _source) exitWith {0}; private _fuel = _source getVariable QGVAR(currentFuelCargo); if (isNil "_fuel") then { - _fuel = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(fuelCargo)); + _fuel = getNumber (configOf _source >> QGVAR(fuelCargo)); _source setVariable [QGVAR(currentFuelCargo), _fuel, true]; }; diff --git a/addons/refuel/functions/fnc_makeSource.sqf b/addons/refuel/functions/fnc_makeSource.sqf index 7b2179adab..5553e1a906 100644 --- a/addons/refuel/functions/fnc_makeSource.sqf +++ b/addons/refuel/functions/fnc_makeSource.sqf @@ -32,7 +32,7 @@ params [ ]; TRACE_3("makeSource",_source,_fuelCargo,_hooks); -private _fuelCargoConfig = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(fuelCargo)); +private _fuelCargoConfig = getNumber (configOf _source >> QGVAR(fuelCargo)); if ( isNull _source diff --git a/addons/refuel/functions/fnc_onMouseButtonDown.sqf b/addons/refuel/functions/fnc_onMouseButtonDown.sqf index 2111be99e8..184ede22eb 100644 --- a/addons/refuel/functions/fnc_onMouseButtonDown.sqf +++ b/addons/refuel/functions/fnc_onMouseButtonDown.sqf @@ -45,7 +45,7 @@ if (cameraView == "EXTERNAL") then { if ( !isNull _cursorObject && {_distance < REFUEL_NOZZLE_ACTION_DISTANCE} - && {1 == getNumber (configFile >> "CfgVehicles" >> (typeOf _cursorObject) >> QGVAR(canReceive))} + && {1 == getNumber (configOf _cursorObject >> QGVAR(canReceive))} && {isNull (_cursorObject getVariable [QGVAR(nozzle), objNull])} && {!lineIntersects [eyePos _unit, _virtualPosASL, _unit]} ) then { diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf index f3e042cd56..92a654e295 100644 --- a/addons/refuel/functions/fnc_refuel.sqf +++ b/addons/refuel/functions/fnc_refuel.sqf @@ -20,7 +20,7 @@ params [["_unit", objNull, [objNull]], ["_sink", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_connectToPoint", [0,0,0], [[]], 3]]; -private _config = configFile >> "CfgVehicles" >> typeOf _sink; +private _config = configOf _sink; private _rate = getNumber (_config >> QGVAR(flowRate)) * GVAR(rate); private _maxFuel = getNumber (_config >> QGVAR(fuelCapacity)); @@ -74,13 +74,19 @@ if (_maxFuel == 0) then { private _rateTime = _rate * (CBA_missionTime - (_nozzle getVariable [QGVAR(lastTickMissionTime), CBA_missionTime])); _nozzle setVariable [QGVAR(lastTickMissionTime), CBA_missionTime]; - if !(_fuelInSource == REFUEL_INFINITE_FUEL) then { - _fuelInSource = _fuelInSource - _rateTime; + if (_fuelInSource != REFUEL_INFINITE_FUEL) then { + if (_rateTime > _fuelInSource) then { + _rateTime = _fuelInSource; + _fuelInSource = 0; + } else { + _fuelInSource = _fuelInSource - _rateTime; + }; } else { _source setVariable [QGVAR(fuelCounter), (_source getVariable [QGVAR(fuelCounter), 0]) + _rateTime, true]; }; - if (_fuelInSource < 0 && {_fuelInSource > REFUEL_INFINITE_FUEL}) then { + if (_fuelInSource <= 0 && {_fuelInSource != REFUEL_INFINITE_FUEL}) then { _fuelInSource = 0; + [_source, _fuelInSource] call FUNC(setFuel); _finished = true; [LSTRING(Hint_SourceEmpty), 2, _unit] call EFUNC(common,displayTextStructured); }; diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index 9fae9abdab..7922a9cb91 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -38,7 +38,7 @@ TRACE_2("start",_unit,_nozzle); alive _unit && {"" isEqualTo currentWeapon _unit || {_unit call EFUNC(common,isSwimming)}} && {[_unit, objNull, [INTERACT_EXCEPTIONS, "notOnMap"]] call EFUNC(common,canInteractWith)} - && {!("unconscious" isEqualTo toLower animationState _unit)} + && {"unconscious" isNotEqualTo toLower animationState _unit} && {!(_unit getVariable ["ACE_isUnconscious", false])} ) exitWith { TRACE_3("stop dead/weapon/interact/uncon",_unit,alive _unit,currentWeapon _unit); @@ -71,7 +71,7 @@ TRACE_2("start",_unit,_nozzle); END_PFH }; - if !(_unit == vehicle _unit && {_unit isEqualTo ACE_player}) exitWith { + if (_unit == vehicle _unit && {_unit isNotEqualTo ACE_player}) exitWith { TRACE_2("stop vehicle/player",_unit,vehicle _unit); DROP_NOZZLE UNHOLSTER_WEAPON @@ -96,7 +96,7 @@ TRACE_2("start",_unit,_nozzle); getCursorObjectParams params ["_cursorObject", "", "_distance"]; if (!isNull _cursorObject && {_distance < REFUEL_NOZZLE_ACTION_DISTANCE}) then { if ( - 1 == getNumber (configFile >> "CfgVehicles" >> (typeOf _cursorObject) >> QGVAR(canReceive)) + 1 == getNumber (configOf _cursorObject >> QGVAR(canReceive)) && {isNull (_cursorObject getVariable [QGVAR(nozzle), objNull])} ) then { _hintLMB = localize LSTRING(Connect); @@ -107,7 +107,7 @@ TRACE_2("start",_unit,_nozzle); }; private _hint = [_hintLMB, _hintRMB]; - if !(_hint isEqualTo (_unit getVariable [QGVAR(hint), []])) then { + if (_hint isNotEqualTo (_unit getVariable [QGVAR(hint), []])) then { _unit setVariable [QGVAR(hint), _hint]; _hint call EFUNC(interaction,showMouseHint); }; diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 83e38c1be6..7ce0a9d808 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -47,7 +47,7 @@ params [ if !(_source isKindOf "AllVehicles") then { private _helper = QGVAR(helper) createVehicle [0,0,0]; [QEGVAR(common,hideObjectGlobal), [_helper, true]] call CBA_fnc_serverEvent; - if ((getText (configFile >> "CfgVehicles" >> typeOf _source >> "simulation")) isEqualTo "thingX") then { + if ((getText (configOf _source >> "simulation")) isEqualTo "thingX") then { _helper attachTo [_source, [0,0,0]]; } else { _helper setPosWorld (getPosWorld _source); @@ -57,7 +57,7 @@ params [ _nozzle setVariable [QGVAR(helper), _helper, true]; _ropeTarget = _helper; }; - private _attachPos = _source getVariable [QGVAR(hooks), getArray (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(hooks))]; + private _attachPos = _source getVariable [QGVAR(hooks), getArray (configOf _source >> QGVAR(hooks))]; if (_attachPos isEqualTo []) then { _attachPos = [[0,0,0]]; }; diff --git a/addons/refuel/initSettings.sqf b/addons/refuel/initSettings.sqf index b16cff3230..deb6c2adee 100644 --- a/addons/refuel/initSettings.sqf +++ b/addons/refuel/initSettings.sqf @@ -7,7 +7,7 @@ [0,25,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(rate), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(hoseLength), "SLIDER", @@ -16,4 +16,4 @@ [0,50,12,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(hoseLength), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index eb6002c54e..01459451d2 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -303,6 +303,7 @@ Impossible de démarrer la pompe Nepodařilo se zapnout trysku Yakıt pompası başlatılamadı + No se pudo activar la boquilla de la manguera %1 Liters fueled @@ -494,6 +495,7 @@ Volume de la citerne Objem palivové cisterny Doldurma Hız + Volumen del depósito @@ -509,6 +511,7 @@ Quantidade de combustível disponível para abastecer (-1 para desativar, -10 para infinito) Le volume de carburant disponible pour le ravitaillement (-1 pour désactiver, -10 pour quantité illimitée). Objem paliva k tankování (-1 pro vypnutí, -10 pro nekonečno) + El volumen de combustible disponible para llenar (-1 desactivado, -10 es infinito) Refuel Hose attach coordinates @@ -523,6 +526,7 @@ Coords. do encaixe para Mangueira Coordonnées du pistolet Souřadnice pro připojení hadice na palivo + Coordenadas de la boquilla de la manguera Model coordinates used to attach refuel hose @@ -537,6 +541,7 @@ As coordenadas do modelo usado para conectar a mangueira ao veículo Coordonnées du modèle 3D où est attaché le tuyau ravitaillement. Souřadnice na modelu pro připojení hadice na palivo. + Coordenadas del modelo usado para la boquilla de la manguera diff --git a/addons/reload/ACE_Settings.hpp b/addons/reload/ACE_Settings.hpp index 82e9f32637..c08d45babb 100644 --- a/addons/reload/ACE_Settings.hpp +++ b/addons/reload/ACE_Settings.hpp @@ -1,10 +1,5 @@ class ACE_Settings { class GVAR(displayText) { - category = ECSTRING(common,ACEKeybindCategoryWeapons); - typeName = "BOOL"; - isClientSettable = 1; - value = 1; - displayName = CSTRING(SettingDisplayTextName); - description = CSTRING(SettingDisplayTextDesc); + movedToSQF = 1; }; }; diff --git a/addons/reload/CfgActions.hpp b/addons/reload/CfgActions.hpp index a76be64ba3..acadf95385 100644 --- a/addons/reload/CfgActions.hpp +++ b/addons/reload/CfgActions.hpp @@ -1,6 +1,6 @@ class CfgActions { class LoadMagazine; - class LoadEmptyMagazine : LoadMagazine { + class LoadEmptyMagazine: LoadMagazine { showWindow = 0; textDefault = ""; }; diff --git a/addons/reload/CfgEventHandlers.hpp b/addons/reload/CfgEventHandlers.hpp index 8b6f0822ee..13d082c8bf 100644 --- a/addons/reload/CfgEventHandlers.hpp +++ b/addons/reload/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/reload/README.md b/addons/reload/README.md index 6eca14fdd7..4e8031265e 100644 --- a/addons/reload/README.md +++ b/addons/reload/README.md @@ -2,11 +2,3 @@ ace_reload ========== Hides the default reload indicators, making it necessary to manually check your magazine. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/reload/initSettings.sqf b/addons/reload/initSettings.sqf index bf692c20de..23856d6668 100644 --- a/addons/reload/initSettings.sqf +++ b/addons/reload/initSettings.sqf @@ -1,4 +1,13 @@ +[ + QGVAR(displayText), + "CHECKBOX", + [LSTRING(SettingDisplayTextName), LSTRING(SettingDisplayTextDesc)], + localize ELSTRING(common,ACEKeybindCategoryWeapons), + true, + 0 +] call CBA_fnc_addSetting; + [ QGVAR(showCheckAmmoSelf), "CHECKBOX", diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index deecdd5cdd..07d8cd605a 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -43,6 +43,7 @@ Toujours afficher l'action de vérification des munitions Sempre mostrar a opção de checar a própria munição Всегда показывать проверку боеприпасов в меню взаимодействия с собой + Mostrar siempre la autointeracción de comprobar munición Shows check ammo self interaction even when not in static weapons. @@ -54,6 +55,7 @@ Permet d'afficher l'action de vérification des munitions du menu d'interaction personnel, même si le joueur n'utilise pas d'arme statique. Mostra a opção de ver sua própria munição mesmo quando não em armas estáticas. Показывать проверку боеприпасов даже вне стационарного орудия + Mostrar la comprobación de la munición incluso cuando no está en armas estáticas Check Ammo diff --git a/addons/reloadlaunchers/CfgEventHandlers.hpp b/addons/reloadlaunchers/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/reloadlaunchers/CfgEventHandlers.hpp +++ b/addons/reloadlaunchers/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/reloadlaunchers/CfgWeapons.hpp b/addons/reloadlaunchers/CfgWeapons.hpp index 08fbdb76b0..678528502e 100644 --- a/addons/reloadlaunchers/CfgWeapons.hpp +++ b/addons/reloadlaunchers/CfgWeapons.hpp @@ -4,8 +4,13 @@ class CfgWeapons { class launch_Titan_base: Launcher_Base_F { GVAR(enabled) = 1; }; - class launch_RPG32_F: Launcher_Base_F { GVAR(enabled) = 1; }; + class launch_MRAWS_base_F: Launcher_Base_F { + GVAR(enabled) = 1; + }; + class launch_Vorona_base_F: Launcher_Base_F { + GVAR(enabled) = 1; + }; }; diff --git a/addons/reloadlaunchers/README.md b/addons/reloadlaunchers/README.md index 2b6357200b..67b047772a 100644 --- a/addons/reloadlaunchers/README.md +++ b/addons/reloadlaunchers/README.md @@ -2,10 +2,3 @@ ace_reloadlaunchers =========== Add the ability to reload someone else's launcher. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/addons/repair/ACE_Repair.hpp b/addons/repair/ACE_Repair.hpp index 97710940e7..3a3be9213c 100644 --- a/addons/repair/ACE_Repair.hpp +++ b/addons/repair/ACE_Repair.hpp @@ -9,11 +9,11 @@ class ACE_Repair { repairingTime = 10; repairingTimeSelfCoef = 1; items = QGVAR(wheelRepairRequiredItems); - condition = QUOTE(call FUNC(canReplaceWheel)); + condition = QFUNC(canReplaceWheel); itemConsumed = 0; claimObjects[] = {{"ACE_Wheel"}}; - callbackSuccess = QUOTE(call FUNC(doReplaceWheel)); + callbackSuccess = QFUNC(doReplaceWheel); callbackFailure = ""; callbackProgress = ""; @@ -26,17 +26,17 @@ class ACE_Repair { class RemoveWheel: ReplaceWheel { displayName = CSTRING(RemoveWheel); displayNameProgress = CSTRING(RemovingWheel); - condition = QUOTE(call FUNC(canRemove)); - callbackSuccess = QUOTE(call FUNC(doRemoveWheel)); + condition = QFUNC(canRemove); + callbackSuccess = QFUNC(doRemoveWheel); claimObjects[] = {}; }; class MiscRepair: ReplaceWheel { displayName = CSTRING(Repairing); // let's make empty string an auto generated string displayNameProgress = CSTRING(RepairingHitPoint); - condition = QUOTE(call FUNC(canMiscRepair)); + condition = QFUNC(canMiscRepair); requiredEngineer = QGVAR(engineerSetting_Repair); repairingTime = 15; - callbackSuccess = QUOTE(call FUNC(doRepair)); + callbackSuccess = QFUNC(doRepair); items = QGVAR(miscRepairRequiredItems); itemConsumed = QGVAR(consumeItem_ToolKit); claimObjects[] = {}; @@ -44,8 +44,8 @@ class ACE_Repair { class RepairTrack: MiscRepair { displayName = CSTRING(Repairing); displayNameProgress = CSTRING(RepairingHitPoint); - condition = QUOTE(call FUNC(canRepairTrack)); - callbackSuccess = QUOTE(call FUNC(doRepairTrack)); + condition = QFUNC(canRepairTrack); + callbackSuccess = QFUNC(doRepairTrack); requiredEngineer = QGVAR(engineerSetting_Wheel); claimObjects[] = {{"ACE_Track"}}; itemConsumed = 0; @@ -53,16 +53,16 @@ class ACE_Repair { class RemoveTrack: MiscRepair { displayName = CSTRING(RemoveTrack); displayNameProgress = CSTRING(RemovingTrack); - condition = QUOTE(call FUNC(canRemove)); - callbackSuccess = QUOTE(call FUNC(doRemoveTrack)); + condition = QFUNC(canRemove); + callbackSuccess = QFUNC(doRemoveTrack); requiredEngineer = QGVAR(engineerSetting_Wheel); itemConsumed = 0; }; class ReplaceTrack: RemoveTrack { displayName = CSTRING(ReplaceTrack); displayNameProgress = CSTRING(ReplacingTrack); - condition = QUOTE(call FUNC(canReplaceTrack)); - callbackSuccess = QUOTE(call FUNC(doReplaceTrack)); + condition = QFUNC(canReplaceTrack); + callbackSuccess = QFUNC(doReplaceTrack); requiredEngineer = QGVAR(engineerSetting_Wheel); claimObjects[] = {{"ACE_Track"}}; }; @@ -73,7 +73,7 @@ class ACE_Repair { repairLocations[] = {QGVAR(fullRepairLocation)}; repairingTime = 30; condition = "-1 != ((getAllHitPointsDamage _target param [2,[]]) findIf {_x > 0})"; - callbackSuccess = QUOTE(call FUNC(doFullRepair)); + callbackSuccess = QFUNC(doFullRepair); items = QGVAR(fullRepairRequiredItems); itemConsumed = QGVAR(consumeItem_ToolKit); }; diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index 03614b3a2f..d9df86a036 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -1,7 +1,7 @@ #define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) #define DEFAULT_ISENGINEER ([ARR_2(0,1)] select (_this getUnitTrait 'engineer')) -#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(canRepair),0) +#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configOf _this >> QQGVAR(canRepair),0) class ctrlToolbox; @@ -17,7 +17,7 @@ class Cfg3DEN { attributeLoad = "(_this controlsGroupCtrl 100) lbSetCurSel (((_value + 1) min 3) max 0);"; attributeSave = "(lbCurSel (_this controlsGroupCtrl 100)) - 1"; class Controls: Controls { - class Title: Title{}; + class Title: Title {}; class Value: ctrlToolbox { idc = 100; style = "0x02"; diff --git a/addons/repair/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp index 3e47f9f96f..6991392d83 100644 --- a/addons/repair/CfgEventHandlers.hpp +++ b/addons/repair/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index cb9183ba0e..1c9a44d4e5 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -106,6 +106,7 @@ class CfgVehicles { class values { class None { name = "None"; value = 0; default = 1;}; class ToolKit { name = "ToolKit"; value = 1; }; + class gm_repairkit_01 { name = "GM Repair Kit"; value = 1; }; }; }; }; @@ -377,13 +378,14 @@ class CfgVehicles { // can not take damage individually though, because of limitations of the thingX simulation type class HitPoints { class HitBody { - armor = 0.6; + armor = 1; material = -1; name = "mat_rim"; visual = "mat_rim"; passThrough = 1; radius = 0.1; explosionShielding = 1; + minimalHit = 1; }; }; diff --git a/addons/repair/README.md b/addons/repair/README.md index 5cf5e8f89a..28762b44ac 100644 --- a/addons/repair/README.md +++ b/addons/repair/README.md @@ -2,12 +2,3 @@ ace_repair =========== Adds repair system. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [Glowbal](https://github.com/Glowbal) -- [Jonpas](https://github.com/jonpas) diff --git a/addons/repair/dev/draw_showRepairInfo.sqf b/addons/repair/dev/draw_showRepairInfo.sqf index 3a1f0c8d0f..b5516d6b98 100644 --- a/addons/repair/dev/draw_showRepairInfo.sqf +++ b/addons/repair/dev/draw_showRepairInfo.sqf @@ -5,7 +5,7 @@ addMissionEventHandler ["Draw3D", { if !((cursorObject isKindOf "Car") || (cursorObject isKindOf "Tank") || (cursorObject isKindOf "Air")) exitWith {}; - private _config = configFile >> "CfgVehicles" >> (typeOf cursorObject); + private _config = configOf cursorObject; private _hitpointPositions = getArray (_config >> QGVAR(hitpointPositions)); private _hitpointGroups = getArray (_config >> QGVAR(hitpointGroups)); diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 96eff28d4a..b3d2bb91df 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -37,7 +37,7 @@ private _hitPointsAddedAmount = []; private _processedSelections = []; private _icon = ["a3\ui_f\data\igui\cfg\actions\repair_ca.paa", "#FFFFFF"]; -private _vehCfg = configFile >> "CfgVehicles" >> _type; +private _vehCfg = configOf _vehicle; // Custom position can be defined via config for associated hitpoint private _hitpointPositions = getArray (_vehCfg >> QGVAR(hitpointPositions)); // Associated hitpoints can be grouped via config to produce a single repair action @@ -92,14 +92,20 @@ private _turretPaths = ((fullCrew [_vehicle, "gunner", true]) + (fullCrew [_vehi { private _turretHitpointCfg = ([_vehCfg, _x] call CBA_fnc_getTurret) >> "HitPoints"; private _hitpointsCfg = "configName _x == _hitpoint" configClasses _turretHitpointCfg; - if (!(_hitpointsCfg isEqualTo [])) exitWith { + if (_hitpointsCfg isNotEqualTo []) exitWith { TRACE_2("turret hitpoint configFound",_hitpoint,_x); - // only do turret hitpoints for now or we get some weird stuff - if ((_hitpoint in ["hitturret", "hitgun"]) || {(getNumber (_hitpointsCfg # 0 >> "isGun")) == 1} || {(getNumber (_hitpointsCfg # 0 >> "isTurret")) == 1}) then { + // only do turret hitpoints or stuff linked to visuals for now or we apparently get some weird stuff + if ((_hitpoint in ["hitturret", "hitgun"]) || {(getNumber (_hitpointsCfg # 0 >> "isGun")) == 1} || {(getNumber (_hitpointsCfg # 0 >> "isTurret")) == 1} || {(getText (_hitpointsCfg # 0 >> "visual")) != ""}) then { _armorComponent = getText (_hitpointsCfg # 0 >> "armorComponent"); }; }; } forEach _turretPaths; + if (_armorComponent == "") then { + private _hitpointsCfg = "configName _x == _hitpoint" configClasses (_vehCfg >> "HitPoints"); + if ((getText (_hitpointsCfg # 0 >> "visual")) != "") then { + _armorComponent = getText (_hitpointsCfg # 0 >> "armorComponent"); + }; + }; if (_armorComponent != "") then { INFO_3("%1: %2 no selection: using armorComponent %3",_type,_hitpoint,_armorComponent); }; }; if ((_selection == "") && {_armorComponent == ""}) exitWith { TRACE_3("Skipping no selection OR armor component",_hitpoint,_forEachIndex,_selection); }; diff --git a/addons/repair/functions/fnc_canMiscRepair.sqf b/addons/repair/functions/fnc_canMiscRepair.sqf index b9fe842a19..2fc4c2b3d6 100644 --- a/addons/repair/functions/fnc_canMiscRepair.sqf +++ b/addons/repair/functions/fnc_canMiscRepair.sqf @@ -24,7 +24,7 @@ params ["_caller", "_target", "_hitPointIndex"]; if !([_caller, _target, ["isNotDragging", "isNotCarrying", "isNotSwimming", "isNotOnLadder"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Get hitpoint groups if available -private _hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hitpointGroups); +private _hitpointGroupConfig = configOf _target >> QGVAR(hitpointGroups); private _hitpointGroup = []; if (isArray _hitpointGroupConfig) then { private _hitPointClassname = _allHitPoints select _hitPointIndex; diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index 2b9ac71364..e6873649cb 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -95,7 +95,7 @@ if (!_return) exitWith {false}; //Check that there are required objects nearby private _requiredObjects = getArray (_config >> "claimObjects"); -if (!(_requiredObjects isEqualTo [])) then { +if (_requiredObjects isNotEqualTo []) then { private _objectsAvailable = [_caller, 5, _requiredObjects] call FUNC(getClaimObjects); if (_objectsAvailable isEqualTo []) then { TRACE_2("Missing Required Objects",_requiredObjects,_objectsAvailable); diff --git a/addons/repair/functions/fnc_doRepair.sqf b/addons/repair/functions/fnc_doRepair.sqf index c17858d8b3..1b6f497d8e 100644 --- a/addons/repair/functions/fnc_doRepair.sqf +++ b/addons/repair/functions/fnc_doRepair.sqf @@ -39,7 +39,7 @@ if (_hitPointNewDamage < _hitPointCurDamage) then { }; // Get hitpoint groups if available -private _hitpointGroupConfig = configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(hitpointGroups); +private _hitpointGroupConfig = configOf _vehicle >> QGVAR(hitpointGroups); if (isArray _hitpointGroupConfig) then { // Retrieve hitpoint subgroup if current hitpoint is main hitpoint of a group { diff --git a/addons/repair/functions/fnc_getClaimObjects.sqf b/addons/repair/functions/fnc_getClaimObjects.sqf index a654952417..2348cd82ce 100644 --- a/addons/repair/functions/fnc_getClaimObjects.sqf +++ b/addons/repair/functions/fnc_getClaimObjects.sqf @@ -24,22 +24,17 @@ private _return = []; { private _requiredList = _x; //eg ["ace_track", "ace_track"] - private _ableToAquire = []; //will be array of ojbects + private _ableToAquire = []; //will be array of objects { - private _nearObjects = nearestObjects [_unit, [_x], _maxRange]; - private _canClaimObject = objNull; + private _nearObjects = _unit nearEntities [_x, _maxRange]; { - if ((!(_x in _ableToAquire)) - && {[_unit, _x, ["isNotDragging", "isNotCarrying", "isNotOnLadder"]] call EFUNC(common,canInteractWith)} - &&{(damage _x) < 1} - ) exitWith { _canClaimObject = _x; }; + if (!(_x in _ableToAquire) && {(_x getVariable [QEGVAR(common,owner), objNull]) in [objNull, _unit]}) exitWith { // skip claimed objects + _ableToAquire pushBack _x + }; } forEach _nearObjects; - if (isNull _canClaimObject) exitWith {}; - _ableToAquire pushBack _canClaimObject; - } forEach _x; + } forEach _requiredList; TRACE_2("Check required equals available",_requiredList,_ableToAquire); if ((count _ableToAquire) == (count _requiredList)) exitWith {_return = _ableToAquire}; - false -} count _objectsToClaim; +} forEach _objectsToClaim; _return diff --git a/addons/repair/functions/fnc_getPostRepairDamage.sqf b/addons/repair/functions/fnc_getPostRepairDamage.sqf index d8ed7d3804..cf0ff923bd 100644 --- a/addons/repair/functions/fnc_getPostRepairDamage.sqf +++ b/addons/repair/functions/fnc_getPostRepairDamage.sqf @@ -21,7 +21,7 @@ TRACE_1("params",_unit); //If in facility or near vehicle then complete repair of hitpoint: if (([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)})) exitWith {0}; -private _class = _unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer")]; +private _class = _unit getVariable ["ACE_IsEngineer", getNumber (configOf _unit >> "engineer")]; //If advanced or more qualified than min, then use engineer threshold: if ((_class isEqualTo 2) || {[_unit, GVAR(engineerSetting_Repair) + 1] call FUNC(isEngineer)}) exitWith { (GVAR(repairDamageThreshold_Engineer) min GVAR(repairDamageThreshold)) diff --git a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf index fe072859b2..9a5d32fdd9 100644 --- a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf +++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf @@ -20,7 +20,7 @@ params ["_vehicle"]; TRACE_1("params",_vehicle); // get the vehicles wheel config -private _wheels = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Wheels"; +private _wheels = configOf _vehicle >> "Wheels"; // exit with nothing if the vehicle has no wheels class if !(isClass _wheels) exitWith {TRACE_1("No Wheels",_wheels); [[],[]]}; diff --git a/addons/repair/functions/fnc_isEngineer.sqf b/addons/repair/functions/fnc_isEngineer.sqf index 6a80b1012e..061c5addb1 100644 --- a/addons/repair/functions/fnc_isEngineer.sqf +++ b/addons/repair/functions/fnc_isEngineer.sqf @@ -25,4 +25,11 @@ private _class = _unit getVariable ["ACE_IsEngineer", _unit getUnitTrait "engine if (_class isEqualType false) then {_class = [0, 1] select _class}; TRACE_3("isEngineer",_unit,_engineerN,_class); -_class >= _engineerN; +if (_class >= _engineerN) exitWith {true}; +if (!GVAR(locationsBoostTraining)) exitWith {false}; + +if ([_unit] call FUNC(isInRepairFacility) || {[_unit] call FUNC(isNearRepairVehicle)}) then { + _class = _class + 1; // Boost engineer training by one: untrained becomes engineer, engineer becomes advanced engineer +}; + +_class >= _engineerN diff --git a/addons/repair/functions/fnc_isInRepairFacility.sqf b/addons/repair/functions/fnc_isInRepairFacility.sqf index dcbd141fb7..1693297494 100644 --- a/addons/repair/functions/fnc_isInRepairFacility.sqf +++ b/addons/repair/functions/fnc_isInRepairFacility.sqf @@ -23,7 +23,7 @@ private _isInBuilding = false; private _checkObject = { if ( - _x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0 + _x getVariable ["ACE_isRepairFacility", getNumber (configOf _x >> QGVAR(canRepair))] > 0 && {!(_x isKindOf "AllVehicles")} // check if it's not repair vehicle && {alive _x} ) exitWith { diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index 6e7ddcab27..dd2f69f34c 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -21,5 +21,5 @@ TRACE_1("params",_vehicle); if (_vehicle isKindOf "CAManBase") exitWith {false}; // Value can be integer or boolean -private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canRepair))]; +private _value = _vehicle getVariable ["ACE_isRepairVehicle", getNumber (configOf _vehicle >> QGVAR(canRepair))]; _value in [1, true] // return diff --git a/addons/repair/functions/fnc_normalizeHitPoints.sqf b/addons/repair/functions/fnc_normalizeHitPoints.sqf index fb07147a6a..aef2b7ae21 100644 --- a/addons/repair/functions/fnc_normalizeHitPoints.sqf +++ b/addons/repair/functions/fnc_normalizeHitPoints.sqf @@ -23,7 +23,7 @@ if !(local _vehicle) exitWith {ERROR_1("Vehicle Not Local %1", _vehicle);}; (getAllHitPointsDamage _vehicle) params [["_allHitPoints", []]]; -private _config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints"; +private _config = configOf _vehicle >> "HitPoints"; private _realHitPoints = []; private _dependentHitPoints = []; @@ -46,9 +46,11 @@ TRACE_2("",_realHitPoints,_dependentHitPoints); if (_dependentHitPoints isEqualTo []) exitWith {}; -// Define global variables -Total = damage _vehicle; +// Define global variables and save original values +private _savedGlobals = [["total", total]]; +total = damage _vehicle; { + _savedGlobals pushBack [_x, missionNamespace getVariable _x]; missionNamespace setVariable [_x, _vehicle getHitPointDamage _x]; } forEach _realHitPoints; @@ -58,3 +60,8 @@ Total = damage _vehicle; TRACE_2("setting depend hitpoint", _x, _damage); _vehicle setHitPointDamage [_x, _damage]; } forEach _dependentHitPoints; + +// Restore global variables +{ + missionNamespace setVariable _x; +} forEach _savedGlobals; diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 1c0707f7ed..12cc2c3946 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -99,7 +99,7 @@ if (!("All" in _repairLocations)) then { private _requiredObjects = getArray (_config >> "claimObjects"); private _claimObjectsAvailable = []; -if (!(_requiredObjects isEqualTo [])) then { +if (_requiredObjects isNotEqualTo []) then { _claimObjectsAvailable = [_caller, 5, _requiredObjects] call FUNC(getClaimObjects); if (_claimObjectsAvailable isEqualTo []) then { TRACE_2("Missing Required Objects",_requiredObjects,_claimObjectsAvailable); @@ -135,8 +135,12 @@ if (_consumeItems > 0) then { private _callbackProgress = getText (_config >> "callbackProgress"); if (_callbackProgress == "") then { _callbackProgress = { - (_this select 0) params ["", "_target"]; - (alive _target) && {(abs speed _target) < 1} // make sure vehicle doesn't drive off + (_this select 0) params ["_caller", "_target", "", "", "", "", "_claimObjectsAvailable"]; + ( + (alive _target) && + {(abs speed _target) < 1} && // make sure vehicle doesn't drive off + {_claimObjectsAvailable findIf {!alive _x || {_x getVariable [QEGVAR(common,owner), objNull] isNotEqualTo _caller}} == -1} // make sure claim objects are still available + ) }; } else { if (isNil _callbackProgress) then { @@ -176,12 +180,12 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { }; }; -private _soundPosition = AGLToASL (_caller modelToWorldVisual (_caller selectionPosition "RightHand")); +private _soundPosition = _caller modelToWorldVisualWorld (_caller selectionPosition "RightHand"); ["Acts_carFixingWheel", _soundPosition, nil, 50] call EFUNC(common,playConfigSound3D); // Get repair time private _repairTime = [ - configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(repairTimes) >> configName _config, + configOf _target >> QGVAR(repairTimes) >> configName _config, "number", -1 ] call CBA_fnc_getConfigEntry; diff --git a/addons/repair/functions/fnc_setDamage.sqf b/addons/repair/functions/fnc_setDamage.sqf index ba51c22c0d..13549ca54d 100644 --- a/addons/repair/functions/fnc_setDamage.sqf +++ b/addons/repair/functions/fnc_setDamage.sqf @@ -6,6 +6,7 @@ * Arguments: * 0: Local Vehicle to Damage * 1: Total Damage + # 2: Use destruction effects * * Return Value: * None @@ -16,7 +17,7 @@ * Public: No */ -params ["_vehicle", "_damage"]; +params ["_vehicle", "_damage", ["_useEffects", false]]; TRACE_2("params",_vehicle,_damage); // can't execute all commands if the vehicle isn't local. exit here. @@ -31,7 +32,7 @@ if (_damageDisabled) then { _vehicle allowDamage true; }; -_vehicle setDamage _damage; +_vehicle setDamage [_damage, _useEffects]; // restore original hitpoint damage values { diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf index 0e8a805689..197918ffe3 100644 --- a/addons/repair/functions/fnc_setHitPointDamage.sqf +++ b/addons/repair/functions/fnc_setHitPointDamage.sqf @@ -8,7 +8,7 @@ * 0: Local Vehicle to Damage * 1: Selected hitpoint INDEX * 2: Total Damage - * 3: Skip destruction effects + * 3: Use destruction effects * * Return Value: * None @@ -19,7 +19,7 @@ * Public: No */ -params ["_vehicle", "_hitPointIndex", "_hitPointDamage", ["_useEffects", true]]; +params ["_vehicle", "_hitPointIndex", "_hitPointDamage", ["_useEffects", false]]; TRACE_4("params",_vehicle,typeOf _vehicle,_hitPointIndex,_hitPointDamage); // can't execute all commands if the vehicle isn't local. exit here. @@ -44,7 +44,7 @@ private _hitPointDamageRepaired = 0; //positive for repairs : newSum = (oldSum - if ((!isNil {_vehicle getHit _selectionName}) && {_x != ""}) then { _realHitpointCount = _realHitpointCount + 1; - if ((((toLower _x) find "glass") == -1) && {(getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then { + if ((((toLower _x) find "glass") == -1) && {(getText (configOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then { _hitPointDamageSumOld = _hitPointDamageSumOld + (_allHitPointDamages select _forEachIndex); if (_forEachIndex == _hitPointIndex) then { _hitPointDamageRepaired = (_allHitPointDamages select _forEachIndex) - _hitPointDamage; diff --git a/addons/repair/initSettings.sqf b/addons/repair/initSettings.sqf index 38e9e19e97..5f2f98a763 100644 --- a/addons/repair/initSettings.sqf +++ b/addons/repair/initSettings.sqf @@ -5,7 +5,7 @@ true, // default value false, // isGlobal {[QGVAR(displayTextOnRepair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(engineerSetting_repair), "LIST", @@ -14,7 +14,7 @@ [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],1], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(engineerSetting_repair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(engineerSetting_wheel), "LIST", @@ -23,7 +23,7 @@ [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(engineerSetting_wheel), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(repairDamageThreshold), "SLIDER", @@ -32,7 +32,7 @@ [0,1,0.6,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(repairDamageThreshold), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(repairDamageThreshold_engineer), "SLIDER", @@ -41,7 +41,7 @@ [0,1,0.4,2], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(repairDamageThreshold_engineer), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(consumeItem_toolKit), "LIST", // fnc_repair expects number @@ -50,7 +50,16 @@ [[0,1],[ELSTRING(common,No), ELSTRING(common,Yes)],0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(consumeItem_toolKit), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(locationsBoostTraining), + "CHECKBOX", + [ELSTRING(common,LocationsBoostTraining_DisplayName), LSTRING(LocationsBoostTraining_Description)], + [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], + false, + true +] call CBA_fnc_addSetting; [ QGVAR(fullRepairLocation), "LIST", @@ -59,7 +68,7 @@ [[0,1,2,3,4],[LSTRING(useAnywhere), LSTRING(repairVehicleOnly), LSTRING(repairFacilityOnly), LSTRING(vehicleAndFacility), ELSTRING(common,Disabled)],2], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(fullRepairLocation), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(engineerSetting_fullRepair), "LIST", @@ -68,7 +77,7 @@ [[0,1,2],[LSTRING(engineerSetting_anyone), LSTRING(engineerSetting_EngineerOnly), LSTRING(engineerSetting_AdvancedOnly)],2], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(engineerSetting_fullRepair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(addSpareParts), "CHECKBOX", @@ -78,7 +87,7 @@ true, // isGlobal {[QGVAR(addSpareParts), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(wheelRepairRequiredItems), @@ -87,7 +96,7 @@ [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], [[[], ["ToolKit"]], ["STR_A3_None", "STR_A3_CfgWeapons_Toolkit0"], 0], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(miscRepairRequiredItems), @@ -96,7 +105,7 @@ [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], [[[], ["ToolKit"]], ["STR_A3_None", "STR_A3_CfgWeapons_Toolkit0"], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(fullRepairRequiredItems), @@ -105,7 +114,7 @@ [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], [[[], ["ToolKit"]], ["STR_A3_None", "STR_A3_CfgWeapons_Toolkit0"], 1], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(autoShutOffEngineWhenStartingRepair), "CHECKBOX", @@ -114,4 +123,4 @@ false, // default value true, // isGlobal {[QGVAR(autoShutOffEngineWhenStartingRepair), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index c78a2eaa69..57e149999e 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -261,6 +261,10 @@ 維修載具中... Tamir Ediliyor... + + Boost engineer training when in repair vehicles or facilities. Untrained becomes engineer, engineer becomes advanced engineer. + 修理車両か施設内では工兵能力を上昇させます。兵士は工兵になり、工兵は上級工兵になります。 + Full Repair Locations Möglichkeit zur vollständigen Reperatur diff --git a/addons/respawn/ACE_Settings.hpp b/addons/respawn/ACE_Settings.hpp index d9dd41134e..4b4c977844 100644 --- a/addons/respawn/ACE_Settings.hpp +++ b/addons/respawn/ACE_Settings.hpp @@ -1,18 +1,10 @@ class ACE_Settings { class GVAR(savePreDeathGear) { - category = CSTRING(DisplayName); - displayName = CSTRING(SavePreDeathGear_DisplayName); - description = CSTRING(SavePreDeathGear_Description); - value = 0; - typeName = "BOOL"; + movedToSQF = 1; }; class GVAR(removeDeadBodiesDisconnected) { - category = CSTRING(DisplayName); - displayName = CSTRING(RemoveDeadBodiesDisconnected_DisplayName); - description = CSTRING(RemoveDeadBodiesDisconnected_Description); - value = 1; - typeName = "BOOL"; + movedToSQF = 1; }; // Not used anywhere??? // class GVAR(bodyRemoveTimer) { diff --git a/addons/respawn/CfgEventHandlers.hpp b/addons/respawn/CfgEventHandlers.hpp index 481d36cf30..17208865ab 100644 --- a/addons/respawn/CfgEventHandlers.hpp +++ b/addons/respawn/CfgEventHandlers.hpp @@ -1,20 +1,20 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); - serverInit = QUOTE(call COMPILE_FILE(XEH_serverPostInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + serverInit = QUOTE(call COMPILE_SCRIPT(XEH_serverPostInit)); }; }; diff --git a/addons/respawn/CfgVehicles.hpp b/addons/respawn/CfgVehicles.hpp index c5e30a3028..63b87ee057 100644 --- a/addons/respawn/CfgVehicles.hpp +++ b/addons/respawn/CfgVehicles.hpp @@ -64,7 +64,7 @@ class CfgVehicles { // team leader class Man; - class CAManBase : Man { + class CAManBase: Man { class ACE_SelfActions { class ACE_MoveRallypoint { displayName = CSTRING(Rallypoint_MoveRallypoint); diff --git a/addons/respawn/README.md b/addons/respawn/README.md index 1a9bcfe49f..753114be99 100644 --- a/addons/respawn/README.md +++ b/addons/respawn/README.md @@ -2,11 +2,3 @@ ace_respawn =========== Various module options to help mission makers to quickly set up various respawn configurations. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [bux578](https://github.com/bux578) diff --git a/addons/respawn/XEH_preInit.sqf b/addons/respawn/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/respawn/XEH_preInit.sqf +++ b/addons/respawn/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/respawn/XEH_serverPostInit.sqf b/addons/respawn/XEH_serverPostInit.sqf index 727b04d68d..205dc49e0f 100644 --- a/addons/respawn/XEH_serverPostInit.sqf +++ b/addons/respawn/XEH_serverPostInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -["ace_settingsInitialized", { +["CBA_settingsInitialized", { if (GVAR(RemoveDeadBodiesDisconnected)) then { addMissionEventHandler ["HandleDisconnect", { [{ diff --git a/addons/respawn/config.cpp b/addons/respawn/config.cpp index 79fbf69d74..b0a86336a4 100644 --- a/addons/respawn/config.cpp +++ b/addons/respawn/config.cpp @@ -3,8 +3,8 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; - weapons[] = {"ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_Rallypoint_West_Base", "ACE_Rallypoint_East_Base", "ACE_Rallypoint_Independent_Base"}; + units[] = {"ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_Rallypoint_West_Base", "ACE_Rallypoint_East_Base", "ACE_Rallypoint_Independent_Base"}; + weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "ace_common" }; author = ECSTRING(common,ACETeam); diff --git a/addons/respawn/initSettings.sqf b/addons/respawn/initSettings.sqf new file mode 100644 index 0000000000..836ede4811 --- /dev/null +++ b/addons/respawn/initSettings.sqf @@ -0,0 +1,17 @@ +private _category = format ["ACE %1", localize LSTRING(DisplayName)]; + +[ + QGVAR(savePreDeathGear), "CHECKBOX", + [LSTRING(SavePreDeathGear_DisplayName), LSTRING(SavePreDeathGear_Description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(removeDeadBodiesDisconnected), "CHECKBOX", + [LSTRING(RemoveDeadBodiesDisconnected_DisplayName), LSTRING(RemoveDeadBodiesDisconnected_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 9311f2a351..558a47df02 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -14,6 +14,7 @@ Réapparition Znovuzrození Yeniden Doğma + Reaparición Deploy in 5 seconds... @@ -304,6 +305,7 @@ Minuterie enlèvement corps Časovač odstranění mrtvol Bedenin Silinme Süresi + Temporizador para eliminar cuerpos This module enables you to configure ACE functionality specific to respawns. diff --git a/addons/safemode/CfgEventHandlers.hpp b/addons/safemode/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/safemode/CfgEventHandlers.hpp +++ b/addons/safemode/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/safemode/README.md b/addons/safemode/README.md index 9c0632f7be..27a6d7170e 100644 --- a/addons/safemode/README.md +++ b/addons/safemode/README.md @@ -2,11 +2,3 @@ ace_safemode ============ Adds the ability to use the safety on small arms. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf index d013d29696..829c21e7fd 100644 --- a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf @@ -25,7 +25,7 @@ if (_sound isEqualTo []) exitWith { }; // get position where to play the sound (position of the weapon) -private _position = AGLToASL (_unit modelToWorldVisual (_unit selectionPosition "RightHand")); +private _position = _unit modelToWorldVisualWorld (_unit selectionPosition "RightHand"); _sound params ["_filename", ["_volume", 1], ["_soundPitch", 1], ["_distance", 0]]; diff --git a/addons/safemode/functions/fnc_setWeaponSafety.sqf b/addons/safemode/functions/fnc_setWeaponSafety.sqf index 4ad0174b20..54732857af 100644 --- a/addons/safemode/functions/fnc_setWeaponSafety.sqf +++ b/addons/safemode/functions/fnc_setWeaponSafety.sqf @@ -31,6 +31,6 @@ _weapon = configName (configFile >> "CfgWeapons" >> _weapon); private _muzzle = currentMuzzle _unit; -if !(_state isEqualTo (_weapon in _safedWeapons)) then { +if (_state isNotEqualTo (_weapon in _safedWeapons)) then { [_unit, _weapon, _muzzle] call FUNC(lockSafety); }; diff --git a/addons/sandbag/CfgEventHandlers.hpp b/addons/sandbag/CfgEventHandlers.hpp index 32d4ac80f4..6770876c89 100644 --- a/addons/sandbag/CfgEventHandlers.hpp +++ b/addons/sandbag/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; @@ -35,6 +35,6 @@ class Extended_Killed_EventHandlers { class Extended_DisplayLoad_EventHandlers { class RscDisplayMission { - ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + ADDON = QUOTE(_this call COMPILE_SCRIPT(XEH_missionDisplayLoad)); }; }; diff --git a/addons/sandbag/README.md b/addons/sandbag/README.md index e1bd40eee5..561a6d2bfc 100644 --- a/addons/sandbag/README.md +++ b/addons/sandbag/README.md @@ -2,10 +2,3 @@ ace_sandbag =============== Adds stackable sandbags. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/sandbag/config.cpp b/addons/sandbag/config.cpp index 80e3f71808..bbd2369659 100644 --- a/addons/sandbag/config.cpp +++ b/addons/sandbag/config.cpp @@ -3,8 +3,8 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {"ACE_Item_Sandbag", "ACE_Item_Sandbag_empty"}; - weapons[] = {"ACE_Sandbag", "ACE_Sandbag_empty"}; + units[] = {"ACE_Item_Sandbag_empty"}; + weapons[] = {"ACE_Sandbag_empty"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; author = ECSTRING(common,ACETeam); diff --git a/addons/scopes/ACE_Arsenal_Stats.hpp b/addons/scopes/ACE_Arsenal_Stats.hpp index 1e2ebd91ea..06143be886 100644 --- a/addons/scopes/ACE_Arsenal_Stats.hpp +++ b/addons/scopes/ACE_Arsenal_Stats.hpp @@ -7,7 +7,7 @@ class EGVAR(arsenal,stats) { displayName = CSTRING(statHorizontalLimits); showText = 1; textStatement = QUOTE(params[ARR_2('_stat','_config')]; private _limits = getArray (_config >> _stat select 0); format [ARR_4('%1 / %2 MIL (∆ %3 MIL)', _limits select 0, _limits select 1, getNumber (_config >> _stat select 1))]); - condition = QUOTE(params[ARR_2('_stat', '_config')]; !((getArray (_config >> _stat select 0)) isEqualTo [])); + condition = QUOTE(params[ARR_2('_stat', '_config')]; (getArray (_config >> _stat select 0)) isNotEqualTo []); tabs[] = {{}, {0}}; }; class ACE_scopeVerticalLimits: ACE_scopeHorizontalLimits { diff --git a/addons/scopes/ACE_Settings.hpp b/addons/scopes/ACE_Settings.hpp index 04e0e92ffb..c1f767f1ae 100644 --- a/addons/scopes/ACE_Settings.hpp +++ b/addons/scopes/ACE_Settings.hpp @@ -1,93 +1,44 @@ class ACE_Settings { class GVAR(enabled) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 1; - displayName = CSTRING(enabled_displayName); - description = CSTRING(enabled_description); + movedToSQF = 1; }; // ACE_ScopeAdjust_Vertical and ACE_ScopeAdjust_Horizontal will be populated with default values instead of [0,0] class GVAR(forceUseOfAdjustmentTurrets) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 0; - displayName = CSTRING(forceUseOfAdjustmentTurrets_displayName); - description = CSTRING(forceUseOfAdjustmentTurrets_description); + movedToSQF = 1; }; // Auto corrects the zeroing in both vanilla- and advanced ballistics class GVAR(correctZeroing) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 1; - displayName = CSTRING(correctZeroing_displayName); - description = CSTRING(correctZeroing_description); + movedToSQF = 1; }; // Enables the use of the 'defaultZeroRange' setting to overwrite the discreteDistance[] config class GVAR(overwriteZeroRange) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 0; - displayName = CSTRING(overwriteZeroRange_displayName); - description = CSTRING(overwriteZeroRange_description); + movedToSQF = 1; }; // Only affects scopes with elevation adjustment turrets (ACE_ScopeAdjust_Vertical != [0,0]) class GVAR(defaultZeroRange) { - category = CSTRING(DisplayName); - typeName = "SCALAR"; - value = 100; - displayName = CSTRING(defaultZeroRange_displayName); - description = CSTRING(defaultZeroRange_description); - sliderSettings[] = {0, 1000, 100, 0}; + movedToSQF = 1; }; // Only relevant when advanced ballistics is enabled class GVAR(zeroReferenceTemperature) { - category = CSTRING(DisplayName); - typeName = "SCALAR"; - value = 15; - displayName = CSTRING(zeroReferenceTemperature_displayName); - description = CSTRING(zeroReferenceTemperature_description); - sliderSettings[] = {-55, 55, 15, 0}; + movedToSQF = 1; }; class GVAR(zeroReferenceBarometricPressure) { - category = CSTRING(DisplayName); - typeName = "SCALAR"; - value = 1013.25; - displayName = CSTRING(zeroReferenceBarometricPressure_displayName); - description = CSTRING(zeroReferenceBarometricPressure_description); - sliderSettings[] = {0, 1013.25, 1013.25, 2}; + movedToSQF = 1; }; class GVAR(zeroReferenceHumidity) { - category = CSTRING(DisplayName); - typeName = "SCALAR"; - value = 0.0; - displayName = CSTRING(zeroReferenceHumidity_displayName); - description = CSTRING(zeroReferenceHumidity_description); - sliderSettings[] = {0, 1, 0, 2}; + movedToSQF = 1; }; class GVAR(deduceBarometricPressureFromTerrainAltitude) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 0; - displayName = CSTRING(deduceBarometricPressureFromTerrainAltitude_displayName); - description = CSTRING(deduceBarometricPressureFromTerrainAltitude_description); + movedToSQF = 1; }; class GVAR(useLegacyUI) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 0; - isClientSettable = 1; - displayName = CSTRING(useLegacyUI_displayName); - description = CSTRING(useLegacyUI_description); + movedToSQF = 1; }; class GVAR(simplifiedZeroing) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 0; - displayName = CSTRING(simplifiedZeroing_displayName); - description = CSTRING(simplifiedZeroing_description); + movedToSQF = 1; }; }; diff --git a/addons/scopes/CfgEventHandlers.hpp b/addons/scopes/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/scopes/CfgEventHandlers.hpp +++ b/addons/scopes/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/scopes/CfgWeapons.hpp b/addons/scopes/CfgWeapons.hpp index c533cf04c2..de712b378f 100644 --- a/addons/scopes/CfgWeapons.hpp +++ b/addons/scopes/CfgWeapons.hpp @@ -6,61 +6,61 @@ class CfgWeapons { class ItemCore; class InventoryOpticsItem_Base_F; - class optic_Yorris : ItemCore { + class optic_Yorris: ItemCore { ACE_ScopeHeightAboveRail = 2.77224; }; - class optic_MRD : ItemCore { + class optic_MRD: ItemCore { ACE_ScopeHeightAboveRail = 2.8; }; - class optic_Aco : ItemCore { + class optic_Aco: ItemCore { ACE_ScopeHeightAboveRail = 3.69248; }; - class optic_ACO_grn : ItemCore { + class optic_ACO_grn: ItemCore { ACE_ScopeHeightAboveRail = 3.69248; }; - class optic_ACO_grn_smg : ItemCore { + class optic_ACO_grn_smg: ItemCore { ACE_ScopeHeightAboveRail = 3.69248; }; - class optic_ACO_smg : ItemCore { + class optic_ACO_smg: ItemCore { ACE_ScopeHeightAboveRail = 3.69248; }; - class optic_Holosight : ItemCore { + class optic_Holosight: ItemCore { ACE_ScopeHeightAboveRail = 4.66933; }; - class optic_Holosight_smg : ItemCore { + class optic_Holosight_smg: ItemCore { ACE_ScopeHeightAboveRail = 4.66933; }; - class optic_Arco : ItemCore { + class optic_Arco: ItemCore { ACE_ScopeHeightAboveRail = 4.89287; }; - class optic_ERCO_blk_F : optic_Arco { + class optic_ERCO_blk_F: optic_Arco { ACE_ScopeHeightAboveRail = 3.48836; }; - class optic_Hamr : ItemCore { + class optic_Hamr: ItemCore { ACE_ScopeHeightAboveRail = 4.48584; }; - class optic_MRCO : ItemCore { + class optic_MRCO: ItemCore { ACE_ScopeHeightAboveRail = 3.88405; }; - class optic_Nightstalker : ItemCore { + class optic_Nightstalker: ItemCore { ACE_ScopeHeightAboveRail = 5.54325; ACE_ScopeAdjust_Vertical[] = {-4, 30}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class NCTALKEP { discreteDistance[] = {200}; @@ -70,13 +70,13 @@ class CfgWeapons { }; }; - class optic_NVS : ItemCore { + class optic_NVS: ItemCore { ACE_ScopeHeightAboveRail = 5.54325; ACE_ScopeAdjust_Vertical[] = {-4, 30}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class NVS { discreteDistance[] = {300}; @@ -86,13 +86,13 @@ class CfgWeapons { }; }; - class optic_TWS : ItemCore { + class optic_TWS: ItemCore { ACE_ScopeHeightAboveRail = 5.52874; ACE_ScopeAdjust_Vertical[] = {-4, 30}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class TWS { discreteDistance[] = {300}; @@ -102,13 +102,13 @@ class CfgWeapons { }; }; - class optic_LRPS : ItemCore { + class optic_LRPS: ItemCore { ACE_ScopeHeightAboveRail = 4.2098; ACE_ScopeAdjust_Vertical[] = {0, 27}; ACE_ScopeAdjust_Horizontal[] = {-8, 8}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class Snip { opticsZoomMin = 0.011; @@ -122,13 +122,13 @@ class CfgWeapons { }; }; - class optic_SOS : ItemCore { + class optic_SOS: ItemCore { ACE_ScopeHeightAboveRail = 4.41328; ACE_ScopeAdjust_Vertical[] = {-4, 30}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class Snip { discreteDistance[] = {100}; @@ -138,13 +138,13 @@ class CfgWeapons { }; }; - class optic_DMS : ItemCore { + class optic_DMS: ItemCore { ACE_ScopeHeightAboveRail = 3.86253; ACE_ScopeAdjust_Vertical[] = {-4, 20}; ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class Snip { discreteDistance[] = {100}; @@ -154,13 +154,13 @@ class CfgWeapons { }; }; - class optic_AMS_base : ItemCore { + class optic_AMS_base: ItemCore { ACE_ScopeHeightAboveRail = 3.8933; ACE_ScopeAdjust_Vertical[] = {0, 16}; ACE_ScopeAdjust_Horizontal[] = {-11, 11}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class AMS { opticsZoomMin = 0.0285; @@ -174,13 +174,13 @@ class CfgWeapons { }; }; - class optic_KHS_base : ItemCore { + class optic_KHS_base: ItemCore { ACE_ScopeHeightAboveRail = 4.30723; ACE_ScopeAdjust_Vertical[] = {0, 19}; ACE_ScopeAdjust_Horizontal[] = {-9, 9}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class KHS { opticsZoomMin = 0.026; @@ -194,13 +194,13 @@ class CfgWeapons { }; }; - class optic_KHS_old : ItemCore { + class optic_KHS_old: ItemCore { ACE_ScopeHeightAboveRail = 4.30723; ACE_ScopeAdjust_Vertical[] = {0, 19}; ACE_ScopeAdjust_Horizontal[] = {-9, 9}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class KHS { opticsZoomMin = 0.026; @@ -219,13 +219,13 @@ class CfgWeapons { class Rifle_Long_Base_F: Rifle_Base_F {}; class DMR_06_base_F: Rifle_Long_Base_F { - ACE_IronSightBaseAngle = 0.018227; + ACE_IronSightBaseAngle = 0.010313; ACE_RailHeightAboveBore = 3.27488; }; class DMR_07_base_F: Rifle_Long_Base_F { ACE_RailHeightAboveBore = 5.07109; - ACE_IronSightBaseAngle = -0.00160721; + ACE_IronSightBaseAngle = 0; }; class arifle_MX_Base_F: Rifle_Base_F { @@ -234,158 +234,170 @@ class CfgWeapons { }; class arifle_MX_SW_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.40874; - ACE_IronSightBaseAngle = 0.216372; + ACE_IronSightBaseAngle = -0.004011; }; class arifle_MXM_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.40323; - ACE_IronSightBaseAngle = 0.157545; + ACE_IronSightBaseAngle = -0.004011; }; class arifle_SPAR_01_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 3.20768; - ACE_IronSightBaseAngle = -0.166678; + ACE_IronSightBaseAngle = 0.002856; }; class arifle_SPAR_02_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 3.22175; - ACE_IronSightBaseAngle = -0.184641; + ACE_IronSightBaseAngle = -0.018908; }; class arifle_SPAR_03_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 3.71491; - ACE_IronSightBaseAngle = -0.134908; + ACE_IronSightBaseAngle = 0; }; class LMG_Mk200_F: Rifle_Long_Base_F { ACE_RailHeightAboveBore = 2.68925; - ACE_IronSightBaseAngle = 0.0182228; + ACE_IronSightBaseAngle = 0.001719; }; class LMG_Zafir_F: Rifle_Long_Base_F { ACE_RailHeightAboveBore = 0.996651; - ACE_IronSightBaseAngle = 0.19812212; + ACE_IronSightBaseAngle = 0.004584; }; class LMG_03_base_F: Rifle_Long_Base_F { ACE_RailHeightAboveBore = 4.24282; - ACE_IronSightBaseAngle = 0.00181939; + ACE_IronSightBaseAngle = 0.008021; }; class pdw2000_base_F: Rifle_Short_Base_F { ACE_RailHeightAboveBore = 3.08883; ACE_RailBaseAngle = 0.019366; - ACE_IronSightBaseAngle = 0.0399664; + ACE_IronSightBaseAngle = 0.009740; }; class arifle_AKS_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 0; - ACE_IronSightBaseAngle = 0.00574991; + ACE_IronSightBaseAngle = 0; }; class arifle_AKM_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 0; - ACE_IronSightBaseAngle = 0.006273; + ACE_IronSightBaseAngle = 0.014897; }; class arifle_AK12_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 3.82508; - ACE_IronSightBaseAngle = 0.0276926; + ACE_IronSightBaseAngle = 0.025210; + }; + class arifle_AK12_GL_base_F: arifle_AK12_base_F { + ACE_IronSightBaseAngle = 0.017189; + }; + class arifle_AK12U_base_F: arifle_AK12_base_F { + ACE_IronSightBaseAngle = 0.002865; + }; + class arifle_RPK12_base_F: arifle_AK12_base_F { + ACE_IronSightBaseAngle = 0.003438; }; class arifle_CTAR_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 6.07588; - ACE_IronSightBaseAngle = 0.0151815; + ACE_IronSightBaseAngle = 0.004584; }; class arifle_CTARS_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 6.0787; - ACE_IronSightBaseAngle = 0.0125245; + ACE_IronSightBaseAngle = 0.022918; }; class arifle_ARX_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 2.81635; - ACE_IronSightBaseAngle = 0.113024; + ACE_IronSightBaseAngle = 0.016043; }; class arifle_katiba_Base_F: Rifle_Base_F {}; class arifle_Katiba_F: arifle_katiba_Base_F { ACE_RailHeightAboveBore = 5.75468; - ACE_IronSightBaseAngle = 0.0863227; + ACE_IronSightBaseAngle = 0.011459; }; class arifle_Katiba_C_F: arifle_katiba_Base_F { ACE_RailHeightAboveBore = 5.75468; - ACE_IronSightBaseAngle = 0.083419; + ACE_IronSightBaseAngle = 0.011459; }; class arifle_Katiba_GL_F: arifle_katiba_Base_F { ACE_RailHeightAboveBore = 5.75468; - ACE_IronSightBaseAngle = 0.0863227; + ACE_IronSightBaseAngle = 0.011459; }; class arifle_MX_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.80201; - ACE_IronSightBaseAngle = 0.19502; + ACE_IronSightBaseAngle = -0.005157; }; class arifle_MX_GL_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.80201; - ACE_IronSightBaseAngle = 0.17142857; + ACE_IronSightBaseAngle = -0.005730; }; class arifle_MXC_F: arifle_MX_Base_F { ACE_RailHeightAboveBore = 2.40874; - ACE_IronSightBaseAngle = 0.0154129; + ACE_IronSightBaseAngle = -0.005157; }; class SDAR_base_F: Rifle_Base_F {}; class arifle_SDAR_F: SDAR_base_F { ACE_RailHeightAboveBore = 0; - ACE_IronSightBaseAngle = -0.0237516; + ACE_IronSightBaseAngle = -0.042972; }; class SMG_01_Base: Rifle_Short_Base_F { ACE_RailHeightAboveBore = 4.85355; ACE_RailBaseAngle = 0.0250956; - ACE_IronSightBaseAngle = -0.159239; + ACE_IronSightBaseAngle = 0.018908; }; class SMG_02_base_F: Rifle_Short_Base_F { ACE_RailHeightAboveBore = 4.41831; ACE_RailBaseAngle = 0.0217724; - ACE_IronSightBaseAngle = 0.434847; + ACE_IronSightBaseAngle = 0.022918; + }; + class SMG_03_TR_BASE: Rifle_Base_F { + ACE_IronSightBaseAngle = -0.011459; }; class SMG_05_base_F: Rifle_Short_Base_F { ACE_RailHeightAboveBore = 4.05169; ACE_RailBaseAngle = 0.019366; - ACE_IronSightBaseAngle = -0.122823; + ACE_IronSightBaseAngle = 0.027502; }; class Tavor_base_F: Rifle_Base_F {}; class arifle_TRG20_F: Tavor_base_F { ACE_RailHeightAboveBore = 4.30954; - ACE_IronSightBaseAngle = 0.0338428; + ACE_IronSightBaseAngle = 0.002292; }; class arifle_TRG21_F: Tavor_base_F { ACE_RailHeightAboveBore = 4.30954; - ACE_IronSightBaseAngle = 0.0317759; + ACE_IronSightBaseAngle = 0.002292; }; class arifle_TRG21_GL_F: arifle_TRG21_F { ACE_RailHeightAboveBore = 4.30954; - ACE_IronSightBaseAngle = -0.03428571; + ACE_IronSightBaseAngle = -0.014424; }; class mk20_base_F: Rifle_Base_F {}; class arifle_Mk20_F: mk20_base_F { ACE_RailHeightAboveBore = 4.57255; - ACE_IronSightBaseAngle = -0.153292; + ACE_IronSightBaseAngle = 0.006303; }; class arifle_Mk20C_F: mk20_base_F { ACE_RailHeightAboveBore = 4.41539; - ACE_IronSightBaseAngle = -0.137835; + ACE_IronSightBaseAngle = 0.001146; }; class arifle_Mk20_GL_F: mk20_base_F { ACE_RailHeightAboveBore = 4.41539; - ACE_IronSightBaseAngle = -0.1532926; + ACE_IronSightBaseAngle = 0.005730; }; class arifle_MSBS65_base_F: Rifle_Base_F { ACE_RailHeightAboveBore = 5.2; - ACE_IronSightBaseAngle = -0.028648; + ACE_IronSightBaseAngle = 0.001719; }; class arifle_MSBS65_Mark_base_F: arifle_MSBS65_base_F { - ACE_IronSightBaseAngle = -0.045837; + ACE_IronSightBaseAngle = 0.002292; }; class EBR_base_F: Rifle_Long_Base_F {}; @@ -399,35 +411,35 @@ class CfgWeapons { class srifle_EBR_F: EBR_base_F { ACE_RailHeightAboveBore = 1.98812; - ACE_IronSightBaseAngle = -0.00601782; + ACE_IronSightBaseAngle = 0.007448; }; class srifle_LRR_F: LRR_base_F { ACE_RailHeightAboveBore = 3.20864; - ACE_IronSightBaseAngle = -0.0302847; + ACE_IronSightBaseAngle = 0.004011; }; class srifle_GM6_F: GM6_base_F { ACE_RailHeightAboveBore = 4.75572; - ACE_IronSightBaseAngle = -0.165062; + ACE_IronSightBaseAngle = 0.001146; }; class srifle_DMR_01_F: DMR_01_base_F { ACE_RailHeightAboveBore = 2.83284; - ACE_IronSightBaseAngle = 0.234393; + ACE_IronSightBaseAngle = 0.005730; }; class srifle_DMR_02_F: DMR_02_base_F { ACE_RailHeightAboveBore = 3.43913; - ACE_IronSightBaseAngle = 0.013878; + ACE_IronSightBaseAngle = 0.015470; }; class srifle_DMR_03_F: DMR_03_base_F { ACE_RailHeightAboveBore = 4.0795; - ACE_IronSightBaseAngle = 0.0138099; + ACE_IronSightBaseAngle = 0.005730; }; class srifle_DMR_04_F: DMR_04_base_F { ACE_RailHeightAboveBore = 2.38022; - ACE_RailBaseAngle = 0.0171842; + ACE_RailBaseAngle = 0.019481; }; class srifle_DMR_05_blk_F: DMR_05_base_F { ACE_RailHeightAboveBore = 3.91334; - ACE_IronSightBaseAngle = 0.0123425; + ACE_IronSightBaseAngle = 0.012605; }; class MMG_01_base_F; @@ -435,10 +447,10 @@ class CfgWeapons { class MMG_01_hex_F: MMG_01_base_F { ACE_RailHeightAboveBore = 4.73961; - ACE_IronSightBaseAngle = -0.0101613; + ACE_IronSightBaseAngle = -0.003438; }; class MMG_02_camo_F: MMG_02_base_F { ACE_RailHeightAboveBore = 5.01913; - ACE_IronSightBaseAngle = 0.0136377; + ACE_IronSightBaseAngle = 0.010886; }; }; diff --git a/addons/scopes/README.md b/addons/scopes/README.md index 9ef4c8fa63..d3261e186f 100644 --- a/addons/scopes/README.md +++ b/addons/scopes/README.md @@ -2,12 +2,3 @@ ace_scopes ========== Adds adjustable turrets for long-range optics, allowing zeroing in steps of 0.1 MILs. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) -- [bux578](https://github.com/bux578) diff --git a/addons/scopes/RscTitles.hpp b/addons/scopes/RscTitles.hpp index a15cbbed67..4dd1b7addf 100644 --- a/addons/scopes/RscTitles.hpp +++ b/addons/scopes/RscTitles.hpp @@ -14,7 +14,7 @@ class RscTitles { fadeout = 0; name = QGVAR(Zeroing); class controls { - class ACE_Scopes_Zeroing_BG : RscPicture { + class ACE_Scopes_Zeroing_BG: RscPicture { idc = 11; type = 0; text = QPATHTOF(UI\scopes_bg.paa); @@ -31,7 +31,7 @@ class RscTitles { w = 0.4 * safezoneW; h = 0.3 * safezoneH; }; - class ACE_Scopes_Zeroing_Vertical : RscText { + class ACE_Scopes_Zeroing_Vertical: RscText { idc = 12; type = 0; style = 2; @@ -48,7 +48,7 @@ class RscTitles { w = 0.04 * safezoneW; h = 0.025 * safezoneH; }; - class ACE_Scopes_Zeroing_Horizontal : RscText { + class ACE_Scopes_Zeroing_Horizontal: RscText { idc = 13; type = 0; style = 2; diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 23530f868b..8c221a4651 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -15,7 +15,7 @@ GVAR(canAdjustElevation) = [false, false, false]; GVAR(canAdjustWindage) = [false, false, false]; GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]]; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { if (!GVAR(enabled)) exitWith {}; diff --git a/addons/scopes/XEH_preInit.sqf b/addons/scopes/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/scopes/XEH_preInit.sqf +++ b/addons/scopes/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index 68a76e6ffe..f295103d03 100644 --- a/addons/scopes/functions/fnc_inventoryCheck.sqf +++ b/addons/scopes/functions/fnc_inventoryCheck.sqf @@ -74,8 +74,8 @@ private _newOptics = [_player] call FUNC(getOptics); (GVAR(scopeAdjust) select _forEachIndex) set [1, _verticalIncrement]; (GVAR(scopeAdjust) select _forEachIndex) set [2, _maxHorizontal]; (GVAR(scopeAdjust) select _forEachIndex) set [3, _horizontalIncrement]; - GVAR(canAdjustElevation) set [_forEachIndex, (_verticalIncrement > 0) && !(_maxVertical isEqualTo [0, 0])]; - GVAR(canAdjustWindage) set [_forEachIndex, (_horizontalIncrement > 0) && !(_maxHorizontal isEqualTo [0, 0])]; + GVAR(canAdjustElevation) set [_forEachIndex, (_verticalIncrement > 0) && (_maxVertical isNotEqualTo [0, 0])]; + GVAR(canAdjustWindage) set [_forEachIndex, (_horizontalIncrement > 0) && (_maxHorizontal isNotEqualTo [0, 0])]; }; } forEach GVAR(Optics); @@ -112,8 +112,8 @@ private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapo (GVAR(scopeAdjust) select _x) set [1, _verticalIncrement]; (GVAR(scopeAdjust) select _x) set [2, _maxHorizontal]; (GVAR(scopeAdjust) select _x) set [3, _horizontalIncrement]; - GVAR(canAdjustElevation) set [_x, (_verticalIncrement > 0) && !(_maxVertical isEqualTo [0, 0])]; - GVAR(canAdjustWindage) set [_x, (_horizontalIncrement > 0) && !(_maxHorizontal isEqualTo [0, 0])]; + GVAR(canAdjustElevation) set [_x, (_verticalIncrement > 0) && (_maxVertical isNotEqualTo [0, 0])]; + GVAR(canAdjustWindage) set [_x, (_horizontalIncrement > 0) && (_maxHorizontal isNotEqualTo [0, 0])]; }; // The optic or the weapon changed, reset the adjustment @@ -123,7 +123,7 @@ private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapo _persistentZero = 0; }; private _defaultElevation = [0, 300] select GVAR(simplifiedZeroing); - if (!((_adjustment select _forEachIndex) isEqualTo [_defaultElevation, 0, _persistentZero])) then { + if ((_adjustment select _forEachIndex) isNotEqualTo [_defaultElevation, 0, _persistentZero]) then { _adjustment set [_forEachIndex, [_defaultElevation, 0, _persistentZero]]; _updateAdjustment = true; }; @@ -131,11 +131,11 @@ private _newGuns = [primaryWeapon _player, secondaryWeapon _player, handgunWeapo } forEach [0, 1, 2]; if (GVAR(correctZeroing) || GVAR(simplifiedZeroing)) then { - if (!(_unitBaseAngle isEqualTo (_player getVariable [QGVAR(baseAngle), [0,0,0]]))) then { + if (_unitBaseAngle isNotEqualTo (_player getVariable [QGVAR(baseAngle), [0,0,0]])) then { TRACE_2("syncing",_unitBaseAngle,_player getVariable QGVAR(baseAngle)); _player setVariable [QGVAR(baseAngle), _unitBaseAngle, true]; }; - if (!(_unitBoreHeight isEqualTo (_player getVariable [QGVAR(boreHeight), [0,0,0]]))) then { + if (_unitBoreHeight isNotEqualTo (_player getVariable [QGVAR(boreHeight), [0,0,0]])) then { TRACE_2("syncing",_unitBoreHeight,_player getVariable QGVAR(boreHeight)); _player setVariable [QGVAR(boreHeight), _unitBoreHeight, true]; }; diff --git a/addons/scopes/initSettings.sqf b/addons/scopes/initSettings.sqf new file mode 100644 index 0000000000..917587be8e --- /dev/null +++ b/addons/scopes/initSettings.sqf @@ -0,0 +1,89 @@ +private _category = format ["ACE %1", localize LSTRING(DisplayName)]; + +[ + QGVAR(enabled), "CHECKBOX", + [LSTRING(enabled_displayName), LSTRING(enabled_description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(forceUseOfAdjustmentTurrets), "CHECKBOX", + [LSTRING(forceUseOfAdjustmentTurrets_displayName), LSTRING(forceUseOfAdjustmentTurrets_description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(correctZeroing), "CHECKBOX", + [LSTRING(correctZeroing_displayName), LSTRING(correctZeroing_description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(overwriteZeroRange), "CHECKBOX", + [LSTRING(overwriteZeroRange_displayName), LSTRING(overwriteZeroRange_description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(defaultZeroRange), "SLIDER", + [LSTRING(defaultZeroRange_displayName), LSTRING(defaultZeroRange_description)], + _category, + [0, 1000, 100, 0], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(zeroReferenceTemperature), "SLIDER", + [LSTRING(zeroReferenceTemperature_displayName), LSTRING(zeroReferenceTemperature_description)], + _category, + [-55, 55, 15, 0], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(zeroReferenceBarometricPressure), "SLIDER", + [LSTRING(zeroReferenceBarometricPressure_displayName), LSTRING(zeroReferenceBarometricPressure_description)], + _category, + [0, 1013.25, 1013.25, 2], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(zeroReferenceHumidity), "SLIDER", + [LSTRING(zeroReferenceHumidity_displayName), LSTRING(zeroReferenceHumidity_description)], + _category, + [0, 1, 0, 2], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(deduceBarometricPressureFromTerrainAltitude), "CHECKBOX", + [LSTRING(deduceBarometricPressureFromTerrainAltitude_displayName), LSTRING(deduceBarometricPressureFromTerrainAltitude_description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(useLegacyUI), "CHECKBOX", + [LSTRING(useLegacyUI_displayName), LSTRING(useLegacyUI_description)], + _category, + false, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(simplifiedZeroing), "CHECKBOX", + [LSTRING(simplifiedZeroing_displayName), LSTRING(simplifiedZeroing_description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml index 0cc4b3e7cd..eae39deffd 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -15,6 +15,7 @@ Mira Telescópica Puškohledy Dürbünler + Visores Enable ACE Scope adjustment @@ -29,6 +30,7 @@ Включить настройку прицелов ACE Permitir ajustes de Mira do ACE Povolit ACE náměr puškohledů + Activar ACE Ajuste de visores Enable adjustment turrets on high powered scopes @@ -43,6 +45,7 @@ Включает регулировочные барабанчики ввода поправок на прицелах с высокой кратностью Permite que as Miras Telescópicas sejam ajustadas com ACE Povolí náměr puškohledů pomocí komínků optiky na seřízení zameřovacího kříže u kompatibilních puškohledů. + Activar torretas de ajuste en visores de muchos aumentos Force adjustment turrets @@ -57,6 +60,7 @@ Включить регулировку ненастроенных прицелов Força ajustes ACE para Miras Vynutit použití komínků + Forzar torretas de ajuste Force usage of adjustment turrets on high powered scopes @@ -71,6 +75,7 @@ Принудительно использовать барабанчики ввода поправок для ненастроенных прицелов с высокой кратностью Força o uso dos controles de ajuste de Mira do ACE em Miras Telescópicas Vynutí používání komínků u puškohledů. + Forzar uso de torretas de ajuste en visores de muchos aumentos Correct zeroing @@ -85,6 +90,7 @@ Корректировать пристрелку Corrigir Zeramento Opravit náměr + Corregir la homogeneidad Corrects the zeroing of all small arms sights @@ -99,6 +105,7 @@ Позволяет корректировать пристрелку для всех прицелов стрелкового оружия Corrige o Zeramento de todas as miras de armas pequenas. (Zeroing) Opravuje náměr mířidel všech ručních zbraní + Corrige la homogeneidad de los visores de armas cortas Overwrite zero distance @@ -113,6 +120,7 @@ Перезаписать дальность пристрелки Sobrepor distância zero Přepsat vzdálenost náměru + Sobreescribe la distancia de homogeneizado Uses the 'defaultZeroRange' setting to overwrite the zero range of high power scopes @@ -127,6 +135,7 @@ Использует настройку 'defaultZeroRange' для перенастройки дальности пристрелки прицелов с высокой кратностью Utiliza a configuração 'Distância Zero Padrão' para sobrepor a distância zero de Miras Telescópicas Používá nastavení 'defaultZeroRange' na přepsání vzdálenosti náměru pro puškohledy + Utiliza el parámetro 'defaultZeroRange' para sobreescribir la distancia de homogeneizado en los visores de muchos aumentos Default zero distance @@ -141,6 +150,7 @@ Дальность пристрелки по умолчанию Distância Zero Padrão Standardní vzdálenost náměru + Distancia de homogeneizado por defecto High powered scopes will be zeroed at this distance @@ -155,6 +165,7 @@ Дальность, на которую будут пристреляны прицелы с высокой кратностью Miras Telescópicas serão zeradas nessa distância Puškohledy budou naměřené na tuto vzdálenost + Visores con muchos aumentos serán homogeneizados por este parámetro Reference temperature @@ -169,6 +180,7 @@ Референсная температура Temperatura de Referência Referenční teplota + Temperatura de referencia Temperature at which the scope was zeroed @@ -183,6 +195,7 @@ Температура, при которой выполнена пристрелка прицела Temperatura na qual a mira foi zerada. Teplota za které byl puškohled naměřen + Temperatura a la que el visor ha sido homogeneizado Reference barometric pressure @@ -197,6 +210,7 @@ Референсное давление Pressão Barométrica de Referência Referenční barometrický tlak + Referencia de presión barométrica Barometric pressure at which the scope was zeroed @@ -211,6 +225,7 @@ Давление, при котором выполнена пристрелка прицела Pressão Barométrica de quando a mira foi zerada. Barometrický tlak za kterého byl puškohled naměřen + Presión barométrica a la que el visor ha sido homogeneizado Reference humidity @@ -225,6 +240,7 @@ Референсная влажность Humidade de Referência Referenční vlhkost vzduchu + Humedad de referencia Humidity at which the scope was zeroed @@ -239,6 +255,7 @@ Влажность, при которой выполнена пристрелка прицела Humidade na qual a mira foi zerada. Vlhkost vzduchu za které byl puškohled naměřen + Humedad a la cual el visor ha sido homogeneizado Deduce pressure from altitude @@ -253,6 +270,7 @@ Просчитать давление из высоты Deduzir pressão pela altitude Snížit tlak podle nadmořské výšky + Deducir presión de la altitud Deduce the barometric pressure from the terrain altitude @@ -267,6 +285,7 @@ Давление определяется по высоте Deduz a pressão barométrica pela altitude do terreno. Snížit barometrický tlak podle současné nadmořské výšky terénu + Deduce la presión barométrica de la altura del terreno Use legacy UI @@ -281,6 +300,7 @@ Usar Interface Antiga Utiliser l'ancienne IU Používat staré UI + Utilizar interfaz antigua Displays elevation and windage with signed numbers @@ -295,6 +315,7 @@ Exibir elevação e vento com número sinalizados. Affiche les valeurs de hausse et de dérive avec des nombres signés. Zobrazovat elevaci a vítr s znaménky plus a mínus. + Muestra la elevación y el viento con números positivos y negativos Simplified zeroing @@ -309,6 +330,7 @@ Zeramento Simplificado Zérotage simplifié Zjednodušené naměřování + Homogeneizado simplificado Replicates the vanilla zeroing system for riflescopes. @@ -323,6 +345,7 @@ Imita o sistema de zeramento vanilla para miras de rifle. Reproduit le système de zérotage vanilla pour les lunettes. Replikuje systém naměřování puškohledů ze základní hry. + Replica en los visores el sistema de homogeneizado de vanilla Minor adjustment up @@ -481,6 +504,7 @@ Resetar Ajuste Zero Réinitialiser le réglage du zéro Reset vynulování + Restaurar ajuste de homogeneizado This module adds windage and elevation adjustment turrets on high power rifle scopes. @@ -495,6 +519,7 @@ Этот модуль добавляет барабанчики ввода горизонтальных и вертикальных поправок для прицелов с высокой кратностью Esse módulo implementa vento e elevação para os ajustes de miras telescópicas. Tento modul přidává korekci zaměrovacího kříže puškohledů pro vítr a výšku. + Este módulo añade torretas de ajuste de viento y elevación en visores con muchos aumentos. %1D @@ -510,6 +535,7 @@ %1D %1D %1D + %1D %1L @@ -525,6 +551,7 @@ %1L %1L %1L + %1L %1R @@ -540,6 +567,7 @@ %1R %1R %1R + %1R Horizontal limits @@ -552,6 +580,7 @@ Limite Horizontal Limites horizontales Horizontální limity + Límites horizontales Vertical limits @@ -564,6 +593,7 @@ Limite Vertical Limites verticales Vertikální limity + Límites verticales diff --git a/addons/sitting/$PBOPREFIX$ b/addons/sitting/$PBOPREFIX$ new file mode 100644 index 0000000000..33a846b780 --- /dev/null +++ b/addons/sitting/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\sitting diff --git a/addons/sitting/ACE_Settings.hpp b/addons/sitting/ACE_Settings.hpp new file mode 100644 index 0000000000..0249636f49 --- /dev/null +++ b/addons/sitting/ACE_Settings.hpp @@ -0,0 +1,5 @@ +class ACE_Settings { + class XGVAR(enable) { + movedToSQF = 1; + }; +}; diff --git a/addons/sitting/CfgEventHandlers.hpp b/addons/sitting/CfgEventHandlers.hpp new file mode 100644 index 0000000000..7b93414593 --- /dev/null +++ b/addons/sitting/CfgEventHandlers.hpp @@ -0,0 +1,25 @@ +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 { + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_clientInit)); + }; +}; + +class Extended_Killed_EventHandlers { + class CAManBase { + class ADDON { + killed = QUOTE(_this call DFUNC(handleInterrupt)); + }; + }; +}; diff --git a/addons/sitting/CfgMoves.hpp b/addons/sitting/CfgMoves.hpp new file mode 100644 index 0000000000..f203203ed0 --- /dev/null +++ b/addons/sitting/CfgMoves.hpp @@ -0,0 +1,108 @@ +// Force free-look, prevent body rotating and leaning +#define MACRO_ANIMATION \ + head = "headDefault"; \ + aimingBody = "aimingNo"; \ + forceAim = 1; \ + static = 1; + +class CfgMovesBasic; +class CfgMovesMaleSdr: CfgMovesBasic { + class States { + class HubSittingChairA_idle1; + class GVAR(HubSittingChairA_idle1): HubSittingChairA_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairA_idle2; + class GVAR(HubSittingChairA_idle2): HubSittingChairA_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairA_idle3; + class GVAR(HubSittingChairA_idle3): HubSittingChairA_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairA_move1; + class GVAR(HubSittingChairA_move1): HubSittingChairA_move1 { + MACRO_ANIMATION + }; + class HubSittingChairB_idle1; + class GVAR(HubSittingChairB_idle1): HubSittingChairB_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairB_idle2; + class GVAR(HubSittingChairB_idle2): HubSittingChairB_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairB_idle3; + class GVAR(HubSittingChairB_idle3): HubSittingChairB_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairB_move1; + class GVAR(HubSittingChairB_move1): HubSittingChairB_move1 { + MACRO_ANIMATION + }; + class HubSittingChairC_idle1; + class GVAR(HubSittingChairC_idle1): HubSittingChairC_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairC_idle2; + class GVAR(HubSittingChairC_idle2): HubSittingChairC_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairC_idle3; + class GVAR(HubSittingChairC_idle3): HubSittingChairC_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairC_move1; + class GVAR(HubSittingChairC_move1): HubSittingChairC_move1 { + MACRO_ANIMATION + }; + class HubSittingChairUA_idle1; + class GVAR(HubSittingChairUA_idle1): HubSittingChairUA_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairUA_idle2; + class GVAR(HubSittingChairUA_idle2): HubSittingChairUA_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairUA_idle3; + class GVAR(HubSittingChairUA_idle3): HubSittingChairUA_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairUA_move1; + class GVAR(HubSittingChairUA_move1): HubSittingChairUA_move1 { + MACRO_ANIMATION + }; + class HubSittingChairUB_idle1; + class GVAR(HubSittingChairUB_idle1): HubSittingChairUB_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairUB_idle2; + class GVAR(HubSittingChairUB_idle2): HubSittingChairUB_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairUB_idle3; + class GVAR(HubSittingChairUB_idle3): HubSittingChairUB_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairUB_move1; + class GVAR(HubSittingChairUB_move1): HubSittingChairUB_move1 { + MACRO_ANIMATION + }; + class HubSittingChairUC_idle1; + class GVAR(HubSittingChairUC_idle1): HubSittingChairUC_idle1 { + MACRO_ANIMATION + }; + class HubSittingChairUC_idle2; + class GVAR(HubSittingChairUC_idle2): HubSittingChairUC_idle2 { + MACRO_ANIMATION + }; + class HubSittingChairUC_idle3; + class GVAR(HubSittingChairUC_idle3): HubSittingChairUC_idle3 { + MACRO_ANIMATION + }; + class HubSittingChairUC_move1; + class GVAR(HubSittingChairUC_move1): HubSittingChairUC_move1 { + MACRO_ANIMATION + }; + }; +}; diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp new file mode 100644 index 0000000000..6b71101b44 --- /dev/null +++ b/addons/sitting/CfgVehicles.hpp @@ -0,0 +1,224 @@ +class CfgVehicles { + class ACE_Module; + class ACEX_ModuleSitting: ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACEX"; + displayName = CSTRING(ModuleDisplayName); + function = QFUNC(moduleInit); + scope = 1; + isGlobal = 1; + isSingular = 1; + icon = QUOTE(PATHTOF(UI\Icon_Module_Sitting_ca.paa)); + class Arguments { + class enable { + displayName = CSTRING(Enable); + description = CSTRING(Enable); + typeName = "BOOL"; + defaultValue = 1; + }; + }; + class ModuleDescription { + description = CSTRING(ModuleDescription); + }; + }; + class ACE_ModuleSitting: ACEX_ModuleSitting { + scope = 1; // hidden, backwards compatibility + }; + + class Man; + class CAManBase: Man { + class ACE_SelfActions { + class XGVAR(Stand) { + displayName = CSTRING(Stand); + condition = QUOTE(_player call FUNC(canStand)); + exceptions[] = {"isNotSitting"}; + statement = QUOTE(_player call FUNC(stand)); + priority = 0; + icon = QUOTE(PATHTOF(UI\stand_ca.paa)); + }; + }; + }; + + // Folding Chair + class ThingX; + class Land_CampingChair_V1_F: ThingX { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = {0, -0.1, -0.45}; + XGVAR(interactPosition)[] = {0, 0, 0.3}; + + EGVAR(interaction,replaceTerrainObject) = 1; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + + // Camping Chair + class Land_CampingChair_V2_F: ThingX { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = {0, -0.1, -0.45}; + XGVAR(interactPosition)[] = {0, 0, 0.3}; + + EGVAR(interaction,replaceTerrainObject) = 1; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + + // Chair (Plastic) + class Furniture_base_F: ThingX {}; + class Land_ChairPlastic_F: Furniture_base_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 90; + XGVAR(sitPosition)[] = {0, 0, -0.5}; + XGVAR(interactPosition)[] = {0, 0, 0.3}; + + EGVAR(interaction,replaceTerrainObject) = 1; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 270; + }; + + // Chair (Wooden) + class Land_ChairWood_F: Furniture_base_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = {0, -0.05, 0}; + XGVAR(interactPosition)[] = {0, 0, 0.8}; + + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + + // Office Chair + class Land_OfficeChair_01_F: Furniture_base_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = {0, 0, -0.6}; + XGVAR(interactPosition)[] = {0, 0, 0.3}; + + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + + // Wooden Log + class Land_WoodenLog_F: ThingX { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 0; + XGVAR(sitPosition)[] = {0, 0, -1}; + XGVAR(interactPosition)[] = {0, 0, 0.5}; + + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + + // Rattan Chair + class Land_RattanChair_01_F: Furniture_base_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = {0, 0, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) + XGVAR(interactPosition)[] = {0, 0, 0.3}; + + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + }; + + // Arm Chair + class Furniture_Residental_base_F; + class Land_ArmChair_01_F: Furniture_Residental_base_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 0; + XGVAR(sitPosition)[] = {0, 0, -1}; + XGVAR(interactPosition)[] = {0, 0, 0.3}; + + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; + EGVAR(dragging,carryDirection) = 180; + + }; + + class House_F; + class Land_BusStop_02_shelter_F: House_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = { {-0.5, 0.9, -1.3}, {0.5, 0.9, -1.3} }; + XGVAR(interactPosition)[] = { {-0.5, 0.9, -0.3}, {0.5, 0.9, -0.3} }; + + EGVAR(interaction,replaceTerrainObject) = 1; + }; + + // Benches + class Land_Bench_F: Furniture_base_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 90; + XGVAR(sitPosition)[] = { {0.1, -0.5, -0.9}, {0.1, 0.5, -0.9} }; + XGVAR(interactPosition)[] = { {0, -0.5, 0.3}, {0, 0.5, 0.3} }; + + EGVAR(interaction,replaceTerrainObject) = 1; + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryDirection) = 90; + EGVAR(dragging,canDrag) = 1; + EGVAR(dragging,dragPosition)[] = {0, 1, 0}; + EGVAR(dragging,dragDirection) = 90; + }; + + class House_Small_F; + class Land_Bench_01_F: House_Small_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = { {0.5, -0.04, -0.90}, {-0.5, -0.04, -0.90} }; + XGVAR(interactPosition)[] = { {0.5, 0, 0.3}, {-0.5, 0, 0.3} }; + + EGVAR(interaction,replaceTerrainObject) = 1; + }; + + class Land_Bench_02_F: House_Small_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = { {0.5, -0.04, -0.90}, {-0.5, -0.04, -0.90} }; + XGVAR(interactPosition)[] = { {0.5, 0, 0.3}, {-0.5, 0, 0.3} }; + + EGVAR(interaction,replaceTerrainObject) = 1; + }; + + class Land_Bench_03_F: House_Small_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = { {0.5, -0.15, -0.90}, {-0.5, -0.15, -0.90} }; + XGVAR(interactPosition)[] = { {0.5, 0, 0.3}, {-0.5, 0, 0.3} }; + + EGVAR(interaction,replaceTerrainObject) = 1; + }; + + /* Disabled due to a geometry issue with height + class Land_Bench_04_F: House_Small_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = { {0.5, -0.04, -2.00}, {-0.5, -0.04, -2.00} }; + XGVAR(interactPosition)[] = { {0.5, 0, 0.3}, {-0.5, 0, 0.3} }; + };*/ + + class Land_Bench_05_F: House_Small_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 0; + XGVAR(sitPosition)[] = { {0.5, -0.04, -0.90}, {-0.5, -0.04, -0.90} }; + XGVAR(interactPosition)[] = { {0.5, 0, 0.3}, {-0.5, 0, 0.3} }; + + EGVAR(interaction,replaceTerrainObject) = 1; + }; + + class Stall_base_F; + class Land_StallWater_F: Stall_base_F { + XGVAR(canSit) = 1; + XGVAR(sitDirection) = 180; + XGVAR(sitPosition)[] = { {-0.4, -0.8, -0.9}, {0.4, -0.8, -0.9} }; + XGVAR(interactPosition)[] = { {-0.4, -0.75, 0.3}, {0.4, -0.75, 0.3} }; + + EGVAR(interaction,replaceTerrainObject) = 1; + }; +}; diff --git a/addons/sitting/README.md b/addons/sitting/README.md new file mode 100644 index 0000000000..e4d52bfa6d --- /dev/null +++ b/addons/sitting/README.md @@ -0,0 +1,8 @@ +ace_sitting +=============== + +The Sitting module introduces ability to sit on chairs. + +## ACEX Conversion - things still using acex prefix +- All settings +- CfgVehicles Config Entries (e.g. `acex_sitting_canSit`) diff --git a/addons/sitting/UI/Icon_Module_Sitting_ca.paa b/addons/sitting/UI/Icon_Module_Sitting_ca.paa new file mode 100644 index 0000000000..1d4bbccb70 Binary files /dev/null and b/addons/sitting/UI/Icon_Module_Sitting_ca.paa differ diff --git a/addons/sitting/UI/sit_ca.paa b/addons/sitting/UI/sit_ca.paa new file mode 100644 index 0000000000..1191c3b1e0 Binary files /dev/null and b/addons/sitting/UI/sit_ca.paa differ diff --git a/addons/sitting/UI/stand_ca.paa b/addons/sitting/UI/stand_ca.paa new file mode 100644 index 0000000000..08c136f668 Binary files /dev/null and b/addons/sitting/UI/stand_ca.paa differ diff --git a/addons/sitting/XEH_PREP.hpp b/addons/sitting/XEH_PREP.hpp new file mode 100644 index 0000000000..1a01bf8427 --- /dev/null +++ b/addons/sitting/XEH_PREP.hpp @@ -0,0 +1,8 @@ +ACEX_PREP(addSitActions); +ACEX_PREP(canSit); +ACEX_PREP(canStand); +ACEX_PREP(getRandomAnimation); +ACEX_PREP(handleInterrupt); +ACEX_PREP(moduleInit); +ACEX_PREP(sit); +ACEX_PREP(stand); diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf new file mode 100644 index 0000000000..12adfb9f6c --- /dev/null +++ b/addons/sitting/XEH_clientInit.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" + +// Exit on Headless +if (!hasInterface) exitWith {}; + +["ace_settingsInitialized", { + TRACE_1("SettingInit", XGVAR(enable)); + + // If not enabled, then do not add CanInteractWith Condition or event handlers + if (!XGVAR(enable)) exitWith {}; + + // Initialize classes as they spawn + ["ThingX", "init", FUNC(addSitActions), nil, nil, true] call CBA_fnc_addClassEventHandler; + + // Initialize statically defined benches (also appear as world objects, no class EH thrown) + { + [_x] call FUNC(addSitActions); + } forEach [BENCHES]; + + // Add interaction menu exception + ["isNotSitting", {isNil {(_this select 0) getVariable QGVAR(sittingStatus)}}] call EFUNC(common,addCanInteractWithCondition); + + // Handle interruptions + ["ace_unconscious", {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler; + ["ace_captives_SetHandcuffed", {_this call DFUNC(handleInterrupt)}] call CBA_fnc_addEventHandler; +}] call CBA_fnc_addEventHandler; diff --git a/addons/sitting/XEH_preInit.sqf b/addons/sitting/XEH_preInit.sqf new file mode 100644 index 0000000000..4fc8d6e9d0 --- /dev/null +++ b/addons/sitting/XEH_preInit.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#include "initSettings.sqf" + +if (hasInterface) then { + GVAR(initializedClasses) = []; +}; + +ADDON = true; diff --git a/addons/sitting/XEH_preStart.sqf b/addons/sitting/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/sitting/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/sitting/config.cpp b/addons/sitting/config.cpp new file mode 100644 index 0000000000..ab5c53047d --- /dev/null +++ b/addons/sitting/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_interaction"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Jonpas"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; + + BWC_CONFIG(XADDON); +}; + +#include "ACE_Settings.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgMoves.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/sitting/functions/fnc_addSitActions.sqf b/addons/sitting/functions/fnc_addSitActions.sqf new file mode 100644 index 0000000000..99f7145cf4 --- /dev/null +++ b/addons/sitting/functions/fnc_addSitActions.sqf @@ -0,0 +1,71 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Adds sit actions. + * + * Arguments: + * 0: Seat + * + * Return Value: + * None + * + * Example: + * [cursorObject] call ace_sitting_fnc_addSitActions + * + * Public: No + */ + +params ["_seat"]; + +private _type = _seat; +if (_seat isEqualType objNull) then { + _type = typeOf _seat; +}; + +private _configFile = configFile >> "CfgVehicles" >> _type; + +// Exit if sitting disabled or the object is not specified as a seat +if (!XGVAR(enable) || {getNumber (_configFile >> QGVAR(canSit)) != 1}) exitWith {}; + +// Exit if class already initialized +if (_type in GVAR(initializedClasses)) exitWith {}; +GVAR(initializedClasses) pushBack _type; + +TRACE_1("Adding Sit Action",_type); + +private _sitPosition = getArray (_configFile >> QGVAR(sitPosition)); +private _interactPosition = getArray (_configFile >> QGVAR(interactPosition)); + +if (count _sitPosition != count _interactPosition) exitWith { + WARNING_1("Invalid sitting configuration of %1!",_type); +}; + +if !((_sitPosition select 0) isEqualType []) then { + _sitPosition = [_sitPosition]; + _interactPosition = [_interactPosition]; +}; + +{ + private _menuPosition = [0,0,0]; + private _menuType = ["ACE_MainActions"]; + if (count _interactPosition >= _forEachIndex) then { + _menuPosition = _interactPosition select _forEachIndex; + _menuType = []; + }; + + TRACE_3("Menu Position",_menuPosition,_menuType,_forEachIndex); + + private _sitAction = [ + format [QGVAR(Sit_%1), _forEachIndex], + LLSTRING(Sit), + QUOTE(PATHTOF(UI\sit_ca.paa)), + {_this call FUNC(sit)}, + {_this call FUNC(canSit)}, + {}, + _forEachIndex, + _menuPosition, + 1.5 + ] call EFUNC(interact_menu,createAction); + [_type, 0, _menuType, _sitAction] call EFUNC(interact_menu,addActionToClass); +} forEach _sitPosition; + diff --git a/addons/sitting/functions/fnc_canSit.sqf b/addons/sitting/functions/fnc_canSit.sqf new file mode 100644 index 0000000000..6250b30bec --- /dev/null +++ b/addons/sitting/functions/fnc_canSit.sqf @@ -0,0 +1,29 @@ +#include "script_component.hpp" +/* + * Author: Jonpas, vabene1111 + * Check if the player can sit down. + * + * Arguments: + * 0: Seat + * 1: Player + * 2: Seat Position (default: 0) + * + * Return Value: + * Can Sit Down + * + * Example: + * [cursorObject, player] call ace_sitting_fnc_canSit + * + * Public: No + */ + +params ["_seat", "_player", ["_seatPos", 0]]; + +// Sitting enabled, not occupied and standing up (or not on a big slope) +XGVAR(enable) && +{isNil {_player getVariable QGVAR(sittingStatus)}} && +{ + private _seatsClaimed = _seat getVariable [QGVAR(seatsClaimed), []]; + _seatsClaimed isEqualTo [] || {!(_seatsClaimed select _seatPos)} +} && +{round (vectorUp _seat select 0) == 0 && {round (vectorUp _seat select 1) == 0} && {round (vectorUp _seat select 2) == 1}} diff --git a/addons/sitting/functions/fnc_canStand.sqf b/addons/sitting/functions/fnc_canStand.sqf new file mode 100644 index 0000000000..bdc0211af7 --- /dev/null +++ b/addons/sitting/functions/fnc_canStand.sqf @@ -0,0 +1,21 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Check if the player can stand up (is in sitting position). + * + * Arguments: + * Player + * + * Return Value: + * Can Stand Up + * + * Example: + * player call ace_sitting_fnc_canStand + * + * Public: No + */ + +params ["_player"]; + +// Sitting +!isNil {_player getVariable QGVAR(sittingStatus)} diff --git a/addons/sitting/functions/fnc_getRandomAnimation.sqf b/addons/sitting/functions/fnc_getRandomAnimation.sqf new file mode 100644 index 0000000000..8ccd8d0620 --- /dev/null +++ b/addons/sitting/functions/fnc_getRandomAnimation.sqf @@ -0,0 +1,44 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Gets a random animations from the list. + * + * Arguments: + * None + * + * Return Value: + * Random Animation + * + * Example: + * _animation = call ace_sitting_fnc_getRandomAnimation + * + * Public: No + */ + +// Select random animation from Animations Pool +selectRandom [ + QGVAR(HubSittingChairA_idle1), + QGVAR(HubSittingChairA_idle2), + QGVAR(HubSittingChairA_idle3), + QGVAR(HubSittingChairA_move1), + QGVAR(HubSittingChairB_idle1), + QGVAR(HubSittingChairB_idle2), + QGVAR(HubSittingChairB_idle3), + QGVAR(HubSittingChairB_move1), + QGVAR(HubSittingChairC_idle1), + QGVAR(HubSittingChairC_idle2), + QGVAR(HubSittingChairC_idle3), + QGVAR(HubSittingChairC_move1), + QGVAR(HubSittingChairUA_idle1), + QGVAR(HubSittingChairUA_idle2), + QGVAR(HubSittingChairUA_idle3), + QGVAR(HubSittingChairUA_move1), + QGVAR(HubSittingChairUB_idle1), + QGVAR(HubSittingChairUB_idle2), + QGVAR(HubSittingChairUB_idle3), + QGVAR(HubSittingChairUB_move1), + QGVAR(HubSittingChairUC_idle1), + QGVAR(HubSittingChairUC_idle2), + QGVAR(HubSittingChairUC_idle3), + QGVAR(HubSittingChairUC_move1) +] diff --git a/addons/sitting/functions/fnc_handleInterrupt.sqf b/addons/sitting/functions/fnc_handleInterrupt.sqf new file mode 100644 index 0000000000..907cea1a32 --- /dev/null +++ b/addons/sitting/functions/fnc_handleInterrupt.sqf @@ -0,0 +1,22 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Handles interruptions of sitting, like killed or unconsciousness. + * + * Arguments: + * 0: Player + * + * Return Value: + * None + * + * Example: + * player call ace_sitting_fnc_handleInterrupt + * + * Public: No + */ + +params ["_player"]; + +if (!isNil {_player getVariable QGVAR(sittingStatus)}) then { + _player call FUNC(stand); +}; diff --git a/addons/sitting/functions/fnc_moduleInit.sqf b/addons/sitting/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..c03cefac61 --- /dev/null +++ b/addons/sitting/functions/fnc_moduleInit.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Initializes the Sitting module. + * + * Arguments: + * 0: The module logic + * 1: Units + * 2: Activated + * + * Return Value: + * None + * + * Public: No + */ + +params ["_logic", "_units", "_activated"]; + +if (!_activated) exitWith {}; + +[_logic, QXGVAR(enable), "enable"] call EFUNC(common,readSettingFromModule); + +INFO("Sitting Module Initialized."); diff --git a/addons/sitting/functions/fnc_sit.sqf b/addons/sitting/functions/fnc_sit.sqf new file mode 100644 index 0000000000..cbf7b7141f --- /dev/null +++ b/addons/sitting/functions/fnc_sit.sqf @@ -0,0 +1,108 @@ +#include "script_component.hpp" +/* + * Author: Jonpas, vabene1111 + * Sits down the player. + * + * Arguments: + * 0: Seat + * 1: Player + * 2: Seat Position (default: 0) + * + * Return Value: + * None + * + * Example: + * [cursorObject, player] call ace_sitting_fnc_sit + * [cursorObject, player, 0] call ace_sitting_fnc_sit + * + * Public: No + */ + +params ["_seat", "_player", ["_seatPos", 0]]; +TRACE_3("sit",_seat,_player,_seatPos); + +// Overwrite weird position, because Arma decides to set it differently based on current animation/stance... +_player switchMove "amovpknlmstpsraswrfldnon"; + +// Add scroll-wheel action to release object +private _actionID = _player addAction [ + format ["%1", LLSTRING(Stand)], + QUOTE((_this select 0) call FUNC(stand)), + nil, + 20, + false, + true, + "GetOut", + QUOTE(_this call FUNC(canStand)) +]; + +// Read config +private _configFile = configFile >> "CfgVehicles" >> typeOf _seat; +private _sitDirection = (getDir _seat) + (_seat getVariable [QGVAR(sitDirection), getNumber (_configFile >> QGVAR(sitDirection))]); +private _sitPositionAll = _seat getVariable [QGVAR(sitPosition), getArray (_configFile >> QGVAR(sitPosition))]; +private _multiSitting = (_sitPositionAll select 0) isEqualType []; + +private _sitPosition = _sitPositionAll; +if (_multiSitting) then { + _sitPosition = _sitPosition select _seatPos; +}; + +// Get random animation and perform it (before moving player to ensure correct placement) +[_player, call FUNC(getRandomAnimation), 2] call EFUNC(common,doAnimation); // Correctly places when using non-transitional animations +[_player, "", 1] call EFUNC(common,doAnimation); // Correctly applies animation's config values (such as disallow throwing of grenades, intercept keybinds... etc). + +TRACE_2("Sit pos and dir",_sitPosition,_sitDirection); + +// Set direction and position +_player setDir _sitDirection; +//modelToWorld returns AGL +_player setPosASL (AGLtoASL (_seat modelToWorld _sitPosition)); + +// Set variables, save seat object on player +_player setVariable [QGVAR(sittingStatus), [_seat, _actionID, _seatPos]]; + +// Prevent multiple people sitting on one seat +private _seatsClaimed = _seat getVariable [QGVAR(seatsClaimed), []]; +// Initialize claimed seats if first time sitting on it +if (_seatsClaimed isEqualTo []) then { + if (_multiSitting) then { + for "_i" from 0 to ((count _sitPositionAll) - 1) do { + _seatsClaimed pushBack (_i == _seatPos); + }; + } else { + _seatsClaimed = [true]; + }; +} else { + _seatsClaimed set [_seatPos, true]; +}; +_seat setVariable [QGVAR(seatsClaimed), _seatsClaimed, true]; + +// Also prevent dragging/carrying +if (!([_seat] call EFUNC(common,owned))) then { + [_player, _seat] call EFUNC(common,claim); +}; + +// Add automatical stand PFH in case of interruptions +private _seatPosOrig = getPosASL _seat; +private _seatDistOrig = (getPosASL _player) distance _seat; +[{ + params ["_args", "_pfhId"]; + _args params ["_player", "_seat", "_seatPosOrig", "_seatDistOrig"]; + + // Remove PFH if not sitting any more + if (isNil {_player getVariable QGVAR(sittingStatus)}) exitWith { + [_pfhId] call CBA_fnc_removePerFrameHandler; + TRACE_1("Remove PFH",_player getVariable [ARR_2(QGVAR(sittingStatus), false)]); + }; + + // Stand up if chair gets deleted or moved + if (isNull _seat || + {getPosASL _player distance _seatPosOrig > _seatDistOrig + 0.5} || + {((getPosASL _seat) vectorDistance _seatPosOrig) > 0.01} + ) exitWith { + _player call FUNC(stand); + TRACE_2("Chair moved",getPosASL _seat,_seatPosOrig); + }; +}, 0, [_player, _seat, _seatPosOrig, _seatDistOrig]] call CBA_fnc_addPerFrameHandler; + +["ace_satDown", [_player, _seat, _seatPos]] call CBA_fnc_localEvent; diff --git a/addons/sitting/functions/fnc_stand.sqf b/addons/sitting/functions/fnc_stand.sqf new file mode 100644 index 0000000000..80ef06a2c2 --- /dev/null +++ b/addons/sitting/functions/fnc_stand.sqf @@ -0,0 +1,52 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Stands up the player. + * + * Arguments: + * Player + * + * Return Value: + * None + * + * Example: + * player call ace_sitting_fnc_stand + * + * Public: No + */ + +params ["_player"]; +TRACE_1("stand",_player); + +(_player getVariable QGVAR(sittingStatus)) params ["_seat", "_actionID", ["_seatPos", 0]]; +TRACE_3("sittingStatus",_seat,_actionID,_seatPos); + +// Remove scroll-wheel action +_player removeAction _actionID; + +// Restore animation +private _animation = switch (currentWeapon _player) do { + case "": {"amovpercmstpsnonwnondnon"}; + case (primaryWeapon _player): {"amovpercmstpslowwrfldnon"}; + case (handgunWeapon _player): {"amovpercmstpslowwpstdnon"}; + default {"amovpercmstpsnonwnondnon"}; +}; + +[_player, _animation, 2] call EFUNC(common,doAnimation); + +// Set sitting status to nil +_player setVariable [QGVAR(sittingStatus), nil]; + +["ace_stoodUp", [_player, _seat, _seatPos]] call CBA_fnc_localEvent; + +if (isNull _seat) exitWith {}; + +// Allow sitting on this seat again +private _seatsClaimed = _seat getVariable [QGVAR(seatsClaimed), []]; +_seatsClaimed set [_seatPos, false]; +_seat setVariable [QGVAR(seatsClaimed), _seatsClaimed, true]; + +// Unclaim if no one else sitting on it +if (_seatsClaimed find true == -1) then { + [objNull, _seat] call EFUNC(common,claim); +}; diff --git a/addons/sitting/functions/script_component.hpp b/addons/sitting/functions/script_component.hpp new file mode 100644 index 0000000000..19e51509b3 --- /dev/null +++ b/addons/sitting/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\sitting\script_component.hpp" diff --git a/addons/sitting/initSettings.sqf b/addons/sitting/initSettings.sqf new file mode 100644 index 0000000000..744c188e9f --- /dev/null +++ b/addons/sitting/initSettings.sqf @@ -0,0 +1,10 @@ +[ + QXGVAR(enable), + "CHECKBOX", + [LSTRING(Enable), LSTRING(ModuleDescription)], + format ["ACE %1", LLSTRING(ModuleDisplayName)], + true, + true, + {[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; diff --git a/addons/sitting/script_component.hpp b/addons/sitting/script_component.hpp new file mode 100644 index 0000000000..50c9bad2de --- /dev/null +++ b/addons/sitting/script_component.hpp @@ -0,0 +1,22 @@ +#define COMPONENT sitting +#define COMPONENT_BEAUTIFIED Sitting +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_SITTING + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_SITTING + #define DEBUG_SETTINGS DEBUG_SETTINGS_SITTING +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + + +#define BENCHES \ + "Land_Bench_01_F", "Land_Bench_02_F", "Land_Bench_03_F", "Land_Bench_04_F", "Land_Bench_05_F", \ + "Land_StallWater_F", "Land_BusStop_02_shelter_F" diff --git a/addons/sitting/stringtable.xml b/addons/sitting/stringtable.xml new file mode 100644 index 0000000000..ac11613dfd --- /dev/null +++ b/addons/sitting/stringtable.xml @@ -0,0 +1,90 @@ + + + + + Sit Down + Hinsetzen + Usiądź + Sentar + Sednout si + Sentarse + S'asseoir + Leülés + Сесть + Siediti + 座る + 앉기 + 坐下 + 坐下 + Otur + + + Stand Up + Aufstehen + Wstań + Levantar + Vstát + Levantarse + Se lever + Felállás + Встать + Alzati + 立つ + 일어서기 + 站起来 + 站起來 + Kalk + + + Enable Sitting + Sitzen ermöglichen + Habilitar opção para sentar + Aktywuj siadanie + Povolit sezení + Activar asiento + Permettre de s'asseoir + Ülés engedélyezése + Разрешить сидение + Abilita seduta + 座るのを有効化 + 앉기 사용 + 开启坐下功能 + 開啟坐下功能 + Oturmayı Aktik Et + + + Sitting + Hinsetzen + Sentado + Siadanie + Sezení + Sentarse + S'asseoir + Ülés + Сидение + Sedersi + 着座 + 앉기 + 坐下功能 + 坐下功能 + Oturma + + + This module allows you to disable the ability to sit on chairs. + Dieses Modul eröffnet die Möglichkeit, sich auf Stühlen hinzusetzen. + Este módulo permite que você desabilite a capacidade de sentar-se em cadeiras e banheiros. + Moduł ten pozwala na włączenie lub wyłączenie możliwości siadania na krzesłach i toaletach. + Tento modul dovoluje zakázat možnost sedět na židlých a toaletách. + Este módulo te permite desactivar la capacidad de sentarse en sillas. + Ce module contrôle la capacité de s'asseoir sur des chaises. + Ez a modul lehetővé teszi a székekre és toalettekre való leülés letiltását. + Этот модуль позволяет вам запретить возможность садиться на стулья и туалеты. + Questo modulo ti permette di disabilitare la possibilità di sederti sulle sedie. + モジュールでは椅子に着席するのを無効化できます。 + 이 모듈을 사용하여 의자에 앉을 수 있는 기능을 비활성 할 수 있습니다. + 此模块可以让你开关在椅子上坐下的能力。 + 此模塊可以讓你開關在椅子上坐下的能力。 + Bu modül, sandalyelere oturma özelliğini devre dışı bırakmanıza izin verir. + + + diff --git a/addons/slideshow/CfgEventHandlers.hpp b/addons/slideshow/CfgEventHandlers.hpp index be284a9d70..8e27a9f14f 100644 --- a/addons/slideshow/CfgEventHandlers.hpp +++ b/addons/slideshow/CfgEventHandlers.hpp @@ -1,12 +1,12 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/addons/slideshow/README.md b/addons/slideshow/README.md index 627e1fe660..e2161374a9 100644 --- a/addons/slideshow/README.md +++ b/addons/slideshow/README.md @@ -2,10 +2,3 @@ ace_slideshow =============== Adds ability to have slide-shows on them and control them with a controller (another object). - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Jonpas](https://github.com/jonpas) diff --git a/addons/slideshow/config.cpp b/addons/slideshow/config.cpp index 6149ad71d7..93378a3e82 100644 --- a/addons/slideshow/config.cpp +++ b/addons/slideshow/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; + units[] = {QGVAR(module)}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; diff --git a/addons/slideshow/functions/fnc_addSlideActions.sqf b/addons/slideshow/functions/fnc_addSlideActions.sqf index 6acd304d32..6416c35748 100644 --- a/addons/slideshow/functions/fnc_addSlideActions.sqf +++ b/addons/slideshow/functions/fnc_addSlideActions.sqf @@ -30,14 +30,15 @@ private _actions = []; _names select _forEachIndex, "", { - (_this select 2) params ["_objects", "_image"]; + (_this select 2) params ["_objects", "_image", "_currentSlideshow"]; { _x setObjectTextureGlobal [0, _image] } count _objects; + [QGVAR(slideChanged), [_image, _currentSlideshow]] call CBA_fnc_localEvent; }, {true}, {}, - [_objects, _x] + [_objects, _x, _currentSlideshow] ] call EFUNC(interact_menu,createAction), [], _controller diff --git a/addons/slideshow/functions/fnc_autoTransition.sqf b/addons/slideshow/functions/fnc_autoTransition.sqf index 50e8b1d13d..87fe488754 100644 --- a/addons/slideshow/functions/fnc_autoTransition.sqf +++ b/addons/slideshow/functions/fnc_autoTransition.sqf @@ -7,7 +7,8 @@ * 0: Objects * 1: Image Paths * 2: State Variable Name - * 3: Duration (0 disables automatic transitions) + * 3: Current Slideshow + * 4: Duration (0 disables automatic transitions) * * Return Value: * None @@ -18,7 +19,7 @@ * Public: No */ -params ["_objects", "_images", "_varString", "_duration"]; +params ["_objects", "_images", "_varString", "_currentSlideshow", "_duration"]; // Get current slide number of this slideshow private _currentSlide = missionNamespace getVariable [_varString, 0]; @@ -29,11 +30,15 @@ _currentSlide = (_currentSlide + 1) mod (count _images); // Save slide back into global variable (PFH's local variables do not persist through PFH run) missionNamespace setVariable [_varString, _currentSlide]; +private _image = _images select _currentSlide; + // Set slide { - _x setObjectTextureGlobal [0, _images select _currentSlide]; + _x setObjectTextureGlobal [0, _image]; } count _objects; +[QGVAR(slideChanged), [_image, _currentSlideshow]] call CBA_fnc_localEvent; + // Log current slide and execute Next slide -TRACE_4("Auto-transition",_images select _currentSlide,_currentSlide,count _images,_duration); -[FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call CBA_fnc_waitAndExecute; +TRACE_4("Auto-transition",_image,_currentSlide,count _images,_duration); +[FUNC(autoTransition), [_objects, _images, _varString, _currentSlideshow, _duration], _duration] call CBA_fnc_waitAndExecute; diff --git a/addons/slideshow/functions/fnc_createSlideshow.sqf b/addons/slideshow/functions/fnc_createSlideshow.sqf index 290fad89b4..0d84fa969b 100644 --- a/addons/slideshow/functions/fnc_createSlideshow.sqf +++ b/addons/slideshow/functions/fnc_createSlideshow.sqf @@ -12,7 +12,7 @@ * 5: Set Name (default: localized "Slides") * * Return Value: - * None + * Slideshow ID * * Example: * [[object1, object2, object3], [controller1], ["images\image1.paa", "images\image2.paa"], ["Action1", "Action2"], 5, "My Slides"] call ace_slideshow_fnc_createSlideshow @@ -100,5 +100,7 @@ if (_duration == 0) then { missionNamespace setVariable [_varString, 0]; // Automatic transitions handler - [FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call CBA_fnc_waitAndExecute; + [FUNC(autoTransition), [_objects, _images, _varString, _currentSlideshow, _duration], _duration] call CBA_fnc_waitAndExecute; }; + +_currentSlideshow diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml index 02dd20c94d..10adfc6457 100644 --- a/addons/slideshow/stringtable.xml +++ b/addons/slideshow/stringtable.xml @@ -178,6 +178,7 @@ Установить имя Definir Nome Jméno setu + Definir nombre Name that will be used for main interaction entry (to distinguish multiple slideshows). Default: "Slides" @@ -192,6 +193,7 @@ Имя, которое будет использоваться для основных взаимодействий (для различения нескольких слайдов). По умолчанию: «Slides» Nome que será usado para a entrada principal de interação (para separar vários slideshows). Padrão: "Slides" Jméno, které bude použito pro hlavní interakci (pro rozlišení více prezentací). Standard: Snímky + Nombre usado para la entrada principal de interacción (para distinguir entre diferentes diapositivas). Por defecto: "Diapositivas" Slide Duration diff --git a/addons/smallarms/CfgMagazines.hpp b/addons/smallarms/CfgMagazines.hpp index 1f245b150d..cb3a3fca1f 100644 --- a/addons/smallarms/CfgMagazines.hpp +++ b/addons/smallarms/CfgMagazines.hpp @@ -7,53 +7,49 @@ class CfgMagazines { // 6.5mm ////////////////////////////////////////// - class 30Rnd_65x39_caseless_mag : CA_Magazine { // MX!! + class 30Rnd_65x39_caseless_mag: CA_Magazine { // MX!! tracersEvery = 0; lastRoundsTracer = 0; }; - class 30Rnd_65x39_caseless_green : 30Rnd_65x39_caseless_mag { // Katiba!! + class 30Rnd_65x39_caseless_green: 30Rnd_65x39_caseless_mag { // Katiba!! tracersEvery = 0; lastRoundsTracer = 0; }; - class 100Rnd_65x39_caseless_mag : CA_Magazine { // Katiba!! + class 100Rnd_65x39_caseless_mag: CA_Magazine { // Katiba!! tracersEvery = 5; lastRoundsTracer = 3; }; - class 200Rnd_65x39_cased_Box : 100Rnd_65x39_caseless_mag { + class 200Rnd_65x39_cased_Box: 100Rnd_65x39_caseless_mag { tracersEvery = 5; lastRoundsTracer = 3; }; // 7.62mm ////////////////////////////////////////// - class 150Rnd_762x51_Box : CA_Magazine { + class 150Rnd_762x51_Box: CA_Magazine { tracersEvery = 5; lastRoundsTracer = 3; }; // SMG & Pistol //////////////////////////// - class 30Rnd_9x21_Mag : CA_Magazine { + class 30Rnd_9x21_Mag: CA_Magazine { lastRoundsTracer = 0; }; class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag { displayname = CSTRING(17Rnd_9x19_Name); - count = 17; }; - class 30Rnd_45ACP_Mag_SMG_01 : 30Rnd_9x21_Mag { + class 30Rnd_45ACP_Mag_SMG_01: 30Rnd_9x21_Mag { displayname = CSTRING(25Rnd_45_Name); displaynameshort = ".45"; - picture = "\A3\weapons_f\data\ui\M_30Rnd_9x21_CA.paa"; - count = 25; - tracersEvery = 0; lastRoundsTracer = 0; }; @@ -70,10 +66,14 @@ class CfgMagazines { displayname = CSTRING(25Rnd_45_Tracer_Yellow_Name); }; - class 9Rnd_45ACP_Mag : 30Rnd_45ACP_Mag_SMG_01 { + class 9Rnd_45ACP_Mag: 30Rnd_45ACP_Mag_SMG_01 { displayname = CSTRING(8Rnd_45_Name); displaynameshort = ".45"; - count = 8; }; + + class 11Rnd_45ACP_Mag: CA_Magazine { + displayname = CSTRING(15Rnd_45_Name); + count = 15; + }; }; diff --git a/addons/smallarms/CfgWeapons.hpp b/addons/smallarms/CfgWeapons.hpp index 17cda1d7fb..1e4be69369 100644 --- a/addons/smallarms/CfgWeapons.hpp +++ b/addons/smallarms/CfgWeapons.hpp @@ -186,6 +186,12 @@ class CfgWeapons { }; }; + class LMG_03_Base_F; + + class LMG_03_F: LMG_03_Base_F { + magazineReloadTime = 0; // Fix for reloading every time weapon is equipped + }; + // Sniper and anti-materiel rifles ///////////////////////////////// class EBR_base_F: Rifle_Long_Base_F { diff --git a/addons/smallarms/README.md b/addons/smallarms/README.md index 0a62e1dbcc..324b8c544a 100644 --- a/addons/smallarms/README.md +++ b/addons/smallarms/README.md @@ -2,11 +2,3 @@ ace_smallarms ============= Tweaks various config values for small arms, improving values like ROF. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/smallarms/stringtable.xml b/addons/smallarms/stringtable.xml index 4e38e38c17..2277426d78 100644 --- a/addons/smallarms/stringtable.xml +++ b/addons/smallarms/stringtable.xml @@ -20,6 +20,7 @@ .45 ACP 25Rnd Mag 25-nab. mag. .45 ACP + Магазин, 25 патр. .45 ACP Mag. 25 balles .45 ACP Cargador de 25 proyectiles de .45 ACP 25-Schuss-.45-ACP-Magazin @@ -30,6 +31,7 @@ .45 ACP 25Rnd Tracers (Green) Mag 25-nab. mag. .45 ACP (zielony smugacz) + Магазин, 25 патр. .45 ACP (зелёные трассеры) Mag. 25 traçantes (vertes) .45 ACP Cargador de 25 balas trazadoras (verde) de .45 ACP 25-Schuss-.45-ACP-Vermin-Magazin (Leuchtspur Grün) @@ -40,6 +42,7 @@ .45 ACP 25Rnd Tracers (Red) Mag 25-nab. mag. .45 ACP (czerwony smugacz) + Магазин, 25 патр. .45 ACP (красные трассеры) Mag. 25 traçantes (rouges) .45 ACP Cargador de 25 balas trazadoras (rojo) de .45 ACP 25-Schuss-.45-ACP-Vermin-Magazin (Leuchtspur Rot) @@ -50,6 +53,7 @@ .45 ACP 25Rnd Tracers (Yellow) Mag 25-nab. mag. .45 ACP (żółty smugacz) + Магазин, 25 патр. .45 ACP (жёлтые трассеры) Mag. 25 traçantes (jaunes) .45 ACP Cargador de 25 balas trazadoras (amarillo) de .45 ACP 25-Schuss-.45-ACP-Vermin-Magazin (Nachlade-Leuchtspur Gelb) @@ -60,6 +64,7 @@ .45 ACP 8Rnd Mag 8-nab. mag. .45 ACP + Магазин, 8 патр. .45 ACP Mag. 8 balles .45 ACP Cargador de 8 proyectiles de .45 ACP 8-Schuss-.45-ACP-Magazin @@ -67,5 +72,16 @@ .45 ACP 8 Merm. Şarjör .45 ACP 8Rnd マガジン + + .45 ACP 15Rnd Mag + 15-nab. mag. .45 ACP + Магазин, 15 патр. .45 ACP + Mag. 15 balles .45 ACP + Cargador de 15 proyectiles de .45 ACP + 15-Schuss-.45-ACP-Magazin + .45 ACP, 15ks zásobník + .45 ACP 15 Merm. Şarjör + .45 ACP 15Rnd マガジン + diff --git a/addons/spectator/CfgEventHandlers.hpp b/addons/spectator/CfgEventHandlers.hpp index 7abe7ca4e3..f2b74f1342 100644 --- a/addons/spectator/CfgEventHandlers.hpp +++ b/addons/spectator/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/spectator/README.md b/addons/spectator/README.md index b827bdcc49..17d0c7b1f5 100644 --- a/addons/spectator/README.md +++ b/addons/spectator/README.md @@ -7,8 +7,3 @@ Includes a public API for integration into custom respawn frameworks and a templ For more information, see: http://ace3mod.com/wiki/feature/spectator.html -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [SilentSpike](https://github.com/SilentSpike) diff --git a/addons/spectator/XEH_PREP.hpp b/addons/spectator/XEH_PREP.hpp index ddca0c226c..74e8c8e388 100644 --- a/addons/spectator/XEH_PREP.hpp +++ b/addons/spectator/XEH_PREP.hpp @@ -24,6 +24,7 @@ PREP(ui_handleMouseButtonDblClick); PREP(ui_handleMouseButtonDown); PREP(ui_handleMouseMoving); PREP(ui_handleMouseZChanged); +PREP(ui_handleUnload); PREP(ui_toggleMap); PREP(ui_toggleUI); PREP(ui_updateCamButtons); diff --git a/addons/spectator/XEH_postInit.sqf b/addons/spectator/XEH_postInit.sqf index a02f36ae67..f2a6b64c57 100644 --- a/addons/spectator/XEH_postInit.sqf +++ b/addons/spectator/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -["ace_settingsInitialized", { +["CBA_settingsInitialized", { GVAR(availableModes) = [[0,1,2], [1,2], [0], [1], [2]] select GVAR(restrictModes); GVAR(availableVisions) = [[-2,-1,0,1], [-2,-1], [-2,0,1], [-2]] select GVAR(restrictVisions); }] call CBA_fnc_addEventHandler; diff --git a/addons/spectator/config.cpp b/addons/spectator/config.cpp index 359b96135b..44f98b6931 100644 --- a/addons/spectator/config.cpp +++ b/addons/spectator/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; + units[] = {QGVAR(virtual)}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; diff --git a/addons/spectator/functions/fnc_cam_prepareTarget.sqf b/addons/spectator/functions/fnc_cam_prepareTarget.sqf index 236924b255..21ced5addd 100644 --- a/addons/spectator/functions/fnc_cam_prepareTarget.sqf +++ b/addons/spectator/functions/fnc_cam_prepareTarget.sqf @@ -40,7 +40,7 @@ if !(isNull _focus) then { private _isMan = _focus isKindOf "Man"; private _height = if !(_isMan) then { (_bbd select 2) / 3 } else { switch (stance _focus) do { case "STAND": {1.4}; case "CROUCH": {0.8}; default {0.4}; }; }; - private _center = if (_isMan) then { AGLToASL (_focus modelToWorldVisual (_focus selectionPosition "Spine3")) } else { AGLToASL (_focus modelToWorldVisual [0,0,_height]) }; + private _center = if (_isMan) then { _focus modelToWorldVisualWorld (_focus selectionPosition "Spine3") } else { _focus modelToWorldVisualWorld [0,0,_height] }; // Set dummy location and rotation private _dummy = GVAR(camDummy); @@ -49,6 +49,6 @@ if !(isNull _focus) then { [_dummy, [GVAR(camYaw), GVAR(camPitch), 0]] call BIS_fnc_setObjectRotation; // Apply location and rotation to camera - GVAR(camera) setPosASL (AGLToASL (_dummy modelToWorldVisual [0, -_distance, 0])); + GVAR(camera) setPosASL (_dummy modelToWorldVisualWorld [0, -_distance, 0]); GVAR(camera) setVectorDirAndUp [vectorDirVisual _dummy, vectorUpVisual _dummy]; }; diff --git a/addons/spectator/functions/fnc_cam_toggleSlow.sqf b/addons/spectator/functions/fnc_cam_toggleSlow.sqf index 47ad2a2106..e6b8732cdb 100644 --- a/addons/spectator/functions/fnc_cam_toggleSlow.sqf +++ b/addons/spectator/functions/fnc_cam_toggleSlow.sqf @@ -17,7 +17,7 @@ params ["_slowSpeed"]; -if !(GVAR(camSlow) isEqualTo _slowSpeed) then { +if (GVAR(camSlow) isNotEqualTo _slowSpeed) then { private _camera = GVAR(camera); if (GVAR(camMode) == MODE_FREE) then { diff --git a/addons/spectator/functions/fnc_ui_draw3D.sqf b/addons/spectator/functions/fnc_ui_draw3D.sqf index 744e1bfe5e..6affd3f8b6 100644 --- a/addons/spectator/functions/fnc_ui_draw3D.sqf +++ b/addons/spectator/functions/fnc_ui_draw3D.sqf @@ -30,7 +30,7 @@ private _end = AGLToASL screenToWorld getMousePosition; if ((_start distanceSqr _end) <= DISTANCE_NAMES_SQR) then { private _intersections = lineIntersectsSurfaces [_start, _end, _camTarget, _camTargetVeh]; - if !(_intersections isEqualTo []) then { + if (_intersections isNotEqualTo []) then { _cursorObject = effectiveCommander ((_intersections select 0) select 3); }; }; @@ -112,7 +112,7 @@ if !(GVAR(uiMapVisible)) then { private _oldLoc = []; { _x params ["_locNew", "_colorNew"]; - if !(_oldLoc isEqualTo []) then { + if (_oldLoc isNotEqualTo []) then { drawLine3D [_oldLoc, _locNew, _colorNew]; }; _oldLoc = _locNew; diff --git a/addons/spectator/functions/fnc_ui_updateListEntities.sqf b/addons/spectator/functions/fnc_ui_updateListEntities.sqf index 640f860ec0..228dd86a27 100644 --- a/addons/spectator/functions/fnc_ui_updateListEntities.sqf +++ b/addons/spectator/functions/fnc_ui_updateListEntities.sqf @@ -35,7 +35,7 @@ private _entities = [true] call FUNC(getTargetEntities); // Include the group if it contains valid entities private _entitiesGroup = units _group arrayIntersect _entities; - if !(_entitiesGroup isEqualTo []) then { + if (_entitiesGroup isNotEqualTo []) then { // Cache the info of valid units in the group private _unitsInfo = []; { @@ -81,7 +81,7 @@ private _entities = [true] call FUNC(getTargetEntities); } forEach allGroups; // Whether an update to the list is required (really only if something changed) -if !(GVAR(curList) isEqualTo _newList) then { +if (GVAR(curList) isNotEqualTo _newList) then { private _ctrl = CTRL_LIST; // Remove groups/units that are no longer there diff --git a/addons/spectator/functions/fnc_ui_updateWidget.sqf b/addons/spectator/functions/fnc_ui_updateWidget.sqf index 32337eae3d..68a0c1fe4f 100644 --- a/addons/spectator/functions/fnc_ui_updateWidget.sqf +++ b/addons/spectator/functions/fnc_ui_updateWidget.sqf @@ -32,7 +32,7 @@ private _unitTypePicture = ""; private _vehicleTypePicture = ""; private _vehiclePositionPicture = ""; if (_focus != vehicle _focus) then { - _vehicleTypePicture = getText (configFile >> "CfgVehicles" >> typeOf vehicle _focus >> "Picture"); + _vehicleTypePicture = getText (configOf vehicle _focus >> "Picture"); _vehiclePositionPicture = switch (_focus) do { case (commander vehicle _focus): {IMG_COMMANDER}; diff --git a/addons/spectator/initSettings.sqf b/addons/spectator/initSettings.sqf index c970fe77c7..6663d5a908 100644 --- a/addons/spectator/initSettings.sqf +++ b/addons/spectator/initSettings.sqf @@ -5,7 +5,7 @@ LSTRING(Settings_DisplayName), false, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(restrictModes), @@ -16,7 +16,7 @@ true, {}, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(restrictVisions), @@ -27,7 +27,7 @@ true, {}, true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(maxFollowDistance), @@ -36,4 +36,4 @@ LSTRING(Settings_DisplayName), [5, 25, 5, 1], false -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 3ca8c3ba17..5467eb6cc3 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -15,6 +15,7 @@ Espectador Divák Izleyici + Espectador ACE Spectator @@ -30,6 +31,7 @@ ACE Espectador ACE Divák ACE Izleyici + ACE Espectador Configure how the spectator system will operate by default. @@ -60,6 +62,7 @@ IA Ativado AI povoleno AI Etkin + IA Activada Make AI viewable in spectator @@ -74,6 +77,7 @@ Сделать ИИ видимыми в режиме зрителя Permite que IA seja visivel no espectador Umožňuje sledovat AI v módu diváka + Permitir ver a la IA en espectador Camera modes @@ -212,6 +216,7 @@ Distanza massima per seguire Maximální vzdálenost sledování objektu Maksymalna odległość śledzenia + Distancia máxima de seguimiento Maximum distance the follow camera can be from the target @@ -224,6 +229,7 @@ Distance maximale à laquelle la caméra de suivi peut se trouver par rapport à la cible. Maximální vzdálenost při které může kamera sledovat cíl Maksymalna odległość na jakiej kamera może podążać od celu + Distancia máxima que la cámara de seguimiento puede estar del objetivo @@ -321,6 +327,7 @@ Ícones Ikony Ikonlar + Iconos Projectiles @@ -336,6 +343,7 @@ Projéteis Projektily Mermiler + Proyectiles Next Unit @@ -383,6 +391,7 @@ Modo de Visão Režim sledování Görüş Modu + Modo de visión Slow Speed @@ -398,6 +407,7 @@ Velocidade Lenta Pomalá rychlost Yavaş Hız + Velocidad lenta diff --git a/addons/spottingscope/CfgEventHandlers.hpp b/addons/spottingscope/CfgEventHandlers.hpp index b34b3ac099..4e0965ea82 100644 --- a/addons/spottingscope/CfgEventHandlers.hpp +++ b/addons/spottingscope/CfgEventHandlers.hpp @@ -1,22 +1,16 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; -class Extended_PostInit_EventHandlers { - class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); - }; -}; - class Extended_Init_EventHandlers { class ACE_SpottingScopeObject { class ADDON { diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp index 660a3d6749..6be6d70d63 100644 --- a/addons/spottingscope/CfgVehicles.hpp +++ b/addons/spottingscope/CfgVehicles.hpp @@ -41,7 +41,7 @@ class CfgVehicles { EGVAR(dragging,dragPosition)[] = {0,1,0}; EGVAR(dragging,dragDirection) = 0; - class ACE_Actions: ACE_Actions{ + class ACE_Actions: ACE_Actions { class ACE_MainActions: ACE_MainActions { selection = "main_turret_axis"; class ACE_Pickup { diff --git a/addons/spottingscope/README.md b/addons/spottingscope/README.md index a07b9c6c85..8cd42e45ac 100644 --- a/addons/spottingscope/README.md +++ b/addons/spottingscope/README.md @@ -2,10 +2,3 @@ ace_spottingscope =============== Adds a spotting scope. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/spottingscope/XEH_preInit.sqf b/addons/spottingscope/XEH_preInit.sqf index 13d220d959..79c7ec515b 100644 --- a/addons/spottingscope/XEH_preInit.sqf +++ b/addons/spottingscope/XEH_preInit.sqf @@ -11,7 +11,7 @@ PREP_RECOMPILE_END; private _tube = "ACE_SpottingScope_tube" createVehicle [0,0,0]; _tube setDir (getDir _wreck - 180); - _tube setPosASL AGLToASL (_wreck modelToWorld (_wreck selectionPosition "destructionEffect")); + _tube setPosASL _wreck modelToWorldWorld (_wreck selectionPosition "destructionEffect"); _tube setVelocity [1 - random 2, 1 - random 2, 4]; _tube addTorque (vectorNormalized [1 - random 2, 1 - random 2, 1 - random 2] vectorMultiply 4); }] call CBA_fnc_addClassEventHandler; diff --git a/addons/switchunits/ACE_Settings.hpp b/addons/switchunits/ACE_Settings.hpp index 3b1478f270..9f02068f1f 100644 --- a/addons/switchunits/ACE_Settings.hpp +++ b/addons/switchunits/ACE_Settings.hpp @@ -1,51 +1,23 @@ class ACE_Settings { class GVAR(enableSwitchUnits) { - category = CSTRING(DisplayName); - displayName = CSTRING(EnableSwitchUnits_DisplayName); - value = 0; - typeName = "BOOL"; + movedToSQF = 1; }; class GVAR(switchToWest) { - category = CSTRING(DisplayName); - displayName = CSTRING(SwitchToWest_DisplayName); - description = CSTRING(SwitchToWest_Description); - value = 0; - typeName = "BOOL"; + movedToSQF = 1; }; class GVAR(switchToEast) { - category = CSTRING(DisplayName); - displayName = CSTRING(SwitchToEast_DisplayName); - description = CSTRING(SwitchToEast_Description); - value = 0; - typeName = "BOOL"; + movedToSQF = 1; }; class GVAR(switchToIndependent) { - category = CSTRING(DisplayName); - displayName = CSTRING(SwitchToIndependent_DisplayName); - description = CSTRING(SwitchToIndependent_Description); - value = 0; - typeName = "BOOL"; + movedToSQF = 1; }; class GVAR(switchToCivilian) { - category = CSTRING(DisplayName); - displayName = CSTRING(SwitchToCivilian_DisplayName); - description = CSTRING(SwitchToCivilian_Description); - value = 0; - typeName = "BOOL"; + movedToSQF = 1; }; class GVAR(enableSafeZone) { - category = CSTRING(DisplayName); - displayName = CSTRING(EnableSafeZone_DisplayName); - description = CSTRING(EnableSafeZone_Description); - value = 1; - typeName = "BOOL"; + movedToSQF = 1; }; class GVAR(safeZoneRadius) { - category = CSTRING(DisplayName); - displayName = CSTRING(SafeZoneRadius_DisplayName); - description = CSTRING(SafeZoneRadius_Description); - value = 100; - typeName = "SCALAR"; - sliderSettings[] = {0, 1000, 100, 0}; + movedToSQF = 1; }; }; diff --git a/addons/switchunits/CfgEventHandlers.hpp b/addons/switchunits/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/switchunits/CfgEventHandlers.hpp +++ b/addons/switchunits/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/switchunits/README.md b/addons/switchunits/README.md index 029dfc7cf9..07a29a8665 100644 --- a/addons/switchunits/README.md +++ b/addons/switchunits/README.md @@ -2,11 +2,3 @@ ace_switchunits =============== Adds insurgency-style unit switching. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [bux578](https://github.com/bux578) -- [commy2](https://github.com/commy2) diff --git a/addons/switchunits/XEH_postInit.sqf b/addons/switchunits/XEH_postInit.sqf index cffac8b57f..b3937b597a 100644 --- a/addons/switchunits/XEH_postInit.sqf +++ b/addons/switchunits/XEH_postInit.sqf @@ -19,7 +19,7 @@ if (missionNamespace getVariable [QGVAR(EnableSwitchUnits), false]) then { [player] call FUNC(startSwitchUnits); } else { - ["ace_settingChanged", { + ["CBA_SettingChanged", { params ["_name", "_value"]; if ((_name == QGVAR(EnableSwitchUnits)) && {_value}) then { [player] call FUNC(startSwitchUnits); diff --git a/addons/switchunits/XEH_preInit.sqf b/addons/switchunits/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/switchunits/XEH_preInit.sqf +++ b/addons/switchunits/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index 6c2eb0b0d9..2de13634e8 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -54,7 +54,7 @@ GVAR(AllMarkerNames) = []; _markerName setMarkerTextLocal (_x getVariable [QGVAR(PlayerControlledName), ""]); } else { _markerName setMarkerColorLocal _markerColor; - _markerName setMarkerTextLocal (getText (configFile >> "CfgVehicles" >> typeOf _x >> "displayName")); + _markerName setMarkerTextLocal (getText (configOf _x >> "displayName")); }; GVAR(AllMarkerNames) pushBack _markerName; diff --git a/addons/switchunits/initSettings.sqf b/addons/switchunits/initSettings.sqf new file mode 100644 index 0000000000..173cb9112c --- /dev/null +++ b/addons/switchunits/initSettings.sqf @@ -0,0 +1,57 @@ +private _category = format ["ACE %1", localize LSTRING(DisplayName)]; + +[ + QGVAR(enableSwitchUnits), "CHECKBOX", + LSTRING(EnableSwitchUnits_DisplayName), + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(switchToWest), "CHECKBOX", + [LSTRING(SwitchToWest_DisplayName), LSTRING(SwitchToWest_Description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(switchToEast), "CHECKBOX", + [LSTRING(SwitchToEast_DisplayName), LSTRING(SwitchToEast_Description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(switchToIndependent), "CHECKBOX", + [LSTRING(SwitchToIndependent_DisplayName), LSTRING(SwitchToIndependent_Description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(switchToCivilian), "CHECKBOX", + [LSTRING(SwitchToCivilian_DisplayName), LSTRING(SwitchToCivilian_Description)], + _category, + false, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(enableSafeZone), "CHECKBOX", + [LSTRING(EnableSafeZone_DisplayName), LSTRING(EnableSafeZone_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(safeZoneRadius), "SLIDER", + [LSTRING(SafeZoneRadius_DisplayName), LSTRING(SafeZoneRadius_Description)], + _category, + [0, 1000, 100, 0], + 1 +] call CBA_fnc_addSetting; diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 5b118e20cc..c343718f13 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -15,6 +15,7 @@ Přepnout jednotky Changement de camp Birlik Değiştir + Cambiar unidades Switched unit @@ -75,6 +76,7 @@ Habilita troca de time 陣営切り替えを有効化 Включить смену стороны + Habilitar cambio de bando Switch to West? diff --git a/addons/tacticalladder/CfgEventHandlers.hpp b/addons/tacticalladder/CfgEventHandlers.hpp index 5b2eb3a053..48780d7241 100644 --- a/addons/tacticalladder/CfgEventHandlers.hpp +++ b/addons/tacticalladder/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; @@ -27,6 +27,6 @@ class Extended_Killed_EventHandlers { class Extended_DisplayLoad_EventHandlers { class RscDisplayMission { - ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + ADDON = QUOTE(_this call COMPILE_SCRIPT(XEH_missionDisplayLoad)); }; }; diff --git a/addons/tacticalladder/README.md b/addons/tacticalladder/README.md index c4b84b1613..8dab8141c1 100644 --- a/addons/tacticalladder/README.md +++ b/addons/tacticalladder/README.md @@ -2,10 +2,3 @@ ace_tacticalladder =============== Adds a packable tactical ladder. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/tacticalladder/config.cpp b/addons/tacticalladder/config.cpp index def7b0ce96..1060300de5 100644 --- a/addons/tacticalladder/config.cpp +++ b/addons/tacticalladder/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; - units[] = {}; + units[] = {"ACE_TacticalLadder_Pack"}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_apl", "ace_interaction"}; diff --git a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf index 755d13d132..715fcba588 100644 --- a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf @@ -23,7 +23,7 @@ params ["_unit", "_ladder"]; [_unit, "blockThrow", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); private _pos1 = getPosASL _ladder; -private _pos2 = AGLToASL (_ladder modelToWorld (_ladder selectionPosition "check2")); +private _pos2 = _ladder modelToWorldWorld (_ladder selectionPosition "check2"); if (lineIntersects [_pos1, _pos2, _ladder]) exitWith {false}; diff --git a/addons/tagging/CfgEventHandlers.hpp b/addons/tagging/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/tagging/CfgEventHandlers.hpp +++ b/addons/tagging/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/tagging/CfgWeapons.hpp b/addons/tagging/CfgWeapons.hpp index 4405696a08..dbb8340e1d 100644 --- a/addons/tagging/CfgWeapons.hpp +++ b/addons/tagging/CfgWeapons.hpp @@ -2,7 +2,7 @@ class CfgWeapons { class ACE_ItemCore; class CBA_MiscItem_ItemInfo; - class ACE_SpraypaintBlack : ACE_ItemCore { + class ACE_SpraypaintBlack: ACE_ItemCore { author = "jokoho48"; displayname = CSTRING(spraypaintBlack); descriptionShort = CSTRING(descSpraypaint); @@ -15,17 +15,17 @@ class CfgWeapons { mass = 10; }; }; - class ACE_SpraypaintRed : ACE_SpraypaintBlack { + class ACE_SpraypaintRed: ACE_SpraypaintBlack { displayname = CSTRING(spraypaintRed); picture = QPATHTOF(UI\items\itemSpraypaintRed.paa); hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanRed_co.paa)}; }; - class ACE_SpraypaintGreen : ACE_SpraypaintBlack { + class ACE_SpraypaintGreen: ACE_SpraypaintBlack { displayname = CSTRING(spraypaintGreen); picture = QPATHTOF(UI\items\itemSpraypaintGreen.paa); hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanGreen_co.paa)}; }; - class ACE_SpraypaintBlue : ACE_SpraypaintBlack { + class ACE_SpraypaintBlue: ACE_SpraypaintBlack { displayname = CSTRING(spraypaintBlue); picture = QPATHTOF(UI\items\itemSpraypaintBlue.paa); hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanBlue_co.paa)}; diff --git a/addons/tagging/README.md b/addons/tagging/README.md index 1e41cb0c2d..675da9d755 100644 --- a/addons/tagging/README.md +++ b/addons/tagging/README.md @@ -2,11 +2,3 @@ ace_tagging =============== Adds a can of spray paint which allows you to tag buildings, walls and other static objects. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [BaerMitUmlaut](https://github.com/BaerMitUmlaut) -- [Jonpas](https://github.com/jonpas) diff --git a/addons/tagging/XEH_preStart.sqf b/addons/tagging/XEH_preStart.sqf index 342b4b6407..f1abf9e8a5 100644 --- a/addons/tagging/XEH_preStart.sqf +++ b/addons/tagging/XEH_preStart.sqf @@ -4,7 +4,7 @@ private _cacheStaticModels = []; -private _vehicleClasses = "isClass _x && (configName _x) isKindOf 'Static'" configClasses (configFile >> "CfgVehicles"); +private _vehicleClasses = "(configName _x) isKindOf 'Static'" configClasses (configFile >> "CfgVehicles"); // Consider static everything vehicle that inherit from Static // This include houses (which we don't need), but also walls, that we do @@ -16,7 +16,7 @@ private _vehicleClasses = "isClass _x && (configName _x) isKindOf 'Static'" conf }; } forEach _vehicleClasses; -private _nonAIVehicleClasses = "isClass _x" configClasses (configFile >> "CfgNonAIVehicles"); +private _nonAIVehicleClasses = "true" configClasses (configFile >> "CfgNonAIVehicles"); // Also consider static all object inheriting from bridges private _cfgBase = configFile >> "CfgNonAIVehicles"; diff --git a/addons/tagging/functions/fnc_compileConfigTags.sqf b/addons/tagging/functions/fnc_compileConfigTags.sqf index be88a3df62..0fea0693b8 100644 --- a/addons/tagging/functions/fnc_compileConfigTags.sqf +++ b/addons/tagging/functions/fnc_compileConfigTags.sqf @@ -19,7 +19,7 @@ private _class = configName _x; private _result = [_x, false] call FUNC(parseConfigTag); - if !(_result isEqualTo []) then { + if (_result isNotEqualTo []) then { _result params ["_tagInfo", "_requiredItem"]; GVAR(cachedTags) pushBack _tagInfo; @@ -31,7 +31,7 @@ private _class = configName _x; private _result = [_x, true] call FUNC(parseConfigTag); - if !(_result isEqualTo []) then { + if (_result isNotEqualTo []) then { _result params ["_tagInfo", "_requiredItem"]; GVAR(cachedTags) pushBack _tagInfo; diff --git a/addons/tagging/functions/fnc_quickTag.sqf b/addons/tagging/functions/fnc_quickTag.sqf index 7c61dc7b37..0ba5cbb338 100644 --- a/addons/tagging/functions/fnc_quickTag.sqf +++ b/addons/tagging/functions/fnc_quickTag.sqf @@ -47,7 +47,7 @@ if (GVAR(quickTag) == 3) then { }; // Tag -if !(_possibleTags isEqualTo []) then { +if (_possibleTags isNotEqualTo []) then { private _availableTags = _possibleTags select {(_x select 2) in (_unit call EFUNC(common,uniqueItems))}; (selectRandom _availableTags) params ["", "", "", "_textures", "", "_materials", "_tagModel"]; diff --git a/addons/tagging/functions/fnc_tag.sqf b/addons/tagging/functions/fnc_tag.sqf index ce3aa86bbc..b476145c57 100644 --- a/addons/tagging/functions/fnc_tag.sqf +++ b/addons/tagging/functions/fnc_tag.sqf @@ -95,7 +95,7 @@ private _fnc_isOk = { // If there's no intersections if (_intersections isEqualTo []) exitWith {false;}; - if !(((_intersections select 0) select 3) isEqualTo _object) exitWith {false;}; + if (((_intersections select 0) select 3) isNotEqualTo _object) exitWith {false;}; true }; diff --git a/addons/tagging/initSettings.sqf b/addons/tagging/initSettings.sqf index c5d0fbfa42..72672032ff 100644 --- a/addons/tagging/initSettings.sqf +++ b/addons/tagging/initSettings.sqf @@ -6,4 +6,4 @@ false, // isGlobal {[QGVAR(quickTag), _this] call EFUNC(common,cbaSettings_settingChanged)}, false // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/tagging/stringtable.xml b/addons/tagging/stringtable.xml index bcb9e34d5d..56c1346932 100644 --- a/addons/tagging/stringtable.xml +++ b/addons/tagging/stringtable.xml @@ -15,6 +15,7 @@ Marcação Označování Işaretleme + Marcado Configure how the tagging system will operate by default. @@ -29,6 +30,7 @@ 定義噴漆系統預設設定 Configura como o sistema de Marcação funcionará como padrão. (Tagging) Nakonfigurujte, jak bude systém značkování ve výchozím nastavení fungovat. + Configura cómo funciona el sistema de marcado por defecto. Spray Paint - Quick Tag @@ -44,6 +46,7 @@ Lata de Tinta - Marcação Rápida Stříkací barva - Rychlá značka Sprey Boya- Hızlı Işaretleme + Pintada con spray - Marcado rápido Action performed on main tag interaction point. @@ -58,6 +61,7 @@ 直接噴漆在互動選單瞄準的點上。 Ação executada no ponto principal de marcação Akce prováděná v hlavním bodě značky interakce. + Acción realizada en el punto de interacción de marcado principal. Last Used @@ -73,6 +77,7 @@ Último usado Naposledy použitý Son Kullanan + Último usado Random X @@ -88,6 +93,7 @@ Aleatório X Náhodné X Rasgele X + Aleatorio X Random @@ -103,6 +109,7 @@ Aleatório Náhodný Rasgele + Aleatorio Tag diff --git a/addons/thermals/README.md b/addons/thermals/README.md index edec645164..7fc50b3e26 100644 --- a/addons/thermals/README.md +++ b/addons/thermals/README.md @@ -2,11 +2,3 @@ ace_thermals ============ Improves the thermal properties of humans. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/towing/$PBOPREFIX$ b/addons/towing/$PBOPREFIX$ new file mode 100644 index 0000000000..6755fcc3bf --- /dev/null +++ b/addons/towing/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\towing \ No newline at end of file diff --git a/addons/towing/CfgEventHandlers.hpp b/addons/towing/CfgEventHandlers.hpp new file mode 100644 index 0000000000..f6503c2479 --- /dev/null +++ b/addons/towing/CfgEventHandlers.hpp @@ -0,0 +1,17 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/towing/CfgVehicles.hpp b/addons/towing/CfgVehicles.hpp new file mode 100644 index 0000000000..f74cf5d300 --- /dev/null +++ b/addons/towing/CfgVehicles.hpp @@ -0,0 +1,85 @@ +#define TOW_ACTION \ +class ACE_Actions {\ + class ACE_MainActions {\ + class ADDON {\ + displayName = CSTRING(displayName);\ + distance = TOW_ACTION_DISTANCE;\ + condition = QUOTE([ARR_1(_target)] call FUNC(isSuitableSimulation));\ + statement = "";\ + exceptions[] = { INTERACTION_EXCEPTIONS };\ + showDisabled = 0;\ + icon = "";\ + class GVAR(startTow3) {\ + displayName = CSTRING(start3);\ + condition = QUOTE(([ARR_2(_player,_target)] call FUNC(canStartTow)) && [ARR_2(_player, 'ACE_rope3')] call EFUNC(common,hasItem));\ + statement = QUOTE([ARR_3(_player,_target,'ACE_rope3')] call FUNC(startTow));\ + exceptions[] = { INTERACTION_EXCEPTIONS };\ + };\ + class GVAR(startTow6) {\ + displayName = CSTRING(start6);\ + condition = QUOTE(([ARR_2(_player,_target)] call FUNC(canStartTow)) && [ARR_2(_player, 'ACE_rope6')] call EFUNC(common,hasItem));\ + statement = QUOTE([ARR_3(_player,_target,'ACE_rope6')] call FUNC(startTow));\ + exceptions[] = { INTERACTION_EXCEPTIONS };\ + };\ + class GVAR(startTow12) {\ + displayName = CSTRING(start12);\ + condition = QUOTE(([ARR_2(_player,_target)] call FUNC(canStartTow)) && [ARR_2(_player, 'ACE_rope12')] call EFUNC(common,hasItem));\ + statement = QUOTE([ARR_3(_player,_target,'ACE_rope12')] call FUNC(startTow));\ + exceptions[] = { INTERACTION_EXCEPTIONS };\ + };\ + class GVAR(startTow15) {\ + displayName = CSTRING(start15);\ + condition = QUOTE(([ARR_2(_player,_target)] call FUNC(canStartTow)) && [ARR_2(_player, 'ACE_rope15')] call EFUNC(common,hasItem));\ + statement = QUOTE([ARR_3(_player,_target,'ACE_rope15')] call FUNC(startTow));\ + exceptions[] = { INTERACTION_EXCEPTIONS };\ + };\ + class GVAR(startTow18) {\ + displayName = CSTRING(start18);\ + condition = QUOTE(([ARR_2(_player,_target)] call FUNC(canStartTow)) && [ARR_2(_player, 'ACE_rope18')] call EFUNC(common,hasItem));\ + statement = QUOTE([ARR_3(_player,_target,'ACE_rope18')] call FUNC(startTow));\ + exceptions[] = { INTERACTION_EXCEPTIONS };\ + };\ + class GVAR(startTow27) {\ + displayName = CSTRING(start27);\ + condition = QUOTE(([ARR_2(_player,_target)] call FUNC(canStartTow)) && [ARR_2(_player, 'ACE_rope27')] call EFUNC(common,hasItem));\ + statement = QUOTE([ARR_3(_player,_target,'ACE_rope27')] call FUNC(startTow));\ + exceptions[] = { INTERACTION_EXCEPTIONS };\ + };\ + class GVAR(startTow36) {\ + displayName = CSTRING(start36);\ + condition = QUOTE(([ARR_2(_player,_target)] call FUNC(canStartTow)) && [ARR_2(_player, 'ACE_rope36')] call EFUNC(common,hasItem));\ + statement = QUOTE([ARR_3(_player,_target,'ACE_rope36')] call FUNC(startTow));\ + exceptions[] = { INTERACTION_EXCEPTIONS };\ + };\ + };\ + };\ +} + +class CfgVehicles { + class LandVehicle; + class Car: LandVehicle { + TOW_ACTION; + }; + + class Tank: LandVehicle { + TOW_ACTION; + }; + + class ThingX; + class GVAR(hook): ThingX { + displayName = "hook"; // not publicly visible, no stringtable needed + scope = 1; + scopeCurator = 1; + model = "\a3\Structures_F_Orange\VR\Helpers\Sign_sphere10cm_Geometry_F.p3d"; + destrType = "DestructNo"; + + class ACE_Actions { + class ACE_MainActions { + displayName = CSTRING(detach); + condition = "true"; + statement = QUOTE(private _parent = _target getVariable [ARR_2(QQGVAR(parent), objNull)]; private _child = _target getVariable [ARR_2(QQGVAR(child), objNull)]; [ARR_3(_player,_parent,_child)] call FUNC(detach)); + distance = 2; + }; + }; + }; +}; diff --git a/addons/towing/README.md b/addons/towing/README.md new file mode 100644 index 0000000000..ad6bfd14cc --- /dev/null +++ b/addons/towing/README.md @@ -0,0 +1,4 @@ +ace_towing +=================== + +Adds the ability to tow vehicles. diff --git a/addons/towing/XEH_PREP.hpp b/addons/towing/XEH_PREP.hpp new file mode 100644 index 0000000000..f3937e01c3 --- /dev/null +++ b/addons/towing/XEH_PREP.hpp @@ -0,0 +1,8 @@ +PREP(attachRopePFH); +PREP(canStartTow); +PREP(detach); +PREP(isSuitableSimulation); +PREP(onMouseButtonDown); +PREP(onMouseButtonUp); +PREP(startTow); +PREP(towStateMachinePFH); diff --git a/addons/towing/XEH_postInit.sqf b/addons/towing/XEH_postInit.sqf new file mode 100644 index 0000000000..455532f889 --- /dev/null +++ b/addons/towing/XEH_postInit.sqf @@ -0,0 +1,14 @@ +#include "script_component.hpp" +["MouseButtonDown", LINKFUNC(onMouseButtonDown)] call CBA_fnc_addDisplayHandler; +["MouseButtonUp", LINKFUNC(onMouseButtonUp)] call CBA_fnc_addDisplayHandler; +GVAR(mouseLeft) = false; +GVAR(mouseRight) = false; + +GVAR(cancel) = false; +GVAR(canAttach) = false; + +[QGVAR(setTowParent), { + params ["_parent", "_child"]; + _child setTowParent _parent; +}] call CBA_fnc_addEventHandler; + diff --git a/addons/towing/XEH_preInit.sqf b/addons/towing/XEH_preInit.sqf new file mode 100644 index 0000000000..b47cf6628d --- /dev/null +++ b/addons/towing/XEH_preInit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/addons/towing/XEH_preStart.sqf b/addons/towing/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/towing/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/towing/config.cpp b/addons/towing/config.cpp new file mode 100644 index 0000000000..32b80109ea --- /dev/null +++ b/addons/towing/config.cpp @@ -0,0 +1,19 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common", "ace_logistics_rope"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Brandon (TCVM)"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" + diff --git a/addons/towing/functions/fnc_attachRopePFH.sqf b/addons/towing/functions/fnc_attachRopePFH.sqf new file mode 100644 index 0000000000..5fd9fd6f32 --- /dev/null +++ b/addons/towing/functions/fnc_attachRopePFH.sqf @@ -0,0 +1,79 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * PFH which allows the user to attach a rope to the given target vehicle + * + * Arguments: + * 0: Unit wanting to attach rope + * 1: Vehicle to attach rope + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call ace_towing_fnc_attachRopePFH + * + * Public: No + */ +params ["_unit", "_target", "_ignoreParent", "_ignoreRope", "_source", "_maxRange"]; + +private _viewDirection = getCameraViewDirection _unit; +GVAR(attachHelper) setPosASL (_unit modelToWorldVisualWorld [0, 1, 1.5]); + +private _hintLMB = ""; +private _hintRMB = localize ELSTRING(dragging,Drop); + +private _startPos = eyePos _unit; +private _endPos = _startPos vectorAdd (_viewDirection vectorMultiply TOW_ACTION_DISTANCE); +private _intersections = lineIntersectsSurfaces [_startPos, _endPos, _unit, GVAR(attachHelper), true, 2]; +GVAR(canAttach) = false; +if (_intersections isNotEqualTo []) then { + private _intersectionToUse = []; + { + _x params ["", "", "_object"]; + if (_object isKindOf "AllVehicles" && { _object isNotEqualTo _ignoreRope && { _object isNotEqualTo _ignoreParent } }) exitWith { + _intersectionToUse = _x; + }; + } forEach _intersections; + + if (_intersectionToUse isEqualTo []) exitWith {}; + + _intersectionToUse params ["_intersectPosition", "", "_intersectObject"]; + + // if we have a target object, we assume we are attaching to the parent. If no target object, we are attaching to child + GVAR(canAttach) = (_intersectObject isNotEqualTo _ignoreParent) && { (!isNull _target && { _intersectObject isEqualTo _target }) || { isNull _target && { [_intersectObject] call FUNC(isSuitableSimulation) }}} && { !(_intersectObject getVariable [QGVAR(towing), false]) }; + + if (GVAR(canAttach)) then { + TRACE_4("can attach",_target,_intersectObject,_ignoreParent,_ignoreRope); + GVAR(attachHelper) setPosASL _intersectPosition; + _hintLMB = localize LSTRING(attach); + + GVAR(attachHelper) setVariable [QGVAR(object), _intersectObject]; + }; + +}; + +if (_source isNotEqualTo [0, 0, 0]) then { + private _distanceFromSource = _source vectorDistance getPosASLVisual GVAR(attachHelper); + if (_distanceFromSource > _maxRange) then { + GVAR(canAttach) = false; + + private _direction = _source vectorFromTo getPosASLVisual GVAR(attachHelper); + GVAR(attachHelper) setPosASL (_source vectorAdd (_direction vectorMultiply _maxRange)); + + _hintLMB = ""; + + if (_distanceFromSource > _maxRange + 2) then { + GVAR(cancel) = true; + } else { + GVAR(cancel) = false; + }; + }; +}; + +private _hint = [_hintLMB, _hintRMB]; +if (_hint isNotEqualTo (_unit getVariable [QGVAR(hint), []])) then { + _unit setVariable [QGVAR(hint), _hint]; + _hint call EFUNC(interaction,showMouseHint); +}; + diff --git a/addons/towing/functions/fnc_canStartTow.sqf b/addons/towing/functions/fnc_canStartTow.sqf new file mode 100644 index 0000000000..593762c68c --- /dev/null +++ b/addons/towing/functions/fnc_canStartTow.sqf @@ -0,0 +1,21 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Condition for whether or not we can tow from this object + * + * Arguments: + * 0: Unit wanting to start towing + * 1: Vehicle to tow from + * + * Return Value: + * Whether or not we can start towing + * + * Example: + * [player, cursorObject] call ace_towing_fnc_canStartTow + * + * Public: No + */ +params ["_unit", "_target"]; +private _isTowing = _target getVariable [QGVAR(towing), false]; +TRACE_1("is towing",_isTowing); +!_isTowing diff --git a/addons/towing/functions/fnc_detach.sqf b/addons/towing/functions/fnc_detach.sqf new file mode 100644 index 0000000000..e7cd95e079 --- /dev/null +++ b/addons/towing/functions/fnc_detach.sqf @@ -0,0 +1,48 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Detaches child from parent, and gives rope item back + * + * Arguments: + * 0: Parent + * 1: Child + * + * Return Value: + * None + * + * Example: + * [player, cursorObject] call ace_towing_fnc_detach + * + * Public: No + */ +params ["_unit", "_parent", "_child"]; +TRACE_3("detach",_unit,_parent,_child); + +private _hook = _child getVariable [QGVAR(hook), objNull]; + +_parent removeEventHandler ["Deleted", _hook getVariable QGVAR(parentDeleteEventHandler)]; +_hook setVariable [QGVAR(parentDeleteEventHandler), -1]; + +_child removeEventHandler ["Deleted", _hook getVariable QGVAR(childDeleteEventHandler)]; +_hook setVariable [QGVAR(childDeleteEventHandler), -1]; + +_parent removeEventHandler ["RopeBreak", _parent getVariable QGVAR(ropeBreakEventHandler)]; +_parent setVariable [QGVAR(ropeBreakEventHandler), -1]; + +private _rope = _child getVariable [QGVAR(rope), objNull]; +ropeDestroy _rope; + +private _ropeClass = _hook getVariable [QGVAR(ropeClass), ""]; +deleteVehicle _hook; + +TRACE_1("rope",_ropeClass); + +if (_ropeClass isNotEqualTo "") then { + [_unit, _ropeClass, true] call CBA_fnc_addItem; +}; + +[QGVAR(setTowParent), [objNull, _child], _child] call CBA_fnc_targetEvent; + +_child setVariable [QGVAR(towing), false, true]; +_parent setVariable [QGVAR(towing), false, true]; + diff --git a/addons/towing/functions/fnc_isSuitableSimulation.sqf b/addons/towing/functions/fnc_isSuitableSimulation.sqf new file mode 100644 index 0000000000..076b7933c3 --- /dev/null +++ b/addons/towing/functions/fnc_isSuitableSimulation.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Condition for whether or not this object is a simulation type which can be a tow parent (TankX or CarX) + * + * Arguments: + * 0: Vehicle to tow from + * 1: Check type - Parent or Child + * + * Return Value: + * Whether or not this vehicle can tow + * + * Example: + * [cursorObject] call ace_towing_fnc_isSuitableSimulation + * + * Public: No + */ +params ["_target"]; + +// need toLower since apparently this isn't case sensitive +private _simulationType = getText ((configOf _target) >> "simulation"); +TRACE_1("sim type",_simulationType); + +// Biki lies, you can both tow and tow as either TankX or CarX +(toLower _simulationType) in ["tankx", "carx"] + diff --git a/addons/towing/functions/fnc_onMouseButtonDown.sqf b/addons/towing/functions/fnc_onMouseButtonDown.sqf new file mode 100644 index 0000000000..a20c2cf38c --- /dev/null +++ b/addons/towing/functions/fnc_onMouseButtonDown.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Handles mouse interaction for attaching rope + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_towing_fnc_onMouseButtonDown + * + * Public: No + */ +params ["", "_button"]; + +if (_button > 1) exitWith {}; + +if (_button == 1) then { + GVAR(mouseRight) = true; +} else { + GVAR(mouseLeft) = true; +} + diff --git a/addons/towing/functions/fnc_onMouseButtonUp.sqf b/addons/towing/functions/fnc_onMouseButtonUp.sqf new file mode 100644 index 0000000000..ff0bac85d3 --- /dev/null +++ b/addons/towing/functions/fnc_onMouseButtonUp.sqf @@ -0,0 +1,26 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Handles mouse interaction for attaching rope + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_towing_fnc_onMouseButtonUp + * + * Public: No + */ +params ["", "_button"]; + +if (_button > 1) exitWith {}; + +if (_button == 1) then { + GVAR(mouseRight) = false; +} else { + GVAR(mouseLeft) = false; +} + diff --git a/addons/towing/functions/fnc_startTow.sqf b/addons/towing/functions/fnc_startTow.sqf new file mode 100644 index 0000000000..d216576499 --- /dev/null +++ b/addons/towing/functions/fnc_startTow.sqf @@ -0,0 +1,33 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Start rope attach PFH + * + * Arguments: + * 0: Unit wanting to start towing + * 1: Vehicle to tow from + * 2: Rope Classname + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "ACE_rope3"] call ace_towing_fnc_startTow + * + * Public: No + */ +params ["_unit", "_target", "_ropeClass"]; + +GVAR(attachHelper) = "Sign_Sphere10cm_F" createVehicleLocal [0, 0, 0]; +[_unit] call EFUNC(weaponselect,putWeaponAway); + +private _ropeLength = getNumber (configFile >> "CfgWeapons" >> _ropeClass >> QEGVAR(logistics_rope,length)); +if (_ropeLength == 0) then { + _ropeLength = 3; +}; + +_unit removeItem _ropeClass; + +GVAR(canAttach) = false; +[LINKFUNC(towStateMachinePFH), 0, [TOW_STATE_ATTACH_PARENT, _unit, _target, objNull, _ropeLength, _ropeClass]] call CBA_fnc_addPerFrameHandler; + diff --git a/addons/towing/functions/fnc_towStateMachinePFH.sqf b/addons/towing/functions/fnc_towStateMachinePFH.sqf new file mode 100644 index 0000000000..326a9aeee5 --- /dev/null +++ b/addons/towing/functions/fnc_towStateMachinePFH.sqf @@ -0,0 +1,144 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Called per frame. Handles current unit state for attaching a rope to two vehicles + * + * Arguments: + * 0: PFEH Args + * 1: PFID + * + * Return Value: + * None + * + * Example: + * [[],0]] call ace_towing_fnc_towStateMachinePFH + * + * Public: No + */ +params ["_args", "_handle"]; +_args params ["_state", "_unit", "_parent", "_rope", "_length", "_ropeClass"]; + +private _exitCondition = !( + (alive GVAR(attachHelper)) && + { alive _parent } && + { alive _unit } && + { "" isEqualTo currentWeapon _unit || { _unit call EFUNC(common,isSwimming) }} && + { [_unit, objNull, [INTERACTION_EXCEPTIONS]] call EFUNC(common,canInteractWith) } && + { "unconscious" isNotEqualTo toLower animationState _unit } && + { !(_unit getVariable ["ACE_isUnconscious", false]) } +); + +if (_exitCondition) then { + _state = TOW_STATE_CANCEL; +}; + +switch (_state) do { + case TOW_STATE_ATTACH_PARENT: { + TRACE_2("state attach parent",_unit,_parent); + [_unit, _parent, objNull, objNull, [0, 0, 0], _length] call FUNC(attachRopePFH); + + if (GVAR(canAttach) && { GVAR(mouseLeft) }) then { + _args set [0, TOW_STATE_ATTACH_CHILD]; + _rope = ropeCreate [_parent, _parent worldToModelVisual ASLtoAGL getPosASLVisual GVAR(attachHelper), _length]; + [GVAR(attachHelper), [0, 0, 0]] ropeAttachTo _rope; + + _args set [3, _rope]; + }; + + if (GVAR(mouseRight)) then { + _args set [0, TOW_STATE_CANCEL]; + }; + }; + case TOW_STATE_ATTACH_CHILD: { + TRACE_3("state attach child",_unit,_parent,_rope); + [_unit, objNull, _parent, _rope, getPosASLVisual _rope, _length] call FUNC(attachRopePFH); + + if (GVAR(canAttach) && { GVAR(mouseLeft) }) then { + _args set [0, TOW_STATE_ATTACH]; + }; + + if (GVAR(mouseRight) || GVAR(cancel)) then { + _args set [0, TOW_STATE_CANCEL]; + GVAR(cancel) = false; + }; + }; + case TOW_STATE_ATTACH: { + TRACE_3("state attach",GVAR(attachHelper),_parent,_rope); + private _child = GVAR(attachHelper) getVariable [QGVAR(object), objNull]; + private _relativeAttachPos = _child worldToModelVisual ASLtoAGL getPosASLVisual GVAR(attachHelper); + + TRACE_3("child&pos",_parent,_child,_relativeAttachPos); + + if (_child isEqualTo _parent) exitWith { + _args set [0, TOW_STATE_CANCEL]; + ERROR_MSG("_child isEqualTo _parent"); + }; + + [QGVAR(setTowParent), [_parent, _child], _parent] call CBA_fnc_targetEvent; + + GVAR(attachHelper) ropeDetach _rope; + [_child, _relativeAttachPos] ropeAttachTo _rope; + + private _hook = createVehicle [QGVAR(hook), [0, 0, 0], [], 0, "NONE"]; + _hook attachTo [_child, _relativeAttachPos]; + + _hook setVariable [QGVAR(parent), _parent, true]; + _hook setVariable [QGVAR(child), _child, true]; + _child setVariable [QGVAR(rope), _rope, true]; + _child setVariable [QGVAR(hook), _hook, true]; + + _parent setVariable [QGVAR(hook), _hook, true]; + + _hook setVariable [QGVAR(ropeClass), _ropeClass, true]; + + _child setVariable [QGVAR(towing), true, true]; + _parent setVariable [QGVAR(towing), true, true]; + + _hook setVariable [QGVAR(parentDeleteEventHandler), _parent addEventHandler ["Deleted", { + params ["_entity"]; + + private _hook = _entity getVariable [QGVAR(hook), objNull]; + private _child = _hook getVariable [QGVAR(child), objNull]; + private _parent = _hook getVariable [QGVAR(parent), objNull]; + + [objNull, _parent, _child] call FUNC(detach); + }], true]; + + _hook setVariable [QGVAR(childDeleteEventHandler), _child addEventHandler ["Deleted", { + params ["_entity"]; + + private _hook = _entity getVariable [QGVAR(hook), objNull]; + private _child = _hook getVariable [QGVAR(child), objNull]; + private _parent = _hook getVariable [QGVAR(parent), objNull]; + + [objNull, _parent, _child] call FUNC(detach); + }], true]; + + _parent setVariable [QGVAR(ropeBreakEventHandler), _parent addEventHandler ["RopeBreak", { + params ["_parent", "_rope", "_child"]; + + [objNull, _parent, _child] call FUNC(detach); + + _parent removeEventHandler ["RopeBreak", _parent getVariable QGVAR(ropeBreakEventHandler)]; + _parent setVariable [QGVAR(ropeBreakEventHandler), -1]; + }], true]; + + _args set [0, TOW_STATE_CLEANUP]; + }; + case TOW_STATE_CANCEL: { + TRACE_1("state cancel",_rope); + ropeDestroy _rope; + [_unit, _ropeClass, true] call CBA_fnc_addItem; + _args set [0, TOW_STATE_CLEANUP]; + + (localize LSTRING(canceled)) call CBA_fnc_notify; + }; + case TOW_STATE_CLEANUP: { + TRACE_2("state cleanup",GVAR(attachHelper),_handle); + deleteVehicle GVAR(attachHelper); + [_handle] call CBA_fnc_removePerFrameHandler; + _unit setVariable [QGVAR(hint), []]; + call EFUNC(interaction,hideMouseHint); + }; +}; + diff --git a/addons/towing/functions/script_component.hpp b/addons/towing/functions/script_component.hpp new file mode 100644 index 0000000000..cb87a08576 --- /dev/null +++ b/addons/towing/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\towing\script_component.hpp" \ No newline at end of file diff --git a/addons/towing/script_component.hpp b/addons/towing/script_component.hpp new file mode 100644 index 0000000000..d3c12463c9 --- /dev/null +++ b/addons/towing/script_component.hpp @@ -0,0 +1,27 @@ +#define COMPONENT towing +#define COMPONENT_BEAUTIFIED Towing +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_TOWING + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_TOWING + #define DEBUG_SETTINGS DEBUG_SETTINGS_TOWING +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + +#define TOW_ACTION_DISTANCE 3 +#define INTERACTION_EXCEPTIONS "isNotInside", "isNotOnLadder", "isNotSwimming" + +#define TOW_STATE_ATTACH_PARENT 0 +#define TOW_STATE_ATTACH_CHILD 1 +#define TOW_STATE_ATTACH 2 +#define TOW_STATE_CANCEL 3 +#define TOW_STATE_CLEANUP 4 + diff --git a/addons/towing/stringtable.xml b/addons/towing/stringtable.xml new file mode 100644 index 0000000000..91f189d4e0 --- /dev/null +++ b/addons/towing/stringtable.xml @@ -0,0 +1,49 @@ + + + + + Towing + けん引 + + + Attach Tow Rope + けん引ロープを取り付け + + + Attaching Cancelled + 取り付けを中止しました + + + Attach Tow Rope (3.2m) + けん引ロープ (3.2m) を取り付け + + + Attach Tow Rope (6.2m) + けん引ロープ (6.2m) を取り付け + + + Attach Tow Rope (12.2m) + けん引ロープ (12.2m) を取り付け + + + Attach Tow Rope (15.2m) + けん引ロープ (15.2m) を取り付け + + + Attach Tow Rope (18.2m) + けん引ロープ (18.2m) を取り付け + + + Attach Tow Rope (27.2m) + けん引ロープ (28.2m) を取り付け + + + Attach Tow Rope (36.2m) + けん引ロープ (36.2m) を取り付け + + + Detach Tow Rope + けん引ロープを外す + + + diff --git a/addons/trenches/CfgEventHandlers.hpp b/addons/trenches/CfgEventHandlers.hpp index 5b2eb3a053..48780d7241 100644 --- a/addons/trenches/CfgEventHandlers.hpp +++ b/addons/trenches/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; @@ -27,6 +27,6 @@ class Extended_Killed_EventHandlers { class Extended_DisplayLoad_EventHandlers { class RscDisplayMission { - ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + ADDON = QUOTE(_this call COMPILE_SCRIPT(XEH_missionDisplayLoad)); }; }; diff --git a/addons/trenches/README.md b/addons/trenches/README.md index 8b4a0d7a36..0d33527da4 100644 --- a/addons/trenches/README.md +++ b/addons/trenches/README.md @@ -6,7 +6,7 @@ Adds 2 trenches; Envelope - Small & Envelop - Big ### Whitelist surfaces for digging Single surfaces can be whitelisted by adding `ACE_canDig = 1` into `CfgSurfaces`. -Example: +Example: ```cpp class CfgSurfaces { class myAwesomeSurface { @@ -15,8 +15,3 @@ class CfgSurfaces { }; ``` -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Grey](https://github.com/Grey-Soldierman) diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf index 951bfa9d21..4c6c6f9546 100644 --- a/addons/trenches/functions/fnc_continueDiggingTrench.sqf +++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf @@ -25,7 +25,7 @@ if(_actualProgress == 1) exitWith {}; // Mark trench as being worked on _trench setVariable [QGVAR(digging), true, true]; -private _digTime = missionNamespace getVariable [getText (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(diggingDuration)), 20]; +private _digTime = missionNamespace getVariable [getText (configOf _trench >> QGVAR(diggingDuration)), 20]; private _digTimeLeft = _digTime * (1 - _actualProgress); private _placeData = _trench getVariable [QGVAR(placeData), [[], []]]; @@ -75,11 +75,11 @@ if(_actualProgress == 0) then { //Remove grass { private _trenchGrassCutter = createVehicle ["Land_ClutterCutter_medium_F", [0, 0, 0], [], 0, "NONE"]; - private _cutterPos = AGLToASL (_trench modelToWorld _x); + private _cutterPos = _trench modelToWorldWorld _x; _cutterPos set [2, getTerrainHeightASL _cutterPos]; _trenchGrassCutter setPosASL _cutterPos; deleteVehicle _trenchGrassCutter; - } foreach getArray (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(grassCuttingPoints)); + } foreach getArray (configOf _trench >> QGVAR(grassCuttingPoints)); }; private _progressLeft = (_actualProgress * 10) + 1; diff --git a/addons/trenches/functions/fnc_removeTrench.sqf b/addons/trenches/functions/fnc_removeTrench.sqf index 868daa738c..2cdb874846 100644 --- a/addons/trenches/functions/fnc_removeTrench.sqf +++ b/addons/trenches/functions/fnc_removeTrench.sqf @@ -25,7 +25,7 @@ if(_actualProgress == 0) exitWith {}; // Mark trench as being worked on _trench setVariable [QGVAR(digging), true, true]; -private _removeTime = missionNamespace getVariable [getText (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(removalDuration)), 12]; +private _removeTime = missionNamespace getVariable [getText (configOf _trench >> QGVAR(removalDuration)), 12]; private _removeTimeLeft = _removeTime * _actualProgress; if (isNil {_trench getVariable QGVAR(placeData)}) then { diff --git a/addons/trenches/stringtable.xml b/addons/trenches/stringtable.xml index 6f76eb4afe..bcbf18e942 100644 --- a/addons/trenches/stringtable.xml +++ b/addons/trenches/stringtable.xml @@ -208,6 +208,7 @@ 继续盖掩体 繼續蓋掩體 Kazmaya Devam Et + Continuar cavando trinchera Remove Trench @@ -223,6 +224,7 @@ 移除掩体 移除掩體 Siperi Kaldır + Eliminar trinchera Removing Trench @@ -238,51 +240,79 @@ 正在移除掩体 移除掩體中 Siper Kaldırılıyor + Eliminando trinchera ACE Trenches + ACE Окопы ACE Tranchées ACE 塹壕 + ACETrincheras + ACE Okopy Small Trench Dig Duration + Продолжительность копания малого окопа Petites tranchées - durée d'excavation 小型塹壕の完成時間 + Tiempo de cavar trinchera pequeña + Czas kopania małego okopu Time, in seconds, required to dig a small trench. + Время в секундах, необходимое для рытья малого окопа Définit le temps nécessaire au déploiement des petites tranchées (en secondes). 小型塹壕が完成するまでの時間 (秒) を設定できます。 + Tiempo, en segundos, requerido para cavar una trinchera pequeña. + Czas, w sekundach wymagany do wykopania małego okopu Small Trench Remove Duration + Продолжительность удаления малого окопа Petites tranchées - durée de retrait 小型塹壕の削除時間 + Tiempo de eliminar trinchera pequeña + Czas usuwania małego okopu Time, in seconds, required to remove a small trench. + Время в секундах, необходимое для удаления малого окопа Définit le temps nécessaire pour le retrait des petites tranchées (en secondes). 小型塹壕が削除されるまでの時間 (秒) を設定できます。 + Tiempo, en segundos, requerido para eliminar una trinchera pequeña. + Czas, w sekundach wymagany do usunięcia małego okopu Big Trench Dig Duration + Продолжительность рытья большого окопа Grandes tranchées - durée d'excavation 大型塹壕の完成時間 + Tiempo de cavar trinchera grande + Czas kopania dużego okopu Time, in seconds, required to dig a big trench. + Время в секундах, необходимое для рытья большого окопа Définit le temps nécessaire au déploiement des grandes tranchées (en secondes). 大型塹壕が完成するまでの時間 (秒) を設定できます。 + Tiempo, en segundos, requerido para cavar una trinchera grande + Czas, w sekundach wymagany do wykopania dużego okopu Big Trench Remove Duration + Продолжительность удаления большого окопа Grandes tranchées - durée de retrait 大型塹壕の削除時間 + Tiempo de eliminar trinchera grande + Czas usuwania dużego okopu Time, in seconds, required to remove a big trench. + Время в секундах, необходимое для удаления большого окопа Définit le temps nécessaire pour le retrait des grandes tranchées (en secondes). 大型塹壕が削除されるまでの時間 (秒) を設定できます。 + Tiempo, en segundos, requerido para eliminar una trinchera grande + Czas, w sekundach wymagany do usunięcia dużego okopu diff --git a/addons/tripod/CfgEventHandlers.hpp b/addons/tripod/CfgEventHandlers.hpp index 3a79000a3c..f7a5fa3747 100644 --- a/addons/tripod/CfgEventHandlers.hpp +++ b/addons/tripod/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/tripod/README.md b/addons/tripod/README.md index beb6791b6d..a0483c863e 100644 --- a/addons/tripod/README.md +++ b/addons/tripod/README.md @@ -2,10 +2,3 @@ ace_tripod =============== Adds a packable tripod. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/tripod/functions/fnc_adjust.sqf b/addons/tripod/functions/fnc_adjust.sqf index d2a837c89e..2dd6964768 100644 --- a/addons/tripod/functions/fnc_adjust.sqf +++ b/addons/tripod/functions/fnc_adjust.sqf @@ -30,6 +30,7 @@ GVAR(adjustPFH) = [{ [_unit, "DefaultAction", _unit getVariable [QGVAR(Adjust), -1]] call EFUNC(common,removeActionEventHandler); [_this select 1] call CBA_fnc_removePerFrameHandler; + GVAR(adjustPFH) = -1; }; { diff --git a/addons/ui/ACE_Settings.hpp b/addons/ui/ACE_Settings.hpp index c02d5be2b6..5e747baee9 100644 --- a/addons/ui/ACE_Settings.hpp +++ b/addons/ui/ACE_Settings.hpp @@ -1,285 +1,116 @@ class ACE_Settings { class GVAR(allowSelectiveUI) { - category = CSTRING(Category); - displayName = CSTRING(AllowSelectiveUI); - description = CSTRING(AllowSelectiveUI_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; // BASIC class GVAR(soldierVehicleWeaponInfo) { - category = CSTRING(Category); - displayName = CSTRING(SoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(vehicleRadar) { - category = CSTRING(Category); - displayName = CSTRING(VehicleRadar); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(vehicleCompass) { - category = CSTRING(Category); - displayName = CSTRING(VehicleCompass); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(commandMenu) { - category = CSTRING(Category); - displayName = CSTRING(CommandMenu); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(groupBar) { - category = CSTRING(Category); - displayName = CSTRING(GroupBar); - typeName = "BOOL"; - value = 0; - isClientSettable = 1; + movedToSQF = 1; }; // ADVANCED // Soldier class GVAR(weaponName) { - category = CSTRING(Category); - displayName = CSTRING(WeaponName); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(weaponNameBackground) { - category = CSTRING(Category); - displayName = CSTRING(WeaponNameBackground); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(firingMode) { - category = CSTRING(Category); - displayName = CSTRING(FiringMode); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(ammoType) { - category = CSTRING(Category); - displayName = CSTRING(AmmoType); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(ammoCount) { - category = CSTRING(Category); - displayName = CSTRING(AmmoCount); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 0; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(magCount) { - category = CSTRING(Category); - displayName = CSTRING(MagCount); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(throwableName) { - category = CSTRING(Category); - displayName = CSTRING(throwableName); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(throwableCount) { - category = CSTRING(Category); - displayName = CSTRING(throwableCount); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(zeroing) { - category = CSTRING(Category); - displayName = CSTRING(Zeroing); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(weaponLowerInfoBackground) { - category = CSTRING(Category); - displayName = CSTRING(WeaponLowerInfoBackground); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(stance) { - category = CSTRING(Category); - displayName = CSTRING(Stance); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(staminaBar) { - category = CSTRING(Category); - displayName = CSTRING(StaminaBar); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; // Gunner class GVAR(gunnerWeaponName) { - category = CSTRING(Category); - displayName = CSTRING(GunnerWeaponName); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(gunnerWeaponNameBackground) { - category = CSTRING(Category); - displayName = CSTRING(GunnerWeaponNameBackground); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(gunnerFiringMode) { - category = CSTRING(Category); - displayName = CSTRING(GunnerFiringMode); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(gunnerAmmoType) { - category = CSTRING(Category); - displayName = CSTRING(GunnerAmmoType); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(gunnerAmmoCount) { - category = CSTRING(Category); - displayName = CSTRING(GunnerAmmoCount); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(gunnerMagCount) { - category = CSTRING(Category); - displayName = CSTRING(GunnerMagCount); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(gunnerLaunchableName) { - category = CSTRING(Category); - displayName = CSTRING(gunnerLaunchableName); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(gunnerLaunchableCount) { - category = CSTRING(Category); - displayName = CSTRING(gunnerLaunchableCount); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(gunnerZeroing) { - category = CSTRING(Category); - displayName = CSTRING(GunnerZeroing); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(gunnerWeaponLowerInfoBackground) { - category = CSTRING(Category); - displayName = CSTRING(GunnerWeaponLowerInfoBackground); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; // Vehicle class GVAR(vehicleName) { - category = CSTRING(Category); - displayName = CSTRING(VehicleName); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(vehicleNameBackground) { - category = CSTRING(Category); - displayName = CSTRING(VehicleNameBackground); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(vehicleFuelBar) { - category = CSTRING(Category); - displayName = CSTRING(VehicleFuelBar); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(vehicleSpeed) { - category = CSTRING(Category); - displayName = CSTRING(VehicleSpeed); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(vehicleAltitude) { - category = CSTRING(Category); - displayName = CSTRING(VehicleAltitude); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(vehicleDamage) { - category = CSTRING(Category); - displayName = CSTRING(VehicleDamage); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; class GVAR(vehicleInfoBackground) { - category = CSTRING(Category); - displayName = CSTRING(VehicleInfoBackground); - description = CSTRING(RequiresSoldierVehicleWeaponInfo); - typeName = "BOOL"; - value = 1; - isClientSettable = 1; + movedToSQF = 1; }; }; diff --git a/addons/ui/ACE_UI.hpp b/addons/ui/ACE_UI.hpp index 7bf395da57..4fbf7038ef 100644 --- a/addons/ui/ACE_UI.hpp +++ b/addons/ui/ACE_UI.hpp @@ -1,174 +1,182 @@ class ACE_UI { + class devWatermark { + idd = IDD_MISSION; + elements[] = {11400}; + location = ANYWHERE; + class conditions { + isDevelopmentBranch = QUOTE(productVersion select 4 == 'Development'); + }; + }; class weaponName { - idd = 300; - elements[] = {118}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_WEAPON}; location = GROUND_ONLY; class conditions {}; }; class weaponNameBackground { - idd = 300; + idd = IDD_UNITINFO; elements[] = {1001, 1008}; location = GROUND_ONLY; class conditions {}; }; class firingMode { - idd = 300; - elements[] = {187, 1203}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_WEAPON_MODE_TEXTURE, 1203}; location = GROUND_ONLY; class conditions {}; }; class ammoType { - idd = 300; - elements[] = {155}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_WEAPON_AMMO}; location = GROUND_ONLY; class conditions {}; }; class ammoCount { - idd = 300; - elements[] = {184}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_AMMOCOUNT}; location = GROUND_ONLY; class conditions {}; }; class magCount { - idd = 300; - elements[] = {185}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_MAGCOUNT}; location = GROUND_ONLY; class conditions {}; }; class throwableName { - idd = 300; + idd = IDD_UNITINFO; elements[] = {152}; location = GROUND_ONLY; class conditions {}; }; class throwableCount { - idd = 300; + idd = IDD_UNITINFO; elements[] = {151}; location = GROUND_ONLY; class conditions {}; }; class zeroing { - idd = 300; - elements[] = {168}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_WEAPON_ELEVATION}; location = GROUND_ONLY; class conditions {}; }; class weaponLowerInfoBackground { - idd = 300; + idd = IDD_UNITINFO; elements[] = {1202}; location = GROUND_ONLY; class conditions {}; }; class staminaBar { - idd = 305; - elements[] = {193}; + idd = IDD_STAMINA_BAR; + elements[] = {IDC_IGUI_STAMINA_BAR}; location = GROUND_ONLY; class conditions {}; }; class stance { - idd = 303; - elements[] = {188, 1201}; + idd = IDD_STANCEINFO; + elements[] = {IDC_IGUI_STANCE_INDICATOR, 1201}; location = GROUND_ONLY; class conditions {}; }; class gunnerWeaponName { - idd = 300; - elements[] = {118}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_WEAPON}; location = VEHICLE_ONLY; class conditions {}; }; class gunnerWeaponNameBackground { - idd = 300; + idd = IDD_UNITINFO; elements[] = {1001, 1008}; location = VEHICLE_ONLY; class conditions {}; }; class gunnerFiringMode { - idd = 300; - elements[] = {187, 1203}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_WEAPON_MODE_TEXTURE, 1203}; location = VEHICLE_ONLY; class conditions {}; }; class gunnerAmmoType { - idd = 300; - elements[] = {155}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_WEAPON_AMMO}; location = VEHICLE_ONLY; class conditions {}; }; class gunnerAmmoCount { - idd = 300; - elements[] = {184}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_AMMOCOUNT}; location = VEHICLE_ONLY; class conditions {}; }; class gunnerMagCount { - idd = 300; - elements[] = {185}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_MAGCOUNT}; location = VEHICLE_ONLY; class conditions {}; }; class gunnerLaunchableName { - idd = 300; + idd = IDD_UNITINFO; elements[] = {152}; location = VEHICLE_ONLY; class conditions {}; }; class gunnerLaunchableCount { - idd = 300; + idd = IDD_UNITINFO; elements[] = {151}; location = VEHICLE_ONLY; class conditions {}; }; class gunnerZeroing { - idd = 300; - elements[] = {168}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_WEAPON_ELEVATION}; location = VEHICLE_ONLY; class conditions {}; }; class gunnerWeaponLowerInfoBackground { - idd = 300; + idd = IDD_UNITINFO; elements[] = {1202}; location = VEHICLE_ONLY; class conditions {}; }; class vehicleName { - idd = 300; - elements[] = {120}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_VEHICLE}; location = VEHICLE_ONLY; class conditions {}; }; class vehicleNameBackground { - idd = 300; + idd = IDD_UNITINFO; elements[] = {1000, 1013}; location = VEHICLE_ONLY; class conditions {}; }; class vehicleFuelBar { - idd = 300; - elements[] = {113, 1202}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_VALUE_FUEL, 1202}; location = VEHICLE_ONLY; class conditions {}; }; class vehicleSpeed { - idd = 300; - elements[] = {121, 1004, 1006}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_SPEED, 1004, 1006}; location = VEHICLE_ONLY; class conditions {}; }; class vehicleAltitude { - idd = 300; - elements[] = {122, 1005, 1014}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_ALT, 1005, 1014}; location = VEHICLE_ONLY; class conditions {}; }; class vehicleDamage { - idd = 300; - elements[] = {111}; + idd = IDD_UNITINFO; + elements[] = {IDC_IGUI_HITZONES}; location = VEHICLE_ONLY; class conditions {}; }; class vehicleInfoBackground { - idd = 300; + idd = IDD_UNITINFO; elements[] = {1200}; location = VEHICLE_ONLY; class conditions {}; diff --git a/addons/ui/CfgEventHandlers.hpp b/addons/ui/CfgEventHandlers.hpp index 89c91283ed..534a8f81f6 100644 --- a/addons/ui/CfgEventHandlers.hpp +++ b/addons/ui/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_clientInit)); }; }; diff --git a/addons/ui/README.md b/addons/ui/README.md index c55ffbc5c7..8e0c610778 100644 --- a/addons/ui/README.md +++ b/addons/ui/README.md @@ -2,11 +2,3 @@ ace_ui ======= Removes vignette, changes the chat contrast on the map to allow easier reading and provides settings to hide or show different UI elements. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [VKing](https://github.com/VKing6) -- [Jonpas](https://github.com/jonpas) diff --git a/addons/ui/RscInGameUI.hpp b/addons/ui/RscInGameUI.hpp new file mode 100644 index 0000000000..a3e7d2263a --- /dev/null +++ b/addons/ui/RscInGameUI.hpp @@ -0,0 +1,17 @@ +#define SPEED_INDICATOR_W (IGUI_GRID_STANCE_WAbs / 2) +#define SPEED_INDICATOR_H (IGUI_GRID_STANCE_HAbs / 3.5) +#define SPEED_INDICATOR_Y_OFFSET (IGUI_GRID_STANCE_HAbs / 4.25) + +class RscPictureKeepAspect; +class RscInGameUI { + class RscStanceInfo { + controls[] += {QGVAR(speedIndicator)}; + class GVAR(speedIndicator): RscPictureKeepAspect { + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(speedIndicator),_this select 0)]); + x = IGUI_GRID_STANCE_X + IGUI_GRID_STANCE_WAbs / 2 - SPEED_INDICATOR_W / 2; + y = IGUI_GRID_STANCE_Y + IGUI_GRID_STANCE_HAbs - SPEED_INDICATOR_Y_OFFSET; + w = SPEED_INDICATOR_W; + h = SPEED_INDICATOR_H; + }; + }; +}; diff --git a/addons/ui/UI/speed_indicator/1_ca.paa b/addons/ui/UI/speed_indicator/1_ca.paa new file mode 100644 index 0000000000..bcafc6d09e Binary files /dev/null and b/addons/ui/UI/speed_indicator/1_ca.paa differ diff --git a/addons/ui/UI/speed_indicator/2_ca.paa b/addons/ui/UI/speed_indicator/2_ca.paa new file mode 100644 index 0000000000..6ba5b7f215 Binary files /dev/null and b/addons/ui/UI/speed_indicator/2_ca.paa differ diff --git a/addons/ui/UI/speed_indicator/3_ca.paa b/addons/ui/UI/speed_indicator/3_ca.paa new file mode 100644 index 0000000000..3e190e8858 Binary files /dev/null and b/addons/ui/UI/speed_indicator/3_ca.paa differ diff --git a/addons/ui/UI/speed_indicator/4_ca.paa b/addons/ui/UI/speed_indicator/4_ca.paa new file mode 100644 index 0000000000..fc53c16bb5 Binary files /dev/null and b/addons/ui/UI/speed_indicator/4_ca.paa differ diff --git a/addons/ui/XEH_PREP.hpp b/addons/ui/XEH_PREP.hpp index a927a8ad2d..f7edabcc3f 100644 --- a/addons/ui/XEH_PREP.hpp +++ b/addons/ui/XEH_PREP.hpp @@ -1,5 +1,8 @@ PREP(compileConfigUI); +PREP(handlePlayerChanged); +PREP(handleSpeedIndicator); PREP(moduleInit); +PREP(onAnimChanged); PREP(setAdvancedElement); PREP(setElements); PREP(setElementVisibility); diff --git a/addons/ui/XEH_clientInit.sqf b/addons/ui/XEH_clientInit.sqf index 5cfa322b0d..66aa0b3650 100644 --- a/addons/ui/XEH_clientInit.sqf +++ b/addons/ui/XEH_clientInit.sqf @@ -11,7 +11,7 @@ call FUNC(compileConfigUI); GVAR(elementsSet) = call CBA_fnc_createNamespace; // Attach all event handlers where UI has to be updated -["ace_settingsInitialized", { +["CBA_settingsInitialized", { // Initial settings [false] call FUNC(setElements); @@ -33,8 +33,9 @@ GVAR(elementsSet) = call CBA_fnc_createNamespace; }] call CBA_fnc_addEventHandler; // On changing settings - ["ace_settingChanged", { - params ["_name"]; + ["CBA_SettingChanged", { + params ["_name", "_value"]; + if (_name select [0, 7] != "ace_ui_") exitWith {}; if (_name in ELEMENTS_BASIC) then { [true] call FUNC(setElements); @@ -42,8 +43,10 @@ GVAR(elementsSet) = call CBA_fnc_createNamespace; private _nameNoPrefix = toLower (_name select [7]); private _cachedElement = GVAR(configCache) getVariable _nameNoPrefix; if (!isNil "_cachedElement") then { - [_nameNoPrefix, missionNamespace getVariable _name, true] call FUNC(setAdvancedElement); + [_nameNoPrefix, _value, true] call FUNC(setAdvancedElement); }; }; }] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; + +["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/ui/XEH_preInit.sqf b/addons/ui/XEH_preInit.sqf index b937d5d81c..9f2cfd9824 100644 --- a/addons/ui/XEH_preInit.sqf +++ b/addons/ui/XEH_preInit.sqf @@ -6,6 +6,21 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + GVAR(interfaceInitialized) = false; +GVAR(speedIndicatorIconHash) = createHashMapFromArray [ + // Standing/Crouched + [["wlk", false], QPATHTOF(ui\speed_indicator\1_ca.paa)], + [["tac", false], QPATHTOF(ui\speed_indicator\2_ca.paa)], + [["run", false], QPATHTOF(ui\speed_indicator\3_ca.paa)], + [["eva", false], QPATHTOF(ui\speed_indicator\4_ca.paa)], + // Prone + [["wlk", true], QPATHTOF(ui\speed_indicator\1_ca.paa)], + [["run", true], QPATHTOF(ui\speed_indicator\2_ca.paa)], + [["spr", true], QPATHTOF(ui\speed_indicator\3_ca.paa)], + [["eva", true], QPATHTOF(ui\speed_indicator\4_ca.paa)] +]; + ADDON = true; diff --git a/addons/ui/config.cpp b/addons/ui/config.cpp index d480a5f33b..6dfeba4cfb 100644 --- a/addons/ui/config.cpp +++ b/addons/ui/config.cpp @@ -8,7 +8,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); - authors[] = {"VKing", "Jonpas"}; + authors[] = {"VKing", "Jonpas", "veteran29"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; @@ -20,4 +20,5 @@ class CfgPatches { #include "ACE_UI.hpp" #include "RscChat.hpp" +#include "RscInGameUI.hpp" #include "RscVignette.hpp" diff --git a/addons/ui/functions/fnc_handlePlayerChanged.sqf b/addons/ui/functions/fnc_handlePlayerChanged.sqf new file mode 100644 index 0000000000..1abc39efcb --- /dev/null +++ b/addons/ui/functions/fnc_handlePlayerChanged.sqf @@ -0,0 +1,32 @@ +#include "script_component.hpp" +/* + * Author: veteran29 + * Handles switching units. + * + * Arguments: + * 0: New Unit + * 1: Old Unit + * + * Return Value: + * None + * + * Example: + * [newbob, oldbob] call ace_ui_fnc_handlePlayerChanged + * + * Public: No + */ +params ["_newUnit", "_oldUnit"]; +TRACE_2("unit changed",_newUnit,_oldUnit); + +if (!isNull _oldUnit) then { + _oldUnit removeEventHandler ["AnimChanged", _oldUnit getVariable [QGVAR(animHandler), -1]]; + _oldUnit setVariable [QGVAR(animHandler), nil]; + TRACE_1("remove old",_oldUnit getVariable QGVAR(animHandler)); +}; + +// Don't add a new EH if the unit respawned +if (_newUnit getVariable [QGVAR(animHandler), -1] == -1) then { + private _animHandler = _newUnit addEventHandler ["AnimChanged", LINKFUNC(onAnimChanged)]; + TRACE_1("add new",_animHandler); + _newUnit setVariable [QGVAR(animHandler), _animHandler]; +}; diff --git a/addons/ui/functions/fnc_handleSpeedIndicator.sqf b/addons/ui/functions/fnc_handleSpeedIndicator.sqf new file mode 100644 index 0000000000..e6b8718b0d --- /dev/null +++ b/addons/ui/functions/fnc_handleSpeedIndicator.sqf @@ -0,0 +1,28 @@ +#include "script_component.hpp" +/* + * Author: veteran29 + * Handles visual changes of the speed indicator. + * + * Arguments: + * Current animation state + * + * Return Value: + * None + * + * Example: + * ["amovpercmtacslowwrfldf_ver2"] call ace_ui_fnc_handleSpeedIndicator + * + * Public: No + */ + +params ["_animState"]; + +if (!GVAR(enableSpeedIndicator)) exitWith {}; + +private _animSpeed = _animState select [9, 3]; +private _isProne = _animState select [5, 3] isEqualTo "pne"; + +private _icon = GVAR(speedIndicatorIconHash) getOrDefault [[_animSpeed, _isProne], ""]; + +private _speedIndicator = uiNamespace getVariable [QGVAR(speedIndicator), controlNull]; +_speedIndicator ctrlSetText _icon; diff --git a/addons/ui/functions/fnc_onAnimChanged.sqf b/addons/ui/functions/fnc_onAnimChanged.sqf new file mode 100644 index 0000000000..d241c30bd4 --- /dev/null +++ b/addons/ui/functions/fnc_onAnimChanged.sqf @@ -0,0 +1,19 @@ +#include "script_component.hpp" +/* + * Author: veteran29 + * Handle player unit animation changes. + * + * Arguments: + * 0: Unit + * 1: Current animation + * + * Return Value: + * None + * + * Example: + * [newbob, "amovpercmtacslowwrfldf_ver2"] call ace_ui_fnc_onAnimChanged + * + * Public: No + */ + +(_this select 1) call FUNC(handleSpeedIndicator); diff --git a/addons/ui/functions/fnc_setAdvancedElement.sqf b/addons/ui/functions/fnc_setAdvancedElement.sqf index 4e2ececf6c..96453f1cfb 100644 --- a/addons/ui/functions/fnc_setAdvancedElement.sqf +++ b/addons/ui/functions/fnc_setAdvancedElement.sqf @@ -66,6 +66,7 @@ if (!_force) then { }; }; +private _displays = ((uiNamespace getVariable "IGUI_displays") + [findDisplay IDD_MISSION]) select {_idd == ctrlIDD _x}; private _fade = [1, 0] select _show; // Disable/Enable elements @@ -75,15 +76,16 @@ private _success = false; // Loop through IGUI displays as they can be present several times for some reason { - if (_idd == ctrlIDD _x) then { - TRACE_4("Setting Element Visibility",_element,_fade,_idd,_idc); + _success = true; - (_x displayCtrl _idc) ctrlSetFade _fade; - (_x displayCtrl _idc) ctrlCommit 0; + private _control = _x displayCtrl _idc; + if (ctrlFade _control == _fade) then {continue}; - _success = true; - }; - } count (uiNamespace getVariable "IGUI_displays"); + TRACE_4("Setting Element Visibility",_element,_fade,_idd,_idc); + + _control ctrlSetFade _fade; + _control ctrlCommit 0; + } count _displays; nil } count _elements; diff --git a/addons/ui/initSettings.sqf b/addons/ui/initSettings.sqf new file mode 100644 index 0000000000..55160a7888 --- /dev/null +++ b/addons/ui/initSettings.sqf @@ -0,0 +1,305 @@ +private _category = format ["ACE %1", localize LSTRING(Category)]; + +[ + QGVAR(allowSelectiveUI), "CHECKBOX", + [LSTRING(AllowSelectiveUI), LSTRING(AllowSelectiveUI_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(soldierVehicleWeaponInfo), "CHECKBOX", + LSTRING(SoldierVehicleWeaponInfo), + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleRadar), "CHECKBOX", + LSTRING(VehicleRadar), + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleCompass), "CHECKBOX", + LSTRING(VehicleCompass), + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(commandMenu), "CHECKBOX", + LSTRING(CommandMenu), + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(groupBar), "CHECKBOX", + LSTRING(GroupBar), + _category, + false, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(weaponName), "CHECKBOX", + [LSTRING(WeaponName), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(weaponNameBackground), "CHECKBOX", + [LSTRING(WeaponNameBackground), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(firingMode), "CHECKBOX", + [LSTRING(FiringMode), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(ammoType), "CHECKBOX", + [LSTRING(AmmoType), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(ammoCount), "CHECKBOX", + [LSTRING(AmmoCount), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + false, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(magCount), "CHECKBOX", + [LSTRING(MagCount), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(throwableName), "CHECKBOX", + [LSTRING(ThrowableName), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(throwableCount), "CHECKBOX", + [LSTRING(ThrowableCount), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(zeroing), "CHECKBOX", + [LSTRING(Zeroing), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(weaponLowerInfoBackground), "CHECKBOX", + [LSTRING(WeaponLowerInfoBackground), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(stance), "CHECKBOX", + [LSTRING(Stance), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(staminaBar), "CHECKBOX", + [LSTRING(StaminaBar), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerWeaponName), "CHECKBOX", + [LSTRING(GunnerWeaponName), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerWeaponNameBackground), "CHECKBOX", + [LSTRING(GunnerWeaponNameBackground), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerFiringMode), "CHECKBOX", + [LSTRING(GunnerFiringMode), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerAmmoType), "CHECKBOX", + [LSTRING(GunnerAmmoType), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerAmmoCount), "CHECKBOX", + [LSTRING(GunnerAmmoCount), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerMagCount), "CHECKBOX", + [LSTRING(GunnerMagCount), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerLaunchableName), "CHECKBOX", + [LSTRING(GunnerLaunchableName), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerLaunchableCount), "CHECKBOX", + [LSTRING(GunnerLaunchableCount), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerZeroing), "CHECKBOX", + [LSTRING(GunnerZeroing), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(gunnerWeaponLowerInfoBackground), "CHECKBOX", + [LSTRING(GunnerWeaponLowerInfoBackground), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleName), "CHECKBOX", + [LSTRING(VehicleName), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleNameBackground), "CHECKBOX", + [LSTRING(VehicleNameBackground), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleFuelBar), "CHECKBOX", + [LSTRING(VehicleFuelBar), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleSpeed), "CHECKBOX", + [LSTRING(VehicleSpeed), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleAltitude), "CHECKBOX", + [LSTRING(VehicleAltitude), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleDamage), "CHECKBOX", + [LSTRING(VehicleDamage), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleInfoBackground), "CHECKBOX", + [LSTRING(VehicleInfoBackground), LSTRING(RequiresSoldierVehicleWeaponInfo)], + _category, + true, + 0 +] call CBA_fnc_addSetting; + +if (productVersion select 4 == 'Development') then { + [ + QGVAR(devWatermark), + "CHECKBOX", + LSTRING(devWatermark), + _category, + true + ] call CBA_fnc_addSetting; +}; + +[ + QGVAR(enableSpeedIndicator), + "CHECKBOX", + [LSTRING(EnableSpeedIndicator), LSTRING(EnableSpeedIndicator_Description)], + "ACE " + LLSTRING(Category), + true, + true, { + if (!_this) then { + private _speedIndicator = uiNamespace getVariable [QGVAR(speedIndicator), controlNull]; + _speedIndicator ctrlSetText ""; + }; + } +] call CBA_fnc_addSetting; diff --git a/addons/ui/script_component.hpp b/addons/ui/script_component.hpp index 11b0d08715..a9899945c7 100644 --- a/addons/ui/script_component.hpp +++ b/addons/ui/script_component.hpp @@ -16,6 +16,8 @@ #include "\z\ace\addons\main\script_macros.hpp" +#include "\a3\ui_f\hpp\defineResincl.inc" +#include "\a3\ui_f\hpp\defineCommonGrids.inc" // Basic Elements #define ELEMENTS_BASIC [QGVAR(soldierVehicleWeaponInfo), QGVAR(vehicleRadar), QGVAR(vehicleCompass), QGVAR(commandMenu), QGVAR(groupBar)] diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index 423f5e07a8..f27926dc7a 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -46,6 +46,7 @@ 此模块允许你调整使用者介面的任何一个元件 此模塊允許你調整使用者介面的任何一個元件 Tento modul umožňuje přepínání viditelných částí uživatelského rozhraní. + Este módulo permite activar la visibilidad de apartados de la interfaz Allow Selective UI @@ -156,6 +157,14 @@ Barra de grupo Grup Göstergesi + + Development Build Watermark + Водяной знак Development Build + Marca de agua para compilación de desarrollo + Filigrane version de développement + Znak wodny wersji deweloperskiej + 開発版ウォーターマーク + Weapon Name Název zbraně @@ -360,6 +369,7 @@ 砲手武器名稱 Jméno zbraně vozidla Nişancı Silah Ismi + Nombre de arma de artillero Gunner Weapon Name Background @@ -374,6 +384,7 @@ 炮手武器名称背景 砲手武器名稱背景 Pozadí jména zbraně vozidla + Fondo de nombre de arma de artillero Gunner Firing Mode @@ -389,6 +400,7 @@ 砲手射擊模式 Režim palby zbraně vozidla Nişancı Ateşleme Modu + Modo de fuego de artillero Gunner Ammo Type @@ -404,6 +416,7 @@ 砲手彈藥類型 Typ munice zbraně vozidla Nişancı Mermi Türü + Tipo de munición de artillero Gunner Ammo Count @@ -419,6 +432,7 @@ 砲手彈藥數量 Počet zásobníků zbraně vozidla Nişancı Mermi Sayısı + Cantidad de munición de artillero Gunner Magazine Count @@ -434,6 +448,7 @@ 砲手彈匣數量 Počet munice zbraně vozidla Nişancı Şarjör Sayısı + Cantidad de cargadores de artillero Gunner Launchable Type @@ -448,6 +463,7 @@ 炮手发射物类型 砲手發射物類型 Typ odpalitelných granátů vozidla + Tipo de lanzador de artillero Gunner Launchable Count @@ -462,6 +478,7 @@ 炮手发射物数量 砲手發射物數量 Počet odpalitelných granátů vozidla + Cantidad de lanzadores de artillero Gunner Zeroing @@ -476,6 +493,7 @@ 炮手归零距离 砲手歸零距離 Náměr zbraně vozidla + Calibracion de mira de artillero Gunner Weapon Lower Info Background @@ -490,6 +508,7 @@ 炮手武器底部资讯栏背景 砲手武器底部資訊欄背景 Nižší pozadí panelu s informacemi o zbrani vozidla + Fondo de información inferior de armamento de artillero Vehicle Name @@ -614,6 +633,7 @@ Richiede informazione Soldato/Veicolo/Arma. 需要士兵/载具/武器的资讯. 需要士兵/載具/武器的資訊. + Requiere información de Soldado/Vehículo. Modifying User Interface is disabled. @@ -628,6 +648,7 @@ La modifica dell'Interfaccia Utente è disabilitata. 自定使用者介面功能已关闭 自定使用者介面功能已關閉 + La modificación de la interfaz de usuario está desactivada. Cannot modify a forced User Interface element. @@ -642,6 +663,17 @@ 无法编辑已被锁定的使用者介面元件 無法編輯已被鎖定的使用者介面元件 Nelze upravit prvek vynuceného uživatelského rozhraní. + No se puede modificar un elemento forzado de la Interfaz del Usuario + + + Enable movement speed indicator + Włącz wskaźnik prędkości poruszania + 移動速度インジケータを有効化 + + + Enables movement speed indicator for player character. + Włącza wskaźnik prędkości poruszania się dla postaci gracza. + プレイヤー キャラの移動速度を表示します。 diff --git a/addons/vector/CfgEventHandlers.hpp b/addons/vector/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/vector/CfgEventHandlers.hpp +++ b/addons/vector/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/vector/README.md b/addons/vector/README.md index 8907a78e49..9281e9ee34 100644 --- a/addons/vector/README.md +++ b/addons/vector/README.md @@ -2,11 +2,3 @@ ace_vector ========== Adds the Vector rangefinder including all modes found in its real counterpart. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/vehicle_damage/$PBOPREFIX$ b/addons/vehicle_damage/$PBOPREFIX$ new file mode 100644 index 0000000000..ec06bcd644 --- /dev/null +++ b/addons/vehicle_damage/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\vehicle_damage \ No newline at end of file diff --git a/addons/vehicle_damage/CfgAmmo.hpp b/addons/vehicle_damage/CfgAmmo.hpp new file mode 100644 index 0000000000..195d059c2a --- /dev/null +++ b/addons/vehicle_damage/CfgAmmo.hpp @@ -0,0 +1,111 @@ +class CfgAmmo { + class Default; + class BulletCore; + class ShellCore; + class MissileCore; + class GrenadeCore; + class LaserBombCore; + class RocketCore; + class MineCore; + class BombCore; + class DirectionalBombCore; + class PipeBombCore; + + class B_30mm_HE; + class GrenadeHand; + class R_PG32V_F; + class SubmunitionBase; + class Sh_125mm_HE; + 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); + CREATE_INCENDIARY_AMMO(ammo_Penetrator_Base, ShellBase, 1.0); + CREATE_INCENDIARY_AMMO(MissileBase, MissileCore, 1.0); + CREATE_INCENDIARY_AMMO(ammo_Missile_CruiseBase, MissileBase, 0.5); + CREATE_INCENDIARY_AMMO(GrenadeBase, GrenadeCore, 0.1); + CREATE_INCENDIARY_AMMO(Grenade, Default, 0.0); + CREATE_INCENDIARY_AMMO(ammo_bomb_LaserGuidedBase, LaserBombCore, 0.6); + CREATE_INCENDIARY_AMMO(RocketBase, RocketCore, 1.0); + CREATE_INCENDIARY_AMMO(MineBase, MineCore, 0.5); + CREATE_INCENDIARY_AMMO(DirectionalBombBase, DirectionalBombCore, 1.0); + CREATE_INCENDIARY_AMMO(PipeBombBase, PipeBombCore, 0.7); + CREATE_INCENDIARY_AMMO(ammo_Missile_AntiRadiationBase, MissileBase, 1.0); + CREATE_INCENDIARY_AMMO(ammo_Gun20mmAABase, BulletBase, 0.7); + CREATE_INCENDIARY_AMMO(ammo_Gun30mmAABase, BulletBase, 0.7); + CREATE_INCENDIARY_AMMO(ammo_Gun35mmAABase, BulletBase, 0.7); + CREATE_INCENDIARY_AMMO(ammo_Missile_CannonLaunchedBase, MissileBase, 1.0); + + CREATE_INCENDIARY_AMMO(B_127x99_Ball, BulletBase, 0.2); + CREATE_INCENDIARY_AMMO(B_127x99_SLAP, B_127x99_Ball, 0.8); + CREATE_INCENDIARY_AMMO(B_127x108_Ball, BulletBase, 0.3); + CREATE_INCENDIARY_AMMO(B_127x108_APDS, B_127x108_Ball, 0.1); + + CREATE_INCENDIARY_AMMO(B_30mm_MP, B_30mm_HE, 0.6); + CREATE_INCENDIARY_AMMO(B_40mm_GPR, B_30mm_HE, 0.6); + CREATE_INCENDIARY_AMMO(B_20mm, BulletBase, 0.2); + CREATE_INCENDIARY_AMMO(B_25mm, BulletBase, 0.4); + CREATE_INCENDIARY_AMMO(B_30mm_AP, BulletBase, 0.4); + CREATE_INCENDIARY_AMMO(B_30mm_APFSDS, B_30mm_AP, 0.1); + CREATE_INCENDIARY_AMMO(B_35mm_AA, BulletBase, 0.7); + CREATE_INCENDIARY_AMMO(SmokeShell, GrenadeHand, 0.0); + + + CREATE_INCENDIARY_AMMO(ammo_Penetrator_30mm, ammo_Penetrator_Base, 0.8); + CREATE_INCENDIARY_AMMO(ammo_Penetrator_grenade_40mm, ammo_Penetrator_Base, 1.0); + CREATE_INCENDIARY_AMMO(ammo_Penetrator_105mm, ammo_Penetrator_Base, 1.0); + CREATE_INCENDIARY_AMMO(ammo_Penetrator_120mm, ammo_Penetrator_Base, 1.0); + CREATE_INCENDIARY_AMMO(ammo_Penetrator_Rocket_03_AP, ammo_Penetrator_Base, 0.7); + CREATE_INCENDIARY_AMMO(ammo_Penetrator_Rocket_04_AP, ammo_Penetrator_Base, 0.7); + + CREATE_INCENDIARY_AMMO(Sh_120mm_HE, ShellBase, 0.4); + CREATE_INCENDIARY_AMMO(Sh_120mm_APFSDS, ShellBase, 0.1); + CREATE_INCENDIARY_AMMO(Sh_120mm_HEAT_MP, ShellBase, 0.8); + CREATE_INCENDIARY_AMMO(Sh_155mm_AMOS, ShellBase, 0.4); + CREATE_INCENDIARY_AMMO(Sh_82mm_AMOS, Sh_155mm_AMOS, 0.1); + + CREATE_INCENDIARY_AMMO(Bo_Mk82, BombCore, 0.8); + CREATE_INCENDIARY_AMMO(R_TBG32V_F, R_PG32V_F, 0.2); + + CREATE_INCENDIARY_AMMO(R_80mm_HE, RocketBase, 0.2); + CREATE_INCENDIARY_AMMO(R_60mm_HE, R_80mm_HE, 0.1); + + CREATE_INCENDIARY_AMMO(R_230mm_HE, SubmunitionBase, 0.9); + CREATE_INCENDIARY_AMMO(R_230mm_fly, ShellBase, 0.9); + + CREATE_INCENDIARY_AMMO(G_40mm_HE, GrenadeBase, 0.1); + CREATE_INCENDIARY_AMMO(G_20mm_HE, G_40mm_HE, 0.3); + CREATE_INCENDIARY_AMMO(G_40mm_HEDP, G_40mm_HE, 0.8); + + CREATE_INCENDIARY_AMMO(Mo_cluster_AP, ShellBase, 0.9); + CREATE_INCENDIARY_AMMO(M_Titan_AT, MissileBase, 1.0); + CREATE_INCENDIARY_AMMO(M_Titan_AP, M_Titan_AT, 0.3); + + CREATE_INCENDIARY_AMMO(Sh_125mm_APFSDS, Sh_120mm_APFSDS, 0.15); + CREATE_INCENDIARY_AMMO(Sh_125mm_HEAT, Sh_125mm_HE, 1.0); + + CREATE_INCENDIARY_AMMO(Gatling_30mm_HE_Plane_CAS_01_F, BulletBase, 0.6); + + CREATE_INCENDIARY_AMMO(Missile_AGM_02_F, MissileBase, 1.0); + CREATE_INCENDIARY_AMMO(M_Mo_82mm_AT, MissileBase, 1.0); + CREATE_INCENDIARY_AMMO(Rocket_04_HE_F, MissileBase, 0.4); + CREATE_INCENDIARY_AMMO(Rocket_04_AP_F, Rocket_04_HE_F, 0.1); + + CREATE_INCENDIARY_AMMO(Sh_105mm_HEAT_MP, Sh_125mm_HEAT, 0.8); + + CREATE_INCENDIARY_AMMO(APERSTripMine_Wire_Ammo, DirectionalBombBase, 0.0); + + CREATE_INCENDIARY_AMMO(B_127x54_Ball, BulletBase, 0.8); + CREATE_INCENDIARY_AMMO(B_93x64_Ball, BulletBase, 0.5); + + CREATE_INCENDIARY_AMMO(M_Vorona_HE, M_Vorona_HEAT, 0.2); + CREATE_INCENDIARY_AMMO(M_SPG9_HE, M_SPG9_HEAT, 0.2); + CREATE_INCENDIARY_AMMO(R_MRAAWS_HE_F, R_MRAAWS_HEAT_F, 0.4); + + CREATE_INCENDIARY_AMMO(B_20mm_AP, BulletBase, 0.2); +}; diff --git a/addons/vehicle_damage/CfgEventHandlers.hpp b/addons/vehicle_damage/CfgEventHandlers.hpp new file mode 100644 index 0000000000..74ffec132e --- /dev/null +++ b/addons/vehicle_damage/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ + +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; + diff --git a/addons/vehicle_damage/CfgVehicles.hpp b/addons/vehicle_damage/CfgVehicles.hpp new file mode 100644 index 0000000000..b34f793e0f --- /dev/null +++ b/addons/vehicle_damage/CfgVehicles.hpp @@ -0,0 +1,291 @@ +class CfgVehicles { + class ThingX; + class GVAR(Turret_MBT_01): ThingX { + author = ECSTRING(common,ACETeam); + _generalMacro = QGVAR(Turret_MBT_01); + scope = 1; + displayName = CSTRING(generic_turret_wreck); + model = "\A3\Structures_F\Wrecks\Wreck_Slammer_turret_F.p3d"; + icon = "\A3\armor_f_gamma\MBT_01\Data\ui\map_slammer_mk4_ca.paa"; + }; + class GVAR(Turret_MBT_02): ThingX { + author = ECSTRING(common,ACETeam); + _generalMacro = QGVAR(Turret_MBT_02); + scope = 1; + displayName = CSTRING(generic_turret_wreck); + model = "\A3\Structures_F\Wrecks\Wreck_T72_turret_F.p3d"; + icon = "\A3\armor_f_gamma\MBT_02\Data\UI\map_MBT_02_ca.paa"; + }; + + class Tank; + class Car_F; + class Tank_F: Tank { + GVAR(hullDetonationProb) = 0.2; + GVAR(turretDetonationProb) = 0.2; + GVAR(engineDetonationProb) = 0.2; + GVAR(hullFireProb) = 0.5; + GVAR(turretFireProb) = 0.2; + GVAR(engineFireProb) = 0.5; + GVAR(detonationDuringFireProb) = 0.2; + GVAR(canHaveFireRing) = 0; + }; + class Wheeled_APC_F: Car_F { + GVAR(hullDetonationProb) = 0.2; + GVAR(turretDetonationProb) = 0.2; + GVAR(engineDetonationProb) = 0.2; + GVAR(hullFireProb) = 0.5; + GVAR(turretFireProb) = 0.2; + GVAR(engineFireProb) = 0.5; + GVAR(detonationDuringFireProb) = 0.2; + GVAR(canHaveFireRing) = 0; + }; + class APC_Tracked_01_base_F: Tank_F {}; + class B_APC_Tracked_01_base_F: APC_Tracked_01_base_F {}; + class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { + GVAR(hullDetonationProb) = 0.4; + GVAR(turretDetonationProb) = 0.4; + GVAR(engineDetonationProb) = 0.4; + GVAR(hullFireProb) = 0.7; + GVAR(turretFireProb) = 0.7; + GVAR(engineFireProb) = 0.8; + GVAR(detonationDuringFireProb) = 0.8; + GVAR(canHaveFireRing) = 1; + }; + class B_APC_Tracked_01_rcws_F: B_APC_Tracked_01_base_F { + GVAR(hullDetonationProb) = 0.3; + GVAR(turretDetonationProb) = 0; + GVAR(engineDetonationProb) = 0.1; + GVAR(hullFireProb) = 0.8; + GVAR(turretFireProb) = 0; + GVAR(engineFireProb) = 0.8; + GVAR(detonationDuringFireProb) = 0.5; + }; + class B_APC_Tracked_01_CRV_F: B_APC_Tracked_01_base_F { + GVAR(hullDetonationProb) = 0.3; + GVAR(turretDetonationProb) = 0; + GVAR(engineDetonationProb) = 0.1; + GVAR(hullFireProb) = 0.8; + GVAR(turretFireProb) = 0; + GVAR(engineFireProb) = 0.8; + GVAR(detonationDuringFireProb) = 0.5; + }; + class APC_Wheeled_01_base_F: Wheeled_APC_F { + GVAR(slatHitpoints)[] = { + "HitSLAT_Left_1", "HitSLAT_Left_2", "HitSLAT_Left_3", + "HitSLAT_Right_1", "HitSLAT_Right_2", "HitSLAT_Right_3", + "HitSLAT_top_back", "HitSLAT_top_left", "HitSLAT_top_right", + "HitSLAT_back", + "HitSLAT_front" + }; + }; + class B_APC_Wheeled_01_base_F: APC_Wheeled_01_base_F {}; + class B_APC_Wheeled_01_cannon_F: B_APC_Wheeled_01_base_F { + GVAR(hullDetonationProb) = 0.2; + GVAR(turretDetonationProb) = 0.2; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0.7; + GVAR(turretFireProb) = 0.7; + GVAR(engineFireProb) = 0.7; + GVAR(detonationDuringFireProb) = 0.5; + GVAR(canHaveFireRing) = 1; + }; + class APC_Wheeled_02_base_F: Wheeled_APC_F { + GVAR(hullDetonationProb) = 0.2; + GVAR(turretDetonationProb) = 0; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0.7; + GVAR(turretFireProb) = 0; + GVAR(engineFireProb) = 0.7; + GVAR(detonationDuringFireProb) = 0.5; + GVAR(slatHitpoints)[] = { + "HitSLAT_Left_1", "HitSLAT_Left_2", "HitSLAT_Left_3", + "HitSLAT_Right_1", "HitSLAT_Right_2", "HitSLAT_Right_3", + "HitSLAT_back", + "HitSLAT_front" + }; + }; + class AFV_Wheeled_01_base_F: Wheeled_APC_F { + GVAR(slatHitpoints)[] = { + "HitSLAT_Left_1", "HitSLAT_Left_2", "HitSLAT_Left_3", + "HitSLAT_Right_1", "HitSLAT_Right_2", "HitSLAT_Right_3", + "HitSLAT_back", + "HitSLAT_front" + }; + }; + class B_AFV_Wheeled_01_cannon_F: AFV_Wheeled_01_base_F { + GVAR(hullDetonationProb) = 0.5; + GVAR(turretDetonationProb) = 0.5; + GVAR(engineDetonationProb) = 0.2; + GVAR(hullFireProb) = 0.2; + GVAR(turretFireProb) = 0.2; + GVAR(engineFireProb) = 0.5; + GVAR(detonationDuringFireProb) = 0.5; + }; + class AFV_Wheeled_01_up_base_F: AFV_Wheeled_01_base_F { + GVAR(eraHitpoints)[] = { + "HitERA_Front", "HitERA_Left", "HitERA_Right", "HitERA_Top", "HitERA_Back" + }; + }; + class MBT_01_base_F: Tank_F { + GVAR(hullDetonationProb) = 0.6; + GVAR(turretDetonationProb) = 0.3; + GVAR(engineDetonationProb) = 0.1; + GVAR(hullFireProb) = 0.7; + GVAR(turretFireProb) = 0.4; + GVAR(engineFireProb) = 0.5; + GVAR(detonationDuringFireProb) = 0.3; + GVAR(canHaveFireRing) = 1; + }; + class B_MBT_01_base_F: MBT_01_base_F {}; + class B_MBT_01_cannon_F: B_MBT_01_base_F { + GVAR(turret)[] = { QGVAR(Turret_MBT_01), {0, -1, 0.5} }; + }; + class B_MBT_01_TUSK_F: B_MBT_01_cannon_F { + GVAR(eraHitpoints)[] = { + "HitERA_Front", + "HitERA_Left_1", "HitERA_Left_2", "HitERA_Left_3", "HitERA_Left_4", + "HitERA_Right_1", "HitERA_Right_2", "HitERA_Right_3", "HitERA_Right_4", + "HitERA_Top_Front", "HitERA_Top_Left", "HitERA_Top_Right" + }; + }; + + class O_MBT_02_base_F; + class O_MBT_02_cannon_F: O_MBT_02_base_F { + GVAR(turret)[] = { QGVAR(Turret_MBT_02), {0, -1, 0} }; + GVAR(canHaveFireRing) = 1; + }; + + class APC_Tracked_02_base_F: Tank_F { + GVAR(hullDetonationProb) = 0; + GVAR(turretDetonationProb) = 0; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0.8; + GVAR(turretFireProb) = 0; + GVAR(engineFireProb) = 0.8; + GVAR(detonationDuringFireProb) = 0.5; + GVAR(slatHitpoints)[] = { + "HitSLAT_Left_1", "HitSLAT_Left_2", "HitSLAT_Left_3", + "HitSLAT_Right_1", "HitSLAT_Right_2", "HitSLAT_Right_3", + "HitSLAT_back", + "HitSLAT_front" + }; + GVAR(canHaveFireRing) = 1; + }; + class O_APC_Tracked_02_base_F: APC_Tracked_02_base_F {}; + class O_APC_Tracked_02_AA_F: O_APC_Tracked_02_base_F { + GVAR(hullDetonationProb) = 0.4; + GVAR(turretDetonationProb) = 0.4; + GVAR(engineDetonationProb) = 0.4; + GVAR(hullFireProb) = 0.7; + GVAR(turretFireProb) = 0.7; + GVAR(engineFireProb) = 0.8; + GVAR(detonationDuringFireProb) = 0.8; + GVAR(canHaveFireRing) = 1; + }; + class MBT_04_base_F: Tank_F { + GVAR(hullDetonationProb) = 0; + GVAR(turretDetonationProb) = 0; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0.2; + GVAR(turretFireProb) = 0.2; + GVAR(engineFireProb) = 0.5; + GVAR(detonationDuringFireProb) = 0; + GVAR(eraHitpoints)[] = { + "HitERA_Front", + "HitERA_Left_1", "HitERA_Left_2", + "HitERA_Right_1", "HitERA_Right_2", + "HitERA_Top" + }; + GVAR(slatHitpoints)[] = { + "HitSLAT_Left", "HitSLAT_Right" + }; + GVAR(canHaveFireRing) = 1; + }; + class MBT_02_base_F: Tank_F { + GVAR(hullDetonationProb) = 0; + GVAR(turretDetonationProb) = 0; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0.2; + GVAR(turretFireProb) = 0.2; + GVAR(engineFireProb) = 0.5; + GVAR(detonationDuringFireProb) = 0; + GVAR(eraHitpoints)[] = { + "HitERA_Front", + "HitERA_Left_1", "HitERA_Left_2", + "HitERA_Right_1", "HitERA_Right_2", + "HitERA_Top_Left_1", "HitERA_Top_Left_2", + "HitERA_Top_Right_1", "HitERA_Top_Right_2" + }; + GVAR(canHaveFireRing) = 1; + }; + class LT_01_base_F: Tank_F { + GVAR(hullDetonationProb) = 0.8; + GVAR(turretDetonationProb) = 0; + GVAR(engineDetonationProb) = 0.3; + GVAR(hullFireProb) = 0.5; + GVAR(turretFireProb) = 0; + GVAR(engineFireProb) = 0.7; + GVAR(detonationDuringFireProb) = 0.9; + GVAR(slatHitpoints)[] = { + "HitSLAT_Left_1", "HitSLAT_Left_2", "HitSLAT_Left_3", + "HitSLAT_Right_1", "HitSLAT_Right_2", "HitSLAT_Right_3", + "HitSLAT_back", + "HitSLAT_front" + }; + }; + class LT_01_scout_base_F: LT_01_base_F { + GVAR(hullDetonationProb) = 0; + GVAR(turretDetonationProb) = 0; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0; + GVAR(turretFireProb) = 0; + GVAR(engineFireProb) = 0.8; + GVAR(detonationDuringFireProb) = 0; + }; + class APC_Tracked_03_base_F: Tank_F { + GVAR(hullDetonationProb) = 0.2; + GVAR(turretDetonationProb) = 0.2; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0.7; + GVAR(turretFireProb) = 0.7; + GVAR(engineFireProb) = 0.7; + GVAR(detonationDuringFireProb) = 0.5; + GVAR(slatHitpoints)[] = { + "HitSLAT_Left_1", "HitSLAT_Left_2", "HitSLAT_Left_3", + "HitSLAT_Right_1", "HitSLAT_Right_2", "HitSLAT_Right_3", + "HitSLAT_top_back", "HitSLAT_top_left", "HitSLAT_top_right", + "HitSLAT_back", "HitSLAT_front" + }; + GVAR(canHaveFireRing) = 1; + }; + class APC_Wheeled_03_base_F: Wheeled_APC_F { + GVAR(hullDetonationProb) = 0.2; + GVAR(turretDetonationProb) = 0; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0.7; + GVAR(turretFireProb) = 0; + GVAR(engineFireProb) = 0.7; + GVAR(detonationDuringFireProb) = 0.5; + GVAR(slatHitpoints)[] = { + "HitSLAT_Left_1", "HitSLAT_Left_2", "HitSLAT_Left_3", + "HitSLAT_Right_1", "HitSLAT_Right_2", "HitSLAT_Right_3", + "HitSLAT_back", + "HitSLAT_front" + }; + }; + class MBT_03_base_F: Tank_F { + GVAR(hullDetonationProb) = 0.3; + GVAR(turretDetonationProb) = 0.5; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0.3; + GVAR(turretFireProb) = 0.2; + GVAR(engineFireProb) = 0.5; + GVAR(detonationDuringFireProb) = 0.7; + GVAR(slatHitpoints)[] = { + "HitSLAT_Left", "HitSLAT_Right", "HitSLAT_back", + "HitSLAT_top_left", "HitSLAT_top_right", "HitSLAT_top_back" + }; + GVAR(canHaveFireRing) = 1; + }; +}; + diff --git a/addons/vehicle_damage/README.md b/addons/vehicle_damage/README.md new file mode 100644 index 0000000000..8560222ff2 --- /dev/null +++ b/addons/vehicle_damage/README.md @@ -0,0 +1,4 @@ +ace_vehicle_damage +=================== + +Adds enhanced vehicle damage. Primary goal is to remove global vehicle health and instead opt for a "component based" health system. diff --git a/addons/vehicle_damage/XEH_PREP.hpp b/addons/vehicle_damage/XEH_PREP.hpp new file mode 100644 index 0000000000..0f379e241f --- /dev/null +++ b/addons/vehicle_damage/XEH_PREP.hpp @@ -0,0 +1,14 @@ +PREP(abandon); +PREP(addEventHandler); +PREP(handleBail); +PREP(handleVehicleDamage); +PREP(handleCookoff); +PREP(detonate); +PREP(processHit); +PREP(injureOccupants); +PREP(handleDetonation); +PREP(handleDamage); +PREP(knockOut); +PREP(addDamage); +PREP(handleDamageEjectIfDestroyed); +PREP(blowOffTurret); diff --git a/addons/vehicle_damage/XEH_postInit.sqf b/addons/vehicle_damage/XEH_postInit.sqf new file mode 100644 index 0000000000..88b29928e0 --- /dev/null +++ b/addons/vehicle_damage/XEH_postInit.sqf @@ -0,0 +1,65 @@ +#include "script_component.hpp" + +["ace_settingsInitialized", { + TRACE_1("settings init",GVAR(enabled)); + if (GVAR(enabled)) then { + [QGVAR(bailOut), { + params ["_center", "_crewman", "_vehicle"]; + TRACE_3("bailOut",_center,_crewman,_vehicle); + + if (isPlayer _crewman) exitWith {}; + if (!alive _crewman || { !( [_crewman] call EFUNC(common,isAwake))} ) exitWith {}; + + unassignVehicle _crewman; + _crewman leaveVehicle _vehicle; + doGetOut _crewman; + + private _angle = floor (random 360); + private _dist = (30 + (random 10)); + private _escape = _center getPos [_dist, _angle]; + + _crewman doMove _escape; + _crewman setSpeedMode "FULL"; + }] call CBA_fnc_addEventHandler; + + ["Tank", "init", LINKFUNC(addEventHandler), true, [], true] call CBA_fnc_addClassEventHandler; + ["Wheeled_APC_F", "init", LINKFUNC(addEventHandler), true, [], true] call CBA_fnc_addClassEventHandler; + + if (GVAR(enableCarDamage)) then { + ["Car", "init", LINKFUNC(addEventHandler), true, [], true] call CBA_fnc_addClassEventHandler; + }; + + // blow off turret effect + /* + Disabled temporarily due to issues with being able to repair tanks after death. Needs work + */ + /*["Tank", "killed", { + if (random 1 < 0.15) then { + (_this select 0) call FUNC(blowOffTurret); + }; + }, true, [], true] call CBA_fnc_addClassEventHandler;*/ + + // event to add a turret to a curator if the vehicle already belonged to that curator + if (isServer) then { + [QGVAR(addTurretToEditable), { + params ["_vehicle", "_turret"]; + + { + if (_vehicle in curatorEditableObjects _x) then { + _x addCuratorEditableObjects [[_turret], false]; + }; + } forEach allCurators; + }] call CBA_fnc_addEventHandler; + }; + }; + + // 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; +}] call CBA_fnc_addEventHandler; diff --git a/addons/vehicle_damage/XEH_preInit.sqf b/addons/vehicle_damage/XEH_preInit.sqf new file mode 100644 index 0000000000..9361d05015 --- /dev/null +++ b/addons/vehicle_damage/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#include "initSettings.sqf" + +ADDON = true; diff --git a/addons/vehicle_damage/XEH_preStart.sqf b/addons/vehicle_damage/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/vehicle_damage/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/vehicle_damage/config.cpp b/addons/vehicle_damage/config.cpp new file mode 100644 index 0000000000..4b1c790681 --- /dev/null +++ b/addons/vehicle_damage/config.cpp @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + // ammo/vehicle config defines touch all of these + requiredAddons[] = { "ace_common", "ace_cookoff" }; + author = ECSTRING(common,ACETeam); + authors[] = {"Brandon (TCVM)"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "CfgAmmo.hpp" diff --git a/addons/vehicle_damage/functions/fnc_abandon.sqf b/addons/vehicle_damage/functions/fnc_abandon.sqf new file mode 100644 index 0000000000..6740cf2476 --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_abandon.sqf @@ -0,0 +1,30 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Forces the AI currently in a vehicle to bail out. + * + * Arguments: + * 0: The vehicle in which to bail out + * + * Return Value: + * None + * + * Example: + * [tank2] call ace_vehicle_damage_fnc_abandon; + * + * Public: No + */ + +params ["_vehicle"]; +TRACE_2("abandon",_vehicle,(crew _vehicle) select {alive _x}); + +[{ + params ["_vehicle"]; + _vehicle allowCrewInImmobile false; + + private _center = getPosASL _vehicle; + TRACE_2("bailing out crew after delay",_vehicle,_center); + { + [QGVAR(bailOut), [_center, _x, _vehicle], _x] call CBA_fnc_targetEvent; + } forEach crew _vehicle; +}, _this, 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 new file mode 100644 index 0000000000..4cc6726953 --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_addDamage.sqf @@ -0,0 +1,42 @@ +#include "script_component.hpp" +/* + * Author: Brandon (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_knockOut + * + * 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 isEqualTo "hitengine" && { _damage > 0.9 }) then { + _vehicle call EFUNC(cookoff,engineFire); +}; diff --git a/addons/vehicle_damage/functions/fnc_addEventHandler.sqf b/addons/vehicle_damage/functions/fnc_addEventHandler.sqf new file mode 100644 index 0000000000..39a101d3b8 --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_addEventHandler.sqf @@ -0,0 +1,110 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Adds the event handler to a vehicle. + * + * Arguments: + * 0: The vehicle in which to add the event handler to + * + * Return Value: + * None + * + * Example: + * [tank2] call ace_vehicle_damage_fnc_addEventHandler; + * + * Public: No + */ + +params["_vehicle"]; +TRACE_2("addEventHandler",_vehicle,GVAR(enabled)); + +if !(GVAR(enabled)) exitWith { + #ifdef DEBUG_MODE_FULL + [{ ["Warning: Vehicle Damage not enabled...", 2] call CBA_fnc_notify; }, [], 5] call CBA_fnc_waitAndExecute; + #endif +}; + +private _hitpointHash = [[], nil] call CBA_fnc_hashCreate; +private _vehicleConfig = configFile >> "CfgVehicles" >> typeOf _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; + +// Add hitpoint names to config for quick lookup +{ + _x params ["_hitpoints", "_type"]; + { + [_hitpointHash, toLower _x, [_type, _hitpointsConfig >> _x, _x]] call CBA_fnc_hashSet; + } 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"]; + TRACE_1("checking config",_config); + private _configName = 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 _isEra = _configName in _eraHitpoints; + private _isSlat = _configName in _slatHitpoints; + private _isMisc = false; + + // prevent incompatibilites with old mods + if ((toLower _configName) isEqualTo "hitturret") then { + _isTurret = true; + }; + if ((toLower _configName) isEqualTo "hitgun") then { + _isGun = true; + }; + + private _hash = _vehicle getVariable QGVAR(hitpointHash); + { + _x params ["_hitType", "_hitPoints"]; + if ((toLower _configName) in _hitPoints) then { + [_hash, toLower _configName, [_hitType, _config, _configName]] call CBA_fnc_hashSet; + _isMisc = true; + }; + } 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, toLower _configName, ["gun", _config, _configName]] call CBA_fnc_hashSet; + }; + if (_isTurret) then { + [_hash, toLower _configName, ["turret", _config, _configName]] call CBA_fnc_hashSet; + }; + if (_isEra) then { + [_hash, toLower _configName, ["era", _config, _configName]] call CBA_fnc_hashSet; + }; + if (_isSlat) then { + [_hash, toLower _configName, ["slat", _config, _configName]] call CBA_fnc_hashSet; + }; + _vehicle setVariable [QGVAR(hitpointHash), _hash]; + } else { + { + [_vehicle, _x, _iterateThroughConfig, _hitpointAliases] call _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; + +_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; +}; diff --git a/addons/cookoff/functions/fnc_blowOffTurret.sqf b/addons/vehicle_damage/functions/fnc_blowOffTurret.sqf similarity index 94% rename from addons/cookoff/functions/fnc_blowOffTurret.sqf rename to addons/vehicle_damage/functions/fnc_blowOffTurret.sqf index 2d76463e8d..8e8a0548eb 100644 --- a/addons/cookoff/functions/fnc_blowOffTurret.sqf +++ b/addons/vehicle_damage/functions/fnc_blowOffTurret.sqf @@ -10,7 +10,7 @@ * None * * Example: - * (vehicle player) call ace_cookoff_fnc_blowOffTurret + * (vehicle player) call ace_vehicle_damage_fnc_blowOffTurret * * Public: No */ diff --git a/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf b/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf new file mode 100644 index 0000000000..f8dd6f5b7b --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf @@ -0,0 +1,118 @@ +#include "script_component.hpp" +/* + * Author: Brandon (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 toLower _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 new file mode 100644 index 0000000000..f615c4cdb5 --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_detonate.sqf @@ -0,0 +1,35 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Detonates vehicle ammo and heavily wounds all inside. + * + * Arguments: + * 0: The vehicle + * 1: Person who caused detonation (default: objNull) + * 2: An array of vehicle ammo in vehicle (default: []) + * + * Return Value: + * None + * + * Example: + * [tank2] call ace_vehicle_damage_fnc_detonate; + * + * Public: No + */ + +params ["_vehicle", ["_injurer", objNull], ["_vehicleAmmo", []]]; + +if (_vehicleAmmo isEqualTo []) then { + _vehicleAmmo = [_vehicle] call EFUNC(cookoff,getVehicleAmmo); +}; + +([_vehicle] + _vehicleAmmo) call EFUNC(cookoff,detonateAmmunition); + +if ((_vehicleAmmo select 1) > 0) then { + { + // random amount of injuries + for "_i" from 0 to random 5 do { + [_x, random 1 , selectRandom ["Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"], selectRandom ["bullet", "shell", "explosive"], _injurer] call EFUNC(medical,addDamageToUnit); + }; + } forEach crew _vehicle; +}; diff --git a/addons/vehicle_damage/functions/fnc_handleBail.sqf b/addons/vehicle_damage/functions/fnc_handleBail.sqf new file mode 100644 index 0000000000..e81c4cd76f --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_handleBail.sqf @@ -0,0 +1,67 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Handles whether or not the crew should bail. + * + * Arguments: + * 0: The vehicle + * 1: Can the vehicle move? + * 2: Can the vehicle shoot? + * + * Return Value: + * None + * + * Example: + * [tank1, false, true] call ace_vehicle_damage_fnc_handleBail + * + * Public: No + */ + +params ["_vehicle", "_canMove", "_canShoot"]; +private _isCar = (_vehicle isKindOf "Car" && { !(_vehicle isKindOf "Wheeled_APC_F") }); + +if (_canMove) then { + _canMove = alive driver _vehicle; +}; + +if (_canShoot) then { + _canShoot = alive gunner _vehicle; +}; + +_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); + }; +} 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 (!_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); + } else { + _vehicle allowFleeing 1; + LOG_4("[%1] Cannot shoot and is fleeing with chance [%2] [%3 | %4]",_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); + } else { + LOG_4("[%1] Cannot move and is bunkering with chance [%2] [%3 | %4]",_vehicle,_rand,_canMove,_canShoot); + }; + }; +}; + + diff --git a/addons/vehicle_damage/functions/fnc_handleCookoff.sqf b/addons/vehicle_damage/functions/fnc_handleCookoff.sqf new file mode 100644 index 0000000000..277c0a916e --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_handleCookoff.sqf @@ -0,0 +1,64 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Checks hitpoint damage and determines if a vehicle should cookoff. + * + * Arguments: + * 0: The 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) + * + * Return Value: + * If cooked off + * + * Example: + * [tank2, 0.1, 5] call ace_vehicle_damage_fnc_handleCookoff; + * + * Public: No + */ + +params ["_vehicle", "_chanceOfFire", "_intensity", ["_injurer", objNull], ["_hitPart", ""], ["_canRing", false]]; + +private _alreadyCookingOff = _vehicle getVariable [QGVAR(cookingOff), false]; + +if (!_alreadyCookingOff && { _chanceOfFire >= random 1 }) exitWith { + private _fireDetonateChance = [configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(detonationDuringFireProb), "number", 0] call CBA_fnc_getConfigEntry; + if (_canRing) then { + _canRing = 1 isEqualTo ([configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(canHaveFireRing), "number", 0] call CBA_fnc_getConfigEntry); + }; + + private _delayWithSmoke = _chanceOfFire < random 1; + private _detonateAfterCookoff = (_fireDetonateChance / 4) > random 1; + + private _source = ""; + if (toLower _hitPart isEqualTo "engine") then { + _source = ["hit_engine_point", "HitPoints"]; + }; + + [QEGVAR(cookOff,cookOff), [_vehicle, _intensity, _injurer, _delayWithSmoke, _fireDetonateChance, _detonateAfterCookoff, _source, _canRing]] call CBA_fnc_localEvent; + _vehicle setVariable [QGVAR(cookingOff), true]; + 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); + + // cant setVehicleAmmo 0 here because it removes FFV unit's ammo + if (GVAR(removeAmmoDuringCookoff)) then { + private _ammo = [_vehicle] call EFUNC(cookoff,getVehicleAmmo); + _ammo params ["_magazines"]; + TRACE_1("removing magazines",_magazines); + { + _x params ["_magazine"]; + _vehicle removeMagazines _magazine; + } forEach _magazines; + }; + true +}; + +// Avoid RPT spam +if (_alreadyCookingOff) exitWith { true }; + +LOG_2("[%1] No Cook-off - Chance of fire [%2]",_vehicle,_chanceOfFire); +false diff --git a/addons/vehicle_damage/functions/fnc_handleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleDamage.sqf new file mode 100644 index 0000000000..dd33fd2705 --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_handleDamage.sqf @@ -0,0 +1,80 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * 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) + * 4: Projectile that caused damage + * 5: Hit part index of hit point + * 6: Instigator of damage (unused) + * 7: Hit point config name + * + * Return Value: + * Current or maximum damage of part + * + * Example: + * [myVehicle, projectile, 5, 0.663] call ace_vehicle_damage_fnc_handleDamage; + * + * Public: No + */ + +params ["_vehicle", "", "_damage", "", "_projectile", "_hitIndex", "", "_hitPoint"]; +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 _newDamage = _damage - (_vehicle getHitIndex _hitIndex); + if !([_vehicle, _hitPoint, _hitIndex, _injurer, _vehicle getHitIndex _hitIndex, _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]; + }; +}; + +// 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 _returnHit = _vehicle getHitIndex _hitIndex; +private _criticalDamageIndex = (CRITICAL_HITPOINTS findIf { _x isEqualTo _hitPoint }) + 1; +if (_criticalDamageIndex > 0) then { + _returnHit = (_returnHit min (CRITICAL_HITPOINTS select _criticalDamageIndex)); +}; + +if (_hitPoint isEqualTo "" && _hitIndex < 0) then { + _returnHit = _returnHit min 0.89; +}; + +_returnHit diff --git a/addons/cookoff/functions/fnc_handleDamageEjectIfDestroyed.sqf b/addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf similarity index 100% rename from addons/cookoff/functions/fnc_handleDamageEjectIfDestroyed.sqf rename to addons/vehicle_damage/functions/fnc_handleDamageEjectIfDestroyed.sqf diff --git a/addons/vehicle_damage/functions/fnc_handleDetonation.sqf b/addons/vehicle_damage/functions/fnc_handleDetonation.sqf new file mode 100644 index 0000000000..9735746a06 --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_handleDetonation.sqf @@ -0,0 +1,38 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Checks hitpoint damage and determines if a vehicle should cookoff. + * + * Arguments: + * 0: The 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) + * + * Return Value: + * Detonated + * + * Example: + * [tank2, 0.5] call ace_vehicle_damage_fnc_handleDetonation; + * + * Public: No + */ + +params ["_vehicle", "_chanceOfDetonate", "_vehicleAmmo", "_explosiveAmmoCount", "_nonExplosiveAmmoCount", ["_injurer", objNull]]; +private _alreadyDetonating = _vehicle getVariable [QGVAR(detonating), false]; +private _isKnockedOut = _explosiveAmmoCount > 0; + +if (!_alreadyDetonating && { _chanceOfDetonate >= random 1 }) exitWith { + [_vehicle, _injurer, _vehicleAmmo] call FUNC(detonate); + LOG_2("Detonating [%1] with a chance-to-detonate [%2]",_vehicle,_chanceOfDetonate); + _vehicle setVariable [QGVAR(detonating), true]; + _isKnockedOut +}; + +// Avoid RPT spam +if (_alreadyDetonating) exitWith { _isKnockedOut }; + +LOG_2("[%1] No Detonation - Chance of detonation [%2]",_vehicle,_chanceOfDetonate); +false diff --git a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf new file mode 100644 index 0000000000..b17535f514 --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf @@ -0,0 +1,99 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * 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 + * + * Return Value: + * Whether or not to continue handling last frame's damage + * + * Example: + * [ace_vehicle_damage_fnc_handleTankDamage, tank1, "Hit_Engine", 12]] 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]; + }; + LOG_1("Vehicle [%1] no longer alive",_vehicle); + true +}; + +_hitPoint = toLower _hitPoint; +private _hitpointHash = _vehicle getVariable [QGVAR(hitpointHash), []]; +private _type = if (_hitpointHash isEqualTo []) then { + "exit" +} else { + ([_hitpointHash, _hitPoint] call CBA_fnc_hashGet) select 0 +}; + +if (isNil "_type") then { + _type = "exit"; +}; + +// generic structural damage will be transfered into hull damage for simulation's sake +private _structural = false; +if (_selection isEqualTo "") then { + _type = "hull"; + _hitPoint = "hithull"; + _structural = true; + TRACE_1("structural damage",_selection); + _newDamage = abs _newDamage; +}; + +if (_type isEqualTo "exit") exitWith { LOG_1("No relevant hitpoints hit [%1]. 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]]]; +} else { + private _hitPointInOldArray = _hitPoint in (_multHit select 2); + private _withinTime = (CBA_missionTime <= (_multHit select 0) + CONST_TIME) && { _injurer == (_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 { + private _oldHitPoints = _multHit select 2; + _oldHitPoints pushBack _hitPoint; + _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _injurer, _oldHitPoints]]; + _ignoreBailCheck = true; + } else { + _vehicle setVariable [QGVAR(hitTime), [CBA_missionTime, _injurer, [_hitPoint]]]; + }; + }; +}; +if (_ignoreHit && !_structural) exitWith { + LOG_3("Ignoring multiple hits done to vehicle [%1] by [%2] -- hitpoint [%3].",_vehicle,_injurer,_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 }; + +private _canMove = _vehicle getVariable[QGVAR(canMove), true]; +private _canShoot = _vehicle getVariable[QGVAR(canShoot), true]; + +if !(_ignoreBailCheck) then { + [_vehicle, _canMove, _canShoot] call FUNC(handleBail); +}; + +true diff --git a/addons/vehicle_damage/functions/fnc_injureOccupants.sqf b/addons/vehicle_damage/functions/fnc_injureOccupants.sqf new file mode 100644 index 0000000000..be08f583c8 --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_injureOccupants.sqf @@ -0,0 +1,76 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Injures occupants in a vehicle based on percent chance of injury. + * + * Arguments: + * 0: The vehicle + * 1: Injury Chance + * 2: Maximum people to injure + * 3: Projectile source (default: objNull) + * 4: Modifiers for probability for each crew type to be injured. (In order of: driver, gunner, commander, cargo) + * + * Return Value: + * None + * + * Example: + * [myVehicle, 0.6, 10] call ace_vehicle_damage_fnc_injureOccupants; + * + * Public: No + */ + +params ["_vehicle", "_chance", "_count", ["_source", objNull], ["_probabilityModifier", [1, 1, 1, 1]]]; +TRACE_4("adding damage to units", _vehicle, _chance, _count, _source); + +private _vehicleCrew = crew _vehicle; +private _crewCount = count _vehicleCrew; +if (_crewCount <= 0) exitWith {}; + +private _crewInjuryIndices = []; +{ + _crewInjuryIndices pushBack _forEachIndex; +} forEach _vehicleCrew; + +_crewInjuryIndices = _crewInjuryIndices call BIS_fnc_arrayShuffle; + +private _injuryCount = 0; +// Not actually doing anything to any initial vehicle crew in this forEach - just a way to loop through all crew at least once +{ + private _indexToInjure = -1; + { + private _modifier = _probabilityModifier select 3; + if ((_vehicleCrew select _x) isEqualTo driver _vehicle) then { + _modifier = _probabilityModifier select 0; + }; + if ((_vehicleCrew select _x) isEqualTo gunner _vehicle) then { + _modifier = _probabilityModifier select 1; + }; + if ((_vehicleCrew select _x) isEqualTo commander _vehicle) then { + _modifier = _probabilityModifier select 2; + }; + + if ((_chance * _modifier) > random 1) exitWith { + _indexToInjure = _forEachIndex; + }; + } forEach _crewInjuryIndices; + + if (_indexToInjure >= 0) then { + private _casualty = _vehicleCrew select (_crewInjuryIndices select _indexToInjure); + if (alive _casualty) then { + _injuryCount = _injuryCount + 1; + private _indexCount = count _crewInjuryIndices; + if (_indexCount >= 0) then { + _crewInjuryIndices deleteAt _indexToInjure; + + // arbitrary percentages + private _injuredBodyPart = ["Head", "Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"] selectRandomWeighted [0.3, 0.8, 0.5, 0.5, 0.3, 0.3]; + private _currentUnitDamage = _casualty getHitpointDamage _injuredBodyPart; + private _damageAmount = (_currentUnitDamage + random 1.8) max (_currentUnitDamage + 0.1); + + [_casualty, _damageAmount, _injuredBodyPart, "shell", _source] call EFUNC(medical,addDamageToUnit); + }; + }; + }; + + if (_injuryCount >= _count) exitWith {}; +} forEach _vehicleCrew; diff --git a/addons/vehicle_damage/functions/fnc_knockOut.sqf b/addons/vehicle_damage/functions/fnc_knockOut.sqf new file mode 100644 index 0000000000..6e554d8edd --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_knockOut.sqf @@ -0,0 +1,37 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Knock out vehicle from battle. Destroy all internal hitpoints. + * + * Arguments: + * 0: The vehicle + * + * Return Value: + * None + * + * Example: + * [vehicle player] call ace_vehicle_damage_fnc_knockOut + * + * Public: No + */ + +params ["_vehicle"]; +private _hash = _vehicle getVariable [QGVAR(hitpointHash), nil]; +if (isNil "_hash") exitWith {}; + +[_hash, { + private _hitpointAlias = _value#0; + if (_hitpointAlias isEqualTo "hull") then { + [_vehicle, -1, _key, 0.89] call FUNC(addDamage); + } 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); + } else { + private _currentDamage = _vehicle getHitpointDamage _key; + [_vehicle, -1, _key, (_currentDamage + (0.3 max random 1)) min 1] call FUNC(addDamage); + }; + }; + }; +}] call CBA_fnc_hashEachPair; + diff --git a/addons/vehicle_damage/functions/fnc_processHit.sqf b/addons/vehicle_damage/functions/fnc_processHit.sqf new file mode 100644 index 0000000000..9f0c6560a7 --- /dev/null +++ b/addons/vehicle_damage/functions/fnc_processHit.sqf @@ -0,0 +1,378 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * 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 + * + * Return Value: + * None + * + * Example: + * [myVehicle, projectile, 5, 0.663] call ace_vehicle_damage_fnc_processHit; + * + * Public: No + */ + +params ["_vehicle", "_projectile", "_hitIndex", "_newDamage", "_hitpointData", "_injurer"]; +_hitpointData params ["_hitArea", "_hitpointConfig", "_hitpointName"]; + +private _return = true; + +if (_newDamage < 0) then { + _newDamage = -_newDamage; +}; + +private _currentPartDamage = _vehicle getHitIndex _hitIndex; +private _nextPartDamage = _currentPartDamage + _newDamage; + +// 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 + { + _x setDamage 1; + _x setVariable [QEGVAR(medical,lastDamageSource), _injurer]; + _x setVariable [QEGVAR(medical,lastInstigator), _injurer]; + } forEach crew _vehicle; + _vehicle setDamage 1; + _return = false; + _return +}; + +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 _minDamage = [_hitpointConfig >> "minimalHit", "NUMBER", 0] call CBA_fnc_getConfigEntry; +if (_minDamage < 0) then { + _minDamage = -_minDamage; +}; + +private _ammoEffectiveness = 0; +private _projectileExplosive = [_projectileConfig >> "explosive", "NUMBER", 0] call CBA_fnc_getConfigEntry; +private _indirectHit = [_projectileConfig >> "indirectHit", "NUMBER", 0] call CBA_fnc_getConfigEntry; + +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); + }; +}; + +private _penChance = 1; +if (_newDamage < _minDamage) then { + _penChance = _newDamage / _minDamage; + TRACE_5("minimum damage modifying hit",_newDamage,_penChance,abs _minDamage,_warheadTypeStr,_hitArea); +}; + +if (_penChance < random 1) exitWith { + TRACE_1("didn't penetrate",_penChance); + _return +}; + +if (_minDamage == 0) then { + _minDamage = 1; +}; + +if (_warheadType isEqualTo WARHEAD_TYPE_HE) then { + private _modifiedIndirectHit = _indirectHit / 100; + if (_newDamage > _modifiedIndirectHit) then { + _newDamage = _newDamage / 2; + }; + _newDamage = (_newDamage * (_newDamage / _modifiedIndirectHit)) min _newDamage; +}; + +_ammoEffectiveness = if (_warheadType isEqualTo WARHEAD_TYPE_AP) then { + 0.15 max _newDamage +} else { + if (_warheadType isEqualTo WARHEAD_TYPE_HE) then { + (_newDamage / (_minDamage + (_indirectHit / 100)) * 0.2) + } else { + ((_newDamage / _minDamage) * 0.4) min 1 + }; +}; +TRACE_4("ammo effectiveness",_ammoEffectiveness,_newDamage,_minDamage,_warheadTypeStr); + +_incendiary = _incendiary * _ammoEffectiveness; + +private _isCar = (_vehicle isKindOf "Car" && { !(_vehicle isKindOf "Wheeled_APC_F") }); +if (_isCar) then { + _ammoEffectiveness = (_ammoEffectiveness + (_ammoEffectiveness * 0.5)) min 1; +}; + +private _injuryChance = 0; +private _injuryCount = 0; +switch (_warheadType) do { + case WARHEAD_TYPE_AP: { + _injuryChance = (_ammoEffectiveness * 2) min 1; + _injuryCount = 1 + (_ammoEffectiveness * round random 9); + }; + case WARHEAD_TYPE_HE: { + _injuryChance = 0.03 * (1 + _ammoEffectiveness); // spalling injury chance alongside direct hit potential + _injuryCount = 2 + (ceil random 3); + if (_isCar) then { + _injuryChance = 0.8; + _injuryCount = 3 max random count crew _vehicle; + }; + }; + default { + _injuryChance = (4 * _ammoEffectiveness) min 1; + _injuryCount = 2 + round random 3; + }; +}; +_injuryChance = _injuryChance * _penChance; + +private _currentVehicleAmmo = [_vehicle] call EFUNC(cookoff,getVehicleAmmo); +private _chanceOfDetonation = 0; +private _explosiveAmmoCount = 0; +private _nonExplosiveAmmoCount = 0; + +if !(count (_currentVehicleAmmo select 0) isEqualTo 0) 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; + + 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 { + _explosiveAmmoCount = _explosiveAmmoCount + 1; + } else { + _nonExplosiveAmmoCount = _nonExplosiveAmmoCount + 1; + }; + } forEach (_currentVehicleAmmo select 0); + if (_countOfExplodableAmmo != 0) then { + _chanceOfDetonation = _chanceOfDetonation / _countOfExplodableAmmo; + }; +}; +private _chanceToDetonate = 0; +private _chanceOfFire = 0; +private _currentFuel = fuel _vehicle; +private _vehicleConfig = _vehicle call CBA_fnc_getObjectConfig; +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 _cookoffIntensity = 4 * _currentFuel; + TRACE_6("hit engine",_chanceToDetonate,_chanceOfFire,_incendiary,_chanceOfDetonation,_currentFuel,_cookoffIntensity); + + if (_isCar) then { + _chanceOfFire = 0; // no cookoff for cars + }; + + if ([_vehicle, _chanceToDetonate, _currentVehicleAmmo, _explosiveAmmoCount, _nonExplosiveAmmoCount, _injurer] call FUNC(handleDetonation)) exitWith { + [_vehicle] call FUNC(knockOut); + }; + + // cap damage at 0.9 to avoid hard coded blow up + _nextPartDamage = (0.9 min _nextPartDamage); + + // fatal engine/drive system damage + if (_nextPartDamage == 0.9 || { 0.8 * _ammoEffectiveness > random 1 }) then { + [_vehicle, _hitIndex, _hitpointName, 0.9 * _penChance] call FUNC(addDamage); + _vehicle setVariable [QGVAR(canMove), false]; + } else { + [_vehicle, _hitIndex, _hitpointName, _nextPartDamage * _penChance] call FUNC(addDamage); + }; + + // slightly lower injury chance since this hit the engine block + [_vehicle, _injuryChance, _injuryCount, _injurer, [0.2, 0.2, 0.2, 0.4]] call FUNC(injureOccupants); + [_vehicle, _chanceOfFire, _cookoffIntensity, _injurer, _hitArea, 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 _cookoffIntensity = 1.5 + (_explosiveAmmoCount * _chanceOfFire); + TRACE_6("hit hull",_chanceToDetonate,_chanceOfFire,_incendiary,_chanceOfDetonation,_currentFuel,_cookoffIntensity); + + if (_isCar) then { + _chanceOfFire = 0; // no cookoff for cars + }; + + if ([_vehicle, _chanceToDetonate, _currentVehicleAmmo, _explosiveAmmoCount, _nonExplosiveAmmoCount, _injurer] call FUNC(handleDetonation)) exitWith { + [_vehicle, _hitIndex, _hitpointName, 0.89 * _penChance] call FUNC(addDamage); + [_vehicle] call FUNC(knockOut); + }; + + [_vehicle, _injuryChance, _injuryCount, _injurer, [1, 0.4, 0.4, 1]] call FUNC(injureOccupants); + + 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; + }; + }] call CBA_fnc_hashEachPair; + _vehicle setVariable [QGVAR(canShoot), false]; + }; + case (_rand < 0.5): { + [_vehicle, _hitIndex, _hitpointName, 0.89 * _penChance] call FUNC(addDamage); + _partKill = _partKill + ENGINE_HITPOINTS#0; + if !(_vehicle isKindOf "Wheeled_APC_F") then { + _partKill = _partKill + TRACK_HITPOINTS#0; + }; + + _vehicle setVariable [QGVAR(canMove), false]; + }; + case (_rand < 0.75): { + [_vehicle, _hitIndex, _hitpointName, 0.89 * _penChance] call FUNC(addDamage); + _partKill = _partKill + ENGINE_HITPOINTS#0; + if !(_vehicle isKindOf "Wheeled_APC_F") then { + _partKill = _partKill + TRACK_HITPOINTS#0; + }; + + // iterate through all keys and find appropriate turret + [_hash, { + if (_value#0 isEqualTo "turret") then { + _partKill pushBack _key; + }; + }] call CBA_fnc_hashEachPair; + + _vehicle setVariable [QGVAR(canMove), false]; + _vehicle setVariable [QGVAR(canShoot), false]; + }; + default{}; + }; + }; + + { + 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); + }; + 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 _cookoffIntensity = _explosiveAmmoCount * _chanceOfFire; + TRACE_6("hit turret",_chanceToDetonate,_chanceOfFire,_incendiary,_chanceOfDetonation,_currentFuel,_cookoffIntensity); + + if (_isCar) then { + _chanceOfFire = 0; // no cookoff for cars + }; + + if ([_vehicle, _chanceToDetonate, _currentVehicleAmmo, _explosiveAmmoCount, _nonExplosiveAmmoCount, _injurer] call FUNC(handleDetonation)) exitWith { + [_vehicle] call FUNC(knockOut); + }; + + if (0.8 * _ammoEffectiveness > random 1) then { + TRACE_1("damaged turret", _ammoEffectiveness * 0.8); + [_vehicle, _hitIndex, _hitpointName, 1 * _penChance] call FUNC(addDamage); + _vehicle setVariable [QGVAR(canShoot), false]; + }; + + [_vehicle, _injuryChance, _injuryCount, _injurer, [0.5, 1.5, 1.5, 0.8]] call FUNC(injureOccupants); + [_vehicle, _chanceOfFire, _cookoffIntensity, _injurer, "", true] call FUNC(handleCookoff); + }; + case "gun": { + TRACE_5("hit gun",_chanceToDetonate,_chanceOfFire,_incendiary,_chanceOfDetonation,_currentFuel); + if (0.8 * _ammoEffectiveness > random 1) then { + TRACE_1("damaged gun",_ammoEffectiveness * 0.8); + [_vehicle, _hitIndex, _hitpointName, 1 * _penChance] call FUNC(addDamage); + _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); + + 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); + }; + case "fuel": { + _chanceOfFire = (_incendiary * _currentFuel * _penChance) / 2; + private _cookoffIntensity = _currentFuel * 5; + TRACE_2("damaged fuel",_chanceOfFire,_cookoffIntensity); + + if (_isCar) then { + _chanceOfFire = 0; // no cookoff for cars + }; + + [_vehicle, _chanceOfFire, _cookoffIntensity, _injurer, "", false] call FUNC(handleCookoff); + + private _damage = (0.1 max (0.1 * _newDamage / _minDamage)) min 1; + [_vehicle, _hitIndex, _hitpointName, (_currentPartDamage + _damage) * _penChance] call FUNC(addDamage); + }; + 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 { + 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); + } else { + [_vehicle, _hitIndex, _hitpointName, _currentDamage + (0.5 max random 1)] call FUNC(addDamage); + }; + + if (_currentDamage < 1 && _warheadType isEqualTo 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 { + 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 { + _return = false; + }; + }; + }; + default { + TRACE_1("hit unknown hitpoint??",_hitArea); + } +}; + +_return diff --git a/addons/vehicle_damage/functions/script_component.hpp b/addons/vehicle_damage/functions/script_component.hpp new file mode 100644 index 0000000000..f55cfa57e8 --- /dev/null +++ b/addons/vehicle_damage/functions/script_component.hpp @@ -0,0 +1,2 @@ +#include "\z\ace\addons\vehicle_damage\script_component.hpp" + diff --git a/addons/vehicle_damage/initSettings.sqf b/addons/vehicle_damage/initSettings.sqf new file mode 100644 index 0000000000..e0d02acfbb --- /dev/null +++ b/addons/vehicle_damage/initSettings.sqf @@ -0,0 +1,29 @@ +[ + QGVAR(enabled), "CHECKBOX", + [ELSTRING(common,Enabled), LSTRING(setting_description)], + LSTRING(category_displayName), + true, // default value + true, // isGlobal + {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart +] call CBA_settings_fnc_init; + +[ + QGVAR(removeAmmoDuringCookoff), "CHECKBOX", + [LSTRING(removeAmmoAfterCookoff_setting_enable), LSTRING(removeAmmoAfterCookoff_setting_description)], + LSTRING(category_displayName), + true, // default value + true, // isGlobal + {[QGVAR(removeAmmoDuringCookoff), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false // Needs mission restart +] call CBA_settings_fnc_init; + +[ + QGVAR(enableCarDamage), "CHECKBOX", + [LSTRING(carDamage_setting_enable), LSTRING(carDamage_setting_description)], + LSTRING(category_displayName), + false, // default value + true, // isGlobal + {[QGVAR(enableCarDamage), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart +] call CBA_settings_fnc_init; diff --git a/addons/vehicle_damage/script_component.hpp b/addons/vehicle_damage/script_component.hpp new file mode 100644 index 0000000000..2cd8e6f36a --- /dev/null +++ b/addons/vehicle_damage/script_component.hpp @@ -0,0 +1,18 @@ +#define COMPONENT vehicle_damage +#define COMPONENT_BEAUTIFIED Vehicle Damage +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_VEHICLE_DAMAGE + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_VEHICLE_DAMAGE + #define DEBUG_SETTINGS DEBUG_SETTINGS_VEHICLE_DAMAGE +#endif + +#include "\z\ace\addons\main\script_macros.hpp" +#include "script_macros.hpp" diff --git a/addons/vehicle_damage/script_macros.hpp b/addons/vehicle_damage/script_macros.hpp new file mode 100644 index 0000000000..84f3120ac1 --- /dev/null +++ b/addons/vehicle_damage/script_macros.hpp @@ -0,0 +1,27 @@ +#define CONST_TIME 0.03 +#define MAX_CREW_BAILOUT_TIME 12 + +#define BAILOUT_CHANCE_SHOOT 0.5 +#define BAILOUT_CHANCE_MOVE 0.8 + +#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 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 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; } diff --git a/addons/vehicle_damage/stringtable.xml b/addons/vehicle_damage/stringtable.xml new file mode 100644 index 0000000000..e93a0497b1 --- /dev/null +++ b/addons/vehicle_damage/stringtable.xml @@ -0,0 +1,44 @@ + + + + + ACE Advanced Vehicle Damage + ACE 拡張車両ダメージ + + + Enable/Disable advanced vehicle damage + 拡張車両ダメージの使用を設定します。 + + + Enable/Disable advanced car damage (Experimental) + 拡張車ダメージ (試験的) + + + Enable/Disable advanced Car Damage + 拡張車ダメージの使用を設定します。 + + + Removes all vehicle ammo after cook-off + 誘爆後は車両から全ての弾薬を削除します。 + + + Enable/Disable Ammo Removal During Cook-Off + 誘爆後の弾薬処理 + + + Wreck (Turret) + Épave (tourelle) + Restos (torreta) + Rottami (torretta) + Wrak (wieżyczka) + Обломки (башня) + Wrack (Geschützturm) + Vrak (věž) + Ruínas (torre) + 잔해(포탑) + 残骸 (砲塔) + 殘骸 (砲塔) + 残骸 (炮塔) + + + diff --git a/addons/vehiclelock/CfgEventHandlers.hpp b/addons/vehiclelock/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/vehiclelock/CfgEventHandlers.hpp +++ b/addons/vehiclelock/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/vehiclelock/CfgWeapons.hpp b/addons/vehiclelock/CfgWeapons.hpp index 8c7f7b137a..b2cbdc5848 100644 --- a/addons/vehiclelock/CfgWeapons.hpp +++ b/addons/vehiclelock/CfgWeapons.hpp @@ -11,7 +11,7 @@ class CfgWeapons { picture = QPATHTOF(ui\keyBlack.paa); scope = 2; class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 0; + mass = 0.1; }; }; class ACE_key_lockpick: ACE_key_master { diff --git a/addons/vehiclelock/XEH_postInit.sqf b/addons/vehiclelock/XEH_postInit.sqf index 64bd4fd642..40afaf32af 100644 --- a/addons/vehiclelock/XEH_postInit.sqf +++ b/addons/vehiclelock/XEH_postInit.sqf @@ -4,7 +4,7 @@ [QGVAR(setupCustomKey), {_this call FUNC(serverSetupCustomKeyEH)}] call CBA_fnc_addEventHandler; [QGVAR(setVehicleLock), {_this call FUNC(setVehicleLockEH)}] call CBA_fnc_addEventHandler; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { TRACE_2("SettingsInitialized eh",GVAR(LockVehicleInventory),GVAR(VehicleStartingLockState)); if (hasInterface && {GVAR(LockVehicleInventory)}) then { diff --git a/addons/vehiclelock/initSettings.sqf b/addons/vehiclelock/initSettings.sqf index 30de8a692c..68a29ed749 100644 --- a/addons/vehiclelock/initSettings.sqf +++ b/addons/vehiclelock/initSettings.sqf @@ -7,7 +7,7 @@ [-1,60,10,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal {[QGVAR(defaultLockpickStrength), _this] call EFUNC(common,cbaSettings_settingChanged)} -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(lockVehicleInventory), "CHECKBOX", @@ -17,14 +17,14 @@ true, // isGlobal {[QGVAR(lockVehicleInventory), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(vehicleStartingLockState), "LIST", [LSTRING(VehicleStartingLockState_DisplayName), LSTRING(VehicleStartingLockState_Description)], LSTRING(DisplayName), - [[-1,0,1,2],["str_cfg_envsounds_default", LSTRING(VehicleStartingLockState_AsIs), LSTRING(VehicleStartingLockState_Locked), LSTRING(VehicleStartingLockState_Unlocked)], 0], // [values, titles, defaultIndex] + [[-1,0,1,2],[LSTRING(VehicleStartingLockState_AsIs), LSTRING(VehicleStartingLockState_RemoveAmbiguousLockState), LSTRING(VehicleStartingLockState_Locked), LSTRING(VehicleStartingLockState_Unlocked)], 0], // [values, titles, defaultIndex] true, // isGlobal {[QGVAR(vehicleStartingLockState), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/vehiclelock/readme.md b/addons/vehiclelock/readme.md index 64ae01a99c..85923203cb 100644 --- a/addons/vehiclelock/readme.md +++ b/addons/vehiclelock/readme.md @@ -33,8 +33,3 @@ Two key modes (can be used together): #### Public Functions: `[bob, car1, true] call ACE_VehicleLock_fnc_addKeyForVehicle;` - will add a `ACE_key_customKeyMagazine` to bob and program it to work on car1 -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [PabstMirror](https://github.com/PabstMirror) diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index b4bc668415..1b4d7de361 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -15,6 +15,7 @@ ACE Verrouillage véhicule ACE Zamykání Vozidel ACE Araç Kilidi + ACE Bloqueo de vehículo Unlock Vehicle @@ -262,7 +263,7 @@ Set lock state for all vehicles (removes ambiguous lock states) - Ustawia początkowy stan blokady dla wszystkich pojazdów (usuwa dwuznaczne stany blokady) + Ustawia początkowy stan blokady dla wszystkich pojazdów (usuwa niejednoznaczny stan blokady) Establece el estado de cierre para todos los vehículos (elimina estados de cierre ambiguos) Setze Sperrstatus für alle Fahrzeuge (entfernt unklare Sperrzustände) Nastavit stav zámku u všech vozidel (odstraňuje nejednoznačné stavy zámků) @@ -276,6 +277,14 @@ 设定所有载具的初始上锁状态 (移除不明确的锁定状态) 設定所有載具的初始上鎖狀態 (移除不明確的鎖定狀態) + + Remove Ambiguous Lock State + Eliminar estado de bloqueo ambiguo + Supprimer les états de verrouillage ambigus + Устранить неоднозначные состояния замков + Usuń niejednoznaczny stan blokady + あいまいな鍵の状態を削除 + As Is Jak jest diff --git a/addons/vehicles/CfgEventHandlers.hpp b/addons/vehicles/CfgEventHandlers.hpp index fb16727899..062417fc1c 100644 --- a/addons/vehicles/CfgEventHandlers.hpp +++ b/addons/vehicles/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/vehicles/CfgVehicles.hpp b/addons/vehicles/CfgVehicles.hpp index ff79ed26f4..45d0e557e4 100644 --- a/addons/vehicles/CfgVehicles.hpp +++ b/addons/vehicles/CfgVehicles.hpp @@ -16,7 +16,9 @@ class CfgVehicles { class CommanderOptics;//: NewTurret {}; }; - class Car: LandVehicle {}; + class Car: LandVehicle { + GVAR(engineStartDelay) = 1.3; + }; class Tank: LandVehicle { class Turrets { @@ -231,14 +233,14 @@ class CfgVehicles { }; // Tanks DLC Wiesel 2 - class LT_01_base_F : Tank_F { - class Turrets : Turrets { - class MainTurret : MainTurret {}; + class LT_01_base_F: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret {}; }; }; - class LT_01_cannon_base_F : LT_01_base_F { - class Turrets : Turrets { - class MainTurret : MainTurret { + class LT_01_cannon_base_F: LT_01_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { weapons[] = { "SmokeLauncher", "ACE_LMG_coax_ext_MG3", @@ -249,8 +251,8 @@ class CfgVehicles { }; // Tanks DLC Rooikat 120 - class AFV_Wheeled_01_base_F : wheeled_APC_F { - class Turrets : Turrets { + class AFV_Wheeled_01_base_F: wheeled_APC_F { + class Turrets: Turrets { class MainTurret: MainTurret { weapons[] = {"ACE_cannon_120mm_GT12","ACE_LMG_coax_DenelMG4"}; magazines[] = {"12Rnd_120mm_APFSDS_shells_Tracer_Red","8Rnd_120mm_HE_shells_Tracer_Red","8Rnd_120mm_HEAT_MP_T_Red","4Rnd_120mm_LG_cannon_missiles","200Rnd_762x51_Belt_T_Red","200Rnd_762x51_Belt_T_Red","200Rnd_762x51_Belt_T_Red","200Rnd_762x51_Belt_T_Red"}; @@ -259,19 +261,19 @@ class CfgVehicles { }; // Tanks DLC Armata - class MBT_04_base_F : Tank_F { - class Turrets : Turrets { - class MainTurret : MainTurret { - class Turrets : Turrets { + class MBT_04_base_F: Tank_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + class Turrets: Turrets { class CommanderOptics: CommanderOptics {}; }; }; }; }; - class MBT_04_cannon_base_F : MBT_04_base_F { - class Turrets : Turrets { - class MainTurret : MainTurret { - class Turrets : Turrets { + class MBT_04_cannon_base_F: MBT_04_base_F { + class Turrets: Turrets { + class MainTurret: MainTurret { + class Turrets: Turrets { class CommanderOptics: CommanderOptics { weapons[] = {"ACE_HMG_127_KORD","SmokeLauncher"}; }; diff --git a/addons/vehicles/CfgWeapons.hpp b/addons/vehicles/CfgWeapons.hpp index 4c1c4575b9..2fbe4e5246 100644 --- a/addons/vehicles/CfgWeapons.hpp +++ b/addons/vehicles/CfgWeapons.hpp @@ -10,7 +10,7 @@ class CfgWeapons { class ACE_LMG_coax_MAG58_mem3: LMG_coax {}; class ACE_LMG_coax_ext_MAG58: LMG_coax_ext {}; class ACE_LMG_coax_ext_MG3: LMG_coax_ext {}; - class ACE_LMG_coax_DenelMG4 : LMG_coax {}; + 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" @@ -28,16 +28,16 @@ class CfgWeapons { }; }; - class HMG_127_APC : HMG_127 {}; - class ACE_HMG_127_KORD : HMG_127_APC {}; + class HMG_127_APC: HMG_127 {}; + class ACE_HMG_127_KORD: HMG_127_APC {}; // Tanks DLC: weapons for Wiesel and Rooikat class CannonCore; - class autocannon_Base_F : CannonCore {}; - class cannon_20mm : autocannon_Base_F {}; - class ACE_cannon_20mm_Rh202 : cannon_20mm {}; + class autocannon_Base_F: CannonCore {}; + class cannon_20mm: autocannon_Base_F {}; + class ACE_cannon_20mm_Rh202: cannon_20mm {}; - class cannon_120mm : CannonCore {}; - class ACE_cannon_120mm_GT12 : cannon_120mm {}; + class cannon_120mm: CannonCore {}; + class ACE_cannon_120mm_GT12: cannon_120mm {}; }; diff --git a/addons/vehicles/README.md b/addons/vehicles/README.md index fe26f297df..a84b558a67 100644 --- a/addons/vehicles/README.md +++ b/addons/vehicles/README.md @@ -2,11 +2,3 @@ ace_vehicles ============ Various tweaks to vehicle and vehicle weapon configs. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/vehicles/XEH_PREP.hpp b/addons/vehicles/XEH_PREP.hpp index ec2e27a94e..de72ce99f8 100644 --- a/addons/vehicles/XEH_PREP.hpp +++ b/addons/vehicles/XEH_PREP.hpp @@ -1,3 +1,4 @@ - +PREP(autoThrottle); PREP(speedLimiter); PREP(startEngine); +PREP(setVehicleStartDelay); \ No newline at end of file diff --git a/addons/vehicles/XEH_postInit.sqf b/addons/vehicles/XEH_postInit.sqf index 757e7a921a..23b1a2b226 100644 --- a/addons/vehicles/XEH_postInit.sqf +++ b/addons/vehicles/XEH_postInit.sqf @@ -19,11 +19,16 @@ GVAR(isSpeedLimiter) = false; // Conditions: specific if !(ACE_player == driver vehicle ACE_player && {vehicle ACE_player isKindOf 'Car' || - {vehicle ACE_player isKindOf 'Tank'}}) exitWith {false}; + {vehicle ACE_player isKindOf 'Tank'} || + {vehicle ACE_player isKindOf 'Plane'}}) exitWith {false}; GVAR(isUAV) = false; // Statement - [ACE_player, vehicle ACE_player] call FUNC(speedLimiter); + if (vehicle ACE_player isKindOf 'Plane') then { + [ACE_player, vehicle ACE_player] call FUNC(autoThrottle); + } else { + [ACE_player, vehicle ACE_player] call FUNC(speedLimiter); + }; true }; diff --git a/addons/vehicles/functions/fnc_autoThrottle.sqf b/addons/vehicles/functions/fnc_autoThrottle.sqf new file mode 100644 index 0000000000..ee8996a5a8 --- /dev/null +++ b/addons/vehicles/functions/fnc_autoThrottle.sqf @@ -0,0 +1,98 @@ +#include "script_component.hpp" +/* + * Author: Brandon (TCVM) + * Toggle speed limiter for Driver in Plane. Uses a simple PID controller to manage thrust + * + * Arguments: + * 0: Driver + * 1: Vehicle + * + * Return Value: + * None + * + * Example: + * [player, car] call ace_vehicles_fnc_autoThrottle + * + * Public: No + */ +#define PID_P 1 +#define PID_I 0.3 +#define PID_D 0 +#define EPSILON 0.001 + +params ["_driver", "_vehicle"]; + +if (GVAR(isSpeedLimiter)) exitWith { + [localize LSTRING(Off)] call EFUNC(common,displayTextStructured); + playSound "ACE_Sound_Click"; + GVAR(isSpeedLimiter) = false; +}; + +[localize LSTRING(On)] call EFUNC(common,displayTextStructured); +playSound "ACE_Sound_Click"; +GVAR(isSpeedLimiter) = true; + +// Convert forward speed to KM/H. `speed _vehicle` isnt accurate enough for this controller to work well, so its easier to use M/S. The system assumes it is KM/H so we need the conversion +GVAR(speedLimit) = (((velocityModelSpace _vehicle) select 1) * 3.6) max 5; + +[{ + params ["_args", "_idPFH"]; + _args params ["_driver", "_vehicle", "_autothrottleParameters"]; + _autothrottleParameters params ["_lastVelocity", "_integralValue", "_lastTime", "_lastThrottleValue", "_throttleLogValue"]; + + // this will take into account game being pausesd + private _deltaTime = CBA_missionTime - _lastTime; + + if (_driver != driver _vehicle) then { + GVAR(isSpeedLimiter) = false; + }; + + if (_throttleLogValue == 0) then { + _throttleLogValue = 1; + }; + + private _currentThrottle = (airplaneThrottle _vehicle) ^ _throttleLogValue; + if (_lastThrottleValue != -1 && { EPSILON < abs (_currentThrottle - _lastThrottleValue) }) then { + // player/script has moved throttle, stop limiting speed + // ARMA will allow an increment of one throttle unit per frame, so if there is a difference between our known throttle value and actual throttle value, the player must of changed it + [localize LSTRING(Off)] call EFUNC(common,displayTextStructured); + playSound "ACE_Sound_Click"; + GVAR(isSpeedLimiter) = false; + }; + + if (!GVAR(isSpeedLimiter)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + }; + + if (_deltaTime == 0) exitWith {}; + + private _forwardVelocity = (velocityModelSpace _vehicle) select 1; + // convert from KM/H to M/S + private _velocityError = (GVAR(speedLimit) / 3.6) - _forwardVelocity; + + // strictly speaking this would work better if this error was time to zero acceleration. I can't find the acceleration values in config, however, so this works instead + private _errorDiff = _velocityError - _lastVelocity; + + private _p = PID_P * _velocityError; + private _i = _integralValue + (PID_I * _errorDiff * _deltaTime); + private _d = PID_D * _errorDiff / _deltaTime; + + private _outputBeforeSaturation = _p + _i + _d; + private _throttle = 0 max (_outputBeforeSaturation min 1); + + // if we are saturated, we clamp the integral value to avoid integral windup + if (_outputBeforeSaturation != _throttle) then { + // saturated + _i = _integralValue; + _throttle = 0 max ((_p + _d) min 1); + }; + + _vehicle setAirplaneThrottle _throttle; + + _autothrottleParameters set [0, _d]; + _autothrottleParameters set [1, _i]; + _autothrottleParameters set [2, CBA_missionTime]; + _autothrottleParameters set [3, _throttle]; + +}, 0, [_driver, _vehicle, [0, 0, CBA_missionTime, -1, getNumber (configOf _vehicle >> "throttleToThrustLogFactor")]]] call CBA_fnc_addPerFrameHandler; + diff --git a/addons/vehicles/functions/fnc_setVehicleStartDelay.sqf b/addons/vehicles/functions/fnc_setVehicleStartDelay.sqf new file mode 100644 index 0000000000..337a1d961b --- /dev/null +++ b/addons/vehicles/functions/fnc_setVehicleStartDelay.sqf @@ -0,0 +1,23 @@ +#include "script_component.hpp" +/* + * Author: severgun + * Set engine startup delay to specific vehicle. + * + * Arguments: + * 0: Vehicle + * 1: Delay (seconds) + * + * Return Value: + * None + * + * Example: + * [hemmt, 3.2] call ace_vehicles_fnc_setVehicleStartDelay + * + * Public: Yes + */ + +params [["_veh", objNull, [objNull]], ["_delay", 0, [99]]]; + +if (isNull _veh || {!(_veh isKindOf "AllVehicles")}) exitWith {}; + +_veh setVariable [QGVAR(engineStartDelay), _delay max 0, true]; \ No newline at end of file diff --git a/addons/vehicles/functions/fnc_speedLimiter.sqf b/addons/vehicles/functions/fnc_speedLimiter.sqf index da2f7bf19a..6d76293bff 100644 --- a/addons/vehicles/functions/fnc_speedLimiter.sqf +++ b/addons/vehicles/functions/fnc_speedLimiter.sqf @@ -21,9 +21,13 @@ params ["_driver", "_vehicle"]; if (GVAR(isSpeedLimiter)) exitWith { [localize LSTRING(Off)] call EFUNC(common,displayTextStructured); playSound "ACE_Sound_Click"; + _vehicle setCruiseControl [0, false]; GVAR(isSpeedLimiter) = false; }; +(getCruiseControl _vehicle) params ["_speedLimit"]; +if (_speedLimit != 0) exitWith { TRACE_1("speed limit set by external source",_speedLimit); }; + [localize LSTRING(On)] call EFUNC(common,displayTextStructured); playSound "ACE_Sound_Click"; GVAR(isSpeedLimiter) = true; @@ -38,21 +42,24 @@ GVAR(speedLimit) = speed _vehicle max 5; private _uavControll = UAVControl _vehicle; if ((_uavControll select 0) != _driver || _uavControll select 1 != "DRIVER") then { GVAR(isSpeedLimiter) = false; + _vehicle setCruiseControl [0, false]; }; } else { if (_driver != driver _vehicle) then { GVAR(isSpeedLimiter) = false; + _vehicle setCruiseControl [0, false]; }; }; if (!GVAR(isSpeedLimiter)) exitWith { + _vehicle setCruiseControl [0, false]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; - private _speed = speed _vehicle; - - if (_speed > GVAR(speedLimit)) then { - _vehicle setVelocity ((velocity _vehicle) vectorMultiply ((GVAR(speedLimit) / _speed) - 0.00001)); // fix 1.42-hotfix PhysX libraries applying force in previous direction when turning + getCruiseControl _vehicle params ["_currentSpeedLimit"]; + if (_currentSpeedLimit != GVAR(speedLimit)) then { + _vehicle setCruiseControl [GVAR(speedLimit), false]; }; + }, 0, [_driver, _vehicle]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/vehicles/functions/fnc_startEngine.sqf b/addons/vehicles/functions/fnc_startEngine.sqf index 4277f518e1..4a4633b080 100644 --- a/addons/vehicles/functions/fnc_startEngine.sqf +++ b/addons/vehicles/functions/fnc_startEngine.sqf @@ -20,6 +20,9 @@ params ["_vehicle", "_isEngineOn"]; if (!_isEngineOn || {floor abs speed _vehicle > 0 || {!isNull isVehicleCargo _vehicle}}) exitWith {}; +private _startupDelay = _vehicle getVariable [QGVAR(engineStartDelay), getNumber (configOf _vehicle >> QGVAR(engineStartDelay))]; +if (_startupDelay <= 0) exitWith {}; + [{ params ["_args", "_idPFH"]; _args params ["_vehicle", "_time", "_direction"]; @@ -29,4 +32,4 @@ if (!_isEngineOn || {floor abs speed _vehicle > 0 || {!isNull isVehicleCargo _ve _vehicle setVelocity [0, 0, 0]; _vehicle setVectorDirAndUp _direction; -} , 0, [_vehicle, CBA_missionTime + STARTUP_DELAY, [vectorDir _vehicle, vectorUp _vehicle]]] call CBA_fnc_addPerFrameHandler; +} , 0, [_vehicle, CBA_missionTime + _startupDelay, [vectorDir _vehicle, vectorUp _vehicle]]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/vehicles/script_component.hpp b/addons/vehicles/script_component.hpp index b985da6632..ae4eec2fd0 100644 --- a/addons/vehicles/script_component.hpp +++ b/addons/vehicles/script_component.hpp @@ -20,4 +20,3 @@ #define MOUSE_SCROLL_DOWN 0xF9 #define FUEL_FACTOR 0.165 // fuel capacity = range in km * FUEL_FACTOR -#define STARTUP_DELAY 1.3 diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml index 18716d4887..bb6ca8d48a 100644 --- a/addons/vehicles/stringtable.xml +++ b/addons/vehicles/stringtable.xml @@ -156,6 +156,7 @@ 設定速度の増減量 Krokování omezovače rychlosti Шаг ограничителя скорости + Salto de limitador de vehículo diff --git a/addons/viewdistance/ACE_Settings.hpp b/addons/viewdistance/ACE_Settings.hpp index 63c2a5d19a..e99752c891 100644 --- a/addons/viewdistance/ACE_Settings.hpp +++ b/addons/viewdistance/ACE_Settings.hpp @@ -1,53 +1,20 @@ class ACE_Settings { class GVAR(enabled) { - category = CSTRING(Module_DisplayName); - typeName = "BOOL"; - value = 1; - displayName = CSTRING(enabled_DisplayName); - description = CSTRING(enabled_Description); + movedToSQF = 1; }; class GVAR(viewDistanceOnFoot) { - category = CSTRING(Module_DisplayName); - typeName = "SCALAR"; - isClientSettable = 1; - value = 0; // index, NOT value // Can set it to client's actual viewdistance in the init function once ACE_Settings supports numbers (if ever). - values[] = {CSTRING(videosettings), "500", "1000", "1500", "2000", "2500", "3000", "3500", "4000", "5000", "6000", "7000", "8000", "9000", "10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf - displayName = CSTRING(onFoot_DisplayName); - description = CSTRING(onFoot_Description); + movedToSQF = 1; }; class GVAR(viewDistanceLandVehicle) { - category = CSTRING(Module_DisplayName); - typeName = "SCALAR"; - isClientSettable = 1; - value = 0; // index, NOT value - values[] = {CSTRING(videosettings), "500", "1000", "1500", "2000", "2500", "3000", "3500", "4000", "5000", "6000", "7000", "8000", "9000", "10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf - displayName = CSTRING(landVehicle_DisplayName); - description = CSTRING(landVehicle_Description); + movedToSQF = 1; }; class GVAR(viewDistanceAirVehicle) { - category = CSTRING(Module_DisplayName); - typeName = "SCALAR"; - isClientSettable = 1; - value = 0; // index, NOT value - values[] = {CSTRING(videosettings), "500", "1000", "1500", "2000", "2500", "3000", "3500", "4000", "5000", "6000", "7000", "8000", "9000", "10000"}; // Values also need to be changed in functions/fnc_returnValue.sqf - displayName = CSTRING(airVehicle_DisplayName); - description = CSTRING(airVehicle_Description); + movedToSQF = 1; }; class GVAR(limitViewDistance) { - category = CSTRING(Module_DisplayName); - typeName = "SCALAR"; - value = 10000; // Value, NOT index. 10000 is the maximum in A3 - displayName = CSTRING(limit_DisplayName); - description = CSTRING(limit_setting); - sliderSettings[] = {500, 12000, 10000, 0}; + movedToSQF = 1; }; class GVAR(objectViewDistanceCoeff) { - category = CSTRING(Module_DisplayName); - typeName = "SCALAR"; - isClientSettable = 1; - value = 0; // index. Actual coefficient is given by functions/fnc_returnObjectCoeff.sqf - values[] = {CSTRING(object_off), CSTRING(object_verylow), CSTRING(object_low), CSTRING(object_medium),CSTRING(object_high), CSTRING(object_veryhigh), CSTRING(object_fovBased)}; - displayName = CSTRING(object_DisplayName); - description = CSTRING(object_Description); + movedToSQF = 1; }; }; diff --git a/addons/viewdistance/CfgEventHandlers.hpp b/addons/viewdistance/CfgEventHandlers.hpp index 6dddc323b1..505e215d29 100644 --- a/addons/viewdistance/CfgEventHandlers.hpp +++ b/addons/viewdistance/CfgEventHandlers.hpp @@ -1,19 +1,19 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_clientInit)); }; }; diff --git a/addons/viewdistance/README.md b/addons/viewdistance/README.md index 2f0b14dbeb..f76d5c4e50 100644 --- a/addons/viewdistance/README.md +++ b/addons/viewdistance/README.md @@ -2,11 +2,3 @@ ace_viewdistance =========== Adds various View Distance settings, including Field of View based Object View Distance, and allows limiting maximum view distance that can be set by players. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Winter](https://github.com/Winter259) -- [Jonpas](https://github.com/jonpas) diff --git a/addons/viewdistance/XEH_PREP.hpp b/addons/viewdistance/XEH_PREP.hpp index c040baf334..f766232a4d 100644 --- a/addons/viewdistance/XEH_PREP.hpp +++ b/addons/viewdistance/XEH_PREP.hpp @@ -2,5 +2,4 @@ PREP(adaptViewDistance); PREP(changeViewDistance); PREP(initModule); PREP(returnObjectCoeff); -PREP(returnValue); PREP(setFovBasedOvdPFH); diff --git a/addons/viewdistance/XEH_clientInit.sqf b/addons/viewdistance/XEH_clientInit.sqf index eb609a40f9..c60137939f 100644 --- a/addons/viewdistance/XEH_clientInit.sqf +++ b/addons/viewdistance/XEH_clientInit.sqf @@ -2,25 +2,13 @@ if (!hasInterface) exitWith {}; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { // if not enabled, then bugger off. if !(GVAR(enabled)) exitWith {}; // Limit on load [false] call FUNC(adaptViewDistance); - // Set the EH which waits for any of the view distance settings to be changed, so that the effect is show immediately - ["ace_settingChanged",{ - params ["_name"]; - if ((_name == QGVAR(viewDistanceOnFoot)) || - (_name == QGVAR(viewDistanceLandVehicle)) || - (_name == QGVAR(viewDistanceAirVehicle)) || - (_name == QGVAR(objectViewDistanceCoeff))) then { - - [true] call FUNC(adaptViewDistance); - }; - }] call CBA_fnc_addEventHandler; - // Set the EH which waits for a vehicle change to automatically swap between On Foot/In Land Vehicle/In Air Vehicle // Also run when SettingsInitialized runs (not guaranteed) ["vehicle",{ @@ -29,5 +17,5 @@ if (!hasInterface) exitWith {}; ["ACE_controlledUAV", { [false] call FUNC(adaptViewDistance); }] call CBA_fnc_addEventHandler; - + }] call CBA_fnc_addEventHandler; diff --git a/addons/viewdistance/XEH_preInit.sqf b/addons/viewdistance/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/viewdistance/XEH_preInit.sqf +++ b/addons/viewdistance/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/viewdistance/functions/fnc_changeViewDistance.sqf b/addons/viewdistance/functions/fnc_changeViewDistance.sqf index cb8a07db2d..64e906b5c1 100644 --- a/addons/viewdistance/functions/fnc_changeViewDistance.sqf +++ b/addons/viewdistance/functions/fnc_changeViewDistance.sqf @@ -4,7 +4,7 @@ * Sets the player's current view distance according to allowed values. * * Arguments: - * 0: View Distance setting INDEX + * 0: View Distance setting * 1: Show Prompt * * Return Value: @@ -16,14 +16,17 @@ * Public: No */ -params ["_indexRequested", "_showPrompt"]; +params ["_viewDistance", "_showPrompt"]; + +if (_viewDistance == 0) then { // Video Settings + _viewDistance = viewDistance; +}; -private _newViewDistance = [_indexRequested] call FUNC(returnValue); // changes the setting index into an actual view distance value private _objectViewDistanceCoeff = [GVAR(objectViewDistanceCoeff)] call FUNC(returnObjectCoeff); // changes the setting index into a coefficient. private _viewDistanceLimit = GVAR(limitViewDistance); // Grab the limit -TRACE_3("Limit",_newViewDistance,_viewDistanceLimit,_showPrompt); -setViewDistance (_newViewDistance min _viewDistanceLimit); +TRACE_3("Limit",_viewDistance,_viewDistanceLimit,_showPrompt); +setViewDistance (_viewDistance min _viewDistanceLimit); if (_objectViewDistanceCoeff isEqualType 0) then { if (_objectViewDistanceCoeff > 0) then { @@ -52,7 +55,7 @@ if (_showPrompt) then { _text = [ format ["%1 %2m", localize LSTRING(invalid), viewDistance], format ["%1 %2m", localize LSTRING(infotext), viewDistance] - ] select (_newViewDistance <= _viewDistanceLimit); + ] select (_viewDistance <= _viewDistanceLimit); _text = _text + format ["
%1 %2%3", localize LSTRING(objectinfotext), _objectViewDistanceCoeff * 100, "%"]; }; [parseText _text, 2] call EFUNC(common,displayTextStructured); diff --git a/addons/viewdistance/functions/fnc_returnValue.sqf b/addons/viewdistance/functions/fnc_returnValue.sqf deleted file mode 100644 index b1727dddee..0000000000 --- a/addons/viewdistance/functions/fnc_returnValue.sqf +++ /dev/null @@ -1,37 +0,0 @@ -#include "script_component.hpp" -/* - * Author: Winter - * Returns the view distance value according to the given index. - * - * Arguments: - * 0: View Distance Index - * - * Return Value: - * View Distance - * - * Example: - * [2] call ace_viewdistance_fnc_returnValue - * - * Public: No - */ - -params ["_index"]; - -switch (_index) do { - case 0: {viewDistance}; // Video Settings option - case 1: {500}; - case 2: {1000}; - case 3: {1500}; - case 4: {2000}; - case 5: {2500}; - case 6: {3000}; - case 7: {3500}; - case 8: {4000}; - case 9: {5000}; - case 10: {6000}; - case 11: {7000}; - case 12: {8000}; - case 13: {9000}; - case 14: {10000}; - default {1000}; -}; diff --git a/addons/viewdistance/initSettings.sqf b/addons/viewdistance/initSettings.sqf new file mode 100644 index 0000000000..9c474b5f1f --- /dev/null +++ b/addons/viewdistance/initSettings.sqf @@ -0,0 +1,54 @@ +private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)]; + +[ + QGVAR(enabled), "CHECKBOX", + [LSTRING(enabled_DisplayName), LSTRING(enabled_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(viewDistanceOnFoot), "SLIDER", + [LSTRING(onFoot_DisplayName), LSTRING(onFoot_Description)], + _category, + [0, 10000, 0, -1], + 0, + {[true] call FUNC(adaptViewDistance)} +] call CBA_fnc_addSetting; + +[ + QGVAR(viewDistanceLandVehicle), "SLIDER", + [LSTRING(landVehicle_DisplayName), LSTRING(landVehicle_Description)], + _category, + [0, 10000, 0, -1], + 0, + {[true] call FUNC(adaptViewDistance)} +] call CBA_fnc_addSetting; + +[ + QGVAR(viewDistanceAirVehicle), "SLIDER", + [LSTRING(airVehicle_DisplayName), LSTRING(airVehicle_Description)], + _category, + [0, 10000, 0, -1], + 0, + {[true] call FUNC(adaptViewDistance)} +] call CBA_fnc_addSetting; + +[ + QGVAR(limitViewDistance), "SLIDER", + [LSTRING(limit_DisplayName), LSTRING(limit_setting)], + _category, + [500, 12000, 10000, -1], + 1, + {[true] call FUNC(adaptViewDistance)} +] call CBA_fnc_addSetting; + +[ + QGVAR(objectViewDistanceCoeff), "LIST", + [LSTRING(object_DisplayName), LSTRING(object_Description)], + _category, + [[0, 1, 2, 3, 4, 5, 6], [LSTRING(object_off), LSTRING(object_verylow), LSTRING(object_low), LSTRING(object_medium),LSTRING(object_high), LSTRING(object_veryhigh), LSTRING(object_fovBased)], 0], + 0, + {[true] call FUNC(adaptViewDistance)} +] call CBA_fnc_addSetting; diff --git a/addons/viewrestriction/$PBOPREFIX$ b/addons/viewrestriction/$PBOPREFIX$ new file mode 100644 index 0000000000..046d7e0d08 --- /dev/null +++ b/addons/viewrestriction/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\viewrestriction diff --git a/addons/viewrestriction/ACE_Settings.hpp b/addons/viewrestriction/ACE_Settings.hpp new file mode 100644 index 0000000000..d526e3a3e3 --- /dev/null +++ b/addons/viewrestriction/ACE_Settings.hpp @@ -0,0 +1,29 @@ +#define MACRO_VALUES \ + CSTRING(Disabled), CSTRING(FirstPerson), CSTRING(ThirdPerson) + +class ACE_Settings { + class XGVAR(mode) { + movedToSQF = 1; + }; + class XGVAR(modeSelectiveFoot) { + movedToSQF = 1; + }; + class XGVAR(modeSelectiveLand) { + movedToSQF = 1; + }; + class XGVAR(modeSelectiveAir) { + movedToSQF = 1; + }; + class XGVAR(modeSelectiveSea) { + movedToSQF = 1; + }; + // Disabled - Reference comment in FUNC(canChangeCamera) + /*class GVAR(modeSelectiveUAV) { + category = CSTRING(ModuleDisplayName); + value = 0; + typeName = "SCALAR"; + displayName = CSTRING(ModeSelectiveUAV); + description = CSTRING(ModeSelectiveUAVDesc); + values[] = {MACRO_VALUES}; + };*/ +}; diff --git a/addons/viewrestriction/CfgEventHandlers.hpp b/addons/viewrestriction/CfgEventHandlers.hpp new file mode 100644 index 0000000000..7636444f39 --- /dev/null +++ b/addons/viewrestriction/CfgEventHandlers.hpp @@ -0,0 +1,17 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_clientInit)); + }; +}; diff --git a/addons/viewrestriction/CfgVehicles.hpp b/addons/viewrestriction/CfgVehicles.hpp new file mode 100644 index 0000000000..24c0fa89bd --- /dev/null +++ b/addons/viewrestriction/CfgVehicles.hpp @@ -0,0 +1,85 @@ +#define MACRO_OPTIONS \ + class Disabled { \ + default = 1; \ + name = CSTRING(Disabled); \ + value = 0; \ + }; \ + class FirstPerson { \ + name = CSTRING(FirstPerson); \ + value = 1; \ + }; \ + class ThirdPerson { \ + name = CSTRING(ThirdPerson); \ + value = 2; \ + }; + +class CfgVehicles { + class ACE_Module; + class XGVAR(Module): ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACEX"; + function = QFUNC(moduleInit); + displayName = CSTRING(ModuleDisplayName); + scope = 1; + isGlobal = 1; + icon = QUOTE(PATHTOF(UI\Icon_Module_ViewRestriction_ca.paa)); + class Arguments { + class mode { + displayName = CSTRING(Mode); + description = CSTRING(ModeDesc); + typeName = "NUMBER"; + class values { + MACRO_OPTIONS + class Selective { + name = CSTRING(Selective); + value = 3; + }; + }; + }; + class modeSelectiveFoot { + displayName = CSTRING(ModeSelectiveFoot); + description = CSTRING(ModeSelectiveFootDesc); + typeName = "NUMBER"; + class values { + MACRO_OPTIONS + }; + }; + class modeSelectiveLand { + displayName = CSTRING(ModeSelectiveLand); + description = CSTRING(ModeSelectiveLandDesc); + typeName = "NUMBER"; + class values { + MACRO_OPTIONS + }; + }; + class modeSelectiveAir { + displayName = CSTRING(ModeSelectiveAir); + description = CSTRING(ModeSelectiveAirDesc); + typeName = "NUMBER"; + class values { + MACRO_OPTIONS + }; + }; + class modeSelectiveSea { + displayName = CSTRING(ModeSelectiveSea); + description = CSTRING(ModeSelectiveSeaDesc); + typeName = "NUMBER"; + class values { + MACRO_OPTIONS + }; + }; + // Disabled - Reference comment in FUNC(canChangeCamera) + /*class modeSelectiveUAV { + displayName = CSTRING(ModeSelectiveUAV); + description = CSTRING(ModeSelectiveUAVDesc); + typeName = "NUMBER"; + class values { + MACRO_OPTIONS + }; + };*/ + }; + class ModuleDescription { + description = CSTRING(ModuleDescription); + }; + }; +}; diff --git a/addons/viewrestriction/README.md b/addons/viewrestriction/README.md new file mode 100644 index 0000000000..883014f3cd --- /dev/null +++ b/addons/viewrestriction/README.md @@ -0,0 +1,8 @@ +ace_viewrestriction +=============== + +The View Restriction module introduces restricting of first and third person views overall or configured per type. + +## ACEX Conversion - things still using acex prefix +- All settings +- CfgVehicles Module Classname diff --git a/addons/viewrestriction/UI/Icon_Module_ViewRestriction_ca.paa b/addons/viewrestriction/UI/Icon_Module_ViewRestriction_ca.paa new file mode 100644 index 0000000000..3d8f57759d Binary files /dev/null and b/addons/viewrestriction/UI/Icon_Module_ViewRestriction_ca.paa differ diff --git a/addons/viewrestriction/XEH_PREP.hpp b/addons/viewrestriction/XEH_PREP.hpp new file mode 100644 index 0000000000..c9933f04b5 --- /dev/null +++ b/addons/viewrestriction/XEH_PREP.hpp @@ -0,0 +1,5 @@ +ACEX_PREP(canChangeCamera); +ACEX_PREP(changeCamera); +ACEX_PREP(moduleInit); +ACEX_PREP(selectiveChangeCamera); +ACEX_PREP(switchPreserveView); diff --git a/addons/viewrestriction/XEH_clientInit.sqf b/addons/viewrestriction/XEH_clientInit.sqf new file mode 100644 index 0000000000..21455af21b --- /dev/null +++ b/addons/viewrestriction/XEH_clientInit.sqf @@ -0,0 +1,37 @@ +#include "script_component.hpp" + +// Exit on Headless Client +if !(hasInterface) exitWith {}; + +["ace_settingsInitialized", { + // Exit if module is disabled + if (XGVAR(mode) == 0) exitWith {}; + + // Exit if all Selective Modes are Disabled + if (XGVAR(mode) == 3 && + {XGVAR(modeSelectiveFoot) == 0} && + {XGVAR(modeSelectiveLand) == 0} && + {XGVAR(modeSelectiveAir) == 0} && + {XGVAR(modeSelectiveSea) == 0}/* && + {GVAR(modeSelectiveUAV) == 0}*/ + ) exitWith { + WARNING("Selective mode enabled, but all sub-modes are disabled.") + }; + + // Exit if third person view is not available + if (difficultyOption "thirdPersonView" == 0) exitWith { + WARNING("View Restriction is enabled, but 3rd person is disabled with server difficulty."); + }; + + // Add Event Handler for changing camera - also happens on spawn + ["cameraView", { + [_this select 1, cameraOn] call FUNC(changeCamera); + }] call CBA_fnc_addPlayerEventHandler; + + // Add Event Hander for exiting and entering a vehicle when on Selective mode - cameraView does not fire on simple enter/exit + if (XGVAR(mode) == 3) then { + ["vehicle", { + [cameraView, _this select 1] call FUNC(changeCamera); + }] call CBA_fnc_addPlayerEventHandler; + }; +}] call CBA_fnc_addEventHandler; diff --git a/addons/viewrestriction/XEH_preInit.sqf b/addons/viewrestriction/XEH_preInit.sqf new file mode 100644 index 0000000000..9361d05015 --- /dev/null +++ b/addons/viewrestriction/XEH_preInit.sqf @@ -0,0 +1,11 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#include "initSettings.sqf" + +ADDON = true; diff --git a/addons/viewrestriction/XEH_preStart.sqf b/addons/viewrestriction/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/viewrestriction/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/viewrestriction/config.cpp b/addons/viewrestriction/config.cpp new file mode 100644 index 0000000000..40158953cf --- /dev/null +++ b/addons/viewrestriction/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Jonpas", "esteldunedain"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; + + BWC_CONFIG(XADDON); +}; + +#include "CfgEventHandlers.hpp" +#include "ACE_Settings.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/viewrestriction/functions/fnc_canChangeCamera.sqf b/addons/viewrestriction/functions/fnc_canChangeCamera.sqf new file mode 100644 index 0000000000..9114a23303 --- /dev/null +++ b/addons/viewrestriction/functions/fnc_canChangeCamera.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Checks if camera can be changed. + * + * Arguments: + * 0: New Camera View + * 1: Vehicle + * 2: Check gunner view (default: true) + * + * Return Value: + * Can Change Camera + * + * Example: + * ["INTERNAL", vehicle] call ace_viewrestriction_fnc_canChangeCamera + * + * Public: No + */ + +params ["_newCameraView", "_cameraOn", ["_checkGunnerView", true]]; + +// Remote control hates switchCamera (control returns to player, camera is left on remotely controlled object/unit), make sure remote controlled units are not impacted + +!(_newCameraView isEqualTo "GUNNER" && {_checkGunnerView}) && +{!(_newCameraView isEqualTo "GROUP")} && +{!isNull ACE_player} && +{player == ACE_player} && +{alive ACE_player} && +{ACE_player == _cameraOn || vehicle ACE_player == _cameraOn} && +{"" isEqualTo call CBA_fnc_getActiveFeatureCamera} && +{!(_cameraOn isKindOf "UAV" || _cameraOn isKindOf "UAV_01_base_F")} // UAVs are remote controlled diff --git a/addons/viewrestriction/functions/fnc_changeCamera.sqf b/addons/viewrestriction/functions/fnc_changeCamera.sqf new file mode 100644 index 0000000000..c3f70d640a --- /dev/null +++ b/addons/viewrestriction/functions/fnc_changeCamera.sqf @@ -0,0 +1,38 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Change camera based on setting. + * + * Arguments: + * 0: New Camera View + * 1: Vehicle + * + * Return Value: + * None + * + * Example: + * ["INTERNAL", vehicle] call ace_viewrestriction_fnc_changeCamera + * + * Public: No + */ + +params ["_newCameraView", "_cameraOn"]; + +if (! ([_newCameraView, _cameraOn] call FUNC(canChangeCamera))) exitWith {}; + +TRACE_1("View Restricted",XGVAR(mode)); + +// FirstPerson +if (XGVAR(mode) == 1) exitWith { + _cameraOn switchCamera "INTERNAL"; +}; + +// ThirdPerson +if (XGVAR(mode) == 2) exitWith { + _cameraOn switchCamera "EXTERNAL"; +}; + +// Selective +if (XGVAR(mode) == 3) exitWith { + [_cameraOn] call FUNC(selectiveChangeCamera); +}; diff --git a/addons/viewrestriction/functions/fnc_moduleInit.sqf b/addons/viewrestriction/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..3859944761 --- /dev/null +++ b/addons/viewrestriction/functions/fnc_moduleInit.sqf @@ -0,0 +1,32 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Initializes the View Restriction module. + * + * Arguments: + * 0: logic + * 1: Synchronised Units + * 2: Module Activated + * + * Return Value: + * None + */ + +params ["_logic", "_units", "_activated"]; + +if (!_activated) exitWith {}; + +[_logic, QXGVAR(mode), "mode"] call EFUNC(common,readSettingFromModule); + +// Read selective options only if selective mode selected +if (XGVAR(mode) == 3) then { + [_logic, QXGVAR(modeSelectiveFoot), "modeSelectiveFoot"] call EFUNC(common,readSettingFromModule); + [_logic, QXGVAR(modeSelectiveLand), "modeSelectiveLand"] call EFUNC(common,readSettingFromModule); + [_logic, QXGVAR(modeSelectiveAir), "modeSelectiveAir"] call EFUNC(common,readSettingFromModule); + [_logic, QXGVAR(modeSelectiveSea), "modeSelectiveSea"] call EFUNC(common,readSettingFromModule); + //[_logic, QGVAR(modeSelectiveUAV), "modeSelectiveUAV"] call EFUNC(common,readSettingFromModule); // Disabled - Reference comment in FUNC(canChangeCamera) + + INFO_5("View Restriction Module Initialized. Mode: %1 (Foot: %2, Land: %3, Air: %4, Sea: %5)",XGVAR(mode),XGVAR(modeSelectiveFoot),XGVAR(modeSelectiveLand),XGVAR(modeSelectiveAir),XGVAR(modeSelectiveSea)); +} else { + INFO_1("View Restriction Module Initialized. Mode: %1",XGVAR(mode)); +}; diff --git a/addons/viewrestriction/functions/fnc_selectiveChangeCamera.sqf b/addons/viewrestriction/functions/fnc_selectiveChangeCamera.sqf new file mode 100644 index 0000000000..916eda969e --- /dev/null +++ b/addons/viewrestriction/functions/fnc_selectiveChangeCamera.sqf @@ -0,0 +1,69 @@ +#include "script_component.hpp" +/* + * Author: Jonpas + * Changes camera mode based on vehicle type the player is currently occupying. + * + * Arguments: + * 0: Vehicle + * + * Return Value: + * None + * + * Example: + * [vehicle] call ace_viewrestriction_fnc_selectiveChangeCamera + * + * Public: No + */ + +params ["_cameraOn"]; + +// Foot +if (_cameraOn isKindOf "CAManBase") exitWith { + if (XGVAR(modeSelectiveFoot) == 1) exitWith { + _cameraOn switchCamera "INTERNAL"; + }; + if (XGVAR(modeSelectiveFoot) == 2) exitWith { + _cameraOn switchCamera "EXTERNAL"; + }; +}; + +// Land Vehicles +if (_cameraOn isKindOf "LandVehicle") exitWith { + if (XGVAR(modeSelectiveLand) == 1) exitWith { + _cameraOn switchCamera "INTERNAL"; + }; + if (XGVAR(modeSelectiveLand) == 2) exitWith { + _cameraOn switchCamera "EXTERNAL"; + }; +}; + +// UAVs (must be evaluated before Air Vehicles due to inheritance tree) +// Disabled - Reference comment in FUNC(canChangeCamera) +/*if (_cameraOn isKindOf "UAV" || {_cameraOn isKindOf "UAV_01_base_F"}) exitWith { + if (GVAR(modeSelectiveUAV) == 1) exitWith { + _cameraOn switchCamera "INTERNAL"; + }; + if (GVAR(modeSelectiveUAV) == 2) exitWith { + _cameraOn switchCamera "EXTERNAL"; + }; +};*/ + +// Air Vehicles (must be evaluated after UAVs due to inheritance tree) +if (_cameraOn isKindOf "Air") exitWith { + if (XGVAR(modeSelectiveAir) == 1) exitWith { + _cameraOn switchCamera "INTERNAL"; + }; + if (XGVAR(modeSelectiveAir) == 2) exitWith { + _cameraOn switchCamera "EXTERNAL"; + }; +}; + +// Sea Vehicles +if (_cameraOn isKindOf "Ship") exitWith { + if (XGVAR(modeSelectiveSea) == 1) exitWith { + _cameraOn switchCamera "INTERNAL"; + }; + if (XGVAR(modeSelectiveSea) == 2) exitWith { + _cameraOn switchCamera "EXTERNAL"; + }; +}; diff --git a/addons/viewrestriction/functions/fnc_switchPreserveView.sqf b/addons/viewrestriction/functions/fnc_switchPreserveView.sqf new file mode 100644 index 0000000000..6de1b5b135 --- /dev/null +++ b/addons/viewrestriction/functions/fnc_switchPreserveView.sqf @@ -0,0 +1,50 @@ +#include "script_component.hpp" +/* + * Author: Dystopian + * Controls View Preserving state. + * + * Arguments: + * 0: Enabled + * + * Return Value: + * None + * + * Example: + * true call ace_viewrestriction_fnc_switchPreserveView + * + * Public: No + */ + +params ["_enabled"]; + +if (!_enabled || {XGVAR(mode) > 0}) exitWith { + if (isNil QGVAR(preserveViewCameraViewEH)) exitWith {}; + ["cameraView", GVAR(preserveViewCameraViewEH)] call CBA_fnc_removePlayerEventHandler; + ["vehicle", GVAR(preserveViewVehicleEH)] call CBA_fnc_removePlayerEventHandler; + GVAR(preserveViewCameraViewEH) = nil; + GVAR(preserveViewVehicleEH) = nil; +}; + +GVAR(preserveViewCameraViewEH) = ["cameraView", { + params ["_player", "_cameraView"]; + if !([_cameraView, cameraOn] call FUNC(canChangeCamera)) exitWith {}; + + private _vehicle = vehicle _player; + private _vehicleClass = {if (_vehicle isKindOf _x) exitWith {_x}} forEach ["CAManBase", "LandVehicle", "Air", "Ship", "All"]; + private _varName = QXGVAR(preserveView) + _vehicleClass; + if !(_cameraView isEqualTo (profileNamespace getVariable [_varName, ""])) then { + profileNamespace setVariable [_varName, _cameraView]; + }; +}] call CBA_fnc_addPlayerEventHandler; + +GVAR(preserveViewVehicleEH) = ["vehicle", { + params ["_player", "_vehicle"]; + private _cameraView = cameraView; + if !([_cameraView, cameraOn, false] call FUNC(canChangeCamera)) exitWith {}; + + private _vehicleClass = {if (_vehicle isKindOf _x) exitWith {_x}} forEach ["CAManBase", "LandVehicle", "Air", "Ship", "All"]; + private _savedView = profileNamespace getVariable (QXGVAR(preserveView) + _vehicleClass); + if (!isNil "_savedView" && {!(_cameraView isEqualTo _savedView)}) then { + _vehicle switchCamera _savedView; + }; +}, true] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/viewrestriction/functions/script_component.hpp b/addons/viewrestriction/functions/script_component.hpp new file mode 100644 index 0000000000..b3b0bcdf12 --- /dev/null +++ b/addons/viewrestriction/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\viewrestriction\script_component.hpp" diff --git a/addons/viewrestriction/initSettings.sqf b/addons/viewrestriction/initSettings.sqf new file mode 100644 index 0000000000..3ed47c10ef --- /dev/null +++ b/addons/viewrestriction/initSettings.sqf @@ -0,0 +1,64 @@ +[ + QXGVAR(mode), + "LIST", + [LSTRING(Mode), LSTRING(ModeDesc)], + format ["ACE %1", LLSTRING(ModuleDisplayName)], + [[0, 1, 2, 3], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson), LSTRING(Selective)], 0], + true, + {[QGVAR(mode), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(modeSelectiveFoot), + "LIST", + [LSTRING(ModeSelectiveFoot), LSTRING(ModeSelectiveFootDesc)], + format ["ACE %1", LLSTRING(ModuleDisplayName)], + [[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0], + true, + {[QGVAR(modeSelectiveFoot), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(modeSelectiveLand), + "LIST", + [LSTRING(ModeSelectiveLand), LSTRING(ModeSelectiveLandDesc)], + format ["ACE %1", LLSTRING(ModuleDisplayName)], + [[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0], + true, + {[QGVAR(modeSelectiveLand), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(modeSelectiveAir), + "LIST", + [LSTRING(ModeSelectiveAir), LSTRING(ModeSelectiveAirDesc)], + format ["ACE %1", LLSTRING(ModuleDisplayName)], + [[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0], + true, + {[QGVAR(modeSelectiveAir), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(modeSelectiveSea), + "LIST", + [LSTRING(ModeSelectiveSea), LSTRING(ModeSelectiveSeaDesc)], + format ["ACE %1", LLSTRING(ModuleDisplayName)], + [[0, 1, 2], [LSTRING(Disabled), LSTRING(FirstPerson), LSTRING(ThirdPerson)], 0], + true, + {[QGVAR(modeSelectiveSea), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true +] call CBA_fnc_addSetting; + +[ + QXGVAR(preserveView), + "CHECKBOX", + [LSTRING(SettingPreserveViewName), LSTRING(SettingPreserveViewDesc)], + format ["ACE %1", LLSTRING(ModuleDisplayName)], + false, + false, + LINKFUNC(switchPreserveView) +] call CBA_fnc_addSetting; diff --git a/addons/viewrestriction/script_component.hpp b/addons/viewrestriction/script_component.hpp new file mode 100644 index 0000000000..a86b4df577 --- /dev/null +++ b/addons/viewrestriction/script_component.hpp @@ -0,0 +1,17 @@ +#define COMPONENT viewrestriction +#define COMPONENT_BEAUTIFIED View Restriction +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_VIEWRESTRICTION + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_VIEWRESTRICTION + #define DEBUG_SETTINGS DEBUG_SETTINGS_VIEWRESTRICTION +#endif + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/viewrestriction/stringtable.xml b/addons/viewrestriction/stringtable.xml new file mode 100644 index 0000000000..26785c662b --- /dev/null +++ b/addons/viewrestriction/stringtable.xml @@ -0,0 +1,270 @@ + + + + + View Restriction + Ograniczenie widoczności + Sichteinschränkungen + Korlátozások + 視点制限 + 시점 제한 + Restriction Vue + 视野限制 + 視野限制 + Visualizza Restrizione + Ограничение обзора + Görüntüyü Kısıtla + + + View restriction settings to limit the usage of 1st or 3rd person views globally or per vehicle type. + Ograniczenie widoczności ze względu na użycie 1. lub 3. os. globalnie, lub z uwzględnieniem typu pojazdu. + Einstellungen um Egoperspektive und Third-Person-Perspektive global oder pro Fahrzeugtyp zu limitieren. + 全体や車両ごとで使える視点を1人称か3人称視点のどちらかに制限します。 + 차량 유형별, 혹은 전체적으로 1,3인칭 시점 사용 제한 설정 + La restriction de la vue limite l'usage de la vue à la 1ère/3ème personne globalement ou par type de véhicule. + 视野限制可以设定在全局或是局部状况下能用的视野模式。 + 視野限制可以設定在全局或是局部狀況下能用的視野模式。 + Visualizza le impostazioni di restrizione per limitare l'utilizzo di prima e terza persona a livello globale o per tipologia di veicolo. + Настройки ограничения обзора при виде от 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. + + + Mode + Tryb + Modus + Mód + モード + 모드 + Mode + 模式 + 模式 + Modalità + Режим установок + Mod + + + Sets global mode. Default: Disabled + Zmienia tryb globalny. (Domyślnie: Wyłączony) + Globaler Modus. (Standard: Deaktiviert) + Globális mód beállítása. Alapértelmeyett: Kikapcsolva + グローバル モードの設定。(標準: 無効) + 전체 모드를 사용합니다. 기본값: 사용 안 함 + Mode global. Défaut: Désactivé + 设定全局的视野模式。预设:关闭 + 設定全局的視野模式。預設:關閉 + Imposta modalità globale. Default: Disabilitato + Общие установки для всех. По умолчанию: Отключено. + Global modu ayarlar. Varsayılan: Devre Dışı + + + (Selective) Foot + (Tryb selektywny) Piechota + (Selektiv) zu Fuß + (Szelektív) Gyalogos + (選択性) 地上 + (선택) 보병 + (Sélectif) A pied + (可选) 步行 + (可選) 步行 + (Selettiva) Piedi + (Выборочные) Пешком + (Seçilebilir) Ayakta + + + Selective mode on Foot. Default: Disabled (Requires Mode: Selective) + Tryb selektywny piechoty. Domyślnie: Wyłączony (Wymagany tryb globalny: Selektywny) + Selektiver Modus zu Fuß. (Standard: Deaktiviert, Benötigt Modus: Selektiv) + Szelektív mód Gyalogosan. Alapértelmezett: Kikapcsolva (Mód: Szelektív szükséges) + 地上でのモードを選択します。(標準: 無効化 (要求モード: 選択性) + 보병 시점. 기본값: 사용 안 함 (모드-선택 필요) + Mode sélectif hors des véhicules. Défaut: Désactivé (Nécessite Mode: Sélectif) + 设定在步行的状况下能使用的视野模式。预设:关闭(需在全局设定中先选择'使用可选设定') + 設定在步行的狀況下能使用的視野模式。預設:關閉(需在全局設定中先選擇'使用可選設定') + Modalità selettiva su Piedi. Default: Disabilitato (Necessita della Modalità: Selettiva) + Выборочные установки без техники. По умолчанию: Отключено (требуется режим: Выборочные) + Ayakta iken seçilen görüş modu. Varsayılan: Etkin Değil + + + (Selective) Land Vehicles + (Tryb selektywny) Pojazdy + (Selektiv) Landfahrzeuge + (Szelektív) Szárazföldi Járművek + (選択性) 地上車両 + (선택) 지상 차량 + (Sélectif) Véhicules terrestres + (可选) 陆上载具 + (可選) 陸上載具 + (Selettiva) Veicoli Terrestri + (Выборочные) Наземная техника + (Seçilebilir) Kara Araçları + + + Selective mode in Land Vehicles. Default: Disabled (Requires Mode: Selective) + Tryb selektywny pojazdów. Domyślnie: Wyłączony (Wymagany tryb globalny: Selektywny) + Selektiver Modus in Landfahrzeugen. (Standard: Deaktiviert, Benötigt Modus: Selektiv) + Szelektív mód a Szárazföldi Járművekben. Alapértelmezett: Kikapcsolva (Mód: Szelektív szükséges) + 地上車両でのモードを選択します。(標準: 無効化 (要求モード: 選択性) + 차량 시점. 기본값: 사용 안 함 (모드-선택 필요) + Mode sélectif dans les véhicules terrestres. Défaut: Désactivé (Nécessite Mode: Sélectif) + 设定在搭乘陆上载具的状况下能使用的视野模式。预设:关闭(需在全局设定中先选择'使用可选设定') + 設定在搭乘陸上載具的狀況下能使用的視野模式。預設:關閉(需在全局設定中先選擇'使用可選設定') + Modalità selettiva su Veicoli Terrestri. Default: Disabilitato (Necessita della Modalità: Selettiva) + Выборочные установки для наземной техники. По умолчанию: Отключено (требуется режим: Выборочные) + Kara araçlarında iken seçilen görüş modu. Varsayılan: Etkin Değil + + + (Selective) Air Vehicles + (Tryb selektywny) Lotnictwo + (Selektiv) Luftfahrzeuge + (Szelektív) Légijárművek + (選択性) 航空機 + (선택) 항공기 + (Sélectif) Véhicules aériens + (可选) 空中载具 + (可選) 空中載具 + (Selettiva) Veicolo Aerei + (Выборочные) Авиатехника + (Seçilebilir) Hava Araçları + + + Selective mode in Air Vehicles. Default: Disabled (Requires Mode: Selective) + Tryb selektywny lotnictwa. Domyślnie: Wyłączony (Wymagany tryb globalny: Selektywny) + Selektiver Modus in Luftfahrzeugen. (Standard: Deaktiviert, Benötigt Modus: Selektiv) + Szelektív mód a Légijárművekben. Alapértelmezett: Kikapcsolva (Mód: Szelektív szükséges) + 航空機でのモードを選択します。(標準: 無効化 (要求モード: 選択性) + 항공기 시점. 기본값: 사용 안 함 (모드-선택 필요) + Mode sélectif dans les véhicules aériens. Défaut: Désactivé (Nécessite Mode: Sélectif) + 设定在搭乘空中载具的状况下能使用的视野模式。预设:关闭(需在全局设定中先选择'使用可选设定') + 設定在搭乘空中載具的狀況下能使用的視野模式。預設:關閉(需在全局設定中先選擇'使用可選設定') + Modalità selettiva su Veicoli Aerei. Default: Disabilitato (Necessita della Modalità: Selettiva) + Выборочные установки для авиатехники. По умолчанию: Отключено (требуется режим: Выборочные) + Hava araçlarında iken seçilen görüş modu. Varsayılan: Etkin Değil + + + (Selective) Sea Vehicles + (Tryb selektywny) Jednostki pływające + (Selektiv) Wasserfahrzeuge + (Szelektív) Vízi Járművek + (選択性) 船舶 + (선택) 함선 + (Sélectif) Véhicules marins + (可选) 水上载具 + (可選) 水上載具 + (Selettiva) Veicoli Marittimi + (Выборочные) Водный транспорт + (Seçilebilir) Deniz Araçları + + + Selective mode in Sea Vehicles. Default: Disabled (Requires Mode: Selective) + Tryb selektywny jednostek pływających. Domyślnie: Wyłączony (Wymagany tryb globalny: Selektywny) + Selektiver Modus zu Fuß. (Standard: Deaktiviert, Benötigt Modus: Selektiv) + Szelektív mód a Vízi Járművekben. Alapértelmezett: Kikapcsolva (Mód: Szelektív szükséges) + 船舶でのモードを選択します。(標準: 無効化 (要求モード: 選択性) + 함선 시점. 기본값: 사용 안 함 (모드-선택 필요) + Mode sélectif dans les véhicules marins. Défaut: Désactivé (Nécessite Mode: Sélectif) + 设定在搭乘水上载具的状况下能使用的视野模式。预设:关闭(需在全局设定中先选择'使用可选设定') + 設定在搭乘水上載具的狀況下能使用的視野模式。預設:關閉(需在全局設定中先選擇'使用可選設定') + Modalità selettiva su Veicoli Marittimi. Default: Disabilitato (Necessita della Modalità: Selettiva) + Выборочные установки для водного транспорта. По умолчанию: Отключено (требуется режим: Выборочные) + Deniz araçlarında iken seçilen görüş modu. Varsayılan: Etkin Değil + + + (Selective) UAVs + (Tryb selektywny) UAV + (Selektiv) Unbemannte Luftfahrzeuge + (Szelektív) Pilóta Nélüli Légijárművek + (選択性) 無人機 + (선택) 무인기 + (Sélectif) Drones + (可选) 无人载具 + (可選) 無人載具 + (Selettiva) UAV + (Выборочные) Беспиплотники + (Seçilebilir) IHA'lar + + + Selective mode in UAVs. Default: Disabled (Requires Mode: Selective) + Tryb selektywny UAV. Domyślnie: Wyłączony (Wymagany tryb globalny: Selektywny) + Selektiver Modus in unbemannten Luftfahrzeugen. (Standard: Deaktiviert, Benötigt Modus: Selektiv + Szelektív mód a Pilóta Nélküli Légijárművekben. Alapértelmezett: Kikapcsolva (Mód: Szelektív szükséges) + 無人機でのモードを選択します。(標準: 無効化 (要求モード: 選択性) + 무인기 시점. 기본값: 사용 안 함 (모드-선택 필요) + Mode sélectif dans les drones. Défaut: Désactivé (Nécessite Mode: Sélectif) + 设定在搭乘无人载具的状况下能使用的视野模式。预设:关闭(需在全局设定中先选择'使用可选设定') + 設定在搭乘無人載具的狀況下能使用的視野模式。預設:關閉(需在全局設定中先選擇'使用可選設定') + Modalità selettiva su UAVi. Default: Disabilitato (Necessita della Modalità: Selettiva) + Выборочные установки для беспилотников. По умолчанию: Отключено (требуется режим: Выборочные) + IHA araçlarında iken seçilen görüş modu. Varsayılan: Etkin Değil + + + Disabled + Wyłączony + Deaktiviert + Kikapcsolva + 無効 + 사용 안 함 + Désactivé + 关闭 + 關閉 + Отключено + Devre Dışı + + + Forced 1st Person + Wymuś 1. osobę + Erzwungene Egoperspektive + 1人称視点に強制 + 강제 1인칭 + Impose la 1ère personne + 强制使用第一人称 + 強制使用第一人稱 + От 1-го лица (принудительно) + 1. Kişi Görüşüne Zorla + + + Forced 3rd Person + Wymuś 3. osobę + Erzwungene Third-Person-Perspektive + 3人称視点に強制 + 강제 3인칭 + Impose la 3ème personne + 强制使用第三人称 + 強制使用第三人稱 + От 3-го лица (принудительно) + 3. Kişi Görüşüne Zorla + + + Selective + Selektywny + Selektiv + Szelektív + 選択性 + 선택 + Sélectif + 使用可选设定 + 使用可選設定 + Выборочный + Seçilebilinir + + + Preserve view for vehicle types + Behalte die Ansicht bei Fahrzeugtypen bei + Запоминать вид для типов техники + 車両の種類により視点を変更 + 保留載具的視野模式 + 保留载具的视野模式 + Zachowaj ustawienie widoku dla pojazdów + Araç türleri için görünümü koru + + + Switch view on vehicle change to last used in this vehicle type (Requires Mode: Disabled) + Wechsel die Ansicht bei Fahrzeugwechsel zu der zuletzt genutzen in diesen Fahrzeugtyp. (Benötigt Modus: Ausgeschaltet) + Переключать вид при смене техники на последний использованный в данном типе техники (требуется режим: Отключено) + 車両の種類により最後に使用した視点へ切り替え (無効モードでのみ有効) + 切換到載具時自動切換到上次最後使用的視野模式(需求模式:關閉) + 切换到载具时自动切换到上次最后使用的视野模式(需求模式:关闭) + Zmień widok podczas zmiany pojazdu na ustawienie widoku z ostatniego używanego pojazdu tego typu (Wymaga Tryb: Wyłączony + Araçlar için en son kullanılan bakış türünü kaydet. + + + diff --git a/addons/volume/$PBOPREFIX$ b/addons/volume/$PBOPREFIX$ new file mode 100644 index 0000000000..0207eb5918 --- /dev/null +++ b/addons/volume/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\volume diff --git a/addons/volume/ACE_Settings.hpp b/addons/volume/ACE_Settings.hpp new file mode 100644 index 0000000000..6b3a527235 --- /dev/null +++ b/addons/volume/ACE_Settings.hpp @@ -0,0 +1,20 @@ +class ACE_Settings { + class XGVAR(enabled) { + movedToSQF = 1; + }; + class XGVAR(reduction) { + movedToSQF = 1; + }; + class XGVAR(fadeDelay) { + movedToSQF = 1; + }; + class XGVAR(lowerInVehicles) { + movedToSQF = 1; + }; + class XGVAR(showNotification) { + movedToSQF = 1; + }; + class XGVAR(remindIfLowered) { + movedToSQF = 1; + }; +}; diff --git a/addons/volume/CfgEventHandlers.hpp b/addons/volume/CfgEventHandlers.hpp new file mode 100644 index 0000000000..bff1c64e94 --- /dev/null +++ b/addons/volume/CfgEventHandlers.hpp @@ -0,0 +1,17 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); + }; +}; + +class Extended_PostInit_EventHandlers { + class ADDON { + clientInit = QUOTE(call COMPILE_SCRIPT(XEH_postInitClient)); + }; +}; diff --git a/addons/volume/README.md b/addons/volume/README.md new file mode 100644 index 0000000000..88dcd37c6e --- /dev/null +++ b/addons/volume/README.md @@ -0,0 +1,8 @@ +ace_volume +========== + +Volume module reduces volume in vehicles or on keypress. + +## ACEX Conversion - things still using acex prefix +- All settings +- CBA Keybind ID diff --git a/addons/volume/XEH_PREP.hpp b/addons/volume/XEH_PREP.hpp new file mode 100644 index 0000000000..e90c8d6929 --- /dev/null +++ b/addons/volume/XEH_PREP.hpp @@ -0,0 +1,3 @@ +ACEX_PREP(lowerVolume); +ACEX_PREP(remind); +ACEX_PREP(restoreVolume); diff --git a/addons/volume/XEH_postInitClient.sqf b/addons/volume/XEH_postInitClient.sqf new file mode 100644 index 0000000000..5f04a54400 --- /dev/null +++ b/addons/volume/XEH_postInitClient.sqf @@ -0,0 +1,37 @@ +#include "script_component.hpp" + +if (!hasInterface) exitWith {}; + +["ACEX", QXGVAR(toggle), [LLSTRING(KeybindName), LLSTRING(KeybindDescription)], "", { + if (!XGVAR(enabled)) exitWith { + if (GVAR(isLowered)) then { + call FUNC(restoreVolume); + }; + }; + + if (GVAR(isLowered)) then { + call FUNC(restoreVolume); + } else { + call FUNC(lowerVolume); + }; + + false +}] call CBA_fnc_addKeybind; + +["vehicle", { + params ["_unit"]; + + if (!XGVAR(lowerInVehicles)) exitWith {}; + + if (vehicle _unit != _unit) then { + call FUNC(lowerVolume); + } else { + call FUNC(restoreVolume); + }; +}] call CBA_fnc_addPlayerEventHandler; + +// Self-calling reminder +[FUNC(remind), [], REMINDER_DELAY] call CBA_fnc_waitAndExecute; + +// Restore volume on respawn +ace_player addEventHandler ["Respawn", FUNC(restoreVolume)]; diff --git a/addons/volume/XEH_preInit.sqf b/addons/volume/XEH_preInit.sqf new file mode 100644 index 0000000000..ae4979ef36 --- /dev/null +++ b/addons/volume/XEH_preInit.sqf @@ -0,0 +1,15 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +#include "initSettings.sqf" + +GVAR(isLowered) = false; +GVAR(initialGameVolume) = soundVolume; +GVAR(initialMusicVolume) = musicVolume; + +ADDON = true; diff --git a/addons/volume/XEH_preStart.sqf b/addons/volume/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/volume/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/volume/config.cpp b/addons/volume/config.cpp new file mode 100644 index 0000000000..e6802311ea --- /dev/null +++ b/addons/volume/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Kingsley"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "ACE_Settings.hpp" diff --git a/addons/volume/functions/fnc_lowerVolume.sqf b/addons/volume/functions/fnc_lowerVolume.sqf new file mode 100644 index 0000000000..2248d87fb9 --- /dev/null +++ b/addons/volume/functions/fnc_lowerVolume.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Lowers the game and music volume with values from ACE settings. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_volume_fnc_lowerVolume + * + * Public: No + */ + +EGVAR(hearing,disableVolumeUpdate) = true; + +private _coef = XGVAR(reduction) / 10; +private _reductionGame = _coef * GVAR(initialGameVolume); +private _reductionMusic = _coef * GVAR(initialMusicVolume); + +XGVAR(fadeDelay) fadeSound (GVAR(initialGameVolume) - _reductionGame); +XGVAR(fadeDelay) fadeMusic (GVAR(initialMusicVolume) - _reductionMusic); + +GVAR(isLowered) = true; + +if (XGVAR(showNotification)) then { + [LLSTRING(Lowered)] call EFUNC(common,displayTextStructured); +}; diff --git a/addons/volume/functions/fnc_remind.sqf b/addons/volume/functions/fnc_remind.sqf new file mode 100644 index 0000000000..29b546d791 --- /dev/null +++ b/addons/volume/functions/fnc_remind.sqf @@ -0,0 +1,24 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Reminds about lowered volume. + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_volume_fnc_remind + * + * Public: No + */ + +// Exit if reminder not enabled or not lowered +if (!XGVAR(remindIfLowered) || {!GVAR(isLowered)}) exitWith {}; + +[LLSTRING(LoweredReminder)] call EFUNC(common,displayTextStructured); + +// Fire another reminder in 60s +[FUNC(remind), [], REMINDER_DELAY] call CBA_fnc_waitAndExecute; diff --git a/addons/volume/functions/fnc_restoreVolume.sqf b/addons/volume/functions/fnc_restoreVolume.sqf new file mode 100644 index 0000000000..bd38c0e017 --- /dev/null +++ b/addons/volume/functions/fnc_restoreVolume.sqf @@ -0,0 +1,27 @@ +#include "script_component.hpp" +/* + * Author: Kingsley + * Restores the game and music volume to what it was when the mission first started, + * + * Arguments: + * None + * + * Return Value: + * None + * + * Example: + * [] call ace_volume_fnc_restoreVolume + * + * Public: No + */ + +EGVAR(hearing,disableVolumeUpdate) = false; + +XGVAR(fadeDelay) fadeSound GVAR(initialGameVolume); +XGVAR(fadeDelay) fadeMusic GVAR(initialMusicVolume); + +GVAR(isLowered) = false; + +if (XGVAR(showNotification)) then { + [LLSTRING(Restored)] call EFUNC(common,displayTextStructured); +}; diff --git a/addons/volume/functions/script_component.hpp b/addons/volume/functions/script_component.hpp new file mode 100644 index 0000000000..46435ff93d --- /dev/null +++ b/addons/volume/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\volume\script_component.hpp" diff --git a/addons/volume/initSettings.sqf b/addons/volume/initSettings.sqf new file mode 100644 index 0000000000..2f6782f5ab --- /dev/null +++ b/addons/volume/initSettings.sqf @@ -0,0 +1,65 @@ +[ + QXGVAR(enabled), + "CHECKBOX", + [ELSTRING(common,Enabled), LSTRING(KeybindDescription)], + format ["ACE %1", LLSTRING(Name)], + false, + false, + {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false +] call CBA_fnc_addSetting; + +[ + QXGVAR(reduction), + "LIST", + [LSTRING(Reduction), LSTRING(ReductionDescription)], + format ["ACE %1", LLSTRING(Name)], + [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], ["0%", "10%", "20%", "30%", "40%", "50%", "60%", "70%", "80%", "90%", "100%"], 0], + false, + {[QGVAR(reduction), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false +] call CBA_fnc_addSetting; + +[ + QXGVAR(fadeDelay), + "LIST", + [LSTRING(FadeDelay), LSTRING(FadeDelayDescription)], + format ["ACE %1", LLSTRING(Name)], + [[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], ["0s", "1s", "2s", "3s", "4s", "5s", "6s", "7s", "8s", "9s", "10s"], 0], + false, + {[QGVAR(fadeDelay), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false +] call CBA_fnc_addSetting; + +[ + QXGVAR(lowerInVehicles), + "CHECKBOX", + [LSTRING(LowerInVehicles), LSTRING(LowerInVehiclesDescription)], + format ["ACE %1", LLSTRING(Name)], + false, + false, + {[QGVAR(lowerInVehicles), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false +] call CBA_fnc_addSetting; + +[ + QXGVAR(showNotification), + "CHECKBOX", + [LSTRING(ShowNotification), LSTRING(ShowNotificationDescription)], + format ["ACE %1", LLSTRING(Name)], + false, + false, + {[QGVAR(showNotification), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false +] call CBA_fnc_addSetting; + +[ + QXGVAR(remindIfLowered), + "CHECKBOX", + [LSTRING(RemindIfLowered), LSTRING(RemindIfLoweredDescription)], + format ["ACE %1", LLSTRING(Name)], + false, + false, + {[QGVAR(remindIfLowered), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false +] call CBA_fnc_addSetting; diff --git a/addons/volume/script_component.hpp b/addons/volume/script_component.hpp new file mode 100644 index 0000000000..0c31011458 --- /dev/null +++ b/addons/volume/script_component.hpp @@ -0,0 +1,20 @@ +#define COMPONENT volume +#define COMPONENT_BEAUTIFIED Volume +#include "\z\ace\addons\main\script_mod.hpp" + +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define ENABLE_PERFORMANCE_COUNTERS + +#ifdef DEBUG_ENABLED_VOLUME + #define DEBUG_MODE_FULL +#endif + +#ifdef DEBUG_SETTINGS_VOLUME + #define DEBUG_SETTINGS DEBUG_SETTINGS_VOLUME +#endif + +#include "\z\ace\addons\main\script_macros.hpp" + + +#define REMINDER_DELAY 60 diff --git a/addons/volume/stringtable.xml b/addons/volume/stringtable.xml new file mode 100644 index 0000000000..3c7a6cc65d --- /dev/null +++ b/addons/volume/stringtable.xml @@ -0,0 +1,208 @@ + + + + + Volume + Lautstärke + Volume + 音量 + 음량 + 音量 + 音量 + Volume + Громкость + Głosność + Ses + + + Toggle Volume + Lautstärke umschalten + 音量を切り替え + Bascule Volume + 음량 토글 + 切换音量 + 切換音量 + Attiva Volume + Переключить громкость + Przełącz Głosność + Sesi Aç/Kapat + + + Toggle volume reduction. + Lautstärkeverringerung umschalten. + 音量を一時的に低減します。 + Active la réduction du volume. + 토글하여 음량 감소합니다. + 切换降低音量。 + 切換降低音量。 + Attiva riduzione del volume. + Переключает уменьшение громкости + Przełącz redukcje głosności + Ses azaltmayı aç / kapat. + + + Lowered volume + Lautstärke veringert + 音量を下げました + Volume réduit + 음량 감소됨 + 降低音量 + 降低音量 + Volume diminuito + Громкость снижена + Zmniejszona głosność + Azaltılmış ses + + + Restored volume + Lautstärke wiederhergestellt + 音量を戻しました + Volume rétabli + 음량 복구됨 + 回复音量 + 回復音量 + Volume ripristinato + Громкость восстановлена + Przywrócona głosność + + + Reduction + Reduzierung + 低減 + Réduction + 감소 + 降低 + 降低 + Riduzione + Уменьшение + Redukcja + + + Reduce volume by this percentage. + Reduziere Lautstärke um diesen Prozentsatz. + この割合で音量を低減します。 + Réduit le volume de ce pourcentage. + 다음의 비율로 음량을 감소합니다. + 使用此百分比来调整音量降低大小。 + 使用此百分比來調整音量降低大小。 + Riduci il volume di questa percentuale. + Уменьшает громкость + Zmniejsz głosność o tyle procent + + + Lower in vehicles + Verringere in Fahrzeugen + 車両内で低減 + Réduit dans les véhicules + 차량에서 감소함 + 在载具中降低音量 + 在載具中降低音量 + Più basso nei veicoli + Уменьшать в технике + Zmniejsz w pojazdach + Araçlarda Daha Düşük + + + Automatically lower volume when inside vehicles. + Verringere die Lautstärke innerhalb von Fahrzeugen automatisch. + 車両内では自動的に音量を低減させます。 + Réduit automatiquement le volume à l'intérieur des véhicules. + 자동으로 차량내에 있으면 음량을 감소 합니다. + 当搭乘载具时自动降低音量。 + 當搭乘載具時自動降低音量。 + Riduce automaticamente il volume quando dentro i veicoli. + Автоматически уменьшать громкость в технике + Automatycznie zmniejsz głosność będąc w pojeździe + Araçlara binince sesi azalt. + + + Show notification + Zeige Benachrichtigung + 通知を表示 + Afficher notification + 설정 보기 + 显示提示 + 顯示提示 + Mostra notifiche + Показывать уведомление + Pokaż powiadomienie + Bildirim Göster + + + Show notification when lowering/restoring volume. + Zeige Benachrichtigung, wenn Lautstärke verringert/wiederhergestellt wurde. + 音量を低減、復元時に通知を表示します。 + Affiche une notification lorsque le volume est réduit/rétabli. + 음량이 감소/복구될 때 메세지를 표시합니다. + 当正在降低/回复音量时显示提示。 + 當正在降低/回復音量時顯示提示。 + Mostra notifiche mentre si abbassa/ripristina il volume. + Показывать уведомление при уменьшении/восстановлении громкости + Pokaż powiadomienie zmniejszając/odnawiając głosność + Ses azaltıldığın da bildirim göster. + + + Fade delay + Ausblendzeit + フェードへの遅延 + Retard fondu + 페이드 지연 + 淡出/入延迟 + 淡出/入延遲 + Latenza della dissolvenza + Задержка затухания + Opoznienie wyciszenia + + + Time it takes (in seconds) for the sound to fade in/out. + Zeit, die es benötigt (in Sekunden), für das Geräusch, ein- bzw. auszublenden. + 音がフェードイン、アウトするまでの時間 (秒) を決定します。 + Temps nécessaire (en secondes) aux sons pour être réduits/rétablis. + 페이드 인/아웃 되는데 걸리는 시간(초) + 设定音量淡出/入时所需的秒数。 + 設定音量淡出/入時所需的秒數。 + Il tempo che impiega (in secondi) il suono a dissolversi entrata/uscita. + Время (сек.) для затухания/восстановления звука. + Ilość czasu (w sekundach) ile zajmuje wyciszenie/zgłośnienie dźwięku + + + Reminder if lowered + Erinnere wenn verringert + 低減時に通知 + Rappel si réduit + 감소시 알림 + 降低音量时是否提醒 + 降低音量時是否提醒 + Sollecita se diminuito + Напоминать о снижении громкости + Przypomnij o zmniejszonej głosności dźwięku + Eğer Düşükse Hatırlat + + + Reminds you every minute if your volume is lowered. + Erinnert dich jede Minute, wenn deine Lautstärke verringert wurde. + 音量を低減時は毎分ごとに通知します。 + Rappelle chaque minute que le volume est réduit. + 음량이 감소되면 매 분 마다 알려줍니다 + 开启后会每分钟警告一次你的音量已被降低。 + 開啟後會每分鐘警告一次你的音量已被降低。 + Ti notifica ogni minuto se il tuo volume è basso. + Ежеминутное напоминание о сниженной громкости + Przypomina co minuten o zmniejszonej głosności dźwięku + Eğer ses düşükse her dakika hatırlatır. + + + Volume still lowered + Lautstärke noch immer verringert. + 音量を低減中です + Volume réduit + 음량 감소중 + 降低音量中 + 降低音量中 + Il volume è ancora basso + Громкость все еще снижена + Dźwięk jest nadal zmniejszony + Ses hala düşük + + + diff --git a/addons/weaponselect/CfgEventHandlers.hpp b/addons/weaponselect/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/weaponselect/CfgEventHandlers.hpp +++ b/addons/weaponselect/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/weaponselect/README.md b/addons/weaponselect/README.md index 2292140816..417fc3c3fa 100644 --- a/addons/weaponselect/README.md +++ b/addons/weaponselect/README.md @@ -2,11 +2,3 @@ ace_weaponselect ================ Adds the ability to quickly select weapons using the number keys. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) diff --git a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf index 86945dbaac..8270ceb2d5 100644 --- a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf @@ -23,7 +23,7 @@ private _sound = getArray (configFile >> "CfgWeapons" >> _weapon >> "changeFirem if (_sound isEqualTo []) exitWith {}; // get position where to play the sound (position of the weapon) -private _position = AGLToASL (_unit modelToWorldVisual (_unit selectionPosition "RightHand")); +private _position = _unit modelToWorldVisualWorld (_unit selectionPosition "RightHand"); _sound params ["_filename", ["_volume", 1], ["_soundPitch", 1], ["_distance", 0]]; diff --git a/addons/weaponselect/initSettings.sqf b/addons/weaponselect/initSettings.sqf index d4fc725783..b39251d0b8 100644 --- a/addons/weaponselect/initSettings.sqf +++ b/addons/weaponselect/initSettings.sqf @@ -5,4 +5,4 @@ localize ELSTRING(common,ACEKeybindCategoryWeapons), true, // default value false, // isGlobal -{[QGVAR(displayText), _this] call EFUNC(common,cbaSettings_settingChanged)}] call CBA_settings_fnc_init; +{[QGVAR(displayText), _this] call EFUNC(common,cbaSettings_settingChanged)}] call CBA_fnc_addSetting; diff --git a/addons/weather/CfgEventhandlers.hpp b/addons/weather/CfgEventhandlers.hpp index f913c4c22b..f180d1c700 100644 --- a/addons/weather/CfgEventhandlers.hpp +++ b/addons/weather/CfgEventhandlers.hpp @@ -1,25 +1,25 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - serverInit = QUOTE(call COMPILE_FILE(XEH_PostServerInit)); - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + serverInit = QUOTE(call COMPILE_SCRIPT(XEH_PostServerInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; class Extended_DisplayLoad_EventHandlers { class Display3DEN { - ADDON = QUOTE(call COMPILE_FILE(init3DEN)); + ADDON = QUOTE(call COMPILE_SCRIPT(init3DEN)); }; }; diff --git a/addons/weather/README.md b/addons/weather/README.md index da83f62fd2..62572a878d 100644 --- a/addons/weather/README.md +++ b/addons/weather/README.md @@ -3,12 +3,3 @@ ace_weather This module simulates realistic weather effects, according to the geographical location of the map, the date and time. It also ensures that all players experience the same weather effects. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) -- [esteldunedain](https://github.com/esteldunedain) -- [walterpearce](https://github.com/walterpearce) diff --git a/addons/weather/XEH_postServerInit.sqf b/addons/weather/XEH_postServerInit.sqf index 433c161979..da694bb5f1 100644 --- a/addons/weather/XEH_postServerInit.sqf +++ b/addons/weather/XEH_postServerInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -["ace_settingsInitialized", { +["CBA_settingsInitialized", { if (!GVAR(enabled)) exitWith {}; GVAR(temperatureShift) = random [-SD_TO_MIN_MAX(4), 0, SD_TO_MIN_MAX(4)]; // Gauss(0, 4) diff --git a/addons/weather/initSettings.sqf b/addons/weather/initSettings.sqf index 00aa324db0..fb11e31e75 100644 --- a/addons/weather/initSettings.sqf +++ b/addons/weather/initSettings.sqf @@ -8,7 +8,7 @@ private _category = [format ["ACE %1", LLSTRING(Module_DisplayName)]]; true, // isGlobal {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(updateInterval), "SLIDER", @@ -18,7 +18,7 @@ private _category = [format ["ACE %1", LLSTRING(Module_DisplayName)]]; true, // isGlobal {[QGVAR(updateInterval), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(windSimulation), "CHECKBOX", @@ -28,7 +28,7 @@ private _category = [format ["ACE %1", LLSTRING(Module_DisplayName)]]; true, // isGlobal {[QGVAR(windSimulation), _this] call EFUNC(common,cbaSettings_settingChanged)}, true // Needs mission restart -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; [ QGVAR(showCheckAirTemperature), "CHECKBOX", @@ -36,4 +36,4 @@ private _category = [format ["ACE %1", LLSTRING(Module_DisplayName)]]; _category, true, // default value false // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml index 3096036eba..82e0006843 100644 --- a/addons/weather/stringtable.xml +++ b/addons/weather/stringtable.xml @@ -100,6 +100,7 @@ Rozšiřuje stávající počasí o teplotu, vlhkost a tlak vzduchu. Améliore le module météo existant en y ajoutant la température, l'humidité et la pression atmosphérique. Mevcut havayı sıcaklık, nem ve hava basıncı ile genişletir. + Expande el clima actual en cuanto a temperatura, humedad y presión atmosférica. Update Interval @@ -149,6 +150,7 @@ Simulace větru (podle mapy) Simulation du vent (basée sur la carte) Rüzgar Simülasyonu (harita tabanlı) + Simulación de viento (según mapa) Enables the map based wind simulation (overwrites vanilla wind) @@ -164,6 +166,7 @@ Povoluje simulaci větru založenou na mapě (přepíše původní vítr) Active la simulation du vent basée sur la carte (écrase le vent vanilla). Harita tabanlı rüzgar simülasyonunu etkinleştirir (Normal rüzgarının üzerine yazar) + Activa la simulación de viento según mapa (sobreescribe el clima vanilla) Check Air Temperature @@ -177,6 +180,7 @@ Checar a temperatura do ar Hava Sıcaklığını Kontrol Et Проверить температуру воздуха + Comprobar temperatura de aire Show Check Air Temperature Action @@ -190,6 +194,7 @@ Mostrar a ação "Checar a temperatura do ar" Hava Sıcaklığını Kontrol Etme Eylemini Göster Показывать действие проверки температуры + Mostrar acción de comprobar temperatura de aire diff --git a/addons/winddeflection/ACE_Settings.hpp b/addons/winddeflection/ACE_Settings.hpp index 73c333479f..84ded86810 100644 --- a/addons/winddeflection/ACE_Settings.hpp +++ b/addons/winddeflection/ACE_Settings.hpp @@ -1,24 +1,11 @@ class ACE_Settings { class GVAR(enabled) { - category = CSTRING(windDeflection_DisplayName); - displayName = CSTRING(deflectionModule_DisplayName); - description = CSTRING(deflectionModule_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(vehicleEnabled) { - category = CSTRING(windDeflection_DisplayName); - displayName = CSTRING(vehicleEnabled_DisplayName); - description = CSTRING(vehicleEnabled_Description); - typeName = "BOOL"; - value = 1; + movedToSQF = 1; }; class GVAR(simulationInterval) { - category = CSTRING(windDeflection_DisplayName); - displayName = CSTRING(simulationInterval_DisplayName); - description = CSTRING(simulationInterval_Description); - typeName = "SCALAR"; - value = 0.05; - sliderSettings[] = {0, 0.2, 0.05, 2}; + movedToSQF = 1; }; }; diff --git a/addons/winddeflection/CfgEventHandlers.hpp b/addons/winddeflection/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/winddeflection/CfgEventHandlers.hpp +++ b/addons/winddeflection/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/winddeflection/README.md b/addons/winddeflection/README.md index 926b957715..bfa86b83f1 100644 --- a/addons/winddeflection/README.md +++ b/addons/winddeflection/README.md @@ -2,11 +2,3 @@ ace_winddeflection =============== Wind deflection for projectiles/bullets. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Glowbal](https://github.com/Glowbal) -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/winddeflection/XEH_postInit.sqf b/addons/winddeflection/XEH_postInit.sqf index fe454cb00d..fbdfdfc868 100644 --- a/addons/winddeflection/XEH_postInit.sqf +++ b/addons/winddeflection/XEH_postInit.sqf @@ -4,7 +4,7 @@ if (!hasInterface) exitWith {}; GVAR(trackedBullets) = []; -["ace_settingsInitialized", { +["CBA_settingsInitialized", { //If not enabled, dont't add PFEH if (!GVAR(enabled)) exitWith {}; diff --git a/addons/winddeflection/XEH_preInit.sqf b/addons/winddeflection/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/winddeflection/XEH_preInit.sqf +++ b/addons/winddeflection/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/winddeflection/initSettings.sqf b/addons/winddeflection/initSettings.sqf new file mode 100644 index 0000000000..172a1fed2b --- /dev/null +++ b/addons/winddeflection/initSettings.sqf @@ -0,0 +1,25 @@ +private _category = format ["ACE %1", localize LSTRING(windDeflection_DisplayName)]; + +[ + QGVAR(enabled), "CHECKBOX", + [LSTRING(deflectionModule_DisplayName), LSTRING(deflectionModule_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(vehicleEnabled), "CHECKBOX", + [LSTRING(vehicleEnabled_DisplayName), LSTRING(vehicleEnabled_Description)], + _category, + true, + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(simulationInterval), "SLIDER", + [LSTRING(simulationInterval_DisplayName), LSTRING(simulationInterval_Description)], + _category, + [0, 0.2, 0.05, 2], + 1 +] call CBA_fnc_addSetting; diff --git a/addons/yardage450/CfgEventHandlers.hpp b/addons/yardage450/CfgEventHandlers.hpp index 2bed8a2eef..851e58197c 100644 --- a/addons/yardage450/CfgEventHandlers.hpp +++ b/addons/yardage450/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/yardage450/README.md b/addons/yardage450/README.md index 991c4f8a22..cce219eb33 100644 --- a/addons/yardage450/README.md +++ b/addons/yardage450/README.md @@ -2,10 +2,3 @@ ace_yardage450 ========== Adds the Bushnell Yardage Pro Sport 450 Laser Rangefinder. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Ruthberg](http://github.com/Ulteq) diff --git a/addons/yardage450/RscTitles.hpp b/addons/yardage450/RscTitles.hpp index 28fd7735e9..75ca73d5f3 100644 --- a/addons/yardage450/RscTitles.hpp +++ b/addons/yardage450/RscTitles.hpp @@ -24,7 +24,7 @@ class RscTitles { onUnload = "with uiNameSpace do { ACE_RscYardage450 = displayNull; };"; class Controls { - class ACE_Yardage450_RscTarget : ACE_Yardage450_RscText { + class ACE_Yardage450_RscTarget: ACE_Yardage450_RscText { idc = 720041; style = ST_CENTER; x = "0.5 - (0.18 * SafeZoneH)"; @@ -34,7 +34,7 @@ class RscTitles { sizeEx = "0.05 * SafeZoneH"; text = "TARGET ACQUIRED"; }; - class ACE_Yardage450_RscLaser : ACE_Yardage450_RscTarget { + class ACE_Yardage450_RscLaser: ACE_Yardage450_RscTarget { idc = 720042; x = "0.5 - (0.14 * SafeZoneH)"; y = "0.5 - (0.18 * SafeZoneH)"; @@ -45,7 +45,7 @@ class RscTitles { colorBackground[] = {0, 0, 0, 1}; text = "LASER"; }; - class ACE_Yardage450_RscRange : ACE_Yardage450_RscTarget { + class ACE_Yardage450_RscRange: ACE_Yardage450_RscTarget { idc = 720043; style = ST_RIGHT; x = "0.5 - (0.02 * SafeZoneH)"; @@ -55,7 +55,7 @@ class RscTitles { sizeEx = "0.06 * SafeZoneH"; text = "---"; }; - class ACE_Yardage450_RscMeters : ACE_Yardage450_RscLaser { + class ACE_Yardage450_RscMeters: ACE_Yardage450_RscLaser { idc = 720044; x = "0.5 + (0.06 * SafeZoneH)"; y = "0.5 + (0.19 * SafeZoneH)"; @@ -64,7 +64,7 @@ class RscTitles { sizeEx = "0.018 * SafeZoneH"; text = "METERS"; }; - class ACE_Yardage450_RscYards : ACE_Yardage450_RscMeters { + class ACE_Yardage450_RscYards: ACE_Yardage450_RscMeters { idc = 720045; y = "0.5 + (0.21 * SafeZoneH)"; w = "0.0417 * SafeZoneH"; diff --git a/addons/yardage450/initKeybinds.sqf b/addons/yardage450/initKeybinds.sqf index fa4f52b6c5..210141a681 100644 --- a/addons/yardage450/initKeybinds.sqf +++ b/addons/yardage450/initKeybinds.sqf @@ -1,4 +1,3 @@ - ["ACE3 Equipment", QGVAR(DistanceKey), LLSTRING(PowerButtonKey), { // Conditions: canInteract diff --git a/addons/zeus/ACE_Settings.hpp b/addons/zeus/ACE_Settings.hpp index 0955fb135a..4b027d20a8 100644 --- a/addons/zeus/ACE_Settings.hpp +++ b/addons/zeus/ACE_Settings.hpp @@ -1,45 +1,20 @@ class ACE_Settings { class GVAR(zeusAscension) { - category = CSTRING(DisplayName); - displayName = CSTRING(ascension_DisplayName); - description = CSTRING(ascension_Description); - typeName = "BOOL"; - value = 0; + movedToSQF = 1; }; class GVAR(zeusBird) { - category = CSTRING(DisplayName); - displayName = CSTRING(bird_DisplayName); - description = CSTRING(bird_Description); - typeName = "BOOL"; - value = 0; + movedToSQF = 1; }; class GVAR(remoteWind) { - category = CSTRING(DisplayName); - displayName = CSTRING(remoteWind_DisplayName); - description = CSTRING(remoteWind_Description); - typeName = "BOOL"; - value = 0; + movedToSQF = 1; }; class GVAR(radioOrdnance) { - category = CSTRING(DisplayName); - displayName = CSTRING(radioOrdnance_DisplayName); - description = CSTRING(radioOrdnance_Description); - typeName = "BOOL"; - value = 0; + movedToSQF = 1; }; class GVAR(revealMines) { - category = CSTRING(DisplayName); - displayName = CSTRING(revealMines_DisplayName); - description = CSTRING(revealMines_Description); - typeName = "SCALAR"; - value = 0; - values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(revealMines_partial), CSTRING(revealMines_full)}; + movedToSQF = 1; }; class GVAR(autoAddObjects) { - category = CSTRING(DisplayName); - typeName = "BOOL"; - value = 0; - displayName = CSTRING(AddObjectsToCurator); - description = CSTRING(AddObjectsToCurator_desc); + movedToSQF = 1; }; }; diff --git a/addons/zeus/CfgEventHandlers.hpp b/addons/zeus/CfgEventHandlers.hpp index becf395052..6c29240403 100644 --- a/addons/zeus/CfgEventHandlers.hpp +++ b/addons/zeus/CfgEventHandlers.hpp @@ -1,18 +1,18 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/zeus/README.md b/addons/zeus/README.md index 35e7da1cdd..4846a82f80 100644 --- a/addons/zeus/README.md +++ b/addons/zeus/README.md @@ -7,10 +7,3 @@ Provides control over various aspects of Zeus: - Wind sounds - Ordnance radio messages - Mine markers - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [SilentSpike](http://github.com/SilentSpike) diff --git a/addons/zeus/XEH_postInit.sqf b/addons/zeus/XEH_postInit.sqf index 6de64b6d99..c1dba7e0e4 100644 --- a/addons/zeus/XEH_postInit.sqf +++ b/addons/zeus/XEH_postInit.sqf @@ -2,13 +2,6 @@ #define IDD_DISPLAY3DEN 313 -["ace_settingsInitialized",{ - // Only add an InitPost EH if setting is enabled (and apply retroactively) - if (isServer && {GVAR(autoAddObjects)}) then { - ["AllVehicles", "InitPost", FUNC(addObjectToCurator), true, [], true] call CBA_fnc_addClassEventHandler; - }; -}] call CBA_fnc_addEventHandler; - // Global skill module PVs values for persistence, just listen for the PV QGVAR(GlobalSkillAI) addPublicVariableEventHandler FUNC(moduleGlobalSetSkill); diff --git a/addons/zeus/XEH_preInit.sqf b/addons/zeus/XEH_preInit.sqf index 909005e73e..c1bea7c581 100644 --- a/addons/zeus/XEH_preInit.sqf +++ b/addons/zeus/XEH_preInit.sqf @@ -8,6 +8,13 @@ PREP_RECOMPILE_END; if (isServer) then { [QGVAR(zeusUnitAssigned), FUNC(handleZeusUnitAssigned)] call CBA_fnc_addEventHandler; + + // Only add an InitPost EH if setting is enabled (and apply retroactively) + ["CBA_settingsInitialized", { + if (GVAR(autoAddObjects)) then { + ["AllVehicles", "InitPost", FUNC(addObjectToCurator), true, [], true] call CBA_fnc_addClassEventHandler; + }; + }] call CBA_fnc_addEventHandler; }; GVAR(GlobalSkillAI) = [0.5,0.5,0.5,0.5,true,true]; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index 6b8866aaa4..94f4946c43 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -21,20 +21,20 @@ params ["_logic", "_units", "_activated"]; if (_activated) then { - _explosive = gettext (configfile >> "cfgvehicles" >> typeof _logic >> "explosive"); + _explosive = gettext (configOf _logic >> "explosive"); if (_explosive != "") then { _explosive = createvehicle [_explosive,position _logic,[],0,"none"]; _explosive attachto [_logic]; // Added by ace_zeus to control if mines are revealed - if (GVAR(revealMines) > 0) then { + if (GVAR(revealMines) > MINE_REVEAL_NONE) then { //--- Reveal the mine to curator's side { _side = (getassignedcuratorunit _x) call bis_fnc_objectSide; _side revealmine _explosive; } forEach (objectcurators _logic); - if (GVAR(revealMines) > 1) then { + if (GVAR(revealMines) == MINE_REVEAL_FULL) then { //--- Mark minefields in the map [] spawn bis_fnc_drawMinefields; }; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 4439ad3517..05d66380ff 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -31,7 +31,7 @@ if ({local _x} count (objectcurators _logic) > 0) then { if !(isserver) exitwith {}; if (_activated) then { - _ammo = _logic getvariable ["type",gettext (configfile >> "cfgvehicles" >> typeof _logic >> "ammo")]; + _ammo = _logic getvariable ["type",gettext (configOf _logic >> "ammo")]; if (_ammo != "") then { _cfgAmmo = configfile >> "cfgammo" >> _ammo; //if !(isclass _cfgAmmo) exitwith {["CfgAmmo class '%1' not found.",_ammo] call bis_fnc_error;}; @@ -90,10 +90,9 @@ if (_activated) then { }; _fnc_playRadio = { if (_radio != "") then { - _entities = (getposatl _logic) nearentities ["All",100]; _sides = []; { - if (isplayer _x) then { + if (_x distance2D _logic < 100) then { _side = side group _x; if (_side in [east,west,resistance,civilian]) then { //--- Play radio (only if it wasn't played recently) @@ -103,14 +102,14 @@ if (_activated) then { }; }; }; - } foreach _entities; + } foreach allPlayers; }; }; if (count _hint > 0 && {count objectcurators _logic > 0}) then { [[_hint,nil,nil,nil,nil,nil,nil,true],"bis_fnc_advHint",objectcurators _logic] call bis_fnc_mp; }; if (count _velocity == 3) then { - _altitude = (_logic getvariable ["altitude",_altitude]) call bis_fnc_parsenumber; + _altitude = (_logic getvariable ["altitude",_altitude]) call BIS_fnc_parseNumberSafe; _radio = _logic getvariable ["radio",_radio]; //--- Create projectile diff --git a/addons/zeus/functions/fnc_canCreateModule.sqf b/addons/zeus/functions/fnc_canCreateModule.sqf index df6cb99400..1981833625 100644 --- a/addons/zeus/functions/fnc_canCreateModule.sqf +++ b/addons/zeus/functions/fnc_canCreateModule.sqf @@ -15,6 +15,9 @@ * Public: No */ +// Don't allow if we already are a zeus, intentionally using player instead of ace_player + if (!isNull getAssignedCuratorLogic player) exitWith { false }; + (isNil QGVAR(zeus)) && { switch (GVAR(canCreateZeus)) do { case CAN_CREATE_ADMIN: {isServer || {IS_ADMIN_LOGGED}}; diff --git a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf index 967edc9396..532d340416 100644 --- a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf +++ b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf @@ -32,7 +32,7 @@ if !(["ace_fastroping"] call EFUNC(common,isModLoaded)) then { if !(alive _mouseOverUnit) then { [LSTRING(OnlyAlive)] call FUNC(showMessage); } else { - private _config = configFile >> "CfgVehicles" >> typeOf _mouseOverUnit; + private _config = configOf _mouseOverUnit; private _displayName = getText (_config >> "displayName"); if !(isNumber (_config >> QEGVAR(fastroping,enabled))) then { [LSTRING(NotFastRopeCompatible), _displayName] call FUNC(showMessage); diff --git a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf index 47ada09c00..9e37b65389 100644 --- a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf +++ b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf @@ -61,7 +61,7 @@ if (_autoSeek) then { // Detonation private _nearObjects = (_unit nearObjects _activationRadius) select {side _x == _activationSide && {_x != _unit} && {alive _x}}; - if !(_nearObjects isEqualTo []) then { + if (_nearObjects isNotEqualTo []) then { createVehicle [EXPLOSIVES select _explosionSize, _unit, [], 0, "CAN_COLLIDE"]; [_pfhID] call CBA_fnc_removePerFrameHandler; LOG("Explosion created, PFH removed"); diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf index 1900e5a7a3..3c5a67de75 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf @@ -49,7 +49,7 @@ if ([_unit] call EFUNC(common,isPlayer)) exitWith { private _targetASL = _mousePosASL vectorAdd [0,0,0.6]; // mouse pos is at ground level zero, raise up a bit; private _artilleryMag = ""; - if ((getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "artilleryScanner")) == 1) then { + if ((getNumber (configOf _vehicle >> "artilleryScanner")) == 1) then { // Artillery - Get mortar ammo type and verify in range if (isNull gunner _vehicle) exitWith {_targetASL = [];}; { diff --git a/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf b/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf index 3f169028a5..331c458a07 100644 --- a/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf +++ b/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf @@ -25,10 +25,10 @@ TRACE_1("params",_this); private _units = []; if (_target == -1) then { - _units = (units attachedTo _logic) select {alive _x && {!([_x] call EFUNC(common,isPlayer))} && {!(currentWeapon _x isEqualTo "")}}; + _units = (units attachedTo _logic) select {alive _x && {!([_x] call EFUNC(common,isPlayer))} && {currentWeapon _x isNotEqualTo ""}}; } else { private _side = [west, east, independent, civilian] select _target; - _units = allUnits select {alive _x && {side _x == _side} && {!([_x] call EFUNC(common,isPlayer))} && {!(currentWeapon _x isEqualTo "")}}; + _units = allUnits select {alive _x && {side _x == _side} && {!([_x] call EFUNC(common,isPlayer))} && {currentWeapon _x isNotEqualTo ""}}; }; // Toggle flashlights for units @@ -38,7 +38,7 @@ if (_toggle) then { private _weapon = currentWeapon _x; private _pointer = (_x weaponAccessories _weapon) select 1; - if (!(_pointer isEqualTo "") && {getNumber (_cfgWeapons >> _pointer >> "ItemInfo" >> "FlashLight" >> "size") > 0}) then { + if ((_pointer isNotEqualTo "") && {getNumber (_cfgWeapons >> _pointer >> "ItemInfo" >> "FlashLight" >> "size") > 0}) then { [QEGVAR(ai,enableGunLights), [_x, "forceOn"], _x] call CBA_fnc_targetEvent; } else { if (_addGear) then { diff --git a/addons/zeus/functions/fnc_moduleToggleNvg.sqf b/addons/zeus/functions/fnc_moduleToggleNvg.sqf index f8627acfe6..68fda8edb3 100644 --- a/addons/zeus/functions/fnc_moduleToggleNvg.sqf +++ b/addons/zeus/functions/fnc_moduleToggleNvg.sqf @@ -31,24 +31,23 @@ if (_target == -1) then { }; // Add or remove NVGs from units -private _cfgVehicles = configFile >> "CfgVehicles"; private _cfgWeapons = configFile >> "CfgWeapons"; if (_toggle) then { { if (hmd _x isEqualTo "") then { // Get NVG item and helmet from unit config - private _linkedItems = getArray (_cfgVehicles >> typeOf _x >> "linkedItems"); + private _linkedItems = getArray (configOf _x >> "linkedItems"); private _nvgItem = _linkedItems select {_x isKindOf ["NVGoggles", _cfgWeapons]}; - private _nvgHelmet = _linkedItems select {!(getArray (_cfgWeapons >> _x >> "subItems") isEqualTo [])}; + private _nvgHelmet = _linkedItems select {getArray (_cfgWeapons >> _x >> "subItems") isNotEqualTo []}; // Add NVG helmet if defined - if !(_nvgHelmet isEqualTo []) exitWith { + if (_nvgHelmet isNotEqualTo []) exitWith { _x addHeadgear (_nvgHelmet select 0); }; // Add NVGs if defined - if !(_nvgItem isEqualTo []) exitWith { + if (_nvgItem isNotEqualTo []) exitWith { _x linkItem (_nvgItem select 0); }; @@ -67,7 +66,7 @@ if (_toggle) then { removeHeadgear _x; }; - if !(_nvgItem isEqualTo "") then { + if (_nvgItem isNotEqualTo "") then { _x unlinkItem _nvgItem; }; } forEach _units; diff --git a/addons/zeus/functions/fnc_ui_attributeCargo.sqf b/addons/zeus/functions/fnc_ui_attributeCargo.sqf index b4fc156127..d2345e8a96 100644 --- a/addons/zeus/functions/fnc_ui_attributeCargo.sqf +++ b/addons/zeus/functions/fnc_ui_attributeCargo.sqf @@ -60,7 +60,7 @@ private _fnc_onButtonUnload = { private _class = if (_item isEqualType "") then {_item} else {typeOf _item}; private _itemName = getText (configFile >> "CfgVehicles" >> _class >> "displayName"); if ([_item, _vehicle] call EFUNC(cargo,unloadItem)) then { - private _vehicleName = getText (configFile >> "CfgVehicles" >> typeOf _vehicle >> "displayName"); + private _vehicleName = getText (configOf _vehicle >> "displayName"); private _message = [localize ELSTRING(cargo,UnloadedItem), "
", " "] call CBA_fnc_replace; [_message, _itemName, _vehicleName] call FUNC(showMessage); } else { diff --git a/addons/zeus/functions/fnc_ui_toggleNvg.sqf b/addons/zeus/functions/fnc_ui_toggleNvg.sqf index 037c216205..e32ee9f715 100644 --- a/addons/zeus/functions/fnc_ui_toggleNvg.sqf +++ b/addons/zeus/functions/fnc_ui_toggleNvg.sqf @@ -53,7 +53,7 @@ if !(isNull _unit) then { if (isNull _unit) then { (_display displayCtrl 92856) lbDelete 0; } else { - (_display displayCtrl 92855) lbSetCurSel ([0, 1] select !(hmd _unit isEqualTo "")); + (_display displayCtrl 92855) lbSetCurSel ([0, 1] select (hmd _unit isNotEqualTo "")); }; private _fnc_onUnload = { diff --git a/addons/zeus/initSettings.sqf b/addons/zeus/initSettings.sqf index 1db3fe5205..cf4722c5c3 100644 --- a/addons/zeus/initSettings.sqf +++ b/addons/zeus/initSettings.sqf @@ -1,3 +1,71 @@ +[ + QGVAR(zeusAscension), + "CHECKBOX", + [LLSTRING(ascension_DisplayName), LLSTRING(ascension_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + false, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(zeusBird), + "CHECKBOX", + [LLSTRING(bird_DisplayName), LLSTRING(bird_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + false, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(remoteWind), + "CHECKBOX", + [LLSTRING(remoteWind_DisplayName), LLSTRING(remoteWind_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + false, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(radioOrdnance), + "CHECKBOX", + [LLSTRING(radioOrdnance_DisplayName), LLSTRING(radioOrdnance_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + false, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(revealMines), + "LIST", + [LLSTRING(revealMines_DisplayName), LLSTRING(revealMines_Description)], + format ["ACE %1", LLSTRING(DisplayName)], + [ + [ + MINE_REVEAL_NONE, + MINE_REVEAL_TO_SIDE, + MINE_REVEAL_FULL + ], + [ + localize "STR_A3_OPTIONS_DISABLED", + LLSTRING(revealMines_partial), + LLSTRING(revealMines_full) + ], + 0 + ], + true +] call CBA_fnc_addSetting; + +[ + QGVAR(autoAddObjects), + "CHECKBOX", + [LLSTRING(AddObjectsToCurator), LLSTRING(AddObjectsToCurator_desc)], + format ["ACE %1", LLSTRING(DisplayName)], + false, + true, + {}, + true // XEH class EH cannot be removed, requires mission restart +] call CBA_fnc_addSetting; + [ QGVAR(canCreateZeus), "LIST", @@ -19,4 +87,4 @@ 0 ], true -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; diff --git a/addons/zeus/script_component.hpp b/addons/zeus/script_component.hpp index 957c7699d3..8b59ac1032 100644 --- a/addons/zeus/script_component.hpp +++ b/addons/zeus/script_component.hpp @@ -28,3 +28,7 @@ #define CAN_CREATE_ADMIN 0 #define CAN_CREATE_CONSOLE 1 #define CAN_CREATE_ALL 2 + +#define MINE_REVEAL_NONE 0 +#define MINE_REVEAL_TO_SIDE 1 +#define MINE_REVEAL_FULL 2 diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 081ee545aa..9d8d966239 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -15,6 +15,7 @@ Zeus Zeus Zeus + Zeus Zeus Settings @@ -274,6 +275,7 @@ 防禦區域 Defender Área Bölgeyi Koru + Defender área Update Editable Objects @@ -288,6 +290,7 @@ Обновить редактируемые объекты Atualizar objetos editáveis Aktualizujte upravitelné objekty + Actualizar objetos editables Editing Mode @@ -300,6 +303,7 @@ Modo de edição Režim úprav Mode d'édition + Modo de edición Add or remove editable objects from Zeus @@ -312,6 +316,7 @@ Adiciona ou remove objetos editáveis do Zeus Přidej nebo odeber upravitelné objekty ze Zeusu Ajoute ou supprime les objets modifiables depuis Zeus. + Añadir o eliminar objetos editables desde Zeus Add Objects @@ -325,6 +330,7 @@ Přidat objekty Ajouter des objets Obje Ekle + Añadir objetos Remove Objects @@ -340,6 +346,7 @@ Remover Objetos Odebrat objekty Objeyi Kaldır + Eliminar objetos All Curators @@ -354,6 +361,7 @@ Все кураторы Todos os Curadores Všichni kurátoři + Todos los curadores Apply changes to all curators @@ -368,6 +376,7 @@ Применить изменения ко всем кураторам Aplicar mudanças à todos os Curadores Použít změny na všechny kurátory + Aplicar cambios a todos los curadores Additional Objects @@ -380,6 +389,7 @@ Další objekty 額外物件 Objets supplémentaires + Objetos adicionales Additional objects to include in the action regardless of Task Radius @@ -392,6 +402,7 @@ Další objekty, které mají být zahrnuty do akce, bez ohledu na poloměr úlohy 無論任務範圍何處,都在行動中包含著額外的物件 Objets supplémentaires à intégrer dans l'action, quel que soit le rayon de la tâche. + Objetos adicionales para incluir en la acción al margen del Radio de Tarea Global AI Skill @@ -407,6 +418,7 @@ AI技巧設定 Habilidade Global da IA Genel AI Yetenekleri + Habilidad de IA Global General Skill @@ -422,6 +434,7 @@ 總體技巧 Habilidade Geral Genel Yetenekler + Habilidad general Changes: general, commanding, courage @@ -436,6 +449,7 @@ 改变: 战斗技巧,指挥技巧,勇气大小 改變: 戰鬥技巧,指揮技巧,勇氣大小 Muda: general, commanding, courage + Cambios: general, commanding, courage Accuracy @@ -450,6 +464,7 @@ 精确度 精確度 Precisão + Precisión Changes: aimingAccuracy @@ -464,6 +479,7 @@ 改变: 瞄准精确度 改變: 瞄準精確度 Muda: aimingAccuracy + Cambios: aimingAccuracy Weapon Handling @@ -478,6 +494,7 @@ 武器掌握 武器掌握 Uso de Arma + Manejo de arma Changes: aimingShake, aimingSpeed, reloadSpeed @@ -492,6 +509,7 @@ 改变: 手晃幅度,瞄准速度, 重新装填速度 改變: 手晃幅度,瞄準速度, 重新裝填速度 Muda: aimingShake, aimingSpeed, reloadSpeed + Cambios: aimingShake, aimingSpeed, reloadSpeed Spotting @@ -506,6 +524,7 @@ 索敌能力 索敵能力 Detecção + Detección Changes: spotDistance, spotTime @@ -520,6 +539,7 @@ 改变: 搜索距离, 发现时间 改變: 搜索距離, 發現時間 Muda: spotDistance, spotTime + Cambios: spotDistance, spotTime Seek Cover @@ -534,6 +554,7 @@ 寻找掩护 尋找掩護 Procurar Cobertura + Buscar cobertura Should AI seek cover @@ -548,6 +569,7 @@ 决定AI是否会寻找掩护 決定AI是否會尋找掩護 A IA dever buscar cobertura + La IA debe buscar cobertura Auto Combat @@ -562,6 +584,7 @@ 自动交战 自動交戰 Combate automático + Combate automático Should AI automatically switch to combat mode @@ -576,6 +599,7 @@ 决定AI是否会自动与敌人交战 決定AI是否會自動與敵人交戰 A IA deveria automaticamente mudar para modo de combate + La IA debe automáticamente cambiar a modo de combate Group Side @@ -591,6 +615,7 @@ 小隊陣營 Lado do Grupo Tarafı Değiştir + Bando de grupo Patrol Area @@ -606,6 +631,7 @@ 巡邏區域 Patrulhar Área Devriye ayarla + Patrullar área Toggle Surrender @@ -638,6 +664,7 @@ Adicionar/Remover FRIES Přidat/Odebrat FRIES (slaňování) Ekle/Kaldır FRIES + Añadir/Eliminar FRIES %1 is not fastrope compatible. @@ -652,6 +679,7 @@ %1 несовместим с быстрым спуском %1 não é compatível com sistema de corda. %1 není kompatibilní se slaňováním. + %1 no es compatible con descenso por cuerda. Unable to remove FRIES, ropes are deployed. @@ -666,6 +694,7 @@ Невозможно удалить FRIES, канаты развернуты. Não foi possível remover o FRIES, as cordas estão soltas. Nemohu odebrat FRIES, lana jsou vytažena. + No es posible eliminar FRIES, las cuerdas están desplegadas- Teleport Players @@ -712,6 +741,7 @@ 传送选定的玩家至模块位置 傳送選定的玩家至模塊位置 Teleporta o jogador selecionado para a posição do módulo + Teleportar al jugador seleccionado a la posición del módulo Teleport Group @@ -727,6 +757,7 @@ 傳送小隊 Teleportar Grupo Grubu ışınla + Teleportar al grupo Teleports all units in group @@ -1142,6 +1173,7 @@ 貨物: Carga: Kargo: + Carga: Select cargo to unload @@ -1155,6 +1187,7 @@ Vyberte náklad na vyložení Sélectionner une cargaison à décharger Seçilen kargo boşaltıldı + Seleccionar carga para descargar: Task Radius @@ -1184,6 +1217,7 @@ 設定目標範圍半徑 Raio para se executar uma tarefa Okruh ve kterém bude úkol vykonán + Radio en dentro del cual realizar la tarea Invalid radius entered @@ -1198,6 +1232,7 @@ 错误的半径值 錯誤的半徑值 Raio inválido inserido + Radio inválido introducido Suppressive Fire @@ -1228,6 +1263,7 @@ Adicionar Arsenal Completo Přidat plný arzenál Arsenal Ekle + Añadir Arsenal completo Remove Arsenal @@ -1243,6 +1279,7 @@ Remover Arsenal Odebrat arzenál Arsenali Kaldır + Eliminar Arsenal Load into Cargo @@ -1257,6 +1294,7 @@ Carregar na carga Naložit do nákladového prostoru Charger dans le véhicule + Cargar en la carga Toggle NVGs @@ -1271,6 +1309,7 @@ Вкл/Выкл ПНВ Alternar Visão Noturna Přepnout noktovizory + Alternar visión nocturna NVG Equipment @@ -1286,6 +1325,7 @@ Equipamento de Visão Noturna Noktovizory - vybavení Gece Görüşü Ekipmanı + Equipamiento de visión nocturna Add or remove NVGs from units @@ -1301,6 +1341,7 @@ Adiciona ou remove visão noturna de unidades Přidat nebo odebrat noktovizory jednotkám Gece Görüşü ekle veya kaldır + Añadir o eliminar visión nocturna de las unidades Toggle Target @@ -1328,6 +1369,7 @@ Unidades afetadas pela alteração Jednotky ovlivněné přepnutím Unités affectées par le changement. + Unidades afectadas por esta alternancia Selected Group @@ -1343,6 +1385,7 @@ Grupo Selecionado Vybraná skupina Seçilen Grup + Grupo seleccionado Toggle Flashlights @@ -1390,6 +1433,7 @@ Adicionar equipamento Přidat vybavení Tekerlek Ekle + Añadir equipamiento Garrison Group @@ -1404,6 +1448,7 @@ Разместить группу в здании Guarnecer grupo Umístit posádku (jednotka) + Guarnicionar grupo Fill from top to bottom @@ -1418,6 +1463,7 @@ Занять здание сверху до низу Preencher de cima para baixo Naplnit odshora dolů + Rellenar de arriba hacia abajo Fill buildings from the highest position first @@ -1432,6 +1478,7 @@ Занять здание начиная с верхних позиций Preencher construções do lugar mais alto primeiro Naplní nejdříve nejvyšší pozice v budovách + Rellenar edificios comenzando por la posición más elevada Building filling mode @@ -1446,6 +1493,7 @@ Режим заполнения здания Modo de preenchimento da construção Režim plnění budov + Modo de rellenar edificios Even filling @@ -1460,6 +1508,7 @@ Равномерно Preenchimento equilibrado Rovnoměrné plnění + Rellenado equilibrado Building by building @@ -1474,6 +1523,7 @@ Здание за зданием Construção por construção Budova za budovou + Edificio a edificio Random filling @@ -1488,6 +1538,7 @@ Случайно Preenchimento aleatório Náhodné plnění + Rellenado aleatorio Teleport @@ -1518,6 +1569,7 @@ Вывести группу из здания Desguarnecer grupo Zrušit posádku - uvolnit jednotku + Desaguarnicionar grupo No players found @@ -1809,6 +1861,7 @@ "%1" menu Menu "%1" "%1" menü + "%1" menu Paradrop Cargo @@ -1822,6 +1875,7 @@ Výsadek nákladu Paralargage de cargaison Paraşüt Kargosu + Carga mediante paracaidas No cargo loaded diff --git a/docs/_config.yml b/docs/_config.yml index c5871f0f5d..2072a7255a 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -8,9 +8,9 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 14 - patch: 3 - build: 55 + minor: 13 + patch: 6 + build: 60 acex: githubUrl: https://github.com/acemod/ACEX diff --git a/docs/_includes/dependencies_list.md b/docs/_includes/dependencies_list.md index 7d920e0108..8ef2a59a94 100644 --- a/docs/_includes/dependencies_list.md +++ b/docs/_includes/dependencies_list.md @@ -103,17 +103,25 @@ {% endif %} {% if include.component == "fastroping" %} -`ace_interaction` +`ace_interaction`, `ace_logistics_rope` {% endif %} {% if include.component == "fcs" %} `ace_interaction` {% endif %} +{% if include.component == "field_rations" %} +`ace_interact_menu` +{% endif %} + {% if include.component == "finger" %} `ace_common` {% endif %} +{% if include.component == "fire" %} +`ace_common`, `ace_medical_engine` +{% endif %} + {% if include.component == "flashlights" %} `ace_interaction` {% endif %} @@ -126,6 +134,10 @@ `ace_main` {% endif %} +{% if include.component == "fortify" %} +`ace_interaction` +{% endif %} + {% if include.component == "frag" %} `ace_common` {% endif %} @@ -150,6 +162,10 @@ `ace_interaction`, `ace_movement` {% endif %} +{% if include.component == "headless" %} +`ace_common` +{% endif %} + {% if include.component == "hearing" %} `ace_interaction` {% endif %} @@ -170,6 +186,10 @@ `ace_common` {% endif %} +{% if include.component == "intelitems" %} +`ace_interact_menu`, `ace_zeus` +{% endif %} + {% if include.component == "interact_menu" %} `ace_common` {% endif %} @@ -190,6 +210,10 @@ `ACE_common`, `ACE_weather` {% endif %} +{% if include.component == "killtracker" %} +`ace_medical` +{% endif %} + {% if include.component == "laser" %} `ace_common` {% endif %} @@ -198,6 +222,10 @@ `ace_common` {% endif %} +{% if include.component == "logistics_rope" %} +`ace_common` +{% endif %} + {% if include.component == "logistics_uavbattery" %} `ace_interaction` {% endif %} @@ -414,6 +442,10 @@ `ace_common` {% endif %} +{% if include.component == "sitting" %} +`ace_interaction` +{% endif %} + {% if include.component == "slideshow" %} `ace_common` {% endif %} @@ -446,6 +478,10 @@ `ace_common` {% endif %} +{% if include.component == "towing" %} +`ace_common`, `ace_logistics_rope` +{% endif %} + {% if include.component == "trenches" %} `ace_interaction` {% endif %} @@ -462,6 +498,10 @@ `ace_common` {% endif %} +{% if include.component == "vehicle_damage" %} +`ace_common`, `ace_cookoff` +{% endif %} + {% if include.component == "vehiclelock" %} `ace_interaction` {% endif %} @@ -474,6 +514,14 @@ `ace_common` {% endif %} +{% if include.component == "viewrestriction" %} +`ace_common` +{% endif %} + +{% if include.component == "volume" %} +`ace_common` +{% endif %} + {% if include.component == "weaponselect" %} `ace_common` {% endif %} @@ -494,8 +542,12 @@ `ace_common`, `ace_ai` {% endif %} +{% if include.component == "compat_gm" %} +`ace_csw`, `ace_explosives`, `ace_rearm`, `ace_refuel`, `ace_repair`, `gm_core` +{% endif %} + {% if include.component == "compat_r3f" %} -`r3f_armes_c`, `R3F_G17_addons`, `r3f_acc` +`r3f_armes_c`, `r3f_acc`, `R3F_G17_addons`, `R3F_G_SCAR`, `R3F_SCAR_H`, `R3F_SCAR_L`, `R3F_FN_MAG` {% endif %} {% if include.component == "compat_rh_acc" %} @@ -515,19 +567,19 @@ {% endif %} {% if include.component == "compat_rhs_afrf3" %} -`ace_explosives`, `ace_csw`, `ace_rearm`, `ace_refuel`, `ace_repair`, `rhs_c_weapons`, `rhs_c_airweapons`, `rhs_c_troops`, `rhs_c_bmd`, `rhs_c_bmp`, `rhs_c_bmp3`, `rhs_c_a2port_armor`, `rhs_c_btr`, `rhs_c_sprut`, `rhs_c_t72`, `rhs_c_tanks`, `rhs_c_a2port_air`, `rhs_c_a2port_car`, `rhs_c_cars`, `rhs_c_trucks`, `rhs_c_2s3`, `rhs_c_rva`, `rhs_c_heavyweapons` +`ace_explosives`, `ace_csw`, `ace_rearm`, `ace_refuel`, `ace_repair`, `rhs_main_loadorder` {% endif %} {% if include.component == "compat_rhs_gref3" %} -`ace_explosives`, `ace_csw`, `rhsgref_main`, `rhsgref_c_weapons` +`ace_explosives`, `ace_csw`, `rhsgref_main_loadorder` {% endif %} {% if include.component == "compat_rhs_saf3" %} -`ace_explosives`, `rhssaf_c_weapons`, `rhssaf_main` +`ace_explosives`, `rhssaf_main_loadorder` {% endif %} {% if include.component == "compat_rhs_usf3" %} -`ace_explosives`, `ace_javelin`, `ace_rearm`, `ace_refuel`, `ace_repair`, `ace_csw`, `rhsusf_c_weapons`, `rhsusf_c_troops`, `rhsusf_c_m1a1`, `rhsusf_c_m1a2`, `RHS_US_A2_AirImport`, `rhsusf_c_m109`, `rhsusf_c_HEMTT_A4`, `rhsusf_c_hmmwv`, `rhsusf_c_rg33`, `rhsusf_c_fmtv`, `rhsusf_c_m113`, `RHS_US_A2Port_Armor`, `rhsusf_c_melb` +`ace_explosives`, `ace_javelin`, `ace_rearm`, `ace_refuel`, `ace_repair`, `ace_csw`, `rhsusf_main_loadorder` {% endif %} {% if include.component == "compat_rksl_pm_ii" %} @@ -538,6 +590,10 @@ `iansky_opt` {% endif %} +{% if include.component == "compat_sog" %} +`vn_weapons`, `vn_emm_main_menu`, `weapons_f_vietnam_c`, `ace_trenches` +{% endif %} + {% if include.component == "noactionmenu" %} `ace_common` {% endif %} diff --git a/docs/src/package-lock.json b/docs/src/package-lock.json index 66c32ab10b..fabdb1421a 100644 --- a/docs/src/package-lock.json +++ b/docs/src/package-lock.json @@ -105,10 +105,23 @@ "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", "dev": true }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "dev": true, + "optional": true + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", "dev": true }, "array-union": { @@ -145,9 +158,9 @@ "dev": true }, "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", "dev": true }, "atob": { @@ -217,7 +230,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } @@ -626,7 +640,8 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true + "dev": true, + "optional": true }, "bytes": { "version": "1.0.0", @@ -686,13 +701,15 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=", - "dev": true + "dev": true, + "optional": true }, "camelcase-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "dev": true, + "optional": true, "requires": { "camelcase": "^2.0.0", "map-obj": "^1.0.0" @@ -803,12 +820,6 @@ } } }, - "coffeescript": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.10.0.tgz", - "integrity": "sha1-56qDAZF+9iGzXYo580jc3R234z4=", - "dev": true - }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -1007,19 +1018,16 @@ "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=", "dev": true, + "optional": true, "requires": { "array-find-index": "^1.0.1" } }, "dateformat": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.12.tgz", - "integrity": "sha1-nxJLZ1lMk3/3BpMuSmQsyo27/uk=", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.3.0" - } + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true }, "debug": { "version": "3.2.6", @@ -1034,7 +1042,8 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true + "dev": true, + "optional": true }, "decode-uri-component": { "version": "0.2.0", @@ -1223,6 +1232,12 @@ } } }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, "dir-glob": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", @@ -1369,6 +1384,7 @@ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.1.tgz", "integrity": "sha1-+FWobOYa3E6GIcPNoh56dhLDqNw=", "dev": true, + "optional": true, "requires": { "is-arrayish": "^0.2.1" } @@ -1550,6 +1566,15 @@ } } }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "ext-list": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", @@ -1571,6 +1596,12 @@ "sort-keys-length": "^1.0.0" } }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", @@ -1657,7 +1688,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } @@ -1676,6 +1708,13 @@ "micromatch": "^3.1.10" } }, + "fast-xml-parser": { + "version": "3.19.0", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-3.19.0.tgz", + "integrity": "sha512-4pXwmBplsCPv8FOY1WRakF970TjNGnGnfbOnLqjlYvMiF1SR3yOHyxMR/YCXpPTOspNF5gwudqktIP4VsWkvBg==", + "dev": true, + "optional": true + }, "faye-websocket": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.10.0.tgz", @@ -1758,6 +1797,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "dev": true, + "optional": true, "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" @@ -1807,12 +1847,40 @@ } } }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", @@ -1875,7 +1943,8 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", "integrity": "sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4=", - "dev": true + "dev": true, + "optional": true }, "get-stream": { "version": "3.0.0", @@ -1891,9 +1960,9 @@ "dev": true }, "getobject": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-0.1.0.tgz", - "integrity": "sha1-BHpEl4n6Fg0Bj1SG7ZEyC27HiFw=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.0.tgz", + "integrity": "sha512-tbUz6AKKKr2YiMB+fLWIgq5ZeBOobop9YMMAU9dC54/ot2ksMXt3DOFyBuhZw6ptcVszEykgByK20j7W9jHFag==", "dev": true }, "gifsicle": { @@ -1963,6 +2032,7 @@ "resolved": "https://registry.npmjs.org/glob/-/glob-7.0.6.tgz", "integrity": "sha1-IRuvr0nlJbjNkyYNFKsTYVKz9Xo=", "dev": true, + "optional": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1999,6 +2069,30 @@ "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=", "dev": true }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, "globby": { "version": "8.0.1", "resolved": "http://registry.npmjs.org/globby/-/globby-8.0.1.tgz", @@ -2090,7 +2184,8 @@ "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=", - "dev": true + "dev": true, + "optional": true }, "graceful-readlink": { "version": "1.0.1", @@ -2100,41 +2195,82 @@ "optional": true }, "grunt": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.4.tgz", - "integrity": "sha512-PYsMOrOC+MsdGEkFVwMaMyc6Ob7pKmq+deg1Sjr+vvMWp35sztfwKE7qoN51V+UEtHsyNuMcGdgMLFkBHvMxHQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.3.0.tgz", + "integrity": "sha512-6ILlMXv11/4cxuhSMfSU+SfvbxrPuqZrAtLN64+tZpQ3DAKfSQPQHRbTjSbdtxfyQhGZPtN0bDZJ/LdCM5WXXA==", "dev": true, "requires": { - "coffeescript": "~1.10.0", - "dateformat": "~1.0.12", + "dateformat": "~3.0.3", "eventemitter2": "~0.4.13", - "exit": "~0.1.1", + "exit": "~0.1.2", "findup-sync": "~0.3.0", - "glob": "~7.0.0", - "grunt-cli": "~1.2.0", + "glob": "~7.1.6", + "grunt-cli": "~1.3.2", "grunt-known-options": "~1.1.0", - "grunt-legacy-log": "~2.0.0", - "grunt-legacy-util": "~1.1.1", + "grunt-legacy-log": "~3.0.0", + "grunt-legacy-util": "~2.0.0", "iconv-lite": "~0.4.13", - "js-yaml": "~3.13.0", - "minimatch": "~3.0.2", - "mkdirp": "~0.5.1", + "js-yaml": "~3.14.0", + "minimatch": "~3.0.4", + "mkdirp": "~1.0.4", "nopt": "~3.0.6", - "path-is-absolute": "~1.0.0", - "rimraf": "~2.6.2" + "rimraf": "~3.0.2" }, "dependencies": { - "grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha1-VisRnrsGndtGSs4oRVAb6Xs1tqg=", + "glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dev": true, "requires": { - "findup-sync": "~0.3.0", - "grunt-known-options": "~1.1.0", - "nopt": "~3.0.6", - "resolve": "~1.1.0" + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" } + }, + "grunt-cli": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.3.2.tgz", + "integrity": "sha512-8OHDiZZkcptxVXtMfDxJvmN7MVJNE8L/yIcPb4HB7TlyFD1kDvjHrb62uhySsU14wJx9ORMnTuhRMQ40lH/orQ==", + "dev": true, + "requires": { + "grunt-known-options": "~1.1.0", + "interpret": "~1.1.0", + "liftoff": "~2.5.0", + "nopt": "~4.0.1", + "v8flags": "~3.1.1" + }, + "dependencies": { + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + } + } + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true } } }, @@ -2269,77 +2405,97 @@ "dev": true }, "grunt-legacy-log": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", - "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", + "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", "dev": true, "requires": { "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.0.0", + "grunt-legacy-log-utils": "~2.1.0", "hooker": "~0.2.3", - "lodash": "~4.17.5" + "lodash": "~4.17.19" } }, "grunt-legacy-log-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", - "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", + "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", "dev": true, "requires": { - "chalk": "~2.4.1", - "lodash": "~4.17.10" + "chalk": "~4.1.0", + "lodash": "~4.17.19" }, "dependencies": { "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", "dev": true, "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" } } } }, "grunt-legacy-util": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", - "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", + "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", "dev": true, "requires": { - "async": "~1.5.2", - "exit": "~0.1.1", - "getobject": "~0.1.0", + "async": "~3.2.0", + "exit": "~0.1.2", + "getobject": "~1.0.0", "hooker": "~0.2.3", - "lodash": "~4.17.10", - "underscore.string": "~3.3.4", - "which": "~1.3.0" + "lodash": "~4.17.21", + "underscore.string": "~3.3.5", + "which": "~2.0.2" }, "dependencies": { "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -2441,6 +2597,15 @@ } } }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, "hooker": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", @@ -2448,15 +2613,9 @@ "dev": true }, "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", - "dev": true - }, - "html-comment-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", - "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true, "optional": true }, @@ -2576,6 +2735,7 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", "integrity": "sha1-ji1INIdCEhtKghi3oTfppSBJ3IA=", "dev": true, + "optional": true, "requires": { "repeating": "^2.0.0" } @@ -2597,11 +2757,16 @@ "dev": true }, "ini": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", - "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", - "dev": true, - "optional": true + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "dev": true + }, + "interpret": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", + "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=", + "dev": true }, "into-stream": { "version": "3.1.0", @@ -2620,6 +2785,16 @@ "integrity": "sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw==", "dev": true }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -2633,7 +2808,8 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true + "dev": true, + "optional": true }, "is-buffer": { "version": "1.1.6", @@ -2646,6 +2822,7 @@ "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "dev": true, + "optional": true, "requires": { "builtin-modules": "^1.0.0" } @@ -2656,6 +2833,15 @@ "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", "dev": true }, + "is-core-module": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.3.0.tgz", + "integrity": "sha512-xSphU2KG9867tsYdLD4RWQ1VqdFl4HTO9Thf3I/3dLEfr0dbPTWKsuCKrgqMljg4nPE+Gq0VCnzT3gr0CyBmsw==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -2707,6 +2893,7 @@ "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2792,6 +2979,15 @@ "has": "^1.0.3" } }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, "is-retry-allowed": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", @@ -2807,13 +3003,13 @@ "optional": true }, "is-svg": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.2.1.tgz", - "integrity": "sha512-PHx3ANecKsKNl5y5+Jvt53Y4J7MfMpbNZkv384QNiswMKAWIbvcqbPz+sYbFKJI8Xv3be01GSFniPmoaP+Ai5A==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-4.3.1.tgz", + "integrity": "sha512-h2CGs+yPUyvkgTJQS9cJzo9lYK06WgRiXUqBBHtglSzVKAuH4/oWsqk7LGfbSa1hGk9QcZ0SyQtVggvBA8LZXA==", "dev": true, "optional": true, "requires": { - "html-comment-regex": "^1.1.2" + "fast-xml-parser": "^3.19.0" } }, "is-symbol": { @@ -2825,11 +3021,21 @@ "has-symbols": "^1.0.1" } }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true + "dev": true, + "optional": true }, "is-windows": { "version": "1.0.2", @@ -2883,6 +3089,7 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, + "optional": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" @@ -2914,6 +3121,45 @@ "is-buffer": "^1.1.5" } }, + "liftoff": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", + "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^2.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, "livereload-js": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/livereload-js/-/livereload-js-2.4.0.tgz", @@ -2925,6 +3171,7 @@ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "dev": true, + "optional": true, "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", @@ -2934,9 +3181,9 @@ } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "logalot": { "version": "2.1.0", @@ -2961,6 +3208,7 @@ "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=", "dev": true, + "optional": true, "requires": { "currently-unhandled": "^0.4.1", "signal-exit": "^3.0.0" @@ -3014,6 +3262,23 @@ } } }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + }, + "dependencies": { + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + } + } + }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -3024,7 +3289,8 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", - "dev": true + "dev": true, + "optional": true }, "map-visit": { "version": "1.0.0", @@ -3070,6 +3336,7 @@ "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", "integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=", "dev": true, + "optional": true, "requires": { "camelcase-keys": "^2.0.0", "decamelize": "^1.1.2", @@ -3145,7 +3412,8 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "dev": true, + "optional": true }, "mixin-deep": { "version": "1.3.2", @@ -3173,6 +3441,7 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", "dev": true, + "optional": true, "requires": { "minimist": "^1.2.5" } @@ -3231,6 +3500,7 @@ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "dev": true, + "optional": true, "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", @@ -3376,6 +3646,18 @@ "object-keys": "^1.0.11" } }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, "object.getownpropertydescriptors": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", @@ -3387,6 +3669,16 @@ "es-abstract": "^1.17.0-next.1" } }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", @@ -3440,6 +3732,28 @@ "arch": "^2.1.0" } }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "dev": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, "p-cancelable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", @@ -3510,15 +3824,33 @@ "p-finally": "^1.0.0" } }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "dev": true, + "optional": true, "requires": { "error-ex": "^1.2.0" } }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", @@ -3536,6 +3868,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "dev": true, + "optional": true, "requires": { "pinkie-promise": "^2.0.0" } @@ -3553,11 +3886,33 @@ "dev": true, "optional": true }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "dev": true, + "optional": true, "requires": { "graceful-fs": "^4.1.2", "pify": "^2.0.0", @@ -3575,19 +3930,22 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true + "dev": true, + "optional": true }, "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", - "dev": true + "dev": true, + "optional": true }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "dev": true, + "optional": true, "requires": { "pinkie": "^2.0.0" } @@ -3700,6 +4058,7 @@ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "dev": true, + "optional": true, "requires": { "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", @@ -3711,6 +4070,7 @@ "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "dev": true, + "optional": true, "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" @@ -3732,11 +4092,21 @@ "util-deprecate": "~1.0.1" } }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, "redent": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", "integrity": "sha1-z5Fqsf1fHxbfsggi3W7H9zDCr94=", "dev": true, + "optional": true, "requires": { "indent-string": "^2.1.0", "strip-indent": "^1.0.1" @@ -3769,6 +4139,7 @@ "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "dev": true, + "optional": true, "requires": { "is-finite": "^1.0.0" } @@ -3780,10 +4151,24 @@ "dev": true }, "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } }, "resolve-url": { "version": "0.2.1", @@ -3808,18 +4193,18 @@ "dev": true }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" }, "dependencies": { "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "dev": true, "requires": { "fs.realpath": "^1.0.0", @@ -3881,7 +4266,8 @@ "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==", - "dev": true + "dev": true, + "optional": true }, "semver-regex": { "version": "2.0.0", @@ -3944,7 +4330,8 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", - "dev": true + "dev": true, + "optional": true }, "slash": { "version": "1.0.0", @@ -4054,7 +4441,8 @@ }, "kind-of": { "version": "6.0.2", - "resolved": "", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", + "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true } } @@ -4118,6 +4506,7 @@ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", "dev": true, + "optional": true, "requires": { "spdx-license-ids": "^1.0.2" } @@ -4126,13 +4515,15 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=", - "dev": true + "dev": true, + "optional": true }, "spdx-license-ids": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=", - "dev": true + "dev": true, + "optional": true }, "split-string": { "version": "3.1.0", @@ -4268,6 +4659,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "dev": true, + "optional": true, "requires": { "is-utf8": "^0.2.0" } @@ -4294,6 +4686,7 @@ "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", "integrity": "sha1-DHlipq3vp7vUrDZkYKY4VSrhoKI=", "dev": true, + "optional": true, "requires": { "get-stdin": "^4.0.1" } @@ -4474,7 +4867,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", "integrity": "sha1-WIeWa7WCpFA6QetST301ARgVphM=", - "dev": true + "dev": true, + "optional": true }, "trim-repeated": { "version": "1.0.0", @@ -4531,6 +4925,12 @@ "through": "^2.3.8" } }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, "underscore.string": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.5.tgz", @@ -4661,11 +5061,21 @@ "dev": true, "optional": true }, + "v8flags": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", + "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, "validate-npm-package-license": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", "dev": true, + "optional": true, "requires": { "spdx-correct": "~1.0.0", "spdx-expression-parse": "~1.0.0" @@ -4692,7 +5102,6 @@ "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", "dev": true, - "optional": true, "requires": { "isexe": "^2.0.0" } diff --git a/docs/src/package.json b/docs/src/package.json index 74b05774e1..0436ffafa7 100644 --- a/docs/src/package.json +++ b/docs/src/package.json @@ -2,10 +2,10 @@ "name": "ace3", "version": "0.1.0", "dependencies": { - "lodash": "^4.17.19" + "lodash": "^4.17.21" }, "devDependencies": { - "grunt": "^1.0.4", + "grunt": "^1.3.0", "grunt-contrib-concat": "^1.0.1", "grunt-contrib-imagemin": "^3.1.0", "grunt-contrib-uglify": "^4.0.0", diff --git a/docs/team.md b/docs/team.md index 3846f7e1fe..5ea6fb7264 100644 --- a/docs/team.md +++ b/docs/team.md @@ -38,7 +38,7 @@ This lists all the maintainers responsible for project management and the overal - Coding, Performance, SME - [jokoho48](https://github.com/jokoho48){:target="_blank"} - Scripting, Model Editing / Import -- [SilentSpike](https://github.com/SilentSpike){:target="_blank"} +- [SilentSpike](https://github.com/kymckay){:target="_blank"} - Scripting, Config - [Ruthberg](https://github.com/ulteq){:target="_blank"} - Scripting, Config @@ -61,6 +61,7 @@ This lists all the maintainers responsible for project management and the overal - [mharis001](https://github.com/mharis001){:target="_blank"} - [Brandon (TCVM)](https://github.com/TheCandianVendingMachine){:target="_blank"} - [veteran29](https://github.com/veteran29){:target="_blank"} +- [Dahlgren](https://github.com/Dahlgren){:target="_blank"} ## Contributors diff --git a/docs/wiki/development/ace3-config-entries.md b/docs/wiki/development/ace3-config-entries.md index a11ec0499b..f018246a99 100644 --- a/docs/wiki/development/ace3-config-entries.md +++ b/docs/wiki/development/ace3-config-entries.md @@ -49,6 +49,7 @@ ace_recoil_shakemultiplier ace_overpressure_angle ace_overpressure_range ace_overpressure_damage +ace_overheating_closedbolt ace_overheating_dispersion ace_overheating_slowdownfactor ace_overheating_jamchance diff --git a/docs/wiki/development/arma-3-issues.md b/docs/wiki/development/arma-3-issues.md index 11c117b0bf..506bfde222 100644 --- a/docs/wiki/development/arma-3-issues.md +++ b/docs/wiki/development/arma-3-issues.md @@ -22,7 +22,6 @@ Keeping track of Arma 3 issues that need to be fixed. - [James2464: T82092: All Environment Rocks Should Have PhysX LODs](https://feedback.bistudio.com/T82092) - [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) -- [AgentRev: T80668: setObjectTextureGlobal causing "Cannot load texture" errors when used with valid mission files](https://feedback.bistudio.com/T80668) - [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) diff --git a/docs/wiki/development/coding-guidelines.md b/docs/wiki/development/coding-guidelines.md index 0d2fb64ed3..e3cbefc410 100644 --- a/docs/wiki/development/coding-guidelines.md +++ b/docs/wiki/development/coding-guidelines.md @@ -168,10 +168,18 @@ The family of path macros define global paths to files for use within a module. ## 3. Functions Functions shall be created in the `functions\` subdirectory, named `fnc_functionName.sqf` They shall then be indexed via the `PREP(functionName)` macro in the `XEH_preInit.sqf` file. -The `PREP` macro allows for CBA function caching, which drastically speeds up load times. **Beware though that function caching is enabled by default and as such to disable it you need to `#define DISABLE_COMPILE_CACHE` above your `#include "script_components.hpp"` include!** +The `PREP` macro allows for CBA function caching, which drastically speeds up load times. **Beware though that function caching is enabled by default and as such to disable it you need to `#define DISABLE_COMPILE_CACHE` above your `#include "script_component.hpp"` include!** -### 3.1 Headers -Every function should have a header of the following format as the start of their function file: +### 3.1 Includes +Every function includes the `script_component.hpp` file on the first line. Any additional includes or defines must be below this include. + +All code written must be below this include and any potential additional includes or defines. + +#### 3.1.1 Reasoning +This ensures every function starts off in an uniform way and enforces function documentation. The include appears before the header to avoid incorrect line numbers in script errors. + +### 3.2 Headers +Every function should have a header of the following format appear before any code: ```js /* @@ -196,15 +204,7 @@ Every function should have a header of the following format as the start of thei */ ``` -This is not the case for inline functions or functions not containing their own file. - -### 3.2 Includes -Every function includes the `script_component.hpp` file just below the function header. Any additional includes or defines must be below this include. - -All scripts written must be below this include and any potential additional includes or defines. - -#### 3.2.1 Reasoning -This ensures every function starts of in an uniform way and enforces function documentation. +This is not the case for inline functions or functions not contained in their own file. ## 4. Global Variables @@ -463,17 +463,17 @@ Good: ```js if (call FUNC(myCondition)) then { - private _areAllAboveTen = true; // <- smallest feasable scope + private _areAllAboveTen = true; // <- smallest feasable scope - { - if (_x >= 10) then { - _areAllAboveTen = false; - }; - } forEach _anArray; + { + if (_x >= 10) then { + _areAllAboveTen = false; + }; + } forEach _anArray; - if (_areAllAboveTen) then { - hint "all values are above ten!"; - }; + if (_areAllAboveTen) then { + hint "all values are above ten!"; + }; } ``` @@ -482,15 +482,15 @@ Bad: ```js private _areAllAboveTen = true; // <- this is bad, because it can be initialized in the if statement if (call FUNC(myCondition)) then { - { - if (_x >= 10) then { - _areAllAboveTen = false; - }; - } forEach _anArray; + { + if (_x >= 10) then { + _areAllAboveTen = false; + }; + } forEach _anArray; - if (_areAllAboveTen) then { - hint "all values are above ten!"; - }; + if (_areAllAboveTen) then { + hint "all values are above ten!"; + }; }; ``` @@ -575,8 +575,8 @@ Good: ```js fnc_example = { - params ["_content"]; - hint _content; + params ["_content"]; + hint _content; }; ``` @@ -719,7 +719,7 @@ _a pushBack _value; Also good: ```js -_a append [1,2,3]; +_a append [1, 2, 3]; ``` Bad: diff --git a/docs/wiki/development/merging-pull-requests.md b/docs/wiki/development/merging-pull-requests.md index 9b7d1022d4..9c853706d0 100644 --- a/docs/wiki/development/merging-pull-requests.md +++ b/docs/wiki/development/merging-pull-requests.md @@ -7,14 +7,17 @@ parent: wiki order: 5 --- -This page describes our process of how we merge pull requests. Whereas the main question is: Who's responsible for merging pull requests? +This page describes the process of how we merge pull requests. -All authors must add themselves to the AUTHORS.txt file **with a valid email address**. +All contributors may add themselves to the `AUTHORS.txt` file (email address optional) if they wish. +The `authors` array property in `config.cpp` files will generally contain the original component author(s) and is otherwise reserved for individuals who have contributed significantly to a component (decided at the discretion of the ACE team). Do not add yourself without consent. -#### Changes to Existing Addons +The `author` string property in `config.cpp` files will always contain the common ACE team string (`ECSTRING(common,ACETeam)`) to reflect component maintenance and keep things consistent. -The people responsible for merging changes to existing addons are the maintainers listed in the README.md file of the respective addon folder. +#### Merge Criteria + +All pull requests must receive approval from a maintainer and must pass all required continuous integration checks before they can be merged. If the changes consist of trivial updates, such as spelling or indentation fixes: @@ -27,8 +30,4 @@ If the changes consist of trivial updates, such as spelling or indentation fixes ...then the PR can be merged right away by one of the maintainers. -Non-trivial pull requests remain open for a minimum of 48 hours, to give all other contributors time to comment on potential issues, and are then merged by a maintainer, should no issues arise. - - -#### New Addons / Other Changes -If a pull request adds a new addon, or changes something else, like the README, everyone has 72 hours to comment on the changes. After that, one of the project leads will merge it. +Non-trivial pull requests should ideally be thouroughly reviewed by multiple maintainers or at least one maintainer highly familiar with any code modified. diff --git a/docs/wiki/development/setting-up-the-development-environment.md b/docs/wiki/development/setting-up-the-development-environment.md index 5a39f5fb1a..5c537ebd1c 100644 --- a/docs/wiki/development/setting-up-the-development-environment.md +++ b/docs/wiki/development/setting-up-the-development-environment.md @@ -17,9 +17,10 @@ This page describes how you can setup your development environment for ACE3, all - P-drive - Run Arma 3 and Arma 3 Tools directly from steam once to install registry entries (and again after every update) - [Python 3.x](https://www.python.org/) -- [Mikero Tools](https://mikero.bytex.digital/Downloads): DePbo, DeOgg, DeTex, Rapify, MakePbo, PboProject >=1.70 +- [Mikero Tools](https://mikero.bytex.digital/Downloads): DePbo, DeOgg, Rapify, MakePbo, PboProject >=1.70 - `*.hpp` removed from PboProject's "Exclude From Pbo" list - `-F rebuild RequiredAddons` disabled + - `-B Don't binarise cpp or sqm` enabled - Python, Mikero Tools and Git in PATH environment variable - [CBA](https://github.com/CBATeam/CBA_A3/releases/latest) mod (release or development version) diff --git a/docs/wiki/feature/fire.md b/docs/wiki/feature/fire.md new file mode 100644 index 0000000000..567a32b357 --- /dev/null +++ b/docs/wiki/feature/fire.md @@ -0,0 +1,35 @@ +--- +layout: wiki +title: Fire +description: Ignite things and people. +group: feature +category: realism +parent: wiki +mod: ace +version: + major: 3 + minor: 14 + patch: 0 +--- + +## 1. Overview + +This module implements the ability to light people and objects on fire, and have it spread. When enabled alongside Vehicle Damage, cooking off vehicle will ignite its occupants. + +Fire will burn you and cause intense pain. If on fire, you can stop, drop, and roll to try and extinguish it. When in rain or under water you are put out quicker. This also adds an interaction to pat people out if they are on fire + +## 2. Addon Options + +### 2.1 Enable + +- Enables/Disables the fire simulation +- Default: On + +### 2.2 Creates fire-flare at night + +- Enables/Disables whether or not to spawn a flare-light on the person on fire. Can be a bit gaudy at night +- Default: Off + +## 4. Dependencies + +{% include dependencies_list.md component="vehicle_damage" %} diff --git a/docs/wiki/feature/medical-system.md b/docs/wiki/feature/medical-system.md index 3b07830388..67c239b92a 100644 --- a/docs/wiki/feature/medical-system.md +++ b/docs/wiki/feature/medical-system.md @@ -211,7 +211,7 @@ force ace_medical_fractures = 0; // Disabled Fractures force ace_medical_limping = 0; // Disabled Limping force ace_medical_statemachine_fatalInjuriesPlayer = 2; // Disabled fatal injuries by damage to head or torso force ace_medical_treatment_advancedBandages = 0; // Disabled advanced bandages -force ace_medical_treatment_advancedDiagnose = false; // Disabled advanced diagnose +force ace_medical_treatment_advancedDiagnose = 0; // Disabled advanced diagnose force ace_medical_treatment_advancedMedication = false; // Disabled advanced medication ``` @@ -224,7 +224,7 @@ force ace_medical_spontaneousWakeUpChance = 0.15; // 15% chance of waking up fro force ace_medical_spontaneousWakeUpEpinephrineBoost = 1; // Epinephrine boosts wake up chance force ace_medical_statemachine_fatalInjuriesPlayer = 1; // Fatal injuries only occur in Cardiac Arrest force ace_medical_treatment_advancedBandages = 2; // Wounds can re-open until stitched. -force ace_medical_treatment_advancedDiagnose = true; // Enabled Advanced Diagnosis +force ace_medical_treatment_advancedDiagnose = 1; // Enabled Advanced Diagnosis force ace_medical_treatment_advancedMedication = true; // Enabled Advanced Medication force ace_medical_treatment_allowSelfIV = 1; // Medics can Self-IV force ace_medical_treatment_allowSelfPAK = 1; // Medics can Self-PAK diff --git a/docs/wiki/feature/overheating.md b/docs/wiki/feature/overheating.md index 3739b2aa52..871d006322 100644 --- a/docs/wiki/feature/overheating.md +++ b/docs/wiki/feature/overheating.md @@ -15,27 +15,40 @@ version: ## 1. Overview ### 1.1 Weapon Jamming -Adds a probability to jam a weapon when firing. Jams can be cleared by reloading or by using the clear jam-key. + +Adds a probability to jam a weapon when firing. The hotter a weapon gets, the more likely a jam is to occur. ### 1.2 Temperature simulation -Introduces weapon temperature simulation depending on weapon and bullet mass. Hot weapons are more prone to jamming. Depending on weapon type the accuracy and in extreme cases the muzzle velocity might be reduced on high temperatures. Adds smoke puff and heat refraction effects to indicate this. -### 1.3 Spare barrels -Adds the ability to changes barrels on machine guns to compensate for those effects. +Introduces weapon temperature simulation depending on weapon and bullet mass. Hot weapons are more prone to jamming and will have an increase in their cyclic rate of fire. Depending on weapon type the accuracy and in extreme cases the muzzle velocity might be reduced on high temperatures. Adds smoke puff and heat refraction effects to indicate this. +### 1.3 Cookoff + +Hot weapons can also cause chambered ammunition to spontaneously ignite. The higher the temperature of the weapon the sooner a cookoff can happen. Open bolt weapons (most machineguns) cannot cookoff unless jammed. Jammed weapons will not cookoff unless the jam is a failure to fire. + +### 1.4 Spare barrels + +Adds the ability to change barrels on machine guns to compensate for those effects. When a barrel is changed, the coolest barrel available is always selected. ## 2. Usage ### 2.1 Clearing a jammed weapon -- To clear a jammed weapon, press SHIFT + R (ACE3 default key bind `Clear jam`). + +Jams can be cleared in the following ways: +- Press SHIFT + R (ACE3 default key bind `Clear jam`). +- Press self interaction Ctrl + ⊞ Win (ACE3 default key bind `Self Interaction Key`), select `Equipment`, select 'Clear Jam' +- Reload (setting dependant) +- Swap barrels (setting dependant) ### 2.2 Swapping barrels + - For this you need a `Spare barrel` and a compatible weapon. - Press self interaction Ctrl + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Equipment`. - Select `Swap barrel`. ### 2.3 Checking your barrel temperature + - Press self interaction Ctrl + ⊞ Win. - Select `Equipment`. - Select `Check weapon temperature`. @@ -43,6 +56,18 @@ Adds the ability to changes barrels on machine guns to compensate for those effe **NOTE** When the bar is half full (yellow) it means the barrel is around 500°c. Your weapon will be even more prone to jams, and it'll get worse if you don't let the barrel cool down or swap it. +### 2.4 Cooling your weapon + +- Weapons and spare barrels will cool off over time. +- Cooling speed of weapons in increased in windy or rainy weather, and when swimming. +- If AceX Field Rations is loaded then weapons can be cooled with canteens, water bottles, or other beverage items. This does not require the Field Rations system to be enabled. +- If AceX Field Rations is enabled then weapons can also be cooled with the same water sources used to refill canteens and water bottles. + +### 2.5 Avoiding cookoffs + +- After a firefight unload closed bolt firearms (most rifles) until the barrel temperature has gone down to less than 180°C (two sections or less on the bar). +- Clear failure to fire jams quickly + ## 3. Dependencies {% include dependencies_list.md component="overheating" %} diff --git a/docs/wiki/feature/vehicledamage.md b/docs/wiki/feature/vehicledamage.md new file mode 100644 index 0000000000..6ec910e14b --- /dev/null +++ b/docs/wiki/feature/vehicledamage.md @@ -0,0 +1,138 @@ +--- +layout: wiki +title: Vehicle Damage +description: Enhances vanilla armoured vehicle damage simulation. +group: feature +category: realism +parent: wiki +mod: ace +version: + major: 3 + minor: 14 + patch: 0 +--- + +## 1. Overview + +Removes hit-point based damage on armoured vehicles. + +### 1.1 Differences from vanilla + +Vehicle damage is component based in this system. Rather than catastrophically exploding when an arbitrary amount of damage is recieved, the system calculates what warhead hit you, if it hit SLAT/ERA, and what components it hits. +When you are hit, a calculation takes place and determines which people inside the vehicle should get hurt. + +### 1.2 How is damage calculated + +Damage takes into account what warhead hits you, the speed it hits you at, and how much armour it hit. + +If you are hit with a HEAT warhead, the system will check if you hit any ERA or SLAT armour and if so it negates all damage from hitting your vehicle and instead the component absorbs it. +Once the SLAT or ERA is destroyed, if hit again in the same spot the warhead will penetrate. Tandem HEAT will penetrate and destroy the armour, however. AP ammo has a chance to destroy it. + +All ammunition shot at a vehicle is considered into the calculation. If the ammo is incendiary and it penetrates into a vital component there is a chance for cook-off to occur. + +At the time of writing, blow-out panels are not simulated within the system. + +### 1.3 What components are considered + +- Engine +- Hull +- Turret +- Gun barrel +- Track +- Wheels +- Fuel Tank +- SLAT +- ERA + +### 1.4 What warheads are considered + +- AP (General AP ammo: APFSDS, Solid Shot, etc.) +- HEAT +- HEAT (Tandem) +- HE + +## 2. Component Overview + +### 2.1 Engine + +The engine drives the vehicle. If the engine takes a critical hit, it will be destroyed and the vehicle will become immobile. + +- Can cook-off [Y] +- Can injure occupants [Y] + +### 2.2 Hull + +The hull is a hitpoint that is simulated to be a crew compartment. If you penetrate the hull there is a chance for occupants to take damage. Hits on the hull can also fragment and take out other components, like the turret and engine. + +- Can cook-off [Y] +- Can injure occupants [Y] + +### 2.3 Turret + +The turret is assumed to house the ammo racks and hydraulics/electronics that control turret movement. On turret hit there is a chance for the turret to jam requiring further repair. + +- Can cook-off [Y] +- Can injure occupants [Y] + +### 2.4 Gun barrel + +The gun barrel is the barrel for any weapon on the vehicle. If hit, there is a chance for the barrel to be broken requiring further repair to shoot and traverse. + +- Can cook-off [N] +- Can injure occupants [N] + +### 2.5 Track + +A track on the vehicle. If hit, the track can break and immobilise the vehicle. + +- Can cook-off [N] +- Can injure occupants [N] + +### 2.6 Wheels + +A wheel on the vehicle. If hit, the wheel can break and immobilise the vehicle. + +- Can cook-off [N] +- Can injure occupants [N] + +### 2.7 Fuel Tank + +When hit, the fuel tank will leak fuel and require repair to hold fuel again. + +- Can cook-off [Y] +- Can injure occupants [N] + +### 2.8 SLAT + +When hit, HEAT warheads will be defeated and no damage will be applied. If hit with Tandem HEAT or HE the SLAT will be destroyed. If hit with AP, there is a small chance for SLAT to be damaged. + +- Can cook-off [N] +- Can injure occupants [N] + +### 2.9 ERA + +When hit, HEAT warheads will be defeated and no damage will be applied. If hit with AP, Tandem HEAT, or HE the ERA will be destroyed. + +- Can cook-off [N] +- Can injure occupants [N] + +## 3. Addon Options + +### 3.1 Enable + +- Enables/Disables the vehicle damage simulation +- Default: On + +### 3.2 Enable/Disable Ammo Removal During Cook-Off + +- Enables/Disables whether or not vehicle ammo will be fully removed upon cooking-off +- Default: On + +### 3.3 Enable/Disable advanced car damage (Experimental) + +- Enable experimental car damage. System will apply vehicle damage simulation to "car" types (trucks, SUVs, Humvees, etc.). Not fully tested and could be immbalanced causing weird behaviours. +- Default: Off + +## 4. Dependencies + +{% include dependencies_list.md component="vehicle_damage" %} diff --git a/docs/wiki/framework/advanced-throwing-framework.md b/docs/wiki/framework/advanced-throwing-framework.md new file mode 100644 index 0000000000..925b9c9779 --- /dev/null +++ b/docs/wiki/framework/advanced-throwing-framework.md @@ -0,0 +1,20 @@ +--- +layout: wiki +title: Advanced Throwing Framework +description: Explains how to interact with the Advanced Throwing API. +group: framework +parent: wiki +mod: ace +version: + major: 3 + minor: 7 + patch: 0 +--- + +## 1. Disabling pick up of ammo attached to an object + +Pick-up interaction can be disabled for ammo (e.g. chemlights) attached to an object. + +```js +OBJECT setVariable ["ace_advanced_throwing_disablePickUp", true, true]; +``` diff --git a/docs/wiki/framework/arsenal-framework.md b/docs/wiki/framework/arsenal-framework.md index 9f5803a7f4..ed04c13962 100644 --- a/docs/wiki/framework/arsenal-framework.md +++ b/docs/wiki/framework/arsenal-framework.md @@ -317,6 +317,7 @@ All are local. | ace_arsenal_rightPanelFilled | Arsenal display (DISPLAY), current left panel IDC (SCALAR), current right panel IDC (SCALAR) | | ace_arsenal_onLoadoutSave | Loadout index (SCALAR), [loadout name (STRING), loadout data (ARRAY)] | | ace_arsenal_onLoadoutLoad | loadout data (ARRAY), loadout name (STRING) | +| ace_arsenal_onLoadoutDelete | loadout name (STRING) | | ace_arsenal_loadoutShared | Loadouts list listnBox control (CONTROL),, [loadout author (STRING), loadout name (STRING), loadout data (ARRAY)] | | ace_arsenal_loadoutUnshared | Loadouts list listnBox control (CONTROL), loadout name (STRING) | | ace_arsenal_cargoChanged | Arsenal display (DISPLAY), item (STRING), add or remove (BOOL), shiftState (BOOL) | diff --git a/docs/wiki/framework/crew-served-weapons-framework.md b/docs/wiki/framework/crew-served-weapons-framework.md index 3f64b09587..9b3ef28d4f 100644 --- a/docs/wiki/framework/crew-served-weapons-framework.md +++ b/docs/wiki/framework/crew-served-weapons-framework.md @@ -14,133 +14,176 @@ version: ## 1. Making a new Crew Served Weapon -### 1.1 CfgVehicles +To convert a static weapon into a crew served weapon, you need to create the following: -```cpp -class CfgVehicles { - class LandVehicle; - class StaticWeapon: LandVehicle { - class ACE_Actions; - }; - class StaticMGWeapon: StaticWeapon { - class Turrets { - class MainTurret; - }; - class ACE_Actions: ACE_Actions { - class ACE_MainActions; - }; - }; - class banana_csw: StaticMGWeapon { - class ace_csw { - enabled = 1; // whether or not the weapon is affected by CSW - proxyWeapon = QGVAR(HMG_Static); // The weapon that will be added to the CSW on initialization. Used to ensure lower ammo-reload time when using Ammo Handling - magazineLocation = "_target selectionPosition 'magazine'"; // The location of the magazine. Where the action for ammo-handling will appear on the weapon - disassembleWeapon = QGVAR(staticHMGCarry); // What the weapon will disassemble to - disassembleTurret = QGVAR(m3TripodLow); // Which tripod will appear when weapon has been disassembled - ammoLoadTime = 7; // How long it takes in seconds to load ammo into the weapon - ammoUnloadTime = 5; // How long it takes in seconds to unload ammo from the weapon - desiredAmmo = 69; // When the weapon is reloaded it will try and reload to this ammo capacity - disassembleFunc = "myCoolFunction.sqf"; // A callback function for when the CSW gets disassembled. Arguments: [tripod, staticWeapon] - }; - }; -}; -``` +- A proxy weapon +- A carryable weapon that can be mounted on a tripod +- Carryable weapon magazines +- The CSW config in the static weapon -### 1.2 CfgMagazines +For the following examples, we are going to assume you are modifying your existing static weapon named `prefix_hmg` and that you are using the same prefix. If you are making a compatibility patch for a third party mod, you should use your own prefix. Do not use `ace` as your prefix. -```cpp -class CfgMagazines { - class 100Rnd_127x99_mag; // Example magazine used - does not have to be this - class banana_ammo: 100Rnd_127x99_mag { - scope=2; // Needs to be 2 to make sure it shows up in Arsenal - type=256; // Must be 256 to show up in Arsenal - count = 100; // How much ammo gets added per "Load Ammo" selection - model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d"; // default ammo box model - //ace_isbelt = 1; // Needed if your magazine has belt linking - }; -}; -``` +### 1.1 Proxy Weapon -### 1.3 CfgWeapons +Because the magazine loading time is already handled by the ACE interaction, a proxy weapon with a very low loading time is used. It automatically replaces the default weapon of the turret when CSW is enabled. ```cpp class CfgWeapons { - class Launcher_Base_F; - class banana_carry_weapon: Launcher_Base_F { - class ACE_CSW { - type = "weapon"; // What type of carry it is. Must always be "weapon" for the carry weapon - deployTime = 4; // How long it takes to deploy the weapon onto the tripod - pickupTime = 4; // How long it takes to disassemble weapon from the tripod - class assembleTo { - ace_csw_m3Tripod = "banana_csw_mod1"; // What tripod can this weapon deploy onto, and what vehicle will it spawn when it is deployed - banana_tripod = "banana_csw"; - }; - }; - }; - - class HMG_Static; - class banana_proxy_weapon: HMG_Static { - magazineReloadTime = 0.5; // Proxy weapons are spawned onto the CSW when it is assembled. Because ammo loading times use defined values in the magazine, this number needs to be low to ensure low latency + class prefix_hmg_weapon; + class prefix_hmg_weapon_proxy: prefix_hmg_weapon { + magazineReloadTime = 0.5; }; }; ``` -### 1.4 CfgMagazineGroups +### 1.2 Carryable Weapon + +Carried CSW weapons are technically rocket launchers. This allows the player to carry both a CSW weapon and a backpack with magazines for the CSW. ```cpp - class ace_csw_groups { // Ammo that can be loaded into this CSW - class banana_ammo { // The magazine which the player can place into their inventory - banana_dummy_ammo = 1; // Magazine that is loaded into the weapon as per CfgWeapons >> weapon >> magazines - }; - - // Optional - class ace_csw_100Rnd_127x99_mag { // default magazine that CSW already implements - banana_dummy_ammo = 1; - }; - - /* - Ammo types already defined by CSW: - - ace_csw_100Rnd_127x99_mag - - ace_csw_100Rnd_127x99_mag_red - - ace_csw_100Rnd_127x99_mag_green - - ace_csw_100Rnd_127x99_mag_yellow - - ace_csw_50Rnd_127x108_mag - - ace_csw_20Rnd_20mm_G_belt - - ACE_1Rnd_82mm_Mo_HE - - ACE_1Rnd_82mm_Mo_Smoke - - ACE_1Rnd_82mm_Mo_Illum - - ACE_1Rnd_82mm_Mo_HE_Guided - - ACE_1Rnd_82mm_Mo_HE_LaserGuided - - Titan_AT - - Titan_AA - */ +class CfgWeapons { + class Launcher; + class Launcher_Base_F: Launcher { + class WeaponSlotsInfo; }; + + class prefix_hmg_carry: Launcher_Base_F { + // displayName, author, model and picture are omitted and up to you + scope = 2; + modes[] = {}; + + class ACE_CSW { + type = "weapon"; // Use "weapon" for weapons or "mount" for tripods - see below + deployTime = 4; // How long it takes to deploy the weapon onto the tripod + pickupTime = 4; // How long it takes to disassemble weapon from the tripod + class assembleTo { + // What tripod can this weapon deploy onto, and what vehicle will it spawn when it is deployed + ace_csw_m3Tripod = "prefix_hmg"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + // One WeaponSlot with a positive value for iconScale forces game to use icon overlay method + // Required, because the inventory icon has no accessory variants + class MuzzleSlot { + iconScale = 0.1; + }; + + // Don't forget to set mass to a reasonable value + // We use mass in pounds * 10 + mass = 840; // 84 lb / 38 kg + }; + }; +}; +``` + +### 1.3 Carryable Magazines + +Vehicle magazines usually don't have inventory pictures or a 3D model. Because of this, carryable magazines need to be created for the CSW. If one of the existing CSW magazines or an infantry weapon magazine would fit your weapon, you don't need to create another magazine. Using one of the existing CSW magazines is preferred to prevent confusing players and mission makers. + +```cpp +class CfgMagazines { + class prefix_100rnd_hmg_mag; + class prefix_100rnd_hmg_csw_mag: prefix_100rnd_hmg_mag { + scope = 2; + type = 256; // Must be 256 to show up in Arsenal + count = 100; + model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d"; + ACE_isBelt = 1; // Enables belt linking for this magazine + }; +}; +``` + +ACE converts the carryable magazines to the vehicle magazines when loading them. To enable this conversion, the ACE_CSW_Groups config needs to be extended. + +```cpp +class ACE_CSW_Groups { + // Using a custom carryable magazine + class prefix_100rnd_hmg_csw_mag { // Same name as the carryable magazine + prefix_100rnd_hmg_mag = 1; // Vehicle magazine that will be loaded when loading this magazine + }; + + // Using an existing CSW magazine + class ace_csw_100Rnd_127x99_mag { + banana_dummy_ammo = 1; + }; + + /* + Carryable magazines already defined by ACE: + - ace_csw_100Rnd_127x99_mag + - ace_csw_100Rnd_127x99_mag_red + - ace_csw_100Rnd_127x99_mag_green + - ace_csw_100Rnd_127x99_mag_yellow + - ace_csw_50Rnd_127x108_mag + - ace_csw_20Rnd_20mm_G_belt + - ace_1Rnd_82mm_Mo_HE + - ace_1Rnd_82mm_Mo_Smoke + - ace_1Rnd_82mm_Mo_Illum + - ace_1Rnd_82mm_Mo_HE_Guided + - ace_1Rnd_82mm_Mo_HE_LaserGuided + */ +}; +``` + +### 1.4 CSW Config + +The final step is to let ACE know how to disassemble and load the static weapon. + +```cpp +class CfgVehicles { + class StaticMGWeapon; + class prefix_hmg: StaticMGWeapon { + class ACE_CSW { + enabled = 1; // Enables ACE CSW for this weapon + proxyWeapon = "prefix_hmg_weapon_proxy"; // The proxy weapon created above + magazineLocation = "_target selectionPosition 'magazine'"; // Ammo handling interaction point location + disassembleWeapon = "prefix_hmg_carry"; // Carryable weapon created above + disassembleTurret = "ace_csw_m3Tripod"; // Which static tripod will appear when weapon is disassembled + ammoLoadTime = 7; // How long it takes in seconds to load ammo into the weapon + ammoUnloadTime = 5; // How long it takes in seconds to unload ammo from the weapon + desiredAmmo = 100; // When the weapon is reloaded it will try and reload to this ammo capacity + // Optional callback function for when the CSW gets disassembled, called with [tripod, staticWeapon] + disassembleFunc = "prefix_fnc_handleDisassembly"; + }; + }; +}; ``` ## 2. Making a new Tripod -### 2.1 CfgVehicles +If none of the existing ACE tripods fit your weapon, you can create your own. Creating a tripod is similar to creating a crew served weapon and consists of two parts: -```cpp -class CfgVehicles { - class ace_csw_baseTripod; - class banana_tripod: ace_csw_baseTripod { - class ace_csw { disassembleTo = "banana_carry_tripod"; }; // What will be spawned when "Pickup Tripod" is selected - }; -}; -``` +- A carryable tripod +- A placeable static tripod -### 2.2 CfgWeapons +### 2.2 Carryable Tripod + +Creating the carryable tripod is similar to [creating a carryable weapon](#12-carryable-weapon). The config besides the `ACE_CSW` class has been omitted for brevity and is the same as above. ```cpp class CfgWeapons { class Launcher_Base_F; - class banana_carry_tripod: Launcher_Base_F { + class prefix_tripod_carry: Launcher_Base_F { class ACE_CSW { - type = "mount"; // What type of carry it is. Must always be "mount" for the tripod + type = "mount"; // Use "mount" for tripods deployTime = 4; // How long it takes to deploy the tripod - pickupTime = 4; // How long it takes to pickup the tripod - deploy = "banana_tripod"; // what vehicle will spawn when the tripod is deployed + pickupTime = 4; // How long it takes to disassemble the tripod + deploy = "prefix_tripod"; // what vehicle will spawn when the tripod is deployed + }; + }; +}; +``` + +### 2.1 CfgVehicles + +When deploying a tripod, a static vehicle is spawned to mount weapons onto. Make sure this vehicles interaction point is in a suitable position. + +```cpp +class CfgVehicles { + class ace_csw_baseTripod; + class prefix_tripod: ace_csw_baseTripod { + class ACE_CSW { + disassembleTo = "prefix_tripod_carry"; }; }; }; diff --git a/docs/wiki/framework/dragging-framework.md b/docs/wiki/framework/dragging-framework.md index 962e6af1d4..800b52539b 100644 --- a/docs/wiki/framework/dragging-framework.md +++ b/docs/wiki/framework/dragging-framework.md @@ -19,13 +19,13 @@ class CfgVehicles { class MyVehicle { // Dragging ace_dragging_canDrag = 1; // Can be dragged (0-no, 1-yes) - ace_dragging_dragPosition[] = {0, 1.2, 0}; // Offset of the model from the body while dragging (same as attachTo) - ace_dragging_dragDirection = 0; // Model direction while dragging (same as setDir after attachTo) + ace_dragging_dragPosition[] = {0, 1.2, 0}; // Offset of the model from the body while dragging (same as attachTo) (default: [0, 1.5, 0]) + ace_dragging_dragDirection = 0; // Model direction while dragging (same as setDir after attachTo) (default: 0) // Carrying ace_dragging_canCarry = 1; // Can be carried (0-no, 1-yes) - ace_dragging_carryPosition[] = {0, 1.2, 0}; // Offset of the model from the body while dragging (same as attachTo) - ace_dragging_carryDirection = 0; // Model direction while dragging (same as setDir after attachTo) + ace_dragging_carryPosition[] = {0, 1.2, 0}; // Offset of the model from the body while dragging (same as attachTo) (default: [0, 1, 1]) + ace_dragging_carryDirection = 0; // Model direction while dragging (same as setDir after attachTo) (default: 0) }; }; ``` @@ -48,7 +48,7 @@ You will **not** be able to carry / drag objects that are too heavy, the mass is ---| --------- | ---- | ------------------------ 0 | Any object | Object | Required 1 | Enable dragging, true to enable, false to disable | Boolean | Required -2 | Position to offset the object from player | Array | Optional (default: `[0, 0, 0]`) +2 | Position to offset the object from player | Array | Optional (default: `[0, 1.5, 0]`) 3 | Direction in degree to rotate the object | Number | Optional (default: `0`) **R** | None | None | Return value diff --git a/docs/wiki/framework/events-framework.md b/docs/wiki/framework/events-framework.md index 30feada6cf..abaa06f4a7 100644 --- a/docs/wiki/framework/events-framework.md +++ b/docs/wiki/framework/events-framework.md @@ -37,7 +37,9 @@ The vehicle events will also have the following local variables available `_gunn |----------|---------|---------|---------|---------|---------| |`ace_unconscious` | [_unit, _state(BOOL)] | Global | Listen | Unit's unconscious state changed |`ace_placedInBodyBag` | [_target, _bodyBag] | Global | Listen | Target placed into a bodybag Note: (Target will soon be deleted) -|`ace_treatmentSucceded` | [_caller, _target, _selectionName, _className] | Local | Listen | Treatment action is completed (local on the _caller) +|`ace_treatmentStarted` | [_caller, _target, _selectionName, _className, _itemUser, _usedItem] | Local | Listen | Treatment action has started (local on the _caller) +|`ace_treatmentSucceded` | [_caller, _target, _selectionName, _className, _itemUser, _usedItem] | Local | Listen | Treatment action is completed (local on the _caller) +|`ace_treatmentFailed` | [_caller, _target, _selectionName, _className, _itemUser, _usedItem] | Local | Listen | Treatment action has been interrupted (local on the _caller) ### 2.3 Interaction Menu (`ace_interact_menu`) MenuType: 0 = Interaction, 1 = Self Interaction @@ -60,7 +62,7 @@ MenuType: 0 = Interaction, 1 = Self Interaction | Event Key | Parameters | Locality | Type | Description | |----------|---------|---------|---------|---------|---------| -|`ace_captiveStatusChanged` | [_unit, _state(BOOL), _reason ("SetHandcuffed" or "SetSurrendered")] | Global | Listen | Unit's captivity state changed +|`ace_captiveStatusChanged` | [_unit, _state(BOOL), _reason ("SetHandcuffed" or "SetSurrendered"), _caller] | Global | Listen | Unit's captivity state changed |`ace_captives_setSurrendered` | [_unit, _state(BOOL)] | Target | Callable | Sets a unit to either start or stop surrendering |`ace_captives_setHandcuffed` | [_unit, _state(BOOL)] | Target | Callable | Sets a unit to either start or stop being handcuffed @@ -81,7 +83,9 @@ MenuType: 0 = Interaction, 1 = Self Interaction | Event Key | Parameters | Locality | Type | Description | |----------|---------|---------|---------|---------|---------| +|`ace_allowDefuse` | [_mine, _allow] | Global or Target | Callable | Set allowance of the dynamic defusal action on a mine |`ace_tripflareTriggered` | [_flareObject, [_posX, _posY, _posZ]] | Global | Listen | Tripflare triggered +|`ace_explosives_clackerAdded` | [_unit, _explosive, _id] | Local | Listen | Clacker added to explosive ### 2.9 Logistics Wirecutter (`ace_logistics`) @@ -105,6 +109,14 @@ MenuType: 0 = Interaction, 1 = Self Interaction |`ace_cookoff_cookOffBox` | _box | Global | Listen | Ammo box cook off has started |`ace_cookoff_engineFire` | _vehicle | Global | Listen | Engine fire has started + +### 2.11 Attach (`ace_attach`) + +| Event Key | Parameters | Locality | Type | Description | +|----------|---------|---------|---------|---------|---------| +|`ace_attach_attached` | [_attachedObject, _itemClassname, _temporary] | Local | Listen | After an item was attached to a unit/vehicle. _temporary flag means a item is being re-attached after the player exits a vehicle +|`ace_attach_detaching` | [_attachedObject, _itemName, _temporary] | Local | Listen | Just before an item gets detached/removed from a unit/vehicle. _temporary flag means its detached because the player unit entered a vehicle. + ## 3. Usage Also Reference [CBA Events System](https://github.com/CBATeam/CBA_A3/wiki/Custom-Events-System){:target="_blank"} documentation. diff --git a/docs/wiki/framework/fire-framework.md b/docs/wiki/framework/fire-framework.md new file mode 100644 index 0000000000..2236c5a1c8 --- /dev/null +++ b/docs/wiki/framework/fire-framework.md @@ -0,0 +1,39 @@ +--- +layout: wiki +title: Fire Framework +description: Explains how to ignite thing using CBA events. +group: framework +order: 5 +parent: wiki +mod: ace +version: + major: 3 + minor: 14 + patch: 0 +--- + + +## 1. Events + +Use `CBA_fnc_serverEvent` to use the following features. Events are defined only on the server in the system. + +### 1.1 Adding a new fire source + +`ace_fire_addFireSource` + + | Arguments | Type | Optional (default value) +---| --------- | ---- | ------------------------ +0 | Source of flame | Object/Position ASL | Required +1 | Radius of fire | Number | Required +2 | Intensity of fire (1, 10] | Number | Required +3 | Fire source ID | Any | Required +4 | Condition to stop fire | Code | Optional (default: `{ true }`) +5 | Arguments to pass to condition | Any | Optional (default: `[]`) + +### 1.2 Removing fire source + +`ace_fire_removeFireSource` + + | Arguments | Type | Optional (default value) +---| --------- | ---- | ------------------------ +0 | Fire source ID | Any | Required diff --git a/docs/wiki/framework/overheating-framework.md b/docs/wiki/framework/overheating-framework.md index d714f4d854..5af0079af5 100644 --- a/docs/wiki/framework/overheating-framework.md +++ b/docs/wiki/framework/overheating-framework.md @@ -18,16 +18,28 @@ version: ```cpp class CfgWeapons { - class MyMG { + class Rifle_Long_Base_F ; + + class MyMG : Rifle_Long_Base_F { ace_overheating_mrbs = 3000; //Mean Rounds Between Stoppages (this will be scaled based on the barrel temp) - ace_overheating_slowdownFactor = 1; //Slowdown Factor (this will be scaled based on the barrel temp) + ace_overheating_slowdownFactor = 1; //Slowdown Factor, reduces the velocity of the projectile (this will be scaled based on the barrel temp) ace_overheating_allowSwapBarrel = 1; // 1 to enable barrel swap. 0 to disable. Meant for machine guns where you can easily swap the barrel without dismantling the whole weapon. - ace_overheating_dispersion = 0.75; //Dispersion Factor (this will be scaled based on the barrel temp) + ace_overheating_dispersion = 0.75; //Dispersion Factor, increases the dispersion of the projectile (this will be scaled based on the barrel temp) }; }; ``` -### 1.2 Custom jam clearing animation +### 1.2 Custom jam types + +```cpp +class CfgWeapons { + class Pistol_Base_F; + class MyRevolver: Pistol_Base_F { + ace_overheating_jamTypesAllowed[] = {"Fire", "Dud"}; // Allowed and default values are ["Eject", "Extract", "Feed", "Fire", "Dud"]. In the example here a revolver does not eject, extract, or feed on each shot so those values are removed. + }; +}; +``` +### 1.3 Custom jam clearing animation ```cpp class CfgWeapons { @@ -36,3 +48,19 @@ class CfgWeapons { }; }; ``` + +### 1.4 Cook Off + +```cpp +class CfgWeapons { + class Rifle_Long_Base_F ; + + class MySniper: Rifle_Long_Base_F { + ace_overheating_closedBolt = 1; // Closed bolt, can cook off from barrel heat. + }; + + class MyMG: Rifle_Long_Base_F { + ace_overheating_closedBolt = 0; // Open bolt, can only cook off on failure to fire type jams. + }; +}; +``` diff --git a/docs/wiki/framework/parachute-framework.md b/docs/wiki/framework/parachute-framework.md index 37e522d055..b92e03b023 100644 --- a/docs/wiki/framework/parachute-framework.md +++ b/docs/wiki/framework/parachute-framework.md @@ -16,9 +16,21 @@ version: ```cpp class CfgVehicles { - class BananaParachute { + class ParachuteBase; + class BananaParachute: ParachuteBase { ace_hasReserveParachute = 1; // Add reserve parachute (1-enabled, 0-disabled) ace_reserveParachute = "ACE_ReserveParachute"; // Classname of the reserve parachute }; }; ``` + +## 2. Adding failure cut delay + +```cpp +class CfgVehicles { + class ParachuteBase; + class BananaParachute: ParachuteBase { + ace_parachute_failureDelay = 2; // Add delay before parachute fails (time in seconds) + }; +}; +``` diff --git a/docs/wiki/framework/slideshow-framework.md b/docs/wiki/framework/slideshow-framework.md index 2859252670..ef1d7062fd 100644 --- a/docs/wiki/framework/slideshow-framework.md +++ b/docs/wiki/framework/slideshow-framework.md @@ -25,11 +25,6 @@ Important notes: - You can have multiple sets of images on different screens by using multiple modules/function calls. - It is advisable images resolution sizes are powers of 2 (eg. 512x512) to avoid graphical glitches in them. -
-
Note:
-

Mission MUST be in a PBO format (not bare folder) when used on a dedicated server with slideshow images inside a mission due to an issue to prevent errors.

-
- ## 2. Scripting diff --git a/docs/wiki/framework/vehicledamage-framework.md b/docs/wiki/framework/vehicledamage-framework.md new file mode 100644 index 0000000000..c4b86e209f --- /dev/null +++ b/docs/wiki/framework/vehicledamage-framework.md @@ -0,0 +1,128 @@ +--- +layout: wiki +title: Vehicle Damage Framework +description: Explains how to configure vehicles to simulate vehicle damage. +group: framework +order: 5 +parent: wiki +mod: ace +version: + major: 3 + minor: 14 + patch: 0 +--- + +## 1. CfgVehicles + +### 1.1 Config Values + +The only configuration needed for vehicles are their probabilities to cook-off/detonate upon being penetrated. +These values are dice-rolls within system, tweak to get better feeling effects. + +All values in range [0, 1] unless specified otherwise + +#### 1.1.1 `ace_vehicle_damage_hullDetonationProb` + +The probability for the vehicle to detonate ammunition upon its hull being penetrated + +Default: 0.2 + +#### 1.1.2 `ace_vehicle_damage_turretDetonationProb` + +The probability for the vehicle to detonate ammunition upon its turret being penetrated + +Default: 0.2 + +#### 1.1.3 `ace_vehicle_damage_engineDetonationProb` + +The probability for the vehicle to detonate ammunition upon its turret being penetrated + +Default: 0.2 + +#### 1.1.4 `ace_vehicle_damage_hullFireProb` + +The probability for the vehicle to catch on fire upon its hull being penetrated + +Default: 0.5 + +#### 1.1.5 `ace_vehicle_damage_turretFireProb` + +The probabilitiy for the vehicle to catch on fire upon its turret being penetrated + +Default: 0.2 + +#### 1.1.6 `ace_vehicle_damage_engineFireProb` + +The probability for the vehicle to catch on fire upon its engine being penetrated + +Default: 0.5 + +#### 1.1.7 `ace_vehicle_damage_detonationDuringFireProb` + +The probabilitiy for the vehicle to detonate ammunition while its on fire + +Default: 0.2 + +#### 1.1.8 `ace_vehicle_damage_canHaveFireRing` + +Whether or not this vehicle can spawn `ring-of-fire` effect (Boolean value: 0 or 1) + +Default: 0 + +#### 1.1.9 `ace_vehicle_damage_slatHitpoints` + +An array of all hitpoints that are defined to be SLAT. String array + +Default: {} + +#### 1.1.10 `ace_vehicle_damage_eraHitpoints` + +An array of all hitpoints that are defined to be ERA. String array + +Default: {} + +#### 1.1.11 `ace_vehicle_damage_turret` + +String for turret classname to spawn when catastrophically destroyed. Turret will pop-off and this is the class spawned + +Default: "" + +### 1.2 Defined Hitpoints + +#### 1.2.1 Default assumed hitpoints + +- Engine: `hitengine` +- Hull: `hithull`, `hitbody`, `#structural` +- Tracks: `hitltrack`, `hitrtrack` +- Wheels: `hitlbwheel`, `hitlmwheel`, `hitlfwheel`, `hitlf2wheel`, `hitrbwheel`, `hitrmwheel`, `hitrlwheel`, `hitrfwheel`, `hitrf2wheel` +- Fuel: `hitfuel` + +#### 1.2.2 Turret, Gun, ERA, and SLAT hitpoints + +On vehicle placement the system will iterate through all hitpoints define in `class Turrets` and find the relevant weapons and add their hitpoints. This occurs for ERA and SLAT as well + +## CfgAmmo + +The only configuration needed on ammo is the warhead type (if applicable) and the incendiary value + +### 1.1 `ace_vehicle_damage_incendiary` + +Value in range [0, 1] for how incendiary the ammo is. This is used in calculations to ignite fires. Not based on any real-world value, tweak as feels right. + +#### 1.1.1 Default Values + +- Tandem/HEAT: 1 +- AP: 0.1 +- HE: 0.3 +- Incendiary Bullet: 0.7 + +### 1.2 `warheadName` + +Default ARMA config value. We assume that the warheads are vanilla strings, so options are + +- `HE` +- `AP` +- `HEAT` +- `TandemHEAT` + +If no `ace_vehicle_damage_incendiary` defined, this value will be used to assume a default based on above table of common values (excluding `Incendiary Bullet` which is 0). diff --git a/docs/wiki/framework/vehicles-framework.md b/docs/wiki/framework/vehicles-framework.md new file mode 100644 index 0000000000..a1f66e807a --- /dev/null +++ b/docs/wiki/framework/vehicles-framework.md @@ -0,0 +1,55 @@ +--- +layout: wiki +title: Vehicles Framework +description: Explains how to set-up vehicles startup delay. +group: framework +order: 5 +parent: wiki +mod: ace +version: + major: 3 + minor: 14 + patch: 0 +--- + +## 1. Engine startup delay + +The engine has to be started before the vehicle can move. Delay can be configured per class via config or per vehicle via script. +By default starting the engine takes aprox. 1 to 2 seconds. + +### 1.1 Setting the startup delay by config + +```cpp +class CfgVehicles { + class MyFuelTruck { + ace_vehicles_engineStartDelay = 3; // Startup delay in seconds + }; + class MyCar { + ace_vehicles_engineStartDelay = 2.2; + }; + class MyElectricCar { + ace_vehicles_engineStartDelay = 0.1; + }; +}; +``` + +### 1.2 Setting the startup delay by script + +`ace_vehicles_fnc_setVehicleStartDelay` +Has global effects. + + | Arguments | Type | Optional (default value) +---| --------- | ---- | ------------------------ +0 | Vehicle | Object | Required +1 | Delay (in seconds) | Number | Required +**R** | None | None | Return value + + +#### 1.2.1 Example + +`[myCar, 2.2] call ace_vehicles_fnc_setVehicleStartDelay;` + + | Arguments | Explanation +---| --------- | ----------- +0 | `myCar` | My car object +1 | `2.2` | New startup delay diff --git a/docs/wiki/user/how-to-report-an-issue.md b/docs/wiki/user/how-to-report-an-issue.md index fefbf8a73e..9e4962ef76 100644 --- a/docs/wiki/user/how-to-report-an-issue.md +++ b/docs/wiki/user/how-to-report-an-issue.md @@ -26,6 +26,6 @@ Indicate if the issue appears on stable or development version. In case it is th ### Reporting the issue -Head over to the [ACE3 GitHub issue tracker]({{ site.ace.githubUrl }}/issues){:target="_blank"} and press the ["New Issue"]({{ site.ace.githubUrl }}/issues/new){:target="_blank"} button in the top right corner. Fill out the issue template. Add a link ([gist](https://gist.github.com){:target="_blank"} or [pastebin](http://pastebin.com){:target="_blank"}) to the client and/or server RPT file. An instruction to find your RPT files can be found [here](https://community.bistudio.com/wiki/Crash_Files#Arma_3){:target="_blank"}. +Head over to the [ACE3 GitHub issue tracker]({{ site.ace.githubUrl }}/issues){:target="_blank"} and press the ["New Issue"]({{ site.ace.githubUrl }}/issues/new/choose){:target="_blank"} button in the top right corner. Fill out the issue template. Add a link ([gist](https://gist.github.com){:target="_blank"} or [pastebin](http://pastebin.com){:target="_blank"}) to the client and/or server RPT file. An instruction to find your RPT files can be found [here](https://community.bistudio.com/wiki/Crash_Files#Arma_3){:target="_blank"}. A short video clip of the issue might be helpful in resolving it faster. diff --git a/extensions/.clang-format b/extensions/.clang-format new file mode 100644 index 0000000000..89eb4f4686 --- /dev/null +++ b/extensions/.clang-format @@ -0,0 +1,9 @@ +BasedOnStyle: Google +IndentWidth: 4 +ColumnLimit: 160 +DerivePointerAlignment: false +PointerAlignment: Left +NamespaceIndentation: All +IncludeBlocks: Merge + +AllowShortBlocksOnASingleLine: true diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index 74f22ef9c3..727d499d0d 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.0) +cmake_minimum_required (VERSION 3.14) project (ACE) set_property(GLOBAL PROPERTY USE_FOLDERS ON) @@ -98,16 +98,21 @@ endif() string(TIMESTAMP ACE_BUILDSTAMP "%Y-%m-%dT%H:%M:%SZ") -set(ACE_VERSION_MAJOR 3) -set(ACE_VERSION_MINOR 13) -set(ACE_VERSION_REVISION 0) +# Get current version from addon +file(READ "../addons/main/script_version.hpp" script_version) +string(REGEX MATCH "#define MAJOR ([0-9]*)" "x" outputX ${script_version}) +set(ACE_VERSION_MAJOR ${CMAKE_MATCH_1}) +string(REGEX MATCH "#define MINOR ([0-9]*)" "x" outputX ${script_version}) +set(ACE_VERSION_MINOR ${CMAKE_MATCH_1}) +string(REGEX MATCH "#define PATCHLVL ([0-9]*)" outputX ${script_version}) +set(ACE_VERSION_REVISION ${CMAKE_MATCH_1}) EXECUTE_PROCESS(COMMAND git rev-parse --verify HEAD OUTPUT_VARIABLE T_ACE_VERSION_BUILD OUTPUT_STRIP_TRAILING_WHITESPACE ) string(SUBSTRING ${T_ACE_VERSION_BUILD} 0 7 ACE_VERSION_BUILD ) -message("Building for: " ${ACE_VERSION_MAJOR}.${ACE_VERSION_MINOR}.${ACE_VERSION_REVISION}-${ACE_VERSION_BUILD}) +message("Setting ACE Version: " ${ACE_VERSION_MAJOR}.${ACE_VERSION_MINOR}.${ACE_VERSION_REVISION}-${ACE_VERSION_BUILD}) configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/common/ace_version.hpp.in" @@ -135,8 +140,7 @@ add_subdirectory(fcs) add_subdirectory(break_line) add_subdirectory(clipboard) add_subdirectory(advanced_ballistics) -add_subdirectory(medical) -add_subdirectory(parse_imagepath) +#add_subdirectory(medical) # After medical re-write this extension is no longer used add_subdirectory(artillerytables) # Test Extension for dynamically loading/unloading built extensions; does not build in release @@ -149,5 +153,14 @@ if (DEVEL) endif() +# GTest +option(ENABLE_GTEST "ENABLE_GTEST" ON) +if (ENABLE_GTEST) + include(FetchContent) + FetchContent_Declare(googletest GIT_REPOSITORY https://github.com/google/googletest.git) + # For Windows: Prevent overriding the parent project's compiler/linker settings + set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) + FetchContent_MakeAvailable(googletest) +endif() message("Build Type: ${CMAKE_BUILD_TYPE}") diff --git a/extensions/advanced_ballistics/CMakeLists.txt b/extensions/advanced_ballistics/CMakeLists.txt index 55d84810d1..9319d0bbd7 100644 --- a/extensions/advanced_ballistics/CMakeLists.txt +++ b/extensions/advanced_ballistics/CMakeLists.txt @@ -9,4 +9,14 @@ set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES FOLDER Extensions) if(CMAKE_COMPILER_IS_GNUCXX) set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_START_STATIC 1) set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_END_STATIC 1) -endif() \ No newline at end of file +endif() + +# Copy and rename DLL to root +if(USE_64BIT_BUILD) + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}_x64.dll) +else() + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}.dll) +endif() +add_custom_command(TARGET ${ACE_EXTENSION_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${PROJECT_SOURCE_DIR}/../${FINAL_DLL_NAME} +) diff --git a/extensions/artillerytables/CMakeLists.txt b/extensions/artillerytables/CMakeLists.txt index 5b6d3863c9..bd897c5103 100644 --- a/extensions/artillerytables/CMakeLists.txt +++ b/extensions/artillerytables/CMakeLists.txt @@ -11,14 +11,23 @@ if(CMAKE_COMPILER_IS_GNUCXX) set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_END_STATIC 1) endif() +# Copy and rename DLL to root +if(USE_64BIT_BUILD) + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}_x64.dll) +else() + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}.dll) +endif() +add_custom_command(TARGET ${ACE_EXTENSION_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${PROJECT_SOURCE_DIR}/../${FINAL_DLL_NAME} +) - -# enable_testing() -# set(ACE_TEST_NAME Test_${ACE_EXTENSION_NAME}) - -# add_executable(${ACE_TEST_NAME} tests/tester.cpp ${SOURCES}) -# target_link_libraries(${ACE_TEST_NAME} ace_common) -# target_link_libraries(${ACE_TEST_NAME} ${ACE_EXTENSION_NAME}) -# target_link_libraries(${ACE_TEST_NAME} gtest_main) -# add_test(${ACE_TEST_NAME} ${ACE_TEST_NAME}) -# set_target_properties(${ACE_TEST_NAME} PROPERTIES FOLDER Tests) +if (TARGET gtest_main) # Add Tests + enable_testing() + set(ACE_TEST_NAME ${ACE_EXTENSION_NAME}_test) + add_executable(${ACE_TEST_NAME} tests/tester.cpp ${SOURCES}) + target_link_libraries(${ACE_TEST_NAME} ace_common) + target_link_libraries(${ACE_TEST_NAME} ${ACE_EXTENSION_NAME}) + target_link_libraries(${ACE_TEST_NAME} gtest_main) + add_test(${ACE_TEST_NAME} ${ACE_TEST_NAME}) + set_target_properties(${ACE_TEST_NAME} PROPERTIES FOLDER Tests) +endif() diff --git a/extensions/break_line/CMakeLists.txt b/extensions/break_line/CMakeLists.txt index 5d29d295c8..320df7a103 100644 --- a/extensions/break_line/CMakeLists.txt +++ b/extensions/break_line/CMakeLists.txt @@ -9,4 +9,14 @@ set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES FOLDER Extensions) if(CMAKE_COMPILER_IS_GNUCXX) set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_START_STATIC 1) set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_END_STATIC 1) -endif() \ No newline at end of file +endif() + +# Copy and rename DLL to root +if(USE_64BIT_BUILD) + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}_x64.dll) +else() + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}.dll) +endif() +add_custom_command(TARGET ${ACE_EXTENSION_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${PROJECT_SOURCE_DIR}/../${FINAL_DLL_NAME} +) diff --git a/extensions/break_line/ace_break_line.cpp b/extensions/break_line/ace_break_line.cpp index 909c2a1ebb..3c169e6a88 100644 --- a/extensions/break_line/ace_break_line.cpp +++ b/extensions/break_line/ace_break_line.cpp @@ -22,6 +22,9 @@ extern "C" { EXPORT void __stdcall RVExtension(char *output, int outputSize, const char *function); + EXPORT void __stdcall RVExtensionVersion(char *output, int outputSize) { + strncpy(output, ACE_FULL_VERSION_STR, outputSize - 1); + } } std::vector splitString(const std::string & input) { diff --git a/extensions/build/.gitignore b/extensions/build/.gitignore deleted file mode 100644 index 86d0cb2726..0000000000 --- a/extensions/build/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Ignore everything in this directory -* -# Except this file -!.gitignore \ No newline at end of file diff --git a/extensions/clipboard/CMakeLists.txt b/extensions/clipboard/CMakeLists.txt index b8f846844c..6c5668bcdd 100644 --- a/extensions/clipboard/CMakeLists.txt +++ b/extensions/clipboard/CMakeLists.txt @@ -9,4 +9,14 @@ set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES FOLDER Extensions) if(CMAKE_COMPILER_IS_GNUCXX) set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_START_STATIC 1) set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_END_STATIC 1) -endif() \ No newline at end of file +endif() + +# Copy and rename DLL to root +if(USE_64BIT_BUILD) + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}_x64.dll) +else() + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}.dll) +endif() +add_custom_command(TARGET ${ACE_EXTENSION_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${PROJECT_SOURCE_DIR}/../${FINAL_DLL_NAME} +) diff --git a/extensions/clipboard/ace_clipboard.cpp b/extensions/clipboard/ace_clipboard.cpp index 2ca85711df..d463a4634e 100644 --- a/extensions/clipboard/ace_clipboard.cpp +++ b/extensions/clipboard/ace_clipboard.cpp @@ -18,6 +18,9 @@ extern "C" { EXPORT void __stdcall RVExtension(char *output, int outputSize, const char *function); + EXPORT void __stdcall RVExtensionVersion(char *output, int outputSize) { + strncpy(output, ACE_FULL_VERSION_STR, outputSize - 1); + } } std::string gClipboardData; diff --git a/extensions/fcs/CMakeLists.txt b/extensions/fcs/CMakeLists.txt index b5c7b5671f..e7e6913882 100644 --- a/extensions/fcs/CMakeLists.txt +++ b/extensions/fcs/CMakeLists.txt @@ -9,4 +9,14 @@ set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES FOLDER Extensions) if(CMAKE_COMPILER_IS_GNUCXX) set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_START_STATIC 1) set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_END_STATIC 1) -endif() \ No newline at end of file +endif() + +# Copy and rename DLL to root +if(USE_64BIT_BUILD) + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}_x64.dll) +else() + set(FINAL_DLL_NAME ${ACE_EXTENSION_NAME}.dll) +endif() +add_custom_command(TARGET ${ACE_EXTENSION_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy $ ${PROJECT_SOURCE_DIR}/../${FINAL_DLL_NAME} +) diff --git a/extensions/fcs/ace_fcs.cpp b/extensions/fcs/ace_fcs.cpp index 3ca32f439f..f15066bc11 100644 --- a/extensions/fcs/ace_fcs.cpp +++ b/extensions/fcs/ace_fcs.cpp @@ -28,6 +28,9 @@ extern "C" { EXPORT void __stdcall RVExtension(char *output, int outputSize, const char *function); + EXPORT void __stdcall RVExtensionVersion(char *output, int outputSize) { + strncpy(output, ACE_FULL_VERSION_STR, outputSize - 1); + } } std::vector splitString(std::string input) { diff --git a/extensions/parse_imagepath/CMakeLists.txt b/extensions/parse_imagepath/CMakeLists.txt deleted file mode 100644 index e38a4bb506..0000000000 --- a/extensions/parse_imagepath/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -set(ACE_EXTENSION_NAME "ace_parse_imagepath") - -file(GLOB SOURCES *.h *.hpp *.c *.cpp) -add_library( ${ACE_EXTENSION_NAME} SHARED ${SOURCES} ${GLOBAL_SOURCES}) -target_link_libraries(${ACE_EXTENSION_NAME} ace_common) -set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES PREFIX "") -set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES FOLDER Extensions) - -if(CMAKE_COMPILER_IS_GNUCXX) - set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_START_STATIC 1) - set_target_properties(${ACE_EXTENSION_NAME} PROPERTIES LINK_SEARCH_END_STATIC 1) -endif() \ No newline at end of file diff --git a/extensions/parse_imagepath/ace_parse_imagepath.cpp b/extensions/parse_imagepath/ace_parse_imagepath.cpp deleted file mode 100644 index eda1af0d6e..0000000000 --- a/extensions/parse_imagepath/ace_parse_imagepath.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* - * ace_parse_imagepath.cpp - * Author: PabstMirror - * Gets raw image path from structured text input. - * - * Takes: - * Structured text that usualy has an image: - * Example: ""; - * - * Returns: - * Just the image path or "" if none - */ - -#include "shared.hpp" - -#include -#include -#include - -extern "C" { - EXPORT void __stdcall RVExtension(char *output, int outputSize, const char *function); -} - -std::string getImagePathFromStructuredText(const std::string & input) { - std::string returnValue = ""; - std::size_t endIndex = input.find(".paa"); - std::size_t startIndex = endIndex - 1; - if ((endIndex != std::string::npos) && (endIndex > 1)) { - endIndex = endIndex + 4; - while ((startIndex > 0) && (returnValue == "")) { - if ((input[startIndex]) == '\'') { - returnValue = input.substr((startIndex + 1), (endIndex - startIndex - 1)); - }; - startIndex = startIndex - 1; - }; - }; - return returnValue; -} - -void __stdcall RVExtension(char *output, int outputSize, const char *function) { - ZERO_OUTPUT(); - if (!strcmp(function, "version")) { - strncpy(output, ACE_FULL_VERSION_STR, outputSize - 1); - } else { - strncpy(output, getImagePathFromStructuredText(function).c_str(), outputSize - 1); - } - EXTENSION_RETURN(); -} diff --git a/extras/CfgAmmoReference.hpp b/extras/CfgAmmoReference.hpp index b1d118a97d..fa48ec8079 100644 --- a/extras/CfgAmmoReference.hpp +++ b/extras/CfgAmmoReference.hpp @@ -1,7 +1,7 @@ class CfgAmmo { class BulletBase; - class B_556x45_Ball : BulletBase { + class B_556x45_Ball: BulletBase { airFriction=-0.001265; hit=8; typicalSpeed=750; @@ -16,7 +16,7 @@ class CfgAmmo ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900}; ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6}; }; - class ACE_556x45_Ball_Mk262 : B_556x45_Ball { + class ACE_556x45_Ball_Mk262: B_556x45_Ball { airFriction=-0.001125; caliber=0.6; deflecting=18; @@ -33,7 +33,7 @@ class CfgAmmo ACE_muzzleVelocities[]={624, 816, 832, 838}; ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0}; }; - class ACE_556x45_Ball_Mk318 : B_556x45_Ball { + class ACE_556x45_Ball_Mk318: B_556x45_Ball { airFriction=-0.001120; caliber=0.6; deflecting=18; @@ -54,7 +54,7 @@ class CfgAmmo class ACE_B_556x45_Ball_Tracer_Dim: B_556x45_Ball_Tracer_Red { nvgOnly = 1; }; - class ACE_545x39_Ball_7N6M : B_556x45_Ball { + class ACE_545x39_Ball_7N6M: B_556x45_Ball { airFriction=-0.001162; caliber=0.5; deflecting=18; @@ -72,7 +72,7 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; class B_556x45_Ball_Tracer_Yellow; - class ACE_545x39_Ball_7T3M : B_556x45_Ball_Tracer_Yellow { + class ACE_545x39_Ball_7T3M: B_556x45_Ball_Tracer_Yellow { airFriction=-0.001162; caliber=0.5; deflecting=18; @@ -113,7 +113,7 @@ class CfgAmmo ACE_muzzleVelocities[] = {903}; // at 21°C, at 15°C 895 m/s according with the 20Rnd_650x39_Cased_Mag_F initSpeep ACE_barrelLengths[] = {640}; }; - class B_65x39_Caseless : BulletBase { + class B_65x39_Caseless: BulletBase { airFriction=-0.000785; typicalSpeed=800; ACE_caliber=6.706; @@ -128,11 +128,11 @@ class CfgAmmo ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4, 762.0}; }; class B_65x39_Case_yellow; - class ACE_65x39_Caseless_Tracer_Dim : B_65x39_Case_yellow { + class ACE_65x39_Caseless_Tracer_Dim: B_65x39_Case_yellow { nvgOnly = 1; }; class B_65x39_Caseless_green; - class ACE_65x39_Caseless_green_Tracer_Dim : B_65x39_Caseless_green { + class ACE_65x39_Caseless_green_Tracer_Dim: B_65x39_Caseless_green { nvgOnly = 1; }; class ACE_65x47_Ball_Scenar: B_65x39_Caseless @@ -150,7 +150,7 @@ class CfgAmmo ACE_muzzleVelocities[]={730, 760, 790, 820, 830}; ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; }; - class B_762x51_Ball : BulletBase { + class B_762x51_Ball: BulletBase { airFriction=-0.001035; typicalSpeed=833; hit=9; @@ -169,7 +169,7 @@ class CfgAmmo class ACE_B_762x51_Tracer_Dim: B_762x51_Tracer_Yellow { nvgOnly = 1; }; - class ACE_762x51_Ball_M118LR : B_762x51_Ball { + class ACE_762x51_Ball_M118LR: B_762x51_Ball { airFriction=-0.0008525; caliber=1.05; hit=16; @@ -185,7 +185,7 @@ class CfgAmmo ACE_muzzleVelocities[]={750, 780, 790, 794}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class ACE_762x51_Ball_Mk319_Mod_0 : B_762x51_Ball { + class ACE_762x51_Ball_Mk319_Mod_0: B_762x51_Ball { airFriction=-0.00103; caliber=0.85; hit=14; @@ -201,7 +201,7 @@ class CfgAmmo ACE_muzzleVelocities[]={838, 892, 910}; ACE_barrelLengths[]={330.2, 406.4, 508.0}; }; - class ACE_762x51_Ball_Subsonic : B_762x51_Ball { + class ACE_762x51_Ball_Subsonic: B_762x51_Ball { airFriction=-0.000535; caliber=0.5; hit=6; @@ -217,7 +217,7 @@ class CfgAmmo ACE_muzzleVelocities[]={305, 325, 335, 340}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class ACE_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball { + class ACE_762x67_Ball_Mk248_Mod_0: B_762x51_Ball { airFriction=-0.000830; caliber=1.08; hit=17; @@ -233,7 +233,7 @@ class CfgAmmo ACE_muzzleVelocities[]={865, 900, 924}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class ACE_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball { + class ACE_762x67_Ball_Mk248_Mod_1: B_762x51_Ball { airFriction=-0.000815; caliber=1.12; hit=18; @@ -249,7 +249,7 @@ class CfgAmmo ACE_muzzleVelocities[]={847, 867, 877}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class ACE_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball { + class ACE_762x67_Ball_Berger_Hybrid_OTM: B_762x51_Ball { airFriction=-0.00076; caliber=1.15; hit=19; @@ -279,7 +279,7 @@ class CfgAmmo ACE_muzzleVelocities[]={700, 800, 820, 833}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class ACE_762x54_Ball_7N14 : B_762x51_Ball { + class ACE_762x54_Ball_7N14: B_762x51_Ball { airFriction=-0.001023; caliber=0.95; hit=15; @@ -296,7 +296,7 @@ class CfgAmmo ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; class B_762x54_Tracer_Green; - class ACE_762x54_Ball_7T2 : B_762x54_Tracer_Green { + class ACE_762x54_Ball_7T2: B_762x54_Tracer_Green { airFriction=-0.001023; caliber=0.9; hit=15; @@ -312,7 +312,7 @@ class CfgAmmo ACE_muzzleVelocities[]={680, 750, 798, 800}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class ACE_762x35_Ball : B_762x51_Ball { + class ACE_762x35_Ball: B_762x51_Ball { airFriction=-0.000821; caliber=0.9; hit=11; @@ -328,7 +328,7 @@ class CfgAmmo ACE_muzzleVelocities[]={620, 655, 675}; ACE_barrelLengths[]={228.6, 406.4, 508.0}; }; - class ACE_762x39_Ball : B_762x51_Ball { + class ACE_762x39_Ball: B_762x51_Ball { airFriction=-0.0015168; hit=12; typicalSpeed=716; @@ -343,7 +343,7 @@ class CfgAmmo ACE_muzzleVelocities[]={650, 716, 750}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; - class ACE_762x39_Ball_57N231P : B_762x51_Tracer_Yellow { + class ACE_762x39_Ball_57N231P: B_762x51_Tracer_Yellow { airFriction=-0.0015168; hit=12; typicalSpeed=716; @@ -358,7 +358,7 @@ class CfgAmmo ACE_muzzleVelocities[]={650, 716, 750}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; - class B_9x21_Ball : BulletBase { + class B_9x21_Ball: BulletBase { airFriction=-0.00125; typicalSpeed=390; hit=6; @@ -373,7 +373,7 @@ class CfgAmmo ACE_muzzleVelocities[]={440, 460, 480}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class ACE_9x18_Ball_57N181S : B_9x21_Ball { + class ACE_9x18_Ball_57N181S: B_9x21_Ball { hit=5; airFriction=-0.001234; typicalSpeed=298; @@ -388,7 +388,7 @@ class CfgAmmo ACE_muzzleVelocities[]={298, 330, 350}; ACE_barrelLengths[]={96.52, 127.0, 228.6}; }; - class ACE_9x19_Ball : B_9x21_Ball { + class ACE_9x19_Ball: B_9x21_Ball { airFriction=-0.001234; typicalSpeed=370; hit=6; @@ -403,7 +403,7 @@ class CfgAmmo ACE_muzzleVelocities[]={340, 370, 400}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class ACE_10x25_Ball : B_9x21_Ball { + class ACE_10x25_Ball: B_9x21_Ball { airFriction=-0.00168; typicalSpeed=425; hit=7; @@ -433,7 +433,7 @@ class CfgAmmo ACE_muzzleVelocities[]={282, 300, 320}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class ACE_303_Ball : ACE_762x51_Ball_M118LR { + class ACE_303_Ball: ACE_762x51_Ball_M118LR { airFriction=-0.00083; typicalSpeed=761; ACE_caliber=7.899; @@ -447,7 +447,7 @@ class CfgAmmo ACE_muzzleVelocities[]={748, 761, 765}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class B_93x64_Ball : BulletBase { + class B_93x64_Ball: BulletBase { airFriction=-0.00106; typicalSpeed=880; ACE_caliber=9.296; @@ -462,7 +462,7 @@ class CfgAmmo ACE_muzzleVelocities[]={850, 870, 880}; ACE_barrelLengths[]={508.0, 620.014, 660.4}; }; - class B_93x64_Ball_ace_3_13 : BulletBase { + class B_93x64_Ball_ace_3_13: BulletBase { airFriction = -0.000808; // According with the G1 BC 0.515 and the SVDK muzzle velocity 780 m/s https://www.kalashnikov.ru/medialibrary/bd9/72_77.pdf#page=3 ACE_caliber = 9.28; // https://www.kalashnikov.ru/medialibrary/bd9/72_77.pdf#page=3 ACE_bulletLength = 35.56; // Average length from bullets with similar mass and BC @@ -476,7 +476,7 @@ class CfgAmmo ACE_muzzleVelocities[] = {768, 788, 798}; // Default values - 82 m/s at 21°C, at 15°C {760, 780, 790} according with the 10Rnd_93x64_DMR_05_Mag and the 150Rnd_93x64_Mag initSpeed ACE_barrelLengths[] = {508.0, 620.0, 660.4}; }; - class B_408_Ball : BulletBase { + class B_408_Ball: BulletBase { timeToLive=10; airFriction=-0.000395; typicalSpeed=910; @@ -492,7 +492,7 @@ class CfgAmmo ACE_muzzleVelocities[]={910}; ACE_barrelLengths[]={736.6}; }; - class ACE_106x83mm_Ball : B_408_Ball { + class ACE_106x83mm_Ball: B_408_Ball { timeToLive=10; ACE_caliber=10.566; ACE_bulletLength=53.061; @@ -505,7 +505,7 @@ class CfgAmmo ACE_muzzleVelocities[]={960}; ACE_barrelLengths[]={736.6}; }; - class B_338_Ball : BulletBase { + class B_338_Ball: BulletBase { timeToLive=10; airFriction=-0.000606; typicalSpeed=915; @@ -520,7 +520,7 @@ class CfgAmmo ACE_muzzleVelocities[]={880, 915, 925}; ACE_barrelLengths[]={508.0, 660.4, 711.2}; }; - class B_338_NM_Ball : BulletBase { + class B_338_NM_Ball: BulletBase { airFriction=-0.000537; typicalSpeed=820; ACE_caliber=8.585; @@ -534,7 +534,7 @@ class CfgAmmo ACE_muzzleVelocities[]={790, 807, 820}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class ACE_338_Ball : B_338_Ball { + class ACE_338_Ball: B_338_Ball { timeToLive=10; airFriction=-0.000535; caliber=1.55; @@ -550,7 +550,7 @@ class CfgAmmo ACE_muzzleVelocities[]={800, 820, 826, 830}; ACE_barrelLengths[]={508.0, 609.6, 673.1, 711.2}; }; - class ACE_338_Ball_API526 : B_338_Ball { + class ACE_338_Ball_API526: B_338_Ball { timeToLive=10; airFriction=-0.000673; caliber=2.4; @@ -566,7 +566,7 @@ class CfgAmmo ACE_muzzleVelocities[]={880, 915, 925}; ACE_barrelLengths[]={508.0, 660.4, 711.2}; }; - class B_127x54_Ball : BulletBase { + class B_127x54_Ball: BulletBase { airFriction=-0.00014; typicalSpeed=300; ACE_caliber=12.954; @@ -580,7 +580,7 @@ class CfgAmmo ACE_muzzleVelocities[]={300}; ACE_barrelLengths[]={436.88}; }; - class B_127x99_Ball : BulletBase { + class B_127x99_Ball: BulletBase { timeToLive=10; airFriction=-0.0006; typicalSpeed=853; @@ -595,7 +595,7 @@ class CfgAmmo ACE_muzzleVelocities[]={853}; ACE_barrelLengths[]={736.6}; }; - class ACE_127x99_Ball_AMAX : B_127x99_Ball { + class ACE_127x99_Ball_AMAX: B_127x99_Ball { timeToLive=10; airFriction=-0.000374; typicalSpeed=860; @@ -610,7 +610,7 @@ class CfgAmmo ACE_muzzleVelocities[]={860}; ACE_barrelLengths[]={736.6}; }; - class B_127x108_Ball : BulletBase { + class B_127x108_Ball: BulletBase { timeToLive=10; airFriction=-0.00064; typicalSpeed=820; @@ -651,7 +651,7 @@ class CfgAmmo ACE_barrelLengths[] = {264, 407}; airFriction = -0.002619; // default BI value -0.001412 }; - class B_45ACP_Ball : BulletBase { + class B_45ACP_Ball: BulletBase { airFriction=-0.0007182; typicalSpeed=250; ACE_caliber=11.481; @@ -666,7 +666,7 @@ class CfgAmmo ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class TMR_B_762x51_M118LR : B_762x51_Ball + class TMR_B_762x51_M118LR: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=31.496; @@ -889,7 +889,7 @@ class CfgAmmo ACE_muzzleVelocities[]={730, 750, 760}; ACE_barrelLengths[]={203.2, 254.0, 304.8}; }; - class RH_556x45_B_M855A1 : B_556x45_Ball + class RH_556x45_B_M855A1: B_556x45_Ball { ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -902,7 +902,7 @@ class CfgAmmo ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900}; ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6}; }; - class RH_556x45_B_Mk262 : B_556x45_Ball + class RH_556x45_B_Mk262: B_556x45_Ball { ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -915,7 +915,7 @@ class CfgAmmo ACE_muzzleVelocities[]={624, 816, 832, 838}; ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0}; }; - class RH_556x45_B_Mk318 : B_556x45_Ball + class RH_556x45_B_Mk318: B_556x45_Ball { ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -993,7 +993,7 @@ class CfgAmmo ACE_muzzleVelocities[]={300, 320, 340}; ACE_barrelLengths[]={228.6, 406.4, 508.0}; }; - class RH_762x51_B_M80A1 : B_762x51_Ball + class RH_762x51_B_M80A1: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=28.956; @@ -1006,7 +1006,7 @@ class CfgAmmo ACE_muzzleVelocities[]={700, 800, 820, 833, 845}; ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; }; - class RH_762x51_B_Mk316LR : B_762x51_Ball + class RH_762x51_B_Mk316LR: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=31.496; @@ -1019,7 +1019,7 @@ class CfgAmmo ACE_muzzleVelocities[]={750, 780, 790, 794}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class RH_762x51_B_Mk319 : B_762x51_Ball + class RH_762x51_B_Mk319: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=27.28; @@ -1244,7 +1244,7 @@ class CfgAmmo ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class M_mas_545x39_Ball_7N6M : BulletBase + class M_mas_545x39_Ball_7N6M: BulletBase { ACE_caliber=5.588; ACE_bulletLength=21.59; @@ -1257,7 +1257,7 @@ class CfgAmmo ACE_muzzleVelocities[]={780, 880, 920}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; - class M_mas_545x39_Ball_7T3M : BulletBase + class M_mas_545x39_Ball_7T3M: BulletBase { ACE_caliber=5.588; ACE_bulletLength=21.59; @@ -1270,7 +1270,7 @@ class CfgAmmo ACE_muzzleVelocities[]={785, 883, 925}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; - class B_mas_556x45_Ball_Mk262 : B_556x45_Ball + class B_mas_556x45_Ball_Mk262: B_556x45_Ball { ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -1283,7 +1283,7 @@ class CfgAmmo ACE_muzzleVelocities[]={624, 816, 832, 838}; ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0}; }; - class B_mas_9x18_Ball_57N181S : BulletBase + class B_mas_9x18_Ball_57N181S: BulletBase { ACE_caliber=9.271; ACE_bulletLength=15.494; @@ -1374,7 +1374,7 @@ class CfgAmmo ACE_muzzleVelocities[]={650, 716, 750}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; - class B_mas_762x51_Ball_M118LR : B_762x51_Ball + class B_mas_762x51_Ball_M118LR: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=31.496; @@ -1387,7 +1387,7 @@ class CfgAmmo ACE_muzzleVelocities[]={750, 780, 790, 794}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class B_mas_762x67_Ball_Mk248_Mod_0 : B_762x51_Ball + class B_mas_762x67_Ball_Mk248_Mod_0: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=34.366; @@ -1400,7 +1400,7 @@ class CfgAmmo ACE_muzzleVelocities[]={865, 900, 924}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class B_mas_762x67_Ball_Mk248_Mod_1 : B_762x51_Ball + class B_mas_762x67_Ball_Mk248_Mod_1: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=37.821; @@ -1413,7 +1413,7 @@ class CfgAmmo ACE_muzzleVelocities[]={820, 867, 900}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class B_mas_762x67_Ball_Berger_Hybrid_OTM : B_762x51_Ball + class B_mas_762x67_Ball_Berger_Hybrid_OTM: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=40.691; @@ -1426,7 +1426,7 @@ class CfgAmmo ACE_muzzleVelocities[]={800, 853, 884}; ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class B_mas_762x54_Ball : BulletBase + class B_mas_762x54_Ball: BulletBase { ACE_caliber=7.925; ACE_bulletLength=28.956; @@ -1439,7 +1439,7 @@ class CfgAmmo ACE_muzzleVelocities[]={700, 800, 820, 833}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class B_mas_762x54_Ball_T : BulletBase + class B_mas_762x54_Ball_T: BulletBase { ACE_caliber=7.925; ACE_bulletLength=28.956; @@ -1452,7 +1452,7 @@ class CfgAmmo ACE_muzzleVelocities[]={680, 750, 798, 800}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class BWA3_B_762x51_Ball_LR : BulletBase + class BWA3_B_762x51_Ball_LR: BulletBase { ACE_caliber=7.823; ACE_bulletLength=31.496; @@ -1465,7 +1465,7 @@ class CfgAmmo ACE_muzzleVelocities[]={750, 780, 790, 794}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class BWA3_B_762x51_Ball_SD : BulletBase + class BWA3_B_762x51_Ball_SD: BulletBase { ACE_caliber=7.823; ACE_bulletLength=31.496; @@ -1479,7 +1479,7 @@ class CfgAmmo ACE_barrelLengths[]={406.4, 609.6}; }; - class BWA3_B_46x30_Ball : BulletBase + class BWA3_B_46x30_Ball: BulletBase { ACE_caliber=4.902; ACE_bulletLength=13.005; @@ -1493,7 +1493,7 @@ class CfgAmmo ACE_barrelLengths[]={101.6, 177.8, 228.6, 304.8}; }; - class Trixie_338_Ball : BulletBase + class Trixie_338_Ball: BulletBase { ACE_caliber=8.585; ACE_bulletLength=43.18; @@ -1506,7 +1506,7 @@ class CfgAmmo ACE_muzzleVelocities[]={820, 826, 830}; ACE_barrelLengths[]={609.6, 673.1, 711.2}; }; - class Trixie_303_Ball : BulletBase + class Trixie_303_Ball: BulletBase { ACE_caliber=7.899; ACE_bulletLength=31.166; @@ -1520,7 +1520,7 @@ class CfgAmmo ACE_barrelLengths[]={508.0, 609.6, 660.4}; }; - class rhs_ammo_556x45_Mk318_Ball : BulletBase + class rhs_ammo_556x45_Mk318_Ball: BulletBase { ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -1533,7 +1533,7 @@ class CfgAmmo ACE_muzzleVelocities[]={780, 886, 950}; ACE_barrelLengths[]={254.0, 393.7, 508.0}; }; - class rhs_ammo_556x45_Mk262_Ball : BulletBase + class rhs_ammo_556x45_Mk262_Ball: BulletBase { ACE_caliber=5.69; ACE_bulletLength=23.012; @@ -1546,7 +1546,7 @@ class CfgAmmo ACE_muzzleVelocities[]={624, 816, 832, 838}; ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0}; }; - class rhsammo_762x51_Ball : BulletBase + class rhsammo_762x51_Ball: BulletBase { ACE_caliber=7.823; ACE_bulletLength=28.956; @@ -1559,7 +1559,7 @@ class CfgAmmo ACE_muzzleVelocities[]={700, 800, 820, 833, 845}; ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; }; - class rhs_B_545x39_Ball : BulletBase + class rhs_B_545x39_Ball: BulletBase { ACE_caliber=5.588; ACE_bulletLength=21.59; @@ -1572,7 +1572,7 @@ class CfgAmmo ACE_muzzleVelocities[]={780, 880, 920}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; - class rhs_B_545x39_Ball_Tracer_Green : BulletBase + class rhs_B_545x39_Ball_Tracer_Green: BulletBase { ACE_caliber=5.588; ACE_bulletLength=21.59; @@ -1585,7 +1585,7 @@ class CfgAmmo ACE_muzzleVelocities[]={785, 883, 925}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; - class rhs_ammo_762x51_M118_Special_Ball : BulletBase + class rhs_ammo_762x51_M118_Special_Ball: BulletBase { ACE_caliber=7.823; ACE_bulletLength=31.496; @@ -1598,7 +1598,7 @@ class CfgAmmo ACE_muzzleVelocities[]={750, 780, 790, 794}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class rhs_B_762x54_Ball : BulletBase + class rhs_B_762x54_Ball: BulletBase { ACE_caliber=7.925; ACE_bulletLength=28.956; @@ -1611,7 +1611,7 @@ class CfgAmmo ACE_muzzleVelocities[]={700, 800, 820, 833}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class rhs_B_762x54_Ball_Tracer_Green : BulletBase + class rhs_B_762x54_Ball_Tracer_Green: BulletBase { ACE_caliber=7.925; ACE_bulletLength=28.956; @@ -1624,7 +1624,7 @@ class CfgAmmo ACE_muzzleVelocities[]={680, 750, 798, 800}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class rhs_B_762x39_Ball : BulletBase + class rhs_B_762x39_Ball: BulletBase { ACE_caliber=7.823; ACE_bulletLength=28.956; @@ -1637,7 +1637,7 @@ class CfgAmmo ACE_muzzleVelocities[]={650, 716, 750}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; - class rhs_B_762x39_Tracer : BulletBase + class rhs_B_762x39_Tracer: BulletBase { ACE_caliber=7.823; ACE_bulletLength=28.956; @@ -1650,7 +1650,7 @@ class CfgAmmo ACE_muzzleVelocities[]={650, 716, 750}; ACE_barrelLengths[]={254.0, 414.02, 508.0}; }; - class rhs_ammo_762x51_M80_Ball : BulletBase + class rhs_ammo_762x51_M80_Ball: BulletBase { ACE_caliber=7.823; ACE_bulletLength=28.956; @@ -1663,7 +1663,7 @@ class CfgAmmo ACE_muzzleVelocities[]={700, 800, 820, 833, 845}; ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; }; - class rhsusf_B_300winmag : BulletBase + class rhsusf_B_300winmag: BulletBase { ACE_caliber=7.823; ACE_bulletLength=37.821; diff --git a/extras/CfgWeaponsReference.hpp b/extras/CfgWeaponsReference.hpp index 5775b01090..3f8ef7d740 100644 --- a/extras/CfgWeaponsReference.hpp +++ b/extras/CfgWeaponsReference.hpp @@ -25,47 +25,47 @@ class CfgWeapons class DMR_06_base_F; class MMG_01_base_F; class MMG_02_base_F; - class hgun_P07_F : Pistol_Base_F + class hgun_P07_F: Pistol_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=101.6; }; - class hgun_Rook40_F : Pistol_Base_F + class hgun_Rook40_F: Pistol_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=111.76; }; - class hgun_Pistol_heavy_01_F : Pistol_Base_F + class hgun_Pistol_heavy_01_F: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=114.3; }; - class hgun_Pistol_heavy_02_F : Pistol_Base_F + class hgun_Pistol_heavy_02_F: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=76.2; }; - class hgun_ACPC2_F : Pistol_Base_F + class hgun_ACPC2_F: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=127.0; }; - class hgun_PDW2000_F : PDW2000_Base_F + class hgun_PDW2000_F: PDW2000_Base_F { ACE_barrelTwist=228.6; ACE_barrelLength=177.8; }; - class arifle_Katiba_F : arifle_Katiba_Base_F + class arifle_Katiba_F: arifle_Katiba_Base_F { ACE_barrelTwist=203.2; ACE_barrelLength=728.98; }; - class arifle_Katiba_C_F : arifle_Katiba_Base_F + class arifle_Katiba_C_F: arifle_Katiba_Base_F { ACE_barrelTwist=203.2; ACE_barrelLength=680.72; }; - class arifle_Katiba_GL_F : arifle_Katiba_Base_F + class arifle_Katiba_GL_F: arifle_Katiba_Base_F { ACE_barrelTwist=203.2; ACE_barrelLength=728.98; @@ -95,72 +95,72 @@ class CfgWeapons ACE_barrelTwist=228.6; ACE_barrelLength=457.2; }; - class arifle_SDAR_F : SDAR_base_F + class arifle_SDAR_F: SDAR_base_F { ACE_barrelTwist=285.75; ACE_barrelLength=457.2; }; - class SMG_02_F : SMG_02_Base_F + class SMG_02_F: SMG_02_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=195.58; }; - class arifle_TRG20_F : Tavor_base_F + class arifle_TRG20_F: Tavor_base_F { ACE_barrelTwist=177.8; ACE_barrelLength=381.0; }; - class arifle_TRG21_F : Tavor_base_F + class arifle_TRG21_F: Tavor_base_F { ACE_barrelTwist=177.8; ACE_barrelLength=459.74; }; - class LMG_Zafir_F : Rifle_Long_Base_F + class LMG_Zafir_F: Rifle_Long_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=459.74; }; - class arifle_Mk20_F : Mk20_Base_F + class arifle_Mk20_F: Mk20_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=441.96; }; - class arifle_Mk20C_F : Mk20_Base_F + class arifle_Mk20C_F: Mk20_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=406.4; }; - class arifle_Mk20_GL_F : Mk20_Base_F + class arifle_Mk20_GL_F: Mk20_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=406.4; }; - class SMG_01_F : SMG_01_Base + class SMG_01_F: SMG_01_Base { ACE_barrelTwist=406.4; ACE_barrelLength=139.7; }; - class srifle_DMR_01_F : DMR_01_base_F + class srifle_DMR_01_F: DMR_01_base_F { ACE_barrelTwist=241.3; ACE_barrelLength=609.6; }; - class srifle_EBR_F : EBR_base_F + class srifle_EBR_F: EBR_base_F { ACE_barrelTwist=304.8; ACE_barrelLength=609.6; }; - class LMG_Mk200_F : Rifle_Long_Base_F + class LMG_Mk200_F: Rifle_Long_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; - class srifle_LRR_F : LRR_base_F + class srifle_LRR_F: LRR_base_F { ACE_barrelTwist=330.2; ACE_barrelLength=736.6; }; - class srifle_GM6_F : GM6_base_F + class srifle_GM6_F: GM6_base_F { ACE_barrelTwist=381.0; ACE_barrelLength=1099.82; @@ -205,7 +205,7 @@ class CfgWeapons ACE_barrelTwist=234.95; ACE_barrelLength=609.6; }; - class HMG_M2 : HMG_127 + class HMG_M2: HMG_127 { ACE_barrelTwist=304.8; ACE_barrelLength=1143.0; @@ -222,432 +222,432 @@ class CfgWeapons ACE_barrelLength = 264; modes[] = {"Single", "FullAuto"}; }; - class RH_deagle : Pistol_Base_F + class RH_deagle: Pistol_Base_F { ACE_barrelTwist=482.6; ACE_barrelLength=152.4; }; - class RH_sw659 : Pistol_Base_F + class RH_sw659: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=188.976; }; - class RH_usp : Pistol_Base_F + class RH_usp: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=112.014; }; - class RH_uspm : Pistol_Base_F + class RH_uspm: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=152.4; }; - class RH_mak : Pistol_Base_F + class RH_mak: Pistol_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=93.472; }; - class RH_m1911 : Pistol_Base_F + class RH_m1911: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=127.0; }; - class RH_kimber : Pistol_Base_F + class RH_kimber: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=127.0; }; - class RH_m9 : Pistol_Base_F + class RH_m9: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=124.46; }; - class RH_vz61 : Pistol_Base_F + class RH_vz61: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=114.3; }; - class RH_tec9 : Pistol_Base_F + class RH_tec9: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=127.0; }; - class RH_muzi : Pistol_Base_F + class RH_muzi: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=127.0; }; - class RH_g18 : Pistol_Base_F + class RH_g18: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=114.046; }; - class RH_g17 : Pistol_Base_F + class RH_g17: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=114.046; }; - class RH_tt33 : Pistol_Base_F + class RH_tt33: Pistol_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=116.84; }; - class RH_mk2 : Pistol_Base_F + class RH_mk2: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=101.6; }; - class RH_p226 : Pistol_Base_F + class RH_p226: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=111.76; }; - class RH_g19 : Pistol_Base_F + class RH_g19: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=101.6; }; - class RH_gsh18 : Pistol_Base_F + class RH_gsh18: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=104.14; }; - class RH_mateba : Pistol_Base_F + class RH_mateba: Pistol_Base_F { ACE_barrelTwist=355.6; ACE_barrelLength=152.4; }; - class RH_python : Pistol_Base_F + class RH_python: Pistol_Base_F { ACE_barrelTwist=355.6; ACE_barrelLength=152.4; }; - class RH_bull : Pistol_Base_F + class RH_bull: Pistol_Base_F { ACE_barrelTwist=609.6; ACE_barrelLength=165.1; }; - class RH_ttracker : Pistol_Base_F + class RH_ttracker: Pistol_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=101.6; }; - class RH_mp412 : Pistol_Base_F + class RH_mp412: Pistol_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=152.4; }; - class RH_fnp45 : Pistol_Base_F + class RH_fnp45: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=114.3; }; - class RH_fn57 : Pistol_Base_F + class RH_fn57: Pistol_Base_F { ACE_barrelTwist=231.14; ACE_barrelLength=121.92; }; - class RH_vp70 : Pistol_Base_F + class RH_vp70: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=116.84; }; - class RH_cz75 : Pistol_Base_F + class RH_cz75: Pistol_Base_F { ACE_barrelTwist=246.38; ACE_barrelLength=119.38; }; - class RH_PDW : Rifle_Base_F + class RH_PDW: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=254.0; }; - class RH_hb : Rifle_Base_F + class RH_hb: Rifle_Base_F { ACE_barrelTwist=203.2; ACE_barrelLength=152.4; }; - class RH_sbr9 : Rifle_Base_F + class RH_sbr9: Rifle_Base_F { ACE_barrelTwist=246.38; ACE_barrelLength=228.6; }; - class RH_ar10 : Rifle_Base_F + class RH_ar10: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=528.32; }; - class RH_m4 : Rifle_Base_F + class RH_m4: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class RH_M4m : Rifle_Base_F + class RH_M4m: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=266.7; }; - class RH_M4sbr : Rifle_Base_F + class RH_M4sbr: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=266.7; }; - class RH_M16a1 : Rifle_Base_F + class RH_M16a1: Rifle_Base_F { ACE_barrelTwist=355.6; ACE_barrelLength=508.0; }; - class RH_M16A2 : Rifle_Base_F + class RH_M16A2: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class RH_M16A3 : Rifle_Base_F + class RH_M16A3: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class RH_M16A4 : Rifle_Base_F + class RH_M16A4: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class RH_M16A6 : Rifle_Base_F + class RH_M16A6: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class RH_hk416 : Rifle_Base_F + class RH_hk416: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class RH_hk416c : Rifle_Base_F + class RH_hk416c: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=228.6; }; - class RH_hk416s : Rifle_Base_F + class RH_hk416s: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=264.16; }; - class RH_m27iar : Rifle_Base_F + class RH_m27iar: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=419.1; }; - class RH_Mk12mod1 : Rifle_Base_F + class RH_Mk12mod1: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; - class RH_SAMR : Rifle_Base_F + class RH_SAMR: Rifle_Base_F { ACE_barrelTwist=195.58; ACE_barrelLength=508.0; }; - class RH_m110 : Rifle_Base_F + class RH_m110: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=508.0; }; - class RH_mk11 : Rifle_Base_F + class RH_mk11: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; - class RH_sr25ec : Rifle_Base_F + class RH_sr25ec: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=508.0; }; - class hlc_rifle_ak74 : Rifle_Base_F + class hlc_rifle_ak74: Rifle_Base_F { ACE_barrelTwist=199.898; ACE_barrelLength=414.02; }; - class hlc_rifle_aks74u : Rifle_Base_F + class hlc_rifle_aks74u: Rifle_Base_F { ACE_barrelTwist=160.02; ACE_barrelLength=210.82; }; - class hlc_rifle_ak47 : Rifle_Base_F + class hlc_rifle_ak47: Rifle_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=414.02; }; - class hlc_rifle_akm : Rifle_Base_F + class hlc_rifle_akm: Rifle_Base_F { ACE_barrelTwist=199.898; ACE_barrelLength=414.02; }; - class hlc_rifle_rpk : Rifle_Base_F + class hlc_rifle_rpk: Rifle_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=589.28; }; - class hlc_rifle_aek971 : Rifle_Base_F + class hlc_rifle_aek971: Rifle_Base_F { ACE_barrelTwist=241.3; ACE_barrelLength=431.8; }; - class hlc_rifle_saiga12k : Rifle_Base_F + class hlc_rifle_saiga12k: Rifle_Base_F { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=429.26; }; - class hlc_ar15_base : Rifle_Base_F + class hlc_ar15_base: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=292.1; }; - class hlc_rifle_bcmjack : Rifle_Base_F + class hlc_rifle_bcmjack: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class hlc_rifle_Bushmaster300 : Rifle_Base_F + class hlc_rifle_Bushmaster300: Rifle_Base_F { ACE_barrelTwist=203.2; ACE_barrelLength=406.4; }; - class hlc_rifle_SAMR : Rifle_Base_F + class hlc_rifle_SAMR: Rifle_Base_F { ACE_barrelTwist=228.6; ACE_barrelLength=406.4; }; - class hlc_rifle_honeybase : Rifle_Base_F + class hlc_rifle_honeybase: Rifle_Base_F { ACE_barrelTwist=203.2; ACE_barrelLength=152.4; }; - class hlc_rifle_SLRchopmod : Rifle_Base_F + class hlc_rifle_SLRchopmod: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=533.4; }; - class hlc_rifle_LAR : Rifle_Base_F + class hlc_rifle_LAR: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=533.4; }; - class hlc_rifle_c1A1 : Rifle_Base_F + class hlc_rifle_c1A1: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=551.18; }; - class hlc_rifle_FAL5061 : Rifle_Base_F + class hlc_rifle_FAL5061: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=457.2; }; - class hlc_rifle_STG58F : Rifle_Base_F + class hlc_rifle_STG58F: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=533.4; }; - class hlc_rifle_SLR : Rifle_Base_F + class hlc_rifle_SLR: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=551.18; }; - class hlc_rifle_falosw : Rifle_Base_F + class hlc_rifle_falosw: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=330.2; }; - class hlc_rifle_psg1 : Rifle_Base_F + class hlc_rifle_psg1: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=650.24; }; - class hlc_rifle_g3sg1 : Rifle_Base_F + class hlc_rifle_g3sg1: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=449.58; }; - class hlc_rifle_hk51 : Rifle_Base_F + class hlc_rifle_hk51: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=211.074; }; - class hlc_rifle_hk53 : Rifle_Base_F + class hlc_rifle_hk53: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=211.074; }; - class hlc_rifle_g3a3 : Rifle_Base_F + class hlc_rifle_g3a3: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=449.58; }; - class hlc_M14_base : Rifle_Base_F + class hlc_M14_base: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; - class hlc_rifle_m14sopmod : Rifle_Base_F + class hlc_rifle_m14sopmod: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=457.2; }; - class hlc_lmg_M60E4 : Rifle_Base_F + class hlc_lmg_M60E4: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=431.8; }; - class hlc_lmg_m60 : Rifle_Base_F + class hlc_lmg_m60: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; - class hlc_smg_mp5k_PDW : Rifle_Base_F + class hlc_smg_mp5k_PDW: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=114.3; }; - class hlc_smg_mp5a2 : Rifle_Base_F + class hlc_smg_mp5a2: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=226.06; }; - class hlc_smg_mp5a4 : Rifle_Base_F + class hlc_smg_mp5a4: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=226.06; }; - class hlc_smg_mp5n : Rifle_Base_F + class hlc_smg_mp5n: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=226.06; }; - class hlc_smg_mp5sd5 : Rifle_Base_F + class hlc_smg_mp5sd5: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=144.78; }; - class hlc_smg_mp5sd6 : Rifle_Base_F + class hlc_smg_mp5sd6: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=144.78; }; - class hlc_smg_9mmar : Rifle_Base_F + class hlc_smg_9mmar: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=226.06; }; - class hlc_smg_mp510 : Rifle_Base_F + class hlc_smg_mp510: Rifle_Base_F { ACE_barrelTwist=381.0; ACE_barrelLength=226.06; }; - class hlc_smg_mp5a3 : Rifle_Base_F + class hlc_smg_mp5a3: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=226.06; @@ -708,515 +708,515 @@ class CfgWeapons ACE_barrelTwist=254.0; ACE_barrelLength=134.112; }; - class arifle_mas_mk16 : Rifle_Base_F + class arifle_mas_mk16: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=350.52; }; - class arifle_mas_mk16_l : Rifle_Base_F + class arifle_mas_mk16_l: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; - class arifle_mas_mk17 : Rifle_Base_F + class arifle_mas_mk17: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=406.4; }; - class srifle_mas_m110 : Rifle_Base_F + class srifle_mas_m110: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=508.0; }; - class arifle_mas_ak_74m : Rifle_Base_F + class arifle_mas_ak_74m: Rifle_Base_F { ACE_barrelTwist=199.898; ACE_barrelLength=415.036; }; - class arifle_mas_ak_74m_gl : Rifle_Base_F + class arifle_mas_ak_74m_gl: Rifle_Base_F { ACE_barrelTwist=199.898; ACE_barrelLength=415.036; }; - class srifle_mas_svd : Rifle_Base_F + class srifle_mas_svd: Rifle_Base_F { ACE_barrelTwist=238.76; ACE_barrelLength=619.76; }; - class srifle_mas_m91 : Rifle_Base_F + class srifle_mas_m91: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=736.6; }; - class srifle_mas_ksvk : Rifle_Base_F + class srifle_mas_ksvk: Rifle_Base_F { ACE_barrelTwist=457.2; ACE_barrelLength=999.998; }; - class LMG_mas_rpk_F : Rifle_Base_F + class LMG_mas_rpk_F: Rifle_Base_F { ACE_barrelTwist=195.072; ACE_barrelLength=589.28; }; - class LMG_mas_pkm_F : Rifle_Base_F + class LMG_mas_pkm_F: Rifle_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=645.16; }; - class arifle_mas_aks74u : Rifle_Base_F + class arifle_mas_aks74u: Rifle_Base_F { ACE_barrelTwist=160.02; ACE_barrelLength=210.82; }; - class arifle_mas_bizon : Rifle_Base_F + class arifle_mas_bizon: Rifle_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=231.14; }; - class arifle_mas_saiga : Rifle_Base_F + class arifle_mas_saiga: Rifle_Base_F { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=430.022; }; - class arifle_mas_hk416 : Rifle_Base_F + class arifle_mas_hk416: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class arifle_mas_hk416_gl : Rifle_Base_F + class arifle_mas_hk416_gl: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class arifle_mas_hk416c : Rifle_Base_F + class arifle_mas_hk416c: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=228.6; }; - class arifle_mas_hk416_m203c : Rifle_Base_F + class arifle_mas_hk416_m203c: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=228.6; }; - class arifle_mas_hk417c : Rifle_Base_F + class arifle_mas_hk417c: Rifle_Base_F { ACE_barrelTwist=279.4; ACE_barrelLength=330.2; }; - class arifle_mas_m4 : Rifle_Base_F + class arifle_mas_m4: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class arifle_mas_m4c : Rifle_Base_F + class arifle_mas_m4c: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=261.62; }; - class arifle_mas_l119 : Rifle_Base_F + class arifle_mas_l119: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=406.4; }; - class arifle_mas_l119_gl : Rifle_Base_F + class arifle_mas_l119_gl: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=406.4; }; - class arifle_mas_l119_m203 : Rifle_Base_F + class arifle_mas_l119_m203: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=406.4; }; - class arifle_mas_m16 : Rifle_Base_F + class arifle_mas_m16: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class arifle_mas_m16_gl : Rifle_Base_F + class arifle_mas_m16_gl: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class srifle_mas_hk417 : Rifle_Base_F + class srifle_mas_hk417: Rifle_Base_F { ACE_barrelTwist=279.4; ACE_barrelLength=419.1; }; - class srifle_mas_sr25 : Rifle_Base_F + class srifle_mas_sr25: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; - class srifle_mas_ebr : Rifle_Base_F + class srifle_mas_ebr: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=457.2; }; - class srifle_mas_m24 : Rifle_Base_F + class srifle_mas_m24: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; - class arifle_mas_mp5 : Rifle_Base_F + class arifle_mas_mp5: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=226.06; }; - class arifle_mas_mp5sd : Rifle_Base_F + class arifle_mas_mp5sd: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=144.78; }; - class srifle_mas_m107 : Rifle_Base_F + class srifle_mas_m107: Rifle_Base_F { ACE_barrelTwist=381.0; ACE_barrelLength=736.6; }; - class LMG_mas_M249_F : Rifle_Base_F + class LMG_mas_M249_F: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=414.02; }; - class LMG_mas_M249a_F : Rifle_Base_F + class LMG_mas_M249a_F: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; - class LMG_mas_mk48_F : Rifle_Base_F + class LMG_mas_mk48_F: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=501.65; }; - class LMG_mas_m240_F : Rifle_Base_F + class LMG_mas_m240_F: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; - class LMG_mas_mg3_F : Rifle_Base_F + class LMG_mas_mg3_F: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=563.88; }; - class arifle_mas_g3 : Rifle_Base_F + class arifle_mas_g3: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=449.58; }; - class arifle_mas_g3_m203 : Rifle_Base_F + class arifle_mas_g3_m203: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=449.58; }; - class arifle_mas_fal : Rifle_Base_F + class arifle_mas_fal: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=533.4; }; - class arifle_mas_fal_m203 : Rifle_Base_F + class arifle_mas_fal_m203: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=533.4; }; - class arifle_mas_m1014 : Rifle_Base_F + class arifle_mas_m1014: Rifle_Base_F { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=469.9; }; - class BWA3_P8 : Pistol_Base_F + class BWA3_P8: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=107.95; }; - class BWA3_MP7 : Pistol_Base_F + class BWA3_MP7: Pistol_Base_F { ACE_barrelTwist=160.02; ACE_barrelLength=180.34; }; - class BWA3_G36 : Rifle_Base_F + class BWA3_G36: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=480.06; }; - class BWA3_G36K : Rifle_Base_F + class BWA3_G36K: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; - class BWA3_G28_Standard : Rifle_Long_Base_F + class BWA3_G28_Standard: Rifle_Long_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=419.1; }; - class BWA3_G27 : Rifle_Base_F + class BWA3_G27: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=406.4; }; - class BWA3_MG4 : Rifle_Long_Base_F + class BWA3_MG4: Rifle_Long_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=480.06; }; - class BWA3_MG5 : Rifle_Long_Base_F + class BWA3_MG5: Rifle_Long_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=548.64; }; - class BWA3_G82 : Rifle_Long_Base_F + class BWA3_G82: Rifle_Long_Base_F { ACE_barrelTwist=381.0; ACE_barrelLength=736.6; }; - class Trixie_L131A1 : Pistol_Base_F + class Trixie_L131A1: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=114.3; }; - class Trixie_XM8_Carbine : Rifle_Base_F + class Trixie_XM8_Carbine: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; - class Trixie_XM8_Compact : Rifle_Base_F + class Trixie_XM8_Compact: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=228.6; }; - class Trixie_XM8_SAW : Rifle_Base_F + class Trixie_XM8_SAW: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class Trixie_XM8_SAW_NB : Rifle_Base_F + class Trixie_XM8_SAW_NB: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class Trixie_XM8_DMR : Rifle_Base_F + class Trixie_XM8_DMR: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class Trixie_XM8_DMR_NB : Rifle_Base_F + class Trixie_XM8_DMR_NB: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class L129A1_base : Rifle_Base_F + class L129A1_base: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=406.4; }; - class Trixie_Enfield : Rifle_Base_F + class Trixie_Enfield: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=640.08; }; - class Trixie_CZ550_Rail : Rifle_Base_F + class Trixie_CZ550_Rail: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=599.999; }; - class Trixie_FNFAL_Rail : Rifle_Base_F + class Trixie_FNFAL_Rail: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=533.4; }; - class Trixie_M110 : Rifle_Base_F + class Trixie_M110: Rifle_Base_F { ACE_barrelTwist=279.4; ACE_barrelLength=508.0; }; - class Trixie_MK12 : Rifle_Base_F + class Trixie_MK12: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; - class Trixie_LM308MWS : Rifle_Base_F + class Trixie_LM308MWS: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=406.4; }; - class Trixie_M14DMR : Rifle_Base_F + class Trixie_M14DMR: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; - class Trixie_M14DMR_NG_Black_Short : Rifle_Base_F + class Trixie_M14DMR_NG_Black_Short: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=457.2; }; - class Trixie_M14DMR_NG_Short : Rifle_Base_F + class Trixie_M14DMR_NG_Short: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=457.2; }; - class Trixie_M14 : Rifle_Base_F + class Trixie_M14: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; - class Trixie_M40A3 : Rifle_Base_F + class Trixie_M40A3: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=609.6; }; - class Trixie_CZ750 : Rifle_Base_F + class Trixie_CZ750: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=660.4; }; - class Trixie_M24 : Rifle_Base_F + class Trixie_M24: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; - class Trixie_AWM338 : Rifle_Base_F + class Trixie_AWM338: Rifle_Base_F { ACE_barrelTwist=279.4; ACE_barrelLength=685.8; }; - class Trixie_M107 : Rifle_Base_F + class Trixie_M107: Rifle_Base_F { ACE_barrelTwist=381.0; ACE_barrelLength=736.6; }; - class Trixie_AS50 : Rifle_Base_F + class Trixie_AS50: Rifle_Base_F { ACE_barrelTwist=381.0; ACE_barrelLength=736.6; }; - class L110A1_base : Rifle_Base_F + class L110A1_base: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=347.98; }; - class Trixie_L86A2_base : Rifle_Base_F + class Trixie_L86A2_base: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=645.16; }; - class Trixie_l85a2_base : Rifle_Base_F + class Trixie_l85a2_base: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=518.16; }; - class L7A2_base : Rifle_Base_F + class L7A2_base: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; - class rhs_weap_pya : Pistol_Base_F + class rhs_weap_pya: Pistol_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=111.76; }; - class rhs_weap_pkp : Rifle_Long_Base_F + class rhs_weap_pkp: Rifle_Long_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=657.86; }; - class rhs_weap_pkm : Rifle_Long_Base_F + class rhs_weap_pkm: Rifle_Long_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=645.16; }; - class rhs_weap_rpk74m : Rifle_Long_Base_F + class rhs_weap_rpk74m: Rifle_Long_Base_F { ACE_barrelTwist=195.072; ACE_barrelLength=589.28; }; - class rhs_weap_rpk74 : Rifle_Long_Base_F + class rhs_weap_rpk74: Rifle_Long_Base_F { ACE_barrelTwist=195.072; ACE_barrelLength=589.28; }; - class rhs_weap_ak74m : Rifle_Base_F + class rhs_weap_ak74m: Rifle_Base_F { ACE_barrelTwist=199.898; ACE_barrelLength=414.02; }; - class rhs_weap_aks74u : Rifle_Base_F + class rhs_weap_aks74u: Rifle_Base_F { ACE_barrelTwist=160.02; ACE_barrelLength=210.82; }; - class rhs_weap_akm : Rifle_Base_F + class rhs_weap_akm: Rifle_Base_F { ACE_barrelTwist=199.898; ACE_barrelLength=414.02; }; - class rhs_weap_svd : Rifle_Base_F + class rhs_weap_svd: Rifle_Base_F { ACE_barrelTwist=238.76; ACE_barrelLength=619.76; }; - class rhs_weap_svds : Rifle_Base_F + class rhs_weap_svds: Rifle_Base_F { ACE_barrelTwist=238.76; ACE_barrelLength=563.88; }; - class rhs_weap_m4_Base : Rifle_Base_F + class rhs_weap_m4_Base: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class rhs_weap_m16a4 : Rifle_Base_F + class rhs_weap_m16a4: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class rhs_weap_m16a4_carryhandle : Rifle_Base_F + class rhs_weap_m16a4_carryhandle: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class rhs_weap_m16a4_grip : Rifle_Base_F + class rhs_weap_m16a4_grip: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class rhs_weap_m240B : Rifle_Base_F + class rhs_weap_m240B: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; - class rhs_weap_m249_pip : Rifle_Base_F + class rhs_weap_m249_pip: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=414.02; }; - class rhs_weap_mk18 : Rifle_Base_F + class rhs_weap_mk18: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=261.62; }; - class rhs_weap_M590_5RD : Rifle_Base_F + class rhs_weap_M590_5RD: Rifle_Base_F { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=469.9; }; - class rhs_weap_M590_8RD : Rifle_Base_F + class rhs_weap_M590_8RD: Rifle_Base_F { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=508.0; }; - class rhs_weap_sr25 : Rifle_Base_F + class rhs_weap_sr25: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; - class rhs_weap_sr25_ec : Rifle_Base_F + class rhs_weap_sr25_ec: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=508.0; @@ -1230,7 +1230,7 @@ class CfgWeapons ACE_barrelTwist = 160.0; ACE_barrelLength = 180.0; }; - class R3F_PAMAS : Pistol_Base_F + class R3F_PAMAS: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=124.46; @@ -1265,310 +1265,310 @@ class CfgWeapons ACE_barrelTwist=381.0; ACE_barrelLength=701.04; }; - class R3F_HK417S_HG : Rifle_Base_F + class R3F_HK417S_HG: Rifle_Base_F { ACE_barrelTwist=279.4; ACE_barrelLength=304.8; }; - class R3F_HK417M : Rifle_Base_F + class R3F_HK417M: Rifle_Base_F { ACE_barrelTwist=279.4; ACE_barrelLength=406.4; }; - class R3F_HK417L : Rifle_Base_F + class R3F_HK417L: Rifle_Base_F { ACE_barrelTwist=279.4; ACE_barrelLength=508.0; }; - class R3F_M107 : Rifle_Base_F + class R3F_M107: Rifle_Base_F { ACE_barrelTwist=381.0; ACE_barrelLength=736.6; }; - class R3F_HK416M : Rifle_Base_F + class R3F_HK416M: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=355.6; }; - class R3F_MP5SD : Rifle_Base_F + class R3F_MP5SD: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=144.78; }; - class CUP_hgun_Colt1911 : Pistol_Base_F + class CUP_hgun_Colt1911: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=127.0; }; - class CUP_sgun_AA12 : Rifle_Base_F + class CUP_sgun_AA12: Rifle_Base_F { ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=457.2; }; - class CUP_arifle_AK_Base : Rifle_Base_F + class CUP_arifle_AK_Base: Rifle_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=414.02; }; - class CUP_arifle_AK107_Base : Rifle_Base_F + class CUP_arifle_AK107_Base: Rifle_Base_F { ACE_barrelTwist=199.898; ACE_barrelLength=414.02; }; - class CUP_arifle_AKS_Base : Rifle_Base_F + class CUP_arifle_AKS_Base: Rifle_Base_F { ACE_barrelTwist=199.898; ACE_barrelLength=414.02; }; - class CUP_arifle_AKS74U : Rifle_Base_F + class CUP_arifle_AKS74U: Rifle_Base_F { ACE_barrelTwist=160.02; ACE_barrelLength=210.82; }; - class CUP_arifle_RPK74 : Rifle_Long_Base_F + class CUP_arifle_RPK74: Rifle_Long_Base_F { ACE_barrelTwist=195.072; ACE_barrelLength=589.28; }; - class CUP_srifle_AS50 : Rifle_Long_Base_F + class CUP_srifle_AS50: Rifle_Long_Base_F { ACE_barrelTwist=381.0; ACE_barrelLength=736.6; }; - class CUP_srifle_AWM_Base : Rifle_Long_Base_F + class CUP_srifle_AWM_Base: Rifle_Long_Base_F { ACE_barrelTwist=279.4; ACE_barrelLength=685.8; }; - class CUP_smg_bizon : Rifle_Base_F + class CUP_smg_bizon: Rifle_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=231.14; }; - class CUP_hgun_Compact : Pistol_Base_F + class CUP_hgun_Compact: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=94.996; }; - class CUP_srifle_CZ750 : Rifle_Long_Base_F + class CUP_srifle_CZ750: Rifle_Long_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=660.4; }; - class CUP_arifle_CZ805_Base : Rifle_Base_F + class CUP_arifle_CZ805_Base: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=355.6; }; - class CUP_arifle_CZ805_A1 : Rifle_Base_F + class CUP_arifle_CZ805_A1: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=355.6; }; - class CUP_arifle_CZ805_A2 : Rifle_Base_F + class CUP_arifle_CZ805_A2: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=276.86; }; - class CUP_srifle_DMR : Rifle_Base_F + class CUP_srifle_DMR: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; - class CUP_hgun_Duty : Pistol_Base_F + class CUP_hgun_Duty: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=94.996; }; - class CUP_arifle_FNFAL : Rifle_Base_F + class CUP_arifle_FNFAL: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=533.4; }; - class CUP_arifle_G36A : Rifle_Base_F + class CUP_arifle_G36A: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=480.06; }; - class CUP_arifle_G36K : Rifle_Base_F + class CUP_arifle_G36K: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; - class CUP_arifle_G36C : Rifle_Base_F + class CUP_arifle_G36C: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=228.6; }; - class CUP_arifle_MG36 : Rifle_Base_F + class CUP_arifle_MG36: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=480.06; }; - class CUP_hgun_Glock17 : Pistol_Base_F + class CUP_hgun_Glock17: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=114.046; }; - class CUP_srifle_CZ550 : Rifle_Base_F + class CUP_srifle_CZ550: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=599.999; }; - class CUP_srifle_ksvk : Rifle_Long_Base_F + class CUP_srifle_ksvk: Rifle_Long_Base_F { ACE_barrelTwist=457.2; ACE_barrelLength=999.998; }; - class CUP_lmg_L7A2 : Rifle_Long_Base_F + class CUP_lmg_L7A2: Rifle_Long_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; - class CUP_arifle_L85A2_Base : Rifle_Base_F + class CUP_arifle_L85A2_Base: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=518.16; }; - class CUP_lmg_L110A1 : Rifle_Long_Base_F + class CUP_lmg_L110A1: Rifle_Long_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=347.98; }; - class CUP_srifle_LeeEnfield : Rifle_Base_F + class CUP_srifle_LeeEnfield: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=640.08; }; - class CUP_hgun_M9 : Pistol_Base_F + class CUP_hgun_M9: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=124.46; }; - class CUP_srifle_M14 : Rifle_Base_F + class CUP_srifle_M14: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; - class CUP_arifle_M16_Base : Rifle_Base_F + class CUP_arifle_M16_Base: Rifle_Base_F { ACE_barrelTwist=355.6; ACE_barrelLength=508.0; }; - class CUP_arifle_M4_Base : Rifle_Base_F + class CUP_arifle_M4_Base: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class CUP_srifle_Mk12SPR : Rifle_Base_F + class CUP_srifle_Mk12SPR: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; - class CUP_srifle_M24_des : Rifle_Base_F + class CUP_srifle_M24_des: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; - class CUP_lmg_M60A4 : Rifle_Long_Base_F + class CUP_lmg_M60A4: Rifle_Long_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=431.8; }; - class CUP_srifle_M107_Base : Rifle_Long_Base_F + class CUP_srifle_M107_Base: Rifle_Long_Base_F { ACE_barrelTwist=381.0; ACE_barrelLength=736.6; }; - class CUP_srifle_M110 : Rifle_Base_F + class CUP_srifle_M110: Rifle_Base_F { ACE_barrelTwist=279.4; ACE_barrelLength=508.0; }; - class CUP_lmg_M240 : Rifle_Long_Base_F + class CUP_lmg_M240: Rifle_Long_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; - class CUP_lmg_M249_para : Rifle_Long_Base_F + class CUP_lmg_M249_para: Rifle_Long_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=414.02; }; - class CUP_lmg_M249 : Rifle_Long_Base_F + class CUP_lmg_M249: Rifle_Long_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; - class CUP_sgun_M1014 : Rifle_Base_F + class CUP_sgun_M1014: Rifle_Base_F { ACE_twistDirection=0; ACE_barrelTwist=0.0; ACE_barrelLength=469.9; }; - class CUP_hgun_Makarov : Pistol_Base_F + class CUP_hgun_Makarov: Pistol_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=93.472; }; - class CUP_hgun_MicroUzi : Pistol_Base_F + class CUP_hgun_MicroUzi: Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=127.0; }; - class CUP_lmg_Mk48_Base : Rifle_Long_Base_F + class CUP_lmg_Mk48_Base: Rifle_Long_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=501.65; }; - class CUP_smg_MP5SD6 : Rifle_Base_F + class CUP_smg_MP5SD6: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=144.78; }; - class CUP_smg_MP5A5 : Rifle_Base_F + class CUP_smg_MP5A5: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=226.06; }; - class CUP_hgun_PB6P9 : Rifle_Base_F + class CUP_hgun_PB6P9: Rifle_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=104.14; }; - class CUP_hgun_Phantom : Rifle_Base_F + class CUP_hgun_Phantom: Rifle_Base_F { ACE_barrelTwist=246.38; ACE_barrelLength=119.38; }; - class CUP_lmg_PKM : Rifle_Long_Base_F + class CUP_lmg_PKM: Rifle_Long_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=645.16; }; - class CUP_lmg_Pecheneg : Rifle_Long_Base_F + class CUP_lmg_Pecheneg: Rifle_Long_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=657.86; }; - class CUP_hgun_TaurusTracker455 : Pistol_Base_F + class CUP_hgun_TaurusTracker455: Pistol_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=101.6; }; - class CUP_arifle_Sa58P : Rifle_Base_F + class CUP_arifle_Sa58P: Rifle_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=391.16; }; - class CUP_arifle_Sa58V : Rifle_Base_F + class CUP_arifle_Sa58V: Rifle_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=391.16; }; - class CUP_hgun_SA61 : Pistol_Base_F + class CUP_hgun_SA61: Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=114.3; @@ -1579,112 +1579,112 @@ class CfgWeapons ACE_twistDirection=0; ACE_barrelLength=429.26; }; - class CUP_arifle_Mk16_CQC : Rifle_Base_F + class CUP_arifle_Mk16_CQC: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=254.0; }; - class CUP_arifle_Mk16_STD : Rifle_Base_F + class CUP_arifle_Mk16_STD: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=355.6; }; - class CUP_arifle_Mk16_SV : Rifle_Base_F + class CUP_arifle_Mk16_SV: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; - class CUP_arifle_Mk17_CQC : Rifle_Base_F + class CUP_arifle_Mk17_CQC: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=330.2; }; - class CUP_arifle_Mk17_STD : Rifle_Base_F + class CUP_arifle_Mk17_STD: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=406.4; }; - class CUP_arifle_Mk20 : Rifle_Base_F + class CUP_arifle_Mk20: Rifle_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=508.0; }; - class CUP_srifle_SVD : Rifle_Base_F + class CUP_srifle_SVD: Rifle_Base_F { ACE_barrelTwist=238.76; ACE_barrelLength=619.76; }; - class CUP_lmg_UK59 : Rifle_Long_Base_F + class CUP_lmg_UK59: Rifle_Long_Base_F { ACE_barrelTwist=381.0; ACE_barrelLength=551.18; }; - class CUP_DSHKM_W : MGun + class CUP_DSHKM_W: MGun { ACE_barrelTwist=381.0; ACE_barrelLength=1069.34; }; - class CUP_KPVT_W : MGun + class CUP_KPVT_W: MGun { ACE_barrelTwist=454.914; ACE_barrelLength=1346.2; }; - class CUP_KPVB_W : MGun + class CUP_KPVB_W: MGun { ACE_barrelTwist=454.914; ACE_barrelLength=1346.2; }; - class CUP_M134 : MGunCore + class CUP_M134: MGunCore { ACE_barrelTwist=304.8; ACE_barrelLength=558.8; }; - class CUP_M240_veh_W : Rifle_Long_Base_F + class CUP_M240_veh_W: Rifle_Long_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=629.92; }; - class CUP_PKT_W : MGun + class CUP_PKT_W: MGun { ACE_barrelTwist=240.03; ACE_barrelLength=722.122; }; - class CUP_srifle_VSSVintorez : Rifle_Base_F + class CUP_srifle_VSSVintorez: Rifle_Base_F { ACE_barrelTwist=210.82; ACE_barrelLength=200.66; }; - class CUP_arifle_XM8_Base : Rifle_Base_F + class CUP_arifle_XM8_Base: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; - class CUP_arifle_XM8_Carbine : Rifle_Base_F + class CUP_arifle_XM8_Carbine: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; - class CUP_arifle_xm8_sharpshooter : Rifle_Base_F + class CUP_arifle_xm8_sharpshooter: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class CUP_arifle_xm8_SAW : Rifle_Base_F + class CUP_arifle_xm8_SAW: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class CUP_arifle_XM8_Compact : Rifle_Base_F + class CUP_arifle_XM8_Compact: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=228.6; }; - class CUP_arifle_XM8_Railed_Base : Rifle_Base_F + class CUP_arifle_XM8_Railed_Base: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=317.5; }; - class CUP_arifle_XM8_Carbine_FG : Rifle_Base_F + class CUP_arifle_XM8_Carbine_FG: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=317.5; @@ -1845,7 +1845,7 @@ class CfgWeapons ACE_barrelTwist=454.914; ACE_barrelLength=1346.2; }; - class VTN_C_M4A1 : Rifle_Base_F + class VTN_C_M4A1: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; diff --git a/extras/blank/CfgEventHandlers.hpp b/extras/blank/CfgEventHandlers.hpp index 93e3311cf2..865276cfba 100644 --- a/extras/blank/CfgEventHandlers.hpp +++ b/extras/blank/CfgEventHandlers.hpp @@ -1,11 +1,11 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/extras/blank/README.md b/extras/blank/README.md index abea8b9f37..57a4d7d9b6 100644 --- a/extras/blank/README.md +++ b/extras/blank/README.md @@ -2,10 +2,3 @@ ace_blank =================== Adds blank feature. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Name](https://github.com/name) diff --git a/include/a3/data_f/penetration/metal_plate_thin.rvmat b/include/a3/data_f/penetration/metal_plate_thin.rvmat index 6027df8d27..8d479baa8e 100644 Binary files a/include/a3/data_f/penetration/metal_plate_thin.rvmat and b/include/a3/data_f/penetration/metal_plate_thin.rvmat differ diff --git a/include/a3/ui_f/hpp/defineCommonColors.inc b/include/a3/ui_f/hpp/defineCommonColors.inc index 474b732f28..5370c07e6c 100644 --- a/include/a3/ui_f/hpp/defineCommonColors.inc +++ b/include/a3/ui_f/hpp/defineCommonColors.inc @@ -98,6 +98,14 @@ #define IGUI_ERROR_RGB IGUI_ERROR_RGB_R, IGUI_ERROR_RGB_G, IGUI_ERROR_RGB_B #define IGUI_ERROR_COLOR {IGUI_ERROR_RGB,IGUI_ERROR_RGB_A} +//--- IGUI Tactical ping color +#define IGUI_TACTPING_RGB_R "(profilenamespace getvariable ['IGUI_TACTPING_RGB_R',1.0])" +#define IGUI_TACTPING_RGB_G "(profilenamespace getvariable ['IGUI_TACTPING_RGB_G',0.8])" +#define IGUI_TACTPING_RGB_B "(profilenamespace getvariable ['IGUI_TACTPING_RGB_B',0.2])" +#define IGUI_TACTPING_RGB_A "(profilenamespace getvariable ['IGUI_TACTPING_RGB_A',1.0])" +#define IGUI_TACTPING_RGB IGUI_TACTPING_RGB_R, IGUI_TACTPING_RGB_G, IGUI_TACTPING_RGB_B +#define IGUI_TACTPING_COLOR {IGUI_TACTPING_RGB,IGUI_TACTPING_RGB_A} + //--- HUD Text color (obsolete defines; ToDo: Replace with IGUI_TEXT_COLOR and IGUI_BCG_COLOR) #define CA_UI_HUD IGUI_TEXT_COLOR @@ -213,7 +221,6 @@ #define COLOR_TASK_ICON_CUSTOM_A 0.5 #define COLOR_TASK_ICON_CUSTOM_RGBA COLOR_TASK_ICON_CUSTOM_RGB,COLOR_TASK_ICON_CUSTOM_A - #define COLOR_TASK_BACKGROUND_UNASSIGNED_RGB 1,1,1 #define COLOR_TASK_BACKGROUND_UNASSIGNED_A 1 #define COLOR_TASK_BACKGROUND_UNASSIGNED_RGBA COLOR_TASK_BACKGROUND_UNASSIGNED_RGB,COLOR_TASK_BACKGROUND_UNASSIGNED_A diff --git a/include/a3/ui_f/hpp/defineDIKCodes.inc b/include/a3/ui_f/hpp/defineDIKCodes.inc index eb914f9482..c641d60132 100644 --- a/include/a3/ui_f/hpp/defineDIKCodes.inc +++ b/include/a3/ui_f/hpp/defineDIKCodes.inc @@ -187,3 +187,4 @@ #endif /* DIK_ESCAPE */ + diff --git a/include/a3/ui_f/hpp/defineResincl.inc b/include/a3/ui_f/hpp/defineResincl.inc index 7a94b6b592..818fd438ce 100644 --- a/include/a3/ui_f/hpp/defineResincl.inc +++ b/include/a3/ui_f/hpp/defineResincl.inc @@ -1,3 +1,6 @@ +#ifndef _RESINCL_HPP +#define _RESINCL_HPP + /*******************/ /* Tactical menu */ /*******************/ @@ -1309,6 +1312,8 @@ enum #define IDC_OPTIONS_SHADOW_VISIBILIT_TEXT 313 #define IDC_OPTIONS_TRAFFIC_VISIBILITY_VALUE 314 #define IDC_OPTIONS_TRAFFIC_VISIBILITY_SLIDER 315 +#define IDC_OPTIONS_PIP_VISIBILITY_VALUE 316 +#define IDC_OPTIONS_PIP_VISIBILITY_SLIDER 317 #define IDC_OPTIONS_PIP_VALUE 334 #define IDC_OPTIONS_SW_VALUE 335 @@ -1430,11 +1435,19 @@ enum #define IDC_OPTIONS_PLAYER_VOICE 112 #define IDC_OPTIONS_VON_VALUE 113 #define IDC_OPTIONS_VON_SLIDER 114 +//samples setting was replaced by audio output device #define IDC_OPTIONS_SAMPLES_VALUE 115 #define IDC_OPTIONS_SAMPLES_SLIDER 116 + +#define IDC_OPTIONS_AUDIO_OUTPUT_REFRESH 115 +#define IDC_OPTIONS_AUDIO_OUTPUT_COMBO 116 + #define IDC_OPTIONS_MIC_SENS_SLIDER 117 #define IDC_OPTIONS_MIC_ADJUST 118 +#define IDC_OPTIONS_MAPDUCKING_VALUE 119 +#define IDC_OPTIONS_MAPDUCKING_SLIDER 120 + // microphone adjustment #define IDC_OPTIONS_MIC_PROGRESS_BAR 1001 #define IDC_OPTIONS_MIC_PROGRESS 1002 @@ -3168,3 +3181,6 @@ enum #define HZ_VEH_CMDTRRT_TOTAL 31 #define HZ_TANK_BOTH_TRACKS 32 + + +#endif \ No newline at end of file diff --git a/include/vn/characters_f_vietnam/OPFOR/vests/items/vn_mine_satchel_02.p3d b/include/vn/characters_f_vietnam/OPFOR/vests/items/vn_mine_satchel_02.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/objects_f_vietnam/supply/a2_ammo/macv/vn_us_30cal.p3d b/include/vn/objects_f_vietnam/supply/a2_ammo/macv/vn_us_30cal.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/objects_f_vietnam/supply/a2_ammo/macv/vn_us_can_30.p3d b/include/vn/objects_f_vietnam/supply/a2_ammo/macv/vn_us_can_30.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/objects_f_vietnam/supply/a2_ammo/pavn/vn_pavn_50_can.p3d b/include/vn/objects_f_vietnam/supply/a2_ammo/pavn/vn_pavn_50_can.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/objects_f_vietnam/usarmy/furniture/vn_us_fort_common_crate_01.p3d b/include/vn/objects_f_vietnam/usarmy/furniture/vn_us_fort_common_crate_01.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/objects_f_vietnam/usarmy/supply/mortar_m2/vn_prop_60mm_crate_01.p3d b/include/vn/objects_f_vietnam/usarmy/supply/mortar_m2/vn_prop_60mm_crate_01.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/objects_f_vietnam/usarmy/supply/mortar_m29/vn_prop_81mm_crate_02.p3d b/include/vn/objects_f_vietnam/usarmy/supply/mortar_m29/vn_prop_81mm_crate_02.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m302_wp_ammo.p3d b/include/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m302_wp_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m49a2_he_ammo.p3d b/include/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m49a2_he_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m83_lume_ammo.p3d b/include/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m83_lume_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/static_f_vietnam/mortar_m29/vn_shell_81mm_m374_he_ammo.p3d b/include/vn/static_f_vietnam/mortar_m29/vn_shell_81mm_m374_he_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_d832_wp_ammo.p3d b/include/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_d832_wp_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_o832d_he_ammo.p3d b/include/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_o832d_he_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_s832s_lume_ammo.p3d b/include/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_s832s_lume_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/static_f_vietnam/tow/vn_static_tow_mag.p3d b/include/vn/static_f_vietnam/tow/vn_static_tow_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/m112/vn_mine_m112_mag.p3d b/include/vn/weapons_f_vietnam/mines/m112/vn_mine_m112_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/m14/vn_mine_m14_mag.p3d b/include/vn/weapons_f_vietnam/mines/m14/vn_mine_m14_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/m15/vn_mine_m15_mag.p3d b/include/vn/weapons_f_vietnam/mines/m15/vn_mine_m15_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/m16/vn_mine_m16_mag.p3d b/include/vn/weapons_f_vietnam/mines/m16/vn_mine_m16_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/m16/vn_mine_tripwire_m16_02.p3d b/include/vn/weapons_f_vietnam/mines/m16/vn_mine_tripwire_m16_02.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/m16/vn_mine_tripwire_m16_04.p3d b/include/vn/weapons_f_vietnam/mines/m16/vn_mine_tripwire_m16_04.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/m18/vn_mine_m18.p3d b/include/vn/weapons_f_vietnam/mines/m18/vn_mine_m18.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/m18/vn_mine_m18_x3.p3d b/include/vn/weapons_f_vietnam/mines/m18/vn_mine_m18_x3.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_01_mag.p3d b/include/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_01_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_02_mag.p3d b/include/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_02_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_03_mag.p3d b/include/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_03_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/tm57/vn_mine_tm57_mag.p3d b/include/vn/weapons_f_vietnam/mines/tm57/vn_mine_tm57_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/tripwire_arty/vn_mine_tripwire_arty.p3d b/include/vn/weapons_f_vietnam/mines/tripwire_arty/vn_mine_tripwire_arty.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/tripwire_f1/vn_mine_tripwire_f1_02.p3d b/include/vn/weapons_f_vietnam/mines/tripwire_f1/vn_mine_tripwire_f1_02.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/vn/weapons_f_vietnam/mines/tripwire_f1/vn_mine_tripwire_f1_04.p3d b/include/vn/weapons_f_vietnam/mines/tripwire_f1/vn_mine_tripwire_f1_04.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/x/cba/addons/main/script_macros_common.hpp b/include/x/cba/addons/main/script_macros_common.hpp index 41a4faea75..be13021c04 100644 --- a/include/x/cba/addons/main/script_macros_common.hpp +++ b/include/x/cba/addons/main/script_macros_common.hpp @@ -197,7 +197,7 @@ Author: ------------------------------------------- */ #ifdef DEBUG_MODE_FULL -#define LOG(MESSAGE) LOG_SYS_FILELINENUMBERS('LOG',MESSAGE) +#define LOG(MESSAGE) LOG_SYS('LOG',MESSAGE) #define LOG_1(MESSAGE,ARG1) LOG(FORMAT_1(MESSAGE,ARG1)) #define LOG_2(MESSAGE,ARG1,ARG2) LOG(FORMAT_2(MESSAGE,ARG1,ARG2)) #define LOG_3(MESSAGE,ARG1,ARG2,ARG3) LOG(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) @@ -265,7 +265,7 @@ Author: ------------------------------------------- */ #ifdef DEBUG_MODE_NORMAL -#define WARNING(MESSAGE) LOG_SYS_FILELINENUMBERS('WARNING',MESSAGE) +#define WARNING(MESSAGE) LOG_SYS('WARNING',MESSAGE) #define WARNING_1(MESSAGE,ARG1) WARNING(FORMAT_1(MESSAGE,ARG1)) #define WARNING_2(MESSAGE,ARG1,ARG2) WARNING(FORMAT_2(MESSAGE,ARG1,ARG2)) #define WARNING_3(MESSAGE,ARG1,ARG2,ARG3) WARNING(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) @@ -304,7 +304,7 @@ Example: Author: Spooner ------------------------------------------- */ -#define ERROR(MESSAGE) LOG_SYS_FILELINENUMBERS('ERROR',MESSAGE) +#define ERROR(MESSAGE) LOG_SYS('ERROR',MESSAGE) #define ERROR_1(MESSAGE,ARG1) ERROR(FORMAT_1(MESSAGE,ARG1)) #define ERROR_2(MESSAGE,ARG1,ARG2) ERROR(FORMAT_2(MESSAGE,ARG1,ARG2)) #define ERROR_3(MESSAGE,ARG1,ARG2,ARG3) ERROR(FORMAT_3(MESSAGE,ARG1,ARG2,ARG3)) @@ -854,6 +854,8 @@ Author: #define COMPILE_FILE2(var1) COMPILE_FILE2_SYS('var1') #define COMPILE_FILE2_CFG(var1) COMPILE_FILE2_CFG_SYS('var1') +#define COMPILE_SCRIPT(var1) compileScript ['PATHTO_SYS(PREFIX,COMPONENT_F,var1)'] + #define VERSIONING_SYS(var1) class CfgSettings \ { \ @@ -1812,9 +1814,9 @@ Author: /* ------------------------------------------- Macro: FILE_EXISTS - Check if a file exists on machines with interface + Check if a file exists - Reports "false" if the file does not exist and throws an error in RPT. + Reports "false" if the file does not exist. Parameters: FILE - Path to the file @@ -1828,17 +1830,4 @@ Example: Author: commy2 ------------------------------------------- */ -#define FILE_EXISTS(FILE) (call {\ - private _return = false;\ - isNil {\ - private _control = (uiNamespace getVariable ["RscDisplayMain", displayNull]) ctrlCreate ["RscHTML", -1];\ - if (isNull _control) then {\ - _return = loadFile (FILE) != "";\ - } else {\ - _control htmlLoad (FILE);\ - _return = ctrlHTMLLoaded _control;\ - ctrlDelete _control;\ - };\ - };\ - _return\ -}) +#define FILE_EXISTS(FILE) (fileExists (FILE)) diff --git a/include/x/cba/addons/xeh/script_xeh.hpp b/include/x/cba/addons/xeh/script_xeh.hpp index 6fe7465203..2eba00016f 100644 --- a/include/x/cba/addons/xeh/script_xeh.hpp +++ b/include/x/cba/addons/xeh/script_xeh.hpp @@ -54,7 +54,11 @@ reloaded = "call cba_xeh_fnc_reloaded"; \ firedMan = "call cba_xeh_fnc_firedMan"; \ turnIn = "call cba_xeh_fnc_turnIn"; \ turnOut = "call cba_xeh_fnc_turnOut"; \ -deleted = "call cba_xeh_fnc_deleted"; +deleted = "call cba_xeh_fnc_deleted"; \ +disassembled = "call cba_xeh_fnc_disassembled"; \ +Suppressed = "call cba_xeh_fnc_Suppressed"; \ +gestureChanged = "call cba_xeh_fnc_gestureChanged"; \ +gestureDone = "call cba_xeh_fnc_gestureDone"; /* MACRO: DELETE_EVENTHANDLERS @@ -107,4 +111,8 @@ reloaded = ""; \ firedMan = ""; \ turnIn = ""; \ turnOut = ""; \ -deleted = ""; +deleted = ""; \ +disassembled = ""; \ +Suppressed = ""; \ +gestureChanged = ""; \ +gestureDone = "" diff --git a/optionals/compat_gm/$PBOPREFIX$ b/optionals/compat_gm/$PBOPREFIX$ new file mode 100644 index 0000000000..6076e73cbf --- /dev/null +++ b/optionals/compat_gm/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\compat_gm diff --git a/optionals/compat_gm/CfgAmmo.hpp b/optionals/compat_gm/CfgAmmo.hpp new file mode 100644 index 0000000000..30a86758e5 --- /dev/null +++ b/optionals/compat_gm/CfgAmmo.hpp @@ -0,0 +1,25 @@ +class CfgAmmo { + class PipeBombBase; + class gm_explosive_petn_charge: PipeBombBase { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + class gm_explosive_plnp_charge: PipeBombBase { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + + class gm_mine_at_base; + class gm_mine_at_mn111: gm_mine_at_base { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + class gm_mine_at_dm21: gm_mine_at_base { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + class gm_mine_at_tm46: gm_mine_at_base { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; + + class gm_mine_bounce_base; + class gm_mine_ap_dm31: gm_mine_bounce_base { + EGVAR(explosive,defuseObjectPosition)[] = {0, 0, 0.02}; + }; +}; diff --git a/optionals/compat_gm/CfgEventHandlers.hpp b/optionals/compat_gm/CfgEventHandlers.hpp new file mode 100644 index 0000000000..2e06ca222b --- /dev/null +++ b/optionals/compat_gm/CfgEventHandlers.hpp @@ -0,0 +1,19 @@ +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_InitPost_EventHandlers { + class gm_jerrycan { + class ADDON { + init = QUOTE(call EFUNC(refuel,makeJerryCan)); + }; + }; +}; diff --git a/optionals/compat_gm/CfgMagazines.hpp b/optionals/compat_gm/CfgMagazines.hpp new file mode 100644 index 0000000000..07aaffc425 --- /dev/null +++ b/optionals/compat_gm/CfgMagazines.hpp @@ -0,0 +1,126 @@ +class cfgMagazines { + // MG3 + class gm_120rnd_762x51mm_mg3_grn; + class gm_120Rnd_762x51mm_B_T_DM21_mg3_grn: gm_120rnd_762x51mm_mg3_grn { + ACE_isBelt = 1; + }; + class gm_120Rnd_762x51mm_B_T_DM21A1_mg3_grn: gm_120rnd_762x51mm_mg3_grn { + ACE_isBelt = 1; + }; + class gm_120Rnd_762x51mm_B_T_DM21A2_mg3_grn: gm_120rnd_762x51mm_mg3_grn { + ACE_isBelt = 1; + }; + + // PK + class gm_100rnd_762x54mmR_pk_grn; + class gm_100Rnd_762x54mm_API_b32_pk_grn: gm_100rnd_762x54mmR_pk_grn { + ACE_isBelt = 1; + }; + class gm_100Rnd_762x54mm_B_T_t46_pk_grn: gm_100rnd_762x54mmR_pk_grn { + ACE_isBelt = 1; + }; + class gm_100Rnd_762x54mmR_API_7bz3_pk_grn: gm_100rnd_762x54mmR_pk_grn { + ACE_isBelt = 1; + }; + class gm_100Rnd_762x54mmR_B_T_7t2_pk_grn: gm_100rnd_762x54mmR_pk_grn { + ACE_isBelt = 1; + }; + + // Explosives + class gm_explosive_petn_charge_base; + class gm_explosive_petn_charge: gm_explosive_petn_charge_base { + EGVAR(explosive,DelayTime) = 1; + EGVAR(explosive,Placeable) = 1; + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_petn"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; + class Timer { + FuseTime = 0.5; + }; + class Command { + FuseTime = 0.5; + }; + class MK16_Transmitter: Command {}; + class DeadmanSwitch: Command {}; + }; + }; + + class gm_explosive_plnp_charge_base; + class gm_explosive_plnp_charge: gm_explosive_plnp_charge_base { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_plnp"; + }; + + class gm_mine_at_base; + class gm_mine_at_tm46: gm_mine_at_base { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_mine_tm46"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.03; + }; + }; + }; + class gm_mine_at_dm21: gm_mine_at_base { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_dm21"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.03; + }; + }; + }; + class gm_mine_at_mn111: gm_mine_at_base { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_m111"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.03; + }; + }; + }; + + class gm_mine_ap_dm31: gm_mine_at_base { + EGVAR(explosive,SetupObject) = "ACE_Explosives_Place_gm_explosive_dm31"; + useAction = 0; + class ACE_Triggers { + SupportedTriggers[] = {"Tripwire"}; + class Tripwire { + digDistance = 0.125; + }; + }; + }; + + + // Vehicle Ammo + class gm_magazine_20x139mm_base; + class gme_320Rnd_20x139mm_hei_t_dm81: gm_magazine_20x139mm_base { + displayName = "20 mm 320Rnd HEI-T DM81"; + descriptionShort = "Caliber: 20x139 mm HEI-T DM81
Rounds: 320
Used in: RH202"; + displaynameshort = "HEI-T"; + ammo = "gm_bullet_20x139mm_hei_t_dm81"; + count = 320; + initSpeed = 1175; + tracersEvery = 1; + lastRoundsTracer = 1; + scope = 1; + scopeCurator = 2; + author = "Global Mobilization"; + }; + class gme_180Rnd_20x139mm_apds_t_dm63: gm_magazine_20x139mm_base { + displayName = "20 mm 180Rnd APDS-T DM63"; + descriptionShort = "Caliber: 20x139 mm APDS-T DM63
Rounds: 120
Used in: RH202"; + displaynameshort = "APDS-T"; + ammo = "gm_bullet_20x139mm_apds_t_dm63"; + count = 180; + initSpeed = 1175; + tracersEvery = 1; + lastRoundsTracer = 1; + scope = 1; + scopeCurator = 2; + author = "Global Mobilization"; + }; +}; diff --git a/optionals/compat_gm/CfgVehicles.hpp b/optionals/compat_gm/CfgVehicles.hpp new file mode 100644 index 0000000000..6254f3e38a --- /dev/null +++ b/optionals/compat_gm/CfgVehicles.hpp @@ -0,0 +1,462 @@ +class CfgVehicles { + + // EXPLOSIVES + + class Items_base_F; + class ACE_Explosives_Place: Items_base_F { + class ACE_Actions { + class ACE_MainActions; + }; + }; + + // CHARGE + class ACE_Explosives_Place_gm_explosive_petn: ACE_Explosives_Place { + displayName = "PETN Charge"; + model = "gm\gm_weapons\gm_put\gm_explosive_charge_petn"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + class ACE_Explosives_Place_gm_explosive_plnp: ACE_Explosives_Place { + displayName = "PLNP Charge"; + model = "gm\gm_weapons\gm_put\gm_explosive_charge_plnp"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + // AT MINE + class ACE_Explosives_Place_gm_mine_tm46: ACE_Explosives_Place { + displayName = "AT Mine TM46"; + model = "gm\gm_weapons\gm_put\gm_mine_at_tm46"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + class ACE_Explosives_Place_gm_explosive_dm21: ACE_Explosives_Place { + displayName = "AT Mine DM21"; + model = "gm\gm_weapons\gm_put\gm_mine_at_dm21"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + class ACE_Explosives_Place_gm_explosive_m111: ACE_Explosives_Place { + displayName = "MN 111"; + model = "gm\gm_weapons\gm_launchers\gm_platan\gm_mine_at_mn111_disarmed"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + // AP + class ACE_Explosives_Place_gm_explosive_dm31: ACE_Explosives_Place { + displayName = "AP Mine DM31"; + model = "gm\gm_weapons\gm_put\gm_mine_ap_dm31"; + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.002, 0.022, 0.02]"; + }; + }; + }; + + // REPAIR, REFUEL, REARM + + class ReammoBox_F; + class gm_AmmoBox_base: ReammoBox_F { + EGVAR(cargo,size) = 1; + EGVAR(cargo,canLoad) = 1; + + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0,1,1}; + EGVAR(dragging,carryDirection) = 0; + + EGVAR(dragging,canDrag) = 1; + EGVAR(dragging,dragPosition)[] = {0,1.2,0}; + EGVAR(dragging,dragDirection) = 0; + }; + + class gm_jerrycan_base; + class gm_jerrycan: gm_jerrycan_base { + EGVAR(cargo,size) = 1; + EGVAR(cargo,canLoad) = 1; + + EGVAR(dragging,canCarry) = 1; + EGVAR(dragging,carryPosition)[] = {0,1,1}; + EGVAR(dragging,carryDirection) = 0; + + EGVAR(dragging,canDrag) = 1; + EGVAR(dragging,dragPosition)[] = {0,1.2,0}; + EGVAR(dragging,dragDirection) = 0; + }; + + // TOOLKIT + + class ACE_Module; + class ACE_moduleRepairSettings: ACE_Module { + class wheelRepairRequiredItems { + class values { + class gm_repairkit_01 { name = "RepairKit"; value = 1; }; + }; + }; + }; + + // STATIC + + class gm_ge_army_shelteraceII_repair_base; + class gm_ge_army_shelteraceII_repair: gm_ge_army_shelteraceII_repair_base { + EGVAR(repair,canRepair) = 1; + }; + + class gm_gc_army_shelterlakII_repair_base; + class gm_gc_army_shelterlakII_repair: gm_gc_army_shelterlakII_repair_base { + EGVAR(repair,canRepair) = 1; + }; + + + // W H E E L E D + + class gm_wheeled_base; + class gm_wheeled_truck_base; + class gm_wheeled_APC_base; + class gm_wheeled_motorcycle_base; + + // EAST + + class gm_wheeled_car_base: gm_wheeled_base { + EGVAR(cargo,hasCargo) = 1; + EGVAR(cargo,space) = 4; + EGVAR(refuel,canReceive) = 1; + EGVAR(vehicle_damage,hullDetonationProb) = 0.2; + EGVAR(vehicle_damage,turretDetonationProb) = 0.03; + EGVAR(vehicle_damage,engineDetonationProb) = 0.03; + EGVAR(vehicle_damage,hullFireProb) = 0.6; + EGVAR(vehicle_damage,turretFireProb) = 0.1; + EGVAR(vehicle_damage,engineFireProb) = 0.2; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.2; + EGVAR(vehicle_damage,canHaveFireRing) = 0.1; + }; + + class gm_wheeled_bicycle_base: gm_wheeled_base { + EGVAR(cargo,hasCargo) = 0; + EGVAR(refuel,canReceive) = 0; + }; + + class gm_uaz469_base: gm_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 78; + }; + + class gm_p601_base: gm_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 26; + }; + + class gm_brdm2_base: gm_wheeled_APC_base { + EGVAR(refuel,fuelCapacity) = 290; + }; + + class gm_btr60_base: gm_wheeled_APC_base { + EGVAR(refuel,fuelCapacity) = 290; + EGVAR(cookoff,cookoffSelections)[] = {"commanderturret_hatch"}; + }; + + class gm_ural4320_base: gm_wheeled_truck_base { + EGVAR(refuel,fuelCapacity) = 360; + }; + + class gm_ural4320_reammo_base: gm_ural4320_base { + transportAmmo = 0; + EGVAR(rearm,defaultSupply) = 1200; + }; + + class gm_ural4320_refuel_base: gm_ural4320_base { + transportFuel = 0; + EGVAR(refuel,hooks)[] = {{-0.05,-3.6,-0.45}}; + EGVAR(refuel,fuelCargo) = 10000; + }; + + class gm_ural4320_medic_base: gm_ural4320_base { + EGVAR(medical,medicClass) = 1; + }; + + class gm_ural4320_repair_base: gm_ural4320_base { + transportRepair = 0; + EGVAR(repair,canRepair) = 1; + }; + + + // WEST + + class gm_k125_base: gm_wheeled_motorcycle_base { + EGVAR(refuel,fuelCapacity) = 14.5; + }; + + class gm_typ1_base: gm_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 47.3; + }; + + class gm_iltis_base: gm_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 83; + }; + + + class gm_u1300l_base: gm_wheeled_truck_base { + EGVAR(refuel,fuelCapacity) = 90; + }; + + class gm_u1300l_medic_base: gm_u1300l_base { + EGVAR(medical,medicClass) = 1; + }; + + class gm_kat1_base: gm_wheeled_truck_base { + EGVAR(refuel,fuelCapacity) = 270; + }; + + class gm_kat1_451_base; + class gm_kat1_451_refuel_base: gm_kat1_451_base { + gm_InsigniasDefaultHazardSign = "gm_insignia_hazard_fuelF54_wht"; + EGVAR(refuel,fuelCargo) = 4600; + EGVAR(refuel,hooks)[] = {{-0.60,-3.44,-0.919689},{0.60,-3.44,-0.919689}}; + }; + + class gm_kat1_454_base; + class gm_kat1_454_cargo_base: gm_kat1_454_base { + EGVAR(cargo,space) = 10; + }; + + class gm_fuchs_base: gm_wheeled_APC_base { + EGVAR(refuel,fuelCapacity) = 390; + }; + + class gm_fuchsa0_base; + class gm_fuchsa0_engineer_base: gm_fuchsa0_base { + transportRepair = 0; + EGVAR(repair,canRepair) = 1; + }; + + class gm_luchs_base: gm_wheeled_APC_base { + EGVAR(refuel,fuelCapacity) = 500; + EGVAR(cookoff,cookoffSelections)[] = {"mainturret_hatch", "commanderturret_hatch"}; + }; + + + // T R A C K E D + + class Tank_F; + class gm_tracked_base: Tank_F { + EGVAR(cargo,hasCargo) = 1; + EGVAR(cargo,space) = 4; + EGVAR(refuel,canReceive) = 1; + }; + class gm_tracked_APC_base: gm_tracked_base { + EGVAR(vehicle_damage,hullDetonationProb) = 0.03; + EGVAR(vehicle_damage,turretDetonationProb) = 0.03; + EGVAR(vehicle_damage,engineDetonationProb) = 0.03; + EGVAR(vehicle_damage,hullFireProb) = 0.3; + EGVAR(vehicle_damage,turretFireProb) = 0.1; + EGVAR(vehicle_damage,engineFireProb) = 0.2; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.2; + EGVAR(vehicle_damage,canHaveFireRing) = 0.1; + }; + class gm_tracked_Tank_base: gm_tracked_base { + EGVAR(vehicle_damage,hullDetonationProb) = 0.01; + EGVAR(vehicle_damage,turretDetonationProb) = 0.01; + EGVAR(vehicle_damage,engineDetonationProb) = 0.01; + EGVAR(vehicle_damage,hullFireProb) = 0.2; + EGVAR(vehicle_damage,turretFireProb) = 0.1; + EGVAR(vehicle_damage,engineFireProb) = 0.2; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.2; + EGVAR(vehicle_damage,canHaveFireRing) = 0.1; + }; + + // EAST + class gm_bmp1_base: gm_tracked_APC_base { + EGVAR(map,vehicleLightColor)[] = {0,1,0,0.1}; + EGVAR(refuel,fuelCapacity) = 460; + EGVAR(cookoff,cookoffSelections)[] = {"mainturret_hatch","commanderturret_hatch"}; + }; + + class gm_pt76_base: gm_tracked_Tank_base { + EGVAR(refuel,fuelCapacity) = 250; + }; + + class gm_t55_base: gm_tracked_Tank_base { + EGVAR(refuel,fuelCapacity) = 900; // only with external tanks + EGVAR(cookoff,cookoffSelections)[] = {"machinegunturret_01_hatch","commanderturret_hatch"}; + }; + + class gm_zsu234_base: gm_tracked_Tank_base { + EGVAR(refuel,fuelCapacity) = 812; + }; + + // WEST + class gm_Leopard1_base; + class gm_Leopard1a0_base: gm_Leopard1_base { + EGVAR(refuel,fuelCapacity) = 955; + EGVAR(cookoff,cookoffSelections)[] = {"mainturret_hatch_1","commanderturret_hatch"}; + }; + + class gm_Gepard_base: gm_Leopard1_base { + EGVAR(refuel,fuelCapacity) = 985; + }; + + class gm_BPz2_base; + class gm_BPz2a0_base: gm_BPz2_base { + EGVAR(refuel,fuelCapacity) = 1160; + EGVAR(cookoff,cookoffSelections)[] = {"commanderturret_hatch"}; + }; + + class gm_marder1_base: gm_tracked_APC_base { + EGVAR(refuel,fuelCapacity) = 652; + EGVAR(cookoff,cookoffSelections)[] = {"observerturret_hatch", "commanderturret_hatch"}; + }; + + class gm_m113_base: gm_tracked_APC_base { + EGVAR(refuel,fuelCapacity) = 360; + }; + + class gm_m113a1g_base; + class gm_m113a1g_medic_base: gm_m113a1g_base { + EGVAR(medical,medicClass) = 1; + }; + + class gm_m113a1dk_base; + class gm_m113a1dk_engineer_base: gm_m113a1dk_base { + transportRepair = 0; + EGVAR(repair,canRepair) = 1; + }; + + class gm_m113a1dk_medic_base: gm_m113a1dk_base { + EGVAR(medical,medicClass) = 1; + }; + + // H E L I C O P T E R S + + class Helicopter_Base_F; + class Helicopter_Base_H: Helicopter_Base_F { + class EventHandlers; + }; + class gm_helicopter_base: Helicopter_Base_H {}; + + // WEST + + class gm_bo105_base: gm_helicopter_base { + EGVAR(map,vehicleLightColor)[] = {1,0,0,0.1}; + EGVAR(refuel,fuelCapacity) = 3700; + EGVAR(fastroping,enabled) = 0; + + class UserActions { + class openDoor_L { + displayNameDefault = "Open left Door"; + displayName = "Open left Door"; + position = ""; + radius = 2.7; + onlyForPlayer = 1; + condition = QUOTE((this animationSourcePhase 'door_2_1_unhide' > 0.5) && (this doorPhase 'door_2_1_source' < 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + statement = "this animateDoor ['door_2_1_source',1]"; + }; + + class openDoor_R: openDoor_L { + displayNameDefault = "Open right Door"; + displayName = "Open right Door"; + condition = QUOTE((this animationSourcePhase 'door_2_2_unhide' > 0.5) && (this doorPhase 'door_2_2_source' < 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + statement = "this animateDoor ['door_2_2_source',1]"; + }; + + class closeDoor_L { + displayNameDefault = "Close left Door"; + displayName = "Close left Door"; + position = ""; + radius = 2.7; + onlyForPlayer = 1; + condition = QUOTE((this animationSourcePhase 'door_2_1_unhide' > 0.5) && (this doorPhase 'door_2_1_source' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + statement = "this animateDoor ['door_2_1_source',0]"; + }; + + class closeDoor_R: closeDoor_L { + displayNameDefault = "Close right Door"; + displayName = "Close right Door"; + condition = QUOTE((this animationSourcePhase 'door_2_2_unhide' > 0.5) && (this doorPhase 'door_2_2_source' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + statement = "this animateDoor ['door_2_2_source',0]"; + }; + }; + }; + class gm_bo105p1m_vbh_base; + class gm_bo105p1m_vbh_swooper_base: gm_bo105p1m_vbh_base { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{-1.34,0.695,-0.0757732},{1.34,0.695,-0.0973468}}; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onCutRopes) = QFUNC(onCutRopes); + EGVAR(fastroping,onDeployRopes) = QFUNC(onDeployRopes); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + }; + + class gm_ch53_base: gm_helicopter_base { + EGVAR(map,vehicleLightColor)[] = {1,0,0,0.1}; + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{0.6, -5.2, -0.8},{-0.6, -5.2, -0.8}}; + EGVAR(refuel,fuelCapacity) = 3850; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + }; + + class gm_ch53g_base: gm_ch53_base { + EGVAR(refuel,fuelCapacity) = 8770; + }; + + // EAST + class gm_mi2_base: gm_helicopter_base { + EGVAR(map,vehicleLightColor)[] = {1,0,0,0.1}; + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{-1.17969,0.0205078,-0.178533}}; + EGVAR(refuel,fuelCapacity) = 600; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + }; + + + class gm_mi2sr_base: gm_mi2_base { + EGVAR(refuel,fuelCapacity) = 1076; + }; + + class gm_mi2p_base: gm_mi2_base { + EGVAR(refuel,fuelCapacity) = 1076; + }; + + class gm_mi2ch_base: gm_mi2_base { + EGVAR(refuel,fuelCapacity) = 1076; + }; + + class gm_mi2platan_base: gm_mi2_base { + EGVAR(refuel,fuelCapacity) = 1076; + }; + + // P L A N E S + + class Plane_Base_F; + class gm_plane_base: Plane_Base_F { + EGVAR(refuel,canReceive) = 1; + EGVAR(cargo,hasCargo) = 1; + EGVAR(cargo,space) = 4; + }; + + // EAST + class gm_l410_base: gm_plane_base { + EGVAR(refuel,fuelCapacity) = 1300; + }; + + // WEST + class gm_do28d2_base: gm_plane_base { + EGVAR(refuel,fuelCapacity) = 894; // source mondkalb + }; + + class gm_do28d2_medevac_base: gm_do28d2_base { + EGVAR(medical,medicClass) = 1; + }; +}; diff --git a/optionals/compat_gm/CfgWeapons.hpp b/optionals/compat_gm/CfgWeapons.hpp new file mode 100644 index 0000000000..b9f402fd85 --- /dev/null +++ b/optionals/compat_gm/CfgWeapons.hpp @@ -0,0 +1,153 @@ +class CfgWeapons { + + // MACHINE GUNS + class gm_pk_base; + class gm_pkm_base: gm_pk_base { + EGVAR(overheating,mrbs) = 3000; + EGVAR(overheating,slowdownFactor) = 1; + EGVAR(overheating,allowSwapBarrel) = 1; + EGVAR(overheating,dispersion) = 0.25; + }; + class gm_rifle_base; + class gm_machineGun_base: gm_rifle_base { + EGVAR(overheating,closedBolt) = 0; + }; + class gm_mg3_base: gm_machineGun_base { + EGVAR(overheating,mrbs) = 3000; + EGVAR(overheating,slowdownFactor) = 1; + EGVAR(overheating,allowSwapBarrel) = 1; + EGVAR(overheating,dispersion) = 0.25; + }; + class gm_mg3_veh_base: gm_mg3_base { + EGVAR(overheating,allowSwapBarrel) = 0; + }; + class gm_launcher_base; + class gm_carlgustaf_m2_base: gm_launcher_base { + EGVAR(reloadlaunchers,enabled) = 1; + EGVAR(overpressure,angle) = 60; + EGVAR(overpressure,damage) = 0.7; + EGVAR(overpressure,priority) = 1; + EGVAR(overpressure,range) = 10; + }; + + // SUB MACHINE GUNS + class gm_mp2_base: gm_rifle_base { + EGVAR(overheating,closedBolt) = 0; + }; + class gm_pm63_base: gm_rifle_base { + EGVAR(overheating,closedBolt) = 0; + }; + + // GRENADE LAUNCHERS + class gm_hk69a1_base: gm_rifle_base { + EGVAR(overheating,jamTypesAllowed)[] = {"Fire", "Dud"}; + }; + class gm_pallad_d_base: gm_rifle_base { + EGVAR(overheating,jamTypesAllowed)[] = {"Fire", "Dud"}; + }; + + // FLARE GUNS + class gm_pistol_base; + class gm_lp1_base: gm_pistol_base { + EGVAR(overheating,jamTypesAllowed)[] = {"Fire", "Dud"}; + }; + class gm_p2a1_base: gm_pistol_base { + EGVAR(overheating,jamTypesAllowed)[] = {"Fire", "Dud"}; + }; + + // HELMETS + #define HEARING_PROTECTION_OPEN EGVAR(hearing,protection) = 0; EGVAR(hearing,lowerVolume) = 0; + #define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6; + #define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5; + #define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0; + + + class gm_ge_headgear_headset_crew_base; + class gm_ge_headgear_headset_crew_oli: gm_ge_headgear_headset_crew_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_ge_headgear_sph4_base; + class gm_ge_headgear_sph4_oli: gm_ge_headgear_sph4_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_pl_headgear_wz63_base; + class gm_pl_army_headgear_wz63_oli: gm_pl_headgear_wz63_base { + HEARING_PROTECTION_PELTOR + }; + class gm_pl_army_headgear_wz63_net_oli: gm_pl_headgear_wz63_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_ge_headgear_crewhat_80_base; + class gm_ge_headgear_crewhat_80_blk: gm_ge_headgear_crewhat_80_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_gc_headgear_crewhat_80_base; + class gm_gc_army_headgear_crewhat_80_blk: gm_gc_headgear_crewhat_80_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_gc_headgear_zsh3_base; + class gm_gc_headgear_zsh3_wht: gm_gc_headgear_zsh3_base { + HEARING_PROTECTION_PELTOR + }; + class gm_gc_headgear_zsh3_blu: gm_gc_headgear_zsh3_base { + HEARING_PROTECTION_PELTOR + }; + class gm_gc_headgear_zsh3_orn: gm_gc_headgear_zsh3_base { + HEARING_PROTECTION_PELTOR + }; + + class gm_ge_headgear_beret_crew_bdx; + class gm_ge_headgear_beret_crew_blk; + class gm_ge_headgear_beret_crew_grn; + class gm_ge_headgear_beret_crew_red; + class gm_ge_headgear_beret_crew_red_antiair: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_blk_antitank: gm_ge_headgear_beret_crew_blk { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_blk_armor: gm_ge_headgear_beret_crew_blk { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_blk_armorrecon: gm_ge_headgear_beret_crew_blk { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_artillery: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_engineer: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_maintenance: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_grn_mechinf: gm_ge_headgear_beret_crew_grn { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_militarypolice: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_nbc: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_opcom: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_bdx_paratrooper: gm_ge_headgear_beret_crew_bdx { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_blk_recon: gm_ge_headgear_beret_crew_blk { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_supply: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR + }; + class gm_ge_headgear_beret_crew_red_signals: gm_ge_headgear_beret_crew_red { + HEARING_PROTECTION_PELTOR + }; +}; diff --git a/optionals/compat_gm/XEH_PREP.hpp b/optionals/compat_gm/XEH_PREP.hpp new file mode 100644 index 0000000000..b93865ad78 --- /dev/null +++ b/optionals/compat_gm/XEH_PREP.hpp @@ -0,0 +1,4 @@ +PREP(onCut); +PREP(onCutRopes); +PREP(onDeployRopes); +PREP(onPrepare); diff --git a/optionals/compat_gm/XEH_preStart.sqf b/optionals/compat_gm/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/optionals/compat_gm/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/optionals/compat_gm/XEH_preinit.sqf b/optionals/compat_gm/XEH_preinit.sqf new file mode 100644 index 0000000000..b47cf6628d --- /dev/null +++ b/optionals/compat_gm/XEH_preinit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/optionals/compat_gm/config.cpp b/optionals/compat_gm/config.cpp new file mode 100644 index 0000000000..fa94cccace --- /dev/null +++ b/optionals/compat_gm/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_csw", "ace_explosives", "ace_rearm", "ace_refuel", "ace_repair", "gm_core"}; + author = ECSTRING(common,ACETeam); + authors[] = {"nomisum"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgAmmo.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgMagazines.hpp" +#include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" diff --git a/optionals/compat_gm/functions/fnc_onCut.sqf b/optionals/compat_gm/functions/fnc_onCut.sqf new file mode 100644 index 0000000000..0ceffeb63a --- /dev/null +++ b/optionals/compat_gm/functions/fnc_onCut.sqf @@ -0,0 +1,37 @@ +#include "script_component.hpp" +/* + * Author: nomisum + * Function for closing doors for GM helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before cutting ropes + * + * Example: + * [_vehicle] call ace_compat_gm_fnc_onCut + * + * Public: No + */ +params ["_vehicle"]; + +switch (true) do { + case (_vehicle isKindOf "gm_ge_army_bo105p1m_vbh_swooper"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; + _vehicle animateDoor ["door_2_1_source", 0]; + _vehicle animateDoor ["door_2_2_source", 0]; + }; + case (_vehicle isKindOf "gm_ch53_base"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; + _vehicle animateDoor ["cargoramp_source", 0]; + _vehicle animateSource ["slingloadlights_source", 0]; + }; + case (_vehicle isKindOf "gm_mi2_base"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; + _vehicle animate ["door_2_1_anim", 0]; // animateSource/animateDoor didnt work + }; + default {}; +}; + +2 diff --git a/optionals/compat_gm/functions/fnc_onCutRopes.sqf b/optionals/compat_gm/functions/fnc_onCutRopes.sqf new file mode 100644 index 0000000000..1116072f13 --- /dev/null +++ b/optionals/compat_gm/functions/fnc_onCutRopes.sqf @@ -0,0 +1,22 @@ +#include "script_component.hpp" +/* + * Author: nomisum + * Function for animating ropes (first introduced for GM Bo 105). + * Original onCut runs when _stowing_ FRIES. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait for animation to finish + * + * Example: + * [_vehicle] call ace_compat_gm_fnc_onCutRopes + * + * Public: No + */ +params ["_vehicle"]; + +_vehicle animateSource ["swooperRopes_unhide", 1, true]; + +0 diff --git a/optionals/compat_gm/functions/fnc_onDeployRopes.sqf b/optionals/compat_gm/functions/fnc_onDeployRopes.sqf new file mode 100644 index 0000000000..9fb4e192bd --- /dev/null +++ b/optionals/compat_gm/functions/fnc_onDeployRopes.sqf @@ -0,0 +1,22 @@ +#include "script_component.hpp" +/* + * Author: nomisum + * Function for animating ropes when actually dropping (first introduced for GM Bo 105). + * Original onPrepare already animates when preparing FRIES. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait for animation to finish + * + * Example: + * [_vehicle] call ace_compat_gm_fnc_onDeployRopes + * + * Public: No + */ +params ["_vehicle"]; + +_vehicle animateSource ["swooperRopes_unhide", 0, true]; + +0 diff --git a/optionals/compat_gm/functions/fnc_onPrepare.sqf b/optionals/compat_gm/functions/fnc_onPrepare.sqf new file mode 100644 index 0000000000..6dc24932e7 --- /dev/null +++ b/optionals/compat_gm/functions/fnc_onPrepare.sqf @@ -0,0 +1,38 @@ +#include "script_component.hpp" +/* + * Author: nomisum + * Function for opening doors for most GM helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before deploying ropes + * + * Example: + * [_vehicle] call ace_compat_gm_fnc_onPrepare + * + * Public: No + */ +params ["_vehicle"]; + +switch (true) do { + case (_vehicle isKindOf "gm_ge_army_bo105p1m_vbh_swooper"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; + _vehicle animateDoor ["door_2_1_source", 1]; + _vehicle animateDoor ["door_2_2_source", 1]; + }; + case (_vehicle isKindOf "gm_ch53_base"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; + _vehicle animateDoor ["cargoramp_source", 1]; + _vehicle animateSource ["slingloadlights_source", 1]; + }; + case (_vehicle isKindOf "gm_mi2_base"): { + _vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; + _vehicle animate ["door_2_1_anim", 1]; // animateSource/animateDoor didnt work + _vehicle animateSource ["winch_unhide", 1]; // just in case this wasnt already set + }; + default {}; +}; + +2 diff --git a/optionals/compat_gm/functions/script_component.hpp b/optionals/compat_gm/functions/script_component.hpp new file mode 100644 index 0000000000..8d01d047c9 --- /dev/null +++ b/optionals/compat_gm/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\compat_gm\script_component.hpp" diff --git a/optionals/compat_gm/script_component.hpp b/optionals/compat_gm/script_component.hpp new file mode 100644 index 0000000000..1d5854d451 --- /dev/null +++ b/optionals/compat_gm/script_component.hpp @@ -0,0 +1,7 @@ +#define COMPONENT compat_gm +#define COMPONENT_BEAUTIFIED GM Compatibility + +#include "\z\ace\addons\main\script_mod.hpp" +#include "\z\ace\addons\main\script_macros.hpp" + +#include "\z\ace\addons\csw\script_config_macros_csw.hpp" diff --git a/optionals/compat_r3f/CfgAmmo.hpp b/optionals/compat_r3f/CfgAmmo.hpp index 1145e9ab0f..93a93e41fe 100644 --- a/optionals/compat_r3f/CfgAmmo.hpp +++ b/optionals/compat_r3f/CfgAmmo.hpp @@ -1,9 +1,7 @@ class CfgAmmo { class Default; class BulletBase; - class R3F_9x19_Ball: BulletBase { // https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L370 - hit = 6; // R3F default value 13, BI default value 5 - typicalSpeed = 350; // R3F config + class R3F_9x19_Ball: BulletBase { // https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L495 airFriction = -0.00201185; // ACE3 value, default -0.001413 ACE_caliber = 9.017; ACE_bulletLength = 15.494; @@ -13,12 +11,10 @@ class CfgAmmo { ACE_velocityBoundaries[] = {}; ACE_standardAtmosphere = "ASM"; ACE_dragModel = 1; - ACE_muzzleVelocities[] = {340, 370, 400}; - ACE_barrelLengths[] = {101.6, 127.0, 228.6}; + ACE_muzzleVelocities[] = {341, 371, 401}; // at 21°C, at 15°C 400 m/s according with the R3F_MP5A5 initSpeed + ACE_barrelLengths[] = {101.6, 127, 225}; }; - class R3F_556x45_Ball: BulletBase { // M855 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L9 - typicalSpeed = 930; // R3F config - airFriction = -0.00130094; // ACE3 value, default -0.001625 + class R3F_556x45_Ball: BulletBase { // M855 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L117 ACE_caliber = 5.69; ACE_bulletLength = 23.012; ACE_bulletMass = 4.0176; @@ -30,12 +26,10 @@ class CfgAmmo { ACE_muzzleVelocities[] = {723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900}; ACE_barrelLengths[] = {210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6}; }; - class R3F_762x51_Ball: BulletBase { // M80 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L155 - typicalSpeed = 820; // R3F config - airFriction = -0.00103711; // ACE3 value, default -0.00095 - ACE_caliber = 7.823; - ACE_bulletLength = 28.956; - ACE_bulletMass = 9.4608; + class R3F_762x51_Ball: BulletBase { // M80 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L280 + ACE_caliber = 7.82; + ACE_bulletLength = 28.96; + ACE_bulletMass = 9.46; ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; ACE_ballisticCoefficients[] = {0.2}; ACE_velocityBoundaries[] = {}; @@ -44,12 +38,10 @@ class CfgAmmo { ACE_muzzleVelocities[] = {700, 800, 820, 833, 845}; ACE_barrelLengths[] = {254.0, 406.4, 508.0, 609.6, 660.4}; }; - class R3F_762x51_Ball2: R3F_762x51_Ball { // M993 AP https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L226 - typicalSpeed = 850; // R3F config - airFriction = -0.00110718; // ACE3 value, default -0.00095 - ACE_caliber = 7.823; - ACE_bulletLength = 31.496; - ACE_bulletMass = 8.22946157; + class R3F_762x51_Ball2: R3F_762x51_Ball { // M993 AP https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L351 + ACE_caliber = 7.82; + ACE_bulletLength = 31.5; + ACE_bulletMass = 8.23; ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; ACE_ballisticCoefficients[] = {0.359}; ACE_velocityBoundaries[] = {}; @@ -58,15 +50,22 @@ class CfgAmmo { ACE_muzzleVelocities[] = {850}; ACE_barrelLengths[] = {650}; }; - class R3F_762x51_Minimi_Ball: R3F_762x51_Ball { // M80 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L155 - airFriction = -0.00103711; // ACE3 value, default -0.002000 + class R3F_762x51_Ball_SCAR: BulletBase { // M80 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L280 + ACE_caliber = 7.82; + ACE_bulletLength = 28.96; + ACE_bulletMass = 9.46; + ACE_ammoTempMuzzleVelocityShifts[] = {-26.55, -25.47, -22.85, -20.12, -16.98, -12.8, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[] = {0.2}; + ACE_velocityBoundaries[] = {}; + ACE_standardAtmosphere = "ICAO"; + ACE_dragModel = 7; + ACE_muzzleVelocities[] = {708, 808, 828, 841, 853}; // at 21°C, at 15°C 820 m/s according with the R3F SCAR-H initSpeed + ACE_barrelLengths[] = {254.0, 406.4, 508.0, 609.6, 660.4}; }; - class R3F_127x99_Ball: BulletBase { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 780; // R3F config - airFriction = -0.00062115; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; + class R3F_127x99_Ball: BulletBase { // PGM Hécate 2 M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L635 + ACE_caliber = 12.95; + ACE_bulletLength = 58.67; + ACE_bulletMass = 41.93; ACE_muzzleVelocityVariationSD = 0.35; ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; ACE_ballisticCoefficients[] = {0.670}; @@ -75,28 +74,16 @@ class CfgAmmo { ACE_dragModel = 1; ACE_muzzleVelocities[] = {780}; ACE_barrelLengths[] = {700}; + EGVAR(vehicle_damage,incendiary) = 0.2; }; - class R3F_127x99_PEI: R3F_127x99_Ball { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 780; // R3F config - airFriction = -0.00062115; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; - ACE_muzzleVelocityVariationSD = 0.4; - ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; - ACE_ballisticCoefficients[] = {0.670}; - ACE_velocityBoundaries[] = {}; - ACE_standardAtmosphere = "ASM"; - ACE_dragModel = 1; - ACE_muzzleVelocities[] = {780}; - ACE_barrelLengths[] = {700}; + class R3F_127x99_PEI: R3F_127x99_Ball { + EGVAR(vehicle_damage,incendiary) = 1.0; }; - class R3F_127x99_Ball2: BulletBase { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 850; // R3F config - airFriction = -0.000601; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; + class R3F_127x99_Ball2: BulletBase { // BARRETT M107 M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L635 + airFriction = -0.000618; // ACE3 value, default -0.00086 + ACE_caliber = 12.95; + ACE_bulletLength = 58.67; + ACE_bulletMass = 41.93; ACE_muzzleVelocityVariationSD = 0.35; ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; ACE_ballisticCoefficients[] = {0.670}; @@ -105,35 +92,25 @@ class CfgAmmo { ACE_dragModel = 1; ACE_muzzleVelocities[] = {850}; ACE_barrelLengths[] = {736.6}; + EGVAR(vehicle_damage,incendiary) = 0.2; }; - class R3F_127x99_PEI2: R3F_127x99_Ball2 { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 850; // R3F config - airFriction = -0.000601; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; - ACE_muzzleVelocityVariationSD = 0.4; - ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; - ACE_ballisticCoefficients[] = {0.670}; - ACE_velocityBoundaries[] = {}; - ACE_standardAtmosphere = "ASM"; - ACE_dragModel = 1; - ACE_muzzleVelocities[] = {850}; - ACE_barrelLengths[] = {736.6}; + class R3F_127x99_PEI2: R3F_127x99_Ball2 { + EGVAR(vehicle_damage,incendiary) = 1.0; }; - class R3F_127x99_Ball3: BulletBase { // M33 https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L510 - typicalSpeed = 820; // R3F config - airFriction = -0.00060964; // ACE3 value, default -0.00086 - ACE_caliber = 12.954; - ACE_bulletLength = 58.674; - ACE_bulletMass = 41.9256; - ACE_muzzleVelocityVariationSD = 0.35; - ACE_ammoTempMuzzleVelocityShifts[] = {-18.91, -17.83, -15.21, -12.48, -09.34, -05.16, 0, 6.11, 13.60, 22.81, 33.83}; - ACE_ballisticCoefficients[] = {0.670}; + class R3F_127x99_Ball3: BulletBase { // McMillan TAC-50 AMAX https://web.archive.org/web/20080527201619/http://mcmfamily.com/pdfs/Tac-50%20Technical%20Data.pdf + typicalSpeed = 823; // R3F default value 820 + airFriction = -0.000388; // R3F default value -0.00086 + ACE_caliber = 12.98; + ACE_bulletLength = 64.52; + ACE_bulletMass = 48.6; + ACE_muzzleVelocityVariationSD = 0.2; + ACE_ammoTempMuzzleVelocityShifts[] = {-26.55, -25.47, -22.85, -20.12, -16.98, -12.8, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[] = {1.05}; ACE_velocityBoundaries[] = {}; - ACE_standardAtmosphere = "ASM"; + ACE_standardAtmosphere = "ICAO"; ACE_dragModel = 1; - ACE_muzzleVelocities[] = {820}; + ACE_muzzleVelocities[] = {831}; // at 21°C, at 15°C 823 m/s (2700 fps) according with the R3F_TAC50 initSpeed ACE_barrelLengths[] = {736.6}; + EGVAR(vehicle_damage,incendiary) = 0.2; }; }; diff --git a/optionals/compat_r3f/CfgMagazines.hpp b/optionals/compat_r3f/CfgMagazines.hpp index 3a36eadfed..ea20d8c06d 100644 --- a/optionals/compat_r3f/CfgMagazines.hpp +++ b/optionals/compat_r3f/CfgMagazines.hpp @@ -4,59 +4,15 @@ class CfgMagazines { scope = 1; // Game Update 1.84: "Tweaked: Magazines can now be hidden in Virtual Arsenal by setting their scope to 1", R3F default value 2 }; class R3F_15Rnd_9x19_PAMAS: CA_magazine { - initSpeed = 350; // R3F config + initSpeed = 368; // according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 350 }; class R3F_15Rnd_9x19_HKUSP: CA_magazine { - initSpeed = 350; // R3F config + initSpeed = 363; // according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 350 }; class R3F_17Rnd_9x19_G17: CA_magazine { - initSpeed = 350; // R3F config + initSpeed = 355; // according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 350 }; - class R3F_30Rnd_9x19_MP5: CA_magazine { - initSpeed = 400; // R3F config - }; - class R3F_25Rnd_556x45_FAMAS: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 960; // R3F config - }; - class R3F_25Rnd_556x45_TRACER_FAMAS: R3F_25Rnd_556x45_FAMAS {}; // AtragMx GunList: 5.56x45mm M855 - class R3F_30Rnd_556x45_FAMAS: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 925; // R3F config - }; - class R3F_30Rnd_556x45_TRACER_FAMAS: R3F_30Rnd_556x45_FAMAS {}; // AtragMx GunList: 5.56x45mm M855 - class R3F_30Rnd_556x45_HK416: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 850; // R3F config - }; - class R3F_30Rnd_556x45_TRACER_HK416: R3F_30Rnd_556x45_HK416 {}; // AtragMx GunList: 5.56x45mm M855 - class R3F_30Rnd_556x45_SIG551: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 850; // R3F config - }; - class R3F_30Rnd_556x45_TRACER_SIG551: R3F_30Rnd_556x45_SIG551 {}; // AtragMx GunList: 5.56x45mm M855 - class R3F_10Rnd_762x51_FRF2: CA_magazine { // AtragMx GunList: R3F FRF2 M993 - initSpeed = 850; // R3F config - }; - class R3F_200Rnd_556x45_MINIMI: CA_magazine { // AtragMx GunList: 5.56x45mm M855 - initSpeed = 915; // R3F config - }; - class R3F_100Rnd_762x51_MINIMI: CA_magazine { // AtragMx GunList: 7.62x51mm M80 - initSpeed = 820; // R3F config - }; - class R3F_20Rnd_762x51_HK417: CA_magazine { // AtragMx GunList: 7.62x51mm M80 / HK417L 20": R3F HK417L M80 - initSpeed = 820; // R3F config - }; - class R3F_20Rnd_762x51_TRACER_HK417: R3F_20Rnd_762x51_HK417 {}; // AtragMx GunList: 7.62x51mm M80 / HK417L 20": R3F HK417L M80 - class R3F_7Rnd_127x99_PGM: CA_magazine { // AtragMx GunList: R3F PGM M33 - initSpeed = 780; // R3F config - }; - class R3F_7Rnd_127x99_PEI_PGM: R3F_7Rnd_127x99_PGM { // AtragMx GunList: R3F PGM M33 - initSpeed = 780; // R3F config - }; - class R3F_10Rnd_127x99_M107: CA_magazine { // AtragMx GunList: R3F M107 M33 - initSpeed = 850; // R3F config - }; - class R3F_10Rnd_127x99_PEI_M107: R3F_10Rnd_127x99_M107 { // AtragMx GunList: R3F M107 M33 - initSpeed = 850; // R3F config - }; - class R3F_5Rnd_127x99_TAC50: CA_magazine { // AtragMx GunList: R3F TAC50 M33 - initSpeed = 820; // R3F config + class R3F_5Rnd_127x99_TAC50: CA_magazine { // AtragMx GunList: R3F TAC50 AMAX + initSpeed = 823; // 2700 fps according with the McMillan Tactical Products specification and the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 820 }; }; diff --git a/optionals/compat_r3f/CfgWeapons.hpp b/optionals/compat_r3f/CfgWeapons.hpp index e25f959009..44a660f704 100644 --- a/optionals/compat_r3f/CfgWeapons.hpp +++ b/optionals/compat_r3f/CfgWeapons.hpp @@ -1,31 +1,21 @@ class Mode_SemiAuto; -class Mode_Burst; -class Mode_FullAuto; class CfgWeapons { class Pistol_Base_F; class Rifle_Base_F; + class Rifle_Long_Base_F; class R3F_Famas_F1: Rifle_Base_F { ACE_RailHeightAboveBore = 10.1796; ACE_barrelTwist = 304.8; // 1:12" ACE_barrelLength = 488.0; muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class Burst: Mode_Burst { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.0035 (12 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; class R3F_Famas_F1_M203: R3F_Famas_F1 { muzzles[] = {"this","Lance_Grenades"}; }; - class R3F_Famas_surb: R3F_Famas_F1 { // R3F FAMAS Surbaissé, should be FAMAS Valorisé : http://narval34.free.fr/fiche_tech_famas.pdf + class R3F_Famas_surb: R3F_Famas_F1 { // R3F FAMAS Surbaissé, should be FAMAS Valorisé: http://narval34.free.fr/fiche_tech_famas.pdf ACE_RailHeightAboveBore = 5.08219; - ACE_barrelTwist = 228.6; // 1:9" FAMAS Surbaissé, should be 1:7" FAMAS Valorisé + ACE_barrelTwist = 177.8; // 1:7" FAMAS Valorisé ACE_barrelLength = 450.0; // 3D model with Beretta barrel : FAMAS Valorisé }; class R3F_Famas_surb_M203: R3F_Famas_surb { @@ -35,15 +25,6 @@ class CfgWeapons { ACE_RailHeightAboveBore = 10.1808; ACE_barrelTwist = 228.6; // 1:9" ACE_barrelLength = 488.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class Burst: Mode_Burst { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.0035 (12 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.74); // 3.1 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; class R3F_Famas_G2_M203: R3F_Famas_G2 { muzzles[] = {"this","Lance_Grenades"}; @@ -70,160 +51,126 @@ class CfgWeapons { ACE_RailHeightAboveBore = 1.79013; ACE_barrelTwist = 294.6; ACE_barrelLength = 650.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.88); // 1.56 MOA*0.562, R3F default value 9.9999997e-005 (0.34 MOA) - }; muzzles[] = {"this"}; }; class R3F_PGM_Hecate_II: Rifle_Base_F { ACE_RailHeightAboveBore = 1.84858; ACE_barrelTwist = 381.0; ACE_barrelLength = 700.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.58); // 1.04 MOA*0.562, R3F default value 0.00018 (0.62 MOA) - }; muzzles[] = {"this"}; }; class R3F_M107: Rifle_Base_F { ACE_RailHeightAboveBore = 3.13099; ACE_barrelTwist = 381.0; ACE_barrelLength = 736.6; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.5); // 0.9 MOA*0.562, R3F default value 0.00030 (1.03 MOA) - }; muzzles[] = {"this"}; }; class R3F_TAC50: Rifle_Base_F { ACE_RailHeightAboveBore = 2.99563; ACE_barrelTwist = 381.0; ACE_barrelLength = 736.6; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.53); // 0.95 MOA*0.562, R3F default value 0.00015 (0.52 MOA) - }; muzzles[] = {"this"}; }; - class R3F_Minimi: Rifle_Base_F { + class R3F_Minimi: Rifle_Base_F { // FN HERSTAL Minimi 5.56 Mk3 https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-minimi-556-mk3.pdf ACE_RailHeightAboveBore = 3.81385; ACE_barrelTwist = 177.8; - ACE_barrelLength = 347.98; + ACE_barrelLength = 349; muzzles[] = {"this"}; - initSpeed = 915; // R3F config - class manual: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.92); // 3.41 MOA*0.562, R3F default value 0.0008 (2.75 MOA) - }; }; - class R3F_Minimi_HG: R3F_Minimi { - class manual: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.92); // 3.41 MOA*0.562, R3F default value 0.0008 (2.75 MOA) - }; - }; - class R3F_Minimi_762: R3F_Minimi { + class R3F_Minimi_762: R3F_Minimi { // FN HERSTAL Minimi 7.62 Mk3 https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-minimi-762-mk3.pdf ACE_RailHeightAboveBore = 3.80834; ACE_barrelTwist = 304.8; - ACE_barrelLength = 502.92; - initSpeed = 820; // R3F config - class manual: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.56); // 2.77 MOA*0.562, R3F default value 0.002 (6.88 MOA) - }; + ACE_barrelLength = 422; }; - class R3F_Minimi_762_HG: R3F_Minimi_762 { - class manual: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.56); // 2.77 MOA*0.562, R3F default value 0.002 (6.88 MOA) - }; - }; - class R3F_HK417M: Rifle_Base_F { + class R3F_HK417M: Rifle_Base_F { // https://www.heckler-koch.com/ ACE_RailHeightAboveBore = 3.23377; ACE_barrelTwist = 279.4; - ACE_barrelLength = 406.0; + ACE_barrelLength = 406.4; muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.62); // 2.89 MOA*0.562, R3F default value 0.001 (3.44 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.62); // 2.89 MOA*0.562, R3F default value 0.0025 (8.6 MOA) - }; }; class R3F_HK417S_HG: R3F_HK417M { - ACE_barrelLength = 305.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.9); // 3.4 MOA*0.562, R3F default value 0.002 (6.88 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.9); // 3.4 MOA*0.562, R3F default value 0.007 (24.06 MOA) - }; + ACE_barrelLength = 304.8; }; class R3F_HK417L: R3F_HK417M { ACE_barrelLength = 508.0; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(0.93); // 1.66 MOA*0.562, R3F default value 0.0002 (0.69 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(0.93); // 1.66 MOA*0.562, R3F default value 0.0025 (8.6 MOA) - }; }; class R3F_HK416M: Rifle_Base_F { ACE_RailHeightAboveBore = 2.84776; ACE_barrelTwist = 177.8; ACE_barrelLength = 368.3; muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.87); // 3.32 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.87); // 3.32 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; class R3F_HK416M_M203: R3F_HK416M { muzzles[] = {"this","Lance_Grenades"}; }; - class R3F_HK416S_HG: R3F_HK416M { + class R3F_HK416M_HG: R3F_HK416M {}; + class R3F_HK416S_HG: R3F_HK416M_HG { ACE_barrelLength = 279.4; - class Single: Single { - dispersion = MOA_TO_RAD(2.12); // 3.78 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class FullAuto: FullAuto { - dispersion = MOA_TO_RAD(2.12); // 3.78 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; - class R3F_SIG551: Rifle_Base_F { + class R3F_SIG551: Rifle_Base_F { // http://www.sigsauer.swiss ACE_RailHeightAboveBore = 3.95288; ACE_barrelTwist = 177.8; - ACE_barrelLength = 363.0; + ACE_barrelLength = 363.5; // SG551 SB http://www.sigsauer.swiss/en/accessories-conversion-kits.php muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(1.88); // 3.34 MOA*0.562, R3F default value 0.00087 (2.99 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(1.88); // 3.34 MOA*0.562, R3F default value 0.005 (17.2 MOA) - }; }; - class R3F_MP5SD: Rifle_Base_F { + class R3F_MP5SD: Rifle_Base_F { // https://www.heckler-koch.com/en/products/military/submachine-guns/mp5/mp5sd/overview.html ACE_RailHeightAboveBore = 4.21816; ACE_barrelTwist = 254.0; - ACE_barrelLength = 144.78; + ACE_barrelLength = 146; + initSpeed = -0.94; // 400*0.94= 376 m/s according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 0 muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(7.73); // 13.75 MOA*0.562 (a square of 10/10cm at 50 meters), R3F default value 0.004 (13.75 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(7.73); // 13.75 MOA*0.562 (a square of 10/10cm at 50 meters), R3F default value 0.007 (24.06 MOA) - }; }; - class R3F_MP5A5: R3F_MP5SD { - ACE_barrelLength = 226.06; + class R3F_MP5A5: R3F_MP5SD { // https://www.heckler-koch.com/en/products/military/submachine-guns/mp5/mp5/overview.html + ACE_barrelLength = 225; + initSpeed = -1; // 400 m/s according with the ACE_ammoTempMuzzleVelocityShifts at the normal conditions (15°C), R3F default value 0 muzzles[] = {"this"}; - class Single: Mode_SemiAuto { - dispersion = MOA_TO_RAD(7.73); // 13.75 MOA*0.562 (a square of 10/10cm at 50 meters), R3F default value 0.004 (13.75 MOA) - }; - class FullAuto: Mode_FullAuto { - dispersion = MOA_TO_RAD(7.73); // 13.75 MOA*0.562 (a square of 10/10cm at 50 meters), R3F default value 0.007 (24.06 MOA) - }; }; - class R3F_M4S90: Rifle_Base_F { + class R3F_M4S90: Rifle_Base_F { // https://www.benelli.it ACE_RailHeightAboveBore = 1.86213; ACE_twistDirection = 0; ACE_barrelTwist = 0; - ACE_barrelLength = 144.78; + ACE_barrelLength = 470; + }; + class R3F_SCAR_H_PR_20cps_base: Rifle_Base_F { // FN HERSTAL https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-scar-h-pr_0.pdf + ACE_barrelTwist = 279.4; + ACE_barrelLength = 508; + muzzles[] = {"this"}; + }; + class R3F_SCAR_H_PR_20cps_recup_base: Rifle_Base_F { + ACE_barrelTwist = 279.4; + ACE_barrelLength = 508; + muzzles[] = {"this"}; + }; + class R3F_SCAR_H_CAM_base: Rifle_Base_F { // FN HERSTAL https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-scar-h_0.pdf + ACE_barrelTwist = 304.8; + ACE_barrelLength = 330.2; + muzzles[] = {"this"}; + }; + class R3F_SCAR_H_CAM_LG_GHILLIE: R3F_SCAR_H_CAM_base { + muzzles[] = {"this", "EGLM"}; + }; + class R3F_SCAR_H_CAM_LG: R3F_SCAR_H_CAM_base { + muzzles[] = {"this", "EGLM"}; + }; + class R3F_SCAR_L_CAM_base: Rifle_Base_F { // FN HERSTAL https://www.fnherstal.com/sites/default/files/2020-06/technical-data-fn-scar-l_1.pdf + ACE_barrelTwist = 177.8; + ACE_barrelLength = 368.3; + muzzles[] = {"this"}; + }; + class R3F_SCAR_L_CAM_ghillie_LG: R3F_SCAR_L_CAM_base { + muzzles[] = {"this", "EGLM"}; + }; + class R3F_SCAR_L_CQC_CAM: R3F_SCAR_L_CAM_base { + ACE_barrelLength = 254; + }; + class R3F_SCAR_L_CQC_LG_CAM: R3F_SCAR_L_CAM_base { + ACE_barrelLength = 254; + muzzles[] = {"this", "EGLM"}; + }; + class R3F_FN_MAG58: Rifle_Long_Base_F { // FN HERSTAL https://www.fnherstal.com/sites/default/files/2020-10/technical-data-fn-mag-1.pdf + ACE_barrelTwist = 304.8; + ACE_barrelLength = 630; + muzzles[] = {"this"}; }; class R3F_PAMAS: Pistol_Base_F { ACE_barrelTwist = 250.0; @@ -248,9 +195,6 @@ class CfgWeapons { ACE_barrelLength = 114.0; muzzles[] = {"this"}; initSpeed = -1.0; // default 410 - class Single: Mode_SemiAuto { - dispersion=0.0029; // R3F default value, 9.97 MOA (a square of 7.25/7.25cm at 25 meters) - }; }; class ItemCore; class InventoryOpticsItem_Base_F; @@ -284,48 +228,38 @@ class CfgWeapons { class OpticsModes { class Felin {}; class Oeilleton: Felin { - opticsID=2; - opticsDisplayName=""; - useModelOptics=0; - opticsPPEffects[]={}; - opticsFlare=0; - opticsDisablePeripherialVision=0; - opticsZoomMin=0.25; - opticsZoomMax=1.25; - opticsZoomInit=0.75; - memoryPointCamera="eye_Oeilleton"; - visionMode[]={}; - discretefov[]={}; - discreteDistance[]={200}; - discreteDistanceInitIndex=0; - distanceZoomMin=200; - distanceZoomMax=200; - discreteInitIndex=0; - cameraDir=""; + opticsID = 2; + opticsDisplayName = ""; + useModelOptics = 0; + opticsPPEffects[] = {}; + opticsFlare = 0; + opticsDisablePeripherialVision = 0; + opticsZoomMin = 0.25; + opticsZoomMax = 1.25; + opticsZoomInit = 0.75; + memoryPointCamera = "eye_Oeilleton"; + visionMode[] = {}; + discretefov[] = {}; + discreteDistance[] = {200}; + discreteDistanceInitIndex = 0; + distanceZoomMin = 200; + distanceZoomMax = 200; + discreteInitIndex = 0; + cameraDir = ""; }; }; }; }; class R3F_J8: ItemCore { // http://www.scrome.com/assets/templates/flexibility/pdf/Scrome_Marksman_Scope_LTE_Datasheet_GB.pdf - ACE_ScopeHeightAboveRail = 4.474; // Inaccurate BDC reticle, designed to work with the vanilla ballistic and R3F values. + ACE_ScopeHeightAboveRail = -2.237; // Off-center BDC reticle designed to work with the vanilla ballistic and R3F values only. ACE_ScopeAdjust_Vertical[] = {-10, 10}; ACE_ScopeAdjust_Horizontal[] = {-10, 10}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo: InventoryOpticsItem_Base_F { - class OpticsModes { - class J8 { - discreteDistance[] = {100}; - discreteDistanceInitIndex = 0; - }; - }; - }; }; class R3F_J8_MILDOT: R3F_J8 { + ACE_ScopeHeightAboveRail = 4.474; ACE_ScopeAdjust_Vertical[] = {0, 20}; - ACE_ScopeAdjust_Horizontal[] = {-10, 10}; - ACE_ScopeAdjust_VerticalIncrement = 0.1; - ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class J8_MILDOT { @@ -336,27 +270,14 @@ class CfgWeapons { }; }; class R3F_J10: ItemCore { // http://www.scrome.com/assets/templates/flexibility/pdf/Scrome_Marksman_Scope_LTE_Datasheet_GB.pdf - ACE_ScopeZeroRange = 1400; // Inaccurate BDC reticle, designed to work with the vanilla ballistic and R3F values. - ACE_ScopeHeightAboveRail = 4.474; + ACE_ScopeHeightAboveRail = 4.474; // BDC reticle designed to work with the vanilla ballistic and R3F values only. ACE_ScopeAdjust_Vertical[] = {-10, 10}; ACE_ScopeAdjust_Horizontal[] = {-10, 10}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo: InventoryOpticsItem_Base_F { - class OpticsModes { - class J10 { - discreteDistance[] = {100}; - discreteDistanceInitIndex = 0; - }; - }; - }; }; class R3F_J10_MILDOT: R3F_J10 { - ACE_ScopeZeroRange = 100; ACE_ScopeAdjust_Vertical[] = {0, 20}; - ACE_ScopeAdjust_Horizontal[] = {-10, 10}; - ACE_ScopeAdjust_VerticalIncrement = 0.1; - ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class J10_MILDOT { @@ -414,6 +335,34 @@ class CfgWeapons { class R3F_OB50: ItemCore { ACE_ScopeHeightAboveRail = 4.13217; }; + class R3F_SB_PM: ItemCore { // Off-center BDC reticle designed to work with the vanilla ballistic and R3F values only. + ACE_ScopeAdjust_Vertical[] = {0, 12}; // https://www.schmidtundbender.de/en/products/police-military-forces/1-8x24-pm-ii-shortdot-dual-cc.html + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo: InventoryOpticsItem_Base_F { + class OpticsModes { + class SB_PM { + discreteDistance[] = {100}; + discreteDistanceInitIndex = 0; + distanceZoomMin = 100; + distanceZoomMax = 1200; + }; + }; + }; + }; + class R3F_SB_PM_BLACK: R3F_SB_PM { + class ItemInfo: InventoryOpticsItem_Base_F { + class OpticsModes { + class SB_PM { + discreteDistance[] = {100}; + discreteDistanceInitIndex = 0; + distanceZoomMin = 100; + distanceZoomMax = 1200; + }; + }; + }; + }; class InventoryMuzzleItem_Base_F; class R3F_SILENCIEUX_HK416: ItemCore { class ItemInfo: InventoryMuzzleItem_Base_F { @@ -511,27 +460,59 @@ class CfgWeapons { }; }; }; + class R3F_SILENCIEUX_SCAR_H_PR: ItemCore { + class ItemInfo: InventoryMuzzleItem_Base_F { + class MagazineCoef { + initSpeed = 1.0; + }; + + class AmmoCoef { + hit = 1.0; + visibleFire = 0.5; + audibleFire = 0.1; + visibleFireTime = 0.5; + audibleFireTime = 0.5; + cost = 1.0; + typicalSpeed = 1.0; + airFriction = 1.0; + }; + + class MuzzleCoef { + dispersionCoef = "0.95f"; + artilleryDispersionCoef = "1.0f"; + fireLightCoef = "0.5f"; + recoilCoef = "0.95f"; + recoilProneCoef = "0.95f"; + minRangeCoef = "1.0f"; + minRangeProbabCoef = "1.0f"; + midRangeCoef = "1.0f"; + midRangeProbabCoef = "1.0f"; + maxRangeCoef = "1.0f"; + maxRangeProbabCoef = "1.0f"; + }; + }; + }; }; class ACE_ATragMX_Presets { class R3F_PGM_Hecate_II { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F PGM M33", 780, 100, 0.0845596, -0.00062115, 6.35, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM", {{-15, 761},{0, 768},{10, 775},{15, 780},{25, 794},{30, 803},{35, 814}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; + preset[] = {"R3F PGM M33", 780, 100, 0.0845596, -0.00086, 6.35, 0, 2, 10, 120, 0, 0, 41.92, 12.18, 38.10, 0.670, 1, "ASM", {{-15, 761},{0, 768},{10, 775},{15, 780},{25, 794},{30, 803},{35, 814}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; }; class R3F_M107 { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F M107 M33", 850, 100, 0.0841653, -0.000601, 7.62, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM", {{-15, 831},{0, 838},{10, 845},{15, 850},{25, 864},{30, 873},{35, 884}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; + preset[] = {"R3F M107 M33", 850, 100, 0.0841653, -0.00061813, 7.62, 0, 2, 10, 120, 0, 0, 41.92, 12.19, 38.10, 0.670, 1, "ASM", {{-15, 831},{0, 838},{10, 845},{15, 850},{25, 864},{30, 873},{35, 884}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; }; class R3F_TAC50 { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F TAC50 M33", 820, 100, 0.0872461, -0.00060964, 7.62, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM", {{-15, 801},{0, 808},{10, 815},{15, 820},{25, 834},{30, 843},{35, 854}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; + preset[] = {"R3F TAC50 AMAX", 823, 100, 0.0848384, -0.00038793, 7.37, 0, 2, 10, 120, 0, 0, 48.6, 12.44, 38.10, 1.050, 1, "ICAO", {{-15, 804},{0, 811},{10, 818},{15, 823},{25, 837},{30, 846},{35, 857}}, {{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0},{0, 0}}}; }; class R3F_FRF2 { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F FRF2 M993", 850, 100, 0.0783702, -0.00110718, 6.35, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 29.46, 0.359, 1, "ICAO", {{-15, 831},{0, 838},{10, 845},{15, 850},{25, 864},{30, 873},{35, 884}}, {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}; + preset[] = {"R3F FRF2 M993", 850, 100, 0.0783702, -0.00095, 6.35, 0, 2, 10, 120, 0, 0, 8.23, 7.35, 29.46, 0.359, 1, "ICAO", {{-15, 831},{0, 838},{10, 845},{15, 850},{25, 864},{30, 873},{35, 884}}, {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}; }; class R3F_HK417L { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F HK417L M80", 820, 100, 0.0884448, -0.00103711, 7.62, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 27.94, 0.398, 1, "ICAO", {{-15, 801},{0, 808},{10, 815},{15, 820},{25, 834},{30, 843},{35, 854}}, {{200, 0.398}, {400, 0.398}, {600, 0.398}, {800, 0.39}, {1000, 0.383}, {1200, 0.379}, {1400, 0.378}}}; + preset[] = {"R3F HK417L M80", 820, 100, 0.0884758, -0.00095, 7.62, 0, 2, 10, 120, 0, 0, 9.46, 8.02, 27.94, 0.394, 1, "ICAO", {{-15, 801},{0, 808},{10, 815},{15, 820},{25, 834},{30, 843},{35, 854}}, {{0, 0.394}, {700, 0.394}, {800, 0.391}, {900, 0.386}, {1000, 0.383}, {1100, 0.381}, {1300, 0.379}}}; }; }; diff --git a/optionals/compat_r3f/config.cpp b/optionals/compat_r3f/config.cpp index 90218d7f04..2790068152 100644 --- a/optionals/compat_r3f/config.cpp +++ b/optionals/compat_r3f/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"r3f_armes_c", "R3F_G17_addons", "r3f_acc"}; + requiredAddons[] = {"r3f_armes_c", "r3f_acc", "R3F_G17_addons", "R3F_G_SCAR", "R3F_SCAR_H", "R3F_SCAR_L", "R3F_FN_MAG"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_rh_acc/CfgWeapons.hpp b/optionals/compat_rh_acc/CfgWeapons.hpp index 001506ce8d..85c5725523 100644 --- a/optionals/compat_rh_acc/CfgWeapons.hpp +++ b/optionals/compat_rh_acc/CfgWeapons.hpp @@ -5,7 +5,7 @@ class CfgWeapons { /* Scopes */ class InventoryOpticsItem_Base_F; - class RH_shortdot : ItemCore { + class RH_shortdot: ItemCore { ACE_ScopeHeightAboveRail = 4.40511; /* // This would require MOA turrets ACE_ScopeAdjust_Vertical[] = { -1, 25 }; @@ -15,13 +15,13 @@ class CfgWeapons { */ }; - class RH_accupoint : ItemCore { + class RH_accupoint: ItemCore { ACE_ScopeHeightAboveRail = 3.726; ACE_ScopeAdjust_Vertical[] = { -4, 30 }; ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class Accupoint { discreteDistance[] = { 100 }; @@ -31,13 +31,13 @@ class CfgWeapons { }; }; - class RH_m3lr : ItemCore { + class RH_m3lr: ItemCore { ACE_ScopeHeightAboveRail = 3.5751; ACE_ScopeAdjust_Vertical[] = { -4, 30 }; ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class m3lr { discreteDistance[] = { 100 }; @@ -47,13 +47,13 @@ class CfgWeapons { }; }; - class RH_leu_mk4 : ItemCore { + class RH_leu_mk4: ItemCore { ACE_ScopeHeightAboveRail = 4.64216; ACE_ScopeAdjust_Vertical[] = { -4, 30 }; ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class mk4 { discreteDistance[] = { 100 }; @@ -63,13 +63,13 @@ class CfgWeapons { }; }; - class RH_c79 : ItemCore { + class RH_c79: ItemCore { ACE_ScopeHeightAboveRail = 4.16731; ACE_ScopeAdjust_Vertical[] = { -4, 30 }; ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class c79scope { discreteDistance[] = { 100 }; @@ -79,13 +79,13 @@ class CfgWeapons { }; }; - class RH_c79_2d : ItemCore { + class RH_c79_2d: ItemCore { ACE_ScopeHeightAboveRail = 4.16731; ACE_ScopeAdjust_Vertical[] = { -4, 30 }; ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class c79scope { discreteDistance[] = { 100 }; @@ -95,13 +95,13 @@ class CfgWeapons { }; }; - class RH_anpvs10 : ItemCore { + class RH_anpvs10: ItemCore { ACE_ScopeHeightAboveRail = 2.64379; ACE_ScopeAdjust_Vertical[] = { -4, 30 }; ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class pvs10 { discreteDistance[] = { 100 }; @@ -111,13 +111,13 @@ class CfgWeapons { }; }; - class RH_pas13cm : ItemCore { + class RH_pas13cm: ItemCore { ACE_ScopeHeightAboveRail = 10.601; ACE_ScopeAdjust_Vertical[] = { -4, 30 }; ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class MTWS { discreteDistance[] = { 100 }; @@ -127,13 +127,13 @@ class CfgWeapons { }; }; - class RH_pas13cmg : ItemCore { + class RH_pas13cmg: ItemCore { ACE_ScopeHeightAboveRail = 10.601; ACE_ScopeAdjust_Vertical[] = { -4, 30 }; ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class MTWSmg { discreteDistance[] = { 100 }; @@ -143,13 +143,13 @@ class CfgWeapons { }; }; - class RH_pas13ch : ItemCore { + class RH_pas13ch: ItemCore { ACE_ScopeHeightAboveRail = 10.6017; ACE_ScopeAdjust_Vertical[] = { -4, 30 }; ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class HTWS { discreteDistance[] = { 100 }; diff --git a/optionals/compat_rh_de/CfgAmmo.hpp b/optionals/compat_rh_de/CfgAmmo.hpp index 2297d89023..cb6254ad5c 100644 --- a/optionals/compat_rh_de/CfgAmmo.hpp +++ b/optionals/compat_rh_de/CfgAmmo.hpp @@ -1,9 +1,6 @@ - -class CfgAmmo -{ - class BulletBase; - class RH_50_AE_Ball: BulletBase - { +class CfgAmmo { + class BulletBase; + class RH_50_AE_Ball: BulletBase { ACE_caliber=12.7; ACE_bulletLength=28.194; ACE_bulletMass=21.06; @@ -14,9 +11,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={360, 398, 420}; ACE_barrelLengths[]={101.6, 152.4, 228.6}; - }; - class RH_454_Casull: BulletBase - { + }; + class RH_454_Casull: BulletBase { ACE_caliber=11.481; ACE_bulletLength=22.733; ACE_bulletMass=21.06; @@ -27,9 +23,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={450, 490, 500}; ACE_barrelLengths[]={101.6, 190.5, 228.6}; - }; - class RH_32ACP: BulletBase - { + }; + class RH_32ACP: BulletBase { ACE_caliber=7.938; ACE_bulletLength=15.494; ACE_bulletMass=4.212; @@ -40,9 +35,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={282, 300, 320}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; - }; - class RH_45ACP: BulletBase - { + }; + class RH_45ACP: BulletBase { ACE_caliber=11.481; ACE_bulletLength=17.272; ACE_bulletMass=14.904; @@ -53,9 +47,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={230, 250, 285}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; - }; - class RH_B_40SW: BulletBase - { + }; + class RH_B_40SW: BulletBase { ACE_caliber=10.16; ACE_bulletLength=11.354; ACE_bulletMass=8.748; @@ -66,9 +59,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={360, 380, 400}; ACE_barrelLengths[]={101.6, 152.4, 228.6}; - }; - class RH_44mag_ball: BulletBase - { + }; + class RH_44mag_ball: BulletBase { ACE_caliber=10.897; ACE_bulletLength=20.422; ACE_bulletMass=12.96; @@ -79,9 +71,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={360, 390, 420}; ACE_barrelLengths[]={101.6, 190.5, 228.6}; - }; - class RH_357mag_ball: BulletBase - { + }; + class RH_357mag_ball: BulletBase { ACE_caliber=9.068; ACE_bulletLength=13.741; ACE_bulletMass=8.1; @@ -92,9 +83,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={490, 510, 535}; ACE_barrelLengths[]={101.6, 152.4, 228.6}; - }; - class RH_762x25: BulletBase - { + }; + class RH_762x25: BulletBase { ACE_caliber=7.874; ACE_bulletLength=13.856; ACE_bulletMass=5.5728; @@ -105,9 +95,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={360, 380, 400}; ACE_barrelLengths[]={101.6, 152.4, 228.6}; - }; - class RH_9x18_Ball: BulletBase - { + }; + class RH_9x18_Ball: BulletBase { ACE_caliber=9.271; ACE_bulletLength=15.494; ACE_bulletMass=6.00048; @@ -118,9 +107,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={298, 330, 350}; ACE_barrelLengths[]={96.52, 127.0, 228.6}; - }; - class RH_B_9x19_Ball: BulletBase - { + }; + class RH_B_9x19_Ball: BulletBase { ACE_caliber=9.017; ACE_bulletLength=15.494; ACE_bulletMass=8.0352; @@ -131,9 +119,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={340, 370, 400}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; - }; - class RH_B_22LR_SD: BulletBase - { + }; + class RH_B_22LR_SD: BulletBase { ACE_caliber=5.664; ACE_bulletLength=11.43; ACE_bulletMass=2.4624; @@ -144,9 +131,8 @@ class CfgAmmo ACE_dragModel=1; ACE_muzzleVelocities[]={330, 340, 360}; ACE_barrelLengths[]={101.6, 152.4, 228.6}; - }; - class RH_57x28mm: BulletBase - { + }; + class RH_57x28mm: BulletBase { ACE_caliber=5.69; ACE_bulletLength=12.573; ACE_bulletMass=1.8144; @@ -158,4 +144,4 @@ class CfgAmmo ACE_muzzleVelocities[]={550, 625, 720}; ACE_barrelLengths[]={101.6, 152.4, 262.89}; }; -}; \ No newline at end of file +}; diff --git a/optionals/compat_rh_de/CfgWeapons.hpp b/optionals/compat_rh_de/CfgWeapons.hpp index eb7d902a8b..ed8322e356 100644 --- a/optionals/compat_rh_de/CfgWeapons.hpp +++ b/optionals/compat_rh_de/CfgWeapons.hpp @@ -1,140 +1,112 @@ -class CfgWeapons -{ +class CfgWeapons { class Pistol_Base_F; class RH_Pistol_Base_F; - class RH_deagle: RH_Pistol_Base_F - { + class RH_deagle: RH_Pistol_Base_F { ACE_barrelTwist=482.6; ACE_barrelLength=152.4; }; - class RH_mateba: Pistol_Base_F - { + class RH_mateba: Pistol_Base_F { ACE_barrelTwist=355.6; ACE_barrelLength=152.4; }; - class RH_mp412: Pistol_Base_F - { + class RH_mp412: Pistol_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=152.4; }; - class RH_python: Pistol_Base_F - { + class RH_python: Pistol_Base_F { ACE_barrelTwist=355.6; ACE_barrelLength=152.4; }; - class RH_bull: RH_python - { + class RH_bull: RH_python { ACE_barrelTwist=609.6; ACE_barrelLength=165.1; }; - class RH_ttracker: Pistol_Base_F - { + class RH_ttracker: Pistol_Base_F { ACE_barrelTwist=304.8; ACE_barrelLength=101.6; }; - class RH_cz75: RH_Pistol_Base_F - { + class RH_cz75: RH_Pistol_Base_F { ACE_barrelTwist=246.38; ACE_barrelLength=119.38; }; - class RH_p226: RH_Pistol_Base_F - { + class RH_p226: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=111.76; }; - class RH_sw659: RH_Pistol_Base_F - { + class RH_sw659: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=188.976; }; - class RH_usp: RH_Pistol_Base_F - { + class RH_usp: RH_Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=112.014; }; - class RH_uspm: RH_Pistol_Base_F - { + class RH_uspm: RH_Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=152.4; }; - class RH_kimber: RH_Pistol_Base_F - { + class RH_kimber: RH_Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=127.0; }; - class RH_m1911: RH_Pistol_Base_F - { + class RH_m1911: RH_Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=127.0; }; - class RH_tt33: RH_Pistol_Base_F - { + class RH_tt33: RH_Pistol_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=116.84; }; - class RH_mak: RH_Pistol_Base_F - { + class RH_mak: RH_Pistol_Base_F { ACE_barrelTwist=240.03; ACE_barrelLength=93.472; }; - class RH_mk2: RH_Pistol_Base_F - { + class RH_mk2: RH_Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=101.6; }; - class RH_m9: RH_Pistol_Base_F - { + class RH_m9: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=124.46; }; - class RH_g18: RH_Pistol_Base_F - { + class RH_g18: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=114.046; }; - class RH_g17: RH_Pistol_Base_F - { + class RH_g17: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=114.046; }; - class RH_g19: RH_Pistol_Base_F - { + class RH_g19: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=101.6; }; - class RH_gsh18: RH_Pistol_Base_F - { + class RH_gsh18: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=104.14; }; - class RH_fnp45: RH_Pistol_Base_F - { + class RH_fnp45: RH_Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=114.3; }; - class RH_fn57: RH_fnp45 - { + class RH_fn57: RH_fnp45 { ACE_barrelTwist=231.14; ACE_barrelLength=121.92; }; - class RH_vp70: RH_Pistol_Base_F - { + class RH_vp70: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=116.84; }; - class RH_vz61: RH_Pistol_Base_F - { + class RH_vz61: RH_Pistol_Base_F { ACE_barrelTwist=406.4; ACE_barrelLength=114.3; }; - class RH_tec9: RH_Pistol_Base_F - { + class RH_tec9: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=127.0; }; - class RH_muzi: RH_Pistol_Base_F - { + class RH_muzi: RH_Pistol_Base_F { ACE_barrelTwist=248.92; ACE_barrelLength=127.0; }; -}; \ No newline at end of file +}; diff --git a/optionals/compat_rh_m4/CfgAmmo.hpp b/optionals/compat_rh_m4/CfgAmmo.hpp index 763d96e3e7..5029cff22b 100644 --- a/optionals/compat_rh_m4/CfgAmmo.hpp +++ b/optionals/compat_rh_m4/CfgAmmo.hpp @@ -8,8 +8,7 @@ class CfgAmmo { class B_65x39_Caseless; class B_762x51_Ball; - class RH_9x19_B_M822: BulletBase - { + class RH_9x19_B_M822: BulletBase { ACE_caliber=9.017; ACE_bulletLength=15.494; ACE_bulletMass=8.0352; @@ -21,8 +20,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={340, 370, 400}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class RH_9x19_B_HP: BulletBase - { + class RH_9x19_B_HP: BulletBase { ACE_caliber=9.017; ACE_bulletLength=15.494; ACE_bulletMass=8.0352; @@ -34,8 +32,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={340, 370, 400}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class RH_9x19_B_HPSB: BulletBase - { + class RH_9x19_B_HPSB: BulletBase { ACE_caliber=9.017; ACE_bulletLength=15.316; ACE_bulletMass=9.5256; @@ -47,8 +44,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={295, 310, 330}; ACE_barrelLengths[]={101.6, 127.0, 228.6}; }; - class RH_556x45_B_M855A1: B_556x45_Ball - { + class RH_556x45_B_M855A1: B_556x45_Ball { ACE_caliber=5.69; ACE_bulletLength=23.012; ACE_bulletMass=4.0176; @@ -60,8 +56,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900}; ACE_barrelLengths[]={210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6}; }; - class RH_556x45_B_Mk318: B_556x45_Ball - { + class RH_556x45_B_Mk318: B_556x45_Ball { ACE_caliber=5.69; ACE_bulletLength=23.012; ACE_bulletMass=4.0176; @@ -73,8 +68,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={780, 886, 950}; ACE_barrelLengths[]={254.0, 393.7, 508.0}; }; - class RH_556x45_B_Mk262: B_556x45_Ball - { + class RH_556x45_B_Mk262: B_556x45_Ball { ACE_caliber=5.69; ACE_bulletLength=23.012; ACE_bulletMass=4.9896; @@ -86,8 +80,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={624, 816, 832, 838}; ACE_barrelLengths[]={190.5, 368.3, 457.2, 508.0}; }; - class RH_68x43_B_FMJ: B_65x39_Caseless - { + class RH_68x43_B_FMJ: B_65x39_Caseless { ACE_caliber=7.036; ACE_bulletLength=24.359; ACE_bulletMass=7.452; @@ -99,8 +92,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={713, 785, 810, 850}; ACE_barrelLengths[]={304.8, 406.4, 508.0, 609.6}; }; - class RH_68x43_B_Match: B_65x39_Caseless - { + class RH_68x43_B_Match: B_65x39_Caseless { ACE_caliber=7.036; ACE_bulletLength=31.75; ACE_bulletMass=8.748; @@ -111,9 +103,8 @@ class CfgAmmo { ACE_dragModel=7; ACE_muzzleVelocities[]={700, 732, 750, 780}; ACE_barrelLengths[]={304.8, 406.4, 508.0, 609.6}; - }; - class RH_762x35_B_FMJ: B_65x39_Caseless - { + }; + class RH_762x35_B_FMJ: B_65x39_Caseless { ACE_caliber=7.823; ACE_bulletLength=28.397; ACE_bulletMass=9.5256; @@ -125,8 +116,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={559, 609, 625}; ACE_barrelLengths[]={152.4, 406.4, 508.0}; }; - class RH_762x35_B_Match: B_65x39_Caseless - { + class RH_762x35_B_Match: B_65x39_Caseless { ACE_caliber=7.823; ACE_bulletLength=29.286; ACE_bulletMass=8.1; @@ -138,8 +128,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={572, 676, 700}; ACE_barrelLengths[]={152.4, 406.4, 508.0}; }; - class RH_762x35_B_MSB: B_65x39_Caseless - { + class RH_762x35_B_MSB: B_65x39_Caseless { ACE_caliber=7.823; ACE_bulletLength=37.821; ACE_bulletMass=14.256; @@ -151,8 +140,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={300, 320, 340}; ACE_barrelLengths[]={228.6, 406.4, 508.0}; }; - class RH_762x51_B_M80A1: B_762x51_Ball - { + class RH_762x51_B_M80A1: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=28.956; ACE_bulletMass=9.4608; @@ -164,8 +152,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={700, 800, 820, 833, 845}; ACE_barrelLengths[]={254.0, 406.4, 508.0, 609.6, 660.4}; }; - class RH_762x51_B_Mk316LR: B_762x51_Ball - { + class RH_762x51_B_Mk316LR: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=31.496; ACE_bulletMass=11.34; @@ -177,8 +164,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={775, 790, 805, 810}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class RH_762x51_B_Mk319: B_762x51_Ball - { + class RH_762x51_B_Mk319: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=31.496; ACE_bulletMass=8.424; @@ -190,8 +176,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={838, 892, 910}; ACE_barrelLengths[]={330.2, 406.4, 508.0}; }; - class RH_762x51_B_LFMJSB: B_762x51_Ball - { + class RH_762x51_B_LFMJSB: B_762x51_Ball { ACE_caliber=7.823; ACE_bulletLength=34.036; ACE_bulletMass=12.96; diff --git a/optionals/compat_rh_m4/CfgWeapons.hpp b/optionals/compat_rh_m4/CfgWeapons.hpp index ad612383d1..2156dd9399 100644 --- a/optionals/compat_rh_m4/CfgWeapons.hpp +++ b/optionals/compat_rh_m4/CfgWeapons.hpp @@ -1,130 +1,103 @@ - -class CfgWeapons -{ +class CfgWeapons { class Rifle_Base_F; - class RH_ar10: Rifle_Base_F - { + class RH_ar10: Rifle_Base_F { ACE_barrelTwist=285.75; ACE_barrelLength=528.32; }; - class RH_m110: Rifle_Base_F - { + class RH_m110: Rifle_Base_F { ACE_barrelTwist=254.0; ACE_barrelLength=508.0; }; - class RH_Mk11: RH_m110 - { + class RH_Mk11: RH_m110 { ACE_barrelTwist=285.75; ACE_barrelLength=609.6; }; - class RH_SR25EC: RH_m110 - { + class RH_SR25EC: RH_m110 { ACE_barrelTwist=285.75; ACE_barrelLength=508.0; }; - class RH_m4: Rifle_Base_F - { + class RH_m4: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class RH_M4_ris: RH_m4 - { + class RH_M4_ris: RH_m4 { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class RH_M4A1_ris: RH_M4_ris - { + class RH_M4A1_ris: RH_M4_ris { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class RH_M4m: RH_M4A1_ris - { + class RH_M4m: RH_M4A1_ris { ACE_barrelTwist=177.8; ACE_barrelLength=266.7; }; - class RH_M4sbr: RH_M4A1_ris - { + class RH_M4sbr: RH_M4A1_ris { ACE_barrelTwist=177.8; ACE_barrelLength=266.7; }; - class RH_hb: Rifle_Base_F - { + class RH_hb: Rifle_Base_F { ACE_barrelTwist=203.2; ACE_barrelLength=152.4; }; - class RH_hb_b: RH_hb - { + class RH_hb_b: RH_hb { ACE_barrelTwist=203.2; ACE_barrelLength=152.4; }; - class RH_sbr9: Rifle_Base_F - { - ACE_barrelTwist=246.38; - ACE_barrelLength=228.6; + class RH_sbr9: Rifle_Base_F { + ACE_barrelTwist=246.38; + ACE_barrelLength=228.6; }; - class RH_M4A6: RH_M4A1_ris - { + class RH_M4A6: RH_M4A1_ris { ACE_barrelTwist=254.0; ACE_barrelLength=368.3; }; - class RH_M16a1: RH_m4 - { + class RH_M16a1: RH_m4 { ACE_barrelTwist=355.6; ACE_barrelLength=508.0; }; - class RH_M16A2: RH_m4 - { + class RH_M16A2: RH_m4 { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class RH_M16A4 : RH_M4_ris - { + class RH_M16A4: RH_M4_ris { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class RH_M16A3: RH_M16A4 - { + class RH_M16A3: RH_M16A4 { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class RH_M16A4_m: RH_M16A4 - { + class RH_M16A4_m: RH_M16A4 { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class RH_M16A6: RH_M16A4 - { + class RH_M16A6: RH_M16A4 { ACE_barrelTwist=177.8; ACE_barrelLength=508.0; }; - class RH_Mk12mod1: RH_M16A4 - { + class RH_Mk12mod1: RH_M16A4 { ACE_barrelTwist=177.8; ACE_barrelLength=457.2; }; - class RH_SAMR: RH_Mk12mod1 - { + class RH_SAMR: RH_Mk12mod1 { ACE_barrelTwist=195.58; ACE_barrelLength=508.0; }; - class RH_Hk416: RH_M4A1_ris - { + class RH_Hk416: RH_M4A1_ris { ACE_barrelTwist=177.8; ACE_barrelLength=368.3; }; - class RH_Hk416s: RH_M4sbr - { + class RH_Hk416s: RH_M4sbr { ACE_barrelTwist=177.8; ACE_barrelLength=264.16; }; - class RH_Hk416c: RH_M4sbr - { + class RH_Hk416c: RH_M4sbr { ACE_barrelTwist=177.8; ACE_barrelLength=228.6; }; - class RH_M27IAR: RH_Mk12mod1 - { + class RH_M27IAR: RH_Mk12mod1 { ACE_barrelTwist=177.8; ACE_barrelLength=419.1; }; -}; \ No newline at end of file +}; diff --git a/optionals/compat_rh_pdw/CfgAmmo.hpp b/optionals/compat_rh_pdw/CfgAmmo.hpp index 9474ec47eb..7c5e8a45a8 100644 --- a/optionals/compat_rh_pdw/CfgAmmo.hpp +++ b/optionals/compat_rh_pdw/CfgAmmo.hpp @@ -1,15 +1,13 @@ - class BulletBase; -class RH_B_6x35: BulletBase -{ - ACE_caliber=5.69; - ACE_bulletLength=11.303; - ACE_bulletMass=4.212; - ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; - ACE_ballisticCoefficients[]={0.26}; - ACE_velocityBoundaries[]={}; - ACE_standardAtmosphere="ASM"; - ACE_dragModel=1; - ACE_muzzleVelocities[]={730, 750, 760}; - ACE_barrelLengths[]={203.2, 254.0, 304.8}; -}; \ No newline at end of file +class RH_B_6x35: BulletBase { + ACE_caliber=5.69; + ACE_bulletLength=11.303; + ACE_bulletMass=4.212; + ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19}; + ACE_ballisticCoefficients[]={0.26}; + ACE_velocityBoundaries[]={}; + ACE_standardAtmosphere="ASM"; + ACE_dragModel=1; + ACE_muzzleVelocities[]={730, 750, 760}; + ACE_barrelLengths[]={203.2, 254.0, 304.8}; +}; diff --git a/optionals/compat_rh_pdw/CfgWeapons.hpp b/optionals/compat_rh_pdw/CfgWeapons.hpp index 37e7f7ffb4..e64a9f2e67 100644 --- a/optionals/compat_rh_pdw/CfgWeapons.hpp +++ b/optionals/compat_rh_pdw/CfgWeapons.hpp @@ -1,10 +1,7 @@ - -class CfgWeapons -{ - class Rifle_Base_F; - class RH_PDW: Rifle_Base_F - { +class CfgWeapons { + class Rifle_Base_F; + class RH_PDW: Rifle_Base_F { ACE_barrelTwist=177.8; ACE_barrelLength=254.0; - }; + }; }; diff --git a/optionals/compat_rhs_afrf3/CfgAmmo.hpp b/optionals/compat_rhs_afrf3/CfgAmmo.hpp index e4645f3765..a825ebe015 100644 --- a/optionals/compat_rhs_afrf3/CfgAmmo.hpp +++ b/optionals/compat_rhs_afrf3/CfgAmmo.hpp @@ -179,11 +179,13 @@ class CfgAmmo { ace_frag_classes[] = {"ACE_frag_medium_HD"}; ace_frag_skip = 0; ace_frag_force = 1; + EGVAR(vehicle_damage,incendiary) = 0.1; }; class rhs_rpg7v2_tbg7v: rhs_rpg7v2_pg7vl { ace_frag_enabled = 0; ace_frag_skip = 1; ace_frag_force = 0; + EGVAR(vehicle_damage,incendiary) = 0.7; }; class rhs_rshg2_rocket: rhs_rpg7v2_tbg7v { ace_frag_enabled = 0; @@ -254,4 +256,45 @@ class CfgAmmo { class rhs_mine_ozm72_c_ammo: rhs_mine_ozm72_a_ammo { ace_explosives_defuseObjectPosition[] = {0, -0.015, 0.12}; }; + class Sh_125mm_APFSDS; + class Sh_125mm_HE; + class rhs_ammo_bm_base: Sh_125mm_APFSDS { + EGVAR(vehicle_damage,incendiary) = 0.1; + }; + class rhs_ammo_bk_base: rhs_ammo_bm_base { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + class rhs_ammo_3bm_base: rhs_ammo_bm_base {}; + class rhs_ammo_of_base: Sh_125mm_HE { + EGVAR(vehicle_damage,incendiary) = 0.30; + }; + class rhs_ammo_base_penetrator: rhs_ammo_3bm_base { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + class rhs_ammo_ap_penetrator: Sh_125mm_APFSDS { + EGVAR(vehicle_damage,incendiary) = 0.1; + }; + + class M_Titan_AT; + class rhs_ammo_atgmCore_base: M_Titan_AT { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + class rhs_ammo_atgmBase_base: M_Titan_AT { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + + class rhs_ammo_rpgShell_base; + class rhs_ammo_og9v: rhs_ammo_rpgShell_base { + EGVAR(vehicle_damage,incendiary) = 0.1; + }; + + class rhs_ammo_rpg15Shell_base; + class rhs_ammo_og15v: rhs_ammo_rpg15Shell_base { + EGVAR(vehicle_damage,incendiary) = 0.1; + }; + + class B_30mm_AP; + class rhs_ammo_30x165mm_base: B_30mm_AP { + EGVAR(vehicle_damage,incendiary) = 0.2; + }; }; diff --git a/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp b/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp index 0d3301d6e0..f6503c2479 100644 --- a/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp +++ b/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp @@ -1,17 +1,17 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/optionals/compat_rhs_afrf3/CfgMagazines.hpp b/optionals/compat_rhs_afrf3/CfgMagazines.hpp index 5a14b037fa..1cbc43ce08 100644 --- a/optionals/compat_rhs_afrf3/CfgMagazines.hpp +++ b/optionals/compat_rhs_afrf3/CfgMagazines.hpp @@ -11,7 +11,7 @@ class cfgMagazines { class rhs_mag_127x108mm_150: rhs_mag_127x108mm_50 { ace_isbelt = 0; }; - class rhs_mag_127x108mm_1470 : rhs_mag_127x108mm_50 { + class rhs_mag_127x108mm_1470: rhs_mag_127x108mm_50 { ace_isbelt = 0; }; class RHS_mag_VOG30_30: VehicleMagazine { diff --git a/optionals/compat_rhs_afrf3/CfgVehicles.hpp b/optionals/compat_rhs_afrf3/CfgVehicles.hpp index 37b025ecc5..94dcb00948 100644 --- a/optionals/compat_rhs_afrf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_afrf3/CfgVehicles.hpp @@ -24,8 +24,7 @@ class CfgVehicles { class Wheeled_APC_F: Car_F { class NewTurret; class Turrets { - class MainTurret: NewTurret - { + class MainTurret: NewTurret { class ViewOptics; }; }; @@ -40,30 +39,27 @@ class CfgVehicles { class MainTurret; }; }; - - - class rhs_bmd_base: Tank_F { - EGVAR(refuel,fuelCapacity) = 300; - }; - class rhs_bmp1tank_base: Tank_F { - EGVAR(map,vehicleLightColor)[] = {0,1,0,0.1}; - EGVAR(refuel,fuelCapacity) = 460; - }; - class rhs_bmp3tank_base: Tank_F { - EGVAR(refuel,fuelCapacity) = 460; + + class rhs_tank_base: Tank_F { + EGVAR(refuel,fuelCapacity) = 1200; + EGVAR(vehicle_damage,hullDetonationProb) = 0.8; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0.2; + EGVAR(vehicle_damage,hullFireProb) = 0.8; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.5; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.2; }; class rhs_btr_base: Wheeled_APC_F { EGVAR(map,vehicleLightColor)[] = {0,0,1,0.1}; EGVAR(refuel,fuelCapacity) = 300; - }; - class rhs_a3spruttank_base: Tank_F { - EGVAR(refuel,fuelCapacity) = 400; - }; - class rhs_a3t72tank_base: Tank_F { - EGVAR(refuel,fuelCapacity) = 1200; - }; - class rhs_tank_base: Tank_F { - EGVAR(refuel,fuelCapacity) = 1200; + EGVAR(vehicle_damage,hullDetonationProb) = 0.2; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.7; + EGVAR(vehicle_damage,turretFireProb) = 0.7; + EGVAR(vehicle_damage,engineFireProb) = 0.7; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.5; }; class rhs_infantry_msv_base; @@ -145,6 +141,7 @@ class CfgVehicles { class rhs_t80b: rhs_tank_base { EGVAR(refuel,fuelCapacity) = 1100; + EGVAR(vehicle_damage,canHaveFireRing) = 1; }; class Truck_F: Car_F {}; class RHS_Ural_BaseTurret: Truck_F { @@ -163,6 +160,17 @@ class CfgVehicles { transportRepair = 0; EGVAR(repair,canRepair) = 1; }; + class RHS_Ural_Ammo_Base: RHS_Ural_Base { + transportAmmo = 0; + ace_rearm_defaultSupply = 1200; + }; + + class rhs_kraz255b1_base; + class rhs_kraz255b1_fuel_base: rhs_kraz255b1_base { + transportFuel = 0; + EGVAR(refuel,hooks)[] = {{-0.05,-3.6,-0.45}}; + EGVAR(refuel,fuelCargo) = 10000; + }; class rhs_truck: Truck_F { EGVAR(refuel,fuelCapacity) = 210; @@ -179,6 +187,12 @@ class CfgVehicles { ace_rearm_defaultSupply = 1200; }; + class rhs_kamaz5350: rhs_truck {}; + class rhs_kamaz5350_ammo_base: rhs_kamaz5350 { + transportAmmo = 0; + ace_rearm_defaultSupply = 1200; + }; + class MRAP_02_base_F; class rhs_tigr_base: MRAP_02_base_F { EGVAR(refuel,fuelCapacity) = 138; @@ -197,7 +211,15 @@ class CfgVehicles { class rhs_zsutank_base: APC_Tracked_02_base_F { EGVAR(refuel,fuelCapacity) = 515; - }; + EGVAR(vehicle_damage,hullDetonationProb) = 0; + EGVAR(vehicle_damage,turretDetonationProb) = 0; + EGVAR(vehicle_damage,engineDetonationProb) = 0.2; + EGVAR(vehicle_damage,hullFireProb) = 0.7; + EGVAR(vehicle_damage,turretFireProb) = 0.7; + EGVAR(vehicle_damage,engineFireProb) = 0.8; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.8; + EGVAR(vehicle_damage,canHaveFireRing) = 1; + }; class rhs_btr60_base: rhs_btr_base { EGVAR(refuel,fuelCapacity) = 290; @@ -219,6 +241,246 @@ class CfgVehicles { EGVAR(refuel,fuelCapacity) = 500; }; + class rhs_bmd_base: Tank_F { + EGVAR(refuel,fuelCapacity) = 300; + EGVAR(vehicle_damage,hullDetonationProb) = 0; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.8; + EGVAR(vehicle_damage,turretFireProb) = 0.5; + EGVAR(vehicle_damage,engineFireProb) = 0.8; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.5; + }; + class rhs_bmp1tank_base: Tank_F { + EGVAR(map,vehicleLightColor)[] = {0,1,0,0.1}; + EGVAR(refuel,fuelCapacity) = 460; + }; + class rhs_bmp3tank_base: Tank_F { + EGVAR(refuel,fuelCapacity) = 460; + EGVAR(vehicle_damage,hullDetonationProb) = 0.2; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.5; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.8; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.5; + }; + class rhs_a3spruttank_base: Tank_F { + EGVAR(refuel,fuelCapacity) = 400; + EGVAR(vehicle_damage,hullDetonationProb) = 0.2; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.5; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.8; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.5; + }; + class rhs_a3t72tank_base: Tank_F { + EGVAR(refuel,fuelCapacity) = 1200; + EGVAR(vehicle_damage,hullDetonationProb) = 0.8; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0.2; + EGVAR(vehicle_damage,hullFireProb) = 0.8; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.5; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.2; + }; + class rhs_bmp_base: rhs_bmp1tank_base { + EGVAR(vehicle_damage,hullDetonationProb) = 0; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.8; + EGVAR(vehicle_damage,turretFireProb) = 0.5; + EGVAR(vehicle_damage,engineFireProb) = 0.8; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.5; + }; + class rhs_t72bd_tv: rhs_a3t72tank_base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", "era_7_hitpoint", + "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", + "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", + "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", + "era_29_hitpoint", "era_30_hitpoint", "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", + "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", "era_41_hitpoint", "era_42_hitpoint", + "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint", "era_47_hitpoint", "era_48_hitpoint", "era_49_hitpoint", + "era_50_hitpoint", "era_51_hitpoint", "era_52_hitpoint", "era_53_hitpoint", "era_51_hitpoint", "era_55_hitpoint", "era_56_hitpoint", + "era_57_hitpoint", "era_58_hitpoint", "era_59_hitpoint", "era_60_hitpoint", "era_61_hitpoint", "era_62_hitpoint", "era_63_hitpoint", + "era_64_hitpoint", "era_65_hitpoint", "era_66_hitpoint", "era_67_hitpoint" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "SLAT_68_hitpoint", "SLAT_69_hitpoint", "SLAT_70_hitpoint" + }; + }; + class rhs_t90_tv: rhs_t72bd_tv { + EGVAR(vehicle_damage,hullDetonationProb) = 0; + EGVAR(vehicle_damage,turretDetonationProb) = 0; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.2; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.5; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0; + }; + + class rhs_t14_base: Tank_F { + EGVAR(vehicle_damage,hullDetonationProb) = 0; + EGVAR(vehicle_damage,turretDetonationProb) = 0; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.2; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.5; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0; + // Dear LORD RHS loves their ERA + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint", + "era_37_hitpoint", + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "SLAT_38_hitpoint", "SLAT_39_hitpoint", "SLAT_40_hitpoint", "SLAT_41_hitpoint" + }; + EGVAR(vehicle_damage,canHaveFireRing) = 1; + }; + + class rhs_t72bb_tv: rhs_a3t72tank_base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint", + "era_37_hitpoint", + }; + }; + + class rhs_t72bc_tv: rhs_a3t72tank_base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint" + }; + }; + + class rhs_t72be_tv: rhs_t72bd_tv { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "SLAT_51_hitpoint", "SLAT_52_hitpoint", "SLAT_53_hitpoint", + "SLAT_54_hitpoint", "SLAT_55_hitpoint", "SLAT_56_hitpoint", + "SLAT_57_hitpoint", "SLAT_68_hitpoint", "SLAT_69_hitpoint", + "SLAT_70_hitpoint" + }; + }; + + class rhs_t90a_tv: rhs_t90_tv {}; + class rhs_t90saa_tv: rhs_t90a_tv { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "SLAT_51_hitpoint", "SLAT_52_hitpoint", "SLAT_53_hitpoint", "SLAT_54_hitpoint" + }; + }; + class rhs_t90sab_tv: rhs_t90a_tv { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint", + "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", "era_41_hitpoint", "era_42_hitpoint", + "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint", "era_47_hitpoint", "era_48_hitpoint", + "era_49_hitpoint", "era_50_hitpoint" + }; + }; + class rhs_t90am_tv: rhs_t90_tv { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint", + "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", "era_41_hitpoint", "era_42_hitpoint", + "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint", "era_47_hitpoint", "era_48_hitpoint", + "era_49_hitpoint", "era_50_hitpoint", "era_51_hitpoint", "era_52_hitpoint", "era_53_hitpoint", "era_54_hitpoint", + "era_55_hitpoint", "era_56_hitpoint", "era_57_hitpoint", "era_58_hitpoint", "era_59_hitpoint", "era_60_hitpoint", + "era_51_hitpoint", "era_62_hitpoint", "era_63_hitpoint", "era_64_hitpoint", "era_65_hitpoint", "era_66_hitpoint" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "SLAT_18_hitpoint", "SLAT_19_hitpoint", "SLAT_20_hitpoint", "SLAT_21_hitpoint", + "SLAT_22_hitpoint", "SLAT_23_hitpoint", "SLAT_24_hitpoint", "SLAT_25_hitpoint", + "SLAT_51_hitpoint", "SLAT_52_hitpoint", "SLAT_53_hitpoint", "SLAT_54_hitpoint" + }; + }; + class rhs_t90sm_tv: rhs_t90am_tv { + EGVAR(vehicle_damage,slatHitpoints)[] = { + "SLAT_23_hitpoint", "SLAT_26_hitpoint", "SLAT_51_hitpoint", "SLAT_52_hitpoint", + "SLAT_53_hitpoint", "SLAT_54_hitpoint", "SLAT_55_hitpoint", "SLAT_56_hitpoint", + "SLAT_57_hitpoint" + }; + }; + + class rhs_t80bv: rhs_t80b { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint" + }; + }; + class rhs_t80a; + class rhs_t80u: rhs_t80a { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint" + }; + }; + class rhs_t80uk: rhs_t80u { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint" + }; + }; + class rhs_t80ue1: rhs_t80a { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", + "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", + "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", + "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", + "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint" + }; + }; + class StaticWeapon: LandVehicle { class ACE_Actions { class ACE_MainActions; @@ -270,6 +532,16 @@ class CfgVehicles { EGVAR(logistics_wirecutter,hasWirecutter) = 1; }; + class rhs_rk_sht_30_emr; + class rhs_rk_sht_30_emr_engineer: rhs_rk_sht_30_emr { + EGVAR(logistics_wirecutter,hasWirecutter) = 1; + }; + + class rhs_rk_sht_30_olive; + class rhs_rk_sht_30_olive_engineer: rhs_rk_sht_30_olive { + EGVAR(logistics_wirecutter,hasWirecutter) = 1; + }; + class StaticMortar: StaticWeapon {}; class rhs_2b14_82mm_Base: StaticMortar { class ACE_Actions: ACE_Actions { diff --git a/optionals/compat_rhs_afrf3/CfgWeapons.hpp b/optionals/compat_rhs_afrf3/CfgWeapons.hpp index fdfe7164e9..266c09b1df 100644 --- a/optionals/compat_rhs_afrf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_afrf3/CfgWeapons.hpp @@ -57,6 +57,11 @@ class CfgWeapons { class rhs_weap_svds_npz: rhs_weap_svds { ACE_RailHeightAboveBore = 4.3348; }; + class rhs_weap_rpk_base; + class rhs_weap_rpk74_base: rhs_weap_rpk_base { + ACE_barrelLength = 590.00; + ACE_barrelTwist = 195.072; + }; class rhs_pkp_base; class rhs_weap_pkp: rhs_pkp_base { ACE_barrelTwist = 240.03; @@ -67,10 +72,6 @@ class CfgWeapons { ACE_barrelTwist = 240.03; ACE_barrelLength = 645.16; }; - class rhs_weap_rpk74: rhs_weap_pkp { - ACE_barrelTwist = 195.072; - ACE_barrelLength = 589.28; - }; class rhs_weap_orsis_Base_F; class rhs_weap_t5000: rhs_weap_orsis_Base_F { // http://en.orsis.com/production/catalog/19046/ ACE_barrelTwist = 254.0; // 1:10" @@ -124,6 +125,10 @@ class CfgWeapons { class rhs_tsh4: H_HelmetB { HEARING_PROTECTION_VICCREW }; + + class rhs_6b48: H_HelmetB { + HEARING_PROTECTION_VICCREW + }; class rhs_zsh7a: H_HelmetB { HEARING_PROTECTION_VICCREW @@ -332,4 +337,9 @@ class CfgWeapons { modes[] = {}; picture = "\rhsafrf\addons\rhs_heavyweapons\data\ico\rhs_Kornet_9M133_2_msv_ca.paa"; }; + + class rhs_uniform_flora; + class rhs_uniform_df15: rhs_uniform_flora { + ACE_GForceCoef = 0.8; + }; }; diff --git a/optionals/compat_rhs_afrf3/config.cpp b/optionals/compat_rhs_afrf3/config.cpp index d6c08267d5..ddd2d598fe 100644 --- a/optionals/compat_rhs_afrf3/config.cpp +++ b/optionals/compat_rhs_afrf3/config.cpp @@ -5,9 +5,9 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; units[] = {}; - weapons[] = {}; + weapons[] = {QGVAR(2b14_carry), QGVAR(nsv_carry), QGVAR(kord_carry), QGVAR(ags30_carry), QGVAR(spg9_carry), QGVAR(spg9m_carry), QGVAR(metis_carry), QGVAR(kornet_carry)}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_explosives", "ace_csw", "ace_rearm", "ace_refuel", "ace_repair", "rhs_c_weapons", "rhs_c_airweapons", "rhs_c_troops", "rhs_c_bmd", "rhs_c_bmp", "rhs_c_bmp3", "rhs_c_a2port_armor", "rhs_c_btr", "rhs_c_sprut", "rhs_c_t72", "rhs_c_tanks", "rhs_c_a2port_air", "rhs_c_a2port_car", "rhs_c_cars", "rhs_c_trucks", "rhs_c_2s3", "rhs_c_rva", "rhs_c_heavyweapons"}; + requiredAddons[] = {"ace_explosives", "ace_csw", "ace_rearm", "ace_refuel", "ace_repair", "rhs_main_loadorder"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "commy2", "Skengman2"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_rhs_gref3/CfgAmmo.hpp b/optionals/compat_rhs_gref3/CfgAmmo.hpp index 19c93247b0..99b886734e 100644 --- a/optionals/compat_rhs_gref3/CfgAmmo.hpp +++ b/optionals/compat_rhs_gref3/CfgAmmo.hpp @@ -113,4 +113,15 @@ class CfgAmmo { class rhs_charge_M2tet_x2_ammo: DemoCharge_Remote_Ammo { ace_explosives_defuseObjectPosition[] = {0.095, 0, 0.055}; }; + + class rhs_ammo_3bk12_penetrator; + class rhsgref_ammo_rkg3em_penetrator: rhs_ammo_3bk12_penetrator { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + class rhs_ammo_rpg75_penetrator: rhs_ammo_3bk12_penetrator { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + class rhs_ammo_panzerfaust60_penetrator: rhs_ammo_3bk12_penetrator { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; }; diff --git a/optionals/compat_rhs_gref3/CfgVehicles.hpp b/optionals/compat_rhs_gref3/CfgVehicles.hpp index 34758110ae..b800d8b881 100644 --- a/optionals/compat_rhs_gref3/CfgVehicles.hpp +++ b/optionals/compat_rhs_gref3/CfgVehicles.hpp @@ -5,6 +5,17 @@ class CfgVehicles { EGVAR(refuel,canReceive) = 0; }; + class Wheeled_APC_F; + class rhsgref_BRDM2: Wheeled_APC_F { + GVAR(hullDetonationProb) = 0.2; + GVAR(turretDetonationProb) = 0.2; + GVAR(engineDetonationProb) = 0; + GVAR(hullFireProb) = 0.7; + GVAR(turretFireProb) = 0.7; + GVAR(engineFireProb) = 0.7; + GVAR(detonationDuringFireProb) = 0.5; + }; + class StaticMGWeapon; class rhs_DSHKM_base: StaticMGWeapon { // ENABLE_CSW_ATTRIBUTE; diff --git a/optionals/compat_rhs_gref3/CfgWeapons.hpp b/optionals/compat_rhs_gref3/CfgWeapons.hpp index d7c0418982..2b04217cf3 100644 --- a/optionals/compat_rhs_gref3/CfgWeapons.hpp +++ b/optionals/compat_rhs_gref3/CfgWeapons.hpp @@ -107,6 +107,14 @@ class CfgWeapons { ACE_barrelLength = 610.0; }; + class rhs_weap_Izh18: Rifle_Base_F { + ace_overheating_jamTypesAllowed[] = {"Fire", "Dud"}; + }; + + class rhs_weap_m79: Rifle_Base_F { + ace_overheating_jamTypesAllowed[] = {"Fire", "Dud"}; + }; + CREATE_CSW_PROXY(rhs_weap_DSHKM); class Launcher; diff --git a/optionals/compat_rhs_gref3/config.cpp b/optionals/compat_rhs_gref3/config.cpp index bc001ceb4c..5e9f6d21a0 100644 --- a/optionals/compat_rhs_gref3/config.cpp +++ b/optionals/compat_rhs_gref3/config.cpp @@ -5,9 +5,9 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; units[] = {}; - weapons[] = {}; + weapons[] = {QGVAR(dshkm_carry)}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_explosives", "ace_csw", "rhsgref_main", "rhsgref_c_weapons"}; + requiredAddons[] = {"ace_explosives", "ace_csw", "rhsgref_main_loadorder"}; author = ECSTRING(common,ACETeam); authors[] = {"PabstMirror", "Ruthberg", "Anton"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_rhs_saf3/CfgWeapons.hpp b/optionals/compat_rhs_saf3/CfgWeapons.hpp index e3cae125bc..b20dca276b 100644 --- a/optionals/compat_rhs_saf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_saf3/CfgWeapons.hpp @@ -63,4 +63,12 @@ class CfgWeapons { class rhs_weap_cz99: hgun_P07_F { ACE_barrelLength = 108; }; + + class Uniform_Base; + class rhssaf_uniform_mig29_pilot: Uniform_Base { + ACE_GForceCoef = 0.8; + }; + class rhssaf_uniform_heli_pilot: Uniform_Base { + ACE_GForceCoef = 0.8; + }; }; diff --git a/optionals/compat_rhs_saf3/config.cpp b/optionals/compat_rhs_saf3/config.cpp index 1abbb45dce..cb0981fc52 100644 --- a/optionals/compat_rhs_saf3/config.cpp +++ b/optionals/compat_rhs_saf3/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_explosives", "rhssaf_c_weapons", "rhssaf_main"}; + requiredAddons[] = {"ace_explosives", "rhssaf_main_loadorder"}; author = ECSTRING(common,ACETeam); authors[] = {}; url = ECSTRING(main,URL); diff --git a/optionals/compat_rhs_usf3/CfgAmmo.hpp b/optionals/compat_rhs_usf3/CfgAmmo.hpp index f2541bc8f4..dbf35096a7 100644 --- a/optionals/compat_rhs_usf3/CfgAmmo.hpp +++ b/optionals/compat_rhs_usf3/CfgAmmo.hpp @@ -26,6 +26,7 @@ class CfgAmmo { ACE_dragModel = 1; ACE_muzzleVelocities[] = {900}; ACE_barrelLengths[] = {736.6}; + EGVAR(vehicle_damage,incendiary) = 1.0; // Raufoss Mk 211 HEIAP (high-explosive, incendiary, armor-piercing) }; class B_762x54_Ball; class rhsusf_B_300winmag: B_762x54_Ball { // ACE_762x67_Ball_Mk248_Mod_1 (ballistics/CfgAmmo.hpp) @@ -210,6 +211,118 @@ class CfgAmmo { ACE_muzzleVelocities[] = {340, 370, 400}; ACE_barrelLengths[] = {101.6, 127.0, 228.6}; }; + + class Sh_125mm_APFSDS; + class rhsusf_ammo_basic_penetrator: Sh_125mm_APFSDS { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + + class rhs_ammo_ap_penetrator: Sh_125mm_APFSDS { + EGVAR(vehicle_damage,incendiary) = 0.1; + }; + + class Sh_120mm_APFSDS; + class rhs_ammo_M829: Sh_120mm_APFSDS { + EGVAR(vehicle_damage,incendiary) = 0.1; + }; + + class rhs_ammo_M830: Sh_120mm_APFSDS { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + + class B_30mm_HE; + class RHS_ammo_M792_HEI: B_30mm_HE { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + + class rhs_ammo_mk19m3_M384; + class rhs_ammo_mk19m3_M430I: rhs_ammo_mk19m3_M384 { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + + class rhs_ammo_mk19m3_M430I_penetrator: rhsusf_ammo_basic_penetrator { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + + class B_30mm_APFSDS_Tracer_Red; + class rhs_ammo_PGU14B_API: B_30mm_APFSDS_Tracer_Red { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + + class M_Titan_AT; + class rhs_ammo_TOW_AT: M_Titan_AT { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + + class rhs_ammo_127x99_Ball; + class rhs_ammo_127x99_Ball_AI: rhs_ammo_127x99_Ball { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + + class rhs_ammo_127x99_Ball_Tracer_Red; + class rhs_ammo_127x99_Ball_Tracer_Red_AI: rhs_ammo_127x99_Ball_Tracer_Red { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + + class rhs_ammo_127x99_SLAP; + class rhs_ammo_127x99_SLAP_AI: rhs_ammo_127x99_SLAP { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + + class rhs_ammo_127x99_SLAP_Tracer_Red; + class rhs_ammo_127x99_SLAP_Tracer_Red_AI: rhs_ammo_127x99_SLAP_Tracer_Red { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + + class rhs_ammo_12gHEAP_penetrator: BulletBase { + EGVAR(vehicle_damage,incendiary) = 0.1; + }; + class rhs_ammo_M136_rocket; + class rhs_ammo_M136_hp_rocket: rhs_ammo_M136_rocket { + EGVAR(vehicle_damage,incendiary) = 0.5; + }; + class rhsusf_40mm_HE; + class rhsusf_40mm_HEDP: rhsusf_40mm_HE { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + + class rhs_ammo_M136_penetrator: rhsusf_ammo_basic_penetrator { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + class rhs_ammo_M136_hp_penetrator: rhs_ammo_M136_penetrator { + EGVAR(vehicle_damage,incendiary) = 0.5; + }; + class rhs_ammo_M136_hedp_penetrator: rhs_ammo_M136_penetrator { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + class rhs_ammo_M_fgm148_AT_penetrator: rhsusf_ammo_basic_penetrator { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + class rhs_ammo_smaw_HEAA_penetrator: rhsusf_ammo_basic_penetrator { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + class rhs_ammo_maaws_HEAT_penetrator: rhsusf_ammo_basic_penetrator { + EGVAR(vehicle_damage,incendiary) = 1.0; + }; + class RocketBase; + class rhs_ammo_maaws_HEDP: RocketBase { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + class rhs_ammo_maaws_HEDP_penetrator: rhs_ammo_M136_penetrator { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + class rhs_ammo_maaws_HE: RocketBase { + EGVAR(vehicle_damage,incendiary) = 0.5; + }; + class rhs_ammo_maaws_SMOKE: RocketBase { + EGVAR(vehicle_damage,incendiary) = 0; + }; + class rhs_ammo_maaws_ILLUM: RocketBase { + EGVAR(vehicle_damage,incendiary) = 0; + }; + class rhs_ammo_40mmHEDP_penetrator: rhs_ammo_12gHEAP_penetrator { + EGVAR(vehicle_damage,incendiary) = 0.8; + }; class MissileBase; class rhs_ammo_M_fgm148_AT: MissileBase { @@ -281,8 +394,6 @@ class CfgAmmo { ace_frag_skip = 0; ace_frag_force = 1; }; - class RocketBase; - class rhs_ammo_M136_rocket: RocketBase {}; class rhs_ammo_M136_hedp_rocket: rhs_ammo_M136_rocket { ace_frag_enabled = 1; ace_frag_metal = 330; @@ -292,6 +403,13 @@ class CfgAmmo { ace_frag_classes[] = {"ACE_frag_medium_HD"}; ace_frag_skip = 0; ace_frag_force = 1; + EGVAR(vehicle_damage,incendiary) = 0.8; + }; + class rhs_ammo_m72a7_rocket: rhs_ammo_M136_hedp_rocket { + EGVAR(vehicle_damage,incendiary) = 1.0; + ace_frag_enabled = 0; + ace_frag_skip = 1; + ace_frag_force = 0; }; class rhs_ammo_smaw_SR: RocketBase { ACE_caliber = 9; diff --git a/optionals/compat_rhs_usf3/CfgEventHandlers.hpp b/optionals/compat_rhs_usf3/CfgEventHandlers.hpp index 93e3311cf2..865276cfba 100644 --- a/optionals/compat_rhs_usf3/CfgEventHandlers.hpp +++ b/optionals/compat_rhs_usf3/CfgEventHandlers.hpp @@ -1,11 +1,11 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/optionals/compat_rhs_usf3/CfgGlasses.hpp b/optionals/compat_rhs_usf3/CfgGlasses.hpp index 2d2df886ca..696b31dbeb 100644 --- a/optionals/compat_rhs_usf3/CfgGlasses.hpp +++ b/optionals/compat_rhs_usf3/CfgGlasses.hpp @@ -91,7 +91,7 @@ class CfgGlasses { ACE_Protection = 0; ACE_DustPath = QPATHTOEF(goggles,textures\fx\dust\%1.paa); }; - class rhsusf_shemagh_base: G_Combat { + class rhsusf_shemagh_base: G_Combat { ACE_Overlay = ""; ACE_OverlayDirt = ""; ACE_OverlayCracked = ""; diff --git a/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp index 1bb327abf0..4e3c5d235f 100644 --- a/optionals/compat_rhs_usf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp @@ -45,9 +45,6 @@ class CfgVehicles { }; class MBT_01_base_F: Tank_F {}; - class rhsusf_m1a1tank_base: MBT_01_base_F { - EGVAR(refuel,fuelCapacity) = 1909; - }; class Helicopter_Base_F: Helicopter { class Eventhandlers; }; @@ -259,6 +256,13 @@ class CfgVehicles { class rhsusf_m113tank_base: APC_Tracked_02_base_F { EGVAR(map,vehicleLightColor)[] = {0,1,0,0.1}; EGVAR(refuel,fuelCapacity) = 360; + EGVAR(vehicle_damage,hullDetonationProb) = 0.2; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.7; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.8; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.5; }; class rhsusf_m113_usarmy: rhsusf_m113tank_base {}; @@ -267,11 +271,135 @@ class CfgVehicles { EGVAR(rearm,defaultSupply) = 1200; }; + class Wheeled_APC_F; class APC_Tracked_03_base_F; class RHS_M2A2_Base: APC_Tracked_03_base_F { EGVAR(refuel,fuelCapacity) = 746; + EGVAR(vehicle_damage,canHaveFireRing) = 1; + EGVAR(vehicle_damage,hullDetonationProb) = 0.2; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.2; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.8; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.5; }; - + class rhsusf_M1117_base: Wheeled_APC_F { + EGVAR(vehicle_damage,hullDetonationProb) = 0.2; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.7; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.8; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.5; + }; + class rhsusf_stryker_base: Wheeled_APC_F { + EGVAR(vehicle_damage,hullDetonationProb) = 0.2; + EGVAR(vehicle_damage,turretDetonationProb) = 0.2; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0.5; + EGVAR(vehicle_damage,turretFireProb) = 0.2; + EGVAR(vehicle_damage,engineFireProb) = 0.7; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0.5; + }; + class rhsusf_m1a1tank_base: MBT_01_base_F { + EGVAR(refuel,fuelCapacity) = 1909; + EGVAR(vehicle_damage,hullDetonationProb) = 0; + EGVAR(vehicle_damage,turretDetonationProb) = 0; + EGVAR(vehicle_damage,engineDetonationProb) = 0; + EGVAR(vehicle_damage,hullFireProb) = 0; + EGVAR(vehicle_damage,turretFireProb) = 0; + EGVAR(vehicle_damage,engineFireProb) = 0.5; + EGVAR(vehicle_damage,detonationDuringFireProb) = 0; + EGVAR(vehicle_damage,hitpointAlias)[] = { { "hull", { "hitammohull", "hitammo" } } }; + }; + + class RHS_M2A2; + class RHS_M2A2_BUSKI: RHS_M2A2 { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", + "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", + "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", + "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", + "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", + "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", + "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", + "era_41_hitpoint", "era_42_hitpoint", "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", + }; + EGVAR(vehicle_damage,canHaveFireRing) = 1; + }; + class RHS_M2A3; + class RHS_M2A3_BUSKI: RHS_M2A3 { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", + "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", + "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", + "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", + "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", + "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", + "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", + "era_41_hitpoint", "era_42_hitpoint", "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", + }; + EGVAR(vehicle_damage,canHaveFireRing) = 1; + }; + class RHS_M2A3_BUSKIII: RHS_M2A3_BUSKI { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", + "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", + "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", + "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", + "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", + "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", + "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", + "era_41_hitpoint", "era_42_hitpoint", "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", + "era_46_hitpoint", "era_47_hitpoint", "era_48_hitpoint", "era_49_hitpoint", "era_50_hitpoint", + "era_51_hitpoint", "era_52_hitpoint", "era_53_hitpoint", "era_54_hitpoint", "era_55_hitpoint", + "era_56_hitpoint", "era_57_hitpoint", "era_58_hitpoint", "era_59_hitpoint" + }; + }; + class rhsusf_m1a1aim_tuski_wd: rhsusf_m1a1tank_base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", + "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", + "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", + "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", + "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", + "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { "SLAT_1_hitpoint" }; + }; + class rhsusf_m1a2tank_base; + class rhsusf_m1a2sep1tuskid_usarmy: rhsusf_m1a2tank_base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", + "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", + "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", + "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", + "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", + "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { "SLAT_1_hitpoint" }; + }; + class rhsusf_m1a2sep1tuskiiwd_usarmy: rhsusf_m1a2sep1tuskid_usarmy { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "era_1_hitpoint", "era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", + "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", + "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", + "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", + "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", + "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", + "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", + "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", + "era_41_hitpoint", "era_42_hitpoint", "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", + "era_46_hitpoint" + }; + }; + class Plane_CAS_01_base_F; class RHS_A10: Plane_CAS_01_base_F { EGVAR(refuel,fuelCapacity) = 6223; diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index 6b68cf53b3..ebb76be932 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -157,6 +157,9 @@ class CfgWeapons { ACE_twistDirection = 0; ACE_barrelLength = 508.0; }; + class rhs_weap_m32_Base_F: Rifle_Base_F { + ace_overheating_jamTypesAllowed[] = {"Fire", "Dud"}; + }; class SMG_02_base_F; class rhsusf_weap_MP7A1_base_f: SMG_02_base_F { ACE_barrelLength = 180; @@ -180,6 +183,10 @@ class CfgWeapons { ACE_barrelTwist = 248.92; ACE_barrelLength = 124.46; }; + class rhs_weap_M320_Base_F: Pistol_Base_F { + ace_overheating_jamTypesAllowed[] = {"Fire", "Dud"}; + }; + // RHS sniper scopes class ItemCore; class InventoryOpticsItem_Base_F; @@ -261,6 +268,46 @@ class CfgWeapons { class rhsusf_acc_M8541_low: rhsusf_acc_M8541 { ACE_ScopeHeightAboveRail = 2.9789; }; + class rhsusf_acc_nxs_3515x50_base: ItemCore { // http://www.nightforceusa.com/PDF/nightforce-2011-catalog.pdf#page=12 + ACE_ScopeAdjust_Vertical[] = {0, 30}; + ACE_ScopeAdjust_Horizontal[] = {-10.9, 10.9}; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo: InventoryOpticsItem_Base_F { + class OpticsModes { + class nxs_scope { + discreteDistance[] = {100}; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + class rhsusf_acc_nxs_3515x50f1_base: rhsusf_acc_sniper_base { // http://www.nightforceusa.com/PDF/nightforce-2011-catalog.pdf#page=12 + ACE_ScopeAdjust_Vertical[] = {0, 30}; + ACE_ScopeAdjust_Horizontal[] = {-10.9, 10.9}; + class ItemInfo: InventoryOpticsItem_Base_F { + class OpticsModes { + class nxs_scope { + discreteDistance[] = {100}; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; + class rhsusf_acc_nxs_5522x56_base: ItemCore { // http://www.nightforceusa.com/PDF/nightforce-2011-catalog.pdf#page=12 + ACE_ScopeAdjust_Vertical[] = {0, 27.3}; + ACE_ScopeAdjust_Horizontal[] = {-8.2, 8.2}; + ACE_ScopeAdjust_VerticalIncrement = 0.1; + ACE_ScopeAdjust_HorizontalIncrement = 0.1; + class ItemInfo: InventoryOpticsItem_Base_F { + class OpticsModes { + class nxs_scope { + discreteDistance[] = {100}; + discreteDistanceInitIndex = 0; + }; + }; + }; + }; // RHS lauchers class rhs_weap_fgm148: launch_O_Titan_F { ace_javelin_enabled = 1; diff --git a/optionals/compat_rhs_usf3/config.cpp b/optionals/compat_rhs_usf3/config.cpp index cf347dea99..1e169fdf6a 100644 --- a/optionals/compat_rhs_usf3/config.cpp +++ b/optionals/compat_rhs_usf3/config.cpp @@ -5,9 +5,9 @@ class CfgPatches { class ADDON { name = COMPONENT_NAME; units[] = {}; - weapons[] = {}; + weapons[] = {QGVAR(m252_carry), QGVAR(m2_carry), QGVAR(mk19_carry), QGVAR(tow_carry)}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_explosives", "ace_javelin", "ace_rearm", "ace_refuel", "ace_repair", "ace_csw", "rhsusf_c_weapons", "rhsusf_c_troops", "rhsusf_c_m1a1", "rhsusf_c_m1a2", "RHS_US_A2_AirImport", "rhsusf_c_m109", "rhsusf_c_HEMTT_A4", "rhsusf_c_hmmwv", "rhsusf_c_rg33", "rhsusf_c_fmtv", "rhsusf_c_m113", "RHS_US_A2Port_Armor", "rhsusf_c_melb"}; + requiredAddons[] = {"ace_explosives", "ace_javelin", "ace_rearm", "ace_refuel", "ace_repair", "ace_csw", "rhsusf_main_loadorder"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut", "Fyuran"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_sma3_iansky/CfgWeapons.hpp b/optionals/compat_sma3_iansky/CfgWeapons.hpp index a387b76c1a..57fe1c8a48 100644 --- a/optionals/compat_sma3_iansky/CfgWeapons.hpp +++ b/optionals/compat_sma3_iansky/CfgWeapons.hpp @@ -3,12 +3,12 @@ class CfgWeapons { class ItemCore; class InventoryOpticsItem_Base_F; - class iansky_nfbeast : ItemCore { + class iansky_nfbeast: ItemCore { ACE_ScopeAdjust_Vertical[] = { -0.9, 34 }; ACE_ScopeAdjust_Horizontal[] = { -11, 11 }; ACE_ScopeAdjust_VerticalIncrement = 0.2; ACE_ScopeAdjust_HorizontalIncrement = 0.1; - class ItemInfo : InventoryOpticsItem_Base_F { + class ItemInfo: InventoryOpticsItem_Base_F { class OpticsModes { class NF25_MILDOT { discreteDistance[] = { 100 }; diff --git a/optionals/compat_sog/$PBOPREFIX$ b/optionals/compat_sog/$PBOPREFIX$ new file mode 100644 index 0000000000..fd2896297c --- /dev/null +++ b/optionals/compat_sog/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\compat_sog diff --git a/optionals/compat_sog/ACE_CSW_Groups.hpp b/optionals/compat_sog/ACE_CSW_Groups.hpp new file mode 100644 index 0000000000..b02c42a52f --- /dev/null +++ b/optionals/compat_sog/ACE_CSW_Groups.hpp @@ -0,0 +1,73 @@ +class ACE_CSW_Groups { + class ace_csw_100Rnd_127x99_mag { + vn_m2_v_100_mag = 1; + }; + + class GVAR(tow_missile) { + vn_missile_tow_mag_x1 = 1; + }; + + class GVAR(m1919_250) { + vn_m1919_v_250_mag = 1; + }; + + class GVAR(m60_200) { + vn_m60_v_200_mag = 1; + }; + + class vn_m60_100_mag { + vn_m60_v_100_mag = 1; + }; + + class GVAR(dshkm_50) { + vn_dshkm_v_50_mag = 1; + }; + + class vn_rpd_100_mag { + vn_rpd_v_100_mag = 1; + }; + + class vn_pk_100_mag { + vn_pk_v_100_mag = 1; + }; + + class GVAR(81mm_he) { + vn_mortar_m29_mag_he_x8 = 1; + }; + + class GVAR(81mm_wp) { + vn_mortar_m29_mag_wp_x8 = 1; + }; + + class GVAR(81mm_chem) { + vn_mortar_m29_mag_chem_x8 = 1; + }; + + class GVAR(81mm_lume) { + vn_mortar_m29_mag_lume_x8 = 1; + }; + + class GVAR(60mm_he) { + vn_mortar_m2_mag_he_x8 = 1; + }; + + class GVAR(60mm_wp) { + vn_mortar_m2_mag_wp_x8 = 1; + }; + + class GVAR(60mm_lume) { + vn_mortar_m2_mag_lume_x8 = 1; + }; + + class GVAR(82mm_he) { + vn_mortar_type53_mag_he_x8 = 1; + }; + + class GVAR(82mm_wp) { + vn_mortar_type53_mag_wp_x8 = 1; + }; + + class GVAR(82mm_lume) { + vn_mortar_type53_mag_lume_x8 = 1; + }; +}; diff --git a/optionals/compat_sog/CfgAmmo.hpp b/optionals/compat_sog/CfgAmmo.hpp new file mode 100644 index 0000000000..8e78e19189 --- /dev/null +++ b/optionals/compat_sog/CfgAmmo.hpp @@ -0,0 +1,5 @@ +class CfgAmmo { + #include "CfgAmmo\explosives.hpp" + #include "CfgAmmo\grenades.hpp" + #include "CfgAmmo\melee.hpp" +}; diff --git a/optionals/compat_sog/CfgAmmo/explosives.hpp b/optionals/compat_sog/CfgAmmo/explosives.hpp new file mode 100644 index 0000000000..e2a71e4ae1 --- /dev/null +++ b/optionals/compat_sog/CfgAmmo/explosives.hpp @@ -0,0 +1,63 @@ +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 APERSBoundingMine_Range_Ammo; +class vn_mine_tripwire_m16_02_ammo: APERSBoundingMine_Range_Ammo { + EGVAR(explosives,defuseObjectPosition)[] = {0, -0.01, 0.088}; +}; + +class APERSTripMine_Wire_Ammo; +class vn_mine_tripwire_f1_02_ammo: APERSTripMine_Wire_Ammo { + EGVAR(explosives,defuseObjectPosition)[] = {0, -0.01, 0.18}; +}; + +class vn_mine_tripwire_arty_ammo: vn_mine_tripwire_f1_02_ammo { + EGVAR(explosives,defuseObjectPosition)[] = {0, -0.01, 0.126}; +}; + +class DemoCharge_Remote_Ammo; +class vn_mine_m112_remote_ammo: DemoCharge_Remote_Ammo { + EGVAR(explosives,defuseObjectPosition)[] = {0, 0.22, 0.75}; +}; + +// Disable engine damage of punji traps, script damage manually +// This allows a tighter control of caused wounds and removes ear ringing +class vn_mine_punji_01_ammo: APERSBoundingMine_Range_Ammo { + EGVAR(minedetector,detectable) = 0; + + hit = QUOTE(call compile getText (configFile >> 'CfgAmmo' >> 'vn_mine_punji_01_ammo' >> 'GVAR(hit)')); + GVAR(hit) = QUOTE([ARR_2(0,1)] select isNull (configFile >> 'CfgPatches' >> 'ace_medical')); + + indirectHit = QUOTE(call compile getText (configFile >> 'CfgAmmo' >> 'vn_mine_punji_01_ammo' >> 'GVAR(indirectHit)')); + GVAR(indirectHit) = QUOTE([ARR_2(0,10)] select isNull (configFile >> 'CfgPatches' >> 'ace_medical')); + + class EventHandlers { + class ADDON { + AmmoHit = QUOTE(call FUNC(handlePunjiTrapDamage)); + }; + }; +}; + +class vn_mine_punji_02_ammo: vn_mine_punji_01_ammo { + indirectHit = QUOTE(call compile getText (configFile >> 'CfgAmmo' >> 'vn_mine_punji_02_ammo' >> 'GVAR(indirectHit)')); + GVAR(indirectHit) = QUOTE([ARR_2(0,5)] select isNull (configFile >> 'CfgPatches' >> 'ace_medical')); +}; + +class vn_mine_punji_03_ammo: vn_mine_punji_01_ammo { + EGVAR(explosives,defuseObjectPosition)[] = {0.25, 0.023, 0.035}; + + class EventHandlers { + class ADDON { + AmmoHit = QUOTE(call FUNC(handlePunjiTrapDamage)); + }; + }; +}; diff --git a/optionals/compat_sog/CfgAmmo/grenades.hpp b/optionals/compat_sog/CfgAmmo/grenades.hpp new file mode 100644 index 0000000000..48d13a4286 --- /dev/null +++ b/optionals/compat_sog/CfgAmmo/grenades.hpp @@ -0,0 +1,4 @@ +class vn_grenadehand; +class vn_molotov_grenade_ammo: vn_grenadehand { + ACE_frag_enabled = 0; +}; diff --git a/optionals/compat_sog/CfgAmmo/melee.hpp b/optionals/compat_sog/CfgAmmo/melee.hpp new file mode 100644 index 0000000000..68f09299c4 --- /dev/null +++ b/optionals/compat_sog/CfgAmmo/melee.hpp @@ -0,0 +1,8 @@ +class BulletBase; +class vn_melee_stab: BulletBase { + ACE_damageType = "stab"; +}; + +class vn_melee_stun: vn_melee_stab { + ACE_damageType = "punch"; +}; diff --git a/optionals/compat_sog/CfgEventHandlers.hpp b/optionals/compat_sog/CfgEventHandlers.hpp new file mode 100644 index 0000000000..ad6f4e3740 --- /dev/null +++ b/optionals/compat_sog/CfgEventHandlers.hpp @@ -0,0 +1,34 @@ +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_InitPost_EventHandlers { + class GVAR(spiderhole_01_nogeo) { + class ADDON { + init = QUOTE((_this select 0) setMass 1e-12); + }; + }; + class GVAR(spiderhole_02_nogeo) { + class ADDON { + init = QUOTE((_this select 0) setMass 1e-12); + }; + }; + class GVAR(spiderhole_03_nogeo) { + class ADDON { + init = QUOTE((_this select 0) setMass 1e-12); + }; + }; + class vn_bicycle_base { + class ADDON { + init = QUOTE(call FUNC(disableCookoff)); + }; + }; +}; diff --git a/optionals/compat_sog/CfgGlasses.hpp b/optionals/compat_sog/CfgGlasses.hpp new file mode 100644 index 0000000000..0199591ec2 --- /dev/null +++ b/optionals/compat_sog/CfgGlasses.hpp @@ -0,0 +1,4 @@ + +class CfgGlasses { + // TODO - Custom overlays are left as an exercise for the reader. +}; diff --git a/optionals/compat_sog/CfgMagazines.hpp b/optionals/compat_sog/CfgMagazines.hpp new file mode 100644 index 0000000000..3550cc35a9 --- /dev/null +++ b/optionals/compat_sog/CfgMagazines.hpp @@ -0,0 +1,5 @@ +class CfgMagazines { + #include "CfgMagazines\belts.hpp" + #include "CfgMagazines\csw.hpp" + #include "CfgMagazines\explosives.hpp" +}; diff --git a/optionals/compat_sog/CfgMagazines/belts.hpp b/optionals/compat_sog/CfgMagazines/belts.hpp new file mode 100644 index 0000000000..0a8d6a1d28 --- /dev/null +++ b/optionals/compat_sog/CfgMagazines/belts.hpp @@ -0,0 +1,14 @@ +class vn_lmgmag_base; +class vn_m60_100_mag: vn_lmgmag_base { + ACE_isBelt = 1; +}; +class vn_pk_100_mag: vn_lmgmag_base { + ACE_isBelt = 1; +}; +class vn_rpd_100_mag: vn_lmgmag_base { + ACE_isBelt = 1; +}; +class vn_m16_mag_base; +class vn_m63a_100_mag: vn_m16_mag_base { + ACE_isBelt = 1; +}; diff --git a/optionals/compat_sog/CfgMagazines/csw.hpp b/optionals/compat_sog/CfgMagazines/csw.hpp new file mode 100644 index 0000000000..65c9ba5e6a --- /dev/null +++ b/optionals/compat_sog/CfgMagazines/csw.hpp @@ -0,0 +1,172 @@ +class vn_missile_tow_mag_x1; +class GVAR(tow_missile): vn_missile_tow_mag_x1 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\tow\vn_static_tow_mag.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_tow_ca.paa); + mass = 563; +}; + +class vn_m1919_v_250_mag; +class GVAR(m1919_250): vn_m1919_v_250_mag { + scope = 2; + type = 256; + count = 250; + model = "\vn\objects_f_vietnam\supply\a2_ammo\macv\vn_us_30cal.p3d"; + picture = QPATHTOF(UI\ammo_250rnd_30cal_ca.paa); + ACE_isBelt = 1; + mass = 170; +}; + +class vn_m60_v_200_mag; +class GVAR(m60_200): vn_m60_v_200_mag { + scope = 2; + type = 256; + count = 200; + model = "\vn\objects_f_vietnam\supply\a2_ammo\macv\vn_us_can_30.p3d"; + picture = QPATHTOF(UI\ammo_200rnd_762mm_ca.paa); + ACE_isBelt = 1; + mass = 187; +}; + +class vn_dshkm_v_50_mag; +class GVAR(dshkm_50): vn_dshkm_v_50_mag { + scope = 2; + type = 256; + count = 50; + model = "\vn\objects_f_vietnam\supply\a2_ammo\pavn\vn_pavn_50_can.p3d"; + picture = QPATHTOF(UI\ammo_50rnd_127mm_ca.paa); + ACE_isBelt = 1; + mass = 170; +}; + +class vn_mortar_m29_mag_he_x8; +class GVAR(81mm_he): vn_mortar_m29_mag_he_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_m29\vn_shell_81mm_m374_he_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_81mm_ca.paa); + mass = 91; + displayName = CSTRING(Magazine_81mm_HE); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; + +class vn_mortar_m29_mag_wp_x8; +class GVAR(81mm_wp): vn_mortar_m29_mag_wp_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_m29\vn_shell_81mm_m374_he_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_81mm_ca.paa); + mass = 91; + displayName = CSTRING(Magazine_81mm_WP); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; + +class vn_mortar_m29_mag_chem_x8; +class GVAR(81mm_chem): vn_mortar_m29_mag_chem_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_m29\vn_shell_81mm_m374_he_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_81mm_ca.paa); + mass = 91; + displayName = CSTRING(Magazine_81mm_Smoke); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; + +class vn_mortar_m29_mag_lume_x8; +class GVAR(81mm_lume): vn_mortar_m29_mag_lume_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_m29\vn_shell_81mm_m374_he_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_81mm_ca.paa); + mass = 91; + displayName = CSTRING(Magazine_81mm_Lume); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; + +class vn_mortar_m2_mag_he_x8; +class GVAR(60mm_he): vn_mortar_m2_mag_he_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_m2\vn_shell_60mm_m49a2_he_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_60mm_ca.paa); + mass = 37; + displayName = CSTRING(Magazine_60mm_HE); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; + +class vn_mortar_m2_mag_wp_x8; +class GVAR(60mm_wp): vn_mortar_m2_mag_wp_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_m2\vn_shell_60mm_m302_wp_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_60mm_ca.paa); + mass = 37; + displayName = CSTRING(Magazine_60mm_WP); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; + +class vn_mortar_m2_mag_lume_x8; +class GVAR(60mm_lume): vn_mortar_m2_mag_lume_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_m2\vn_shell_60mm_m83_lume_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_60mm_ca.paa); + mass = 37; + displayName = CSTRING(Magazine_60mm_Lume); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; + +class vn_mortar_type53_mag_he_x8; +class GVAR(82mm_he): vn_mortar_type53_mag_he_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_type53\vn_shell_82mm_o832d_he_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_82mm_ca.paa); + mass = 70; + displayName = CSTRING(Magazine_82mm_HE); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; + +class vn_mortar_type53_mag_wp_x8; +class GVAR(82mm_wp): vn_mortar_type53_mag_wp_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_type53\vn_shell_82mm_d832_wp_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_82mm_ca.paa); + mass = 70; + displayName = CSTRING(Magazine_82mm_WP); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; + +class vn_mortar_type53_mag_lume_x8; +class GVAR(82mm_lume): vn_mortar_type53_mag_lume_x8 { + scope = 2; + type = 256; + count = 1; + model = "\vn\static_f_vietnam\mortar_type53\vn_shell_82mm_s832s_lume_ammo.p3d"; + picture = QPATHTOF(UI\ammo_1rnd_82mm_ca.paa); + mass = 70; + displayName = CSTRING(Magazine_82mm_Lume); + displayNameShort = ""; + descriptionShort = ECSTRING(mk6mortar,magazine_descriptionShort); +}; diff --git a/optionals/compat_sog/CfgMagazines/explosives.hpp b/optionals/compat_sog/CfgMagazines/explosives.hpp new file mode 100644 index 0000000000..2cf0e72b5e --- /dev/null +++ b/optionals/compat_sog/CfgMagazines/explosives.hpp @@ -0,0 +1,194 @@ +class vn_magazine; + +// Claymore (Remote) +class vn_mine_m18_mag: vn_magazine { + useAction = 0; + + displayNameShort = ""; // Every explosive inherits this and it breaks naming in the placing menu + + EGVAR(explosives,Placeable) = 1; + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m18); + + class ACE_Triggers { + SupportedTriggers[] = {"Command", "MK16_Transmitter"}; + class Command { + digDistance = -0.05; + fuseTime = 0.5; + }; + class MK16_Transmitter: Command {}; + }; +}; +// Claymore (Proximity) +class vn_mine_m18_range_mag: vn_mine_m18_mag { + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = -0.05; + }; + }; +}; + +// Claymore x3 (Remote) +class vn_mine_m18_x3_mag: vn_mine_m18_mag { + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m18_x3); + + class ACE_Triggers { + SupportedTriggers[] = {"Command", "MK16_Transmitter"}; + class Command { + digDistance = 0.02; + fuseTime = 0.5; + }; + class MK16_Transmitter: Command {}; + }; +}; +// Claymore x3 (Proximity) +class vn_mine_m18_x3_range_mag: vn_mine_m18_x3_mag { + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.02; + }; + }; +}; + +// Toe-Popper +class vn_mine_m14_mag: vn_mine_m18_mag { + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m14); + + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.001; + }; + }; +}; + +// Bounding Mine +class vn_mine_m16_mag: vn_mine_m18_mag { + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m16); + + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.02; + }; + }; +}; + +// Bounding Mine (Trip Wire 2m) +class vn_mine_tripwire_m16_02_mag: vn_mine_m16_mag { + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m16_tripwire_2m); + + class ACE_Triggers { + SupportedTriggers[] = {"Tripwire"}; + class Tripwire { + digDistance = 0.02; + }; + }; +}; +// 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); + + class ACE_Triggers { + SupportedTriggers[] = {"Tripwire"}; + class Tripwire { + digDistance = 0.02; + }; + }; +}; + +// 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); +}; +// 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); +}; + +// 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); +}; + +// Satchel Charge +class vn_mine_satchel_remote_02_mag: vn_mine_m18_mag { + useAction = 0; + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(satchel_remote_02); + + class ACE_Triggers { + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; + class Timer { + fuseTime = 0.5; + }; + class Command { + fuseTime = 0.5; + }; + class MK16_Transmitter: Command {}; + class DeadmanSwitch: Command {}; + }; +}; + +// TM57 Anti-Tank Mine +class vn_mine_tm57_mag: vn_mine_m18_mag { + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(tm57); + + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate {}; + }; +}; + +// M15 Anti-Tank Mine +class vn_mine_m15_mag: vn_mine_tm57_mag { + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m15); + + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.03; + }; + }; +}; + +// M112 Breaching charge +class vn_mine_m112_remote_mag: vn_mine_m18_mag { + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(m112); + + class ACE_Triggers { + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch"}; + class Timer { + fuseTime = 0.5; + digDistance = 1; + }; + class Command { + fuseTime = 0.5; + digDistance = 1; + }; + class MK16_Transmitter: Command {}; + class DeadmanSwitch: Command {}; + }; +}; + +// Punji large +class vn_mine_punji_01_mag: vn_mine_m18_mag { + EGVAR(explosives,SetupObject) = QEXPLOSIVES_PLACE(punji_01); + + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + displayName = CSTRING(Action_DigIn); + }; + }; +}; + +// Punji small +class vn_mine_punji_02_mag: vn_mine_punji_01_mag { + 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); +}; diff --git a/optionals/compat_sog/CfgVehicles.hpp b/optionals/compat_sog/CfgVehicles.hpp new file mode 100644 index 0000000000..7d398612f0 --- /dev/null +++ b/optionals/compat_sog/CfgVehicles.hpp @@ -0,0 +1,23 @@ +#define EQUIP_FRIES_ATTRIBUTE class Attributes { \ + class EGVAR(fastroping,equipFRIES) { \ + property = QEGVAR(fastroping,equipFRIES); \ + control = "Checkbox"; \ + displayName = ECSTRING(fastroping,Eden_equipFRIES); \ + tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \ + expression = QUOTE([_this] call EFUNC(fastroping,equipFRIES)); \ + typeName = "BOOL"; \ + condition = "objectVehicle"; \ + defaultValue = false; \ + }; \ +} + +class CfgVehicles { + #include "CfgVehicles\boxes.hpp" + #include "CfgVehicles\explosives.hpp" + #include "CfgVehicles\helicopters.hpp" + #include "CfgVehicles\planes.hpp" + #include "CfgVehicles\tracked.hpp" + #include "CfgVehicles\turrets.hpp" + #include "CfgVehicles\units.hpp" + #include "CfgVehicles\wheeled.hpp" +}; diff --git a/optionals/compat_sog/CfgVehicles/boxes.hpp b/optionals/compat_sog/CfgVehicles/boxes.hpp new file mode 100644 index 0000000000..4e6e1093c7 --- /dev/null +++ b/optionals/compat_sog/CfgVehicles/boxes.hpp @@ -0,0 +1,130 @@ +class Box_NATO_AmmoOrd_F; +class GVAR(box_81mm_he): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_81mm_HE); + author = ECSTRING(common,ACETeam); + maximumLoad = 300; + model = "\vn\objects_f_vietnam\usarmy\supply\mortar_m29\vn_prop_81mm_crate_02.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(81mm_he),3); + }; + class TransportItems {}; + class TransportWeapons {}; +}; + +class GVAR(box_81mm_wp): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_81mm_WP); + author = ECSTRING(common,ACETeam); + maximumLoad = 300; + model = "\vn\objects_f_vietnam\usarmy\supply\mortar_m29\vn_prop_81mm_crate_02.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(81mm_wp),3); + }; + class TransportItems {}; + class TransportWeapons {}; +}; + +class GVAR(box_81mm_chem): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_81mm_Smoke); + author = ECSTRING(common,ACETeam); + maximumLoad = 300; + model = "\vn\objects_f_vietnam\usarmy\supply\mortar_m29\vn_prop_81mm_crate_02.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(81mm_chem),3); + }; + class TransportItems {}; + class TransportWeapons {}; +}; + +class GVAR(box_81mm_lume): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_81mm_Lume); + author = ECSTRING(common,ACETeam); + maximumLoad = 300; + model = "\vn\objects_f_vietnam\usarmy\supply\mortar_m29\vn_prop_81mm_crate_02.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(81mm_lume),3); + }; + class TransportItems {}; + class TransportWeapons {}; +}; + +class GVAR(box_60mm_he): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_60mm_HE); + author = ECSTRING(common,ACETeam); + maximumLoad = 450; + model = "\vn\objects_f_vietnam\usarmy\supply\mortar_m2\vn_prop_60mm_crate_01.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(60mm_he),12); + }; + class TransportItems {}; + class TransportWeapons {}; +}; + +class GVAR(box_60mm_wp): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_60mm_WP); + author = ECSTRING(common,ACETeam); + maximumLoad = 450; + model = "\vn\objects_f_vietnam\usarmy\supply\mortar_m2\vn_prop_60mm_crate_01.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(60mm_wp),12); + }; + class TransportItems {}; + class TransportWeapons {}; +}; + +class GVAR(box_60mm_lume): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_60mm_Lume); + author = ECSTRING(common,ACETeam); + maximumLoad = 450; + model = "\vn\objects_f_vietnam\usarmy\supply\mortar_m2\vn_prop_60mm_crate_01.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(60mm_lume),12); + }; + class TransportItems {}; + class TransportWeapons {}; +}; + +class GVAR(box_82mm_he): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_82mm_HE); + author = ECSTRING(common,ACETeam); + maximumLoad = 210; + model = "\vn\objects_f_vietnam\usarmy\furniture\vn_us_fort_common_crate_01.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(82mm_he),3); + }; + class TransportItems {}; + class TransportWeapons {}; +}; + +class GVAR(box_82mm_wp): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_82mm_WP); + author = ECSTRING(common,ACETeam); + maximumLoad = 210; + model = "\vn\objects_f_vietnam\usarmy\furniture\vn_us_fort_common_crate_01.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(82mm_wp),3); + }; + class TransportItems {}; + class TransportWeapons {}; +}; + +class GVAR(box_82mm_lume): Box_NATO_AmmoOrd_F { + displayName = CSTRING(Box_82mm_Lume); + author = ECSTRING(common,ACETeam); + maximumLoad = 210; + model = "\vn\objects_f_vietnam\usarmy\furniture\vn_us_fort_common_crate_01.p3d"; + + class TransportMagazines { + MACRO_ADDMAGAZINE(GVAR(82mm_lume),3); + }; + class TransportItems {}; + class TransportWeapons {}; +}; diff --git a/optionals/compat_sog/CfgVehicles/explosives.hpp b/optionals/compat_sog/CfgVehicles/explosives.hpp new file mode 100644 index 0000000000..f3bc96b613 --- /dev/null +++ b/optionals/compat_sog/CfgVehicles/explosives.hpp @@ -0,0 +1,130 @@ +class Items_base_F; +class EGVAR(explosives,Place): Items_base_F { + class ACE_Actions { + class ACE_MainActions; + }; +}; + +// Claymore +class EXPLOSIVES_PLACE(m18): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_M18_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\m18\vn_mine_m18"; + + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0, 0, 0.15]"; + }; + }; +}; + +// Claymore x3 +class EXPLOSIVES_PLACE(m18_x3): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_M18_X3_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\m18\vn_mine_m18_x3"; + + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0, 0, 0.1]"; + }; + }; +}; + +// Toe-Popper +class EXPLOSIVES_PLACE(m14): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_M14_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\m14\vn_mine_m14_mag"; +}; + +// Bounding Mine +class EXPLOSIVES_PLACE(m16): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_M16_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\m16\vn_mine_m16_mag"; +}; + +// Bounding Mine (Trip Wire 2m) +class EXPLOSIVES_PLACE(m16_tripwire_2m): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_TRIPWIRE_M16_04_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\m16\vn_mine_tripwire_m16_02"; + + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0, 0.0093, 0.088]"; + }; + }; +}; +// Bounding Mine (Trip Wire 4m) +class EXPLOSIVES_PLACE(m16_tripwire_4m): EXPLOSIVES_PLACE(m16_tripwire_2m) { + displayName = "$STR_VN_MINE_TRIPWIRE_M16_04_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\m16\vn_mine_tripwire_m16_04"; +}; + +// F1 (Trip Wire 2m) +class EXPLOSIVES_PLACE(f1_tripwire_2m): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_TRIPWIRE_F1_02_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\tripwire_f1\vn_mine_tripwire_f1_02"; + + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0, 0.011, 0.18]"; + }; + }; +}; +// F1 (Trip Wire 4m) +class EXPLOSIVES_PLACE(f1_tripwire_4m): EXPLOSIVES_PLACE(f1_tripwire_2m) { + displayName = "$STR_VN_MINE_TRIPWIRE_F1_04_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\tripwire_f1\vn_mine_tripwire_f1_04"; +}; + +// Arty Shell (Trip Wire 4m) +class EXPLOSIVES_PLACE(arty_tripwire_4m): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_TRIPWIRE_ARTY_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\tripwire_arty\vn_mine_tripwire_arty"; + + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[0, 0.01, 0.126]"; + }; + }; +}; + +// Satchel Charge +class EXPLOSIVES_PLACE(satchel_remote_02): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_SATCHEL_REMOTE_02_MAG_DN"; + model = "\vn\characters_f_vietnam\OPFOR\vests\items\vn_mine_satchel_02.p3d"; +}; + +// TM57 Anti-Tank Mine +class EXPLOSIVES_PLACE(tm57): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_TM57_MAG_DN"; + model = "vn\weapons_f_vietnam\mines\tm57\vn_mine_tm57_mag"; +}; + +// M15 Anti-Tank Mine +class EXPLOSIVES_PLACE(m15): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_M15_MAG_DN"; + model = "vn\weapons_f_vietnam\mines\m15\vn_mine_m15_mag"; +}; + +// M112 Breaching charge +class EXPLOSIVES_PLACE(m112): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_M112_REMOTE_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\m112\vn_mine_m112_mag"; +}; + +// Punji large +class EXPLOSIVES_PLACE(punji_01): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_PUNJI_01_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\punji\vn_mine_punji_01_mag"; +}; + +// Punji small +class EXPLOSIVES_PLACE(punji_02): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_PUNJI_01_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\punji\vn_mine_punji_02_mag"; +}; + +// Punji whip +class EXPLOSIVES_PLACE(punji_03): EGVAR(explosives,Place) { + displayName = "$STR_VN_MINE_PUNJI_01_MAG_DN"; + model = "\vn\weapons_f_vietnam\mines\punji\vn_mine_punji_03_mag"; +}; diff --git a/optionals/compat_sog/CfgVehicles/helicopters.hpp b/optionals/compat_sog/CfgVehicles/helicopters.hpp new file mode 100644 index 0000000000..19db8f1ac3 --- /dev/null +++ b/optionals/compat_sog/CfgVehicles/helicopters.hpp @@ -0,0 +1,43 @@ +// UH-1C - https://en.wikipedia.org/wiki/Bell_UH-1_Iroquois +class vn_helicopter_base; +class vn_air_uh1_01_base: vn_helicopter_base { + EGVAR(refuel,fuelCapacity) = 916; +}; + +// UH-1B - https://www.skytamer.com/Bell_H-1B(UH).html +class vn_air_uh1c_01_base; +class vn_air_uh1c_doorguns_base; +class vn_air_uh1c_07_base: vn_air_uh1c_doorguns_base { + EGVAR(refuel,fuelCapacity) = 625; +}; + +// UH-1D - http://www.aviastar.org/helicopters_eng/bell_uh-1.php +class vn_air_uh1d_base: vn_air_uh1_01_base { + EGVAR(refuel,fuelCapacity) = 832; +}; + +// UH-1P - based on the F variant which is based on the B variant +// Capacity might be wrong +class vn_air_uh1c_03_base: vn_air_uh1c_01_base { + EGVAR(refuel,fuelCapacity) = 625; +}; + +// UH-34D - https://www.easa.europa.eu/sites/default/files/dfu/TCDS_EASA_IM_R109_S58_Issue_02.pdf +class vn_air_ch34_01_base: vn_helicopter_base { + EGVAR(refuel,fuelCapacity) = 962; +}; + +// OH-6 - https://en.wikipedia.org/wiki/MD_Helicopters_MH-6_Little_Bird +class vn_air_oh6a_base: vn_helicopter_base { + EGVAR(refuel,fuelCapacity) = 242; +}; + +// AH-1G - http://all-aero.com/index.php/35-helicopters/copters/1479-bell-209-ah-1-249 +class vn_air_ah1g_01_base: vn_helicopter_base { + EGVAR(refuel,fuelCapacity) = 980; +}; + +// Mi-2 - https://fas.org/man/dod-101/sys/ac/row/mi-2.htm +class vn_air_mi2_base: vn_helicopter_base { + EGVAR(refuel,fuelCapacity) = 600; +}; diff --git a/optionals/compat_sog/CfgVehicles/planes.hpp b/optionals/compat_sog/CfgVehicles/planes.hpp new file mode 100644 index 0000000000..662f95d116 --- /dev/null +++ b/optionals/compat_sog/CfgVehicles/planes.hpp @@ -0,0 +1,5 @@ +// F-4 - https://en.wikipedia.org/wiki/McDonnell_Douglas_F-4_Phantom_II +class Plane_Base_F; +class vn_air_f4_base: Plane_Base_F { + EGVAR(refuel,fuelCapacity) = 7548; +}; diff --git a/optionals/compat_sog/CfgVehicles/tracked.hpp b/optionals/compat_sog/CfgVehicles/tracked.hpp new file mode 100644 index 0000000000..02b52949c6 --- /dev/null +++ b/optionals/compat_sog/CfgVehicles/tracked.hpp @@ -0,0 +1,10 @@ +// 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 ; +}; diff --git a/optionals/compat_sog/CfgVehicles/turrets.hpp b/optionals/compat_sog/CfgVehicles/turrets.hpp new file mode 100644 index 0000000000..05cb4da769 --- /dev/null +++ b/optionals/compat_sog/CfgVehicles/turrets.hpp @@ -0,0 +1,375 @@ +class LandVehicle; +class StaticWeapon: LandVehicle { + class ACE_Actions { + class ACE_MainActions; + }; +}; + +// --- Gun Turrets ------------------------------------------------------------- + +// M2 Browning - High +class StaticMGWeapon: StaticWeapon {}; +class vn_static_m2_high_base: StaticMGWeapon { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + selection = "mg1_otochlaven"; + }; + }; + + class ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_m2_v_01); + magazineLocation = "_target selectionPosition 'mg1_magazine'"; + disassembleWeapon = QGVAR(m2_carry); + disassembleTurret = QEGVAR(csw,m3Tripod); + ammoLoadTime = 10; + ammoUnloadTime = 8; + desiredAmmo = 100; + }; +}; + +// M2 Browning - Low +class vn_static_m2_low_base: vn_static_m2_high_base { + class ACE_CSW: ACE_CSW { + disassembleTurret = QEGVAR(csw,m3TripodLow); + }; +}; + +// M1919A6 - No tripod +class vn_static_m1919a6_base: vn_static_m2_low_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = ""; + selection = "mg1_otochlaven_recoil"; + }; + }; + + class ACE_CSW: ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_m1919_v_01); + magazineLocation = "_target selectionPosition 'mg1_magazine'"; + disassembleTo = QGVAR(m1919A6_carry); + disassembleWeapon = ""; + disassembleTurret = ""; + ammoLoadTime = 10; + ammoUnloadTime = 8; + desiredAmmo = 250; + }; +}; + +// M1919A4 - High +class vn_static_m1919a4_high_base: vn_static_m1919a6_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = ""; + selection = "mg1_otochlaven_recoil"; + }; + }; + + class ACE_CSW: ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_m1919_v_01); + magazineLocation = "_target selectionPosition 'mg1_magazine'"; + disassembleTo = ""; + disassembleWeapon = QGVAR(m1919A4_carry); + disassembleTurret = QEGVAR(csw,m3Tripod); + ammoLoadTime = 10; + ammoUnloadTime = 8; + desiredAmmo = 250; + }; +}; + +// M1919A4 - Low +class vn_static_m1919a4_low_base: vn_static_m1919a4_high_base { + class ACE_CSW: ACE_CSW { + disassembleTurret = QEGVAR(csw,m3TripodLow); + }; +}; + +// M60 - High +class vn_static_m60_high_base: vn_static_m2_low_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.15, 0.532, -1.06]"; + }; + }; + + class ACE_CSW: ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_m60_v_01); + magazineLocation = "_target selectionPosition 'mg1_trigger'"; + disassembleTo = ""; + disassembleWeapon = QGVAR(m60_carry); + disassembleTurret = QEGVAR(csw,m3Tripod); + ammoLoadTime = 10; + ammoUnloadTime = 8; + desiredAmmo = 250; + }; +}; + +// M60 - Low +class vn_static_m60_low_base: vn_static_m60_high_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.25, 0.15, -1.06]"; + }; + }; + + class ACE_CSW: ACE_CSW { + magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; + disassembleTurret = QEGVAR(csw,m3TripodLow); + }; +}; + +// TOW +class vn_static_at3_base: StaticMGWeapon {}; +class vn_static_tow_base: vn_static_at3_base { + EGVAR(dragging,canCarry) = 0; + + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.22, 0.28, -0.85]"; + }; + }; + + class ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_missile_tow_launcher); + magazineLocation = "[-0.22, 0.28, -0.5]"; + disassembleWeapon = QGVAR(tow_carry); + disassembleTurret = QEGVAR(csw,m220Tripod); + ammoLoadTime = 8; + ammoUnloadTime = 5; + desiredAmmo = 1; + }; +}; + +// DShKM - High +class vn_static_dp28_high_base: vn_static_m2_high_base {}; +class vn_static_dshkm_high_01_base: vn_static_dp28_high_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.15, 0.532, -1.06]"; + }; + }; + + class ACE_CSW: ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_dshkm_v_01); + magazineLocation = "_target selectionPosition 'mg1_boxmag'"; + disassembleWeapon = QGVAR(dshkm_carry); + disassembleTurret = QEGVAR(csw,m3Tripod); + ammoLoadTime = 10; + ammoUnloadTime = 8; + desiredAmmo = 50; + }; +}; + +// DShKM - High, with AA sight +class vn_static_dshkm_high_02_base: vn_static_dshkm_high_01_base { + class ACE_CSW: ACE_CSW { + disassembleWeapon = QGVAR(dshkm_AA_carry); + }; +}; + +// DShKM - Low, with shield +class vn_static_dshkm_low_01_base: vn_static_dshkm_high_01_base { + EGVAR(dragging,canCarry) = 0; + + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.3, 0.75, -1]"; + }; + }; + + class ACE_CSW: ACE_CSW { + disassembleWeapon = QGVAR(dshkm_shield_carry); + disassembleTurret = QEGVAR(csw,m3TripodLow); + }; +}; + +// DShKM - Low +class vn_static_dshkm_low_02_base: vn_static_dshkm_low_01_base { + class ACE_CSW: ACE_CSW { + disassembleWeapon = QGVAR(dshkm_carry); + }; +}; + +// RPD - High +class vn_static_rpd_high_base: vn_static_dp28_high_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.158, 0.745, -0.7]"; + }; + }; + + class ACE_CSW: ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_rpd_v_01); + magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; + disassembleWeapon = QGVAR(rpd_carry); + disassembleTurret = QEGVAR(csw,m3Tripod); + ammoLoadTime = 10; + ammoUnloadTime = 8; + desiredAmmo = 100; + }; +}; + +// PK - High +class vn_static_pk_high_base: vn_static_rpd_high_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.156, 0.755, -1.05]"; + }; + }; + + class ACE_CSW: ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_pk_v_01); + magazineLocation = "_target selectionPosition 'mg1_otochlaven_recoil'"; + disassembleWeapon = QGVAR(pk_carry); + disassembleTurret = QEGVAR(csw,m3Tripod); + ammoLoadTime = 10; + ammoUnloadTime = 8; + desiredAmmo = 100; + }; +}; + +// PK - Low +class vn_static_pk_low_base: vn_static_pk_high_base { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = "[-0.35, 0.43, -0.9]"; + }; + }; + + class ACE_CSW: ACE_CSW { + disassembleTurret = QEGVAR(csw,m3TripodLow); + }; +}; + +// --- Mortars ----------------------------------------------------------------- + +// M29 Mortar +class StaticMortar: StaticWeapon {}; +class Mortar_01_base_F: StaticMortar {}; +class vn_static_mortar_m29_base: Mortar_01_base_F { + EGVAR(dragging,canCarry) = 0; + + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = ""; + selection = "otochlaven"; + }; + }; + + class ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_mortar_m29); + magazineLocation = "_target selectionPosition 'pohon'"; + disassembleWeapon = QGVAR(mortar_m29_carry); + disassembleTurret = QEGVAR(csw,mortarBaseplate); + ammoLoadTime = 3; + ammoUnloadTime = 3; + desiredAmmo = 1; + }; +}; + +// M2 / Type 63 Mortar +class vn_static_mortar_m2_base: vn_static_mortar_m29_base { + class ACE_CSW: ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_mortar_m2); + magazineLocation = "_target selectionPosition 'pohon'"; + disassembleWeapon = QGVAR(mortar_m2_carry); + disassembleTurret = QEGVAR(csw,mortarBaseplate); + ammoLoadTime = 3; + ammoUnloadTime = 3; + desiredAmmo = 1; + }; +}; + +// Type 53 Mortar +class vn_static_mortar_type53_base: vn_static_mortar_m29_base { + class ACE_CSW: ACE_CSW { + enabled = 1; + proxyWeapon = QGVAR(vn_mortar_type53); + magazineLocation = "_target selectionPosition 'pohon'"; + disassembleWeapon = QGVAR(mortar_type53_carry); + disassembleTurret = QEGVAR(csw,mortarBaseplate); + ammoLoadTime = 3; + ammoUnloadTime = 3; + desiredAmmo = 1; + }; +}; + +// --- Non-CSW Static Weapons -------------------------------------------------- + +class vn_static_m45_base: vn_static_m2_high_base { + EGVAR(dragging,canCarry) = 0; + EGVAR(dragging,canDrag) = 0; + + class ACE_CSW: ACE_CSW { + enabled = 0; + }; +}; + +class vn_static_zpu4_base: vn_static_m2_high_base { + EGVAR(dragging,canCarry) = 0; + EGVAR(dragging,canDrag) = 0; + + class ACE_CSW: ACE_CSW { + enabled = 0; + }; +}; + +class vn_o_static_rsna75: StaticMGWeapon { + EGVAR(dragging,canCarry) = 0; + EGVAR(dragging,canDrag) = 0; + + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = ""; + selection = "mainturret"; + }; + }; + + class ACE_CSW { + enabled = 0; + }; +}; + +class vn_sa2: StaticMGWeapon { + EGVAR(dragging,canCarry) = 0; + EGVAR(dragging,canDrag) = 0; +}; + +// --- Spiderholes ------------------------------------------------------------- + +class vn_o_vc_spiderhole_01: StaticWeapon { + EGVAR(dragging,canCarry) = 0; + EGVAR(dragging,canDrag) = 0; + + EGVAR(trenches,diggingDuration) = QEGVAR(trenches,smallEnvelopeDigDuration); + EGVAR(trenches,removalDuration) = QEGVAR(trenches,smallEnvelopeRemoveDuration); + EGVAR(trenches,noGeoClass) = QGVAR(spiderhole_01_nogeo); + EGVAR(trenches,placementData)[] = {1.5, 1.5, 0.1}; + EGVAR(trenches,grassCuttingPoints)[] = {}; +}; +class vn_o_vc_spiderhole_02: vn_o_vc_spiderhole_01 { + EGVAR(trenches,noGeoClass) = QGVAR(spiderhole_02_nogeo); +}; +class vn_o_vc_spiderhole_03: vn_o_vc_spiderhole_01 { + EGVAR(trenches,noGeoClass) = QGVAR(spiderhole_03_nogeo); + EGVAR(trenches,placementData)[] = {1.5, 2.5, 0.1}; +}; + +class GVAR(spiderhole_01_nogeo): vn_o_vc_spiderhole_01 { + scope = 1; +}; +class GVAR(spiderhole_02_nogeo): vn_o_vc_spiderhole_02 { + scope = 1; +}; +class GVAR(spiderhole_03_nogeo): vn_o_vc_spiderhole_03 { + scope = 1; +}; diff --git a/optionals/compat_sog/CfgVehicles/units.hpp b/optionals/compat_sog/CfgVehicles/units.hpp new file mode 100644 index 0000000000..d8926f73e9 --- /dev/null +++ b/optionals/compat_sog/CfgVehicles/units.hpp @@ -0,0 +1,35 @@ +class Man; +class CAManBase: Man { + class ACE_SelfActions { + class ACE_Equipment { + class EGVAR(trenches,digEnvelopeSmall); + class GVAR(digSpiderhole): EGVAR(trenches,digEnvelopeSmall) { + displayName = CSTRING(Action_DigSpiderhole); + statement = QUOTE([ARR_2({_this call EFUNC(trenches,placeTrench)},[ARR_2(_this select 0,'vn_o_vc_spiderhole_01')])] call CBA_fnc_execNextFrame); + }; + class GVAR(digSpiderholeAngled): EGVAR(trenches,digEnvelopeSmall) { + displayName = CSTRING(Action_DigSpiderholeAngled); + statement = QUOTE([ARR_2({_this call EFUNC(trenches,placeTrench)},[ARR_2(_this select 0,'vn_o_vc_spiderhole_02')])] call CBA_fnc_execNextFrame); + }; + class GVAR(digSpiderholeDual): EGVAR(trenches,digEnvelopeSmall) { + displayName = CSTRING(Action_DigSpiderholeDual); + statement = QUOTE([ARR_2({_this call EFUNC(trenches,placeTrench)},[ARR_2(_this select 0,'vn_o_vc_spiderhole_03')])] call CBA_fnc_execNextFrame); + }; + }; + }; +}; + +class vn_b_men_aircrew_base; +class vn_b_men_jetpilot_01: vn_b_men_aircrew_base { + ACE_GForceCoef = 0.55; +}; + +class vn_o_men_aircrew_01; +class vn_o_men_aircrew_05: vn_o_men_aircrew_01 { + ACE_GForceCoef = 0.55; +}; + +class vn_i_men_aircrew_base; +class vn_i_men_jetpilot_01: vn_i_men_aircrew_base { + ACE_GForceCoef = 0.55; +}; diff --git a/optionals/compat_sog/CfgVehicles/wheeled.hpp b/optionals/compat_sog/CfgVehicles/wheeled.hpp new file mode 100644 index 0000000000..dcd8c31ff2 --- /dev/null +++ b/optionals/compat_sog/CfgVehicles/wheeled.hpp @@ -0,0 +1,30 @@ +// M39 / M54 / M49 +class vn_wheeled_truck_base; +class vn_wheeled_m54_base: vn_wheeled_truck_base { + EGVAR(refuel,fuelCapacity) = 189; +}; +class vn_wheeled_m54_cab_base; +class vn_wheeled_m54_fuel_base: vn_wheeled_m54_cab_base { + EGVAR(refuel,hooks)[] = {{-1.15, -2.3, 0.28}}; + EGVAR(refuel,fuelCargo) = 4542; +}; + +// M151 +class vn_wheeled_car_base; +class vn_wheeled_m151_base: vn_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 65; +}; + +// ZIL-157 +class vn_wheeled_z157_base: vn_wheeled_truck_base { + EGVAR(refuel,fuelCapacity) = 150; +}; +class vn_wheeled_z157_fuel_base: vn_wheeled_z157_base { + EGVAR(refuel,hooks)[] = {{-1.36, -3.575, -0.4}}; + EGVAR(refuel,fuelCargo) = 4000; +}; + +// BTR-40 +class vn_wheeled_btr40_base: vn_wheeled_car_base { + EGVAR(refuel,fuelCapacity) = 122; +}; diff --git a/optionals/compat_sog/CfgWeapons.hpp b/optionals/compat_sog/CfgWeapons.hpp new file mode 100644 index 0000000000..5302ad6d17 --- /dev/null +++ b/optionals/compat_sog/CfgWeapons.hpp @@ -0,0 +1,7 @@ +class CfgWeapons { + #include "CfgWeapons\csw.hpp" + #include "CfgWeapons\helmets.hpp" + #include "CfgWeapons\launchers.hpp" + #include "CfgWeapons\pistols.hpp" + #include "CfgWeapons\uniforms.hpp" +}; diff --git a/optionals/compat_sog/CfgWeapons/csw.hpp b/optionals/compat_sog/CfgWeapons/csw.hpp new file mode 100644 index 0000000000..cda84c3bb4 --- /dev/null +++ b/optionals/compat_sog/CfgWeapons/csw.hpp @@ -0,0 +1,356 @@ +#include "\z\ace\addons\csw\script_config_macros_csw.hpp" + +CREATE_CSW_PROXY(vn_m2_v_01); +CREATE_CSW_PROXY(vn_m1919_v_01); +CREATE_CSW_PROXY(vn_m60_v_01); +CREATE_CSW_PROXY(vn_missile_tow_launcher); +CREATE_CSW_PROXY(vn_dshkm_v_01); +CREATE_CSW_PROXY(vn_rpd_v_01); +CREATE_CSW_PROXY(vn_pk_v_01); +CREATE_CSW_PROXY(vn_mortar_m29); +CREATE_CSW_PROXY(vn_mortar_m2); +CREATE_CSW_PROXY(vn_mortar_type53); + +class Launcher; +class Launcher_Base_F: Launcher { + class WeaponSlotsInfo; +}; + +class GVAR(m2_carry): Launcher_Base_F { + displayName = ECSTRING(csw,m2_gun); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_m2b_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + + class assembleTo { + EGVAR(csw,m3Tripod) = "vn_b_army_static_m2_high"; + EGVAR(csw,m3TripodLow) = "vn_b_army_static_m2_low"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 840; + }; +}; + +class GVAR(m1919a4_carry): Launcher_Base_F { + displayName = CSTRING(csw_m1919a4); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_m1919a4_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + + class assembleTo { + EGVAR(csw,m3Tripod) = "vn_b_army_static_m1919a4_high"; + EGVAR(csw,m3TripodLow) = "vn_b_sf_static_m1919a4_low"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 310; + }; +}; + +class GVAR(m1919a6_carry): Launcher_Base_F { + displayName = CSTRING(csw_m1919a6); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_m1919a6_ca.paa); + + class ACE_CSW { + type = "mount"; + deployTime = 2; + pickupTime = 2; + deploy = "vn_b_army_static_m1919a6"; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 320; + }; +}; + +class GVAR(m60_carry): Launcher_Base_F { + displayName = CSTRING(csw_m60); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_m60_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + + class assembleTo { + EGVAR(csw,m3Tripod) = "vn_b_army_static_m60_high"; + EGVAR(csw,m3TripodLow) = "vn_b_army_static_m60_low"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 232; + }; +}; + +class GVAR(tow_carry): Launcher_Base_F { + displayName = ECSTRING(csw,tow_tube); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_tow_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + + class assembleTo { + EGVAR(csw,m220Tripod) = "vn_b_army_static_tow"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 500; + }; +}; + +class GVAR(dshkm_carry): Launcher_Base_F { + displayName = ECSTRING(csw,dshk_gun); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_dshkm_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + + class assembleTo { + EGVAR(csw,kordTripod) = "vn_o_nva_static_dshkm_high_01"; + EGVAR(csw,kordTripodLow) = "vn_o_nva_static_dshkm_low_02"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 750; + }; +}; + +class GVAR(dshkm_shield_carry): Launcher_Base_F { + displayName = CSTRING(csw_dshkm_shield); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_dshkm_shield_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + + class assembleTo { + EGVAR(csw,kordTripodLow) = "vn_o_nva_navy_static_dshkm_low_01"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 850; + }; +}; + +class GVAR(dshkm_AA_carry): Launcher_Base_F { + displayName = CSTRING(csw_dshkm_aa); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_dshkm_aa_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + + class assembleTo { + EGVAR(csw,kordTripod) = "vn_o_nva_static_dshkm_high_02"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 750; + }; +}; + +class GVAR(rpd_carry): Launcher_Base_F { + displayName = CSTRING(csw_rpd); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_rpd_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + + class assembleTo { + EGVAR(csw,kordTripod) = "vn_o_nva_static_rpd_high"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 163; + }; +}; + +class GVAR(pk_carry): Launcher_Base_F { + displayName = CSTRING(csw_pk); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_pk_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + + class assembleTo { + EGVAR(csw,kordTripod) = "vn_o_nva_static_dshkm_high_02"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 198; + }; +}; + +class GVAR(mortar_m29_carry): Launcher_Base_F { + displayName = CSTRING(csw_m29); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_m29_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 20; + pickupTime = 25; + + class assembleTo { + EGVAR(csw,mortarBaseplate) = "vn_b_army_static_mortar_m29"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 730; + }; +}; + +class GVAR(mortar_m2_carry): Launcher_Base_F { + displayName = CSTRING(csw_m2); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_m2_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 20; + pickupTime = 25; + + class assembleTo { + EGVAR(csw,mortarBaseplate) = "vn_b_army_static_mortar_m2"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 300; + }; +}; + +class GVAR(mortar_type53_carry): Launcher_Base_F { + displayName = CSTRING(csw_type53); + author = ECSTRING(common,ACETeam); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = QPATHTOF(UI\csw_type53_ca.paa); + + class ACE_CSW { + type = "weapon"; + deployTime = 20; + pickupTime = 25; + + class assembleTo { + EGVAR(csw,mortarBaseplate) = "vn_o_nva_static_mortar_type53"; + }; + }; + + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot { + iconScale = 0.1; + }; + mass = 860; + }; +}; diff --git a/optionals/compat_sog/CfgWeapons/helmets.hpp b/optionals/compat_sog/CfgWeapons/helmets.hpp new file mode 100644 index 0000000000..69bc30adcc --- /dev/null +++ b/optionals/compat_sog/CfgWeapons/helmets.hpp @@ -0,0 +1,37 @@ +#define HEARING_PROTECTION_OPEN EGVAR(hearing,protection) = 0; EGVAR(hearing,lowerVolume) = 0 +#define HEARING_PROTECTION_VICCREW EGVAR(hearing,protection) = 0.85; EGVAR(hearing,lowerVolume) = 0.6 +#define HEARING_PROTECTION_EARMUFF EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0.5 +#define HEARING_PROTECTION_PELTOR EGVAR(hearing,protection) = 0.75; EGVAR(hearing,lowerVolume) = 0 + +class vn_b_headgear_base; +class vn_b_helmet_aph6_01_01: vn_b_headgear_base { + HEARING_PROTECTION_VICCREW; +}; +class vn_b_helmet_aph6_02_01: vn_b_headgear_base { + HEARING_PROTECTION_VICCREW; + ACE_Protection = 1; +}; +class vn_b_helmet_sph4_01_01: vn_b_headgear_base { + HEARING_PROTECTION_VICCREW; +}; +class vn_b_helmet_sph4_02_01: vn_b_headgear_base { + HEARING_PROTECTION_VICCREW; + ACE_Protection = 1; +}; +class vn_b_helmet_t56_01_01: vn_b_headgear_base { + HEARING_PROTECTION_VICCREW; +}; + +class vn_o_headgear_base; +class vn_o_helmet_tsh3_01: vn_o_headgear_base { + HEARING_PROTECTION_VICCREW; +}; +class vn_o_helmet_zsh3_01: vn_o_headgear_base { + HEARING_PROTECTION_VICCREW; +}; +class vn_o_helmet_zsh3_02: vn_o_helmet_zsh3_01 { + ACE_Protection = 1; +}; +class vn_o_helmet_shl61_01: vn_o_headgear_base { + HEARING_PROTECTION_VICCREW; +}; diff --git a/optionals/compat_sog/CfgWeapons/launchers.hpp b/optionals/compat_sog/CfgWeapons/launchers.hpp new file mode 100644 index 0000000000..024322d884 --- /dev/null +++ b/optionals/compat_sog/CfgWeapons/launchers.hpp @@ -0,0 +1,13 @@ +class vn_Launcher_Base_F; +class vn_m127: vn_Launcher_Base_F { + ace_overpressure_damage = 0; +}; +class vn_rpg2: vn_Launcher_Base_F { + ace_reloadlaunchers_enabled = 1; +}; +class vn_rpg7: vn_Launcher_Base_F { + ace_reloadlaunchers_enabled = 1; +}; +class vn_sa7: vn_Launcher_Base_F { + ace_reloadlaunchers_enabled = 1; +}; diff --git a/optionals/compat_sog/CfgWeapons/pistols.hpp b/optionals/compat_sog/CfgWeapons/pistols.hpp new file mode 100644 index 0000000000..e56cbbb04e --- /dev/null +++ b/optionals/compat_sog/CfgWeapons/pistols.hpp @@ -0,0 +1,33 @@ +#define MX991_FLASHLIGHT_SIZE 1.75 + +class vn_pm; +class vn_fkb1_pm: vn_pm { + ACE_Flashlight_Colour = "white"; + ACE_Flashlight_Beam = QPATHTOEF(flashlights,UI\Flashlight_beam_white_ca.paa); + ACE_Flashlight_Size = MX991_FLASHLIGHT_SIZE; +}; +class vn_fkb1_pm_sd: vn_fkb1_pm { + ACE_Flashlight_Colour = "red"; + ACE_Flashlight_Beam = QPATHTOEF(flashlights,UI\Flashlight_beam_red_ca.paa); +}; +class vn_fkb1; +class vn_fkb1_red: vn_fkb1 { + ACE_Flashlight_Colour = "red"; + ACE_Flashlight_Beam = QPATHTOEF(flashlights,UI\Flashlight_beam_red_ca.paa); +}; + +class vn_m1911; +class vn_mx991_m1911: vn_m1911 { + ACE_Flashlight_Colour = "white"; + ACE_Flashlight_Beam = QPATHTOEF(flashlights,UI\Flashlight_beam_white_ca.paa); + ACE_Flashlight_Size = MX991_FLASHLIGHT_SIZE; +}; +class vn_mx991_m1911_sd: vn_mx991_m1911 { + ACE_Flashlight_Colour = "red"; + ACE_Flashlight_Beam = QPATHTOEF(flashlights,UI\Flashlight_beam_red_ca.paa); +}; +class vn_mx991; +class vn_mx991_red: vn_mx991 { + ACE_Flashlight_Colour = "red"; + ACE_Flashlight_Beam = QPATHTOEF(flashlights,UI\Flashlight_beam_red_ca.paa); +}; diff --git a/optionals/compat_sog/CfgWeapons/uniforms.hpp b/optionals/compat_sog/CfgWeapons/uniforms.hpp new file mode 100644 index 0000000000..1758196032 --- /dev/null +++ b/optionals/compat_sog/CfgWeapons/uniforms.hpp @@ -0,0 +1,12 @@ +class vn_b_uniform_base; +class vn_b_uniform_k2b_01_01: vn_b_uniform_base { + ACE_GForceCoef = 0.8; +}; +class vn_b_uniform_k2b_01_02: vn_b_uniform_base { + ACE_GForceCoef = 0.8; +}; + +class vn_o_uniform_base; +class vn_o_uniform_nva_air_01: vn_o_uniform_base { + ACE_GForceCoef = 0.8; +}; diff --git a/optionals/compat_sog/EMM_mainMenu_CfgMenus.hpp b/optionals/compat_sog/EMM_mainMenu_CfgMenus.hpp new file mode 100644 index 0000000000..4c854a665b --- /dev/null +++ b/optionals/compat_sog/EMM_mainMenu_CfgMenus.hpp @@ -0,0 +1,26 @@ +class EMM_mainMenu_CfgMenus { + class VN { + class menus { + class MainMenu; + class Tutorials: MainMenu { + items[] = { + "Bootcamp", + "VRTraining", + "Arsenal", + QGVAR(Arsenal), + "FieldManual", + "CommunityGuides", + "Exit" + }; + + class Arsenal; + class GVAR(Arsenal): Arsenal { + idc = -1; + action = QUOTE(playMission [ARR_2('','PATHTOEF(Arsenal,missions\Arsenal.VR)')]); + text = ECSTRING(Arsenal,Mission); + tooltip = ECSTRING(Arsenal,Mission_tooltip); + }; + }; + }; + }; +}; diff --git a/optionals/compat_sog/UI/ammo_1rnd_60mm_ca.paa b/optionals/compat_sog/UI/ammo_1rnd_60mm_ca.paa new file mode 100644 index 0000000000..021374ff5d Binary files /dev/null and b/optionals/compat_sog/UI/ammo_1rnd_60mm_ca.paa differ diff --git a/optionals/compat_sog/UI/ammo_1rnd_81mm_ca.paa b/optionals/compat_sog/UI/ammo_1rnd_81mm_ca.paa new file mode 100644 index 0000000000..a83c4ef753 Binary files /dev/null and b/optionals/compat_sog/UI/ammo_1rnd_81mm_ca.paa differ diff --git a/optionals/compat_sog/UI/ammo_1rnd_82mm_ca.paa b/optionals/compat_sog/UI/ammo_1rnd_82mm_ca.paa new file mode 100644 index 0000000000..6eed14616b Binary files /dev/null and b/optionals/compat_sog/UI/ammo_1rnd_82mm_ca.paa differ diff --git a/optionals/compat_sog/UI/ammo_1rnd_TOW_ca.paa b/optionals/compat_sog/UI/ammo_1rnd_TOW_ca.paa new file mode 100644 index 0000000000..a38956e117 Binary files /dev/null and b/optionals/compat_sog/UI/ammo_1rnd_TOW_ca.paa differ diff --git a/optionals/compat_sog/UI/ammo_200rnd_762mm_ca.paa b/optionals/compat_sog/UI/ammo_200rnd_762mm_ca.paa new file mode 100644 index 0000000000..d6a735e739 Binary files /dev/null and b/optionals/compat_sog/UI/ammo_200rnd_762mm_ca.paa differ diff --git a/optionals/compat_sog/UI/ammo_250rnd_30cal_ca.paa b/optionals/compat_sog/UI/ammo_250rnd_30cal_ca.paa new file mode 100644 index 0000000000..e3f416e993 Binary files /dev/null and b/optionals/compat_sog/UI/ammo_250rnd_30cal_ca.paa differ diff --git a/optionals/compat_sog/UI/ammo_50rnd_127mm_ca.paa b/optionals/compat_sog/UI/ammo_50rnd_127mm_ca.paa new file mode 100644 index 0000000000..51f65d5dfb Binary files /dev/null and b/optionals/compat_sog/UI/ammo_50rnd_127mm_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_dshkm_aa_ca.paa b/optionals/compat_sog/UI/csw_dshkm_aa_ca.paa new file mode 100644 index 0000000000..ed5cc28a09 Binary files /dev/null and b/optionals/compat_sog/UI/csw_dshkm_aa_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_dshkm_ca.paa b/optionals/compat_sog/UI/csw_dshkm_ca.paa new file mode 100644 index 0000000000..9e9571b7d5 Binary files /dev/null and b/optionals/compat_sog/UI/csw_dshkm_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_dshkm_shield_ca.paa b/optionals/compat_sog/UI/csw_dshkm_shield_ca.paa new file mode 100644 index 0000000000..91e097f6f3 Binary files /dev/null and b/optionals/compat_sog/UI/csw_dshkm_shield_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_m1919a4_ca.paa b/optionals/compat_sog/UI/csw_m1919a4_ca.paa new file mode 100644 index 0000000000..a983d63ab6 Binary files /dev/null and b/optionals/compat_sog/UI/csw_m1919a4_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_m1919a6_ca.paa b/optionals/compat_sog/UI/csw_m1919a6_ca.paa new file mode 100644 index 0000000000..9732004eec Binary files /dev/null and b/optionals/compat_sog/UI/csw_m1919a6_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_m29_ca.paa b/optionals/compat_sog/UI/csw_m29_ca.paa new file mode 100644 index 0000000000..dd6ab04a00 Binary files /dev/null and b/optionals/compat_sog/UI/csw_m29_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_m2_ca.paa b/optionals/compat_sog/UI/csw_m2_ca.paa new file mode 100644 index 0000000000..189508a0aa Binary files /dev/null and b/optionals/compat_sog/UI/csw_m2_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_m2b_ca.paa b/optionals/compat_sog/UI/csw_m2b_ca.paa new file mode 100644 index 0000000000..111cf94a83 Binary files /dev/null and b/optionals/compat_sog/UI/csw_m2b_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_m60_ca.paa b/optionals/compat_sog/UI/csw_m60_ca.paa new file mode 100644 index 0000000000..11f180f902 Binary files /dev/null and b/optionals/compat_sog/UI/csw_m60_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_pk_ca.paa b/optionals/compat_sog/UI/csw_pk_ca.paa new file mode 100644 index 0000000000..23d47b5265 Binary files /dev/null and b/optionals/compat_sog/UI/csw_pk_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_rpd_ca.paa b/optionals/compat_sog/UI/csw_rpd_ca.paa new file mode 100644 index 0000000000..00ab06a14c Binary files /dev/null and b/optionals/compat_sog/UI/csw_rpd_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_tow_ca.paa b/optionals/compat_sog/UI/csw_tow_ca.paa new file mode 100644 index 0000000000..e5b3c658cd Binary files /dev/null and b/optionals/compat_sog/UI/csw_tow_ca.paa differ diff --git a/optionals/compat_sog/UI/csw_type53_ca.paa b/optionals/compat_sog/UI/csw_type53_ca.paa new file mode 100644 index 0000000000..c4c76553e8 Binary files /dev/null and b/optionals/compat_sog/UI/csw_type53_ca.paa differ diff --git a/optionals/compat_sog/XEH_PREP.hpp b/optionals/compat_sog/XEH_PREP.hpp new file mode 100644 index 0000000000..0b86f42702 --- /dev/null +++ b/optionals/compat_sog/XEH_PREP.hpp @@ -0,0 +1,2 @@ +PREP(disableCookoff); +PREP(handlePunjiTrapDamage); diff --git a/optionals/compat_sog/XEH_preInit.sqf b/optionals/compat_sog/XEH_preInit.sqf new file mode 100644 index 0000000000..b47cf6628d --- /dev/null +++ b/optionals/compat_sog/XEH_preInit.sqf @@ -0,0 +1,9 @@ +#include "script_component.hpp" + +ADDON = false; + +PREP_RECOMPILE_START; +#include "XEH_PREP.hpp" +PREP_RECOMPILE_END; + +ADDON = true; diff --git a/optionals/compat_sog/XEH_preStart.sqf b/optionals/compat_sog/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/optionals/compat_sog/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/optionals/compat_sog/config.cpp b/optionals/compat_sog/config.cpp new file mode 100644 index 0000000000..afe380619c --- /dev/null +++ b/optionals/compat_sog/config.cpp @@ -0,0 +1,49 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = { + QGVAR(box_81mm_he), + QGVAR(box_81mm_wp), + QGVAR(box_81mm_chem), + QGVAR(box_81mm_lume), + QGVAR(box_60mm_he), + QGVAR(box_60mm_wp), + QGVAR(box_60mm_lume), + QGVAR(box_82mm_he), + QGVAR(box_82mm_wp), + QGVAR(box_82mm_lume) + }; + weapons[] = { + QGVAR(m2_carry), + QGVAR(m1919a4_carry), + QGVAR(m1919a6_carry), + QGVAR(m60_carry), + QGVAR(tow_carry), + QGVAR(dshkm_carry), + QGVAR(dshkm_shield_carry), + QGVAR(dshkm_AA_carry), + QGVAR(rpd_carry), + QGVAR(pk_carry), + QGVAR(mortar_m29_carry), + QGVAR(mortar_m2_carry), + QGVAR(mortar_type53_carry) + }; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"vn_weapons", "vn_emm_main_menu", "weapons_f_vietnam_c", "ace_trenches"}; + author = ECSTRING(common,ACETeam); + authors[] = {"BaerMitUmlaut", "veteran29"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "ACE_CSW_Groups.hpp" +#include "CfgAmmo.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgGlasses.hpp" +#include "CfgMagazines.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" +#include "EMM_mainMenu_CfgMenus.hpp" diff --git a/optionals/compat_sog/functions/fnc_disableCookoff.sqf b/optionals/compat_sog/functions/fnc_disableCookoff.sqf new file mode 100644 index 0000000000..67e42e5638 --- /dev/null +++ b/optionals/compat_sog/functions/fnc_disableCookoff.sqf @@ -0,0 +1,21 @@ +#include "script_component.hpp" +/* + * Author: BaerMitUmlaut + * Disables cookoff for bicycles. + * + * Arguments: + * 0: Bicycle + * + * Return Value: + * None + * + * Example: + * [bicycle] call ace_compat_sog_fnc_disableCookoff + * + * Public: No + */ + +params ["_bicycle"]; + +_bicycle setVariable [QEGVAR(cookoff,enable), false]; +_bicycle setVariable [QEGVAR(cookoff,enableAmmoCookoff), false]; diff --git a/optionals/compat_sog/functions/fnc_handlePunjiTrapDamage.sqf b/optionals/compat_sog/functions/fnc_handlePunjiTrapDamage.sqf new file mode 100644 index 0000000000..9201929656 --- /dev/null +++ b/optionals/compat_sog/functions/fnc_handlePunjiTrapDamage.sqf @@ -0,0 +1,52 @@ +#include "script_component.hpp" +/* + * Author: BaerMitUmlaut + * Manually triggers punji trap damage. + * + * Arguments: + * 0: Punji trap + * + * Return Value: + * None + * + * Example: + * [trap] call ace_compat_sog_fnc_handlePunjiTrapDamage + * + * Public: No + */ +params ["_trap"]; + +if (isNull (configFile >> "CfgPatches" >> "ace_medical")) exitWith {}; + +private _radius = getNumber (configOf _trap >> "indirectHitRange"); +private _affectedUnits = (_trap nearEntities ["CAManBase", _radius]) select {local _x}; +(getShotParents _trap) params ["", "_instigator"]; + +if (_affectedUnits isEqualTo []) exitWith {}; + +private _bodyParts = []; +private _stabCount = 0; + +switch (typeOf _trap select [0, 16]) do { + // Large trap + case "vn_mine_punji_01": { + _bodyParts = ["LeftLeg", "RightLeg", "Body"]; + _stabCount = random [7, 10, 13]; + }; + // Small trap + case "vn_mine_punji_02": { + _bodyParts = ["LeftLeg", "RightLeg"]; + _stabCount = random [3, 5, 7]; + }; + // Whip trap + case "vn_mine_punji_03": { + _bodyParts = ["LeftLeg", "RightLeg", "Body"]; + _stabCount = random [3, 5, 7]; + }; +}; + +{ + for "_i" from 0 to _stabCount do { + [_x, random [1, 2, 3], selectRandom _bodyParts, "stab", _instigator] call EFUNC(medical,addDamageToUnit); + }; +} forEach _affectedUnits; diff --git a/optionals/compat_sog/functions/script_component.hpp b/optionals/compat_sog/functions/script_component.hpp new file mode 100644 index 0000000000..87e5b9e10d --- /dev/null +++ b/optionals/compat_sog/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\compat_sog\script_component.hpp" diff --git a/optionals/compat_sog/script_component.hpp b/optionals/compat_sog/script_component.hpp new file mode 100644 index 0000000000..d1d3e65186 --- /dev/null +++ b/optionals/compat_sog/script_component.hpp @@ -0,0 +1,9 @@ +#define COMPONENT compat_sog +#define COMPONENT_BEAUTIFIED S.O.G. Prairie Fire Compatibility + +#include "\z\ace\addons\main\script_mod.hpp" + +#include "\z\ace\addons\main\script_macros.hpp" + +#define EXPLOSIVES_PLACE(CLASS) EGVAR(explosives,DOUBLES(Place,CLASS)) +#define QEXPLOSIVES_PLACE(CLASS) QUOTE(EXPLOSIVES_PLACE(CLASS)) diff --git a/optionals/compat_sog/stringtable.xml b/optionals/compat_sog/stringtable.xml new file mode 100644 index 0000000000..6f1bd83cd1 --- /dev/null +++ b/optionals/compat_sog/stringtable.xml @@ -0,0 +1,209 @@ + + + + + Dig in + Zakop + Eingraben + 掘る + + + M49A2 60mm HE + M49A2 60mm HE + M49A2 60mm りゅう弾 + M49A2 60mm HE + + + M302 60mm WP + M302 60mm Weißer Phosphor + M302 60mm 白リン弾 + M302 60mm WP + + + M83 60mm Lume + M83 60mm Leuchtpatrone + M83 60mm 照明弾 + M83 60mm ILUM + + + M374 81mm HE + M374 81mm HE + M374 81mm りゅう弾 + M374 81mm HE + + + M375 81mm WP + M375 81mm Weißer Phosphor + M375 81mm 白リン弾 + M375 81mm WP + + + M301A3 81mm Lume + M301A3 81mm Leuchtpatrone + M301A3 81mm 照明弾 + M301A3 81mm ILUM + + + M57 81mm Smoke + M57 81mm Nebelpatrone + M57 81mm 発煙弾 + M57 81mm Dymny + + + O-832D 82mm HE + O-832D 82mm HE + O-832D 82mm りゅう弾 + O-832D 82mm HE + + + D-832 82mm WP + D-832 82mm Weißer Phosphor + D-832 82mm 白リン弾 + D-832 82mm WP + + + S-832S 82mm Lume + S-832S 82mm Leuchtpatrone + S-832S 82mm 照明弾 + S-832S 82mm ILUM + + + [ACE] M49A2 60mm HE Box + [ACE] M49A2 60mm HE Box + [ACE] M49A2 60mm りゅう弾入り弾薬箱 + [ACE] Skrzynia M49A2 60mm HE + + + [ACE] M302 60mm WP Box + [ACE] M302 60mm Weißer Phosphor Box + [ACE] M302 60mm 白リン弾入り弾薬箱 + [ACE] Skrzynia M302 60mm WP + + + [ACE] M83 60mm Lume Box + [ACE] M83 60mm Leuchtpatrone Box + [ACE] M83 60mm 照明弾弾入り弾薬箱 + [ACE] Skrzynia ILUM M83 60mm + + + [ACE] M374 81mm HE Box + [ACE] M374 81mm HE Box + [ACE] M374 81mm りゅう弾入り弾薬箱 + [ACE] Skrzynia M374 81mm HE + + + [ACE] M375 81mm WP Box + [ACE] M375 81mm Weißer Phosphor Box + [ACE] M375 81mm 白リン弾入り弾薬箱 + [ACE] Skrzynia M375 81mm WP + + + [ACE] M301A3 81mm Lume Box + [ACE] M301A3 81mm Leuchtpatrone Box + [ACE] M301A1 81mm 照明弾入り弾薬箱 + [ACE] Skrzynia M301A3 81mm ILUM + + + [ACE] M57 81mm Smoke Box + [ACE] M57 81mm Nebelpatrone Box + [ACE] M57 81mm 煙幕弾入り弾薬箱 + [ACE] Skrzynia M57 81mm Dymny + + + [ACE] O-832D 82mm HE Box + [ACE] O-832D 82mm HE Box + [ACE] O-832D 82mm りゅう弾入り弾薬箱 + [ACE] Skrzynia O-832D 82mm HE + + + [ACE] D-832 82mm WP Box + [ACE] D-832 82mm Weißer Phosphor Box + [ACE] D-832 82mm 白リン弾入り弾薬箱 + [ACE] Skrzynia D-832 82mm WP + + + [ACE] S-832S 82mm Lume Box + [ACE] S-832S 82mm Leuchtpatrone Box + [ACE] S-832S 82mm 照明弾入り弾薬箱 + [ACE] Skrzynia S-832S 82mm ILUM + + + Dig Spiderhole + Schützenloch graben + 蛸壺壕を掘る + Wykop Lisią Norę + + + Dig Spiderhole (Angled Cover) + Schützenloch graben (Abgeschrägte Abdeckung) + 蛸壺壕 (屋根) を掘る + Wykop Lisią Norę (z dachem) + + + Dig Spiderhole (Dual) + Großes Schützenloch graben + 蛸壺壕 (2人用) を掘る + Wykop Lisią Norę (podwójną) + + + [CSW] M1919A4 Gun Bag + [CSW] M1919A4 Waffentasche + [CSW] M1919A4 ガン バッグ + [CSW] Torba na M1919A4 + + + [CSW] M1919A6 Gun Bag + [CSW] M1919A6 Waffentasche + [CSW] M1919A6 ガン バッグ + [CSW] Torba na M1919A6 + + + [CSW] M60 Gun Bag + [CSW] M60 Waffentasche + [CSW] M60 ガン バッグ + [CSW] Torba na M60 + + + [CSW] DShK (Shield) Gun Bag + [CSW] DShK (Schutzschild) Waffentasche + [CSW] DShK (防盾) ガン バッグ + [CSW] Torba na DShK (z tarczą) + + + [CSW] DShK (AA) Gun Bag + [CSW] DShK (AA) Waffentasche + [CSW] DShK (対空) ガン バッグ + [CSW] Torba na DShK (AA) + + + [CSW] RPD Gun Bag + [CSW] RPD Waffentasche + [CSW] RPD ガン バッグ + [CSW] Torba na RPD + + + [CSW] PK Gun Bag + [CSW] PK Waffentasche + [CSW] PK ガン バッグ + [CSW] Torba na PK + + + [CSW] M29 Mortar Tube + [CSW] M29 Mörserrohr + [CSW] M29 発射筒 + [CSW] M29 Rura od moździerza + + + [CSW] M2 Mortar Tube + [CSW] M2 Mörserrohr + [CSW] M2 底盤 + [CSW] M2 Rura od moździerza + + + [CSW] Type 53 Mortar Tube + [CSW] Typ 53 Mörserrohr + [CSW] 53 式 発射筒 + [CSW] Type 53 Rura od moździerza + + + diff --git a/optionals/noactionmenu/README.md b/optionals/noactionmenu/README.md index c2e247bf44..fa34f9350d 100644 --- a/optionals/noactionmenu/README.md +++ b/optionals/noactionmenu/README.md @@ -2,10 +2,3 @@ ace_noactionmenu =========== Removes weapon select action. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/optionals/nocrosshair/README.md b/optionals/nocrosshair/README.md index ac9bcf43e0..c4992f1da9 100644 --- a/optionals/nocrosshair/README.md +++ b/optionals/nocrosshair/README.md @@ -2,10 +2,3 @@ ace_nocrosshair =========== Removes weapon crosshair. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [commy2](https://github.com/commy2) diff --git a/optionals/nouniformrestrictions/CfgEventHandlers.hpp b/optionals/nouniformrestrictions/CfgEventHandlers.hpp index 93e3311cf2..865276cfba 100644 --- a/optionals/nouniformrestrictions/CfgEventHandlers.hpp +++ b/optionals/nouniformrestrictions/CfgEventHandlers.hpp @@ -1,11 +1,11 @@ class Extended_PreStart_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preStart)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preStart)); }; }; class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_preInit)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; diff --git a/optionals/nouniformrestrictions/CfgVehicles.hpp b/optionals/nouniformrestrictions/CfgVehicles.hpp index bb4c5a9bdf..4c5045abd1 100644 --- a/optionals/nouniformrestrictions/CfgVehicles.hpp +++ b/optionals/nouniformrestrictions/CfgVehicles.hpp @@ -25,6 +25,8 @@ class CfgVehicles { class I_crew_F; class O_R_Gorka_F; class I_L_Soldier_Base_F; + class C_Uniform_ParadeUniform_01_base_F; + class C_Uniform_ParadeUniform_01_belt_base_F; class Civilian_F: Civilian { modelSides[] = {6}; @@ -323,5 +325,28 @@ class CfgVehicles { class I_L_Uniform_01_tshirt_olive_F: I_L_Uniform_01_tshirt_skull_F { modelSides[] = {6}; }; + class B_Uniform_ParadeUniform_01_US_F: C_Uniform_ParadeUniform_01_base_F { + modelSides[] = {6}; + }; + class B_Uniform_ParadeUniform_01_US_decorated_F: C_Uniform_ParadeUniform_01_base_F { + modelSides[] = {6}; + }; + class O_Uniform_ParadeUniform_01_CSAT_F: C_Uniform_ParadeUniform_01_belt_base_F { + modelSides[] = {6}; + }; + class O_Uniform_ParadeUniform_01_CSAT_decorated_F: C_Uniform_ParadeUniform_01_belt_base_F { + modelSides[] = {6}; + }; + class I_Uniform_ParadeUniform_01_AAF_F: C_Uniform_ParadeUniform_01_belt_base_F { + modelSides[] = {6}; + }; + class I_Uniform_ParadeUniform_01_AAF_decorated_F: C_Uniform_ParadeUniform_01_belt_base_F { + modelSides[] = {6}; + }; + class I_E_Uniform_ParadeUniform_01_LDF_F: C_Uniform_ParadeUniform_01_belt_base_F { + modelSides[] = {6}; + }; + class I_E_Uniform_ParadeUniform_01_LDF_decorated_F: C_Uniform_ParadeUniform_01_belt_base_F { + modelSides[] = {6}; + }; }; - diff --git a/optionals/nouniformrestrictions/README.md b/optionals/nouniformrestrictions/README.md index cb7dfe4c5b..ba21f3efe5 100644 --- a/optionals/nouniformrestrictions/README.md +++ b/optionals/nouniformrestrictions/README.md @@ -2,11 +2,3 @@ ace_nouniformrestrictions ======= Removes side restrictions from all vanilla uniforms. - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [654wak654](https://github.com/654wak654) -- [Jonpas](https://github.com/jonpas) diff --git a/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf b/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf index b43a530728..ada3609895 100644 --- a/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf +++ b/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf @@ -27,8 +27,8 @@ private _baseClasses = []; } count ( ("!isNull (_x >> 'modelSides') &&" + "{(_x >> 'modelSides') in (configProperties [_x, 'true', false])} &&" + - "{!(getArray (_x >> 'modelSides') isEqualTo [6])} &&" + - "{!(getArray (_x >> 'modelSides') isEqualTo [0,1,2,3])}") + "{getArray (_x >> 'modelSides') isNotEqualTo [6]} &&" + + "{getArray (_x >> 'modelSides') isNotEqualTo [0,1,2,3]}") configClasses (configFile >> "CfgVehicles") ); diff --git a/optionals/particles/README.md b/optionals/particles/README.md index 5f03b880b2..e9c72d1380 100644 --- a/optionals/particles/README.md +++ b/optionals/particles/README.md @@ -2,9 +2,3 @@ ace_particles ========== Changes smoke particles from smoke hand grenades, 40mm grenades and artillery shells to be more realistic and useful. - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [BaerMitUmlaut](https://github.com/BaerMitUmlaut) diff --git a/optionals/particles/script_component.hpp b/optionals/particles/script_component.hpp index 53a4988a8d..f783f7bede 100644 --- a/optionals/particles/script_component.hpp +++ b/optionals/particles/script_component.hpp @@ -27,17 +27,18 @@ type = "ACE_SmokeBaseMedium"; \ }; \ } +#define MERGE(var1,var2) var1####var2 #define EFFECT_40MM(color) class ACE_40mmSmokeShell##color##Effect: ACE_40mmSmokeShellWhiteEffect { \ class SmokeShellUW { \ simulation = "particles"; \ - type = QUOTE(SmokeShell##color##UW); \ + type = QUOTE(MERGE(SmokeShell,MERGE(color,UW))); \ position[] = {0, 0, 0}; \ intensity = 1; \ interval = 1; \ }; \ class SmokeShell2UW { \ simulation = "particles"; \ - type = QUOTE(SmokeShell##color##2UW); \ + type = QUOTE(MERGE(SmokeShell,MERGE(color,2UW))); \ position[] = {0, 0, 0}; \ intensity = 1; \ interval = 1; \ @@ -45,11 +46,11 @@ } #define EFFECT_AFTER_WATER(color) class ACE_SmokeAfterWater##color: ACE_SmokeAfterWaterWhite { \ class SmokeAfterWater: SmokeAfterWater { \ - type = QUOTE(ACE_SmokeAfterWater##color); \ + type = QUOTE(MERGE(ACE_SmokeAfterWater,color)); \ }; \ } #define CLOUDLET_UNDERWATER(color) class SmokeShell##color##UW; \ class SmokeShell##color##2UW: SmokeShell##color##UW { \ - postEffects = QUOTE(ACE_SmokeAfterWater##color); \ + postEffects = QUOTE(MERGE(ACE_SmokeAfterWater,color)); \ } diff --git a/optionals/tracers/CfgAmmo.hpp b/optionals/tracers/CfgAmmo.hpp index 9da774a4fb..5e316b8176 100644 --- a/optionals/tracers/CfgAmmo.hpp +++ b/optionals/tracers/CfgAmmo.hpp @@ -88,14 +88,14 @@ class CfgAmmo { class B_338_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_338_NM_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red - class ACE_338_NM_Ball_green : B_338_NM_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; - class ACE_338_NM_Ball_yellow : B_338_NM_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; + class ACE_338_NM_Ball_green: B_338_NM_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; + class ACE_338_NM_Ball_yellow: B_338_NM_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; class B_127x54_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green class B_93x64_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green - class ACE_93x64_Ball_tracer_red : B_93x64_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; - class ACE_93x64_Ball_tracer_yellow : B_93x64_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; + class ACE_93x64_Ball_tracer_red: B_93x64_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; + class ACE_93x64_Ball_tracer_yellow: B_93x64_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Autocannon class B_19mm_HE: BulletBase {model = PATHTOF(ace_TracerWhite2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white diff --git a/optionals/tracers/CfgMagazines.hpp b/optionals/tracers/CfgMagazines.hpp index bd2919631a..40f19bfda7 100644 --- a/optionals/tracers/CfgMagazines.hpp +++ b/optionals/tracers/CfgMagazines.hpp @@ -1,37 +1,38 @@ +//IGNORE_STRING_WARNING(str_ace_tracers_magazine); #define STRINGS(magazine) author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine) class CfgMagazines { // 5.56mm class 150Rnd_556x45_Drum_Mag_F; - class ACE_150Rnd_556x45_Drum_green : 150Rnd_556x45_Drum_Mag_F { + class ACE_150Rnd_556x45_Drum_green: 150Rnd_556x45_Drum_Mag_F { ammo = "B_556x45_Ball_tracer_green"; STRINGS(150Rnd_556x45_Drum_green); }; - class ACE_150Rnd_556x45_Drum_yellow : 150Rnd_556x45_Drum_Mag_F { + class ACE_150Rnd_556x45_Drum_yellow: 150Rnd_556x45_Drum_Mag_F { ammo = "B_556x45_Ball_tracer_yellow"; STRINGS(150Rnd_556x45_Drum_yellow); }; class 150Rnd_556x45_Drum_Mag_tracer_F; - class ACE_150Rnd_556x45_Drum_tracer_green : 150Rnd_556x45_Drum_Mag_tracer_F { + class ACE_150Rnd_556x45_Drum_tracer_green: 150Rnd_556x45_Drum_Mag_tracer_F { ammo = "B_556x45_Ball_tracer_green"; STRINGS(150Rnd_556x45_Drum_tracer_green); descriptionShort = CSTRING(150Rnd_556x45_Drum_tracer_green_description); }; - class ACE_150Rnd_556x45_Drum_tracer_yellow : 150Rnd_556x45_Drum_Mag_tracer_F { + class ACE_150Rnd_556x45_Drum_tracer_yellow: 150Rnd_556x45_Drum_Mag_tracer_F { ammo = "B_556x45_Ball_tracer_yellow"; STRINGS(150Rnd_556x45_Drum_tracer_yellow); descriptionShort = CSTRING(150Rnd_556x45_Drum_tracer_green_description); }; class 200Rnd_556x45_Box_F; - class ACE_200Rnd_556x45_Box_green : 200Rnd_556x45_Box_F { + class ACE_200Rnd_556x45_Box_green: 200Rnd_556x45_Box_F { ammo = "B_556x45_Ball_tracer_green"; STRINGS(200Rnd_556x45_Box_green); }; class 200Rnd_556x45_Box_tracer_F; - class ACE_200Rnd_556x45_Box_tracer_green : 200Rnd_556x45_Box_tracer_F { + class ACE_200Rnd_556x45_Box_tracer_green: 200Rnd_556x45_Box_tracer_F { ammo = "B_556x45_Ball_tracer_green"; STRINGS(200Rnd_556x45_Box_tracer_green); descriptionShort = CSTRING(200Rnd_556x45_Box_tracer_green_description); @@ -39,70 +40,70 @@ class CfgMagazines { // 5.8mm class 30Rnd_580x42_Mag_F; - class ACE_30Rnd_580x42_Mag_red : 30Rnd_580x42_Mag_F { + class ACE_30Rnd_580x42_Mag_red: 30Rnd_580x42_Mag_F { ammo = "ACE_580x42_Ball_tracer_red"; STRINGS(30Rnd_580x42_Mag_red); }; - class ACE_30Rnd_580x42_Mag_yellow : 30Rnd_580x42_Mag_F { + class ACE_30Rnd_580x42_Mag_yellow: 30Rnd_580x42_Mag_F { ammo = "ACE_580x42_Ball_tracer_yellow"; STRINGS(30Rnd_580x42_Mag_yellow); }; class 30Rnd_580x42_Mag_tracer_F; - class ACE_30Rnd_580x42_Mag_tracer_red : 30Rnd_580x42_Mag_tracer_F { + class ACE_30Rnd_580x42_Mag_tracer_red: 30Rnd_580x42_Mag_tracer_F { ammo = "ACE_580x42_Ball_tracer_red"; STRINGS(30Rnd_580x42_Mag_tracer_red); descriptionShort = CSTRING(30Rnd_580x42_Mag_tracer_red_description); }; - class ACE_30Rnd_580x42_Mag_tracer_yellow : 30Rnd_580x42_Mag_tracer_F { + class ACE_30Rnd_580x42_Mag_tracer_yellow: 30Rnd_580x42_Mag_tracer_F { ammo = "ACE_580x42_Ball_tracer_yellow"; STRINGS(30Rnd_580x42_Mag_tracer_yellow); descriptionShort = CSTRING(30Rnd_580x42_Mag_tracer_yellow_description); }; class 100Rnd_580x42_Mag_F; - class ACE_100Rnd_580x42_Drum_red : 100Rnd_580x42_Mag_F { + class ACE_100Rnd_580x42_Drum_red: 100Rnd_580x42_Mag_F { ammo = "ACE_580x42_Ball_tracer_red"; STRINGS(100Rnd_580x42_Drum_red); }; - class ACE_100Rnd_580x42_Drum_yellow : 100Rnd_580x42_Mag_F { + class ACE_100Rnd_580x42_Drum_yellow: 100Rnd_580x42_Mag_F { ammo = "ACE_580x42_Ball_tracer_yellow"; STRINGS(100Rnd_580x42_Drum_yellow); }; class 100Rnd_580x42_Mag_tracer_F; - class ACE_100Rnd_580x42_Drum_tracer_red : 100Rnd_580x42_Mag_tracer_F { + class ACE_100Rnd_580x42_Drum_tracer_red: 100Rnd_580x42_Mag_tracer_F { ammo = "ACE_580x42_Ball_tracer_red"; STRINGS(100Rnd_580x42_Drum_tracer_red); descriptionShort = CSTRING(100Rnd_580x42_Drum_tracer_red_description); }; - class ACE_100Rnd_580x42_Drum_tracer_yellow : 100Rnd_580x42_Mag_tracer_F { + class ACE_100Rnd_580x42_Drum_tracer_yellow: 100Rnd_580x42_Mag_tracer_F { ammo = "ACE_580x42_Ball_tracer_yellow"; STRINGS(100Rnd_580x42_Drum_tracer_yellow); descriptionShort = CSTRING(100Rnd_580x42_Drum_tracer_yellow_description); }; - // 6.5mm Caseless MX + // 6.5mm Caseless MX class 30Rnd_65x39_caseless_mag; - class ACE_30Rnd_65x39_mx_green : 30Rnd_65x39_caseless_mag { + class ACE_30Rnd_65x39_mx_green: 30Rnd_65x39_caseless_mag { ammo = "B_65x39_Caseless_green"; STRINGS(30Rnd_65x39_mx_green); descriptionShort = CSTRING(30Rnd_65x39_mx_green_description); }; - class ACE_30Rnd_65x39_mx_yellow : 30Rnd_65x39_caseless_mag { + class ACE_30Rnd_65x39_mx_yellow: 30Rnd_65x39_caseless_mag { ammo = "B_65x39_Caseless_yellow"; STRINGS(30Rnd_65x39_mx_yellow); descriptionShort = CSTRING(30Rnd_65x39_mx_yellow_description); }; class 30Rnd_65x39_caseless_mag_tracer; - class ACE_30Rnd_65x39_mx_tracer_green : 30Rnd_65x39_caseless_mag_tracer { + class ACE_30Rnd_65x39_mx_tracer_green: 30Rnd_65x39_caseless_mag_tracer { ammo = "B_65x39_Caseless_green"; picture = "a3\weapons_f\Data\UI\m_30stanag_caseless_green_CA.paa"; STRINGS(30Rnd_65x39_mx_tracer_green); descriptionShort = CSTRING(30Rnd_65x39_mx_tracer_green_description); }; - class ACE_30Rnd_65x39_mx_tracer_yellow : 30Rnd_65x39_caseless_mag_tracer { + class ACE_30Rnd_65x39_mx_tracer_yellow: 30Rnd_65x39_caseless_mag_tracer { ammo = "B_65x39_Caseless_yellow"; picture = "a3\weapons_f\Data\UI\m_30stanag_caseless_yellow_CA.paa"; STRINGS(30Rnd_65x39_mx_tracer_yellow); @@ -110,23 +111,23 @@ class CfgMagazines { }; class 100Rnd_65x39_caseless_mag; - class ACE_100Rnd_65x39_mx_green : 100Rnd_65x39_caseless_mag { + class ACE_100Rnd_65x39_mx_green: 100Rnd_65x39_caseless_mag { ammo = "B_65x39_Caseless_green"; STRINGS(100Rnd_65x39_mx_green); }; - class ACE_100Rnd_65x39_mx_yellow : 100Rnd_65x39_caseless_mag { + class ACE_100Rnd_65x39_mx_yellow: 100Rnd_65x39_caseless_mag { ammo = "B_65x39_Caseless_yellow"; STRINGS(100Rnd_65x39_mx_yellow); }; class 100Rnd_65x39_caseless_mag_tracer; - class ACE_100Rnd_65x39_mx_tracer_green : 100Rnd_65x39_caseless_mag_tracer { + class ACE_100Rnd_65x39_mx_tracer_green: 100Rnd_65x39_caseless_mag_tracer { ammo = "B_65x39_Caseless_green"; picture = "a3\weapons_f\Data\UI\M_100Rnd_65x39_green_CA.paa"; STRINGS(100Rnd_65x39_mx_tracer_green); descriptionShort = CSTRING(100Rnd_65x39_mx_tracer_green_description); }; - class ACE_100Rnd_65x39_mx_tracer_yellow : 100Rnd_65x39_caseless_mag_tracer { + class ACE_100Rnd_65x39_mx_tracer_yellow: 100Rnd_65x39_caseless_mag_tracer { ammo = "B_65x39_Caseless_yellow"; picture = "a3\weapons_f\Data\UI\M_100Rnd_65x39_yellow_CA.paa"; STRINGS(100Rnd_65x39_mx_tracer_yellow); @@ -135,23 +136,23 @@ class CfgMagazines { // 6.5mm Caseless Katiba class 30Rnd_65x39_caseless_green; - class ACE_30Rnd_65x39_katiba_red : 30Rnd_65x39_caseless_green { + class ACE_30Rnd_65x39_katiba_red: 30Rnd_65x39_caseless_green { ammo = "B_65x39_Caseless"; STRINGS(30Rnd_65x39_katiba_red); }; - class ACE_30Rnd_65x39_katiba_yellow : 30Rnd_65x39_caseless_green { + class ACE_30Rnd_65x39_katiba_yellow: 30Rnd_65x39_caseless_green { ammo = "B_65x39_Caseless_yellow"; STRINGS(30Rnd_65x39_katiba_yellow); }; class 30Rnd_65x39_caseless_green_mag_Tracer; - class ACE_30Rnd_65x39_katiba_tracer_red : 30Rnd_65x39_caseless_green_mag_Tracer { + class ACE_30Rnd_65x39_katiba_tracer_red: 30Rnd_65x39_caseless_green_mag_Tracer { ammo = "B_65x39_Caseless"; picture = "a3\weapons_f\Data\UI\m_20stanag_red_CA.paa"; STRINGS(30Rnd_65x39_katiba_tracer_red); descriptionShort = CSTRING(30Rnd_65x39_katiba_tracer_red_description); }; - class ACE_30Rnd_65x39_katiba_tracer_yellow : 30Rnd_65x39_caseless_green_mag_Tracer { + class ACE_30Rnd_65x39_katiba_tracer_yellow: 30Rnd_65x39_caseless_green_mag_Tracer { ammo = "B_65x39_Caseless_yellow"; picture = "a3\weapons_f\Data\UI\m_20stanag_yellow_CA.paa"; STRINGS(30Rnd_65x39_katiba_tracer_yellow); @@ -160,25 +161,25 @@ class CfgMagazines { // 6.5mm Cased class 200Rnd_65x39_cased_Box; - class ACE_200Rnd_65x39_cased_Box_green : 200Rnd_65x39_cased_Box { + class ACE_200Rnd_65x39_cased_Box_green: 200Rnd_65x39_cased_Box { ammo = "B_65x39_Case_green"; STRINGS(200Rnd_65x39_cased_Box_green); descriptionShort = CSTRING(200Rnd_65x39_cased_Box_green_description); }; - class ACE_200Rnd_65x39_cased_Box_red : 200Rnd_65x39_cased_Box { + class ACE_200Rnd_65x39_cased_Box_red: 200Rnd_65x39_cased_Box { ammo = "B_65x39_Case"; STRINGS(200Rnd_65x39_cased_Box_red); descriptionShort = CSTRING(200Rnd_65x39_cased_Box_red_description); }; class 200Rnd_65x39_cased_Box_tracer; - class ACE_200Rnd_65x39_cased_Box_tracer_green : 200Rnd_65x39_cased_Box_tracer { + class ACE_200Rnd_65x39_cased_Box_tracer_green: 200Rnd_65x39_cased_Box_tracer { ammo = "B_65x39_Case_green"; picture = "a3\weapons_f\Data\UI\M_200Rnd_65x39_green_CA.paa"; STRINGS(200Rnd_65x39_cased_Box_tracer_green); descriptionShort = CSTRING(200Rnd_65x39_cased_Box_tracer_green_description); }; - class ACE_200Rnd_65x39_cased_Box_tracer_red : 200Rnd_65x39_cased_Box_tracer { + class ACE_200Rnd_65x39_cased_Box_tracer_red: 200Rnd_65x39_cased_Box_tracer { ammo = "B_65x39_Case"; picture = "a3\weapons_f\Data\UI\M_200Rnd_65x39_red_CA.paa"; STRINGS(200Rnd_65x39_cased_Box_tracer_red); @@ -187,12 +188,12 @@ class CfgMagazines { // 7.62x51 (NATO) class ACE_20Rnd_762x51_Mag_tracer; - class ACE_20Rnd_762x51_Mag_tracer_green : ACE_20Rnd_762x51_Mag_tracer { + class ACE_20Rnd_762x51_Mag_tracer_green: ACE_20Rnd_762x51_Mag_tracer { ammo = "B_762x51_tracer_green"; STRINGS(20Rnd_762x51_Mag_tracer_green); descriptionShort = CSTRING(20Rnd_762x51_Mag_tracer_green_description); }; - class ACE_20Rnd_762x51_Mag_tracer_yellow : ACE_20Rnd_762x51_Mag_tracer { + class ACE_20Rnd_762x51_Mag_tracer_yellow: ACE_20Rnd_762x51_Mag_tracer { ammo = "B_762x51_tracer_yellow"; STRINGS(20Rnd_762x51_Mag_tracer_yellow); descriptionShort = CSTRING(20Rnd_762x51_Mag_tracer_green_description); @@ -200,22 +201,22 @@ class CfgMagazines { // 7.62x54 (Russian) class 150Rnd_762x54_Box; - class ACE_150Rnd_762x54_Box_red : 150Rnd_762x54_Box { + class ACE_150Rnd_762x54_Box_red: 150Rnd_762x54_Box { ammo = "B_762x54_tracer_red"; STRINGS(150Rnd_762x54_Box_red); }; - class ACE_150Rnd_762x54_Box_yellow : 150Rnd_762x54_Box { + class ACE_150Rnd_762x54_Box_yellow: 150Rnd_762x54_Box { ammo = "B_762x54_tracer_yellow"; STRINGS(150Rnd_762x54_Box_yellow); }; class 150Rnd_762x54_Box_tracer; - class ACE_150Rnd_762x54_Box_tracer_red : 150Rnd_762x54_Box_tracer { + class ACE_150Rnd_762x54_Box_tracer_red: 150Rnd_762x54_Box_tracer { ammo = "B_762x54_tracer_red"; STRINGS(150Rnd_762x54_Box_tracer_red); descriptionShort = CSTRING(150Rnd_762x54_Box_tracer_red_description); }; - class ACE_150Rnd_762x54_Box_tracer_yellow : 150Rnd_762x54_Box_tracer { + class ACE_150Rnd_762x54_Box_tracer_yellow: 150Rnd_762x54_Box_tracer { ammo = "B_762x54_tracer_yellow"; STRINGS(150Rnd_762x54_Box_tracer_yellow); descriptionShort = CSTRING(150Rnd_762x54_Box_tracer_yellow_description); @@ -223,22 +224,22 @@ class CfgMagazines { // 9.3x64 class 150Rnd_93x64_Mag; - class ACE_150Rnd_93x64_Mag_red : 150Rnd_93x64_Mag { + class ACE_150Rnd_93x64_Mag_red: 150Rnd_93x64_Mag { ammo = "ACE_93x64_Ball_tracer_red"; STRINGS(150Rnd_93x64_Mag_red); }; - class ACE_150Rnd_93x64_Mag_yellow : 150Rnd_93x64_Mag { + class ACE_150Rnd_93x64_Mag_yellow: 150Rnd_93x64_Mag { ammo = "ACE_93x64_Ball_tracer_yellow"; STRINGS(150Rnd_93x64_Mag_yellow); }; // .338 NM class 130Rnd_338_Mag; - class ACE_130Rnd_338_Mag_green : 130Rnd_338_Mag { + class ACE_130Rnd_338_Mag_green: 130Rnd_338_Mag { ammo = "ACE_338_NM_Ball_green"; STRINGS(130Rnd_338_Mag_green); }; - class ACE_130Rnd_338_Mag_yellow : 130Rnd_338_Mag { + class ACE_130Rnd_338_Mag_yellow: 130Rnd_338_Mag { ammo = "ACE_338_NM_Ball_yellow"; STRINGS(130Rnd_338_Mag_yellow); }; diff --git a/optionals/tracers/README.md b/optionals/tracers/README.md index 868b697cff..a8d7bbf24d 100644 --- a/optionals/tracers/README.md +++ b/optionals/tracers/README.md @@ -2,9 +2,3 @@ ace_balltracers =========== Ball tracers for Arma 3 ported from ACE2. - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [jaynus](https://github.com/walterpearce) diff --git a/optionals/tracers/model.cfg b/optionals/tracers/model.cfg index 089b4a417e..fd53eb557e 100644 --- a/optionals/tracers/model.cfg +++ b/optionals/tracers/model.cfg @@ -4,7 +4,7 @@ class CfgSkeletons { skeletonInherit = ""; skeletonBones[] = {}; }; - class ACE_Tracer_Skeleton : Default {}; + class ACE_Tracer_Skeleton: Default {}; class ACE_Tracer_Skeleton_Default: ACE_Tracer_Skeleton { // BWC skeletonInherit = "ACE_Tracer_Skeleton"; skeletonBones[]= { @@ -35,7 +35,7 @@ class CfgModels { class ace_shell_tracer_green: ACE_Tracer {}; class ace_shell_tracer_red: ACE_Tracer {}; class ace_shell_tracer_white: ACE_Tracer {}; - class ace_shell_tracer_yellow: ACE_Tracer {}; + class ace_shell_tracer_yellow: ACE_Tracer {}; // Bullet tracers class ace_TracerGreen2: ACE_Tracer_Default {}; diff --git a/optionals/tracers/stringtable.xml b/optionals/tracers/stringtable.xml index e89ed4522b..6bc405b842 100644 --- a/optionals/tracers/stringtable.xml +++ b/optionals/tracers/stringtable.xml @@ -10,6 +10,7 @@ 5.56 mm 150 ranný zásobník, stopovka pro přebití (Zelená) Recarregar magazine de 150 balas tracejantes (verde) 5.56 mm 150発入り 残通知 曳光弾 (緑) マガジン + Cargador de 150 Cartuchos 5.56 mm Trazadora de recarga (Verde) 5.56 mm 150Rnd Reload Tracer (Yellow) Mag @@ -19,6 +20,7 @@ 5.56 mm 150 ranný zásobník, stopovka pro přebití (Žlutá) Recarregar magazine 150 balas tracejantes (Amarelo) 5.56 mm 150発入り 残通知 曳光弾 (黄) マガジン + Cargador de 150 Cartuchos 5.56 mm Trazadora de recarga (Amarilla) 5.56 mm 150Rnd Tracer (Green) Mag @@ -28,6 +30,7 @@ 5.56 mm 150 ranný zásobník, stopovka (Zelená) Magazine 5.56mm Tracejante (verde) 5.56 mm 150発入り 曳光弾 (緑) マガジン + Cargador de 150 Cartuchos 5.56 mm Trazadora (Verde) Caliber: 5.56x45 mm Tracer - Green<br />Rounds: 150<br />Used in: SPAR-16S @@ -37,6 +40,7 @@ Kalibr: 5.56×45 mm Stopovka - Zelená<br />Nábojů: 150<br />Použito v: SPAR-16S Calibre 5.56x45mm Tracejante - Verde<br/>Balas:150<br/>Usado em: Spar-16S 口径: 5.56x45 mm 曳光弾 - 緑<br />弾数: 150<br />使用武器: SPAR-16S + Calibre: 5.56x45 mm Trazadora - Verde<br />Cartuchos: 150<br />Usada en:: SPAR-16S 5.56 mm 150Rnd Tracer (Yellow) Mag @@ -46,6 +50,7 @@ 5.56 mm 150 ranný zásobník, stopovka (Žlutá) Magazine 5.56mm 150 balas tracejante (amarelo) 5.56 mm 150発入り 曳光弾 (黄) マガジン + Cargador de 150 Cartuchos 5.56 mm Trazadora (Amarilla) Caliber: 5.56x45 mm Tracer - Yellow<br />Rounds: 150<br />Used in: SPAR-16S @@ -55,6 +60,7 @@ Kalibr: 5.56×45 mm Stopovka - Žlutá<br />Nábojů: 150<br />Použito v: SPAR-16S Calibre: 5.56x45mm Tracejante - Amarelo <br/>Balas:150<br/>Usado em:Spar-16S 口径: 5.56x45 mm 曳光弾 - 黄<br />弾数: 150<br />使用武器: SPAR-16S + Calibre: 5.56x45 mm Trazadora - Amarilla<br />Cartuchos: 150<br />Usada en: SPAR-16S 5.56 mm 200Rnd Reload Tracer (Green) Box @@ -64,6 +70,7 @@ 5.56 mm 200 ranný box, stopovka pro přebití (Zelená) Recarregar Caixa 5.56mm 200 Balas tracejantes (verdes) 5.56 mm 200発入り 残通知 曳光弾 (緑) ボックス + Caja de 200 Cartuchos 5.56 mm Trazadora de recarga (Verde) 5.56 mm 200Rnd Tracer (Green) Box @@ -73,6 +80,7 @@ 5.56 mm 200 ranný box, stopovka (Zelená) Caixa 5.56mm 200 balas tracejantes (verdes) 5.56 mm 200発入り 曳光弾 (緑) ボックス + Caja de 200 Cartuchos 5.56 mm Trazadora (Verde) Caliber: 5.56x45 mm Tracer - Green<br />Rounds: 200<br />Used in: LIM-85 @@ -82,6 +90,7 @@ Kalibr: 5.56×45 mm Stopovka - Zelená<br />Nábojů: 200<br />Použito v: LIM-85 Calibre:5.56x45 mm Tracejante - Verde <br/>Balas: 200<br/>Usado em:LIM-85 口径: 5.56x45 mm 曳光弾 - 緑<br />弾数: 200<br />使用武器: LIM-85 + Calibre: 5.56x45 mm Trazadora - Verde<br />Cartuchos: 200<br />Usada en: LIM-85 5.8 mm 30Rnd Reload Tracer (Red) Mag @@ -91,6 +100,7 @@ 5.8 mm 30 ranný zásobník, stopovka pro přebití (Červená) Recarregar magazine 5.8mm 30 Balas tracejantes (vermelho) 5.8 mm 30発入り 残通知 曳光弾 (赤) マガジン + Cargador de 30 Cartuchos 5.8 mm Trazadora de recarga (Roja) 5.8 mm 30Rnd Reload Tracer (Yellow) Mag @@ -100,6 +110,7 @@ 5.8 mm 30 ranný zásobník, stopovka pro přebití (Žlutá) Recarregar magazine 5.8mm 30 Balas tracejantes (amarelo) 5.8 mm 30発入り 残通知 曳光弾 (黄) マガジン + Cargador de 30 Cartuchos 5.8 mm Trazadora de recarga (Amarilla) 5.8 mm 30Rnd Tracer (Red) Mag @@ -109,6 +120,7 @@ 5.8 mm 30 ranný zásobník, stopovka (Červená) Magazine 5.8 mm 30 balas tracejantes (vermelho) 5.8 mm 30発入り 曳光弾 (赤) マガジン + Cargador de 30 Cartuchos 5.8 mm Trazadora (Roja) Caliber: 5.8x42 mm Tracer - Red<br />Rounds: 30<br />Used in: CAR-95, CAR-95 GL @@ -118,6 +130,7 @@ Kalibr: 5.8×42 mm Stopovka - Červená<br />Nábojů: 30<br />Použito v: CAR-95, CAR-95 GL Calibre: 5.8x42 mm Tracejante - Vermelho<br/>Balas:30<br/>Usado em CAR-95, CAR-95 GL 口径: 5.8x42 mm 曳光弾 - 赤<br />弾数: 30<br />使用武器: CAR-95, CAR-95 GL + Calibre: 5.8x42 mm Trazadora - Roja<br />Cartuchos: 30<br />Usada en: CAR-95, CAR-95 GL 5.8 mm 30Rnd Tracer (Yellow) Mag @@ -127,6 +140,7 @@ 5.8 mm 30 ranný zásobník, stopovka (Žlutá) Magazine 5.8 mm 30 balas tracejante (amarelo) 5.8 mm 30発入り 曳光弾 (黄) マガジン + Cargador de 30 Cartuchos 5.8 mm Trazadora (Amarilla) Caliber: 5.8x42 mm Tracer - Yellow<br />Rounds: 30<br />Used in: CAR-95, CAR-95 GL @@ -136,6 +150,7 @@ Kalibr: 5.8×42 mm Stopovka - Žlutá<br />Nábojů: 30<br />Použito v: CAR-95, CAR-95 GL Calibre: 5.8x42 mm Tracejante - Amarelo <br/>Balas: 30<br/>Usado em: CAR-95, CAR-95 GL 口径: 5.8x42 mm 曳光弾 - 黄<br />弾数: 30<br />使用武器: CAR-95, CAR-95 GL + Calibre: 5.8x42 mm Trazadora - Amarilla<br />Cartuchos: 30<br />Usada en: CAR-95, CAR-95 GL 5.8 mm 100Rnd Reload Tracer (Red) Mag @@ -145,6 +160,7 @@ 5.8 mm 100 ranný zásobník, stopovka pro přebití (Červená) Recarregar magazine 5.8 mm 100 balas tracejante (vermelho) 5.8 mm 100発入り 残通知 曳光弾 (赤) マガジン + Cargador de 100 Cartuchos 5.8 mm Trazadora de recarga (Roja) 5.8 mm 100Rnd Reload Tracer (Yellow) Mag @@ -154,6 +170,7 @@ 5.8 mm 100 ranný zásobník, stopovka pro přebití (Žlutá) Recarregar magazine 5.8 mm 100 balas tracejantes (amarelo) 5.8 mm 100発入り 残通知 曳光弾 (黄) マガジン + Cargador de 100 Cartuchos 5.8 mm Trazadora de recarga (Amarilla) 5.8 mm 100Rnd Tracer (Red) Mag @@ -163,6 +180,7 @@ 5.8 mm 100 ranný zásobník, stopovka (Červená) Magazine 5.8 mm 100 balas tracejantes (vermelho) 5.8 mm 100発入り 曳光弾 (赤) マガジン + Cargador de 100 Cartuchos 5.8 mm Trazadora (Roja) Caliber: 5.8x42 mm Tracer - Red<br />Rounds: 100<br />Used in: CAR-95-1 @@ -172,6 +190,7 @@ Kalibr: 5.8×42 mm Stopovka - Červená<br />Nábojů: 100<br />Použito v: CAR-95-1 Calibre: 5.8x42 mm Tracejante - Vermelho<br/>Balas:100<br/>Usado em CAR-95-1 口径: 5.8x42 mm 曳光弾 - 赤<br />弾数: 100<br />使用武器: CAR-95-1 + Calibre: 5.8x42 mm Trazadora - Roja<br />Cartuchos: 100<br />Usada en: CAR-95-1 5.8 mm 100Rnd Tracer (Yellow) Mag @@ -181,6 +200,7 @@ 5.8 mm 100 ranný zásobník, stopovka (Žlutá) Magazine 5.8 mm 100 balas tracejantes (amarelo) 5.8 mm 100発入り 曳光弾 (黄) マガジン + Cargador de 100 Cartuchos 5.8 mm Trazadora (Amarilla) Caliber: 5.8x42 mm Tracer - Yellow<br />Rounds: 100<br />Used in: CAR-95-1 @@ -190,6 +210,7 @@ Kalibr: 5.8×42 mm Stopovka - Žlutá<br />Nábojů: 100<br />Použito v: CAR-95-1 Calibre: 5.8x42 mm Tracejante - Amarelo<br/>Balas:100<br/>Usado em CAR-95-1 口径: 5.8x42 mm 曳光弾 - 黄<br />弾数: 100<br />使用武器: CAR-95-1 + Calibre: 5.8x42 mm Trazadora - Amarilla<br />Cartuchos: 100<br />Usada en: CAR-95-1 6.5mm 30Rnd Reload Tracer (Green) Mag @@ -199,6 +220,7 @@ 6.5 mm 30 ranný zásobník, stopovka pro přebití (Zelená) Recarregar magazine 6.5mm 30 balas tracejantes (verde) 6.5 mm 30発入り 残通知 曳光弾 (緑) マガジン + Cargador de 30 Cartuchos 6.5 mm Trazadora de recarga (Verde) Caliber: 6.5x39 mm Tracer - Green<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL @@ -208,6 +230,7 @@ Kalibr: 6.5×39 mm Stopovka - Zelená<br />Nábojů: 30<br />Použito v: MX/C/M/SW/3GL Calibre: 6.5x39 mm Tracejante - Verde<br/>Balas:30<br/>Usado em: MX/C/M/SW/3GL 口径: 6.5x39 mm 曳光弾 - 緑<br />弾数: 30<br />使用武器: MX/C/M/SW/3GL + Calibre: 6.5x39 mm Tracer - Green<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL 6.5mm 30Rnd Reload Tracer (Yellow) Mag @@ -217,6 +240,7 @@ 6.5 mm 30 ranný zásobník, stopovka pro přebití (Žlutá) Recarregar magazine 6.5mm 30 balas tracejantes (amarelo) 6.5 mm 30発入り 残通知 曳光弾 (黄) マガジン + Cargador de 30 Cartuchos 6.5 mm Trazadora de recarga (Amarilla) Caliber: 6.5x39 mm Tracer - Yellow<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL @@ -226,6 +250,7 @@ Kalibr: 6.5×39 mm Stopovka - Žlutá<br />Nábojů: 30<br />Použito v: MX/C/M/SW/3GL Calibre: 6.5x39 mm Tracejante - Amarelo<br/>Balas:30<br/>Usado em: MX/C/M/SW/3GL 口径: 6.5x39 mm 曳光弾 - 黄<br />弾数: 30<br />使用武器: MX/C/M/SW/3GL + Calibre: 6.5x39 mm Trazadora - Amarilla<br />Cartuchos: 30<br />Usada en: MX/C/M/SW/3GL 6.5mm 30Rnd Tracer (Green) Mag @@ -235,6 +260,7 @@ 6.5 mm 30 ranný zásobník, stopovka (Zelená) Magazine 6.5mm 30 balas tracejantes (verde) 6.5 mm 30発入り 曳光弾 (緑) マガジン + Cargador de 30 Cartuchos 6.5 mm Trazadora (Verde) Caliber: 6.5x39 mm Tracer - Green<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL @@ -244,6 +270,7 @@ Kalibr: 6.5×39 mm Stopovka - Zelená<br />Nábojů: 30<br />Použito v: MX/C/M/SW/3GL Calibre: 6.5x39 mm Tracejante - Verde<br/>Balas:30<br/>Usado em: MX/C/M/SW/3GL 口径: 6.5x39 mm 曳光弾 - 緑<br />弾数: 30<br />使用武器: MX/C/M/SW/3GL + Calibre: 6.5x39 mm Trazadora - Verde<br />Cartuchos: 30<br />Usada en: MX/C/M/SW/3GL 6.5mm 30Rnd Tracer (Yellow) Mag @@ -253,6 +280,7 @@ 6.5 mm 30 ranný zásobník, stopovka (Žlutá) Magazine 6.5mm 30 balas tracejantes (amarelo) 6.5 mm 30発入り 曳光弾 (黄) マガジン + Cargador de 30 Cartuchos 6.5 mm Trazadora (Amarilla) Caliber: 6.5x39 mm Tracer - Yellow<br />Rounds: 30<br />Used in: MX/C/M/SW/3GL @@ -262,6 +290,7 @@ Kalibr: 6.5×39 mm Stopovka - Žlutá<br />Nábojů: 30<br />Použito v: MX/C/M/SW/3GL Calibre: 6.5x39 mm Tracejante - Amarelo<br/>Balas:30<br/>Usado em: MX/C/M/SW/3GL 口径: 6.5x39 mm 曳光弾 - 黄<br />弾数: 30<br />使用武器: MX/C/M/SW/3GL + Calibre: 6.5x39 mm Trazadora - Amarilla<br />Cartuchos: 30<br />Usada en: MX/C/M/SW/3GL 6.5mm 100Rnd Mixed Mag (Green) @@ -271,6 +300,7 @@ 6.5 mm 100 ranný zásobník, částečná stopovka (Zelená) Magazine 6.5mm 100 balas misturadas (verde) 6.5 mm 100発入り 混合 (緑) マガジン + Cargador de 100 cartuchos 6.5 mm Mezcla (Verde) 6.5mm 100Rnd Mixed Mag (Yellow) @@ -280,6 +310,7 @@ 6.5 mm 100 ranný zásobník, částečná stopovka (Žlutá) Magazine 6.5mm 100 balas misturadas (amarelo) 6.5 mm 100発入り 混合 (黄) マガジン + Cargador de 100 cartuchos 6.5 mm Mezcla (Amarilla) 6.5mm 100Rnd Mag Tracer (Green) @@ -289,6 +320,7 @@ 6.5 mm 100 ranný zásobník, stopovka (Zelená) Magazine 6.5mm 100 balas tracejantes 6.5 mm 100発入り (緑) マガジン + Cargador de 100 cartuchos 6.5 mm Trazadora (Verde) Caliber: 6.5x39 mm Tracer - Green<br />Rounds: 100<br />Used in: MX SW @@ -298,6 +330,7 @@ Kalibr: 6.5×39 mm Stopovka - Zelená<br />Nábojů: 100<br />Použito v: MX SW Calibre: 6.5x39 mm Tracejante - Verde<br/>Balas: 100<br/>Usado em: MX SW 口径: 6.5x39 mm 曳光弾 - 緑<br />弾数: 100<br />使用武器: MX SW + Calibre: 6.5x39 mm Trazadora - Verde<br />Cartuchos: 100<br />Usada en: MX SW 6.5mm 100Rnd Mag Tracer (Yellow) @@ -307,6 +340,7 @@ 6.5 mm 100 ranný zásobník, stopovka (Žlutá) Magazine 6.5mm 100 balas tracejantes (amarelo) 6.5 mm 100発入り 曳光弾 (黄) マガジン + Cargador de 100 cartuchos 6.5 mm Trazadora (Amarilla) Caliber: 6.5x39 mm Tracer - Yellow<br />Rounds: 100<br />Used in: MX SW @@ -316,6 +350,7 @@ Kalibr: 6.5×39 mm Stopovka - Žlutá<br />Nábojů: 100<br />Použito v: MX SW Calibre: 6.5x39 mm Tracejante - Amarelo<br/>Balas: 100<br/>Usado em: MX SW 口径: 6.5x39 mm 曳光弾 - 黄<br />弾数: 100<br />使用武器: MX SW + Calibre: 6.5x39 mm Trazadora - Amarilla<br />Cartuchos: 100<br />Usada en: MX SW 6.5mm 30Rnd Reload Tracer (Red) Mag @@ -325,6 +360,7 @@ 6.5 mm 30 ranný zásobník, stopovka pro přebití (Červená) Recarregar magazine 6.5mm 30 balas tracejantes (vermelho) 6.5 mm 30発入り 残通知 曳光弾 (赤) マガジン + Cargador de 30 Cartuchos 6.5 mm Trazadora de recarga (Roja) 6.5mm 30Rnd Reload Tracer (Yellow) Mag @@ -334,6 +370,7 @@ 6.5 mm 30 ranný zásobník, stopovka pro přebití (Žlutá) Recarregar magazine 6.5mm 30 balas tracejantes (amarelo) 6.5 mm 30発入り 残通知 曳光弾 (黄) マガジン + Cargador de 30 Cartuchos 6.5 mm Trazadora de recarga (Amarilla) 6.5mm 30Rnd Tracer (Red) Mag @@ -343,6 +380,7 @@ 6.5 mm 30 ranný zásobník, stopovka (Červená) Magazine 6.5mm 30 balas tracejantes (vermelho) 6.5 mm 30発入り 曳光弾 (赤) マガジン + Cargador de 30 Cartuchos 6.5 mm Trazadora (Roja) Caliber: 6.5x39 mm Tracer (Red) - Caseless<br />Rounds: 30<br />Used in: Katiba, Type 115 @@ -352,6 +390,7 @@ Kalibr: 6.5×39 mm Stopovka - Červená - Beznábojnicová<br />Nábojů: 30<br />Použito v: Katiba, Type 115 Calibre: 6.5x39 mm Tracejante (Vermelho) - Sem Cartucho<br/>Balas: 30<br/>Usado em: Katiba, Type 115 口径: 6.5x39 mm 曳光弾 - 赤 (ケースレス)<br />弾数: 30<br />使用武器: Katiba, Type 115 + Calibre: 6.5x39 mm Trazadora (Roja) - Sin casquillo<br />Cartuchos: 30<br />Usada en: Katiba, Type 115 6.5mm 30Rnd Tracer (Yellow) Mag @@ -361,6 +400,7 @@ 6.5 mm 30 ranný zásobník, stopovka (Žlutá) Magazine 6.5mm 30 balas tracejantes (amarelo) 6.5 mm 30発入り 曳光弾 (黄) マガジン + Cargador de 30 Cartuchos 6.5 mm Trazadora (Amarilla) Caliber: 6.5x39 mm Tracer (Yellow) - Caseless<br />Rounds: 30<br />Used in: Katiba, Type 115 @@ -370,6 +410,7 @@ Kalibr: 6.5×39 mm Stopovka - Žlutá - Beznábojnicová<br />Nábojů: 30<br />Použito v: Katiba, Type 115 Caliber: 6.5x39 mm Tracejante (Vermelho) - Sem Cartucho<br/>Balas: 30<br/>Usado em: Katiba, Type 115 口径: 6.5x39 mm 曳光弾 - 黄 (ケースレス)<br />弾数: 30<br />使用武器: Katiba, Type 115 + Calibre: 6.5x39 mm Trazadora (Amarilla) - Sin casquillo<br />Cartuchos: 30<br />Usada en: Katiba, Type 115 6.5 mm 200Rnd Belt Case Mixed (Green) @@ -379,6 +420,7 @@ 6.5 mm 200 ranný pás, částečná stopovka (Zelená) Caixa de Cinto 6.5 mm 200 Balas Misturados (Verde) 6.5 mm 200発入り 混合 (緑) ベルト ケース + Caja con cinta de 200 cartuchos 6.5 mm Mezcla (Verde) Caliber: 6.5x39 mm Mixed - Green<br />Rounds: 200<br />Used in: Mk200 @@ -388,6 +430,7 @@ Kalibr: 6.5×39 mm Stopovka - Zelená<br />Nábojů: 200<br />Použito v: Mk200 Calibre: 6.5x39 mm Misturado - Verde<br/>Balas: 200<br/>Usado em: Mk200 口径: 6.5x39 mm 混合 - 緑<br />弾数: 200<br />使用武器: Mk200 + Calibre: 6.5x39 mm Mezcla - Verde<br />Cartuchos: 200<br />Usada en: Mk200 6.5 mm 200Rnd Belt Case Mixed (Red) @@ -397,6 +440,7 @@ 6.5 mm 200 ranný pás, částečná stopovka (Červená) Caixa de Cinto 6.5 mm 200 balas misturadas (Vermelho) 6.5 mm 200発入り 混合 (赤) ベルト ケース + Caja con cinta de 200 cartuchos 6.5 mm Mezcla (Roja) Caliber: 6.5x39 mm Mixed - Red<br />Rounds: 200<br />Used in: Mk200 @@ -406,6 +450,7 @@ Kalibr: 6.5×39 mm Stopovka - Červená<br />Nábojů: 200<br />Použito v: Mk200 Caliber: 6.5x39 mm Misturado - Vermelho<br/>Balas: 200<br/>Usado em: Mk200 口径: 6.5x39 mm 混合 - 赤<br />弾数: 200<br />使用武器: Mk200 + Calibre: 6.5x39 mm Mezcla - Roja<br />Cartuchos: 200<br />Usada en: Mk200 6.5 mm 200Rnd Belt Case Tracer (Green) @@ -415,6 +460,7 @@ 6.5 mm 200 ranný pás, částečná stopovka (Zelená) Caixa de Cinto 6;5 mm 200 balas tracejantes (Verde) 6.5 mm 200発入り 混合 (緑) ベルト ケース + Caja con cinta de 200 cartuchos 6.5 mm Trazadora (Verde) Caliber: 6.5x39 mm Tracer - Green<br />Rounds: 200<br />Used in: Mk200 @@ -425,6 +471,7 @@ Kaliber: 6.5x39 mm Smugowa - Zielona<br />Sztuk: 200<br />Używana w: Mk200 Caliber: 6.5x39 mm Tracejante - Verde<br/>Balas: 200<br/>Usado em: Mk200 口径: 6.5x39 mm 曳光弾 - 緑<br />弾数: 200<br />使用武器: Mk200 + Calibre: 6.5x39 mm Trazadora - Verde<br />Cartuchos: 200<br />Usada en: Mk200 6.5 mm 200Rnd Belt Case Tracer (Red) @@ -435,6 +482,7 @@ 6.5 mm Magazynek pudełkowy 200szt. Smugowa (Czerwona) Caixa de Cinto 6.5 mm 200 Balas Tracejantes (Vermelho) 6.5 mm 200発入り 曳光弾 (赤) ベルト ケース + Caja con cinta de 200 cartuchos 6.5 mm Trazadora (Roja) Caliber: 6.5x39 mm Tracer - Red<br />Rounds: 200<br />Used in: Mk200 @@ -445,6 +493,7 @@ Kaliber: 6.5x39 mm Smugowa - Czerwona<br />Sztuk: 200<br />Używana w: Mk200 Caliber: 6.5x39 mm Tracejante - Vermelho<br/>Balas: 200<br/>Usado em: Mk200 口径: 6.5x39 mm 曳光弾 - 赤<br />弾数: 200<br />使用武器: Mk200 + Calibre: 6.5x39 mm Trazadora - Roja<br />Cartuchos: 200<br />Usada en: Mk200 7.62 mm 20Rnd Tracer (Green) Mag @@ -455,6 +504,7 @@ 7.62 mm Magazynek 20szt. Smugowa (Zielona) Magazine 7.62 mm 20 Balas Tracejantes (verdes) 7.62 mm 20発入り 曳光弾 (緑) マガジン + Cargador de 20 cartuchos 7.62 mm Trazadora (Verde) Caliber: 7.62x51 mm NATO Tracer - Green<br />Rounds: 20<br />Used in: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 @@ -465,6 +515,7 @@ Kaliber: 7.62x51 mm NATO Smugowa - Zielona<br />Sztuk: 20<br />Używana w: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 Calibre: 7.62x51 mm NATO Tracejante - Verde<br/>Balas: 20<br/>Usado em: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 口径: 7.62x51 mm NATO 曳光弾 - 緑<br />弾数: 20<br />使用武器: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 + Calibre: 7.62x51 mm NATO Trazadora - Verde<br />Cartuchos: 20<br />Usada en: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 7.62 mm 20Rnd Tracer (Yellow) Mag @@ -475,6 +526,7 @@ 7.62 mm Magazynek 20szt. Smugowa (Żółta) Magazine 7.62 mm 20 Balas Tracejantes (Amarelo) 7.62 mm 20発入り 曳光弾 (黄) マガジン + Cargador de 20 cartuchos 7.62 mm Trazadora (Amarilla) Caliber: 7.62x51 mm NATO Tracer - Yellow<br />Rounds: 20<br />Used in: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 @@ -485,6 +537,7 @@ Kaliber: 7.62x51 mm NATO Smugowa - Żółta<br />Sztuk: 20<br />Używana w: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 Calibre: 7.62x51 mm NATO Tracejante - Amarelo<br/>Balas: 20<br/>Usado em: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 口径: 7.62x51 mm NATO 曳光弾 - 黄<br />弾数: 20<br />使用武器: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 + Calibre: 7.62x51 mm NATO Trazadora - Amarilla<br />Cartuchos: 20<br />Usada en: Mk18 ABR, Mk-I EMR, Mk14, SPAR-17 7.62mm 150Rnd Box Mixed (Red) @@ -495,6 +548,7 @@ 7.62 mm Magazynek pudełkowy 150szt. Mieszana (Czerwona) Caixa 7.62mm 150 Balas Misturadas (Vermelho) 7.62 mm 150発入り 混合 (緑) ボックス + Caja de 150 cartuchos 7.62 mm Mezcla (Roja) 7.62mm 150Rnd Box Mixed (Yellow) @@ -505,6 +559,7 @@ 7.62 mm Magazynek pudełkowy 150szt. Mieszana (Żółta) Caixa 7.62mm 150 Balas Misturadas (Amarelo) 7.62 mm 150発入り 混合 (黄) ボックス + Caja de 150 cartuchos 7.62 mm Mezcla (Amarilla) 7.62mm 150Rnd Box Tracer (Red) @@ -515,6 +570,7 @@ 7.62mm Magazynek pudełkowy 150szt. Smugowa (Czerwona) Caixa 7.62mm 150 Balas Misturadas (Vermelho) 7.62 mm 150発入り 曳光弾 (赤) ボックス + Caja de 150 cartuchos 7.62 mm Trazadora (Roja) Caliber: 7.62x54 mm Tracer - Red<br />Rounds: 150<br />Used in: Zafir @@ -525,6 +581,7 @@ Kaliber: 7.62x54 mm Smugowa - Czerwona<br />Sztuk: 150<br />Używana w: Zafir Calibre: 7.62x54 mm Tracejante - Vermelho<br/>Balas: 150<br/>Usado em:Zafir 口径: 7.62x54 mm 曳光弾 - 赤<br />弾数: 150<br />使用武器: ザフィル + Calibre: 7.62x54 mm Trazadora - Roja<br />Cartuchos: 150<br />Usada en: Zafir 7.62mm 150Rnd Box Tracer (Yellow) @@ -535,6 +592,7 @@ 7.62 mm Magazynek pudełkowy 150szt. Smugowa (Żółta) Caixa 7.62mm 150 Balas Tracejantes (Amarelo) 7.62 mm 150発入り 曳光弾 (緑) ボックス + Caja de 150 cartuchos 7.62 mm Trazadora (Amarilla) Caliber: 7.62x54 mm Tracer - Yellow<br />Rounds: 150<br />Used in: Zafir @@ -545,6 +603,7 @@ Kaliber: 7.62x54 mm Smugowa - Żółta<br />Sztuk: 150<br />Używana w: Zafir Calibre: 7.62x54 mm Tracejante - Amarelo<br/>Balas: 150<br/>Usado em:Zafir 口径: 7.62x54 mm 曳光弾 - 黄<br />弾数: 150<br />使用武器: ザフィル + Calibre: 7.62x54 mm Trazadora - Amarilla<br />Cartuchos: 150<br />Usada en: Zafir 9.3mm 150Rnd Belt Mixed (Yellow) @@ -555,6 +614,7 @@ 9.3 mm Taśma 150szt. Mieszana (Żółta) Cinto 9.3mm 150 Balas Misturadas (Amarelo) 9.3 mm 150発入り 混合 (黄) ベルト + Cinta de 150 cartuchos 9.3 mm Mezcla (Amarilla) 9.3mm 150Rnd Belt Mixed (Red) @@ -565,6 +625,7 @@ 9.3 mm Taśma 150szt. Mieszana (Czerwona) Cinto 9.3mm 150 Balas Misturadas (Vermelho) 9.3 mm 150発入り 混合 (赤) ベルト + Cinta de 150 cartuchos 9.3 mm Mezcla (Roja) .338 NM 130Rnd Belt Mixed (Yellow) @@ -575,6 +636,7 @@ .338 NM Taśma 130szt. Mieszana (Żółta) Cinto .338 NM Misturado (Amarelo) .338 NM 130発入り 混合 (黄) ベルト + Cinta de 130 cartuchos .338 NM Mezcla (Amarilla) .338 NM 130Rnd Belt Mixed (Green) @@ -585,6 +647,7 @@ .338 NM Taśma 130szt. Mieszana (Zielona) Cinto .338 NM 130 Balas Misturados (Verde) .338 NM 130発入り 混合 (緑) ベルト + Cinta de 130 cartuchos .338 NM Mezcla (Verde) diff --git a/sqfc.json b/sqfc.json new file mode 100644 index 0000000000..a3c2f68f4e --- /dev/null +++ b/sqfc.json @@ -0,0 +1,18 @@ +{ + "inputDirs": [ + "P:/z/ace/addons/" + ], + "includePaths": [ + "P:/" + ], + "excludeList": [ + "initsettings.sqf", + "initkeybinds.sqf", + "xeh_prep.sqf", + "\\dev\\", + "medical_ai\\statemachine.sqf", + "common\\functions\\fnc_dummy.sqf" + ], + "outputDir": "P:/", + "workerThreads": 12 +} diff --git a/tools/.vscode/tasks.json b/tools/.vscode/tasks.json new file mode 100644 index 0000000000..7058365fa9 --- /dev/null +++ b/tools/.vscode/tasks.json @@ -0,0 +1,94 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Validate SQF", + "command": "${config:python.pythonPath}", + "options": { + "cwd": "${workspaceFolder}/tools" + }, + "args": [ + "sqf_validator.py" + ] + }, + { + "label": "Validate Config", + "command": "${config:python.pythonPath}", + "options": { + "cwd": "${workspaceFolder}/tools" + }, + "args": [ + "config_style_checker.py" + ] + }, + { + "label": "Validate Stringtables", + "command": "${config:python.pythonPath}", + "options": { + "cwd": "${workspaceFolder}/tools" + }, + "args": [ + "stringtable_validator.py" + ] + }, + { + "label": "Check Strings", + "command": "${config:python.pythonPath}", + "options": { + "cwd": "${workspaceFolder}/tools" + }, + "args": [ + "check_strings.py" + ] + }, + { + "label": "SQFVM Checker", + "command": "${config:python.pythonPath}", + "options": { + "cwd": "${workspaceFolder}/tools" + }, + "args": [ + "sqfvmChecker.py" + ] + }, + { + "label": "Test All", + "dependsOn": [ + "Validate SQF", + "Validate Config", + "Validate Stringtables", + "Check Strings", + "SQFVM Checker" + ], + "group": { + "kind": "test", + "isDefault": true + }, + }, + { + "label": "Build: make.py (pboProject)", + "command": "${config:python.pythonPath}", + "options": { + "cwd": "${workspaceFolder}/tools" + }, + "args": [ + "make.py", "ci" + ], + "group": { + "kind": "build", + "isDefault": true + } + }, + { + "label": "Build: Hemtt Release", + "command": "hemtt.exe", + "options": { + "cwd": "${workspaceFolder}" + }, + "args": [ + "build", "--release", "--ci" + ], + "group": "build" + } + ] +} \ No newline at end of file diff --git a/tools/build.py b/tools/build.py index 9151daa095..257fbff224 100644 --- a/tools/build.py +++ b/tools/build.py @@ -9,6 +9,17 @@ MAINPREFIX = "z" PREFIX = "ace_" ########################## +def tryHemttBuild(projectpath): + hemttExe = os.path.join(projectpath, "hemtt.exe") + if os.path.isfile(hemttExe): + os.chdir(projectpath) + ret = subprocess.call([hemttExe, "pack"], stderr=subprocess.STDOUT) + print("Using hemtt: {}".format(ret)); + return True + else: + print("hemtt not installed"); + return False + def mod_time(path): if not os.path.isdir(path): return os.path.getmtime(path) @@ -40,6 +51,8 @@ def main(): projectpath = os.path.dirname(os.path.dirname(scriptpath)) addonspath = os.path.join(projectpath, "addons") + if (tryHemttBuild(projectpath)): return + os.chdir(addonspath) made = 0 diff --git a/tools/check_strings.py b/tools/check_strings.py index 78ad52b04e..c8e57907e8 100644 --- a/tools/check_strings.py +++ b/tools/check_strings.py @@ -17,7 +17,7 @@ def getDefinedStrings(filepath): return modStrings def getStringUsage(filepath): - selfmodule = (re.search('addons[\W]*([_a-zA-Z0-9]*)', filepath)).group(1) + selfmodule = (re.search('(addons|optionals)[\W]*([_a-zA-Z0-9]*)', filepath)).group(2) # print("Checking {0} from {1}".format(filepath,selfmodule)) fileStrings = [] @@ -51,23 +51,24 @@ def main(argv): allDefinedStrings = [] allUsedStrings = [] - # Allow running from root directory as well as from inside the tools directory - rootDir = "../addons" - if (os.path.exists("addons")): - rootDir = "addons" + for folder in ['addons', 'optionals']: + # Allow running from root directory as well as from inside the tools directory + rootDir = "../" + folder + if (os.path.exists(folder)): + rootDir = folder - for root, dirnames, filenames in os.walk(rootDir): - for filename in fnmatch.filter(filenames, '*.sqf'): - sqf_list.append(os.path.join(root, filename)) - for filename in fnmatch.filter(filenames, '*.cpp'): - sqf_list.append(os.path.join(root, filename)) - for filename in fnmatch.filter(filenames, '*.hpp'): - sqf_list.append(os.path.join(root, filename)) - for filename in fnmatch.filter(filenames, '*.h'): - sqf_list.append(os.path.join(root, filename)) + for root, dirnames, filenames in os.walk(rootDir): + for filename in fnmatch.filter(filenames, '*.sqf'): + sqf_list.append(os.path.join(root, filename)) + for filename in fnmatch.filter(filenames, '*.cpp'): + sqf_list.append(os.path.join(root, filename)) + for filename in fnmatch.filter(filenames, '*.hpp'): + sqf_list.append(os.path.join(root, filename)) + for filename in fnmatch.filter(filenames, '*.h'): + sqf_list.append(os.path.join(root, filename)) - for filename in fnmatch.filter(filenames, '*.xml'): - xml_list.append(os.path.join(root, filename)) + for filename in fnmatch.filter(filenames, '*.xml'): + xml_list.append(os.path.join(root, filename)) for filename in xml_list: allDefinedStrings = allDefinedStrings + getDefinedStrings(filename) diff --git a/tools/compileExtensions.py b/tools/compileExtensions.py new file mode 100644 index 0000000000..8864d98e7a --- /dev/null +++ b/tools/compileExtensions.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python3 +# vim: set fileencoding=utf-8 : + +# compileExtensions.py (from acre2's make.py) + +############################################################################### + +# The MIT License (MIT) + +# Copyright (c) 2013-2014 Ryan Schultz + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. + +############################################################################### + +import sys +import os.path +import subprocess +import shutil +import time +import timeit + +if sys.platform == "win32": + import winreg + + +def compile_extensions(force_build): + originalDir = os.getcwd() + extensions_root = os.path.join(os.path.dirname(os.getcwd()), "extensions") + os.chdir(extensions_root) + print("\nCompiling extensions in {} with rebuild:{}\n".format(extensions_root, force_build)) + + if shutil.which("git") == None: + print("Failed to find Git!") + return + if shutil.which("cmake") == None: + print("Failed to find CMake!") + return + if shutil.which("msbuild") == None: + print("Failed to find MSBuild!") + return + + try: + buildType = "rebuild" if force_build else "build" + # 32-bit + vcproj32 = os.path.join(extensions_root, "vcproj32") + if not os.path.exists(vcproj32): + os.mkdir(vcproj32) + os.chdir(vcproj32) + subprocess.call(["cmake", "..", "-A", "Win32"]) # note: cmake will update ace_version stuff + subprocess.call(["msbuild", "ACE.sln", "/m", "/t:{}".format(buildType), "/p:Configuration=Release"]) + + # 64-bit + vcproj64 = os.path.join(extensions_root, "vcproj64") + if not os.path.exists(vcproj64): + os.mkdir(vcproj64) + os.chdir(vcproj64) + subprocess.call(["cmake", "..", "-A", "x64"]) + subprocess.call(["msbuild", "ACE.sln", "/m", "/t:{}".format(buildType), "/p:Configuration=Release"]) + except Exception as e: + print("Error: COMPILING EXTENSIONS - {}".format(e)) + raise + finally: + os.chdir(originalDir) + + +def main(argv): + if "force" in argv: + argv.remove("force") + force_build = True + else: + force_build = False + + compile_extensions(force_build) + + +if __name__ == "__main__": + start_time = timeit.default_timer() + main(sys.argv) + print("\nTotal Program time elapsed: {0} sec".format(timeit.default_timer() - start_time)) + input("Press Enter to continue...") diff --git a/tools/config_style_checker.py b/tools/config_style_checker.py index 03d8f222fe..afa78a2d6b 100644 --- a/tools/config_style_checker.py +++ b/tools/config_style_checker.py @@ -16,6 +16,14 @@ def check_config_style(filepath): def popClosing(): closing << closingStack.pop() + reIsClass = re.compile(r'^\s*class(.*)') + reIsClassInherit = re.compile(r'^\s*class(.*):') + reIsClassBody = re.compile(r'^\s*class(.*){') + reBadColon = re.compile(r'\s*class (.*) :') + reSpaceAfterColon = re.compile(r'\s*class (.*): ') + reSpaceBeforeCurly = re.compile(r'\s*class (.*) {') + reClassSingleLine = re.compile(r'\s*class (.*)[{;]') + with open(filepath, 'r', encoding='utf-8', errors='ignore') as file: content = file.read() @@ -118,6 +126,23 @@ def check_config_style(filepath): if brackets_list.count('{') != brackets_list.count('}'): print("ERROR: A possible missing curly brace {{ or }} in file {0} {{ = {1} }} = {2}".format(filepath,brackets_list.count('{'),brackets_list.count('}'))) bad_count_file += 1 + + file.seek(0) + for lineNumber, line in enumerate(file.readlines()): + if reIsClass.match(line): + if reBadColon.match(line): + print(f"WARNING: bad class colon {filepath} Line number: {lineNumber+1}") + # bad_count_file += 1 + if reIsClassInherit.match(line): + if not reSpaceAfterColon.match(line): + print(f"WARNING: bad class missing space after colon {filepath} Line number: {lineNumber+1}") + if reIsClassBody.match(line): + if not reSpaceBeforeCurly.match(line): + print(f"WARNING: bad class inherit missing space before curly braces {filepath} Line number: {lineNumber+1}") + if not reClassSingleLine.match(line): + print(f"WARNING: bad class braces placement {filepath} Line number: {lineNumber+1}") + # bad_count_file += 1 + return bad_count_file def main(): @@ -131,16 +156,17 @@ def main(): parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="") args = parser.parse_args() - # Allow running from root directory as well as from inside the tools directory - rootDir = "../addons" - if (os.path.exists("addons")): - rootDir = "addons" + for folder in ['addons', 'optionals']: + # Allow running from root directory as well as from inside the tools directory + rootDir = "../" + folder + if (os.path.exists(folder)): + rootDir = folder - for root, dirnames, filenames in os.walk(rootDir + '/' + args.module): - for filename in fnmatch.filter(filenames, '*.cpp'): - sqf_list.append(os.path.join(root, filename)) - for filename in fnmatch.filter(filenames, '*.hpp'): - sqf_list.append(os.path.join(root, filename)) + for root, dirnames, filenames in os.walk(rootDir + '/' + args.module): + for filename in fnmatch.filter(filenames, '*.cpp'): + sqf_list.append(os.path.join(root, filename)) + for filename in fnmatch.filter(filenames, '*.hpp'): + sqf_list.append(os.path.join(root, filename)) for filename in sqf_list: bad_count = bad_count + check_config_style(filename) diff --git a/tools/make.py b/tools/make.py index 5078cdda60..33d57c9f98 100644 --- a/tools/make.py +++ b/tools/make.py @@ -227,6 +227,17 @@ def find_bi_tools(work_drive): else: raise Exception("BadTools","Arma 3 Tools are not installed correctly or the P: drive needs to be created.") +def mikero_windows_registry(path, access=winreg.KEY_READ): + try: + return winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Mikero\{}".format(path), access=access) + except FileNotFoundError: + try: + return winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Mikero\{}".format(path), access=access) + except FileNotFoundError: + try: + return winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Wow6432Node\Mikero\{}".format(path), access=access) + except FileNotFoundError: + return winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Wow6432Node\Mikero\{}".format(path), access=access) def find_depbo_tools(): """Use registry entries to find DePBO-based tools.""" @@ -235,20 +246,8 @@ def find_depbo_tools(): for tool in requiredToolPaths: try: - try: - k = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Mikero\{}".format(tool)) - path = winreg.QueryValueEx(k, "exe")[0] - except FileNotFoundError: - try: - k = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Mikero\{}".format(tool)) - path = winreg.QueryValueEx(k, "exe")[0] - except FileNotFoundError: - try: - k = winreg.OpenKey(winreg.HKEY_CURRENT_USER, r"Software\Wow6432Node\Mikero\{}".format(tool)) - path = winreg.QueryValueEx(k, "exe")[0] - except FileNotFoundError: - k = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"Software\Wow6432Node\Mikero\{}".format(tool)) - path = winreg.QueryValueEx(k, "exe")[0] + k = mikero_windows_registry(tool) + path = winreg.QueryValueEx(k, "exe")[0] except FileNotFoundError: print_error("Could not find {}".format(tool)) failed = True @@ -264,6 +263,17 @@ def find_depbo_tools(): return requiredToolPaths +def pboproject_settings(): + """Use registry entries to configure needed pboproject settings.""" + value_exclude = "thumbs.db,*.txt,*.h,*.dep,*.cpp,*.bak,*.png,*.log,*.pew,source,*.tga" + + try: + k = mikero_windows_registry(r"pboProject\Settings", access=winreg.KEY_SET_VALUE) + winreg.SetValueEx(k, "m_exclude", 0, winreg.REG_SZ, value_exclude) + winreg.SetValueEx(k, "m_exclude2", 0, winreg.REG_SZ, value_exclude) + except: + raise Exception("BadDePBO", "pboProject not installed correctly, make sure to run it at least once") + def color(color): """Set the color. Works on Win32 and normal terminals.""" @@ -356,7 +366,7 @@ def copy_important_files(source_dir,destination_dir): def copy_optionals_for_building(mod,pbos): - src_directories = os.listdir(optionals_root) + src_directories = next(os.walk(optionals_root))[1] current_dir = os.getcwd() print_blue("\nChecking optionals folder...") @@ -582,7 +592,9 @@ def get_project_version(version_increments=[]): def replace_file(filePath, oldSubstring, newSubstring): - fh, absPath = mkstemp() + global work_drive + fh, absPath = mkstemp(None, None, work_drive + "temp") + os.close(fh) with open(absPath, "w", encoding="utf-8") as newFile: with open(filePath, encoding="utf-8") as oldFile: for line in oldFile: @@ -832,6 +844,7 @@ def main(argv): make_target = "DEFAULT" # Which section in make.cfg to use for the build new_key = True # Make a new key and use it to sign? quiet = False # Suppress output from build tool? + sqfc_compiling = True # Parse arguments if "help" in argv or "-h" in argv or "--help" in argv: @@ -1031,6 +1044,8 @@ See the make.cfg file for additional build options. pboproject = depbo_tools["pboProject"] rapifyTool = depbo_tools["rapify"] makepboTool = depbo_tools["MakePbo"] + + pboproject_settings() except: raise print_error("Could not find dePBO tools. Download the needed tools from: https://dev.withsix.com/projects/mikero-pbodll/files") @@ -1119,9 +1134,10 @@ See the make.cfg file for additional build options. if ret == 0: print_green("Created: {}".format(os.path.join(private_key_path, key_name + ".biprivatekey"))) print("Removing any old signature keys...") - purge(os.path.join(module_root, release_dir, project, "addons"), "^.*\.bisign$","*.bisign") - purge(os.path.join(module_root, release_dir, project, "optionals"), "^.*\.bisign$","*.bisign") - purge(os.path.join(module_root, release_dir, project, "keys"), "^.*\.bikey$","*.bikey") + for root, _dirs, files in os.walk(os.path.join(module_root, release_dir)): + for file in files: + if file.endswith(".bisign") or file.endswith(".bikey"): + os.remove(os.path.join(root, file)) else: print_error("Failed to create key!") @@ -1169,6 +1185,23 @@ See the make.cfg file for additional build options. print_error("\nFailed to delete {}".format(os.path.join(obsolete_check_path,file))) pass + # Always cleanup old sqfc + for root, _dirs, files in os.walk(module_root_parent): + for file in files: + if file.endswith(".sqfc"): + os.remove(os.path.join(root, file)) + if sqfc_compiling: + print_blue("\nCompiling to sqfc...") + compiler_exe = os.path.join(module_root_parent, "ArmaScriptCompiler.exe") + if not os.path.isfile(compiler_exe): + print_yellow("ArmaScriptCompiler.exe not found in base mod folder - skipping") + else: + ret = subprocess.call([compiler_exe], cwd=module_root_parent, stdout=False) + if ret == 0: + print_green("sqfc finished") + else: + print_error("ArmaScriptCompiler.exe returned unexpected {}".format(ret)) + # For each module, prep files and then build. print_blue("\nBuilding...") for module in modules: @@ -1268,7 +1301,7 @@ See the make.cfg file for additional build options. cmd = [makepboTool, "-P","-A","-X=*.backup", os.path.join(work_drive, prefix, module),os.path.join(module_root, release_dir, project,"addons")] else: - cmd = [pboproject, "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S", "+Noisy", "+Clean", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"] + cmd = [pboproject, "-B", "-P", os.path.join(work_drive, prefix, module), "+Engine=Arma3", "-S", "+Noisy", "+Clean", "-Warnings", "+Mod="+os.path.join(module_root, release_dir, project), "-Key"] color("grey") if quiet: @@ -1420,6 +1453,14 @@ See the make.cfg file for additional build options. except: print_error("ERROR: Could not delete pboProject temp files.") + if sqfc_compiling: + print_blue("\nCleaning up sqfc...") + # cleanup all old sqfc + for root, _dirs, files in os.walk(module_root_parent): + for file in files: + if file.endswith(".sqfc"): + os.remove(os.path.join(root, file)) + # Make release if make_release_zip: release_name = "{}_{}".format(zipPrefix, project_version.rsplit(".", 1)[0]) diff --git a/tools/pDummies/gm/gm_weapons/gm_launchers/gm_platan/gm_mine_at_mn111_disarmed b/tools/pDummies/gm/gm_weapons/gm_launchers/gm_platan/gm_mine_at_mn111_disarmed new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_explosive_charge_petn b/tools/pDummies/gm/gm_weapons/gm_put/gm_explosive_charge_petn new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_explosive_charge_plnp b/tools/pDummies/gm/gm_weapons/gm_put/gm_explosive_charge_plnp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_ap_dm31 b/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_ap_dm31 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_at_dm21 b/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_at_dm21 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_at_tm46 b/tools/pDummies/gm/gm_weapons/gm_put/gm_mine_at_tm46 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/characters_f_vietnam/OPFOR/vests/items/vn_mine_satchel_02.p3d b/tools/pDummies/vn/characters_f_vietnam/OPFOR/vests/items/vn_mine_satchel_02.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/objects_f_vietnam/supply/a2_ammo/macv/vn_us_30cal.p3d b/tools/pDummies/vn/objects_f_vietnam/supply/a2_ammo/macv/vn_us_30cal.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/objects_f_vietnam/supply/a2_ammo/macv/vn_us_can_30.p3d b/tools/pDummies/vn/objects_f_vietnam/supply/a2_ammo/macv/vn_us_can_30.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/objects_f_vietnam/supply/a2_ammo/pavn/vn_pavn_50_can.p3d b/tools/pDummies/vn/objects_f_vietnam/supply/a2_ammo/pavn/vn_pavn_50_can.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/objects_f_vietnam/usarmy/furniture/vn_us_fort_common_crate_01.p3d b/tools/pDummies/vn/objects_f_vietnam/usarmy/furniture/vn_us_fort_common_crate_01.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/objects_f_vietnam/usarmy/supply/mortar_m2/vn_prop_60mm_crate_01.p3d b/tools/pDummies/vn/objects_f_vietnam/usarmy/supply/mortar_m2/vn_prop_60mm_crate_01.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/objects_f_vietnam/usarmy/supply/mortar_m2/vn_prop_81mm_crate_02.p3d b/tools/pDummies/vn/objects_f_vietnam/usarmy/supply/mortar_m2/vn_prop_81mm_crate_02.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/objects_f_vietnam/usarmy/supply/mortar_m29/vn_prop_81mm_crate_02.p3d b/tools/pDummies/vn/objects_f_vietnam/usarmy/supply/mortar_m29/vn_prop_81mm_crate_02.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m302_wp_ammo.p3d b/tools/pDummies/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m302_wp_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m49a2_he_ammo.p3d b/tools/pDummies/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m49a2_he_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m83_lume_ammo.p3d b/tools/pDummies/vn/static_f_vietnam/mortar_m2/vn_shell_60mm_m83_lume_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/static_f_vietnam/mortar_m29/vn_shell_81mm_m374_he_ammo.p3d b/tools/pDummies/vn/static_f_vietnam/mortar_m29/vn_shell_81mm_m374_he_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_d832_wp_ammo.p3d b/tools/pDummies/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_d832_wp_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_o832d_he_ammo.p3d b/tools/pDummies/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_o832d_he_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_s832s_lume_ammo.p3d b/tools/pDummies/vn/static_f_vietnam/mortar_type53/vn_shell_82mm_s832s_lume_ammo.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/static_f_vietnam/tow/vn_static_tow_mag.p3d b/tools/pDummies/vn/static_f_vietnam/tow/vn_static_tow_mag.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/m112/vn_mine_m112_mag b/tools/pDummies/vn/weapons_f_vietnam/mines/m112/vn_mine_m112_mag new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/m14/vn_mine_m14_mag b/tools/pDummies/vn/weapons_f_vietnam/mines/m14/vn_mine_m14_mag new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/m15/vn_mine_m15_mag b/tools/pDummies/vn/weapons_f_vietnam/mines/m15/vn_mine_m15_mag new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/m16/vn_mine_m16_mag b/tools/pDummies/vn/weapons_f_vietnam/mines/m16/vn_mine_m16_mag new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/m16/vn_mine_tripwire_m16_02 b/tools/pDummies/vn/weapons_f_vietnam/mines/m16/vn_mine_tripwire_m16_02 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/m16/vn_mine_tripwire_m16_04 b/tools/pDummies/vn/weapons_f_vietnam/mines/m16/vn_mine_tripwire_m16_04 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/m18/vn_mine_m18 b/tools/pDummies/vn/weapons_f_vietnam/mines/m18/vn_mine_m18 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/m18/vn_mine_m18_x3 b/tools/pDummies/vn/weapons_f_vietnam/mines/m18/vn_mine_m18_x3 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_01_mag b/tools/pDummies/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_01_mag new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_02_mag b/tools/pDummies/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_02_mag new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_03_mag b/tools/pDummies/vn/weapons_f_vietnam/mines/punji/vn_mine_punji_03_mag new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/tm57/vn_mine_tm57_mag b/tools/pDummies/vn/weapons_f_vietnam/mines/tm57/vn_mine_tm57_mag new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/tripwire_arty/vn_mine_tripwire_arty b/tools/pDummies/vn/weapons_f_vietnam/mines/tripwire_arty/vn_mine_tripwire_arty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/tripwire_f1/vn_mine_tripwire_f1_02 b/tools/pDummies/vn/weapons_f_vietnam/mines/tripwire_f1/vn_mine_tripwire_f1_02 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/vn/weapons_f_vietnam/mines/tripwire_f1/vn_mine_tripwire_f1_04 b/tools/pDummies/vn/weapons_f_vietnam/mines/tripwire_f1/vn_mine_tripwire_f1_04 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py index 6686004ac4..c338b2d383 100644 --- a/tools/sqf_validator.py +++ b/tools/sqf_validator.py @@ -165,14 +165,15 @@ def main(): parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="") args = parser.parse_args() - # Allow running from root directory as well as from inside the tools directory - rootDir = "../addons" - if (os.path.exists("addons")): - rootDir = "addons" + for folder in ['addons', 'optionals']: + # Allow running from root directory as well as from inside the tools directory + rootDir = "../" + folder + if (os.path.exists(folder)): + rootDir = folder - for root, dirnames, filenames in os.walk(rootDir + '/' + args.module): - for filename in fnmatch.filter(filenames, '*.sqf'): - sqf_list.append(os.path.join(root, filename)) + for root, dirnames, filenames in os.walk(rootDir + '/' + args.module): + for filename in fnmatch.filter(filenames, '*.sqf'): + sqf_list.append(os.path.join(root, filename)) for filename in sqf_list: bad_count = bad_count + check_sqf_syntax(filename) diff --git a/tools/sqfvmChecker.py b/tools/sqfvmChecker.py new file mode 100644 index 0000000000..98216563f0 --- /dev/null +++ b/tools/sqfvmChecker.py @@ -0,0 +1,89 @@ +import os +import sys +import subprocess +import concurrent.futures + +addon_base_path = os.path.dirname(os.getcwd()) + +files_to_ignore_lower = [ + x.lower() for x in ["initSettings.sqf", "initKeybinds.sqf", "XEH_PREP.sqf"] +] +sqfvm_exe = os.path.join(addon_base_path, "sqfvm.exe") +virtual_paths = [ + # would need to add more even more to /include to use it + "P:/a3|/a3", # "{}|/a3".format(os.path.join(addon_base_path, "include", "a3")), + "P:/a3|/A3", + "P:/x/cba|/x/cba", + "{}|/z/ace".format(addon_base_path), +] + + +def get_files_to_process(basePath): + arma_files = [] + for root, _dirs, files in os.walk(os.path.join(addon_base_path, "addons")): + for file in files: + if file.endswith(".sqf") or file == "config.cpp": + if file.lower() in files_to_ignore_lower: + continue + filePath = os.path.join(root, file) + arma_files.append(filePath) + return arma_files + + +def process_file(filePath, skipA3Warnings=True): + with open(filePath, "r", encoding="utf-8", errors="ignore") as file: + content = file.read() + if content.startswith("//pragma SKIP_COMPILE"): + return False + cmd = [sqfvm_exe, "--input", filePath, "--parse-only", "--automated"] + for v in virtual_paths: + cmd.append("-v") + cmd.append(v) + # cmd.append("-V") + proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True) + try: + ret = proc.wait(7) # max wait - seconds + except Exception as _e: + print("sqfvm timed out: {}".format(filePath)) + return True + # print("{} = {}".format(filePath, ret)) + + fileHasError = False + keepReadingLines = True + while keepReadingLines: + line = proc.stdout.readline() + if not line: + keepReadingLines = False + else: + line = line.rstrip() + if line.startswith("[ERR]"): + fileHasError = True + if not ( + skipA3Warnings + and line.startswith("[WRN]") + and ("a3/" in line) + and (("Unexpected IFDEF" in line) or ("defined twice" in line)) + ): + print(" {}".format(line)) + return fileHasError + + +def main(): + if not os.path.isfile(sqfvm_exe): + print("Error: sqfvm.exe not found in base folder [{}]".format(sqfvm_exe)) + return 1 + + error_count = 0 + arma_files = get_files_to_process(addon_base_path) + print("Checking {} files".format(len(arma_files))) + with concurrent.futures.ThreadPoolExecutor(max_workers=12) as executor: + for fileError in executor.map(process_file, arma_files): + if fileError: + error_count += 1 + + print("Errors: {}".format(error_count)) + return error_count + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tools/updateIncludes.py b/tools/updateIncludes.py new file mode 100644 index 0000000000..721b6b363d --- /dev/null +++ b/tools/updateIncludes.py @@ -0,0 +1,21 @@ +# PabstMirror - Overwrites all files in /include with updated version from a p-drive + +import os +import shutil + +include_base_path = os.path.join(os.path.dirname(os.getcwd()), "include") +p_drive_path = "P:\\" + +if not os.path.exists(p_drive_path): + raise Exception("No P-drive") + +for root, _dirs, files in os.walk(include_base_path): + relative_path = os.path.relpath(root, include_base_path) + for file in files: + if file == "$PBOPREFIX$": + continue + file_r_path = os.path.join(include_base_path, relative_path, file) + file_v_path = os.path.join(p_drive_path, relative_path, file) + if not os.path.isfile(file_v_path): + raise Exception("Missing p-drive file {}".format(file_v_path)) + shutil.copyfile(file_v_path, file_r_path)