diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index c71190ce39..08c14747e5 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -23,14 +23,14 @@ All good? Then proceed and fill out the items below. **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] +- **ACE3:** `3.x.x` [e.g. 3.0.0 stable, commit hash] **Description:** A clear and concise description of what the bug is. **Steps to reproduce:** -_Follow [https://ace3.acemod.org/img/wiki/user/issue_flowchart.webp](this flowchart)!_ +_Follow [this flowchart](https://ace3.acemod.org/img/wiki/user/issue_flowchart.webp)!_ 1. _Go to ..._ 2. _Click ..._ diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 2ba4cbfcaf..778d34fd9f 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -11,11 +11,10 @@ sort-direction: ascending categories: - title: '**ADDED:**' labels: - - 'kind/feature request' - - 'kind/added feature' + - 'kind/feature' - title: '**FIXED:**' labels: - - 'kind/bug fix' + - 'kind/bug-fix' - title: '**IMPROVED:**' labels: - 'kind/enhancement' @@ -23,17 +22,16 @@ categories: - title: '**CHANGED:**' labels: - 'kind/cleanup' - - 'area/compatibility' - 'kind/change' - title: '**SETTINGS:**' labels: - 'kind/setting' - title: '**TRANSLATIONS:**' labels: - - 'area/translations' + - 'kind/translation' exclude-labels: - - 'ignore changelog' + - 'ignore-changelog' - 'dependencies' change-template: '- $TITLE (#$NUMBER)' diff --git a/.github/workflows/arma.yml b/.github/workflows/arma.yml index da5fa29835..d0649a0ade 100644 --- a/.github/workflows/arma.yml +++ b/.github/workflows/arma.yml @@ -48,7 +48,7 @@ jobs: - name: Rename build folder run: mv .hemttout/build .hemttout/@ace - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ace3-${{ github.sha }}-nobin path: .hemttout/@* diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 4140138f1e..cc6aba0a99 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -47,7 +47,7 @@ jobs: destination: docs/_site/ - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: jekyll-site path: docs/_site/ @@ -63,7 +63,7 @@ jobs: steps: - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: jekyll-site path: _site/ diff --git a/.github/workflows/extensions.yml b/.github/workflows/extensions.yml index 84ea189cca..9693d2df22 100644 --- a/.github/workflows/extensions.yml +++ b/.github/workflows/extensions.yml @@ -23,7 +23,7 @@ jobs: cd build cmake .. && cmake --build . - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ace3_extensions-${{ matrix.os }}-debug path: extensions/build diff --git a/.github/workflows/hemtt.yml b/.github/workflows/hemtt.yml index ffe8894986..e606852285 100644 --- a/.github/workflows/hemtt.yml +++ b/.github/workflows/hemtt.yml @@ -38,7 +38,7 @@ jobs: - name: Rename build folder run: mv .hemttout/build .hemttout/@ace - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ace3-${{ github.sha }} path: .hemttout/@* diff --git a/.github/workflows/pboproject.yml b/.github/workflows/pboproject.yml index be578c0e27..71e36eb12b 100644 --- a/.github/workflows/pboproject.yml +++ b/.github/workflows/pboproject.yml @@ -67,18 +67,19 @@ jobs: xcopy /e /h /q z\ace\tools\pDummies\gm gm\ xcopy /e /h /q z\ace\tools\pDummies\vn vn\ xcopy /e /h /q z\ace\tools\pDummies\WW2 WW2\ + xcopy /e /h /q z\ace\tools\pDummies\CUP CUP\ - name: Build run: py P:\z\ace\tools\make.py ci env: PYTHONUNBUFFERED: 1 - name: Archive logs - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ always() }} with: name: logs path: temp/*.log - name: Archive @ace - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: '@ace3-${{ github.sha }}' path: z\ace\release\@ace diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index fa0dbe292a..2130398964 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -11,6 +11,6 @@ jobs: steps: - name: Release Drafter if: github.repository == 'acemod/ACE3' - uses: release-drafter/release-drafter@v5 + uses: release-drafter/release-drafter@v6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/AUTHORS.txt b/AUTHORS.txt index a11e39d78e..27dad9464e 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -6,6 +6,7 @@ # request, preferably including an email address. # CORE TEAM +BaerMitUmlaut Brett Mayson bux578 commy2 @@ -25,6 +26,7 @@ Kieran kymckay mharis001 MikeMF +MiszczuZPolski NouberNou PabstMirror Ruthberg @@ -56,7 +58,6 @@ Arcanum417 Arkhir ARV187 aka Spark23 Asgar Serran -BaerMitUmlaut Bamse Barman75 Bla1337 diff --git a/README.md b/README.md index 4951848123..feb9194d65 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@

- ACE3 Version + ACE3 Version ACE3 Issues diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index e6417f9a02..9d0dd0ee4b 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -1,7 +1,5 @@ #include "script_component.hpp" -#include "initKeybinds.inc.sqf" - GVAR(currentbulletID) = -1; GVAR(Protractor) = false; @@ -11,6 +9,8 @@ GVAR(currentGrid) = 0; if (!hasInterface) exitWith {}; +#include "initKeybinds.inc.sqf" + ["CBA_settingsInitialized", { //If not enabled, dont't add PFEH if (!GVAR(enabled)) exitWith {}; @@ -19,11 +19,11 @@ if (!hasInterface) exitWith {}; [] call FUNC(initializeTerrainExtension); // Register fire event handler - ["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler; - ["ace_firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler; + ["ace_firedPlayer", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler; + ["ace_firedPlayerNonLocal", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler; // Register Perframe Handler - [FUNC(handleFirePFH), GVAR(simulationInterval)] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(handleFirePFH), GVAR(simulationInterval)] call CBA_fnc_addPerFrameHandler; //Add warnings for missing compat PBOs (only if AB is on) { diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf index d6081e6f9e..125c3677b8 100644 --- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf @@ -44,6 +44,9 @@ if (!(_dragModel in [1, 2, 5, 6, 7, 8])) then { _dragModel = 1; }; private _ballisticCoefficients = getArray(_ammoConfig >> "ACE_ballisticCoefficients"); +if (_ballisticCoefficients isEqualTo []) then { + _ballisticCoefficients = [0.5]; +}; private _velocityBoundaries = getArray(_ammoConfig >> "ACE_velocityBoundaries"); private _atmosphereModel = getText(_ammoConfig >> "ACE_standardAtmosphere"); if (_atmosphereModel isEqualTo "") then { diff --git a/addons/advanced_fatigue/XEH_postInit.sqf b/addons/advanced_fatigue/XEH_postInit.sqf index db4a9d9c5e..f5aa7432f0 100644 --- a/addons/advanced_fatigue/XEH_postInit.sqf +++ b/addons/advanced_fatigue/XEH_postInit.sqf @@ -2,35 +2,6 @@ if (!hasInterface) exitWith {}; -["baseline", { - private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0]; - switch (stance ACE_player) do { - case ("CROUCH"): { - (1.0 + _fatigue ^ 2 * 0.1) - }; - case ("PRONE"): { - (1.0 + _fatigue ^ 2 * 2.0) - }; - default { - (1.5 + _fatigue ^ 2 * 3.0) - }; - }; -}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor); - -["multiplier", { - switch (true) do { - case (isWeaponRested ACE_player): { - GVAR(swayFactor) * GVAR(restedSwayFactor) - }; - case (isWeaponDeployed ACE_player): { - GVAR(swayFactor) * GVAR(deployedSwayFactor) - }; - default { - GVAR(swayFactor) - }; - }; -}, QUOTE(ADDON)] call EFUNC(common,addSwayFactor); - // recheck weapon inertia after weapon swap, change of attachments or switching unit ["weapon", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler; ["loadout", {[ACE_player] call FUNC(getWeaponInertia)}, true] call CBA_fnc_addPlayerEventHandler; @@ -39,6 +10,21 @@ if (!hasInterface) exitWith {}; ["CBA_settingsInitialized", { if (!GVAR(enabled)) exitWith {}; + ["baseline", { + private _fatigue = ACE_player getVariable [QGVAR(aimFatigue), 0]; + switch (stance ACE_player) do { + case ("CROUCH"): { + (1.0 + _fatigue ^ 2 * 0.1) + }; + case ("PRONE"): { + (1.0 + _fatigue ^ 2 * 2.0) + }; + default { + (1.5 + _fatigue ^ 2 * 3.0) + }; + }; + }, QUOTE(ADDON)] call EFUNC(common,addSwayFactor); + // - Post process effect ------------------------------------------------------ GVAR(ppeBlackout) = ppEffectCreate ["ColorCorrections", 4220]; GVAR(ppeBlackout) ppEffectEnable true; diff --git a/addons/advanced_fatigue/initSettings.inc.sqf b/addons/advanced_fatigue/initSettings.inc.sqf index e2d797bf91..9952a51d23 100644 --- a/addons/advanced_fatigue/initSettings.inc.sqf +++ b/addons/advanced_fatigue/initSettings.inc.sqf @@ -80,30 +80,3 @@ [0, 5, 1, 1], true ] call CBA_fnc_addSetting; - -[ - QGVAR(swayFactor), - "SLIDER", - [LSTRING(SwayFactor), LSTRING(SwayFactor_Description)], - LSTRING(DisplayName), - [0, 5, 1, 1], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(restedSwayFactor), - "SLIDER", - [LSTRING(RestedSwayFactor), LSTRING(RestedSwayFactor_Description)], - LSTRING(DisplayName), - [0, 5, 1, 2], - true -] call CBA_fnc_addSetting; - -[ - QGVAR(deployedSwayFactor), - "SLIDER", - [LSTRING(DeployedSwayFactor), LSTRING(DeployedSwayFactor_Description)], - LSTRING(DisplayName), - [0, 5, 1, 2], - true -] call CBA_fnc_addSetting; diff --git a/addons/advanced_fatigue/stringtable.xml b/addons/advanced_fatigue/stringtable.xml index dc68259db8..5cd36ffce6 100644 --- a/addons/advanced_fatigue/stringtable.xml +++ b/addons/advanced_fatigue/stringtable.xml @@ -44,7 +44,7 @@ Influenza la prestazione generale di tutti i giocatori smuniti di un fattore personalizzato. Maggiore significa migliore. 影響所有玩家的體力表現,值越高代表體力越好 影响所有玩家的体力表现,值越高代表体力越好 - Влияет на общую производительность игроков, у которых не задано персональное значение. + Влияет на общую производительность игроков, у которых не задано персональное значение. Чем выше, тем лучше. Influencia na performance geral de todos os jogadores sem nenhum fator personalizado. Quanto maior, melhor. Ovlivňuje celkový výkon všech hráčů bez vlastního faktoru. Vyšší znamená lépe. @@ -59,7 +59,7 @@ Influenza la prestazione personalizzata di questa unità. Maggiore significa migliore. 影響這個單位的體力表現,值越高代表體力越好 影响这个单位的体力表现,值越高代表体力越好 - Влияет на общую производительность юнита. + Влияет на общую производительность юнита.Чем выше, тем лучше. Influencia na performance geral dessa unidade. Quanto maior, melhor. Ovlivňuje celkový výkon této jednotky. Vyšší znamená lépe. @@ -154,72 +154,6 @@ Define o quanto que um terreno íngrime aumenta na perda de estamina. Quanto maior, maior a perda de estamina. Nastavuje, o kolik strmý terén zvyšuje ztrátu výdrže. Vyšší znamená vyšší ztrátu výdrže. - - Sway factor - Factor de balanceo de mira - Verwacklungsfaktor - 手ぶれ因数 - 抖动系数 - 抖動因素 - Facteur de tremblement - Fattore di Oscillazione - Czynnik kołysania - Фактор колебания прицела - Fator de Balanço de Mira - Faktor kývání - 손떨림 정도 - - - Influences the amount of weapon sway. Higher means more sway. - Afecta al la estabilidad de la mira. Más alto significa más balanceo - Beeinflusst, wie ruhig man eine Waffe halten kann. Ein höherer Wert bedeutet weniger Stabilisierung. - 武器の手ぶれの量に影響します。値が高いほど、手ぶれが強くなります。 - 影响手持武器的晃动程度,数值越高,抖动的越厉害。 - 影響手持武器晃動程度,數值越高抖動越厲害 - Influe sur l'amplitude du tremblement de l'arme. Une valeur plus élevée signifie plus de tremblement. - Influenza l'aumento di oscillazione dell'arma quando affaticato. Maggiore significa più oscillazione. - Wpływa na poziom kołysania broni. Większa ilość znaczy większe kołysanie. - Влияет на колебания прицела оружия. Чем выше - тем больше. - Influencia a quantidade de balanço da mira da arma. Quanto maior, mais balanço. - Ovlivňuje množství kývání zbraní. Vyšší znamená více kývání. - 손떨림의 정도를 정합니다. 높을 수록 많이 휘적입니다. - - - Rested sway factor - Facteur de balancement au repos - 휴식 시 손떨림 정도 - Fator de balanço de mira em repouso - Verwacklungsfaktor, wenn aufgelegt - Fattore di Oscillazione Appoggiato - 静止時の手ぶれ係数 - - - Influences the amount of weapon sway while weapon is rested. - Influence le degré de balancement de l'arme au repos. - 무기가 아무런 행동도 하지 않는 동안 무기가 흔들리는 정도를 정합니다. - Influencia a quantidade de balanço de mira enquanto a arma está em repouso. - Beeinflusst, wie ruhig man die Waffe hält, während sie aufgelegt ist. - Determina la quantità di oscillazione dell'arma quando questa è appoggiata. - 静止している時の武器の手ぶれの量に影響します。 - - - Deployed sway factor - Facteur de balancement déployé - 거치 시 손떨림 정도 - Fator de balanço de mira em posição de tiro - Verwacklungsfaktor, wenn Zweibein aufgestellt ist. - Fattore di Oscillazione su Bipode - 展開時の手ぶれ係数 - - - Influences the amount of weapon sway while weapon is deployed. - Influence le degré de balancement de l'arme déployée. - 무기를 거치하는 동안 무기를 흔드는 정도를 정합니다. - Influencia a quantidade de balanço de mira enquanto a arma está em posição de tiro. - Beeinflusst, wie ruhig man die Waffen hält, während das Zweibein aufgestellt ist. - Determina la quantità di oscillazione dell'arma quando questa è stabilizzata usando il bipode. - 武器の展開(Cキー)時の武器の手ぶれの量に影響します。 - Enabled Activada @@ -246,7 +180,7 @@ Abilita/Disabilita la Fatica Avanzata. 啟用/關閉進階體力. 启用/关闭进阶体力。 - Включает / Отключает Продвинутую усталость + Включает/отключает Продвинутую усталость Ativa/Desativa Fadiga Avançada. Aktivuje / deaktivuje Pokročilou únavu. diff --git a/addons/advanced_throwing/XEH_postInit.sqf b/addons/advanced_throwing/XEH_postInit.sqf index 96b0fbb09b..774c99b3e6 100644 --- a/addons/advanced_throwing/XEH_postInit.sqf +++ b/addons/advanced_throwing/XEH_postInit.sqf @@ -2,20 +2,22 @@ // Fired XEH GVAR(ammoEventHandlers) = createHashMap; -[QGVAR(throwFiredXEH), FUNC(throwFiredXEH)] call CBA_fnc_addEventHandler; +[QGVAR(throwFiredXEH), LINKFUNC(throwFiredXEH)] call CBA_fnc_addEventHandler; // Exit on HC if (!hasInterface) exitWith {}; +// Temporary Wind Info indication +GVAR(tempWindInfo) = false; + // Ammo/Magazines look-up hash for correctness of initSpeed GVAR(ammoMagLookup) = call CBA_fnc_createNamespace; { { private _ammo = getText (configFile >> "CfgMagazines" >> _x >> "ammo"); if (_ammo != "") then { GVAR(ammoMagLookup) setVariable [_ammo, _x]; }; - } count (getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")); - nil -} count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles"); + } forEach (getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")); +} forEach getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles"); // Add keybinds diff --git a/addons/advanced_throwing/functions/fnc_canThrow.sqf b/addons/advanced_throwing/functions/fnc_canThrow.sqf index 06cf166f88..8b2987eafa 100644 --- a/addons/advanced_throwing/functions/fnc_canThrow.sqf +++ b/addons/advanced_throwing/functions/fnc_canThrow.sqf @@ -19,7 +19,7 @@ params ["_unit"]; if !(_unit getVariable [QGVAR(inHand), false]) exitWith {false}; -if (vehicle _unit != _unit) exitWith { +if (!isNull objectParent _unit) exitWith { private _startPos = eyePos _unit; private _aimLinePos = AGLToASL (positionCameraToWorld [0, 0, 1]); private _intersections = lineIntersectsSurfaces [_startPos, _aimLinePos, _unit, objNull, false]; diff --git a/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf b/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf index 744a6d7aae..3b88564eae 100644 --- a/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf +++ b/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf @@ -53,6 +53,12 @@ _unit setVariable [QGVAR(dropDistance), DROP_DISTANCE_DEFAULT]; // Remove controls hint (check if ever enabled is inside the function) call EFUNC(interaction,hideMouseHint); +// Hide wind info after throw, if it was temporarily enabled for the throw +if (GVAR(tempWindInfo)) then { + EGVAR(weather,WindInfo) = false; + GVAR(tempWindInfo) = false; +}; + // Remove throw action [_unit, "DefaultAction", _unit getVariable [QGVAR(throwAction), -1]] call EFUNC(common,removeActionEventHandler); diff --git a/addons/advanced_throwing/functions/fnc_getMuzzle.sqf b/addons/advanced_throwing/functions/fnc_getMuzzle.sqf index e0c55daba6..eab95825e4 100644 --- a/addons/advanced_throwing/functions/fnc_getMuzzle.sqf +++ b/addons/advanced_throwing/functions/fnc_getMuzzle.sqf @@ -17,9 +17,9 @@ params ["_magazineClassname"]; -_magazineClassname = toLower _magazineClassname; +_magazineClassname = toLowerANSI _magazineClassname; private _throwMuzzles = getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles"); -_throwMuzzles = _throwMuzzles select {_magazineClassname in ((getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")) apply {toLower _x})}; +_throwMuzzles = _throwMuzzles select {_magazineClassname in ((getArray (configFile >> "CfgWeapons" >> "Throw" >> _x >> "magazines")) apply {toLowerANSI _x})}; [_throwMuzzles select 0, ""] select (_throwMuzzles isEqualTo []) diff --git a/addons/advanced_throwing/functions/fnc_prepare.sqf b/addons/advanced_throwing/functions/fnc_prepare.sqf index 070870879b..7926c2c864 100644 --- a/addons/advanced_throwing/functions/fnc_prepare.sqf +++ b/addons/advanced_throwing/functions/fnc_prepare.sqf @@ -18,6 +18,15 @@ params ["_unit"]; TRACE_1("params",_unit); +// Temporarily enable wind info, to aid in throwing smoke grenades effectively +if ( + GVAR(enableTempWindInfo) && + {!(missionNamespace getVariable [QEGVAR(weather,WindInfo), false])} +) then { + [] call EFUNC(weather,displayWindInfo); + GVAR(tempWindInfo) = true; +}; + // Select next throwable if one already in hand if (_unit getVariable [QGVAR(inHand), false]) exitWith { TRACE_1("inHand",_unit); diff --git a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf index 15cae41585..d45f2add93 100644 --- a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf +++ b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf @@ -44,8 +44,7 @@ _addedPickUpHelpers pushBack _pickUpHelper; _throwablesHelped pushBack _x; }; - nil - } count _nearThrowables; + } forEach _nearThrowables; _args set [0, getPosASL ACE_player]; _args set [3, _nearThrowables]; @@ -56,11 +55,10 @@ { // Only handling with attachTo works nicely _x attachTo [_x getVariable [QGVAR(throwable), objNull], [0, 0, 0]]; - nil - } count _addedPickUpHelpers; + } forEach _addedPickUpHelpers; } else { TRACE_1("Cleaning Pick Up Helpers",count _addedPickUpHelpers); - {deleteVehicle _x} count _addedPickUpHelpers; + {deleteVehicle _x} forEach _addedPickUpHelpers; [_idPFH] call CBA_fnc_removePerFrameHandler; }; }, 0, [(getPosASL ACE_player) vectorAdd [-100, 0, 0], [], [], []]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/advanced_throwing/functions/fnc_throw.sqf b/addons/advanced_throwing/functions/fnc_throw.sqf index 0380d3d896..797f18d773 100644 --- a/addons/advanced_throwing/functions/fnc_throw.sqf +++ b/addons/advanced_throwing/functions/fnc_throw.sqf @@ -45,7 +45,7 @@ if (!(_unit getVariable [QGVAR(primed), false])) then { private _newVelocity = (_p1 vectorFromTo _p2) vectorMultiply _velocity; // Adjust for throwing from inside vehicles, where we have a vehicle-based velocity that can't be compensated for by a human - if (vehicle _unit != _unit) then { + if (!isNull objectParent _unit) then { _newVelocity = _newVelocity vectorAdd (velocity (vehicle _unit)); }; diff --git a/addons/advanced_throwing/initSettings.inc.sqf b/addons/advanced_throwing/initSettings.inc.sqf index d4ebe14918..d8396637c5 100644 --- a/addons/advanced_throwing/initSettings.inc.sqf +++ b/addons/advanced_throwing/initSettings.inc.sqf @@ -40,3 +40,11 @@ private _category = format ["ACE %1", localize LSTRING(Category)]; true, 1 ] call CBA_fnc_addSetting; + +[ + QGVAR(enableTempWindInfo), "CHECKBOX", + [LSTRING(EnableTempWindInfo_DisplayName), LSTRING(EnableTempWindInfo_Description)], + _category, + true, + 0 +] call CBA_fnc_addSetting; diff --git a/addons/advanced_throwing/stringtable.xml b/addons/advanced_throwing/stringtable.xml index ec2354a2c0..7676464474 100644 --- a/addons/advanced_throwing/stringtable.xml +++ b/addons/advanced_throwing/stringtable.xml @@ -185,6 +185,22 @@ Permite que arremessáveis fixados em objetos sejam pegos. Zapíná schopnost zvednutí předmětů z objektů ke kterým jsou připnuté. + + Show Temporary Wind Info + Zeige temporäre Windinformationen + Mostra informazioni sul vento temporaneamente + 一時的に風の情報を表示 + 바람 정보 임시로 표시 + Afficher temporairement les informations sur le vent + + + Temporarily display Wind Info while throwing, to aid in placing smoke grenades effectively. + Zeige während des werfens Windinformationen an, um Rauchgranaten effektiver zu platzieren. + Mostra le informazioni sul vento durante il lancio di granate, facilitando il piazzamento ottimale di fumogeni. + 投擲行動中に風向きの情報を一時的に表示し、発煙手榴弾の煙幕を効果的に展開しやすくします。 + 연막탄을 효과적으로 배치하는 데 도움이 되도록 투척하는 동안 일시적으로 바람 정보를 표시합니다. + Affiche les informations sur le vent pendant le lancement pour placer les grenades fumigènes plus efficacement. + Prepare/Change Throwable Preparar/Cambiar objetos lanzables diff --git a/addons/ai/XEH_postInit.sqf b/addons/ai/XEH_postInit.sqf index fce5152e3d..7c4f79f8fb 100644 --- a/addons/ai/XEH_postInit.sqf +++ b/addons/ai/XEH_postInit.sqf @@ -16,7 +16,7 @@ } forEach _sections; }] call CBA_fnc_addEventHandler; -[QGVAR(unGarrison), FUNC(unGarrison)] call CBA_fnc_addEventHandler; +[QGVAR(unGarrison), LINKFUNC(unGarrison)] call CBA_fnc_addEventHandler; [QGVAR(doMove), { params ["_unitsArray"]; @@ -73,6 +73,6 @@ if (isServer) then { ["CAManBase", "init", { // wait for HMD to be assigned so `hmd _unit` works - [FUNC(assignNVG), _this, 1] call CBA_fnc_waitAndExecute; + [LINKFUNC(assignNVG), _this, 1] call CBA_fnc_waitAndExecute; }] call CBA_fnc_addClassEventHandler; }; diff --git a/addons/ai/functions/fnc_garrison.sqf b/addons/ai/functions/fnc_garrison.sqf index 0f9613dd9f..4b8f84fce6 100644 --- a/addons/ai/functions/fnc_garrison.sqf +++ b/addons/ai/functions/fnc_garrison.sqf @@ -33,7 +33,7 @@ if (_startingPos isEqualTo [0,0,0]) exitWith { [LSTRING(GarrisonInvalidPosition)] call EFUNC(common,displayTextStructured); }; -if (count _unitsArray == 0 || {isNull (_unitsArray select 0)}) exitWith { +if (_unitsArray isEqualTo [] || {isNull (_unitsArray select 0)}) exitWith { TRACE_1("fnc_garrison: Units error",_unitsArray); [LSTRING(GarrisonNoUnits)] call EFUNC(common,displayTextStructured); }; @@ -43,7 +43,7 @@ if (_fillingRadius >= 50) then { _buildings = [_buildings] call CBA_fnc_shuffle; }; -if (count _buildings == 0) exitWith { +if (_buildings isEqualTo []) exitWith { TRACE_1("fnc_garrison: Building error",_buildings); [LSTRING(GarrisonNoBuilding)] call EFUNC(common,displayTextStructured); }; diff --git a/addons/ai/stringtable.xml b/addons/ai/stringtable.xml index 12c9c8d73f..11a686f6b2 100644 --- a/addons/ai/stringtable.xml +++ b/addons/ai/stringtable.xml @@ -90,6 +90,7 @@ Equipement JVN automatique Equipar NVGs automaticamente 暗視装置の自動装備 + Автоматическое оснащение ПНВ Equips NVG in inventory during night time and unequips it during day time.\nDoes not add NVGs to inventory! @@ -100,6 +101,7 @@ Equipe des JVN pendant la nuit et les déséquipe le jour.\nN'ajoute pas les JVN dans l'intenvaire ! Equipa o NVG do inventário durante a noite e desequipa durante o dia.\nNão adiciona NVGs ao inventário! インベントリ内の暗視装置を夜間に装備し、日中は解除し収納します。\nこれはNVGをインベントリに追加しません。 + Экипирует ПНВ в ночное время и отключает его в дневное время.\nНе добавляет ПНВ в инвентарь! diff --git a/addons/aircraft/functions/fnc_canShowEject.sqf b/addons/aircraft/functions/fnc_canShowEject.sqf index 08c55eb781..9239c413a7 100644 --- a/addons/aircraft/functions/fnc_canShowEject.sqf +++ b/addons/aircraft/functions/fnc_canShowEject.sqf @@ -30,6 +30,6 @@ _vehicle == vehicle _unit if (_unit == _x select FULLCREW_UNIT) exitWith { _ejectVarName = format [QGVAR(ejectAction_%1_%2), _x select FULLCREW_ROLE, _x select FULLCREW_TURRETPATH]; }; - } count fullCrew _vehicle; + } forEach fullCrew _vehicle; _vehicle getVariable [_ejectVarName, false] } diff --git a/addons/aircraft/functions/fnc_droneModifyWaypoint.sqf b/addons/aircraft/functions/fnc_droneModifyWaypoint.sqf index 868a0d0f8b..b85e556587 100644 --- a/addons/aircraft/functions/fnc_droneModifyWaypoint.sqf +++ b/addons/aircraft/functions/fnc_droneModifyWaypoint.sqf @@ -17,13 +17,13 @@ * * Public: No */ - + params ["_vehicle", "_group", "_type", "_value"]; TRACE_4("droneModifyWaypoint",_vehicle,_group,_type,_value); private _index = (currentWaypoint _group) min count waypoints _group; private _waypoint = [_group, _index]; -switch (toLower _type) do { +switch (toLowerANSI _type) do { case ("height"): { private _pos = waypointPosition _waypoint; _pos set [2, _value]; diff --git a/addons/arsenal/ACE_Arsenal_Stats.hpp b/addons/arsenal/ACE_Arsenal_Stats.hpp index 7748d1bdc5..0856685447 100644 --- a/addons/arsenal/ACE_Arsenal_Stats.hpp +++ b/addons/arsenal/ACE_Arsenal_Stats.hpp @@ -123,7 +123,9 @@ class GVAR(stats) { stats[] = {"maximumLoad"}; displayName = "$STR_a3_rscdisplayarsenal_stat_load"; showBar = 1; + showText = 1; barStatement = QUOTE([ARR_3((_this select 0) select 0,_this select 1,[ARR_3([ARR_2(0,500)],[ARR_2(0.01,1)],false)])] call FUNC(statBarStatement_default)); + textStatement = QUOTE(call FUNC(statTextStatement_load)); tabs[] = {{3,4,5}, {}}; }; class ACE_smokeChemTTL: statBase { diff --git a/addons/arsenal/Cfg3DEN.hpp b/addons/arsenal/Cfg3DEN.hpp index f119af364b..1cec4a9c75 100644 --- a/addons/arsenal/Cfg3DEN.hpp +++ b/addons/arsenal/Cfg3DEN.hpp @@ -110,7 +110,7 @@ class Cfg3DEN { h = QUOTE(65 * ATTRIBUTE_H); drawSideArrows = 1; disableOverflow = 1; - columns[] = {0.05, 0.15, 0.85}; + columns[] = {0.05, 0.15, 0.83, 0.87}; }; class ArrowLeft: ctrlButton { idc = IDC_ATTRIBUTE_LIST_LEFT; diff --git a/addons/arsenal/XEH_PREP.hpp b/addons/arsenal/XEH_PREP.hpp index ca34487c97..94d4739b60 100644 --- a/addons/arsenal/XEH_PREP.hpp +++ b/addons/arsenal/XEH_PREP.hpp @@ -16,6 +16,8 @@ PREP(attributeKeyDown); PREP(attributeLoad); PREP(attributeMode); PREP(attributeSelect); +PREP(baseAttachment); +PREP(baseOptic); PREP(baseWeapon); PREP(buttonActionsPage); PREP(buttonCargo); @@ -96,6 +98,7 @@ PREP(statBarStatement_rateOfFIre); PREP(statTextStatement_accuracy); PREP(statTextStatement_explosionTime); PREP(statTextStatement_illuminators); +PREP(statTextStatement_load); PREP(statTextStatement_magCount); PREP(statTextStatement_mass); PREP(statTextStatement_rateOfFire); diff --git a/addons/arsenal/XEH_postInit.sqf b/addons/arsenal/XEH_postInit.sqf index 33646a25d7..7c7c677819 100644 --- a/addons/arsenal/XEH_postInit.sqf +++ b/addons/arsenal/XEH_postInit.sqf @@ -70,7 +70,7 @@ GVAR(lastSortDirectionRight) = DESCENDING; if (!isNil QGVAR(currentLoadoutsTab) && {GVAR(currentLoadoutsTab) == IDC_buttonSharedLoadouts}) then { private _curSelData = _contentPanelCtrl lnbData [lnbCurSelRow _contentPanelCtrl, 1]; - ([_loadoutData] call FUNC(verifyLoadout)) params ["_extendedLoadout", "_nullItemsAmount", "_unavailableItemsAmount"]; + ([_loadoutData] call FUNC(verifyLoadout)) params ["_extendedLoadout", "_nullItemsList", "_unavailableItemsList"]; _extendedLoadout params ["_loadout"]; private _newRow = _contentPanelCtrl lnbAddRow [_playerName, _loadoutName]; @@ -81,10 +81,10 @@ GVAR(lastSortDirectionRight) = DESCENDING; _contentPanelCtrl lnbSetData [[_newRow, 1], _playerName + _loadoutName]; // Set color of row, depending if items are unavailable/missing - if (_nullItemsAmount > 0) then { + if (_nullItemsList isNotEqualTo []) then { _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; } else { - if (_unavailableItemsAmount > 0) then { + if (_unavailableItemsList isNotEqualTo []) then { _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; }; }; @@ -108,24 +108,16 @@ GVAR(lastSortDirectionRight) = DESCENDING; private _face = _extendedInfo getOrDefault [QGVAR(face), ""]; if (_face != "") then { - if (isMultiplayer) then { - private _id = [QGVAR(broadcastFace), [_unit, _face], QGVAR(centerFace_) + netId _unit] call CBA_fnc_globalEventJIP; - [_id, _unit] call CBA_fnc_removeGlobalEventJIP; - } else { - _unit setFace _face; - }; + private _id = [QGVAR(broadcastFace), [_unit, _face], QGVAR(centerFace_) + hashValue _unit] call CBA_fnc_globalEventJIP; + [_id, _unit] call CBA_fnc_removeGlobalEventJIP; }; // Set voice private _voice = _extendedInfo getOrDefault [QGVAR(voice), ""]; if (_voice != "") then { - if (isMultiplayer) then { - private _id = [QGVAR(broadcastVoice), [_unit, _voice], QGVAR(centerVoice_) + netId _unit] call CBA_fnc_globalEventJIP; - [_id, _unit] call CBA_fnc_removeGlobalEventJIP; - } else { - _unit setSpeaker _voice; - }; + private _id = [QGVAR(broadcastVoice), [_unit, _voice], QGVAR(centerVoice_) + hashValue _unit] call CBA_fnc_globalEventJIP; + [_id, _unit] call CBA_fnc_removeGlobalEventJIP; }; // Set insignia @@ -147,7 +139,7 @@ GVAR(lastSortDirectionRight) = DESCENDING; // Set voice if enabled if (GVAR(loadoutsSaveVoice)) then { - _extendedInfo set [QGVAR(voice), speaker _unit]; + _extendedInfo set [QGVAR(voice), (speaker _unit) call EFUNC(common,getConfigName)]; }; // Set insignia if enabled diff --git a/addons/arsenal/XEH_preInit.sqf b/addons/arsenal/XEH_preInit.sqf index 0227e18f0a..10cc3989e9 100644 --- a/addons/arsenal/XEH_preInit.sqf +++ b/addons/arsenal/XEH_preInit.sqf @@ -48,4 +48,47 @@ call FUNC(compileStats); // Setup Tools tab [keys (uiNamespace getVariable [QGVAR(configItemsTools), createHashMap]), LLSTRING(toolsTab), TOOLS_TAB_ICON, -1, true] call FUNC(addRightPanelButton); +// TODO: make IDCs able to match IDX with simple math? +GVAR(idxMap) = createHashMapFromArray [ + [IDC_buttonPrimaryWeapon, IDX_VIRT_PRIMARY_WEAPONS], + [IDC_buttonHandgun, IDX_VIRT_HANDGUN_WEAPONS], + [IDC_buttonSecondaryWeapon, IDX_VIRT_SECONDARY_WEAPONS], + [IDC_buttonHeadgear, IDX_VIRT_HEADGEAR], + [IDC_buttonUniform, IDX_VIRT_UNIFORM], + [IDC_buttonVest, IDX_VIRT_VEST], + [IDC_buttonBackpack, IDX_VIRT_BACKPACK], + [IDC_buttonGoggles, IDX_VIRT_GOGGLES], + [IDC_buttonNVG, IDX_VIRT_NVG], + [IDC_buttonBinoculars, IDX_VIRT_BINO], + [IDC_buttonMap, IDX_VIRT_MAP], + [IDC_buttonGPS, IDX_VIRT_COMMS], + [IDC_buttonRadio, IDX_VIRT_RADIO], + [IDC_buttonCompass, IDX_VIRT_COMPASS], + [IDC_buttonWatch, IDX_VIRT_WATCH] +]; + +// Make new hashmaps for face/voice/insignia so mission makers can disable them +// Copies of hashmaps aren't final +GVAR(faceCache) = +(uiNamespace getVariable QGVAR(faceCache)); +GVAR(voiceCache) = +(uiNamespace getVariable QGVAR(voiceCache)); +GVAR(insigniaCache) = +(uiNamespace getVariable QGVAR(insigniaCache)); + +// Get mission/campaign insignias +// BIS_fnc_setUnitInsignia will look in mission config, then campaign, then global config last, so overwrite accordingly +private _insigniaCondition = toString { + if (isNumber (_x >> "scope")) then { + getNumber (_x >> "scope") == 2 + } else { + true + }; +}; + +// Ref fnc_addListBoxItem, 0/nil = configFile, 1 = campaignConfigFile, 2 = missionConfigFile +{ + GVAR(insigniaCache) set [_x, 1]; +} forEach (_insigniaCondition configClasses (campaignConfigFile >> "CfgUnitInsignia")); +{ + GVAR(insigniaCache) set [_x, 2]; +} forEach (_insigniaCondition configClasses (missionConfigFile >> "CfgUnitInsignia")); + ADDON = true; diff --git a/addons/arsenal/defines.hpp b/addons/arsenal/defines.hpp index ac84f0d8a4..cd6d937426 100644 --- a/addons/arsenal/defines.hpp +++ b/addons/arsenal/defines.hpp @@ -270,6 +270,7 @@ #define IDX_VIRT_UNIQUE_UNKNOWN_ITEMS 25 // Indexes of current items array +// Should match IDX_VIRT_X macros for any left panel tabs #define IDX_CURR_PRIMARY_WEAPON 0 #define IDX_CURR_SECONDARY_WEAPON 1 #define IDX_CURR_HANDGUN_WEAPON 2 @@ -489,3 +490,6 @@ if (!isNil QGVAR(customRightPanelButtons)) then {\ _contentPanelCtrl lnbSetPicture [[_newRow, 7], getText (configFile >> "CfgVehicles" >> (_loadout select IDX_LOADOUT_BACKPACK) select 0 >> "picture")];\ _contentPanelCtrl lnbSetPicture [[_newRow, 8], getText (_cfgWeapons >> _loadout select IDX_LOADOUT_HEADGEAR >> "picture")];\ _contentPanelCtrl lnbSetPicture [[_newRow, 9], getText (configFile >> "CfgGlasses" >> _loadout select IDX_LOADOUT_GOGGLES >> "picture")]; + +#define ACTION_TYPE_TEXT 0 +#define ACTION_TYPE_BUTTON 1 diff --git a/addons/arsenal/functions/fnc_addAction.sqf b/addons/arsenal/functions/fnc_addAction.sqf index 05557f159a..b04d56729a 100644 --- a/addons/arsenal/functions/fnc_addAction.sqf +++ b/addons/arsenal/functions/fnc_addAction.sqf @@ -1,4 +1,5 @@ #include "..\script_component.hpp" +#include "..\defines.hpp" /* * Author: johnb43 * Adds custom action buttons. diff --git a/addons/arsenal/functions/fnc_addListBoxItem.sqf b/addons/arsenal/functions/fnc_addListBoxItem.sqf index 2852aa7232..777b1efe87 100644 --- a/addons/arsenal/functions/fnc_addListBoxItem.sqf +++ b/addons/arsenal/functions/fnc_addListBoxItem.sqf @@ -6,9 +6,10 @@ * * Arguments: * 0: Config category, must be "CfgWeapons", "CfgVehicles", "CfgMagazines", "CfgVoice" or "CfgUnitInsignia" - * 1: Classname + * 1: Classname (must be in config case) * 2: Panel control * 3: Name of the picture entry in that Cfg class (default: "picture") + * 4: Config root (default: 0 -> configFile) * * Return Value: * None @@ -19,9 +20,9 @@ * Public: Yes */ -params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]]; +params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]], ["_configRoot", 0, [0]]]; -private _skip = GVAR(favoritesOnly) && {!(_className in GVAR(currentItems))} && {!((toLower _className) in GVAR(favorites))}; +private _skip = GVAR(favoritesOnly) && {!(_className in GVAR(currentItems))} && {!((toLowerANSI _className) in GVAR(favorites))}; if (_skip) then { switch (GVAR(currentLeftPanel)) do { case IDC_buttonPrimaryWeapon: { @@ -41,10 +42,10 @@ if (_skip) then { if (_skip) exitWith {}; -// Sanitise key, as it's public; If not in cache, find info and cache it for later use -((uiNamespace getVariable QGVAR(addListBoxItemCache)) getOrDefaultCall [_configCategory + _className, { +// If not in cache, find info and cache it for later use +((uiNamespace getVariable QGVAR(addListBoxItemCache)) getOrDefaultCall [_configCategory + _className + str _configRoot, { // Get classname (config case), display name, picture and DLC - private _configPath = configFile >> _configCategory >> _className; + private _configPath = ([configFile, campaignConfigFile, missionConfigFile] select _configRoot) >> _configCategory >> _className; private _dlcName = _configPath call EFUNC(common,getAddon); // If _pictureEntryName is empty, then this item has no picture (e.g. faces) @@ -57,7 +58,7 @@ _ctrlPanel lbSetPicture [_lbAdd, _itemPicture]; _ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)]; _ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]]; -if ((toLower _className) in GVAR(favorites)) then { +if ((toLowerANSI _className) in GVAR(favorites)) then { _ctrlPanel lbSetColor [_lbAdd, FAVORITES_COLOR]; _ctrlPanel lbSetSelectColor [_lbAdd, FAVORITES_COLOR]; }; diff --git a/addons/arsenal/functions/fnc_addRightPanelButton.sqf b/addons/arsenal/functions/fnc_addRightPanelButton.sqf index 6e1035a86a..a1bdb09d1d 100644 --- a/addons/arsenal/functions/fnc_addRightPanelButton.sqf +++ b/addons/arsenal/functions/fnc_addRightPanelButton.sqf @@ -66,7 +66,8 @@ _items = _items select { _x isKindOf ["CBA_MiscItem", _cfgWeapons] && {getNumber (_configItemInfo >> "type") in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} || {getNumber (_configItemInfo >> "type") in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} || {getText (_cfgWeapons >> _x >> "simulation") == "ItemMineDetector"} || - {getNumber (_cfgMagazines >> _x >> "ACE_isUnique") == 1} + {getNumber (_cfgMagazines >> _x >> "ACE_isUnique") == 1} || + {getNumber (_cfgMagazines >> _x >> "ACE_asItem") == 1} }; GVAR(customRightPanelButtons) set [_position, [_items apply {_x call EFUNC(common,getConfigName)}, _picture, _tooltip, _moveOnOverwrite]]; diff --git a/addons/arsenal/functions/fnc_attributeAddItems.sqf b/addons/arsenal/functions/fnc_attributeAddItems.sqf index 5457a920a2..612e894a15 100644 --- a/addons/arsenal/functions/fnc_attributeAddItems.sqf +++ b/addons/arsenal/functions/fnc_attributeAddItems.sqf @@ -46,6 +46,7 @@ private _cfgWeapons = configFile >> "CfgWeapons"; private _cfgMagazines = configFile >> "CfgMagazines"; private _cfgVehicles = configFile >> "CfgVehicles"; private _cfgGlasses = configFile >> "CfgGlasses"; +private _dlcName = ""; // Exit with current items (no specific category) if (_category == IDX_CAT_ALL) exitWith { @@ -73,6 +74,12 @@ if (_category == IDX_CAT_ALL) exitWith { _listbox lnbSetData [[_index, 1], _x]; _listbox lnbSetPicture [[_index, 0], getText (_config >> "picture")]; _listbox lnbSetTooltip [[_index, 0], _x]; + + _dlcName = _config call EFUNC(common,getAddon); + + if (_dlcName != "") then { + _listbox lnbSetPicture [[_index, 2], (modParams [_dlcName, ["logo"]]) param [0, ""]]; + }; }; } forEach _attributeItems; @@ -130,12 +137,20 @@ private _config = _cfgClass; _alpha = 0.5; }; - _index = _listbox lnbAddRow ["", _displayName, _symbol]; + _index = _listbox lnbAddRow ["", _displayName, "", _symbol]; _listbox lnbSetData [[_index, 1], _x]; _listbox lnbSetPicture [[_index, 0], getText (_config >> _x >> "picture")]; _listbox lnbSetTooltip [[_index, 0], _x]; _listbox lnbSetColor [[_index, 1], [1, 1, 1, _alpha]]; - _listbox lnbSetColor [[_index, 2], [1, 1, 1, _alpha]]; + _listbox lnbSetColor [[_index, 3], [1, 1, 1, _alpha]]; + + // Mod icon is in column 2 + _dlcName = (_config >> _x) call EFUNC(common,getAddon); + + if (_dlcName != "") then { + _listbox lnbSetPicture [[_index, 2], (modParams [_dlcName, ["logo"]]) param [0, ""]]; + _listbox lnbSetPictureColor [[_index, 2], [1, 1, 1, _alpha]]; + }; }; } forEach (keys _categoryItems); diff --git a/addons/arsenal/functions/fnc_attributeSelect.sqf b/addons/arsenal/functions/fnc_attributeSelect.sqf index 5aeb46c5a4..2f9df7775e 100644 --- a/addons/arsenal/functions/fnc_attributeSelect.sqf +++ b/addons/arsenal/functions/fnc_attributeSelect.sqf @@ -35,9 +35,10 @@ if (_addItem && {_itemIndex == -1}) exitWith { _attributeItems pushBack _itemClassname; // Change symbol and increase alpha - _listbox lnbSetText [[_currentRow, 2], [SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _attributeMode]; + _listbox lnbSetText [[_currentRow, 3], [SYMBOL_ITEM_VIRTUAL, SYMBOL_ITEM_REMOVE] select _attributeMode]; _listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 1]]; - _listbox lnbSetColor [[_currentRow, 2], [1, 1, 1, 1]]; + _listbox lnbSetPictureColor [[_currentRow, 2], [1, 1, 1, 1]]; // mod icon is in column 2 + _listbox lnbSetColor [[_currentRow, 3], [1, 1, 1, 1]]; }; // Remove item if in list @@ -45,7 +46,8 @@ if (!_addItem && {_itemIndex != -1}) exitWith { _attributeItems deleteAt _itemIndex; // Change symbol and reduce alpha - _listbox lnbSetText [[_currentRow, 2], SYMBOL_ITEM_NONE]; + _listbox lnbSetText [[_currentRow, 3], SYMBOL_ITEM_NONE]; _listbox lnbSetColor [[_currentRow, 1], [1, 1, 1, 0.5]]; - _listbox lnbSetColor [[_currentRow, 2], [1, 1, 1, 0.5]]; + _listbox lnbSetPictureColor [[_currentRow, 2], [1, 1, 1, 0.5]]; // mod icon is in column 2 + _listbox lnbSetColor [[_currentRow, 3], [1, 1, 1, 0.5]]; }; diff --git a/addons/arsenal/functions/fnc_baseAttachment.sqf b/addons/arsenal/functions/fnc_baseAttachment.sqf new file mode 100644 index 0000000000..968fd05d9b --- /dev/null +++ b/addons/arsenal/functions/fnc_baseAttachment.sqf @@ -0,0 +1,59 @@ +#include "..\script_component.hpp" +/* + * Author: Jonpas, LinkIsGrim + * Returns base attachment for CBA scripted attachment + * Adapted from CBA_fnc_switchableAttachments + * + * Arguments: + * 0: Attachment + * + * Return Value: + * Base attachment + * + * Example: + * "ACE_acc_pointer_green_IR" call ace_arsenal_fnc_baseAttachment + * + * Public: Yes + */ + +params [["_item", "", [""]]]; + +TRACE_1("looking up base attachment",_item); + +private _switchableClasses = []; + +private _cfgWeapons = configfile >> "CfgWeapons"; +private _config = _cfgWeapons >> _item; +_item = configName _config; + +// If the switch config entries are inherited, ignore +if ( + (inheritsFrom (_config >> "MRT_SwitchItemNextClass") isNotEqualTo _config) || + {inheritsFrom (_config >> "MRT_SwitchItemPrevClass") isNotEqualTo _config} +) exitWith { + _item // return +}; + +while { + _config = _cfgWeapons >> getText (_config >> "MRT_SwitchItemNextClass"); + isClass _config && {_switchableClasses pushBackUnique configName _config != -1} +} do {}; + +_config = _cfgWeapons >> _item; +private _backward = []; +while { + _config = _cfgWeapons >> getText (_config >> "MRT_SwitchItemPrevClass"); + isClass _config && {_backward pushBackUnique configName _config != -1} +} do {}; + +_switchableClasses append _backward; +_switchableClasses = _switchableClasses arrayIntersect _switchableClasses; + +{ + if (getNumber (_cfgWeapons >> _x >> "scope") == 2) exitWith { + TRACE_2("found class",_item,_x); + _item = _x; + }; +} forEach _switchableClasses; + +_item diff --git a/addons/arsenal/functions/fnc_baseOptic.sqf b/addons/arsenal/functions/fnc_baseOptic.sqf new file mode 100644 index 0000000000..c3eb5e811a --- /dev/null +++ b/addons/arsenal/functions/fnc_baseOptic.sqf @@ -0,0 +1,32 @@ +#include "..\script_component.hpp" +/* + * Author: Jonpas, LinkIsGrim + * Returns base optic for CBA scripted optics (PIP and 2D) + * + * Arguments: + * 0: Optic + * + * Return Value: + * Base optic + * + * Example: + * "CUP_optic_Elcan_SpecterDR_black_PIP" call ace_arsenal_fnc_baseOptic + * + * Public: Yes + */ + +params [["_optic", "", [""]]]; + +// PIP +private _baseClasses = configProperties [configFile >> "CBA_PIPItems", "getText _x == _optic"]; + +// Carry Handle +{ + _baseClasses append (configProperties [_x, "getText _x == _optic"]); +} forEach configProperties [configFile >> "CBA_CarryHandleTypes"]; + +if (_baseClasses isNotEqualTo []) then { + _optic = configName (_baseClasses select 0); +}; + +_optic diff --git a/addons/arsenal/functions/fnc_baseWeapon.sqf b/addons/arsenal/functions/fnc_baseWeapon.sqf index f166af94ce..abeb0e0ab9 100644 --- a/addons/arsenal/functions/fnc_baseWeapon.sqf +++ b/addons/arsenal/functions/fnc_baseWeapon.sqf @@ -19,7 +19,7 @@ params [["_weapon", "", [""]]]; // Check if item is cached -(uiNamespace getVariable QGVAR(baseWeaponNameCache)) getOrDefaultCall [toLower _weapon, { +(uiNamespace getVariable QGVAR(baseWeaponNameCache)) getOrDefaultCall [toLowerANSI _weapon, { private _cfgWeapons = configfile >> "CfgWeapons"; private _config = _cfgWeapons >> _weapon; diff --git a/addons/arsenal/functions/fnc_compileActions.sqf b/addons/arsenal/functions/fnc_compileActions.sqf index cec152bd6a..9001a5558a 100644 --- a/addons/arsenal/functions/fnc_compileActions.sqf +++ b/addons/arsenal/functions/fnc_compileActions.sqf @@ -1,4 +1,5 @@ #include "..\script_component.hpp" +#include "..\defines.hpp" /* * Author: Brett Mayson * Create the internal actions arrays when needed for the first time. diff --git a/addons/arsenal/functions/fnc_fillLeftPanel.sqf b/addons/arsenal/functions/fnc_fillLeftPanel.sqf index 26f872dfdf..1eb98d29ec 100644 --- a/addons/arsenal/functions/fnc_fillLeftPanel.sqf +++ b/addons/arsenal/functions/fnc_fillLeftPanel.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" #include "..\defines.hpp" /* - * Author: Alganthe, johnb43 + * Author: Alganthe, johnb43, LinkIsGrim * Fills left panel. * * Arguments: @@ -17,21 +17,28 @@ params ["_display", "_control", ["_animate", true]]; +private _ctrlIDC = ctrlIDC _control; +private _ctrlPanel = _display displayCtrl IDC_leftTabContent; +private _idxVirt = GVAR(idxMap) getOrDefault [_ctrlIDC, -1, true]; + // Fade old control background if (!isNil QGVAR(currentLeftPanel)) then { private _previousCtrlBackground = _display displayCtrl (GVAR(currentLeftPanel) - 1); _previousCtrlBackground ctrlSetFade 1; _previousCtrlBackground ctrlCommit ([0, FADE_DELAY] select _animate); + + // When switching tabs, clear searchbox + if (GVAR(currentLeftPanel) != _ctrlIDC) then { + (_display displayCtrl IDC_leftSearchbar) ctrlSetText ""; + (_display displayCtrl IDC_rightSearchbar) ctrlSetText ""; + }; }; // Show new control background -private _ctrlIDC = ctrlIDC _control; private _ctrlBackground = _display displayCtrl (_ctrlIDC - 1); _ctrlBackground ctrlSetFade 0; _ctrlBackground ctrlCommit ([0, FADE_DELAY] select _animate); -private _ctrlPanel = _display displayCtrl IDC_leftTabContent; - // Force a "refresh" animation of the panel if (_animate) then { _ctrlPanel ctrlSetFade 1; @@ -41,212 +48,82 @@ if (_animate) then { }; _ctrlPanel lbSetCurSel -1; +// Purge old data +lbClear _ctrlPanel; -// Handle icons and filling -private _selectedItem = switch (true) do { - // Primary weapons, secondary weapons, handgun weapons - case (_ctrlIDC in [IDC_buttonPrimaryWeapon, IDC_buttonHandgun, IDC_buttonSecondaryWeapon]): { - // Purge old data - lbClear _ctrlPanel; - - // Add "Empty" entry - private _addEmpty = _ctrlPanel lbAdd format [" <%1>", localize "str_empty"]; - _ctrlPanel lbSetValue [_addEmpty, -1]; - - // Add selected tab's weapons - private _index = [IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find _ctrlIDC; - - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys ((GVAR(virtualItems) get IDX_VIRT_WEAPONS) get _index)); - - GVAR(currentItems) select _index - }; - // Uniforms, vests, backpacks - case (_ctrlIDC in [IDC_buttonUniform, IDC_buttonVest, IDC_buttonBackpack]): { - // Purge old data - lbClear _ctrlPanel; - - // Add "Empty" entry - private _addEmpty = _ctrlPanel lbAdd format [" <%1>", localize "str_empty"]; - _ctrlPanel lbSetValue [_addEmpty, -1]; - - switch (_ctrlIDC) do { - // Add uniforms - case IDC_buttonUniform: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_UNIFORM)); - - GVAR(currentItems) select IDX_CURR_UNIFORM - }; - // Add vests - case IDC_buttonVest: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_VEST)); - - GVAR(currentItems) select IDX_CURR_VEST - }; - // Add backpacks - case IDC_buttonBackpack: { - { - ["CfgVehicles", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_BACKPACK)); - - GVAR(currentItems) select IDX_CURR_BACKPACK - }; - }; - }; - // Other - default { - // Don't reset right panel selection if left tab is binos - if (_ctrlIDC != IDC_buttonBinoculars) then { - GVAR(currentRightPanel) = nil; - }; - - lbClear _ctrlPanel; - - // For every left tab except faces and voices, add "Empty" entry - if !(_ctrlIDC in [IDC_buttonFace, IDC_buttonVoice]) then { - private _addEmpty = _ctrlPanel lbAdd format [" <%1>", localize "str_empty"]; - _ctrlPanel lbSetValue [_addEmpty, -1]; - }; - - switch (_ctrlIDC) do { - // Headgear - case IDC_buttonHeadgear: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_HEADGEAR)); - - GVAR(currentItems) select IDX_CURR_HEADGEAR - }; - // Facewear - case IDC_buttonGoggles: { - { - ["CfgGlasses", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_GOGGLES)); - - GVAR(currentItems) select IDX_CURR_GOGGLES - }; - // NVGs - case IDC_buttonNVG: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_NVG)); - - GVAR(currentItems) select IDX_CURR_NVG - }; - // Binoculars - case IDC_buttonBinoculars: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_BINO)); - - GVAR(currentItems) select IDX_CURR_BINO - }; - // Maps - case IDC_buttonMap: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_MAP)); - - GVAR(currentItems) select IDX_CURR_MAP - }; - // Compasses - case IDC_buttonCompass: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_COMPASS)); - - GVAR(currentItems) select IDX_CURR_COMPASS - }; - // Radios - case IDC_buttonRadio: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_RADIO)); - - GVAR(currentItems) select IDX_CURR_RADIO - }; - // Watches - case IDC_buttonWatch: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_WATCH)); - - GVAR(currentItems) select IDX_CURR_WATCH - }; - // GPS and UAV Terminals - case IDC_buttonGPS: { - { - ["CfgWeapons", _x, _ctrlPanel] call FUNC(addListBoxItem); - } forEach (keys (GVAR(virtualItems) get IDX_VIRT_COMMS)); - - GVAR(currentItems) select IDX_CURR_COMMS - }; - // Faces - case IDC_buttonFace: { - private _lbAdd = -1; - - { - _y params ["_displayName", "_modPicture"]; - - _lbAdd = _ctrlPanel lbAdd _displayName; - _ctrlPanel lbSetData [_lbAdd, _x]; - _ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _x]]; - _ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)]; - } forEach (uiNamespace getVariable QGVAR(faceCache)); - - GVAR(currentFace) - }; - // Voices - case IDC_buttonVoice: { - { - ["CfgVoice", _x, _ctrlPanel, "icon"] call FUNC(addListBoxItem); - } forEach (uiNamespace getVariable QGVAR(voiceCache)); - - GVAR(currentVoice) - }; - // Insignia - case IDC_buttonInsignia: { - // Insignia from config - { - ["CfgUnitInsignia", _x, _ctrlPanel, "texture"] call FUNC(addListBoxItem); - } forEach (uiNamespace getVariable QGVAR(insigniaCache)); - - private _displayName = ""; - private _className = ""; - private _lbAdd = -1; - - // Insignia from mission file - { - _className = configName _x; - _displayName = getText (_x >> "displayName"); - _lbAdd = _ctrlPanel lbAdd _displayName; - - _ctrlPanel lbSetData [_lbAdd, _className]; - _ctrlPanel lbSetPicture [_lbAdd, getText (_x >> "texture")]; - _ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]]; - } forEach ("(if (isNumber (_x >> 'scope')) then {getNumber (_x >> 'scope')} else {2}) == 2" configClasses (missionConfigFile >> "CfgUnitInsignia")); - - GVAR(currentInsignia) - }; - // Unknown - default {""}; - }; - }; +// For every left tab except faces and voices, add "Empty" entry +if !(_ctrlIDC in [IDC_buttonFace, IDC_buttonVoice]) then { + private _addEmpty = _ctrlPanel lbAdd format [" <%1>", localize "str_empty"]; + _ctrlPanel lbSetValue [_addEmpty, -1]; }; -// When switching tabs, clear searchbox -if (GVAR(currentLeftPanel) != _ctrlIDC) then { - (_display displayCtrl IDC_leftSearchbar) ctrlSetText ""; - (_display displayCtrl IDC_rightSearchbar) ctrlSetText ""; +// Don't reset the current right panel for weapons, binos and containers +if !(_idxVirt in [IDX_VIRT_PRIMARY_WEAPONS, IDX_VIRT_SECONDARY_WEAPONS, IDX_VIRT_HANDGUN_WEAPONS, IDX_VIRT_BINO, IDX_VIRT_UNIFORM, IDX_VIRT_VEST, IDX_VIRT_BACKPACK]) then { + GVAR(currentRightPanel) = nil; +}; +GVAR(currentLeftPanel) = _ctrlIDC; + +// Add items to the listbox +private _selectedItem = if (_idxVirt != -1) then { // Items + private _configParent = switch (_idxVirt) do { + case IDX_VIRT_GOGGLES: {"CfgGlasses"}; + case IDX_VIRT_BACKPACK: {"CfgVehicles"}; + default {"CfgWeapons"}; + }; + + private _items = if (_idxVirt < IDX_VIRT_HEADGEAR) then { + keys ((GVAR(virtualItems) get IDX_VIRT_WEAPONS) get _idxVirt) + } else { + keys (GVAR(virtualItems) get _idxVirt) + }; + + { + [_configParent, _x, _ctrlPanel] call FUNC(addListBoxItem); + } forEach _items; + + GVAR(currentItems) select _idxVirt +} else { // Special cases + switch (_ctrlIDC) do { + // Faces + case IDC_buttonFace: { + private _lbAdd = -1; // micro-optimization + // Faces need to be added like this because their config path is + // configFile >> "CfgFaces" >> face category >> className + { + _y params ["_displayName", "_modPicture"]; + _lbAdd = _ctrlPanel lbAdd _displayName; + _ctrlPanel lbSetData [_lbAdd, _x]; + _ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _x]]; + _ctrlPanel lbSetPictureRight [_lbAdd, ["", _modPicture] select GVAR(enableModIcons)]; + } forEach GVAR(faceCache); // HashMap, not array + + GVAR(currentFace) + }; + // Voices + case IDC_buttonVoice: { + { + ["CfgVoice", _x, _ctrlPanel, "icon"] call FUNC(addListBoxItem); + } forEach (keys GVAR(voiceCache)); + + GVAR(currentVoice) + }; + // Insignia + case IDC_buttonInsignia: { + { + ["CfgUnitInsignia", _x, _ctrlPanel, "texture", _y] call FUNC(addListBoxItem); + } forEach GVAR(insigniaCache); + + GVAR(currentInsignia) + }; + // Unknown + default { + WARNING_1("Unknown arsenal left panel with IDC %1, update ace_arsenal_idxMap and relevant macros if adding a new tab",_ctrlIDC); + "" + }; + }; }; // Trigger event -GVAR(currentLeftPanel) = _ctrlIDC; [QGVAR(leftPanelFilled), [_display, _ctrlIDC, GVAR(currentRightPanel)]] call CBA_fnc_localEvent; // Sort diff --git a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf index 7d5152dfdd..6174193b73 100644 --- a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf +++ b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf @@ -1,12 +1,16 @@ #include "..\script_component.hpp" #include "..\defines.hpp" /* - * Author: Alganthe, johnb43 - * Fill loadouts list. + * Author: Alganthe, johnb43, LinkIsGrim + * Fill loadouts list over multiple frames. LOADOUTS_PER_FRAME macro does what it says on the tin. + * Should only ever be called by display load (with optional params as default) and by itself. + * Listen to ace_arsenal_loadoutsListFilled event if you need to iterate over the loadouts list. * * Arguments: * 0: Loadouts display * 1: Tab control + * 2: Current frame filling loadouts list (default: 0) + * 3: Frames necessary to fill loadouts list (default: -1) * * Return Value: * None @@ -14,29 +18,46 @@ * Public: No */ -params ["_display", "_control"]; +// Can just be modified directly, no further setup needed +#define LOADOUTS_PER_FRAME 10 -(_display displayCtrl IDC_textEditBox) ctrlSetText ""; +params ["_display", "_control", ["_currentFrame", 0], ["_framesToFill", -1]]; + +if (isNull _display) exitWith { + TRACE_2("display closed, aborting",_currentFrame,_framesToFill); +}; private _contentPanelCtrl = _display displayCtrl IDC_contentPanel; +if (_currentFrame == 0) then { + (_display displayCtrl IDC_textEditBox) ctrlSetText ""; -// Force a "refresh" animation of the panel -_contentPanelCtrl ctrlSetFade 1; -_contentPanelCtrl ctrlCommit 0; -_contentPanelCtrl ctrlSetFade 0; -_contentPanelCtrl ctrlCommit FADE_DELAY; + // Force a "refresh" animation of the panel + _contentPanelCtrl ctrlSetFade 1; + _contentPanelCtrl ctrlCommit 0; + _contentPanelCtrl ctrlSetFade 0; + _contentPanelCtrl ctrlCommit FADE_DELAY; -_contentPanelCtrl lnbSetCurSelRow -1; -lnbClear _contentPanelCtrl; + _contentPanelCtrl lnbSetCurSelRow -1; + lnbClear _contentPanelCtrl; +}; private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars); -private _cfgWeapons = configFile >> "CfgWeapons"; +private _cfgWeapons = configFile >> "CfgWeapons"; // Used by ADD_LOADOUTS_LIST_PICTURES macro, do not remove private _newRow = -1; if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { private _loadoutNameAndTab = ""; private _loadoutCachedInfo = ""; private _sharingEnabled = GVAR(allowSharedLoadouts) && {isMultiplayer}; + private _loadouts = [ + profileNamespace getVariable [QGVAR(saved_loadouts), []], + GVAR(defaultLoadoutsList) + ] select (ctrlIDC _control == IDC_buttonDefaultLoadouts); + if (_currentFrame == 0) then { + _framesToFill = floor ((count _loadouts) / LOADOUTS_PER_FRAME); + TRACE_2("filling loadouts list",_currentFrame,_framesToFill); + _this set [3, _framesToFill]; + }; // Add all loadouts to loadout list { @@ -50,15 +71,16 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { _loadoutCachedInfo = [_loadoutData] call FUNC(verifyLoadout); _contentPanelCtrl setVariable [_loadoutNameAndTab, _loadoutCachedInfo]; - _loadoutCachedInfo params ["", "_nullItemsAmount", "_unavailableItemsAmount", "_nullItemsList", "_unavailableItemsList"]; + _loadoutCachedInfo params ["", "_nullItemsList", "_unavailableItemsList", "_missingExtendedInfo"]; // Log missing / nil items to RPT (only once per arsenal session) - if (GVAR(EnableRPTLog) && {(_nullItemsAmount > 0) || {_unavailableItemsAmount > 0}}) then { + if (GVAR(EnableRPTLog) && {(_nullItemsList isNotEqualTo []) || {_unavailableItemsList isNotEqualTo [] || {_missingExtendedInfo isNotEqualTo []}}}) then { private _printComponent = "ACE_Arsenal - Loadout:"; private _printNullItemsList = ["Missing items:", str _nullItemsList] joinString " "; private _printUnavailableItemsList = ["Unavailable items:", str _unavailableItemsList] joinString " "; + private _printMissingExtendedInfo = ["Missing extended loadout:", str _missingExtendedInfo] joinString " "; - diag_log text (format ["%1%5 %2%5 %3%5 %4", _printComponent, "Name: " + _loadoutName, _printNullItemsList, _printUnavailableItemsList, endl]); + diag_log text (format ["%1%6 %2%6 %3%6 %4%6 %5", _printComponent, "Name: " + _loadoutName, _printNullItemsList, _printUnavailableItemsList, _printMissingExtendedInfo, endl]); }; }; @@ -69,18 +91,18 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { _contentPanelCtrl lnbSetColumnsPos [0, 0.05, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90]; }; - _loadoutCachedInfo params ["_extendedLoadout", "_nullItemsAmount", "_unavailableItemsAmount"]; - _extendedLoadout params ["_loadout"]; + _loadoutCachedInfo params ["_extendedLoadout", "_nullItemsList", "_unavailableItemsList"]; + _extendedLoadout params ["_loadout"]; // Used by ADD_LOADOUTS_LIST_PICTURES macro, do not remove _newRow = _contentPanelCtrl lnbAddRow ["", _loadoutName]; ADD_LOADOUTS_LIST_PICTURES // Change color on loadout lines that have items that aren't available or don't exist - if (_nullItemsAmount > 0) then { + if (_nullItemsList isNotEqualTo []) then { _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; // Red } else { - if (_unavailableItemsAmount > 0) then { + if (_unavailableItemsList isNotEqualTo []) then { _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; // Gray }; }; @@ -90,10 +112,16 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { _contentPanelCtrl lnbSetPicture [[_newRow, 0], QPATHTOF(data\iconPublic.paa)]; _contentPanelCtrl lnbSetValue [[_newRow, 0], 1]; }; - } forEach ([profileNamespace getVariable [QGVAR(saved_loadouts), []], GVAR(defaultLoadoutsList)] select (ctrlIDC _control == IDC_buttonDefaultLoadouts)); + } forEach (_loadouts select [_currentFrame * LOADOUTS_PER_FRAME, [LOADOUTS_PER_FRAME, count _loadouts] select is3DEN]); } else { private _allPlayerNames = allPlayers apply {name _x}; + private _loadouts = _sharedLoadoutsVars apply {GVAR(sharedLoadoutsNamespace) getVariable _x}; private _loadoutVar = ""; + if (_currentFrame == 0) then { + _framesToFill = floor ((count _loadouts) / LOADOUTS_PER_FRAME); + TRACE_2("filling loadouts list",_currentFrame,_framesToFill); + _this set [3, _framesToFill]; + }; { _x params ["_playerName", "_loadoutName", "_loadoutData"]; @@ -107,8 +135,8 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { [QGVAR(loadoutUnshared), [_contentPanelCtrl, profileName, _loadoutName]] call CBA_fnc_remoteEvent; } else { - ([_loadoutData] call FUNC(verifyLoadout)) params ["_extendedLoadout", "_nullItemsAmount", "_unavailableItemsAmount"]; - _extendedLoadout params ["_loadout"]; + ([_loadoutData] call FUNC(verifyLoadout)) params ["_extendedLoadout", "_nullItemsList", "_unavailableItemsList"]; + _extendedLoadout params ["_loadout"]; // Used by ADD_LOADOUTS_LIST_PICTURES macro, do not remove _contentPanelCtrl lnbSetColumnsPos [0, 0.15, 0.40, 0.50, 0.60, 0.70, 0.75, 0.80, 0.85, 0.90]; _newRow = _contentPanelCtrl lnbAddRow [_playerName, _loadoutName]; @@ -118,17 +146,23 @@ if (GVAR(currentLoadoutsTab) != IDC_buttonSharedLoadouts) then { _contentPanelCtrl lnbSetData [[_newRow, 1], _loadoutVar]; // Change color on loadout lines that have items that aren't available or don't exist - if (_nullItemsAmount > 0) then { + if (_nullItemsList isNotEqualTo []) then { _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 0, 0, 0.8]]; // Red } else { - if (_unavailableItemsAmount > 0) then { + if (_unavailableItemsList isNotEqualTo []) then { _contentPanelCtrl lnbSetColor [[_newRow, 1], [1, 1, 1, 0.25]]; // Gray }; }; }; - } forEach (_sharedLoadoutsVars apply {GVAR(sharedLoadoutsNamespace) getVariable _x}); + } forEach (_loadouts select [_currentFrame * LOADOUTS_PER_FRAME, [LOADOUTS_PER_FRAME, count _loadouts] select is3DEN]); }; +if (!is3DEN && _currentFrame != _framesToFill) exitWith { + _this set [2, _currentFrame + 1]; + [FUNC(fillLoadoutsList), _this] call CBA_fnc_execNextFrame; +}; +TRACE_3("finished",_currentFrame,_framesToFill,lnbSize _contentPanelCtrl); + [QGVAR(loadoutsListFilled), [_display, _control]] call CBA_fnc_localEvent; // Sort loadouts alphabetically diff --git a/addons/arsenal/functions/fnc_fillRightPanel.sqf b/addons/arsenal/functions/fnc_fillRightPanel.sqf index 09f986708d..d8dc7e2403 100644 --- a/addons/arsenal/functions/fnc_fillRightPanel.sqf +++ b/addons/arsenal/functions/fnc_fillRightPanel.sqf @@ -53,7 +53,7 @@ if (GVAR(favoritesOnly)) then { private _fnc_fillRightContainer = { params ["_configCategory", "_className", ["_isUnique", false, [false]], ["_unknownOrigin", false, [false]]]; - if (GVAR(favoritesOnly) && {!(_className in _currentCargo)} && {!((toLower _className) in GVAR(favorites))}) exitWith {}; + if (GVAR(favoritesOnly) && {!(_className in _currentCargo)} && {!((toLowerANSI _className) in GVAR(favorites))}) exitWith {}; // If item is not in the arsenal, it must be unique if (!_isUnique && {!(_className in GVAR(virtualItemsFlat))}) then { @@ -89,7 +89,7 @@ private _fnc_fillRightContainer = { _ctrlPanel lnbSetPicture [[_lbAdd, 0], _picture]; _ctrlPanel lnbSetValue [[_lbAdd, 2], parseNumber _isUnique]; _ctrlPanel lnbSetTooltip [[_lbAdd, 0], format ["%1\n%2", _displayName, _className]]; - if ((toLower _className) in GVAR(favorites)) then { + if ((toLowerANSI _className) in GVAR(favorites)) then { _ctrlPanel lnbSetColor [[_lbAdd, 1], FAVORITES_COLOR]; _ctrlPanel lnbSetColorRight [[_lbAdd, 1], FAVORITES_COLOR]; }; diff --git a/addons/arsenal/functions/fnc_handleActions.sqf b/addons/arsenal/functions/fnc_handleActions.sqf index f28e448256..03c25f77df 100644 --- a/addons/arsenal/functions/fnc_handleActions.sqf +++ b/addons/arsenal/functions/fnc_handleActions.sqf @@ -47,7 +47,7 @@ private _groups = (GVAR(actionList) select _panel) select { private _show = _groups isNotEqualTo []; private _actionsBoxCtrl = _display displayCtrl IDC_actionsBox; _actionsBoxCtrl ctrlShow _show; -_actionsBoxCtrl ctrlCommit 0.15; +_actionsBoxCtrl ctrlCommit FADE_DELAY; if (!_show) exitWith {}; @@ -77,7 +77,6 @@ private _items = _group select 3 select { }; _actionsCurrentPageCtrl ctrlSetText (_group select 1); -_actionsCurrentPageCtrl ctrlSetFade 0; _actionsCurrentPageCtrl ctrlShow true; _actionsCurrentPageCtrl ctrlCommit 0; @@ -85,36 +84,22 @@ private _activeCtrls = []; { _x params ["", "_type", "_label", "_statement"]; - private _idc = IDC_actionsText1 + _forEachIndex * 2; - private _actionTextCtrl = _display displayCtrl _idc; - private _actionButtonCtrl = _display displayCtrl (_idc + 1); + private _idc = IDC_actionsText1 + _type + _forEachIndex * 2; + private _actionCtrl = _display displayCtrl _idc; switch (_type) do { case ACTION_TYPE_BUTTON: { - _actionButtonCtrl ctrlRemoveAllEventHandlers "ButtonClick"; - _actionButtonCtrl ctrlAddEventHandler ["ButtonClick", { + _actionCtrl ctrlRemoveAllEventHandlers "ButtonClick"; + _actionCtrl ctrlAddEventHandler ["ButtonClick", { if (is3DEN) exitWith {[true] call FUNC(refresh)}; [{ [true] call FUNC(refresh); }] call CBA_fnc_execNextFrame; }]; - if (_activeCtrls isNotEqualTo []) then { - (ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"]; - _actionButtonCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H); - } else { - _actionButtonCtrl ctrlSetPositionY (6 * GRID_H); - }; - - _actionButtonCtrl ctrlAddEventHandler ["ButtonClick", _statement]; - _actionButtonCtrl ctrlSetText _label; - _actionButtonCtrl ctrlSetFade 0; - _actionButtonCtrl ctrlEnable true; - _actionButtonCtrl ctrlCommit 0; - _actionTextCtrl ctrlSetFade 1; - _actionTextCtrl ctrlEnable false; - _actionTextCtrl ctrlCommit 0; - _activeCtrls pushBack _actionButtonCtrl; + _actionCtrl ctrlAddEventHandler ["ButtonClick", _statement]; + _actionCtrl ctrlSetText _label; + _actionCtrl ctrlEnable true; }; case ACTION_TYPE_TEXT: { private _text = call _statement; @@ -125,47 +110,35 @@ private _activeCtrls = []; if (_text isEqualType []) then { _text = _text joinString endl; }; - if (_activeCtrls isNotEqualTo []) then { - (ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"]; - _actionTextCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H); - } else { - _actionTextCtrl ctrlSetPositionY (5 * GRID_H); - }; - _actionTextCtrl ctrlSetText _text; - _actionTextCtrl ctrlSetPositionH (ctrlTextHeight _actionTextCtrl); - _actionTextCtrl ctrlSetFade 0; - _actionTextCtrl ctrlEnable false; - _actionTextCtrl ctrlCommit 0; - _actionButtonCtrl ctrlSetFade 1; - _actionButtonCtrl ctrlEnable false; - _actionButtonCtrl ctrlCommit 0; - _activeCtrls pushBack _actionTextCtrl; - }; - default { - _actionTextCtrl ctrlSetFade 1; - _actionTextCtrl ctrlCommit 0; - _actionButtonCtrl ctrlSetFade 1; - _actionButtonCtrl ctrlEnable false; - _actionButtonCtrl ctrlCommit 0; + _actionCtrl ctrlSetText _text; + _actionCtrl ctrlSetPositionH (ctrlTextHeight _actionCtrl); + _actionCtrl ctrlEnable false; }; }; + + if (_activeCtrls isNotEqualTo []) then { + (ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"]; + _actionCtrl ctrlSetPositionY (_lastPosY + _lastPosH + GRID_H); + } else { + _actionCtrl ctrlSetPositionY ((5 + _type) * GRID_H); + }; + + _actionCtrl ctrlShow true; + _actionCtrl ctrlCommit 0; + _activeCtrls pushBack _actionCtrl; } forEach _items; -private _actionCount = count _items; - { - private _idc = IDC_actionsText1 + _x * 2; - private _actionTextCtrl = _display displayCtrl _idc; - private _actionButtonCtrl = _display displayCtrl (_idc + 1); + private _idc = ctrlIDC _x; + if (_idc < IDC_actionsText1 || _idc > IDC_actionsButton5) then {continue}; - _actionTextCtrl ctrlSetFade 1; - _actionTextCtrl ctrlCommit 0; - _actionButtonCtrl ctrlSetFade 1; - _actionButtonCtrl ctrlCommit 0; -} forEach ([0, 1, 2, 3, 4] select [_actionCount, 5]); + _x ctrlShow false; + _x ctrlEnable false; + _x ctrlSetPositionY 0; + _x ctrlCommit 0; +} forEach ((allControls _actionsBoxCtrl) select {!(_x in _activeCtrls)}); -private _pos = ctrlPosition _actionsBoxCtrl; (ctrlPosition (_activeCtrls select -1)) params ["", "_lastPosY", "", "_lastPosH"]; private _actionsBoxHeight = _lastPosY + _lastPosH + GRID_H; _actionsBoxCtrl ctrlSetPositionH _actionsBoxHeight; diff --git a/addons/arsenal/functions/fnc_onArsenalClose.sqf b/addons/arsenal/functions/fnc_onArsenalClose.sqf index 2cce9b13ee..f2316bc9d5 100644 --- a/addons/arsenal/functions/fnc_onArsenalClose.sqf +++ b/addons/arsenal/functions/fnc_onArsenalClose.sqf @@ -78,10 +78,10 @@ if (!isNull curatorCamera) then { // Make face and voice selection JIP compatible; 3DEN doesn't need this though if (isMultiplayer && {!is3DEN}) then { - private _id = [QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(centerFace_) + netId GVAR(center)] call CBA_fnc_globalEventJIP; + private _id = [QGVAR(broadcastFace), [GVAR(center), GVAR(currentFace)], QGVAR(centerFace_) + hashValue GVAR(center)] call CBA_fnc_globalEventJIP; [_id, GVAR(center)] call CBA_fnc_removeGlobalEventJIP; - _id = [QGVAR(broadcastVoice), [GVAR(center), GVAR(currentVoice)], QGVAR(centerVoice_) + netId GVAR(center)] call CBA_fnc_globalEventJIP; + _id = [QGVAR(broadcastVoice), [GVAR(center), GVAR(currentVoice)], QGVAR(centerVoice_) + hashValue GVAR(center)] call CBA_fnc_globalEventJIP; [_id, GVAR(center)] call CBA_fnc_removeGlobalEventJIP; }; diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index 9077a13a7a..f307c932b1 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -68,7 +68,7 @@ if (isNil QGVAR(virtualItems)) then { GVAR(virtualItemsFlatAll) = +GVAR(virtualItemsFlat); GVAR(currentFace) = face GVAR(center); -GVAR(currentVoice) = speaker GVAR(center); +GVAR(currentVoice) = (speaker GVAR(center)) call EFUNC(common,getConfigName); GVAR(currentInsignia) = GVAR(center) call BIS_fnc_getUnitInsignia; GVAR(currentAction) = "Stand"; diff --git a/addons/arsenal/functions/fnc_onPanelDblClick.sqf b/addons/arsenal/functions/fnc_onPanelDblClick.sqf index 032d87534b..07287d74ce 100644 --- a/addons/arsenal/functions/fnc_onPanelDblClick.sqf +++ b/addons/arsenal/functions/fnc_onPanelDblClick.sqf @@ -27,9 +27,9 @@ private _favorited = false; // Favorites/blacklist will always be lowercase to handle configCase changes private _item = ""; if (_isLnB) then { - _item = toLower (_control lnbData [_curSel, 0]); + _item = toLowerANSI (_control lnbData [_curSel, 0]); } else { - _item = toLower (_control lbData _curSel); + _item = toLowerANSI (_control lbData _curSel); }; if (_item in GVAR(favorites)) then { diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf index 3d356fc207..5bf08245c8 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -683,14 +683,19 @@ switch (GVAR(currentLeftPanel)) do { TOGGLE_RIGHT_PANEL_HIDE - private _unitInsigniaConfig = configFile >> "CfgUnitInsignia" >> _item; + // Check for correct config: First mission, then campaign and finally regular config + private _itemCfg = missionConfigFile >> "CfgUnitInsignia" >> _item; + + if (isNull _itemCfg) then { + _itemCfg = campaignConfigFile >> "CfgUnitInsignia" >> _item; + }; + + if (isNull _itemCfg) then { + _itemCfg = configFile >> "CfgUnitInsignia" >> _item; + }; // Display new items's info on the bottom right - if (isNull _unitInsigniaConfig) then { - [_display, _control, _curSel, missionConfigFile >> "CfgUnitInsignia" >> _item] call FUNC(itemInfo); - } else { - [_display, _control, _curSel, _unitInsigniaConfig] call FUNC(itemInfo); - }; + [_display, _control, _curSel, _itemCfg] call FUNC(itemInfo); }; }; diff --git a/addons/arsenal/functions/fnc_removeSort.sqf b/addons/arsenal/functions/fnc_removeSort.sqf index 3957257a6d..a5e9fb1d77 100644 --- a/addons/arsenal/functions/fnc_removeSort.sqf +++ b/addons/arsenal/functions/fnc_removeSort.sqf @@ -31,7 +31,7 @@ private _tabToChange = []; _stringCount = count _currentID; // Make sure to keep at least 1 sort per category, so make default sort not deletable - if ("ace_alphabetically" in toLower (_currentID select [0, _stringCount - 3])) then { + if ("ace_alphabetically" in toLowerANSI (_currentID select [0, _stringCount - 3])) then { continue; }; diff --git a/addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf b/addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf index cbbe02666e..061180beaa 100644 --- a/addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf +++ b/addons/arsenal/functions/fnc_replaceUniqueItemsLoadout.sqf @@ -25,7 +25,6 @@ if (count _loadout == 2) then { if (count _loadout != 10) exitWith {[]}; -private _weapon = ""; private _weaponsInfo = []; private _uniqueBaseCfgText = ""; private _cfgWeapons = configFile >> "CfgWeapons"; @@ -43,7 +42,7 @@ private _cfgVehicles = configFile >> "CfgVehicles"; // Check weapon & weapon attachments { - // Magazines + // Magazines in weapons have 2 entries: Name and ammo count if (_forEachIndex in [4, 5]) then { _x params [["_magazine", ""], "_count"]; @@ -69,23 +68,69 @@ private _cfgVehicles = configFile >> "CfgVehicles"; _x params [["_containerClass", ""], ["_items", []]]; if (_containerClass != "") then { - _uniqueBaseCfgText = (getText ([_cfgWeapons, _cfgVehicles] select (_forEachIndex == IDX_LOADOUT_BACKPACK) >> _containerClass >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); + if (_forEachIndex == IDX_LOADOUT_BACKPACK) then { + // Check for non-preset first + _uniqueBaseCfgText = [_containerClass, "CfgVehicles"] call CBA_fnc_getNonPresetClass; - if (_uniqueBaseCfgText != "") then { - (_x select 0) set [0, _uniqueBaseCfgText]; + if (_uniqueBaseCfgText != "") then { + _containerClass = _uniqueBaseCfgText; + }; + + // Check if non-preset backpack has a unique base + _uniqueBaseCfgText = (getText (_cfgVehicles >> _containerClass >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); + + if (_uniqueBaseCfgText != "") then { + _containerClass = _uniqueBaseCfgText; + }; + + _x set [0, _containerClass]; + } else { + _uniqueBaseCfgText = (getText (_cfgWeapons >> _containerClass >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); + + if (_uniqueBaseCfgText != "") then { + _x set [0, _uniqueBaseCfgText]; + }; }; // Check if container has items that need replacing with a defined base { switch (true) do { // Containers have 2 entries: Name and isBackpack - case (_x isEqualTypeArray ["", false]); + case (_x isEqualTypeArray ["", false]): { + _x params ["_containerClass", "_isBackpack"]; + + if (_containerClass != "") then { + if (_isBackpack) then { + // Check for non-preset first + _uniqueBaseCfgText = [_containerClass, "CfgVehicles"] call CBA_fnc_getNonPresetClass; + + if (_uniqueBaseCfgText != "") then { + _containerClass = _uniqueBaseCfgText; + }; + + // Check if non-preset backpack has a unique base + _uniqueBaseCfgText = (getText (_cfgVehicles >> _containerClass >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); + + if (_uniqueBaseCfgText != "") then { + _containerClass = _uniqueBaseCfgText; + }; + + _x set [0, _containerClass]; + } else { + _uniqueBaseCfgText = (getText (_cfgWeapons >> _containerClass >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); + + if (_uniqueBaseCfgText != "") then { + _x set [0, _uniqueBaseCfgText]; + }; + }; + }; + }; // Misc. items have 2 entries: Name and amount case (_x isEqualTypeArray ["", 0]): { - _x params ["_item", "_arg"]; + _x params ["_item"]; if (_item != "") then { - _uniqueBaseCfgText = (getText ([_cfgWeapons, _cfgVehicles] select ((_arg isEqualType false) && {_arg}) >> _item >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); + _uniqueBaseCfgText = (getText (_cfgWeapons >> _item >> QGVAR(uniqueBase))) call EFUNC(common,getConfigName); if (_uniqueBaseCfgText != "") then { _x set [0, _uniqueBaseCfgText]; @@ -94,7 +139,7 @@ private _cfgVehicles = configFile >> "CfgVehicles"; }; // Weapons have 2 entries: Weapon info array and amount case (_x isEqualTypeArray [[], 0]): { - _weaponsInfo = _x select 0; + _x params ["_weaponsInfo"]; // Check weapon & weapon attachments { diff --git a/addons/arsenal/functions/fnc_scanConfig.sqf b/addons/arsenal/functions/fnc_scanConfig.sqf index 8f11b6fc47..fef97e8bd8 100644 --- a/addons/arsenal/functions/fnc_scanConfig.sqf +++ b/addons/arsenal/functions/fnc_scanConfig.sqf @@ -160,7 +160,7 @@ private _magazineMiscItems = createHashMap; { _magazineMiscItems set [configName _x, nil]; -} forEach ((toString {getNumber (_x >> "ACE_isUnique") == 1}) configClasses _cfgMagazines); +} forEach ((toString {getNumber (_x >> "ACE_isUnique") == 1 || getNumber (_x >> "ACE_asItem") == 1}) configClasses _cfgMagazines); // Remove invalid/non-existent entries _grenadeList deleteAt ""; @@ -282,11 +282,42 @@ uiNamespace setVariable [QGVAR(CBAdisposableLaunchers), compileFinal _launchers] uiNamespace setVariable [QGVAR(configItemsTools), compileFinal _toolList]; // Compatibility: Override baseWeapon for RHS optics -// No good way to do this via script for other attachments, needs manual compat +// No good way to do this via script for other RHS attachments, needs manual compat private _baseWeaponCache = uiNamespace getVariable QGVAR(baseWeaponNameCache); { private _baseAttachment = configName (_cfgWeapons >> getText (_x >> "rhs_optic_base")); if (_baseAttachment != "") then { - _baseWeaponCache set [toLower configName _x, _baseAttachment]; + _baseWeaponCache set [toLowerANSI configName _x, _baseAttachment]; }; } forEach ("getText (_x >> 'rhs_optic_base') != ''" configClasses _cfgWeapons); + +// Compatibility: Override baseWeapon for CBA Scripted Optics +// Adapted from https://github.com/Theseus-Aegis/Mods/blob/master/addons/armory/functions/fnc_getBaseVariant.sqf +private _isScriptedOptic = toString { + isClass (_x >> "CBA_ScriptedOptic") || + {(getText (_x >> "weaponInfoType")) regexMatch "CBA_scriptedOptic.*?"} +}; + +{ + private _xClass = toLowerANSI configName _x; + private _baseOptic = _xClass call FUNC(baseOptic); + if (_baseOptic != "" && {_baseOptic != _xClass}) then { + TRACE_2("updating baseOptic",_xClass,_baseOptic); + _baseWeaponCache set [_xClass, _baseOptic]; + }; +} forEach (_isScriptedOptic configClasses _cfgWeapons); + +// Compatibility: Override baseWeapon for CBA Scripted Attachments +private _isScriptedAttachment = toString { + getText (_x >> "MRT_SwitchItemNextClass") != "" || + {getText (_x >> "MRT_SwitchItemPrevClass") != ""} +}; + +{ + private _xClass = toLowerANSI configName _x; + private _baseAttachment = _xClass call FUNC(baseAttachment); + if (_baseAttachment != "" && {_baseAttachment != _xClass}) then { + TRACE_2("updating baseAttachment",_xClass,_baseAttachment); + _baseWeaponCache set [_xClass, _baseAttachment]; + }; +} forEach (_isScriptedAttachment configClasses _cfgWeapons); diff --git a/addons/arsenal/functions/fnc_sortPanel.sqf b/addons/arsenal/functions/fnc_sortPanel.sqf index bbe48d6e35..f9803a429e 100644 --- a/addons/arsenal/functions/fnc_sortPanel.sqf +++ b/addons/arsenal/functions/fnc_sortPanel.sqf @@ -15,6 +15,10 @@ params ["_control"]; +// https://community.bistudio.com/wiki/toString, see comment +// However, using 55295 did not work as expected, 55291 was found by trial and error +#define HIGHEST_VALUE_CHAR 55291 + // When filling the sorting panel, FUNC(sortPanel) is called twice, so ignore first call if (GVAR(ignoreFirstSortPanelCall)) exitWith { GVAR(ignoreFirstSortPanelCall) = false; @@ -29,6 +33,7 @@ private _sortDirectionCtrl = _display displayCtrl ([IDC_sortLeftTabDirection, ID private _cfgMagazines = configFile >> "CfgMagazines"; private _cfgFaces = configFile >> "CfgFaces"; private _cfgUnitInsignia = configFile >> "CfgUnitInsignia"; +private _cfgUnitInsigniaCampaign = campaignConfigFile >> "CfgUnitInsignia"; private _cfgUnitInsigniaMission = missionConfigFile >> "CfgUnitInsignia"; if (_rightSort) then { @@ -126,7 +131,6 @@ private _selected = if (_right) then { _panel lbData _curSel }; -private _originalNames = createHashMap; private _item = ""; private _quantity = ""; private _itemCfg = configNull; @@ -136,12 +140,8 @@ private _fillerChar = toString [1]; private _magazineMiscItems = uiNamespace getVariable QGVAR(magazineMiscItems); private _sortCache = uiNamespace getVariable QGVAR(sortCache); - -private _faceCache = if (_cfgClass == _cfgFaces) then { - uiNamespace getVariable [QGVAR(faceCache), createHashMap] -} else { - createHashMap -}; +private _faceCache = uiNamespace getVariable QGVAR(faceCache); +private _insigniaCache = uiNamespace getVariable QGVAR(insigniaCache); private _countColumns = if (_right) then { count lnbGetColumnsPosition _panel @@ -150,9 +150,9 @@ private _countColumns = if (_right) then { }; private _for = if (_right) then { - for '_i' from 0 to (lnbSize _panel select 0) - 1 + for "_i" from 0 to (lnbSize _panel select 0) - 1 } else { - for '_i' from 0 to (lbSize _panel) - 1 + for "_i" from 0 to (lbSize _panel) - 1 }; _for do { @@ -163,6 +163,14 @@ _for do { _panel lbData _i }; + // Check if entry is "Empty" + if (!_right && {(_panel lbValue _i) == -1}) then { + // Set to lowest/highest lexicographical value, so that "Empty" is always at the top + _panel lbSetTextRight [_i, ["", toString [HIGHEST_VALUE_CHAR, HIGHEST_VALUE_CHAR, HIGHEST_VALUE_CHAR, HIGHEST_VALUE_CHAR, HIGHEST_VALUE_CHAR]] select (_sortDirection == ASCENDING)]; + + continue; + }; + // Get item's count _quantity = if (_right) then { parseNumber (_panel lnbText [_i, 2]) @@ -179,18 +187,22 @@ _for do { _itemCfg = if !(_cfgClass in [_cfgFaces, _cfgUnitInsignia]) then { _cfgClass >> _item } else { - // If insignia, check both config and mission file + // If insignia, check for correct config: First mission, then campaign and finally regular config if (_cfgClass == _cfgUnitInsignia) then { - _itemCfg = _cfgClass >> _item; + _itemCfg = _cfgUnitInsigniaMission >> _item; if (isNull _itemCfg) then { - _itemCfg = _cfgUnitInsigniaMission >> _item; + _itemCfg = _cfgUnitInsigniaCampaign >> _item; + }; + + if (isNull _itemCfg) then { + _itemCfg = _cfgUnitInsignia >> _item; }; _itemCfg } else { // If face, check correct category - _cfgClass >> (_faceCache get _item) param [2, "Man_A3"] >> _item + _cfgClass >> (_faceCache getOrDefault [_item, []]) param [2, "Man_A3"] >> _item }; }; @@ -216,37 +228,29 @@ _for do { _value }, true]; - // Save the current row's item's name in a cache and set text to it's sorting value + // Set the right text temporarily, so it can be used for sorting if (_right) then { - _name = _panel lnbText [_i, 1]; - _originalNames set [_item, _name]; - // Use value, display name and classname to sort, which means a fixed alphabetical order is guaranteed - // Filler char has lowest lexicographical order possible - _panel lnbSetText [[_i, 1], format ["%1%2%4%3", _value, _name, _item, _fillerChar]]; + // Filler char has lowest lexicographical value possible + _panel lnbSetTextRight [[_i, 1], format ["%1%2%4%3", _value, _panel lnbText [_i, 1], _item, _fillerChar]]; } else { if (_item != "") then { - _name = _panel lbText _i; - _originalNames set [_item, _name]; - // Use value, display name and classname to sort, which means a fixed alphabetical order is guaranteed - // Filler char has lowest lexicographical order possible - _panel lbSetText [_i, format ["%1%2%4%3", _value, _name, _item, _fillerChar]]; + // Filler char has lowest lexicographical value possible + _panel lbSetTextRight [_i, format ["%1%2%4%3", _value, _panel lbText _i, _item, _fillerChar]]; }; }; }; -// Sort alphabetically, find the previously selected item, select it again and reset text to original text +// Sort alphabetically, find the previously selected item and select it again if (_right) then { - _panel lnbSort [1, _sortDirection == ASCENDING]; + [_panel, 1] lnbSortBy ["TEXT", _sortDirection == ASCENDING, false, true, true]; // do not support unicode, as it's much more performance intensive (~3x more) _for do { - _item = _panel lnbData [_i, 0]; + // Remove sorting text, as it blocks the item name otherwise + _panel lnbSetTextRight [[_i, 1], ""]; - _panel lnbSetText [[_i, 1], _originalNames get _item]; - - // Set selection after text, otherwise item info box on the right side shows invalid name - if (_curSel != -1 && {_item == _selected}) then { + if (_curSel != -1 && {(_panel lnbData [_i, 0]) == _selected}) then { _panel lnbSetCurSelRow _i; // To avoid unnecessary checks after previsouly selected item was found @@ -254,17 +258,17 @@ if (_right) then { }; }; } else { - lbSort [_panel, ["DESC", "ASC"] select _sortDirection]; + _panel lbSortBy ["TEXT", _sortDirection == ASCENDING, false, true, true]; // do not support unicode, as it's much more performance intensive (~3x more) _for do { _item = _panel lbData _i; // Check if valid item (problems can be caused when searching) if (_item != "") then { - _panel lbSetText [_i, _originalNames get _item]; + // Remove sorting text, as it blocks the item name otherwise + _panel lbSetTextRight [_i, ""]; }; - // Set selection after text, otherwise item info box on the right side shows invalid name if (_curSel != -1 && {_item == _selected}) then { _panel lbSetCurSel _i; diff --git a/addons/arsenal/functions/fnc_statTextStatement_binoVisionMode.sqf b/addons/arsenal/functions/fnc_statTextStatement_binoVisionMode.sqf index 6da45345f4..df4260ba1a 100644 --- a/addons/arsenal/functions/fnc_statTextStatement_binoVisionMode.sqf +++ b/addons/arsenal/functions/fnc_statTextStatement_binoVisionMode.sqf @@ -17,7 +17,7 @@ params ["", "_config"]; TRACE_1("statTextStatement_binoVisionMode",_config); private _text = []; -private _visionModes = getArray (_config >> "visionMode") apply {toLower _x}; +private _visionModes = getArray (_config >> "visionMode") apply {toLowerANSI _x}; { if (_x in _visionModes) then { _text pushBack (localize ([LSTRING(VisionNormal), LSTRING(VisionNight), LSTRING(VisionThermal)] select _forEachIndex)); diff --git a/addons/arsenal/functions/fnc_statTextStatement_load.sqf b/addons/arsenal/functions/fnc_statTextStatement_load.sqf new file mode 100644 index 0000000000..032019f582 --- /dev/null +++ b/addons/arsenal/functions/fnc_statTextStatement_load.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: PabstMirror + * Text statement for the load stat. + * + * Arguments: + * 0: Stats + * 1: Item config path + * + * Return Value: + * Stat Text + * + * Public: No +*/ + +params ["_stats", "_config"]; +TRACE_2("statTextStatement_load",_stats,_config); + +if (!isNull (_config >> "ItemInfo" >> "containerClass")) then { // Uniform/Vest + _config = configfile >> "CfgVehicles" >> getText (_config >> "ItemInfo" >> "containerClass"); +}; + +private _load = getNumber (_config >> (_stats # 0)); + +if (_load <= 0) exitWith { LELSTRING(common,none) }; +format ["%1kg (%2lb)", (_load * 0.1 * (1 / 2.2046)) toFixed 2, (_load * 0.1) toFixed 2] diff --git a/addons/arsenal/functions/fnc_statTextStatement_scopeVisionMode.sqf b/addons/arsenal/functions/fnc_statTextStatement_scopeVisionMode.sqf index b4de06e772..7348be5bc3 100644 --- a/addons/arsenal/functions/fnc_statTextStatement_scopeVisionMode.sqf +++ b/addons/arsenal/functions/fnc_statTextStatement_scopeVisionMode.sqf @@ -17,7 +17,7 @@ params ["", "_config"]; TRACE_1("statTextStatement_scopeVisionMode",_config); private _opticsModes = ("true" configClasses (_config >> "ItemInfo" >> "OpticsModes")) apply { - private _visionMode = getArray (_x >> "visionMode") apply {toLower _x}; + private _visionMode = getArray (_x >> "visionMode") apply {toLowerANSI _x}; [ getNumber (_x >> "useModelOptics") == 1, // Is in optics _visionMode isEqualTo [], // Optional NVG diff --git a/addons/arsenal/functions/fnc_updateCurrentItemsList.sqf b/addons/arsenal/functions/fnc_updateCurrentItemsList.sqf index 0b1af5d465..0dcf3866b9 100644 --- a/addons/arsenal/functions/fnc_updateCurrentItemsList.sqf +++ b/addons/arsenal/functions/fnc_updateCurrentItemsList.sqf @@ -63,8 +63,12 @@ private _indexCurrentItems = -1; }; // Backpack case IDX_LOADOUT_BACKPACK: { - GVAR(currentItems) set [IDX_CURR_BACKPACK, _x param [0, ""]]; - GVAR(currentItems) set [IDX_CURR_BACKPACK_ITEMS, _x param [1, []]]; + _x params [["_backpack", ""], ["_items", []]]; + if (_backpack != "") then { + _backpack = [_backpack, "CfgVehicles"] call CBA_fnc_getNonPresetClass; + }; + GVAR(currentItems) set [IDX_CURR_BACKPACK, _backpack]; + GVAR(currentItems) set [IDX_CURR_BACKPACK_ITEMS, _items]; }; // Helmet case IDX_LOADOUT_HEADGEAR: { diff --git a/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf index fddc9b3b9c..9b7eb6327a 100644 --- a/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf +++ b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf @@ -101,6 +101,11 @@ private _fnc_uniqueEquipment = { case IDX_LOADOUT_BACKPACK: { _x params [["_containerClass", ""]]; + // Handle preset (loaded/AI) backpacks + if (_containerClass != "" && _forEachIndex == IDX_LOADOUT_BACKPACK) then { + _containerClass = [_containerClass, "CfgVehicles"] call CBA_fnc_getNonPresetClass; + }; + // Remove all unique equipment in tab; Add container as a unique equipment [GVAR(virtualItems) get (_forEachIndex + 1), _containerClass] call _fnc_uniqueEquipment; }; diff --git a/addons/arsenal/functions/fnc_verifyLoadout.sqf b/addons/arsenal/functions/fnc_verifyLoadout.sqf index adc76f391a..10cd9a2553 100644 --- a/addons/arsenal/functions/fnc_verifyLoadout.sqf +++ b/addons/arsenal/functions/fnc_verifyLoadout.sqf @@ -13,285 +13,97 @@ * Public: No */ +#define NOT_IN_ARSENAL !(_name in GVAR(virtualItemsFlat)) + params ["_loadout"]; private _extendedInfo = createHashMap; // Check if the provided loadout is a CBA extended loadout if (count _loadout == 2) then { - _extendedInfo = _loadout select 1; + _extendedInfo = +(_loadout select 1); // Copy the hashmap to prevent events from modifiyng the profileNamespace extendedInfo + if (_extendedInfo isEqualType []) then { // Hashmaps are serialized as arrays, convert back to hashmap + _extendedInfo = createHashMapFromArray _extendedInfo; + _loadout set [1, _extendedInfo]; // Also fix source variable, technically not needed but doesn't hurt + }; _loadout = _loadout select 0; }; -private _cfgWeapons = configFile >> "CfgWeapons"; -private _cfgMagazines = configFile >> "CfgMagazines"; -private _cfgVehicles = configFile >> "CfgVehicles"; -private _cfgGlasses = configFile >> "CfgGlasses"; - -private _weapons = GVAR(virtualItems) get IDX_VIRT_WEAPONS; -private _attachments = GVAR(virtualItems) get IDX_VIRT_ATTACHMENTS; - private _name = ""; -private _nullItemsAmount = 0; -private _unavailableItemsAmount = 0; +private _itemArray = []; private _nullItemsList = []; private _unavailableItemsList = []; +private _missingExtendedInfo = []; -// Search for all items and turn them into config case; Don't touch other value types -private _fnc_toConfigCase = { +// Search for all items and check their availability +private _fnc_filterLoadout = { _this apply { - if (_x isEqualType "") then { - if (_x != "") then { - _name = _x call EFUNC(common,getConfigName); + if (_x isEqualType "" && {_x != ""}) then { + _name = _x call EFUNC(common,getConfigName); - // If item doesn't exist in config, "" is returned - // Just return unaltered item name in that case, so it can be documented as being unavailable - [_x, _name] select (_name != ""); + // If item doesn't exist in config, "" is returned + if (_name == "") then { + _nullItemsList pushBack _x; } else { - _x + // Check if item or its base weapon exist in the arsenal + if NOT_IN_ARSENAL then { + _name = _name call FUNC(baseWeapon); + if NOT_IN_ARSENAL then { + // This could be a backpack + private _temp = [_name, "CfgVehicles"] call CBA_fnc_getNonPresetClass; + if (_temp == "") then { // It's not + _unavailableItemsList pushBack _name; + _name = ""; + } else { // It is + _name = _temp; + // Check if it's available again + if NOT_IN_ARSENAL then { + _unavailableItemsList pushBack _name; + _name = ""; + }; + }; + }; + }; }; + + _name } else { // Handle arrays if (_x isEqualType []) then { - _x call _fnc_toConfigCase + _itemArray = _x call _fnc_filterLoadout; + // If "" is given as a container, an error is thrown, therefore, filter out all unavailable/null containers + if (count _itemArray == 2 && {(_itemArray select 0) isEqualTo ""} && {(_itemArray select 1) isEqualType []}) then { + _itemArray = []; + }; + _itemArray } else { - // All other types + // All other types and empty strings _x }; }; }; }; -// Convert loadout to config case +// Convert loadout to config case and replace null/unavailable items // Loadout might come from a different modpack, which might have different config naming -_loadout = _loadout call _fnc_toConfigCase; +_loadout = _loadout call _fnc_filterLoadout; -// Check a weapon, with its attachments and magazines, if items are available -private _fnc_weaponCheck = { - params ["_weaponArray", ["_index", -1]]; +{ + private _class = _extendedInfo getOrDefault [_x, ""]; + private _cache = missionNamespace getVariable (_x + "Cache"); - { - // Weapons and attachments - if (_x isEqualType "") then { - if (_x != "") then { - // Check if item exists - if (isClass (_cfgWeapons >> _x)) then { - // Get base weapon - _x = _x call FUNC(baseWeapon); - - // Check if item is available in arsenal - if !( - // Weapon class name is at the very start of the array - if (_forEachIndex == 0) then { - // If the type of weapon is known, only look through that array - if (_index != -1) then { - // If binos, choose differently - if (_index == IDX_LOADOUT_BINO) then { - _x in (GVAR(virtualItems) get IDX_VIRT_BINO) - } else { - _x in (_weapons get _index) - }; - } else { - _x in (_weapons get IDX_VIRT_PRIMARY_WEAPONS) || - {_x in (_weapons get IDX_VIRT_SECONDARY_WEAPONS)} || - {_x in (_weapons get IDX_VIRT_HANDGUN_WEAPONS)} || - {_x in (GVAR(virtualItems) get IDX_VIRT_BINO)} - }; - } else { - _x in (_attachments get IDX_VIRT_OPTICS_ATTACHMENTS) || - {_x in (_attachments get IDX_VIRT_FLASHLIGHT_ATTACHMENTS)} || - {_x in (_attachments get IDX_VIRT_MUZZLE_ATTACHMENTS)} || - {_x in (_attachments get IDX_VIRT_BIPOD_ATTACHMENTS)} - } - ) then { - _unavailableItemsList pushBackUnique _x; - _weaponArray set [_forEachIndex, ""]; - INC(_unavailableItemsAmount); - }; - } else { - _nullItemsList pushBackUnique _x; - _weaponArray set [_forEachIndex, ""]; - INC(_nullItemsAmount); - }; - }; - } else { - // Magazines - if (_x isNotEqualTo []) then { - _x params ["_magazine"]; - - // Check if item exists - if (isClass (_cfgMagazines >> _magazine)) then { - // Check if item is available in arsenal - if !(_magazine in (GVAR(virtualItems) get IDX_VIRT_ITEMS_ALL)) then { - _unavailableItemsList pushBackUnique _magazine; - _weaponArray set [_forEachIndex, []]; - INC(_unavailableItemsAmount); - }; - } else { - _nullItemsList pushBackUnique _magazine; - _weaponArray set [_forEachIndex, []]; - INC(_nullItemsAmount); - }; - }; - }; - } forEach _weaponArray; -}; - -private _item = ""; - -// Go through entire loadout to check if items are available in current arsenal -for "_dataIndex" from IDX_LOADOUT_PRIMARY_WEAPON to IDX_LOADOUT_ASSIGNEDITEMS do { - switch (_dataIndex) do { - // Primary weapon, Secondary weapon, Handgun weapon, Binoculars - case IDX_LOADOUT_PRIMARY_WEAPON; - case IDX_LOADOUT_SECONDARY_WEAPON; - case IDX_LOADOUT_HANDGUN_WEAPON; - case IDX_LOADOUT_BINO: { - [_loadout select _dataIndex, _dataIndex] call _fnc_weaponCheck; - }; - // Uniform, vest, backpack - case IDX_LOADOUT_UNIFORM; - case IDX_LOADOUT_VEST; - case IDX_LOADOUT_BACKPACK: { - (_loadout select _dataIndex) params [["_item", ""], ["_containerItems", []]]; - - if (_item != "") then { - // Check if item exists - if (isClass (_cfgVehicles >> _item) || {isClass (_cfgWeapons >> _item)}) then { - // Check if item is available in arsenal - if !(_item in (GVAR(virtualItems) get (_dataIndex + 1))) then { - _unavailableItemsList pushBackUnique _item; - _loadout set [_dataIndex, []]; - INC(_unavailableItemsAmount); - } else { - { - switch (true) do { - // Magazines have each 3 entries: Name, number of magazines and ammo count - case (_x isEqualTypeArray ["", 0, 0]): { - _x params ["_item"]; - - // Check if item exists - if (isClass (_cfgMagazines >> _item)) then { - // Check if item is available in arsenal - if !( - _item in (GVAR(virtualItems) get IDX_VIRT_ITEMS_ALL) || - {_item in (GVAR(virtualItems) get IDX_VIRT_GRENADES)} || - {_item in (GVAR(virtualItems) get IDX_VIRT_EXPLOSIVES)} || - {_item in (GVAR(virtualItems) get IDX_VIRT_MISC_ITEMS)} - ) then { - _unavailableItemsList pushBackUnique _item; - ((_loadout select _dataIndex) select 1) set [_forEachIndex, []]; - INC(_unavailableItemsAmount); - }; - } else { - _nullItemsList pushBackUnique _item; - ((_loadout select _dataIndex) select 1) set [_forEachIndex, []]; - INC(_nullItemsAmount); - }; - }; - // Weapons have 2 entries: Weapon info array and amount - case (_x isEqualTypeArray [[], 0]): { - [_x select 0] call _fnc_weaponCheck; - }; - // Misc. items have 2 entries: Name and amount, containers have 2 entries: Name and isBackpack - default { - _x params ["_item"]; - - // Check if item exists - if ( - isClass (_cfgWeapons >> _item) || - {isClass (_cfgMagazines >> _item)} || - {isClass (_cfgGlasses >> _item)} || - {isClass (_cfgVehicles >> _item)} - ) then { - // Check if item is available in arsenal - if !(_item in GVAR(virtualItemsFlat)) then { - _unavailableItemsList pushBackUnique _item; - ((_loadout select _dataIndex) select 1) set [_forEachIndex, []]; - INC(_unavailableItemsAmount); - }; - } else { - _nullItemsList pushBackUnique _item; - ((_loadout select _dataIndex) select 1) set [_forEachIndex, []]; - INC(_nullItemsAmount); - }; - }; - - }; - } forEach _containerItems; - }; - } else { - _nullItemsList pushBackUnique _item; - _loadout set [_dataIndex, []]; - INC(_nullItemsAmount); - }; - }; - }; - // Headgear - case IDX_LOADOUT_HEADGEAR: { - _item = _loadout select _dataIndex; - - if (_item != "") then { - // Check if item exists - if (isClass (_cfgWeapons >> _item)) then { - // Check if item is available in arsenal - if !(_item in (GVAR(virtualItems) get IDX_VIRT_HEADGEAR)) then { - _unavailableItemsList pushBackUnique _item; - _loadout set [_dataIndex, ""]; - INC(_unavailableItemsAmount); - }; - } else { - _nullItemsList pushBackUnique _item; - _loadout set [_dataIndex, ""]; - INC(_nullItemsAmount); - }; - }; - }; - // Facewear - case IDX_LOADOUT_GOGGLES: { - _item = _loadout select _dataIndex; - - if (_item != "") then { - // Check if item exists - if (isClass (_cfgGlasses >> _item)) then { - // Check if item is available in arsenal - if !(_item in (GVAR(virtualItems) get IDX_VIRT_GOGGLES)) then { - _unavailableItemsList pushBackUnique _item; - _loadout set [_dataIndex, ""]; - INC(_unavailableItemsAmount); - }; - } else { - _nullItemsList pushBackUnique _item; - _loadout set [_dataIndex, ""]; - INC(_nullItemsAmount); - }; - }; - }; - // Assigned items: Map, Compass, Watch, GPS / UAV Terminal, Radio, NVGs - case IDX_LOADOUT_ASSIGNEDITEMS: { - private _assignedItems = _loadout select _dataIndex; - - for "_subIndex" from 0 to 5 do { - _item = _assignedItems select _subIndex; - - if (_item != "") then { - // Check if item exists - if (isClass (_cfgWeapons >> _item)) then { - // Check if item is available in arsenal - if !(_item in (GVAR(virtualItems) get (IDX_VIRT_NVG + ([2, 6, 4, 3, 5, 0] select _subIndex)))) then { - _unavailableItemsList pushBackUnique _item; - _assignedItems set [_subIndex, ""]; - INC(_unavailableItemsAmount); - }; - } else { - _nullItemsList pushBackUnique _item; - _assignedItems set [_subIndex, ""]; - INC(_nullItemsAmount); - }; - }; - }; - }; + // Previously voices were stored in lower case (speaker command returns lower case), so this is to make old loadouts compatible + if (_class != "" && {_x == QGVAR(voice)}) then { + _class = _class call EFUNC(common,getConfigName); }; -}; + if (_class != "" && {!(_class in _cache)}) then { + _missingExtendedInfo pushBack [_x, _class]; + _extendedInfo deleteAt _x; + }; +} forEach [QGVAR(insignia), QGVAR(face), QGVAR(voice)]; -[[_loadout, _extendedInfo], _nullItemsAmount, _unavailableItemsAmount, _nullItemsList, _unavailableItemsList] +// Raise event for 3rd party: mostly for handling extended info +// Pass all items, including duplicates +[QGVAR(loadoutVerified), [_loadout, _extendedInfo, _nullItemsList, _unavailableItemsList, _missingExtendedInfo]] call CBA_fnc_localEvent; + +[[_loadout, _extendedInfo], _nullItemsList arrayIntersect _nullItemsList, _unavailableItemsList arrayIntersect _unavailableItemsList, _missingExtendedInfo] diff --git a/addons/arsenal/script_component.hpp b/addons/arsenal/script_component.hpp index 0f7348b9db..2eb9c3f170 100644 --- a/addons/arsenal/script_component.hpp +++ b/addons/arsenal/script_component.hpp @@ -15,6 +15,3 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" - -#define ACTION_TYPE_BUTTON 0 -#define ACTION_TYPE_TEXT 1 diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml index f308765540..02c35266db 100644 --- a/addons/arsenal/stringtable.xml +++ b/addons/arsenal/stringtable.xml @@ -1191,7 +1191,7 @@ 支持夜视仪 Podpora nočního vidění Gece Görüş Desteği - 야간투시 지원여부 + 야간투시 지원 Primary supported @@ -1206,7 +1206,7 @@ 主武器支援 主镜支持 Hlavní část hledí podporuje - 주무기 지원여부 + 주무기 지원 Secondary supported @@ -1221,7 +1221,7 @@ 次要武器支援 副镜支持 Vedlejší část hledí podporuje - 보조무기 지원여부 + 보조무기 지원 Primary integrated @@ -1236,15 +1236,23 @@ 整合主武器 主镜内置 Integrováno do hlavní části hledí - 주무기 내장여부 + 주무기 내장 Thermal integrated + Termico integrato 熱画像装置内蔵 + Интегрирован тепловизор. + 열화상 내장 + Thermique intégrée Thermal & Primary integrated + Termico e Primario integrato 熱画像装置内蔵・プライマリに内蔵 + Интегрирован тепловизор и осн.прицел. + 열화상과 주무기 내장 + Thermique et primaire intégrés Not Supported @@ -1600,6 +1608,7 @@ 내림차순 Décroissant Decrescente + Нисходящий Ascending @@ -1610,6 +1619,7 @@ 오름차순 Croissant Crescente + Восходящий Tools @@ -1636,6 +1646,7 @@ 장탄 수 Nombre de munitions Quantidade de munição + Количество боеприпасов Illuminators @@ -1645,6 +1656,7 @@ 조명 Iluminadores イルミネーター + Осветители Default to Favorites @@ -1655,6 +1667,7 @@ 즐겨찾기 기본값 Favoris par défaut Favoritos por padrão + По умолчанию - Избранное Controls whether the ACE Arsenal defaults to showing all items or favorites. @@ -1665,6 +1678,7 @@ ACE 아스널이 기본적으로 모든 아이템 또는 즐겨찾기를 표시할 지 여부를 조정합니다. Contrôle si l'arsenal ACE affiche par défaut tous les éléments ou les favoris. Controla se o Arsenal ACE exibe por padrão todos os itens ou favoritos. + Определяет, будет ли в арсенале ACE по умолчанию отображаться все предметы или избранное. Favorites Color @@ -1675,6 +1689,7 @@ 즐겨찾기 색상 Couleurs favorites Cor dos favoritos + Избранный цвет Highlight color for favorited items. @@ -1685,6 +1700,7 @@ 즐겨찾기한 아이템을 색상으로 강조합니다. Met en surbrillance les éléments favoris. Cor de destaque para itens favoritados. + Выделите цветом любимые предметы. Switch between displaying all items or your favorites.\nDouble click while holding Shift to add or remove an item. @@ -1695,6 +1711,7 @@ 모든 아이템을 표시하거나 즐겨찾기를 표시할 때 전환합니다\nShift 키를 누른 상태에서 두 번 클릭하여 아이템을 추가하거나 제거합니다. Change entre l'affichage de tous les éléments ou de vos favoris.\nDouble-cliquez en maintenant la touche Maj enfoncée pour ajouter ou supprimer un élément. Alterna entre a exibição de todos os itens ou seus favoritos.\nClique duas vezes enquanto mantém pressionada a tecla Shift para adicionar ou remover um item. + Переключайтесь между отображением всех элементов или ваших избранных.\nДважды щелкните, удерживая Shift, чтобы добавить или удалить элемент. Search\nCTRL + Click to enable live results @@ -1702,6 +1719,8 @@ Cerca\nCTRL + Click per modificare i risultati mentre scrivi 検索\nCTRL + クリックで検索結果の即時表示を有効化 검색\nCtrl + 클릭으로 실시간 검색 결과를 활성화 + Поиск\nCtrl + Click для включения результатов в реальном времени + Recherche\nCTRL + clic pour modifier les résultats tout en écrivant diff --git a/addons/arsenal/ui/RscAttributes.hpp b/addons/arsenal/ui/RscAttributes.hpp index 69acebc52c..dc70caa0c2 100644 --- a/addons/arsenal/ui/RscAttributes.hpp +++ b/addons/arsenal/ui/RscAttributes.hpp @@ -467,7 +467,6 @@ class GVAR(display) { }; class actionsText1: RscTextMulti { idc = IDC_actionsText1; - fade = 1; x = QUOTE(0 * GRID_W); y = QUOTE(5 * GRID_H); w = QUOTE(45 * GRID_W); @@ -479,8 +478,6 @@ class GVAR(display) { }; class actionsButton1: ctrlButton { idc = IDC_actionsButton1; - onMouseEnter = QUOTE(ctrlSetFocus (_this select 0)); - fade = 1; text = ""; x = QUOTE(1 * GRID_W); y = QUOTE(6 * GRID_H); @@ -567,6 +564,7 @@ class GVAR(display) { colorSelect[] = {1,1,1,1}; colorSelect2[] = {1,1,1,1}; colorPictureRightSelected[] = {1,1,1,1}; + colorTextRight[] = {0.5, 0.5, 0.5, 0}; onLBSelChanged = QUOTE(_this call FUNC(onSelChangedLeft)); onLBDblClick = QUOTE(_this call FUNC(onPanelDblClick)); onSetFocus = QUOTE(GVAR(leftTabFocus) = true); @@ -597,6 +595,7 @@ class GVAR(display) { colorSelect[] = {1,1,1,1}; colorSelect2[] = {1,1,1,1}; colorPictureRightSelected[] = {1,1,1,1}; + colorTextRight[] = {0.5, 0.5, 0.5, 0}; columns[] = {0.07, 0.15, 0.75}; idcLeft = IDC_arrowMinus; idcRIght = IDC_arrowPlus; diff --git a/addons/arsenal/ui/script_component.hpp b/addons/arsenal/ui/script_component.hpp deleted file mode 100644 index fcf9da9867..0000000000 --- a/addons/arsenal/ui/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "..\script_component.hpp" diff --git a/addons/artillerytables/functions/fnc_rangeTableUpdate.sqf b/addons/artillerytables/functions/fnc_rangeTableUpdate.sqf index 56135025ae..3e50f9d7ad 100644 --- a/addons/artillerytables/functions/fnc_rangeTableUpdate.sqf +++ b/addons/artillerytables/functions/fnc_rangeTableUpdate.sqf @@ -22,10 +22,10 @@ private _ctrlElevationHigh = _dialog displayCtrl IDC_BUTTON_ELEV_HIGH; private _ctrlElevationLow = _dialog displayCtrl IDC_BUTTON_ELEV_LOW; GVAR(lastElevationMode) = param [0, GVAR(lastElevationMode)]; // update if passed a new value -GVAR(lastCharge) = lbCurSel _ctrlChargeList; +GVAR(lastTablePage) = lbCurSel _ctrlChargeList; // get data for currently selected mag/mode combo: -(GVAR(magModeData) select GVAR(lastCharge)) params [["_muzzleVelocity", -1], ["_airFriction", 0]]; +(GVAR(magModeData) select GVAR(lastTablePage)) params [["_muzzleVelocity", -1], ["_airFriction", 0]]; private _elevMin = _dialog getVariable [QGVAR(elevMin), 0]; private _elevMax = _dialog getVariable [QGVAR(elevMax), 0]; _ctrlElevationHigh ctrlSetTextColor ([[0.25,0.25,0.25,1],[1,1,1,1]] select GVAR(lastElevationMode)); diff --git a/addons/atragmx/XEH_postInit.sqf b/addons/atragmx/XEH_postInit.sqf index 62d45555b1..01eb14d928 100644 --- a/addons/atragmx/XEH_postInit.sqf +++ b/addons/atragmx/XEH_postInit.sqf @@ -1,8 +1,10 @@ #include "script_component.hpp" +if (!hasInterface) exitWith {}; + #include "initKeybinds.inc.sqf" GVAR(active) = false; GVAR(initialised) = false; -[QEGVAR(vector,rangefinderData), {_this call FUNC(sord)}] call CBA_fnc_addEventHandler; +[QEGVAR(vector,rangefinderData), LINKFUNC(sord)] call CBA_fnc_addEventHandler; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index ec87f96dd0..d953b02bd1 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -57,7 +57,7 @@ if (!_isChemlight) then { _unit addItem _itemName; }; -if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then { +if (toLowerANSI _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then { // Hack for dealing with X_IR_Grenade effect not dissapearing on deleteVehicle detach _attachedObject; _attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]); diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index 40385e9680..aa746e543f 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -3539,6 +3539,7 @@ 인공지능 사용 Utilisation de l'IA Utilização por IA + Использование ИИ Illum @@ -3549,6 +3550,7 @@ 조명탄 Fusées éclairantes Sinalizadoras + Осветители Smoke @@ -3559,6 +3561,7 @@ 연막탄 Fumigènes Fumígenas + Дым Inf @@ -3569,6 +3572,7 @@ 보병 Infanterie Infantaria + Пехота Veh @@ -3579,6 +3583,7 @@ 차량 Véhicule Veículo + Техника Armor @@ -3589,6 +3594,7 @@ 기갑 Blindage Blindagem + Бронетехника Air @@ -3599,6 +3605,7 @@ 항공 Aviation Aeronaves + Авиация diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf index 8d34c4fb40..951a710771 100644 --- a/addons/captives/XEH_postInit.sqf +++ b/addons/captives/XEH_postInit.sqf @@ -25,14 +25,14 @@ if (isServer) then { }; ["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; -[QGVAR(moveInCaptive), FUNC(vehicleCaptiveMoveIn)] call CBA_fnc_addEventHandler; -[QGVAR(moveOutCaptive), FUNC(vehicleCaptiveMoveOut)] call CBA_fnc_addEventHandler; +[QGVAR(moveInCaptive), LINKFUNC(vehicleCaptiveMoveIn)] call CBA_fnc_addEventHandler; +[QGVAR(moveOutCaptive), LINKFUNC(vehicleCaptiveMoveOut)] call CBA_fnc_addEventHandler; -[QGVAR(setHandcuffed), FUNC(setHandcuffed)] call CBA_fnc_addEventHandler; -[QGVAR(setSurrendered), FUNC(setSurrendered)] call CBA_fnc_addEventHandler; +[QGVAR(setHandcuffed), LINKFUNC(setHandcuffed)] call CBA_fnc_addEventHandler; +[QGVAR(setSurrendered), LINKFUNC(setSurrendered)] call CBA_fnc_addEventHandler; //Medical Integration Events -["ace_unconscious", FUNC(handleOnUnconscious)] call CBA_fnc_addEventHandler; +["ace_unconscious", LINKFUNC(handleOnUnconscious)] call CBA_fnc_addEventHandler; if (!hasInterface) exitWith {}; diff --git a/addons/captives/functions/fnc_handleOnUnconscious.sqf b/addons/captives/functions/fnc_handleOnUnconscious.sqf index 1527038ce9..a43207fc84 100644 --- a/addons/captives/functions/fnc_handleOnUnconscious.sqf +++ b/addons/captives/functions/fnc_handleOnUnconscious.sqf @@ -27,7 +27,7 @@ if (_isUnconc) then { }; } else { //Woke up: if handcuffed, goto animation - if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then { + if (_unit getVariable [QGVAR(isHandcuffed), false] && {isNull objectParent _unit}) then { [_unit] call EFUNC(common,fixLoweredRifleAnimation); [_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation); }; diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index c12a02a574..174022ea11 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -145,6 +145,7 @@ Załóż opaskę na oczy 포로 눈 가리기 目隠しをする + Завязать глаза пленному Remove blindfold @@ -154,6 +155,7 @@ Zdejmij opaskę z oczu 눈가리개 풀기 目隠しを外す + Снять повязку с глаз Cable Tie @@ -484,7 +486,7 @@ 设置在光标下的单位成俘虏状态。 커서의 병력을 포박합니다. Ustawia jednostkę pod kursorem jako jeniec. - Арестовывает указанный курсором юнит + Арестовывает указанный курсором юнит. Torna a unidade sob o cursor um prisioneiro Capture l'unité sous le curseur. Nastaví jednotku pod kurzorem jako zajatce. diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index ec432ea91f..4ca004b94e 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -22,11 +22,11 @@ private _type = typeOf _vehicle; private _config = configOf _vehicle; // If vehicle had space given to it via eden/public, then override config hasCargo setting -private _hasCargoPublic = _item getVariable QGVAR(hasCargo); +private _hasCargoPublic = _vehicle getVariable QGVAR(hasCargo); private _hasCargoPublicDefined = !isNil "_canLoadPublic"; if (_hasCargoPublicDefined && {!(_hasCargoPublic isEqualType false)}) then { - WARNING_4("%1[%2] - Variable %3 is %4 - Should be bool",_item,_type,QGVAR(hasCargo),_hasCargoPublic); + WARNING_4("%1[%2] - Variable %3 is %4 - Should be bool",_vehicle,_type,QGVAR(hasCargo),_hasCargoPublic); }; private _hasCargoConfig = getNumber (_config >> QGVAR(hasCargo)) == 1; diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index fb541dd693..79ee3f96b5 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -35,6 +35,11 @@ Deploy + Piazza + Разместить + 配置する + 배치하기 + Déployer Raise/Lower | (Ctrl + Scroll) Rotate @@ -61,7 +66,7 @@ Bloccato Blockiert Bloqué - 取り付け不可 + 配置不可 막힘 断开 斷開 @@ -277,12 +282,20 @@ Loading %1 into %2... Cargando %1 en %2... + Caricando %1 in %2... %1 を %2 に積み込んでいます・・・ + Загружаем %1 в %2... + %1을(를) %2에 싣는 중... + Chargement %1 dans %2... Unloading %1 from %2... Descargando %1 de %2... + Scaricando %1 da %2... %1 を %2 から降ろしています・・・ + Выгружаем %1 из %2... + %1을(를) %2(으)로부터 내리는 중... + Déchargement %1 de %2... %1<br/>could not be loaded @@ -323,6 +336,7 @@ Ne peut pas être déchargé 荷降ろし不可能です 하역할 수가 없습니다 + Не может быть выгружен Cargo Size: %1 @@ -331,6 +345,7 @@ Encombrement fret: %1 貨物のサイズ: %1 화물 크기: %1 + Размер груза: %1 Custom Name @@ -501,7 +516,7 @@ 貨物の積み込み/積み下ろしに掛かる時間を変更します。\n時間 (秒) は、貨物のサイズにこの値を掛けたものです。 Modyfikuje, jak długo zajmuje załadowywanie/wyładowywanie przedmiotów. \nCzasem, w sekundach, jest wielkość przedmiotu razy jego wartość. Modifica il tempo impiegato per caricare o scaricare gli oggetti.\nIl tempo, in secondi, equivale alla dimensione dell'oggetto moltiplicata per questo valore - Изменяет время для загрузки/выгрузки предметов. \n Время (сек) - это размер предмета, умноженный на это значение. + Изменяет время для загрузки/выгрузки предметов. \nВремя (сек) - это размер предмета, умноженный на это значение. Coeficiente de quanto tempo leva para carregar/descarregar itens.\nTempo, em segundos, é o tamanho do objeto multiplicado por esse valor. Modifie le temps nécessaire pour charger/décharger des objets.\nLe temps, en secondes, est calculé en multipliant la taille de l'élément par ce coefficient. 修改要花多長時間來裝載/卸載物品。\n時間,以秒為單位,而物品的大小數值與這個係數成比。 @@ -564,9 +579,19 @@ Enable deploy + Abilita Piazzamento + Включить размещение + 配置機能を有効化 + 배치 활성화 + Permettre le placement Controls whether cargo items can be unloaded via the deploy method. + Determina se oggetti in carico possono essere scaricati e piazzati direttamente. + Определяет, можно ли выгружать грузы с помощью метода размещения. + 配置機能を介して貨物アイテムを降ろすことが出来るかどうかを制御します。 + 배치 방법을 통해 화물 아이템을 내릴 수 있는지 여부를 제어합니다. + Contrôler si les éléments de cargaison peuvent être déchargés via la méthode de déploiement. diff --git a/addons/casings/CfgVehicles.hpp b/addons/casings/CfgVehicles.hpp new file mode 100644 index 0000000000..73d06bc0ac --- /dev/null +++ b/addons/casings/CfgVehicles.hpp @@ -0,0 +1,6 @@ +class CfgVehicles { + class FxCartridge; + class FxCartridge_65_caseless: FxCartridge { + GVAR(model) = ""; // note: the vanilla 6.5 caseless don't actually use this, just being safe + }; +}; diff --git a/addons/casings/XEH_postInit.sqf b/addons/casings/XEH_postInit.sqf index e91ab96c0d..c1baad68e9 100644 --- a/addons/casings/XEH_postInit.sqf +++ b/addons/casings/XEH_postInit.sqf @@ -4,4 +4,4 @@ if (!hasInterface || !GVAR(enabled)) exitWith {}; GVAR(cachedCasings) = createHashMap; GVAR(casings) = []; -["CAManBase", "FiredMan", {call FUNC(createCasing)}] call CBA_fnc_addClassEventHandler; +["CAManBase", "FiredMan", LINKFUNC(createCasing)] call CBA_fnc_addClassEventHandler; diff --git a/addons/casings/config.cpp b/addons/casings/config.cpp index 815048a082..29d0b7cb89 100644 --- a/addons/casings/config.cpp +++ b/addons/casings/config.cpp @@ -15,3 +15,4 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/casings/functions/fnc_createCasing.sqf b/addons/casings/functions/fnc_createCasing.sqf index 22347d36a7..fe35ad5945 100644 --- a/addons/casings/functions/fnc_createCasing.sqf +++ b/addons/casings/functions/fnc_createCasing.sqf @@ -20,31 +20,30 @@ params ["_unit", "", "", "", "_ammo"]; if (!isNull objectParent _unit) exitWith {}; -private _modelPath = GVAR(cachedCasings) get _ammo; -if (isNil "_modelPath") then { +private _modelPath = GVAR(cachedCasings) getOrDefaultCall [_ammo, { private _cartridge = getText (configFile >> "CfgAmmo" >> _ammo >> "cartridge"); - //Default cartridge is a 5.56mm model - _modelPath = switch (_cartridge) do { - case "FxCartridge_9mm": { "A3\Weapons_f\ammo\cartridge_small.p3d" }; - case "FxCartridge_65": { "A3\weapons_f\ammo\cartridge_65.p3d" }; - case "FxCartridge_762": { "A3\weapons_f\ammo\cartridge_762.p3d" }; - case "FxCartridge_762x39": { "A3\weapons_f_enoch\ammo\cartridge_762x39.p3d" }; - case "FxCartridge_93x64_Ball": { "A3\Weapons_F_Mark\Ammo\cartridge_93x64.p3d" }; - case "FxCartridge_338_Ball": { "A3\Weapons_F_Mark\Ammo\cartridge_338_LM.p3d" }; - case "FxCartridge_338_NM": { "A3\Weapons_F_Mark\Ammo\cartridge_338_NM.p3d" }; - case "FxCartridge_127": { "A3\weapons_f\ammo\cartridge_127.p3d" }; - case "FxCartridge_127x54": { "A3\Weapons_F_Mark\Ammo\cartridge_127x54.p3d" }; - case "FxCartridge_slug": { "A3\weapons_f\ammo\cartridge_slug.p3d" }; - case "FxCartridge_12Gauge_HE_lxWS": { "lxWS\weapons_1_f_lxws\Ammo\cartridge_he_lxws.p3d" }; - case "FxCartridge_12Gauge_Slug_lxWS": { "lxWS\weapons_1_f_lxws\Ammo\cartridge_slug_lxws.p3d" }; - case "FxCartridge_12Gauge_Smoke_lxWS": { "lxWS\weapons_1_f_lxws\Ammo\cartridge_smoke_lxws.p3d" }; - case "FxCartridge_12Gauge_Pellet_lxWS": { "lxWS\weapons_1_f_lxws\Ammo\cartridge_pellet_lxws.p3d" }; - case "": { "" }; - default { "A3\Weapons_f\ammo\cartridge.p3d" }; + if (_cartridge == "") then { // return (note: can't use exitWith) + "" + } else { + private _cartridgeConfig = configFile >> "CfgVehicles" >> _cartridge; + + // if explicitly defined, use ACE's config + if (isText (_cartridgeConfig >> QGVAR(model))) exitWith { + getText (_cartridgeConfig >> QGVAR(model)) + }; + // use casing's default model + private _model = getText (_cartridgeConfig >> "model"); + if ("a3\weapons_f\empty" in toLowerANSI _model) exitWith { "" }; + + // Add file extension if missing (fileExists needs file extension) + if ((_model select [count _model - 4]) != ".p3d") then { + _model = _model + ".p3d"; + }; + + ["", _model] select (fileExists _model) }; - GVAR(cachedCasings) set [_ammo, _modelPath]; -}; +}, true]; if (_modelPath isEqualTo "") exitWith {}; diff --git a/addons/chemlights/XEH_postInit.sqf b/addons/chemlights/XEH_postInit.sqf index 6b22de4a3c..b40ffb764e 100644 --- a/addons/chemlights/XEH_postInit.sqf +++ b/addons/chemlights/XEH_postInit.sqf @@ -2,6 +2,6 @@ if (!hasInterface) exitWith {}; -["ace_firedPlayer", DFUNC(throwEH)] call CBA_fnc_addEventHandler; -// ["ace_firedPlayerNonLocal", DFUNC(throwEH)] call CBA_fnc_addEventHandler; -// ["ace_firedNonPlayer", DFUNC(throwEH)] call CBA_fnc_addEventHandler; +["ace_firedPlayer", LINKFUNC(throwEH)] call CBA_fnc_addEventHandler; +// ["ace_firedPlayerNonLocal", LINKFUNC(throwEH)] call CBA_fnc_addEventHandler; +// ["ace_firedNonPlayer", LINKFUNC(throwEH)] call CBA_fnc_addEventHandler; diff --git a/addons/common/CfgMoves.hpp b/addons/common/CfgMoves.hpp index 14686526e9..3c51140fed 100644 --- a/addons/common/CfgMoves.hpp +++ b/addons/common/CfgMoves.hpp @@ -1,5 +1,9 @@ class CfgMovesBasic { - class Default; + // Idle affects legs when weapon switching - fixes units sliding when holstering weapons + class Default { + idle = ""; + }; + // From ACRE class ManActions { GVAR(stop) = QGVAR(stop); diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index ce6ac334ee..fb64d464df 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -13,6 +13,7 @@ PREP(addLineToDebugDraw); PREP(addSwayFactor); PREP(addToInventory); PREP(addWeapon); +PREP(adjustMagazineAmmo); PREP(assignedItemFix); PREP(assignObjectsInList); PREP(ambientBrightness); diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index af4b33d49b..f97009808f 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -18,7 +18,7 @@ ////////////////////////////////////////////////// //Status Effect EHs: -[QGVAR(setStatusEffect), {_this call FUNC(statusEffect_set)}] call CBA_fnc_addEventHandler; +[QGVAR(setStatusEffect), LINKFUNC(statusEffect_set)] call CBA_fnc_addEventHandler; ["forceWalk", false, ["ace_advanced_fatigue", "ACE_SwitchUnits", "ACE_Attach", "ace_dragging", "ACE_Explosives", "ACE_Ladder", "ACE_Sandbag", "ACE_refuel", "ACE_rearm", "ACE_Trenches", "ace_medical_fracture"]] call FUNC(statusEffect_addType); ["blockSprint", false, ["ace_advanced_fatigue", "ace_dragging", "ace_medical_fracture"]] call FUNC(statusEffect_addType); ["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered)]] call FUNC(statusEffect_addType); @@ -145,8 +145,7 @@ if (isServer) then { INFO_3("[%1] DC - Was Zeus [%2] while controlling unit [%3] - manually clearing `bis_fnc_moduleRemoteControl_owner`",[_x] call FUNC(getName),_dcPlayer,_x); _x setVariable ["bis_fnc_moduleRemoteControl_owner", nil, true]; }; - nil - } count (curatorEditableObjects _zeusLogic); + } forEach (curatorEditableObjects _zeusLogic); }; }]; }; @@ -157,9 +156,9 @@ if (isServer) then { INFO_2("Headbug Used: Name: %1, Animation: %2",_profileName,_animation); }] call CBA_fnc_addEventHandler; -[QGVAR(fixCollision), FUNC(fixCollision)] call CBA_fnc_addEventHandler; -[QGVAR(fixFloating), FUNC(fixFloating)] call CBA_fnc_addEventHandler; -[QGVAR(fixPosition), FUNC(fixPosition)] call CBA_fnc_addEventHandler; +[QGVAR(fixCollision), LINKFUNC(fixCollision)] call CBA_fnc_addEventHandler; +[QGVAR(fixFloating), LINKFUNC(fixFloating)] call CBA_fnc_addEventHandler; +[QGVAR(fixPosition), LINKFUNC(fixPosition)] call CBA_fnc_addEventHandler; ["ace_loadPersonEvent", LINKFUNC(loadPersonLocal)] call CBA_fnc_addEventHandler; ["ace_unloadPersonEvent", LINKFUNC(unloadPersonLocal)] call CBA_fnc_addEventHandler; @@ -209,8 +208,8 @@ if (isServer) then { }] call CBA_fnc_addEventHandler; // Request framework -[QGVAR(requestCallback), FUNC(requestCallback)] call CBA_fnc_addEventHandler; -[QGVAR(receiveRequest), FUNC(receiveRequest)] call CBA_fnc_addEventHandler; +[QGVAR(requestCallback), LINKFUNC(requestCallback)] call CBA_fnc_addEventHandler; +[QGVAR(receiveRequest), LINKFUNC(receiveRequest)] call CBA_fnc_addEventHandler; [QGVAR(systemChatGlobal), {systemChat _this}] call CBA_fnc_addEventHandler; @@ -219,7 +218,7 @@ if (isServer) then { [QGVAR(enableSimulationGlobal), {(_this select 0) enableSimulationGlobal (_this select 1)}] call CBA_fnc_addEventHandler; [QGVAR(setShotParents), {(_this select 0) setShotParents [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler; ["ace_setOwner", {(_this select 0) setOwner (_this select 1)}] call CBA_fnc_addEventHandler; - [QGVAR(serverLog), FUNC(serverLog)] call CBA_fnc_addEventHandler; + [QGVAR(serverLog), LINKFUNC(serverLog)] call CBA_fnc_addEventHandler; [QGVAR(claimSafe), LINKFUNC(claimSafeServer)] call CBA_fnc_addEventHandler; }; @@ -236,14 +235,14 @@ if (!isServer) then { ["ACEa", [player]] call CBA_fnc_serverEvent; }] call CBA_fnc_addEventHandler; } else { - ["ACEa", FUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler; + ["ACEa", LINKFUNC(_handleRequestAllSyncedEvents)] call CBA_fnc_addEventHandler; }; -["ACEe", FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler; -["ACEs", FUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler; +["ACEe", LINKFUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler; +["ACEs", LINKFUNC(_handleRequestSyncedEvent)] call CBA_fnc_addEventHandler; if (isServer) then { - [FUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(syncedEventPFH), 0.5, []] call CBA_fnc_addPerFrameHandler; }; @@ -361,7 +360,7 @@ addMissionEventHandler ["PlayerViewChanged", { private _position = [player] call FUNC(getUavControlPosition); private _seatAI = objNull; private _turret = []; - switch (toLower _position) do { + switch (toLowerANSI _position) do { case (""): { _UAV = objNull; // set to objNull if not actively controlling }; @@ -392,8 +391,8 @@ addMissionEventHandler ["PlayerViewChanged", { // Eventhandlers for player controlled machines ////////////////////////////////////////////////// -[QGVAR(displayTextStructured), {_this call FUNC(displayTextStructured)}] call CBA_fnc_addEventHandler; -[QGVAR(displayTextPicture), {_this call FUNC(displayTextPicture)}] call CBA_fnc_addEventHandler; +[QGVAR(displayTextStructured), LINKFUNC(displayTextStructured)] call CBA_fnc_addEventHandler; +[QGVAR(displayTextPicture), LINKFUNC(displayTextPicture)] call CBA_fnc_addEventHandler; ["ace_unconscious", { params ["_unit", "_isUnconscious"]; @@ -403,7 +402,7 @@ addMissionEventHandler ["PlayerViewChanged", { }; }] call CBA_fnc_addEventHandler; -["ace_useItem", DFUNC(useItem)] call CBA_fnc_addEventHandler; +["ace_useItem", LINKFUNC(useItem)] call CBA_fnc_addEventHandler; ////////////////////////////////////////////////// @@ -499,10 +498,24 @@ GVAR(reloadMutex_lastMagazines) = []; // Start the sway loop ////////////////////////////////////////////////// ["CBA_settingsInitialized", { + ["multiplier", { + switch (true) do { + case (isWeaponRested ACE_player): { + GVAR(swayFactor) * GVAR(restedSwayFactor) + }; + case (isWeaponDeployed ACE_player): { + GVAR(swayFactor) * GVAR(deployedSwayFactor) + }; + default { + GVAR(swayFactor) + }; + }; + }, QUOTE(ADDON)] call FUNC(addSwayFactor); + [{ // frame after settingsInitialized to ensure all other addons have added their factors - if ((GVAR(swayFactorsBaseline) + GVAR(swayFactorsMultiplier)) isNotEqualTo []) then { - call FUNC(swayLoop) + if (GVAR(enableSway)) then { + call FUNC(swayLoop); }; // check for pre-3.16 sway factors being added if (!isNil {missionNamespace getVariable "ACE_setCustomAimCoef"}) then { diff --git a/addons/common/dev/test_cfgPatches.sqf b/addons/common/dev/test_cfgPatches.sqf index 281c16eca3..e2ce10b2c6 100644 --- a/addons/common/dev/test_cfgPatches.sqf +++ b/addons/common/dev/test_cfgPatches.sqf @@ -13,7 +13,7 @@ private _allPatches = "(configName _x) select [0,3] == 'ace'" configClasses (con // Get all units[] private _allUnits = []; { - _allUnits append ((getArray (_x >> "units")) apply { toLower _x }); + _allUnits append ((getArray (_x >> "units")) apply { toLowerANSI _x }); } forEach _allPatches; { private _class = configFile >> "CfgVehicles" >> _x; @@ -31,7 +31,7 @@ private _allUnits = []; // Get all weapons[] private _allWeapons = []; { - _allWeapons append ((getArray (_x >> "weapons")) apply { toLower _x }); + _allWeapons append ((getArray (_x >> "weapons")) apply { toLowerANSI _x }); } forEach _allPatches; { private _class = configFile >> "CfgWeapons" >> _x; @@ -50,7 +50,7 @@ private _allWeapons = []; 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 { + if (!((toLowerANSI configName _x) in _allUnits)) then { WARNING_2("Not in any units[] - %1 from %2",configName _x,configSourceMod _x); _testPass = false; }; @@ -60,9 +60,9 @@ private _vics = "(configName _x) select [0,3] == 'ace'" configClasses (configFil // 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; + private _type = toLowerANSI configName _x; if (((getNumber (_x >> "scope")) == 2) || {((getNumber (_x >> "scopeCurator")) == 2)}) then { - if (!((toLower configName _x) in _allWeapons)) then { + if (!((toLowerANSI configName _x) in _allWeapons)) then { WARNING_2("Not in any weapons[] - %1 from %2",configName _x,configSourceMod _x); _testPass = false; }; diff --git a/addons/common/dev/test_vehicleInventory.sqf b/addons/common/dev/test_vehicleInventory.sqf index 7fdd0159c0..9fb24fc1d6 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]; - if ("ace" in toLower (_vehType + _name)) then { _testPass = false; }; + if ("ace" in toLowerANSI (_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]; - if ("ace" in toLower (_vehType + _name)) then { _testPass = false; }; + if ("ace" in toLowerANSI (_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]; - if ("ace" in toLower (_vehType + _name)) then { _testPass = false; }; + if ("ace" in toLowerANSI (_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]; - if ("ace" in toLower (_vehType + _name)) then { _testPass = false; }; + if ("ace" in toLowerANSI (_vehType + _name)) then { _testPass = false; }; }; } forEach (configProperties [_x >> "TransportBackpacks", "isClass _x", true]); } forEach _vehicles; diff --git a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf index 299dff8373..1924ed22ff 100644 --- a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf @@ -43,8 +43,7 @@ if (isServer) then { { _x params ["", "_eventArgs","_ttl"]; [_eventName, _eventArgs, _ttl] call FUNC(_handleSyncedEvent); - false - } count _eventLog; + } forEach _eventLog; INFO_1("[%1] synchronized",_eventName); }; diff --git a/addons/common/functions/fnc_addCanInteractWithCondition.sqf b/addons/common/functions/fnc_addCanInteractWithCondition.sqf index d9c4e3335d..3dce27cf55 100644 --- a/addons/common/functions/fnc_addCanInteractWithCondition.sqf +++ b/addons/common/functions/fnc_addCanInteractWithCondition.sqf @@ -18,7 +18,7 @@ params ["_conditionName", "_conditionFunc"]; -_conditionName = toLower _conditionName; +_conditionName = toLowerANSI _conditionName; private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]]; _conditions params ["_conditionNames", "_conditionFuncs"]; diff --git a/addons/common/functions/fnc_addSwayFactor.sqf b/addons/common/functions/fnc_addSwayFactor.sqf index 7a258bc12a..1cdc6fb721 100644 --- a/addons/common/functions/fnc_addSwayFactor.sqf +++ b/addons/common/functions/fnc_addSwayFactor.sqf @@ -18,7 +18,7 @@ */ params ["_type", "_code", "_id"]; -_type = toLower _type; +_type = toLowerANSI _type; if !(_type in ["baseline", "multiplier"]) exitWith { ERROR_2("%1-%2 type unsupported",_type,_id); false }; diff --git a/addons/common/functions/fnc_addSyncedEventHandler.sqf b/addons/common/functions/fnc_addSyncedEventHandler.sqf index dbe0612e95..616897842b 100644 --- a/addons/common/functions/fnc_addSyncedEventHandler.sqf +++ b/addons/common/functions/fnc_addSyncedEventHandler.sqf @@ -24,7 +24,7 @@ if (_name in GVAR(syncedEvents)) exitWith { false }; -private _eventId = [_name, FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler; +private _eventId = [_name, LINKFUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler; private _data = [_handler, [], _ttl, _eventId]; GVAR(syncedEvents) set [_name, _data]; diff --git a/addons/common/functions/fnc_addToInventory.sqf b/addons/common/functions/fnc_addToInventory.sqf index 39e6903390..9902abe82b 100644 --- a/addons/common/functions/fnc_addToInventory.sqf +++ b/addons/common/functions/fnc_addToInventory.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* * Author: Garth 'L-H' de Wet - * Adds an item, weapon, or magazine to the unit's inventory or places it in a weaponHolder if no space. + * Adds an item, weapon, or magazine to the unit's inventory or places it in a weapon holder if no space. * * Arguments: * 0: Unit @@ -11,10 +11,10 @@ * * Return Value: * 0: Added to player - * 1: weaponholder + * 1: Weapon holder item was placed in * * Example: - * [bob, "classname", "", 5] call ace_common_fnc_addToInventory + * [player, "30Rnd_65x39_caseless_mag", "", 5] call ace_common_fnc_addToInventory * * Public: Yes */ @@ -26,6 +26,7 @@ private _type = _classname call FUNC(getItemType); private _canAdd = false; private _canFitWeaponSlot = false; private _addedToUnit = false; +private _weaponHolder = _unit; switch (_container) do { case "vest": { @@ -94,11 +95,13 @@ switch (_type select 0) do { } else { _addedToUnit = false; - private _pos = _unit modelToWorldVisual [0,1,0.05]; + _weaponHolder = nearestObject [_unit, "WeaponHolder"]; - _unit = createVehicle ["WeaponHolder_Single_F", _pos, [], 0, "NONE"]; - _unit addWeaponCargoGlobal [_classname, 1]; - _unit setPosATL _pos; + if (isNull _weaponHolder || {_unit distance _weaponHolder > 2}) then { + _weaponHolder = createVehicle ["GroundWeaponHolder", _unit, [], 0, "CAN_COLLIDE"]; + }; + + _weaponHolder addWeaponCargoGlobal [_classname, 1]; }; }; @@ -112,13 +115,13 @@ switch (_type select 0) do { switch (_container) do { case "vest": { - _unit addItemToVest _classname; //@todo Bug! A full magazine, ignoring ammo. No such command. + (vestContainer _unit) addMagazineAmmoCargo [_classname, 1, _ammoCount]; }; case "backpack": { - _unit addItemToBackpack _classname; //@todo Bug! A full magazine, ignoring ammo. No such command. + (backpackContainer _unit) addMagazineAmmoCargo [_classname, 1, _ammoCount]; }; case "uniform": { - _unit addItemToUniform _classname; //@todo Bug! A full magazine, ignoring ammo. No such command. + (uniformContainer _unit) addMagazineAmmoCargo [_classname, 1, _ammoCount]; }; default { _unit addMagazine [_classname, _ammoCount]; @@ -127,11 +130,13 @@ switch (_type select 0) do { } else { _addedToUnit = false; - private _pos = _unit modelToWorldVisual [0,1,0.05]; + _weaponHolder = nearestObject [_unit, "WeaponHolder"]; - _unit = createVehicle ["WeaponHolder_Single_F", _pos, [], 0, "NONE"]; - _unit addMagazineCargoGlobal [_classname, 1/*_ammoCount*/]; //@todo Bug! This isn't really the ammo, but magazine count. No such command. - _unit setPosATL _pos; + if (isNull _weaponHolder || {_unit distance _weaponHolder > 2}) then { + _weaponHolder = createVehicle ["GroundWeaponHolder", _unit, [], 0, "CAN_COLLIDE"]; + }; + + _weaponHolder addMagazineAmmoCargo [_classname, 1, _ammoCount]; }; }; @@ -156,11 +161,13 @@ switch (_type select 0) do { } else { _addedToUnit = false; - private _pos = _unit modelToWorldVisual [0,1,0.05]; + _weaponHolder = nearestObject [_unit, "WeaponHolder"]; - _unit = createVehicle ["WeaponHolder_Single_F", _pos, [], 0, "NONE"]; - _unit addItemCargoGlobal [_classname, 1]; - _unit setPosATL _pos; + if (isNull _weaponHolder || {_unit distance _weaponHolder > 2}) then { + _weaponHolder = createVehicle ["GroundWeaponHolder", _unit, [], 0, "CAN_COLLIDE"]; + }; + + _weaponHolder addItemCargoGlobal [_classname, 1]; }; }; @@ -170,4 +177,4 @@ switch (_type select 0) do { }; }; -[_addedToUnit, _unit] +[_addedToUnit, _weaponHolder] diff --git a/addons/common/functions/fnc_adjustMagazineAmmo.sqf b/addons/common/functions/fnc_adjustMagazineAmmo.sqf new file mode 100644 index 0000000000..87d5b9e899 --- /dev/null +++ b/addons/common/functions/fnc_adjustMagazineAmmo.sqf @@ -0,0 +1,107 @@ +#include "..\script_component.hpp" +/* + * Author: Katalam, Blue, Brett Mayson, johnb43 + * Handle adjusting a magazine's ammo + * + * Arguments: + * 0: Vehicle or Unit + * 1: Item + * 2: Ammo to adjust by (default: -1) + * + * Return Value: + * How much the ammo was adjusted by + * + * Example: + * [player, "30Rnd_556x45_Stanag", 1] call ace_common_fnc_adjustMagazineAmmo; + * + * Public: No + */ + +params ["_unit", "_magazine", ["_count", -1]]; + +if (_count == 0) exitWith {0}; + +private _containers = if (_unit isKindOf "CAManBase") then { + [uniformContainer _unit, vestContainer _unit, backpackContainer _unit] +} else { + [_unit] +}; + +scopeName "main"; + +private _originalCount = _count; +private _container = objNull; +private _magazinesContainer = []; +private _newAmmoCount = 0; +private _removeAmmo = _count < 0; +private _maxMagazineAmmo = getNumber (configFile >> "CfgMagazines" >> _magazine >> "count"); + +{ + _container = _x; + + // Get all magazines of _magazine type + _magazinesContainer = (magazinesAmmoCargo _container) select {_x select 0 == _magazine}; + + // Get the ammo count, filter out magazines with 0 ammo + _magazinesContainer = (_magazinesContainer apply {_x select 1}) select {_x != 0}; + + // If there are none, skip to next container + if (_magazinesContainer isEqualTo []) then { + continue; + }; + + // Sort, smallest first when removing, largest first when adding + _magazinesContainer sort _removeAmmo; + + if (_removeAmmo) then { + { + _count = _x + _count; + + _container addMagazineAmmoCargo [_magazine, -1, _x]; + + if (_count >= 0) then { + // Only add magazine back if it's not empty + if (_count != 0) then { + _container addMagazineAmmoCargo [_magazine, 1, _count]; + }; + + _originalCount breakOut "main"; + }; + } forEach _magazinesContainer; + } else { + // This loop only fills up partially filled magazines + { + // Fill the magazine to either its max or until all ammo has been added + _newAmmoCount = (_x + _count) min _maxMagazineAmmo; + + if (_newAmmoCount <= _maxMagazineAmmo) then { + _container addMagazineAmmoCargo [_magazine, -1, _x]; + _container addMagazineAmmoCargo [_magazine, 1, _newAmmoCount]; + }; + + // Remove the ammo that was added + _count = _count - (_newAmmoCount - _x); + + if (_count <= 0) then { + _originalCount breakOut "main"; + }; + } forEach (_magazinesContainer select {_x < _maxMagazineAmmo}); + }; +} forEach _containers; + +// If there is still remaining ammo to add, try add it after having iterated through all containers +if (!_removeAmmo && _count > 0) then { + { + while {_count > 0 && {_x canAdd [_magazine, 1/* 2.18 , true*/]}} do { + _x addMagazineAmmoCargo [_magazine, 1, _count]; + + _count = _count - _maxMagazineAmmo; + }; + } forEach _containers; + + if (_count <= 0) then { + _originalCount breakOut "main"; + }; +}; + +_originalCount - _count diff --git a/addons/common/functions/fnc_assignObjectsInList.sqf b/addons/common/functions/fnc_assignObjectsInList.sqf index 23d373c310..0928812cd4 100644 --- a/addons/common/functions/fnc_assignObjectsInList.sqf +++ b/addons/common/functions/fnc_assignObjectsInList.sqf @@ -28,18 +28,13 @@ if (_list isEqualType "") then { }; { - if (!isNil "_x") then { - if (_x isEqualType objNull) then { - if (local _x) then { - if (_vehicle) then { - (vehicle _x) setVariable [_variable, _setting, _global]; - TRACE_6("Set variable vehicle",_x,vehicle _x,typeOf (vehicle _x),_variable,_setting,_global); - } else { - _x setVariable [_variable, _setting, _global]; - TRACE_5("Set variable",_x,typeOf _x,_variable,_setting,_global); - }; - }; + if (!isNil "_x" && {_x isEqualType objNull} && {local _x}) then { + if (_vehicle) then { + (vehicle _x) setVariable [_variable, _setting, _global]; + TRACE_6("Set variable vehicle",_x,vehicle _x,typeOf (vehicle _x),_variable,_setting,_global); + } else { + _x setVariable [_variable, _setting, _global]; + TRACE_5("Set variable",_x,typeOf _x,_variable,_setting,_global); }; }; - false -} count _list; +} forEach _list; diff --git a/addons/common/functions/fnc_cachedCall.sqf b/addons/common/functions/fnc_cachedCall.sqf index 0062aec1f3..dbf81b7676 100644 --- a/addons/common/functions/fnc_cachedCall.sqf +++ b/addons/common/functions/fnc_cachedCall.sqf @@ -9,7 +9,7 @@ * 2: Namespace to store the cache on * 3: Cache uid * 4: Max duration of the cache - * 5: Event that clears the cache (default: nil) + * 5: Events that clear the cache (default: nil) * * Return Value: * Result of the function @@ -20,41 +20,46 @@ * Public: No */ -params ["_params", "_function", "_namespace", "_uid", "_duration", "_event"]; +params ["_params", "_function", "_namespace", "_uid", "_duration", "_events"]; if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then { _namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]]; // Does the cache need to be cleared on an event? - if (!isNil "_event") then { - private _varName = format [QGVAR(clearCache_%1), _event]; - private _cacheList = missionNamespace getVariable _varName; - - // If there was no EH to clear these caches, add one - if (isNil "_cacheList") then { - _cacheList = []; - missionNamespace setVariable [_varName, _cacheList]; - - [_event, { - #ifdef DEBUG_MODE_FULL - INFO_1("Clear cached variables on event: %1",_eventName); - #endif - // Get the list of caches to clear - //IGNORE_PRIVATE_WARNING ["_eventName"]; - // _eventName is defined on the function that calls the event - private _varName = format [QGVAR(clearCache_%1), _eventName]; - private _cacheList = missionNamespace getVariable [_varName, []]; - // Erase all the cached results - { - _x call FUNC(eraseCache); - } forEach _cacheList; - // Empty the list - missionNamespace setVariable [_varName, []]; - }] call CBA_fnc_addEventHandler; + if (!isNil "_events") then { + if (_events isEqualType "") then { + _events = [_events]; }; + { + private _event = _x; + private _varName = format [QGVAR(clearCache_%1), _event]; + private _cacheList = missionNamespace getVariable _varName; - // Add this cache to the list of the event - _cacheList pushBack [_namespace, _uid]; + // If there was no EH to clear these caches, add one + if (isNil "_cacheList") then { + _cacheList = []; + missionNamespace setVariable [_varName, _cacheList]; + + [_event, { + #ifdef DEBUG_MODE_FULL + INFO_1("Clear cached variables on event: %1",_eventName); + #endif + // Get the list of caches to clear + //IGNORE_PRIVATE_WARNING ["_eventName"]; + // _eventName is defined on the function that calls the event + private _varName = format [QGVAR(clearCache_%1), _eventName]; + private _cacheList = missionNamespace getVariable [_varName, []]; + // Erase all the cached results + { + _x call FUNC(eraseCache); + } forEach _cacheList; + // Empty the list + missionNamespace setVariable [_varName, []]; + }] call CBA_fnc_addEventHandler; + }; + // Add this cache to the list of the event + _cacheList pushBack [_namespace, _uid]; + } forEach _events; }; #ifdef DEBUG_MODE_FULL diff --git a/addons/common/functions/fnc_canGetInPosition.sqf b/addons/common/functions/fnc_canGetInPosition.sqf index d78e623d7b..777f3103a5 100644 --- a/addons/common/functions/fnc_canGetInPosition.sqf +++ b/addons/common/functions/fnc_canGetInPosition.sqf @@ -24,7 +24,7 @@ params ["_unit", "_vehicle", "_position", ["_checkDistance", false], ["_index", -1]]; -_position = toLower _position; +_position = toLowerANSI _position; // general if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false}; diff --git a/addons/common/functions/fnc_canInteractWith.sqf b/addons/common/functions/fnc_canInteractWith.sqf index 4cbcb1c19d..dd684d0619 100644 --- a/addons/common/functions/fnc_canInteractWith.sqf +++ b/addons/common/functions/fnc_canInteractWith.sqf @@ -19,7 +19,7 @@ params ["_unit", "_target", ["_exceptions", []]]; -_exceptions = _exceptions apply {toLower _x}; +_exceptions = _exceptions apply {toLowerANSI _x}; private _owner = _target getVariable [QGVAR(owner), objNull]; diff --git a/addons/common/functions/fnc_cbaSettings.sqf b/addons/common/functions/fnc_cbaSettings.sqf index 3e6f66fa42..29e4d532b1 100644 --- a/addons/common/functions/fnc_cbaSettings.sqf +++ b/addons/common/functions/fnc_cbaSettings.sqf @@ -66,8 +66,7 @@ GVAR(settingsMovedToSQF) = []; INFO_1("%1 delayed functions running.",count GVAR(runAtSettingsInitialized)); { (_x select 1) call (_x select 0); - false - } count GVAR(runAtSettingsInitialized); + } forEach GVAR(runAtSettingsInitialized); GVAR(runAtSettingsInitialized) = nil; //cleanup #ifdef DEBUG_MODE_FULL @@ -104,7 +103,7 @@ TRACE_1("Reading settings from missionConfigFile",_countOptions); for "_index" from 0 to (_countOptions - 1) do { private _optionEntry = _missionSettingsConfig select _index; private _settingName = configName _optionEntry; - if ((toLower _settingName) in GVAR(cbaSettings_forcedSettings)) then { + if ((toLowerANSI _settingName) in GVAR(cbaSettings_forcedSettings)) then { WARNING_1("Setting [%1] - Already Forced - ignoring missionConfig",_varName); } else { if ((isNil _settingName) && {(getNumber (_settingsConfig >> _settingName >> "movedToSQF")) == 0}) then { diff --git a/addons/common/functions/fnc_cbaSettings_convertHelper.sqf b/addons/common/functions/fnc_cbaSettings_convertHelper.sqf index b7ef446cf6..02fdfa0193 100644 --- a/addons/common/functions/fnc_cbaSettings_convertHelper.sqf +++ b/addons/common/functions/fnc_cbaSettings_convertHelper.sqf @@ -44,7 +44,7 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x private _cbaIsGlobal = (!_isClientSettable) || _isForced; private _warnIfChangedMidMission = _cbaIsGlobal && {(getNumber (_config >> "canBeChanged")) == 0}; - if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLower _varName);}; + if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLowerANSI _varName);}; // Basic handling of setting types CBA doesn't support: if (_typeName == "ARRAY") exitWith { diff --git a/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf index d3a6f29f84..57b93c9963 100644 --- a/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf +++ b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf @@ -34,7 +34,7 @@ private _category = getText (_config >> "category"); private _cbaIsGlobal = (!_isClientSettable) || _isForced; private _warnIfChangedMidMission = _cbaIsGlobal && {(getNumber (_config >> "canBeChanged")) == 0}; -if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLower _varName);}; +if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLowerANSI _varName);}; // Basic handling of setting types CBA doesn't support: if (_typeName == "ARRAY") exitWith { @@ -103,4 +103,3 @@ private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescrip TRACE_1("returned",_return); if ((isNil "_return") || {!_return}) then {ERROR_1("Setting [%1] - CBA Error",_varName);}; _return - diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 47de2290dd..39e2bac3ac 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -40,7 +40,7 @@ if ([_cbaRequiredAr, _cbaVersionAr] call cba_versioning_fnc_version_compare) the }; //private _addons = activatedAddons; // broken with High-Command module, see #2134 -private _addons = (cba_common_addons select {(_x select [0,4]) == "ace_"}) apply {toLower _x}; +private _addons = (cba_common_addons select {(_x select [0,4]) == "ace_"}) apply {toLowerANSI _x}; private _oldAddons = []; private _oldSources = []; private _oldCompats = []; @@ -87,7 +87,7 @@ if (_oldCompats isNotEqualTo []) then { /////////////// // check extensions /////////////// -private _platform = toLower (productVersion select 6); +private _platform = toLowerANSI (productVersion select 6); if (!isServer && {_platform in ["linux", "osx"]}) then { // Linux and OSX client ports do not support extensions at all INFO("Operating system does not support extensions"); diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index f69f486d5e..cb192c6667 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -25,7 +25,7 @@ params ["_mode", ["_checkAll", false], ["_whitelist", "", [""]]]; TRACE_3("params",_mode,_checkAll,_whitelist); //lowercase and convert whiteList String into array of strings: -_whitelist = toLower _whitelist; +_whitelist = toLowerANSI _whitelist; _whitelist = _whitelist splitString "[,""']"; TRACE_1("Array",_whitelist); diff --git a/addons/common/functions/fnc_disableUserInput.sqf b/addons/common/functions/fnc_disableUserInput.sqf index 3774a3fc29..8db3c7e811 100644 --- a/addons/common/functions/fnc_disableUserInput.sqf +++ b/addons/common/functions/fnc_disableUserInput.sqf @@ -95,7 +95,7 @@ if (_state) then { // Check if the necessary keys were pressed for a keybind _return = _comboDikPressed && {_mainDevice == "KEYBOARD"} && - {((GVAR(keyboardInputMain) getOrDefault [_mainDik, [false, 0]]) select 1) > ([0, 1] select _isDoubleTap)}; // check how many times the main key was pressed + {((GVAR(keyboardInputMain) getOrDefault [_mainDik, [false, 0]]) select 1) > (parseNumber _isDoubleTap)}; // check how many times the main key was pressed // Keybind was detected if (_return) exitWith { diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index 1b307fdf33..da08fa832a 100644 --- a/addons/common/functions/fnc_displayIcon.sqf +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -53,8 +53,7 @@ private _refresh = { { ctrlDelete _x; - false - } count _allControls; + } forEach _allControls; _allControls = []; @@ -80,7 +79,6 @@ private _refresh = { _ctrl ctrlSetTextColor _xcolor; _ctrl ctrlCommit 0; _allControls pushBack _ctrl; - false } forEach (missionNamespace getVariable [QGVAR(displayIconList),[]]); }; @@ -116,8 +114,7 @@ if (_show) then { if (_x select 0 != _iconId) then { _newList pushBack _x; }; - false - } count _list; + } forEach _list; missionNamespace setVariable [QGVAR(displayIconList), _newList]; call _refresh; diff --git a/addons/common/functions/fnc_dumpArray.sqf b/addons/common/functions/fnc_dumpArray.sqf index 754b811314..87437c37e2 100644 --- a/addons/common/functions/fnc_dumpArray.sqf +++ b/addons/common/functions/fnc_dumpArray.sqf @@ -34,8 +34,7 @@ if (IS_ARRAY(_var)) then { { [_x, _depth] call FUNC(dumpArray); - false - } count _var; + } forEach _var; diag_log text format ["%1],", _pad]; }; diff --git a/addons/common/functions/fnc_dumpPerformanceCounters.sqf b/addons/common/functions/fnc_dumpPerformanceCounters.sqf index fa0b4e4e6d..309b82c673 100644 --- a/addons/common/functions/fnc_dumpPerformanceCounters.sqf +++ b/addons/common/functions/fnc_dumpPerformanceCounters.sqf @@ -25,8 +25,7 @@ if (!isNil "ACE_PFH_COUNTER") then { private _isActive = ["ACTIVE", "REMOVED"] select isNil {CBA_common_PFHhandles select (_pfh select 0)}; diag_log text format ["Registered PFH: id=%1 [%2, delay %3], %4:%5", _pfh select 0, _isActive, _parameters select 1, _pfh select 1, _pfh select 2]; - false - } count ACE_PFH_COUNTER; + } forEach ACE_PFH_COUNTER; }; diag_log text format ["ACE COUNTER RESULTS"]; @@ -50,8 +49,7 @@ diag_log text format ["-------------------------------------------"]; }; _iter = _iter + 1; - false - } count _counterEntry; + } forEach _counterEntry; // results _averageResult = (_total / _count) * 1000; @@ -61,8 +59,7 @@ diag_log text format ["-------------------------------------------"]; } else { diag_log text format ["%1: No results", _counterEntry select 0]; }; - false -} count ACE_COUNTERS; +} forEach ACE_COUNTERS; /* // Dump PFH Trackers diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index cee874782a..2c0c32994d 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -50,8 +50,7 @@ if (_unit isKindOf "CAManBase") then { _gunner = _unit turretUnit _x; _turret = _x; }; - false - } count allTurrets [_unit, true]; + } forEach allTurrets [_unit, true]; // Ensure that at least the pilot is returned if there is no gunner if (isManualFire _unit && {isNull _gunner}) then { _gunner = effectiveCommander _unit; diff --git a/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf b/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf index 4e8aa1ec2a..8982d6bbad 100644 --- a/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf +++ b/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf @@ -17,6 +17,6 @@ params ["_unit"]; -if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"} && {vehicle _unit == _unit}) then { +if (currentWeapon _unit != "" && {currentWeapon _unit == primaryWeapon _unit} && {weaponLowered _unit} && {stance _unit == "STAND"} && {isNull objectParent _unit}) then { [_unit, "amovpercmstpsraswrfldnon", 0] call FUNC(doAnimation); }; diff --git a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf index 6642a09789..081836c196 100644 --- a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf +++ b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf @@ -35,7 +35,6 @@ private _return = []; _return pushBack [_x select 0, typeName _val, _val, _x select 2, _x select 5]; }; }; - false -} count GVAR(OBJECT_VARIABLES_STORAGE); +} forEach GVAR(OBJECT_VARIABLES_STORAGE); _return diff --git a/addons/common/functions/fnc_getConfigName.sqf b/addons/common/functions/fnc_getConfigName.sqf index 54ebf84343..3495014d55 100644 --- a/addons/common/functions/fnc_getConfigName.sqf +++ b/addons/common/functions/fnc_getConfigName.sqf @@ -17,7 +17,7 @@ params ["_className"]; -(uiNamespace getVariable QGVAR(configNames)) getOrDefaultCall [toLower _className, { +(uiNamespace getVariable QGVAR(configNames)) getOrDefaultCall [toLowerANSI _className, { private _config = configNull; { diff --git a/addons/common/functions/fnc_getCountOfItem.sqf b/addons/common/functions/fnc_getCountOfItem.sqf index 5667b6c980..5114f375d2 100644 --- a/addons/common/functions/fnc_getCountOfItem.sqf +++ b/addons/common/functions/fnc_getCountOfItem.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: Dedmen + * Author: Dedmen, Blue, johnb43 * Return how many items of type _itemType the player has in his containers (Uniform, Vest, Backpack) * Doesn't count assignedItems, weapons, weapon attachments, magazines in weapons * @@ -19,13 +19,17 @@ params ["_unit", "_itemType"]; -private _countItemsInContainer = { - (getItemCargo _this) params ["_itemTypes", "_itemCounts"]; +private _count = 0; +private _isMagazine = isClass (configFile >> "CfgMagazines" >> _itemType); - private _index = _itemTypes find _itemType; - _itemCounts param [_index, 0] -}; +{ + (if (_isMagazine) then { + getMagazineCargo _x + } else { + getItemCargo _x + }) params ["_itemTypes", "_itemCounts"]; -((uniformContainer _unit) call _countItemsInContainer) + -((vestContainer _unit) call _countItemsInContainer) + -((backpackContainer _unit) call _countItemsInContainer) + _count = _count + (_itemCounts param [_itemTypes find _itemType, 0]); +} forEach [uniformContainer _unit, vestContainer _unit, backpackContainer _unit]; + +_count diff --git a/addons/common/functions/fnc_getDeathAnim.sqf b/addons/common/functions/fnc_getDeathAnim.sqf index 4d2e53d3da..18c6c93c07 100644 --- a/addons/common/functions/fnc_getDeathAnim.sqf +++ b/addons/common/functions/fnc_getDeathAnim.sqf @@ -29,7 +29,7 @@ private _unitActionsCfg = configFile >> "CfgMovesBasic" >> "Actions" >> getText TRACE_2("Animation/Action",configName _unitAnimationCfg,configName _unitActionsCfg); -if (vehicle _unit != _unit) then { +if (!isNull objectParent _unit) then { private _interpolateArray = getArray (_unitAnimationCfg >> "interpolateTo"); for "_index" from 0 to (count _interpolateArray - 1) step 2 do { diff --git a/addons/common/functions/fnc_getDefaultAnim.sqf b/addons/common/functions/fnc_getDefaultAnim.sqf index 788fd2b6bd..bd294ba0c0 100644 --- a/addons/common/functions/fnc_getDefaultAnim.sqf +++ b/addons/common/functions/fnc_getDefaultAnim.sqf @@ -17,7 +17,7 @@ params ["_unit"]; -private _anim = toLower animationState _unit; +private _anim = toLowerANSI animationState _unit; // stance is broken for some animations. private _stance = stance _unit; diff --git a/addons/common/functions/fnc_getDoorTurrets.sqf b/addons/common/functions/fnc_getDoorTurrets.sqf index fb652cfd1a..1b6f22152a 100644 --- a/addons/common/functions/fnc_getDoorTurrets.sqf +++ b/addons/common/functions/fnc_getDoorTurrets.sqf @@ -29,7 +29,6 @@ private _doorTurrets = []; if (((getNumber (_config >> "isCopilot")) == 0) && {count getArray (_config >> "weapons") > 0}) then { _doorTurrets pushBack _x; }; - false -} count _turrets; +} forEach _turrets; _doorTurrets diff --git a/addons/common/functions/fnc_getGunner.sqf b/addons/common/functions/fnc_getGunner.sqf index ffa0334a26..376f18070e 100644 --- a/addons/common/functions/fnc_getGunner.sqf +++ b/addons/common/functions/fnc_getGunner.sqf @@ -19,7 +19,7 @@ params [["_vehicle", objNull, [objNull]], ["_weapon", "", [""]]]; // on foot -if (gunner _vehicle == _vehicle && {_weapon in weapons _vehicle || {toLower _weapon in ["throw", "put"]}}) exitWith {gunner _vehicle}; +if (gunner _vehicle == _vehicle && {_weapon in weapons _vehicle || {toLowerANSI _weapon in ["throw", "put"]}}) exitWith {gunner _vehicle}; // inside vehicle private _gunner = objNull; @@ -28,8 +28,7 @@ private _gunner = objNull; if (_weapon in (_vehicle weaponsTurret _x)) exitWith { _gunner = _vehicle turretUnit _x; }; - false -} count allTurrets [_vehicle, true]; +} forEach allTurrets [_vehicle, true]; // ensure that at least the pilot is returned if there is no gunner if (isManualFire _vehicle && {isNull _gunner}) then { diff --git a/addons/common/functions/fnc_getInPosition.sqf b/addons/common/functions/fnc_getInPosition.sqf index fdbad3ee4a..076fd7a23c 100644 --- a/addons/common/functions/fnc_getInPosition.sqf +++ b/addons/common/functions/fnc_getInPosition.sqf @@ -23,7 +23,7 @@ params ["_unit", "_vehicle", "_position", ["_index", -1]]; -_position = toLower _position; +_position = toLowerANSI _position; // general if (!alive _vehicle || {locked _vehicle > 1}) exitWith {false}; @@ -38,8 +38,7 @@ private _enemiesInVehicle = false; //Possible Side Restriction { if (side _unit getFriend side _x < 0.6) exitWith {_enemiesInVehicle = true}; - false -} count crew _vehicle; +} forEach crew _vehicle; switch (_position) do { case "driver" : { diff --git a/addons/common/functions/fnc_getItemType.sqf b/addons/common/functions/fnc_getItemType.sqf index e39605f0cc..49f1b757da 100644 --- a/addons/common/functions/fnc_getItemType.sqf +++ b/addons/common/functions/fnc_getItemType.sqf @@ -67,7 +67,7 @@ switch (true) do { case (_type == TYPE_UNIFORM): {["item", "uniform"]}; case (_type == TYPE_BINOCULAR_AND_NVG): { - switch (toLower _simulation) do { + switch (toLowerANSI _simulation) do { case ("weapon"): {["weapon", "binocular"]}; case ("binocular"): {["weapon", "binocular"]}; case ("nvgoggles"): {["item", "nvgoggles"]}; @@ -78,7 +78,7 @@ switch (true) do { case (_type == TYPE_WEAPON_VEHICLE): {["weapon", "vehicle"]}; case (_type == TYPE_ITEM): { - switch (toLower _simulation) do { + switch (toLowerANSI _simulation) do { case ("itemmap"): {["item", "map"]}; case ("itemgps"): {["item", "gps"]}; case ("itemradio"): {["item", "radio"]}; diff --git a/addons/common/functions/fnc_getMapData.sqf b/addons/common/functions/fnc_getMapData.sqf index b4cb56d75f..379210ec8f 100644 --- a/addons/common/functions/fnc_getMapData.sqf +++ b/addons/common/functions/fnc_getMapData.sqf @@ -16,7 +16,7 @@ */ params ["_map"]; -_map = toLower _map; +_map = toLowerANSI _map; // [latitude, altitude] diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf index f37e146288..daa4bd86cd 100644 --- a/addons/common/functions/fnc_getMapGridData.sqf +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -38,13 +38,12 @@ private _stepY = 1e10; _stepX = getNumber (_x >> "stepX"); _stepY = getNumber (_x >> "stepY"); }; - false -} count configProperties [_cfgGrid, "isClass _x", false]; +} forEach configProperties [_cfgGrid, "isClass _x", false]; private _letterGrid = false; -if (toLower _formatX find "a" != -1) then {_letterGrid = true}; -if (toLower _formatY find "a" != -1) then {_letterGrid = true}; +if (toLowerANSI _formatX find "a" != -1) then {_letterGrid = true}; +if (toLowerANSI _formatY find "a" != -1) then {_letterGrid = true}; if (_letterGrid) exitWith { WARNING_3("Map Grid Warning (%1) - Map uses letter grids [%2, %3]",worldName,_formatX,_formatY); diff --git a/addons/common/functions/fnc_getNumberMagazinesIn.sqf b/addons/common/functions/fnc_getNumberMagazinesIn.sqf index fc2c3d0605..b71e6729dd 100644 --- a/addons/common/functions/fnc_getNumberMagazinesIn.sqf +++ b/addons/common/functions/fnc_getNumberMagazinesIn.sqf @@ -25,8 +25,7 @@ if (_unit isKindOf "CAManBase") then { } else { { _return = _return + ({_x == _magazine} count magazines _x); - false - } count crew _unit; + } forEach crew _unit; (getMagazineCargo _unit) params [["_magNames", []], ["_magCount", []]]; { diff --git a/addons/common/functions/fnc_getTurretIndex.sqf b/addons/common/functions/fnc_getTurretIndex.sqf index dcbaafb3b2..75deced412 100644 --- a/addons/common/functions/fnc_getTurretIndex.sqf +++ b/addons/common/functions/fnc_getTurretIndex.sqf @@ -24,7 +24,6 @@ scopeName "main"; { if (_unit == (_vehicle turretUnit _x)) then {_x breakOut "main"}; - nil -} count allTurrets [_vehicle, true]; +} forEach allTurrets [_vehicle, true]; [] diff --git a/addons/common/functions/fnc_getVehicleCrew.sqf b/addons/common/functions/fnc_getVehicleCrew.sqf index 00a90b1ab2..a1bc06f6ab 100644 --- a/addons/common/functions/fnc_getVehicleCrew.sqf +++ b/addons/common/functions/fnc_getVehicleCrew.sqf @@ -29,11 +29,10 @@ private _crew = []; }; } else { // otherwise check if we search for that type. toLower, because fullCrew returns "driver" vs. "Turret". - if (toLower (_x select 1) in _types) then { + if (toLowerANSI (_x select 1) in _types) then { _crew pushBack (_x select 0); }; }; - false -} count fullCrew _vehicle; +} forEach fullCrew _vehicle; _crew diff --git a/addons/common/functions/fnc_getVehicleIcon.sqf b/addons/common/functions/fnc_getVehicleIcon.sqf index 208bb144d8..c63d54a8d8 100644 --- a/addons/common/functions/fnc_getVehicleIcon.sqf +++ b/addons/common/functions/fnc_getVehicleIcon.sqf @@ -32,7 +32,7 @@ if (isNil "_cachedValue") then { private _vehicleIconValue = getText (configfile >> "CfgVehicleIcons" >> _vehicleValue); if (_vehicleIconValue == "") then { - if (_vehicleValue != "" && {((toLower _vehicleValue) find ".paa") > -1}) then { + if (_vehicleValue != "" && {((toLowerANSI _vehicleValue) find ".paa") > -1}) then { _cachedValue = _vehicleValue; } else { _cachedValue = DEFAULT_TEXTURE; diff --git a/addons/common/functions/fnc_getWeaponModes.sqf b/addons/common/functions/fnc_getWeaponModes.sqf index 55e260ef27..c1ca241cab 100644 --- a/addons/common/functions/fnc_getWeaponModes.sqf +++ b/addons/common/functions/fnc_getWeaponModes.sqf @@ -29,7 +29,6 @@ private _modes = []; if (_x == "this") then { _modes pushBack _weapon; }; - false -} count getArray (_config >> "modes"); +} forEach getArray (_config >> "modes"); _modes diff --git a/addons/common/functions/fnc_getWeaponState.sqf b/addons/common/functions/fnc_getWeaponState.sqf index 7ccb016c7a..2fadbd23ea 100644 --- a/addons/common/functions/fnc_getWeaponState.sqf +++ b/addons/common/functions/fnc_getWeaponState.sqf @@ -42,7 +42,6 @@ private _ammo = _muzzles apply {0}; _ammo set [_index, _x select 1]; }; }; - false -} count magazinesAmmoFull _unit; +} forEach magazinesAmmoFull _unit; [_attachments, _muzzles, _magazines, _ammo]; diff --git a/addons/common/functions/fnc_goKneeling.sqf b/addons/common/functions/fnc_goKneeling.sqf index 881fad7669..303a413385 100644 --- a/addons/common/functions/fnc_goKneeling.sqf +++ b/addons/common/functions/fnc_goKneeling.sqf @@ -18,7 +18,7 @@ params ["_unit"]; // Animation changes even inside vehicle post-1.60 -if (stance _unit == "PRONE" || {vehicle _unit != _unit} || {_unit call EFUNC(common,isSwimming)}) exitWith {}; +if (stance _unit == "PRONE" || {!isNull objectParent _unit} || {_unit call EFUNC(common,isSwimming)}) exitWith {}; [ _unit, diff --git a/addons/common/functions/fnc_moduleLSDVehicles.sqf b/addons/common/functions/fnc_moduleLSDVehicles.sqf index fde230b0ca..35e1f07eba 100644 --- a/addons/common/functions/fnc_moduleLSDVehicles.sqf +++ b/addons/common/functions/fnc_moduleLSDVehicles.sqf @@ -28,8 +28,7 @@ if (isNil QGVAR(LSD_Vehicles)) then { if (_hSCount > 0) then { GVAR(LSD_Vehicles) pushBack [_x, _hSCount]; }; - nil -} count _units; +} forEach _units; if (isNil QGVAR(LSD_Colors)) then { GVAR(LSD_Colors) = [ @@ -51,8 +50,7 @@ if (isNil QGVAR(LSD_PFH)) then { for "_i" from 0 to (_hSCount - 1) do { _vehicle setObjectTexture [_i, GVAR(LSD_Colors) select _index]; }; - nil - } count GVAR(LSD_Vehicles); + } forEach GVAR(LSD_Vehicles); _index = ((_index + 1) % 7) mod count GVAR(LSD_Colors); (_this select 0) set [0, _index]; diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf index 93ceccf17d..a559994bfa 100644 --- a/addons/common/functions/fnc_parseList.sqf +++ b/addons/common/functions/fnc_parseList.sqf @@ -32,8 +32,7 @@ private _whitespaceList = []; } else { _whitespaceList pushBack ([_x] call CBA_fnc_trim); }; - false -} count _list; +} forEach _list; _list = _whitespaceList; TRACE_1("Whitespace List",_list); @@ -46,8 +45,7 @@ if (_checkNil) then { if (!isNil _x) then { _nilCheckedList pushBack (missionNamespace getVariable _x); }; - false - } count _list; + } forEach _list; _list = _nilCheckedList; }; diff --git a/addons/common/functions/fnc_playConfigSound3D.sqf b/addons/common/functions/fnc_playConfigSound3D.sqf index 788a2a6b4e..1069cf0f18 100644 --- a/addons/common/functions/fnc_playConfigSound3D.sqf +++ b/addons/common/functions/fnc_playConfigSound3D.sqf @@ -35,7 +35,7 @@ ISNILS(_distance,_cfgDistance); _fileName = _fileName select [1]; // add file extension .wss as default -if !(toLower (_fileName select [count _fileName - 4]) in [".wav", ".ogg", ".wss"]) then { +if !(toLowerANSI (_fileName select [count _fileName - 4]) in [".wav", ".ogg", ".wss"]) then { ADD(_fileName,".wss"); }; TRACE_5("vars",_fileName,_posASL,_volume,_pitch,_distance); diff --git a/addons/common/functions/fnc_removeCanInteractWithCondition.sqf b/addons/common/functions/fnc_removeCanInteractWithCondition.sqf index 9cc3fda3c3..6c5e8b56b6 100644 --- a/addons/common/functions/fnc_removeCanInteractWithCondition.sqf +++ b/addons/common/functions/fnc_removeCanInteractWithCondition.sqf @@ -17,7 +17,7 @@ params ["_conditionName"]; -_conditionName = toLower _conditionName; +_conditionName = toLowerANSI _conditionName; private _conditions = missionNamespace getVariable [QGVAR(InteractionConditions), [[],[]]]; diff --git a/addons/common/functions/fnc_resetAllDefaults.sqf b/addons/common/functions/fnc_resetAllDefaults.sqf index 4d9f42a13b..ef74724183 100644 --- a/addons/common/functions/fnc_resetAllDefaults.sqf +++ b/addons/common/functions/fnc_resetAllDefaults.sqf @@ -27,8 +27,7 @@ if (isPlayer _unit) then { // clear all disable user input { [_x, false] call FUNC(setDisableUserInputStatus); - false - } count GVAR(DISABLE_USER_INPUT_COLLECTION); + } forEach GVAR(DISABLE_USER_INPUT_COLLECTION); }; }; @@ -36,5 +35,4 @@ if (isPlayer _unit) then { if !(_x select 4) then { _unit setVariable [_x select 0, nil, _x select 3]; }; - false -} count ([_unit] call FUNC(getAllDefinedSetVariables)); +} forEach ([_unit] call FUNC(getAllDefinedSetVariables)); diff --git a/addons/common/functions/fnc_restoreVariablesJIP.sqf b/addons/common/functions/fnc_restoreVariablesJIP.sqf index 905353d8ab..ac22cd3fa0 100644 --- a/addons/common/functions/fnc_restoreVariablesJIP.sqf +++ b/addons/common/functions/fnc_restoreVariablesJIP.sqf @@ -24,6 +24,4 @@ _respawnVariables pushBack "ACE_PersistentFunctions"; { _unit setVariable [_x, _unit getVariable _x, true]; - false -} count _respawnVariables; -nil +} forEach _respawnVariables; diff --git a/addons/common/functions/fnc_rscObjectHelper.sqf b/addons/common/functions/fnc_rscObjectHelper.sqf index c7d1342de9..95ddb2f74b 100644 --- a/addons/common/functions/fnc_rscObjectHelper.sqf +++ b/addons/common/functions/fnc_rscObjectHelper.sqf @@ -30,7 +30,7 @@ private _bottomRightY = 1; private _return = []; -switch (toLower _func) do { +switch (toLowerANSI _func) do { case ("2d"): { _array params ["_pointX", "_z", "_pointY"]; diff --git a/addons/common/functions/fnc_sanitizeString.sqf b/addons/common/functions/fnc_sanitizeString.sqf index c30cbe1292..7d0b2dd2f1 100644 --- a/addons/common/functions/fnc_sanitizeString.sqf +++ b/addons/common/functions/fnc_sanitizeString.sqf @@ -47,7 +47,6 @@ private _array = []; _array pushBack _x; }; }; - false -} count toArray _string; +} forEach toArray _string; toString _array // return diff --git a/addons/common/functions/fnc_statusEffect_addType.sqf b/addons/common/functions/fnc_statusEffect_addType.sqf index c7bd61762e..5535b0d914 100644 --- a/addons/common/functions/fnc_statusEffect_addType.sqf +++ b/addons/common/functions/fnc_statusEffect_addType.sqf @@ -32,6 +32,6 @@ GVAR(statusEffect_sendJIP) pushBack _sendJIP; //We add reasons at any time, but more efficenet to add all common ones at one time during init if (isServer && {_commonReasonsArray isNotEqualTo []}) then { //Switch case to lower: - _commonReasonsArray = _commonReasonsArray apply { toLower _x }; + _commonReasonsArray = _commonReasonsArray apply { toLowerANSI _x }; missionNamespace setVariable [(format [QGVAR(statusEffects_%1), _name]), _commonReasonsArray, true]; }; diff --git a/addons/common/functions/fnc_statusEffect_set.sqf b/addons/common/functions/fnc_statusEffect_set.sqf index 6e8a74bd3e..a4bf352a56 100644 --- a/addons/common/functions/fnc_statusEffect_set.sqf +++ b/addons/common/functions/fnc_statusEffect_set.sqf @@ -32,7 +32,7 @@ if (isNull _object) exitWith {TRACE_1("null",_object);}; [_object, true] call FUNC(statusEffect_resetVariables); //Check for mismatch, and set object ref //check ID case and set globally if not already set: -_ID = toLower _ID; +_ID = toLowerANSI _ID; private _statusReasons = missionNamespace getVariable [(format [QGVAR(statusEffects_%1), _effectName]), []]; private _statusIndex = _statusReasons find _ID; if (_statusIndex == -1) then { diff --git a/addons/common/functions/fnc_swayLoop.sqf b/addons/common/functions/fnc_swayLoop.sqf index 069d908d1a..adbc32053f 100644 --- a/addons/common/functions/fnc_swayLoop.sqf +++ b/addons/common/functions/fnc_swayLoop.sqf @@ -17,12 +17,12 @@ private _baseline = 1; if (GVAR(swayFactorsBaseline) isNotEqualTo []) then { - _baseline = 1 max ([missionNamespace, "ACE_setCustomAimCoef_baseline", "max"] call EFUNC(common,arithmeticGetResult)); + _baseline = 1 max ([missionNamespace, "ACE_setCustomAimCoef_baseline", "max"] call FUNC(arithmeticGetResult)); }; private _multiplier = 1; if (GVAR(swayFactorsMultiplier) isNotEqualTo []) then { - _multiplier = [missionNamespace, "ACE_setCustomAimCoef_multiplier", "product"] call EFUNC(common,arithmeticGetResult); + _multiplier = [missionNamespace, "ACE_setCustomAimCoef_multiplier", "product"] call FUNC(arithmeticGetResult); }; ACE_player setCustomAimCoef (_baseline * _multiplier); diff --git a/addons/common/functions/fnc_switchToGroupSide.sqf b/addons/common/functions/fnc_switchToGroupSide.sqf index 94d8c52701..1a3e588855 100644 --- a/addons/common/functions/fnc_switchToGroupSide.sqf +++ b/addons/common/functions/fnc_switchToGroupSide.sqf @@ -58,7 +58,7 @@ if (_switch) then { private _newGroup = createGroup (_x select 1); [_unit] joinSilent _newGroup; }; - if (count units _currentGroup == 0) then { + if (units _currentGroup isEqualTo []) then { deleteGroup _currentGroup; }; _previousGroupsList set [_forEachIndex, objNull]; diff --git a/addons/common/functions/fnc_throttledPublicVariable.sqf b/addons/common/functions/fnc_throttledPublicVariable.sqf index 3c1ed2761b..e6b1fdbaf6 100644 --- a/addons/common/functions/fnc_throttledPublicVariable.sqf +++ b/addons/common/functions/fnc_throttledPublicVariable.sqf @@ -29,8 +29,7 @@ if (isNil QGVAR(publishSchedId)) then { { _x params ["_unit", "_varName"]; _unit setVariable [_varName, _unit getVariable _varName, true]; - false - } count GVAR(publishVarNames); + } forEach GVAR(publishVarNames); GVAR(publishVarNames) = []; GVAR(publishNextTime) = 1e7; diff --git a/addons/common/functions/fnc_uniqueItems.sqf b/addons/common/functions/fnc_uniqueItems.sqf index dc783ebbea..204501ca3f 100644 --- a/addons/common/functions/fnc_uniqueItems.sqf +++ b/addons/common/functions/fnc_uniqueItems.sqf @@ -1,37 +1,84 @@ #include "..\script_component.hpp" /* - * Author: mharis001 - * Returns list of unique items in a unit's inventory. - * Items are cached if unit is ACE_player. + * Author: mharis001, Blue, Brett Mayson + * Returns list of unique items in the target's inventory. * * Arguments: - * 0: Unit + * 0: Target + * 1: Include magazines + * 0: No (default) + * 1: Yes + * 2: Only magazines * * Return Value: * Items * * Example: - * [player] call ace_common_fnc_uniqueItems + * [player, 2] call ace_common_fnc_uniqueItems * * Public: No */ -params ["_unit"]; +params ["_target", ["_includeMagazines", 0]]; private _fnc_getItems = { - private _items = (getItemCargo uniformContainer _unit) select 0; - _items append ((getItemCargo vestContainer _unit) select 0); - _items append ((getItemCargo backpackContainer _unit) select 0); + private _items = []; + + private _inventoryItems = (getItemCargo uniformContainer _target) select 0; + _inventoryItems append ((getItemCargo vestContainer _target) select 0); + _inventoryItems append ((getItemCargo backpackContainer _target) select 0); + + _items set [0, _inventoryItems]; + _items set [1, magazines _target]; _items arrayIntersect _items }; -// Use cached items list if unit is ACE_player -if (_unit isEqualTo ACE_player) then { +// Cache items list if unit is ACE_player +if (_target isEqualTo ACE_player) then { if (isNil QGVAR(uniqueItemsCache)) then { GVAR(uniqueItemsCache) = call _fnc_getItems; }; - +GVAR(uniqueItemsCache) + + switch (_includeMagazines) do { + case 0: { + GVAR(uniqueItemsCache) select 0 + }; + case 1: { + (GVAR(uniqueItemsCache) select 1) + (GVAR(uniqueItemsCache) select 0) + }; + case 2: { + GVAR(uniqueItemsCache) select 1 + }; + }; } else { - call _fnc_getItems; + if (_target isKindOf "CAManBase") then { + private _items = call _fnc_getItems; + + switch (_includeMagazines) do { + case 0: { + _items select 0 + }; + case 1: { + (_items select 1) + (_items select 0) + }; + case 2: { + _items select 1 + }; + }; + } else { + private _items = switch (_includeMagazines) do { + case 0: { + itemCargo _target + }; + case 1: { + (magazineCargo _target) + (itemCargo _target) + }; + case 2: { + magazineCargo _target + }; + }; + + _items arrayIntersect _items + }; }; diff --git a/addons/common/initSettings.inc.sqf b/addons/common/initSettings.inc.sqf index 41fcdafecd..a784ac64a9 100644 --- a/addons/common/initSettings.inc.sqf +++ b/addons/common/initSettings.inc.sqf @@ -1,5 +1,6 @@ private _category = format ["ACE %1", LLSTRING(DisplayName)]; -private _categoryColors = [_category, format ["| %1 |", LLSTRING(subcategory_colors)]]; +private _categoryColors = [_category, LSTRING(subcategory_colors)]; +private _categorySway = [_category, LSTRING(subcategory_sway)]; [ QGVAR(checkPBOsAction), @@ -87,7 +88,7 @@ private _categoryColors = [_category, format ["| %1 |", LLSTRING(subcategory_col QGVAR(epilepsyFriendlyMode), "CHECKBOX", [LSTRING(EpilepsyFriendlyMode), LSTRING(EpilepsyFriendlyModeTooltip)], - format ["ACE %1", localize LSTRING(DisplayName)], + _category, false, 2 ] call CBA_fnc_addSetting; @@ -96,7 +97,45 @@ private _categoryColors = [_category, format ["| %1 |", LLSTRING(subcategory_col QGVAR(progressBarInfo), "LIST", [LSTRING(progressBarInfoName), LSTRING(progressBarInfoDesc)], - format ["ACE %1", localize LSTRING(DisplayName)], + _category, [[0, 1, 2], [LSTRING(None), LSTRING(progressBarInfoPercentage), LSTRING(progressBarInfoTime)], 2], 0 ] call CBA_fnc_addSetting; + +[ + QGVAR(enableSway), + "CHECKBOX", + [LSTRING(enableSway), LSTRING(enableSway_Description)], + _categorySway, + true, + 1, + {}, + true +] call CBA_fnc_addSetting; + +[ + QGVAR(swayFactor), + "SLIDER", + [LSTRING(SwayFactor), LSTRING(SwayFactor_Description)], + _categorySway, + [0, 5, 1, 2], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(restedSwayFactor), + "SLIDER", + [LSTRING(RestedSwayFactor), LSTRING(RestedSwayFactor_Description)], + _categorySway, + [0, 5, 1, 2], + 1 +] call CBA_fnc_addSetting; + +[ + QGVAR(deployedSwayFactor), + "SLIDER", + [LSTRING(DeployedSwayFactor), LSTRING(DeployedSwayFactor_Description)], + _categorySway, + [0, 5, 1, 2], + 1 +] call CBA_fnc_addSetting; diff --git a/addons/common/scripts/checkVersionNumber.sqf b/addons/common/scripts/checkVersionNumber.sqf index 0f2c055500..3ed51120b6 100644 --- a/addons/common/scripts/checkVersionNumber.sqf +++ b/addons/common/scripts/checkVersionNumber.sqf @@ -5,7 +5,7 @@ private _aceWhitelist = missionNamespace getVariable ["ACE_Version_Whitelist", [ private _files = CBA_common_addons select { (_x select [0,3] != "a3_") && {_x select [0,4] != "ace_"} && - {!((toLower _x) in _aceWhitelist)} + {!((toLowerANSI _x) in _aceWhitelist)} }; private _versions = []; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 64d5fc61f3..7138c8da95 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1828,5 +1828,93 @@ 下方 Alt + + Weapon Sway + 手ぶれ + 무기 흔들림 + Oscillation de l'arme + + + Enable Weapon Sway + 手ぶれを有効化 + 무기 흔들림 추가 + Activer l'oscillation de l'arme + + + Enables weapon sway influenced by sway factors, such as stance, fatigue and medical condition.\nDisabling this setting will defer sway to vanilla or other mods. + 姿勢、疲労、負傷状態などの手ぶれ要因に影響を受ける武器照準の揺れを有効にします。\nこの設定を無効にすると、手ぶれの揺れはバニラまたは他のMODの処理に任されます。 + 흔들림 계수, 자세, 피로도, 건강 상태 등의 요인에 영향을 받는 무기 흔들림을 활성화합니다.\n이 설정을 비활성화하면 바닐라 또는 다른 모드의 흔들림으로 대체됩니다. + Active l'oscillation de l'arme influencé par les facteurs d'oscillation, tels que la position, la fatigue et l'état de santé.\nLa désactivation de ce paramètre reportera l'oscillation à vanilla ou à d'autres mods. + + + Sway factor + Factor de balanceo de mira + Verwacklungsfaktor + 手ぶれ因数 + 抖动系数 + 抖動因素 + Facteur de tremblement + Fattore di Oscillazione + Czynnik kołysania + Фактор колебания прицела + Fator de Balanço de Mira + Faktor kývání + 손떨림 정도 + + + Influences the amount of weapon sway. Higher means more sway. + Afecta al la estabilidad de la mira. Más alto significa más balanceo + Beeinflusst, wie ruhig man eine Waffe halten kann. Ein höherer Wert bedeutet weniger Stabilisierung. + 武器の手ぶれの大きさに影響します。値が高いほど、手ぶれが強くなります。 + 影响手持武器的晃动程度,数值越高,抖动的越厉害。 + 影響手持武器晃動程度,數值越高抖動越厲害 + Influe sur l'amplitude du tremblement de l'arme. Une valeur plus élevée signifie plus de tremblement. + Influenza l'aumento di oscillazione dell'arma quando affaticato. Maggiore significa più oscillazione. + Wpływa na poziom kołysania broni. Większa ilość znaczy większe kołysanie. + Влияет на колебания прицела оружия. Чем выше - тем больше. + Influencia a quantidade de balanço da mira da arma. Quanto maior, mais balanço. + Ovlivňuje množství kývání zbraní. Vyšší znamená více kývání. + 손떨림의 정도를 정합니다. 높을 수록 많이 휘적입니다. + + + Rested sway factor + Facteur de balancement au repos + 휴식 시 손떨림 정도 + Fator de balanço de mira em repouso + Verwacklungsfaktor, wenn aufgelegt + Fattore di Oscillazione Appoggiato + 静止依託時の手ぶれ係数 + Коэффициент колебания прицела в состоянии покоя + + + Influences the amount of weapon sway while weapon is rested. + Influence le degré de balancement de l'arme au repos. + 무기가 아무런 행동도 하지 않는 동안 무기가 흔들리는 정도를 정합니다. + Influencia a quantidade de balanço de mira enquanto a arma está em repouso. + Beeinflusst, wie ruhig man die Waffe hält, während sie aufgelegt ist. + Determina la quantità di oscillazione dell'arma quando questa è appoggiata. + 静止し壁などに依託している時の武器の手ぶれの大きさに影響します。 + Влияет на величину колебания прицела оружия в состоянии покоя. + + + Deployed sway factor + Facteur de balancement déployé + 거치 시 손떨림 정도 + Fator de balanço de mira em posição de tiro + Verwacklungsfaktor, wenn Zweibein aufgestellt ist. + Fattore di Oscillazione su Bipode + 接地展開時の手ぶれ係数 + Коэффициент колебания прицела при развертывании + + + Influences the amount of weapon sway while weapon is deployed. + Influence le degré de balancement de l'arme déployée. + 무기를 거치하는 동안 무기를 흔드는 정도를 정합니다. + Influencia a quantidade de balanço de mira enquanto a arma está em posição de tiro. + Beeinflusst, wie ruhig man die Waffen hält, während das Zweibein aufgestellt ist. + Determina la quantità di oscillazione dell'arma quando questa è stabilizzata usando il bipode. + 武器の接地展開時の武器の手ぶれの大きさに影響します。 + Влияет на величину колебания прицела оружия при его развертывании. + diff --git a/addons/compat_cup_vehicles/$PBOPREFIX$ b/addons/compat_cup_vehicles/$PBOPREFIX$ new file mode 100644 index 0000000000..da4cebbc16 --- /dev/null +++ b/addons/compat_cup_vehicles/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\compat_cup_vehicles diff --git a/addons/compat_cup_vehicles/CfgEventHandlers.hpp b/addons/compat_cup_vehicles/CfgEventHandlers.hpp new file mode 100644 index 0000000000..f6503c2479 --- /dev/null +++ b/addons/compat_cup_vehicles/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/compat_cup_vehicles/CfgVehicles.hpp b/addons/compat_cup_vehicles/CfgVehicles.hpp new file mode 100644 index 0000000000..5334987fff --- /dev/null +++ b/addons/compat_cup_vehicles/CfgVehicles.hpp @@ -0,0 +1,288 @@ +class CfgVehicles { + class CUP_MTVR_Base; + class CUP_MTVR_Reammo_Base: CUP_MTVR_Base { + EGVAR(rearm,defaultSupply) = 1200; + }; + + class CUP_V3S_Open_Base; + class CUP_V3S_Rearm_Base: CUP_V3S_Open_Base { + EGVAR(rearm,defaultSupply) = 1200; + }; + + class CUP_Kamaz_5350_Base; + class CUP_Kamaz_5350_ReAmmo_Base: CUP_Kamaz_5350_Base { + EGVAR(rearm,defaultSupply) = 1200; + }; + + class CUP_T810_Unarmed_Base; + class CUP_T810_Reammo_Base: CUP_T810_Unarmed_Base { + EGVAR(rearm,defaultSupply) = 1200; + }; + + class Wheeled_APC_F; + class CUP_BTR80_Common_Base: Wheeled_APC_F { + class ace_viewports { + class view_0 { + camLocation[] = {0.734863, 0.143927, -0.291199}; + camAttach = 45; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_1 { + camLocation[] = {0.950684, -0.00122738, -0.344391}; + camAttach = 90; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_2 { + camLocation[] = {0.932129, -0.729811, -0.319}; + camAttach = 90; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_3 { + camLocation[] = {-0.963379, -0.749183, -0.351501}; + camAttach = -90; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_4 { + camLocation[] = {-0.973145, 0.0148516, -0.364868}; + camAttach = -90; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_5 { + camLocation[] = {-0.73584, 0.119176, -0.291229}; + camAttach = -45; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + }; + }; + class CUP_BTR90_Base: Wheeled_APC_F { + class ace_viewports { + class view_0 { + camLocation[] = {0.533417, 2.4613, -0.309951}; + camAttach = 0; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_1 { + camLocation[] = {0.877106, 2.38684, -0.306068}; + camAttach = 30; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_2 { + camLocation[] = {1.04312, 0.0909424, -0.281996}; + camAttach = 60; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_3 { + type = ""; + camLocation[] = {1.03799, -0.928223, -0.282196}; + camAttach = 80; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_4 { + type = ""; + camLocation[] = {-0.90097, -0.913086, -0.282192}; + camAttach = -80; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + class view_5 { + type = ""; + camLocation[] = {-0.939301, 0.109985, -0.281992}; + camAttach = -60; + compartments[]={"Compartment1"}; + roles[]={"cargo"}; + }; + }; + }; + class CUP_BTR90_HQ_Base: CUP_BTR90_Base { delete ace_viewports; }; // no cargo seats + + class Tank_F; + class CUP_M2Bradley_Base: Tank_F { + ace_hunterkiller = 1; + class ace_viewports { + class view_0 { + camLocation[] = {0.987915, -0.324707, -0.0673385}; + camAttach = 70; + roles[]={"cargo"}; + }; + class view_1 { + camLocation[] = {0.90979, -0.970215, -0.043139}; + camAttach = 120; + roles[]={"cargo"}; + }; + class view_2 { + camLocation[] = {0.328003, -1.87402, -0.0408039}; + camAttach = 160; + roles[]={"cargo"}; + }; + class view_3 { + camLocation[] = {-0.357178, -1.89063, -0.0480237}; + camAttach = 175; + roles[]={"cargo"}; + }; + class view_4 { + camLocation[] = {-0.752075, -1.87061, -0.0522318}; + camAttach = 190; + roles[]={"cargo"}; + }; + class view_5 { + camLocation[] = {-0.936401, -0.0942383, -0.107764}; + camAttach = -75; + roles[]={"cargo"}; + }; + class SLD { // suppose to only be only on A3, but the A2s have the screen on the model? + screenLocation[] = {0.729126,-0.191597,-0.573349}; + maxDistance = 5; + type = "screen"; + camLocation[] = {0,0,0.05}; + camAttach[] = {0,0}; + roles[]={"cargo"}; + }; + }; + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_l1", "hitera_l2", "hitera_l3", "hitera_l4", "hitera_l5", + "hitera_l6", "hitera_l7", "hitera_l8", "hitera_r1", "hitera_r2", + "hitera_r3", "hitera_r4", "hitera_r5", "hitera_r6", "hitera_r7", + "hitera_r8", "hitera_t1", "hitera_t2", "hitera_t3", "hitera_t4", + "hitera_t5", "hitera_t6", "hitera_t7", "hitera_t8", "hitera_fr1", + "hitera_fr2", "hitera_fr3", "hitera_fr4", "hitera_fr5", "hitera_fr6", + "hitera_fr7", "hitera_fr8", "hitera_fr9", "hitera_fl1", "hitera_fl2", + "hitera_fl3", "hitera_fl4", "hitera_fl5" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = {}; + }; + class CUP_T90_Base: Tank_F { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_l1", "hitera_l2", "hitera_l3", "hitera_r1", "hitera_r2", + "hitera_r3", "hitera_1_t_l", "hitera_1_t_r", "hitera_2_t_l", + "hitera_2_t_r" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = {}; + }; + class CUP_T90M_Base: Tank_F { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_t1", "hitera_t2", "hitera_t3", "hitera_t4", "hitera_t5", + "hitera_t6", "hitera_t7", "hitera_t8", "hitera_t9", "hitera_t10", + "hitera_t11", "hitera_t12", "hitera_t13", "hitera_t14", "hitera_t15", + "hitera_t16", "hitera_t17", "hitera_t18", "hitera_t19", "hitera_t20", + "hitera_t21", "hitera_f1", "hitera_f2", "hitera_f3", "hitera_f4", + "hitera_f5", "hitera_f6", "hitera_f7", "hitera_s1", "hitera_s2", + "hitera_s3", "hitera_s4", "hitera_s5", "hitera_s6", "hitera_s7", + "hitera_s8", "hitera_s9", "hitera_s10", "hitera_s11", "hitera_s12", + "hitera_t22", "hitera_t23", "hitera_t24", "hitera_t25", "hitera_t26", + "hitera_t27", "hitera_t28", "hitera_t29", "hitera_t30", "hitera_t31", + "hitera_t32", "hitera_t33" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "hitslat_left", "hitslat_right", "hitslat_turret_rear", + "hitslat_turret_left", "hitslat_rear" + }; + }; + + class CUP_T72_ACR_Base; + class CUP_B_T72_CZ: CUP_T72_ACR_Base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_top_l1", "hitera_top_l2", "hitera_top_l3", "hitera_top_l4", + "hitera_top_r1", "hitera_top_r2", "hitera_top_r3", "hitera_top_r4", + "hitera_front_r1", "hitera_front_r2", "hitera_front_l1", + "hitera_front_l2", "hitera_top_rear" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = {}; + }; + + class CUP_Leopard2_Base; + class CUP_Leopard2_ERA_Base: CUP_Leopard2_Base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_1", "hitera_2", "hitera_3", "hitera_4", "hitera_5", "hitera_6", + "hitera_7", "hitera_8", "hitera_9", "hitera_10", "hitera_11", "hitera_12", + "hitera_13", "hitera_14", "hitera_15", "hitera_16", "hitera_17", "hitera_18", + "hitera_19", "hitera_20", "hitera_21", "hitera_22", "hitera_23", "hitera_24", + "hitera_25", "hitera_26", "hitera_27", "hitera_28", "hitera_29", "hitera_30", + "hitera_31", "hitera_32", "hitera_33", "hitera_34", "hitera_35", "hitera_36", + "hitera_37", "hitera_38", "hitera_39", "hitera_40", "hitera_41", "hitera_42", + "hitera_43", "hitera_44", "hitera_45", "hitera_46", "hitera_47" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = {}; + }; + + class CUP_M1_Abrams_base; + class CUP_M1A2_TUSK_base: CUP_M1_Abrams_base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_l1", "hitera_l2", "hitera_l3", "hitera_l4", "hitera_r1", + "hitera_r2", "hitera_r3", "hitera_r4" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "hitslat_rear" + }; + }; + + class CUP_M1Abrams_Base; + class CUP_M1Abrams_TUSK_Base: CUP_M1Abrams_Base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_l01", "hitera_l02", "hitera_l03", "hitera_l04", "hitera_l05", + "hitera_l06", "hitera_l07", "hitera_l08", "hitera_l09", "hitera_l10", + "hitera_l11", "hitera_l12", "hitera_l13", "hitera_l14", "hitera_l15", + "hitera_l16", "hitera_r01", "hitera_r02", "hitera_r03", "hitera_r04", + "hitera_r05", "hitera_r06", "hitera_r07", "hitera_r08", "hitera_r09", + "hitera_r10", "hitera_r11", "hitera_r12", "hitera_r13", "hitera_r14", + "hitera_r15", "hitera_r16" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "hitslat_rear" + }; + }; + + class CUP_M1Abrams_A2_Base; + class CUP_M1Abrams_A2_TUSK_Base: CUP_M1Abrams_A2_Base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_l01", "hitera_l02", "hitera_l03", "hitera_l04", "hitera_l05", + "hitera_l06", "hitera_l07", "hitera_l08", "hitera_l09", "hitera_l10", + "hitera_l11", "hitera_l12", "hitera_l13", "hitera_l14", "hitera_l15", + "hitera_l16", "hitera_l17", "hitera_l18", "hitera_l19", "hitera_l20", + "hitera_r01", "hitera_r02", "hitera_r03", "hitera_r04", "hitera_r05", + "hitera_r06", "hitera_r07", "hitera_r08", "hitera_r09", "hitera_r10", + "hitera_r11", "hitera_r12", "hitera_r13", "hitera_r14", "hitera_r15", + "hitera_r16", "hitera_r17", "hitera_r18", "hitera_r19", "hitera_r20" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "hitslat_rear" + }; + }; + + class CUP_M1A2Abrams_Base; + class CUP_M1A2Abrams_TUSK_Base: CUP_M1A2Abrams_Base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_l01", "hitera_l02", "hitera_l03", "hitera_l04", "hitera_l05", + "hitera_l06", "hitera_l07", "hitera_l08", "hitera_l09", "hitera_l10", + "hitera_l11", "hitera_l12", "hitera_l13", "hitera_l14", "hitera_l15", + "hitera_l16", "hitera_r01", "hitera_r02", "hitera_r03", "hitera_r04", + "hitera_r05", "hitera_r06", "hitera_r07", "hitera_r08", "hitera_r09", + "hitera_r10", "hitera_r11", "hitera_r12", "hitera_r13", "hitera_r14", + "hitera_r15", "hitera_r16" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "hitslat_rear" + }; + }; + class CUP_M1A2Abrams_TUSK_II_Base: CUP_M1A2Abrams_TUSK_Base { + EGVAR(vehicle_damage,eraHitpoints)[] = { + "hitera_l01", "hitera_l02", "hitera_l03", "hitera_l04", "hitera_l05", + "hitera_l06", "hitera_l07", "hitera_l08", "hitera_l09", "hitera_l10", + "hitera_l11", "hitera_l12", "hitera_l13", "hitera_l14", "hitera_l15", + "hitera_l16", "hitera_l17", "hitera_l18", "hitera_l19", "hitera_l20", + "hitera_r01", "hitera_r02", "hitera_r03", "hitera_r04", "hitera_r05", + "hitera_r06", "hitera_r07", "hitera_r08", "hitera_r09", "hitera_r10", + "hitera_r11", "hitera_r12", "hitera_r13", "hitera_r14", "hitera_r15", + "hitera_r16", "hitera_r17", "hitera_r18", "hitera_r19", "hitera_r20" + }; + }; +}; diff --git a/addons/compat_cup_vehicles/XEH_PREP.hpp b/addons/compat_cup_vehicles/XEH_PREP.hpp new file mode 100644 index 0000000000..20674eee81 --- /dev/null +++ b/addons/compat_cup_vehicles/XEH_PREP.hpp @@ -0,0 +1,4 @@ +PREP(onCutHC3); +PREP(onCutUH1Y); +PREP(onPrepareHC3); +PREP(onPrepareUH1Y); diff --git a/addons/compat_cup_vehicles/XEH_postInit.sqf b/addons/compat_cup_vehicles/XEH_postInit.sqf new file mode 100644 index 0000000000..09bda76106 --- /dev/null +++ b/addons/compat_cup_vehicles/XEH_postInit.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +if (["CUP_Vehicles_ACE_compat"] call EFUNC(common,isModLoaded)) exitWith { + ERROR_WITH_TITLE("Duplicate CUP/ACE Compats","Compats are now part of ACE - Uninstall 'CUP ACE3 Compatibility Addon - Vehicles'"); +}; diff --git a/addons/compat_cup_vehicles/XEH_preInit.sqf b/addons/compat_cup_vehicles/XEH_preInit.sqf new file mode 100644 index 0000000000..b47cf6628d --- /dev/null +++ b/addons/compat_cup_vehicles/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/compat_cup_vehicles/XEH_preStart.sqf b/addons/compat_cup_vehicles/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/compat_cup_vehicles/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/compat_cup_vehicles/compat_cup_vehicles_fastroping/CfgVehicles.hpp b/addons/compat_cup_vehicles/compat_cup_vehicles_fastroping/CfgVehicles.hpp new file mode 100644 index 0000000000..168fdcc8d2 --- /dev/null +++ b/addons/compat_cup_vehicles/compat_cup_vehicles_fastroping/CfgVehicles.hpp @@ -0,0 +1,143 @@ +class CfgVehicles { + class CUP_AH6_BASE; + class CUP_MH6_TRANSPORT: CUP_AH6_BASE { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + }; + class CUP_B_MH6M_OBS_USA: CUP_MH6_TRANSPORT { + EGVAR(fastroping,enabled) = 0; + }; + class CUP_B_MH6J_OBS_USA: CUP_MH6_TRANSPORT { + EGVAR(fastroping,enabled) = 0; + }; + + class Helicopter_Base_H; + class CUP_AW159_Unarmed_Base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 2; + EGVAR(fastroping,friesType) = "ACE_friesGantry"; + EGVAR(fastroping,friesAttachmentPoint)[] = {1.05, 1, 1.3}; + EGVAR(fastroping,onCut) = QEFUNC(fastroping,onCutCommon); + EGVAR(fastroping,onPrepare) = QEFUNC(fastroping,onPrepareCommon); + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + EQUIP_FRIES_ATTRIBUTE; + + class UserActions { + class CloseRdoor { + condition = QUOTE(this doorPhase 'CargoDoorR' > 0.5 && ((this getCargoIndex player) isEqualTo 0) && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])); + }; + }; + }; + + class CUP_CH47F_base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight", "ropeOriginMid"}; + }; + + class CUP_CH53E_base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + + class UserActions { + class RampClose { + condition = QUOTE(this animationPhase 'ramp_bottom' >= 0.56 && player == driver this && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])); + }; + }; + }; + + class CUP_Merlin_HC3_Base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginRight"}; + EGVAR(fastroping,onPrepare) = QEFUNC(compat_cup_vehicles,onPrepareHC3); + EGVAR(fastroping,onCut) = QEFUNC(compat_cup_vehicles,onCutHC3); + + class UserActions { + class CloseRdoor { + condition = QUOTE(this doorPhase 'dvere_p' > 0.5 && {(this getCargoIndex player) isEqualTo 0} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + }; + class OutWinch { + condition = "false"; + }; + class InWinch { + condition = "false"; + }; + }; + }; + + class CUP_Ka60_Base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + }; + + class CUP_MH60S_Base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginRight"}; + + class UserActions { + class OpenDoors; + class CloseDoors: OpenDoors { + condition = QUOTE(this animationPhase 'doors' > 0.5 && driver this == player && alive (this) && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])); + }; + }; + }; + + class CUP_Mi8_base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft"}; + }; + + class CUP_Mi8_medevac_base: CUP_Mi8_base { + EGVAR(fastroping,enabled) = 0; + }; + + class CUP_Mi171Sh_Base: CUP_Mi8_base { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + }; + + class CUP_SA330_Base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + + class UserActions { + class CloseRdoor { + condition = QUOTE(alive this && {this doorPhase 'ofrp_puma_porte_droite' > 0.5} && {(this getCargoIndex player) isEqualTo 0} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + }; + class CloseLdoor { + condition = QUOTE(alive this && {this doorPhase 'ofrp_puma_porte_gauche' > 0.5} && {(this getCargoIndex player) isEqualTo 1} && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])); + }; + }; + }; + + class CUP_UH1H_base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 2; + EGVAR(fastroping,friesType) = "ACE_friesAnchorBar"; + EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.45, -0.3}; + EGVAR(fastroping,onCut) = QEFUNC(fastroping,onCutCommon); + EGVAR(fastroping,onPrepare) = QEFUNC(fastroping,onPrepareCommon); + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + EQUIP_FRIES_ATTRIBUTE; + }; + + class CUP_B_UH1Y_Base; + class CUP_B_UH1Y_UNA_USMC: CUP_B_UH1Y_Base { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + EGVAR(fastroping,onPrepare) = QEFUNC(compat_cup_vehicles,onPrepareUH1Y); + EGVAR(fastroping,onCut) = QEFUNC(compat_cup_vehicles,onCutUH1Y); + }; + class CUP_B_UH1Y_MEV_USMC: CUP_B_UH1Y_UNA_USMC { + EGVAR(fastroping,enabled) = 0; + }; + + class CUP_UH60_Base: Helicopter_Base_H { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginRight"}; + + class UserActions { + class OpenDoors; + class CloseDoors: OpenDoors { + condition = QUOTE(this animationPhase 'doors' > 0.5 && driver this == player && alive (this) && !(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])); + }; + }; + }; +}; diff --git a/addons/compat_cup_vehicles/compat_cup_vehicles_fastroping/config.cpp b/addons/compat_cup_vehicles/compat_cup_vehicles_fastroping/config.cpp new file mode 100644 index 0000000000..1abe0de6ea --- /dev/null +++ b/addons/compat_cup_vehicles/compat_cup_vehicles_fastroping/config.cpp @@ -0,0 +1,21 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "CUP_Vehicles_LoadOrder", + "ace_fastroping" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"Community Upgrade Project", "Mike"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_cup_vehicles/compat_cup_vehicles_fastroping/script_component.hpp b/addons/compat_cup_vehicles/compat_cup_vehicles_fastroping/script_component.hpp new file mode 100644 index 0000000000..a3a1b47a32 --- /dev/null +++ b/addons/compat_cup_vehicles/compat_cup_vehicles_fastroping/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT fastroping +#define SUBCOMPONENT_BEAUTIFIED Fastroping +#include "..\script_component.hpp" diff --git a/addons/compat_cup_vehicles/compat_cup_vehicles_refuel/CfgVehicles.hpp b/addons/compat_cup_vehicles/compat_cup_vehicles_refuel/CfgVehicles.hpp new file mode 100644 index 0000000000..186690908c --- /dev/null +++ b/addons/compat_cup_vehicles/compat_cup_vehicles_refuel/CfgVehicles.hpp @@ -0,0 +1,36 @@ +class CfgVehicles { + class CUP_T810_Unarmed_Base; + class CUP_T810_Refuel_Base: CUP_T810_Unarmed_Base { + transportFuel = 0; + EGVAR(refuel,hooks)[] = {{-1.01, 0.21, -0.5},{1.08, 0.2, -0.5}}; + EGVAR(refuel,fuelCargo) = 10000; + }; + + class Truck_02_fuel_base_F; + class CUP_Kamaz_5350_Refuel_Base: Truck_02_fuel_base_F { + transportFuel = 0; + EGVAR(refuel,hooks)[] = {{-0.02, -3.33, -1.05}}; + EGVAR(refuel,fuelCargo) = 10000; + }; + + class CUP_Ural_Support_Base; + class CUP_Ural_Refuel_Base: CUP_Ural_Support_Base { + transportFuel = 0; + EGVAR(refuel,hooks)[] = {{-0.05, -3.65, -0.42}}; + EGVAR(refuel,fuelCargo) = 10000; + }; + + class CUP_V3S_Open_Base; + class CUP_V3S_Refuel_Base: CUP_V3S_Open_Base { + transportFuel = 0; + EGVAR(refuel,hooks)[] = {{-0.35, -3.35, -0.4},{0.40, -3.35, -0.4}}; + EGVAR(refuel,fuelCargo) = 6500; + }; + + class CUP_MTVR_Base; + class CUP_MTVR_Refuel_Base: CUP_MTVR_Base { + transportFuel = 0; + EGVAR(refuel,hooks)[] = {{-1.09, -0.01, -0.5},{1, -0.01, -0.5}}; + EGVAR(refuel,fuelCargo) = 10000; + }; +}; diff --git a/addons/compat_cup_vehicles/compat_cup_vehicles_refuel/config.cpp b/addons/compat_cup_vehicles/compat_cup_vehicles_refuel/config.cpp new file mode 100644 index 0000000000..f77c9903b9 --- /dev/null +++ b/addons/compat_cup_vehicles/compat_cup_vehicles_refuel/config.cpp @@ -0,0 +1,23 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "CUP_Vehicles_LoadOrder", + "ace_refuel" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"Community Upgrade Project", "Mike"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgVehicles.hpp" diff --git a/addons/compat_cup_vehicles/compat_cup_vehicles_refuel/script_component.hpp b/addons/compat_cup_vehicles/compat_cup_vehicles_refuel/script_component.hpp new file mode 100644 index 0000000000..b58db9432d --- /dev/null +++ b/addons/compat_cup_vehicles/compat_cup_vehicles_refuel/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT refuel +#define SUBCOMPONENT_BEAUTIFIED Refuel +#include "..\script_component.hpp" diff --git a/addons/compat_cup_vehicles/config.cpp b/addons/compat_cup_vehicles/config.cpp new file mode 100644 index 0000000000..513993ef57 --- /dev/null +++ b/addons/compat_cup_vehicles/config.cpp @@ -0,0 +1,22 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "CUP_Vehicles_LoadOrder", + "ace_interaction" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"Community Upgrade Project", "Mike"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/compat_cup_vehicles/functions/fnc_onCutHC3.sqf b/addons/compat_cup_vehicles/functions/fnc_onCutHC3.sqf new file mode 100644 index 0000000000..8514dd2aed --- /dev/null +++ b/addons/compat_cup_vehicles/functions/fnc_onCutHC3.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: Unknown + * Function for retracting the hooks for CUP HC3 helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before cutting ropes + * + * Example: + * [_vehicle] call ace_compat_cup_vehicles_fnc_onCutHC3 + * + * Public: No + */ + +params ["_vehicle"]; + +_vehicle setVariable ["ace_fastroping_doorsLocked", false, true]; + +_vehicle animateSource ["Winchsection", 0]; +_vehicle animateSource ["Winchsection2", 0]; +_vehicle animateDoor ["dvere_p", 1]; + +2 diff --git a/addons/compat_cup_vehicles/functions/fnc_onCutUH1Y.sqf b/addons/compat_cup_vehicles/functions/fnc_onCutUH1Y.sqf new file mode 100644 index 0000000000..82a3eaf8a9 --- /dev/null +++ b/addons/compat_cup_vehicles/functions/fnc_onCutUH1Y.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Unknown + * Function for retracting the hooks for CUP UH-1Y helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before cutting ropes + * + * Example: + * [_vehicle] call ace_compat_cup_vehicles_fnc_onCutUH1Y + * + * Public: No + */ +params ["_vehicle"]; + +_vehicle setVariable ["ace_fastroping_doorsLocked", false, true]; +_vehicle animateSource ["fries_extend", 0]; + +2 diff --git a/addons/compat_cup_vehicles/functions/fnc_onPrepareHC3.sqf b/addons/compat_cup_vehicles/functions/fnc_onPrepareHC3.sqf new file mode 100644 index 0000000000..aad828a3a0 --- /dev/null +++ b/addons/compat_cup_vehicles/functions/fnc_onPrepareHC3.sqf @@ -0,0 +1,26 @@ +#include "..\script_component.hpp" +/* + * Author: Unknown + * Function for opening doors and extending the hook for HC3 helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before deploying ropes + * + * Example: + * [_vehicle] call ace_compat_cup_vehicles_fnc_onPrepareUH1Y + * + * Public: No + */ + +params ["_vehicle"]; + +_vehicle setVariable ["ace_fastroping_doorsLocked", true, true]; + +_vehicle animateSource ["Winchsection", 1]; +_vehicle animateSource ["Winchsection2", 1]; +_vehicle animateDoor ["dvere_p", 0]; + +2 diff --git a/addons/compat_cup_vehicles/functions/fnc_onPrepareUH1Y.sqf b/addons/compat_cup_vehicles/functions/fnc_onPrepareUH1Y.sqf new file mode 100644 index 0000000000..f17ea79613 --- /dev/null +++ b/addons/compat_cup_vehicles/functions/fnc_onPrepareUH1Y.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Unknown + * Function for extending the hook for the CUP UH-1Y Helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before deploying ropes + * + * Example: + * [_vehicle] call ace_compat_cup_vehicles_fnc_onPrepareUH1Y + * + * Public: No + */ + +params ["_vehicle"]; + +_vehicle setVariable ["ace_fastroping_doorsLocked", true, true]; +_vehicle animateSource ["fries_extend", 1]; + +2 diff --git a/addons/compat_cup_vehicles/script_component.hpp b/addons/compat_cup_vehicles/script_component.hpp new file mode 100644 index 0000000000..effb2d5534 --- /dev/null +++ b/addons/compat_cup_vehicles/script_component.hpp @@ -0,0 +1,20 @@ +#define COMPONENT compat_cup_vehicles +#define COMPONENT_BEAUTIFIED CUP Vehicles Compatibility + +#include "\z\ace\addons\main\script_mod.hpp" +#include "\z\ace\addons\main\script_macros.hpp" + +// Fries Macro +#define EQUIP_FRIES_ATTRIBUTE \ + class Attributes { \ + class ace_fastroping_equipFRIES { \ + property = "ace_fastroping_equipFRIES"; \ + control = "Checkbox"; \ + displayName = ECSTRING(fastroping,Eden_equipFRIES); \ + tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \ + expression = "[_this] call ace_fastroping_fnc_equipFRIES"; \ + typeName = "BOOL"; \ + condition = "objectVehicle"; \ + defaultValue = 0; \ + }; \ + } diff --git a/addons/compat_cup_weapons/$PBOPREFIX$ b/addons/compat_cup_weapons/$PBOPREFIX$ new file mode 100644 index 0000000000..c5368b0a6d --- /dev/null +++ b/addons/compat_cup_weapons/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\compat_cup_weapons diff --git a/addons/compat_cup_weapons/CfgEventHandlers.hpp b/addons/compat_cup_weapons/CfgEventHandlers.hpp new file mode 100644 index 0000000000..9cc1b0427b --- /dev/null +++ b/addons/compat_cup_weapons/CfgEventHandlers.hpp @@ -0,0 +1,5 @@ +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; diff --git a/addons/compat_cup_weapons/CfgMagazines.hpp b/addons/compat_cup_weapons/CfgMagazines.hpp new file mode 100644 index 0000000000..6fd6e2f1cc --- /dev/null +++ b/addons/compat_cup_weapons/CfgMagazines.hpp @@ -0,0 +1,37 @@ +class CfgMagazines { + class CA_LauncherMagazine; + class CUP_NLAW_M: CA_LauncherMagazine { + ammo = "ACE_NLAW"; + }; + + // legacy classes from ACE disposable launchers + class CUP_M136_M; + class ACE_PreloadedMissileDummy_CUP: CUP_M136_M { + scope = 1; + scopeArsenal = 0; + }; + class CUP_RPG18_M; + class ACE_PreloadedMissileDummy_RPG18_CUP: CUP_RPG18_M { + scope = 1; + scopeArsenal = 0; + }; + class CUP_M72A6_M; + class ACE_PreloadedMissileDummy_M72A6_CUP: CUP_M72A6_M { + scope = 1; + scopeArsenal = 0; + }; + class ACE_PreloadedMissileDummy_NLAW_CUP: CUP_NLAW_M { + scope = 1; + scopeArsenal = 0; + }; + class CUP_Stinger_M; + class ACE_PreloadedMissileDummy_Stinger_CUP: CUP_Stinger_M { + scope = 1; + scopeArsenal = 0; + }; + class CUP_Strela_2_M; + class ACE_PreloadedMissileDummy_Strela_2_CUP: CUP_Strela_2_M { + scope = 1; + scopeArsenal = 0; + }; +}; diff --git a/addons/compat_cup_weapons/CfgWeapons.hpp b/addons/compat_cup_weapons/CfgWeapons.hpp new file mode 100644 index 0000000000..e69c75dee5 --- /dev/null +++ b/addons/compat_cup_weapons/CfgWeapons.hpp @@ -0,0 +1,36 @@ +class CfgWeapons { + class Launcher_Base_F; + class CUP_launch_M47: Launcher_Base_F { + ace_overpressure_angle = 45; + ace_overpressure_range = 8; + ace_overpressure_damage = 0.5; + }; + + class CUP_launch_MAAWS: Launcher_Base_F { + ace_overpressure_angle = 60; + ace_overpressure_range = 15; + ace_overpressure_damage = 0.7; + }; + class CUP_launch_MAAWS_Scope: CUP_launch_MAAWS {}; + + class CUP_launch_RPG7V: Launcher_Base_F { + ace_overpressure_angle = 45; + ace_overpressure_range = 6; + ace_overpressure_damage = 0.5; + }; + + class CUP_launch_Mk153Mod0: Launcher_Base_F { + ace_overpressure_angle = 30; + ace_overpressure_range = 15; + ace_overpressure_damage = 0.7; + }; + class CUP_launch_Mk153Mod0_SMAWOptics: CUP_launch_Mk153Mod0 {}; + + class CUP_launch_NLAW_Loaded: Launcher_Base_F { + ace_overpressure_angle = 30; + ace_overpressure_range = 2; + ace_overpressure_damage = 0.5; + ace_nlaw_enabled = 1; + canLock = 1; + }; +}; diff --git a/addons/compat_cup_weapons/XEH_postInit.sqf b/addons/compat_cup_weapons/XEH_postInit.sqf new file mode 100644 index 0000000000..79d81fda26 --- /dev/null +++ b/addons/compat_cup_weapons/XEH_postInit.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +if (["CUP_Weapons_ACE_compat"] call EFUNC(common,isModLoaded)) exitWith { + ERROR_WITH_TITLE("Duplicate CUP/ACE Compats","Compats are now part of ACE - Uninstall 'CUP ACE3 Compatibility Addon - Weapons'"); +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgMagazineGroups.hpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgMagazineGroups.hpp new file mode 100644 index 0000000000..430a5272ae --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgMagazineGroups.hpp @@ -0,0 +1,56 @@ +class ace_csw_groups { + class CUP_compats_29Rnd_30mm_AGS30_M { + CUP_29Rnd_30mm_AGS30_M = 1; + }; + class CUP_compats_48Rnd_40mm_MK19_M { + CUP_48Rnd_40mm_MK19_M = 1; + }; + class CUP_AT13_M { + CUP_6Rnd_AT13_M = 1; + }; + class CUP_compats_TOW_M { + CUP_6Rnd_TOW_HMMWV_M = 1; + }; + class CUP_compats_TOW2_M { + CUP_6Rnd_TOW2_M = 1; + }; + class CUP_compats_PG9_M { + CUP_16Rnd_PG9_AT_M = 1; + }; + class CUP_compats_OG9_M { + CUP_16Rnd_OG9_HE_M = 1; + }; + class CUP_compats_105mm_he { + CUP_30Rnd_105mmHE_M119_M = 1; + }; + class CUP_compats_105mm_smoke { + CUP_30Rnd_105mmSMOKE_M119_M = 1; + }; + class CUP_compats_105mm_wp { + CUP_30Rnd_105mmWP_M119_M = 1; + }; + class CUP_compats_105mm_laser { + CUP_30Rnd_105mmLASER_M119_M = 1; + }; + class CUP_compats_105mm_illum { + CUP_30Rnd_105mmILLUM_M119_M = 1; + }; + class CUP_compats_122mm_he { + CUP_30Rnd_122mmHE_D30_M = 1; + }; + class CUP_compats_122mm_smoke { + CUP_30Rnd_122mmSMOKE_D30_M = 1; + }; + class CUP_compats_122mm_wp { + CUP_30Rnd_122mmHE_D30_M = 1; + }; + class CUP_compats_122mm_laser { + CUP_30Rnd_122mmLASER_D30_M = 1; + }; + class CUP_compats_122mm_illum { + CUP_30Rnd_122mmILLUM_D30_M = 1; + }; + class CUP_compats_122mm_at { + CUP_30Rnd_122mmAT_D30_M = 1; + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgMagazines.hpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgMagazines.hpp new file mode 100644 index 0000000000..1a37f4d1c9 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgMagazines.hpp @@ -0,0 +1,111 @@ +class CfgMagazines { + class VehicleMagazine; + class CUP_29Rnd_30mm_AGS30_M: VehicleMagazine { + ace_isbelt = 1; + }; + + class CUP_compats_29Rnd_30mm_AGS30_M: CUP_29Rnd_30mm_AGS30_M { + scope = 2; + type = 256; + count = 29; + mass = 40; + displayName = SUBCSTRING(mag_AGS30_displayName); + model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d"; + picture = QPATHTOEF(csw,UI\ammoBox_50bmg_ca.paa); + }; + + class 200Rnd_40mm_G_belt; + class CUP_48Rnd_40mm_MK19_M: 200Rnd_40mm_G_belt { + ace_isbelt = 1; + }; + + class CUP_compats_48Rnd_40mm_MK19_M: CUP_29Rnd_30mm_AGS30_M { + scope = 2; + type = 256; + count = 48; + mass = 40; + displayname = SUBCSTRING(mag_MK19_displayName); + model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d"; + picture = QPATHTOEF(csw,UI\ammoBox_50bmg_ca.paa); + }; + + class CUP_6Rnd_TOW_HMMWV_M; + class CUP_compats_TOW_M: CUP_6Rnd_TOW_HMMWV_M { + scope = 2; + type = 256; + count = 1; + mass = 200; + displayname = SUBCSTRING(mag_TOW_displayName); + model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d"; + picture = "\A3\Weapons_F_beta\Launchers\titan\Data\UI\gear_titan_missile_at_ca.paa"; + }; + + class CUP_6Rnd_TOW2_M; + class CUP_compats_TOW2_M: CUP_6Rnd_TOW2_M { + scope = 2; + type = 256; + count = 1; + mass = 200; + displayname = SUBCSTRING(mag_TOW2_displayName); + model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d"; + picture = "\A3\Weapons_F_beta\Launchers\titan\Data\UI\gear_titan_missile_at_ca.paa"; + }; + + class CUP_16Rnd_PG9_AT_M; + class CUP_compats_PG9_M: CUP_16Rnd_PG9_AT_M { + displayName = SUBCSTRING(mag_PG9_displayName); + model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d"; + scope = 2; + type = 256; + count = 1; + mass = 80; + picture = "\A3\Weapons_F_Exp\Launchers\RPG7\Data\UI\icon_rocket_RPG7_ca.paa"; + }; + + class CUP_16Rnd_OG9_HE_M; + class CUP_compats_OG9_M: CUP_16Rnd_OG9_HE_M { + displayName = SUBCSTRING(mag_OG9_displayName); + model = "\A3\Structures_F_EPB\Items\Military\Ammobox_rounds_F.p3d"; + scope = 2; + type = 256; + count = 1; + mass = 80; + picture = "\A3\Weapons_F_Exp\Launchers\RPG7\Data\UI\icon_rocket_RPG7_ca.paa"; + }; + + class ACE_1Rnd_82mm_Mo_HE; + class CUP_compats_105mm_he: ACE_1Rnd_82mm_Mo_HE { + displayName = SUBCSTRING(mag_M1HE_displayName); + mass = 120; + }; + class CUP_compats_105mm_smoke: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_M84Smoke_displayName); + }; + class CUP_compats_105mm_wp: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_M60A2_displayName); + }; + class CUP_compats_105mm_laser: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_M67AT_displayName); + }; + class CUP_compats_105mm_illum: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_M314Illum_displayName); + }; + class CUP_compats_122mm_he: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_3OF56_displayName); + }; + class CUP_compats_122mm_laser: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_3OF69M_displayName); + }; + class CUP_compats_122mm_wp: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_122mmWP_displayName); + }; + class CUP_compats_122mm_smoke: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_122mmSmoke_displayName); + }; + class CUP_compats_122mm_illum: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_122mmIllum_displayName); + }; + class CUP_compats_122mm_at: CUP_compats_105mm_he { + displayName = SUBCSTRING(mag_122mmAT_displayName); + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp new file mode 100644 index 0000000000..3924ae0386 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgVehicles.hpp @@ -0,0 +1,200 @@ +class CfgVehicles { + class LandVehicle; + class StaticWeapon: LandVehicle { + class ACE_Actions { + class ACE_MainActions; + }; + }; + + class StaticMortar: StaticWeapon {}; + class CUP_2b14_82mm_Base: StaticMortar { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = ""; + selection = ""; // no good selections for this mortar + }; + }; + class ace_csw { + enabled = 1; + magazineLocation = "_target selectionPosition 'otochlaven'"; + proxyWeapon = "CUP_proxy_mortar_82mm"; + disassembleWeapon = "CUP_2b14_carry"; + disassembleTurret = "ace_csw_mortarBaseplate"; + desiredAmmo = 1; + ammoLoadTime = 3; + ammoUnloadTime = 3; + }; + }; + + class CUP_M252_base: CUP_2b14_82mm_Base { + class ace_csw: ace_csw { + disassembleWeapon = "CUP_m252_carry"; + disassembleTurret = "ace_csw_mortarBaseplate"; + }; + }; + + class CUP_L16A2_base: CUP_M252_base { + class ace_csw: ace_csw { + disassembleWeapon = "CUP_l16a2_carry"; + disassembleTurret = "ace_csw_mortarBaseplate"; + }; + }; + + class StaticMGWeapon; + class CUP_M2StaticMG_base: StaticMGWeapon { + class ace_csw { + enabled = 1; + proxyWeapon = "CUP_proxy_m2"; + magazineLocation = "_target selectionPosition 'magazine'"; + disassembleWeapon = "CUP_m2_carry"; + disassembleTurret = "ace_csw_m3Tripod"; + desiredAmmo = 100; + ammoLoadTime = 10; + ammoUnloadTime = 8; + }; + }; + + class CUP_M2StaticMG_MiniTripod_base: CUP_M2StaticMG_base { + class ace_csw: ace_csw { + enabled = 1; + disassembleTurret = "ace_csw_m3TripodLow"; + }; + }; + + class CUP_DSHKM_base: StaticMGWeapon { + class ace_csw { + enabled = 1; + proxyWeapon = "CUP_proxy_DSHKM"; + magazineLocation = "_target selectionPosition 'magazine'"; + disassembleWeapon = "CUP_DSHKM_carry"; + disassembleTurret = "ace_csw_kordTripod"; + desiredAmmo = 100; + ammoLoadTime = 10; + ammoUnloadTime = 8; + }; + }; + + class CUP_DSHKM_MiniTripod_base: CUP_DSHKM_base { + class ace_csw: ace_csw { + enabled = 1; + disassembleTurret = "ace_csw_kordTripodLow"; + }; + }; + + class CUP_KORD_Base: StaticMGWeapon { + class ace_csw { + enabled = 1; + proxyWeapon = "CUP_proxy_KORD"; + magazineLocation = "_target selectionPosition 'magazine'"; + disassembleWeapon = "CUP_KORD_carry"; + disassembleTurret = "ace_csw_kordTripod"; + desiredAmmo = 100; + ammoLoadTime = 10; + ammoUnloadTime = 8; + }; + }; + + class CUP_KORD_MiniTripod_Base: CUP_KORD_Base { + class ace_csw: ace_csw { + enabled = 1; + disassembleTurret = "ace_csw_kordTripodLow"; + }; + }; + + class StaticGrenadeLauncher; + class CUP_AGS_base: StaticGrenadeLauncher { + class ace_csw { + enabled = 1; + proxyWeapon = "CUP_proxy_AGS30"; + magazineLocation = "_target selectionPosition 'otochlaven'"; + disassembleWeapon = "CUP_AGS30_carry"; + disassembleTurret = "ace_csw_sag30Tripod"; + desiredAmmo = 29; + ammoLoadTime = 10; + ammoUnloadTime = 8; + }; + }; + + class CUP_MK19_TriPod_base: StaticGrenadeLauncher { + class ace_csw { + enabled = 1; + proxyWeapon = "CUP_proxy_MK19"; + magazineLocation = "_target selectionPosition 'magazine'"; + disassembleWeapon = "CUP_MK19_carry"; + disassembleTurret = "ace_csw_m3TripodLow"; + desiredAmmo = 48; + ammoLoadTime = 10; + ammoUnloadTime = 8; + }; + }; + + class StaticATWeapon; + class CUP_Metis_Base: StaticATWeapon { + class ace_csw { + enabled = 1; + proxyWeapon = "CUP_proxy_AT13"; + magazineLocation = "_target selectionPosition 'gun'"; + disassembleWeapon = "CUP_launch_Metis"; + disassembleTurret = ""; + desiredAmmo = 1; + ammoLoadTime = 7; + ammoUnloadTime = 5; + }; + }; + + class CUP_TOW_TriPod_base: StaticATWeapon { + class ace_csw { + enabled = 1; + proxyWeapon = "CUP_proxy_TOW"; + magazineLocation = "_target selectionPosition 'otochlaven'"; + disassembleWeapon = "CUP_TOW_carry"; + disassembleTurret = "ace_csw_m220Tripod"; + desiredAmmo = 1; + ammoLoadTime = 8; + ammoUnloadTime = 5; + }; + }; + + class CUP_TOW2_TriPod_base: CUP_TOW_TriPod_base { + class ace_csw: ace_csw { + disassembleWeapon = "CUP_TOW2_carry"; + }; + }; + + class CUP_SPG9_base: StaticATWeapon { + class ace_csw { + enabled = 1; + proxyWeapon = "CUP_proxy_SPG9"; + magazineLocation = "_target selectionPosition 'otochlaven'"; + disassembleWeapon = "CUP_SPG9_carry"; + disassembleTurret = "ace_csw_spg9Tripod"; + desiredAmmo = 1; + ammoLoadTime = 5; + ammoUnloadTime = 3; + }; + }; + + class StaticCannon; + class CUP_D30_base: StaticCannon { + class ace_csw { + enabled = 1; + proxyWeapon = "CUP_proxy_D30"; + magazineLocation = "_target selectionPosition 'otochlaven'"; + desiredAmmo = 1; + ammoLoadTime = 5; + ammoUnloadTime = 5; + }; + }; + + class CUP_D30_AT_base: CUP_D30_base { + class ace_csw: ace_csw { + proxyWeapon = "CUP_proxy_D30AT"; + }; + }; + + class CUP_M119_base: CUP_D30_base { + class ace_csw: ace_csw { + proxyWeapon = "CUP_proxy_M119"; + }; + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgWeapons.hpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgWeapons.hpp new file mode 100644 index 0000000000..9ff8519ce1 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/CfgWeapons.hpp @@ -0,0 +1,289 @@ +class CfgWeapons { + class Launcher; + class Launcher_Base_F: Launcher { + class WeaponSlotsInfo; + }; + + class CUP_2b14_carry: Launcher_Base_F { + displayName = ECSTRING(csw,2b14_tube); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\Podnos\data\ui\podnos_2b14_ca.paa"; + class ace_csw { + type = "weapon"; + deployTime = 20; + pickupTime = 25; + class assembleTo { + ace_csw_mortarBaseplate = "CUP_I_2b14_82mm_AAF"; + }; + }; + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 670; + class MuzzleSlot { + iconScale = 0.1; + }; + }; + }; + + class CUP_m252_carry: CUP_2b14_carry { + displayName = ECSTRING(csw,m252_tube); + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\M252\data\ui\icomap_mortar_m251_ca.paa"; + class ace_csw: ace_csw { + class assembleTo { + ace_csw_mortarBaseplate = "CUP_I_M252_AAF"; + }; + }; + }; + + class CUP_l16a2_carry: CUP_2b14_carry { + displayName = ECSTRING(csw,m252_tube); + scope = 1; + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\M252\data\ui\icomap_mortar_m251_ca.paa"; + class ace_csw: ace_csw { + class assembleTo { + ace_csw_mortarBaseplate = "CUP_I_L16A2_AAF"; + }; + }; + }; + + class CUP_m2_carry: Launcher_Base_F { + displayName = ECSTRING(csw,m2_gun); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\M2\data\ui\icomap_M2_ca.paa"; + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + ace_csw_m3Tripod = "CUP_I_M2StaticMG_AAF"; + ace_csw_m3TripodLow = "CUP_I_M2StaticMG_MiniTripod_AAF"; + }; + }; + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 840; + class MuzzleSlot { + iconScale = 0.1; + }; + }; + }; + + class CUP_DSHKM_carry: Launcher_Base_F { + displayName = ECSTRING(csw,dshk_gun); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\DShKM\data\ui\icomap_DShKM_ca.paa"; + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + ace_csw_kordTripod = "CUP_I_DSHKM_AAF"; + ace_csw_kordTripodLow = "CUP_I_DSHKM_MiniTriPod_AAF"; + }; + }; + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 740; + class MuzzleSlot { + iconScale = 0.1; + }; + }; + }; + + class CUP_KORD_carry: Launcher_Base_F { + displayName = ECSTRING(csw,kord_gun); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\KORD\data\ui\icomap_kord_ca.paa"; + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + ace_csw_kordTripod = "CUP_I_KORD_high_AAF"; + ace_csw_kordTripodLow = "CUP_I_KORD_AAF"; + }; + }; + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 550; + class MuzzleSlot { + iconScale = 0.1; + }; + }; + }; + + class CUP_AGS30_carry: Launcher_Base_F { + displayName = ECSTRING(csw,ags30_gun); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\AGS\data\ui\ags_static_ca.paa"; + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + ace_csw_sag30Tripod = "CUP_I_AGS_AAF"; + }; + }; + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 400; + class MuzzleSlot { + iconScale = 0.1; + }; + }; + }; + + class CUP_MK19_carry: Launcher_Base_F { + displayName = ECSTRING(csw,mk19_gun); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\Mk19\data\ui\icomap_mk19_stat_ca.paa"; + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + ace_csw_m3TripodLow = "CUP_I_MK19_TriPod_AAF"; + }; + }; + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 770; + class MuzzleSlot { + iconScale = 0.1; + }; + }; + }; + + class CUP_launch_Metis: Launcher_Base_F { + ace_overpressure_angle = 45; + ace_overpressure_range = 15; + ace_overpressure_damage = 0.7; + class ace_csw { + type = "mount"; + deployTime = 4; + pickupTime = 4; + deploy = "CUP_I_Metis_AAF"; + }; + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 300; + }; + }; + + class CUP_TOW_carry: Launcher_Base_F { + displayName = ECSTRING(csw,tow_tube); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\TOW\data\ui\icomap_tow_static_ca.paa"; + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + ace_csw_m220Tripod = "CUP_I_TOW_TriPod_AAF"; + }; + }; + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 500; + class MuzzleSlot { + iconScale = 0.1; + }; + }; + }; + + class CUP_TOW2_carry: CUP_TOW_carry { + class ace_csw: ace_csw { + class assembleTo { + ace_csw_m220Tripod = "CUP_I_TOW2_TriPod_AAF"; + }; + }; + }; + + class CUP_SPG9_carry: Launcher_Base_F { + displayName = ECSTRING(csw,spg9_tube); + scope = 2; + model = QPATHTOEF(apl,ACE_CSW_Bag.p3d); + modes[] = {}; + picture = "\CUP\Weapons\CUP_Weapons_StaticWeapons\SPG9\data\ui\icon_spg9_ca.paa"; + class ace_csw { + type = "weapon"; + deployTime = 4; + pickupTime = 4; + class assembleTo { + ace_csw_spg9Tripod = "CUP_I_SPG9_AAF"; + }; + }; + class WeaponSlotsInfo: WeaponSlotsInfo { + mass = 1000; + class MuzzleSlot { + iconScale = 0.1; + }; + }; + }; + + class mortar_82mm; + class CUP_proxy_mortar_82mm: mortar_82mm { + magazineReloadTime = 0.5; + }; + + class CUP_Vhmg_M2_static; + class CUP_proxy_m2: CUP_Vhmg_M2_static { + magazineReloadTime = 0.5; + }; + + class CUP_Vhmg_DSHKM_veh; + class CUP_proxy_DSHKM: CUP_Vhmg_DSHKM_veh { + magazineReloadTime = 0.5; + }; + + class CUP_Vhmg_KORD_veh; + class CUP_proxy_KORD: CUP_Vhmg_KORD_veh { + magazineReloadTime = 0.5; + }; + + class CUP_Vhmg_AGS30_veh; + class CUP_proxy_AGS30: CUP_Vhmg_AGS30_veh { + magazineReloadTime = 0.5; + }; + + class CUP_Vgmg_MK19_veh; + class CUP_proxy_MK19: CUP_Vgmg_MK19_veh { + magazineReloadTime = 0.5; + }; + + class CUP_Vmlauncher_AT13_single_veh; + class CUP_proxy_AT13: CUP_Vmlauncher_AT13_single_veh { + magazineReloadTime = 0.5; + }; + + class CUP_Vmlauncher_TOW_single_veh; + class CUP_proxy_TOW: CUP_Vmlauncher_TOW_single_veh { + magazineReloadTime = 0.5; + }; + + class CUP_Vacannon_SPG9_veh; + class CUP_proxy_SPG9: CUP_Vacannon_SPG9_veh { + magazineReloadTime = 0.5; + }; + + class CUP_Vcannon_M119_veh; + class CUP_proxy_M119: CUP_Vcannon_M119_veh { + magazineReloadTime = 0.5; + }; + + class CUP_Vcannon_D30_veh; + class CUP_proxy_D30: CUP_Vcannon_D30_veh { + magazineReloadTime = 0.5; + }; + + class CUP_Vcannon_D30AT_veh; + class CUP_proxy_D30AT: CUP_Vcannon_D30AT_veh { + magazineReloadTime = 0.5; + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/config.cpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/config.cpp new file mode 100644 index 0000000000..ccc2f0baf2 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/config.cpp @@ -0,0 +1,26 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "CUP_Weapons_loadOrder", + "ace_csw" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgMagazines.hpp" +#include "CfgMagazineGroups.hpp" +#include "CfgVehicles.hpp" +#include "CfgWeapons.hpp" diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/script_component.hpp b/addons/compat_cup_weapons/compat_cup_weapons_csw/script_component.hpp new file mode 100644 index 0000000000..77a1b484cb --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/script_component.hpp @@ -0,0 +1,5 @@ +#define SUBCOMPONENT csw +#define SUBCOMPONENT_BEAUTIFIED Crew-Served Weapons +#include "..\script_component.hpp" + +#include "\z\ace\addons\csw\script_config_macros_csw.hpp" diff --git a/addons/compat_cup_weapons/compat_cup_weapons_csw/stringtable.xml b/addons/compat_cup_weapons/compat_cup_weapons_csw/stringtable.xml new file mode 100644 index 0000000000..a23cf87af0 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_csw/stringtable.xml @@ -0,0 +1,118 @@ + + + + + [CSW] AGS30 Belt + [CSW] AGS30 ベルト + [CSW] Лента AGS 30 + [CSW] AGS-30 벨트 + + + [CSW] MK19 Belt + [CSW] Mk19 ベルト + [CSW] Лента Mk19 + [CSW] Mk.19 벨트 + + + [CSW] TOW Tube + [CSW] TOW チューブ + [CSW] Туба TOW + [CSW] TOW 튜브 + + + [CSW] TOW2 Tube + [CSW] TOW2 チューブ + [CSW] Туба TOW-2 + [CSW] TOW2 튜브 + + + [CSW] PG-9 Round + [CSW] PG-9 砲弾 + [CSW] Снаряд ПГ-9 + [CSW] PG-9 대전차고폭탄 + + + [CSW] OG-9 Round + [CSW] OG-9 砲弾 + [CSW] Снаряд OГ-9 + [CSW] OG-9 고폭파편탄 + + + [CSW] M1 HE + [CSW] M1 榴弾 + [CSW] M1 HE + [CSW] M1 고폭탄 + [CSW] M1 HE + + + [CSW] M84 Smoke + [CSW] M84 白煙弾 + [CSW] M84 Дымовая + [CSW] M84 연막탄 + [CSW] M84 Fumigène + + + [CSW] M60A2 WP + [CSW] M60A2 白リン弾 + [CSW] M60A2 WP + [CSW] M60A2 백린연막탄 + [CSW] M60A2 WP + + + [CSW] M67 AT Laser Guided + [CSW] M67 対戦車レーザー誘導弾 + [CSW] M67 AT Laser Guided + [CSW] M67 레이저유도 대전차탄 + [CSW] M67 AT Guidé laser + + + [CSW] M314 Illumination + [CSW] M314 照明弾 + [CSW] M314 Осветительная + [CSW] M314 조명탄 + [CSW] M314 Illumination + + + [CSW] 3OF56 HE + [CSW] 3OF56 榴弾 + [CSW] 3OF56 HE + [CSW] 3OF56 고폭탄 + [CSW] 3OF56 HE + + + [CSW] 3OF69M Laser Guided + [CSW] 3OF69M レーザー誘導弾 + [CSW] 3OF69M Laser Guided + [CSW] 3OF69M 레이저유도탄 + [CSW] 3OF69M Guidé laser + + + [CSW] 122mm WP + [CSW] 122mm 白リン弾 + [CSW] 122mm WP + [CSW] 122mm 백린탄 + [CSW] 122mm WP + + + [CSW] D-462 Smoke + [CSW] D-462 白煙弾 + [CSW] D-462 Дымовая + [CSW] D-462 연막탄 + [CSW] D-462 Fumigène + + + [CSW] S-463 Illumination + [CSW] S-463 照明弾 + [CSW] S-463 Осветительная + [CSW] S-463 조명탄 + [CSW] S-463 Eclairante + + + [CSW] BK-6M HEAT + [CSW] BK-6M HEAT弾 + [CSW] BK-6M HEAT + [CSW] BK-6M 대전차고폭탄 + [CSW] BK-6M HEAT + + + diff --git a/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgAmmo.hpp b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgAmmo.hpp new file mode 100644 index 0000000000..1658715ddb --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgAmmo.hpp @@ -0,0 +1,21 @@ +class CfgAmmo { + class PipeBombBase; + class CUP_TimeBomb_Ammo: PipeBombBase { + hit = 3000; + indirectHit = 3000; + indirectHitRange = 5; + ace_explosives_explodeOnDefuse = 0.02; + }; + class CUP_PipeBomb_Ammo: PipeBombBase { + hit = 3000; + indirectHit = 3000; + indirectHitRange = 5; + ace_explosives_explodeOnDefuse = 0.02; + }; + + class CUP_Mine_Ammo; + class CUP_IED_V1_Ammo: CUP_Mine_Ammo { + ace_explosives_explodeOnDefuse = 0.06; + triggerWhenDestroyed = 1; + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgMagazines.hpp b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgMagazines.hpp new file mode 100644 index 0000000000..15df2f7333 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgMagazines.hpp @@ -0,0 +1,103 @@ +class CfgMagazines { + class CA_Magazine; + class CUP_TimeBomb_M: CA_Magazine { + scope = 1; + ace_explosives_placeable = 1; + useAction = 0; + ace_explosives_setupObject = "ACE_PipeBomb_place_CUP"; + class ACE_Triggers { + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch", "Cellphone"}; + class Timer { + FuseTime = 0.5; + }; + class Command { + FuseTime = 0.5; + }; + }; + }; + class CUP_Mine_M: CUP_TimeBomb_M { + ace_explosives_placeable = 1; + useAction = 0; + ace_explosives_setupObject = "ACE_Mine_place_CUP"; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.08; + }; + }; + }; + class CUP_MineE_M: CUP_TimeBomb_M { + ace_explosives_placeable = 1; + useAction = 0; + ace_explosives_setupObject = "ACE_MineE_place_CUP"; + class ACE_Triggers { + SupportedTriggers[] = {"PressurePlate"}; + class PressurePlate { + digDistance = 0.06; + }; + }; + }; + + class CUP_IED_V1_M: CUP_Mine_M { + ace_explosives_placeable = 1; + useAction = 0; + ace_explosives_setupObject = "ACE_IED_V1_place_CUP"; + class ACE_Triggers { + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch", "Cellphone", "PressurePlate"}; + }; + }; + class CUP_IED_V2_M: CUP_IED_V1_M { + useAction = 0; + ace_explosives_setupObject = "ACE_IED_V2_place_CUP"; + }; + class CUP_IED_V3_M: CUP_IED_V1_M { + useAction = 0; + ace_explosives_setupObject = "ACE_IED_V3_place_CUP"; + class ACE_Triggers { + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch", "Cellphone", "PressurePlate"}; + class Timer { + digDistance = 0.06; + }; + class Command { + digDistance = 0.06; + }; + class MK16_Transmitter { + digDistance = 0.06; + }; + class DeadmanSwitch { + digDistance = 0.06; + }; + class Cellphone { + digDistance = 0.06; + }; + class PressurePlate { + digDistance = 0.06; + }; + }; + }; + class CUP_IED_V4_M: CUP_IED_V1_M { + useAction = 0; + ace_explosives_setupObject = "ACE_IED_V4_place_CUP"; + class ACE_Triggers { + SupportedTriggers[] = {"Timer", "Command", "MK16_Transmitter", "DeadmanSwitch", "Cellphone", "PressurePlate"}; + class Timer { + digDistance = 0.08; + }; + class Command { + digDistance = 0.08; + }; + class MK16_Transmitter { + digDistance = 0.08; + }; + class DeadmanSwitch { + digDistance = 0.08; + }; + class Cellphone { + digDistance = 0.08; + }; + class PressurePlate { + digDistance = 0.08; + }; + }; + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgVehicles.hpp b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgVehicles.hpp new file mode 100644 index 0000000000..d10c315c3d --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_explosives/CfgVehicles.hpp @@ -0,0 +1,32 @@ +class CfgVehicles { + class ACE_Explosives_Place; + class ACE_PipeBomb_place_CUP: ACE_Explosives_Place { + displayName = "Satchel Charge"; + model = "\CUP\Weapons\CUP_Weapons_Put\CUP_Satchel.p3d"; + ace_explosives_offset[] = {0, 0, 0}; + }; + class ACE_Mine_place_CUP: ACE_Explosives_Place { + displayName = "AT-15 Anti-Tank Mine"; + model = "\CUP\Weapons\CUP_Weapons_Put\CUP_AT15.p3d"; + ace_explosives_offset[] = {0, 0, 0}; + }; + class ACE_MineE_place_CUP: ACE_Explosives_Place { + displayName = "TM46 Anti-Tank Mine"; + model = "\CUP\Weapons\CUP_Weapons_Put\CUP_TM46.p3d"; + ace_explosives_offset[] = {0, 0, 0}; + }; + class ACE_IED_V1_place_CUP: ACE_Explosives_Place { + displayName = "IED"; + model = "\CUP\Weapons\CUP_Weapons_Put\CUP_IED_V1.p3d"; + ace_explosives_offset[] = {0, 0, 0}; + }; + class ACE_IED_V2_place_CUP: ACE_IED_V1_place_CUP { + model = "\CUP\Weapons\CUP_Weapons_Put\CUP_IED_V2.p3d"; + }; + class ACE_IED_V3_place_CUP: ACE_IED_V1_place_CUP { + model = "\CUP\Weapons\CUP_Weapons_Put\CUP_IED_V3.p3d"; + }; + class ACE_IED_V4_place_CUP: ACE_IED_V1_place_CUP { + model = "\CUP\Weapons\CUP_Weapons_Put\CUP_IED_V4.p3d"; + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_explosives/config.cpp b/addons/compat_cup_weapons/compat_cup_weapons_explosives/config.cpp new file mode 100644 index 0000000000..ce16a310a8 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_explosives/config.cpp @@ -0,0 +1,25 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "CUP_Weapons_LoadOrder", + "ace_explosives" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/compat_cup_weapons/compat_cup_weapons_explosives/script_component.hpp b/addons/compat_cup_weapons/compat_cup_weapons_explosives/script_component.hpp new file mode 100644 index 0000000000..a697aad7f3 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_explosives/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT explosives +#define SUBCOMPONENT_BEAUTIFIED Explosives +#include "..\script_component.hpp" diff --git a/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp b/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp new file mode 100644 index 0000000000..2632a43e61 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgAmmo.hpp @@ -0,0 +1,26 @@ +class CfgAmmo { + class MissileBase; + class CUP_M_Javelin_AT: MissileBase { + irLock = 1; + laserLock = 0; + airLock = 0; + + class ace_missileguidance { + enabled = 1; + minDeflection = 0.00005; + maxDeflection = 0.025; + incDeflection = 0.00005; + canVanillaLock = 0; + defaultSeekerType = "Optic"; + seekerTypes[] = {"Optic"}; + defaultSeekerLockMode = "LOBL"; + seekerLockModes[] = {"LOBL"}; + seekerAngle = 180; + seekerAccuracy = 1; + seekerMinRange = 0; + seekerMaxRange = 2500; + defaultAttackProfile = "JAV_TOP"; + attackProfiles[] = {"JAV_TOP", "JAV_DIR"}; + }; + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgWeapons.hpp b/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgWeapons.hpp new file mode 100644 index 0000000000..35b1d2bf09 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_javelin/CfgWeapons.hpp @@ -0,0 +1,14 @@ +class CfgWeapons { + class Launcher_Base_F; + class CUP_launch_Javelin: Launcher_Base_F { + ace_javelin_enabled = 1; + weaponInfoType = "ACE_RscOptics_javelin"; + modelOptics = QPATHTOEF(javelin,data\reticle_titan.p3d); + canLock = 0; + lockingTargetSound[] = {"", 0, 1}; + lockedTargetSound[] = {"", 0, 1}; + ace_overpressure_angle = 30; + ace_overpressure_range = 2; + ace_overpressure_damage = 0.5; + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_javelin/config.cpp b/addons/compat_cup_weapons/compat_cup_weapons_javelin/config.cpp new file mode 100644 index 0000000000..8d5eeb37d5 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_javelin/config.cpp @@ -0,0 +1,24 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "CUP_Weapons_LoadOrder", + "ace_javelin" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgAmmo.hpp" +#include "CfgWeapons.hpp" diff --git a/addons/compat_cup_weapons/compat_cup_weapons_javelin/script_component.hpp b/addons/compat_cup_weapons/compat_cup_weapons_javelin/script_component.hpp new file mode 100644 index 0000000000..d42e0f4f01 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_javelin/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT javelin +#define SUBCOMPONENT_BEAUTIFIED Javelin +#include "..\script_component.hpp" diff --git a/addons/compat_cup_weapons/compat_cup_weapons_nightvision/CfgWeapons.hpp b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/CfgWeapons.hpp new file mode 100644 index 0000000000..04d26b8ead --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/CfgWeapons.hpp @@ -0,0 +1,118 @@ +#define NVG_BINO_PRESET \ + ace_nightvision_bluRadius = 0.13; \ + EGVAR(nightvision,border) = QPATHTOEF(nightvision,data\nvg_mask_binos_4096.paa); \ + EGVAR(nightvision,generation) = 3; \ + modelOptics = "" + +#define NVG_MONO_PRESET(GEN) \ + EGVAR(nightvision,eyeCups) = 1; \ + EGVAR(nightvision,border) = QPATHTOEF(nightvision,data\nvg_mask_4096.paa); \ + EGVAR(nightvision,bluRadius) = 0.13; \ + EGVAR(nightvision,generation) = GEN; \ + modelOptics = "" + +#define NVG_GPNVG_PRESET \ + EGVAR(nightvision,bluRadius) = 0.13; \ + EGVAR(nightvision,border) = QPATHTOEF(nightvision,data\nvg_mask_quad_4096.paa); \ + EGVAR(nightvision,generation) = 4; \ + modelOptics = "" + +#define NVG_GREEN_PRESET EGVAR(nightvision,colorPreset)[] = {0, {0.0, 0.0, 0.0, 0.0}, {1.3, 1.2, 0.0, 0.9}, {6, 1, 1, 0}} +#define NVG_WP_PRESET EGVAR(nightvision,colorPreset)[] = {0, {0.0, 0.0, 0.0, 0.0}, {1.1, 0.8, 1.9, 0.9}, {1, 1, 6, 0}} + +class CfgWeapons { + class NVGoggles; + // Monocular + class CUP_NVG_PVS7: NVGoggles { + NVG_MONO_PRESET(3); + NVG_GREEN_PRESET; + }; + class CUP_NVG_HMNVS: NVGoggles { + NVG_MONO_PRESET(3); + NVG_GREEN_PRESET; + }; + + // Binocular + class CUP_NVG_PVS14: NVGoggles { + NVG_BINO_PRESET; + NVG_GREEN_PRESET; + }; + class CUP_NVG_PVS15_black: NVGoggles { + NVG_BINO_PRESET; + NVG_GREEN_PRESET; + }; + class CUP_NVG_PVS15_green: NVGoggles { + NVG_BINO_PRESET; + NVG_GREEN_PRESET; + }; + class CUP_NVG_PVS15_tan: NVGoggles { + NVG_BINO_PRESET; + NVG_GREEN_PRESET; + }; + class CUP_NVG_PVS15_winter: NVGoggles { + NVG_BINO_PRESET; + NVG_GREEN_PRESET; + }; + + // White Phosphor NVGs + class CUP_NVG_PVS14_WP: CUP_NVG_PVS14 { + displayName = SUBCSTRING(CUP_NVG_PVS14_WP); + NVG_WP_PRESET; + }; + class CUP_NVG_PVS15_black_WP: CUP_NVG_PVS15_black { + displayName = SUBCSTRING(CUP_NVG_PVS15_black_WP); + NVG_WP_PRESET; + }; + class CUP_NVG_PVS15_green_WP: CUP_NVG_PVS15_green { + displayName = SUBCSTRING(CUP_NVG_PVS15_green_WP); + NVG_WP_PRESET; + }; + class CUP_NVG_PVS15_tan_WP: CUP_NVG_PVS15_tan { + displayName = SUBCSTRING(CUP_NVG_PVS15_tan_WP); + NVG_WP_PRESET; + }; + class CUP_NVG_PVS15_winter_WP: CUP_NVG_PVS15_winter { + displayName = SUBCSTRING(CUP_NVG_PVS15_winter_WP); + NVG_WP_PRESET; + }; + + // Gen4s + class CUP_NVG_1PN138: NVGoggles { + NVG_MONO_PRESET(4); + NVG_GREEN_PRESET; + }; + class CUP_NVG_GPNVG_black: NVGoggles { + NVG_GPNVG_PRESET; + NVG_GREEN_PRESET; + }; + class CUP_NVG_GPNVG_tan: NVGoggles { + NVG_GPNVG_PRESET; + NVG_GREEN_PRESET; + }; + class CUP_NVG_GPNVG_green: NVGoggles { + NVG_GPNVG_PRESET; + NVG_GREEN_PRESET; + }; + class CUP_NVG_GPNVG_winter: NVGoggles { + NVG_GPNVG_PRESET; + NVG_GREEN_PRESET; + }; + + // White Phosphor NVGs + class CUP_NVG_GPNVG_black_WP: CUP_NVG_GPNVG_black { + displayName = SUBCSTRING(CUP_NVG_GPNVG_black_WP); + NVG_WP_PRESET; + }; + class CUP_NVG_GPNVG_tan_WP: CUP_NVG_GPNVG_tan { + displayName = SUBCSTRING(CUP_NVG_GPNVG_tan_WP); + NVG_WP_PRESET; + }; + class CUP_NVG_GPNVG_green_WP: CUP_NVG_GPNVG_green { + displayName = SUBCSTRING(CUP_NVG_GPNVG_green_WP); + NVG_WP_PRESET; + }; + class CUP_NVG_GPNVG_winter_WP: CUP_NVG_GPNVG_winter { + displayName = SUBCSTRING(CUP_NVG_GPNVG_winter_WP); + NVG_WP_PRESET; + }; +}; diff --git a/addons/compat_cup_weapons/compat_cup_weapons_nightvision/config.cpp b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/config.cpp new file mode 100644 index 0000000000..4730cdf3a9 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/config.cpp @@ -0,0 +1,26 @@ +#include "script_component.hpp" + +class CfgPatches { + class SUBADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = { + "CUP_NVG_PVS14_WP", "CUP_NVG_PVS15_black_WP", "CUP_NVG_PVS15_green_WP", "CUP_NVG_PVS15_tan_WP", "CUP_NVG_PVS15_winter_WP", + "CUP_NVG_GPNVG_black_WP", "CUP_NVG_GPNVG_tan_WP", "CUP_NVG_GPNVG_green_WP", "CUP_NVG_GPNVG_winter_WP" + }; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + "CUP_Weapons_LoadOrder", + "ace_nightvision" + }; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + + addonRootClass = QUOTE(ADDON); + }; +}; + +#include "CfgWeapons.hpp" diff --git a/addons/compat_cup_weapons/compat_cup_weapons_nightvision/script_component.hpp b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/script_component.hpp new file mode 100644 index 0000000000..85036e02b6 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/script_component.hpp @@ -0,0 +1,3 @@ +#define SUBCOMPONENT nightvision +#define SUBCOMPONENT_BEAUTIFIED Night Vision +#include "..\script_component.hpp" diff --git a/addons/compat_cup_weapons/compat_cup_weapons_nightvision/stringtable.xml b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/stringtable.xml new file mode 100644 index 0000000000..a52bea0e31 --- /dev/null +++ b/addons/compat_cup_weapons/compat_cup_weapons_nightvision/stringtable.xml @@ -0,0 +1,89 @@ + + + + + AN/PVS-14 (WP) + AN/PVS-14 (白色蛍光) + AN/PVS-14 (FB) + AN/PVS-14 (WP) + AN/PVS-14 (WP) + AN/PVS-14 (백색광) + AN/PVS-14 (WP) + AN/PVS-14 (БФ) + + + AN/PVS-15 (Black, WP) + AN/PVS-15 (グリーン, 白色蛍光) + AN/PVS-15 (Verde, FB) + AN/PVS-15 (Zielone, WP) + AN/PVS-15 (grün, WP) + AN/PVS-15 (녹색, 백색광) + AN/PVS-15 (vertes, WP) + AN/PVS-15 (Чёрный, БФ) + + + AN/PVS-15 (Green, WP) + AN/PVS-15 (ブラック、白色蛍光) + AN/PVS-15 (Nero, FB) + AN/PVS-15 (Czarne, WP) + AN/PVS-15 (Schwarz, WP) + AN/PVS-15 (검정, 백색광) + AN/PVS-15 (noires, WP) + AN/PVS-15 (Зелёный, БФ) + + + AN/PVS-15 (Tan, WP) + AN/PVS-15 (タン, 白色蛍光) + AN/PVS-15 (Marroncina, FB) + AN/PVS-15 (jasnobrązowa, WP) + AN/PVS-15 (hellbraun, WP) + AN/PVS-15 (황갈색, 백색광) + AN/PVS-15 (marron clair, WP) + AN/PVS-15 (Желтовато-коричневый, БФ) + + + AN/PVS-15 (Winter, WP) + AN/PVS-15 (冬季迷彩, WP) + AN/PVS-15 (설상, 백색광) + AN/PVS-15 (Белый, БФ) + AN/PVS-15 (Blanc, WP) + + + GPNVG (Black, WP) + GPNVG (グリーン, 白色蛍光) + GPNVG (Verde, FB) + GPNVG (Zielone, WP) + GPNVG (grün, WP) + GPNVG (녹색, 백색광) + GPNVG (vertes, WP) + GPNVG (Чёрный, БФ) + + + GPNVG (Tan, WP) + GPNVG (タン, 白色蛍光) + GPNVG (Marroncina, FB) + GPNVG (jasnobrązowa, WP) + GPNVG (hellbraun, WP) + GPNVG (황갈색, 백색광) + GPNVG (marron clair, WP) + GPNVG (Желтовато-коричневый, БФ) + + + GPNVG (Green, WP) + GPNVG (ブラック、白色蛍光) + GPNVG (Nero, FB) + GPNVG (Czarne, WP) + GPNVG (Schwarz, WP) + GPNVG (검정, 백색광) + GPNVG (noires, WP) + GPNVG (Зелёный, БФ) + + + GPNVG (Winter, WP) + GPNVG (冬季迷彩, WP) + GPNVG (설상, 백색광) + AN/PVS-15 (Белый, БФ) + GPNVG (Blanc, WP) + + + diff --git a/addons/compat_cup_weapons/config.cpp b/addons/compat_cup_weapons/config.cpp new file mode 100644 index 0000000000..54dd0271cc --- /dev/null +++ b/addons/compat_cup_weapons/config.cpp @@ -0,0 +1,20 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + name = COMPONENT_NAME; + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"CUP_Weapons_LoadOrder"}; + skipWhenMissingDependencies = 1; + author = ECSTRING(common,ACETeam); + authors[] = {"Community Upgrade Project", "Mike"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventHandlers.hpp" +#include "CfgMagazines.hpp" +#include "CfgWeapons.hpp" diff --git a/addons/compat_cup_weapons/script_component.hpp b/addons/compat_cup_weapons/script_component.hpp new file mode 100644 index 0000000000..9fb9892c1d --- /dev/null +++ b/addons/compat_cup_weapons/script_component.hpp @@ -0,0 +1,5 @@ +#define COMPONENT compat_cup_weapons +#define COMPONENT_BEAUTIFIED CUP Weapons Compatibility + +#include "\z\ace\addons\main\script_mod.hpp" +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/compat_rhs_afrf3/CfgVehicles.hpp b/addons/compat_rhs_afrf3/CfgVehicles.hpp index 622d764ad2..1cf5029bc3 100644 --- a/addons/compat_rhs_afrf3/CfgVehicles.hpp +++ b/addons/compat_rhs_afrf3/CfgVehicles.hpp @@ -434,7 +434,11 @@ class CfgVehicles { "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_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_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_51_hitpoint", "SLAT_52_hitpoint", "SLAT_53_hitpoint", @@ -470,6 +474,9 @@ class CfgVehicles { "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint", "era_47_hitpoint", "era_48_hitpoint", "era_49_hitpoint", "era_50_hitpoint" }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "slat_51_hitpoint", "slat_52_hitpoint", "slat_53_hitpoint", "slat_54_hitpoint" + }; }; class rhs_t90am_tv: rhs_t90_tv { EGVAR(vehicle_damage,eraHitpoints)[] = { @@ -483,7 +490,7 @@ class CfgVehicles { "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" + "era_61_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", @@ -492,10 +499,31 @@ class CfgVehicles { }; }; class rhs_t90sm_tv: rhs_t90am_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_24_hitpoint", "era_25_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_26_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_23_hitpoint" + }; 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" + "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", + "slat_18_hitpoint", "slat_19_hitpoint", "slat_20_hitpoint", + "slat_21_hitpoint", "slat_22_hitpoint", "slat_24_hitpoint", + "slat_25_hitpoint" }; }; @@ -539,6 +567,35 @@ class CfgVehicles { "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint" }; }; + class rhs_t80um: 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_t15_base; + class rhs_t15_tv: rhs_t15_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" + }; + EGVAR(vehicle_damage,slatHitpoints)[] = { + "slat_38_hitpoint", "slat_39_hitpoint", "slat_40_hitpoint", "slat_41_hitpoint" + }; + }; // Wirecutter Backpacks class rhs_assault_umbts; diff --git a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp index fd889cd096..6a3bb0a083 100644 --- a/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp +++ b/addons/compat_rhs_afrf3/compat_rhs_afrf3_csw/CfgVehicles.hpp @@ -5,7 +5,6 @@ class CfgVehicles { class StaticGrenadeLauncher; class rhs_SPG9_base: AT_01_base_F { - // ENABLE_CSW_ATTRIBUTE; class ACE_CSW { enabled = 1; proxyWeapon = QGVAR(rhs_weap_SPG9); @@ -26,7 +25,6 @@ class CfgVehicles { }; class rhs_Kornet_Base: AT_01_base_F { - // ENABLE_CSW_ATTRIBUTE; class ACE_CSW { enabled = 1; proxyWeapon = QGVAR(rhs_weap_9K133_launcher); @@ -40,7 +38,6 @@ class CfgVehicles { }; class rhs_Metis_Base: AT_01_base_F { - // ENABLE_CSW_ATTRIBUTE; class ACE_CSW { enabled = 1; proxyWeapon = QGVAR(rhs_weap_9K115_2_launcher); @@ -54,7 +51,6 @@ class CfgVehicles { }; class rhs_2b14_82mm_Base: StaticMortar { - // ENABLE_CSW_ATTRIBUTE; class ACE_CSW { enabled = 1; magazineLocation = ""; @@ -99,7 +95,6 @@ class CfgVehicles { }; class RHS_AGS30_TriPod_base: StaticGrenadeLauncher { - // ENABLE_CSW_ATTRIBUTE; class ACE_CSW { enabled = 1; proxyWeapon = QGVAR(rhs_weap_AGS30); diff --git a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp index 220aec4c24..7e58387dab 100644 --- a/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp +++ b/addons/compat_rhs_gref3/compat_rhs_gref3_csw/CfgVehicles.hpp @@ -1,7 +1,6 @@ class CfgVehicles { class StaticMGWeapon; class rhs_DSHKM_base: StaticMGWeapon { - // ENABLE_CSW_ATTRIBUTE; class ACE_CSW { enabled = 1; proxyWeapon = QGVAR(rhs_weap_DSHKM); diff --git a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/stringtable.xml b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/stringtable.xml index bb185513a7..bc2413a2ca 100644 --- a/addons/compat_rhs_usf3/compat_rhs_usf3_csw/stringtable.xml +++ b/addons/compat_rhs_usf3/compat_rhs_usf3_csw/stringtable.xml @@ -10,6 +10,7 @@ [CSW] BGM-71A TOW [CSW] BGM-71A TOW [CSW] BGM-71A TOW + [CSW] BGM-71A TOW [CSW] BGM-71B TOW @@ -20,6 +21,7 @@ [CSW] BGM-71B TOW [CSW] BGM-71B TOW [CSW] BGM-71B TOW + [CSW] BGM-71B TOW [CSW] BGM-71C ITOW @@ -30,6 +32,7 @@ [CSW] BGM-71C ITOW [CSW] BGM-71C ITOW [CSW] BGM-71C ITOW + [CSW] BGM-71C ITOW [CSW] BGM-71D TOW-2 @@ -40,6 +43,7 @@ [CSW] BGM-71D TOW-2 [CSW] BGM-71D TOW-2 [CSW] BGM-71D TOW-2 + [CSW] BGM-71D TOW-2 [CSW] BGM-71E TOW-2A @@ -50,6 +54,7 @@ [CSW] BGM-71E TOW-2A [CSW] BGM-71E TOW-2A [CSW] BGM-71E TOW-2A + [CSW] BGM-71E TOW-2A [CSW] BGM-71F TOW-2B @@ -60,6 +65,7 @@ [CSW] BGM-71F TOW-2B [CSW] BGM-71F TOW-2B [CSW] BGM-71F TOW-2B + [CSW] BGM-71F TOW-2B [CSW] BGM-71F-3 TOW-2B AERO @@ -70,6 +76,7 @@ [CSW] BGM-71F-3 TOW-2B AERO [CSW] BGM-71F-3 TOW-2B AERO [CSW] BGM-71F-3 TOW-2B AERO + [CSW] BGM-71F-3 TOW-2B AERO [CSW] BGM-71H Bunker Buster @@ -80,6 +87,7 @@ [CSW] BGM-71H Anti-Búnquer [CSW] BGM-71H Bunker Buster [CSW] BGM-71H Anti-Bunker + [CSW] BGM-71H Bunker Buster [CSW] Mk. 19 40mm M384 HE @@ -90,6 +98,7 @@ [CSW] Mk. 19 40mm M384 HE [CSW] Mk. 19 40mm M384 HE [CSW] Mk. 19 40mm M384 HE + [CSW] Mk. 19 40mm M384 HE [CSW] Mk. 19 40mm M430I HEDP @@ -100,6 +109,7 @@ [CSW] Mk. 19 40mm M430I HEDP [CSW] Mk. 19 40mm M430I HEDP [CSW] Mk. 19 40mm M430I HEDP + [CSW] Mk. 19 40mm M430I HEDP [CSW] Mk. 19 40mm M430A1 HEDP @@ -110,6 +120,7 @@ [CSW] Mk. 19 40mm M430A1 HEDP [CSW] Mk. 19 40mm M430A1 HEDP [CSW] Mk. 19 40mm M430A1 HEDP + [CSW] Mk. 19 40mm M430A1 HEDP [CSW] Mk. 19 40mm M1001 Canister @@ -120,6 +131,7 @@ [CSW] Mk. 19 40mm M1001 Bote de metralla [CSW] Mk. 19 40mm M1001 Kanister [CSW] Mk. 19 40mm M1001 Pallettoni + [CSW] Mk. 19 40 mm M1001 Chevrotine diff --git a/addons/compat_sog/stringtable.xml b/addons/compat_sog/stringtable.xml index 06f0827d08..fc64aef97c 100644 --- a/addons/compat_sog/stringtable.xml +++ b/addons/compat_sog/stringtable.xml @@ -12,6 +12,7 @@ Закопать Enterrarse Escavar + Creuser M49A2 60mm HE @@ -24,6 +25,7 @@ M49A2 60 мм ОФ M49A2 60mm HE M49A2 60mm HE + M49A2 60mm HE M302 60mm WP @@ -36,6 +38,7 @@ M302 60 мм Фосфорная M302 60mm WP M302 60mm WP + M302 60mm Phosphore Blanc M83 60mm Lume @@ -48,6 +51,7 @@ M83 60 мм Осветительная M83 60mm Iluminación M83 60mm Iluminação + M83 60 mm Eclairant M374 81mm HE @@ -60,6 +64,7 @@ M374 81 мм ОФ M374 81mm HE M374 81mm HE + M374 81mm HE M375 81mm WP @@ -72,6 +77,7 @@ M375 81 мм Фосфорная M375 81mm WP M375 81mm WP + M375 81mm Phosphore Blanc M301A3 81mm Lume @@ -84,6 +90,7 @@ M301A3 81 мм Осветительная M301A3 81mm Iluminación M301A3 81mm Iluminação + M301A3 81mm Eclairant M57 81mm Smoke @@ -96,6 +103,7 @@ M57 81 мм Дымовая M57 81mm Smoke M57 81mm Fumígena + M57 81mm Fumigène O-832D 82mm HE @@ -108,6 +116,7 @@ О-832Д 82 мм ОФ O-832D 82mm HE O-832D 82mm HE + O-832D 82mm HE D-832 82mm WP @@ -120,6 +129,7 @@ Д-832 82 мм Фосфорная D-832 82mm WP D-832 82mm WP + D-832 82mm Phosphore Blanc S-832S 82mm Lume @@ -132,6 +142,7 @@ С-832С 82 мм Осветительная S-832S 82mm Iluminación S-832S 82mm Iluminação + S-832S 82mm Eclairant [ACE] M49A2 60mm HE Box @@ -144,6 +155,7 @@ [ACE] Коробка M49A2 60 мм ОФ [ACE] M49A2 60mm Caja de HE [ACE] M49A2 60mm Caixa de HE + [ACE] Scatola M49A2 60mm HE [ACE] M302 60mm WP Box @@ -156,6 +168,7 @@ [ACE] Коробка M302 60 мм Фосфорных [ACE] M302 60mm Caja de WP [ACE] M302 60mm Caixa de WP + [ACE] M302 60mm Phosphore Blanc Box [ACE] M83 60mm Lume Box @@ -168,6 +181,7 @@ [ACE] Коробка M83 60 мм Осветительных [ACE] M83 60mm Caja de Iluminación [ACE] M83 60mm Caixa de Iluminação + [ACE] M83 60mm Eclairant Box [ACE] M374 81mm HE Box @@ -180,6 +194,7 @@ [ACE] Коробка M374 81 мм ОФ [ACE] M374 81mm Caja de HE [ACE] M374 81mm Caixa de HE + [ACE] Scatola M374 81mm HE [ACE] M375 81mm WP Box @@ -192,6 +207,7 @@ [ACE] Коробка M375 81 мм Фосфорных [ACE] M375 81mm Caja de WP [ACE] M375 81mm Caixa de WP + [ACE] M375 81mm Phosphore Blanc Box [ACE] M301A3 81mm Lume Box @@ -204,6 +220,7 @@ [ACE] Коробка M301A3 81 мм Осветительных [ACE] M301A3 81mm Caja de Iluminación [ACE] M301A3 81mm Caixa de Iluminação + [ACE] M301A3 81mm Eclairant Box [ACE] M57 81mm Smoke Box @@ -216,6 +233,7 @@ [ACE] Коробка M57 81 мм Дымовых [ACE] M57 81mm Caja de Humo [ACE] M57 81mm Caixa de Fumígena + [ACE] M57 81mm Fumigène Box [ACE] O-832D 82mm HE Box @@ -228,6 +246,7 @@ [ACE] Коробка О-832Д 82 мм ОФ [ACE] O-832D 82mm Caja de HE [ACE] O-832D 82mm Caixa de HE + [ACE] Scatola O-832D 82mm HE [ACE] D-832 82mm WP Box @@ -240,6 +259,7 @@ [ACE] Коробка Д-832 82 мм Фосфорных [ACE] D-832 82mm Caja de WP [ACE] D-832 82mm Caixa de WP + [ACE] D-832 82mm Phosphore Blanc Box [ACE] S-832S 82mm Lume Box @@ -252,6 +272,7 @@ [ACE] Коробка С-832С 82 мм Осветительных [ACE] S-832S 82mm Caja de Iluminación [ACE] S-832S 82mm Caixa de Iluminação + [ACE] S-832S 82mm Eclairant Box Dig Spiderhole @@ -264,6 +285,7 @@ Выкопать паучью дыру Excavar Agujero de araña Escavar buraco de aranha + Creuser un trou d'araignée Dig Spiderhole (Angled Cover) @@ -276,6 +298,7 @@ Выкопать крытую паучью дыру Excavar Agujero de araña (Cubierta inclinada) Escavar buraco de aranha (Cobertura inclinada) + Creuser un trou d'araignée (couverture d'angle) Dig Spiderhole (Dual) @@ -288,6 +311,7 @@ Выкопать двойную паучью дыру Excavar Agujero de araña (Doble) Escavar buraco de aranha (Duplo) + Creuser un trou d'araignée (double) [CSW] M1919A4 Gun Bag @@ -300,6 +324,7 @@ [CSW] Сумка с M1919A4 [CSW] M1919A4 Bolsa para arma [CSW] Bolsa para M1919A4 + [CSW] M1919A4 Gun Bag [CSW] M1919A6 Gun Bag @@ -312,6 +337,7 @@ [CSW] Сумка с M1919A6 [CSW] M1919A6 Bolsa para arma [CSW] Bolsa para M1919A6 + [CSW] M1919A6 Gun Bag [CSW] M60 Gun Bag @@ -324,6 +350,7 @@ [CSW] Сумка с M60 [CSW] M60 Bolsa para arma [CSW] Bolsa para M60 + [CSW] M60 Gun Bag [CSW] DShK (Shield) Gun Bag @@ -336,6 +363,7 @@ [CSW] Сумка с ДШК (со щитом) [CSW] DShK (Apantallada) Bolsa para arma [CSW] Bolsa para DShK (Escudo) + [CSW] DShK (Shield) Gun Bag [CSW] DShK (AA) Gun Bag @@ -348,6 +376,7 @@ [CSW] Сумка с ДШК (зенитный) [CSW] DShK (AA) Bolsa para arma [CSW] Bolsa para DShK (AA) + [CSW] DShK (AA) Gun Bag [CSW] RPD Gun Bag @@ -360,6 +389,7 @@ [CSW] Сумка с РПД [CSW] RPD Bolsa para arma [CSW] Bolsa para RPD + [CSW] RPD Gun Bag [CSW] PK Gun Bag @@ -372,6 +402,7 @@ [CSW] Сумка с ПК [CSW] PK Bolsa para arma [CSW] Bolsa para PK + [CSW] PK Sac d'armes [CSW] MG42 Gun Bag @@ -384,6 +415,7 @@ [CSW] Сумка с MG42 [CSW] MG42 Bolsa para arma [CSW] Bolsa para MG42 + [CSW] MG42 Sac d'armes [CSW] SGM Gun Bag @@ -396,6 +428,7 @@ [CSW] Сумка с СГМ [CSW] SGM Bolsa para arma [CSW] Bolsa para SGM + [CSW] SGM Sac d'armes [CSW] SGM (Shield) Gun Bag @@ -408,6 +441,7 @@ [CSW] Сумка с СГМ (со щитом) [CSW] SGM (Apantallada) Bolsa para arma [CSW] Bolsa para SGM (Escudo) + [CSW] SGM Sac d'armes (avec bouclier) [CSW] Mk18 Gun Bag @@ -420,6 +454,7 @@ [CSW] Сумка с Mk18 [CSW] Mk18 Bolsa para arma [CSW] Bolsa para Mk18 + [CSW] Mk18 Sac d'armes [CSW] M29 Mortar Tube @@ -432,6 +467,7 @@ [CSW] Сумка с миномётом M29 [CSW] M29 Tubo de Mortero [CSW] M29 Tubo de Morteiro + [CSW] Tube de mortier M29 [CSW] M2 Mortar Tube @@ -444,6 +480,7 @@ [CSW] Сумка с миномётом M2 [CSW] M2 Tubo de mortero [CSW] M2 Tubo de Morteiro + [CSW] Tube de mortier M2 [CSW] Type 53 Mortar Tube @@ -456,6 +493,7 @@ [CSW] Сумка с миномётом Type 53 [CSW] Type 53 Tubo de mortero [CSW] Type 53 Tubo de Morteiro + [CSW] Tube de mortier Type 53 diff --git a/addons/compat_spe/CfgAmmo.hpp b/addons/compat_spe/CfgAmmo.hpp index 0917727974..d11510648b 100644 --- a/addons/compat_spe/CfgAmmo.hpp +++ b/addons/compat_spe/CfgAmmo.hpp @@ -3,4 +3,5 @@ class CfgAmmo { #include "CfgAmmo\explosives.hpp" #include "CfgAmmo\grenades.hpp" #include "CfgAmmo\melee.hpp" + #include "CfgAmmo\bullets.hpp" }; diff --git a/addons/compat_spe/CfgAmmo/bullets.hpp b/addons/compat_spe/CfgAmmo/bullets.hpp new file mode 100644 index 0000000000..1e0e22e62d --- /dev/null +++ b/addons/compat_spe/CfgAmmo/bullets.hpp @@ -0,0 +1,12 @@ +class SPE_Bullet_Vehicle_base; + +class SPE_B_127x99_Mixed: SubmunitionBase { + ACE_caliber = 12.954; +}; + +class SPE_B_127x99_Ball: SPE_Bullet_Vehicle_base { + ACE_caliber = 12.954; +}; +class SPE_B_127x99_API: SPE_B_127x99_Ball { + EGVAR(vehicle_damage,incendiary) = 1; +}; diff --git a/addons/compat_spe/CfgMagazines.hpp b/addons/compat_spe/CfgMagazines.hpp index e3ac58ca41..c5e0b54c75 100644 --- a/addons/compat_spe/CfgMagazines.hpp +++ b/addons/compat_spe/CfgMagazines.hpp @@ -1,3 +1,4 @@ class CfgMagazines { #include "CfgMagazines\csw.hpp" + #include "CfgMagazines\flamethrower.hpp" }; diff --git a/addons/compat_spe/CfgMagazines/flamethrower.hpp b/addons/compat_spe/CfgMagazines/flamethrower.hpp new file mode 100644 index 0000000000..fc1d67558d --- /dev/null +++ b/addons/compat_spe/CfgMagazines/flamethrower.hpp @@ -0,0 +1,3 @@ +class SPE_Flamethrower_Mag: CA_Magazine { + type = 256; +}; diff --git a/addons/compat_ws/CfgWeapons.hpp b/addons/compat_ws/CfgWeapons.hpp index 10e4b68eb2..30e6882b08 100644 --- a/addons/compat_ws/CfgWeapons.hpp +++ b/addons/compat_ws/CfgWeapons.hpp @@ -20,11 +20,13 @@ class CfgWeapons { ACE_barrelLength = 550; ACE_barrelTwist = 304.8; ACE_twistDirection = 1; + EGVAR(overheating,allowSwapBarrel) = 1; }; class LMG_S77_Compact_base_lxWS: LMG_S77_base_lxWS { ACE_barrelLength = 500; ACE_barrelTwist = 304.8; ACE_twistDirection = 1; + EGVAR(overheating,allowSwapBarrel) = 1; }; // SLR diff --git a/addons/compat_ws/compat_ws_realisticnames/stringtable.xml b/addons/compat_ws/compat_ws_realisticnames/stringtable.xml index db4dc2b6d5..092fd2a9ea 100644 --- a/addons/compat_ws/compat_ws_realisticnames/stringtable.xml +++ b/addons/compat_ws/compat_ws_realisticnames/stringtable.xml @@ -7,6 +7,8 @@ AA12 AA12 AA12 + AA12 + AA12 AA12 (Sand) @@ -14,6 +16,8 @@ AA12 (Sand) AA12 (Sabbia) AA12 (サンド) + AA12 (Песочный) + AA12 (Sable) AA12 (Snake) @@ -21,6 +25,7 @@ AA12 (Schlange) AA12 (Serpe) AA12 (ヘビ柄) + AA12 (Змея) Galil ARM @@ -28,6 +33,8 @@ Galil ARM Galil ARM ガリル ARM + Galil ARM + Galil ARM Galil ARM (Old) @@ -35,6 +42,8 @@ Galil ARM (Alt) Galil ARM (Vecchio) ガリル ARM (使い古し) + Galil ARM (Старый) + Galil ARM (Ancien) GLX 160 @@ -42,6 +51,8 @@ GLX 160 GLX-160 GLX 160 + GLX 160 + GLX 160 GLX 160 (Snake) @@ -49,6 +60,7 @@ GLX 160 (Schlange) GLX-160 (Serpe) GLX 160 (ヘビ柄) + GLX 160 (Змея) GLX 160 (Hex) @@ -56,6 +68,8 @@ GLX 160 (Hex) GLX-160 (Hex) GLX 160 (六角形迷彩) + GLX 160 (Гекс) + GLX 160 (Hex) GLX 160 (Green Hex) @@ -63,6 +77,8 @@ GLX 160 (Grün Hex) GLX-160 (Hex Verde) GLX 160 (緑六角形迷彩) + GLX 160 (Зеленый Гекс) + GLX 160 (Vert Hex) GLX 160 (Camo) @@ -70,6 +86,8 @@ GLX 160 (Tarn) GLX-160 (Mimetica) GLX 160 (迷彩) + GLX 160 (Камуфляж) + GLX 160 (Camo) GLX 160 (Sand) @@ -77,6 +95,8 @@ GLX 160 (Sand) GLX-160 (Sabbia) GLX 160 (サンド) + GLX 160 (Песочный) + GLX 160 (Sable) Mk14 Mod 1 EBR (Black) @@ -84,6 +104,8 @@ Mk14 Mod 1 EBR (Schwarz) Mk14 Mod 1 EBR (Nero) Mk14 Mod 1 EBR (ブラック) + Mk14 Mod 1 EBR (Черный) + Mk14 Mod 1 EBR (Noir) Mk14 Mod 1 EBR (Snake) @@ -91,12 +113,15 @@ Mk14 Mod 1 EBR (Schlange) Mk14 Mod 1 EBR (Serpe) Mk14 Mod 1 EBR (ヘビ柄) + Mk14 Mod 1 EBR (Змея) Vektor SS-77 벡터 SS-77 Vektor SS-77 ヴェクター SS-77 + Vektor SS-77 + Vektor SS-77 Vektor SS-77 (Camo) @@ -104,6 +129,8 @@ Vektor SS-77 (Tarn) Vektor SS-77 (Mimetica) ヴェクター SS-77 (迷彩) + Vektor SS-77 (Камуфляж) + Vektor SS-77 (Camo) Vektor SS-77 (Hex) @@ -111,6 +138,8 @@ Vektor SS-77 (Hex) Vektor SS-77 (Hex) ヴェクター SS-77 (六角形迷彩) + Vektor SS-77 (гекс) + Vektor SS-77 (Hex) Vektor SS-77 (Green Hex) @@ -118,6 +147,8 @@ Vektor SS-77 (Grün Hex) Vektor SS-77 (Hex Verde) ヴェクター SS-77 (緑六角形迷彩) + Vektor SS-77 (зеленый гекс) + Vektor SS-77 (VertHex) Vektor SS-77 (Desert) @@ -125,6 +156,8 @@ Vektor SS-77 (Wüste) Vektor SS-77 (Deserto) ヴェクター SS-77 (砂漠迷彩) + Vektor SS-77 (песочныйt) + Vektor SS-77 (Désert) Vektor SS-77 Compact @@ -132,6 +165,8 @@ Vektor SS-77 Kompakt Vektor SS-77 Compatto ヴェクター SS-77 コンパクト + Vektor SS-77 Compact + Vektor SS-77 Compacte Vektor SS-77 Compact (Snake) @@ -139,6 +174,7 @@ Vektor SS-77 Compact (Schlange) Vektor SS-77 Compatto (Serpe) ヴェクター SS-77 コンパクト (ヘビ柄) + Vektor SS-77 Compact (змея) FN FAL 50.00 (Wood) @@ -146,6 +182,8 @@ FN FAL 50.00 (Holz) FN FAL 50.00 (Legno) FN FAL 50.00 (森林迷彩) + FN FAL 50.00 (лесной) + FN FAL 50.00 (Bois) FN FAL 50.00 GL (Wood) @@ -153,6 +191,8 @@ FN FAL 50.00 GL (Holz) FN FAL 50.00 GL (Legno) FN FAL 50.00 GL (森林迷彩) + FN FAL 50.00 GL (лесной) + FN FAL 50.00 GL (Bois) FN FAL 50.00 @@ -160,6 +200,8 @@ FN FAL 50.00 FN FAL 50.00 FN FAL 50.00 + FN FAL 50.00 + FN FAL 50.00 FN FAL 50.00 GL @@ -167,6 +209,8 @@ FN FAL 50.00 GL FN FAL 50.00 GL FN FAL 50.00 GL + FN FAL 50.00 GL + FN FAL 50.00 GL FN FAL 50.00 (Desert) @@ -174,6 +218,8 @@ FN FAL 50.00 (Wüstet) FN FAL 50.00 (Deserto) FN FAL 50.00 (砂漠迷彩) + FN FAL 50.00 (песочный) + FN FAL 50.00 (Désert) FN FAL 50.00 (Jungle) @@ -181,6 +227,8 @@ FN FAL 50,00 (Dschungel) FN FAL 50,00 (Giungla) FN FAL 50.00 (熱帯迷彩) + FN FAL 50.00 (джунгли) + FN FAL 50.00 (Jungle) Vektor R4 @@ -188,6 +236,8 @@ Vektor R4 Vektor R4 ヴェクター R5 + Vektor R4 + Vektor R4 Vektor R5 Carbine @@ -195,6 +245,8 @@ Vektor R5 Carbine Vektor R5 Carabina ヴェクター R5 カービン + Vektor R5 Carbine + Vektor R5 Carbine Vektor R5 Carbine GL @@ -202,6 +254,8 @@ Vektor R5 Carbine GL Vektor R5 Carabina GL ヴェクター R5 カービン GL + Vektor R5 Carbine GL + Vektor R5 Carbine GL Vektor R5 Carbine (Snake) @@ -209,6 +263,7 @@ Vektor R5 Carbine (Schlange) Vektor R5 Carabina (Serpe) ヴェクター R5 カービン (ヘビ柄) + Vektor R5 Carbine (Змея) Vektor R5 Carbine GL (Snake) @@ -216,6 +271,7 @@ Vektor R5 Carbine GL (Schlange) Vektor R5 Carabina GL (Serpe) ヴェクター R5 カービン GL (ヘビ柄) + Vektor R5 Carbine GL (Змея) XMS diff --git a/addons/concertina_wire/XEH_postInit.sqf b/addons/concertina_wire/XEH_postInit.sqf index 7cb8909c81..bb3f022534 100644 --- a/addons/concertina_wire/XEH_postInit.sqf +++ b/addons/concertina_wire/XEH_postInit.sqf @@ -10,4 +10,4 @@ GVAR(deployPFH) = -1; }; }] call CBA_fnc_addEventHandler; -[QGVAR(vehicleDamage), {_this call FUNC(vehicleDamage)}] call CBA_fnc_addEventHandler; +[QGVAR(vehicleDamage), LINKFUNC(vehicleDamage)] call CBA_fnc_addEventHandler; diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index 579bc73f97..c915109e1b 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -22,7 +22,7 @@ params ["_wirecoil", "_unit"]; private _wireNoGeo = "ACE_ConcertinaWireNoGeo" createVehicle [0,0,0]; { _wireNoGeo animate [_x, 1]; -} count WIRE_FAST; +} forEach WIRE_FAST; GVAR(placer) = _unit; private _dir = getDir _unit; @@ -51,7 +51,7 @@ GVAR(deployPFH) = [{ private _wire = "ACE_ConcertinaWire" createvehicle [0, 0, 0]; { _wire animate [_x, _anim]; - } count WIRE_FAST; + } forEach WIRE_FAST; [{ params ["_args", "_idPFH"]; @@ -74,7 +74,7 @@ GVAR(deployPFH) = [{ _wireNoGeo setDir _dir; { _wireNoGeo animate [_x, _anim]; - } count WIRE_FAST; + } forEach WIRE_FAST; }, 0, [_wireNoGeo, _wireNoGeoPos, _unit]] call CBA_fnc_addPerFrameHandler; [LLSTRING(RollWire), "", ""] call EFUNC(interaction,showMouseHint); diff --git a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf index 3a90b62a91..86aac9e8bf 100644 --- a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf +++ b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf @@ -20,7 +20,7 @@ params ["_wire"]; { _wire animate [_x, 1]; -} count WIRE_FAST; +} forEach WIRE_FAST; [{ params ["_args", "_idPFH"]; diff --git a/addons/cookoff/XEH_postInit.sqf b/addons/cookoff/XEH_postInit.sqf index b33723619e..eba4eeced0 100644 --- a/addons/cookoff/XEH_postInit.sqf +++ b/addons/cookoff/XEH_postInit.sqf @@ -1,15 +1,15 @@ #include "script_component.hpp" -[QGVAR(engineFire), FUNC(engineFire)] call CBA_fnc_addEventHandler; +[QGVAR(engineFire), LINKFUNC(engineFire)] 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(cookOffEffect), LINKFUNC(cookOffEffect)] call CBA_fnc_addEventHandler; +[QGVAR(smoke), LINKFUNC(smoke)] call CBA_fnc_addEventHandler; +[QGVAR(cookOffBox), LINKFUNC(cookOffBox)] call CBA_fnc_addEventHandler; // handle cleaning up effects when vehicle is deleted mid-cookoff [QGVAR(addCleanupHandlers), { diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf index cc39ff43cf..9b3c19ab42 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunition.sqf @@ -77,7 +77,7 @@ private _spawnProjectile = { }; private _speed = random (_speedOfAmmo / 10) max 1; -_simType = toLower _simType; +_simType = toLowerANSI _simType; switch (_simType) do { case ("shotbullet"): { [QGVAR(playCookoffSound), [_vehicle, _simType]] call CBA_fnc_globalEvent; diff --git a/addons/cookoff/functions/fnc_handleDamageBox.sqf b/addons/cookoff/functions/fnc_handleDamageBox.sqf index dfc5cb7267..9368cd3193 100644 --- a/addons/cookoff/functions/fnc_handleDamageBox.sqf +++ b/addons/cookoff/functions/fnc_handleDamageBox.sqf @@ -27,7 +27,7 @@ if (_vehicle getVariable [QGVAR(enable), GVAR(enable)] in [0, false]) exitWith { private _hitpoint = "#structural"; if (_hitIndex != -1) then { - _hitpoint = toLower ((getAllHitPointsDamage _vehicle param [0, []]) select _hitIndex); + _hitpoint = toLowerANSI ((getAllHitPointsDamage _vehicle param [0, []]) select _hitIndex); }; // get change in damage diff --git a/addons/cookoff/stringtable.xml b/addons/cookoff/stringtable.xml index 76aebcad60..5f764a24b7 100644 --- a/addons/cookoff/stringtable.xml +++ b/addons/cookoff/stringtable.xml @@ -188,6 +188,7 @@ 쿡오프 후 차량이 항상 파괴되는지 여부를 조정합니다. Contrôle si les véhicules seront toujours détruits après l'auto-inflammation. Define se os veículos serão sempre destruídos após cozinhamento. + Определяет, всегда ли транспортные средства будут уничтожаться после детонации. Enable Cook-Off Vehicle Fire diff --git a/addons/csw/Cfg3den.hpp b/addons/csw/Cfg3den.hpp deleted file mode 100644 index 5d15e19d6b..0000000000 --- a/addons/csw/Cfg3den.hpp +++ /dev/null @@ -1,43 +0,0 @@ -class ctrlCombo; -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(assemblyModeControl): Combo { - class Controls: Controls { - class Title: Title {}; - class Value: Value { - class Items { - class Disable { - text = "$STR_DISABLED"; - value = 0; - }; - class Enable { - text = "$STR_CONFIG_JOYSTICK_ENABLED"; - value = 1; - }; - class EnableAndEmpty { - text = CSTRING(eden_enableAndEmpty); - value = 2; - }; - class Default { - text = "$STR_VEHICLE_DEFAULT"; - value = 3; - default = 1; - }; - }; - }; - }; - }; - }; -}; diff --git a/addons/csw/CfgVehicles.hpp b/addons/csw/CfgVehicles.hpp index 424289c077..724d5ed513 100644 --- a/addons/csw/CfgVehicles.hpp +++ b/addons/csw/CfgVehicles.hpp @@ -138,7 +138,6 @@ class CfgVehicles { class StaticMGWeapon: StaticWeapon {}; class HMG_01_base_F: StaticMGWeapon { - // ENABLE_CSW_ATTRIBUTE; class ADDON { enabled = 1; proxyWeapon = QGVAR(HMG_Static); @@ -198,7 +197,6 @@ class CfgVehicles { class GMG_TriPod; class GMG_01_base_F: GMG_TriPod { - // ENABLE_CSW_ATTRIBUTE; class ADDON { enabled = 1; proxyWeapon = QGVAR(GMG_20mm); // Weapon Proxy (Shorter Reload Time) [CfgWeapons] @@ -232,7 +230,6 @@ class CfgVehicles { class AT_01_base_F: StaticMGWeapon { - // ENABLE_CSW_ATTRIBUTE; class ADDON { enabled = 1; proxyWeapon = QGVAR(Titan_AT_Static); @@ -246,7 +243,6 @@ class CfgVehicles { }; class AA_01_base_F: StaticMGWeapon { - // ENABLE_CSW_ATTRIBUTE; class ADDON { enabled = 1; proxyWeapon = QGVAR(Titan_AA_Static); // Weapon Proxy (Shorter Reload Time) [CfgWeapons] @@ -262,7 +258,6 @@ class CfgVehicles { class StaticMortar: StaticWeapon {}; class Mortar_01_base_F: StaticMortar { - // ENABLE_CSW_ATTRIBUTE; class ADDON { enabled = 1; magazineLocation = ""; diff --git a/addons/csw/config.cpp b/addons/csw/config.cpp index 98abcea5c0..aab2b0416f 100644 --- a/addons/csw/config.cpp +++ b/addons/csw/config.cpp @@ -15,7 +15,6 @@ class CfgPatches { }; }; -#include "Cfg3den.hpp" #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" diff --git a/addons/csw/functions/fnc_ai_reload.sqf b/addons/csw/functions/fnc_ai_reload.sqf index d472233bcf..4d6234f94a 100644 --- a/addons/csw/functions/fnc_ai_reload.sqf +++ b/addons/csw/functions/fnc_ai_reload.sqf @@ -40,7 +40,7 @@ private _nearSupplies = [_gunner] + ((_staticWeapon nearSupplies 10) select { } forEach ((magazineCargo _xSource) select {isClass (_cfgMagGroups >> _x)}); TRACE_2("",_xSource,_cswMagazines); - private _compatibleMags = [_weapon] call CBA_fnc_compatibleMagazines; + private _compatibleMags = compatibleMagazines _weapon; if (_magazine != "") then { _compatibleMags insert [0, [_magazine]]; }; diff --git a/addons/csw/functions/fnc_assemble_canPickupWeapon.sqf b/addons/csw/functions/fnc_assemble_canPickupWeapon.sqf index 40c6b527d3..6217d769dd 100644 --- a/addons/csw/functions/fnc_assemble_canPickupWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_canPickupWeapon.sqf @@ -22,4 +22,4 @@ private _assemblyMode = [false, true, true, GVAR(defaultAssemblyMode)] select (_ private _notCrewed = (crew _staticWeapon) isEqualTo []; private _deadCrew = !(alive (gunner _staticWeapon)); // need to eject body??? -_assemblyMode && {_notCrewed || _deadCrew} +_assemblyMode && {alive _staticWeapon} && {_notCrewed || _deadCrew} diff --git a/addons/csw/functions/fnc_assemble_deployTripod.sqf b/addons/csw/functions/fnc_assemble_deployTripod.sqf index 9c2f3ef725..da2ed56c04 100644 --- a/addons/csw/functions/fnc_assemble_deployTripod.sqf +++ b/addons/csw/functions/fnc_assemble_deployTripod.sqf @@ -23,7 +23,7 @@ private _secondaryWeaponClassname = secondaryWeapon _player; // handle loaded launchers which can become csw like CUP Metis private _secondaryWeaponMagazine = secondaryWeaponMagazine _player param [0, ""]; - _player removeWeaponGlobal (secondaryWeapon _player); + _player removeWeaponGlobal _secondaryWeaponClassname; private _onFinish = { params ["_args"]; @@ -75,5 +75,5 @@ }; private _deployTime = getNumber(configFile >> "CfgWeapons" >> _secondaryWeaponClassname >> QUOTE(ADDON) >> "deployTime"); - [TIME_PROGRESSBAR(_deployTime), [_player, _secondaryWeaponClassname, _secondaryWeaponMagazine], _onFinish, _onFailure, localize LSTRING(PlaceTripod_progressBar)] call EFUNC(common,progressBar); + [TIME_PROGRESSBAR(_deployTime), [_player, _secondaryWeaponClassname, _secondaryWeaponMagazine], _onFinish, _onFailure, LLSTRING(PlaceTripod_progressBar)] call EFUNC(common,progressBar); }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/csw/functions/fnc_assemble_deployWeapon.sqf b/addons/csw/functions/fnc_assemble_deployWeapon.sqf index 772cad65d4..b9f8029bc2 100644 --- a/addons/csw/functions/fnc_assemble_deployWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_deployWeapon.sqf @@ -23,10 +23,13 @@ private _tripodClassname = typeOf _tripod; _player removeWeaponGlobal _carryWeaponClassname; - private _assembledClassname = getText(configfile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "assembleTo" >> _tripodClassname); - private _deployTime = getNumber(configfile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "deployTime"); + private _weaponConfig = configfile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON); + private _assembledClassname = getText (_weaponConfig >> "assembleTo" >> _tripodClassname); + if (!isClass (configFile >> "CfgVehicles" >> _assembledClassname)) exitWith {ERROR_1("bad static classname [%1]",_assembledClassname);}; + private _deployTime = getNumber (_weaponConfig >> "deployTime"); + TRACE_4("",_carryWeaponClassname,_tripodClassname,_assembledClassname,_deployTime); private _onFinish = { @@ -69,8 +72,9 @@ private _codeCheck = { params ["_args"]; _args params ["_tripod"]; - !isNull _tripod; + + alive _tripod }; - [TIME_PROGRESSBAR(_deployTime), [_tripod, _player, _assembledClassname, _carryWeaponClassname], _onFinish, _onFailure, localize LSTRING(AssembleCSW_progressBar), _codeCheck] call EFUNC(common,progressBar); + [TIME_PROGRESSBAR(_deployTime), [_tripod, _player, _assembledClassname, _carryWeaponClassname], _onFinish, _onFailure, LLSTRING(AssembleCSW_progressBar), _codeCheck] call EFUNC(common,progressBar); }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/csw/functions/fnc_assemble_pickupTripod.sqf b/addons/csw/functions/fnc_assemble_pickupTripod.sqf index d85f9a3f83..176718f015 100644 --- a/addons/csw/functions/fnc_assemble_pickupTripod.sqf +++ b/addons/csw/functions/fnc_assemble_pickupTripod.sqf @@ -20,8 +20,8 @@ params ["_tripod", "_player"]; TRACE_2("assemble_pickupTripod",_tripod,_player); - private _tripodClassname = getText(configOf _tripod >> QUOTE(ADDON) >> "disassembleTo"); - private _pickupTime = getNumber(configFile >> "CfgWeapons" >> _tripodClassname >> QUOTE(ADDON) >> "pickupTime"); + private _tripodClassname = getText (configOf _tripod >> QUOTE(ADDON) >> "disassembleTo"); + private _pickupTime = getNumber (configFile >> "CfgWeapons" >> _tripodClassname >> QUOTE(ADDON) >> "pickupTime"); private _onFinish = { params ["_args"]; @@ -37,10 +37,9 @@ params ["_args"]; _args params ["_tripod", "_player"]; - !(isNull _tripod) && { (secondaryWeapon _player) isEqualTo "" } - + (alive _tripod) && {secondaryWeapon _player == ""} }; TRACE_3("",_pickupTime,typeOf _tripod,_tripodClassname); - [TIME_PROGRESSBAR(_pickupTime), [_tripod, _player, _tripodClassname], _onFinish, {}, localize LSTRING(PickupTripod_progressBar), _condition] call EFUNC(common,progressBar); + [TIME_PROGRESSBAR(_pickupTime), [_tripod, _player, _tripodClassname], _onFinish, {}, LLSTRING(PickupTripod_progressBar), _condition] call EFUNC(common,progressBar); }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf index 440fd31cc0..3034e2260c 100644 --- a/addons/csw/functions/fnc_assemble_pickupWeapon.sqf +++ b/addons/csw/functions/fnc_assemble_pickupWeapon.sqf @@ -19,14 +19,24 @@ params ["_staticWeapon", "_player"]; TRACE_2("assemble_pickupWeapon",_staticWeapon,_player); - 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);}; + private _weaponConfig = configOf _staticWeapon >> QUOTE(ADDON); + private _carryWeaponClassname = getText (_weaponConfig >> "disassembleWeapon"); + + if (!isClass (configFile >> "CfgWeapons" >> _carryWeaponClassname)) exitWith { + ERROR_1("bad weapon classname [%1]",_carryWeaponClassname); + }; + + private _turretClassname = getText (_weaponConfig >> "disassembleTurret"); + // Turret classname can equal nothing if the deploy bag is the "whole" weapon. e.g Kornet, Metis, other ATGMs - if ((_turretClassname isNotEqualTo "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith {ERROR_1("bad turret classname [%1]",_turretClassname);}; + if ((_turretClassname != "") && {!isClass (configFile >> "CfgVehicles" >> _turretClassname)}) exitWith { + ERROR_1("bad turret classname [%1]",_turretClassname); + }; + + private _onDisassembleFunc = getText (_weaponConfig >> "disassembleFunc"); + + private _pickupTime = getNumber (configFile >> "CfgWeapons" >> _carryWeaponClassname >> QUOTE(ADDON) >> "pickupTime"); + TRACE_4("",typeOf _staticWeapon,_carryWeaponClassname,_turretClassname,_pickupTime); private _onFinish = { params ["_args"]; @@ -38,14 +48,14 @@ private _weaponDir = getDir _staticWeapon; private _carryWeaponMag = ""; - private _carryWeaponMags = getArray (configFile >> "CfgWeapons" >> _carryWeaponClassname >> "magazines") apply {toLower _x}; + private _carryWeaponMags = compatibleMagazines _carryWeaponClassname; LOG("remove ammo"); { _x params ["_xMag", "", "_xAmmo"]; if (_xAmmo == 0) then {continue}; private _carryMag = _xMag call FUNC(getCarryMagazine); - if (_carryWeaponMag isEqualTo "" && {toLower _carryMag in _carryWeaponMags}) then { + if (_carryWeaponMag == "" && {_carryMag in _carryWeaponMags}) then { TRACE_3("Adding mag to secondary weapon",_xMag,_xAmmo,_carryMag); _carryWeaponMag = _carryMag; DEC(_xAmmo); @@ -100,5 +110,5 @@ ((crew _staticWeapon) isEqualTo []) && (alive _staticWeapon) }; - [TIME_PROGRESSBAR(_pickupTime), [_staticWeapon, _player, _carryWeaponClassname, _turretClassname, _onDisassembleFunc], _onFinish, {}, localize LSTRING(DisassembleCSW_progressBar), _condition] call EFUNC(common,progressBar); + [TIME_PROGRESSBAR(_pickupTime), [_staticWeapon, _player, _carryWeaponClassname, _turretClassname, _onDisassembleFunc], _onFinish, {}, LLSTRING(DisassembleCSW_progressBar), _condition] call EFUNC(common,progressBar); }, _this] call CBA_fnc_execNextFrame; diff --git a/addons/csw/functions/fnc_getLoadActions.sqf b/addons/csw/functions/fnc_getLoadActions.sqf index 456362a3b6..e505c7f50f 100644 --- a/addons/csw/functions/fnc_getLoadActions.sqf +++ b/addons/csw/functions/fnc_getLoadActions.sqf @@ -44,9 +44,9 @@ private _actions = []; private _displayName = getText (_cfgMagazines >> _carryMag >> "displayName"); private _picture = getText (_cfgMagazines >> _carryMag >> "picture"); private _text = if (_isBeltLinking) then { - format [localize LSTRING(actionLink), _displayName]; + format [LLSTRING(actionLink), _displayName]; } else { - format [localize LSTRING(loadX), _displayName]; + format [LLSTRING(loadX), _displayName]; }; private _action = [format ["load_%1", _forEachIndex], _text, _picture, _statement, _condition, {}, _x] call EFUNC(interact_menu,createAction); diff --git a/addons/csw/functions/fnc_getUnloadActions.sqf b/addons/csw/functions/fnc_getUnloadActions.sqf index 32d9cc091a..dd119b0622 100644 --- a/addons/csw/functions/fnc_getUnloadActions.sqf +++ b/addons/csw/functions/fnc_getUnloadActions.sqf @@ -23,8 +23,9 @@ private _statement = { TRACE_5("starting unload",_target,_turretPath,_player,_carryMag,_vehMag); private _timeToUnload = 1; - if (!isNull (configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime")) then { - _timeToUnload = getNumber (configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime"); + private _config = configOf _target >> QUOTE(ADDON) >> "ammoUnloadTime"; + if (!isNull _config) then { + _timeToUnload = getNumber _config; }; [ @@ -36,7 +37,7 @@ private _statement = { [QGVAR(removeTurretMag), [_target, _turretPath, _carryMag, _vehMag, _player]] call CBA_fnc_globalEvent; }, {TRACE_1("unload progressBar fail",_this);}, - format [localize LSTRING(unloadX), getText (configFile >> "CfgMagazines" >> _carryMag >> "displayName")], + format [LLSTRING(unloadX), getText (configFile >> "CfgMagazines" >> _carryMag >> "displayName")], {(_this select 0) call FUNC(reload_canUnloadMagazine)}, ["isNotInside"] ] call EFUNC(common,progressBar); diff --git a/addons/csw/functions/fnc_initVehicle.sqf b/addons/csw/functions/fnc_initVehicle.sqf index ed882e435c..2d7241029f 100644 --- a/addons/csw/functions/fnc_initVehicle.sqf +++ b/addons/csw/functions/fnc_initVehicle.sqf @@ -66,7 +66,7 @@ if (hasInterface && {!(_typeOf in GVAR(initializedStaticTypes))}) then { TRACE_1("Adding Actions",_typeOf); if (_assemblyConfig) then { - private _disassembleAction = [QGVAR(disassemble), localize LSTRING(DisassembleCSW_displayName), "", {call FUNC(assemble_pickupWeapon)}, {call FUNC(assemble_canPickupWeapon)}] call EFUNC(interact_menu,createAction); + private _disassembleAction = [QGVAR(disassemble), LLSTRING(DisassembleCSW_displayName), "", LINKFUNC(assemble_pickupWeapon), LINKFUNC(assemble_canPickupWeapon)] call EFUNC(interact_menu,createAction); [_typeOf, 0, ["ACE_MainActions"], _disassembleAction] call EFUNC(interact_menu,addActionToClass); }; @@ -86,17 +86,17 @@ if (hasInterface && {!(_typeOf in GVAR(initializedStaticTypes))}) then { }; if (_configEnabled && {_magazineLocation != ""}) then { private _positionCode = compile _magazineLocation; - private _ammoAction = [QGVAR(magazine), localize LSTRING(AmmoHandling_displayName), "", {}, _condition, _childenCode, [], _positionCode, 4] call EFUNC(interact_menu,createAction); + private _ammoAction = [QGVAR(magazine), LLSTRING(AmmoHandling_displayName), "", {}, _condition, _childenCode, [], _positionCode, 4] call EFUNC(interact_menu,createAction); _ammoActionPath = [_typeOf, 0, [], _ammoAction] call EFUNC(interact_menu,addActionToClass); } else { - private _ammoAction = [QGVAR(magazine), localize LSTRING(AmmoHandling_displayName), "", {}, _condition, _childenCode] call EFUNC(interact_menu,createAction); + private _ammoAction = [QGVAR(magazine), LLSTRING(AmmoHandling_displayName), "", {}, _condition, _childenCode] call EFUNC(interact_menu,createAction); _ammoActionPath = [_typeOf, 0, ["ACE_MainActions"], _ammoAction] call EFUNC(interact_menu,addActionToClass); }; if (["ace_reload"] call EFUNC(common,isModLoaded)) then { // move reload's check ammo action to the ammo handling point (remove and re-add) [_typeOf, 0, ["ACE_MainActions", QEGVAR(reload,CheckAmmo)]] call EFUNC(interact_menu,removeActionFromClass); - private _checkAmmoAction = [QGVAR(checkAmmo), localize ELSTRING(reload,checkAmmo), "", EFUNC(reload,checkAmmo), EFUNC(reload,canCheckAmmo)] call EFUNC(interact_menu,createAction); + private _checkAmmoAction = [QGVAR(checkAmmo), LELSTRING(reload,checkAmmo), "", EFUNC(reload,checkAmmo), EFUNC(reload,canCheckAmmo)] call EFUNC(interact_menu,createAction); [_typeOf, 0, _ammoActionPath, _checkAmmoAction] call EFUNC(interact_menu,addActionToClass); }; }; diff --git a/addons/csw/functions/fnc_reload_getLoadableMagazines.sqf b/addons/csw/functions/fnc_reload_getLoadableMagazines.sqf index 933625fb89..724ee4d09c 100644 --- a/addons/csw/functions/fnc_reload_getLoadableMagazines.sqf +++ b/addons/csw/functions/fnc_reload_getLoadableMagazines.sqf @@ -70,7 +70,7 @@ private _return = []; ) exitWith { _return pushBack [_carryMag, _turretPath, _loadInfo, _magSource]; }; - } forEach ([_weapon] call CBA_fnc_compatibleMagazines); + } forEach (compatibleMagazines _weapon); } forEach _availableMagazines; } forEach (_vehicle weaponsTurret _turretPath); } forEach (allTurrets _vehicle); diff --git a/addons/csw/functions/fnc_reload_loadMagazine.sqf b/addons/csw/functions/fnc_reload_loadMagazine.sqf index 9526b5adb8..50081a87a5 100644 --- a/addons/csw/functions/fnc_reload_loadMagazine.sqf +++ b/addons/csw/functions/fnc_reload_loadMagazine.sqf @@ -23,11 +23,12 @@ params ["_vehicle", "_turret", "_carryMag", "_magSource", "_unit"]; TRACE_5("loadMagazine",_vehicle,_turret,_carryMag,_magSource,_unit); private _timeToLoad = 1; -if (!isNull(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime")) then { - _timeToLoad = getNumber(configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime"); +private _config = configOf _vehicle >> QUOTE(ADDON) >> "ammoLoadTime"; +if (!isNull _config) then { + _timeToLoad = getNumber _config; }; -private _displayName = format [localize LSTRING(loadX), getText (configFile >> "CfgMagazines" >> _carryMag >> "displayName")]; +private _displayName = format [LLSTRING(loadX), getText (configFile >> "CfgMagazines" >> _carryMag >> "displayName")]; private _onFinish = { (_this select 0) params ["_vehicle", "_turret", "_carryMag", "_magSource", "_unit"]; diff --git a/addons/csw/script_config_macros_csw.hpp b/addons/csw/script_config_macros_csw.hpp index 1a0e1b3be5..6701159f29 100644 --- a/addons/csw/script_config_macros_csw.hpp +++ b/addons/csw/script_config_macros_csw.hpp @@ -1,15 +1 @@ #define CREATE_CSW_PROXY(weapon) class ##weapon; class GVAR(weapon): ##weapon { magazineReloadTime = 0.5; } - -// Need to be careful about breaking Attributes inheritance, doesn't seem to be any standard -#define ENABLE_CSW_ATTRIBUTE class Attributes { \ - class EGVAR(CSW,assemblyMode) { \ - property = QEGVAR(CSW,assemblyMode); \ - control = QEGVAR(CSW,assemblyModeControl); \ - displayName = ECSTRING(CSW,eden_enableCSW); \ - tooltip = ECSTRING(CSW,eden_enableCSW_tooltip); \ - expression = QUOTE( if (_value != 3) then {_this setVariable [ARR_3('%s',_value,true)]} ); \ - typeName = "NUMBER"; \ - condition = "objectVehicle"; \ - defaultValue = 3; \ - }; \ - } diff --git a/addons/csw/stringtable.xml b/addons/csw/stringtable.xml index b6f8ecb47e..4aea2a24b4 100644 --- a/addons/csw/stringtable.xml +++ b/addons/csw/stringtable.xml @@ -179,7 +179,7 @@ Scorta di munizioni 탄약 보관 Magazyn amunicji - 弾薬の格納場所 + 弾薬保管位置 弹药存储 Хранилище боеприпасов Almacenamiento de munición @@ -192,7 +192,7 @@ Determina se ulteriori caricatori verranno stoccati sul suolo o in una cassa di munizioni. 여분의 탄약을 지면 또는 탄약 상자에 넣을 지 결정합니다. Decyduje, czy dodatkowe magazynki przechowywane są na ziemi, czy w skrzynce z amunicją. - 追加の弾倉を地面に配置するか、弾薬箱内に保管するかを設定します。 + 追加の弾倉を地面に直接配置するか、弾薬箱内に保管するかを設定します。 设置多余的弹夹是存放在地面上还是弹药箱内 Определяет будут ли дополнительные магазины лежать на земле или внутри хранилища Determina si los cargadores extra son almacenados en el suelo o en una caja de munición diff --git a/addons/disarming/XEH_postInit.sqf b/addons/disarming/XEH_postInit.sqf index 6944f8b146..5b123af297 100644 --- a/addons/disarming/XEH_postInit.sqf +++ b/addons/disarming/XEH_postInit.sqf @@ -1,4 +1,4 @@ #include "script_component.hpp" -[QGVAR(dropItems), FUNC(eventTargetStart)] call CBA_fnc_addEventHandler; -[QGVAR(debugCallback), FUNC(eventCallerFinish)] call CBA_fnc_addEventHandler; +[QGVAR(dropItems), LINKFUNC(eventTargetStart)] call CBA_fnc_addEventHandler; +[QGVAR(debugCallback), LINKFUNC(eventCallerFinish)] call CBA_fnc_addEventHandler; diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index 26e00dfa5f..e1a4c379b4 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -50,7 +50,7 @@ if (!_doNotDropAmmo) then { if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } count ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); }; //Create a new weapon holder diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index a3762aec9f..da9a860678 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -74,7 +74,7 @@ GVAR(disarmTarget) = _target; private _rankPicture = _display displayCtrl 1203; //Show rank and name (just like BIS's inventory) - private _icon = format [DEFUALTPATH, toLower (rank _target)]; + private _icon = format [DEFUALTPATH, toLowerANSI (rank _target)]; if (_icon isEqualTo DEFUALTPATH) then {_icon = ""}; _rankPicture ctrlSetText _icon; _playerName ctrlSetText ([GVAR(disarmTarget), false, true] call EFUNC(common,getName)); @@ -93,7 +93,7 @@ GVAR(disarmTarget) = _target; if ((_x getVariable [QGVAR(disarmUnit), objNull]) == _target) exitWith { _holder = _x; }; - } count ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); + } forEach ((getpos _target) nearObjects [DISARM_CONTAINER, 3]); //If a holder exists, show it's inventory if (!isNull _holder) then { diff --git a/addons/dogtags/XEH_postInit.sqf b/addons/dogtags/XEH_postInit.sqf index f683f6f253..d9c35dc172 100644 --- a/addons/dogtags/XEH_postInit.sqf +++ b/addons/dogtags/XEH_postInit.sqf @@ -1,9 +1,9 @@ #include "script_component.hpp" -[QGVAR(showDogtag), DFUNC(showDogtag)] call CBA_fnc_addEventHandler; -[QGVAR(sendDogtagData), DFUNC(sendDogtagData)] call CBA_fnc_addEventHandler; -[QGVAR(getDogtagItem), DFUNC(getDogtagItem)] call CBA_fnc_addEventHandler; -[QGVAR(addDogtagItem), DFUNC(addDogtagItem)] call CBA_fnc_addEventHandler; +[QGVAR(showDogtag), LINKFUNC(showDogtag)] call CBA_fnc_addEventHandler; +[QGVAR(sendDogtagData), LINKFUNC(sendDogtagData)] call CBA_fnc_addEventHandler; +[QGVAR(getDogtagItem), LINKFUNC(getDogtagItem)] call CBA_fnc_addEventHandler; +[QGVAR(addDogtagItem), LINKFUNC(addDogtagItem)] call CBA_fnc_addEventHandler; // Add actions and event handlers only if ace_medical is loaded // - Adding actions via config would create a dependency diff --git a/addons/dogtags/stringtable.xml b/addons/dogtags/stringtable.xml index db3b0ee8fe..d19c61f505 100644 --- a/addons/dogtags/stringtable.xml +++ b/addons/dogtags/stringtable.xml @@ -54,7 +54,7 @@ Zabierz Взять Vezmi - 取る + 拾う Nehmen 회수 Prendre @@ -70,7 +70,7 @@ Zabrałeś nieśmiertelnik %1... Жетон снят с %1... Sebral jsem známku od %1... - %1 からドッグタグを取っています・・・ + %1 からドッグタグを回収しています・・・ Erkennungsmarke von %1 genommen... %1(으)로부터 군번줄을 회수했습니다... Plaque d'identification prise sur %1... @@ -86,7 +86,7 @@ Ktoś już zabrał ten nieśmiertelnik... Кто-то уже забрал жетон... Někdo jiný už vzal identifikační známku... - すでにドッグタグは取られています・・・ + 既に誰かがドッグタグを回収したようだ・・・ Jemand anderes hat bereits die Erkennungsmarke genommen... 누군가 이미 군번줄을 회수해갔습니다... Quelqu'un d'autre a déjà pris la plaque d'identification... @@ -102,7 +102,7 @@ Anzeige um Erkennungsmarke zu überprüfen 在畫面中顯示檢查兵籍牌 在画面中显示检查兵籍牌 - 確認中のドッグタグを画面上で表示します + 確認中のドッグタグを画面上に表示します Indicatore su schermo per il controllo delle piastrine Wyświetlacz ekranowy dla sprawdzania nieśmiertelników Экран для проверки жетонов diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf index dfff18a3c0..4d5ac8b61b 100644 --- a/addons/dragging/functions/fnc_carryObject.sqf +++ b/addons/dragging/functions/fnc_carryObject.sqf @@ -53,7 +53,7 @@ _unit setVariable [QGVAR(releaseActionID), [ ] call EFUNC(common,addActionEventHandler)]; // Add anim changed EH -[_unit, "AnimChanged", FUNC(handleAnimChanged), [_unit]] call CBA_fnc_addBISEventHandler; +[_unit, "AnimChanged", LINKFUNC(handleAnimChanged), [_unit]] call CBA_fnc_addBISEventHandler; // Prevent UAVs from firing private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew); @@ -67,7 +67,4 @@ if (_UAVCrew isNotEqualTo []) then { }; // Check everything -[FUNC(carryObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; - -// Reset current dragging height -GVAR(currentHeightChange) = 0; +[LINKFUNC(carryObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dragging/functions/fnc_carryObjectPFH.sqf b/addons/dragging/functions/fnc_carryObjectPFH.sqf index b73ff97261..fcd0f05376 100644 --- a/addons/dragging/functions/fnc_carryObjectPFH.sqf +++ b/addons/dragging/functions/fnc_carryObjectPFH.sqf @@ -35,15 +35,35 @@ if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith { _idPFH call CBA_fnc_removePerFrameHandler; }; -// Drop if the crate is destroyed OR target moved away from carrier (weapon disassembled) OR carrier starts limping -if !(alive _target && {_unit distance _target <= 10} && {_unit getHitPointDamage "HitLegs" < 0.5}) exitWith { - TRACE_2("dead/distance",_unit,_target); +// Drop if the target is destroyed +if (!alive _target) exitWith { + TRACE_2("dead",_unit,_target); - if ((_unit distance _target > 10) && {(CBA_missionTime - _startTime) < 1}) exitWith { - // attachTo seems to have some kind of network delay and target can return an odd position during the first few frames, - // So wait a full second to exit if out of range (this is critical as we would otherwise detach and set it's pos to weird pos) - TRACE_3("ignoring bad distance at start",_unit distance _target,_startTime,CBA_missionTime); - }; + [_unit, _target] call FUNC(dropObject_carry); + + _unit setVariable [QGVAR(hint), nil]; + call EFUNC(interaction,hideMouseHint); + + _idPFH call CBA_fnc_removePerFrameHandler; +}; + +// Drop if the target moved away from carrier (e.g. weapon disassembled) +// attachTo seems to have some kind of network delay and target can return an odd position during the first few frames, +// So wait a full second to exit if out of range (this is critical as we would otherwise detach and set it's pos to weird pos) +if (_unit distance _target > 10 && {(CBA_missionTime - _startTime) >= 1}) exitWith { + TRACE_2("distance",_unit,_target); + + [_unit, _target] call FUNC(dropObject_carry); + + _unit setVariable [QGVAR(hint), nil]; + call EFUNC(interaction,hideMouseHint); + + _idPFH call CBA_fnc_removePerFrameHandler; +}; + +// Drop if the carrier starts limping +if (_unit getHitPointDamage "HitLegs" >= 0.5) exitWith { + TRACE_2("limping",_unit,_target); [_unit, _target] call FUNC(dropObject_carry); @@ -54,7 +74,7 @@ if !(alive _target && {_unit distance _target <= 10} && {_unit getHitPointDamage }; // Drop static if crew is in it (UAV crew deletion may take a few frames) -if (_target isKindOf "StaticWeapon" && {(crew _target) isNotEqualTo []} && {!(_target getVariable [QGVAR(isUAV), false])}) then { +if (_target isKindOf "StaticWeapon" && {!(_target getVariable [QGVAR(isUAV), false])} && {(crew _target) isNotEqualTo []}) exitWith { TRACE_2("static weapon crewed",_unit,_target); [_unit, _target] call FUNC(dropObject_carry); diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index ddad0ad7bb..5116f440b3 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -57,7 +57,7 @@ GVAR(releaseActionID) = [0xF1, [false, false, false], { ["", LLSTRING(Drop)] call EFUNC(interaction,showMouseHint); // Block firing -if !(GVAR(dragAndFire)) then { +if (!GVAR(dragAndFire)) then { _unit setVariable [QGVAR(blockFire), [ _unit, "DefaultAction", {true}, @@ -66,10 +66,11 @@ if !(GVAR(dragAndFire)) then { }; // Add anim changed EH -[_unit, "AnimChanged", FUNC(handleAnimChanged), [_unit]] call CBA_fnc_addBISEventHandler; +[_unit, "AnimChanged", LINKFUNC(handleAnimChanged), [_unit]] call CBA_fnc_addBISEventHandler; // Prevent UAVs from firing private _UAVCrew = _target call EFUNC(common,getVehicleUAVCrew); + if (_UAVCrew isNotEqualTo []) then { { _target deleteVehicleCrew _x; @@ -79,10 +80,7 @@ if (_UAVCrew isNotEqualTo []) then { }; // Check everything -[FUNC(dragObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; - -// Reset current dragging height. -GVAR(currentHeightChange) = 0; +[LINKFUNC(dragObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; // Fixes not being able to move when in combat pace [_unit, "forceWalk", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); diff --git a/addons/dragging/functions/fnc_dragObjectPFH.sqf b/addons/dragging/functions/fnc_dragObjectPFH.sqf index a2895f4216..7c3a6be307 100644 --- a/addons/dragging/functions/fnc_dragObjectPFH.sqf +++ b/addons/dragging/functions/fnc_dragObjectPFH.sqf @@ -31,15 +31,20 @@ if !(_unit getVariable [QGVAR(isDragging), false]) exitWith { _idPFH call CBA_fnc_removePerFrameHandler; }; -// Drop if the crate is destroyed OR (target moved away from carrier (weapon disasembled)) -if (!alive _target || {_unit distance _target > 10}) then { - TRACE_2("dead/distance",_unit,_target); +// Drop if the target is destroyed +if (!alive _target) exitWith { + TRACE_2("dead",_unit,_target); - if ((_unit distance _target > 10) && {(CBA_missionTime - _startTime) < 1}) exitWith { - // attachTo seems to have some kind of network delay and target can return an odd position during the first few frames, - // So wait a full second to exit if out of range (this is critical as we would otherwise detach and set it's pos to weird pos) - TRACE_3("ignoring bad distance at start",_unit distance _target,_startTime,CBA_missionTime); - }; + [_unit, _target] call FUNC(dropObject); + + _idPFH call CBA_fnc_removePerFrameHandler; +}; + +// Drop if the target moved away from carrier (e.g. weapon disassembled) +// attachTo seems to have some kind of network delay and target can return an odd position during the first few frames, +// So wait a full second to exit if out of range (this is critical as we would otherwise detach and set it's pos to weird pos) +if (_unit distance _target > 10 && {(CBA_missionTime - _startTime) >= 1}) exitWith { + TRACE_2("distance",_unit,_target); [_unit, _target] call FUNC(dropObject); @@ -47,7 +52,7 @@ if (!alive _target || {_unit distance _target > 10}) then { }; // Drop static if crew is in it (UAV crew deletion may take a few frames) -if (_target isKindOf "StaticWeapon" && {(crew _target) isNotEqualTo []} && {!(_target getVariable [QGVAR(isUAV), false])}) then { +if (_target isKindOf "StaticWeapon" && {!(_target getVariable [QGVAR(isUAV), false])} && {(crew _target) isNotEqualTo []}) exitWith { TRACE_2("static weapon crewed",_unit,_target); [_unit, _target] call FUNC(dropObject); diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index debe757101..10cfda1703 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -26,7 +26,7 @@ if (!isNil QGVAR(releaseActionID)) then { }; // Stop blocking -if !(GVAR(dragAndFire)) then { +if (!GVAR(dragAndFire)) then { [_unit, "DefaultAction", _unit getVariable [QGVAR(blockFire), -1]] call EFUNC(common,removeActionEventHandler); }; @@ -82,7 +82,9 @@ if (_unit getVariable ["ACE_isUnconscious", false]) then { // Recreate UAV crew (add a frame delay or this may cause the vehicle to be moved to [0,0,0]) if (_target getVariable [QGVAR(isUAV), false]) then { - [{ + _target setVariable [QGVAR(isUAV), nil, true]; + + [{ params ["_target"]; if (!alive _target) exitWith {}; TRACE_2("restoring uav crew",_target,getPosASL _target); diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index f3f15fac14..184b1755c0 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -44,7 +44,7 @@ if (_tryLoad && {!(_target isKindOf "CAManBase")} && {["ace_cargo"] call EFUNC(c // 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 { + if (isNull objectParent _unit && {!(_unit getVariable ["ACE_isUnconscious", false])}) then { [_unit, "", 2] call EFUNC(common,doAnimation); }; @@ -88,6 +88,8 @@ if !(_target isKindOf "CAManBase") then { // Recreate UAV crew (add a frame delay or this may cause the vehicle to be moved to [0,0,0]) if (_target getVariable [QGVAR(isUAV), false]) then { + _target setVariable [QGVAR(isUAV), nil, true]; + [{ params ["_target"]; if (!alive _target) exitWith {}; diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf index 8b522e34bc..c7641a8ffa 100644 --- a/addons/dragging/functions/fnc_handleScrollWheel.sqf +++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf @@ -27,7 +27,7 @@ private _carriedItem = _unit getVariable [QGVAR(carriedObject), objNull]; // Disabled for persons if (_carriedItem isKindOf "CAManBase") exitWith {false}; -if !(CBA_events_control) then { +if (!CBA_events_control) then { // Raise/lower // Move carried item 15 cm per scroll interval _scrollAmount = _scrollAmount * 0.15; diff --git a/addons/dragging/functions/fnc_resumeCarry.sqf b/addons/dragging/functions/fnc_resumeCarry.sqf index 233d60e298..e7cdeb5dc6 100644 --- a/addons/dragging/functions/fnc_resumeCarry.sqf +++ b/addons/dragging/functions/fnc_resumeCarry.sqf @@ -17,7 +17,7 @@ params ["_unit"]; -// If not dragging, don't do anything +// If not carrying, don't do anything if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith {}; // If action is already present, don't add it again diff --git a/addons/dragging/functions/fnc_startCarryLocal.sqf b/addons/dragging/functions/fnc_startCarryLocal.sqf index 15101e2950..6ba2c68934 100644 --- a/addons/dragging/functions/fnc_startCarryLocal.sqf +++ b/addons/dragging/functions/fnc_startCarryLocal.sqf @@ -31,6 +31,9 @@ if !(_target getVariable [QGVAR(ignoreWeightCarry), false]) then { // Exit if object weight is over global var value if (_weight > GETMVAR(ACE_maxWeightCarry,1E11)) exitWith { + // Release claim on object + [objNull, _target, true] call EFUNC(common,claim); + [LLSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured); }; @@ -46,7 +49,7 @@ if (_target isKindOf "CAManBase") then { _primaryWeapon = "ACE_FakePrimaryWeapon"; }; - // Select primary, otherwise the drag animation actions don't work + // Select primary, otherwise the carry animation actions don't work _unit selectWeapon _primaryWeapon; // Move a bit closer and adjust direction when trying to pick up a person @@ -81,7 +84,7 @@ _unit setVariable [QGVAR(isCarrying), true, true]; // Required for aborting animation _unit setVariable [QGVAR(carriedObject), _target, true]; -[FUNC(startCarryPFH), 0.2, [_unit, _target, _timer]] call CBA_fnc_addPerFrameHandler; +[LINKFUNC(startCarryPFH), 0.2, [_unit, _target, _timer]] call CBA_fnc_addPerFrameHandler; // Disable collisions by setting the PhysX mass to almost zero private _mass = getMass _target; diff --git a/addons/dragging/functions/fnc_startCarryPFH.sqf b/addons/dragging/functions/fnc_startCarryPFH.sqf index ca34275a2c..f928ef942a 100644 --- a/addons/dragging/functions/fnc_startCarryPFH.sqf +++ b/addons/dragging/functions/fnc_startCarryPFH.sqf @@ -32,9 +32,9 @@ if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith { _idPFH call CBA_fnc_removePerFrameHandler; }; -// Same as dragObjectPFH, checks if object is deleted or dead OR (target moved away from carrier (weapon disasembled)) -if (!alive _target || {_unit distance _target > 10}) then { - TRACE_4("dead/distance",_unit,_target,_timeOut,CBA_missionTime); +// Drop if the target is destroyed, if the target moved away from carrier (e.g. weapon disassembled) or if the carrier starts limping +if !(alive _target && {_unit distance _target <= 10} && {_unit getHitPointDamage "HitLegs" < 0.5}) exitWith { + TRACE_4("dead/distance/limping",_unit,_target,_timeOut,CBA_missionTime); [_unit, _target] call FUNC(dropObject_carry); _idPFH call CBA_fnc_removePerFrameHandler; @@ -42,7 +42,7 @@ if (!alive _target || {_unit distance _target > 10}) then { // Handle persons vs. objects if (_target isKindOf "CAManBase") then { - // Drop if in timeout + // Carry person after timeout (animation takes a long time to finish) if (CBA_missionTime > _timeOut) exitWith { TRACE_4("Start carry person",_unit,_target,_timeOut,CBA_missionTime); [_unit, _target] call FUNC(carryObject); @@ -50,13 +50,13 @@ if (_target isKindOf "CAManBase") then { _idPFH call CBA_fnc_removePerFrameHandler; }; } else { - // Drop if in timeout + // Timeout: Drop target. CBA_missionTime, because anim length is linked to ingame time if (CBA_missionTime > _timeOut) exitWith { TRACE_4("timeout",_unit,_target,_timeOut,CBA_missionTime); _idPFH call CBA_fnc_removePerFrameHandler; - private _draggedObject = _unit getVariable [QGVAR(draggedObject), objNull]; - [_unit, _draggedObject] call FUNC(dropObject_carry); + private _carriedObject = _unit getVariable [QGVAR(carriedObject), objNull]; + [_unit, _carriedObject] call FUNC(dropObject_carry); }; // Wait for the unit to stand up diff --git a/addons/dragging/functions/fnc_startDragLocal.sqf b/addons/dragging/functions/fnc_startDragLocal.sqf index b656c8ce5a..22c7cecd24 100644 --- a/addons/dragging/functions/fnc_startDragLocal.sqf +++ b/addons/dragging/functions/fnc_startDragLocal.sqf @@ -31,13 +31,16 @@ if !(_target getVariable [QGVAR(ignoreWeightDrag), false]) then { // Exit if object weight is over global var value if (_weight > GETMVAR(ACE_maxWeightDrag,1E11)) exitWith { + // Release claim on object + [objNull, _target, true] call EFUNC(common,claim); + [LLSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured); }; private _primaryWeapon = primaryWeapon _unit; // Add a primary weapon if the unit has none -if !(GVAR(dragAndFire)) then { +if (!GVAR(dragAndFire)) then { if (_primaryWeapon == "") then { _unit addWeapon "ACE_FakePrimaryWeapon"; _primaryWeapon = "ACE_FakePrimaryWeapon"; @@ -93,7 +96,7 @@ if (_target isKindOf "CAManBase") then { // Prevents dragging and carrying at the same time _unit setVariable [QGVAR(isDragging), true, true]; -[FUNC(startDragPFH), 0.2, [_unit, _target, CBA_missionTime + 5]] call CBA_fnc_addPerFrameHandler; +[LINKFUNC(startDragPFH), 0.2, [_unit, _target, CBA_missionTime + 5]] call CBA_fnc_addPerFrameHandler; // Disable collisions by setting the physx mass to almost zero private _mass = getMass _target; diff --git a/addons/dragging/functions/fnc_startDragPFH.sqf b/addons/dragging/functions/fnc_startDragPFH.sqf index 07dfe2064f..daf887c362 100644 --- a/addons/dragging/functions/fnc_startDragPFH.sqf +++ b/addons/dragging/functions/fnc_startDragPFH.sqf @@ -32,15 +32,15 @@ if !(_unit getVariable [QGVAR(isDragging), false]) exitWith { _idPFH call CBA_fnc_removePerFrameHandler; }; -// Same as dragObjectPFH, checks if object is deleted, dead or target moved away from carrier (e.g. weapon disassembled) -if (!alive _target || {_unit distance _target > 10}) then { +// Drop if the target is destroyed or if the target moved away from carrier (e.g. weapon disassembled) +if (!alive _target || {_unit distance _target > 10}) exitWith { TRACE_4("dead/distance",_unit,_target,_timeOut,CBA_missionTime); [_unit, _target] call FUNC(dropObject); _idPFH call CBA_fnc_removePerFrameHandler; }; -// Timeout: Do nothing, quit. CBA_missionTime, because anim length is linked to ingame time +// Timeout: Drop target. CBA_missionTime, because anim length is linked to ingame time if (CBA_missionTime > _timeOut) exitWith { TRACE_4("timeout",_unit,_target,_timeOut,CBA_missionTime); _idPFH call CBA_fnc_removePerFrameHandler; diff --git a/addons/dragging/initSettings.inc.sqf b/addons/dragging/initSettings.inc.sqf index 039327330d..37feef4cbc 100644 --- a/addons/dragging/initSettings.inc.sqf +++ b/addons/dragging/initSettings.inc.sqf @@ -21,7 +21,7 @@ [LSTRING(allowRunWithLightweight_DisplayName), LSTRING(allowRunWithLightweight_Description)], LLSTRING(SettingsName), true, - true + 1 ] call CBA_fnc_addSetting; [ @@ -30,5 +30,5 @@ [LSTRING(skipContainerWeight_DisplayName), LSTRING(skipContainerWeight_Description)], LLSTRING(SettingsName), false, - true + 1 ] call CBA_fnc_addSetting; diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index 5c8a355be2..7cf53ba55c 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -166,6 +166,7 @@ 가벼운 개체 들고 달리기 허용 Autoriser la course avec des objets légers Permitir corrida com objetos leves + Позволяет работать с легкими объектами Allow the player to run when carrying lightweight objects. @@ -176,6 +177,7 @@ 가벼운 개체를 들고 다닐 때 플레이어가 뛸 수 있도록 허용합니다. Autorise le joueur à courir lorsqu'il porte un objet léger. Permite ao jogador correr enquanto carrega objetos leves. + Разрешите игроку бегать при переноске легких предметов. Skip Object Weight @@ -186,6 +188,7 @@ 개체 무게 무시 Ignorer le poids de l'objet Ignorar Peso do Objeto + Игнорировать вес объекта Determines whether object's weight is added onto weight calculations. @@ -196,6 +199,7 @@ 무게 계산에 개체의 무게를 추가할 지 여부를 결정합니다. Défini si le poids d'un objet est ajouté aux calculs du poids. Determina se o peso do objeto é adicionado aos cálculos de peso. + Определяет, добавляется ли вес объекта при расчете веса. Max Weight Coefficient @@ -205,6 +209,7 @@ Coeficiente Máximo de Peso Maximaler Gewichtskoeffizient 最大重量係数 + Максимальный коэффициент веса Modifies weight limit calculations. Set to 0 to ignore. @@ -214,6 +219,7 @@ Modifica os cálculos do limite de peso. Defina como 0 para ignorar. Ändert die Berechnung der Gewichtsbegrenzung. Zum Ignorieren auf 0 setzen. 重量制限の計算を変更します。 無視するには 0 に設定します。 + Изменяет расчеты предельного веса. Установите значение 0 для игнорирования. diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index 40b3bb6959..81ab1b5406 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -27,7 +27,7 @@ }; }; }] call CBA_fnc_addEventHandler; -[QGVAR(startDefuse), FUNC(startDefuse)] call CBA_fnc_addEventHandler; +[QGVAR(startDefuse), LINKFUNC(startDefuse)] call CBA_fnc_addEventHandler; //When getting knocked out in medical, trigger deadman explosives: //Event is global, only run on server (ref: ace_medical_fnc_setUnconscious) @@ -57,6 +57,8 @@ if (isServer) then { if (!hasInterface) exitWith {}; +#include "initKeybinds.inc.sqf" + GVAR(PlacedCount) = 0; GVAR(Setup) = objNull; GVAR(pfeh_running) = false; diff --git a/addons/explosives/XEH_preInit.sqf b/addons/explosives/XEH_preInit.sqf index 6141a1d3e0..e39270f0bb 100644 --- a/addons/explosives/XEH_preInit.sqf +++ b/addons/explosives/XEH_preInit.sqf @@ -8,7 +8,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; -#include "initKeybinds.inc.sqf" #include "initSettings.inc.sqf" GVAR(activeTrigger) = ""; diff --git a/addons/explosives/functions/fnc_addCellphoneIED.sqf b/addons/explosives/functions/fnc_addCellphoneIED.sqf index 2ac69b73ae..d35b303fc1 100644 --- a/addons/explosives/functions/fnc_addCellphoneIED.sqf +++ b/addons/explosives/functions/fnc_addCellphoneIED.sqf @@ -29,10 +29,10 @@ private _hasRequired = true; private _detonators = [_unit] call FUNC(getDetonators); { - if !(_x in _detonators) exitWith{ + if !(_x in _detonators) exitWith { _hasRequired = false; }; -} count _requiredItems; +} forEach _requiredItems; private _code = ""; while {true} do { diff --git a/addons/explosives/functions/fnc_addTriggerActions.sqf b/addons/explosives/functions/fnc_addTriggerActions.sqf index d3632d5bb7..b6b6e0ce41 100644 --- a/addons/explosives/functions/fnc_addTriggerActions.sqf +++ b/addons/explosives/functions/fnc_addTriggerActions.sqf @@ -31,7 +31,7 @@ private _children = []; if !(_x in _detonators) exitWith { _hasRequiredItems = false; }; - } count _required; + } forEach _required; if (_hasRequiredItems && {(!_isAttached) || {(getNumber (_x >> "isAttachable")) == 1}}) then { _children pushBack [ diff --git a/addons/explosives/functions/fnc_canDefuse.sqf b/addons/explosives/functions/fnc_canDefuse.sqf index 0edb98cff5..54bf8477bc 100644 --- a/addons/explosives/functions/fnc_canDefuse.sqf +++ b/addons/explosives/functions/fnc_canDefuse.sqf @@ -24,7 +24,7 @@ if (isNull _explosive) exitWith { deleteVehicle _target; false }; -if (vehicle _unit != _unit || {(_unit call EFUNC(common,uniqueItems)) findAny GVAR(defusalKits) == -1}) exitWith {false}; +if (!isNull objectParent _unit || {(_unit call EFUNC(common,uniqueItems)) findAny GVAR(defusalKits) == -1}) exitWith {false}; if (GVAR(RequireSpecialist) && {!([_unit] call EFUNC(Common,isEOD))}) exitWith {false}; diff --git a/addons/explosives/functions/fnc_dialPhone.sqf b/addons/explosives/functions/fnc_dialPhone.sqf index 860f7ddfde..f0609e2b0d 100644 --- a/addons/explosives/functions/fnc_dialPhone.sqf +++ b/addons/explosives/functions/fnc_dialPhone.sqf @@ -30,7 +30,7 @@ for "_i" from 1 to _ran do { }; if (_unit == ace_player) then { ctrlSetText [1400,"Calling"]; - [FUNC(dialingPhone), 0.25, [_unit,4,_arr,_code]] call CALLSTACK(CBA_fnc_addPerFrameHandler); + [LINKFUNC(dialingPhone), 0.25, [_unit,4,_arr,_code]] call CALLSTACK(CBA_fnc_addPerFrameHandler); } else { private _explosive = [_code] call FUNC(getSpeedDialExplosive); if ((count _explosive) > 0) then { diff --git a/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf b/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf index 8490eab452..0f4e5d923f 100644 --- a/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf +++ b/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf @@ -24,7 +24,6 @@ private _explosive = []; if ((_x select 1) == _code) exitWith { _explosive = _x; }; - false -} count GVAR(CellphoneIEDs); +} forEach GVAR(CellphoneIEDs); _explosive diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index b9ed8329c8..b21238e98e 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -46,7 +46,7 @@ Robbantás Detonar Подрыв - 点火 + 起爆 폭파 引爆 引爆 @@ -62,7 +62,7 @@ Detona Tutti Tout détoner Detonar Tudo - すべて点火 + 全て起爆 모두 폭파 引爆全部 引爆全部 @@ -72,21 +72,37 @@ Detonate All on Active Clacker Alle auf Standardzünder zünden Detona Tutti sul Detonatore Attivo + Подрыв всех на активном детонаторе + 選択した点火装置を全て起爆 + 활성화된 격발기의 모든 것을 폭파 + Détoner tout sur le détonateur actif Set Active Clacker Als Standardzünder wählen Imposta Detonatore Attivo + Установить активный детонатор + この点火装置を選択 + 격발기 활성 설정 + Définir le détonateur actif Cycle Active Clacker Standardzünder wechseln Cambia Detonatore Attivo + Цикл активного детонатора + 点火装置を切り替え + 격발기 활성 전환 + Modifier le détonateur actif Active Clacker Standardzünder Detonatore Attivo + Активный детонатор + 選択中の点火装置 + 격발기 활성 + Détonateur actif Explosive code: %1 diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 27d3ca4008..650b277dbf 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -1,11 +1,9 @@ #include "script_component.hpp" -[QGVAR(deployRopes), { - _this call FUNC(deployRopes); -}] call CBA_fnc_addEventHandler; +[QGVAR(deployRopes), LINKFUNC(deployRopes)] call CBA_fnc_addEventHandler; [QGVAR(startFastRope), { - [FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler; }] call CBA_fnc_addEventHandler; // Keybinds diff --git a/addons/fastroping/functions/fnc_cutRopes.sqf b/addons/fastroping/functions/fnc_cutRopes.sqf index cbd01b5661..40d2416049 100644 --- a/addons/fastroping/functions/fnc_cutRopes.sqf +++ b/addons/fastroping/functions/fnc_cutRopes.sqf @@ -34,8 +34,8 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; //Only delete the hook first so the rope falls down. //Note: ropeDetach was used here before, but the command seems a bit broken. deleteVehicle _hook; - [{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy], 60] call CBA_fnc_waitAndExecute; -} count _deployedRopes; + [{{deleteVehicle _x} forEach _this}, [_ropeTop, _ropeBottom, _dummy], 60] call CBA_fnc_waitAndExecute; +} forEach _deployedRopes; _vehicle setVariable [QGVAR(deployedRopes), [], true]; diff --git a/addons/fastroping/functions/fnc_deployRopes.sqf b/addons/fastroping/functions/fnc_deployRopes.sqf index 71cfbbbc21..eea81a7746 100644 --- a/addons/fastroping/functions/fnc_deployRopes.sqf +++ b/addons/fastroping/functions/fnc_deployRopes.sqf @@ -67,9 +67,7 @@ if (GVAR(requireRopeItems) && {_ropeClass != ""}) then { //deployedRopes format: attachment point, top part of the rope, bottom part of the rope, attachTo helper object, occupied, broken _deployedRopes pushBack [_ropeOrigin, _ropeTop, _ropeBottom, _dummy, _hook, false, false]; - - false -} count _ropeOrigins; +} forEach _ropeOrigins; _vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true]; _vehicle setVariable [QGVAR(deploymentStage), 3, true]; diff --git a/addons/fastroping/functions/fnc_fastRope.sqf b/addons/fastroping/functions/fnc_fastRope.sqf index 80be870553..430c8d86ca 100644 --- a/addons/fastroping/functions/fnc_fastRope.sqf +++ b/addons/fastroping/functions/fnc_fastRope.sqf @@ -36,4 +36,4 @@ _vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true]; //Start server PFH asap [QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex, false]] call CBA_fnc_serverEvent; moveOut _unit; -[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex, diag_tickTime]] call CBA_fnc_addPerFrameHandler; +[LINKFUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex, diag_tickTime]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf b/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf index 92d23715b0..b1fec908a5 100644 --- a/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf +++ b/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf @@ -20,7 +20,7 @@ _arguments params ["_unit", "", "_rope", "", "_timeToPlayRopeSound"]; _rope params ["", "", "", "_dummy", "_hook"]; //Wait until the unit is actually outside of the helicopter -if (vehicle _unit != _unit) exitWith {}; +if (!isNull objectParent _unit) exitWith {}; // dummy lost hook if (isNull _hook) exitWith { diff --git a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf index c3b7fe1ea4..716c0ab43e 100644 --- a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf +++ b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf @@ -20,7 +20,7 @@ _arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_hasBeenAttached _rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook"]; //Wait until the unit is actually outside of the helicopter -if (vehicle _unit != _unit) exitWith {}; +if (!isNull objectParent _unit) exitWith {}; //Prevent teleport if hook has been deleted due to rope cut if (isNull _hook) exitWith { diff --git a/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf b/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf index 970194ab63..892997bf80 100644 --- a/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf +++ b/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf @@ -22,5 +22,4 @@ private _synchedUnits = synchronizedObjects _module; _x = vehicle _x; }; [_x] call FUNC(equipFRIES); - false -} count _synchedUnits; +} forEach _synchedUnits; diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index ef613c633e..b68da23d28 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -324,6 +324,7 @@ FRIES 로프 자동 장착 Equipement automatique FRIES Auto-equipar FRIES + Авто-подготовка канатов Automatically add FRIES to helicopters that support them. @@ -334,6 +335,7 @@ 로프를 지원하는 헬기에 자동으로 FRIES 로프를 추가합니다. Ajoute automatiquement des FRIES aux hélicoptères qui les supportent. Adiciona automaticamente FRIES a helicópteros que os suportam. + Автоматически добавляйте канаты в вертолеты, которые их поддерживают. diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index 5800068e4b..b0cb2ea1c4 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -44,14 +44,13 @@ private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurret if (_x != "this") then { _weaponMagazines append getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines"); }; - false - } count _muzzles; + } forEach _muzzles; // Fix the `in` operator being case sensitive and BI fucking up the spelling of their own classnames - private _weaponMagazinesCheck = _weaponMagazines apply {toLower _x}; + private _weaponMagazinesCheck = _weaponMagazines apply {toLowerANSI _x}; // Another BIS fix: ShotBullet simulation uses weapon initSpeed, others ignore it - if (toLower _magazine in _weaponMagazinesCheck && {_bulletSimulation == "shotBullet"}) exitWith { + if (toLowerANSI _magazine in _weaponMagazinesCheck && {_bulletSimulation == "shotBullet"}) exitWith { private _initSpeedCoef = getNumber(configFile >> "CfgWeapons" >> _weapon >> "initSpeed"); if (_initSpeedCoef < 0) then { @@ -62,8 +61,7 @@ private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurret _initSpeed = _initSpeedCoef; }; }; - false - } count (_vehicle weaponsTurret _turret); + } forEach (_vehicle weaponsTurret _turret); private _offset = "ace_fcs" callExtension format ["%1,%2,%3,%4", _initSpeed, _airFriction, _angleTarget, _distance]; _offset = parseNumber _offset; @@ -72,8 +70,7 @@ private _turretConfig = [configOf _vehicle, _turret] call EFUNC(common,getTurret _FCSMagazines pushBack _magazine; _FCSElevation pushBack _offset; }; - false -} count (_vehicle magazinesTurret _turret); +} forEach (_vehicle magazinesTurret _turret); [_vehicle, format ["%1_%2", QGVAR(Distance), _turret], _distance] call EFUNC(common,setVariablePublic); [_vehicle, format ["%1_%2", QGVAR(InitSpeed), _turret], _FCSInitSpeed] call EFUNC(common,setVariablePublic); diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index 52edd6417f..e99416593a 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -72,5 +72,5 @@ if (getNumber (configFile >> "CfgAmmo" >> _ammo >> QGVAR(Airburst)) == 1) then { if (_zeroing < 50) exitWith {}; if (_zeroing > 1500) exitWith {}; - [FUNC(handleAirBurstAmmunitionPFH), 0, [_vehicle, _projectile, _zeroing]] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(handleAirBurstAmmunitionPFH), 0, [_vehicle, _projectile, _zeroing]] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/field_rations/XEH_postInit.sqf b/addons/field_rations/XEH_postInit.sqf index 1ee235ca4f..9f64379094 100644 --- a/addons/field_rations/XEH_postInit.sqf +++ b/addons/field_rations/XEH_postInit.sqf @@ -96,7 +96,7 @@ if !(hasInterface) exitWith {}; ] call CBA_fnc_addItemContextMenuOption; // Add water source helpers when interaction menu is opened - ["ace_interactMenuOpened", {call FUNC(addWaterSourceInteractions)}] call CBA_fnc_addEventHandler; + ["ace_interactMenuOpened", LINKFUNC(addWaterSourceInteractions)] call CBA_fnc_addEventHandler; // Add status modifiers if (["ace_medical"] call EFUNC(common,isModLoaded)) then { @@ -134,7 +134,7 @@ if !(hasInterface) exitWith {}; ["CAManBase", "respawn", LINKFUNC(handleRespawn)] call CBA_fnc_addClassEventHandler; // Start update loop - [FUNC(update), CBA_missionTime + MP_SYNC_INTERVAL, 1] call CBA_fnc_waitAndExecute; + [LINKFUNC(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); diff --git a/addons/field_rations/XEH_preStart.sqf b/addons/field_rations/XEH_preStart.sqf index 88109cf9ee..ebb22b6ee8 100644 --- a/addons/field_rations/XEH_preStart.sqf +++ b/addons/field_rations/XEH_preStart.sqf @@ -15,7 +15,7 @@ private _waterSourceOffsets = [ // Fill water source arrays from CfgVehicles { private _split = (getText (_x >> "model")) splitString "\"; - private _string = toLower (_split param [((count _split) - 1), ""]); + private _string = toLowerANSI (_split param [((count _split) - 1), ""]); // Append extension if necessary if ((_string select [count _string - 4]) != ".p3d") then { diff --git a/addons/field_rations/functions/fnc_update.sqf b/addons/field_rations/functions/fnc_update.sqf index 82b87bcfb6..f66573824b 100644 --- a/addons/field_rations/functions/fnc_update.sqf +++ b/addons/field_rations/functions/fnc_update.sqf @@ -25,7 +25,7 @@ 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; + [LINKFUNC(update), _nextMpSync, 1] call CBA_fnc_waitAndExecute; QGVAR(hud) cutFadeOut 0.5; }; @@ -73,4 +73,4 @@ if (!EGVAR(common,OldIsCamera) && {_thirst > XGVAR(hudShowLevel) || {_hunger > X QGVAR(hud) cutFadeOut 0.5; }; -[FUNC(update), _nextMpSync, 1] call CBA_fnc_waitAndExecute; +[LINKFUNC(update), _nextMpSync, 1] call CBA_fnc_waitAndExecute; diff --git a/addons/field_rations/stringtable.xml b/addons/field_rations/stringtable.xml index 78e1ebfe87..482f347598 100644 --- a/addons/field_rations/stringtable.xml +++ b/addons/field_rations/stringtable.xml @@ -31,6 +31,7 @@ ACE 전투식량 HUD ACE HUD de Raciones de campo ACE HUD de Rações de Campo + ACE Rations de terrain HUD Indicates current hunger and thirst status. @@ -78,6 +79,7 @@ 먹기/마시기 Comer/Beber Comer/Beber + Manger/Boire Enable/Disable Field Rations @@ -177,6 +179,7 @@ 갈증 해소 Sed saciada Sede saciada + Soif étanchée Coefficient for the amount of thirst quenched from drinking. @@ -191,6 +194,7 @@ 마심으로써 갈증이 얼마나 해소되는지를 정합니다 Coeficiente del saciamiento de sed por beber. Coeficiente para a quantidade de sede saciada por beber. + Coefficient déterminant la quantité de soif étanchée par la boisson. Hunger Satiated @@ -205,6 +209,7 @@ 배부름 Hambre saciada Fome saciada + Faim rassasiée Coefficient for the amount of hunger satiated from eating. @@ -219,6 +224,7 @@ 밥을 먹어서 배고픔이 얼마나 해결되는지를 정합니다 Coeficiente del saciamiento del hambre por comer. Coeficiente para a quantidade de fome saciada por comer. + Coefficient déterminant la quantité de faim satisfaite en mangeant. Water Source Actions @@ -232,6 +238,7 @@ 물 근처 행동 Acciones para suministros de agua Ações para suprimentos de água + Interactions sur les sources d'eau Controls what actions are available on water sources. @@ -245,6 +252,7 @@ 물가에서 어떤 행동을 취할지 정합니다 Controla qué acciones están disponibles para los suministros de agua. Controla quais ações estão disponíveis para os suprimentos de água. + Déterminer les stocks disponibles dans les sources d'eau. Refill Only @@ -258,6 +266,7 @@ 다시 채우기만 가능 Sólo rellenar Apenas reabastecer + Remplissage uniquement Terrain Object Actions @@ -271,6 +280,7 @@ 지형 물체 상호작용 Acciones sobre objetos del terreno Ações para objetos do terreno + Actions sur les objets du terrain Enables water source actions for terrain objects. @@ -284,6 +294,7 @@ 지형 물체에서 물을 얻는 게 가능해집니다. Habilitar acciones de suministros de agua para los objetos en el suelo. Habilita ações para suprimentos de água para objetos do terreno. + Active les actions relatives aux sources d'eau pour les objets de terrain. Affect Advanced Fatigue @@ -298,6 +309,7 @@ 고급 피로도에 영향을 끼침 Afecta a la Fatiga Avanzada Afeta a Fadiga Avançada + Affectation Fatigue avancée Controls if thirst and hunger should affect ACE Advanced Fatigue. @@ -312,6 +324,7 @@ 배고픔과 목마름이 고급 피로도에 영향을 끼칠지를 정합니다 Controla si la sed y el hambre afectan a la Fatiga Avanzada de ACE Controla se a sede e a fome afetam a Fadiga Avançada do ACE. + Contrôle si la soif et la faim doivent affecter la fatigue avancée ACE. HUD Type @@ -326,6 +339,7 @@ HUD 종류 Tipo de HUD Tipo de HUD + Type de HUD Selects which HUD style will be used. @@ -340,6 +354,7 @@ 사용될 HUD 스타일을 고르십시오. Selecciona qué estilo de HUD será utilizado. Seleciona qual estilo de HUD será usado. + Sélectionne le style HUD à utiliser. Colored Icons @@ -354,6 +369,7 @@ 색깔 아이콘 Iconos coloreados Ícones coloridos + Icônes de couleur Draining Icons @@ -368,6 +384,7 @@ 빠지는 아이콘 Iconos de drenado Ícones de drenagem + Icônes incolores HUD Show Level @@ -382,6 +399,7 @@ HUD 표시 Mostrar nivel en HUD Mostrar nível no HUD + Afficher le niveau dans le HUD Automatically show the HUD when either thirst or hunger are above this level. @@ -396,6 +414,7 @@ 정한 퍼센트 이하로 내려가면 HUD가 나타나게 합니다. Mostrar automáticamente el HUD cuando la sed o el hambre están por encima de este nivel. Mostrar automaticamente o HUD quando a sede ou a fome estão acima deste nível. + Affiche automatiquement le HUD dès que la soif ou la faim sont au-dessus de ce niveau. Always @@ -427,6 +446,7 @@ 색깔 아이콘 - 투명도 Iconos coloreados - Transparencia Ícones coloridos - Transparência + Icônes de couleur - Transparence Controls the transparency of the Colored Icons HUD. Dynamic setting makes the HUD less transparent as thirst or hunger increase. @@ -441,6 +461,7 @@ 색깔 아이콘의 투명도를 조절합니다. 동적 설정의 경우 배고픔이나 목마름이 해결되면 덜 투명하게 바뀝니다. Controla la transparencia de los Iconos coloreados en el HUD. La opción dinámica muestra el HUD menos transparente cuando la sed o el hambre aumentan. Controla a transparência dos ícones coloridos no HUD. A configuração dinâmica torna o HUD menos transparente à medida que a sede ou a fome aumentam. + Contrôle la transparence du HUD des icônes colorées. Un réglage dynamique rend le HUD moins transparent lorsque la soif ou la faim augmentent. Dynamic @@ -471,6 +492,7 @@ 식수 보급량 Suministro de agua Suprimentos de água + Réserve d'eau The amount of water available for ACE Field Rations water source actions (-1 disabled, -10 infinite) @@ -484,6 +506,7 @@ ACE 전투식량 물 근처 행동에서 얼마나 물을 얻어 갈 수 있는지를 정합니다 (-1은 비활성화, -10은 무한대) La cantidad de agua disponible para las acciones de suministro de agua de las Raciones de Combate de ACE (-1 deshabilitado, -10 infinito) A quantidade de água disponível para as ações de suprimentos de água das Rações de Campo do ACE (-1 desativado, -10 infinito) + Quantité d'eau disponible pour les actions relatives aux sources d'eau des rations de campagne ACE (-1 désactivé, -10 infini). Water Source @@ -498,6 +521,7 @@ 수원지 Suministro de agua Fonte de água + Source d'eau Check Remaining Water @@ -512,6 +536,7 @@ 남은 물 확인 Comprobar agua restante Verificar água restante + Vérifier l'eau restante Checking remaining water... @@ -526,6 +551,7 @@ 남은 물 확인 중... Comprobando agua restante... Verificando água restante... + Vérification de l'eau restante... There are %1 litres left. @@ -540,6 +566,7 @@ %1 리터의 물이 남아있습니다. Quedan %1 litros. Ainda há %1 litros. + Il reste %1 litres. There is no water left. @@ -554,6 +581,7 @@ 물이 한 방울도 없습니다. No queda agua. Não há mais água. + Il n'y a plus d'eau. Drink From Source @@ -567,6 +595,7 @@ 수원에서 물 마시기 Beber desde el suministro Beber da fonte + Boire à la source Refill @@ -632,6 +661,7 @@ %1 먹는 중... Comiendo %1... Comendo %1... + Manger %1... Drinking %1... @@ -646,6 +676,7 @@ %1 마시는 중... Bebiendo %1... Bebendo %1... + Boire %1... Drinking from %1... @@ -660,6 +691,7 @@ %1 으로 부터 마시는 중... Bebiendo desde %1... Bebendo de %1... + Boire à %1... Drinking from source... @@ -673,6 +705,7 @@ 수원에서 마시는 중... Bebiendo desde el suministro... Bebendo da fonte... + Boire à la source... Water Bottle @@ -891,6 +924,7 @@ 상쾌한 레몬라임향의 탄산음료 Bebida refrescante de sabor lima y limón Bebida refrescante de sabor limão e lima + Une boisson gazeuse rafraîchissante au goût de citron et de citron vert. Orange flavored soft drink with a tingly, fruity taste @@ -905,6 +939,7 @@ 오렌지 향의 톡쏘는 탄산음료 Bebida refrescante de sabor naranja, con un chispeante y afrutado sabor. Bebida refrescante de sabor laranja, com um sabor frutado e formigante. + Une boisson gazeuse aromatisée à l'orange Red Gull gives you wings @@ -919,6 +954,7 @@ 레드굴은 날개를 달아줘요 Red Gull te da alas Red Gull te dá asas + Red Gull vous donne des ailes MRE Lamb Curry @@ -967,6 +1003,7 @@ MRE 비프스튜 MRE Estofado de ternera MRE ensopado de carne + MRE Ragoût de bœuf An MRE containing Beef Stew. Heat for best effect @@ -981,6 +1018,7 @@ 비프스튜가 들어있는 MRE입니다. 뜨겁게 먹을 때 가장 좋습니다 Un MRE que contiene estofado de ternera. Calentar para mejor efecto. Um MRE contendo ensopado de carne. Aquecer para melhor efeito + Un MRE contenant du ragoût de bœuf. Chauffer pour un meilleur effet MRE Cream Tomato Soup @@ -1229,6 +1267,7 @@ Семечки подсолнуха Pipas de girasol Sementes de girassol + Graines de tournesol Roasted And Salted @@ -1241,6 +1280,7 @@ Поджаренные и солёные Tostadas y saladas Torradas e salgadas + Grillé et salé diff --git a/addons/fieldmanual/stringtable.xml b/addons/fieldmanual/stringtable.xml index ae71211c6a..18f45a1e7e 100644 --- a/addons/fieldmanual/stringtable.xml +++ b/addons/fieldmanual/stringtable.xml @@ -26,6 +26,8 @@ Fame Hunger 空腹 + Голод + Faim %3Hunger%4 increases linearly with soldier's movement speed. Restore by eating food.<br/><br/>%3Usage:%4<br/>%2Pick up food.<br/>%2Use [%3%12%4] and select %3Survival%4.<br/>%2Choose an item to consume. @@ -35,6 +37,8 @@ %3Hunger%4 steigt linear mit der Bewegungsgeschwindigkeit des Soldaten. Regeneriert sich, indem Nahrung zu sich genommen wird.<br/><br/>%3Verwende:%4<br/>%2Nahrung einsammeln.<br/>%2Verwende [%3%12%4] und wählen %3Überleben%4.<br />%2Wähle einen Gegenstand zum Verzehr aus. %3Fame%4 aumenta linearmente con la velocità di movimento del soldato. Si rigenera consumando cibo.<br/><br/>%3Usa:%4<br/>%2Raccogli cibo.<br/>%2Usa [%3%12%4] e scegli %3sopravvivenza%4.<br />%2Scegli un articolo da mangiare. %3空腹度%4は兵士の移動速度に比例して増加します。食べ物を食べることで回復します。<br/><br/>%3使用方法:%4<br/>%2食べ物を持つ。<br/>%2[%3%12%4] を使って%3サバイバル%4を選択。<br/>%2食べたいものを選ぶ。 + %3Голод%4 линейно увеличивается со скоростью передвижения солдата. Восстанавливайтесь, употребляя пищу.<br/><br/>%3 Использование:%4<br/>%2Возьмите еду.<br/>%2Используйте [%3%12%4] и выберите %3Выживание% 4.<br/>%2Выберите продукт для потребления. + %3La faim%4 augmente linéairement avec la vitesse de déplacement du soldat. Il se régénère en consommant de la nourriture.<br/><br/>%3Utilisation:%4<br/>%2Ramasser la nourriture.<br/>%2Utilisez [%3%12%4] et sélectionnez %3Survie%4.<br/>%2Choisissez un article à consommer. Thirst @@ -44,6 +48,8 @@ Sete Durst 渇き + Жажда + Soif %3Thirst%4 increases linearly with soldier's movement speed. Restore by drinking liquids.<br/><br/>%3Usage:%4<br/>%2Pick up a drink.<br/>%2Use [%3%12%4] and select %3Survival%4.<br/>%2Choose an item to consume. @@ -53,6 +59,8 @@ %3Durst%4 steigt linear mit der Bewegungsgeschwindigkeit des Soldaten. Regeneriert sich durch das Trinken von Flüssigkeiten.<br/><br/>%3Verwende:%4<br/>%2Holen ein Getränk.<br/>%2Verwende [%3%12%4] und wähle %3Überleben%4.< br/>%2Wähle einen Gegenstand zum Verzehr aus. %3Sete%4 aumenta linearmente con la velocità di movimento del soldato. Si rigenera bevendo liquidi.<br/><br/>%3Usa:%4<br/>%2Raccogli bevanda.<br/>%2Usa [%3%12%4] e scegli %3sopravvivenza%4.<br />%2Scegli un articolo da bere. %3喉の渇き%4は兵士の移動速度に比例して増加します。飲み物を飲むことで回復します。<br/><br/>%3使用方法:%4<br/>%2飲み物を持つ。<br/>%2[%3%12%4] を使って%3サバイバル%4を選択。<br/>%2飲みたいものを選ぶ。 + %3Жажда%4 линейно увеличивается со скоростью передвижения солдата. Восстанавливайтесь, употребляя напитки.<br/><br/>%3 Использование:%4<br/>%2Возьмите напиток.<br/>%2Используйте [%3%12%4] и выберите %3Выживание% 4.<br/>%2Выберите напиток для потребления. + %3La soif%4 augmente linéairement avec la vitesse de déplacement du soldat. Elle se régénère en buvant des liquides.<br/><br/>%3Utilisez [%3%12%4] et choisissez %3survival%4.<br />%2Choisissez un article à boire. Medical Treatment @@ -62,6 +70,8 @@ Medizinische Behandlung Cure Mediche 治療 + Медицинское лечение + Traitement médical Decrease Heart Rate @@ -71,6 +81,8 @@ Verringere Herzfrequenz Rallenta ritmo cardiaco 心拍数を下げる + Уменьшить частоту сердечных сокращений + Diminution de la fréquence cardiaque %3Adenosine%4 is used to decrease heart rate.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an appendage.<br/>%2Inject %3Adenosine%4. @@ -80,6 +92,8 @@ %3Adenosin%4 wird verwendet, um die Herzfrequenz zu senken.<br/><br/>%3Verwende:%4<br/>%2Verwende [%3%13%4] oder [%3%14%4] und wählen ein Körperteil aus.<br/>%2Injiziere %3Adenosin%4. %3Adenosina%4 è usata per rallentare il ritmo cardiaco.<br/><br/>%3Utilizzo:%4<br/>%2Usa [%3%13%4] o [%3%14%4] e seleziona un arto.<br/>%2Inject %3Adenosina%4. %3アデノシン%4は心拍数を下げるのに使われます。<br/><br/>%3使用方法:%4<br/>%2[%3%13%4] または [%3%14%4] を使って四肢を選択します。<br/>%2そして%3アデノシン%4を注射します。 + %3Аденозин%4 используется для снижения частоты сердечных сокращений.<br/><br/>%3Применение:%4<br/>%2Используйте [%3%13%4] или [%3%14%4] и выберите конечность.<br/>%2Введите %3Аденозин%4. + L'%3adénosine%4 est utilisée pour réduire la fréquence cardiaque.<br/><br/>%3Utilisation:%4<br/>%2Utilisez [%3%13%4] ou [%3%14%4] et sélectionnez un membre.<br/>%2Injectez l'%3Adénosine%4. Bandages @@ -89,6 +103,8 @@ Bandagen Bende 包帯 + Бинты + Pansements Close Wounds @@ -98,6 +114,8 @@ Wunden schließen Chiudi ferite 傷口をふさぐ + Закрыть раны + Fermer les plaies %3Bandages%4 stop bleeding and close wounds. Depending on your settings, bandages may reopen if surgery is not performed.<br/><br/>%2%3Field Dressing:%4<br/>%11<t color='#D9D900'>Average</t> In All Categories<br/>%2%3Packing Bandage:%4<br/>%11<t color='#D9D900'>Average</t> Treatment<br/>%11<t color='#E60000'>Higher</t> Reopen Chance<br/>%11<t color='#00CC00'>Longer</t> Reopen Delay<br/>%2%3Elastic Bandage:%4<br/>%11<t color='#00CC00'>Higher</t> Treatment<br/>%11<t color='#E60000'>Higher</t> Reopen Chance<br/>%11<t color='#E60000'>Shorter</t> Reopen Delay<br/>%2%3Quickclot:%4<br/>%11<t color='#E60000'>Lower</t> Treatment<br/>%11<t color='#00CC00'>Lower</t> Reopen Chance<br/>%11<t color='#00CC00'>Longer</t> Reopening Delay<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select a injured body part.<br/>%2Bandage body part by selecting desired %3Bandage%4 type. @@ -116,6 +134,7 @@ IV-Flüssigkeiten Fluidi EV IV 輸液 + IV Fluides Restore Blood Volume @@ -125,6 +144,8 @@ Blutvolumen wiederherstellen Ristorano Volume di Sangue 血液量を回復する + Внутривенные жидкости + Restaurer le volume sanguin %3IV fluids%4 restore lost blood volume. Blood, Plasma, and Saline are functionally the same.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an appendage.<br/>%2Restore blood volume by selecting desired %3IV Fluid%4 type. @@ -143,6 +164,8 @@ Herzfrequenz erhöhen | Wache schneller auf Aumenta ritmo cardiaco | Accelera rinvenimento 心拍数を上げる | はやく起こす + Увеличьте частоту сердечных сокращений | просыпайтесь быстрее + Augmentation de la fréquence cardiaque - Réveil plus rapide %3Epinephrine%4 increases a patient's pulse as well as potentially decreasing the time between consciousnesss checks (effectively reducing the time needed for the patient to wake up).<br/><br/>%3Usage%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an appendage.<br/>%2Inject %3Epinephrine%4. @@ -161,6 +184,8 @@ Wie neu wiederherstellen Cura completa 生まれたてのように回復する + Лечение тела + Remettre comme neuf The %3Personal Aid Kit%4 is an item that allows a soldier to be fully healed. Independent of %3ACE Settings%4, it requires that the patient is in %3Stable Condition%4 before use.<br/><br/>%3Stable Condition%4 qualifies as:<br/>%2Unit is %3Alive%4.<br/>%2Unit is %3Conscious%4.<br/>%2Unit has no active %3Bleeding%4.<br/>%2Heart Rate >= 40.<br/>%2Systolic BP >= 60.<br/>%2Diastolic BP >= 50.<br/><br/>%3Usage:%4<br/>%2Move to appropriate location depending on %3ACE Settings%4.<br/>%2Use [%3%13%4] or [%3%14%4] and select %3Advanced Treatments%4<br/>%2Select %3Use Personal Aid Kit%4. @@ -179,6 +204,8 @@ Brüche richten Risolvi frattura 骨折を治す + Исправлять переломы + Réparation des fractures A %3Splint%4 is used to fix fractures. The %3Splint%4 is consumed when used.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an affected appendage.<br/>%2Select %3Apply Splint%4. @@ -196,6 +223,8 @@ Prevenir Reabertura de Feridas Impedisce la riapertura di ferite 傷口が開くのを防ぐ + Предотвратить повторное открытие ран + Empêcher la réouverture des plaies A %3Surgical Kit%4 is used to prevent wounds from reopening after being bandaged. Depending on settings, it can also clear trauma and may require additional %3Sutures%4 to close wounds. Sutures are consumable, much like bandages, and are not a replacement for the Surgical Kit.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select %3Advanced Treatment%4.<br/>%2Select %3Use Surgical Kit%4. @@ -212,6 +241,8 @@ Parar o Sangramento Ferma emorragia 出血を止める + Остановить кровотечение + Arrêter les saignements A %3Tourniquet%4 stops bleeding temporarily so that a wound(s) can be bandaged. Can only be used on limbs.<br/><br/>%3Usage:%4<br/>%2Use [%3%13%4] or [%3%14%4] and select an affected appendage.<br/>%2Select %3Apply Tourniquet%4. @@ -244,6 +275,7 @@ Cure, Semplificato Tratamento, Simplificado 治療を簡略化する + Traitement, simplifié The %3Medical Menu%4 is a dedicated %3interface%4 to facilitate %3medical treatment%4. The %3R%4 and %3L%4 letters indicate the side of the patient's body being treated.<br/><br/>%3Usage:%4<br/>%2Use [%3%14%4] while looking at a patient to open the Medical Menu. Opening the menu without a patient allows for self-treatment.<br/>%2Alternatively, use [%3%12%4] or [%3%13%4] and select %3Medical Menu%4.<br/><br/>%3Keybinds:%4<br/>%2Use [%3W, A, S, D, X, and Z%4] to select body parts.<br/>%2Use your %3number keys%4 to select treatment categories. @@ -260,6 +292,7 @@ Portátil, Preciso e Robusto Leggero, Preciso, Robusto 高機動、高精度、高耐久 + Portable, précis, robuste The %3Horus ATragMX%4 considers atmospheric conditions, gun data, ammunition, range, speed, and muzzle velocity to calculate precise aiming solutions with %3Come-Up%4 results - and even accounts for %3Coriolis%4 and %3Spin Drift%4 effects. %3ATragMX%4, loaded on a handheld computer made by %3TDS Recon%4, is easy to use and lightning fast. The %3Recon%4 meets the rigorous %3MIL-STD-810F%4 military standard for drops, vibration, humidity, altitude and extreme temperatures.<br/><br/>%3Usage:%4<br/>Please visit the wiki page for more information. @@ -276,6 +309,7 @@ Retorne os Abatidos Recupera i tuoi morti 死者を連れ出す + Récupérez vos morts %3Body Bags%4 are used to transport dead bodies. They can be dragged and loaded into vehicles.<br/><br/>%3Usage:%4<br/>%2Approach a dead body.<br/>%2Use [%3%13%4] or [%3%15%4] and select %3Place Body In Bodybag%4. @@ -292,6 +326,7 @@ Faça Prisioneiros Prendi prigionieri 捕虜の捕り方 + Faire des prisonniers %3Cable Ties%4 enable a soldier to capture and detain another soldier. Once apprehended, the captor gains the ability to inspect the prisoner's belongings, set them free, or accompany them to an alternate area. Transporting escorted prisoners is also possible, including loading them into vehicles if needed. Depending on your settings, units may need to surrender before being taken captive.<br/><br/>%3Usage:%4<br/>%2Approach the unit and use the [%3%13%4].<br/>%2The interaction is located around the hands in the form of a handcuffs icon.<br/>%2Repeat to release. @@ -308,6 +343,7 @@ Celular Explosivo Cellulare per esplosivi 電話でドカン + Explosifs téléphone portable The %3Cellphone%4 is functionally a %3Clacker%4. Use it to connect and detonate an explosive device. Multiple devices can be linked to the cellphone and called within the phonebook.<br/><br/>%3Usage:%4<br/>%2Place an explosive.<br/>%2Use [%3%13%4], select %3Explosives%4, and select %3Cellphone%4.<br/>%2Open the cellphone interface with [%3%12%4].<br/>%2Navigate the phone book with the arrows and select your calling number.<br/>%2Call the number to detonate. @@ -324,6 +360,7 @@ Luzes de Leitura Portáteis Luci da Lettura Portabili 携帯読書灯 + Lampes de lecture portables %3Chemlight Shields%4 give you the ability to read your map, even in dark environments. However, when using %3Chemlight Shields%4, you will have a slight glow around you.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2elect %3Chemlights%4 and %3Prepare Chemlight Shield (Color)%4.<br/>%2Open %3Map%4.<br/>%2Use [%3%12%4] and select %3Flashlights%4 where you will find your chemlight shield. @@ -340,6 +377,7 @@ Detonação Remota Detonazione da remoto リモコン爆弾 + Détonation à distance Use %3Clackers%4 to connect and detonate an explosive device. Multiple devices can be linked to a clacker and detonated on different channels.<br/><br/>%3Usage:%4<br/>%2Place an explosive.<br/>%2Use [%3%13%4], select %3Explosives%4, and select the %3Clacker%4 you wish to link to.<br/>%2Open the ACE interface with [%3%12%4].<br/>%2Select %3Explosives%4 and select a %3Clacker%4.<br/>%2Select the %3Explosive%4 you wish to detonate. @@ -354,6 +392,8 @@ 내비게이션입니다 Naviga 測位 + Навигация + Naviguer The %3DAGR%4 is a simpler version of the %3MicroDAGR GPS%4. It has similar features but lacks the topographic and satellite imaging functions of the %3MicroDAGR GPS%4.<br/><br/>%3Usage:%4<br/>%2Equip a %3DAGR%4.<br/>%2Use [%3%12%4] and select %3Configure%4 or %3Toggle%4.<br/><br/>The following menus are available when configuring your %3DAGR:%4<br/>%11%2Data View: WIP<br/>%11%2GoTo WP: Select a waypoint to track.<br/>%11%2WP List: Add/Edit/Remove waypoints.<br/>%11%2Connect To: Connect %3DAGR%4 to the %3Vector 21 Rangefinder%4.<br/>%11%2Options @@ -368,6 +408,8 @@ '폭발'적인 복수입니다 Vendetta Esplosiva 爆発的な復讐 + Взрывная месть + Homme mort The %3Dead Man's Switch%4 is a device that allows a soldier to detonate an %3Explosive%4 when the soldier dies.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Explosives%4.<br/>%2Select %3Dead Man's Switch%4 and connect the desired %3Explosive%4.<br/>%2Repeat the process and disconnect to reverse. @@ -389,6 +431,8 @@ 폭발물을 해체합니다 Disinnesca Esplosivi 爆発物の解除 + Обезвреживание взрывчатки + Désamorcer les explosifs Protect Your Hearing @@ -396,6 +440,8 @@ 청력을 보호합니다 Proteggi il tuo Udito 聴覚の保護 + Защитите свой слух + Protéger votre audition %3Ear Plugs%4 help prevent hearing damage from repeat loud noises near a soldier. Insert %3Ear Plugs%4 to lower volume of a soldier's environment and prevent %3Combat Deafness%4.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Insert %3Ear Plugs%4. @@ -410,6 +456,8 @@ 엄폐하십시오 Mettiti in Copertura 遮蔽を造り出す + Добраться до укрытия + Se mettre à couvert The %3Entrenching Tool%4 allows soldiers to dig trenches to help defend their position. The soldier must be on soil in order to dig a trench.<br/><br/>%3Usage:%4<br/>%2Equip an %3Entrenching Tool%4.<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select the type of trench you wish to build. @@ -424,6 +472,8 @@ Torce 손전등 フラッシュライト + Фонари + Lampes de poche Illuminate Your Map @@ -431,6 +481,8 @@ Illumina la tua Mappa 지도를 밝혀줍니다 地図に光あれ + Осветите свою карту + Éclairer votre carte %3Flashlights%4 give you the ability to read your map, even in dark environments. However, when using %3Flashlights%4, you will have a slight glow around you.<br/><br/>%3Usage:%4<br/>%2On the map screen, use [%3%12%4] and select %3Flashlights%4.<br/>%2Select the %3Flashlight%4 you want to use and select %3On%4.<br/><br/>%3Available Flashlight Items%4:<br/>%2 Fulton MX-991<br/>%2 KSF-1<br/>%2 Maglite XL50<br/><br/>%3NOTE:%4<br/>Flashlight states are persistent. @@ -445,6 +497,8 @@ Osserva dal Cielo 하늘에서 관측합니다 空から戦場を見てみよう + Наблюдайте с Небес + Observer depuis le ciel The %3High-Altitude Unit Navigated Tactical Imaging Round (HuntIR)%4 is designed to be fired from a grenade launcher. After being fired in the air, the built-in parachute will be deployed and the IR CMOS camera will activate, providing a video stream until it touches the ground or is shot down.<br/><br/>%3Usage:%4<br/>%2Equip a %3HuntIR Monitor%4 and compatible ammunition.<br/>%2Fire the %3HuntIR Round%4 as high as possible over the area you want to observe.<br/>%2Open the %3HuntIR Monitor%4.<br/>%2Use [%3%12%4], select %3Equipment%4.<br/>%2Select %3Activate HuntIR Monitor%4. @@ -459,6 +513,8 @@ Traccia la tua squadra con discrezione 은신하여 팀을 찾아냅니다 自分の部隊を追う + Следите за своей командой незаметно + Suivez votre équipe en toute discrétion The %3IR Strobe%4 is a throwable that emits an IR light pulse intermittently. The %3IR Strobe%4 can also be attached to a soldier, making it useful for tracking teammates under night vision devices.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select %3Attach%4 and select the %3IR Strobe%4. @@ -473,6 +529,8 @@ Stazione Meteo Tascabile 휴대용 기상 관측 장비입니다 携帯気象予報所 + Карманная метеостанция + Station météo de poche The %3Kestrel 4500 Pocket Weather Tracker%4 is a mini weather station useful for collecting the the following weather data:<br/>%2Heading and wind direction<br/>%2Crosswind and headwind<br/>%2Altitude and barometric pressure<br/>%2Wet bulb temperature<br/>%2Humidity and dewpoint<br/>%2Density altitude<br/>%2Wind chill and temperature<br/>%2Time and date<br/>%2Minimum, maximum, and average values<br/><br/>%3Usage:%4<br/>%2Equip a %3Kestrel%4.<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select %3Open%4. @@ -487,6 +545,8 @@ Triangola la tua posizione 위치를 삼각측량합니다 三角測量で位置を特定 + Передавайте свое местоположение + Trianguler votre position The %3Map Tools%4 are a set of tools that allows a soldier to measure distances and angles. Useful for land, and calculating firing solutions for artillery.<br/><br/>%3Usage:%4<br/>%2Open %3Map%4.<br/>%2Use [%3%12%4] and select %3Map Tools%4.<br/>%2 The Tool can be moved by dragging with [%3Left-Click%4] while holding [%3ALT%4]. @@ -494,6 +554,7 @@ Gli %3Strumenti Cartografici%4 permettono al soldato di misurare distanze e angoli sulla mappa. Utile a terra e per calculare direzioni di tiro per artiglieria.<br/><br/>%3Utilizzo:%4<br/>%2Apri %3Mappa%4.<br/>%2Usa [%3%12%4] e seleziona %3Strumenti Cartografici%4.<br/>%2 Lo strumento può essere spostato trascinandolo con [%3Click-Sinistro%4] premendo [%3ALT%4]. %3독도용 도구%4는 병사가 거리와 각도를 측정할 수 있는 도구 세트입니다. 지상에서 유용하며 포병 사격 솔루션 계산에 유용합니다,<br/><br/>%3사용 방법:%4<br/>%2%3지도%4를 여십시오.<br/>%2[%3%12%4]를 사용하여 %3독도용 도구%4를 선택하십시오.<br/>%2도구는 [%3Alt 키%4]를 누른 상태에서 [%3마우스 왼쪽 클릭%4]으로 드래그하여 이동할 수 있습니다. %3マップ ツール%4は、兵士が距離と角度を測定できるようにするツールのセットです。陸上や大砲の射撃工程の計算を解くのに役立ちます。<br/><br/>%3使用方法:%4<br/>%2%3マップ%4を開きます。<br/>%2[%3%12%4] を使って%3マップ ツール%4を選択します。<br/>%2 [%3ALT%4] を押しながら [%3左クリック%4] でドラッグするとツールを移動できます。 + Les %3Outils cartographiques%4 sont un ensemble d'outils permettant au soldat de mesurer des distances et des angles. Utile pour la terre et le calcul des solutions de tir pour l'artillerie.<br/><br/>%3Utilisation:%4<br/>%2Ouvrir la%3Carte%4.<br/>%2Utiliser [%3%12%4] et sélectionner %3Outils cartographiques%4.<br/>%2 L'outil peut être déplacé en le faisant glisser avec [%3Clic gauche%4] tout en maintenant [%3ALT%4]. Advanced DAGR @@ -501,6 +562,8 @@ DAGR Avanzato 고급형 DAGR입니다 より高度なDAGR + Продвинутый DAGR + DAGR avancé The %3MicroDAGR GPS%4 is an advanced version of the %3DAGR%4. It provides position, navigation, and timing (PNT) data to include:<br/>%2Compass and heading<br/>%2Date and hour synced to the mission<br/>%2Elevation (relative to sea level)<br/>%2Current speed<br/>%2GPS with topographic and satellite view<br/>%2Creating, naming, and deleting waypoints<br/>%2Friendly identification (Requires ACE BLUFOR Tracker Setting)<br/>Connection to the Vector-21 Rangefinder for data import (waypoint creation and grid reference of ranged targets)<br/><br/>%3Usage:%4<br/>%2For usage instructions, please visit the dedicated %3MicroDAGR%4 wiki. @@ -515,6 +578,8 @@ Tavole di Tiro 사거리표 射表 + Таблицы диапазонов + Tables de tir Get A Firing Solution @@ -522,6 +587,8 @@ Per una soluzione di tiro 사격 솔루션을 제공합니다 撃ち方の解を得る + Получите расчёт + Obtenir une solution de tir %3Range Tables%4 allow for a soldier to estimate accurate shot placement on direct or indirect targets (depending on asset). The %3Range Table%4 will automatically fill depending on the soldiers selected weapon/vehicle.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select the desired %3Range Table%4. @@ -536,6 +603,8 @@ Corde 로프 ロープ + Канаты + Corde Tow With Ease @@ -543,6 +612,8 @@ Rimorchia con facilità 쉽게 견인을 할 수 있습니다 楽々けん引 + Буксируйте с легкостью + Remorquer avec facilité %3Ropes%4 have multiple uses including %3Towing%4 vehicles and %3Fast Roping%4 from helicopters.<br/><br/>%3Towing:%4<br/>%2Approach a vehicle.<br/>%2Use [%3%13%4] and select %3Towing%4.<br/>%2Select rope length.<br/>%2Select attachment point on towing vehicle.<br/>%2Select attachment on towed vehicle.<br/><br/>%3Available Rope Lengths:%4<br/>%2 3.2 meters<br/>%2 6.2 meters<br/>%2 12.2 meters<br/>%2 15.2 meters<br/>%2 18.3 meters<br/>%2 27.4 meters<br/>%2 36.6 meters @@ -557,6 +628,8 @@ Espandi le tue Fortificazioni 당신의 요새를 확장합니다 要塞を拡張する + Расширить свои укрепления + Élargissez vos fortifications %3Sandbags%4 are sacks made of sturdy material, filled with sand, used for a variety of purposes such as creating barriers or providing stability in construction projects. Useful in expanding larger placed fortifications.<br/><br/>%3Usage:%4<br/>%2Equip a %3Sandbag (Empty)%4.<br/>%2Use [%3%12%4] and select %3Deploy Sandbag%4.<br/>%2Follow on-screen instructions for placement. @@ -571,6 +644,8 @@ Raffredda l'Arma 총기의 온도를 낮춥니다 銃の熱を冷ます + Понизьте температуру оружия + Refroidir l'arme %3Spare Barrels%4 allow a soldier to reduce their weapon's heat significantly. After a short delay, the weapon's barrel will be swapped and its heat reduced. A soldier may also check the temperature of any barrels within their inventory. Not all weapons support swapping barrels.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select %3Swap Barrel%4.<br/>%2Resume operation after barrel swap is complete. @@ -585,6 +660,8 @@ Bomboletta Spray 스프레이 페인트 ペイントスプレー + Аэрозольная краска + Bombe de peinture Tag Your Territory @@ -592,6 +669,8 @@ Marca il tuo territorio 당신의 영역을 지정합니다 自分のテリトリーをマーキング + Пометьте свою территорию + Marquez votre territoire %3Spray Paint%4 is used to tag surfaces with various symbols.<br/><br/>%3Usage:%4<br/>%2Move close to a surface (wall, vehicle, ground, etc).<br/>%2Use [%3%12%4] and select %3Tag%4.<br/>%2Choose a symbol.<br/><br/>%3Available Colors:%4<br/>%2Black<br/>%2Blue<br/>%2Green<br/>%2Red @@ -606,6 +685,8 @@ Stabilizzati Ovunque 어느 곳에나 지지대를 배치할 수 있습니다 どこでも支持器 + Опора может быть установлена в любом месте + Stabilisé partout The %3SSWT Kit%4 is a deployable tripod that allows a soldier to brace their aim when deployed. Use it when you need an elevated shooting position and there are no other objects around.<br/><br/>%3Usage:%4<br/>%2Use [%3%12%4] and select %3Equipment%4.<br/>%2Select %3SSWT Kit%4 and follow the on screen prompts to place. @@ -620,6 +701,9 @@ Tieni gli occhi nel cielo 하늘에서 계속 내려다봅니다 空の目を維持する + Не Отрывай Глаз От Неба + Gardez les yeux au ciel + Gardez les yeux au ciel %3UAV Batteries%4 are used to recharge a UAV's energy storage. Especially useful for small UAVs.<br/><br/>%3Usage:%4<br/>%2Equip a %3UAV Battery%4<br/>%2Approach a %3UAV%4 with its %3Engine Off%4.<br/>%2Use [%3%13%4] and select %3Recharge%4. @@ -634,6 +718,8 @@ Fai un'entrata 진입로를 만듭니다 堂々入場する + Создание собственного входа + Faire son entrée %3Wirecutters%4 are a tool that allows a soldier to bypass wired fencing. Useful for creating backdoor entrances into secure areas.<br/><br/>%3Usage:%4<br/>%2Move close to a fence.<br/>%2Use [%3%12%4] and select %3Cut Fence%4. @@ -664,6 +750,16 @@ ACE3 ACE3 ACE 3 + ACE3 + ACE3 + ACE3 + ACE3 + ACE3 + ACE3 + ACE3 + ACE3 + ACE3 + ACE3 Build Fortifications @@ -671,6 +767,8 @@ Costruisci Fortificazioni 요새를 건설합니다 要塞を構築する + Стройте укрепления + Construire des fortifications The %3Fortify Tool%4 allows soldiers to build fortifications provided by their mission creator.<br/><br/>%3Usage:%4<br/>%2Pick up a %3Fortify Tool%4.<br/>%2Use [%3%12%4] and select %3Fortify%4.<br/>%2Select an available fortification and follow the on screen prompts for placement. @@ -685,6 +783,8 @@ Effrazione 침입용 도구입니다 破壊して乗り込む + Взлом и проникновение + Entrée par effraction %3Lockpicks%4 are used to gain access to locked vehicles.<br/><br/>%3Usage:%4<br/>%2Equip a %3Lockpick%4.<br/>%2Approach a %3Locked%4 vehicle.<br/>Use [%3%13%4] and select %3Lockpick Vehicle%4.<br/><br/><t underline='1'>%3Note:%4</t> Lockpicks and keys are only available via scripting or ACE Vehicle Key modules. @@ -699,6 +799,8 @@ Chiavi dei Veicoli 차량 열쇠 車両キー + Взлом и проникновение + Clés de véhicule Lock/Unlock Vehicles @@ -706,6 +808,8 @@ Blocco/Sblocco di Veicoli 차량을 잠그거나 해제합니다 車両のロック/ロック解除 + Взлом и проникновение + Verrouiller/déverrouiller un véhicule %3Vehicle Keys%4 are used to lock/unlock your vehicles. Vehicle keys can exist for the whole side, or keys can be created for a particular vehicle itself.<br/><br/>%3Usage:%4<br/>%2Equip a %3Vehicle Key%4.<br/>%2Approach the vehicle that the key belongs to.<br/>Use [%3%13%4] and select %3Lock/Unlock Vehicle%4.<br/><br/><t underline='1'>%3Note:%4</t> Lockpicks and keys are only available via scripting or ACE Vehicle Key modules. diff --git a/addons/finger/XEH_postInit.sqf b/addons/finger/XEH_postInit.sqf index 641c94ff92..6a44a5ae79 100644 --- a/addons/finger/XEH_postInit.sqf +++ b/addons/finger/XEH_postInit.sqf @@ -11,7 +11,7 @@ if (!hasInterface) exitWith {}; GVAR(fingersHash) = createHashMap; GVAR(pfeh_id) = -1; - [QGVAR(fingered), {_this call FUNC(incomingFinger)}] call CBA_fnc_addEventHandler; + [QGVAR(fingered), LINKFUNC(incomingFinger)] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; //Add Keybind: diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf index 59405b57a5..2445986d15 100644 --- a/addons/finger/functions/fnc_keyPress.sqf +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -42,7 +42,7 @@ private _sendFingerToPlayers = []; private _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)]); { _nearbyMen append (crew _x); -} count (ACE_player nearObjects ["StaticWeapon", (GVAR(maxRange) + 2)]); +} forEach (ACE_player nearObjects ["StaticWeapon", (GVAR(maxRange) + 2)]); { if ((((eyePos _x) vectorDistance _playerEyePosASL) < GVAR(maxRange)) && {alive _x} && @@ -53,8 +53,7 @@ private _nearbyMen = (ACE_player nearObjects ["CAManBase", (GVAR(maxRange) + 2)] _sendFingerToPlayers pushBack _x; }; - true -} count _nearbyMen; +} forEach _nearbyMen; TRACE_1("sending finger to",_sendFingerToPlayers); diff --git a/addons/fire/XEH_postInit.sqf b/addons/fire/XEH_postInit.sqf index 382c06293b..571c0033d9 100644 --- a/addons/fire/XEH_postInit.sqf +++ b/addons/fire/XEH_postInit.sqf @@ -1,10 +1,10 @@ #include "script_component.hpp" -[QGVAR(burn), FUNC(burn)] call CBA_fnc_addEventHandler; +[QGVAR(burn), LINKFUNC(burn)] call CBA_fnc_addEventHandler; [QGVAR(playScream), { params ["_scream", "_source"]; - // only play sound if enabled in settings - if (GVAR(enableScreams)) then { + // only play sound if enabled in settings and enabled for the unit + if (GVAR(enableScreams) && {_source getVariable [QGVAR(enableScreams), true]}) then { _source say3D _scream; }; }] call CBA_fnc_addEventHandler; @@ -31,8 +31,7 @@ [GVAR(fireSources), _key] call CBA_fnc_hashRem; }] call CBA_fnc_addEventHandler; - [{ _this call FUNC(fireManagerPFH) }, FIRE_MANAGER_PFH_DELAY, []] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(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/functions/fnc_burn.sqf b/addons/fire/functions/fnc_burn.sqf index a98aea9bc8..1d829dfc45 100644 --- a/addons/fire/functions/fnc_burn.sqf +++ b/addons/fire/functions/fnc_burn.sqf @@ -244,7 +244,7 @@ if (_isBurning) exitWith {}; 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; + _burnIndicatorPFH = [LINKFUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler; _unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH]; }; }; @@ -296,7 +296,7 @@ if (_isBurning) exitWith {}; if (local _unit) then { if (_unit isEqualTo ace_player) then { - private _burnIndicatorPFH = [FUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler; + private _burnIndicatorPFH = [LINKFUNC(burnIndicator), 1, _unit] call CBA_fnc_addPerFrameHandler; _unit setVariable [QGVAR(burnUIPFH), _burnIndicatorPFH]; }; diff --git a/addons/fortify/functions/fnc_deployConfirm.sqf b/addons/fortify/functions/fnc_deployConfirm.sqf index 37e0d4fb9d..b0105a7919 100644 --- a/addons/fortify/functions/fnc_deployConfirm.sqf +++ b/addons/fortify/functions/fnc_deployConfirm.sqf @@ -38,7 +38,7 @@ private _perframeCheck = { _args params ["_unit", "_side", "_typeOf", "_posASL", "_vectorDir", "_vectorUp", "_cost"]; // Animation loop (required for longer constructions) - if (animationState _unit isNotEqualTo "AinvPknlMstpSnonWnonDnon_medic4") then { + if (_totalTime != 0 && {animationState _unit != "AinvPknlMstpSnonWnonDnon_medic4"}) then { // Perform animation [_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation); }; @@ -55,4 +55,3 @@ private _perframeCheck = { LLSTRING(progressBarTitle), _perframeCheck ] call EFUNC(common,progressBar); - diff --git a/addons/fortify/functions/fnc_deployObject.sqf b/addons/fortify/functions/fnc_deployObject.sqf index 4895b261bc..f7e9e6dbad 100644 --- a/addons/fortify/functions/fnc_deployObject.sqf +++ b/addons/fortify/functions/fnc_deployObject.sqf @@ -70,6 +70,7 @@ private _mouseClickID = [_player, "DefaultAction", {GVAR(isPlacing) == PLACE_WAI [_unit, _object] call FUNC(deployConfirm); } else { TRACE_1("deleting object",_object); + [QGVAR(onDeployStop), [_unit, _object, _cost]] call CBA_fnc_localEvent; deleteVehicle _object; }; }; diff --git a/addons/fortify/functions/fnc_handleChatCommand.sqf b/addons/fortify/functions/fnc_handleChatCommand.sqf index 46bdc3cb0b..1422558de8 100644 --- a/addons/fortify/functions/fnc_handleChatCommand.sqf +++ b/addons/fortify/functions/fnc_handleChatCommand.sqf @@ -20,7 +20,7 @@ TRACE_1("handleChatCommand",_args); _args = _args splitString " "; if (_args isEqualTo []) exitWith {ERROR("Bad command");}; -private _command = toLower (_args select 0); +private _command = toLowerANSI (_args select 0); _args deleteAt 0; switch (_command) do { diff --git a/addons/fortify/functions/fnc_parseSide.sqf b/addons/fortify/functions/fnc_parseSide.sqf index 3e9ca5d78d..6af2fac4b4 100644 --- a/addons/fortify/functions/fnc_parseSide.sqf +++ b/addons/fortify/functions/fnc_parseSide.sqf @@ -22,7 +22,7 @@ TRACE_1("parseSide",_side); if (_side isEqualType sideUnknown) exitWith {_side}; -private _char = toLower (_side select [0, 1]); +private _char = toLowerANSI (_side select [0, 1]); private _return = switch (_char) do { case ("b"); diff --git a/addons/fortify/functions/fnc_registerObjects.sqf b/addons/fortify/functions/fnc_registerObjects.sqf index b8e7abd171..7fea4996a4 100644 --- a/addons/fortify/functions/fnc_registerObjects.sqf +++ b/addons/fortify/functions/fnc_registerObjects.sqf @@ -28,7 +28,7 @@ TRACE_3("registerObjects",_side,_budget,_objects); if (_side isEqualTo sideUnknown) exitWith {ERROR_1("Bad Side %1",_this);}; -_objects select { +_objects = _objects select { private _isValid = _x params [["_xClassname", "", [""]], ["_xCost", 0, [0]]]; private _category = toLower (_x param [2, "", [""]]); if (_category != "") then { _x set [2, _category]; }; diff --git a/addons/frag/XEH_postInit.sqf b/addons/frag/XEH_postInit.sqf index ecebd793ce..096b4dde97 100644 --- a/addons/frag/XEH_postInit.sqf +++ b/addons/frag/XEH_postInit.sqf @@ -2,7 +2,7 @@ if (isServer) then { GVAR(lastFragTime) = -1; - [QGVAR(frag_eh), {_this call FUNC(frago);}] call CBA_fnc_addEventHandler; + [QGVAR(frag_eh), LINKFUNC(frago)] call CBA_fnc_addEventHandler; }; ["CBA_settingsInitialized", { diff --git a/addons/frag/functions/fnc_dev_debugAmmo.sqf b/addons/frag/functions/fnc_dev_debugAmmo.sqf index ec52b4b39f..4484edbdc4 100644 --- a/addons/frag/functions/fnc_dev_debugAmmo.sqf +++ b/addons/frag/functions/fnc_dev_debugAmmo.sqf @@ -28,7 +28,7 @@ private _allMagsConfigs = configProperties [configFile >> "CfgMagazines", "isCla private _processedCfgAmmos = []; { - private _ammo = toLower getText (_x >> "ammo"); + private _ammo = toLowerANSI getText (_x >> "ammo"); if (_ammo != "" && {!(_ammo in _processedCfgAmmos)}) then { _processedCfgAmmos pushBack _ammo; diff --git a/addons/frag/functions/fnc_doReflections.sqf b/addons/frag/functions/fnc_doReflections.sqf index 023a283e81..70c7471181 100644 --- a/addons/frag/functions/fnc_doReflections.sqf +++ b/addons/frag/functions/fnc_doReflections.sqf @@ -22,5 +22,5 @@ if (_depth <= 2) then { private _indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange"); private _indirectHit = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHit"); private _testParams = [_pos, [_indirectHitRange, _indirectHit], [], [], -4, _depth, 0]; - [DFUNC(findReflections), 0, _testParams] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(findReflections), 0, _testParams] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/frag/functions/fnc_pfhRound.sqf b/addons/frag/functions/fnc_pfhRound.sqf index bd5a229f0e..ce734a08e3 100644 --- a/addons/frag/functions/fnc_pfhRound.sqf +++ b/addons/frag/functions/fnc_pfhRound.sqf @@ -26,7 +26,7 @@ if (!alive _round) exitWith { if (_skip == 0) then { if ((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1}) then { // shotbullet, shotShell don't seem to explode when touching water, so don't create frags - if ((surfaceIsWater _lastPos) && {(toLower getText (configFile >> "CfgAmmo" >> _shellType >> "simulation")) in ["shotbullet", "shotshell"]}) exitWith {}; + if ((surfaceIsWater _lastPos) && {(toLowerANSI getText (configFile >> "CfgAmmo" >> _shellType >> "simulation")) in ["shotbullet", "shotshell"]}) exitWith {}; private _fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance"); private _isArmed = _firedPos vectorDistance _lastPos >= _fuseDist; // rounds explode at exactly fuseDistance, so check inclusive TRACE_2("",_fuseDist,_isArmed); diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index 7addcd4c38..2bd76c2928 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -136,7 +136,7 @@ Esta definição controla a quantidade máxima de projéteis que o sistema de fragmentação e estilhaçamento irá acompanhar em qualquer momento. Se mais projéteis são disparados, eles não serão rastreados. Diminua essa configuração se você não quiser que o FPS caia em cenários com alta contagem de projéteis (> 200 projéteis no ar ao mesmo tempo) Ce paramètre contrôle le nombre maximum de projectiles et d'éclats résultant de la fragmentation, que le système peut suivre à chaque instant.\nSi plus de projectiles sont générés, ils ne seront pas pris en compte. Baissez ce réglage si vous ne voulez pas de chute de FPS en cas de nombre important de projectiles (>200 éclats en même temps). Ez a beállítás szabályozza a repeszeződés és pattogzás által kilőtt objektumok követett számát. Ha több ez a szám, ezek az objektumok nem lesznek követve. Csökkentsd ezt a beállítást, ha nem akarsz lassulásokat magas-törmelékmennyiségű helyzetekben (200+ repesz a levegőben egyszerre) - Эта настройка контролирует максимальное количество снарядов, которок отслеживает система осколков и обломков в каждый момент времени. Снаряды, выстреленные сверх этого числа, отслеживаться не будут. Уменьшите это значение, если вы не хотите падения FPS при большом количестве снарядов в одной перестрелке (> 200 одновременно летящих снарядов) + Эта настройка контролирует максимальное количество снарядов, которок отслеживает система осколков и обломков в каждый момент времени. /nСнаряды, выстреленные сверх этого числа, отслеживаться не будут. Уменьшите это значение, если вы не хотите падения FPS при большом количестве снарядов в одной перестрелке (> 200 одновременно летящих снарядов) Questo parametro controlla il numero massimo di proiettili che la frammentazione e il sistema di spalling tracciano in ogni momento. Se vengono sparati ulteriori proiettili, non verranno tracciati. Abbassa questo parametro se non vuoi cali di FPS in scenari con molti proiettili (>200 proiettili in aria contemporaneamente) この設定では、断片化および剥離システムが常に追跡する飛翔体の最大量を制御します。 さらに多くの飛翔体が発射された場合、それらは追跡されません。 弾数が多いシナリオでFPSを低下させたくない場合は、この設定を下げてください。 (一度に200発以上が空中に発射されます) 이 설정은 탄환파편 및 파편 시스템으로 인해 생긴 발사체의 수를 결정합니다. 만약 더 많은 발사체가 나올 경우 정해진 수 이외에는 추적하지 않습니다. 이 설정을 낮춤으로써 파편이 많은 시나리오를 실행할때 더욱 원활히 진행할 수 있습니다 (한 번에 200개 이하) diff --git a/addons/gestures/XEH_postInit.sqf b/addons/gestures/XEH_postInit.sqf index 935b81aa61..5133f48c41 100644 --- a/addons/gestures/XEH_postInit.sqf +++ b/addons/gestures/XEH_postInit.sqf @@ -31,9 +31,7 @@ if (!hasInterface) exitWith {}; [_key, [false, (_key != -1), false]], false ] call CBA_fnc_addKeybind; - - false -} count [ +} forEach [ ["Freeze", 80], // Numpad 2 ["Cover", 81], // Numpad 3 ["Forward", 75], // Numpad 4 diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index 7700d4cc81..e5a6bf5d1c 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -88,10 +88,10 @@ if (!hasInterface) exitWith {}; if (GVAR(effects) in [2, 3]) then { // Register fire event handler - ["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler; + ["ace_firedPlayer", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler; //Add Explosion XEH - ["CAManBase", "explosion", FUNC(handleExplosion)] call CBA_fnc_addClassEventHandler; + ["CAManBase", "explosion", LINKFUNC(handleExplosion)] call CBA_fnc_addClassEventHandler; GVAR(PostProcessEyes) = ppEffectCreate ["ColorCorrections", 1992]; GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [1, 1, 1, 0]]; diff --git a/addons/goggles/functions/fnc_applyRainEffect.sqf b/addons/goggles/functions/fnc_applyRainEffect.sqf index 3332db536a..0058209acd 100644 --- a/addons/goggles/functions/fnc_applyRainEffect.sqf +++ b/addons/goggles/functions/fnc_applyRainEffect.sqf @@ -22,7 +22,7 @@ if (!alive _unit) exitWith {}; private _fnc_underCover = { params ["_unit"]; - if (vehicle _unit != _unit && {!isTurnedOut _unit}) exitWith {true}; + if (!isNull objectParent _unit && {!isTurnedOut _unit}) exitWith {true}; // looking up and no roof over head private _position = eyePos _unit; diff --git a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf index 3513eb191a..85b7e60934 100644 --- a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf +++ b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf @@ -23,7 +23,7 @@ if (!alive _unit) exitWith {}; GVAR(FrameEvent) set [0, !(GVAR(FrameEvent) select 0)]; if (GVAR(FrameEvent) select 0) exitWith { - if (vehicle _unit != _unit && {!isTurnedOut _unit}) exitWith { + if (!isNull objectParent _unit && {!isTurnedOut _unit}) exitWith { (GVAR(FrameEvent) select 1) set [0, false]; }; diff --git a/addons/goggles/functions/fnc_isInRotorWash.sqf b/addons/goggles/functions/fnc_isInRotorWash.sqf index 8c3b29723d..6784e9db12 100644 --- a/addons/goggles/functions/fnc_isInRotorWash.sqf +++ b/addons/goggles/functions/fnc_isInRotorWash.sqf @@ -36,7 +36,6 @@ private _rotorWash = [false, 0]; _rotorWash set [1, _distance]; }; }; - false -} count (position _unit nearEntities [["Helicopter"], _radius]); +} forEach (position _unit nearEntities [["Helicopter"], _radius]); _rotorWash diff --git a/addons/goggles/stringtable.xml b/addons/goggles/stringtable.xml index 5fc06612d0..f02b95bf5c 100644 --- a/addons/goggles/stringtable.xml +++ b/addons/goggles/stringtable.xml @@ -101,7 +101,7 @@ Effects - эффекты + Эффекты エフェクト Efekty Effekte diff --git a/addons/grenades/XEH_postInit.sqf b/addons/grenades/XEH_postInit.sqf index 7f67e181cc..c23640bca5 100644 --- a/addons/grenades/XEH_postInit.sqf +++ b/addons/grenades/XEH_postInit.sqf @@ -2,12 +2,12 @@ #include "script_component.hpp" -["ace_flashbangExploded", {_this call FUNC(flashbangExplosionEH)}] call CBA_fnc_addEventHandler; +["ace_flashbangExploded", LINKFUNC(flashbangExplosionEH)] call CBA_fnc_addEventHandler; // Register fired event handlers -["ace_firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; -["ace_firedPlayerNonLocal", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; -["ace_firedNonPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; +["ace_firedPlayer", LINKFUNC(throwGrenade)] call CBA_fnc_addEventHandler; +["ace_firedPlayerNonLocal", LINKFUNC(throwGrenade)] call CBA_fnc_addEventHandler; +["ace_firedNonPlayer", LINKFUNC(throwGrenade)] call CBA_fnc_addEventHandler; if (!hasInterface) exitWith {}; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index bba3cffd4d..6a7b683e6b 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -63,6 +63,7 @@ _affected = _affected - [ACE_player]; if (_flashReactionDebounce < CBA_missionTime) then { // Not used interally but could be useful for other mods _unit setVariable [QGVAR(flashStrength), _strength, true]; + [QGVAR(flashbangedAI), [_unit, _strength, _grenadePosASL]] call CBA_fnc_localEvent; { _unit setSkill [_x, (_unit skill _x) / 50]; } forEach SUBSKILLS; @@ -84,7 +85,7 @@ _affected = _affected - [ACE_player]; }, [_unit]] call CBA_fnc_waitUntilAndExecute; }; }; -} count _affected; +} forEach _affected; // Affect local player, independently of distance if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { @@ -144,11 +145,11 @@ if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { //PARTIALRECOVERY - start decreasing effect over time [{ - params ["_strength"]; + params ["_strength", "_blend"]; - GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]]; + GVAR(flashbangPPEffectCC) ppEffectAdjust [1, 1, 0, _blend, [0,0,0,1], [0,0,0,0]]; GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength); - }, [_strength], 7 * _strength] call CBA_fnc_waitAndExecute; + }, [_strength, _blend], 7 * _strength] call CBA_fnc_waitAndExecute; //FULLRECOVERY - end effect [{ @@ -162,5 +163,7 @@ if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { private _maxFlinch = linearConversion [0.2, 1, _strength, 0, 95, true]; private _flinch = (_minFlinch + random (_maxFlinch - _minFlinch)) * selectRandom [-1, 1]; ACE_player setDir (getDir ACE_player + _flinch); + + [QGVAR(flashbangedPlayer), [_strength, _grenadePosASL]] call CBA_fnc_localEvent; }; true diff --git a/addons/gunbag/XEH_preInit.sqf b/addons/gunbag/XEH_preInit.sqf index 2bb35513a2..3149314f87 100644 --- a/addons/gunbag/XEH_preInit.sqf +++ b/addons/gunbag/XEH_preInit.sqf @@ -26,17 +26,41 @@ PREP_RECOMPILE_END; }, _this] call CBA_fnc_execNextFrame; }] call CBA_fnc_addClassEventHandler; +[QEGVAR(arsenal,loadoutVerified), { + params ["_loadout", "_extendedInfo", "", "", "_missingExtendedInfo"]; + private _gunbagInfo = _extendedInfo getOrDefault [QGVAR(gunbagWeapon), []]; + if (_gunbagInfo isEqualTo []) exitWith {}; + + private _weapon = (_gunbagInfo select 0) call EFUNC(arsenal,baseWeapon); + if !(_weapon in EGVAR(arsenal,virtualItemsFlat)) exitWith { + _missingExtendedInfo pushBack [QGVAR(gunbagWeapon), _weapon]; + _extendedInfo deleteAt QGVAR(gunbagWeapon); + }; + private _missingItems = []; + private _attachments = _gunbagInfo select 1; + { + if (_x != "" && {!(_x call EFUNC(arsenal,baseWeapon) in EGVAR(arsenal,virtualItemsFlat))}) then { + _missingItems pushBack _x; + _attachments set [_forEachIndex, ""]; + }; + } forEach _attachments; + private _magazines = _gunbagInfo select 2; + { + private _class = _x param [0, ""]; + if (_class != "" && {!(_class in EGVAR(arsenal,virtualItemsFlat))}) then { + _missingItems pushBack _class; + _magazines set [_forEachIndex, ["", 0]]; + }; + } forEach _magazines; + if (_missingItems isNotEqualTo []) then { + _missingExtendedInfo pushBack [QGVAR(gunbagWeapon), _missingItems]; + }; +}] call CBA_fnc_addEventHandler; + ["CBA_loadoutSet", { params ["_unit", "_loadout", "_extendedInfo"]; private _gunbagWeapon = _extendedInfo getOrDefault [QGVAR(gunbagWeapon), []]; if (_gunbagWeapon isNotEqualTo []) then { - if (!isNil QEGVAR(arsenal,virtualItemsFlatAll)) then { - private _weapon = (_gunbagWeapon select 0) call EFUNC(arsenal,baseWeapon); - if !(_weapon in EGVAR(arsenal,virtualItemsFlatAll)) then { - INFO_1("removing [%1] from loadout",_gunbagWeapon); - _gunbagWeapon = []; - }; - }; (backpackContainer _unit) setVariable [QGVAR(gunbagWeapon), _gunbagWeapon, true]; }; }] call CBA_fnc_addEventHandler; diff --git a/addons/gunbag/functions/fnc_isMachineGun.sqf b/addons/gunbag/functions/fnc_isMachineGun.sqf index f07866a4aa..e6e4e5c96c 100644 --- a/addons/gunbag/functions/fnc_isMachineGun.sqf +++ b/addons/gunbag/functions/fnc_isMachineGun.sqf @@ -22,7 +22,7 @@ private _config = _weapon call CBA_fnc_getItemConfig; // definition of a machine gun by BIS_fnc_itemType private _cursor = getText (_config >> "cursor"); -if (toLower _cursor in ["", "emptycursor"]) then { +if (toLowerANSI _cursor in ["", "emptycursor"]) then { _cursor = getText (_config >> "cursorAim"); }; diff --git a/addons/headless/XEH_postInit.sqf b/addons/headless/XEH_postInit.sqf index 103d5c1834..d1c76a332b 100644 --- a/addons/headless/XEH_postInit.sqf +++ b/addons/headless/XEH_postInit.sqf @@ -1,12 +1,12 @@ #include "script_component.hpp" -["ace_settingsInitialized", { +["CBA_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", "initPost", FUNC(handleSpawn), nil, nil, true] call CBA_fnc_addClassEventHandler; + ["CAManBase", "initPost", LINKFUNC(handleSpawn), nil, nil, true] call CBA_fnc_addClassEventHandler; }; // Add disconnect EH addMissionEventHandler ["HandleDisconnect", {call FUNC(handleDisconnect)}]; diff --git a/addons/headless/XEH_preInit.sqf b/addons/headless/XEH_preInit.sqf index bd64702f5c..c51b62cf57 100644 --- a/addons/headless/XEH_preInit.sqf +++ b/addons/headless/XEH_preInit.sqf @@ -12,8 +12,7 @@ if (isServer) then { GVAR(headlessClients) = []; GVAR(inRebalance) = false; GVAR(endMissionCheckDelayed) = false; - GVAR(blacklistType) = [BLACKLIST_UAV]; - [QXGVAR(headlessClientJoined), FUNC(handleConnectHC)] call CBA_fnc_addEventHandler; + [QXGVAR(headlessClientJoined), LINKFUNC(handleConnectHC)] call CBA_fnc_addEventHandler; }; ADDON = true; diff --git a/addons/headless/functions/fnc_handleConnectHC.sqf b/addons/headless/functions/fnc_handleConnectHC.sqf index b19ef25012..e5acaf48fc 100644 --- a/addons/headless/functions/fnc_handleConnectHC.sqf +++ b/addons/headless/functions/fnc_handleConnectHC.sqf @@ -19,17 +19,14 @@ 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 (GVAR(headlessClients) pushBackUnique _headlessClient == -1) exitWith {}; if (XGVAR(log)) then { INFO_1("Registered HC: %1",_headlessClient); }; // Exit if AI distribution is disabled -if (!XGVAR(enabled)) exitWith {true}; +if (!XGVAR(enabled)) exitWith {}; // Rebalance [true] call FUNC(rebalance); diff --git a/addons/headless/functions/fnc_handleDisconnect.sqf b/addons/headless/functions/fnc_handleDisconnect.sqf index c94cec2599..a18f22a3bd 100644 --- a/addons/headless/functions/fnc_handleDisconnect.sqf +++ b/addons/headless/functions/fnc_handleDisconnect.sqf @@ -17,7 +17,7 @@ */ params ["_object"]; -TRACE_1("HandleDisconnect",_this); +TRACE_1("HandleDisconnect",_object); // Exit if not HC if !(_object in GVAR(headlessClients)) exitWith { @@ -28,9 +28,7 @@ if !(_object in GVAR(headlessClients)) exitWith { 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; + [LINKFUNC(endMissionNoPlayers), [], 150 - CBA_missionTime] call CBA_fnc_waitAndExecute; } else { // End instantly or after delay if (XGVAR(endMission) == 1) then { @@ -39,7 +37,7 @@ if !(_object in GVAR(headlessClients)) exitWith { } else { TRACE_2("Delayed 60s end",GVAR(endMission),CBA_missionTime); GVAR(endMissionCheckDelayed) = true; - [FUNC(endMissionNoPlayers), [], 60] call CBA_fnc_waitAndExecute; + [LINKFUNC(endMissionNoPlayers), [], 60] call CBA_fnc_waitAndExecute; }; }; }; diff --git a/addons/headless/functions/fnc_handleSpawn.sqf b/addons/headless/functions/fnc_handleSpawn.sqf index 50277e3845..56b74f407d 100644 --- a/addons/headless/functions/fnc_handleSpawn.sqf +++ b/addons/headless/functions/fnc_handleSpawn.sqf @@ -4,27 +4,22 @@ * Handles AI spawn and requests a rebalance if applicable. * * Arguments: - * 0: Object + * 0: Unit * * Return Value: * None * * Example: - * [object] call ace_headless_fnc_handleSpawn + * [cursorObject] call ace_headless_fnc_handleSpawn * * Public: No */ -params ["_object"]; -TRACE_1("Spawn",_object); +params ["_unit"]; +TRACE_1("Spawn",_unit); -// 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]; -}; +// Exit if unit is player or UAV crew +if (isPlayer _unit || {unitIsUAV _unit}) exitWith {}; // Rebalance [false] call FUNC(rebalance); diff --git a/addons/headless/functions/fnc_rebalance.sqf b/addons/headless/functions/fnc_rebalance.sqf index 84be441ebe..5ec32f39bd 100644 --- a/addons/headless/functions/fnc_rebalance.sqf +++ b/addons/headless/functions/fnc_rebalance.sqf @@ -23,7 +23,7 @@ TRACE_3("Rebalance",GVAR(inRebalance),GVAR(headlessClients),_force); if (GVAR(inRebalance) || {GVAR(headlessClients) isEqualTo []}) exitWith {}; // Transfer after rebalance delay -[FUNC(transferGroups), [_force], XGVAR(Delay)] call CBA_fnc_waitAndExecute; +[LINKFUNC(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 index 37580c4fff..60d3c093d1 100644 --- a/addons/headless/functions/fnc_transferGroups.sqf +++ b/addons/headless/functions/fnc_transferGroups.sqf @@ -79,8 +79,8 @@ private _numTransferredHC3 = 0; _transfer = false; }; - // No transfer if player in this group - if (isPlayer _x) exitWith { + // No transfer if player or UAV in this group + if (isPlayer _x || {unitIsUAV _x}) exitWith { _transfer = false; }; @@ -89,14 +89,16 @@ private _numTransferredHC3 = 0; _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 { + private _vehicle = objectParent _x; + + // No transfer if the vehicle the unit is in or if the crew in that vehicle is blacklisted + if ((_vehicle getVariable [QXGVAR(blacklist), false]) || {unitIsUAV _vehicle}) 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), [_x] call CBA_fnc_getLoadout, true]; + _x setVariable [QGVAR(loadout), _x call CBA_fnc_getLoadout, true]; }; } forEach (units _x); }; diff --git a/addons/headless/initSettings.inc.sqf b/addons/headless/initSettings.inc.sqf index cb5fe6e53d..d00cb6eb30 100644 --- a/addons/headless/initSettings.inc.sqf +++ b/addons/headless/initSettings.inc.sqf @@ -4,7 +4,7 @@ [ELSTRING(common,Enabled), LSTRING(EnabledDesc)], format ["ACE %1", LLSTRING(Module)], false, - true, + 1, {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, true ] call CBA_fnc_addSetting; @@ -15,9 +15,8 @@ [LSTRING(Delay), LSTRING(DelayDesc)], format ["ACE %1", LLSTRING(Module)], [0, 60, 15, -1], - true, - {[QGVAR(delay), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true + 1, + {[QGVAR(delay), _this] call EFUNC(common,cbaSettings_settingChanged)} ] call CBA_fnc_addSetting; [ @@ -26,7 +25,7 @@ [LSTRING(EndMission), LSTRING(EndMissionDesc)], format ["ACE %1", LLSTRING(Module)], [[0, 1, 2], [ELSTRING(Common,Disabled), LSTRING(Instant), LSTRING(Delayed)], 0], - true, + 1, {[QGVAR(delay), _this] call EFUNC(common,cbaSettings_settingChanged)}, true ] call CBA_fnc_addSetting; @@ -37,9 +36,8 @@ [LSTRING(Log), LSTRING(LogDesc)], format ["ACE %1", LLSTRING(Module)], false, - true, - {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, - true + 1, + {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)} ] call CBA_fnc_addSetting; [ @@ -48,7 +46,7 @@ [LSTRING(TransferLoadout), LSTRING(TransferLoadoutDesc)], format ["ACE %1", LLSTRING(Module)], [[0, 1, 2], [ELSTRING(Common,Disabled), LSTRING(TransferLoadoutCurrent), LSTRING(TransferLoadoutConfig)], 0], - true, + 1, {}, true // needs mission restart ] call CBA_fnc_addSetting; diff --git a/addons/headless/script_component.hpp b/addons/headless/script_component.hpp index c73e2260de..73761a7bb1 100644 --- a/addons/headless/script_component.hpp +++ b/addons/headless/script_component.hpp @@ -17,4 +17,3 @@ #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/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index d8b21f214a..f8f5c2938f 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -2,6 +2,8 @@ if (!hasInterface) exitWith {}; +#include "initKeybinds.inc.sqf" + GVAR(cacheAmmoLoudness) = call CBA_fnc_createNamespace; GVAR(deafnessDV) = 0; @@ -21,6 +23,8 @@ GVAR(lastPlayerVehicle) = objNull; // Spawn volume updating process [LINKFUNC(updateVolume), 1, [false]] call CBA_fnc_addPerFrameHandler; + [QGVAR(updateVolume), LINKFUNC(updateVolume)] call CBA_fnc_addEventHandler; + // Update veh attunation when player veh changes ["vehicle", { params ["_player", "_vehicle"]; diff --git a/addons/hearing/XEH_preInit.sqf b/addons/hearing/XEH_preInit.sqf index 2ab07c31e6..7a6195ec46 100644 --- a/addons/hearing/XEH_preInit.sqf +++ b/addons/hearing/XEH_preInit.sqf @@ -12,7 +12,8 @@ PREP_RECOMPILE_END; params ["_unit", "_loadout", "_extendedInfo"]; if (_extendedInfo getOrDefault ["ace_earplugs", false]) then { _unit setVariable ["ACE_hasEarPlugsIn", true, true]; - [[true]] remoteExec [QFUNC(updateVolume), _unit]; + + [QGVAR(updateVolume), [[true]], _unit] call CBA_fnc_targetEvent; }; }] call CBA_fnc_addEventHandler; diff --git a/addons/hearing/functions/fnc_addEarPlugs.sqf b/addons/hearing/functions/fnc_addEarPlugs.sqf index f467352410..035d82956f 100644 --- a/addons/hearing/functions/fnc_addEarPlugs.sqf +++ b/addons/hearing/functions/fnc_addEarPlugs.sqf @@ -15,19 +15,19 @@ * Public: No */ -params ["_unit"]; -TRACE_2("params",_unit,typeOf _unit); - // only run this after the settings are initialized if !(EGVAR(common,settingsInitFinished)) exitWith { EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addEarPlugs), _this]; }; -// Exit if hearing is disabled OR autoAdd is disabled OR soldier has earplugs already in (persistence scenarios) -if (!GVAR(enableCombatDeafness) || {!GVAR(autoAddEarplugsToUnits)} || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {}; +params ["_unit"]; +TRACE_2("params",_unit,typeOf _unit); -// add earplugs if the soldier has a rocket launcher -if ((secondaryWeapon _unit) != "") exitWith { +// Exit if hearing is disabled OR autoAdd is disabled OR soldier has earplugs already in (persistence scenarios) +if (!GVAR(enableCombatDeafness) || {GVAR(autoAddEarplugsToUnits) == 0} || {[_unit] call FUNC(hasEarPlugsIn)}) exitWith {}; + +// Add earplugs if enabled for everyone or if the soldier has a rocket launcher +if (GVAR(autoAddEarplugsToUnits) == 2 || {(secondaryWeapon _unit) != ""}) exitWith { TRACE_1("has launcher - adding",_unit); _unit addItem "ACE_EarPlugs"; }; @@ -38,16 +38,20 @@ if ((primaryWeapon _unit) == "") exitWith {}; (primaryWeaponMagazine _unit) params [["_magazine", ""]]; if (_magazine == "") exitWith {}; -private _initSpeed = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); -private _ammo = getText (configFile >> "CfgMagazines" >> _magazine >> "ammo"); -private _count = getNumber (configFile >> "CfgMagazines" >> _magazine >> "count"); +private _cfgMagazine = configFile >> "CfgMagazines" >> _magazine; -private _caliber = getNumber (configFile >> "CfgAmmo" >> _ammo >> "ACE_caliber"); +private _initSpeed = getNumber (_cfgMagazine >> "initSpeed"); +private _ammo = getText (_cfgMagazine >> "ammo"); +private _count = getNumber (_cfgMagazine >> "count"); + +private _cfgAmmo = configFile >> "CfgAmmo"; + +private _caliber = getNumber (_cfgAmmo >> _ammo >> "ACE_caliber"); _caliber = call { - if (_ammo isKindOf ["ShellBase", (configFile >> "CfgAmmo")]) exitWith { 80 }; - if (_ammo isKindOf ["RocketBase", (configFile >> "CfgAmmo")]) exitWith { 200 }; - if (_ammo isKindOf ["MissileBase", (configFile >> "CfgAmmo")]) exitWith { 600 }; - if (_ammo isKindOf ["SubmunitionBase", (configFile >> "CfgAmmo")]) exitWith { 80 }; + if (_ammo isKindOf ["ShellBase", _cfgAmmo]) exitWith { 80 }; + if (_ammo isKindOf ["RocketBase", _cfgAmmo]) exitWith { 200 }; + if (_ammo isKindOf ["MissileBase", _cfgAmmo]) exitWith { 600 }; + if (_ammo isKindOf ["SubmunitionBase", _cfgAmmo]) exitWith { 80 }; [_caliber, 6.5] select (_caliber <= 0); }; private _loudness = (_caliber ^ 1.25 / 10) * (_initspeed / 1000) / 5; diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index 0d8596f53b..4dd81862b9 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -53,7 +53,7 @@ if (isNil "_loudness") then { private _muzzleMagazines = getArray (configFile >> "CfgWeapons" >> _weapon >> _x >> "magazines"); _weaponMagazines append _muzzleMagazines; }; - } count _muzzles; + } forEach _muzzles; { private _ammoType = getText(configFile >> "CfgMagazines" >> _x >> "ammo"); _weaponMagazines set [_forEachIndex, [_x, _ammoType]]; @@ -65,7 +65,7 @@ if (isNil "_loudness") then { if (_ammoType == _ammo) exitWith { _magazine = _magazineType; }; - } count _weaponMagazines; + } forEach _weaponMagazines; if (_magazine == "") then { _loudness = 0; diff --git a/addons/hearing/initKeybinds.inc.sqf b/addons/hearing/initKeybinds.inc.sqf new file mode 100644 index 0000000000..22cf132add --- /dev/null +++ b/addons/hearing/initKeybinds.inc.sqf @@ -0,0 +1,15 @@ +["ACE3 Equipment", QGVAR(putOrRemoveEarplugs), LLSTRING(PutOrRemoveEarplugs), { + // Conditions: specific + if !([ACE_player, objNull, ["isNotSwimming", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + + if (GVAR(EnableCombatDeafness) && {!([ACE_player] call FUNC(hasEarPlugsIn))} && {[ACE_player, "ACE_EarPlugs"] call EFUNC(common,hasItem)}) exitWith { + [ACE_player, true] call FUNC(putInEarPlugs); + true + }; + if (GVAR(EnableCombatDeafness) && {[ACE_player] call FUNC(hasEarPlugsIn)}) exitWith { + [ACE_player, true] call FUNC(removeEarPlugs); + true + }; + + false +}] call CBA_fnc_addKeybind; // UNBOUND diff --git a/addons/hearing/initSettings.inc.sqf b/addons/hearing/initSettings.inc.sqf index f22a7b4eda..61b6d239c5 100644 --- a/addons/hearing/initSettings.inc.sqf +++ b/addons/hearing/initSettings.inc.sqf @@ -5,7 +5,9 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)]; [LSTRING(EnableCombatDeafness_DisplayName), LSTRING(EnableCombatDeafness_Description)], _category, true, - 1 + 1, + {[QGVAR(enableCombatDeafness), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_fnc_addSetting; [ @@ -41,9 +43,9 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)]; ] call CBA_fnc_addSetting; [ - QGVAR(autoAddEarplugsToUnits), "CHECKBOX", + QGVAR(autoAddEarplugsToUnits), "LIST", [LSTRING(autoAddEarplugsToUnits_DisplayName), LSTRING(autoAddEarplugsToUnits_Description)], _category, - true, + [[0, 1, 2], [ELSTRING(common,Disabled), LSTRING(heavyWeaponUnits), ELSTRING(common,Enabled)], 1], 1 ] call CBA_fnc_addSetting; diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 7c40f3f702..de741e55c1 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -363,5 +363,16 @@ Volumen durante la inconsciencia. 기절 시 볼륨입니다. + + Put/take out earplugs + 耳栓を着け外す + Вставить/вынуть беруши + Metti/Togli tappi + 귀마개 토글 + Mettre/enlever les bouchons + + + Only units with heavy weapons + diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index c306595fc7..411dbfe30e 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -77,8 +77,7 @@ GVAR(no_cams) sort true; if (((getPosVisual _x) select 2) > 20 && {!(_x in GVAR(no_cams))} && {_x getHitPointDamage "HitCamera" < 0.25}) then { GVAR(no_cams) pushBack _x; }; - true - } count GVAR(nearHuntIRs); + } forEach GVAR(nearHuntIRs); { if (((getPosVisual _x) select 2) <= 20 || {!(_x in GVAR(nearHuntIRs))} || {_x getHitPointDamage "HitCamera" >= 0.25}) then { GVAR(no_cams) deleteAt _forEachIndex; diff --git a/addons/intelitems/XEH_preInit.sqf b/addons/intelitems/XEH_preInit.sqf index 76f13135d9..ff09f6ea0e 100644 --- a/addons/intelitems/XEH_preInit.sqf +++ b/addons/intelitems/XEH_preInit.sqf @@ -18,8 +18,8 @@ if (isServer) then { 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; + [QGVAR(handleMagIndex), LINKFUNC(handleMagIndex)] call CBA_fnc_addEventHandler; + [QGVAR(setObjectData), LINKFUNC(setObjectData)] call CBA_fnc_addEventHandler; }; if (hasInterface) then { diff --git a/addons/interact_menu/XEH_clientInit.sqf b/addons/interact_menu/XEH_clientInit.sqf index a76bf90e1c..5c9a2ecae0 100644 --- a/addons/interact_menu/XEH_clientInit.sqf +++ b/addons/interact_menu/XEH_clientInit.sqf @@ -47,7 +47,7 @@ GVAR(ParsedTextCached) = []; }] call CBA_fnc_addEventHandler; //Add Actions to Houses: -["ace_interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call CBA_fnc_addEventHandler; +["ace_interactMenuOpened", LINKFUNC(userActions_addHouseActions)] call CBA_fnc_addEventHandler; ["ACE3 Common", QGVAR(InteractKey), (localize LSTRING(InteractKey)), { diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index b60f1bb745..bf3278f0a3 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -10,7 +10,7 @@ PREP_RECOMPILE_END; if (!hasInterface) exitWith { ADDON = true; }; -["All", "init", {_this call FUNC(compileMenu)}] call CBA_fnc_addClassEventHandler; +["All", "init", LINKFUNC(compileMenu)] call CBA_fnc_addClassEventHandler; GVAR(ActNamespace) = [] call CBA_fnc_createNamespace; GVAR(ActSelfNamespace) = [] call CBA_fnc_createNamespace; diff --git a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf index 82235493e6..ebb02caa11 100644 --- a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf +++ b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf @@ -43,12 +43,21 @@ _origActionData params [ "_distance" ]; +private _result = [_target, ACE_player, _customParams] call _conditionCode; + +// Handle nil as false +if (isNil "_result") then { + ERROR_1("Action [%1] bad condition return",_actionName); + + _result = false; +}; + // Return nothing if the action itself is not active -if !([_target, ACE_player, _customParams] call _conditionCode) exitWith { +if (!_result) exitWith { [] }; -// Return nothing if the action is to far (including checking sub actions) [DISABLED FOR NOW ref #2196] +// Return nothing if the action is too far (including checking sub actions) [DISABLED FOR NOW ref #2196] // if (_distanceToBasePoint > _distance) exitWith { // [] // }; @@ -64,21 +73,19 @@ if (_insertChildrenCode isNotEqualTo {}) then { // Collect dynamic children class actions { private _action = [_x select 2, _x, _fullPath, _distanceToBasePoint] call FUNC(collectActiveActionTree); - if ((count _action) > 0) then { + if (_action isNotEqualTo []) then { _activeChildren pushBack _action; }; - nil - } count _dynamicChildren; + } forEach _dynamicChildren; }; // Collect children class actions { private _action = [_object, _x, _fullPath, _distanceToBasePoint] call FUNC(collectActiveActionTree); - if ((count _action) > 0) then { + if (_action isNotEqualTo []) then { _activeChildren pushBack _action; }; - nil -} count _origActionChildren; +} forEach _origActionChildren; // Collect children object actions { @@ -87,12 +94,11 @@ if (_insertChildrenCode isNotEqualTo {}) then { // Check if the action is children of the original action if (_pPath isEqualTo _fullPath) then { private _action = [_object, [_actionData,[]], _fullPath, _distanceToBasePoint] call FUNC(collectActiveActionTree); - if ((count _action) > 0) then { + if (_action isNotEqualTo []) then { _activeChildren pushBack _action; }; }; - nil -} count GVAR(objectActionList); +} forEach GVAR(objectActionList); // If the original action has no statement, and no children, don't display it diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 5290d8f284..75d759465c 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -114,8 +114,7 @@ private _recurseFnc = { ]; _actions pushBack _entry; }; - nil - } count (configProperties [_actionsCfg, "isClass _x", true]); + } forEach (configProperties [_actionsCfg, "isClass _x", true]); _actions }; diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 75fdb93819..ed3a02dd14 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -84,8 +84,7 @@ private _recurseFnc = { ]; _actions pushBack _entry; }; - nil - } count (configProperties [_actionsCfg, "isClass _x", true]); + } forEach (configProperties [_actionsCfg, "isClass _x", true]); _actions }; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index a5f7170588..f461e2a770 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -78,7 +78,7 @@ ACE_Modifier = 0; }] call CBA_fnc_addEventHandler; if (isServer) then { - [QGVAR(replaceTerrainObject), FUNC(replaceTerrainObject)] call CBA_fnc_addEventHandler; + [QGVAR(replaceTerrainObject), LINKFUNC(replaceTerrainObject)] call CBA_fnc_addEventHandler; }; if (!hasInterface) exitWith {}; @@ -168,7 +168,7 @@ private _action = [ // action display name will be overwritten in modifier function QGVAR(takeWeapon), "take", "\A3\ui_f\data\igui\cfg\actions\take_ca.paa", {_player action ["TakeWeapon", _target, weaponCargo _target select 0]}, - {count weaponCargo _target == 1}, + {(count weaponCargo _target == 1) && {[_player, objNull, []] call EFUNC(common,canInteractWith)}}, // Not checking if container is claimed nil, nil, nil, nil, nil, { params ["_target", "", "", "_actionData"]; diff --git a/addons/interaction/XEH_preStart.sqf b/addons/interaction/XEH_preStart.sqf index 799e9e5986..331b5c6d36 100644 --- a/addons/interaction/XEH_preStart.sqf +++ b/addons/interaction/XEH_preStart.sqf @@ -11,7 +11,7 @@ private _replaceTerrainClasses = QUOTE( private _cacheReplaceTerrainModels = createHashMap; { - private _model = toLower getText (_x >> "model"); + private _model = toLowerANSI getText (_x >> "model"); if (_model select [0, 1] == "\") then { _model = _model select [1]; }; diff --git a/addons/interaction/dev/initReplaceTerrainCursorObject.sqf b/addons/interaction/dev/initReplaceTerrainCursorObject.sqf index ee5ddcad49..a1708be423 100644 --- a/addons/interaction/dev/initReplaceTerrainCursorObject.sqf +++ b/addons/interaction/dev/initReplaceTerrainCursorObject.sqf @@ -17,7 +17,7 @@ DFUNC(replaceTerrainModelsAdd) = { if (_class isEqualTo "") then { private _configClasses = QUOTE(getNumber (_x >> 'scope') == 2 && {!(configName _x isKindOf 'AllVehicles')}) configClasses (configFile >> "CfgVehicles"); { - private _xmodel = toLower getText (_x >> "model"); + private _xmodel = toLowerANSI getText (_x >> "model"); if (_xmodel select [0, 1] == "\") then { _xmodel = _xmodel select [1]; }; diff --git a/addons/interaction/functions/fnc_addPassengerActions.sqf b/addons/interaction/functions/fnc_addPassengerActions.sqf index 112919ee80..a3d8c2eff0 100644 --- a/addons/interaction/functions/fnc_addPassengerActions.sqf +++ b/addons/interaction/functions/fnc_addPassengerActions.sqf @@ -33,7 +33,6 @@ private _actions = []; _x params ["_actionData", "_children"]; _actions pushBack [_actionData, _children, _unit]; - false -} count (_actionTrees select 0 select 1); +} forEach (_actionTrees select 0 select 1); _actions diff --git a/addons/interaction/functions/fnc_getDoor.sqf b/addons/interaction/functions/fnc_getDoor.sqf index 02daf57a83..5f251d2589 100644 --- a/addons/interaction/functions/fnc_getDoor.sqf +++ b/addons/interaction/functions/fnc_getDoor.sqf @@ -33,7 +33,7 @@ if (typeOf _house == "") exitWith {[objNull, ""]}; _intersections = [_house, "GEOM"] intersect [_position0, _position1]; -private _door = toLower (_intersections select 0 select 0); +private _door = toLowerANSI (_intersections select 0 select 0); if (isNil "_door") exitWith {[_house, ""]}; diff --git a/addons/interaction/functions/fnc_getDoorAnimations.sqf b/addons/interaction/functions/fnc_getDoorAnimations.sqf index 2d5c81dc2d..b91c5eac6c 100644 --- a/addons/interaction/functions/fnc_getDoorAnimations.sqf +++ b/addons/interaction/functions/fnc_getDoorAnimations.sqf @@ -26,8 +26,8 @@ private _lockedVariable = []; private _numberStrings = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]; { - private _animName = toLower _x; - private _index = _animName find toLower _door; + private _animName = toLowerANSI _x; + private _index = _animName find toLowerANSI _door; if (_index != -1 && {!(_animName select [_index + count _door, 1] in _numberStrings)}) then { if (((_animName find "disabled") != -1) || ((_animName find "locked") != -1)) then { diff --git a/addons/interaction/functions/fnc_getDown.sqf b/addons/interaction/functions/fnc_getDown.sqf index b8f6d7c50d..531cd23c54 100644 --- a/addons/interaction/functions/fnc_getDown.sqf +++ b/addons/interaction/functions/fnc_getDown.sqf @@ -22,11 +22,10 @@ params ["_unit", "_target"]; [_unit, "GestureGo"] call EFUNC(common,doGesture); -private _chance = [0.5, 0.8] select (count weapons _unit > 0); +private _chance = [0.5, 0.8] select (weapons _unit isNotEqualTo []); { - if (count weapons _x == 0 && {random 1 < _chance}) then { + if (weapons _x isEqualTo [] && {random 1 < _chance}) then { [QGVAR(getDown), [_x], [_x]] call CBA_fnc_targetEvent; }; - false -} count (_target nearEntities ["Civilian", SEND_RADIUS]); +} forEach (_target nearEntities ["Civilian", SEND_RADIUS]); diff --git a/addons/interaction/functions/fnc_getGlassDoor.sqf b/addons/interaction/functions/fnc_getGlassDoor.sqf index ffa6bfec44..2aea74f82d 100644 --- a/addons/interaction/functions/fnc_getGlassDoor.sqf +++ b/addons/interaction/functions/fnc_getGlassDoor.sqf @@ -26,7 +26,7 @@ private _glassDoor = _door splitString "_"; private _glassPos = (_house selectionPosition [(_glassDoor select 0) + "_" + (_glassDoor select 1) + "_effects", "Memory"]); // Calculate all animation names so we know what is there { - private _animName = toLower _x; + private _animName = toLowerANSI _x; if (((_animName find "door") != -1) && ((_animName find "locked") == -1) && ((_animName find "disabled") == -1) && ((_animName find "handle") == -1)) then { private _splitStr = _animName splitString "_"; _doorParts pushBack ((_splitStr select 0) + "_" + (_splitStr select 1) + "_trigger"); @@ -64,4 +64,3 @@ private _lowestDistance = 0; if ((isNil "_door") || ((_door find "glass") != -1)) exitWith {}; _door - diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index 540712ef41..11b9c67c91 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -35,12 +35,12 @@ if (_animations isEqualTo []) exitWith {}; private _lockedVariable = format ["bis_disabled_%1", _door]; private _lockedVariableAlt = _lockedVariable; // GM Buildings may have door names like door_01 but locking expects door_1 -if ((count _door == 7) && {(_door select [0, 6]) == "door_0"}) then { +if ((count _door == 7) && {(_door select [0, 6]) == "door_0"}) then { _lockedVariableAlt = format ["bis_disabled_door_%1", _door select [6, 1]]; // stip off the leading zero then check both vars }; // Check if the door can be locked aka have locked variable, otherwhise cant lock it -if ((_house animationPhase (_animations select 0) <= 0) && +if ((_house animationPhase (_animations select 0) <= 0) && {(_house getVariable [_lockedVariable, 0] == 1) || {_house getVariable [_lockedVariableAlt, 0] == 1}}) exitWith { private _lockedAnimation = format ["%1_locked_source", _door]; TRACE_3("locked",_house,_lockedAnimation,isClass (configOf _house >> "AnimationSources" >> _lockedAnimation)); @@ -63,8 +63,11 @@ GVAR(doorTargetPhase) = _house animationPhase (_animations select 0); GVAR(isOpeningDoor) = true; GVAR(usedScrollWheel) = false; +// Raise local started opening event +[QGVAR(doorOpeningStarted), [_house, _door, _animations]] call CBA_fnc_localEvent; + [{ - (_this select 0) params ["_house", "_animations", "_position", "_time", "_frame"]; + (_this select 0) params ["_house", "_animations", "_position", "_time", "_frame", "_door"]; if !(GVAR(isOpeningDoor)) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; @@ -73,8 +76,11 @@ GVAR(usedScrollWheel) = false; if !(GVAR(usedScrollWheel)) then { private _phase = parseNumber (_house animationPhase (_animations select 0) < 0.5); - {_house animate [_x, _phase]; false} count _animations; + {_house animate [_x, _phase]} forEach _animations; }; + + // Raise local stopped opening event + [QGVAR(doorOpeningStopped), [_house, _door, _animations]] call CBA_fnc_localEvent; }; // check if player moved too far away @@ -87,5 +93,5 @@ GVAR(usedScrollWheel) = false; GVAR(usedScrollWheel) = true; }; // do incremental door opening - {_house animate [_x, GVAR(doorTargetPhase)]; false} count _animations; -}, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameno + 2]] call CBA_fnc_addPerFrameHandler; + {_house animate [_x, GVAR(doorTargetPhase)]} forEach _animations; +}, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameno + 2, _door]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/interaction/functions/fnc_passMagazine.sqf b/addons/interaction/functions/fnc_passMagazine.sqf index 09513b4762..8750078502 100644 --- a/addons/interaction/functions/fnc_passMagazine.sqf +++ b/addons/interaction/functions/fnc_passMagazine.sqf @@ -7,6 +7,7 @@ * 0: Unit that passes the magazine * 1: Unit to pass the magazine to * 2: Weapon classname + * 3: Play passing animation (default: true) * * Return Value: * None @@ -16,7 +17,7 @@ * * Public: No */ -params ["_player", "_target", "_weapon"]; +params ["_player", "_target", "_weapon", ["_animate", true, [true]]]; private _compatibleMags = [_weapon] call CBA_fnc_compatibleMagazines; private _filteredMags = magazinesAmmoFull _player select { @@ -35,18 +36,12 @@ private _magToPassIndex = 0; }; } foreach _filteredMags; -//remove all magazines and add them again, except the one to be passed -//needed because of missing commands, see http://feedback.arma3.com/view.php?id=12782 +//remove the magazine from _player and add it to _target _magToPass params ["_magToPassClassName", "_magToPassAmmoCount"]; -_player removeMagazines _magToPassClassName; -{ - _x params ["_className", "_ammoCount"]; - if ((_className == _magToPassClassName) && (_forEachIndex != _magToPassIndex)) then { - _player addMagazine [_className, _ammoCount]; - }; -} foreach _filteredMags; +// Exit if failed to remove specific magazine +if !([_player, _magToPassClassName, _magToPassAmmoCount] call EFUNC(common,removeSpecificMagazine)) exitWith {}; -[_player, "PutDown"] call EFUNC(common,doGesture); +if (_animate) then {[_player, "PutDown"] call EFUNC(common,doGesture)}; _target addMagazine [_magToPassClassName, _magToPassAmmoCount]; diff --git a/addons/interaction/functions/fnc_sendAway.sqf b/addons/interaction/functions/fnc_sendAway.sqf index cef314756f..b986ea2661 100644 --- a/addons/interaction/functions/fnc_sendAway.sqf +++ b/addons/interaction/functions/fnc_sendAway.sqf @@ -22,14 +22,13 @@ params ["_unit"]; [_unit, "GestureGo"] call EFUNC(common,doGesture); -private _chance = [0.5, 0.8] select (count weapons _unit > 0); +private _chance = [0.5, 0.8] select (weapons _unit isNotEqualTo []); { - if (count weapons _x == 0 && {random 1 < _chance}) then { + if (weapons _x isEqualTo [] && {random 1 < _chance}) then { private _position = getPosASL _unit vectorAdd (eyeDirection _unit vectorMultiply SEND_DISTANCE); _position set [2, 0]; [QGVAR(sendAway), [_x, _position], [_x]] call CBA_fnc_targetEvent; }; - false -} count (_unit nearEntities ["Civilian", SEND_RADIUS]); +} forEach (_unit nearEntities ["Civilian", SEND_RADIUS]); diff --git a/addons/interaction/functions/fnc_showMouseHint.sqf b/addons/interaction/functions/fnc_showMouseHint.sqf index 73567fa522..9adc15f493 100644 --- a/addons/interaction/functions/fnc_showMouseHint.sqf +++ b/addons/interaction/functions/fnc_showMouseHint.sqf @@ -71,7 +71,7 @@ if (_textMMB == "") then { // Only create extra key if both name and text are valid if (_keyName != "" && {_keyText != ""}) then { // Localize Ctrl, Shift, or Alt keys - switch (toLower _keyName) do { + switch (toLowerANSI _keyName) do { case "ctrl"; case "control": {_keyName = format ["<%1>", toUpper localize "STR_dik_control"]}; case "shift": {_keyName = format ["<%1>", toUpper localize "STR_dik_shift"]}; diff --git a/addons/inventory/XEH_preStart.sqf b/addons/inventory/XEH_preStart.sqf index faa0e1691e..a9a634ab5a 100644 --- a/addons/inventory/XEH_preStart.sqf +++ b/addons/inventory/XEH_preStart.sqf @@ -21,10 +21,6 @@ uiNamespace setVariable [QGVAR(backpackKeyCache), compileFinal createHashMapFrom if (_picture select [0, 1] == "\") then { _picture = _picture select [1]; }; - if (count _picture > 0 && !(_picture regexMatch ".*?\.paa")) then { // handle missing file extension - if (!fileExists (_picture + ".paa")) exitWith {}; - _picture = _picture + ".paa"; - }; // Handle missing file extension, as inventory returns path with extension if (count _picture > 0 && !(_picture regexMatch ".*?\.paa")) then { @@ -33,7 +29,7 @@ uiNamespace setVariable [QGVAR(backpackKeyCache), compileFinal createHashMapFrom }; // Listboxes store pictures as lowercase - [format ["%1:%2", _displayName, toLower _picture], _x] + [format ["%1:%2", _displayName, toLowerANSI _picture], _x] })]; // Generate list of grenades diff --git a/addons/irlight/XEH_postInit.sqf b/addons/irlight/XEH_postInit.sqf index 47763b8414..d95186f07b 100644 --- a/addons/irlight/XEH_postInit.sqf +++ b/addons/irlight/XEH_postInit.sqf @@ -2,7 +2,7 @@ [] call FUNC(initItemContextMenu); -addUserActionEventHandler ["headlights", "Deactivate", FUNC(onLightToggled)]; +addUserActionEventHandler ["headlights", "Deactivate", LINKFUNC(onLightToggled)]; ["ACE3 Equipment", QGVAR(hold), LLSTRING(MomentarySwitch), { ACE_player action ["GunLightOn", ACE_player]; diff --git a/addons/irlight/stringtable.xml b/addons/irlight/stringtable.xml index ac874759a4..ab70abdebd 100644 --- a/addons/irlight/stringtable.xml +++ b/addons/irlight/stringtable.xml @@ -10,6 +10,7 @@ DBAL-A3 (rouge) DBAL-A3 (vermelho) DBAL-A3 (赤) + DBAL-A3 (красный) DBAL-A3 (green) @@ -20,6 +21,7 @@ DBAL-A3 (vert) DBAL-A3 (verde) DBAL-A3 (緑) + DBAL-A3 (зеленый) <t color='#9cf953'>Use: </t>Turn Laser ON/OFF<br>Double click to switch mode @@ -30,6 +32,7 @@ <t color='#9cf953'>Utilisation: </t>Allumer/Eteindre le laser<br>Double clic pour changer de mode <t color='#9cf953'>Uso: </t>Ligar/Desligar Laser<br>Duplo clique para mudar o modo <t color='#9cf953'>使用方法: </t>レーザーのオン/オフ切り替え<br>ダブルクリックでモード切り替え + <t color='#9cf953'>Использование: </t>Включение / выключение лазера <br>Двойной щелчок для переключения режима Dual Beam Aiming Laser @@ -40,6 +43,7 @@ Viseur laser à double faisceau Laser de Pontaria de Duplo Feixe 複合ビーム照準レーザー + Двухлучевой прицельный лазер Visible Laser @@ -50,6 +54,7 @@ Laser visible Laser Visível 可視光レーザー + Видимый лазер IR Laser @@ -60,6 +65,7 @@ Laser IR Laser IR IRレーザー + ИК-лазер IR Illuminator @@ -70,6 +76,7 @@ Illuminateur IR Iluminador IR IRイルミネーター + ИК-осветитель IR Laser and Illuminator @@ -80,6 +87,7 @@ Illuminateur et laser IR Laser e Iluminador IR IRレーザーとイルミネーター + ИК-лазер и осветитель Wide Beam @@ -90,6 +98,7 @@ Faisceau large Feixe Largo 広角ビーム + Широкий луч Medium Beam @@ -100,6 +109,7 @@ Faisceau moyen Feixe Médio 標準ビーム + Средний луч Narrow Beam @@ -110,6 +120,7 @@ Faisceau étroit Feixe Estreito 狭角ビーム + Узкий луч <t color='#9cf953'>Use: </t>Turn Light ON/OFF<br>Double click to switch mode @@ -120,6 +131,7 @@ <t color='#9cf953'>Utilisation: </t>Allumer/Eteindre la lumière<br>Double clic pour changer de mode <t color='#9cf953'>Uso: </t>Ligar/Desligar Iluminador<br>Duplo clique para mudar o modo <t color='#9cf953'>使用方法: </t>ライトのオン/オフ<br>ダブルクリックでモード切り替え + <t color='#9cf953'>Использование: </t>Включение / выключение освещения <br>Двойной щелчок для переключения режима Special Purpose IR LED Illuminator @@ -130,6 +142,7 @@ Illuminateur LED IR à usage spécial Iluminador LED IR de Uso Especial 特殊用途のIR LEDイルミネーター + ИК-светодиодный осветитель специального назначения Illuminator / Laser Momentary Switch @@ -140,6 +153,7 @@ Commutateur temporaire illuminateur/laser Interruptor Momentâneo Iluminador/Laser イルミネーター/レーザーモーメンタリースイッチ + Мгновенный переключатель осветителя/лазера diff --git a/addons/killtracker/CfgEventHandlers.hpp b/addons/killtracker/CfgEventHandlers.hpp index 9cc1b0427b..4300a157b9 100644 --- a/addons/killtracker/CfgEventHandlers.hpp +++ b/addons/killtracker/CfgEventHandlers.hpp @@ -1,3 +1,9 @@ +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/killtracker/XEH_postInit.sqf b/addons/killtracker/XEH_postInit.sqf index 9cef418ece..c5adc26692 100644 --- a/addons/killtracker/XEH_postInit.sqf +++ b/addons/killtracker/XEH_postInit.sqf @@ -136,7 +136,9 @@ GVAR(killCount) = 0; _unitName = format ["*AI* - %1", getText ((configOf _unit) >> "displayName")]; }; }; - TRACE_3("send kill event",_killer,_unitName,_killInfo); - [QGVAR(kill), [_unitName, _killInfo], _killer] call CBA_fnc_targetEvent; + if (_unitIsPlayer || GVAR(trackAI)) then { + 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/XEH_preInit.sqf b/addons/killtracker/XEH_preInit.sqf new file mode 100644 index 0000000000..7c7b764686 --- /dev/null +++ b/addons/killtracker/XEH_preInit.sqf @@ -0,0 +1,7 @@ +#include "script_component.hpp" + +ADDON = false; + +#include "initSettings.inc.sqf" + +ADDON = true; diff --git a/addons/killtracker/initSettings.inc.sqf b/addons/killtracker/initSettings.inc.sqf new file mode 100644 index 0000000000..ebe1e55ccb --- /dev/null +++ b/addons/killtracker/initSettings.inc.sqf @@ -0,0 +1,8 @@ +[ + QGVAR(trackAI), + "CHECKBOX", + [LSTRING(TrackAI_DisplayName), LSTRING(TrackAI_Description)], + LSTRING(Category), + true, + 1 +] call CBA_fnc_addSetting; diff --git a/addons/killtracker/stringtable.xml b/addons/killtracker/stringtable.xml index 4aa7308924..24c7bcdd56 100644 --- a/addons/killtracker/stringtable.xml +++ b/addons/killtracker/stringtable.xml @@ -1,9 +1,18 @@ + + ACE Kill Tracker + ACE Tracciatore di Uccisioni + ACE Kill Tracker + ACE Отслеживание убийств + ACE キルトラッカー + ACE 킬트래커 + ACE Suivi des morts + ACE Killed Events - ACE キルトラッカー + ACE キルイベント ACE Abgeschossene Ereignisse ACE Eventi di Morte ACE Licznik Zabójstw @@ -86,5 +95,23 @@ 同士討ち Dost Atışı + + Track AI units killed by player + Traccia IA uccise da giocatori + Sledovat AI zabité hráči + Отслеживание юнитов ИИ, убитых игроком + プレイヤーに殺害されたAIユニットを追跡 + 플레이어가 죽인 AI 트래킹 + Suivi de l'IA tuée par les joueurs + + + Defines if killed AIs will be shown in the kill tracker during mission debriefing. + Determina se IA uccise verranno visualizzate nel tracciatore durante il debriefing della missione. + Udává zdali se zabité AI budou ukazovat v kill trackeru v průběhu debriefingu po misi. + Определяет, будут ли убитые ИИ отображаться в трекере убийств во время дебрифинга миссии. + ミッションデブリーフィングのキルトラッカーに殺害されたAIが表示されるかどうかを定義します。 + 사후강평 중 살해된 AI가 킬트래킹에 표시되는지 여부를 정의합니다. + Définit si les IA tuées seront affichées dans le tracker pendant le débriefing de la mission. + diff --git a/addons/laser/functions/fnc_addLaserTarget.sqf b/addons/laser/functions/fnc_addLaserTarget.sqf index 08ea6f65b0..3fc02b2189 100644 --- a/addons/laser/functions/fnc_addLaserTarget.sqf +++ b/addons/laser/functions/fnc_addLaserTarget.sqf @@ -55,5 +55,5 @@ TRACE_1("",GVAR(trackedLaserTargets)); if (GVAR(pfehID) == -1) then { TRACE_1("starting pfeh",count GVAR(trackedLaserTargets)); - GVAR(pfehID) = [DFUNC(laserTargetPFH), 0, []] call CBA_fnc_addPerFrameHandler; + GVAR(pfehID) = [LINKFUNC(laserTargetPFH), 0, []] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index d1e4626d53..aa3e43d35a 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -103,7 +103,7 @@ private _finalOwner = objNull; TRACE_2("",count _spots,_spots); -if ((count _spots) > 0) then { +if (_spots isNotEqualTo []) then { private _bucketList = nil; private _bucketPos = nil; private _c = 0; diff --git a/addons/laser/stringtable.xml b/addons/laser/stringtable.xml index 7c07582725..f0977c84f7 100644 --- a/addons/laser/stringtable.xml +++ b/addons/laser/stringtable.xml @@ -128,6 +128,7 @@ 레이저 스팟 추적기: 켬 Traqueur laser : activé Rastreador a Laser: Ligado + Лазерный точечный трекер: Включен Laser Spot Tracker: Off @@ -138,6 +139,7 @@ 레이저 스팟 추적기: 끔 Traqueur laser : désactivé Rastreador a Laser: Desligado + Лазерный точечный трекер: выключен Draw Laser on Map diff --git a/addons/logistics_wirecutter/XEH_postInit.sqf b/addons/logistics_wirecutter/XEH_postInit.sqf index 29dc506396..fc0a38bf26 100644 --- a/addons/logistics_wirecutter/XEH_postInit.sqf +++ b/addons/logistics_wirecutter/XEH_postInit.sqf @@ -1,11 +1,11 @@ #include "script_component.hpp" if (hasInterface) then { - ["ace_interactMenuOpened", {_this call FUNC(interactEH)}] call CBA_fnc_addEventHandler; + ["ace_interactMenuOpened", LINKFUNC(interactEH)] call CBA_fnc_addEventHandler; }; if (isServer) then { - [QGVAR(destroyFence), {_this call FUNC(destroyFence)}] call CBA_fnc_addEventHandler; + [QGVAR(destroyFence), LINKFUNC(destroyFence)] call CBA_fnc_addEventHandler; }; GVAR(possibleWirecutters) = call (uiNamespace getVariable [QGVAR(possibleWirecutters), {[]}]); diff --git a/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf b/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf index 3698f4a22f..9a8bde077b 100644 --- a/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_destroyFence.sqf @@ -17,7 +17,7 @@ params ["_fence"]; -private _fenceModel = toLower ((getModelInfo _fence)#0); +private _fenceModel = toLowerANSI ((getModelInfo _fence)#0); // If fence cannot be replaced with destroyed model, just knock it over if !(_fenceModel in GVAR(replacements)) exitWith { diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index c94b9e6193..501b3095dc 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 3 -#define MINOR 16 -#define PATCHLVL 3 -#define BUILD 79 +#define MINOR 17 +#define PATCHLVL 0 +#define BUILD 83 diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index 902c0d97c2..b676359f74 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -6,7 +6,7 @@ ACE Logistik ACE Logistyka Logísticas ACE - ACE: логистика + ACE: Логистика ACE Logistika ACE Logística ACE Logistica diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index 49b8239e0a..ea3ce19464 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -73,8 +73,7 @@ GVAR(hasWatch) = true; GVAR(hasWatch) = false; { if (_x isKindOf ["ItemWatch", configFile >> "CfgWeapons"]) exitWith {GVAR(hasWatch) = true;}; - false - } count (assignedItems _unit); + } forEach (assignedItems _unit); }, true] call CBA_fnc_addPlayerEventHandler; @@ -93,7 +92,7 @@ GVAR(vehicleLightColor) = [1,1,1,0]; // Handle vehicles with toggleable interior lights: private _vehicleLightCondition = getText (_cfg >> QGVAR(vehicleLightCondition)); if (_vehicleLightCondition == "") then { - private _userAction = toLower getText (_cfg >> "UserActions" >> "ToggleLight" >> "statement"); + private _userAction = toLowerANSI getText (_cfg >> "UserActions" >> "ToggleLight" >> "statement"); if ( false // isClass (_cfg >> "compartmentsLights") || {_userAction find "cabinlights_hide" > 0} diff --git a/addons/map/initSettings.inc.sqf b/addons/map/initSettings.inc.sqf index fa248bf736..8de301eaa1 100644 --- a/addons/map/initSettings.inc.sqf +++ b/addons/map/initSettings.inc.sqf @@ -71,7 +71,7 @@ if (GVAR(BFT_Enabled) && {isNil QGVAR(BFT_markers)}) then { GVAR(BFT_markers) = []; - [FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler; }; }, false diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 317eee6c42..0bdd0d0ea6 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -15,6 +15,10 @@ * Public: No */ -visibleMap && -{alive ACE_player} && -{"ItemGPS" in (assignedItems ACE_player)} +if (!visibleMap || {!alive ACE_player}) exitWith {false}; + +private _gpsOpened = visibleGPS; +private _gpsAvailable = openGPS true; +if (!_gpsOpened) then {openGPS false}; + +_gpsAvailable // return diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml index fc719473b8..cca7aa98a8 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -39,11 +39,17 @@ Plotting Board 플로팅 보드 標定盤 + Tavola di calcolo + Графическая доска + Tableau de calcul The Plotting Board is a map tool designed for use in the directing of short range indirect fires. 플로팅 보드는 단거리 간접 사격을 지시하는 데 사용하도록 설계된 독도용 도구입니다. 標定盤(プロッティング・ボード)は、短距離の間接射撃の指示に使用するために設計されたマップツールです。 + La tavola di calcolo è uno strumento utilizzato per dirigere fuoco di artiglieria a corto raggio. + Графическая доска - это картографический инструмент, предназначенный для использования при ведении непрямого огня с малой дистанции. + La table de calcul est un instrument utilisé pour diriger les tirs d'artillerie à courte portée. Map Tools @@ -266,71 +272,113 @@ Allow Plotting Board Drawing channels 標定盤への書き込みを許可するチャンネル 플로팅 보드 그리기 채널 허용 + Canali ammessi su tavola di calcolo + Разрешить создание каналов на миллиметровой доске. + Canaux autorisés sur la table de calcul Channels in which plotting board drawing is enabled. どのチャンネルで標定盤の書き込みを有効化するか。 플로팅 보드 그리기가 활성화된 채널입니다. + Canali in cui si può disegnare sulla tavola di calcolo. + Каналы, в которых включено рисование на миллиметровой доске. + Canaux dans lesquels vous pouvez dessiner sur le tableau. Allow Direct Comms Only (Polylines Only) 直接チャンネルのみ許可 (線のみ) 직접교신만 허용 (선 긋기만) + Comunicazioni Dirette (solo linee) + Разрешать только прямую связь (только полилинии) + Communications directes uniquement (lignes uniquement) Allow Direct/Group Comms (Polylines and Group Markers) 直接/グループチャンネルを許可 (線とグループマーカー) 직접교신/그룹무전망 허용 (선 긋기와 그룹 마커) + Comunicazioni dirette/gruppo (linee e marker) + Разрешить прямую/групповую связь (полилинии и групповые маркеры) + Autoriser les communications directes/de groupe (polylignes et marqueurs de groupe) Plotting Board 標定盤 플로팅 보드 + Tavola di calcolo + Миллиметровая доска + Table de calcul Plotting Board Acrylic 標定盤の アクリル板 플로팅 보드 (아크릴) + Acrilico tavola di calcolo + Миллиметровая доска акрилловая + Table de calcul Acrylique Plotting Board Ruler 標定盤の 定規 플로팅 보드 (자) + Righello tavola di calcolo + Линейка для миллиметровой доски + Règle de la table de calcul To Plotting Board 標定盤に 플로팅 보드에 + Su tavola di calcolo + К миллиметровой доске. + Sur la table de calcul To Plotting Board Acrylic 標定盤の アクリル板に 플로팅 보드 (아크릴)에 + Su acrilico tavola di calcolo + К миллиметровой доске акрилловой + Sur la table de calcul Acrylique To Plotting Board Ruler 標定盤の 定規に 플로팅 보드 (자)에 + Su righello tavola di calcolo + К линейке миллиметровой доски. + Sur la règle de la table à calcul Wipe all markers off Plotting Board 標定盤の 全マーカーを 拭き消す 플로팅 보드에 있는 모든 마커 지우기 + Cancella tutti i disegni dalla tavola + Сотрите все маркеры с миллиметровой доски. + Effacer tous les dessins de la planche Show Plotting Board 標定盤を 表示 플로팅 보드 보이기 + Mostra tavola di calcolo + Показать миллиметровую доску. + Afficher la table de calcul Hide Plotting Board 標定盤を 隠す 플로팅 보드 숨기기 + Nascondi tavola di calcolo + Скрыть миллиметровую доску. + Masquer la table de calcul Toggle Plotting Board Ruler 標定盤の 定規を 表示切替 플로팅 보드 (자) 토글 + Mostra/Nascondi Righello + Переключить линейку миллиметровой доски. + Afficher/masquer la règle Align @@ -378,11 +426,17 @@ Up 上に 위로 + Su + Вверх + Monter To Maptool マップツールに 독도용 도구로 + Su strumento cartografico + К инструментам карты + Outil cartographique diff --git a/addons/markers/XEH_postInit.sqf b/addons/markers/XEH_postInit.sqf index 43a1acbf29..1ae489dd82 100644 --- a/addons/markers/XEH_postInit.sqf +++ b/addons/markers/XEH_postInit.sqf @@ -2,10 +2,10 @@ #include "script_component.hpp" // recieve remote marker data -[QGVAR(setMarkerNetwork), {_this call DFUNC(setMarkerNetwork)}] call CBA_fnc_addEventHandler; +[QGVAR(setMarkerNetwork), LINKFUNC(setMarkerNetwork)] call CBA_fnc_addEventHandler; // recieve marker data for JIP -[QGVAR(setMarkerJIP), {_this call DFUNC(setMarkerJIP)}] call CBA_fnc_addEventHandler; +[QGVAR(setMarkerJIP), LINKFUNC(setMarkerJIP)] call CBA_fnc_addEventHandler; // request marker data for JIP if (isMultiplayer && {!isServer} && {hasInterface}) then { diff --git a/addons/markers/functions/fnc_onMouseButtonDown.sqf b/addons/markers/functions/fnc_onMouseButtonDown.sqf index ce4d637400..f0130c7c9d 100644 --- a/addons/markers/functions/fnc_onMouseButtonDown.sqf +++ b/addons/markers/functions/fnc_onMouseButtonDown.sqf @@ -37,5 +37,5 @@ if (_type == "marker" && {_marker find "_USER_DEFINED" != -1 && {_marker call FU GVAR(moving) = true; _marker setMarkerAlphaLocal 0.5; - [FUNC(movePFH), 0, [_marker, _ctrlMap, _originalPos, _originalAlpha]] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(movePFH), 0, [_marker, _ctrlMap, _originalPos, _originalAlpha]] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/markers/functions/fnc_setMarkerJIP.sqf b/addons/markers/functions/fnc_setMarkerJIP.sqf index 8536b90a90..12dfe5de77 100644 --- a/addons/markers/functions/fnc_setMarkerJIP.sqf +++ b/addons/markers/functions/fnc_setMarkerJIP.sqf @@ -49,5 +49,4 @@ TRACE_2("params",_allMapMarkers,_allMapMarkersProperties); _x setMarkerDirLocal _dir; _x setMarkerSizeLocal [_scale, _scale]; }; - false -} count allMapMarkers; +} forEach allMapMarkers; diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index 285dd007e8..a0c0be17f7 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -247,6 +247,7 @@ Zona horaria Strefa czasowa Zeitzone + Fuso orario 时区 시간대 @@ -258,6 +259,7 @@ Cambie la zona horaria para la marca de tiempo Zmień strefę czasową dla znaczników czasu Ändern Sie die Zeitzone für den Zeitstempel + Modifica il fuso orario per la marca temporale 更改时间戳的时区 타임스탬프의 시간대를 변경하십시오 @@ -269,6 +271,7 @@ Hora del juego Czas gry Ingame-Zeit + Ora del gioco 游戏内时间 게임 시간 @@ -280,6 +283,7 @@ Hora del sistema Czas systemowy Systemzeit + Ora del sistema 系统时间 시스템 시간 @@ -291,6 +295,7 @@ Hora UTC Czas UTC UTC-Zeit + Tempo-UTC UTC时间 UTC 시간 @@ -302,6 +307,7 @@ Desplazamiento UTC Przesunięcie UTC UTC-Verschiebung + Deviazione-UTC UTC偏移量 UTC 오프셋 @@ -313,17 +319,19 @@ Cambiar el desplazamiento horario para la marca de tiempo UTC Zmień przesunięcie czasu dla sygnatury czasowej UTC Ändere die Zeitverschiebung für den UTC-Zeitstempel + Modifica la deviazione della marca temporale UTC. 更改UTC时间戳的时间偏移量 UTC 타임 스탬프의 시간 오프셋을 변경하십시오 UTC Minutes Offset - UTC Минутное Смещение + UTC Минутное смещение Décalage des minutes UTC UTC分オフセット Desplazamiento de minutos UTC Przesunięcie minut UTC UTC-Minutenversatz + Deviazione Minuti UTC UTC分钟偏移量 UTC 분 오프셋 @@ -335,6 +343,7 @@ Cambiar el desplazamiento de minutos para la marca de tiempo UTC Zmień przesunięcie minut dla sygnatury czasowej UTC Ändere den Minutenversatz für den UTC-Zeitstempel + Modifica la deviazione dei minuti della marca temporale UTC. 更改UTC时间戳的分钟偏移量 UTC 타임 스탬프의 분 오프셋을 변경하십시오 @@ -407,17 +416,21 @@ "MM" - Milliseconds (from 0 to 59) "MM" - Millisecondes (de 0 à 59) "MS" - Milisekunden (von 0 bis 59) + "MS" - Millisecondi (da 0 a 59) "MS" - Milissegundos (de 0 a 59) "MS" - 밀리초 (0부터 59까지) "MM" - ミリ秒 (0から59) + "ММ" - миллисекунды (от 0 до 59) "mmm" - Milliseconds (from 0 to 999) "mmm" - Millisecondes (de 0 à 999) "mmm" - Milisekunden (von 0 bis 999) + "mmm" - Millisecondi (da 0 a 999) "mmm" - Milissegundos (de 0 a 999) "mmm" - 밀리초 (0부터 999까지) "mmm" - ミリ秒 (0から599) + "ммм" - миллисекунды (от 0 до 999) Timestamp Hour Format diff --git a/addons/maverick/config.cpp b/addons/maverick/config.cpp index 6d5837f87d..d25878d004 100644 --- a/addons/maverick/config.cpp +++ b/addons/maverick/config.cpp @@ -9,10 +9,6 @@ class CfgPatches { authors[] = {"xrufix"}; url = ECSTRING(main,URL); VERSION_CONFIG; - ammo[] = { - QGVAR(L), - "ace_kh25ml" - }; magazines[] = { QGVAR(L_magazine_x1), QGVAR(L_pylonmissile_x1), diff --git a/addons/medical/functions/fnc_addDamageToUnit.sqf b/addons/medical/functions/fnc_addDamageToUnit.sqf index 3d82cbe77a..e490399c4b 100644 --- a/addons/medical/functions/fnc_addDamageToUnit.sqf +++ b/addons/medical/functions/fnc_addDamageToUnit.sqf @@ -34,7 +34,7 @@ params [ ]; TRACE_7("addDamageToUnit",_unit,_damageToAdd,_bodyPart,_typeOfDamage,_instigator,_damageSelectionArray,_overrideInvuln); -_bodyPart = toLower _bodyPart; +_bodyPart = toLowerANSI _bodyPart; private _bodyPartIndex = ALL_BODY_PARTS find _bodyPart; if (_bodyPartIndex < 0) then { _bodyPartIndex = ALL_SELECTIONS find _bodyPart; }; // 2nd attempt with selection names ("hand_l", "hand_r", "leg_l", "leg_r") if (_bodyPartIndex < 0) exitWith {ERROR_1("addDamageToUnit - bad selection %1",_this); false}; diff --git a/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf b/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf index f412a718d8..b8e77aab43 100644 --- a/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf +++ b/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf @@ -19,7 +19,7 @@ params ["_unit", "_actionName", "_isSelfTreatment"]; TRACE_3("playTreatmentAnim",_unit,_actionName,_isSelfTreatment); -if (vehicle _unit != _unit) exitWith {}; +if (!isNull objectParent _unit) exitWith {}; private _configProperty = "animationMedic"; if (_isSelfTreatment) then { diff --git a/addons/medical_ai/stringtable.xml b/addons/medical_ai/stringtable.xml index 61cebf9fb5..7f5680dc3f 100644 --- a/addons/medical_ai/stringtable.xml +++ b/addons/medical_ai/stringtable.xml @@ -57,6 +57,7 @@ Items requis Exigir Itens アイテムを要求 + Требуемые предметы AI will only perform medical treatment if they have the necessary items in their inventory. @@ -67,6 +68,7 @@ Les IA n'effectueront un traitement médical que si elles ont le matériel nécessaire dans leur inventaire. A IA só irá realizar tratamento médico se tiver os itens necessários em seu inventário. AIのインベントリに必要なアイテムがある場合にのみ治療を実行します。 + Искусственный интеллект будет оказывать медицинскую помощь только в том случае, если в его инвентаре есть необходимые предметы. Auto Convert Items for AI @@ -77,6 +79,7 @@ Conversione automatica di risorse mediche per IA Conversão automática de itens para IA AIのアイテムを自動変換 + Автоматическое преобразование элементов для ИИ diff --git a/addons/medical_blood/XEH_postInit.sqf b/addons/medical_blood/XEH_postInit.sqf index 9ef55adf0e..daf4595584 100644 --- a/addons/medical_blood/XEH_postInit.sqf +++ b/addons/medical_blood/XEH_postInit.sqf @@ -3,7 +3,7 @@ GVAR(useAceMedical) = ["ace_medical"] call EFUNC(common,isModLoaded); // To support public API regardless of component settings -[QGVAR(spurt), FUNC(spurt)] call CBA_fnc_addEventHandler; +[QGVAR(spurt), LINKFUNC(spurt)] call CBA_fnc_addEventHandler; if (isServer) then { GVAR(bloodDrops) = []; @@ -21,7 +21,7 @@ if (isServer) then { // Start the cleanup loop if (_index == 0) then { - [FUNC(cleanupLoop), [], GVAR(bloodLifetime)] call CBA_fnc_waitAndExecute; + [LINKFUNC(cleanupLoop), [], GVAR(bloodLifetime)] call CBA_fnc_waitAndExecute; }; }] call CBA_fnc_addEventHandler; }; diff --git a/addons/medical_blood/functions/fnc_handleWoundReceived.sqf b/addons/medical_blood/functions/fnc_handleWoundReceived.sqf index 8dfc9c650b..8b46233af2 100644 --- a/addons/medical_blood/functions/fnc_handleWoundReceived.sqf +++ b/addons/medical_blood/functions/fnc_handleWoundReceived.sqf @@ -28,7 +28,7 @@ if (_damageType in GVAR(noBloodDamageTypes)) exitWith {}; if (GVAR(enabledFor) == BLOOD_ONLY_PLAYERS && {!isPlayer _unit && {_unit != ACE_player}}) exitWith {}; // Don't bleed on the ground if in a vehicle -if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")}) exitWith {}; +if (!isNull objectParent _unit && {!(vehicle _unit isKindOf "StaticWeapon")}) exitWith {}; private _bulletDir = if (isNull _shooter) then { random 360 // Cannot calculate the direction properly, pick a random direction diff --git a/addons/medical_blood/functions/fnc_init.sqf b/addons/medical_blood/functions/fnc_init.sqf index 86c0c668c1..6392a6e451 100644 --- a/addons/medical_blood/functions/fnc_init.sqf +++ b/addons/medical_blood/functions/fnc_init.sqf @@ -60,6 +60,6 @@ private _listCode = if (_mode == BLOOD_ONLY_PLAYERS) then { GVAR(stateMachine) = [_listCode, true] call CBA_statemachine_fnc_create; [GVAR(stateMachine), LINKFUNC(onBleeding), {}, {}, "Bleeding"] call CBA_statemachine_fnc_addState; -GVAR(woundReceivedEH) = [QEGVAR(medical,woundReceived), FUNC(handleWoundReceived)] call CBA_fnc_addEventHandler; +GVAR(woundReceivedEH) = [QEGVAR(medical,woundReceived), LINKFUNC(handleWoundReceived)] call CBA_fnc_addEventHandler; TRACE_3("Set up state machine and wounds event",_mode,GVAR(stateMachine),GVAR(woundReceivedEH)); diff --git a/addons/medical_blood/functions/fnc_onBleeding.sqf b/addons/medical_blood/functions/fnc_onBleeding.sqf index 63ceb3bd29..02ddd93fd0 100644 --- a/addons/medical_blood/functions/fnc_onBleeding.sqf +++ b/addons/medical_blood/functions/fnc_onBleeding.sqf @@ -22,7 +22,7 @@ params ["_unit"]; if !(_unit call FUNC(isBleeding)) exitWith {}; // Don't bleed on the ground if in a vehicle -if (vehicle _unit != _unit && {!(vehicle _unit isKindOf "StaticWeapon")}) exitWith {}; +if (!isNull objectParent _unit && {!(vehicle _unit isKindOf "StaticWeapon")}) exitWith {}; if (CBA_missionTime > (_unit getVariable [QGVAR(nextTime), -10])) then { private _bloodLoss = (if (GVAR(useAceMedical)) then {GET_BLOOD_LOSS(_unit) * 2.5} else {getDammage _unit * 2}) min 6; diff --git a/addons/medical_damage/functions/fnc_interpolatePoints.sqf b/addons/medical_damage/functions/fnc_interpolatePoints.sqf index a84f079f30..b343417837 100644 --- a/addons/medical_damage/functions/fnc_interpolatePoints.sqf +++ b/addons/medical_damage/functions/fnc_interpolatePoints.sqf @@ -19,7 +19,7 @@ */ params ["_input", "_points", ["_randomRound", false]]; -if (count _points < 1) exitWith { +if (_points isEqualTo []) exitWith { //TODO: sensible default/error value 0 }; diff --git a/addons/medical_damage/functions/fnc_woundsHandlerBase.sqf b/addons/medical_damage/functions/fnc_woundsHandlerBase.sqf index 5df29c7702..fb82f383b6 100644 --- a/addons/medical_damage/functions/fnc_woundsHandlerBase.sqf +++ b/addons/medical_damage/functions/fnc_woundsHandlerBase.sqf @@ -41,7 +41,7 @@ private _bodyPartVisParams = [_unit, false, false, false, false]; // params arra // process wounds separately for each body part hit { // forEach _allDamages _x params ["_damage", "_bodyPart"]; - _bodyPart = toLower _bodyPart; + _bodyPart = toLowerANSI _bodyPart; // silently ignore structural damage if (_bodyPart == "#structural") then {continue}; diff --git a/addons/medical_damage/stringtable.xml b/addons/medical_damage/stringtable.xml index 63d10dcd35..f21cb1901f 100644 --- a/addons/medical_damage/stringtable.xml +++ b/addons/medical_damage/stringtable.xml @@ -20,7 +20,7 @@ Sets the amount of damage a player can receive before going unconscious (and dying if "Sum of Trauma" is enabled). プレイヤーが気絶するまでに受けられるダメージ量を設定します。\n("外傷の合計"が有効な場合は死亡するまでに受けられるダメージ量) Définit la quantité de dégâts qu'un joueur peut subir avant de perdre connaissance (ou mourir, si l'option "Somme des traumatismes" est sélectionnée). - Устанавливает количество урона, которое может получить игрок, прежде чем потеряет сознание. + Устанавливает количество урона, которое может получить игрок, прежде чем потеряет сознание (и умирает, если включена функция "Сумма травм"). Define a quantidade de dano que um jogador pode receber antes de ficar inconsciente. 設定玩家在無意識前能承受多少傷害。 设置玩家在昏迷前可以承受的伤害量(如果启用了“创伤总和”,则会死亡)。 @@ -51,7 +51,7 @@ Sets the amount of damage an AI unit can receive before going unconscious (or dying when "Sum of Trauma" is enabled). AIが気絶するまでに受けられるダメージ量を設定します。\n("外傷の合計"が有効な場合は死亡するまでに受けられるダメージ量) Définit la quantité de dégâts qu'une unité IA peut subir avant de perdre connaissance (ou mourir, si l'option "Somme des traumatismes" est sélectionnée). - Устанавливает количество урона, которое может получить ИИ, прежде чем потеряет сознание. + Устанавливает количество урона, которое может получить ИИ, прежде чем потеряет сознание (или умирает, когда включена функция "Сумма травм").. Define a quantidade de dano que uma IA pode receber antes de ficar inconsciente. 設定AI在無意識之前能承受多少傷害 设置 AI 在昏迷前可以承受的伤害量(如果启用了“创伤总和”,则会死亡)。 diff --git a/addons/medical_engine/XEH_postInit.sqf b/addons/medical_engine/XEH_postInit.sqf index 5557807629..2514c62254 100644 --- a/addons/medical_engine/XEH_postInit.sqf +++ b/addons/medical_engine/XEH_postInit.sqf @@ -86,12 +86,6 @@ if (!isNull objectParent _unit && {local objectParent _unit}) exitWith { [_unit] call FUNC(lockUnconsciousSeat); }; - - // Prevent second ragdoll of uncon units when they're killed - if (IS_UNCONSCIOUS(_unit) && !isAwake _unit) then { - _unit enableSimulation false; - [{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute; - }; }] call CBA_fnc_addEventHandler; ["CAManBase", "deleted", { diff --git a/addons/medical_engine/XEH_preInit.sqf b/addons/medical_engine/XEH_preInit.sqf index dab2e7efe3..b0304f167f 100644 --- a/addons/medical_engine/XEH_preInit.sqf +++ b/addons/medical_engine/XEH_preInit.sqf @@ -19,6 +19,7 @@ if (isNil QUOTE(BLOOD_LOSS_KNOCK_OUT_THRESHOLD)) then {BLOOD_LOSS_KNOCK_OUT_THRE if (isNil QUOTE(PAIN_FADE_TIME)) then {PAIN_FADE_TIME = PAIN_FADE_TIME_DEFAULT}; if (isNil QUOTE(LIMPING_DAMAGE_THRESHOLD)) then {LIMPING_DAMAGE_THRESHOLD = LIMPING_DAMAGE_THRESHOLD_DEFAULT}; if (isNil QUOTE(FRACTURE_DAMAGE_THRESHOLD)) then {FRACTURE_DAMAGE_THRESHOLD = FRACTURE_DAMAGE_THRESHOLD_DEFAULT}; +if (isNil QUOTE(CARDIAC_OUTPUT_MIN)) then {CARDIAC_OUTPUT_MIN = CARDIAC_OUTPUT_MIN_DEFAULT}; // Derive the alternate fatal damage coefficents if (isNil QUOTE(FATAL_SUM_DAMAGE_WEIBULL_K) || isNil QUOTE(FATAL_SUM_DAMAGE_WEIBULL_L)) then { private _x1 = 0.5; diff --git a/addons/medical_engine/functions/fnc_damageBodyPart.sqf b/addons/medical_engine/functions/fnc_damageBodyPart.sqf index c25d83c46c..f69bce2cae 100644 --- a/addons/medical_engine/functions/fnc_damageBodyPart.sqf +++ b/addons/medical_engine/functions/fnc_damageBodyPart.sqf @@ -28,7 +28,7 @@ TRACE_3("damageBodyPart",_unit,_selection,_damage); _damage = [0, DAMAGED_MIN_THRESHOLD] select _damage; -switch (toLower _selection) do { +switch (toLowerANSI _selection) do { case ("head"): { _unit setHitPointDamage ["HitHead", _damage]; }; diff --git a/addons/medical_engine/functions/fnc_setUnconsciousAnim.sqf b/addons/medical_engine/functions/fnc_setUnconsciousAnim.sqf index 531f5d4062..4ed63253c7 100644 --- a/addons/medical_engine/functions/fnc_setUnconsciousAnim.sqf +++ b/addons/medical_engine/functions/fnc_setUnconsciousAnim.sqf @@ -33,14 +33,14 @@ if (_isUnconscious) then { }; // set animation inside vehicles - if (vehicle _unit != _unit) then { + if (!isNull objectParent _unit) then { private _unconAnim = _unit call EFUNC(common,getDeathAnim); TRACE_2("inVehicle - playing death anim",_unit,_unconAnim); [_unit, _unconAnim] call EFUNC(common,doAnimation); }; } else { // reset animation inside vehicles - if (vehicle _unit != _unit) then { + if (!isNull objectParent _unit) then { private _awakeAnim = _unit call EFUNC(common,getAwakeAnim); TRACE_2("inVehicle - playing awake anim",_unit,_awakeAnim); [_unit, _awakeAnim, 2] call EFUNC(common,doAnimation); diff --git a/addons/medical_engine/script_macros_medical.hpp b/addons/medical_engine/script_macros_medical.hpp index 5fecd36413..167765c576 100644 --- a/addons/medical_engine/script_macros_medical.hpp +++ b/addons/medical_engine/script_macros_medical.hpp @@ -53,7 +53,8 @@ #define BLOOD_VOLUME_CLASS_2_HEMORRHAGE 5.100 // lost more than 15% blood, Class II Hemorrhage #define BLOOD_VOLUME_CLASS_3_HEMORRHAGE 4.200 // lost more than 30% blood, Class III Hemorrhage #define BLOOD_VOLUME_CLASS_4_HEMORRHAGE 3.600 // lost more than 40% blood, Class IV Hemorrhage -#define BLOOD_VOLUME_FATAL 3.0 // Lost more than 50% blood, Unrecoverable +// Lost more than 50% blood, Unrecoverable +#define BLOOD_VOLUME_FATAL 3.0 // Minimum blood volume, in liters, for a patient to have the chance to wake up #define MINIMUM_BLOOD_FOR_STABLE_VITALS EGVAR(medical,const_stableVitalsBloodThreshold) @@ -107,6 +108,10 @@ #define FRACTURE_DAMAGE_THRESHOLD EGVAR(medical,const_fractureDamageThreshold) #define FRACTURE_DAMAGE_THRESHOLD_DEFAULT 0.50 +// Minimum cardiac output +#define CARDIAC_OUTPUT_MIN EGVAR(medical,const_minCardiacOutput) +#define CARDIAC_OUTPUT_MIN_DEFAULT 0.05 + // Minimum body part damage required for blood effect on uniform #define VISUAL_BODY_DAMAGE_THRESHOLD 0.35 diff --git a/addons/medical_engine/stringtable.xml b/addons/medical_engine/stringtable.xml index 9a4179a38c..3aa0831a28 100644 --- a/addons/medical_engine/stringtable.xml +++ b/addons/medical_engine/stringtable.xml @@ -36,6 +36,7 @@ Fattore di Trapasso Armatura Efeito de Penetração de Blindagem 装甲貫通効果 + Эффект сквозного прохождения брони Controls effect of armor 'passThrough' on final damage. Makes high armor values, like ones used in GL rigs, less effective.\nUse 0% for pre 3.16.0 armor behavior.\nOnly touch this if you know what you're doing! @@ -46,6 +47,7 @@ Determina l'effetto di danni sul corpo che 'trapassano' l'armatura. Rende alti valori di protezione, come quelli su corpetti GL, meno efficaci.\nUtilizza 0% per il comportamento prima di v3.16.0.\nModifica questo valore solo se sai cosa stai facendo! Controla o efeito de penetração (passThrough) da blindagem no dano final. Torna valores de blindagem altos, como os usados em coletes GL, menos eficazes.\nUse 0% para o comportamento de blindagem anterior à versão 3.16.0.\nSó mexa nisso se souber o que está fazendo! ボディアーマーの'passThrough'値が最終的な身体ダメージに与える影響を調整します。擲弾兵リグで使用されるような高い装甲値では効果が低くなります。\n3.16.0以前の挙動にするには0%にしてください。\nこれが何かわからない場合は変更しないことをお勧めします。 + Контролирует эффект `passThrough` при нанесении конечного урона. Делает высокие значения брони, подобные тем, которые используются в GL rigs, менее эффективными.\nИспользуйте 0% для поведения брони до версии 3.16.0.n\Прикасайтесь к этому, только если знаете, что делаете! diff --git a/addons/medical_feedback/XEH_postInit.sqf b/addons/medical_feedback/XEH_postInit.sqf index 96d15dbf21..f01394e919 100644 --- a/addons/medical_feedback/XEH_postInit.sqf +++ b/addons/medical_feedback/XEH_postInit.sqf @@ -30,7 +30,7 @@ GVAR(bloodTickCounter) = 0; [false] call FUNC(initEffects); [true] call FUNC(handleEffects); -[FUNC(handleEffects), 1, false] call CBA_fnc_addPerFrameHandler; +[LINKFUNC(handleEffects), 1, false] call CBA_fnc_addPerFrameHandler; ["ace_unconscious", { params ["_unit", "_unconscious"]; @@ -104,7 +104,7 @@ GVAR(bloodTickCounter) = 0; if (ACE_player distance _unit > _distance) exitWith {}; - if (vehicle _unit == _unit) then { + if (isNull objectParent _unit) then { // say3D waits for the previous sound to finish, so use a dummy instead private _dummy = "#dynamicsound" createVehicleLocal [0, 0, 0]; _dummy attachTo [_unit, [0, 0, 0], "camera"]; diff --git a/addons/medical_gui/XEH_postInit.sqf b/addons/medical_gui/XEH_postInit.sqf index f2777f6fd4..5ff49d2167 100644 --- a/addons/medical_gui/XEH_postInit.sqf +++ b/addons/medical_gui/XEH_postInit.sqf @@ -102,7 +102,7 @@ GVAR(selfInteractionActions) = []; params ["_unit", "_allDamages", ""]; if !(GVAR(peekMedicalOnHit) && {_unit == ACE_player}) exitWith {}; - private _bodypart = toLower (_allDamages select 0 select 1); + private _bodypart = toLowerANSI (_allDamages select 0 select 1); private _bodypartIndex = ALL_BODY_PARTS find _bodypart; [ACE_player, _bodypartIndex] call FUNC(displayPatientInformation); diff --git a/addons/medical_gui/functions/fnc_addTreatmentActions.sqf b/addons/medical_gui/functions/fnc_addTreatmentActions.sqf index 3df89894d2..b27801766b 100644 --- a/addons/medical_gui/functions/fnc_addTreatmentActions.sqf +++ b/addons/medical_gui/functions/fnc_addTreatmentActions.sqf @@ -36,14 +36,14 @@ private _fnc_condition = { private _displayName = getText (_x >> "displayName"); private _icon = getText (_x >> "icon"); - private _allowedBodyParts = getArray (_x >> "allowedSelections") apply {toLower _x}; + private _allowedBodyParts = getArray (_x >> "allowedSelections") apply {toLowerANSI _x}; if (_allowedBodyParts isEqualTo ["all"]) then { - _allowedBodyParts = ALL_BODY_PARTS apply {toLower _x}; + _allowedBodyParts = ALL_BODY_PARTS apply {toLowerANSI _x}; }; { private _bodyPart = _x; - private _actionPath = _actionPaths select (ALL_BODY_PARTS find toLower _bodyPart); + private _actionPath = _actionPaths select (ALL_BODY_PARTS find toLowerANSI _bodyPart); private _action = [ _actionName, diff --git a/addons/medical_gui/functions/fnc_countTreatmentItems.sqf b/addons/medical_gui/functions/fnc_countTreatmentItems.sqf index 6e8394c82f..ac7c4857e6 100644 --- a/addons/medical_gui/functions/fnc_countTreatmentItems.sqf +++ b/addons/medical_gui/functions/fnc_countTreatmentItems.sqf @@ -42,12 +42,27 @@ private _vehicle = [_patientVehicle, _medicVehicle] select (!isNull _medicVehicl if (!isNull _vehicle) then { _vehicleCount = 0; - (getItemCargo _vehicle) params ["_itemTypes", "_itemCounts"]; + private _magazineItems = []; + private _itemItems = []; { - private _item = _x; - private _index = _itemTypes find _item; - _vehicleCount = _vehicleCount + (_itemCounts param [_index, 0]); + if (isClass (configFile >> "CfgMagazines" >> _x)) then { + _magazineItems pushBack _x; + } else { + _itemItems pushBack _x; + }; } forEach _items; + if (_magazineItems isNotEqualTo []) then { + (getMagazineCargo _vehicle) params ["_itemTypes", "_itemCounts"]; + { + _vehicleCount = _vehicleCount + (_itemCounts param [_itemTypes find _x, 0]); + } forEach _magazineItems; + }; + if (_itemItems isNotEqualTo []) then { + (getItemCargo _vehicle) params ["_itemTypes", "_itemCounts"]; + { + _vehicleCount = _vehicleCount + (_itemCounts param [_itemTypes find _x, 0]); + } forEach _itemItems; + }; }; [_medicCount, _patientCount, _vehicleCount] diff --git a/addons/medical_gui/functions/fnc_onMenuOpen.sqf b/addons/medical_gui/functions/fnc_onMenuOpen.sqf index e77d92bddd..12b27b60d9 100644 --- a/addons/medical_gui/functions/fnc_onMenuOpen.sqf +++ b/addons/medical_gui/functions/fnc_onMenuOpen.sqf @@ -41,7 +41,7 @@ if (GVAR(menuPFH) != -1) exitWith { TRACE_1("Menu PFH already running",GVAR(menuPFH)); }; -GVAR(menuPFH) = [FUNC(menuPFH), 0, []] call CBA_fnc_addPerFrameHandler; +GVAR(menuPFH) = [LINKFUNC(menuPFH), 0, []] call CBA_fnc_addPerFrameHandler; // Hide categories if they don't have any actions (airway) private _list = [ diff --git a/addons/medical_gui/functions/fnc_updateBodyImage.sqf b/addons/medical_gui/functions/fnc_updateBodyImage.sqf index 4d22b68a2d..b8ee8ee240 100644 --- a/addons/medical_gui/functions/fnc_updateBodyImage.sqf +++ b/addons/medical_gui/functions/fnc_updateBodyImage.sqf @@ -105,3 +105,5 @@ private _bodyPartBloodLoss = [0, 0, 0, 0, 0, 0]; [IDC_BODY_LEGLEFT, IDC_BODY_LEGLEFT_S, IDC_BODY_LEGLEFT_T, IDC_BODY_LEGLEFT_B], [IDC_BODY_LEGRIGHT, IDC_BODY_LEGRIGHT_S, IDC_BODY_LEGRIGHT_T, IDC_BODY_LEGRIGHT_B] ]; + +[QGVAR(updateBodyImage), [_ctrlGroup, _target, _selectionN]] call CBA_fnc_localEvent; diff --git a/addons/medical_gui/functions/fnc_updateCategories.sqf b/addons/medical_gui/functions/fnc_updateCategories.sqf index c9917a8758..c2f1d2a11c 100644 --- a/addons/medical_gui/functions/fnc_updateCategories.sqf +++ b/addons/medical_gui/functions/fnc_updateCategories.sqf @@ -21,8 +21,9 @@ params ["_display"]; _x params ["_idc", "_category"]; private _ctrl = _display displayCtrl _idc; - private _enable = GVAR(actions) findIf {_category == _x select 1 && {call (_x select 2)}} > -1; - if (_category isEqualTo "triage") then {_enable = true}; + private _enable = if (_category == "triage") then { true } else { + GVAR(actions) findIf {_category == _x select 1 && {call (_x select 2)}} > -1 + }; _ctrl ctrlEnable _enable; private _selectedColor = [ diff --git a/addons/medical_gui/functions/fnc_updateInjuryList.sqf b/addons/medical_gui/functions/fnc_updateInjuryList.sqf index 328e80242a..3219eb025f 100644 --- a/addons/medical_gui/functions/fnc_updateInjuryList.sqf +++ b/addons/medical_gui/functions/fnc_updateInjuryList.sqf @@ -24,24 +24,31 @@ private _nonissueColor = [1, 1, 1, 0.33]; // Indicate if unit is bleeding at all if (IS_BLEEDING(_target)) then { - // Give a qualitative description of the rate of bleeding - private _cardiacOutput = [_target] call EFUNC(medical_status,getCardiacOutput); - private _bleedRate = GET_BLOOD_LOSS(_target); - private _bleedRateKO = BLOOD_LOSS_KNOCK_OUT_THRESHOLD * (_cardiacOutput max 0.05); - // Use nonzero minimum cardiac output to prevent all bleeding showing as massive during cardiac arrest - - switch (true) do { - case (_bleedRate < _bleedRateKO * BLEED_RATE_SLOW): { - _entries pushBack [localize LSTRING(Bleed_Rate1), [1, 1, 0, 1]]; + switch (GVAR(showBleeding)) do { + case 1: { + // Just show whether the unit is bleeding at all + _entries pushBack [localize LSTRING(Status_Bleeding), [1, 0, 0, 1]]; }; - case (_bleedRate < _bleedRateKO * BLEED_RATE_MODERATE): { - _entries pushBack [localize LSTRING(Bleed_Rate2), [1, 0.67, 0, 1]]; - }; - case (_bleedRate < _bleedRateKO * BLEED_RATE_SEVERE): { - _entries pushBack [localize LSTRING(Bleed_Rate3), [1, 0.33, 0, 1]]; - }; - default { - _entries pushBack [localize LSTRING(Bleed_Rate4), [1, 0, 0, 1]]; + case 2: { + // Give a qualitative description of the rate of bleeding + private _cardiacOutput = [_target] call EFUNC(medical_status,getCardiacOutput); + private _bleedRate = GET_BLOOD_LOSS(_target); + private _bleedRateKO = BLOOD_LOSS_KNOCK_OUT_THRESHOLD * (_cardiacOutput max 0.05); + // Use nonzero minimum cardiac output to prevent all bleeding showing as massive during cardiac arrest + switch (true) do { + case (_bleedRate < _bleedRateKO * BLEED_RATE_SLOW): { + _entries pushBack [localize LSTRING(Bleed_Rate1), [1, 1, 0, 1]]; + }; + case (_bleedRate < _bleedRateKO * BLEED_RATE_MODERATE): { + _entries pushBack [localize LSTRING(Bleed_Rate2), [1, 0.67, 0, 1]]; + }; + case (_bleedRate < _bleedRateKO * BLEED_RATE_SEVERE): { + _entries pushBack [localize LSTRING(Bleed_Rate3), [1, 0.33, 0, 1]]; + }; + default { + _entries pushBack [localize LSTRING(Bleed_Rate4), [1, 0, 0, 1]]; + }; + }; }; }; } else { @@ -70,13 +77,35 @@ if (GVAR(showBloodlossEntry)) then { }; // Show receiving IV volume remaining private _totalIvVolume = 0; +private _saline = 0; +private _blood = 0; +private _plasma = 0; { - _x params ["_volumeRemaining"]; + _x params ["_volumeRemaining", "_type"]; + switch (_type) do { + case "Saline": { + _saline = _saline + _volumeRemaining; + }; + case "Blood": { + _blood = _blood + _volumeRemaining; + }; + case "Plasma": { + _plasma = _plasma + _volumeRemaining; + }; + }; _totalIvVolume = _totalIvVolume + _volumeRemaining; } forEach (_target getVariable [QEGVAR(medical,ivBags), []]); -if (_totalIvVolume >= 1) then { - _entries pushBack [format [localize ELSTRING(medical_treatment,receivingIvVolume), floor _totalIvVolume], [1, 1, 1, 1]]; +if (_totalIvVolume > 0) then { + if (_saline > 0) then { + _entries pushBack [format [localize ELSTRING(medical_treatment,receivingSalineIvVolume), floor _saline], [1, 1, 1, 1]]; + }; + if (_blood > 0) then { + _entries pushBack [format [localize ELSTRING(medical_treatment,receivingBloodIvVolume), floor _blood], [1, 1, 1, 1]]; + }; + if (_plasma > 0) then { + _entries pushBack [format [localize ELSTRING(medical_treatment,receivingPlasmaIvVolume), floor _plasma], [1, 1, 1, 1]]; + }; } else { _entries pushBack [localize ELSTRING(medical_treatment,Status_NoIv), _nonissueColor]; }; @@ -116,6 +145,8 @@ if (_selectionN == -1) exitWith { _ctrl lbSetCurSel -1; }; +[QGVAR(updateInjuryListGeneral), [_ctrl, _target, _selectionN, _entries]] call CBA_fnc_localEvent; + _entries pushBack ["", [1, 1, 1, 1]]; // Add selected body part name @@ -184,6 +215,8 @@ switch (GET_FRACTURES(_target) select _selectionN) do { }; }; +[QGVAR(updateInjuryListPart), [_ctrl, _target, _selectionN, _entries, _bodyPartName]] call CBA_fnc_localEvent; + // Add entries for open, bandaged, and stitched wounds private _woundEntries = []; @@ -216,6 +249,8 @@ private _fnc_processWounds = { [GET_BANDAGED_WOUNDS(_target), "[B] %1", [0.88, 0.7, 0.65, 1]] call _fnc_processWounds; [GET_STITCHED_WOUNDS(_target), "[S] %1", [0.7, 0.7, 0.7, 1]] call _fnc_processWounds; +[QGVAR(updateInjuryListWounds), [_ctrl, _target, _selectionN, _woundEntries, _bodyPartName]] call CBA_fnc_localEvent; + // Handle no wound entries if (_woundEntries isEqualTo []) then { _entries pushBack [localize ELSTRING(medical_treatment,NoInjuriesBodypart), _nonissueColor]; diff --git a/addons/medical_gui/functions/fnc_updateLogList.sqf b/addons/medical_gui/functions/fnc_updateLogList.sqf index d2bb75b63f..51240705f9 100644 --- a/addons/medical_gui/functions/fnc_updateLogList.sqf +++ b/addons/medical_gui/functions/fnc_updateLogList.sqf @@ -23,6 +23,8 @@ lbClear _ctrl; { _x params ["_message", "_timeStamp", "_arguments"]; + private _unlocalizedMessage = _message; + // Localize message and arguments if (isLocalized _message) then { _message = localize _message; @@ -33,5 +35,7 @@ lbClear _ctrl; // Format message with arguments _message = format ([_message] + _arguments); - _ctrl lbAdd format ["%1 %2", _timeStamp, _message]; + private _row = _ctrl lbAdd format ["%1 %2", _timeStamp, _message]; + + [QGVAR(logListAppended), [_ctrl, _row, _message, _unlocalizedMessage, _timeStamp, _arguments]] call CBA_fnc_localEvent; } forEach _logs; diff --git a/addons/medical_gui/initSettings.inc.sqf b/addons/medical_gui/initSettings.inc.sqf index a0418ca74e..dfcbe48925 100644 --- a/addons/medical_gui/initSettings.inc.sqf +++ b/addons/medical_gui/initSettings.inc.sqf @@ -127,6 +127,15 @@ private _categoryColors = [ELSTRING(medical,Interface_Category), format ["| %1 | true // isGlobal ] call CBA_fnc_addSetting; +[ + QGVAR(showBleeding), + "LIST", + [LSTRING(showBleeding_DisplayName), LSTRING(showBleeding_Description)], + [ELSTRING(medical,Interface_Category), LSTRING(SubCategory)], + [[0, 1, 2], [ELSTRING(common,Disabled), ELSTRING(common,Enabled), LSTRING(ShowBleeding_Rate)], 2], + true // isGlobal +] call CBA_fnc_addSetting; + [ QGVAR(bodyPartOutlineColor), "COLOR", diff --git a/addons/medical_gui/stringtable.xml b/addons/medical_gui/stringtable.xml index 438b160bb2..6d7e819b29 100644 --- a/addons/medical_gui/stringtable.xml +++ b/addons/medical_gui/stringtable.xml @@ -217,7 +217,7 @@ Mostra livello di Triage nel Menù d'Interazione インタラクションにトリアージ レベルを表示 Mostrar nivel de triado en menú de interacción - Показывать группу триажа в меню взаимодействий + Показать уровень триажа в меню взаимодействия Pokaż poziom Triażu w menu interakcji Zeige Triage-Einstufung im Interaktionsmenü 在交互式菜单中显示分诊级别 @@ -292,6 +292,7 @@ Sbircia Info Mediche Medizinische Info anzeigen 医療情報一時表示 + Просмотр медицинской информации Medical Peek Duration @@ -301,6 +302,7 @@ Durata di sbirciamento di info mediche Dauer zum Anzeigen der medizinischen Info 医療情報一時表示の表示時間 + Продолжительность медицинского осмотра How long the medical info peek remains open after releasing the key. @@ -310,6 +312,7 @@ Wie lange die medizinische Info-Anzeige nach dem Loslassen der Taste geöffnet bleibt. Durata di visualizzazione delle Info Mediche dopo aver rilasciato il tasto. 医療情報一時表示キーを放してからどれだけ長く情報表示するか。 + Как долго окно просмотра медицинской информации остается открытым после отпускания клавиши. Load Patient @@ -562,6 +565,7 @@ Wechseln zu selbst Passa a te stesso 自分に切り替え + Переключиться на себя Switch to target @@ -571,6 +575,7 @@ Wechseln zu Ziel Passa al paziente 相手に切り替え + Переключиться на цель Head @@ -996,6 +1001,7 @@ Keine Blutung Nessuna emorragia 出血はしていない + Кровотечения нет Slow bleeding @@ -1005,6 +1011,7 @@ Langsame Blutung Debole emorragia 出血は穏やか + Медленное кровотечение Moderate bleeding @@ -1014,6 +1021,7 @@ Mäßige Blutung Emorraggia moderata 出血はそこそこ速い + Умеренное кровотечение Severe bleeding @@ -1023,6 +1031,7 @@ Schwere Blutung Forte emorragia 出血は激しい + Сильное кровотечение Massive bleeding @@ -1032,6 +1041,7 @@ Massive Blutung Gravissima emorragia 出血は酷く多い + Огромное кровотечение in Pain @@ -1105,6 +1115,7 @@ Kein Blutverlust Nessuna perdita di sangue 失血なし + Потери крови нет @@ -1346,6 +1357,36 @@ Mostrar la pérdida de sangre cualitativa en la lista de heridas. Afficher la quantité de sang perdue + + Show Bleeding State + Mostrar estado de sangrado + Blutungsstatus anzeigen + Mostra stato di sanguinamento + Mostrar estado de sangramento + 出血状態の表示 + 출혈 상태 표시 + Afficher l'état des saignements + + + Display if the patient is bleeding, optionally with rate + Mostrar si el paciente está sangrando, opcionalmente con tasa + Zeigt an, dass der Patient blutet, optional mit Rate + Mostra se il paziente sta sanguinando, opzionalmente con rateo + Mostrar se o paciente está sangrando, opcionalmente com taxa + 患者が出血しているかどうかを表示します。オプションで出血速度も表示します + 환자가 출혈 중인지 여부를 표시합니다(선택적으로 출혈 속도 포함) + Indique si le patient saigne, éventuellement avec le taux de saignement + + + Show Bleeding Rate + Mostrar tasa de sangrado + Blutungsrate anzeigen + Mostra rateo di sanguinamento + Mostrar taxa de sangramento + 出血速度の表示 + 출혈 속도 표시 + Afficher le taux de saignement + Peek Medical Info on Hit Podgląd Informacji Medycznych po Zranieniu @@ -1355,6 +1396,7 @@ Mostra info mediche se colpito Zeige medizinische Info beim Treffer an 被弾時の医療情報一時表示 + Показать медицинскую информацию о попадании Temporarily show medical info when injured. @@ -1365,6 +1407,7 @@ Mostra temporaneamente le info mediche quando si viene feriti. Bei Verletzungen vorübergehend medizinische Info anzeigen. 被弾時に医療情報を一時的に表示します。 + Временно показывать медицинскую информацию при травме. Medical Peek Duration on Hit @@ -1375,6 +1418,7 @@ Durata di info mediche quando colpito Dauer der Anzeige bei einem Treffer. 被弾時の医療情報一時表示の表示時間 + Продолжительность медицинского осмотра при попадании How long the medical info peek remains open after being injured. @@ -1385,6 +1429,7 @@ Quanto tempo verranno visualizzate le info mediche quando si viene feriti. Wie lange die medizinische Info nach einer Verletzung angezeigt wird. 被弾時の医療情報の一時表示をどれだけ長く表示するか。 + Как долго окно просмотра медицинской информации остается открытым после получения травмы. Show Trauma Sustained @@ -1396,6 +1441,7 @@ 외상 지속 표시 显示遭受的创伤 Afficher les traumatismes subis + Показать полученную травму Show trauma sustained in the injury list. @@ -1407,6 +1453,7 @@ 부상 목록에 발생한 외상을 표시합니다. 在伤情表上显示创伤 Afficher les traumatismes subis dans la liste des blessures. + Показать полученную травму в списке травм. Body Part Outline Color @@ -1417,6 +1464,7 @@ Colore del contorno di parti del corpo Umrissfarbe des Körperteils 身体部位の輪郭表示の色 + Цвет контура части тела Color of outline around selected body part. @@ -1427,6 +1475,7 @@ Colore del contorno della parte del corpo selezionata. Farbe des Umrisses um das ausgewählten Körperteil. 選択した身体部位の輪郭表示の色。 + Цвет контура вокруг выбранной части тела. Minor Trauma @@ -1438,6 +1487,7 @@ 약한 외상 轻微创伤 Traumatisme mineur + Незначительная травма Major Trauma @@ -1449,6 +1499,7 @@ 중간 외상 中度创伤 Traumatisme majeur + Серьезная травма Severe Trauma @@ -1460,6 +1511,7 @@ 강한 외상 重度创伤 Traumatisme grave + Тяжелая травма Chronic Trauma @@ -1471,6 +1523,7 @@ 심각한 외상 慢性创伤 Traumatisme chronique + Хроническая травма L @@ -1481,6 +1534,7 @@ Sx L + Лево R @@ -1491,6 +1545,7 @@ Dx R + Право in your inventory @@ -1501,6 +1556,7 @@ Nel proprio inventario im Inventar 個あなたが保有 + в вашем инвентаре in patient's inventory @@ -1511,6 +1567,7 @@ Nell'inventario del paziente im Inventar des Patienten 個患者が保有 + в инвентаре пациента in vehicle's inventory @@ -1521,6 +1578,7 @@ im Inventar des Fahrzeuges Nell'inventario del veicolo 個車両内に保有 + в инвентаре транспорта No effect until tourniquet removed @@ -1530,6 +1588,7 @@ Keine Wirkung, bis das Tourniquet entfernt wurde Nessun effetto fino alla rimozione del laccio emostatico 止血帯を外すまで効果を発揮しません + Никакого эффекта до тех пор, пока жгут не будет снят Show Tourniquet Warning @@ -1539,6 +1598,7 @@ Tourniquet-Warnung anzeigen Mostra avviso di laccio emostatico 止血帯の警告を表示 + Показать предупреждение о наложении жгута Show a warning tooltip when a tourniquet will interfere with a medical action. @@ -1548,6 +1608,7 @@ Zeigt einen Hinweis an, wenn ein Tourniquet eine medizinische Maßnahme beeinträchtigt. Mostra un avviso se un laccio emostatico impedisce un trattamento medico. 止血帯が医療行為を妨げる場合には、警告ツールチップを表示します。 + Показать всплывающую подсказку с предупреждением, когда жгут помешает медицинскому вмешательству. diff --git a/addons/medical_statemachine/CfgEventHandlers.hpp b/addons/medical_statemachine/CfgEventHandlers.hpp index 98c29f77dc..b9150d8564 100644 --- a/addons/medical_statemachine/CfgEventHandlers.hpp +++ b/addons/medical_statemachine/CfgEventHandlers.hpp @@ -10,6 +10,12 @@ class Extended_PreInit_EventHandlers { }; }; +class Extended_PostInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); + }; +}; + class Extended_Respawn_EventHandlers { class CAManBase { class ADDON { diff --git a/addons/medical_statemachine/XEH_postInit.sqf b/addons/medical_statemachine/XEH_postInit.sqf new file mode 100644 index 0000000000..a7c7740a39 --- /dev/null +++ b/addons/medical_statemachine/XEH_postInit.sqf @@ -0,0 +1,14 @@ +#include "script_component.hpp" + +["ace_killed", { // global event + params ["_unit"]; + + // Prevent second ragdoll of uncon units when they're killed + if ( + IS_UNCONSCIOUS(_unit) && !isAwake _unit // uncon and not ragdolling + && {isPlayer _unit || {_unit getVariable [QGVAR(AIUnconsciousness), GVAR(AIUnconsciousness)]}} + ) then { + _unit enableSimulation false; + [{_this enableSimulation true}, _unit, 2] call CBA_fnc_waitAndExecute; + }; +}] call CBA_fnc_addEventHandler; diff --git a/addons/medical_status/functions/fnc_getBloodLoss.sqf b/addons/medical_status/functions/fnc_getBloodLoss.sqf index 8ff0fbff3b..c2a6604679 100644 --- a/addons/medical_status/functions/fnc_getBloodLoss.sqf +++ b/addons/medical_status/functions/fnc_getBloodLoss.sqf @@ -23,4 +23,10 @@ if (_woundBleeding == 0) exitWith {0}; private _cardiacOutput = [_unit] call FUNC(getCardiacOutput); // even if heart stops blood will still flow slowly (gravity) -(_woundBleeding * (_cardiacOutput max 0.05) * EGVAR(medical,bleedingCoefficient)) +private _bloodLoss = (_woundBleeding * (_cardiacOutput max CARDIAC_OUTPUT_MIN) * EGVAR(medical,bleedingCoefficient)); + +private _eventArgs = [_unit, _bloodLoss]; // Pass by reference + +[QGVAR(getBloodLoss), _eventArgs] call CBA_fnc_localEvent; + +_eventArgs select 1 // return diff --git a/addons/medical_status/functions/fnc_setDead.sqf b/addons/medical_status/functions/fnc_setDead.sqf index 9dfc07d114..cb1e1f1d6f 100644 --- a/addons/medical_status/functions/fnc_setDead.sqf +++ b/addons/medical_status/functions/fnc_setDead.sqf @@ -17,10 +17,14 @@ params ["_unit", ["_reason", "#setDead"], ["_instigator", objNull]]; TRACE_3("setDead",_unit,_reason,_instigator); + // No heart rate or blood pressure to measure when dead _unit setVariable [VAR_HEART_RATE, 0, true]; _unit setVariable [VAR_BLOOD_PRESS, [0, 0], true]; +// Clear uncon variable just to be safe +_unit setVariable [VAR_UNCON, nil, true]; + _unit setVariable [QEGVAR(medical,causeOfDeath), _reason, true]; // Send a local event before death diff --git a/addons/medical_status/stringtable.xml b/addons/medical_status/stringtable.xml index f3f3d605d5..f6f51b5533 100644 --- a/addons/medical_status/stringtable.xml +++ b/addons/medical_status/stringtable.xml @@ -105,7 +105,7 @@ Controls how quickly fluid flows out of IV Bags. The IV Bag volume change is calculated as:\ntime interval (s) * iv change per second (4.1667 mL/s) * flow rate (this coefficient). Wie schnell der Effekt der Transfusion eintritt IV 輸液パックから輸液が流出する速度を制御します。 IV 輸液バッグの容量変化は次のように計算されます:\n時間間隔(秒) x 点滴速度毎秒(4.1667 mL/秒) x 流量(この係数) - Определяет, насколько быстро подействуют эффекты внутривенного переливания + Определяет, насколько быстро подействуют эффекты внутривенного переливания как:\nвременной интервал (s) * изменение внутривенного вливания в секунду (4,1667 мл/с) * скорость потока (этот коэффициент). Définit la vitesse à laquelle le liquide s'écoule des poches de perfusion.\nLa variation du volume de poche IV est calculée selon la formule suivante :\n intervalle de temps (s) * variation IV par seconde (4,1667 ml/s) * débit (ce coefficient). Controla o quão rápido fluidos são extraídos de bolsas de IV. A mudança no volume da bolsa d IV é calculado assim:\nIntervalo de tempo (s) * mudança de iv por segundo (4.1667 mL/s) * Velocidade de transferência (esse valor) 控制從點滴輸入人體的液體流量多快。點滴的體積更改是以\n時間間隔(單位秒)乘上點滴每秒速度(4.1667毫升/秒)乘上流量(該係數)。 @@ -125,6 +125,7 @@ 무기 떨어뜨릴 확률 Risque de perte d'arme 武器を落とす確率 + Шанс выпадения оружия Chance for a player to drop their weapon when going unconscious.\nHas no effect on AI. @@ -134,6 +135,7 @@ 플레이어가 기절할 때 무기를 떨어뜨릴 확률입니다.\nAI는 영향을 받지 않습니다. Pourcentage de chances pour un joueur de lâcher son arme lorsqu'il perd connaissance.\nAucun effet sur les IA. プレーヤーが意識を失ったときに武器を落とす可能性。\nAI には影響しません。 + Шанс для игрока выронить свое оружие, когда он теряет сознание.\nНе влияет на ИИ diff --git a/addons/medical_treatment/ACE_Medical_Treatment.hpp b/addons/medical_treatment/ACE_Medical_Treatment.hpp index d1ea741cb3..267a45dd44 100644 --- a/addons/medical_treatment/ACE_Medical_Treatment.hpp +++ b/addons/medical_treatment/ACE_Medical_Treatment.hpp @@ -565,8 +565,11 @@ class ADDON { timeInSystem = 120; // How long until the maximum effect is reached timeTillMaxEffect = 30; - // How many of this type of medication can be in the system before the patient overdoses? + // How many of this type of medication can be in the system before the patient can possibly overdose? maxDose = 4; + // The number of doses over maxDose where there is a chance to overdose. + // Example with maxDose = 4 and maxDoseDeviation = 2: Dose 4: Safe | Dose 5 and 6: Possible overdose | Dose 7: Guaranteed overdose + maxDoseDeviation = 2; // Function to execute upon overdose. Arguments passed to call back are 0: unit , 1: medicationClassName onOverDose = ""; // The viscosity of a fluid is a measure of its resistance to gradual deformation by shear stress or tensile stress. For liquids, it corresponds to the informal concept of "thickness". This value will increase/decrease the viscoty of the blood with the percentage given. Where 100 = max. Using the minus will decrease viscosity @@ -591,7 +594,7 @@ class ADDON { hrIncreaseHigh[] = {10, 40}; timeInSystem = 120; timeTillMaxEffect = 10; - maxDose = 10; + maxDose = 9; incompatibleMedication[] = {}; }; class Adenosine { @@ -601,7 +604,7 @@ class ADDON { hrIncreaseHigh[] = {-15, -35}; timeInSystem = 120; timeTillMaxEffect = 15; - maxDose = 6; + maxDose = 5; incompatibleMedication[] = {}; }; class PainKillers { @@ -611,7 +614,7 @@ class ADDON { hrIncreaseHigh[] = {-5, -17}; timeInSystem = 420; timeTillMaxEffect = 60; - maxDose = 6; + maxDose = 5; incompatibleMedication[] = {}; viscosityChange = 5; }; diff --git a/addons/medical_treatment/CfgMagazines.hpp b/addons/medical_treatment/CfgMagazines.hpp new file mode 100644 index 0000000000..c4daafab76 --- /dev/null +++ b/addons/medical_treatment/CfgMagazines.hpp @@ -0,0 +1,16 @@ +class CfgMagazines { + class CA_Magazine; + class ACE_painkillers: CA_Magazine { + scope = 2; + author = ECSTRING(common,ACETeam); + displayName = CSTRING(painkillers_Display); + model = "\A3\Structures_F_EPA\Items\Medical\PainKillers_F.p3d"; + picture = QPATHTOF(ui\painkillers_ca.paa); + descriptionShort = CSTRING(painkillers_Desc_Short); + descriptionUse = CSTRING(painkillers_Desc_Use); + ACE_isMedicalItem = 1; + ACE_asItem = 1; + count = 10; + mass = 1; + }; +}; diff --git a/addons/medical_treatment/CfgVehicles.hpp b/addons/medical_treatment/CfgVehicles.hpp index bcecdb155e..4f922eb199 100644 --- a/addons/medical_treatment/CfgVehicles.hpp +++ b/addons/medical_treatment/CfgVehicles.hpp @@ -290,8 +290,8 @@ class CfgVehicles { displayName = CSTRING(painkillers_Display); author = "Alganthe"; vehicleClass = "Items"; - class TransportItems { - MACRO_ADDITEM(ACE_painkillers,1); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_painkillers,1); }; }; @@ -313,9 +313,11 @@ class CfgVehicles { model = QPATHTOF(data\ace_medcrate.p3d); editorPreview = QPATHTOF(data\ACE_medicalSupplyCrate.jpg); author = ECSTRING(common,ACETeam); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_painkillers,25); + }; class TransportItems { MACRO_ADDITEM(ACE_fieldDressing,50); - MACRO_ADDITEM(ACE_painkillers,25); MACRO_ADDITEM(ACE_morphine,25); MACRO_ADDITEM(ACE_epinephrine,25); MACRO_ADDITEM(ACE_bloodIV,15); @@ -357,13 +359,15 @@ class CfgVehicles { }; class ACE_medicalSupplyCrate_advanced: ACE_medicalSupplyCrate { displayName = CSTRING(medicalSupplyCrate_advanced); + class TransportMagazines { + MACRO_ADDMAGAZINE(ACE_painkillers,15); + }; class TransportItems { MACRO_ADDITEM(ACE_fieldDressing,25); MACRO_ADDITEM(ACE_packingBandage,25); MACRO_ADDITEM(ACE_elasticBandage,25); MACRO_ADDITEM(ACE_tourniquet,15); MACRO_ADDITEM(ACE_splint,15); - MACRO_ADDITEM(ACE_painkillers,15); MACRO_ADDITEM(ACE_morphine,15); MACRO_ADDITEM(ACE_adenosine,15); MACRO_ADDITEM(ACE_epinephrine,15); diff --git a/addons/medical_treatment/CfgWeapons.hpp b/addons/medical_treatment/CfgWeapons.hpp index 31b98bd843..7b31e10bee 100644 --- a/addons/medical_treatment/CfgWeapons.hpp +++ b/addons/medical_treatment/CfgWeapons.hpp @@ -310,17 +310,4 @@ class CfgWeapons { hiddenSelectionsTextures[] = {QPATHTOF(data\bodybagItem_white_co.paa)}; GVAR(bodyBagObject) = "ACE_bodyBagObject_white"; }; - class ACE_painkillers: ACE_ItemCore { - scope = 2; - author = "Alganthe"; - displayName = CSTRING(painkillers_Display); - model = "\A3\Structures_F_EPA\Items\Medical\PainKillers_F.p3d"; - picture = QPATHTOF(ui\painkillers_ca.paa); - descriptionShort = CSTRING(painkillers_Desc_Short); - descriptionUse = CSTRING(painkillers_Desc_Use); - ACE_isMedicalItem = 1; - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 1; - }; - }; }; diff --git a/addons/medical_treatment/config.cpp b/addons/medical_treatment/config.cpp index 75166a0f0c..3782645019 100644 --- a/addons/medical_treatment/config.cpp +++ b/addons/medical_treatment/config.cpp @@ -30,5 +30,6 @@ class CfgPatches { #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "Cfg3DEN.hpp" +#include "CfgMagazines.hpp" #endif diff --git a/addons/medical_treatment/functions/fnc_bandage.sqf b/addons/medical_treatment/functions/fnc_bandage.sqf index a4fb2c7698..2152e81a3b 100644 --- a/addons/medical_treatment/functions/fnc_bandage.sqf +++ b/addons/medical_treatment/functions/fnc_bandage.sqf @@ -8,6 +8,9 @@ * 1: Patient * 2: Body Part * 3: Treatment + * 4: Item User + * 5: Used Item + * 6: Bandage effectiveness coefficient (default: 1) * * Return Value: * None @@ -18,8 +21,11 @@ * Public: No */ -params ["_medic", "_patient", "_bodyPart", "_classname"]; +_this set [6, _this param [6, 1]]; // set default Bandage effectiveness coefficient +[QGVAR(bandaged), _this] call CBA_fnc_localEvent; // Raise event with reference so mods can modify this + +params ["_medic", "_patient", "_bodyPart", "_classname", "", "", "_bandageEffectiveness"]; [_patient, "activity", LSTRING(Activity_bandagedPatient), [[_medic, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); -[QGVAR(bandageLocal), [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent; +[QGVAR(bandageLocal), [_patient, _bodyPart, _classname, _bandageEffectiveness], _patient] call CBA_fnc_targetEvent; diff --git a/addons/medical_treatment/functions/fnc_bandageLocal.sqf b/addons/medical_treatment/functions/fnc_bandageLocal.sqf index 0f695c4c61..4cecbb2f17 100644 --- a/addons/medical_treatment/functions/fnc_bandageLocal.sqf +++ b/addons/medical_treatment/functions/fnc_bandageLocal.sqf @@ -7,6 +7,7 @@ * 0: Patient * 1: Body Part * 2: Treatment + * 3: Bandage effectiveness coefficient (default: 1) * * Return Value: * None @@ -17,16 +18,16 @@ * Public: No */ -params ["_patient", "_bodyPart", "_bandage"]; -TRACE_3("bandageLocal",_patient,_bodyPart,_bandage); -_bodyPart = toLower _bodyPart; +params ["_patient", "_bodyPart", "_bandage", ["_bandageEffectiveness", 1]]; +TRACE_4("bandageLocal",_patient,_bodyPart,_bandage,_bandageEffectiveness); +_bodyPart = toLowerANSI _bodyPart; private _openWounds = GET_OPEN_WOUNDS(_patient); private _woundsOnPart = _openWounds getOrDefault [_bodyPart, []]; if (_woundsOnPart isEqualTo []) exitWith {}; // Figure out which injuries for this bodypart are the best choice to bandage -private _targetWounds = [_patient, _bandage, _bodyPart, GVAR(bandageEffectiveness)] call FUNC(findMostEffectiveWounds); +private _targetWounds = [_patient, _bandage, _bodyPart, _bandageEffectiveness * GVAR(bandageEffectiveness)] call FUNC(findMostEffectiveWounds); // Everything is patched up on this body part already if (count _targetWounds == 0) exitWith {}; diff --git a/addons/medical_treatment/functions/fnc_canBandage.sqf b/addons/medical_treatment/functions/fnc_canBandage.sqf index 18fb304d11..808f86b958 100644 --- a/addons/medical_treatment/functions/fnc_canBandage.sqf +++ b/addons/medical_treatment/functions/fnc_canBandage.sqf @@ -20,7 +20,7 @@ */ params ["_medic", "_patient", "_bodyPart", "_bandage"]; -_bodyPart = toLower _bodyPart; +_bodyPart = toLowerANSI _bodyPart; // If patient is swimming, don't allow bandage actions. if (_patient call EFUNC(common,isSwimming)) exitWith {false}; diff --git a/addons/medical_treatment/functions/fnc_canSplint.sqf b/addons/medical_treatment/functions/fnc_canSplint.sqf index f2fc6fa034..bc2b235bf8 100644 --- a/addons/medical_treatment/functions/fnc_canSplint.sqf +++ b/addons/medical_treatment/functions/fnc_canSplint.sqf @@ -19,6 +19,6 @@ params ["", "_patient", "_bodyPart"]; -private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; (GET_FRACTURES(_patient) select _partIndex) == 1 diff --git a/addons/medical_treatment/functions/fnc_canTreat.sqf b/addons/medical_treatment/functions/fnc_canTreat.sqf index 995965dfe5..3b643afa2b 100644 --- a/addons/medical_treatment/functions/fnc_canTreat.sqf +++ b/addons/medical_treatment/functions/fnc_canTreat.sqf @@ -28,7 +28,7 @@ private _config = configFile >> QGVAR(actions) >> _classname; ) && { _patient isKindOf "CAManBase" } && { - private _selections = getArray (_config >> "allowedSelections") apply {toLower _x}; + private _selections = getArray (_config >> "allowedSelections") apply {toLowerANSI _x}; "all" in _selections || {_bodyPart in _selections} } && { GET_FUNCTION(_condition,_config >> "condition"); diff --git a/addons/medical_treatment/functions/fnc_createLitter.sqf b/addons/medical_treatment/functions/fnc_createLitter.sqf index 28269bb4ce..df9c2e7f4d 100644 --- a/addons/medical_treatment/functions/fnc_createLitter.sqf +++ b/addons/medical_treatment/functions/fnc_createLitter.sqf @@ -27,7 +27,7 @@ params ["_medic", "_patient", "_bodyPart", "_classname"]; if (vehicle _medic != _medic || {vehicle _patient != _patient}) exitWith {}; // Determine if treated body part is bleeding -private _index = ALL_BODY_PARTS find toLower _bodyPart; +private _index = ALL_BODY_PARTS find toLowerANSI _bodyPart; private _isBleeding = (GET_OPEN_WOUNDS(_patient) get _bodyPart) findIf { _x params ["", "_amountOf", "_bleeding"]; _amountOf * _bleeding > 0 diff --git a/addons/medical_treatment/functions/fnc_fullHealLocal.sqf b/addons/medical_treatment/functions/fnc_fullHealLocal.sqf index 7772db0a6b..dc95c44185 100644 --- a/addons/medical_treatment/functions/fnc_fullHealLocal.sqf +++ b/addons/medical_treatment/functions/fnc_fullHealLocal.sqf @@ -25,6 +25,9 @@ if ((["ace_fire"] call EFUNC(common,isModLoaded)) && {[_patient] call EFUNC(fire _patient setVariable [QEGVAR(fire,intensity), 0, true]; }; +// Allow mods to heal +[QGVAR(fullHealLocalMod), [_patient]] call CBA_fnc_localEvent; + private _state = GET_SM_STATE(_patient); TRACE_1("start",_state); diff --git a/addons/medical_treatment/functions/fnc_getBandageTime.sqf b/addons/medical_treatment/functions/fnc_getBandageTime.sqf index ffe5c81f63..eb0a3bc5ae 100644 --- a/addons/medical_treatment/functions/fnc_getBandageTime.sqf +++ b/addons/medical_treatment/functions/fnc_getBandageTime.sqf @@ -20,7 +20,7 @@ params ["_medic", "_patient", "_bodyPart", "_bandage"]; -private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _partIndex = ALL_BODY_PARTS find toLowerANSI _bodyPart; if (_partIndex < 0) exitWith { ERROR_1("invalid partIndex - %1",_this); 0 }; private _targetWounds = [_patient, _bandage, _bodyPart] call FUNC(findMostEffectiveWounds); diff --git a/addons/medical_treatment/functions/fnc_hasItem.sqf b/addons/medical_treatment/functions/fnc_hasItem.sqf index e84a79f142..e0ef4c8a4f 100644 --- a/addons/medical_treatment/functions/fnc_hasItem.sqf +++ b/addons/medical_treatment/functions/fnc_hasItem.sqf @@ -25,10 +25,11 @@ params ["_medic", "_patient", "_items"]; private _fnc_checkItems = { params ["_unit"]; - private _unitItems = _unit call EFUNC(common,uniqueItems); + private _unitItems = [_unit, 1] call EFUNC(common,uniqueItems); private _unitVehicle = objectParent _unit; if (!isNull _unitVehicle) then { _unitItems append (itemCargo _unitVehicle); + _unitItems append (magazineCargo _unitVehicle); }; _items findIf {_x in _unitItems} != -1 }; diff --git a/addons/medical_treatment/functions/fnc_hasTourniquetAppliedTo.sqf b/addons/medical_treatment/functions/fnc_hasTourniquetAppliedTo.sqf index 9ef1261238..56477eafee 100644 --- a/addons/medical_treatment/functions/fnc_hasTourniquetAppliedTo.sqf +++ b/addons/medical_treatment/functions/fnc_hasTourniquetAppliedTo.sqf @@ -18,6 +18,6 @@ params ["_unit", "_bodyPart"]; -private _index = ALL_BODY_PARTS find toLower _bodyPart; +private _index = ALL_BODY_PARTS find toLowerANSI _bodyPart; _index >= 0 && {HAS_TOURNIQUET_APPLIED_ON(_unit,_index)} diff --git a/addons/medical_treatment/functions/fnc_ivBagLocal.sqf b/addons/medical_treatment/functions/fnc_ivBagLocal.sqf index 64eabf844a..80f06fc11e 100644 --- a/addons/medical_treatment/functions/fnc_ivBagLocal.sqf +++ b/addons/medical_treatment/functions/fnc_ivBagLocal.sqf @@ -23,7 +23,7 @@ params ["_patient", "_bodyPart", "_classname"]; private _bloodVolume = GET_BLOOD_VOLUME(_patient); if (_bloodVolume >= DEFAULT_BLOOD_VOLUME) exitWith {}; -private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; // Get attributes for the used IV private _defaultConfig = configFile >> QUOTE(ADDON) >> "IV"; diff --git a/addons/medical_treatment/functions/fnc_medication.sqf b/addons/medical_treatment/functions/fnc_medication.sqf index b69a63e994..dfd08d4de2 100644 --- a/addons/medical_treatment/functions/fnc_medication.sqf +++ b/addons/medical_treatment/functions/fnc_medication.sqf @@ -23,6 +23,7 @@ params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"]; [_patient, _usedItem] call FUNC(addToTriageCard); -[_patient, "activity", LSTRING(Activity_usedItem), [[_medic, false, true] call EFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call FUNC(addToLog); +private _cfg = ["CfgWeapons", "CfgMagazines"] select (isClass (configFile >> "CfgMagazines" >> _usedItem)); +[_patient, "activity", LSTRING(Activity_usedItem), [[_medic, false, true] call EFUNC(common,getName), getText (configFile >> _cfg >> _usedItem >> "displayName")]] call FUNC(addToLog); [QGVAR(medicationLocal), [_patient, _bodyPart, _classname], _patient] call CBA_fnc_targetEvent; diff --git a/addons/medical_treatment/functions/fnc_medicationLocal.sqf b/addons/medical_treatment/functions/fnc_medicationLocal.sqf index b5499e9bb4..31884dac20 100644 --- a/addons/medical_treatment/functions/fnc_medicationLocal.sqf +++ b/addons/medical_treatment/functions/fnc_medicationLocal.sqf @@ -42,7 +42,7 @@ TRACE_1("Running treatmentMedicationLocal with Advanced configuration for",_pati // Handle tourniquet on body part blocking blood flow at injection site -private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; if (HAS_TOURNIQUET_APPLIED_ON(_patient,_partIndex)) exitWith { TRACE_1("unit has tourniquets blocking blood flow on injection site",_tourniquets); @@ -59,6 +59,7 @@ private _painReduce = GET_NUMBER(_medicationConfig >> "painReduce",g private _timeInSystem = GET_NUMBER(_medicationConfig >> "timeInSystem",getNumber (_defaultConfig >> "timeInSystem")); private _timeTillMaxEffect = GET_NUMBER(_medicationConfig >> "timeTillMaxEffect",getNumber (_defaultConfig >> "timeTillMaxEffect")); private _maxDose = GET_NUMBER(_medicationConfig >> "maxDose",getNumber (_defaultConfig >> "maxDose")); +private _maxDoseDeviation = GET_NUMBER(_medicationConfig >> "maxDoseDeviation",getNumber (_defaultConfig >> "maxDoseDeviation")); private _viscosityChange = GET_NUMBER(_medicationConfig >> "viscosityChange",getNumber (_defaultConfig >> "viscosityChange")); private _hrIncreaseLow = GET_ARRAY(_medicationConfig >> "hrIncreaseLow",getArray (_defaultConfig >> "hrIncreaseLow")); private _hrIncreaseNormal = GET_ARRAY(_medicationConfig >> "hrIncreaseNormal",getArray (_defaultConfig >> "hrIncreaseNormal")); @@ -75,4 +76,4 @@ TRACE_3("adjustments",_heartRateChange,_painReduce,_viscosityChange); [_patient, _className, _timeTillMaxEffect, _timeInSystem, _heartRateChange, _painReduce, _viscosityChange] call EFUNC(medical_status,addMedicationAdjustment); // Check for medication compatiblity -[_patient, _className, _maxDose, _incompatibleMedication] call FUNC(onMedicationUsage); +[_patient, _className, _maxDose, _maxDoseDeviation, _incompatibleMedication] call FUNC(onMedicationUsage); diff --git a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf index 6235358446..cd26d15424 100644 --- a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf @@ -6,27 +6,33 @@ * Arguments: * 0: The patient * 1: Medication Treatment classname - * 2: Max dosage (0 to ignore) + * 2: Max dose (0 to ignore) + * 3: Max dose deviation * 3: Incompatable medication > * * Return Value: * None * * Example: - * [player, "morphine", 4, [["x", 1]]] call ace_medical_treatment_fnc_onMedicationUsage + * [player, "morphine", 4, 2, [["x", 1]]] call ace_medical_treatment_fnc_onMedicationUsage * * Public: No */ -params ["_target", "_className", "_maxDosage", "_incompatibleMedication"]; -TRACE_4("onMedicationUsage",_target,_className,_maxDosage,_incompatibleMedication); +params ["_target", "_className", "_maxDose", "_maxDoseDeviation", "_incompatibleMedication"]; +TRACE_5("onMedicationUsage",_target,_className,_maxDose,_maxDoseDeviation,_incompatibleMedication); private _overdosedMedications = []; // Check for overdose from current medication -if (_maxDosage > 0) then { +if (_maxDose > 0) then { private _currentDose = [_target, _className] call EFUNC(medical_status,getMedicationCount); - if (_currentDose >= floor (_maxDosage + round(random(2)))) then { + // Because both {floor random 0} and {floor random 1} return 0 + if (_maxDoseDeviation > 0) then { + _maxDoseDeviation = _maxDoseDeviation + 1; + }; + + if (_currentDose > _maxDose + (floor random _maxDoseDeviation)) then { TRACE_1("exceeded max dose",_currentDose); _overdosedMedications pushBackUnique _className; }; diff --git a/addons/medical_treatment/functions/fnc_splintLocal.sqf b/addons/medical_treatment/functions/fnc_splintLocal.sqf index f415d8296f..ee15a63bf0 100644 --- a/addons/medical_treatment/functions/fnc_splintLocal.sqf +++ b/addons/medical_treatment/functions/fnc_splintLocal.sqf @@ -20,7 +20,7 @@ params ["_medic", "_patient", "_bodyPart"]; TRACE_3("splintLocal",_medic,_patient,_bodyPart); -private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; private _fractures = GET_FRACTURES(_patient); _fractures set [_partIndex, -1]; diff --git a/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf b/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf index 3fe5f4e55d..9a0480bcb0 100644 --- a/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf +++ b/addons/medical_treatment/functions/fnc_tourniquetLocal.sqf @@ -19,7 +19,7 @@ params ["_patient", "_bodyPart"]; TRACE_2("tourniquetLocal",_patient,_bodyPart); -private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; private _tourniquets = GET_TOURNIQUETS(_patient); _tourniquets set [_partIndex, CBA_missionTime]; diff --git a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf index 5c5cf93dc8..8a6be10bb4 100644 --- a/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf +++ b/addons/medical_treatment/functions/fnc_tourniquetRemove.sqf @@ -22,7 +22,7 @@ params ["_medic", "_patient", "_bodyPart"]; TRACE_3("tourniquetRemove",_medic,_patient,_bodyPart); // Remove tourniquet from body part, exit if no tourniquet applied -private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; +private _partIndex = ALL_BODY_PARTS find tolowerANSI _bodyPart; private _tourniquets = GET_TOURNIQUETS(_patient); if (_tourniquets select _partIndex == 0) exitWith { diff --git a/addons/medical_treatment/functions/fnc_treatment.sqf b/addons/medical_treatment/functions/fnc_treatment.sqf index b7ebbfd8b0..4222d69a4b 100644 --- a/addons/medical_treatment/functions/fnc_treatment.sqf +++ b/addons/medical_treatment/functions/fnc_treatment.sqf @@ -52,7 +52,7 @@ private _userAndItem = if (GET_NUMBER_ENTRY(_config >> "consumeItem") == 1) then [objNull, ""]; // Treatment does not require items to be consumed }; -_userAndItem params ["_itemUser", "_usedItem"]; +_userAndItem params ["_itemUser", "_usedItem", "_createLitter"]; private _isInZeus = !isNull findDisplay 312; @@ -161,7 +161,7 @@ if (_callbackProgress isEqualTo {}) then { [ _treatmentTime, - [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem], + [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem, _createLitter], FUNC(treatmentSuccess), FUNC(treatmentFailure), getText (_config >> "displayNameProgress"), diff --git a/addons/medical_treatment/functions/fnc_treatmentFailure.sqf b/addons/medical_treatment/functions/fnc_treatmentFailure.sqf index 64d18fa830..42323922a3 100644 --- a/addons/medical_treatment/functions/fnc_treatmentFailure.sqf +++ b/addons/medical_treatment/functions/fnc_treatmentFailure.sqf @@ -23,7 +23,11 @@ _args params ["_medic", "_patient", "_bodyPart", "_classname", "_itemUser", "_us // Return used item to user (if used) if (!isNull _itemUser) then { - [_itemUser, _usedItem] call EFUNC(common,addToInventory); + if (isClass (configFile >> "CfgMagazines" >> _usedItem)) then { + [_itemUser, _usedItem, 1] call EFUNC(common,adjustMagazineAmmo); + } else { + [_itemUser, _usedItem] call EFUNC(common,addToInventory); + }; }; // Switch medic to end animation immediately diff --git a/addons/medical_treatment/functions/fnc_treatmentSuccess.sqf b/addons/medical_treatment/functions/fnc_treatmentSuccess.sqf index 96f0d11ead..a400fa98dc 100644 --- a/addons/medical_treatment/functions/fnc_treatmentSuccess.sqf +++ b/addons/medical_treatment/functions/fnc_treatmentSuccess.sqf @@ -11,6 +11,7 @@ * 3: Treatment * 4: Item User * 5: Used Item + * 6: Create Litter * * Return Value: * None @@ -19,7 +20,8 @@ */ params ["_args"]; -_args params ["_medic", "_patient", "_bodyPart", "_classname", "_itemUser", "_usedItem"]; +_args params ["_medic", "_patient", "_bodyPart", "_classname", "_itemUser", "_usedItem", "_createLitter"]; +TRACE_7("",_medic,_patient,_bodyPart,_classname,_itemUser,_usedItem,_createLitter); // Switch medic to end animation immediately private _endInAnim = _medic getVariable QGVAR(endInAnim); @@ -45,7 +47,7 @@ GET_FUNCTION(_callbackSuccess,configFile >> QGVAR(actions) >> _classname >> "cal _args call _callbackSuccess; // Call litter creation handler -_args call FUNC(createLitter); +if (_createLitter) then { _args call FUNC(createLitter); }; // Emit local event for medical API ["ace_treatmentSucceded", [_medic, _patient, _bodyPart, _classname, _itemUser, _usedItem]] call CBA_fnc_localEvent; diff --git a/addons/medical_treatment/functions/fnc_useItem.sqf b/addons/medical_treatment/functions/fnc_useItem.sqf index 1f1d7c8355..33ac9f98f4 100644 --- a/addons/medical_treatment/functions/fnc_useItem.sqf +++ b/addons/medical_treatment/functions/fnc_useItem.sqf @@ -10,7 +10,7 @@ * 2: Items * * Return Value: - * User and Item + * User and Item and Litter Created * * Example: * [player, cursorObject, ["bandage"]] call ace_medical_treatment_fnc_useItem @@ -29,20 +29,35 @@ scopeName "Main"; private _useOrder = [[_patient, _medic], [_medic, _patient], [_medic]] select GVAR(allowSharedEquipment); { - private _unit = _x; + private _unit = _x; private _unitVehicle = objectParent _unit; - private _unitItems = _x call EFUNC(common,uniqueItems); + private _unitItems = [_x, 0] call EFUNC(common,uniqueItems); + private _unitMagazines = [_x, 2] call EFUNC(common,uniqueItems); + private _vehicleItems = itemCargo _unitVehicle; // [] for objNull + private _vehicleMagazines = magazineCargo _unitVehicle; // same { - if (!isNull _unitVehicle && {_x in (itemCargo _unitVehicle)}) then { - _unitVehicle addItemCargoGlobal [_x, -1]; - [_unit, _x] breakOut "Main"; - }; - if (_x in _unitItems) then { - _unit removeItem _x; - [_unit, _x] breakOut "Main"; + switch (true) do { + case (_x in _vehicleItems): { + _unitVehicle addItemCargoGlobal [_x, -1]; + [_unit, _x, false] breakOut "Main"; + }; + case (_x in _vehicleMagazines): { + [_unitVehicle, _x] call EFUNC(common,adjustMagazineAmmo); + [_unit, _x, false] breakOut "Main"; + }; + case (_x in _unitItems): { + _unit removeItem _x; + [_unit, _x, true] breakOut "Main"; + }; + case (_x in _unitMagazines): { + private _magsStart = count magazines _unit; + [_unit, _x] call EFUNC(common,adjustMagazineAmmo); + private _magsEnd = count magazines _unit; + [_unit, _x, (_magsEnd < _magsStart)] breakOut "Main"; + }; }; } forEach _items; } forEach _useOrder; -[objNull, ""] +[objNull, "", false] diff --git a/addons/medical_treatment/stringtable.xml b/addons/medical_treatment/stringtable.xml index 05bb62a646..4e186edc85 100644 --- a/addons/medical_treatment/stringtable.xml +++ b/addons/medical_treatment/stringtable.xml @@ -70,7 +70,7 @@ Activé & Diagnostic du décès/de l'arrêt cardiaque Włączone i pozwala zdiagnozować Śmierć/Zatrzymanie Akcji Serca 有効 & 死亡/心停止状態を診断可能 - Включено & Может диагностировать смерть/остановку сердца + Включено и может диагностировать смерть/остановку сердца Aktiviert & kann Tod/Herzstillstand diagnostizieren 已启用 & 可以诊断死亡/心搏骤停 활성화 및 사망/심정지 진찰가능 @@ -438,6 +438,7 @@ Zeit zum Graben von Gräbern Tempo di scavo tomba 墓掘りの所要時間 + Время рытья могилы Time, in seconds, required to dig a grave for a body. @@ -447,6 +448,7 @@ Zeit (in Sekunden), die benötigt wird, um ein Grab für einen Leichnam auszuheben. Tempo in secondi richiesto per seppellire un morto. 遺体の墓を掘るのに掛かる時間 (秒) を決定します。 + Время в секундах, необходимое для того, чтобы выкопать могилу для тела. Allow Epinephrine @@ -760,6 +762,7 @@ Co powinno zostać zużyte po zastosowaniu. 봉합키트를 1회성 소모품으로 설정할 지 여부를 결정합니다. Ce qui doit être consommé après l'utilisation. + Решите, следует ли использовать набор для наложения швов в качестве одноразового расходного материала. Self Stitching @@ -772,7 +775,7 @@ Samo-zašívání Zszywanie własnych ran Selbstnähen - Зашивание своей раны + Зашитие своей раны Auto cosido 봉합키트 자가 사용 @@ -878,6 +881,7 @@ Permitir cavar tumbas Autoriser le creusement de tombes 墓掘りを許可 + Разрешить рытье могил Enables digging graves to dispose of corpses. @@ -888,6 +892,7 @@ Habilita cavar tumbas para deshacerse de los cadáveres. Active la possibilité de creuser des tombes pour enterrer les cadavres. 墓を掘って死体を処理できるようになります。 + Позволяет рыть могилы для захоронения трупов. Only if dead @@ -898,6 +903,7 @@ Solo si está muerto Uniquement s'il est mort 死体のみ + Только если мертв Create Grave Markers @@ -908,6 +914,7 @@ 무덤 마커 생성 Créer des pierres tombales 墓標を作成 + Создайте надгробные знаки Enables the creation of grave markers when digging graves. @@ -918,6 +925,7 @@ 무덤을 파낼 때 무덤 마커를 표시할 수 있습니다. Active la création de pierres tombales lors de l'enterrement de cadavres. 墓を掘った際、墓標を作成できるようにします。 + Позволяет создавать надгробные знаки при рытье могил. Allow IV Transfusion @@ -949,7 +957,7 @@ Locations IV Transfusion - IV 輸液の場所制限 + IV輸液の可能な場所 Ubicación para transfusiones IV Lieux perfusions IV Места введения пакетов внутривенного переливания @@ -2435,6 +2443,7 @@ Szew 봉합술 Suture + Нить Surgical Suture for stitching injuries. @@ -2445,6 +2454,7 @@ Szew chirurgiczny do zszywania ran. 상처를 꿰메는 수술용 봉합술. Suture chirurgicale pour suturer les blessures. + Хирургическая нить для зашивания травм. Surgical Suture for stitching injuries. @@ -2455,6 +2465,7 @@ Szew chirurgiczny do zszywania ran. 상처를 꿰메는 수술용 봉합술. Suture chirurgicale pour suturer les blessures. + Хирургическая нить для зашивания травм. Bodybag @@ -3494,6 +3505,7 @@ Nessun dolore Kein Schmerz 痛みはない + Нет боли In mild pain @@ -3558,21 +3570,53 @@ 軍用止血帶 Turnike [CAT] - - Receiving IV [%1ml] - Erhalte IV [%1ml] - Recibiendo IV [%1ml] - Принимается переливание [%1 мл] - Otrzymywanie IV [pozostało %1ml] - Transfusion : [%1 ml] - Přijímání transfúze [%1ml] - Infúzióra kötve [%1ml] - Ricevendo EV [%1ml] - Recebendo IV [%1ml] - IV [%1ml] を投与中 - IV로 [%1ml] 수혈중 - 正在接受静脉注射 [%1毫升] - 接收靜脈注射液中 [%1毫升] + + Receiving Saline IV [%1ml] + Erhalte Saline IV [%1ml] + Recibiendo Salina IV [%1ml] + Принимается солевой раствор IV [%1 мл] + Otrzymywanie soli IV [%1ml] + Transfusion de sérum salé : [%1 ml] + Přijímání soli IV [%1ml] + Saline Infúzióra kötve [%1ml] + Ricevendo Salina EV [%1ml] + Recebendo Salina IV [%1ml] + 生理食塩水 IV [%1ml] を投与中 + 생리식염수 IV로 [%1ml] 수혈중 + 正在接受生理盐水静脉注射 [%1毫升] + 接收生理鹽水靜脈注射液中 [%1毫升] + + + Receiving Blood IV [%1ml] + Erhalte Blut IV [%1ml] + Recibiendo Sangre IV [%1ml] + Принимается кровь IV [%1 мл] + Otrzymywanie krwi IV [%1ml] + Transfusion de sang : [%1 ml] + Přijímání krve IV [%1ml] + Vér Infúzióra kötve [%1ml] + Ricevendo Sangue EV [%1ml] + Recebendo Sangue IV [%1ml] + 血液 IV [%1ml] を投与中 + 혈액 IV로 [%1ml] 수혈중 + 正在接受血液静脉注射 [%1毫升] + 接收血液靜脈注射液中 [%1毫升] + + + Receiving Plasma IV [%1ml] + Erhalte Plasma IV [%1ml] + Recibiendo Plasma IV [%1ml] + Принимается плазма IV [%1 мл] + Otrzymywanie plazmy IV [%1ml] + Transfusion de plasma : [%1 ml] + Přijímání plazmy IV [%1ml] + Plazma Infúzióra kötve [%1ml] + Ricevendo Plasma EV [%1ml] + Recebendo Plasma IV [%1ml] + プラズマ IV [%1ml] を投与中 + 혈장 IV로 [%1ml] 수혈중 + 正在接受血浆静脉注射 [%1毫升] + 接收血漿靜脈注射液中 [%1毫升] No IV @@ -3582,6 +3626,7 @@ Nessuna Flebo EV Kein IV IV なし + Нет капельницы Blood Pressure @@ -4558,6 +4603,7 @@ Vücudu siyah ceset torbasına yerleştir 遺体袋 (黒) に入れる 시체를 검은 시체가방에 놓기 + Положить тело в черный мешок для тела Place body in blue bodybag @@ -4570,6 +4616,7 @@ Vücudu mavi ceset torbasına yerleştir 遺体袋 (青) に入れる 시체를 파란 시체가방에 놓기 + Положить тело в синий мешок для тела Place body in white bodybag @@ -4582,6 +4629,7 @@ Vücudu beyaz ceset torbasına yerleştir 遺体袋 (白) に入れる 시체를 흰 시체가방에 놓기 + Положить тело в белый мешок для тела Placing body in bodybag... @@ -4608,6 +4656,7 @@ Grabe ein Grab für den Leichnam Scava tomba per cadavere 墓を掘る + Выкопать могилу для тела Digging grave for body... @@ -4617,6 +4666,7 @@ Grab für Leichnam ausheben ... Scavando tomba per cadavere... 墓を掘っています + Рытьё могилы для тела... %1 has bandaged patient @@ -4787,7 +4837,7 @@ Heal fully bandaged hitpoints Lecz w pełni zabandażowane hitpointy Curar miembros totalmente vendados - Исцелять полностью перебинтованные части тела + Исцелить полностью перебинтованные части тела Curar membros totalmente enfaixados Heal fully bandaged hitpoints Cura hitpoints completamente bendati @@ -4868,6 +4918,7 @@ Überprüfe Name auf dem Grabstein Controlla nome sulla lapide 墓石の名前を確認 + Проверьте имя на надгробии Bandage Rollover @@ -4877,6 +4928,7 @@ Pansement de plaies multiples Srotolamento Bendaggi 包帯の繰り越し + Перевязка множественных ран If enabled, bandages can close different types of wounds on the same body part.\nBandaging multiple injuries will scale bandaging time accordingly. @@ -4886,6 +4938,7 @@ Si activé, les bandages peuvent fermer plusieurs types de blessures sur la même partie du corps.\nPanser de multiples blessures modifiera la durée d'application en conséquence. Se attivo, un singolo bendaggio potrà chiudere più ferite sulla stessa parte del corpo.\nBendare più ferite di conseguenza richiederà più tempo. 有効にすると、体の同じ部分にある別の種類の傷を一つの包帯で閉じることができます。\n複数の傷に包帯を巻くと、それに応じて包帯時間が変動します。 + Если эта функция включена, бинты могут закрывать различные типы ран на одной и той же части тела.\nПри перевязке нескольких повреждений время перевязки будет увеличено соответствующим образом. Bandage Effectiveness Coefficient @@ -4895,6 +4948,7 @@ Coefficient d'efficacité des bandages Coefficiente di efficacia bendaggi 包帯有効性係数 + Коэффициент эффективности повязки Determines how effective bandages are at closing wounds. @@ -4904,6 +4958,7 @@ Défini l'efficacité des bandages à refermer des plaies. Determina quanto i bendaggi sono efficaci nel chiudere le ferite. 包帯が傷をふさぐのにどれだけ効果的かを決定します。 + Определяет, насколько эффективны бинты при закрытии ран. Medical Items @@ -4925,6 +4980,8 @@ Zeit-Koeffizient für Zeus Behandlungen Zeus治療時間係数 제우스 치료 시간 계수 + Коэффициент времени обработки Zeus + Coeff. de temps Multiply all treatment times with this coefficient when in Zeus. @@ -4932,6 +4989,8 @@ Dauer von Behandlungen als Zeus wird mit diesem Koeffizienten multipliziert. Zeus操作中は、すべての治療時間にこの係数を掛けます。 제우스일 때 모든 치료 시간에 이 계수를 곱합니다. + Умножьте все время лечения на этот коэффициент, когда вы находитесь в Zeus. + Coefficient de temps de traitement Zeus Painkillers @@ -4951,15 +5010,35 @@ Administer Painkillers + Somministra Antidolorifici + Испол-ть обезболивающие + 鎮痛剤を投与 + 진통제 투여 + Administrer des analgésiques Administering Painkillers... + Somministrando Antidolorifici... + Использование обезболивающего... + 鎮痛剤を投与しています・・・ + 진통제 투여 중... + Administration d'analgésiques... Over-the-counter analgesic used to combat light to moderate pain experiences. + Antidolorifici senza prescrizione, usati per alleviare dolore leggero o moderato. + Безрецептурный анальгетик, используемый для борьбы с легкими и умеренными болевыми ощущениями. + 軽度から中程度の痛みに対処するために使用される市販の鎮痛薬。 + 가벼운 통증부터 중간 정도의 통증을 퇴치하는 데 사용되는 일반의약품 진통제입니다. + Analgésique sans ordonnance utilisé pour lutter contre les douleurs légères à modérées. Over-the-counter analgesic used to combat light to moderate pain experiences. + Antidolorifici senza prescrizione, usati per alleviare dolore leggero o moderato. + Безрецептурный анальгетик, используемый для борьбы с легкими и умеренными болевыми ощущениями. + 軽度から中程度の痛みに対処するために使用される市販の鎮痛薬。 + 가벼운 통증부터 중간 정도의 통증을 퇴치하는 데 사용되는 일반의약품 진통제입니다. + Analgésique sans ordonnance utilisé pour lutter contre les douleurs légères à modérées. diff --git a/addons/medical_vitals/stringtable.xml b/addons/medical_vitals/stringtable.xml index f1d7f3fa5b..eb0080bd07 100644 --- a/addons/medical_vitals/stringtable.xml +++ b/addons/medical_vitals/stringtable.xml @@ -4,12 +4,27 @@ Vitals Vitais + Parametri Vitali + Жизненно-важные органы + バイタル + 생명 + Paramètres vitaux Enable SpO2 Simulation + Abilita simulazione SpO2 + Включить имитацию SpO2 + SpO2シミュレーションを有効化 + 산소포화도 시뮬레이션 활성화 + Activer la simulation de la SpO2 Enables oxygen saturation simulation, providing variable heart rate and oxygen demand based on physical activity and altitude. Required for Airway Management. + Abilita la simulazione della saturazione di ossigeno, alterando la frequenza cardiaca e consumo di ossigeno in funzione dell'attività fisica e l'altitudine. Richiesto per la gestione delle vie aeree. + Позволяет имитировать насыщение кислородом, обеспечивая переменную частоту сердечных сокращений и потребность в кислороде в зависимости от физической активности и высоты над уровнем моря. Требуется для управления дыхательными путями. + 酸素飽和度シミュレーションを有効にし、身体活動や標高に基づいて変動する心拍数と酸素要求量の機能を提供します。 気道管理に必要です。 + 산소포화도 시뮬레이션을 활성화하여 신체 활동과 고도에 따라 다양한 심박수와 산소 요구량을 제공합니다. 기도 관리에 필요합니다. + Permet de simuler la saturation en oxygène, de modifier la fréquence cardiaque et la consommation d'oxygène en fonction de l'activité physique et de l'altitude. Nécessaire pour la gestion des voies respiratoires. diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf index 8a5db92e0b..c17914ad4b 100644 --- a/addons/microdagr/XEH_clientInit.sqf +++ b/addons/microdagr/XEH_clientInit.sqf @@ -35,7 +35,7 @@ private _closeCode = { }, ""] call CBA_fnc_addKeybind; //Add Eventhandler: -[QEGVAR(vector,rangefinderData), {_this call FUNC(recieveRangefinderData)}] call CBA_fnc_addEventHandler; +[QEGVAR(vector,rangefinderData), LINKFUNC(recieveRangefinderData)] call CBA_fnc_addEventHandler; //Global Variables to default: GVAR(gpsPositionASL) = [0,0,0]; diff --git a/addons/minedetector/XEH_postInit.sqf b/addons/minedetector/XEH_postInit.sqf index 0b8a521155..77f2f6761c 100644 --- a/addons/minedetector/XEH_postInit.sqf +++ b/addons/minedetector/XEH_postInit.sqf @@ -12,8 +12,8 @@ private _detectableClasses = call (uiNamespace getVariable [QGVAR(detectableClas } forEach _detectableClasses; TRACE_1("built cache",count allVariables GVAR(detectableClasses)); -[QGVAR(enableDetector), FUNC(enableDetector)] call CBA_fnc_addEventHandler; -[QGVAR(disableDetector), FUNC(disableDetector)] call CBA_fnc_addEventHandler; +[QGVAR(enableDetector), LINKFUNC(enableDetector)] call CBA_fnc_addEventHandler; +[QGVAR(disableDetector), LINKFUNC(disableDetector)] call CBA_fnc_addEventHandler; // Shows detector and mine posistions in 3d when debug is on #ifdef DEBUG_MODE_FULL diff --git a/addons/minedetector/functions/fnc_enableDetector.sqf b/addons/minedetector/functions/fnc_enableDetector.sqf index b673176086..55b58dcf3a 100644 --- a/addons/minedetector/functions/fnc_enableDetector.sqf +++ b/addons/minedetector/functions/fnc_enableDetector.sqf @@ -31,4 +31,4 @@ if (_unit == ACE_player) then { [QGVAR(detectorEnabled), [_unit, _detectorType]] call CBA_fnc_localEvent; private _config = [_detectorType] call FUNC(getDetectorConfig); -[FUNC(detectorLoop), 0.05, [_unit, _detectorType, _config, CBA_missionTime - 0.25]] call CBA_fnc_addPerFrameHandler; +[LINKFUNC(detectorLoop), 0.05, [_unit, _detectorType, _config, CBA_missionTime - 0.25]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/missileguidance/CfgEventhandlers.hpp b/addons/missileguidance/CfgEventhandlers.hpp index 449681e8df..a288a93399 100644 --- a/addons/missileguidance/CfgEventhandlers.hpp +++ b/addons/missileguidance/CfgEventhandlers.hpp @@ -7,13 +7,13 @@ class Extended_PreStart_EventHandlers { class Extended_PreInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_pre_init)); + init = QUOTE(call COMPILE_SCRIPT(XEH_preInit)); }; }; class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_SCRIPT(XEH_post_init)); + init = QUOTE(call COMPILE_SCRIPT(XEH_postInit)); }; }; diff --git a/addons/missileguidance/XEH_post_init.sqf b/addons/missileguidance/XEH_postInit.sqf similarity index 76% rename from addons/missileguidance/XEH_post_init.sqf rename to addons/missileguidance/XEH_postInit.sqf index cc09b1f0ac..eb0fb60abf 100644 --- a/addons/missileguidance/XEH_post_init.sqf +++ b/addons/missileguidance/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -[QGVAR(handoff), {_this call FUNC(handleHandoff)}] call CBA_fnc_addEventHandler; +[QGVAR(handoff), LINKFUNC(handleHandoff)] call CBA_fnc_addEventHandler; ["ACE3 Weapons", QGVAR(cycleFireMode), localize LSTRING(CycleFireMode), { diff --git a/addons/missileguidance/XEH_pre_init.sqf b/addons/missileguidance/XEH_preInit.sqf similarity index 100% rename from addons/missileguidance/XEH_pre_init.sqf rename to addons/missileguidance/XEH_preInit.sqf diff --git a/addons/missileguidance/functions/fnc_handleHandoff.sqf b/addons/missileguidance/functions/fnc_handleHandoff.sqf index 9c6e299d01..785071da01 100644 --- a/addons/missileguidance/functions/fnc_handleHandoff.sqf +++ b/addons/missileguidance/functions/fnc_handleHandoff.sqf @@ -19,4 +19,4 @@ params ["_target", "_args"]; if (isNil "_target" || {isNull _target} || {!local _target} ) exitWith { false }; -[FUNC(guidancePFH), 0, _args] call CBA_fnc_addPerFrameHandler; +[LINKFUNC(guidancePFH), 0, _args] call CBA_fnc_addPerFrameHandler; diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf index 1f3519f8c9..18eaf2a7c7 100644 --- a/addons/missileguidance/functions/fnc_onFired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -145,7 +145,7 @@ if (_onFiredFunc != "") then { // _stateParams params ["_lastRunTime", "_seekerStateParams", "_attackProfileStateParams", "_lastKnownPosState"]; // _seekerParams params ["_seekerAngle", "_seekerAccuracy", "_seekerMaxRange", "_seekerMinRange"]; -[FUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler; +[LINKFUNC(guidancePFH), 0, _args ] call CBA_fnc_addPerFrameHandler; /* Clears locking settings diff --git a/addons/missileguidance/functions/fnc_seekerType_ARH.sqf b/addons/missileguidance/functions/fnc_seekerType_ARH.sqf index 20571e3d65..54e487a9a0 100644 --- a/addons/missileguidance/functions/fnc_seekerType_ARH.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_ARH.sqf @@ -72,7 +72,7 @@ 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 { + if (_nearestObjects isEqualTo []) exitWith { _projectile setMissileTarget objNull; _searchPos }; @@ -117,4 +117,3 @@ if !(isNull _target) then { _launchParams set [0, _target]; _expectedTargetPos - diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf index 63465a6588..88e2ba02d5 100644 --- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf +++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf @@ -55,11 +55,9 @@ private _missionRoot = str missionConfigFile select [0, count str missionConfigF ERROR_1("Ambient Sounds: Sound ""%1"" not found.",_x); }; }; +} forEach _splittedList; - false -} count _splittedList; - -if (count _ambianceSounds == 0) exitWith {}; +if (_ambianceSounds isEqualTo []) exitWith {}; { if ((_x find ".") == -1) then { _ambianceSounds set [_forEachIndex, _x + ".wss"]; @@ -82,7 +80,7 @@ TRACE_1("",_ambianceSounds); private _allUnits = if (isMultiplayer) then {playableUnits} else {[ACE_player]}; // Check if there are enough players to even start playing this sound. - if (count _allUnits > 0) then { + if (_allUnits isNotEqualTo []) then { // find the position from which we are going to play this sound from. private _newPosASL = if (_followPlayers) then { // Select a target unit at random. diff --git a/addons/mk6mortar/CfgMagazines.hpp b/addons/mk6mortar/CfgMagazines.hpp index 0d5c1d5703..e0626479c4 100644 --- a/addons/mk6mortar/CfgMagazines.hpp +++ b/addons/mk6mortar/CfgMagazines.hpp @@ -1,10 +1,11 @@ -class cfgMagazines { +class CfgMagazines { class 8Rnd_82mm_Mo_shells; class ACE_1Rnd_82mm_Mo_HE: 8Rnd_82mm_Mo_shells { count = 1; scope = 2; scopeCurator = 2; EGVAR(arsenal,hide) = -1; + type = 256; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_HE_displayName); displayNameShort = ""; @@ -19,6 +20,7 @@ class cfgMagazines { scope = 2; scopeCurator = 2; EGVAR(arsenal,hide) = -1; + type = 256; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_Smoke_displayName); displayNameShort = ""; @@ -33,6 +35,7 @@ class cfgMagazines { scope = 2; scopeCurator = 2; EGVAR(arsenal,hide) = -1; + type = 256; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_Illum_displayName); displayNameShort = ""; @@ -47,6 +50,7 @@ class cfgMagazines { scope = 2; scopeCurator = 2; EGVAR(arsenal,hide) = -1; + type = 256; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_HE_Guided_displayName); displayNameShort = ""; @@ -61,6 +65,7 @@ class cfgMagazines { scope = 2; scopeCurator = 2; EGVAR(arsenal,hide) = -1; + type = 256; author = ECSTRING(common,ACETeam); displayName = CSTRING(magazine_HE_LaserGuided_displayName); displayNameShort = ""; diff --git a/addons/mk6mortar/XEH_postInit.sqf b/addons/mk6mortar/XEH_postInit.sqf index 9f24a12a3b..280e16cf79 100644 --- a/addons/mk6mortar/XEH_postInit.sqf +++ b/addons/mk6mortar/XEH_postInit.sqf @@ -1,16 +1,17 @@ #include "script_component.hpp" if (hasInterface) then { - ["ace_infoDisplayChanged", FUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler; + #include "initKeybinds.inc.sqf" + ["ace_infoDisplayChanged", LINKFUNC(turretDisplayLoaded)] call CBA_fnc_addEventHandler; }; ["CBA_settingsInitialized", { TRACE_4("CBA_settingsInitialized",GVAR(airResistanceEnabled),GVAR(allowComputerRangefinder),GVAR(allowCompass),GVAR(useAmmoHandling)); - ["vehicle", FUNC(handlePlayerVehicleChanged), true] call CBA_fnc_addPlayerEventHandler; + ["vehicle", LINKFUNC(handlePlayerVehicleChanged), true] call CBA_fnc_addPlayerEventHandler; if (!GVAR(airResistanceEnabled)) exitWith {}; if (EGVAR(artillerytables,advancedCorrections)) exitWith { TRACE_1("defer firedEH to artillerytables",_this); }; - ["Mortar_01_base_F", "fired", {call FUNC(handleFired)}] call CBA_fnc_addClassEventHandler; + ["Mortar_01_base_F", "fired", LINKFUNC(handleFired)] call CBA_fnc_addClassEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index c09c96f777..f2979d0e4e 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -24,11 +24,11 @@ params ["_vehicle", "", "", "", "", "", "_projectile"]; // Large enough distance to not simulate any wind deflection -if (_vehicle distance ACE_player > 8000) exitWith {false}; +if (_vehicle distance ACE_player > 8000) exitWith {}; //AI will have no clue how to use: private _shooterMan = gunner _vehicle; -if (!([_shooterMan] call EFUNC(common,isPlayer))) exitWith {false}; +if (!([_shooterMan] call EFUNC(common,isPlayer))) exitWith {}; //Calculate air density: private _altitude = (getPosASL _vehicle) select 2; diff --git a/addons/mk6mortar/initKeybinds.inc.sqf b/addons/mk6mortar/initKeybinds.inc.sqf new file mode 100644 index 0000000000..0e3a53c1d9 --- /dev/null +++ b/addons/mk6mortar/initKeybinds.inc.sqf @@ -0,0 +1,15 @@ +#include "\a3\ui_f\hpp\defineDIKCodes.inc" + +["ACE3 Equipment", QGVAR(rangetable_action), LLSTRING(rangetable_action), { + if ( + !([ACE_player, "ACE_RangeTable_82mm"] call EFUNC(common,hasItem)) || + !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) + ) exitWith {false}; + + // Close previously opened dialogs + closeDialog 0; + + // Statement + [] call FUNC(rangeTableOpen); + true +}] call CBA_fnc_addKeybind; // Unbound diff --git a/addons/movement/XEH_postInit.sqf b/addons/movement/XEH_postInit.sqf index f64b92603b..4d7cc5ba12 100644 --- a/addons/movement/XEH_postInit.sqf +++ b/addons/movement/XEH_postInit.sqf @@ -3,8 +3,8 @@ if (!hasInterface) exitWith {}; -["unit", FUNC(handleVirtualMass)] call CBA_fnc_addPlayerEventHandler; -["loadout", FUNC(handleVirtualMass)] call CBA_fnc_addPlayerEventHandler; +["unit", LINKFUNC(handleVirtualMass)] call CBA_fnc_addPlayerEventHandler; +["loadout", LINKFUNC(handleVirtualMass)] call CBA_fnc_addPlayerEventHandler; ["ACE3 Movement", QGVAR(climb), localize LSTRING(Climb), { // Conditions: canInteract diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index 7e9d156014..f831a3209f 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -138,8 +138,7 @@ if (_enabledTagsNearby) then { [ACE_player, _target, _alpha, _distance * 0.026, _drawName, _drawRank, _drawSoundwave] call FUNC(drawNameTagIcon); }; }; - nil - } count _targets; + } forEach _targets; }; END_COUNTER(GVAR(onDraw3d)); diff --git a/addons/nightvision/ACE_Arsenal_Stats.hpp b/addons/nightvision/ACE_Arsenal_Stats.hpp index 0b42d136f6..e6d2a87c89 100644 --- a/addons/nightvision/ACE_Arsenal_Stats.hpp +++ b/addons/nightvision/ACE_Arsenal_Stats.hpp @@ -3,7 +3,7 @@ class EGVAR(arsenal,stats) { class GVAR(generation): statBase { scope = 2; priority = 1.6; - condition = QUOTE('nvg' in (getArray ((_this select 1) >> 'visionMode') apply {toLower _x})); + condition = QUOTE('nvg' in (getArray ((_this select 1) >> 'visionMode') apply {toLowerANSI _x})); displayName = CSTRING(NVGeneration); showText = 1; textStatement = QUOTE(call FUNC(statTextStatement_NVGeneration)); diff --git a/addons/nightvision/XEH_preInit.sqf b/addons/nightvision/XEH_preInit.sqf index 894773534a..8251bf8baf 100644 --- a/addons/nightvision/XEH_preInit.sqf +++ b/addons/nightvision/XEH_preInit.sqf @@ -8,4 +8,7 @@ PREP_RECOMPILE_END; #include "initSettings.inc.sqf" +// #9781 - register effects layer ASAP +QGVAR(display) cutText ["", "PLAIN"]; + ADDON = true; diff --git a/addons/nightvision/functions/fnc_onCameraViewChanged.sqf b/addons/nightvision/functions/fnc_onCameraViewChanged.sqf index 2cbec4d16e..6f03c2a3af 100644 --- a/addons/nightvision/functions/fnc_onCameraViewChanged.sqf +++ b/addons/nightvision/functions/fnc_onCameraViewChanged.sqf @@ -23,7 +23,7 @@ TRACE_2("onCameraViewChanged",_unit,_cameraView); call FUNC(refreshGoggleType); if (GVAR(disableNVGsWithSights) && {(hmd _unit) != ""}) then { - if ((vehicle _unit == _unit) + if ((isNull objectParent _unit) || {isTurnedOut _unit} || {!([_unit] call EFUNC(common,hasHatch)) && {[_unit] call EFUNC(common,getTurretIndex) in ([vehicle _unit] call EFUNC(common,getTurretsFFV))} diff --git a/addons/nightvision/functions/fnc_onVisionModeChanged.sqf b/addons/nightvision/functions/fnc_onVisionModeChanged.sqf index 1913454f3f..8086b2d1a0 100644 --- a/addons/nightvision/functions/fnc_onVisionModeChanged.sqf +++ b/addons/nightvision/functions/fnc_onVisionModeChanged.sqf @@ -21,7 +21,7 @@ TRACE_2("onVisionModeChanged",_unit,_visionMode); // Handle disableNVGsWithSights setting: if (GVAR(disableNVGsWithSights) && {(hmd _unit) != ""}) then { - if ((vehicle _unit == _unit) + if ((isNull objectParent _unit) || {isTurnedOut _unit} || {!([_unit] call EFUNC(common,hasHatch)) && {[_unit] call EFUNC(common,getTurretIndex) in ([vehicle _unit] call EFUNC(common,getTurretsFFV))} diff --git a/addons/nightvision/functions/fnc_setupDisplayEffects.sqf b/addons/nightvision/functions/fnc_setupDisplayEffects.sqf index bb7067689c..6e480c1ca6 100644 --- a/addons/nightvision/functions/fnc_setupDisplayEffects.sqf +++ b/addons/nightvision/functions/fnc_setupDisplayEffects.sqf @@ -48,10 +48,9 @@ if (GVAR(fogScaling) > 0) then { }; }; -// Note: Using BIS_fnc_rscLayer because of bug with string syntax - https://feedback.bistudio.com/T120768 -(QGVAR(display) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; // Cleanup Old Display +QGVAR(display) cutText ["", "PLAIN"]; // Cleanup Old Display if (_activated) then { // Create New Display - (QGVAR(display) call BIS_fnc_rscLayer) cutRsc [QGVAR(title), "PLAIN", 0, false, false]; // draw under HUD + QGVAR(display) cutRsc [QGVAR(title), "PLAIN", 0, false, false]; // draw under HUD }; // Cleanup Old PP Effects diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index ef57732337..e1345ec44e 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -131,6 +131,7 @@ NS-Brille (3. Generation, Braun, WP) 야투경 (3세대, 갈색, 백색광) JVN (Gen3, marron, WP) + ПНВ (Gen3, Коричневый, БФ) Night Vision Goggles, White Phosphor @@ -140,6 +141,7 @@ Nachtsichtbrille, weißer Phosphor 백색광 야투경 Jumelles Vision Nocturne, Phosphore blanc + Очки ночного видения, белый фосфор NV Goggles (Gen3, Green) @@ -166,6 +168,7 @@ NS-Brille (3. Generation, Grün, WP) 야투경 (3세대, 녹색, 백색광) JVN (Gen3, vertes, WP) + ПНВ (Gen3, Зелёный, БФ) NV Goggles (Gen3, Black) @@ -192,6 +195,7 @@ NS-Brille (3. Generation, Schwarz, WP) 야투경 (3세대, 검정, 백색광) JVN (Gen3, noires, WP) + ПНВ (Gen3, Чёрный, БФ) NV Goggles (Gen4, Brown) @@ -213,6 +217,7 @@ NS-Brille (4. Generation, Braun, WP) 야투경 (4세대, 갈색, 백색광) JVN (Gen4, marron, WP) + ПНВ (Gen4, Коричневый, БФ) NV Goggles (Gen4, Black) @@ -234,6 +239,7 @@ NS-Brille (4. Generation, Schwarz, WP) 야투경 (4세대, 검정, 백색광) JVN (Gen4, noires, WP) + ПНВ (Gen4, Чёрный, БФ) NV Goggles (Gen4, Green) @@ -255,6 +261,7 @@ NS-Brille (4. Generation, Grün, WP) 야투경 (4세대, 녹색, 백색광) JVN (Gen4, vertes, WP) + ПНВ (Gen4, Зелёный, БФ) NV Goggles (Wide, Brown) @@ -276,6 +283,7 @@ NS-Brille (Weit, Braun, WP) 야투경 (넓음, 갈색, 백색광) JVN (Large, marron, WP) + ПНВ (Широкий, Коричневый, БФ) NV Goggles (Wide, Black) @@ -297,6 +305,7 @@ NS-Brille (Weit, Schwarz, WP) 야투경 (넓음, 검정, 백색광) JVN (Large, noires, WP) + ПНВ (Широкий, Чёрный, БФ) NV Goggles (Wide, Green) @@ -318,6 +327,7 @@ NS-Brille (Weit, Grün, WP) 야투경 (넓음, 녹색, 백색광) JVN (Large, vertes, WP) + ПНВ (Широкий, Зелёный, БФ) Brightness: %1 @@ -576,6 +586,7 @@ Nachtsicht-Generation 야투경 세대 Génération de jumelles de vision nocturne + Генерация ночного видения Gen %1 @@ -585,6 +596,7 @@ Gen %1 %1세대 Gen %1 + Генерация %1 diff --git a/addons/novehicleclanlogo/stringtable.xml b/addons/novehicleclanlogo/stringtable.xml index d3f01899a9..96d463f582 100644 --- a/addons/novehicleclanlogo/stringtable.xml +++ b/addons/novehicleclanlogo/stringtable.xml @@ -5,7 +5,7 @@ Remove clan logo from vehicles Usuń logo klanu z pojazdów 차량에서 클랜 로고 제거 - Убрать логотип кланов с техники + Убрать логотип отрядов с техники Suprimir logo del clan de los vehículos 乗り物から部隊ロゴを削除 Clan-Logo von Fahrzeugen entfernen @@ -16,7 +16,7 @@ Prevents clan logo from being displayed on vehicles controlled by players. Zapobiega wyświetlaniu logo klanu na pojazdach kontrolowanych przez graczy. 플레이어가 조종하는 차량에 클랜 로고가 표시되지 않도록 합니다. - Не отображать логотипы кланов на технике контроллируемой игроками. + Не отображать логотипы отрядов на технике контроллируемой игроками. Previene que se muestre el logo del clan en los vehículos controlados por jugadores. プレイヤーが操作する乗り物に部隊ロゴが表示されないようにする。 Verhindert, dass das Clan-Logo auf von Spielern kontrollierten Fahrzeugen angezeigt wird. diff --git a/addons/optics/XEH_postInit.sqf b/addons/optics/XEH_postInit.sqf index abb97e5b5d..1641ee2174 100644 --- a/addons/optics/XEH_postInit.sqf +++ b/addons/optics/XEH_postInit.sqf @@ -28,4 +28,4 @@ GVAR(camera) = objNull; }] call CBA_fnc_addPlayerEventHandler; // Register fire event handler -["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler; +["ace_firedPlayer", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler; diff --git a/addons/optionsmenu/initSettings.inc.sqf b/addons/optionsmenu/initSettings.inc.sqf index bf77a84fcc..e5bb44e512 100644 --- a/addons/optionsmenu/initSettings.inc.sqf +++ b/addons/optionsmenu/initSettings.inc.sqf @@ -5,5 +5,9 @@ private _category = [LELSTRING(common,categoryUncategorized), LLSTRING(aceNews)] LSTRING(showNewsOnMainMenu_name), _category, true, - 0 + 0, + { + if (!hasInterface) exitWith {}; + profileNamespace setVariable [QGVAR(showNewsOnMainMenu), _this]; + } ] call CBA_fnc_addSetting; diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 8f02d734e5..a49030b1ad 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -35,8 +35,8 @@ if (hasInterface) then { GVAR(storedSpareBarrels) = createHashMap; // Install event handlers for spare barrels - [QGVAR(sendSpareBarrelTemperatureHint), FUNC(sendSpareBarrelsTemperaturesHint)] call CBA_fnc_addEventHandler; - [QGVAR(loadCoolestSpareBarrel), FUNC(loadCoolestSpareBarrel)] call CBA_fnc_addEventHandler; + [QGVAR(sendSpareBarrelTemperatureHint), LINKFUNC(sendSpareBarrelsTemperaturesHint)] call CBA_fnc_addEventHandler; + [QGVAR(loadCoolestSpareBarrel), LINKFUNC(loadCoolestSpareBarrel)] call CBA_fnc_addEventHandler; // Schedule cool down calculation of stored spare barrels [] call FUNC(updateSpareBarrelsTemperaturesThread); @@ -50,14 +50,14 @@ if (hasInterface) then { //Add Take EH if required if (GVAR(unJamOnReload) || {GVAR(cookoffCoef) > 0}) then { - ["CAManBase", "Take", {_this call FUNC(handleTakeEH);}] call CBA_fnc_addClassEventHandler; + ["CAManBase", "Take", LINKFUNC(handleTakeEH)] call CBA_fnc_addClassEventHandler; }; // Register fire event handler - ["ace_firedPlayer", DFUNC(firedEH)] call CBA_fnc_addEventHandler; + ["ace_firedPlayer", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler; // Only add eh to non local players if dispersion is enabled if (GVAR(overheatingDispersion) || {GVAR(showParticleEffectsForEveryone)}) then { - ["ace_firedPlayerNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler; + ["ace_firedPlayerNonLocal", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler; }; // Schedule cool down calculation of player weapons at (infrequent) regular intervals @@ -86,10 +86,10 @@ if (hasInterface) then { }] call CBA_fnc_addClassEventHandler; // Install event handler to display temp when a barrel was swapped - [QGVAR(showWeaponTemperature), DFUNC(displayTemperature)] call CBA_fnc_addEventHandler; + [QGVAR(showWeaponTemperature), LINKFUNC(displayTemperature)] call CBA_fnc_addEventHandler; // Install event handler to initiate an assisted barrel swap - [QGVAR(initiateSwapBarrelAssisted), DFUNC(swapBarrel)] call CBA_fnc_addEventHandler; + [QGVAR(initiateSwapBarrelAssisted), LINKFUNC(swapBarrel)] call CBA_fnc_addEventHandler; // Add an action to allow hot weapons to be cooled off in AceX Field Rations water sources if (["acex_field_rations"] call EFUNC(common,isModLoaded)) then { diff --git a/addons/overheating/functions/fnc_calculateCooling.sqf b/addons/overheating/functions/fnc_calculateCooling.sqf index f01f3950e7..e7ac83f236 100644 --- a/addons/overheating/functions/fnc_calculateCooling.sqf +++ b/addons/overheating/functions/fnc_calculateCooling.sqf @@ -7,6 +7,7 @@ * 0: Initial temperature * 1: Barrel mass * 2: Time interval + * 3: Bolt type * * Return Value: * Final temperature @@ -17,7 +18,7 @@ * Public: No */ -params ["_temperature", "_barrelMass", "_totalTime"]; +params ["_temperature", "_barrelMass", "_totalTime", "_boltType"]; // The lowest temperature a weapon can reach is the ambient air temperature. private _ambientTemperature = ambientTemperature select 0; @@ -43,6 +44,9 @@ if (ACE_player call EFUNC(common,isSwimming)) then { _convectionRate = _convectionRate * ((linearConversion [0,1,rain,1,5,true] + (5 min (vectorMagnitude wind / 10))) / 2); }; +//Increase convection cooling for open bolt type guns +if (_boltType == 0) then {_convectionRate = _convectionRate * OPEN_BOLT_ADDITIONAL_CONVECTION}; + TRACE_4("cooling",_temperature,_totalTime,_barrelMass,_barrelSurface); private _time = 0; diff --git a/addons/overheating/functions/fnc_coolWeaponWithItem.sqf b/addons/overheating/functions/fnc_coolWeaponWithItem.sqf index bc21963fb6..e5e79aaf62 100644 --- a/addons/overheating/functions/fnc_coolWeaponWithItem.sqf +++ b/addons/overheating/functions/fnc_coolWeaponWithItem.sqf @@ -61,8 +61,8 @@ private _fnc_onSuccess = { }; // cool the weapon - private _barrelMass = ([_weapon] call FUNC(getWeaponData)) select 7; - _temperature = [_temperature, _barrelMass, _liquidAmount * 10] call FUNC(calculateCooling); + private _weaponData = [_weapon] call FUNC(getWeaponData); + _temperature = [_temperature, _weaponData select 7, _liquidAmount * 10, _weaponData select 6] call FUNC(calculateCooling); [_target, _tempVarName, _temperature, TEMP_TOLERANCE] call EFUNC(common,setApproximateVariablePublic); }; diff --git a/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf b/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf index acf3286c4a..67f22a3cc0 100644 --- a/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf +++ b/addons/overheating/functions/fnc_coolWeaponWithWaterSource.sqf @@ -59,8 +59,8 @@ private _fnc_condition = { }; //Cool the weapon down - private _barrelMass = ([_weapon] call FUNC(getWeaponData)) select 7; - _temperature = [_temperature, _barrelMass, 20] call FUNC(calculateCooling); + private _weaponData = [_weapon] call FUNC(getWeaponData); + _temperature = [_temperature, _weaponData select 7, 20, _weaponData select 6] call FUNC(calculateCooling); [_player, _tempVarName, _temperature, TEMP_TOLERANCE] call EFUNC(common,setApproximateVariablePublic); /* // to be added when licence compatible audio can be found or recorded diff --git a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf index 29b7191471..a5fb95cf31 100644 --- a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf +++ b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf @@ -31,7 +31,7 @@ if (_weaponBarrelClass == "") then { // Find all spare barrel the player has private _allBarrels = [_assistant, _weaponBarrelClass] call CBA_fnc_getMagazineIndex; TRACE_1("_allBarrels",_allBarrels); -if ((count _allBarrels) < 1) exitWith {}; +if (_allBarrels isEqualTo []) exitWith {}; // Determine which on is coolest private _coolestTemp = 10000; diff --git a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf index 9204b58124..5f75423f2e 100644 --- a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf +++ b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf @@ -32,7 +32,7 @@ if (_weaponBarrelClass == "") then { }; private _allBarrels = [_unit, _weaponBarrelClass] call CBA_fnc_getMagazineIndex; TRACE_1("_allBarrels",_allBarrels); -if ((count _allBarrels) < 1) exitWith {}; +if (_allBarrels isEqualTo []) exitWith {}; // Determine the temp of each barrel private _temps = []; diff --git a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf index 64110b2c76..da87c5fdba 100644 --- a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf +++ b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf @@ -20,10 +20,10 @@ TRACE_1("updateSpareBarrelsTemperaturesThread1",GVAR(storedSpareBarrels)); _y params ["_initialTemp","_initialTime", "_barrelMass"]; // Calculate cooling - private _finalTemp = [_initialTemp, _barrelMass, CBA_missionTime - _initialTime] call FUNC(calculateCooling); + private _finalTemp = [_initialTemp, _barrelMass, CBA_missionTime - _initialTime, 0] call FUNC(calculateCooling); //the zero is to indicate an open bolt gun. Barrel is outside of a gun here, so always open. TRACE_4("updateSpareBarrelsTemperaturesThread2",_barrelMagazineID,_initialTemp,_finalTemp,_barrelMass); - if (_finalTemp < 5) then { - // The barrel is cool enough to keep calculating. Remove it from the hash + if (_finalTemp <= (ambientTemperature select 0)) then { + // The barrel is cool enough to finish calculating. Remove it from the hash GVAR(storedSpareBarrels) deleteAt _x; } else { // Store the new temp diff --git a/addons/overheating/functions/fnc_updateTemperature.sqf b/addons/overheating/functions/fnc_updateTemperature.sqf index 8d5ca5d412..db7f48be83 100644 --- a/addons/overheating/functions/fnc_updateTemperature.sqf +++ b/addons/overheating/functions/fnc_updateTemperature.sqf @@ -33,8 +33,9 @@ _trackedWeapons pushBackUnique _tempVarName; _unit setVariable [QGVAR(trackedWeapons), _trackedWeapons]; // Calculate cooling -private _barrelMass = ([_weapon] call FUNC(getWeaponData)) select 7; -_temperature = [_temperature, _barrelMass, CBA_missionTime - _lastTime] call FUNC(calculateCooling); +private _weaponData = [_weapon] call FUNC(getWeaponData); +private _barrelMass = _weaponData select 7; +_temperature = [_temperature, _barrelMass, CBA_missionTime - _lastTime, _weaponData select 6] call FUNC(calculateCooling); TRACE_1("cooledTo",_temperature); // Calculate heating diff --git a/addons/overheating/script_component.hpp b/addons/overheating/script_component.hpp index 0837733cd3..dd1b18806f 100644 --- a/addons/overheating/script_component.hpp +++ b/addons/overheating/script_component.hpp @@ -19,6 +19,7 @@ #define TEMP_TOLERANCE 50 #define METAL_MASS_RATIO 0.55 #define GUNPOWDER_IGNITION_TEMP 180 +#define OPEN_BOLT_ADDITIONAL_CONVECTION 1.1 #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 4160a77ea8..48399b443c 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -877,33 +877,51 @@ Bolt Type + Tipo di otturatore 遊底(ボルト)形式 노리쇠 방식 + Тип болта + Type d'obturateur Open Bolt + Otturatore Aperto オープンボルト 오픈 볼트 + Открыть болт + Obturateur ouvert Closed Bolt + Otturatore Chiuso クローズドボルト 클로즈드 볼트 + Закрыть болт + Obturateur fermé Barrel Type + Tipo di Canna 銃身形式 총열 방식 + Тип ствола + Type de canon Non-Removeable + Non-Rimovibile 取り外し不可 제거 불가 + Несъемный + Inamovible Quick Change + Cambio Rapido 即時交換可 신속 교체 + Быстросъемный + Changement rapide diff --git a/addons/parachute/RscTitles.hpp b/addons/parachute/RscTitles.hpp index 9e0a169937..48cf11bee4 100644 --- a/addons/parachute/RscTitles.hpp +++ b/addons/parachute/RscTitles.hpp @@ -39,10 +39,10 @@ class RscTitles { }; class TimeText: RscText { idc = 1001; - text = "00:00"; - x = "0.206094 * safezoneW + safezoneX"; + text = "00:00:00"; + x = "0.202094 * safezoneW + safezoneX"; y = "0.819 * safezoneH + safezoneY"; - w = "0.0309375 * safezoneW"; + w = "0.0380375 * safezoneW"; h = "0.022 * safezoneH"; colorText[] = {0,0,0,1}; }; diff --git a/addons/parachute/XEH_postInit.sqf b/addons/parachute/XEH_postInit.sqf index 1217fa3cab..f10748b0cf 100644 --- a/addons/parachute/XEH_postInit.sqf +++ b/addons/parachute/XEH_postInit.sqf @@ -34,9 +34,9 @@ if (!hasInterface) exitWith {}; }, {false}, [24, [false, false, false]], false] call CBA_fnc_addKeybind; // Handle reserve chute based on current backpack (fires when parachute opens too) -["loadout", FUNC(handleReserve), true] call CBA_fnc_addPlayerEventHandler; +["loadout", LINKFUNC(handleReserve), true] call CBA_fnc_addPlayerEventHandler; // Don't show vanilla speed and height when in expert mode -["ace_infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call CBA_fnc_addEventHandler; +["ace_infoDisplayChanged", LINKFUNC(handleInfoDisplayChanged)] call CBA_fnc_addEventHandler; -["vehicle", {_this call FUNC(handleFailureChance)}] call CBA_fnc_addPlayerEventHandler; +["vehicle", LINKFUNC(handleFailureChance)] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf index d4533a7a6b..f86f785cc6 100644 --- a/addons/parachute/functions/fnc_showAltimeter.sqf +++ b/addons/parachute/functions/fnc_showAltimeter.sqf @@ -40,8 +40,10 @@ private _TimeText = _display displayCtrl 1001; _pfhID call CBA_fnc_removePerFrameHandler; }; - private _hour = floor daytime; - private _minute = floor ((daytime - _hour) * 60); + private _daytime = dayTime; + private _hour = floor _daytime; + private _minute = floor ((_daytime - _hour) * 60); + private _seconds = floor ((((_daytime - _hour) * 60) - _minute) * 60); private _curTime = CBA_missionTime; private _timeDiff = _curTime - _prevTime; @@ -52,7 +54,7 @@ private _TimeText = _display displayCtrl 1001; 0 }; - _TimeText ctrlSetText (format ["%1:%2", [_hour, 2] call CBA_fnc_formatNumber, [_minute, 2] call CBA_fnc_formatNumber]); + _TimeText ctrlSetText (format ["%1:%2:%3", [_hour, 2] call CBA_fnc_formatNumber, [_minute, 2] call CBA_fnc_formatNumber, [_seconds, 2] call CBA_fnc_formatNumber]); _HeightText ctrlSetText str floor _height; _DecendRate ctrlSetText str (_descentRate max 0); diff --git a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf index e55d498809..c1318e3f74 100644 --- a/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf +++ b/addons/quickmount/functions/fnc_addFreeSeatsActions.sqf @@ -29,6 +29,7 @@ #define TO_COMPARTMENT_STRING(var) if !(var isEqualType "") then {var = format [ARR_2("Compartment%1",var)]} // if unit isn't moved to new seat in TAKEN_SEAT_TIMEOUT, we move him back to his seat +#pragma hemtt suppress pw3_padded_arg file #define WAIT_IN_OR_MOVE_BACK \ [ARR_5( \ {!isNull objectParent (_this select 0)}, \ @@ -158,7 +159,7 @@ private _cargoNumber = -1; }; } else { private ["_name", "_icon", "_statement", "_params"]; - switch (toLower _role) do { + switch (toLowerANSI _role) do { case "driver": { if ( lockedDriver _vehicle diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf index c618681f7e..5e6c21eb36 100644 --- a/addons/quickmount/functions/fnc_getInNearest.sqf +++ b/addons/quickmount/functions/fnc_getInNearest.sqf @@ -69,7 +69,7 @@ if (!isNull _target && { _x params ["_unit", "_role", "_cargoIndex", "_turretPath"]; if ((isNull _unit) || {!alive _unit}) then { - private _effectiveRole = toLower _role; + private _effectiveRole = toLowerANSI _role; if ((_effectiveRole in ["driver", "gunner"]) && {unitIsUAV _target}) exitWith {}; // Ignoring UAV Driver/Gunner if ((_effectiveRole == "driver") && {(getNumber (configOf _target >> "hasDriver")) == 0}) exitWith {}; // Ignoring Non Driver (static weapons) diff --git a/addons/rangecard/XEH_postInit.sqf b/addons/rangecard/XEH_postInit.sqf index 6adc4cf2a1..af4dfa923c 100644 --- a/addons/rangecard/XEH_postInit.sqf +++ b/addons/rangecard/XEH_postInit.sqf @@ -1,7 +1,5 @@ #include "script_component.hpp" -#include "initKeybinds.inc.sqf" - GVAR(RangeCardOpened) = false; GVAR(controls) = []; @@ -17,3 +15,7 @@ GVAR(boreHeightCopy) = 3.81; GVAR(ammoClassCopy) = "";//"ACE_762x51_Ball_M118LR"; GVAR(magazineClassCopy) = "";//"ACE_20Rnd_762x51_M118LR_Mag"; GVAR(weaponClassCopy) = "";//srifle_DMR_06_olive_F"; + +if (!hasInterface) exitWith {}; + +#include "initKeybinds.inc.sqf" diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index 999dfc5a2e..c2c8673844 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -100,7 +100,7 @@ private _barrelLength = _weaponConfig select 2; private _muzzleVelocity = 0; private _bc = 0; -if (count (_ammoConfig select 6) > 0) then { +if ((_ammoConfig select 6) isNotEqualTo []) then { _bc = (_ammoConfig select 6) select 0; }; private _transonicStabilityCoef = _ammoConfig select 4; diff --git a/addons/rearm/functions/fnc_addRearmActions.sqf b/addons/rearm/functions/fnc_addRearmActions.sqf index e71cab8f0c..200dd2f2b4 100644 --- a/addons/rearm/functions/fnc_addRearmActions.sqf +++ b/addons/rearm/functions/fnc_addRearmActions.sqf @@ -30,7 +30,9 @@ private _cswCarryMagazines = []; private _vehicleActions = []; { private _vehicle = _x; - + private _displayName = getText (configOf _vehicle >> "displayName"); + private _distanceStr = (ACE_player distance _vehicle) toFixed 1; + private _actionName = format ["%1 (%2m)", _displayName, _distanceStr]; // Array of magazines that can be rearmed in the vehicle private _needRearmMags = ([_vehicle] call FUNC(getNeedRearmMagazines)) apply {_x select 0}; @@ -57,7 +59,7 @@ private _vehicleActions = []; // [Level 0] adds a single action to rearm the entire vic private _action = [ _vehicle, - getText(configOf _vehicle >> "displayName"), + _actionName, _icon, {_this call FUNC(rearmEntireVehicle)}, {true}, @@ -84,7 +86,7 @@ private _vehicleActions = []; private _action = [ _vehicle, - getText(configOf _vehicle >> "displayName"), + _actionName, _icon, {}, {true}, diff --git a/addons/rearm/functions/fnc_hasEnoughSupply.sqf b/addons/rearm/functions/fnc_hasEnoughSupply.sqf index c7efb7eca6..8b606bdf6f 100644 --- a/addons/rearm/functions/fnc_hasEnoughSupply.sqf +++ b/addons/rearm/functions/fnc_hasEnoughSupply.sqf @@ -44,7 +44,6 @@ if (GVAR(supply) == 2) exitWith { { _x params ["_magazine", "_rounds"]; if ((_magazine isEqualTo _magazineClass) && (_rounds > 0)) exitWith {_magazinePresent = true; }; - false - } count _magazineSupply; + } forEach _magazineSupply; _magazinePresent }; diff --git a/addons/rearm/functions/fnc_initSupplyVehicle.sqf b/addons/rearm/functions/fnc_initSupplyVehicle.sqf index 7749f0b609..4ab04fcaf6 100644 --- a/addons/rearm/functions/fnc_initSupplyVehicle.sqf +++ b/addons/rearm/functions/fnc_initSupplyVehicle.sqf @@ -33,7 +33,7 @@ if (!alive _vehicle) exitWith {}; private _configSupply = getNumber (_configOf >> QGVAR(defaultSupply)); if (_configSupply == 0) then { - _configSupply = getNumber (_config >> "transportAmmo"); + _configSupply = getNumber (_configOf >> "transportAmmo"); }; private _isSupplyVehicle = _vehicle getVariable [QGVAR(isSupplyVehicle), false]; private _oldRearmConfig = isClass (_configOf >> "ACE_Actions" >> "ACE_MainActions" >> QGVAR(takeAmmo)); diff --git a/addons/rearm/functions/fnc_readSupplyCounter.sqf b/addons/rearm/functions/fnc_readSupplyCounter.sqf index 7526fd013a..f298579705 100644 --- a/addons/rearm/functions/fnc_readSupplyCounter.sqf +++ b/addons/rearm/functions/fnc_readSupplyCounter.sqf @@ -58,8 +58,7 @@ if (GVAR(supply) == 1) then { _numChars = _numChars max (count _line); _text = format ["%1
%2", _text, _line]; _supply = _supply + 0.5; - false - } count _magazines; + } forEach _magazines; }; if (_supply > 1.5) then { [[LSTRING(Hint_RemainingAmmo), _text], _supply, _unit, (_numChars/2.9)] call EFUNC(common,displayTextStructured); diff --git a/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf b/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf index d014e9d58d..396b501dab 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf @@ -28,8 +28,7 @@ if (isServer) then { } else { [QGVAR(rearmEntireVehicleSuccessLocalEH), [_truck, _vehicle, _x], _turretOwnerID] call CBA_fnc_ownerEvent; }; - false - } count _turrets; + } forEach _turrets; } else { [QGVAR(rearmEntireVehicleSuccessEH), _this] call CBA_fnc_serverEvent; }; diff --git a/addons/recoil/XEH_postInit.sqf b/addons/recoil/XEH_postInit.sqf index 29e5464612..639b22d6f9 100644 --- a/addons/recoil/XEH_postInit.sqf +++ b/addons/recoil/XEH_postInit.sqf @@ -1,4 +1,4 @@ #include "script_component.hpp" // Register fire event handler -["ace_firedPlayer", DFUNC(camShake)] call CBA_fnc_addEventHandler; +["ace_firedPlayer", LINKFUNC(camShake)] call CBA_fnc_addEventHandler; diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index e2a7e3a4a1..d68da81db7 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -24,7 +24,7 @@ TRACE_10("firedEH:",_unit,_weapon,_muzzle,_mode,_ammo,_magazine,_projectile,_veh #define BASE_FREQ 13 #define RECOIL_COEF 40 -if (toLower _weapon in ["throw", "put"]) exitWith {}; +if (toLowerANSI _weapon in ["throw", "put"]) exitWith {}; private _powerMod = ([0, -0.1, -0.1, 0, -0.2] select (["STAND", "CROUCH", "PRONE", "UNDEFINED", ""] find stance _unit)) + ([0, -1, 0, -1] select (["INTERNAL", "EXTERNAL", "GUNNER", "GROUP"] find cameraView)); diff --git a/addons/refuel/functions/fnc_canTakeNozzle.sqf b/addons/refuel/functions/fnc_canTakeNozzle.sqf index a2dc39b815..f2fa4a6a9c 100644 --- a/addons/refuel/functions/fnc_canTakeNozzle.sqf +++ b/addons/refuel/functions/fnc_canTakeNozzle.sqf @@ -24,7 +24,7 @@ if (isNull _unit || {!alive _object} || {!isNull (_unit getVariable [QGVAR(nozzle), objNull])} || // Not already carrying a nozzle {(_object getVariable [QGVAR(jerryCan), false]) && {!isNull (_object getVariable [QGVAR(nozzle), objNull])}} || // Prevent jerry cans from being picked up if they have a nozzle connected - {typeOf _object == QGVAR(fuelNozzle) && {!isNull (attachedTo _object)}} || // Not carried by someone else + {!([_unit, _object, [INTERACT_EXCEPTIONS]] call EFUNC(common,canInteractWith))} || // Not carried by someone else {([_unit, _object] call EFUNC(interaction,getInteractionDistance)) > REFUEL_ACTION_DISTANCE}) exitWith {false}; !(_object getVariable [QGVAR(isConnected), false]) && {!(_unit getVariable [QGVAR(isRefueling), false])} diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index ad658492fa..502e1dc3a4 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -116,6 +116,9 @@ private _attachPosModel = _sink worldToModel (ASLtoAGL _bestPosASL); // Reset fuel counter _source setVariable [QGVAR(fuelCounter), 0, true]; + // Let other players access nozzle + [objNull, _nozzle] call EFUNC(common,claim); + [_unit, _sink, _nozzle, _endPosTestOffset] call FUNC(refuel); private _canReceive = getNumber ((configOf _sink) >> QGVAR(canReceive)) == 1; diff --git a/addons/refuel/functions/fnc_dropNozzle.sqf b/addons/refuel/functions/fnc_dropNozzle.sqf index 5ca375dc29..ee37a869e1 100644 --- a/addons/refuel/functions/fnc_dropNozzle.sqf +++ b/addons/refuel/functions/fnc_dropNozzle.sqf @@ -24,6 +24,9 @@ TRACE_3("dropNozzle",_unit,_nozzle,_disconnectOnly); detach _nozzle; _nozzle setVariable [QGVAR(isRefueling), false, true]; +// Remove claim on nozzle +[objNull, _nozzle] call EFUNC(common,claim); + if (_disconnectOnly) exitWith {}; _nozzle setVelocity [0, 0, 0]; diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index d2f1e2aaa5..611fa85e90 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -35,11 +35,9 @@ TRACE_2("start",_unit,_nozzle); _args params ["_unit", "_nozzle"]; if !( - alive _unit + _unit call EFUNC(common,isAwake) && {"" isEqualTo currentWeapon _unit || {_unit call EFUNC(common,isSwimming)}} && {[_unit, objNull, [INTERACT_EXCEPTIONS, "notOnMap"]] call EFUNC(common,canInteractWith)} - && {"unconscious" isNotEqualTo toLower animationState _unit} - && {!(_unit getVariable ["ACE_isUnconscious", false])} ) exitWith { TRACE_3("stop dead/weapon/interact/uncon",_unit,alive _unit,currentWeapon _unit); DROP_NOZZLE diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 8eb0a16f1f..cd8f8b4eb4 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -32,17 +32,23 @@ params [ private _source = _object; private _nozzle = _object; - if (typeOf _object isEqualTo QGVAR(fuelNozzle) || {_object getVariable [QGVAR(jerryCan), false]}) then { // func is called on muzzle either connected or on ground + if (typeOf _object isEqualTo QGVAR(fuelNozzle) || {_object getVariable [QGVAR(jerryCan), false]}) then { // func is called on nozzle either connected or on ground _source = _nozzle getVariable QGVAR(source); if (_nozzle getVariable [QGVAR(jerryCan), false]) then { _nozzle attachTo [_unit, [0,1,0], "pelvis"]; } else { _nozzle attachTo [_unit, [-0.02,0.05,-0.12], "righthandmiddle1"]; }; + + // Don't allow other players to take nozzle + [_unit, _nozzle] call EFUNC(common,claim); } else { // func is called on fuel truck _nozzle = QGVAR(fuelNozzle) createVehicle [0,0,0]; _nozzle attachTo [_unit, [-0.02,0.05,-0.12], "righthandmiddle1"]; + // Don't allow other players to take nozzle + [_unit, _nozzle] call EFUNC(common,claim); + private _ropeTarget = _source; if !(_source isKindOf "AllVehicles") then { private _helper = QGVAR(helper) createVehicle [0,0,0]; diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index 4752f83caf..41a8c5254e 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -58,6 +58,7 @@ Prędkość Tankowania Ładunku Frachtflussrate Vitesse de ravitaillement + Скорость заполнения груза How fast should a fuel source's tank be filled? @@ -68,6 +69,7 @@ Jak szybko zbiornik paliwa powinien być napełniany? Wie schnell sollte der Tank einer Kraftstoffquelle gefüllt werden? A quelle vitesse le réservoir de carburant doit-il être rempli ? + Как быстро должен заполняться бак источника топлива? Refuel @@ -318,6 +320,7 @@ 給油を始める (コンテナ) Rozpocznij tankowanie (zbiornik) Commencer le ravitaillement (container) + Начать заправку топливом (контейнер) Couldn't turn on fuel nozzle @@ -501,6 +504,8 @@ Raccogli contenitore di carburante 燃料キャニスターを持つ 연료통 집어들기 + Взять канистру с топливом + Ramasser le réservoir de carburant Picking fuel canister up... @@ -508,6 +513,8 @@ Raccogliendo contenitore di carburante... 燃料キャニスターを持ち上げています・・・ 연료통 집어드는 중... + Поднимаю канистру с топливом... + Ramasser les bidons de carburant... Connect fuel canister @@ -515,6 +522,8 @@ Collega contenitore di carburante 燃料キャニスターを接続する 연료통 꽂기 + Подсоединить канистру с топливом + Raccorder le réservoir de carburant Connecting fuel canister... @@ -522,6 +531,8 @@ Collegando contenitore di carburante... 燃料キャニスターを接続しています・・・ 연료통 꽂는 중... + Подсоединение топливной канистры... + Raccorder le réservoir de carburant... Disconnect fuel canister @@ -529,6 +540,8 @@ Scollega contenitore di carburante 燃料キャニスターを外します 연료통 빼기 + Отсоединить канистру с топливом + Débrancher le réservoir de carburant Refuel hose length diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index f52c5107e7..e081834e29 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -137,6 +137,7 @@ ベルトがリンクされた Taśma została połączona 탄띠가 연결되었습니다 + Ремень был пристегнут Belt could not be linked @@ -146,6 +147,7 @@ ベルトはリンクされなかった Taśma nie mogła być połączona 탄띠를 연결할 수 없습니다 + Ремень не удалось пристегнуть diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml index 5d3567e5ef..ac42ef4d99 100644 --- a/addons/reloadlaunchers/stringtable.xml +++ b/addons/reloadlaunchers/stringtable.xml @@ -9,6 +9,7 @@ Mostra avviso di ricarica da parte del coppio 동료의 장전에 대한 알림 표시 Affichage de notifications lors d'une rechargement par un ami + Отображает уведомления о загрузке помощника Displays notifications when an assistant loads a gunner's launcher. @@ -18,6 +19,7 @@ Mostra un avviso quando un assistente sta ricaricando il proprio lanciatore. 부사수가 사수의 발사기를 장전할 때 알림을 표시합니다. Affiche une notofication lorsqu'un assistant recharge l'arme du tireur. + Отображает уведомления, когда помощник загружает пусковую установку стрелка. Load launcher @@ -44,6 +46,7 @@ %1 がランチャーを装填しています %1 ładuje twoją wyrzutnię %1이(가) 당신의 발사기를 장전했습니다. + %1 загружает Вашу установку %1 stopped loading your launcher @@ -53,6 +56,7 @@ %1 がランチャーの装填を中断しました %1 przestał ładować twoją wyrzutnię %1이(가) 당신의 발사기 장전을 멈췄습니다. + %1 прекратил загружать Вашу установку Loading launcher... @@ -113,6 +117,7 @@ ランチャーを装填できませんでした Wyrzutnia nie mogła być załadowana 발사기를 장전할 수 없습니다. + Не удалось загрузить пусковую установку Buddy Loading @@ -122,6 +127,7 @@ Chargement par un ami Nachladen durch Kamerad バディローディング + Перезарядка помощником diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 58bb1be6e5..2e9a9178ff 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -2,10 +2,10 @@ ["CBA_settingsInitialized", { - if !GVAR(enabled) exitWith {}; + if (!GVAR(enabled)) exitWith {}; - [QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler; - [QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler; + [QGVAR(setVehicleDamage), LINKFUNC(setDamage)] call CBA_fnc_addEventHandler; + [QGVAR(setVehicleHitPointDamage), LINKFUNC(setHitPointDamage)] call CBA_fnc_addEventHandler; [QGVAR(setWheelHitPointDamage), { params ["_object", "_hitPoint", "_damage"]; private _damageDisabled = !isDamageAllowed _object; diff --git a/addons/repair/dev/draw_showRepairInfo.sqf b/addons/repair/dev/draw_showRepairInfo.sqf index f516e14ef9..20bf748e7f 100644 --- a/addons/repair/dev/draw_showRepairInfo.sqf +++ b/addons/repair/dev/draw_showRepairInfo.sqf @@ -20,7 +20,7 @@ addMissionEventHandler ["Draw3D", { private _hitpoint = _hitPoints select _forEachIndex; if ((_selection != "") && {_hitPoint != ""}) then { - if (((toLower _hitPoint) find "glass") != -1) exitWith {}; + if ("glass" in (toLowerANSI _hitPoint)) exitWith {}; private _info = ""; private _color = [1,0,0,1]; diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index 1e0147d7e2..9dad1ecc31 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -52,7 +52,7 @@ private _turretPaths = ((fullCrew [_vehicle, "gunner", true]) + (fullCrew [_vehi { private _selection = _x; - private _hitpoint = toLower (_hitPoints select _forEachIndex); + private _hitpoint = toLowerANSI (_hitPoints select _forEachIndex); // Skip ignored selections if (_forEachIndex in _selectionsToIgnore) then { diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index 264baf9ef0..f1f4aa7b7c 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -38,7 +38,7 @@ private _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false}; private _items = _config call FUNC(getRepairItems); -if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false}; +if (_items isNotEqualTo [] && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false}; private _return = true; if (getText (_config >> "condition") != "") then { diff --git a/addons/repair/functions/fnc_getHitPointString.sqf b/addons/repair/functions/fnc_getHitPointString.sqf index 93a4c153b2..23a57f8895 100644 --- a/addons/repair/functions/fnc_getHitPointString.sqf +++ b/addons/repair/functions/fnc_getHitPointString.sqf @@ -20,17 +20,9 @@ */ params ["_hitPoint", "_textLocalized", "_textDefault", ["_trackArray", []]]; +_trackArray params [["_trackNames", []], ["_trackStrings", []], ["_trackAmount", []]]; -private _track = (count _trackArray > 0); -private _trackNames = []; -private _trackStrings = []; -private _trackAmount = []; - -if (_track) then { - _trackNames = _trackArray select 0; - _trackStrings = _trackArray select 1; - _trackAmount = _trackArray select 2; -}; +private _track = _trackArray isNotEqualTo []; // Prepare first part of the string from stringtable //IGNORE_STRING_WARNING(str_ace_repair_hit); @@ -40,7 +32,7 @@ private _text = LSTRING(Hit); if ((_hitpoint select [0, 1]) == "#") then { _hitPoint = _hitPoint select [1] }; // Remove "Hit" from hitpoint name if one exists -private _toFind = if ((toLower _hitPoint) find "hit" == 0) then { +private _toFind = if ((toLowerANSI _hitPoint) find "hit" == 0) then { [_hitPoint, 3] call CBA_fnc_substr } else { _hitPoint diff --git a/addons/repair/functions/fnc_getSelectionsToIgnore.sqf b/addons/repair/functions/fnc_getSelectionsToIgnore.sqf index b90e44e8e6..08ca639a20 100644 --- a/addons/repair/functions/fnc_getSelectionsToIgnore.sqf +++ b/addons/repair/functions/fnc_getSelectionsToIgnore.sqf @@ -35,7 +35,7 @@ private _processedSelections = []; { private _selection = _x; - private _hitpoint = toLower (_hitPoints select _forEachIndex); + private _hitpoint = toLowerANSI (_hitPoints select _forEachIndex); private _isWheelOrTrack = _selection in _wheelHitSelections || {_hitpoint in _wheelHitPoints} || {_hitpoint in TRACK_HITPOINTS}; if (_hitpoint isEqualTo "") then { // skip empty hitpoint diff --git a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf index 347c3878d7..5d655887c6 100644 --- a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf +++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf @@ -68,7 +68,7 @@ private _wheelHitPointSelections = []; { if (_x != "") then { //Filter out things that definitly aren't wheeels (#3759) - if ((toLower (_hitPoints select _forEachIndex)) in ["hitengine", "hitfuel", "hitbody"]) exitWith {TRACE_1("filter",_x)}; + if ((toLowerANSI (_hitPoints select _forEachIndex)) in ["hitengine", "hitfuel", "hitbody"]) exitWith {TRACE_1("filter",_x)}; private _xPos = _vehicle selectionPosition _x; if (_xPos isEqualTo [0,0,0]) exitWith {}; private _xDist = _wheelCenterPos distance _xPos; diff --git a/addons/repair/functions/fnc_moduleAddSpareParts.sqf b/addons/repair/functions/fnc_moduleAddSpareParts.sqf index bccccdcc22..cb6da371d7 100644 --- a/addons/repair/functions/fnc_moduleAddSpareParts.sqf +++ b/addons/repair/functions/fnc_moduleAddSpareParts.sqf @@ -30,8 +30,7 @@ if (!isNull _logic) then { // Add synchronized objects to list { _list pushBack _x; - nil - } count (synchronizedObjects _logic); + } forEach (synchronizedObjects _logic); if (_list isEqualTo []) exitWith {}; @@ -40,6 +39,5 @@ if (!isNull _logic) then { // Add spare parts { [_x, _amount, _part, true] call FUNC(addSpareParts); - false - } count _list; + } forEach _list; }; diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index b537963e0f..86ff191000 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -44,7 +44,7 @@ if ((isEngineOn _target) && {!GVAR(autoShutOffEngineWhenStartingRepair)}) exitWi }; private _items = _config call FUNC(getRepairItems); -if (count _items > 0 && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false}; +if (_items isNotEqualTo [] && {!([_caller, _items] call FUNC(hasItems))}) exitWith {false}; private _return = true; if (getText (_config >> "condition") != "") then { @@ -172,7 +172,7 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then { } else { _caller setVariable [QGVAR(repairPrevAnimCaller), animationState _caller]; }; - _caller setVariable [QGVAR(repairCurrentAnimCaller), toLower _callerAnim]; + _caller setVariable [QGVAR(repairCurrentAnimCaller), toLowerANSI _callerAnim]; [_caller, _callerAnim] call EFUNC(common,doAnimation); }; }; diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf index bfce0e3f5e..0a6051e084 100644 --- a/addons/repair/functions/fnc_setHitPointDamage.sqf +++ b/addons/repair/functions/fnc_setHitPointDamage.sqf @@ -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 (configOf _vehicle >> "HitPoints" >> _x >> "depends")) in ["", "0"]}) then { + if (!("glass" in (toLowerANSI _x)) && {(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/stringtable.xml b/addons/repair/stringtable.xml index 10a5fa3a0b..4d2f84eea5 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -44,6 +44,7 @@ Ruota 바퀴 Roue + Колесо Change Wheel @@ -279,6 +280,7 @@ Coefficiente di riparazione completa 전체 수리 시간 계수 Coefficient du temps de réparation complète + Коэффициент времени полного ремонта Modifies how long it takes to perform a Full Repair.\nThe repair time is based on the amount of repairs needed for each part, including those normally inaccessible. @@ -288,6 +290,7 @@ Ändert, wie lange es dauert, eine vollständige Reparatur durchzuführen.\nDie Reparaturzeit basiert auf der Menge der erforderlichen Reparaturen für jedes Teil, einschließlich derjenigen, die normalerweise nicht zugänglich sind. 전체적인 수리를 수행하는 데 걸리는 시간을 수정합니다.\n수리 시간은 일반적으로 접근할 수 없는 부품을 포함하여 각 부품에 필요한 수리 시간을 기준으로 합니다. Modifie la durée que prend une réparation complète.\nLe temps de réparation est basé sur la quantité de réparations requises pour chaque partie, incluant celles qui sont normalement inaccessibles. + Изменяет время, необходимое для выполнения полного ремонта.\nВремя ремонта зависит от объема ремонтных работ, необходимых для каждой детали, включая те, которые обычно недоступны. Boost engineer training when in repair vehicles or facilities. Untrained becomes engineer, engineer becomes advanced engineer. @@ -311,7 +314,7 @@ Lugares de reparación completa Luoghi Riparazione Completa Endroits pour réparation complète - 完全修理できる場所 + 完全修理可能な場所 완전수리 구역 完整维修地点 完整維修地點 @@ -1283,6 +1286,7 @@ Zezwól na Łatanie Kół 바퀴 수리 허용 Autoriser le rafistolage des roues + Разрешить починить колесо Who can patch wheels? @@ -1292,6 +1296,7 @@ Kto może łatać koła? 누가 바퀴를 수리할 수 있습니까? Qui peut rafistoler les roues ? + Кто может починить колеса? Allow Repair @@ -1951,6 +1956,7 @@ Wymagania do Łatania Koła 바퀴 수리 아이템 필요 Exigences pour rafistoler une roue + Требования для починки колеса Items required to patch a wheel. @@ -1960,6 +1966,7 @@ Przedmioty wymagane do załatania koła 바퀴를 수리하기 위해 아이템이 필요합니다. Equipements requis pour rafistoler une roue. + Предметы, необходимые для починки колеса. Misc Repair Requirements @@ -2134,6 +2141,7 @@ Teilreparaturzeit 부품 수리 시간 Temps de réparation des pièces + Время ремонта детали Time in seconds to complete a repair. @@ -2143,6 +2151,7 @@ Zeit in Sekunden, um eine Reparatur abzuschließen. 수리를 완료하는 시간(초 단위) Durée en secondes pour terminer une réparation. + Время завершения ремонта в секундах. Wheel Change Time @@ -2152,6 +2161,7 @@ Radwechselzeit 바퀴 교체 시간 Temps de changement d'une roue + Время замены колеса Time in seconds to remove or change a wheel. @@ -2161,6 +2171,7 @@ Zeit in Sekunden, um ein Rad zu entfernen oder zu wechseln. 바퀴를 제거하거나 교체하는 데 걸리는 시간(초 단위) Durée en seconde pour enlever ou changer une roue. + Время в секундах на снятие или замену колеса. Patch Wheel @@ -2170,6 +2181,7 @@ Załataj Koło 바퀴 수리 Rafistoler la roue + Чинить колесо Patching Wheel... @@ -2179,6 +2191,7 @@ Łatanie Koła... 바퀴 수리 중... Rafistolage de la roue... + Починка колеса... Wheel Patch Time @@ -2188,6 +2201,7 @@ Zeit um Räder zu flicken 바퀴 수리 시간 Temps de rafistolage d'une roue + Время починки полеса Time it takes to patch a wheel by 5%. @@ -2197,6 +2211,7 @@ Zeit, die benötigt wird, um ein Rad um 5 % zu flicken. 바퀴를 5% 수리하는 데 걸리는 시간(초 단위) Durée pour rafistoler une roue de 5%. + Время, необходимое для починки колеса, сокращается на 5%. Patch Wheel Threshold @@ -2206,33 +2221,37 @@ Rad flicken Schwellenwert 바퀴 수리 한계점 Seuil de rafistolage d'une roue + Порог починки колеса - Maximum level to which a wheel can be patched. - タイヤを補修できる最大の度合い。 - Maksymalny poziom, do którego koło może zostać załatane. + Maximum damage to which a wheel can be patched.\n0% means all damage can be repaired. + タイヤをのダメージ補修できる最大の度合い。/n 0%は、すべてのダメージが修復可能であることを意味します。 + Maksymalny poziom, do którego koło może zostać załatane.\n0% oznacza że każde uszkodzenia mogą być naprawione. Livello di integrità massimo di una ruota rattoppata. - Maximales Level, bis zu dem ein Rad geflickt werden kann. + Maximales Level, bis zu dem ein Rad geflickt werden kann.\n0% bedeutet, dass das Rad vollständig repariert werden kann. 바퀴를 수리할 수 있는 최대 레벨입니다. - Niveau maximum de rafistolage d'une roue. + Niveau maximum de dégâts jusqu'à laquelle une roue peut être réparée.\n0% signifie que la roue peut être reparée entièrement. + Максимальный уровень, до которого колесо может быть починено. Wheel Patch Location - タイヤ補修場所 + タイヤ補修可能な場所 Miejsce Łatania Koła Luoghi rattoppamento ruote Räder Flick Ort 바퀴 수리 장소 Lieu de rafistolage des roues + Место починки колеса Where the wheel can be patched. - タイヤを補修できる場所。 + タイヤを補修することが出来る場所。 Gdzie można załatać koło. In quali luoghi è possibile rattoppare una ruota? Wo das Rad geflickt werden kann. 바퀴를 수리할 수 있는 곳입니다. Lieu où les roues peuvent être rafistolées. + Где колесо можно починить. On the ground @@ -2242,6 +2261,7 @@ Na ziemi 지면 위 Sur le terrain + На земле On a vehicle @@ -2251,6 +2271,7 @@ Na pojeździe 차량 Sur un véhicule + На транспорте diff --git a/addons/respawn/XEH_postInit.sqf b/addons/respawn/XEH_postInit.sqf index 6c1b1e9961..502f5f729f 100644 --- a/addons/respawn/XEH_postInit.sqf +++ b/addons/respawn/XEH_postInit.sqf @@ -1,7 +1,7 @@ // by commy2 #include "script_component.hpp" -["ace_rallypointMoved", FUNC(updateRallypoint)] call CBA_fnc_addEventHandler; -["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; // hide enemy rallypoint markers +["ace_rallypointMoved", LINKFUNC(updateRallypoint)] call CBA_fnc_addEventHandler; +["unit", LINKFUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; // hide enemy rallypoint markers -[QGVAR(showFriendlyFireMessageEvent), FUNC(showFriendlyFireMessage)] call CBA_fnc_addEventHandler; +[QGVAR(showFriendlyFireMessageEvent), LINKFUNC(showFriendlyFireMessage)] call CBA_fnc_addEventHandler; diff --git a/addons/respawn/functions/fnc_moduleRallypoint.sqf b/addons/respawn/functions/fnc_moduleRallypoint.sqf index 0af3357201..31ba68f1d6 100644 --- a/addons/respawn/functions/fnc_moduleRallypoint.sqf +++ b/addons/respawn/functions/fnc_moduleRallypoint.sqf @@ -23,7 +23,6 @@ if !(_activated) exitWith {}; { _x setVariable ["ACE_canMoveRallypoint", true]; - false -} count _units; +} forEach _units; INFO("Rallypoint Module Initialized."); diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 8ff5ded8ff..6db9f12913 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -382,7 +382,7 @@ Este módulo permite usar puntos de reunión en la misión, a los que pueden teletransportarse las unidades desde la bandera de base. Requiere colocar objetos especiales en el mapa: las banderas de base y de reunión, ambas disponibles en la categoría Vacio-> Reaparición ACE Ce module vous permet d'utiliser des points de ralliement dans les missions, vers lesquels vous pouvez vous téléporter rapidement depuis le drapeau de la base.\nNécessite de placer des objets spéciaux sur la carte - base et drapeau, tous deux disponibles dans la catégorie "Vide -> ACE Réapparition". ミッションでベースから素早く移動できるラリーポイントを使えるようにします。ゲーム内に専用オブジェクトとなるベースとフラッグを設置している必要があります。両オブジェクトは Empty 下の ACE リスポーンから設置できます。 - 이 모듈은 미션 중에 기지 깃발에서 집결지로 빠르게 텔레포트 시켜주는 역할을 합니다. 지도 상에 기지 및 깃발이 필요합니다. 두 가지 모두 Empty->ACE Respawn 카테고리에서 찾을 수 있습니다. + 이 모듈은 미션 중에 기지 깃발에서 집결지로 빠르게 텔레포트 시켜주는 역할을 합니다. 지도 상에 기지 및 깃발이 필요합니다. 두 가지 모두 비어 있음->ACE 재투입 카테고리에서 찾을 수 있습니다. 摆放此模块后,你将能在任务中部署集合点,使你可以快速往返基地与前线。要使用本功能,请记得放上空物体->ACE 重生里面的基地与旗帜。 擺放此模塊後,你將能在任務中佈署集合點,使你可以快速往返基地與前線。要使用本功能,請記得放上空物件->ACE 重生裡面的基地與旗幟 diff --git a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf index 30c4dfd59c..257e5864f6 100644 --- a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf @@ -34,7 +34,7 @@ if (_filename == "") exitWith { }; // add file extension .wss as default -if !(toLower (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then { +if !(toLowerANSI (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then { _filename = format ["%1.wss", _filename]; }; diff --git a/addons/safemode/functions/fnc_unlockSafety.sqf b/addons/safemode/functions/fnc_unlockSafety.sqf index 8afc6802c1..10372f1a2e 100644 --- a/addons/safemode/functions/fnc_unlockSafety.sqf +++ b/addons/safemode/functions/fnc_unlockSafety.sqf @@ -56,8 +56,7 @@ if (inputAction "nextWeapon" > 0) then { if (_x == "this") then { _modes pushBack _weapon; }; - nil - } count getArray (configFile >> "CfgWeapons" >> _weapon >> "modes"); + } forEach getArray (configFile >> "CfgWeapons" >> _weapon >> "modes"); // select last mode private _mode = _modes select (count _modes - 1); diff --git a/addons/sandbag/XEH_postInit.sqf b/addons/sandbag/XEH_postInit.sqf index a03f6076a1..24122aed8e 100644 --- a/addons/sandbag/XEH_postInit.sqf +++ b/addons/sandbag/XEH_postInit.sqf @@ -15,11 +15,11 @@ GVAR(deployDirection) = 0; ["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler; // Cancel deploy on player change. This does work when returning to lobby, but not when hard disconnecting. -["unit", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler; -["loadout", {_this call FUNC(handlePlayerInventoryChanged)}] call CBA_fnc_addPlayerEventHandler; +["unit", LINKFUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; +["loadout", LINKFUNC(handlePlayerInventoryChanged)] call CBA_fnc_addPlayerEventHandler; ["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler; // handle waking up dragged unit and falling unconscious while dragging -["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler; +["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler; //@todo Captivity? diff --git a/addons/sandbag/functions/fnc_pickup.sqf b/addons/sandbag/functions/fnc_pickup.sqf index 7c21656ca0..2bcc418f4c 100644 --- a/addons/sandbag/functions/fnc_pickup.sqf +++ b/addons/sandbag/functions/fnc_pickup.sqf @@ -34,7 +34,7 @@ _unit setVariable [QGVAR(isUsingSandbag), true]; // Force physx update { _x setPosASL (getPosASL _x); - } count (_unit nearObjects ["ACE_SandbagObject", 5]); + } forEach (_unit nearObjects ["ACE_SandbagObject", 5]); [_unit, "ACE_Sandbag_empty"] call EFUNC(common,addToInventory); }, [_unit, _sandbag], 1.5] call CBA_fnc_waitAndExecute; diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 8c221a4651..9c96281246 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -24,7 +24,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]]; }; // Check inventory when it changes - ["loadout", FUNC(inventoryCheck), true] call CBA_fnc_addPlayerEventHandler; + ["loadout", LINKFUNC(inventoryCheck), true] call CBA_fnc_addPlayerEventHandler; // Instantly hide knobs when scoping in ["cameraView", { @@ -140,7 +140,7 @@ GVAR(scopeAdjust) = [[[0,0],0,[0,0],0], [[0,0],0,[0,0],0], [[0,0],0,[0,0],0]]; // Register fire event handler - ["ace_firedPlayer", DFUNC(firedEH)] call CBA_fnc_addEventHandler; - ["ace_firedPlayerNonLocal", DFUNC(firedEH)] call CBA_fnc_addEventHandler; + ["ace_firedPlayer", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler; + ["ace_firedPlayerNonLocal", LINKFUNC(firedEH)] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/scopes/functions/fnc_adjustZero.sqf b/addons/scopes/functions/fnc_adjustZero.sqf index 1a130840ed..44e64b7674 100644 --- a/addons/scopes/functions/fnc_adjustZero.sqf +++ b/addons/scopes/functions/fnc_adjustZero.sqf @@ -17,7 +17,7 @@ params ["_unit"]; -if (vehicle _unit != _unit) exitWith {false}; +if (!isNull objectParent _unit) exitWith {false}; private _weaponClass = currentWeapon _unit; private _weaponIndex = [_unit, _weaponClass] call EFUNC(common,getWeaponIndex); diff --git a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf index 6cb53c3898..ab84db7cde 100644 --- a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf +++ b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf @@ -4,24 +4,28 @@ * Calculates the zero angle correction for the new zero range based on current zero range and bore height (distance between bore- and sight axis) * * Arguments: - * 0: Zero range - * 1: Bore height - * 2: Weapon - * 3: Ammo - * 4: Magazine - * 5: Advanced Ballistics enabled? + * 0: Old Zero range + * 1: New Zero range + * 2: Bore height + * 3: Weapon + * 4: Ammo + * 5: Magazine + * 6: Advanced Ballistics enabled? * * Return Value: * zeroAngleCorrection * * Example: - * [5, 6, gun, ammo, magazine, true] call ace_scopes_fnc_calculateZeroAngleCorrection + * [5, 6, 7, gun, ammo, magazine, true] call ace_scopes_fnc_calculateZeroAngleCorrection * * Public: No */ params ["_oldZeroRange", "_newZeroRange", "_boreHeight"/*in cm*/, "_weapon", "_ammo", "_magazine", "_advancedBallistics"]; +// When FFV from vehicles currentZeroing will report 0 so just bail +if (_oldZeroRange <= 0) exitWith { 0 }; + private _airFriction = getNumber (configFile >> "CfgAmmo" >> _ammo >> "airFriction"); private _initSpeed = getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed"); private _initSpeedCoef = getNumber(configFile >> "CfgWeapons" >> _weapon >> "initSpeed"); diff --git a/addons/scopes/functions/fnc_canAdjustZero.sqf b/addons/scopes/functions/fnc_canAdjustZero.sqf index 58a8807480..ca03ab4123 100644 --- a/addons/scopes/functions/fnc_canAdjustZero.sqf +++ b/addons/scopes/functions/fnc_canAdjustZero.sqf @@ -18,7 +18,7 @@ params ["_unit"]; if (cameraView == "GUNNER") exitWith {false}; -if (vehicle _unit != _unit) exitWith {false}; +if (!isNull objectParent _unit) exitWith {false}; if (GVAR(simplifiedZeroing)) exitWith {false}; if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {false}; diff --git a/addons/scopes/functions/fnc_canResetZero.sqf b/addons/scopes/functions/fnc_canResetZero.sqf index cd3f1fb4eb..79dae44be9 100644 --- a/addons/scopes/functions/fnc_canResetZero.sqf +++ b/addons/scopes/functions/fnc_canResetZero.sqf @@ -18,7 +18,7 @@ params ["_unit"]; if (cameraView == "GUNNER") exitWith {false}; -if (vehicle _unit != _unit) exitWith {false}; +if (!isNull objectParent _unit) exitWith {false}; if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {false}; private _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); diff --git a/addons/scopes/functions/fnc_resetZero.sqf b/addons/scopes/functions/fnc_resetZero.sqf index 76ee6355a8..c22df8bb0f 100644 --- a/addons/scopes/functions/fnc_resetZero.sqf +++ b/addons/scopes/functions/fnc_resetZero.sqf @@ -17,7 +17,7 @@ params ["_unit"]; -if (vehicle _unit != _unit) exitWith {false}; +if (!isNull objectParent _unit) exitWith {false}; private _weaponClass = currentWeapon _unit; private _weaponIndex = [_unit, _weaponClass] call EFUNC(common,getWeaponIndex); diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf index f0b0b7c2f0..5495ef0e97 100644 --- a/addons/sitting/XEH_clientInit.sqf +++ b/addons/sitting/XEH_clientInit.sqf @@ -10,7 +10,7 @@ if (!hasInterface) exitWith {}; if (!XGVAR(enable)) exitWith {}; // Initialize classes as they spawn - ["ThingX", "init", FUNC(addSitActions), nil, nil, true] call CBA_fnc_addClassEventHandler; + ["ThingX", "init", LINKFUNC(addSitActions), nil, nil, true] call CBA_fnc_addClassEventHandler; // Initialize statically defined benches (also appear as world objects, no class EH thrown) { @@ -21,6 +21,6 @@ if (!hasInterface) exitWith {}; ["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; + ["ace_unconscious", LINKFUNC(handleInterrupt)] call CBA_fnc_addEventHandler; + ["ace_captives_SetHandcuffed", LINKFUNC(handleInterrupt)] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/slideshow/functions/fnc_addSlideActions.sqf b/addons/slideshow/functions/fnc_addSlideActions.sqf index 8ec804d577..409c724943 100644 --- a/addons/slideshow/functions/fnc_addSlideActions.sqf +++ b/addons/slideshow/functions/fnc_addSlideActions.sqf @@ -34,7 +34,7 @@ private _actions = []; (_this select 2) params ["_objects", "_image", "_currentSlideshow", "_selection"]; { _x setObjectTextureGlobal [_selection, _image] - } count _objects; + } forEach _objects; [QGVAR(slideChanged), [_image, _currentSlideshow]] call CBA_fnc_localEvent; }, {true}, diff --git a/addons/slideshow/functions/fnc_autoTransition.sqf b/addons/slideshow/functions/fnc_autoTransition.sqf index 793b8baf1b..6a18a041c4 100644 --- a/addons/slideshow/functions/fnc_autoTransition.sqf +++ b/addons/slideshow/functions/fnc_autoTransition.sqf @@ -36,7 +36,7 @@ private _image = _images select _currentSlide; // Set slide { _x setObjectTextureGlobal [_selection, _image]; -} count _objects; +} forEach _objects; [QGVAR(slideChanged), [_image, _currentSlideshow]] call CBA_fnc_localEvent; diff --git a/addons/slideshow/functions/fnc_createSlideshow.sqf b/addons/slideshow/functions/fnc_createSlideshow.sqf index 9021a92613..c24d302346 100644 --- a/addons/slideshow/functions/fnc_createSlideshow.sqf +++ b/addons/slideshow/functions/fnc_createSlideshow.sqf @@ -50,7 +50,7 @@ if (isServer) then { // Default images on whiteboards (first image) { _x setObjectTextureGlobal [_selection, _images select 0]; - } count _objects; + } forEach _objects; }; // Number of slideshows (multiple modules support) @@ -89,8 +89,7 @@ if (_duration == 0) then { 2 ] call EFUNC(interact_menu,createAction); [_x, 0, ["ACE_MainActions"], _slidesAction] call EFUNC(interact_menu,addActionToObject); - nil - } count _controllers; + } forEach _controllers; } else { if !(isServer) exitWith {}; diff --git a/addons/slideshow/functions/fnc_moduleInit.sqf b/addons/slideshow/functions/fnc_moduleInit.sqf index 896c64eb50..7e6a78dc95 100644 --- a/addons/slideshow/functions/fnc_moduleInit.sqf +++ b/addons/slideshow/functions/fnc_moduleInit.sqf @@ -37,8 +37,7 @@ private _selection = _logic getVariable ["Selection", 0]; // Objects synced to the module { _objects pushBack _x; - nil -} count (synchronizedObjects _logic); +} forEach (synchronizedObjects _logic); // Prepare with actions [_objects, _controllers, _images, _names, _duration, _setName, _selection] call FUNC(createSlideshow); diff --git a/addons/spectator/functions/fnc_compat_spectatorBI.sqf b/addons/spectator/functions/fnc_compat_spectatorBI.sqf index 3d982830a0..9bf39ec256 100644 --- a/addons/spectator/functions/fnc_compat_spectatorBI.sqf +++ b/addons/spectator/functions/fnc_compat_spectatorBI.sqf @@ -18,7 +18,7 @@ */ private _respawn = getMissionConfigValue ["respawn",0]; -if (_respawn isEqualType "") then { _respawn = ["","bird","","","group","side"] find (toLower _respawn); }; +if (_respawn isEqualType "") then { _respawn = ["","bird","","","group","side"] find (toLowerANSI _respawn); }; if !(_respawn in [1,4,5]) exitWith {}; // Remember to check for side specific templates diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp index 6be6d70d63..93fa00a7bc 100644 --- a/addons/spottingscope/CfgVehicles.hpp +++ b/addons/spottingscope/CfgVehicles.hpp @@ -48,7 +48,7 @@ class CfgVehicles { selection = ""; displayName = CSTRING(PickUp); distance = 5; - condition = QUOTE((alive _target) && (count (crew _target) == 0)); + condition = QUOTE((alive _target) && {(crew _target) isEqualTo []}); statement = QUOTE([ARR_2(_target,_player)] call FUNC(pickup)); showDisabled = 0; exceptions[] = {}; diff --git a/addons/switchunits/functions/fnc_isValidAi.sqf b/addons/switchunits/functions/fnc_isValidAi.sqf index e78e990924..53ebcdaac2 100644 --- a/addons/switchunits/functions/fnc_isValidAi.sqf +++ b/addons/switchunits/functions/fnc_isValidAi.sqf @@ -19,6 +19,6 @@ params ["_unit"]; !([_unit] call EFUNC(common,isPlayer) || {_unit in playableUnits} -|| {vehicle _unit != _unit} +|| {!isNull objectParent _unit} || {_unit getVariable [QGVAR(IsPlayerUnit), false]} || {_unit getVariable [QGVAR(IsPlayerControlled), false]}) // return diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index 8c7dc4924c..203ba426ff 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -27,7 +27,7 @@ GVAR(AllMarkerNames) = []; // delete markers { deleteMarkerLocal _x; - } count GVAR(AllMarkerNames); + } forEach GVAR(AllMarkerNames); // reset the array GVAR(AllMarkerNames) = []; @@ -58,8 +58,7 @@ GVAR(AllMarkerNames) = []; }; GVAR(AllMarkerNames) pushBack _markerName; - nil }; - } count allUnits; + } forEach allUnits; }; }, 1.5, [_sidesToShow]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index 6fc8fa35c9..135088d243 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -27,7 +27,7 @@ if (GVAR(EnableSafeZone)) then { private _allNearestPlayers = [position _unit, GVAR(SafeZoneRadius)] call FUNC(nearestPlayers); private _nearestEnemyPlayers = _allNearestPlayers select {((side GVAR(OriginalGroup)) getFriend side _x < 0.6) && !(_x getVariable [QGVAR(IsPlayerControlled), false])}; - if (count _nearestEnemyPlayers > 0) exitWith { + if (_nearestEnemyPlayers isNotEqualTo []) exitWith { _leave = true; }; }; diff --git a/addons/tacticalladder/XEH_postInit.sqf b/addons/tacticalladder/XEH_postInit.sqf index 1a6f356fb0..c4b25a77ab 100644 --- a/addons/tacticalladder/XEH_postInit.sqf +++ b/addons/tacticalladder/XEH_postInit.sqf @@ -17,10 +17,10 @@ GVAR(currentAngle) = 0; ["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler; // Cancel adjusting on player change. -["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; +["unit", LINKFUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; ["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler; // handle falling unconscious -["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler; +["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler; // @todo captivity? diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf index 1ea19e737b..6d6f78f1a3 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -26,7 +26,7 @@ params ["_unit", "_ladder"]; { _ladder animate [_x, 0]; -} count __ANIMS; +} forEach __ANIMS; [_unit, "amovpercmstpslowwrfldnon_player_idlesteady03", 2] call EFUNC(common,doAnimation); @@ -35,7 +35,7 @@ _ladder attachTo [_unit, [0, 0.75, 0], ""]; // Position ladder in front of playe _ladder animate ["rotate", 0]; { _ladder animate [_x, 1]; -} count ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3) +} forEach ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3) GVAR(ladder) = _ladder; GVAR(cancelTime) = CBA_missionTime + 1; // Workaround to prevent accidental canceling diff --git a/addons/tagging/XEH_postInit.sqf b/addons/tagging/XEH_postInit.sqf index 7fefa5757e..dd46b7fb98 100644 --- a/addons/tagging/XEH_postInit.sqf +++ b/addons/tagging/XEH_postInit.sqf @@ -14,7 +14,7 @@ if (hasInterface) then { call FUNC(compileConfigTags); // Scripted tag adding EH - [QGVAR(applyCustomTag), FUNC(applyCustomTag)] call CBA_fnc_addEventHandler; + [QGVAR(applyCustomTag), LINKFUNC(applyCustomTag)] call CBA_fnc_addEventHandler; // Keybind ["ACE3 Equipment", QGVAR(quickTag), localize LSTRING(QuickTag), { @@ -32,4 +32,4 @@ if (!isServer) exitWith {}; GVAR(testingThread) = false; GVAR(tagsToTest) = []; -[QGVAR(createTag), DFUNC(createTag)] call CBA_fnc_addEventHandler; +[QGVAR(createTag), LINKFUNC(createTag)] call CBA_fnc_addEventHandler; diff --git a/addons/tagging/XEH_preStart.sqf b/addons/tagging/XEH_preStart.sqf index 9303bdb135..e1ac396c48 100644 --- a/addons/tagging/XEH_preStart.sqf +++ b/addons/tagging/XEH_preStart.sqf @@ -12,7 +12,7 @@ private _vehicleClasses = "(configName _x) isKindOf 'Static'" configClasses (con private _model = getText (_x >> "model"); if (_model != "") then { private _array = _model splitString "\"; - _cacheStaticModels pushBackUnique toLower (_array select ((count _array) - 1)); + _cacheStaticModels pushBackUnique toLowerANSI (_array select -1); }; } forEach _vehicleClasses; @@ -24,7 +24,7 @@ private _cfgBase = configFile >> "CfgNonAIVehicles"; private _model = getText (_x >> "model"); if (_model != "") then { private _array = _model splitString "\"; - _cacheStaticModels pushBackUnique toLower (_array select ((count _array) - 1)); + _cacheStaticModels pushBackUnique toLowerANSI (_array select -1); }; } forEach (_nonaivehicleClasses select {(configName _x) isKindOf ["Bridge_base_F", _cfgBase]}); diff --git a/addons/tagging/stringtable.xml b/addons/tagging/stringtable.xml index 34445fab21..4d32fac6d6 100644 --- a/addons/tagging/stringtable.xml +++ b/addons/tagging/stringtable.xml @@ -383,6 +383,7 @@ Marcatore identificativo sui veicoli 차량 ID 마킹 Marquage ID des véhicules + Идентификационная маркировка транспортного средства Replaces clan tag with stenciled text @@ -392,6 +393,7 @@ Sostituisce l'icona del clan con testo in stampatello 클랜 태그를 스텐실 텍스트로 바꿉니다. Remplace le tag du clan par un texte au pochoir + Заменяет тег клана трафаретным текстом diff --git a/addons/towing/functions/fnc_isSuitableSimulation.sqf b/addons/towing/functions/fnc_isSuitableSimulation.sqf index 6df9c3d40e..a4131e6a91 100644 --- a/addons/towing/functions/fnc_isSuitableSimulation.sqf +++ b/addons/towing/functions/fnc_isSuitableSimulation.sqf @@ -22,4 +22,4 @@ 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", "shipx"] +(toLowerANSI _simulationType) in ["tankx", "carx", "shipx"] diff --git a/addons/towing/functions/fnc_towStateMachinePFH.sqf b/addons/towing/functions/fnc_towStateMachinePFH.sqf index c3b7e19720..50afdeb153 100644 --- a/addons/towing/functions/fnc_towStateMachinePFH.sqf +++ b/addons/towing/functions/fnc_towStateMachinePFH.sqf @@ -51,7 +51,7 @@ private _exitCondition = !( || {getPosASLW _unit select 2 < -1.5} // walking-to-swimming animation in wetsuit lasts for 3 seconds } && { [_unit, objNull, [INTERACTION_EXCEPTIONS]] call EFUNC(common,canInteractWith) } && - { "unconscious" isNotEqualTo toLower animationState _unit } && + { "unconscious" isNotEqualTo toLowerANSI animationState _unit } && { !(_unit getVariable ["ACE_isUnconscious", false]) } && { ACE_player == _unit } ); diff --git a/addons/trenches/XEH_postInit.sqf b/addons/trenches/XEH_postInit.sqf index ea8ff7e24f..59a6fb8a08 100644 --- a/addons/trenches/XEH_postInit.sqf +++ b/addons/trenches/XEH_postInit.sqf @@ -27,11 +27,11 @@ GVAR(digDirection) = 0; ["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler; // Cancel dig on player change. This does work when returning to lobby, but not when hard disconnecting. -["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; -["loadout", FUNC(handlePlayerInventoryChanged)] call CBA_fnc_addPlayerEventHandler; +["unit", LINKFUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; +["loadout", LINKFUNC(handlePlayerInventoryChanged)] call CBA_fnc_addPlayerEventHandler; ["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler; // handle waking up dragged unit and falling unconscious while dragging -["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler; +["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler; //@todo Captivity? diff --git a/addons/tripod/XEH_postInit.sqf b/addons/tripod/XEH_postInit.sqf index 9fbfaa6c8d..febd71390b 100644 --- a/addons/tripod/XEH_postInit.sqf +++ b/addons/tripod/XEH_postInit.sqf @@ -10,10 +10,10 @@ GVAR(height) = 0.5; ["ace_interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call CBA_fnc_addEventHandler; // Cancel adjusting on player change. -["unit", FUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; +["unit", LINKFUNC(handlePlayerChanged)] call CBA_fnc_addPlayerEventHandler; ["vehicle", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call CBA_fnc_addPlayerEventHandler; // handle falling unconscious -["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler; +["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler; // @todo captivity? diff --git a/addons/tripod/functions/fnc_adjust.sqf b/addons/tripod/functions/fnc_adjust.sqf index db31a0733f..b7cdc842e9 100644 --- a/addons/tripod/functions/fnc_adjust.sqf +++ b/addons/tripod/functions/fnc_adjust.sqf @@ -35,8 +35,7 @@ GVAR(adjustPFH) = [{ { _tripod animate [_x, 1 - GVAR(height)]; - } count ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; - + } forEach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; }, 0, [_unit, _tripod]] call CBA_fnc_addPerFrameHandler; [_unit, "blockThrow", QUOTE(ADDON), true] call EFUNC(common,statusEffect_set); diff --git a/addons/tripod/functions/fnc_place.sqf b/addons/tripod/functions/fnc_place.sqf index ecefe12784..0109990ded 100644 --- a/addons/tripod/functions/fnc_place.sqf +++ b/addons/tripod/functions/fnc_place.sqf @@ -34,7 +34,7 @@ if (stance _unit == "STAND") then { { _tripod animate [_x, 0.5]; - } count ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; + } forEach ["slide_down_tripod", "retract_leg_1", "retract_leg_2", "retract_leg_3"]; [{ (_this select 0) params ["_tripod", "_direction", "_position"]; diff --git a/addons/ui/XEH_clientInit.sqf b/addons/ui/XEH_clientInit.sqf index 66aa0b3650..1ef328b176 100644 --- a/addons/ui/XEH_clientInit.sqf +++ b/addons/ui/XEH_clientInit.sqf @@ -19,9 +19,8 @@ GVAR(elementsSet) = call CBA_fnc_createNamespace; ["ace_infoDisplayChanged", { // Selective UI Advanced // Defaults must be set in this EH to make sure controls are activated and advanced settings can be modified - private _force = [true, false] select (GVAR(allowSelectiveUI)); { - [_x, missionNamespace getVariable (format [QGVAR(%1), _x]), false, _force] call FUNC(setAdvancedElement); + [_x, missionNamespace getVariable (format [QGVAR(%1), _x]), false, !GVAR(allowSelectiveUI)] call FUNC(setAdvancedElement); } forEach (allVariables GVAR(configCache)); // Execute local event for when it's safe to modify UI through this API @@ -40,7 +39,7 @@ GVAR(elementsSet) = call CBA_fnc_createNamespace; if (_name in ELEMENTS_BASIC) then { [true] call FUNC(setElements); } else { - private _nameNoPrefix = toLower (_name select [7]); + private _nameNoPrefix = toLowerANSI (_name select [7]); private _cachedElement = GVAR(configCache) getVariable _nameNoPrefix; if (!isNil "_cachedElement") then { [_nameNoPrefix, _value, true] call FUNC(setAdvancedElement); @@ -49,4 +48,4 @@ GVAR(elementsSet) = call CBA_fnc_createNamespace; }] call CBA_fnc_addEventHandler; }] call CBA_fnc_addEventHandler; -["unit", FUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler; +["unit", LINKFUNC(handlePlayerChanged), true] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/ui/functions/fnc_compileConfigUI.sqf b/addons/ui/functions/fnc_compileConfigUI.sqf index 17eaa27308..ef6ec1026a 100644 --- a/addons/ui/functions/fnc_compileConfigUI.sqf +++ b/addons/ui/functions/fnc_compileConfigUI.sqf @@ -17,7 +17,7 @@ { private _failure = false; - private _class = toLower (configName _x); + private _class = toLowerANSI (configName _x); private _idd = getNumber (_x >> "idd"); diff --git a/addons/ui/functions/fnc_setElementVisibility.sqf b/addons/ui/functions/fnc_setElementVisibility.sqf index 89b8684af7..f7f8dccd0c 100644 --- a/addons/ui/functions/fnc_setElementVisibility.sqf +++ b/addons/ui/functions/fnc_setElementVisibility.sqf @@ -29,7 +29,7 @@ if (_source == "" || {_element == ""}) exitWith { WARNING("Source or Element may not be empty strings!"); }; -_element = toLower _element; +_element = toLowerANSI _element; // Verify element is bound private _cachedElement = GVAR(configCache) getVariable _element; diff --git a/addons/vector/functions/fnc_onKeyDown.sqf b/addons/vector/functions/fnc_onKeyDown.sqf index 24a22a5782..082f22e483 100644 --- a/addons/vector/functions/fnc_onKeyDown.sqf +++ b/addons/vector/functions/fnc_onKeyDown.sqf @@ -38,7 +38,7 @@ private _fnc_setPFH = { }; GVAR(currentMode) = _this; - GVAR(holdKeyHandler) = [FUNC(onKeyHold), 0, _this] call CBA_fnc_addPerFrameHandler; + GVAR(holdKeyHandler) = [LINKFUNC(onKeyHold), 0, _this] call CBA_fnc_addPerFrameHandler; }; switch (_this select 0) do { diff --git a/addons/vector/functions/fnc_onKeyUp.sqf b/addons/vector/functions/fnc_onKeyUp.sqf index 11310eb5cf..b660331e65 100644 --- a/addons/vector/functions/fnc_onKeyUp.sqf +++ b/addons/vector/functions/fnc_onKeyUp.sqf @@ -22,7 +22,7 @@ private _fnc_setPFH = { }; GVAR(currentMode) = _this;// - GVAR(holdKeyHandler) = [FUNC(onKeyHold), 0, _this] call CBA_fnc_addPerFrameHandler; + GVAR(holdKeyHandler) = [LINKFUNC(onKeyHold), 0, _this] call CBA_fnc_addPerFrameHandler; }; switch (_this select 0) do { diff --git a/addons/vehicle_damage/functions/fnc_addEventHandler.sqf b/addons/vehicle_damage/functions/fnc_addEventHandler.sqf index 3697ff2cf9..a7e59c75a1 100644 --- a/addons/vehicle_damage/functions/fnc_addEventHandler.sqf +++ b/addons/vehicle_damage/functions/fnc_addEventHandler.sqf @@ -35,7 +35,7 @@ private _slatHitpoints = [_vehicleConfig >> QGVAR(slatHitpoints), "ARRAY", []] c { _x params ["_hitpoints", "_type"]; { - [_hitpointHash, toLower _x, [_type, _hitpointsConfig >> _x, _x]] call CBA_fnc_hashSet; + [_hitpointHash, toLowerANSI _x, [_type, _hitpointsConfig >> _x, toLowerANSI _x]] call CBA_fnc_hashSet; } forEach _hitpoints; } forEach ALL_HITPOINTS; @@ -45,7 +45,7 @@ _vehicle setVariable [QGVAR(hitpointHash), _hitpointHash]; private _iterateThroughConfig = { params ["_vehicle", "_config", "_iterateThroughConfig", "_hitpointAliases"]; TRACE_1("checking config",_config); - private _configName = configName _config; + private _configName = toLowerANSI configName _config; private _isGun = ([_config >> "isGun", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1; private _isTurret = ([_config >> "isTurret", "NUMBER", 0] call CBA_fnc_getConfigEntry) == 1; private _isEra = _configName in _eraHitpoints; @@ -53,18 +53,18 @@ private _iterateThroughConfig = { private _isMisc = false; // prevent incompatibilites with old mods - if ((toLower _configName) isEqualTo "hitturret") then { + if (_configName isEqualTo "hitturret") then { _isTurret = true; }; - if ((toLower _configName) isEqualTo "hitgun") then { + if (_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; + if (_configName in _hitPoints) then { + [_hash, _configName, [_hitType, _config, _configName]] call CBA_fnc_hashSet; _isMisc = true; }; } forEach _hitpointAliases; @@ -72,16 +72,16 @@ private _iterateThroughConfig = { 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; + [_hash, _configName, ["gun", _config, _configName]] call CBA_fnc_hashSet; }; if (_isTurret) then { - [_hash, toLower _configName, ["turret", _config, _configName]] call CBA_fnc_hashSet; + [_hash, _configName, ["turret", _config, _configName]] call CBA_fnc_hashSet; }; if (_isEra) then { - [_hash, toLower _configName, ["era", _config, _configName]] call CBA_fnc_hashSet; + [_hash, _configName, ["era", _config, _configName]] call CBA_fnc_hashSet; }; if (_isSlat) then { - [_hash, toLower _configName, ["slat", _config, _configName]] call CBA_fnc_hashSet; + [_hash, _configName, ["slat", _config, _configName]] call CBA_fnc_hashSet; }; _vehicle setVariable [QGVAR(hitpointHash), _hash]; } else { diff --git a/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf b/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf index 813e97a766..4e847c2d36 100644 --- a/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf +++ b/addons/vehicle_damage/functions/fnc_calculatePenetrationInfo.sqf @@ -83,7 +83,7 @@ _projectileData params ["_projectileType", "_projectileConfig"]; 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); +private _rodMaterialParams = MATERIAL_ARRAY select (1 + MATERIAL_ARRAY find toLowerANSI _rodMaterial); if !(_enabled) exitWith { [false, 0, 0, 0, 0] }; if (_rodMaterialParams isEqualTo [0, 0, 0, 0, 0, 0]) exitWith { [] }; diff --git a/addons/vehicle_damage/functions/fnc_handleCookoff.sqf b/addons/vehicle_damage/functions/fnc_handleCookoff.sqf index a6e7335542..7cf6337796 100644 --- a/addons/vehicle_damage/functions/fnc_handleCookoff.sqf +++ b/addons/vehicle_damage/functions/fnc_handleCookoff.sqf @@ -40,7 +40,7 @@ if (!_alreadyCookingOff && { _chanceOfFire >= random 1 }) exitWith { private _detonateAfterCookoff = (_fireDetonateChance / 4) > random 1; private _source = ""; - if (toLower _hitPart isEqualTo "engine") then { + if (_hitPart == "engine") then { _source = ["hit_engine_point", "HitPoints"]; }; diff --git a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf index 01f098efb0..e18d8a3814 100644 --- a/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf +++ b/addons/vehicle_damage/functions/fnc_handleVehicleDamage.sqf @@ -34,7 +34,7 @@ if !(alive _vehicle) exitWith { true }; -_hitPoint = toLower _hitPoint; +_hitPoint = toLowerANSI _hitPoint; private _hitpointHash = _vehicle getVariable [QGVAR(hitpointHash), []]; private _type = if (_hitpointHash isEqualTo []) then { "exit" diff --git a/addons/vehicle_damage/functions/fnc_processHit.sqf b/addons/vehicle_damage/functions/fnc_processHit.sqf index 17575e8f38..73e70bbf57 100644 --- a/addons/vehicle_damage/functions/fnc_processHit.sqf +++ b/addons/vehicle_damage/functions/fnc_processHit.sqf @@ -124,7 +124,7 @@ private _chanceOfDetonation = 0; private _explosiveAmmoCount = 0; private _nonExplosiveAmmoCount = 0; -if (count (_currentVehicleAmmo select 0) isNotEqualTo 0) then { +if ((_currentVehicleAmmo select 0) isNotEqualTo []) then { private _magConfig = configFile >> "CfgMagazines"; private _ammoConfig = configFile >> "CfgAmmo"; private _countOfExplodableAmmo = 0; diff --git a/addons/vehiclelock/XEH_postInit.sqf b/addons/vehiclelock/XEH_postInit.sqf index 40afaf32af..d16b47aef5 100644 --- a/addons/vehiclelock/XEH_postInit.sqf +++ b/addons/vehiclelock/XEH_postInit.sqf @@ -1,14 +1,14 @@ #include "script_component.hpp" //Add Event Handlers -[QGVAR(setupCustomKey), {_this call FUNC(serverSetupCustomKeyEH)}] call CBA_fnc_addEventHandler; -[QGVAR(setVehicleLock), {_this call FUNC(setVehicleLockEH)}] call CBA_fnc_addEventHandler; +[QGVAR(setupCustomKey), LINKFUNC(serverSetupCustomKeyEH)] call CBA_fnc_addEventHandler; +[QGVAR(setVehicleLock), LINKFUNC(setVehicleLockEH)] call CBA_fnc_addEventHandler; ["CBA_settingsInitialized", { TRACE_2("SettingsInitialized eh",GVAR(LockVehicleInventory),GVAR(VehicleStartingLockState)); if (hasInterface && {GVAR(LockVehicleInventory)}) then { - ["CAManBase", "InventoryOpened", {_this call FUNC(onOpenInventory)}] call CBA_fnc_addClassEventHandler; + ["CAManBase", "InventoryOpened", LINKFUNC(onOpenInventory)] call CBA_fnc_addClassEventHandler; }; if (isServer && {GVAR(VehicleStartingLockState) != -1}) then { [{ diff --git a/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf b/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf index d730589b36..6461e7fca2 100644 --- a/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf +++ b/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf @@ -30,7 +30,7 @@ if (_useCustom) then { private _previousMags = magazinesDetail _unit; _unit addMagazine ["ACE_key_customKeyMagazine", 1]; //addMagazine array has global effects private _newMags = (magazinesDetail _unit) - _previousMags; - if ((count _newMags) == 0) exitWith {ERROR("failed to add magazine (inventory full?)");}; + if (_newMags isEqualTo []) exitWith {ERROR("failed to add magazine (inventory full?)");}; private _keyMagazine = _newMags select 0; TRACE_2("setting up key on server",_veh,_keyMagazine); //Have the server run add the key to the vehicle's key array: diff --git a/addons/viewdistance/functions/fnc_changeViewDistance.sqf b/addons/viewdistance/functions/fnc_changeViewDistance.sqf index 84ba31d285..b7fb192db2 100644 --- a/addons/viewdistance/functions/fnc_changeViewDistance.sqf +++ b/addons/viewdistance/functions/fnc_changeViewDistance.sqf @@ -41,7 +41,7 @@ if (_objectViewDistanceCoeff isEqualType 0) then { } else { if (isNil QGVAR(fovBasedPFHminimalViewDistance)) then { GVAR(fovBasedPFHminimalViewDistance) = getObjectViewDistance select 0; // Minimal view distance holder and PFH isRunning variable - [FUNC(setFovBasedOvdPFH), 0, []] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(setFovBasedOvdPFH), 0, []] call CBA_fnc_addPerFrameHandler; }; }; diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index 0d97fe1f96..4404d0efe8 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -128,6 +128,7 @@ 0に設定すると、デフォルトのビデオ設定が使用されます Значение 0 будет использовать настройки видео по умолчанию Establecer a 0 utiliza las opciones de video por defecto + La valeur 0 permet d'utiliser les paramètres vidéo par défaut Client View Distance (On Foot) diff --git a/addons/viewports/functions/fnc_eachFrame.sqf b/addons/viewports/functions/fnc_eachFrame.sqf index 6bb452baad..068a5edcf5 100644 --- a/addons/viewports/functions/fnc_eachFrame.sqf +++ b/addons/viewports/functions/fnc_eachFrame.sqf @@ -36,7 +36,7 @@ if (cba_events_control) then { _shownIndex = -1; }; - ([_player] call FUNC(getSeatInfo)) params ["_role", "", "", "_comparment"]; + ([_player] call FUNC(getSeatInfo)) params ["_role", "", "", "_compartment"]; private _newIndexAngle = 45; // Controls the max angle private _eyesPosASL = AGLtoASL (positionCameraToWorld [0, 0, 0]); @@ -52,8 +52,8 @@ if (cba_events_control) then { #endif if ( (_viewAngle < _newIndexAngle) - && {(_compartments isEqualTo []) || {(toLower _comparment) in _compartments}} - && {(_roles isEqualTo []) || {(toLower _role) in _roles}} + && {(_compartments isEqualTo []) || {(toLowerANSI _compartment) in _compartments}} + && {(_roles isEqualTo []) || {(toLowerANSI _role) in _roles}} && {(vectorMagnitude _viewDiff) < _maxDistance} ) then { _newIndex = _forEachIndex; diff --git a/addons/viewports/functions/fnc_getViewports.sqf b/addons/viewports/functions/fnc_getViewports.sqf index 32f97e18f6..744b973151 100644 --- a/addons/viewports/functions/fnc_getViewports.sqf +++ b/addons/viewports/functions/fnc_getViewports.sqf @@ -61,9 +61,9 @@ if (isNil "_viewports") then { _maxDistance = 0.8; }; // compartments [ARRAY] - Optional - private _compartments = (getArray (_x >> "compartments")) apply {toLower _x}; + private _compartments = (getArray (_x >> "compartments")) apply {toLowerANSI _x}; // roles [ARRAY] - Optional - private _roles = (getArray (_x >> "roles")) apply {toLower _x}; + private _roles = (getArray (_x >> "roles")) apply {toLowerANSI _x}; [_name, _type, _camLocation, _camAttach, _screenLocation, _maxDistance, _compartments, _roles] }; diff --git a/addons/volume/XEH_postInitClient.sqf b/addons/volume/XEH_postInitClient.sqf index 2ce8f03a10..896bb718f8 100644 --- a/addons/volume/XEH_postInitClient.sqf +++ b/addons/volume/XEH_postInitClient.sqf @@ -23,7 +23,7 @@ if (!hasInterface) exitWith {}; if (!XGVAR(lowerInVehicles)) exitWith {}; - if (vehicle _unit != _unit) then { + if (!isNull objectParent _unit) then { call FUNC(lowerVolume); } else { call FUNC(restoreVolume); diff --git a/addons/weaponselect/XEH_postInit.sqf b/addons/weaponselect/XEH_postInit.sqf index 4d2c6464b2..77a2fc673b 100644 --- a/addons/weaponselect/XEH_postInit.sqf +++ b/addons/weaponselect/XEH_postInit.sqf @@ -210,4 +210,4 @@ if (!hasInterface) exitWith {}; [0, [false, false, false]]] call CBA_fnc_addKeybind; // Register fire event handler -["ace_firedPlayer", DFUNC(throwGrenade)] call CBA_fnc_addEventHandler; +["ace_firedPlayer", LINKFUNC(throwGrenade)] call CBA_fnc_addEventHandler; diff --git a/addons/weaponselect/XEH_preInit.sqf b/addons/weaponselect/XEH_preInit.sqf index 25d6b9b5d5..92ba1b06a6 100644 --- a/addons/weaponselect/XEH_preInit.sqf +++ b/addons/weaponselect/XEH_preInit.sqf @@ -21,10 +21,8 @@ GVAR(GrenadesNonFrag) = []; private _explosive = getNumber (configFile >> "CfgAmmo" >> _ammo >> "explosive"); ([GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select (_explosive == 0)) pushBack _x; - false - } count _magazines; - false -} count getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles"); + } forEach _magazines; +} forEach getArray (configFile >> "CfgWeapons" >> "Throw" >> "muzzles"); #include "initSettings.inc.sqf" diff --git a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf index 16bac855cc..8b9fcf94b7 100644 --- a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf +++ b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf @@ -22,7 +22,7 @@ private _weapons = _vehicle weaponsTurret _turret; if ( count _weapons > 1 - || {count _weapons > 0 && {!(_weapons select 0 in ["SmokeLauncher", "BWA3_SmokeLauncher"])}} // @todo somebody might use custom smoke launcher weapons aswell, maybe ... + || {_weapons isNotEqualTo [] && {!(_weapons select 0 in ["SmokeLauncher", "BWA3_SmokeLauncher"])}} // @todo somebody might use custom smoke launcher weapons aswell, maybe ... ) then { //This doesn't work reliably for vehilces with additional weapons for the commander. Select smoke launcher instead. diff --git a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf index 2be2d740ea..fc55b54b5f 100644 --- a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf @@ -30,7 +30,7 @@ _sound params ["_filename", ["_volume", 1], ["_soundPitch", 1], ["_distance", 0] if (_filename == "") exitWith {}; // add file extension .wss as default -if !(toLower (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then { +if !(toLowerANSI (_filename select [count _filename - 4]) in [".wav", ".ogg", ".wss"]) then { _filename = format ["%1.wss", _filename]; }; diff --git a/addons/weaponselect/functions/fnc_selectNextGrenade.sqf b/addons/weaponselect/functions/fnc_selectNextGrenade.sqf index 195bbc326b..ff111a93f6 100644 --- a/addons/weaponselect/functions/fnc_selectNextGrenade.sqf +++ b/addons/weaponselect/functions/fnc_selectNextGrenade.sqf @@ -37,8 +37,7 @@ private _grenades = []; if (_x in _magazines) then { _grenades pushBack _x; }; - false -} count ([GVAR(GrenadesAll), GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select _type); +} forEach ([GVAR(GrenadesAll), GVAR(GrenadesFrag), GVAR(GrenadesNonFrag)] select _type); // abort if no grenades are available if (_grenades isEqualTo []) exitWith {false}; diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index 51350226e1..98909dc2d4 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -1,10 +1,12 @@ #include "script_component.hpp" GVAR(WindInfo) = false; + ["ACE3 Common", QGVAR(WindInfoKey), localize LSTRING(WindInfoKeyToggle), { // Conditions: canInteract - if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotDragging", "isNotCarrying", "isNotSitting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !(isNull objectParent ACE_player || {objectParent ACE_player isKindOf "StaticWeapon"}) exitWith {false}; // Statement [] call FUNC(displayWindInfo); @@ -15,7 +17,8 @@ GVAR(WindInfo) = false; ["ACE3 Common", QGVAR(WindInfoKey_hold), localize LSTRING(WindInfoKeyHold), { // Conditions: canInteract - if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, ACE_player, ["isNotDragging", "isNotCarrying", "isNotSitting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !(isNull objectParent ACE_player || {objectParent ACE_player isKindOf "StaticWeapon"}) exitWith {false}; // Statement [] call FUNC(displayWindInfo); diff --git a/addons/weather/XEH_postServerInit.sqf b/addons/weather/XEH_postServerInit.sqf index da694bb5f1..2c20f672fe 100644 --- a/addons/weather/XEH_postServerInit.sqf +++ b/addons/weather/XEH_postServerInit.sqf @@ -9,8 +9,8 @@ if (GVAR(windSimulation)) then { call FUNC(initWind); - [FUNC(updateWind), 1] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(updateWind), 1] call CBA_fnc_addPerFrameHandler; }; - [FUNC(updateWeather), GVAR(updateInterval)] call CBA_fnc_addPerFrameHandler; + [LINKFUNC(updateWeather), GVAR(updateInterval)] call CBA_fnc_addPerFrameHandler; }] call CBA_fnc_addEventHandler; diff --git a/addons/weather/functions/fnc_calculateWindSpeed.sqf b/addons/weather/functions/fnc_calculateWindSpeed.sqf index 2ae1d94eec..cd73fac358 100644 --- a/addons/weather/functions/fnc_calculateWindSpeed.sqf +++ b/addons/weather/functions/fnc_calculateWindSpeed.sqf @@ -58,8 +58,7 @@ if (_terrainEffectEnabled) then { if (!(terrainIntersectASL [_position, _position vectorAdd _windSource])) exitWith { _newWindSpeed = cos(_x * 9) * _windSpeed; }; - nil - } count [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; + } forEach [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; _windSpeed = _newWindSpeed; }; }; @@ -81,8 +80,7 @@ if (_obstacleEffectEnabled) then { if (!(lineIntersects [_position, _position vectorAdd _windSource])) exitWith { _newWindSpeed = cos(_x * 2) * _windSpeed; }; - nil - } count [0, 5, 10, 15, 20, 25, 30, 35, 40, 45]; + } forEach [0, 5, 10, 15, 20, 25, 30, 35, 40, 45]; _windSpeed = _newWindSpeed; }; }; diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf index 23a87ecbf4..aeb7d580ae 100644 --- a/addons/weather/functions/fnc_displayWindInfo.sqf +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -35,7 +35,13 @@ TRACE_1("Starting Wind Info PFEH",GVAR(WindInfo)); disableSerialization; params ["", "_pfID"]; - if ((!GVAR(WindInfo)) || {!([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith))}) exitWith { + // Allow wind indicator inside static weapons + private _playerInStaticWeapon = objectParent ACE_Player isKindOf "StaticWeapon"; + + if ( + (!GVAR(WindInfo)) || + {!([ACE_player, ACE_player, ["notOnMap", "isNotDragging", "isNotCarrying", "isNotSitting"]] call EFUNC(common,canInteractWith)) && !(_playerInStaticWeapon)} + ) exitWith { TRACE_1("Ending Wind Info PFEH",GVAR(WindInfo)); GVAR(WindInfo) = false; (["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; @@ -45,12 +51,18 @@ TRACE_1("Starting Wind Info PFEH",GVAR(WindInfo)); //Keeps the display open: (["RscWindIntuitive"] call BIS_fnc_rscLayer) cutRsc ["RscWindIntuitive", "PLAIN", 1, false]; + private _playerEyePos = eyePos ACE_Player; + if (_playerInStaticWeapon) then { + // Raise eyePos by 1 meter if player is in a static weapon, to prevent wind from being blocked by the open vehicle + _playerEyePos = _playerEyePos vectorAdd [0, 0, 1]; + }; + private _windSpeed = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { // With wind gradient - [eyePos ACE_player, true, true, true] call FUNC(calculateWindSpeed); + [_playerEyePos, true, true, true] call FUNC(calculateWindSpeed); } else { // Without wind gradient - [eyePos ACE_player, false, true, true] call FUNC(calculateWindSpeed); + [_playerEyePos, false, true, true] call FUNC(calculateWindSpeed); }; diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index d80573c286..555704fc87 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -15,7 +15,7 @@ * Public: No */ -private _worldName = toLower worldName; +private _worldName = toLowerANSI worldName; TRACE_1("getting map data",_worldName); // Set default values @@ -48,34 +48,35 @@ GVAR(currentHumidity) = 0; GVAR(currentOvercast) = 0; // Get all non inherited arrays to filter maps that inherit from Stratis/Altis/Tanoa -private _nonInheritedArrays = configProperties [configFile >> "CfgWorlds" >> _worldName, "isArray _x", false]; +private _cfgPath = configFile >> "CfgWorlds" >> _worldName; +private _nonInheritedArrays = configProperties [_cfgPath, "isArray _x", false]; // And check if any custom non-inherited weather is defined through config and use that if so -if ((configFile >> "CfgWorlds" >> _worldName >> "ACE_TempDay") in _nonInheritedArrays) exitWith { - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempDay")) then { - GVAR(TempDay) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempDay"); +if ((_cfgPath >> "ACE_TempDay") in _nonInheritedArrays) exitWith { + if (isArray (_cfgPath >> "ACE_TempDay")) then { + GVAR(TempDay) = getArray (_cfgPath >> "ACE_TempDay"); }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempNight")) then { - GVAR(TempNight) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_TempNight"); + if (isArray (_cfgPath >> "ACE_TempNight")) then { + GVAR(TempNight) = getArray (_cfgPath >> "ACE_TempNight"); }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_Humidity")) then { - GVAR(Humidity) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_Humidity"); + if (isArray (_cfgPath >> "ACE_Humidity")) then { + GVAR(Humidity) = getArray (_cfgPath >> "ACE_Humidity"); }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMin")) then { - GVAR(WindSpeedMin) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMin"); + if (isArray (_cfgPath >> "ACE_WindSpeedMin")) then { + GVAR(WindSpeedMin) = getArray (_cfgPath >> "ACE_WindSpeedMin"); }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMean")) then { - GVAR(WindSpeedMean) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMean"); + if (isArray (_cfgPath >> "ACE_WindSpeedMean")) then { + GVAR(WindSpeedMean) = getArray (_cfgPath >> "ACE_WindSpeedMean"); }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMax")) then { - GVAR(WindSpeedMax) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindSpeedMax"); + if (isArray (_cfgPath >> "ACE_WindSpeedMax")) then { + GVAR(WindSpeedMax) = getArray (_cfgPath >> "ACE_WindSpeedMax"); }; - if (isArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindDirectionProbabilities")) then { - GVAR(WindDirectionProbabilities) = getArray (configFile >> "CfgWorlds" >> _worldName >> "ACE_WindDirectionProbabilities"); + if (isArray (_cfgPath >> "ACE_WindDirectionProbabilities")) then { + GVAR(WindDirectionProbabilities) = getArray (_cfgPath >> "ACE_WindDirectionProbabilities"); }; }; // Check if the map is among the most popular -if (_worldName in ["chernarus", "bootcamp_acr", "woodland_acr", "utes"]) then { +if (_worldName in ["chernarus", "bootcamp_acr", "woodland_acr", "utes"]) exitWith { // Source: http://www.iten-online.ch/klima/europa/tschechien/prag.htm GVAR(TempDay) = [1, 3, 9, 14, 19, 23, 25, 24, 21, 13, 7, 2]; GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2]; @@ -239,3 +240,17 @@ if (_worldName in ["kunduz"]) exitWith { [0.04, 0.02, 0.05, 0.14, 0.19, 0.07, 0.10, 0.07] // December ]; }; + + +// Catches any "Winter" Map that hasnt been defined otherwise - this should stay at the end of the file +// Values are not based on any RL reference since the snow terrain textures persists regardless the date +_cfgPath = _cfgPath >> "RainParticles"; +if ( + "winter" in _worldName || + {"snow" in getText (_cfgPath >> "rainDropTexture")} || + {getNumber (_cfgPath >> "snow") != 0} +) exitWith { + GVAR(TempDay) = [-10,-9,-8,-7,-6,-5,-6,-7,-8,-9,-10,-11]; + GVAR(TempNight) = [-15,-14,-13,-12,-11,-10,-9,-10,-11,-12,-13,-17]; + GVAR(Humidity) = [82, 80, 81, 82, 83, 82, 81, 82, 83, 82, 83, 82]; +}; diff --git a/addons/winddeflection/XEH_postInit.sqf b/addons/winddeflection/XEH_postInit.sqf index fbdfdfc868..a414058349 100644 --- a/addons/winddeflection/XEH_postInit.sqf +++ b/addons/winddeflection/XEH_postInit.sqf @@ -9,12 +9,12 @@ GVAR(trackedBullets) = []; if (!GVAR(enabled)) exitWith {}; // Register fire event handler - ["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler; - ["ace_firedPlayerNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler; + ["ace_firedPlayer", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler; + ["ace_firedPlayerNonLocal", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler; if (GVAR(vehicleEnabled)) then { - ["ace_firedPlayerVehicle", DFUNC(handleFired)] call CBA_fnc_addEventHandler; - ["ace_firedPlayerVehicleNonLocal", DFUNC(handleFired)] call CBA_fnc_addEventHandler; + ["ace_firedPlayerVehicle", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler; + ["ace_firedPlayerVehicleNonLocal", LINKFUNC(handleFired)] call CBA_fnc_addEventHandler; }; [] call FUNC(updateTrajectoryPFH); diff --git a/addons/yardage450/XEH_postInit.sqf b/addons/yardage450/XEH_postInit.sqf index 2959360f7d..1f3cb1a1cf 100644 --- a/addons/yardage450/XEH_postInit.sqf +++ b/addons/yardage450/XEH_postInit.sqf @@ -1,5 +1,7 @@ #include "script_component.hpp" +if (!hasInterface) exitWith {}; + #include "initKeybinds.inc.sqf" GVAR(active) = false; diff --git a/addons/yardage450/functions/fnc_turnOn.sqf b/addons/yardage450/functions/fnc_turnOn.sqf index e30798c523..62bb135a2c 100644 --- a/addons/yardage450/functions/fnc_turnOn.sqf +++ b/addons/yardage450/functions/fnc_turnOn.sqf @@ -15,12 +15,12 @@ * Public: No */ -#define __dsp (uiNamespace getVariable "ACE_RscYardage450") -#define __ctrlTarget (__dsp displayCtrl 720041) -#define __ctrlLaser (__dsp displayCtrl 720042) -#define __ctrlRange (__dsp displayCtrl 720043) -#define __ctrlMeters (__dsp displayCtrl 720044) -#define __ctrlYards (__dsp displayCtrl 720045) +#define DISPLAY_YARDAGE (uiNamespace getVariable "ACE_RscYardage450") +#define CTRL_TARGET (DISPLAY_YARDAGE displayCtrl 720041) +#define CTRL_LASER (DISPLAY_YARDAGE displayCtrl 720042) +#define CTRL_RANGE (DISPLAY_YARDAGE displayCtrl 720043) +#define CTRL_METERS (DISPLAY_YARDAGE displayCtrl 720044) +#define CTRL_YARDS (DISPLAY_YARDAGE displayCtrl 720045) if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {}; @@ -33,25 +33,28 @@ GVAR(active) = true; [{ if (CBA_missionTime - GVAR(powerOnTime) > 30) exitWith { GVAR(active) = false; - 74210 cutText ["", "PLAIN"]; + QUOTE(ADDON) cutText ["", "PLAIN"]; [_this select 1] call CBA_fnc_removePerFrameHandler; }; if (currentWeapon ACE_player == "ACE_Yardage450" && cameraView == "GUNNER") then { - 74210 cutRsc ["ACE_RscYardage450", "PLAIN", 1, false]; - - __ctrlLaser ctrlShow GVAR(lasing); - if (GVAR(targetAcquired)) then { - __ctrlTarget ctrlSetText "Target Acquired"; - __ctrlRange ctrlSetText GVAR(targetRangeText); - } else { - __ctrlTarget ctrlSetText ""; - __ctrlRange ctrlSetText "---"; + if (isNil {DISPLAY_YARDAGE} || {isNull DISPLAY_YARDAGE} || {ctrlIDD DISPLAY_YARDAGE != -1}) then { + TRACE_1("making display",DISPLAY_YARDAGE); + QUOTE(ADDON) cutRsc ["ACE_RscYardage450", "PLAIN", 1, false]; }; - __ctrlMeters ctrlShow !GVAR(useYards); - __ctrlYards ctrlShow GVAR(useYards); + + CTRL_LASER ctrlShow GVAR(lasing); + if (GVAR(targetAcquired)) then { + CTRL_TARGET ctrlSetText "Target Acquired"; + CTRL_RANGE ctrlSetText GVAR(targetRangeText); + } else { + CTRL_TARGET ctrlSetText ""; + CTRL_RANGE ctrlSetText "---"; + }; + CTRL_METERS ctrlShow !GVAR(useYards); + CTRL_YARDS ctrlShow GVAR(useYards); } else { - 74210 cutText ["", "PLAIN"]; + QUOTE(ADDON) cutText ["", "PLAIN"]; }; }, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/zeus/XEH_preInit.sqf b/addons/zeus/XEH_preInit.sqf index 12bd359866..46e95431a1 100644 --- a/addons/zeus/XEH_preInit.sqf +++ b/addons/zeus/XEH_preInit.sqf @@ -7,12 +7,12 @@ PREP_RECOMPILE_START; PREP_RECOMPILE_END; if (isServer) then { - [QGVAR(zeusUnitAssigned), FUNC(handleZeusUnitAssigned)] call CBA_fnc_addEventHandler; + [QGVAR(zeusUnitAssigned), LINKFUNC(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; + ["AllVehicles", "InitPost", LINKFUNC(addObjectToCurator), true, [], true] call CBA_fnc_addClassEventHandler; }; }] call CBA_fnc_addEventHandler; }; diff --git a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf index 7378cae65e..8dd5f26929 100644 --- a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf +++ b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf @@ -29,7 +29,7 @@ if (_activated && local _logic) then { case (isnull _unit): {_error = localize "str_a3_BIS_fnc_showCuratorFeedbackMessage_506";}; case !(alive _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorDead";}; case (isnull group _unit || !(side group _unit in [east,west,resistance,civilian])): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorBrain";}; - case (vehicle _unit != _unit || effectivecommander _unit != _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorVehicle";}; + case (!isNull objectParent _unit || effectivecommander _unit != _unit): {_error = localize "str_a3_BIS_fnc_moduleArsenal_errorVehicle";}; }; if (_error == "") then { diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 135ed538cd..ba30a2eaf4 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -42,7 +42,7 @@ if (_activated) then { _posAmmo = +_pos; _posAmmo set [2,0]; _dir = direction _logic; - _simulation = tolower gettext (configfile >> "cfgammo" >> _ammo >> "simulation"); + _simulation = toLowerANSI gettext (configfile >> "cfgammo" >> _ammo >> "simulation"); _altitude = 0; _velocity = []; _attach = false; diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf index 2a013fa4c2..a624b7dded 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf @@ -69,7 +69,7 @@ if ([_unit] call EFUNC(common,isPlayer)) exitWith { } else { // Direct fire - Get a target position that will work private _lis = lineIntersectsSurfaces [eyePos _unit, _targetASL, _unit, _vehicle]; - if ((count _lis) > 0) then { // If point is hidden, unit won't fire, do a ray cast to find where they should shoot at + if (_lis isNotEqualTo []) then { // If point is hidden, unit won't fire, do a ray cast to find where they should shoot at _targetASL = ((_lis select 0) select 0); TRACE_1("using ray cast pos",_mousePosASL distance _targetASL); }; diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 6f163b46be..8b3aaed92c 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1320,6 +1320,8 @@ Scarica dal carico 貨物室から降ろす 화물 내리기 + Выгрузить из отсека + Décharger de la cargaison Toggle NVGs @@ -1964,6 +1966,8 @@ Il Menù Medico è disabilitato 医療メニューは無効になっています 의료 메뉴가 비활성화되었습니다 + Медицинское меню отключено + Le Menu médical est désactivé Lay Trenchline @@ -1973,6 +1977,7 @@ Grabenlinie legen Piazza Trincea 塹壕溝線を敷設 + Проложить траншею +SHIFT to force (Can only lay N/S or E/W) @@ -1982,6 +1987,7 @@ +SHIFT zum Erzwingen (Kann nur nach N/S oder E/W legen) +SHIFT per forzare (Può piazzare solo N/S o E/O +SHIFTキー で強制的に敷設 (北/南または東/西方向にのみ配置可能) + +SHIFT на принудительное (может укладываться только на Север/Юг или Восток/Запад) diff --git a/docs/_config.yml b/docs/_config.yml index bc7440eee3..66cd1141f7 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -8,9 +8,9 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 16 - patch: 3 - build: 79 + minor: 17 + patch: 0 + build: 82 markdown: kramdown diff --git a/docs/_config_dev.yml b/docs/_config_dev.yml index 0d0cf1b7fc..e3c042e9c7 100644 --- a/docs/_config_dev.yml +++ b/docs/_config_dev.yml @@ -8,9 +8,9 @@ ace: githubUrl: https://github.com/acemod/ACE3 version: major: 3 - minor: 16 - patch: 3 - build: 79 + minor: 17 + patch: 0 + build: 82 markdown: kramdown diff --git a/docs/_includes/_footer.html b/docs/_includes/_footer.html index ec55355d99..b13d9d47b5 100644 --- a/docs/_includes/_footer.html +++ b/docs/_includes/_footer.html @@ -36,6 +36,12 @@ +
+

+ ACE3 is free and open-source software. +
+ acemod +

diff --git a/docs/_includes/_header.html b/docs/_includes/_header.html index 7123c5968a..8c6cd8c39e 100644 --- a/docs/_includes/_header.html +++ b/docs/_includes/_header.html @@ -27,6 +27,7 @@ + diff --git a/docs/_posts/2024-04-01-ace3-version3170.md b/docs/_posts/2024-04-01-ace3-version3170.md new file mode 100644 index 0000000000..fddc71642a --- /dev/null +++ b/docs/_posts/2024-04-01-ace3-version3170.md @@ -0,0 +1,48 @@ +--- +title: ACEREP #00012 +description: Status report on ACE3 version 3.17.0 +parent: posts +image: +author: Jonpas +layout: post +--- + +This post accompanies the release of ACE3 v3.17.0, a smaller but not any less significant release. We will also take a peek at at our new experimental project. + + + +### Release Cadence + +With improved tooling such as [HEMTT](https://github.com/BrettMayson/HEMTT) simplifying our release processes, we have been aiming aiming to do releases more often than in the past. This is one of the first bigger releases following the set cadence. + +While releases are expected to be smaller as less time passes between them resulting in fewer changes, the new cadence should effectively contribute to higher quality and stability of ACE3 overall. + +We are maintaining our philosophy of "no schedule, no ETAs" and simply release when the team is able to and opts to do so. Work done on the project should not affect this and we aim to release more often even if there are only little or insignificant changes. + +### Integrated CUP Compatibility + +[Community Upgrade Project](https://www.cup-arma3.org/) has always provided compatibility and support for ACE3. Originally it has been hosted and maintained by the CUP Team. With the availability of automatically loading a compatibility patch if the given mod is loaded, we have worked together with the CUP Team to bring ACE3 Compatibility for CUP directly into the ACE3 mod. + +**This means you should remove any compatibility patches provided by CUP** and instead simply use ACE3 together with CUP. In addition to integrated compatibility, some additional improvements were also made. + +### ACE Anvil + +
+
+ ACE Anvil Logo +
+
+ +[ACE Anvil](https://github.com/acemod/ACE-Anvil) is an **experimental** realism mod for Arma Reforger, the first Arma game running on the Enfusion engine. + +Anvil is not expected to reach feature parity with ACE3. It is heavily experimental and we invite you to contribute to it. As Arma Reforger is a test platform, go wild, we are happy to add any realism or quality of life features, even some that might not be strictly within ACE's usual scope. + +Learn more about ACE Anvil at the [Anvil Documentation](https://anvil.acemod.org/)! + +### The End Things + +The change log for ACE3 v3.17.0 can be found [here](https://github.com/acemod/ACE3/releases/v3.17.0){:target="_blank"}. + +We are still in need for translations for some languages within the ACE3 project. Please have a look at [this GitHub issue to track the progress and what languages lack translations](https://github.com/acemod/ACE3/issues/367){:target="_blank"}. Any and all help with this is very appreciated. + +Make sure to [follow us on Twitter](https://twitter.com/intent/follow?screen_name=ace3mod&tw_p=followbutton){:target="_blank"} and to [like our Facebook page](https://www.facebook.com/ACE3Mod/){:target="_blank"}. diff --git a/docs/docker-compose.yml b/docs/docker-compose.yml index ca25a38c0a..5645a80000 100644 --- a/docs/docker-compose.yml +++ b/docs/docker-compose.yml @@ -1,5 +1,3 @@ -version: "3.2" - services: docs: container_name: ace3mod_jekyll diff --git a/docs/img/news/240401_ace_anvil_logo.webp b/docs/img/news/240401_ace_anvil_logo.webp new file mode 100644 index 0000000000..8a679e7a59 Binary files /dev/null and b/docs/img/news/240401_ace_anvil_logo.webp differ diff --git a/docs/index.html b/docs/index.html index 1b830ece20..c15d788798 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,7 +8,7 @@ sitemap: exclude: "yes" --- -Fork me on GitHub +Fork me on GitHub
diff --git a/docs/team.md b/docs/team.md index f8fe165bf9..d5d9d03bfa 100644 --- a/docs/team.md +++ b/docs/team.md @@ -11,6 +11,8 @@ This page lists all current maintainers for the ACE3 projects with their areas o This lists all the maintainers responsible for project management and the overall direction of the ACE3 project. +- [BaerMitUmlaut](https://github.com/BaerMitUmlaut){:target="_blank"} + - Scripting, Config - [bux](https://github.com/bux){:target="_blank"} - Scripting, Testing - [Felix Wiegand](https://github.com/koffeinflummi){:target="_blank"} @@ -23,13 +25,13 @@ This lists all the maintainers responsible for project management and the overal - Coding, Modeling, Performance, SME - [PabstMirror](https://github.com/PabstMirror){:target="_blank"} - Scripting, Config +- [veteran29](https://github.com/veteran29){:target="_blank"} + - Scripting, Config - [ViperMaul](https://github.com/vipermaul){:target="_blank"} - Project management ## Core Maintainers -- [BaerMitUmlaut](https://github.com/BaerMitUmlaut){:target="_blank"} - - Scripting, Config - [commy2](https://github.com/commy2){:target="_blank"} - Scripting, Config - [esteldunedain](https://github.com/esteldunedain){:target="_blank"} @@ -58,18 +60,19 @@ This lists all the maintainers responsible for project management and the overal - gundy - Janus - [johnb43](https://github.com/johnb432){:target="_blank"} +- [Kex](https://github.com/kexanone){:target="_blank"} - [Kieran](https://github.com/kieran-s){:target="_blank"} - [mharis001](https://github.com/mharis001){:target="_blank"} - [tcvm](https://github.com/TheCandianVendingMachine){:target="_blank"} - [TheMagnetar](https://github.com/TheMagnetar){:target="_blank"} - Scripting - tpM -- [veteran29](https://github.com/veteran29){:target="_blank"} ## Moderators - [drofseh](https://github.com/Drofseh){:target="_blank"} - [MikeMF](https://github.com/Mike-MF){:target="_blank"} +- [MiszczuZPolski](https://github.com/MiszczuZPolski){:target="_blank"} ## Contributors diff --git a/docs/wiki/feature/atragmx.md b/docs/wiki/feature/atragmx.md index fbac7a30fd..7a3b54d64e 100644 --- a/docs/wiki/feature/atragmx.md +++ b/docs/wiki/feature/atragmx.md @@ -63,28 +63,28 @@ Horus ATragMX software considers atmospheric conditions, gun data, ammunition, r - Update the `Atmsphr` column and `Done`. Requirement: [Kestrel 4500]({{ site.baseurl }}/wiki/feature/kestrel4500.html). - *Check the new `Muzzle Velocity` in the `Gun` column.* -- Update the `Target` column and `Done`. Requirement: [wind arrow]({{ site.baseurl }}/wiki/feature/weather.html), [Protractor]({{ site.baseurl }}/wiki/feature/advanced-ballistics#22-protractor.html), [Map Tools]({{ site.baseurl }}/wiki/feature/maptools.html). For advanced tools: [ACE3 Equipment]({{ site.baseurl }}/wiki/feature.html). +- Update the `Target` column and `Done`. Requirement: [Wind arrow]({{ site.baseurl }}/wiki/feature/weather.html), [Protractor]({{ site.baseurl }}/wiki/feature/advanced-ballistics#22-protractor), [Map Tools]({{ site.baseurl }}/wiki/feature/maptools.html). For advanced tools: [ACE3 Equipment]({{ site.baseurl }}/wiki/feature.html). - `Latitude`: *[ACE3 Github]({{ site.ace.githubUrl }}/blob/master/addons/common/functions/fnc_getMapData.sqf) or Eden Editor's Extended Debug Console: Watch:* `ace_common_maplatitude`. - - `Dir of Fire (deg from N)`: *The value is therefore given as the direction of the barrel axis from true north.* **[Horus manual p.14]** - - `Wind speed (m/s)`: *Two wind speed values (low and high) may be entered on the target screen,[...] Lead/Wind2 button on the screen.* **[Horus manual p.32]** - - *Wind takes into account geographic location, season, time of day, obstacles, altitude and surface roughness: [Wind Profile](https://wind-data.ch/tools/profile.php?lng=en).* - - `Wind Direction (clock)`: *Wind Direction is expressed in clock points.[...], wind is always described in terms of where it is coming from.* **[Horus manual p.16]** - - `Inclination Angle`: *The degrees field is marked with a “d” and the cosine field with a “c”.* **[Horus manual p.33]** - - `Target Speed`: *Target Speed Assist* **[Horus manual p.21]** - - `Target Range (meters)`: *Parameter Limits minimum and maximum values: 25 - 3700 meters.* **[Horus manual p.17]** + - `Dir of Fire (deg from N)`: *The value is therefore given as the direction of the barrel axis from true north.* [Horus manual p.14] + - `Wind speed (m/s)`: *Two wind speed values (low and high) may be entered on the target screen,[...] Lead/Wind2 button on the screen.* [Horus manual p.32] + - Wind takes into account geographic location, season, time of day, obstacles, altitude and surface roughness: [Wind Profile](https://wind-data.ch/tools/profile.php?lng=en). + - `Wind Direction (clock)`: *Wind Direction is expressed in clock points.[...], wind is always described in terms of where it is coming from.* [Horus manual p.16] + - `Inclination Angle`: *The degrees field is marked with a “d” and the cosine field with a “c”.* [Horus manual p.33] + - `Target Speed`: *Target Speed Assist* [Horus manual p.21] + - `Target Range (meters)`: *Parameter Limits minimum and maximum values: 25 - 3700 meters.* [Horus manual p.17] - Apply vertical (Page Up and Down keys as default) and horizontal (Left Ctrl + Page Up and Down keys as default) elevations to the [scope]({{ site.baseurl }}/wiki/feature/scopes.html). - Hold Breath (Left Shift as default) and Fire (Prim. Mouse. Btn. as default). ### 3.3 Example with Truing tool -> This process is called “Truing Drop”, or simply “Truing”. It involves taking 2 or 3 real flight data points (finding bullet drop at 2 or 3 places along its flight) and feeding it into the calculation parameters. **[Horus manual p.23]** +> This process is called “Truing Drop”, or simply “Truing”. It involves taking 2 or 3 real flight data points (finding bullet drop at 2 or 3 places along its flight) and feeding it into the calculation parameters. [Horus manual p.23] -> The Truing Drop function is opened from ATrag’s main screen by selecting “Options” [...], then selecting “Truing Drop” from the menu that appears. **[Horus manual p.23]** +> The Truing Drop function is opened from ATrag’s main screen by selecting “Options” [...], then selecting “Truing Drop” from the menu that appears. [Horus manual p.23] > With C1, you can also insert the new BC into the C1 table (with the target range value), or you can replace the C1 table with the following values: > 1. first entry: Zero Range, original C1. > 2. second entry: range at 75% of distance between transonic start and subsonic start, with original C1. -> 3. third entry: range 200 (y/m) beyond subsonic start, with new calculated C1. **[Horus manual p.24]** +> 3. third entry: range 200 (y/m) beyond subsonic start, with new calculated C1. [Horus manual p.24] - Basic example with ammunition 7.62x51mm G7 ballistic coefficient. - Open the AtragMx and the `Atmsphr` column, select `Default` and `Done`. @@ -149,13 +149,13 @@ Horus ATragMX software considers atmospheric conditions, gun data, ammunition, r ### 3.6 Connecting AtragMx with Vector 21 and DAGR -- Requirement: [Vector]({{ site.baseurl }}/wiki/framework/vector.html) and [DAGR]({{ site.baseurl }}/wiki/framework/dagr.html). +- Requirement: [Vector]({{ site.baseurl }}/wiki/feature/vector.html) and [DAGR]({{ site.baseurl }}/wiki/feature/dagr.html). - Open the self interaction menu Ctrl + ⊞ Win. - Select `Equipment`. - Select `Configure DAGR` and `CONNECT TO` (DOWN and HELP/SEL) `Vector 21`(HELP/SEL). - Equip and use the Vector (B key as default). -- Check target's [slope distance and azimuth]({{ site.baseurl }}/wiki/feature/vector#23-slope-distance-and-azimuth.html) (hold both R and Tab keys as default). -- Open the [AtragMx properly configured before]({{ site.baseurl }}/wiki/feature/atragmx#32-example-with-m14-and-default-762mm-20rnd-mag.html) according to current rifle and ammunition. +- Check target's [slope distance and azimuth]({{ site.baseurl }}/wiki/feature/vector#23-slope-distance-and-azimuth) (hold both R and Tab keys as default). +- Open the [AtragMx properly configured before](#32-example-with-m14-and-default-762mm-20rnd-mag) according to current rifle and ammunition. - Open the `Target` column: `Dir of Fire (deg from N)`, `Inclination Angle` and `Target Range (meters)` updated with Vector's values. ### 3.7 Adding AtragMx Presets @@ -205,13 +205,13 @@ Horus ATragMX software considers atmospheric conditions, gun data, ammunition, r **In position:** - **Do not update the `Atmsphr` column.** Default ballistic doesn't take into account temperature, pressure and humidity. -- Update the `Target` column and `Done`. Requirement: [wind arrow]({{ site.baseurl }}/wiki/feature/weather.html), [Protractor]({{ site.baseurl }}/wiki/feature/advanced-ballistics#22-protractor.html), [Map Tools]({{ site.baseurl }}/wiki/feature/maptools.html). For advanced tools: [ACE3 Equipment]({{ site.baseurl }}/wiki/feature.html). - - `Wind speed (m/s)`: *Two wind speed values (low and high) may be entered on the target screen,[...] Lead/Wind2 button on the screen.* **[Horus manual p.32]** - - *Wind takes into account geographic location, season, time of day and obstacles.* - - `Wind Direction (clock)`: *Wind Direction is expressed in clock points.[...], wind is always described in terms of where it is coming from.* **[Horus manual p.16]** - - `Inclination Angle`: *The degrees field is marked with a “d” and the cosine field with a “c”.* **[Horus manual p.33]** - - `Target Speed`: *Target Speed Assist* **[Horus manual p.21]** - - `Target Range (meters)`: *Parameter Limits minimum and maximum values: 25 - 3700 meters.* **[Horus manual p.17]** +- Update the `Target` column and `Done`. Requirement: [Wind arrow]({{ site.baseurl }}/wiki/feature/weather.html), [Protractor]({{ site.baseurl }}/wiki/feature/advanced-ballistics#22-protractor), [Map Tools]({{ site.baseurl }}/wiki/feature/maptools.html). For advanced tools: [ACE3 Equipment]({{ site.baseurl }}/wiki/feature.html). + - `Wind speed (m/s)`: *Two wind speed values (low and high) may be entered on the target screen,[...] Lead/Wind2 button on the screen.* [Horus manual p.32] + - Wind takes into account geographic location, season, time of day and obstacles. + - `Wind Direction (clock)`: *Wind Direction is expressed in clock points.[...], wind is always described in terms of where it is coming from.* [Horus manual p.16] + - `Inclination Angle`: *The degrees field is marked with a “d” and the cosine field with a “c”.* [Horus manual p.33] + - `Target Speed`: *Target Speed Assist* [Horus manual p.21] + - `Target Range (meters)`: *Parameter Limits minimum and maximum values: 25 - 3700 meters.* [Horus manual p.17] - Apply vertical (Page Up and Down keys as default) and horizontal (Left Ctrl + Page Up and Down keys as default) elevations to the [scope]({{ site.baseurl }}/wiki/feature/scopes.html). - Hold Breath (Left Shift as default) and Fire (Prim. Mouse. Btn. as default). diff --git a/docs/wiki/feature/maptools.md b/docs/wiki/feature/maptools.md index 4145eb1a18..f8ce7e5416 100644 --- a/docs/wiki/feature/maptools.md +++ b/docs/wiki/feature/maptools.md @@ -25,7 +25,7 @@ This adds map tools that can be used to measure distances between two points or This adds a plotting board that can be used to aid in the rapid usage and adjustment of short-ranged indirect fires, as well as quick measurements of directions and distances between points, and general land-navigation. ### 1.4 GPS on map -If you are equipped with a vanilla GPS it will be shown on the map. (You don't need the `Map Tools` item in your inventory for this.) +If you have GPS capability, a GPS display will be shown on the map, indicating current grid position. (You don't need the `Map Tools` item in your inventory for this.) ## 2. Usage @@ -49,6 +49,7 @@ If you are equipped with a vanilla GPS it will be shown on the map. (You don't n - Press the self interaction key Ctrl + ⊞ Win (ACE3 default key bind `Self Interaction Key`). - Select `Show Plotting Board`. - Note that you can drag the Plotting Board around with LMB and rotate the different parts of the Plotting Board, each independently from each other, with Ctrl + LMB. +- When a new marker (Local or Group Channel) is created on the inner circle of the Plotting board, the marker will move accordingly when the Plotting Board gets moved or rotated. ### 2.4 Drawing lines - You can draw lines on the plotting board. diff --git a/docs/wiki/framework/arsenal-framework.md b/docs/wiki/framework/arsenal-framework.md index 4baddf66ad..273a70836f 100644 --- a/docs/wiki/framework/arsenal-framework.md +++ b/docs/wiki/framework/arsenal-framework.md @@ -136,8 +136,9 @@ Examples: ACE Arsenal uses 2 existing config entries to sort and display items. -- `baseWeapon`: Class name that is used to display an item in the arsenal. This property can be applied to any weapon or weapon attachment in `CfgWeapons`. +- `baseWeapon`: Class name that is used to display an item in the arsenal, used for weapon/attachment variants that are not normally shown to the player (AI variants, PIP optics, and so on). This property can be applied to any weapon or weapon attachment in `CfgWeapons`. Items using CBA or RHS' Scripted Optics systems, or CBA Switchable Attachments do not need this property explictly set, and will automatically use their player-accessible class. - `ACE_isUnique`: Classes in `CfgMagazines` with this property set to `1` will be treated and shown by the Arsenal as Misc. Items. Used for items with attached data that needs to be kept track of, such as Notepads or Spare Barrels. +- `ACE_asItem`: Classes in `CfgMagazines` with this property set to `1` will be treated and shown by the Arsenal as Items. Used for magazines that are not meant to be used in a weapon, such as Painkillers. ### 3.2 New config entries @@ -159,7 +160,7 @@ ACE Medical Treatment and ACE Field Rations also add their own sub-categories, i - `ACE_isMedicalItem`: Items with this property set to `1` will be sorted to the ACE Medical Tab. - `ACE_isFieldRationItem`: Items with this property set to `1` will be sorted to the ACE Field Rations Tab. -Only Misc. Items will be checked for these properties. Magazines must have ACE_isUnique property. +Only Misc. Items will be checked for these properties. Magazines must have `ACE_isUnique` or `ACE_asItem` property. ## 4. Default loadouts @@ -511,6 +512,7 @@ All are local. | ace_arsenal_loadoutsDisplayClosed | None | 3.12.3 | | ace_arsenal_loadoutsTabChanged | loadouts screen display (DISPLAY), tab control (CONTROL) | 3.12.3 | | ace_arsenal_loadoutsListFilled | loadouts screen display (DISPLAY), tab control (CONTROL) | 3.12.3 | +| ace_arsenal_loadoutVerified | loadout data (ARRAY), loadout CBA extended data (HASHMAP), null items (ARRAY), unavailable items (ARRAY), unavailable extended data (ARRAY) | 3.17.0 | | ace_arsenal_weaponItemChanged | weapon classname (STRING), item classname (STRING), item index (NUMBER, 0-5: muzzle, side, optic, bipod, magazine, underbarrel) | 3.16.0 | ## 9. Custom sub item categories diff --git a/docs/wiki/framework/events-framework.md b/docs/wiki/framework/events-framework.md index c29f271719..8a50912e02 100644 --- a/docs/wiki/framework/events-framework.md +++ b/docs/wiki/framework/events-framework.md @@ -42,6 +42,7 @@ The vehicle events will also have the following local variables available `_gunn |`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) |`ace_medical_handleUnitVitals` | [_unit, _deltaT] | Local | Listen | Vitals update ran for unit, _deltaT is the time elapsed since the previous vitals update (local to _unit) +|`ace_medical_treatment_bandaged` | [_medic, _patient, _bodyPart, _className, _bandageEffectiveness] | Local | Listen | _medic has bandaged _patient, the array can be modified to change treatment parameters (local to _medic) ### 2.3 Interaction Menu (`ace_interact_menu`) MenuType: 0 = Interaction, 1 = Self Interaction @@ -129,6 +130,36 @@ MenuType: 0 = Interaction, 1 = Self Interaction | `ace_trenches_placed` | [_unit, _trench] | Global | Listen | After trench object is placed by unit. | `ace_trenches_finished` | [_unit, _trench] | Global | Listen | After trench object is fully dug up by unit (100% progress). +### 2.13 Medical GUI (`ace_medical_gui`) + +| Event Key | Parameters | Locality | Type | Description | +|---------- |------------|----------|------|-------------| +| `ace_medical_gui_updateBodyImage` | [_ctrlGroup, _target, _selectionN] | Local | Listen | Allows mods to update any modifications they have made to the body image +| `ace_medical_gui_updateInjuryListGeneral` | [_ctrl, _target, _selectionN, _entries] | Local | Listen | Allows mods to update the general injury list by pushing to the _entries array +| `ace_medical_gui_updateInjuryListPart` | [_ctrl, _target, _selectionN, _entries, _bodyPartName] | Local | Listen | Allows mods to update the part injury list by pushing to the _entries array +| `ace_medical_gui_updateInjuryListWounds` | [_ctrl, _target, _selectionN, _woundEntries, _bodyPartName] | Local | Listen | Allows mods to update the wounds injury list by pushing to the _woundEntries array +| `ace_medical_gui_logListAppended` | [_ctrl, _row, _message, _unlocalizedMessage, _timeStamp, _arguments] | Local | Listen | After an entry is appended to the log list + +### 2.14 Medical Treatment (`ace_medical_treatment`) + +| Event Key | Parameters | Locality | Type | Description | +|---------- |------------|----------|------|-------------| +| `ace_medical_treatment_fullHealLocalMod` | [_patient] | Local | Listen | Called before a local unit is fully healed, mods can listen and apply their own healing logic + +### 2.15 Medical Status (`ace_medical_status`) + +| Event Key | Parameters | Locality | Type | Description | +|---------- |------------|----------|------|-------------| +| `ace_medical_status_getBloodLoss` | [_unit, _bloodLoss] | Local | Listen | Called when blood loss is calculated for a unit, mods can listen and modify the blood loss value by modifying the array + +### 2.16 Interaction (`ace_interaction`) + +| Event Key | Parameters | Locality | Type | Description | +|---------- |------------|----------|------|-------------| +|---------- |------------|----------|------|-------------| +| `ace_interaction_doorOpeningStarted` | [_house, _door, _animations] | Local | Listen | Called when local unit starts interacting with doors +| `ace_interaction_doorOpeningStopped` | [_house, _door, _animations] | Local | Listen | Called when local unit stopps interacting with doors + ## 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 index 2236c5a1c8..4f9ecdfdd3 100644 --- a/docs/wiki/framework/fire-framework.md +++ b/docs/wiki/framework/fire-framework.md @@ -37,3 +37,12 @@ Use `CBA_fnc_serverEvent` to use the following features. Events are defined only | Arguments | Type | Optional (default value) ---| --------- | ---- | ------------------------ 0 | Fire source ID | Any | Required + + +## 2. Variables + +Screams can be disabled for an individual unit by setting the `ace_fire_enableScreams` variable on the unit, which can be synced across machines. + +```sqf +_unit setVariable ["ace_fire_enableScreams", false, _isGlobal]; +``` diff --git a/docs/wiki/framework/fortify-framework.md b/docs/wiki/framework/fortify-framework.md index 3f6619a746..27bfe7d613 100644 --- a/docs/wiki/framework/fortify-framework.md +++ b/docs/wiki/framework/fortify-framework.md @@ -116,8 +116,9 @@ The Fortify budget can be updated for any side using the function. Event Name | Passed Parameter(s) | Locality | Description ---------- | ----------- | ------------------- | -------- -`acex_fortify_objectPlaced` | [player, side, objectPlaced] | Global | Foritfy object placed -`acex_fortify_objectDeleted` | [player, side, objectDeleted] | Global | Foritfy object deleted +`acex_fortify_objectPlaced` | [player, side, objectPlaced] | Global | Fortify object placed +`acex_fortify_objectDeleted` | [player, side, objectDeleted] | Global | Fortify object deleted `acex_fortify_onDeployStart` | [player, object, cost] | Local | Player starts placing object -`ace_fortify_deployFinished` | [player, side, configName, posASL, vectorDir, vectorUp] | Local | Player successfully finishes building object -`ace_fortify_deployCanceled` | [player, side, configName, posASL, vectorDir, vectorUp] | Local | Player cancels building object +`ace_fortify_onDeployStop` | [player, object, cost] | Local | Player stops placing object. Raised only if stopped before trying to place (= before progress bar appears). If it's during progress bar, only `ace_fortify_deployCanceled` is raised. +`ace_fortify_deployFinished` | [[player, side, configName, posASL, vectorDir, vectorUp, cost], elapsedTime, totalTime, errorCode] | Local | Player successfully finishes building object +`ace_fortify_deployCanceled` | [[player, side, configName, posASL, vectorDir, vectorUp, cost], elapsedTime, totalTime, errorCode] | Local | Player cancels building object diff --git a/docs/wiki/framework/grenades-framework.md b/docs/wiki/framework/grenades-framework.md index a0b0ceeea7..b8f61872ff 100644 --- a/docs/wiki/framework/grenades-framework.md +++ b/docs/wiki/framework/grenades-framework.md @@ -68,3 +68,13 @@ The average amount of time in seconds, after `explosionTime` has passed, between ### 2.4 ace_grenades_flashbangIntervalMaxDeviation The amount of randomness in the fuse time. + +## 3. Events + +### 3.1 Listenable + +Event Name | Description | Passed Parameter(s) | Locality +---------- | ----------- | ------------------- | -------- +`ace_flashbangExploded` | A flashbang exploded | `[_grenadePosASL]` | Global +`ace_grenades_flashbangedAI` | A local AI was affected by a flashbang | `[_unit, _strength, _grenadePosASL]` | Local +`ace_grenades_flashbangedPlayer` | The local player was affected by a flashbang | `[_strength, _grenadePosASL]` | Local diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_AT15.p3d b/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_AT15.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_IED_V1.p3d b/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_IED_V1.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_IED_V2.p3d b/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_IED_V2.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_IED_V3.p3d b/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_IED_V3.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_IED_V4.p3d b/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_IED_V4.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_Satchel.p3d b/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_Satchel.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_TM46.p3d b/tools/pDummies/CUP/Weapons/CUP_Weapons_Put/CUP_TM46.p3d new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/AGS/data/ui/ags_static_ca.paa b/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/AGS/data/ui/ags_static_ca.paa new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/DShKM/data/ui/icomap_DShKM_ca.paa b/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/DShKM/data/ui/icomap_DShKM_ca.paa new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/KORD/data/ui/icomap_kord_ca.paa b/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/KORD/data/ui/icomap_kord_ca.paa new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/M2/data/ui/icomap_M2_ca.paa b/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/M2/data/ui/icomap_M2_ca.paa new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/M252/data/ui/icomap_mortar_m251_ca.paa b/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/M252/data/ui/icomap_mortar_m251_ca.paa new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/Mk19/data/ui/icomap_mk19_stat_ca.paa b/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/Mk19/data/ui/icomap_mk19_stat_ca.paa new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/Podnos/data/ui/podnos_2b14_ca.paa b/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/Podnos/data/ui/podnos_2b14_ca.paa new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/SPG9/data/ui/icon_spg9_ca.paa b/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/SPG9/data/ui/icon_spg9_ca.paa new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/TOW/data/ui/icomap_tow_static_ca.paa b/tools/pDummies/CUP/Weapons/CUP_Weapons_StaticWeapons/TOW/data/ui/icomap_tow_static_ca.paa new file mode 100644 index 0000000000..e69de29bb2