diff --git a/.editorconfig b/.editorconfig index 0deca3d2ab..5822f71d1d 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,4 +10,3 @@ trim_trailing_whitespace = true [*.md] trim_trailing_whitespace = false - diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 33ae67cc0e..b8aae89b77 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -6,11 +6,9 @@ If you have found an issue with ACE3 please make sure that ACE3 really is the ca Indicate if the issue appears on stable or development version. In case it is the development version, please also include the commit SHA-1 hash. -
-
Please note:
-

It's not a valid to simply remove @ace from the mod list to confirm that ACE3 is the culprit.

-

If the error happens when using a third-party mod contact the author of the appropriate mod and report the issue there.

-
+**Please note:** +- It's not a valid to simply remove @ace from the mod list to confirm that ACE3 is the culprit. +- If the error happens when using a third-party mod contact the author of the appropriate mod and report the issue there. ## Reporting the issue @@ -26,6 +24,6 @@ ACE2, AGM and CSE had a lot of features implemented or planned. All of them are Please refrain from making requests for any planned or existing features from either ACE2, AGM or CSE. Most of them are already being or have been considered for porting or a rewrite. ## Requesting a feature -In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/414). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier. +In order to avoid duplicates and keep the issue tracker organized, we have created a common issue for [ACE3 Feature requests](https://github.com/acemod/ACE3/issues/3594). Any and all relevant requests should be submitted there, where they will also get discussed and evaluated. Before adding a new one, make sure to check the previous entries from the thread and do a quick search for similar suggestions; please don't reiterate requests for features that had already been accepted for inclusion, or those which were disregarded earlier. Following their approval, feature requests may be moved by moderators to a separate issue for further discussion. diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 92ba3070ce..8097ed6e28 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,25 +1,23 @@ -**Arma 3 Version:** `x.xx` -*(indicate if stable, rc or dev*) - -**ACE3 Version:** `3.x.x` -*(indicate if stable or dev, if dev indicate the commit the version is based on)* +**Arma 3 Version:** `x.xx` (stable / rc / dev) +**CBA Version:** `2.x.x` (stable / dev + commit hash) +**ACE3 Version:** `3.x.x` (stable / dev + commit hash) **Mods:** -* `@CBA_A3` -* `@ace` -* ... - -**Placed Modules:** -* *Add the list of modules you have placed on the map. Use 'None' if the error occurs without using any modules.* +- `@CBA_A3` +- `@ace` **Description:** -* *Add a detailed description of the error. This makes it easier for us to fix the issue.* +- Add a detailed description of the error. This makes it easier for us to fix the issue. **Steps to reproduce:** -* *Add the steps needed to reproduce the issue.* +- Add the steps needed to reproduce the issue. **Where did the issue occur?** -* *A possible answer might be "Dedicated Server", "Local Multiplayer", "Editor", or "Singleplayer"* +- Dedicated / Self-Hosted Multiplayer / Singleplayer / Editor (Singleplayer) / Editor (Multiplayer) / Virtual Arsenal + +**Placed Modules:** +- Add the list of modules you have placed on the map. Use 'None' if the error occurs without any modules. **RPT log file:** -* *Add a link (pastebin.com) to the client and/or server RPT file. An instruction to find your RPT files can be [found here](https://community.bistudio.com/wiki/Crash_Files#Arma_3)* +- Add a link ([gist](https://gist.github.com) or [pastebin](http://pastebin.com)) to the client and/or server RPT file. An instruction to find your RPT files can be found [here](https://community.bistudio.com/wiki/Crash_Files#Arma_3). +- If possible at the time the bug is encountered, go to ACE Options and select "Debug To Clipboard", this will print extensive debug information to the RPT file. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 982d6137ef..f96a900cb7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,4 @@ -### When merged this pull request will: - -1. *Describe what this pull request will do* -2. *Each change in a seperate line* - ---- -*Delete this line and everything below* - -- [Make sure to respect the file structure](http://ace3mod.com/wiki/development/modularity-and-pbo-structure.html) -- [Make sure to respect the coding guidelines](http://ace3mod.com/wiki/development/coding-guidelines.html) +**When merged this pull request will:** +- Describe what this pull request will do +- Each change in a separate line +- Respect the [Development Guidelines](http://ace3mod.com/wiki/development/) diff --git a/.travis.yml b/.travis.yml index 1d2a49e2e6..3828300d7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,6 +12,7 @@ before_script: fi script: - python3 tools/sqf_validator.py +- python3 tools/config_style_checker.py - if [ -n "${GH_TOKEN}" ] && [ "${TRAVIS_BRANCH}" == "master" ] && [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then python3 tools/deploy.py; fi diff --git a/AUTHORS.txt b/AUTHORS.txt index 7de58d43f0..42923c77e5 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -65,6 +65,7 @@ F3 Project Falke75 Ferenczi Ferenzi +FFAAMOD Filip Basara fr89k FreeZbe @@ -74,6 +75,7 @@ Gianmarco Varriale (TeamNuke) GieNkoV GitHawk gpgpgpgp +Grey-Soldierman Grzegorz Hamburger SV Harakhti @@ -110,6 +112,7 @@ Sniperwolf572 System98 SzwedzikPL Tachi +Tessa Elieff Toaster Tonic Tourorist @@ -118,4 +121,3 @@ voiper VyMajoris(W-Cephei) Winter zGuba -Grey-Soldierman diff --git a/LICENSE b/LICENSE index 037f1df2f3..f748d222de 100644 --- a/LICENSE +++ b/LICENSE @@ -26,6 +26,8 @@ Some folders of this project may contain a separate LICENSE file. Should that be the case, everything in that folder and all subfolders is subject to that license instead. + - ARMA PUBLIC LICENSE (\addons\apl) + - CreativeCommons Attributions 3.0 (\addons\fastroping\data\sounds) ============================================================================ Full GNU General Public License Text diff --git a/README.md b/README.md index cda0cc7f79..37b5f2a626 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,15 @@

- - ACE3 Version - - - ACE3 Download + + ACE3 Version ACE3 Issues + + ACE3 Downloads + BIF Thread diff --git a/ace_advanced_ballistics.dll b/ace_advanced_ballistics.dll index a35dcbd2da..0a3d2366f1 100644 Binary files a/ace_advanced_ballistics.dll and b/ace_advanced_ballistics.dll differ diff --git a/ace_break_line.dll b/ace_break_line.dll index d76c3d4819..812455aa6b 100644 Binary files a/ace_break_line.dll and b/ace_break_line.dll differ diff --git a/ace_clipboard.dll b/ace_clipboard.dll index c6b771be7f..a21c2da4ab 100644 Binary files a/ace_clipboard.dll and b/ace_clipboard.dll differ diff --git a/ace_fcs.dll b/ace_fcs.dll index b224c194cd..f732a8ca03 100644 Binary files a/ace_fcs.dll and b/ace_fcs.dll differ diff --git a/ace_medical.dll b/ace_medical.dll index 3b5e97ca19..0091bc67bd 100644 Binary files a/ace_medical.dll and b/ace_medical.dll differ diff --git a/ace_parse_imagepath.dll b/ace_parse_imagepath.dll index f2c6054cec..2235393dd4 100644 Binary files a/ace_parse_imagepath.dll and b/ace_parse_imagepath.dll differ diff --git a/addons/advanced_ballistics/ACE_Settings.hpp b/addons/advanced_ballistics/ACE_Settings.hpp index d88a9b1148..9815cc8491 100644 --- a/addons/advanced_ballistics/ACE_Settings.hpp +++ b/addons/advanced_ballistics/ACE_Settings.hpp @@ -1,29 +1,34 @@ class ACE_Settings { class GVAR(enabled) { + category = CSTRING(DisplayName); displayName = CSTRING(enabled_DisplayName); description = CSTRING(enabled_Description); typeName = "BOOL"; value = 0; }; class GVAR(simulateForSnipers) { + category = CSTRING(DisplayName); displayName = CSTRING(simulateForSnipers_DisplayName); description = CSTRING(simulateForSnipers_Description); typeName = "BOOL"; value = 1; }; class GVAR(simulateForGroupMembers) { + category = CSTRING(DisplayName); displayName = CSTRING(simulateForGroupMembers_DisplayName); description = CSTRING(simulateForGroupMembers_Description); typeName = "BOOL"; value = 0; }; class GVAR(simulateForEveryone) { + category = CSTRING(DisplayName); displayName = CSTRING(simulateForEveryone_DisplayName); description = CSTRING(simulateForEveryone_Description); typeName = "BOOL"; value = 0; }; class GVAR(disabledInFullAutoMode) { + category = CSTRING(DisplayName); displayName = CSTRING(disabledInFullAutoMod_DisplayName); description = CSTRING(disabledInFullAutoMod_Description); typeName = "BOOL"; @@ -31,6 +36,7 @@ class ACE_Settings { }; /* // TODO: We currently do not have firedEHs on vehicles class GVAR(vehicleGunnerEnabled) { + category = CSTRING(DisplayName); displayName = "Enabled For Vehicle Gunners"; description = "Enables advanced ballistics for vehicle gunners"; typeName = "BOOL"; @@ -38,30 +44,35 @@ class ACE_Settings { }; */ class GVAR(ammoTemperatureEnabled) { + category = CSTRING(DisplayName); displayName = CSTRING(ammoTemperatureEnabled_DisplayName); description = CSTRING(ammoTemperatureEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(barrelLengthInfluenceEnabled) { + category = CSTRING(DisplayName); displayName = CSTRING(barrelLengthInfluenceEnabled_DisplayName); description = CSTRING(barrelLengthInfluenceEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(bulletTraceEnabled) { + category = CSTRING(DisplayName); displayName = CSTRING(bulletTraceEnabled_DisplayName); description = CSTRING(bulletTraceEnabled_Description); typeName = "BOOL"; value = 1; }; class GVAR(simulationInterval) { + category = CSTRING(DisplayName); displayName = CSTRING(simulationInterval_DisplayName); description = CSTRING(simulationInterval_Description); typeName = "SCALAR"; value = 0.0; }; class GVAR(simulationRadius) { + category = CSTRING(DisplayName); displayName = CSTRING(simulationRadius_DisplayName); description = CSTRING(simulationRadius_Description); typeName = "SCALAR"; diff --git a/addons/advanced_ballistics/CfgVehicles.hpp b/addons/advanced_ballistics/CfgVehicles.hpp index 27ccb2377b..804a6e9236 100644 --- a/addons/advanced_ballistics/CfgVehicles.hpp +++ b/addons/advanced_ballistics/CfgVehicles.hpp @@ -3,7 +3,7 @@ class CfgVehicles { class GVAR(ModuleSettings): ACE_Module { scope = 2; displayName = CSTRING(DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa); category = "ACE"; function = QUOTE(DFUNC(initModuleSettings)); functionPriority = 1; diff --git a/addons/advanced_ballistics/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index a541d30ce8..7263970fb1 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -5,7 +5,7 @@ GVAR(currentbulletID) = -1; GVAR(Protractor) = false; -GVAR(ProtractorStart) = ACE_time; +GVAR(ProtractorStart) = CBA_missionTime; GVAR(allBullets) = []; GVAR(currentGrid) = 0; @@ -21,7 +21,6 @@ if (!GVAR(extensionAvailable)) exitWith { }; }; */ -[] call FUNC(initializeTerrainExtension); if (!hasInterface) exitWith {}; @@ -29,10 +28,28 @@ if (!hasInterface) exitWith {}; //If not enabled, dont't add PFEH if (!GVAR(enabled)) exitWith {}; + //Run the terrain processor + [] call FUNC(initializeTerrainExtension); + // Register fire event handler ["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler); ["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler); + //Add warnings for missing compat PBOs (only if AB is on) + { + _x params ["_modPBO", "_compatPBO"]; + if ((isClass (configFile >> "CfgPatches" >> _modPBO)) && {!isClass (configFile >> "CfgPatches" >> _compatPBO)}) then { + ACE_LOGWARNING_2("Weapon Mod [%1] missing ace compat pbo [%2] (from @ace\optionals)",_modPBO,_compatPBO); + }; + } forEach [ + ["RH_acc","ace_compat_rh_acc"], + ["RH_de_cfg","ace_compat_rh_de"], + ["RH_m4_cfg","ace_compat_rh_m4"], + ["RH_PDW","ace_compat_rh_pdw"], + ["RKSL_PMII","ace_compat_rksl_pm_ii"], + ["iansky_opt","ace_compat_sma3_iansky"], + ["R3F_Armes","ace_compat_r3f"] + ]; }] call EFUNC(common,addEventHandler); #ifdef DEBUG_MODE_FULL diff --git a/addons/advanced_ballistics/config.cpp b/addons/advanced_ballistics/config.cpp index 3f974b18df..692a9391a0 100644 --- a/addons/advanced_ballistics/config.cpp +++ b/addons/advanced_ballistics/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_ballistics", "ace_weather"}; - author[] = {"Ruthberg"}; - authorUrl = "https://github.com/ulteq"; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index 5ad6cb111e..62663c843b 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -43,13 +43,13 @@ GVAR(Protractor) = true; __ctrl1 ctrlSetScale 1; __ctrl1 ctrlCommit 0; - __ctrl1 ctrlSetText QUOTE(PATHTOF(UI\protractor.paa)); + __ctrl1 ctrlSetText QPATHTOF(UI\protractor.paa); __ctrl1 ctrlSetTextColor [1, 1, 1, 1]; __ctrl2 ctrlSetScale 1; - __ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY + 0.001 - 0.0012 * (-58 max (asin((ACE_player weaponDirection currentWeapon ACE_player) select 2)) min 58), 0.2, 0.2 * 4/3]; + __ctrl2 ctrlSetPosition [SafeZoneX + 0.001, SafeZoneY - 0.001 - 0.1074 * (-0.86 max ((ACE_player weaponDirection currentWeapon ACE_player) select 2) min 0.86), 0.2, 0.2 * 4/3]; __ctrl2 ctrlCommit 0; - __ctrl2 ctrlSetText QUOTE(PATHTOF(UI\protractor_marker.paa)); + __ctrl2 ctrlSetText QPATHTOF(UI\protractor_marker.paa); __ctrl2 ctrlSetTextColor [1, 1, 1, 1]; }, 0.1, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf index fc8dc1b8a2..6bc6e234ae 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp" -private _aceTimeSecond = floor ACE_time; +private _aceTimeSecond = floor CBA_missionTime; { private ["_bulletVelocity", "_bulletPosition", "_bulletSpeed"]; @@ -31,7 +31,7 @@ private _aceTimeSecond = floor ACE_time; drop ["\A3\data_f\ParticleEffects\Universal\Refract","","Billboard",1,0.1,getPos _bullet,[0,0,0],0,1.275,1,0,[0.02*_caliber,0.01*_caliber],[[0,0,0,0.65],[0,0,0,0.2]],[1,0],0,0,"","",""]; }; - call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, ACE_time - _aceTimeSecond]); + call compile ("ace_advanced_ballistics" callExtension format["simulate:%1:%2:%3:%4:%5:%6:%7", _index, _bulletVelocity, _bulletPosition, ACE_wind, ASLToATL(_bulletPosition) select 2, _aceTimeSecond, CBA_missionTime - _aceTimeSecond]); }; nil } count +GVAR(allBullets); diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 9646f065d4..7085224771 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -88,7 +88,7 @@ if (GVAR(ammoTemperatureEnabled) || GVAR(barrelLengthInfluenceEnabled)) then { _bulletTraceVisible = false; if (GVAR(bulletTraceEnabled) && cameraView == "GUNNER") then { - if (currentWeapon ACE_player in ["ACE_Vector", "Binocular", "Rangefinder", "Laserdesignator"]) then { + if (currentWeapon ACE_player == binocular ACE_player) then { _bulletTraceVisible = true; } else { if (currentWeapon ACE_player == primaryWeapon ACE_player && count primaryWeaponItems ACE_player > 2) then { @@ -110,8 +110,8 @@ if (_caliber > 0 && _bulletLength > 0 && _bulletMass > 0 && _barrelTwist > 0) th GVAR(currentbulletID) = (GVAR(currentbulletID) + 1) % 10000; -_aceTimeSecond = floor ACE_time; -"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _projectile, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, ACE_time - _aceTimeSecond]; +_aceTimeSecond = floor CBA_missionTime; +"ace_advanced_ballistics" callExtension format["new:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13:%14:%15:%16:%17:%18", GVAR(currentbulletID), _airFriction, _ballisticCoefficients, _velocityBoundaries, _atmosphereModel, _dragModel, _stabilityFactor, _twistDirection, _muzzleVelocity, _transonicStabilityCoef, getPosASL _projectile, EGVAR(common,mapLatitude), EGVAR(weather,currentTemperature), EGVAR(common,mapAltitude), EGVAR(weather,currentHumidity), overcast, _aceTimeSecond, CBA_missionTime - _aceTimeSecond]; GVAR(allBullets) pushBack [_projectile, _caliber, _bulletTraceVisible, GVAR(currentbulletID)]; diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 02468d0349..9fed872a6b 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -18,13 +18,13 @@ if (!GVAR(extensionAvailable)) exitWith {}; private ["_initStartTime", "_mapSize", "_mapGrids", "_gridCells", "_x", "_y", "_gridCenter", "_gridHeight", "_gridNumObjects", "_gridSurfaceIsWater"]; -_initStartTime = ACE_time; +_initStartTime = CBA_missionTime; _mapSize = getNumber (configFile >> "CfgWorlds" >> worldName >> "MapSize"); if (("ace_advanced_ballistics" callExtension format["init:%1:%2", worldName, _mapSize]) == "Terrain already initialized") exitWith { #ifdef DEBUG_MODE_FULL systemChat "AdvancedBallistics: Terrain already initialized"; - #endIf + #endif }; _mapGrids = ceil(_mapSize / 50) + 1; @@ -38,7 +38,7 @@ GVAR(currentGrid) = 0; if (GVAR(currentGrid) >= _gridCells) exitWith { #ifdef DEBUG_MODE_FULL - systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(ACE_time - _initStartTime)]; + systemChat format["AdvancedBallistics: Finished terrain initialization in %1 seconds", ceil(CBA_missionTime - _initStartTime)]; #endif [_idPFH] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml index 50e8e1ff05..718057a5b4 100644 --- a/addons/advanced_ballistics/stringtable.xml +++ b/addons/advanced_ballistics/stringtable.xml @@ -92,7 +92,7 @@ Für Gruppenmitglieder aktiviert Povoleno pro členy skupiny Ativada para membros do grupo - Activer pour les membres groupés + Activer pour les membres du groupe Csoporttagoknak engedélyezve Включена для группы Abilita per Membri del Gruppo @@ -104,7 +104,7 @@ Aktiviert die erweiterte Ballistik für nicht lokale Gruppenmitglieder Aktivuje pokročilou balistiku pro nelokální členy skupiny Ativa balística avançada para membros de grupo não locais - Active la balistique avancée pour les membres groupés non locaux + Active la balistique avancée pour les membres du groupe non locaux Engedélyezi a fejlett ballisztikát nem-helyi csoporttagoknak Включает продвинутую баллистику для нелокальных членов группы Abilita Balistica Avanzata per Membri non locali del Gruppo @@ -128,7 +128,7 @@ Aktiviert die erweiterte Ballistik für alle nicht lokalen Spieler (das Aktivieren dieser Funktion kann zur Beeinträchtigung des Spielerlebnisses im Multiplayer führen) Aktivuje pokročilou balistiku pro všechny nelokální hráče (aktivace této možnosti způsobuje pokles FPS během velké přestřelky v multiplayeru) Ativa balística avançada para todos os jogadores não locais (ativando isso pode degradar a performance durante troca de tiros intensas no multiplayer) - Active la balistique avancé pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs) + Active la balistique avancée pour tous les joueurs non locaux (activer cette option peut avoir un impact sur les performance en multi durant les grands échanges de tirs) Engedélyezi a fejlett ballisztikát az összes nem-helyi játékosnak (ez a funkció leronthatja a teljesítményt intenzív többjátékos tűzharcok alatt) Включает продвинутую баллистику для всех нелокальных игроков (включение этой опции может снизить производительность при массовых перестрелках в мультиплеере) Abilita Balistica Avanzata per tutti i giocatori non locali (abilitare questo parametro potrebbe degradare le prestazioni durante scontri intensi in multiplayer) @@ -140,7 +140,7 @@ Für Gruppenmitglieder immer aktiviert Vždy povoleno pro členy skupiny Sempre ativada para membros do grupo - Toujours activer pour les membres groupés + Toujours activer pour les membres du groupe Mindig engedélyezve csoporttagoknak Всегда включена для членов группы Sempre abilitato per Membri del Gruppo @@ -272,7 +272,7 @@ Legt das Intervall zwischen den Berechnungsschritten fest Určuje interval mezi každým výpočtem Define o intervalo entre cada cálculo - Défini un intervalle de calcul entre deux simulations + Définit un intervalle de calcul entre deux simulations Meghatározza a számítási lépések közötti időintervallumot Определяет временной интервал между вычислениями Definisce l'intervallo tra ogni step di calcolo @@ -296,7 +296,7 @@ Gibt den Radius (in Metern) um den Spieler an, bei dem die erweiterte Ballistik auf Geschosse angewendet wird Určuje oblast kolem hráče (v metrech), kde je pokročilá balistika použita na projektil Define o raio ao redor do jogador (em metros) onde a balística avançada será aplicada aos projéteis - Défini le rayon autour du joueur (en mètres) d'application de la balistique avancée + Définit le rayon autour du joueur (en mètres) d'application de la balistique avancée Meghatározza a játékos körüli hatókört (méterben), ahol a lövedékek fejlett ballisztikát használnak Определяет радиус вокруг игрока (в метрах), в котором продвинутая баллистика применяется к снарядам Definisce il raggio attorno al giocatore (in metri) per cui la Balistica Avanzata è applicata ai proiettili @@ -307,11 +307,11 @@ Moduł ten pozwala aktywować zaawansowaną balistykę biorącą przy obliczeniach trajektorii lotu pocisku pod uwagę takie rzeczy jak temperatura powietrza, ciśnienie atmosferyczne, wilgotność powietrza, siły Coriolisa i Eotvosa, grawitację a także broń z jakiej wykonywany jest strzał oraz rodzaj amunicji. Wszystko to sprowadza się na bardzo dokładne odwzorowanie balistyki. Tento modul umožňuje aktivovat pokročilou balistiku, která vypočítává trajektorii kulky a bere do úvahy věci jako je teplota vzduchu, atmosférický tlak, vlhkost vzduchu, gravitaci, typ munice a zbraň, ze které je náboj vystřelen. To vše přispívá k velmi přesné balistice. Este módulo permite que você ative cálculos de balística avançada, fazendo a trajetória do projétil levar em consideração coisas como temperatura do ar, pressão atmosférica, umidade, força de Coriolis, a gravidade, o modelo da arma no qual o disparo é realizado e o tipo de munição. Tudo isso acrescenta-se a um balística muito precisa. - Ce module active la simulation de balistique avancée - ie les projectiles sont influencé par des varibles comme le vent, la température, la pression atmosphérique, l'humidité, la gravité, le type de munition et l'arme avec laquelles ils sont tirés. + Ce module active la simulation de balistique avancée - ie les projectiles sont influencés par des varibles comme le vent, la température, la pression atmosphérique, l'humidité, la gravité, le type de munition et l'arme avec laquelle ils sont tirés. Ez a modul engedélyezi a fejlett ballisztikai szimulációt - a lövedékek röppályáját befolyásolni fogja a levegő hőmérséklete, légnyomás, páratartalom, gravitáció, a lövedék fajtája, valamint a fegyver, amiből kilőtték a lövedéket. Этот модуль включает симуляцию продвинутой баллистики - при этом на траекторию полета снаряда влияют различные параметры, такие как температура воздуха, атмосферное давление, влажность, гравитация, тип боеприпаса и оружия, из которого произвели выстрел. Este módulo permite la simulación balística avanzada - es decir, la trayectoria de los proyectiles está influenciada por variables como la temperatura del aire, la presión atmosférica, la humedad, la gravedad, el tipo de municiones y el arma desde el que fue disparada. Questo modulo abilita la simulazione della Balistica Avanzata - cioè la traiettoria dei proiettili è influenzata da variabili come la temperatura dell'aria, pressione atmosferica, umidità, gravità, il tipo di munizione e l'arma da cui è sparata - \ No newline at end of file + diff --git a/addons/ai/config.cpp b/addons/ai/config.cpp index fdcb6afe9d..504c8b6e3c 100644 --- a/addons/ai/config.cpp +++ b/addons/ai/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"KoffeinFlummi","commy2"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi","commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/aircraft/CfgAmmo.hpp b/addons/aircraft/CfgAmmo.hpp index 8aa5d3173e..2c3701b8e0 100644 --- a/addons/aircraft/CfgAmmo.hpp +++ b/addons/aircraft/CfgAmmo.hpp @@ -11,7 +11,7 @@ class CfgAmmo { explosive = 1.8; tracersEvery = 3; tracerEndTime = 3.5; - + CraterEffects = "ExploAmmoCrater"; explosionEffects = "ExploAmmoExplosion"; model = "\A3\Weapons_f\Data\bullettracer\tracer_red"; diff --git a/addons/aircraft/Heli_Attack_01_base_F.hpp b/addons/aircraft/Heli_Attack_01_base_F.hpp index 26a4605910..a6868033e6 100644 --- a/addons/aircraft/Heli_Attack_01_base_F.hpp +++ b/addons/aircraft/Heli_Attack_01_base_F.hpp @@ -860,12 +860,12 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { helmetDown[] = {0,-0.07,0}; }; }; - + class Turrets: Turrets { class MainTurret: MainTurret { weapons[] = {"ACE_gatling_20mm_Comanche","missiles_DAGR","missiles_ASRAAM", "ACE_AIR_SAFETY"}; magazines[] = {"ACE_500Rnd_20mm_shells_Comanche","4Rnd_AAA_missiles","24Rnd_PG_missiles"}; - + outGunnerMayFire = 1; commanding = -1; primaryGunner = 1; @@ -888,13 +888,13 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { minTurn = -120; maxTurn = 120; initTurn = 0; - + class OpticsIn { delete Narrow; delete Medium; delete Wide; - + class ACE_WideUnstabilized { opticsDisplayName = "W NS"; initAngleX = 0; @@ -994,4 +994,4 @@ class Heli_Attack_01_base_F: Helicopter_Base_F { weapon = "ACE_gatling_20mm_Comanche"; }; }; -}; \ No newline at end of file +}; diff --git a/addons/aircraft/RscInGameUI.hpp b/addons/aircraft/RscInGameUI.hpp index 620d895d9e..6411085b24 100644 --- a/addons/aircraft/RscInGameUI.hpp +++ b/addons/aircraft/RscInGameUI.hpp @@ -145,7 +145,7 @@ class RscInGameUI sizeEx = "0.038*SafezoneH"; shadow = 0; font = "EtelkaMonospacePro"; - text = PATHTOF(data\Helo_LaserON.paa); + text = QPATHTOF(data\Helo_LaserON.paa); x = "20.45 * (0.01875 * SafezoneH)"; y = "14.1 * (0.025 * SafezoneH)"; w = "12.5 * (0.01875 * SafezoneH)"; @@ -335,7 +335,7 @@ class RscInGameUI shadow = 0; align = "right"; font = "EtelkaMonospacePro"; - text = PATHTOF(data\Helo_LaserON.paa); + text = QPATHTOF(data\Helo_LaserON.paa); x = "20.45 * (0.01875 * SafezoneH)"; y = "14.1 * (0.025 * SafezoneH)"; w = "12.5 * (0.01875 * SafezoneH)"; diff --git a/addons/aircraft/config.cpp b/addons/aircraft/config.cpp index 2ce2d0dc10..f989749383 100644 --- a/addons/aircraft/config.cpp +++ b/addons/aircraft/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"KoffeinFlummi","Crusty","commy2","jaynus","Kimi"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi","Crusty","commy2","jaynus","Kimi"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/aircraft/flightmodel_thunderbolt.hpp b/addons/aircraft/flightmodel_thunderbolt.hpp index fa99f40424..2446e166bc 100644 --- a/addons/aircraft/flightmodel_thunderbolt.hpp +++ b/addons/aircraft/flightmodel_thunderbolt.hpp @@ -20,4 +20,3 @@ envelope[] = {0,0,0.75,2.4,3.6,3.8,3.7,3.2,2.2,1.7,0.9}; thrustCoef[] = {1,1.2,1.3,1.25,1.06,1.01,1,0.92,0.75,0.65,0.5,0.25,0}; acceleration = 265; landingSpeed = 220; -gunAimDown = 0.087266463; diff --git a/addons/aircraft/stringtable.xml b/addons/aircraft/stringtable.xml index 9c168d11ff..5480cb9740 100644 --- a/addons/aircraft/stringtable.xml +++ b/addons/aircraft/stringtable.xml @@ -7,7 +7,7 @@ Ráfaga Seria Dávka - Contremesure + Contre mesures Очередь Sorozat Rajada @@ -29,7 +29,7 @@ Open Cargo Door Laderampe öffnen Abrir compuerta de carga - Ourvir la rampe + Ouvrir la rampe Otwórz drzwi ładowni Otevřít nákladní prostor Rakodórámpa nyitása @@ -50,4 +50,4 @@ Fechar porta de carga - \ No newline at end of file + diff --git a/addons/apl/config.cpp b/addons/apl/config.cpp index 089f4bffe0..3a4743f1ac 100644 --- a/addons/apl/config.cpp +++ b/addons/apl/config.cpp @@ -6,8 +6,8 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_main"}; - author[] = {"Bohemia Interactive"}; - authorUrl = "http://ace3mod.com"; + author = "Bohemia Interactive"; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/atragmx/CfgVehicles.hpp b/addons/atragmx/CfgVehicles.hpp index cc4a7880fe..6e8a136a03 100644 --- a/addons/atragmx/CfgVehicles.hpp +++ b/addons/atragmx/CfgVehicles.hpp @@ -9,7 +9,7 @@ class CfgVehicles { statement = QUOTE(call FUNC(create_dialog)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\ATRAG_Icon.paa); + icon = QPATHTOF(UI\ATRAG_Icon.paa); exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; }; diff --git a/addons/atragmx/CfgWeapons.hpp b/addons/atragmx/CfgWeapons.hpp index 42d1e56ae2..af5e1a9955 100644 --- a/addons/atragmx/CfgWeapons.hpp +++ b/addons/atragmx/CfgWeapons.hpp @@ -8,8 +8,8 @@ class CfgWeapons { scope = 2; displayName = CSTRING(Name); descriptionShort = CSTRING(Description); - model = PATHTOF(data\tdsrecon.p3d); - picture = PATHTOF(UI\ATRAG_Icon.paa); + model = QPATHTOF(data\tdsrecon.p3d); + picture = QPATHTOF(UI\ATRAG_Icon.paa); icon = "iconObject_circle"; mapSize = 0.034; diff --git a/addons/atragmx/RscTitles.hpp b/addons/atragmx/RscTitles.hpp index 97dad6e7b6..625cd68deb 100644 --- a/addons/atragmx/RscTitles.hpp +++ b/addons/atragmx/RscTitles.hpp @@ -230,7 +230,7 @@ class ATragMX_Display { idc=-1; x=0.55*safezoneW+safezoneX+0.315; }; - + class TEXT_GUN_FRAME: ATragMX_RscText { idc=1001; style=64; @@ -610,7 +610,7 @@ class ATragMX_Display { x=0.550*safezoneW+safezoneX+0.27; text="4"; action=QUOTE(call FUNC(toggle_solution_setup)); - }; + }; class TEXT_CALCULATE: TEXT_SCOPE_UNIT { idc=3000; style=ST_RIGHT; @@ -1059,7 +1059,7 @@ class ATragMX_Display { text="Cancel"; action=QUOTE(false call FUNC(show_add_new_gun); true call FUNC(show_gun_list)); }; - + class TEXT_GUN_AMMO_DATA_BORE_HEIGHT: TEXT_BORE_HEIGHT { idc=12000; w=0.22; @@ -1147,7 +1147,7 @@ class ATragMX_Display { class TEXT_GUN_AMMO_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT { idc=12011; }; - + class TEXT_ATMO_ENV_DATA_DEFAULT: TEXT_LEAD { idc=13000; w=0.08; @@ -1231,7 +1231,7 @@ class ATragMX_Display { y=0.265*safezoneH+safezoneY+0.29; text="Calc Method"; }; - + class TEXT_TARGET_DATA_LATITUDE: TEXT_BORE_HEIGHT { idc=14000; w=0.22; @@ -1379,7 +1379,7 @@ class ATragMX_Display { class TEXT_TARGET_DATA_NEXT: TEXT_TARGET_SPEED_ASSIST_NEXT { idc=14011; }; - + class TEXT_SOLUTION_SETUP_SHOW_RESULT_IN: TEXT_GUN_AMMO_DATA_BORE_HEIGHT { idc=15000; style=64; @@ -1469,4 +1469,4 @@ class ATragMX_Display { action=QUOTE(0 call FUNC(toggle_solution_setup)); }; }; -}; \ No newline at end of file +}; diff --git a/addons/atragmx/XEH_postInit.sqf b/addons/atragmx/XEH_postInit.sqf index 4b61a28551..8d4907523b 100644 --- a/addons/atragmx/XEH_postInit.sqf +++ b/addons/atragmx/XEH_postInit.sqf @@ -7,41 +7,41 @@ if ((profileNamespace getVariable ["ACE_ATragMX_profileNamespaceVersion", 0]) == } else { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model GVAR(gunList) = [["12.7x108mm" , 820, 100, 0.0657485, -0.00063800, 3.81, 0, 2, 10, 120, 0, 0, 48.28, 12.7, 38.10, 0.630, 1, "ASM" ], - + ["12.7x99mm AMAX" , 860, 100, 0.0611565, -0.00036645, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 38.10, 1.050, 1, "ASM" ], ["12.7x99mm" , 900, 100, 0.0582418, -0.00057503, 3.81, 0, 2, 10, 120, 0, 0, 41.92, 12.7, 38.10, 0.670, 1, "ASM" ], - + ["12.7x54mm" , 300, 100, 0.3394630, -0.00019268, 3.81, 0, 2, 10, 120, 0, 0, 48.60, 12.7, 24.13, 1.050, 1, "ASM" ], - + [".408 Chey Tac" , 910, 100, 0.0569400, -0.00038944, 3.81, 0, 2, 10, 120, 0, 0, 27.15, 10.4, 33.02, 0.970, 1, "ASM" ], - + ["9.3×64mm" , 870, 100, 0.0619295, -0.00108571, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" ], - + [".338LM 250gr" , 880, 100, 0.0598469, -0.00059133, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.322, 7, "ICAO"], [".338LM 300gr" , 800, 100, 0.0677343, -0.00052190, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.381, 7, "ICAO"], [".338LM API526" , 895, 100, 0.0588865, -0.00069611, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.560, 1, "ASM" ], - + [".300WM Mk248 Mod 0", 900, 100, 0.0584442, -0.00070530, 3.81, 0, 2, 10, 120, 0, 0, 13.31, 7.80, 25.40, 0.268, 7, "ICAO"], [".300WM Mk248 Mod 1", 867, 100, 0.0610738, -0.00061188, 3.81, 0, 2, 10, 120, 0, 0, 14.26, 7.80, 25.40, 0.310, 7, "ICAO"], [".300WM Berger OTM" , 853, 100, 0.0622179, -0.00053733, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 7.80, 25.40, 0.368, 7, "ICAO"], - + ["7.62x54mmR" , 800, 100, 0.0691878, -0.00100023, 3.81, 0, 2, 10, 120, 0, 0, 9.849, 7.92, 24.13, 0.400, 1, "ICAO"], - + ["7.62x51mm M80" , 810, 100, 0.0679374, -0.00100957, 3.81, 0, 2, 10, 120, 0, 0, 9.525, 7.82, 25.40, 0.200, 7, "ICAO"], ["7.62x51mm M118LR" , 780, 100, 0.0710319, -0.00082828, 3.81, 0, 2, 10, 120, 0, 0, 11.34, 7.82, 25.40, 0.243, 7, "ICAO"], ["7.62x51mm Mk319" , 910, 100, 0.0584524, -0.00102338, 3.81, 0, 2, 10, 120, 0, 0, 8.424, 7.82, 25.40, 0.377, 1, "ICAO"], ["7.62x51mm M993" , 930, 100, 0.0570316, -0.00107148, 3.81, 0, 2, 10, 120, 0, 0, 8.230, 7.82, 25.40, 0.359, 1, "ICAO"], ["7.62x51mm Subsonic", 320, 100, 0.3059680, -0.00049899, 3.81, 0, 2, 10, 120, 0, 0, 12.96, 7.82, 25.40, 0.235, 7, "ICAO"], - + ["6.5x39mm" , 800, 100, 0.0683482, -0.00075308, 3.81, 0, 2, 10, 120, 0, 0, 7.970, 6.71, 22.86, 0.263, 7, "ICAO"], ["6.5x47mm Lapua" , 800, 100, 0.0682221, -0.00067037, 3.81, 0, 2, 10, 120, 0, 0, 9.007, 6.71, 22.86, 0.290, 7, "ICAO"], ["6.5mm Creedmor" , 840, 100, 0.0636501, -0.00060887, 3.81, 0, 2, 10, 120, 0, 0, 9.072, 6.71, 22.86, 0.317, 7, "ICAO"], - + ["5.56x45mm M855" , 870, 100, 0.0626386, -0.00126466, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.151, 7, "ASM" ], ["5.56x45mm Mk262" , 820, 100, 0.0671481, -0.00109563, 3.81, 0, 2, 10, 120, 0, 0, 4.990, 5.70, 17.78, 0.361, 1, "ASM" ], ["5.56x45mm Mk318" , 880, 100, 0.0615937, -0.00123318, 3.81, 0, 2, 10, 120, 0, 0, 4.018, 5.70, 17.78, 0.307, 1, "ASM" ], ["5.56x45mm M995" , 869, 100, 0.0626713, -0.00123272, 3.81, 0, 2, 10, 120, 0, 0, 4.536, 5.70, 17.78, 0.310, 1, "ASM" ]]; - + [] call FUNC(clear_user_data); profileNamespace setVariable ["ACE_ATragMX_gunList", GVAR(gunList)]; }; diff --git a/addons/atragmx/config.cpp b/addons/atragmx/config.cpp index 3abe32ba34..db1b85b761 100644 --- a/addons/atragmx/config.cpp +++ b/addons/atragmx/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_ATragMX"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ACE_common", "ACE_weather"}; - author = "Ruthberg"; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; @@ -14,4 +16,4 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" -#include "RscTitles.hpp" \ No newline at end of file +#include "RscTitles.hpp" diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf index 869ce8d098..e71658f490 100644 --- a/addons/atragmx/functions/fnc_calculate_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_solution.sqf @@ -42,31 +42,14 @@ * Public: No */ #include "script_component.hpp" - -private ["_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_drag", "_bc", "_dragModel", "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude", "_directionOfFire"]; -_scopeBaseAngle = _this select 0; -_bulletMass = _this select 1; -_boreHeight = _this select 2; -_airFriction = _this select 3; -_muzzleVelocity = _this select 4; -_temperature = _this select 5; -_barometricPressure = _this select 6; -_relativeHumidity = _this select 7; -_simSteps = _this select 8; -_windSpeed1 = (_this select 9) select 0; -_windSpeed2 = (_this select 9) select 1; -_windDirection = _this select 10; -_inclinationAngle = _this select 11; -_targetSpeed = _this select 12; -_targetRange = _this select 13; -_bc = _this select 14; -_dragModel = _this select 15; -_atmosphereModel = _this select 16; -_storeRangeCardData = _this select 17; -_stabilityFactor = _this select 18; -_twistDirection = _this select 19; -_latitude = _this select 20; -_directionOfFire = _this select 21; +params [ + "_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", + "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed", + "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_bc", "_dragModel", + "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude", + "_directionOfFire" +]; +_windSpeed params ["_windSpeed1", "_windSpeed2"]; private ["_bulletPos", "_bulletVelocity", "_bulletAccel", "_bulletSpeed", "_gravity", "_deltaT"]; _bulletPos = [0, 0, 0]; @@ -133,7 +116,7 @@ _bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity]; while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _bulletSpeed = vectorMagnitude _bulletVelocity; - + _speedTotal = _speedTotal + _bulletSpeed; _stepsTotal = _stepsTotal + 1; _speedAverage = (_speedTotal / _stepsTotal); @@ -142,7 +125,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _trueSpeed = vectorMagnitude _trueVelocity; if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { - _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then { + private _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then { parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed])) } else { ([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation)) @@ -173,7 +156,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { }; _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); _kineticEnergy = _kineticEnergy * 0.737562149; - + if ((missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) && (_bulletPos select 1) > 0) then { // Coriolis _horizontalDeflection = 0.0000729 * ((_bulletPos select 1) ^ 2) * sin(_latitude) / _speedAverage; @@ -190,7 +173,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do { _windage1 = _windage1 + _spinDrift; _windage2 = _windage2 + _spinDrift; }; - + GVAR(rangeCardData) set [_n, [_range, _elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy]]; _n = _n + 1; }; diff --git a/addons/atragmx/functions/fnc_change_gun.sqf b/addons/atragmx/functions/fnc_change_gun.sqf index 7c5abac47e..8fe89dc4fe 100644 --- a/addons/atragmx/functions/fnc_change_gun.sqf +++ b/addons/atragmx/functions/fnc_change_gun.sqf @@ -17,10 +17,7 @@ */ #include "script_component.hpp" -private ["_gunID", "_restoreMemory", "_updateDisplay"]; -_gunID = _this select 0; -_restoreMemory = _this select 1; -_updateDisplay = _this select 2; +params ["_gunID", "_restoreMemory", "_updateDisplay"]; if (_gunID < 0 || _gunID > (count GVAR(gunList)) - 1) exitWith {}; diff --git a/addons/atragmx/functions/fnc_create_dialog.sqf b/addons/atragmx/functions/fnc_create_dialog.sqf index 07b93eb2da..a9912ccd34 100644 --- a/addons/atragmx/functions/fnc_create_dialog.sqf +++ b/addons/atragmx/functions/fnc_create_dialog.sqf @@ -39,7 +39,7 @@ if (GVAR(showRangeCard)) then { }; GVAR(showRangeCardSetup) call FUNC(show_range_card_setup); GVAR(showSolutionSetup) call FUNC(show_solution_setup); -GVAR(showTargetData) call FUNC(show_target_data); +GVAR(showTargetData) call FUNC(show_target_data); GVAR(showTargetRangeAssist) call FUNC(show_target_range_assist); GVAR(showTargetSpeedAssist) call FUNC(show_target_speed_assist); GVAR(showTargetSpeedAssistTimer) call FUNC(show_target_speed_assist_timer); @@ -56,7 +56,7 @@ GVAR(DialogPFH) = [{ if (!GVAR(active)) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; }; - __ctrlBackground ctrlSetText format [QUOTE(PATHTOF(UI\ATRAG_%1.paa)), ["N", "D"] select (call EFUNC(common,ambientBrightness))]; + __ctrlBackground ctrlSetText format [QPATHTOF(UI\ATRAG_%1.paa), ["N", "D"] select (call EFUNC(common,ambientBrightness))]; }, 60, []] call CBA_fnc_addPerFrameHandler; true diff --git a/addons/atragmx/functions/fnc_show_gun_list.sqf b/addons/atragmx/functions/fnc_show_gun_list.sqf index 5e1cdfa453..a3c45a977d 100644 --- a/addons/atragmx/functions/fnc_show_gun_list.sqf +++ b/addons/atragmx/functions/fnc_show_gun_list.sqf @@ -21,6 +21,5 @@ GVAR(showGunList) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 6002); - lbSetCurSel [6000, GVAR(currentGun)]; }; diff --git a/addons/atragmx/functions/fnc_show_range_card_setup.sqf b/addons/atragmx/functions/fnc_show_range_card_setup.sqf index 3d44c14b53..b3457793b9 100644 --- a/addons/atragmx/functions/fnc_show_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_show_range_card_setup.sqf @@ -21,7 +21,7 @@ GVAR(showRangeCardSetup) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 10006); - + ctrlSetText [10003, Str(Round(GVAR(rangeCardStartRange)))]; ctrlSetText [10004, Str(Round(GVAR(rangeCardEndRange)))]; ctrlSetText [10005, Str(Round(GVAR(rangeCardIncrement)))]; diff --git a/addons/atragmx/functions/fnc_show_target_range_assist.sqf b/addons/atragmx/functions/fnc_show_target_range_assist.sqf index 4f46932a0b..ec61edd1f4 100644 --- a/addons/atragmx/functions/fnc_show_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_range_assist.sqf @@ -21,7 +21,6 @@ GVAR(showTargetRangeAssist) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 7018); - ctrlSetText [7012, Str(parseNumber(ctrlText 320))]; ctrlSetText [7013, Str(parseNumber(ctrlText 340))]; @@ -30,4 +29,4 @@ if (_this) then { } else { ctrlSetText [7016, "Meters"]; }; -}; \ No newline at end of file +}; diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf index 2e66b5ea7b..b3cf1b4393 100644 --- a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf @@ -21,7 +21,7 @@ GVAR(showTargetSpeedAssist) = _this; if (_this) then { ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 8012); - + ctrlSetText [8004, Str(Round((GVAR(targetRange) select GVAR(currentTarget))))]; if (GVAR(currentUnit) == 1) then { @@ -29,7 +29,7 @@ if (_this) then { } else { ctrlSetText [8008, "Meters"]; }; - + if (GVAR(currentUnit) == 2) then { ctrlSetText [8011, "m/s"]; } else { diff --git a/addons/atragmx/functions/fnc_sord.sqf b/addons/atragmx/functions/fnc_sord.sqf index a433153c0e..b342072018 100644 --- a/addons/atragmx/functions/fnc_sord.sqf +++ b/addons/atragmx/functions/fnc_sord.sqf @@ -17,10 +17,7 @@ */ #include "script_component.hpp" -private ["_slopeDistance", "_azimuth", "_inclination"]; -_slopeDistance = _this select 0; -_azimuth = _this select 1; -_inclination = _this select 2; +params ["_slopeDistance", "_azimuth", "_inclination"]; GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)]; GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)]; diff --git a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf index 0f42f9637c..692de386af 100644 --- a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf +++ b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf @@ -21,26 +21,26 @@ if !(ctrlVisible 9000) then { true call FUNC(show_target_speed_assist_timer); ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 9002); - + [{ private ["_args", "_startTime"]; _args = _this select 0; _startTime = _args select 0; - + if (!(GVAR(speedAssistTimer))) exitWith { GVAR(speedAssistTimer) = true; - - ctrlSetText [8006, Str(Round((ACE_time - _startTime) * 10) / 10)]; + + ctrlSetText [8006, Str(Round((CBA_missionTime - _startTime) * 10) / 10)]; [] call FUNC(calculate_target_speed_assist); false call FUNC(show_target_speed_assist_timer); true call FUNC(show_target_speed_assist); - + [_this select 1] call CBA_fnc_removePerFrameHandler; }; - - ctrlSetText [9001, Str(Round((ACE_time - _startTime) * 10) / 10)]; - - }, 0.1, [ACE_time]] call CBA_fnc_addPerFrameHandler; + + ctrlSetText [9001, Str(Round((CBA_missionTime - _startTime) * 10) / 10)]; + + }, 0.1, [CBA_missionTime]] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf b/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf index ce761c2216..87e973c7c0 100644 --- a/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf @@ -18,7 +18,7 @@ if (ctrlVisible 13000) then { false call FUNC(show_atmo_env_data); true call FUNC(show_main_page); - + if (_this == 1) then { call FUNC(calculate_target_solution); }; diff --git a/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf index 0fd4b913b8..f3eb814da7 100644 --- a/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf @@ -18,7 +18,7 @@ if (ctrlVisible 12000) then { false call FUNC(show_gun_ammo_data); true call FUNC(show_main_page); - + if (_this == 1) then { call FUNC(update_zero_range); call FUNC(calculate_target_solution); diff --git a/addons/atragmx/functions/fnc_toggle_gun_list.sqf b/addons/atragmx/functions/fnc_toggle_gun_list.sqf index 1cc1f9338b..e5dbf54bd5 100644 --- a/addons/atragmx/functions/fnc_toggle_gun_list.sqf +++ b/addons/atragmx/functions/fnc_toggle_gun_list.sqf @@ -18,7 +18,7 @@ if (ctrlVisible 6000) then { false call FUNC(show_gun_list); true call FUNC(show_main_page); - + if (_this) then { [lbCurSel 6000, true, true] call FUNC(change_gun); }; diff --git a/addons/atragmx/functions/fnc_toggle_range_card.sqf b/addons/atragmx/functions/fnc_toggle_range_card.sqf index 059bc7e40b..7d8b7a0239 100644 --- a/addons/atragmx/functions/fnc_toggle_range_card.sqf +++ b/addons/atragmx/functions/fnc_toggle_range_card.sqf @@ -21,9 +21,9 @@ if (ctrlVisible 5006) then { } else { false call FUNC(show_main_page); true call FUNC(show_range_card); - + ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 5001); - + [] call FUNC(calculate_range_card); [] call FUNC(update_range_card); }; diff --git a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf index 738a154d17..96c31459b2 100644 --- a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf @@ -18,12 +18,12 @@ if (ctrlVisible 10000) then { false call FUNC(show_range_card_setup); true call FUNC(show_range_card); - + if (_this == 1) then { GVAR(rangeCardStartRange) = 0 max Round(parseNumber(ctrlText 10003)) min 3000; GVAR(rangeCardEndRange) = 0 max Round(parseNumber(ctrlText 10004)) min 3000; GVAR(rangeCardIncrement) = 1 max Round(parseNumber(ctrlText 10005)) min 3000; - + [] call FUNC(calculate_range_card); [] call FUNC(update_range_card); }; diff --git a/addons/atragmx/functions/fnc_toggle_solution_setup.sqf b/addons/atragmx/functions/fnc_toggle_solution_setup.sqf index 0e9f702383..5372b205d0 100644 --- a/addons/atragmx/functions/fnc_toggle_solution_setup.sqf +++ b/addons/atragmx/functions/fnc_toggle_solution_setup.sqf @@ -18,7 +18,7 @@ if (ctrlVisible 15000) then { false call FUNC(show_solution_setup); true call FUNC(show_main_page); - + if (_this == 1) then { GVAR(currentScopeClickUnit) = GVAR(currentScopeClickUnitTemp); GVAR(currentScopeClickNumber) = GVAR(currentScopeClickNumberTemp); @@ -30,9 +30,9 @@ if (ctrlVisible 15000) then { } else { true call FUNC(show_solution_setup); false call FUNC(show_main_page); - + GVAR(currentScopeClickUnitTemp) = GVAR(currentScopeClickUnit); GVAR(currentScopeClickNumberTemp) = GVAR(currentScopeClickNumber); - + [] call FUNC(update_solution_setup); }; diff --git a/addons/atragmx/functions/fnc_toggle_target_data.sqf b/addons/atragmx/functions/fnc_toggle_target_data.sqf index 90fefbf37e..2cfa2f8df5 100644 --- a/addons/atragmx/functions/fnc_toggle_target_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_data.sqf @@ -18,7 +18,7 @@ if (ctrlVisible 14000) then { false call FUNC(show_target_data); true call FUNC(show_main_page); - + if (_this == 1) then { call FUNC(calculate_target_solution); }; diff --git a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf index d13ef4fb2e..83d2daa95f 100644 --- a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf @@ -18,7 +18,7 @@ if (ctrlVisible 7000) then { false call FUNC(show_target_range_assist); true call FUNC(show_main_page); - + if (_this == 1) then { ctrlSetText [320, Str(parseNumber(ctrlText 7012))]; ctrlSetText [140040, Str(parseNumber(ctrlText 7012))]; diff --git a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf index 5b88a6cfce..4d1680d195 100644 --- a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf @@ -18,7 +18,7 @@ if (ctrlVisible 8000) then { false call FUNC(show_target_speed_assist); true call FUNC(show_main_page); - + if (_this == 1) then { [] call FUNC(calculate_target_speed_assist); private ["_targetSpeed"]; diff --git a/addons/atragmx/functions/fnc_update_range_card.sqf b/addons/atragmx/functions/fnc_update_range_card.sqf index d084754959..e8c910ca74 100644 --- a/addons/atragmx/functions/fnc_update_range_card.sqf +++ b/addons/atragmx/functions/fnc_update_range_card.sqf @@ -43,7 +43,7 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound); _TOF = _x select 4; _velocity = _x select 5; _kineticEnergy = _x select 6; - + switch (GVAR(currentScopeUnit)) do { case 0: { _elevation = _elevation / 3.38; @@ -63,25 +63,25 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound); }; _clickNumber = GVAR(workingMemory) select 8; _clickInterval = _clickSize / _clickNumber; - + _elevation = Round(_elevation / _clickInterval); _windage1 = Round(_windage1 / _clickInterval); _windage2 = Round(_windage2 / _clickInterval); }; }; - + _elevationOutput = Str(Round(_elevation * 100) / 100); _windageOutput = Str(Round(_windage1 * 100) / 100); - + _rangeOutput = Str(_range); if (_velocity < _speedOfSound) then { _rangeOutput = _rangeOutput + "*"; }; - + if (GVAR(currentUnit) == 1) then { _velocity = _velocity * 3.2808399; }; - + switch (GVAR(rangeCardCurrentColumn)) do { case 0: { if (GVAR(showWind2)) then { @@ -100,6 +100,6 @@ _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSound); _lastColumnOutput = Str(Round(_TOF * 100) / 100); } }; - + lnbAddRow [5007, [_rangeOutput, _elevationOutput, _windageOutput, _lastColumnOutput]]; } forEach GVAR(rangeCardData); diff --git a/addons/atragmx/functions/fnc_update_result.sqf b/addons/atragmx/functions/fnc_update_result.sqf index bb708efaab..2b6ca29e23 100644 --- a/addons/atragmx/functions/fnc_update_result.sqf +++ b/addons/atragmx/functions/fnc_update_result.sqf @@ -33,24 +33,24 @@ switch (GVAR(currentScopeUnit)) do { case 0: { _elevationAbs = _elevationAbs / 3.38; _windageAbs = _windageAbs / 3.38; - + _wind2 = _wind2 / 3.38; - + _elevationRel = _elevationRel / 3.38; _windageRel = _windageRel / 3.38; - + _elevationCur = _elevationCur / 3.38; _windageCur = _windageCur / 3.38; }; case 2: { _elevationAbs = _elevationAbs * 1.047; _windageAbs = _windageAbs * 1.047; - + _wind2 = _wind2 / 1.047; - + _elevationRel = _elevationRel * 1.047; _windageRel = _windageRel * 1.047; - + _elevationCur = _elevationCur * 1.047; _windageCur = _windageCur * 1.047; }; @@ -62,15 +62,15 @@ switch (GVAR(currentScopeUnit)) do { }; _clickNumber = GVAR(workingMemory) select 8; _clickInterval = _clickSize / _clickNumber; - + _elevationAbs = Round(_elevationAbs / _clickInterval); _windageAbs = Round(_windageAbs / _clickInterval); - + _wind2 = Round(_wind2 / _clickInterval); - + _elevationRel = Round(_elevationRel / _clickInterval); _windageRel = Round(_windageRel / _clickInterval); - + _elevationCur = Round(_elevationCur / _clickInterval); _windageCur = Round(_windageCur / _clickInterval); }; @@ -166,4 +166,4 @@ if (GVAR(showWind2)) then { } else { ctrlSetText [420, "0.0"]; }; -}; \ No newline at end of file +}; diff --git a/addons/atragmx/initKeybinds.sqf b/addons/atragmx/initKeybinds.sqf index 51d2338292..94704e8132 100644 --- a/addons/atragmx/initKeybinds.sqf +++ b/addons/atragmx/initKeybinds.sqf @@ -33,4 +33,4 @@ _closeCode = { closeDialog 0; }; }; -[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\ATRAG_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); +[(localize LSTRING(Name)), QPATHTOF(UI\ATRAG_Icon.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); diff --git a/addons/atragmx/stringtable.xml b/addons/atragmx/stringtable.xml index a8e23ffbda..3790fb1f2d 100644 --- a/addons/atragmx/stringtable.xml +++ b/addons/atragmx/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/attach/CfgMagazines.hpp b/addons/attach/CfgMagazines.hpp index f85cac82b4..7ba8cebbc5 100644 --- a/addons/attach/CfgMagazines.hpp +++ b/addons/attach/CfgMagazines.hpp @@ -3,17 +3,17 @@ class CfgMagazines { class CA_Magazine; class B_IR_Grenade: CA_Magazine { ACE_Attachable = "B_IRStrobe"; - model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); + model = QPATHTOF(data\ace_IRStrobe.p3d); }; class O_IR_Grenade: B_IR_Grenade { ACE_Attachable = "O_IRStrobe"; - model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); + model = QPATHTOF(data\ace_IRStrobe.p3d); }; class I_IR_Grenade: B_IR_Grenade { ACE_Attachable = "I_IRStrobe"; - model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); + model = QPATHTOF(data\ace_IRStrobe.p3d); }; class SmokeShell; diff --git a/addons/attach/CfgVehicles.hpp b/addons/attach/CfgVehicles.hpp index e462c0cefa..1e0c0f3e71 100644 --- a/addons/attach/CfgVehicles.hpp +++ b/addons/attach/CfgVehicles.hpp @@ -9,7 +9,7 @@ exceptions[] = {}; \ showDisabled = 0; \ priority = 0; \ - icon = PATHTOF(UI\attach_ca.paa); \ + icon = QPATHTOF(UI\attach_ca.paa); \ distance = 4.5; \ }; \ class GVAR(DetachVehicle) { \ @@ -19,7 +19,7 @@ exceptions[] = {}; \ showDisabled = 0; \ priority = 0.1; \ - icon = PATHTOF(UI\detach_ca.paa); \ + icon = QPATHTOF(UI\detach_ca.paa); \ distance = 4.5; \ }; \ }; \ @@ -60,7 +60,7 @@ class CfgVehicles { exceptions[] = {"isNotDragging"}; showDisabled = 0; priority = 5; - icon = PATHTOF(UI\attach_ca.paa); + icon = QPATHTOF(UI\attach_ca.paa); }; class GVAR(Detach) { displayName = CSTRING(Detach); @@ -69,7 +69,7 @@ class CfgVehicles { exceptions[] = {"isNotDragging"}; showDisabled = 0; priority = 5; - icon = PATHTOF(UI\detach_ca.paa); + icon = QPATHTOF(UI\detach_ca.paa); }; }; }; diff --git a/addons/attach/CfgWeapons.hpp b/addons/attach/CfgWeapons.hpp index dfea64678d..cc50b3be5e 100644 --- a/addons/attach/CfgWeapons.hpp +++ b/addons/attach/CfgWeapons.hpp @@ -8,8 +8,8 @@ class CfgWeapons { scope = 2; displayName = CSTRING(IrStrobe_Name); descriptionShort = CSTRING(IrStrobe_Description); - model = QUOTE(PATHTOF(data\ace_IRStrobe.p3d)); - picture = PATHTOF(UI\irstrobe_item.paa); + model = QPATHTOF(data\ace_IRStrobe.p3d); + picture = QPATHTOF(UI\irstrobe_item.paa); class ItemInfo: InventoryItem_Base_F { mass = 1; diff --git a/addons/attach/config.cpp b/addons/attach/config.cpp index 0ecc37788a..4c06adc3eb 100644 --- a/addons/attach/config.cpp +++ b/addons/attach/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_IR_Strobe_Item"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"KoffeinFlummi","eRazeri","esteldunedain"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi","eRazeri","esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 305c3c0960..42bfe44dbc 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -51,7 +51,7 @@ if (_unit == _attachToVehicle) then { //Self Attachment [_unit, "forceWalk", "ACE_Attach", true] call EFUNC(common,statusEffect_set); - [{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame); + [{[localize LSTRING(PlaceAction), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame; _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)]; _actionID = _unit addAction [format ["%1", localize LSTRING(CancelAction)], {GVAR(placeAction) = PLACE_CANCEL}]; diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 05c625b374..0cf5c78082 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -57,7 +57,7 @@ if (toLower _itemName in ["b_ir_grenade", "o_ir_grenade", "i_ir_grenade"]) then detach _attachedObject; _attachedObject setPos ((getPos _unit) vectorAdd [0, 0, -1000]); // Delete attached item after 0.5 seconds - [{deleteVehicle (_this select 0)}, [_attachedObject], 2] call EFUNC(common,waitAndExecute); + [{deleteVehicle (_this select 0)}, [_attachedObject], 2] call CBA_fnc_waitAndExecute; } else { // Delete attached item deleteVehicle _attachedObject; diff --git a/addons/attach/functions/fnc_getChildrenAttachActions.sqf b/addons/attach/functions/fnc_getChildrenAttachActions.sqf index aeb75c00d4..9f811197e0 100644 --- a/addons/attach/functions/fnc_getChildrenAttachActions.sqf +++ b/addons/attach/functions/fnc_getChildrenAttachActions.sqf @@ -31,7 +31,7 @@ _actions = []; if (getText (_item >> "ACE_Attachable") != "") then { _displayName = getText(_item >> "displayName"); _picture = getText(_item >> "picture"); - _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); + _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); _actions pushBack [_action, [], _target]; }; }; @@ -44,7 +44,7 @@ _actions = []; if (getText (_item >> "ACE_Attachable") != "") then { _displayName = getText(_item >> "displayName"); _picture = getText(_item >> "picture"); - _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call EFUNC(common,execNextFrame)}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); + _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {_this call FUNC(canAttach)}, {}, [_x]] call EFUNC(interact_menu,createAction); _actions pushBack [_action, [], _target]; }; }; diff --git a/addons/attach/functions/fnc_handleGetIn.sqf b/addons/attach/functions/fnc_handleGetIn.sqf index d9f469eee2..dd173c4125 100644 --- a/addons/attach/functions/fnc_handleGetIn.sqf +++ b/addons/attach/functions/fnc_handleGetIn.sqf @@ -36,7 +36,7 @@ if (!isNull _xObject) then { params ["_detachedLight"]; TRACE_1("delayed delete",_detachedLight); deleteVehicle _detachedLight; - }, [_xObject], 2] call EFUNC(common,waitAndExecute); + }, [_xObject], 2] call CBA_fnc_waitAndExecute; (_attachedList select 0) set [0, objNull]; }; diff --git a/addons/attach/functions/fnc_handleKilled.sqf b/addons/attach/functions/fnc_handleKilled.sqf index 06c5473c88..69ab31122b 100644 --- a/addons/attach/functions/fnc_handleKilled.sqf +++ b/addons/attach/functions/fnc_handleKilled.sqf @@ -32,7 +32,7 @@ if ((count _attachedList) == 0) exitWith {}; //If it's a vehicle, also delete the attached if (!(_deadUnit isKindOf "CAManBase")) then { _xObject setPos ((getPos _deadUnit) vectorAdd [0, 0, -1000]); - [{deleteVehicle (_this select 0)}, [_xObject], 2] call EFUNC(common,waitAndExecute); + [{deleteVehicle (_this select 0)}, [_xObject], 2] call CBA_fnc_waitAndExecute; }; } forEach _attachedList; diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml index 4035b389a2..462e3d725c 100644 --- a/addons/attach/stringtable.xml +++ b/addons/attach/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -90,7 +90,7 @@ Leuchtstab befestigt Barra de luz acoplada Przyczepiono światło chemiczne - Chemlight attachée + Cyalume attachée Chemické světlo připnuto Chemlight Fixada Chemlight attaccata @@ -102,7 +102,7 @@ Leuchtstab entfernt Barra de luz quitada Odczepiono światło chemiczne - Chemlight détachée + Cyalume détachée Chemické světlo odepnuto Chemlight Separada Chemlight staccata @@ -138,7 +138,7 @@ Das IR-Stroboskop erlaubt es dir deine Position mit einem blinkenden Leuchtfeuer zu signalisieren, welches nur mit Nachtsichtgerät zu erkennen ist. Stroboskop światła podczerwieni umożliwia oznaczenie swojej pozycji pulsacyjnym światłem widocznym tylko przez optykę noktowizyjną i gogle noktowizyjne. El Marcador IR permite señalizar su posisición a través de una baliza visible solo a través de dispositivos de visión nocturna. - La balise IR permet de signaler votre position grace à un clignotement visible par des JVN. + La balise IR permet de signaler votre position grâce à un clignotement visible par des JVN. IR Značkovač je Infračerveně zářící stroboskop umožňující signalizaci vaší pozice díky blikajícímu světlu, které je vidět pouze při užití noktovizoru. O Marcador IV permite que você sinalize sua posição através de um pulso visível somente com equipamento de visão noturna. La Strobo IR è una luce stroboscopica che ti permette di segnalare la tua posizione grazie all'emissione di impulsi ad infrarossi visibili solo con i visori notturni. @@ -206,4 +206,4 @@ %1<br/>отсоединен(-а) - \ No newline at end of file + diff --git a/addons/backpacks/config.cpp b/addons/backpacks/config.cpp index ddc7639921..278e3ac452 100644 --- a/addons/backpacks/config.cpp +++ b/addons/backpacks/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"bux","commy2"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"bux","commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/backpacks/functions/fnc_isBackpack.sqf b/addons/backpacks/functions/fnc_isBackpack.sqf index d6b0fb1071..aa12b85ad9 100644 --- a/addons/backpacks/functions/fnc_isBackpack.sqf +++ b/addons/backpacks/functions/fnc_isBackpack.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp" -params [["_backpack", objNull, [objNull]]]; +params [["_backpack", objNull, [objNull, ""]]]; if (_backpack isEqualType objNull) then { _backpack = typeOf _backpack; diff --git a/addons/ballistics/CfgMagazines.hpp b/addons/ballistics/CfgMagazines.hpp index e368381333..931a6c2309 100644 --- a/addons/ballistics/CfgMagazines.hpp +++ b/addons/ballistics/CfgMagazines.hpp @@ -83,7 +83,7 @@ class CfgMagazines { descriptionShort = CSTRING(30Rnd_556x45_mag_Tracer_DimDescription); picture = "\A3\weapons_f\data\ui\m_20stanag_red_ca.paa"; }; - + class 20Rnd_762x51_Mag: CA_Magazine { initSpeed = 833; }; @@ -121,7 +121,7 @@ class CfgMagazines { descriptionShort = CSTRING(20Rnd_762x51_mag_SDDescription); initSpeed = 325; }; - + class ACE_10Rnd_762x51_M118LR_Mag: 10Rnd_762x51_Mag { author = ECSTRING(common,ACETeam); ammo = "ACE_762x51_Ball_M118LR"; @@ -247,7 +247,7 @@ class CfgMagazines { descriptionShort = CSTRING(10Rnd_338_API526_Mag_Description); initSpeed = 880; }; - + class 5Rnd_127x108_Mag; class ACE_5Rnd_127x99_Mag: 5Rnd_127x108_Mag { author = ECSTRING(common,ACETeam); @@ -273,8 +273,8 @@ class CfgMagazines { descriptionShort = CSTRING(5Rnd_127x99_AMAX_Mag_Description); initSpeed = 860; }; - - + + class 30Rnd_9x21_Mag: CA_Magazine { initSpeed = 450; }; @@ -286,27 +286,27 @@ class CfgMagazines { descriptionShort = CSTRING(30Rnd_9x19_mag_Description); initSpeed = 370; }; - + class 11Rnd_45ACP_Mag: CA_Magazine { initSpeed = 250; }; - + class 6Rnd_45ACP_Cylinder : 11Rnd_45ACP_Mag { initSpeed = 250; }; - + class 30Rnd_45ACP_Mag_SMG_01: 30Rnd_9x21_Mag { initSpeed = 250; }; - + class 9Rnd_45ACP_Mag: 30Rnd_45ACP_Mag_SMG_01 { initSpeed = 250; }; - + class 30Rnd_45ACP_Mag_SMG_01_Tracer_Green: 30Rnd_45ACP_Mag_SMG_01 { initSpeed = 250; }; - + class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag { initSpeed = 450; }; @@ -318,7 +318,7 @@ class CfgMagazines { descriptionShort = CSTRING(16Rnd_9x19_mag_Description); initSpeed = 370; }; - + class 10Rnd_762x54_Mag: 10Rnd_762x51_Mag { initSpeed = 800; }; @@ -331,15 +331,15 @@ class CfgMagazines { initSpeed = 800; tracersEvery = 1; }; - + class 150Rnd_762x54_Box: 150Rnd_762x51_Box { initSpeed = 750; }; - + class 150Rnd_93x64_Mag: CA_Magazine { initSpeed = 860; }; - + class 10Rnd_127x54_Mag: CA_Magazine { initSpeed = 300; }; diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp index 3f6835bbba..1cd705f63f 100644 --- a/addons/ballistics/CfgWeapons.hpp +++ b/addons/ballistics/CfgWeapons.hpp @@ -15,81 +15,81 @@ class CfgWeapons { class Rifle_Base_F; class Rifle_Long_Base_F; class MuzzleSlot; - + /* Long Rifles */ - + class GM6_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. }; }; - + class LRR_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.00020; // radians. Equal to 0.70 MOA. }; }; - + class DMR_06_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. }; - + class FullAuto: Mode_FullAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. }; }; - + class DMR_05_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. }; - + class FullAuto: Mode_FullAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. }; }; - + class DMR_04_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. }; }; - + class DMR_03_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.00032; // radians. Equal to 1.10 MOA. }; - + class FullAuto: Mode_FullAuto { dispersion = 0.00032; // radians. Equal to 1.10 MOA. }; }; - + class DMR_02_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.000262; // radians. Equal to 0.90 MOA. }; }; - + class DMR_01_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.0004; // radians. Equal to 1.375 MOA. }; }; - + class EBR_base_F: Rifle_Long_Base_F { class Single: Mode_SemiAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. }; - + class FullAuto: Mode_FullAuto { dispersion = 0.00029; // radians. Equal to 1.00 MOA. }; }; - + /* MX */ - + class arifle_MX_Base_F: Rifle_Base_F {}; class arifle_MX_SW_F: arifle_MX_Base_F { magazines[] = { @@ -158,7 +158,7 @@ class CfgWeapons { class Burst: Mode_Burst { dispersion = 0.0008727; // radians. Equal to 3 MOA. }; - + class FullAuto: Mode_FullAuto { dispersion = 0.0008727; // radians. Equal to 3 MOA. }; @@ -285,6 +285,8 @@ class CfgWeapons { "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow", + "30Rnd_556x45_Stanag_red", + "30Rnd_556x45_Stanag_green", "ACE_30Rnd_556x45_Stanag_M995_AP_mag", "ACE_30Rnd_556x45_Stanag_Mk262_mag", "ACE_30Rnd_556x45_Stanag_Mk318_mag", @@ -305,6 +307,8 @@ class CfgWeapons { "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow", + "30Rnd_556x45_Stanag_red", + "30Rnd_556x45_Stanag_green", "ACE_30Rnd_556x45_Stanag_M995_AP_mag", "ACE_30Rnd_556x45_Stanag_Mk262_mag", "ACE_30Rnd_556x45_Stanag_Mk318_mag", @@ -320,6 +324,8 @@ class CfgWeapons { "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow", + "30Rnd_556x45_Stanag_red", + "30Rnd_556x45_Stanag_green", "ACE_30Rnd_556x45_Stanag_M995_AP_mag", "ACE_30Rnd_556x45_Stanag_Mk262_mag", "ACE_30Rnd_556x45_Stanag_Mk318_mag", @@ -335,6 +341,8 @@ class CfgWeapons { "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow", + "30Rnd_556x45_Stanag_red", + "30Rnd_556x45_Stanag_green", "ACE_30Rnd_556x45_Stanag_M995_AP_mag", "ACE_30Rnd_556x45_Stanag_Mk262_mag", "ACE_30Rnd_556x45_Stanag_Mk318_mag", @@ -356,6 +364,8 @@ class CfgWeapons { "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow", + "30Rnd_556x45_Stanag_red", + "30Rnd_556x45_Stanag_green", "ACE_30Rnd_556x45_Stanag_M995_AP_mag", "ACE_30Rnd_556x45_Stanag_Mk262_mag", "ACE_30Rnd_556x45_Stanag_Mk318_mag", @@ -371,6 +381,8 @@ class CfgWeapons { "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow", + "30Rnd_556x45_Stanag_red", + "30Rnd_556x45_Stanag_green", "ACE_30Rnd_556x45_Stanag_M995_AP_mag", "ACE_30Rnd_556x45_Stanag_Mk262_mag", "ACE_30Rnd_556x45_Stanag_Mk318_mag", @@ -386,6 +398,8 @@ class CfgWeapons { "30Rnd_556x45_Stanag_Tracer_Red", "30Rnd_556x45_Stanag_Tracer_Green", "30Rnd_556x45_Stanag_Tracer_Yellow", + "30Rnd_556x45_Stanag_red", + "30Rnd_556x45_Stanag_green", "ACE_30Rnd_556x45_Stanag_M995_AP_mag", "ACE_30Rnd_556x45_Stanag_Mk262_mag", "ACE_30Rnd_556x45_Stanag_Mk318_mag", @@ -511,7 +525,7 @@ class CfgWeapons { ACE_barrelTwist=234.95; ACE_barrelLength=609.6; }; - + class HMG_127 : LMG_RCWS { }; class HMG_01: HMG_127 { @@ -521,7 +535,7 @@ class CfgWeapons { ACE_barrelTwist=304.8; ACE_barrelLength=1143.0; }; - + /* Silencers */ class ItemCore; diff --git a/addons/ballistics/config.cpp b/addons/ballistics/config.cpp index 768ba63e02..59c29f0a7f 100644 --- a/addons/ballistics/config.cpp +++ b/addons/ballistics/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2","Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2","Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/ballistics/scripts/initTargetWall.sqf b/addons/ballistics/scripts/initTargetWall.sqf index d9b16eec10..0ce3950de1 100644 --- a/addons/ballistics/scripts/initTargetWall.sqf +++ b/addons/ballistics/scripts/initTargetWall.sqf @@ -11,5 +11,5 @@ if (local _wall) then { _paper attachTo [_wall, [0,-0.02,0.6]]; _paper setDir getDir _wall; - _paper setObjectTextureGlobal [0, QUOTE(PATHTOF(textures\target_ca.paa))]; + _paper setObjectTextureGlobal [0, QPATHTOF(textures\target_ca.paa)]; }; diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index 39bbac1726..b51303fa6d 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/captives/CfgVehicles.hpp b/addons/captives/CfgVehicles.hpp index a8215c0cdc..2afa1cfea4 100644 --- a/addons/captives/CfgVehicles.hpp +++ b/addons/captives/CfgVehicles.hpp @@ -10,7 +10,7 @@ class CfgVehicles { condition = QUOTE([ARR_2(_player, _target)] call FUNC(canApplyHandcuffs)); statement = QUOTE([ARR_2(_player, _target)] call FUNC(doApplyHandcuffs)); exceptions[] = {}; - icon = QUOTE(PATHTOF(UI\handcuff_ca.paa)); + icon = QPATHTOF(UI\handcuff_ca.paa); }; class ACE_MainActions { @@ -21,7 +21,7 @@ class CfgVehicles { condition = QUOTE([ARR_2(_player, _target)] call FUNC(canRemoveHandcuffs)); statement = QUOTE([ARR_2(_player, _target)] call FUNC(doRemoveHandcuffs)); exceptions[] = {}; - icon = QUOTE(PATHTOF(UI\handcuff_ca.paa)); + icon = QPATHTOF(UI\handcuff_ca.paa); }; class ACE_EscortCaptive { displayName = CSTRING(EscortCaptive); @@ -30,7 +30,7 @@ class CfgVehicles { statement = QUOTE([ARR_3(_player, _target, true)] call FUNC(doEscortCaptive)); exceptions[] = {}; showDisabled = 0; - icon = QUOTE(PATHTOF(UI\captive_ca.paa)); + icon = QPATHTOF(UI\captive_ca.paa); priority = 2.3; }; class ACE_StopEscorting { @@ -40,7 +40,7 @@ class CfgVehicles { statement = QUOTE([ARR_3(_player,_target, false)] call FUNC(doEscortCaptive)); exceptions[] = {"isNotEscorting"}; showDisabled = 0; - icon = QUOTE(PATHTOF(UI\captive_ca.paa)); + icon = QPATHTOF(UI\captive_ca.paa); priority = 2.3; }; class ACE_LoadCaptive { @@ -50,7 +50,7 @@ class CfgVehicles { statement = QUOTE([ARR_3(_player, _target, objNull)] call FUNC(doLoadCaptive)); exceptions[] = {"isNotEscorting"}; showDisabled = 0; - icon = QUOTE(PATHTOF(UI\captive_ca.paa)); + icon = QPATHTOF(UI\captive_ca.paa); priority = 2.2; }; class GVAR(UnloadCaptive) { @@ -79,7 +79,7 @@ class CfgVehicles { exceptions[] = {}; showDisabled = 0; priority = 0; - icon = QUOTE(PATHTOF(UI\Surrender_ca.paa)); + icon = QPATHTOF(UI\Surrender_ca.paa); }; class ACE_StopSurrenderingSelf { displayName = CSTRING(StopSurrendering); @@ -88,7 +88,7 @@ class CfgVehicles { exceptions[] = {"isNotSurrendering"}; showDisabled = 0; priority = 0; - icon = QUOTE(PATHTOF(UI\Surrender_ca.paa)); + icon = QPATHTOF(UI\Surrender_ca.paa); }; }; }; @@ -154,7 +154,7 @@ class CfgVehicles { scope = 2; //show in editor isGlobal = 0; //run on server isTriggerActivated = 1; //Wait for triggers - icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Make_Unit_Surrender_ca.paa); functionPriority = 0; class Arguments {}; class ModuleDescription: ModuleDescription { @@ -170,7 +170,7 @@ class CfgVehicles { scope = 2; //show in editor isGlobal = 0; //run on server isTriggerActivated = 1; //Wait for triggers - icon = QUOTE(PATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Make_Unit_Handcuffed_ca.paa); functionPriority = 0; class Arguments {}; class ModuleDescription: ModuleDescription { @@ -186,7 +186,7 @@ class CfgVehicles { displayName = CSTRING(ModuleSettings_DisplayName); function = QFUNC(moduleSettings); scope = 2; - icon = QUOTE(PATHTOF(UI\Icon_Module_settings_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_settings_ca.paa); isGlobal = 1; isSingular = 1; class Arguments { diff --git a/addons/captives/CfgWeapons.hpp b/addons/captives/CfgWeapons.hpp index 7092962519..1b65a0a4bf 100644 --- a/addons/captives/CfgWeapons.hpp +++ b/addons/captives/CfgWeapons.hpp @@ -5,8 +5,8 @@ class CfgWeapons { class ACE_CableTie: ACE_ItemCore { displayName = CSTRING(CableTie); descriptionShort = CSTRING(CableTieDescription); - model = QUOTE(PATHTOF(models\ace_cabletie.p3d)); - picture = QUOTE(PATHTOF(UI\ace_cabletie_ca.paa)); + model = QPATHTOF(models\ace_cabletie.p3d); + picture = QPATHTOF(UI\ace_cabletie_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 1; diff --git a/addons/captives/XEH_postInit.sqf b/addons/captives/XEH_postInit.sqf index 144d3efb9a..567a107697 100644 --- a/addons/captives/XEH_postInit.sqf +++ b/addons/captives/XEH_postInit.sqf @@ -1,5 +1,11 @@ #include "script_component.hpp" +["SettingsInitialized", { + // Hold on a little bit longer to ensure anims will work + [{ + GVAR(captivityEnabled) = true; + }, [], 0.05] call CBA_fnc_waitAndExecute; +}] call EFUNC(common,addEventHandler); //Handles when someone starts escorting and then disconnects, leaving the captive attached //This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC @@ -33,10 +39,3 @@ if (!hasInterface) exitWith {}; ["isNotEscorting", {!(GETVAR(_this select 0,GVAR(isEscorting),false))}] call EFUNC(common,addCanInteractWithCondition); ["isNotHandcuffed", {!(GETVAR(_this select 0,GVAR(isHandcuffed),false))}] call EFUNC(common,addCanInteractWithCondition); ["isNotSurrendering", {!(GETVAR(_this select 0,GVAR(isSurrendering),false))}] call EFUNC(common,addCanInteractWithCondition); - -["SettingsInitialized", { - // Hold on a little bit longer to ensure anims will work - [{ - GVAR(captivityEnabled) = true; - }, [], 0.05] call EFUNC(common,waitAndExecute); -}] call EFUNC(common,addEventHandler); diff --git a/addons/captives/config.cpp b/addons/captives/config.cpp index c87408b341..a73b604fb2 100644 --- a/addons/captives/config.cpp +++ b/addons/captives/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_CableTie"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ACE_Interaction"}; - author[] = {"commy2", "KoffeinFlummi"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2", "KoffeinFlummi"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf index 484151853b..e0d3ae8fa6 100644 --- a/addons/captives/functions/fnc_doEscortCaptive.sqf +++ b/addons/captives/functions/fnc_doEscortCaptive.sqf @@ -37,7 +37,7 @@ if (_state) then { [{ params ["_args", "_pfID"]; _args params ["_unit", "_target", "_actionID"]; - + if (_unit getVariable [QGVAR(isEscorting), false]) then { if (!alive _target || {!alive _unit} || {!canStand _target} || {!canStand _unit} || {_target getVariable ["ACE_isUnconscious", false]} || {_unit getVariable ["ACE_isUnconscious", false]} || {!isNull (attachedTo _unit)}) then { _unit setVariable [QGVAR(isEscorting), false, true]; diff --git a/addons/captives/functions/fnc_moduleHandcuffed.sqf b/addons/captives/functions/fnc_moduleHandcuffed.sqf index dcb59ff2a1..9d3079262a 100644 --- a/addons/captives/functions/fnc_moduleHandcuffed.sqf +++ b/addons/captives/functions/fnc_moduleHandcuffed.sqf @@ -32,7 +32,7 @@ if (!isServer) exitWith {}; TRACE_2("event",_x,local _x); ["SetHandcuffed", [_x], [_x, true]] call EFUNC(common,targetEvent); } forEach _units; -}, [_units], 0.05] call EFUNC(common,waitAndExecute); +}, [_units], 0.05] call CBA_fnc_waitAndExecute; if (!isNull _logic) then { deleteVehicle _logic; diff --git a/addons/captives/functions/fnc_moduleSurrender.sqf b/addons/captives/functions/fnc_moduleSurrender.sqf index 29659b351e..a15d2e4165 100644 --- a/addons/captives/functions/fnc_moduleSurrender.sqf +++ b/addons/captives/functions/fnc_moduleSurrender.sqf @@ -32,7 +32,7 @@ if (!isServer) exitWith {}; TRACE_2("event",_x,local _x); ["SetSurrendered", [_x], [_x, true]] call EFUNC(common,targetEvent); } forEach _units; -}, [_units], 0.05] call EFUNC(common,waitAndExecute); +}, [_units], 0.05] call CBA_fnc_waitAndExecute; if (!isNull _logic) then { deleteVehicle _logic; diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index d4f84730e6..58291d0689 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -27,7 +27,7 @@ if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith { // It's to soon to call this function, delay it if (EGVAR(common,settingsInitFinished)) then { // Settings are already initialized, but the small wait isn't over - [DFUNC(setHandCuffed), _this, 0.05] call EFUNC(common,waitAndExecute); + [DFUNC(setHandCuffed), _this, 0.05] call CBA_fnc_waitAndExecute; } else { // Settings are not initialized yet [DFUNC(setHandCuffed), _this] call EFUNC(common,runAfterSettingsInit); @@ -98,7 +98,7 @@ if (_state) then { TRACE_2("Adding animChangedEH",_unit,_animChangedEHID); _unit setVariable [QGVAR(handcuffAnimEHID), _animChangedEHID]; - }, [_unit], 0.01] call EFUNC(common,waitAndExecute); + }, [_unit], 0.01] call CBA_fnc_waitAndExecute; } else { _unit setVariable [QGVAR(isHandcuffed), false, true]; [_unit, "setCaptive", QGVAR(Handcuffed), false] call EFUNC(common,statusEffect_set); diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index ffc3c35081..6fc4c7b9ab 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -27,7 +27,7 @@ if !(missionNamespace getVariable [QGVAR(captivityEnabled), false]) exitWith { // It's to soon to call this function, delay it if (EGVAR(common,settingsInitFinished)) then { // Settings are already initialized, but the small wait isn't over - [DFUNC(setSurrendered), _this, 0.05] call EFUNC(common,waitAndExecute); + [DFUNC(setSurrendered), _this, 0.05] call CBA_fnc_waitAndExecute; } else { // Settings are not initialized yet [DFUNC(setSurrendered), _this] call EFUNC(common,runAfterSettingsInit); @@ -73,7 +73,7 @@ if (_state) then { }]; _unit setVariable [QGVAR(surrenderAnimEHID), _animChangedEHID]; }; - }, [_unit], 0.01] call EFUNC(common,waitAndExecute); + }, [_unit], 0.01] call CBA_fnc_waitAndExecute; } else { _unit setVariable [QGVAR(isSurrendering), false, true]; [_unit, "setCaptive", QGVAR(Surrendered), false] call EFUNC(common,statusEffect_set); @@ -103,7 +103,7 @@ if (_state) then { params ["_args", "_pfID"]; _args params ["_unit", "_maxTime"]; //If waited long enough or they re-surrendered or they are unconscious, exit loop - if ((ACE_time > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith { + if ((CBA_missionTime > _maxTime) || {_unit getVariable [QGVAR(isSurrendering), false]} || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith { [_pfID] call CBA_fnc_removePerFrameHandler; }; //Only break animation if they are actualy the "hands up" animation (because we are using switchmove there won't be an transition) @@ -112,7 +112,7 @@ if (_state) then { //Break out of hands up animation loop [_unit, "ACE_AmovPercMstpSsurWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation); }; - }, 0, [_unit, (ACE_time + 20)]] call CBA_fnc_addPerFrameHandler; + }, 0, [_unit, (CBA_missionTime + 20)]] call CBA_fnc_addPerFrameHandler; }; }; diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index 52ed203fed..4044723c4a 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -201,7 +201,7 @@ Synchronizovat s jednotkou, která má být v poutech. Sincronizza un'unità per metterle le manette. Sincroniza una unidad para hacer que esté esposada. - Synchronise une unité pour la rendre captive. + Synchronisez une unité pour la rendre captive. Captives Settings @@ -234,7 +234,7 @@ Může spoutat spolubojovníky Kann Kameraden fesseln Pode algemar o próprio lado - Peut menotter sa propre faction + Peut capturer sa propre faction Saját oldal megbilincselhető Связать союзника Puoi ammanettare unità alleate @@ -295,7 +295,7 @@ Requiere que los Jugadores se rindan antes de arrestarlos Vyžaduje, aby se hráč nejdříve vzdal, poté může být spoután I giocatori devono arrendersi prima che possano essere arrestati - Requiert la reddition des joueurs avant qu'ils ne puissent être arrêtés + Requiert la capitulation des joueurs avant qu'ils ne puissent être arrêtés Surrendering only @@ -317,7 +317,7 @@ Rendición o desarme Vzdávání nebo beze zbraně Resa o senza armi - Reddition ou désarmement + Capitulation ou desarmé - \ No newline at end of file + diff --git a/addons/cargo/CfgEventHandlers.hpp b/addons/cargo/CfgEventHandlers.hpp index 3f784e7ab4..ff4a88693e 100644 --- a/addons/cargo/CfgEventHandlers.hpp +++ b/addons/cargo/CfgEventHandlers.hpp @@ -27,27 +27,7 @@ class Extended_Killed_EventHandlers { //Need initPost or we have problems with setVariable with 'ACE_Cargo' class Extended_InitPost_EventHandlers { - class StaticWeapon { - class ADDON { - init = QUOTE(_this call DFUNC(initObject)); - }; - }; - class ReammoBox_F { - class ADDON { - init = QUOTE(_this call DFUNC(initObject)); - }; - }; - class Cargo_base_F { - class ADDON { - init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); - }; - }; - class CargoNet_01_box_F { - class ADDON { - init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); - }; - }; - class Land_CargoBox_V1_F { + class ThingX { class ADDON { init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); }; @@ -57,27 +37,17 @@ class Extended_InitPost_EventHandlers { init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); }; }; - class RoadCone_F { + class PlasticCase_01_base_F { class ADDON { init = QUOTE(_this call DFUNC(initObject); _this call DFUNC(initVehicle)); }; }; - class Car { + class LandVehicle { class ADDON { init = QUOTE(_this call DFUNC(initVehicle)); }; }; - class Tank { - class ADDON { - init = QUOTE(_this call DFUNC(initVehicle)); - }; - }; - class Helicopter { - class ADDON { - init = QUOTE(_this call DFUNC(initVehicle)); - }; - }; - class Plane { + class Air { class ADDON { init = QUOTE(_this call DFUNC(initVehicle)); }; @@ -87,16 +57,6 @@ class Extended_InitPost_EventHandlers { init = QUOTE(_this call DFUNC(initVehicle)); }; }; - class ACE_RepairItem_Base { - class ADDON { - init = QUOTE(_this call DFUNC(initObject)); - }; - }; - class ACE_bodyBagObject { - class ADDON { - init = QUOTE(_this call DFUNC(initObject)); - }; - }; class ACE_ConcertinaWireCoil { class ADDON { init = QUOTE(_this call DFUNC(initObject)); diff --git a/addons/cargo/CfgVehicles.hpp b/addons/cargo/CfgVehicles.hpp index 9104533302..43412b7b72 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -1,3 +1,6 @@ + +class CBA_Extended_EventHandlers; + class CfgVehicles { class Logic; class Module_F: Logic { @@ -7,7 +10,7 @@ class CfgVehicles { class ACE_moduleCargoSettings: ACE_Module { scope = 2; displayName = CSTRING(SettingsModule_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Cargo_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Cargo_ca.paa); category = "ACE_Logistics"; function = QFUNC(moduleSettings); functionPriority = 1; @@ -33,7 +36,7 @@ class CfgVehicles { class GVAR(makeLoadable): ACE_Module { scope = 2; displayName = CSTRING(makeLoadable_displayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_makeLoadable_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_makeLoadable_ca.paa); category = "ACE_Logistics"; function = QFUNC(moduleMakeLoadable); isGlobal = 1; @@ -191,12 +194,69 @@ class CfgVehicles { GVAR(hasCargo) = 1; }; - class Heli_Transport_02_base_F; - class I_Heli_Transport_02_F : Heli_Transport_02_base_F { + class Helicopter_Base_H; + class Heli_Light_01_base_F: Helicopter_Base_H { + GVAR(space) = 0; + GVAR(hasCargo) = 0; + }; + + class Heli_Light_02_base_F: Helicopter_Base_H { + GVAR(space) = 4; + }; + + class Helicopter_Base_F; + class Heli_light_03_base_F: Helicopter_Base_F { + GVAR(space) = 4; + }; + + class Heli_Transport_01_base_F: Helicopter_Base_H { + GVAR(space) = 8; + }; + + class Heli_Transport_02_base_F: Helicopter_Base_H { + GVAR(space) = 20; + }; + + class Heli_Transport_03_base_F: Helicopter_Base_H { + GVAR(space) = 40; + }; + + class Heli_Transport_04_base_F: Helicopter_Base_H { + GVAR(space) = 0; + GVAR(hasCargo) = 0; + }; + + class O_Heli_Transport_04_box_F: Heli_Transport_04_base_F { GVAR(space) = 20; GVAR(hasCargo) = 1; }; + class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F { + GVAR(space) = 12; + GVAR(hasCargo) = 1; + }; + + class O_Heli_Transport_04_ammo_F: Heli_Transport_04_base_F { + GVAR(space) = 8; + GVAR(hasCargo) = 1; + }; + + class O_Heli_Transport_04_fuel_F: Heli_Transport_04_base_F {}; + + class O_Heli_Transport_04_medevac_F: Heli_Transport_04_base_F { + GVAR(space) = 8; + GVAR(hasCargo) = 1; + }; + + class Heli_Attack_01_base_F: Helicopter_Base_F { + GVAR(space) = 0; + GVAR(hasCargo) = 0; + }; + + class Heli_Attack_02_base_F: Helicopter_Base_F { + GVAR(space) = 4; + }; + // jets class Plane: Air { GVAR(space) = 0; @@ -204,7 +264,6 @@ class CfgVehicles { }; // autonomus - class Helicopter_Base_F; class UAV_01_base_F: Helicopter_Base_F { GVAR(space) = 0; GVAR(hasCargo) = 0; @@ -245,6 +304,26 @@ class CfgVehicles { GVAR(canLoad) = 1; }; + // Taru pods + class Pod_Heli_Transport_04_base_F; + class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F { + GVAR(space) = 8; + GVAR(hasCargo) = 1; + }; + class Land_Pod_Heli_Transport_04_box_F: Pod_Heli_Transport_04_base_F { + GVAR(space) = 20; + GVAR(hasCargo) = 1; + }; + class Land_Pod_Heli_Transport_04_repair_F: Pod_Heli_Transport_04_base_F { + GVAR(space) = 12; + GVAR(hasCargo) = 1; + }; + class Pod_Heli_Transport_04_crewed_base_F; + class Land_Pod_Heli_Transport_04_medevac_F: Pod_Heli_Transport_04_crewed_base_F { + GVAR(space) = 8; + GVAR(hasCargo) = 1; + }; + class StaticMortar; class Mortar_01_base_F: StaticMortar { GVAR(size) = 2; // 1 = small, 2 = large @@ -253,6 +332,7 @@ class CfgVehicles { // Ammo boxes class ThingX; + class Items_base_F; class ReammoBox_F: ThingX { GVAR(size) = 2; // 1 = small, 2 = large GVAR(canLoad) = 1; @@ -275,6 +355,23 @@ class CfgVehicles { class Slingload_01_Base_F: Slingload_base_F { //Huron 20ft containers GVAR(canLoad) = 0; }; + + //Plastic and metal case + class PlasticCase_01_base_F: Items_base_F { + GVAR(size) = 1; // 1 = small, 2 = large + GVAR(canLoad) = 1; + }; + class Land_PlasticCase_01_large_F: PlasticCase_01_base_F { + GVAR(size) = 2; // 1 = small, 2 = large + }; + class MetalCase_01_base_F: Items_base_F { + GVAR(size) = 1; // 1 = small, 2 = large + GVAR(canLoad) = 1; + }; + class Land_MetalCase_01_large_F: MetalCase_01_base_F { + GVAR(size) = 2; // 1 = small, 2 = large + }; + // objects class RoadCone_F: ThingX { GVAR(size) = 1; @@ -284,14 +381,16 @@ class CfgVehicles { GVAR(size) = 2; }; - class Scrapyard_base_F; class Land_PaperBox_closed_F: Scrapyard_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 10; GVAR(hasCargo) = 1; GVAR(size) = 11; GVAR(canLoad) = 1; - XEH_ENABLED; class ACE_Actions { class ACE_MainActions { @@ -323,163 +422,253 @@ class CfgVehicles { }; }; class Cargo10_base_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 14; GVAR(size) = 15; - XEH_ENABLED; }; class Land_Cargo20_blue_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_brick_red_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_cyan_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_grey_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_light_blue_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_light_green_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_military_green_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Ruins_F; class Land_Cargo20_military_ruins_F: Ruins_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_orange_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_red_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_sand_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_vr_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_white_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo20_yellow_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 49; GVAR(size) = 50; - XEH_ENABLED; }; class Land_Cargo40_blue_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_brick_red_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_cyan_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_grey_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_light_blue_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_light_green_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_military_green_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_military_ruins_F: Ruins_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_orange_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_red_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_sand_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_vr_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_white_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; class Land_Cargo40_yellow_F: Cargo_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 99; GVAR(size) = 100; - XEH_ENABLED; }; // small class Land_CargoBox_V1_F: ThingX { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(space) = 7; GVAR(hasCargo) = 1; GVAR(size) = 7; - XEH_ENABLED; class ACE_Actions { class ACE_MainActions { diff --git a/addons/cargo/config.cpp b/addons/cargo/config.cpp index 1aefa49616..860eff0d99 100644 --- a/addons/cargo/config.cpp +++ b/addons/cargo/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"commy2", "Glowbal"}; - authorUrl = "https://ace3mod.com/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2", "Glowbal"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/cargo/functions/fnc_initObject.sqf b/addons/cargo/functions/fnc_initObject.sqf index dc8db802e5..f740d0e371 100644 --- a/addons/cargo/functions/fnc_initObject.sqf +++ b/addons/cargo/functions/fnc_initObject.sqf @@ -39,7 +39,7 @@ private _statement = { [_player, _target] call FUNC(startLoadIn); }; private _text = localize LSTRING(loadObject); -private _icon = QUOTE(PATHTOF(UI\Icon_load.paa)); +private _icon = QPATHTOF(UI\Icon_load.paa); private _action = [QGVAR(load), _text, _icon, _statement, _condition] call EFUNC(interact_menu,createAction); [_type, 0, ["ACE_MainActions"], _action] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index c0b312146b..7e19b0acd0 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -20,6 +20,8 @@ TRACE_1("params", _vehicle); private _type = typeOf _vehicle; +if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {}; + if (isServer) then { { if (isClass _x) then { @@ -38,7 +40,6 @@ if (_type in GVAR(initializedVehicleClasses)) exitWith {}; GVAR(initializedVehicleClasses) pushBack _type; if (!hasInterface) exitWith {}; -if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {}; TRACE_1("Adding unload cargo action to class", _type); diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 2b6ce0be17..6a4cf5acfb 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -65,7 +65,7 @@ Povolit náklad Habilitar carga Abilita Cargo - Activer mise en cargaison + Activer la cargaison Enable the load in cargo module @@ -76,7 +76,7 @@ Habilitar la carga en el módulo de carga Umožňuje naložit předměty do nákladového prostoru vozidla Abilita il modulo di caricamento in cargo - Active + Activer le chargement dans le module de cargaison. Cargo Settings @@ -87,7 +87,7 @@ Nastavení nákladu Ajustes de carga Impostazioni Cargo - Options de cargaison + Réglages de cargaison Configure the cargo module settings @@ -98,7 +98,7 @@ Configure los ajustes del módulo de carga Konfigurace nákladního modulu Configura le impostazioni del modulo cargo - Configure les options du module de cargaison + Configurer les réglages du module de cargaison %1<br/>loaded into<br/>%2 @@ -133,7 +133,7 @@ Погрузка Caricando Cargando - Chargement cargaison + Chargement de la cargaison Unloading Cargo @@ -144,7 +144,7 @@ Выгрузка Scaricando Descargando - Déchargement cargaison + Déchargement de la cargaison %1<br/>could not be loaded @@ -155,7 +155,7 @@ %1<br/>не может быть погружен %1<br/>non può essere caricato %1<br/>no pudo ser cargado - %1<br/>ne peut être chargé + %1<br /> n'a pas pu être chargé %1<br/>could not be unloaded @@ -166,7 +166,7 @@ %1<br/>не может быть выгружен %1<br/>non può essere scaricato %1<br/>no pudo ser descargado - %1<br/>ne peut être déchargé + %1<br /> n'a pas pu être déchargé Make Object Loadable @@ -175,6 +175,7 @@ Rendi oggetto caricabile Hacer objeto cargable Rendre l'objet chargeable + Vytvořit objekt nakladatelným Fazer objeto carregável @@ -183,7 +184,8 @@ Ustawia zsynchronizowany obiekt jako możliwy do załadowania poprzez system cargo Imposta l'oggetto sincronizzato come caricabile dal sistema cargo Sincronizar un objecto para hacerlo cargable. - Rend l'objet synchronisé chargeable par le système de cargaison. + Rend l'objet synchronisé comme chargeable par le système de cargaison. + Nastaví synchronizované objekty nakladatelnými za pomocí Nákladního systému. Seta o objeto sincronizado como carregável @@ -193,6 +195,7 @@ Dimensioni dell'oggetto Tamaño del objeto Taille de l'objet + Velikost objektu Tamanho do objeto diff --git a/addons/common/ACE_Settings.hpp b/addons/common/ACE_Settings.hpp index d6226fd0ab..2d8a5d7a27 100644 --- a/addons/common/ACE_Settings.hpp +++ b/addons/common/ACE_Settings.hpp @@ -49,7 +49,7 @@ class ACE_Settings { description = CSTRING(SettingFeedbackIconsDesc); values[] = {ECSTRING(optionsmenu,Hide), ECSTRING(optionsmenu,TopRightDown), ECSTRING(optionsmenu,TopRightLeft), ECSTRING(optionsmenu,TopLeftDown), ECSTRING(optionsmenu,TopLeftRight)}; }; - class GVAR(SettingProgressBarLocation) { + class GVAR(settingProgressBarLocation) { value = 0; typeName = "SCALAR"; force = 0; diff --git a/addons/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp index bdfeccd4fa..beb07e35e7 100644 --- a/addons/common/CfgEventHandlers.hpp +++ b/addons/common/CfgEventHandlers.hpp @@ -21,7 +21,7 @@ class Extended_PostInit_EventHandlers { class Extended_DisplayLoad_EventHandlers { class RscDisplayMission { - ADDON = QUOTE(_this call COMPILE_FILE(XEH_mainDislayLoad)); + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); }; }; @@ -33,7 +33,7 @@ class Extended_InitPost_EventHandlers { }; class CAManBase { class GVAR(setName) { - init = QUOTE(if (local (_this select 0)) then {_this call FUNC(setName)};); + init = QUOTE(if (local (_this select 0)) then {[ARR_2(FUNC(setName),_this)] call CBA_fnc_execNextFrame};); }; class GVAR(muteUnit) { init = QUOTE(_this call FUNC(muteUnitHandleInitPost)); @@ -76,3 +76,9 @@ class Extended_FiredBIS_EventHandlers { ADDON = QUOTE(_this call FUNC(firedEH)); }; }; + +class Extended_Engine_EventHandlers { + class All { + ADDON = QUOTE(_this call FUNC(handleEngine)); + }; +}; diff --git a/addons/common/CfgUnitInsignia.hpp b/addons/common/CfgUnitInsignia.hpp index c1cd541e9c..337baa4235 100644 --- a/addons/common/CfgUnitInsignia.hpp +++ b/addons/common/CfgUnitInsignia.hpp @@ -3,13 +3,13 @@ class CfgUnitInsignia { class ACE_insignia_logo { displayName = "ACE3"; author = CSTRING(ACETeam); - texture = PATHTOF(data\Insignia_ace3logo_ca.paa); + texture = QPATHTOF(data\Insignia_ace3logo_ca.paa); textureVehicle = ""; }; class ACE_insignia_banana { displayName = "ABE3"; author = CSTRING(ACETeam); - texture = PATHTOF(data\insignia_banana_ca.paa); + texture = QPATHTOF(data\insignia_banana_ca.paa); textureVehicle = ""; }; }; diff --git a/addons/common/CfgVehicles.hpp b/addons/common/CfgVehicles.hpp index de1f7f7cf4..1e958027be 100644 --- a/addons/common/CfgVehicles.hpp +++ b/addons/common/CfgVehicles.hpp @@ -36,7 +36,7 @@ class CfgVehicles { scope = 2; isGlobal = 1; isSingular = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_CheckPBO_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_CheckPBO_ca.paa); class Arguments { class Action { displayName = CSTRING(CheckPBO_Action_DisplayName); @@ -82,7 +82,7 @@ class CfgVehicles { displayName = CSTRING(LSDVehicles_DisplayName); function = "ACE_Common_fnc_moduleLSDVehicles"; scope = 2; - icon = QUOTE(PATHTOF(UI\Icon_Module_LSD_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_LSD_ca.paa); isGlobal = 1; class Arguments {}; class ModuleDescription: ModuleDescription { @@ -132,7 +132,7 @@ class CfgVehicles { class ACE_Headbug_Fix: Bicycle { scope = 1; side = 3; - model = PATHTOF(data\ACE_HeadBanger.p3d); + model = QPATHTOF(data\ACE_HeadBanger.p3d); //model = QPATHTO_M(ACE_HeadBanger.p3d); author = CSTRING(ACETeam); displayName = " "; diff --git a/addons/common/CfgWeapons.hpp b/addons/common/CfgWeapons.hpp index 22075e2903..488d4210c4 100644 --- a/addons/common/CfgWeapons.hpp +++ b/addons/common/CfgWeapons.hpp @@ -34,8 +34,8 @@ class CfgWeapons { scope = 2; displayName = CSTRING(bananaDisplayName); descriptionShort = CSTRING(bananaDescr); - model = PATHTOF(data\banana.p3d); - picture = PATHTOF(data\icon_banana_ca.paa); + model = QPATHTOF(data\banana.p3d); + picture = QPATHTOF(data\icon_banana_ca.paa); icon = "iconObject_circle"; mapSize = 0.034; class ItemInfo: InventoryItem_Base_F { diff --git a/addons/common/RscInfoType.hpp b/addons/common/RscInfoType.hpp index 327a9814d1..32bc0b698f 100644 --- a/addons/common/RscInfoType.hpp +++ b/addons/common/RscInfoType.hpp @@ -15,7 +15,7 @@ class RscInGameUI { class RscUnitInfoTank: RscUnitInfo { onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call FUNC(localEvent);); }; - + class RscUnitInfoAirNoWeapon: RscUnitInfo { onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call FUNC(localEvent);); }; @@ -111,4 +111,8 @@ class RscInGameUI { class RscStaminaBar { onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStaminaBar"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgStaminaBar)),_this select 0)]); }; + + class RscStanceInfo { + onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscStanceInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Stance')])] call FUNC(localEvent);); + }; }; diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 0b125af1aa..857a754f6a 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -24,6 +24,7 @@ PREP(debugModule); PREP(defineVariable); PREP(deviceKeyFindValidIndex); PREP(deviceKeyRegisterNew); +PREP(deprecateComponent); PREP(disableAI); PREP(disableUserInput); PREP(displayIcon); @@ -87,6 +88,7 @@ PREP(getWindDirection); PREP(getZoom); PREP(goKneeling); PREP(hadamardProduct); +PREP(handleEngine); PREP(handleModifierKey); PREP(handleModifierKeyUp); PREP(handleScrollWheel); @@ -276,5 +278,3 @@ PREP(hashListCreateHash); PREP(hashListSelect); PREP(hashListSet); PREP(hashListPush); - -PREP(timePFH); diff --git a/addons/common/XEH_mainDislayLoad.sqf b/addons/common/XEH_missionDisplayLoad.sqf similarity index 74% rename from addons/common/XEH_mainDislayLoad.sqf rename to addons/common/XEH_missionDisplayLoad.sqf index 57ace32f94..a07c301288 100644 --- a/addons/common/XEH_mainDislayLoad.sqf +++ b/addons/common/XEH_missionDisplayLoad.sqf @@ -1,6 +1,4 @@ #include "script_component.hpp" -GVAR(ScrollWheelFrame) = diag_frameno; - call COMPILE_FILE(init_handleScrollWheel); call COMPILE_FILE(init_handleModifierKey); diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 58e674dd8d..5a85452b1b 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -3,47 +3,6 @@ // #define DEBUG_MODE_FULL #include "script_component.hpp" - -////////////////////////////////////////////////// -// PFHs -////////////////////////////////////////////////// - -//Singe PFEH to handle execNextFrame, waitAndExec and waitUntilAndExec: -[{ - BEGIN_COUNTER(waitAndExec); - - //Handle the waitAndExec array: - while {!(GVAR(waitAndExecArray) isEqualTo []) && {GVAR(waitAndExecArray) select 0 select 0 <= ACE_Time}} do { - private _entry = GVAR(waitAndExecArray) deleteAt 0; - (_entry select 2) call (_entry select 1); - }; - - //Handle the execNextFrame array: - { - (_x select 0) call (_x select 1); - false - } count GVAR(nextFrameBufferA); - - //Swap double-buffer: - GVAR(nextFrameBufferA) = GVAR(nextFrameBufferB); - GVAR(nextFrameBufferB) = []; - GVAR(nextFrameNo) = diag_frameno + 1; - - //Handle the waitUntilAndExec array: - { - // if condition is satisifed call statement - if ((_x select 2) call (_x select 0)) then { - // make sure to delete the correct handle when multiple conditions are met in one frame - GVAR(waitUntilAndExecArray) deleteAt (GVAR(waitUntilAndExecArray) find _x); - (_x select 2) call (_x select 1); - }; - nil - } count +GVAR(waitUntilAndExecArray); - - END_COUNTER(waitAndExec); -}, 0, []] call CBA_fnc_addPerFrameHandler; - - ////////////////////////////////////////////////// // Get Map Data ////////////////////////////////////////////////// @@ -64,6 +23,7 @@ ["blockSprint", false, []] call FUNC(statusEffect_addType); ["setCaptive", true, [QEGVAR(captives,Handcuffed), QEGVAR(captives,Surrendered), QEGVAR(medical,unconscious)]] call FUNC(statusEffect_addType); ["blockDamage", false, ["fixCollision"]] call FUNC(statusEffect_addType); +["blockEngine", false, ["ACE_Refuel"]] call FUNC(statusEffect_addType); ["forceWalk", { params ["_object", "_set"]; @@ -90,6 +50,11 @@ _object allowDamage (_set == 0); }; }] call FUNC(addEventHandler); +["blockEngine", { + params ["_vehicle", "_set"]; + _vehicle setVariable [QGVAR(blockEngine), _set > 0, true]; + _vehicle engineOn false; +}] call FUNC(addEventHandler); //Add a fix for BIS's zeus remoteControl module not reseting variables on DC when RC a unit //This variable is used for isPlayer checks @@ -133,6 +98,7 @@ if (isServer) then { ["fixFloating", FUNC(fixFloating)] call FUNC(addEventhandler); ["fixPosition", FUNC(fixPosition)] call FUNC(addEventhandler); +["loadPersonEvent", FUNC(loadPersonLocal)] call FUNC(addEventhandler); ["unloadPersonEvent", FUNC(unloadPersonLocal)] call FUNC(addEventhandler); ["lockVehicle", { @@ -146,16 +112,27 @@ if (isServer) then { ["setDir", {(_this select 0) setDir (_this select 1)}] call FUNC(addEventhandler); ["setFuel", {(_this select 0) setFuel (_this select 1)}] call FUNC(addEventhandler); +["engineOn", {(_this select 0) engineOn (_this select 1)}] call FUNC(addEventhandler); ["setSpeaker", {(_this select 0) setSpeaker (_this select 1)}] call FUNC(addEventhandler); ["selectLeader", {(_this select 0) selectLeader (_this select 1)}] call FUNC(addEventHandler); ["setVelocity", {(_this select 0) setVelocity (_this select 1)}] call FUNC(addEventHandler); ["playMove", {(_this select 0) playMove (_this select 1)}] call FUNC(addEventHandler); ["playMoveNow", {(_this select 0) playMoveNow (_this select 1)}] call FUNC(addEventHandler); ["switchMove", {(_this select 0) switchMove (_this select 1)}] call FUNC(addEventHandler); +["setVectorDirAndUp", {(_this select 0) setVectorDirAndUp (_this select 1)}] call FUNC(addEventHandler); +["setVanillaHitPointDamage", {(_this select 0) setHitPointDamage (_this select 1)}] call FUNC(addEventHandler); + +// Request framework +[QGVAR(requestCallback), FUNC(requestCallback)] call FUNC(addEventHandler); +[QGVAR(receiveRequest), FUNC(receiveRequest)] call FUNC(addEventHandler); + +[QGVAR(systemChatGlobal), {systemChat _this}] call FUNC(addEventHandler); if (isServer) then { ["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler); ["enableSimulationGlobal", {(_this select 0) enableSimulationGlobal (_this select 1)}] call FUNC(addEventHandler); + ["setOwner", {(_this select 0) setOwner (_this select 1)}] call FUNC(addEventHandler); + [QGVAR(serverLog), FUNC(serverLog)] call FUNC(addEventHandler); }; @@ -323,19 +300,14 @@ enableCamShake true; GVAR(OldPlayerVehicle) = vehicle objNull; GVAR(OldPlayerTurret) = [objNull] call FUNC(getTurretIndex); GVAR(OldPlayerWeapon) = currentWeapon objNull; -GVAR(OldPlayerInventory) = [objNull] call FUNC(getAllGear); +GVAR(OldPlayerInventory) = []; +GVAR(OldPlayerInventoryNoAmmo) = []; GVAR(OldPlayerVisionMode) = currentVisionMode objNull; GVAR(OldCameraView) = ""; GVAR(OldVisibleMap) = false; GVAR(OldInventoryDisplayIsOpen) = nil; //@todo check this GVAR(OldIsCamera) = false; -// clean up playerChanged eventhandler from preinit and put it in the same PFH as the other events to reduce overhead and guarantee advantageous execution order -if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then { - [GVAR(PreInit_playerChanged_PFHID)] call CBA_fnc_removePerFrameHandler; - GVAR(PreInit_playerChanged_PFHID) = nil; -}; - // PFH to raise varios events [{ BEGIN_COUNTER(stateChecker); @@ -377,11 +349,36 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then { }; // "playerInventoryChanged" event - _data = [ACE_player] call FUNC(getAllGear); + _data = getUnitLoadout ACE_player; if !(_data isEqualTo GVAR(OldPlayerInventory)) then { // Raise ACE event locally GVAR(OldPlayerInventory) = _data; - ["playerInventoryChanged", [ACE_player, _data]] call FUNC(localEvent); + + // we don't want to trigger this just because your ammo counter decreased. + _data = + GVAR(OldPlayerInventory); + + private _weaponInfo = _data param [0, []]; + if !(_weaponInfo isEqualTo []) then { + _weaponInfo set [4, primaryWeaponMagazine ACE_player]; + _weaponInfo deleteAt 5; + }; + + _weaponInfo = _data param [1, []]; + if !(_weaponInfo isEqualTo []) then { + _weaponInfo set [4, secondaryWeaponMagazine ACE_player]; + _weaponInfo deleteAt 5; + }; + + _weaponInfo = _data param [2, []]; + if !(_weaponInfo isEqualTo []) then { + _weaponInfo set [4, handgunMagazine ACE_player]; + _weaponInfo deleteAt 5; + }; + + if !(_data isEqualTo GVAR(OldPlayerInventoryNoAmmo)) then { + GVAR(OldPlayerInventoryNoAmmo) = _data; + ["playerInventoryChanged", [ACE_player, [ACE_player, false] call FUNC(getAllGear)]] call FUNC(localEvent); + }; }; // "playerVisionModeChanged" event @@ -442,6 +439,11 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then { // Add various canInteractWith conditions ////////////////////////////////////////////////// +["isNotDead", { + params ["_unit", "_target"]; + alive _unit +}] call FUNC(addCanInteractWithCondition); + ["notOnMap", {!visibleMap}] call FUNC(addCanInteractWithCondition); ["isNotInside", { diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index 20b3692b9f..0c2922ea64 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -23,13 +23,6 @@ DFUNC(selectWeaponMode) = { GVAR(syncedEvents) = HASH_CREATE; GVAR(showHudHash) = [] call FUNC(hashCreate); -//GVARS for execNextFrame and waitAndExec and waitUntilAndExecute -GVAR(waitAndExecArray) = []; -GVAR(nextFrameNo) = diag_frameno; -GVAR(nextFrameBufferA) = []; -GVAR(nextFrameBufferB) = []; -GVAR(waitUntilAndExecArray) = []; - GVAR(settingsInitFinished) = false; GVAR(runAtSettingsInitialized) = []; @@ -46,44 +39,15 @@ if (isServer) then { GVAR(statusEffect_Names) = []; GVAR(statusEffect_isGlobal) = []; +GVAR(setHearingCapabilityMap) = []; + ////////////////////////////////////////////////// -// Set up PlayerChanged eventhandler for pre init +// Set up PlayerChanged eventhandler for pre init (EH is installed in postInit) ////////////////////////////////////////////////// ACE_player = objNull; uiNamespace setVariable ["ACE_player", objNull]; -// @todo check if this can be removed -if (hasInterface) then { - // PFH to update the ACE_player variable - GVAR(PreInit_playerChanged_PFHID) = [{ - if !(ACE_player isEqualTo (call FUNC(player))) then { - private _oldPlayer = ACE_player; - - ACE_player = call FUNC(player); - uiNamespace setVariable ["ACE_player", ACE_player]; - - // Raise ACE event - ["playerChanged", [ACE_player, _oldPlayer]] call FUNC(localEvent); - }; - }, 0, []] call CBA_fnc_addPerFrameHandler; -}; - - -////////////////////////////////////////////////// -// Time handling -////////////////////////////////////////////////// - -ACE_time = diag_tickTime; -ACE_realTime = diag_tickTime; -ACE_virtualTime = diag_tickTime; -ACE_diagTime = diag_tickTime; -ACE_gameTime = time; -ACE_pausedTime = 0; -ACE_virtualPausedTime = 0; - -[FUNC(timePFH), 0, []] call CBA_fnc_addPerFrameHandler; - // Init toHex [0] call FUNC(toHex); diff --git a/addons/common/config.cpp b/addons/common/config.cpp index cbe5c5df6a..2cf6dd4ec9 100644 --- a/addons/common/config.cpp +++ b/addons/common/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_ItemCore","ACE_FakePrimaryWeapon", "ACE_Banana"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_main","ace_modules"}; - author[] = {"KoffeinFlummi"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = CSTRING(ACETeam); + authors[] = {"KoffeinFlummi"}; + url = ECSTRING(main,URL); VERSION_CONFIG_COMMON; }; }; diff --git a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf index 605af2fa85..9d6c062ac2 100644 --- a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf @@ -23,7 +23,7 @@ if (isServer) then { params ["_eventName", "_client"]; if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith { - ACE_LOGERROR("Request for synced event - key not found."); + ACE_LOGERROR_1("Request for synced event - key [%1] not found.", _eventName); false }; diff --git a/addons/common/functions/fnc__handleSyncedEvent.sqf b/addons/common/functions/fnc__handleSyncedEvent.sqf index f8fe21d760..c65ccad8b0 100644 --- a/addons/common/functions/fnc__handleSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleSyncedEvent.sqf @@ -17,7 +17,7 @@ params ["_name", "_args", "_ttl"]; if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith { - ACE_LOGERROR("Synced event key not found."); + ACE_LOGERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name); false }; @@ -29,7 +29,7 @@ if (isServer) then { _internalData = HASH_GET(GVAR(syncedEvents),_name); _internalData params ["", "_eventLog"]; - _eventLog pushBack [ACE_diagTime, _args, _ttl]; + _eventLog pushBack [diag_tickTime, _args, _ttl]; }; }; diff --git a/addons/common/functions/fnc_addActionEventHandler.sqf b/addons/common/functions/fnc_addActionEventHandler.sqf index fe641010e4..56d2de16db 100644 --- a/addons/common/functions/fnc_addActionEventHandler.sqf +++ b/addons/common/functions/fnc_addActionEventHandler.sqf @@ -45,7 +45,7 @@ if (_actionID == -1) then { private _addAction = call compile format [ "[ '', - {if (inputAction '%1' == 0) exitWith {}; {if (_this call (_x select 0)) then {_this call (_x select 1)}} forEach (((_this select 0) getVariable '%2') select 1 select 2)}, + {[{if (inputAction '%1' == 0) exitWith {}; {if (_this call (_x select 0)) then {_this call (_x select 1)}} forEach (((_this select 0) getVariable '%2') select 1 select 2)}, _this] call CBA_fnc_directCall}, nil, -1, false, diff --git a/addons/common/functions/fnc_addActionMenuEventHandler.sqf b/addons/common/functions/fnc_addActionMenuEventHandler.sqf index e68507ae7b..c86cf45f17 100644 --- a/addons/common/functions/fnc_addActionMenuEventHandler.sqf +++ b/addons/common/functions/fnc_addActionMenuEventHandler.sqf @@ -52,7 +52,7 @@ _actionIDs pushBack _id; private _addAction = call compile format [ "[ '%2', - {if (inputAction '%1' == 0) then {if (_this call (%3 select 2)) then {_this call (%3 select 3)}} else {_this call (%3 select 1)}}, + {[{if (inputAction '%1' == 0) then {if (_this call (%3 select 2)) then {_this call (%3 select 3)}} else {_this call (%3 select 1)}}, _this] call CBA_fnc_directCall}, nil, %4, false, diff --git a/addons/common/functions/fnc_addScrollWheelEventHandler.sqf b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf index aef88543be..2a9b26e71c 100644 --- a/addons/common/functions/fnc_addScrollWheelEventHandler.sqf +++ b/addons/common/functions/fnc_addScrollWheelEventHandler.sqf @@ -15,6 +15,8 @@ params ["_statement"]; +ACE_DEPRECATED("ace_common_fnc_addScrollWheelEventHandler", "3.8.0", "'MouseZChanged' Display EventHandler"); + if (_statement isEqualType "") then { _statement = compile _statement; }; diff --git a/addons/common/functions/fnc_addSyncedEventHandler.sqf b/addons/common/functions/fnc_addSyncedEventHandler.sqf index 0964e419bc..126bb6a957 100644 --- a/addons/common/functions/fnc_addSyncedEventHandler.sqf +++ b/addons/common/functions/fnc_addSyncedEventHandler.sqf @@ -10,6 +10,9 @@ * Return Value: * Boolean of success * + * Example: + * ["myEvent", {_this call x}, 0] call ace_common_fnc_addSyncedEventHandler + * * Public: Yes */ #include "script_component.hpp" @@ -17,7 +20,7 @@ params ["_name", "_handler", ["_ttl", 0]]; if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith { - ACE_LOGERROR("Duplicate synced event creation."); + ACE_LOGERROR_1("Duplicate synced event [%1] creation.",_name); false }; diff --git a/addons/common/functions/fnc_assignedItemFix.sqf b/addons/common/functions/fnc_assignedItemFix.sqf index d93409ce7c..18dd6b4e0c 100644 --- a/addons/common/functions/fnc_assignedItemFix.sqf +++ b/addons/common/functions/fnc_assignedItemFix.sqf @@ -29,39 +29,17 @@ GVAR(AssignedItemsShownItems) = [ ]; ["playerInventoryChanged", { - params ["_unit", "_assignedItems"]; + params ["_unit"]; - _assignedItems = _assignedItems select 17; + private _assignedItems = getUnitLoadout _unit param [9, ["","","","","",""]]; // ["ItemMap","ItemGPS","ItemRadio","ItemCompass","ItemWatch","NVGoggles"] - GVAR(AssignedItemsShownItems) = [true, true, true, true, true]; - - { - if !(_x in GVAR(AssignedItems)) then { - GVAR(AssignedItems) pushBack _x; - GVAR(AssignedItemsInfo) pushBack toLower getText (configFile >> "CfgWeapons" >> _x >> "ACE_hideItemType"); - }; - - switch (GVAR(AssignedItemsInfo) select (GVAR(AssignedItems) find _x)) do { - case ("map"): { - GVAR(AssignedItemsShownItems) set [0, false]; - }; - case ("compass"): { - GVAR(AssignedItemsShownItems) set [1, false]; - }; - case ("watch"): { - GVAR(AssignedItemsShownItems) set [2, false]; - }; - case ("radio"): { - GVAR(AssignedItemsShownItems) set [3, false]; - }; - case ("gps"): { - GVAR(AssignedItemsShownItems) set [4, false]; - }; - }; - false - } count _assignedItems; - - //systemChat str GVAR(AssignedItemsShownItems); + GVAR(AssignedItemsShownItems) = [ + !((_assignedItems select 0) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 0 >> "ACE_hideItemType") != "map"}, + !((_assignedItems select 3) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 3 >> "ACE_hideItemType") != "compass"}, + !((_assignedItems select 4) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 4 >> "ACE_hideItemType") != "watch"}, + !((_assignedItems select 2) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 2 >> "ACE_hideItemType") != "radio"}, + !((_assignedItems select 1) isEqualTo "") && {getText (configFile >> "CfgWeapons" >> _assignedItems select 1 >> "ACE_hideItemType") != "gps"} + ]; GVAR(AssignedItemsShownItems) params ["_showMap", "_showCompass", "_showWatch", "_showRadio", "_showGPS"]; diff --git a/addons/common/functions/fnc_binocularMagazine.sqf b/addons/common/functions/fnc_binocularMagazine.sqf index b5f4f0558e..aacac7c142 100644 --- a/addons/common/functions/fnc_binocularMagazine.sqf +++ b/addons/common/functions/fnc_binocularMagazine.sqf @@ -15,18 +15,6 @@ */ #include "script_component.hpp" -params [["_unit", objNull, [objNull]]]; +ACE_DEPRECATED("ace_common_fnc_binocularMagazine","3.8.0","CBA_fnc_binocularMagazine"); -private _binocular = binocular _unit; - -scopeName "main"; - -{ - if ((_x select 0) isEqualTo _binocular) then { - // note: if there is no magazine, _x(4,0) will be nil, which skips the breakOut. - (_x select 4 select 0) breakOut "main"; - }; - false -} count weaponsitems _unit; - -"" +_this call CBA_fnc_binocularMagazine diff --git a/addons/common/functions/fnc_cachedCall.sqf b/addons/common/functions/fnc_cachedCall.sqf index 2c7cdd4b27..6160dfd090 100644 --- a/addons/common/functions/fnc_cachedCall.sqf +++ b/addons/common/functions/fnc_cachedCall.sqf @@ -19,8 +19,8 @@ params ["_params", "_function", "_namespace", "_uid", "_duration", "_event"]; -if ((_namespace getVariable [_uid, [-99999]]) select 0 < ACE_diagTime) then { - _namespace setVariable [_uid, [ACE_diagTime + _duration, _params call _function]]; +if ((_namespace getVariable [_uid, [-99999]]) select 0 < diag_tickTime) then { + _namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]]; // Does the cache needs to be cleared on an event? if (!isNil "_event") then { diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 19a4c6f72a..1f3a26db7d 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -19,6 +19,18 @@ private _version = getText (configFile >> "CfgPatches" >> "ace_main" >> "version ACE_LOGINFO_1("ACE is version %1.",_version); +//CBA Versioning check - close main display if using incompatible version +private _cbaVersionAr = getArray (configFile >> "CfgPatches" >> "cba_main" >> "versionAr"); +private _cbaRequiredAr = (getArray (configFile >> "CfgSettings" >> "CBA" >> "Versioning" >> "ACE" >> "dependencies" >> "CBA")) select 1; +ACE_LOGINFO_2("CBA is version %1 [min required %2]",_cbaVersionAr,_cbaRequiredAr); +if ([_cbaRequiredAr, _cbaVersionAr] call cba_versioning_fnc_version_compare) then { + private _errorMsg = format ["CBA Version [%1] is outdated [required %2]", _cbaVersionAr, _cbaRequiredAr]; + ACE_LOGERROR(_errorMsg); + if (hasInterface) then { + ["[ACE] ERROR", _errorMsg, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); + }; +}; + //private _addons = activatedAddons; // broken with High-Command module, see #2134 private _addons = "true" configClasses (configFile >> "CfgPatches");// _addons = _addons apply {toLower configName _x};// diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index f447d126af..1e6eac7887 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -61,7 +61,8 @@ if (!isServer) then { _error = _error + "Newer version; "; }; - //[_error, "{systemChat _this}"] call FUNC(execRemoteFnc); + //[QGVAR(systemChatGlobal), _error] call FUNC(globalEvent); + ACE_LOGERROR(_error); if (_mode < 2) then { @@ -79,7 +80,7 @@ if (!isServer) then { params ["_rscLayer"]; TRACE_2("Hiding Error message after 10 seconds",time,_rscLayer); _rscLayer cutFadeOut 0.2; - }, [_rscLayer], 10] call FUNC(waitAndExecute); + }, [_rscLayer], 10] call CBA_fnc_waitAndExecute; }; }; @@ -89,7 +90,7 @@ if (!isServer) then { TRACE_2("Player is alive, showing msg and exiting",time,_text); _text = composeText [parseText format ["%1", _text]]; ["[ACE] ERROR", _text, {findDisplay 46 closeDisplay 0}] call FUNC(errorMessage); - }, [_text]] call FUNC(waitUntilAndExecute); + }, [_text]] call CBA_fnc_waitUntilAndExecute; }; }; diff --git a/addons/common/functions/fnc_codeToString.sqf b/addons/common/functions/fnc_codeToString.sqf index b2817cd2b8..b4fe37db35 100644 --- a/addons/common/functions/fnc_codeToString.sqf +++ b/addons/common/functions/fnc_codeToString.sqf @@ -12,12 +12,11 @@ */ #include "script_component.hpp" -params ["_function"]; +params ["_code"]; +if (_code isEqualType "") exitWith {_code}; -if (_function isEqualType "") exitWith {_function}; +_code = str(_code); +_code = _code select [1, count _code - 2]; -_function = toArray str _function; -_function deleteAt 0; -_function deleteAt (count _function - 1); +_code -toString _function // return diff --git a/addons/common/functions/fnc_deprecateComponent.sqf b/addons/common/functions/fnc_deprecateComponent.sqf new file mode 100644 index 0000000000..21905e8e4e --- /dev/null +++ b/addons/common/functions/fnc_deprecateComponent.sqf @@ -0,0 +1,63 @@ +/* + * Author: Glowbal + * Mark a component as deprecated and switches it to a new component if that is available + * + * Arguments: + * 0: Component + * 1: New component + * 2: Version when the compent will be removed + * + * Return Value: + * Replaced by new component + * + * Public: No + * + * Example: + * [["ace_sitting", "ace_sitting_enabled"], ["acex_sitting", "acex_sitting_enabled"], "3.7.0"] call ace_common_fnc_deprecateComponent; + */ +#include "script_component.hpp" + +params ["_oldComponent", "_newComponent", "_version"]; + +_oldComponent params ["_oldComponentName", "_oldSettingName"]; +_newComponent params ["_newComponentName", "_newSettingName"]; + +private _isReplacementAvailable = isClass (configFile >> "CfgPatches" >> _newComponentName); +private _isDeprecatedLoaded = missionNamespace getvariable [_oldSettingName, false]; +private _isReplacementLoaded = missionNamespace getvariable [_newSettingName, false]; + +if (_isDeprecatedLoaded && {_isReplacementAvailable} && {!_isReplacementLoaded}) then { + [_newSettingName, true, true, true] call FUNC(setSetting); +}; + +if (_isDeprecatedLoaded && {!_isReplacementLoaded}) then { + private _componentVersion = getText (configFile >> "CfgPatches" >> _oldComponentName >> "version"); + ((_componentVersion splitString ".") apply {parseNumber _x}) params ["_componentMajor", "_componentMinor", "_componentPatch"]; + ((_version splitString ".") apply {parseNumber _x}) params ["_major", "_minor", "_patch"]; + + switch (true) do { + case (_componentMajor >= _major && {_componentMinor >= _minor} && {_componentPatch >= _patch}): { // Removed from this version + private _message = format[ + "Component %1 is deprecated. It has been replaced by %2. The component %1 is no longer usable on this version. ", _oldComponentName, _newComponentName, _version]; + systemChat format["ACE [ERROR] - %1", _message]; + ACE_LOGERROR(_message); + }; + case (_componentMajor >= _major && {_componentMinor >= _minor-1}): { // Removed the next this version + private _message = format[ + "Component %1 is deprecated. It is replaced by %2. Please disable %1 and make use of %2. " + + "The component (%1) will no longer be available from version %3 and later.", _oldComponentName, _newComponentName, _version]; + systemChat format["ACE [WARNING] - %1", _message]; + ACE_LOGWARNING(_message); + }; + case (_componentMajor == _major && {_componentMinor >= _minor - 2}): { // we are in a version leading up to removal + private _message = format[ + "Component %1 is deprecated. It is replaced by %2. Please disable %1 and make use of %2. " + + "The component (%1) will no longer be available from version %3 and later.", _oldComponentName, _newComponentName, _version]; + ACE_LOGWARNING(_message); + }; + default { + }; + }; +}; + +_isReplacementAvailable; diff --git a/addons/common/functions/fnc_deviceKeyRegisterNew.sqf b/addons/common/functions/fnc_deviceKeyRegisterNew.sqf index 416eef2c77..ce012fc3aa 100644 --- a/addons/common/functions/fnc_deviceKeyRegisterNew.sqf +++ b/addons/common/functions/fnc_deviceKeyRegisterNew.sqf @@ -13,7 +13,7 @@ * None * * Example: - * [(localize "STR_ACE_microdagr_itemName"), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditionCode, _toggleCode, _closeCode] call ace_common_fnc_deviceKeyRegisterNew + * [(localize "STR_ACE_microdagr_itemName"), QPATHTOF(images\microDAGR_item.paa), _conditionCode, _toggleCode, _closeCode] call ace_common_fnc_deviceKeyRegisterNew * * Public: No */ diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index c51b3bd454..e4f824791a 100644 --- a/addons/common/functions/fnc_displayIcon.sqf +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -14,7 +14,7 @@ * None * * Example: - * ["myID", true, QUOTE(PATHTOF(data\icon_group.paa)), [1,1,1,1], 0] call ace_gui_fnc_displayIcon; + * ["myID", true, QPATHTOF(data\icon_group.paa), [1,1,1,1], 0] call ace_gui_fnc_displayIcon; * * Public: Yes */ @@ -89,11 +89,11 @@ private _refresh = { if (_show) then { if ({_x select 0 == _iconId} count _list == 0) then { - _list pushBack [_iconId, _icon, _color, ACE_time]; + _list pushBack [_iconId, _icon, _color, CBA_missionTime]; } else { { if (_x select 0 == _iconId) exitWith { - _list set [_forEachIndex, [_iconId, _icon, _color, ACE_time]]; + _list set [_forEachIndex, [_iconId, _icon, _color, CBA_missionTime]]; }; } forEach _list; }; @@ -104,7 +104,7 @@ if (_show) then { if (_timeAlive >= 0) then { [{ [_this select 0, false, "", [0,0,0], 0] call FUNC(displayIcon); - }, [_iconId], _timeAlive, _timeAlive] call FUNC(waitAndExecute); + }, [_iconId], _timeAlive, _timeAlive] call CBA_fnc_waitAndExecute; }; } else { diff --git a/addons/common/functions/fnc_displayText.sqf b/addons/common/functions/fnc_displayText.sqf index 3c68327535..ee22f6949a 100644 --- a/addons/common/functions/fnc_displayText.sqf +++ b/addons/common/functions/fnc_displayText.sqf @@ -25,7 +25,7 @@ if !(typeName _text in ["STRING", "TEXT"]) then {_text = str _text}; GVAR(lastHint) params ["_lastHintTime", "_lastHintPriority"]; -private _time = ACE_time; +private _time = CBA_missionTime; if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then { hintSilent _text; @@ -33,5 +33,5 @@ if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then { GVAR(lastHint) set [0, _time]; GVAR(lastHint) set [1, _priority]; - [{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call FUNC(waitAndExecute); + [{if ((_this select 0) == GVAR(lastHint) select 0) then {hintSilent ""};}, [_time], _delay, 0] call CBA_fnc_waitAndExecute; }; diff --git a/addons/common/functions/fnc_dumpPerformanceCounters.sqf b/addons/common/functions/fnc_dumpPerformanceCounters.sqf index bdc4588b05..afb71b423a 100644 --- a/addons/common/functions/fnc_dumpPerformanceCounters.sqf +++ b/addons/common/functions/fnc_dumpPerformanceCounters.sqf @@ -21,7 +21,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]; + 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; }; @@ -42,7 +42,7 @@ diag_log text format ["-------------------------------------------"]; if (_iter > 2) then { _count = _count + 1; private _delta = (_x select 1) - (_x select 0); - + _total = _total + _delta; }; @@ -54,7 +54,7 @@ diag_log text format ["-------------------------------------------"]; _averageResult = (_total / _count) * 1000; // dump results - diag_log text format ["%1: Average: %2s / %3 = %4ms", _counterEntry select 0, _total, _count, _averageResult]; + diag_log text format ["%1: Average: %2s / %3 = %4ms", _counterEntry select 0, _total, _count, _averageResult]; } else { diag_log text format ["%1: No results", _counterEntry select 0]; }; @@ -68,7 +68,7 @@ diag_log text format["-------------------------------------------"]; { private _delay = _x select 2; //if(_delay > 0) then { _delay = _delay / 1000; }; - + diag_log text format["%1: %2s, delay=%3, handle=%4",(_x select 0), _delay, (_x select 3), (_x select 4)]; } forEach ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER; diff --git a/addons/common/functions/fnc_execNextFrame.sqf b/addons/common/functions/fnc_execNextFrame.sqf index 7b3f034c6d..c1c4b81592 100644 --- a/addons/common/functions/fnc_execNextFrame.sqf +++ b/addons/common/functions/fnc_execNextFrame.sqf @@ -13,10 +13,6 @@ */ #include "script_component.hpp" -params ["_func", "_params"]; +ACE_DEPRECATED("ace_common_fnc_execNextFrame","3.8.0","CBA_fnc_execNextFrame"); -if (diag_frameno != GVAR(nextFrameNo)) then { - GVAR(nextFrameBufferA) pushBack [_params, _func]; -} else { - GVAR(nextFrameBufferB) pushBack [_params, _func]; -}; +_this call CBA_fnc_execNextFrame; diff --git a/addons/common/functions/fnc_findUnloadPosition.sqf b/addons/common/functions/fnc_findUnloadPosition.sqf index f7155fd87b..c3b0dc3f34 100644 --- a/addons/common/functions/fnc_findUnloadPosition.sqf +++ b/addons/common/functions/fnc_findUnloadPosition.sqf @@ -92,6 +92,15 @@ while {_rangeToCheck < _maxDistance} do { private _point1ASL = (AGLtoASL _roundAGL) vectorAdd [_radiusOfItem * cos _angle, _radiusOfItem * sin _angle, 0.1]; private _point2ASL = (AGLtoASL _roundAGL) vectorAdd [-_radiusOfItem * cos _angle, -_radiusOfItem * sin _angle, (_radiusOfItem + 0.5)]; private _testIntersections = lineIntersectsSurfaces [_point1ASL, _point2ASL]; + if (((count _testIntersections) == 1) && {isNull ((_testIntersections select 0) select 2)}) then { + private _hitGroundASL = (_testIntersections select 0) select 0; + private _hitHeightOffset = ((AGLtoASL _roundAGL) select 2) - (_hitGroundASL select 2); + private _hit2dOffset = _roundAGL distance2D _hitGroundASL; + private _slope = _hitHeightOffset atan2 _hit2dOffset; + if (_slope < 25) then { //Ignore ground hit if slope is reasonable + _testIntersections = []; + }; + }; if (!(_testIntersections isEqualTo [])) exitWith { TRACE_2("collision low/high",_roundAGL,_testIntersections); _roundPointIsValid = false; diff --git a/addons/common/functions/fnc_fixCollision.sqf b/addons/common/functions/fnc_fixCollision.sqf index c0cf7b93e7..3b3b16a9f9 100644 --- a/addons/common/functions/fnc_fixCollision.sqf +++ b/addons/common/functions/fnc_fixCollision.sqf @@ -19,4 +19,4 @@ if (!local _this) exitWith {}; [_this, "blockDamage", "fixCollision", true] call FUNC(statusEffect_set); // re-allow damage after 2 seconds -[{[_this, "blockDamage", "fixCollision", false] call FUNC(statusEffect_set);}, _this, 2] call EFUNC(common,waitAndExecute); +[{[_this, "blockDamage", "fixCollision", false] call FUNC(statusEffect_set);}, _this, 2] call CBA_fnc_waitAndExecute; diff --git a/addons/common/functions/fnc_fixPosition.sqf b/addons/common/functions/fnc_fixPosition.sqf index e2e2d71059..689512d925 100644 --- a/addons/common/functions/fnc_fixPosition.sqf +++ b/addons/common/functions/fnc_fixPosition.sqf @@ -16,6 +16,16 @@ // setVectorUp requires local object if (!local _this) exitWith {}; +if ((getText (configFile >> "CfgVehicles" >> (typeOf _this) >> "simulation")) == "house") then { + //Houses don't have gravity/physics, so make sure they are not floating + private _posAbove = (getPos _this) select 2; + TRACE_2("house",_this,_posAbove); + if (_posAbove > 0.1) then { + private _newPosASL = (getPosASL _this) vectorDiff [0,0,_posAbove]; + _this setPosASL _newPosASL; + }; +}; + private _position = getPos _this; // don't place the object below the ground diff --git a/addons/common/functions/fnc_getAllGear.sqf b/addons/common/functions/fnc_getAllGear.sqf index 715966b176..de6ea62dff 100644 --- a/addons/common/functions/fnc_getAllGear.sqf +++ b/addons/common/functions/fnc_getAllGear.sqf @@ -33,7 +33,11 @@ */ #include "script_component.hpp" -params ["_unit"]; +params ["_unit", ["_showDeprecated", true]]; + +if (_showDeprecated) then { + ACE_DEPRECATED("ace_common_fnc_getAllGear","3.7.0","getUnitLoadout"); +}; if (isNull _unit) exitWith {[ "", @@ -60,5 +64,5 @@ if (isNull _unit) exitWith {[ handgunWeapon _unit, handgunItems _unit, handgunMagazine _unit, assignedItems _unit, binocular _unit, - [_unit] call FUNC(binocularMagazine) + [_unit] call CBA_fnc_binocularMagazine ] diff --git a/addons/common/functions/fnc_getConfigType.sqf b/addons/common/functions/fnc_getConfigType.sqf index 1496cfa2b9..34aaa03172 100644 --- a/addons/common/functions/fnc_getConfigType.sqf +++ b/addons/common/functions/fnc_getConfigType.sqf @@ -12,12 +12,6 @@ */ #include "script_component.hpp" -params ["_item"]; +ACE_DEPRECATED("ace_common_fnc_getConfigType","3.8.0","CBA_fnc_getItemConfig"); -if (isClass (configFile >> "CfgWeapons" >> _item)) exitWith {"CfgWeapons"}; - -if (isClass (configFile >> "CfgMagazines" >> _item)) exitWith {"CfgMagazines"}; - -if (isClass (configFile >> "CfgGlasses" >> _item)) exitWith {"CfgGlasses"}; - -"" +configName (configHierarchy (_item call CBA_fnc_getItemConfig) param [1, configNull]) diff --git a/addons/common/functions/fnc_getConfigTypeObject.sqf b/addons/common/functions/fnc_getConfigTypeObject.sqf index 6186ad6bff..92a6d43a42 100644 --- a/addons/common/functions/fnc_getConfigTypeObject.sqf +++ b/addons/common/functions/fnc_getConfigTypeObject.sqf @@ -12,10 +12,6 @@ */ #include "script_component.hpp" -params ["_object"]; +ACE_DEPRECATED("ace_common_fnc_getConfigTypeObject","3.8.0","CBA_fnc_getObjectConfig"); -if (isClass (configFile >> "CfgVehicles" >> _object)) exitWith {"CfgVehicles"}; - -if (isClass (configFile >> "CfgAmmo" >> _object)) exitWith {"CfgAmmo"}; - -"" +configName (configHierarchy (_item call CBA_fnc_getObjectConfig) param [1, configNull]) diff --git a/addons/common/functions/fnc_getItemType.sqf b/addons/common/functions/fnc_getItemType.sqf index d3eb511949..eb5015e20a 100644 --- a/addons/common/functions/fnc_getItemType.sqf +++ b/addons/common/functions/fnc_getItemType.sqf @@ -15,9 +15,11 @@ params ["_item"]; -private _cfgType = [_item] call FUNC(getConfigType); +private _config = _item call CBA_fnc_getItemConfig; -if (_cfgType == "") exitWith {["", ""]}; +if (isNull _config) exitWith {["", ""]}; + +private _cfgType = configName ((configHierarchy _config) param [1, configNull]); if (_cfgType == "CfgGlasses") exitWith {["item", "glasses"]}; diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf index ee6d1e11dc..44fc204638 100644 --- a/addons/common/functions/fnc_getMGRSdata.sqf +++ b/addons/common/functions/fnc_getMGRSdata.sqf @@ -22,27 +22,81 @@ private _long = getNumber (configFile >> "CfgWorlds" >> _map >> "longitude"); private _lat = getNumber (configFile >> "CfgWorlds" >> _map >> "latitude"); private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset"); -if (_map in ["Chernarus", "Bootcamp_ACR", "Woodland_ACR", "utes"]) then { _lat = 50; _altitude = 0; }; -if (_map in ["Altis", "Stratis"]) then { _lat = 40; _altitude = 0; }; -if (_map in ["Takistan", "Zargabad", "Mountains_ACR"]) then { _lat = 35; _altitude = 2000; }; -if (_map in ["Shapur_BAF", "ProvingGrounds_PMC"]) then { _lat = 35; _altitude = 100; }; +_map = toLower _map; +if (_map in ["abbottabad"]) then { _lat = 34; _altitude = 1256; }; //Abbottabad elevation 1256m (Wikipedia) +if (_map in ["abramia"]) then { _lat = 60; _altitude = 0; }; +if (_map in ["af_kandahar_province"]) then { _lat = 42; _altitude = 0; }; +if (_map in ["altis"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["angel"]) then { _lat = 38; _altitude = 0; }; +if (_map in ["anim_helvantis_v2"]) then { _lat = 50; _altitude = 0; }; +if (_map in ["australia"]) then { _lat = -25; _altitude = 0; }; +if (_map in ["bootcamp_acr"]) then { _lat = 50; _altitude = 0; }; +if (_map in ["bornholm"]) then { _lat = 55; _altitude = 0; }; +if (_map in ["bozcaada"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["caribou"]) then { _lat = 68; _altitude = 0; }; +if (_map in ["catalina"]) then { _lat = 33; _altitude = 0; }; +if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) then { _lat = 50; _altitude = 0; }; +if (_map in ["chernobylzone", "chernobylzonea2"]) then { _lat = 51; _altitude = 0; }; +if (_map in ["clafghan"]) then { _lat = 34; _altitude = 640; }; +if (_map in ["dakrong"]) then { _lat = 17; _altitude = 0; }; //Unsung Mod +if (_map in ["desert_e"]) then { _lat = 40; _altitude = 800; }; +if (_map in ["dya"]) then { _lat = 34; _altitude = 110; }; //Diyala Iraq - default elevationOffset +if (_map in ["esseker"]) then { _lat = 43; _altitude = 2000; }; +if (_map in ["evergreen"]) then { _lat = 41; _altitude = 0; }; //Burgazada, Turkey - default elevationOffset if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; }; -if (_map in ["fata", "Abbottabad"]) then { _lat = 30; _altitude = 1000; }; -if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; }; -if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; }; -if (_map in ["Bornholm"]) then { _lat = 55; _altitude = 0; }; -if (_map in ["Imrali"]) then { _lat = 40; _altitude = 0; }; -if (_map in ["Caribou"]) then { _lat = 68; _altitude = 0; }; -if (_map in ["Namalsk"]) then { _lat = 65; _altitude = 0; }; -if (_map in ["MCN_Aliabad"]) then { _lat = 36; _altitude = 0; }; -if (_map in ["Clafghan"]) then { _lat = 34; _altitude = 640; }; -if (_map in ["Sangin", "hellskitchen"]) then { _lat = 32; _altitude = 0; }; -if (_map in ["Sara"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["fata"]) then { _lat = 33; _altitude = 1347; }; +if (_map in ["gorgona"]) then { _lat = 43; _altitude = 0; }; +if (_map in ["hellskitchen", "hellskitchens"]) then { _lat = 32; _altitude = 900; }; //Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia) +if (_map in ["hindukush"]) then { _lat = 36; _altitude = 0; }; +if (_map in ["imrali", "imralispring"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["intro"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["isladuala3"]) then { _lat = -19; _altitude = 0; }; +if (_map in ["jacobi"]) then { _lat = 34; _altitude = 2000; }; //default elevationOffset +if (_map in ["kapaulio"]) then { _lat = 0; _altitude = 0; }; +if (_map in ["kerama"]) then { _lat = 26; _altitude = 0; }; //Kerama Islands, Japan - default elevationOffset +if (_map in ["kholm"]) then { _lat = 36; _altitude = 0; }; +if (_map in ["koplic"]) then { _lat = 42; _altitude = 0; }; +if (_map in ["kunduz"]) then { _lat = 37; _altitude = 0; }; +if (_map in ["lingor", "lingor3"]) then { _lat = -4; _altitude = 0; }; +if (_map in ["lost", "lostw"]) then { _lat = 60; _altitude = 0; }; +if (_map in ["mcn_aliabad"]) then { _lat = 36; _altitude = 0; }; +if (_map in ["malvinas"]) then { _lat = -52; _altitude = 0; }; +if (_map in ["namalsk"]) then { _lat = 65; _altitude = 0; }; +if (_map in ["mef_alaska"]) then { _lat = 60; _altitude = 5; }; +if (_map in ["mountains_acr"]) then { _lat = 35; _altitude = 2000; }; +if (_map in ["napf", "napfwinter"]) then { _lat = 47; _altitude = 0; }; +if (_map in ["panthera3"]) then { _lat = 46; _altitude = 0; }; +if (_map in ["pianosa_aut"]) then { _lat = 43; _altitude = 0; }; //Pianosa, Italy - default elevationOffset +if (_map in ["pja305"]) then { _lat = 0; _altitude = 0; }; //G.O.S N'Ziwasogo +if (_map in ["pja306"]) then { _lat = 35; _altitude = 0; }; //G.O.S Kalu Khan +if (_map in ["pja307"]) then { _lat = 17; _altitude = 0; }; //F.S.F Daryah +if (_map in ["pja308"]) then { _lat = 36; _altitude = 0; }; //G.O.S Gunkizli +if (_map in ["pja310"]) then { _lat = 36; _altitude = 0; }; //G.O.S Al Rayak +if (_map in ["pja312"]) then { _lat = 16; _altitude = 0; }; //G.O.S Song Bin Tanh +if (_map in ["porquerolles"]) then { _lat = 43; _altitude = 0; }; +if (_map in ["porto"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["provinggrounds_pmc"]) then { _lat = 35; _altitude = 100; }; if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; }; -if (_map in ["Thirsk"]) then { _lat = 65; _altitude = 0; }; -if (_map in ["lingor"]) then { _lat = -4; _altitude = 0; }; -if (_map in ["Panthera3"]) then { _lat = 46; _altitude = 0; }; -if (_map in ["Kunduz"]) then { _lat = 37; _altitude = 400; }; +if (_map in ["sara", "sara_dbe1"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["saralite"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["sb3"]) then { _lat = 53; _altitude = 25; }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset +if (_map in ["shapur_baf"]) then { _lat = 35; _altitude = 100; }; +if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; }; +if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; }; +if (_map in ["stratis"]) then { _lat = 40; _altitude = 0; }; +if (_map in ["sugarlake"]) then { _lat = 29; _altitude = 0; }; +if (_map in ["takistan"]) then { _lat = 35; _altitude = 2000; }; +if (_map in ["thirsk"]) then { _lat = 65; _altitude = 0; }; +if (_map in ["tilos"]) then { _lat = 36; _altitude = 0; }; +if (_map in ["utes"]) then { _lat = 50; _altitude = 0; }; +if (_map in ["vt5"]) then { _lat = 61; _altitude = 100; }; //Vt5, Suomi Finland - default elevationOffset +if (_map in ["wake"]) then { _lat = 19; _altitude = 0; }; +if (_map in ["waziristan"]) then { _lat = 33; _altitude = 0; }; +if (_map in ["wintermap"]) then { _lat = 61; _altitude = 0; }; //Nordkvingo - default elevationOffset +if (_map in ["wintertown", "wintertowna3"]) then { _lat = 39; _altitude = 600; }; //U.S. state Kansas mean elevation 610m (Wikipedia) +if (_map in ["woodland_acr"]) then { _lat = 50; _altitude = 0; }; +if (_map in ["xcam_prototype"]) then { _lat = 35; _altitude = 0; }; +if (_map in ["zargabad"]) then { _lat = 35; _altitude = 2000; }; private _UTM = [_long,_lat] call BIS_fnc_posDegToUTM; private _easting = _UTM select 0; diff --git a/addons/common/functions/fnc_getTurretCommander.sqf b/addons/common/functions/fnc_getTurretCommander.sqf index e73795e148..3e7f09215f 100644 --- a/addons/common/functions/fnc_getTurretCommander.sqf +++ b/addons/common/functions/fnc_getTurretCommander.sqf @@ -14,19 +14,4 @@ params [["_vehicle", objNull, [objNull]]]; -private _turrets = allTurrets [_vehicle, true]; - -private _turret = []; - -{ - private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; - - _config = [_config, _x] call FUNC(getTurretConfigPath); - - if (getNumber (_config >> "primaryObserver") == 1) exitWith { - _turret = _x; - }; - false -} count _turrets; - -_turret +fullCrew [_vehicle, "commander", true] apply {_x select 3} param [0, []] // return diff --git a/addons/common/functions/fnc_getTurretCopilot.sqf b/addons/common/functions/fnc_getTurretCopilot.sqf index 6161f5c4cc..49002cc40e 100644 --- a/addons/common/functions/fnc_getTurretCopilot.sqf +++ b/addons/common/functions/fnc_getTurretCopilot.sqf @@ -14,19 +14,6 @@ params [["_vehicle", objNull, [objNull]]]; -private _turrets = allTurrets [_vehicle, true]; - -private _turret = []; - -{ - private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; - - _config = [_config, _x] call FUNC(getTurretConfigPath); - - if (getNumber (_config >> "isCopilot") == 1 && {getNumber (_config >> "primaryGunner") != 1} && {getNumber (_config >> "primaryObserver") != 1}) exitWith { - _turret = _x; - }; - false -} count _turrets; - -_turret +fullCrew [_vehicle, "turret", true] apply {_x select 3} select { + getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") == 1 +} param [0, []] // return diff --git a/addons/common/functions/fnc_getTurretGunner.sqf b/addons/common/functions/fnc_getTurretGunner.sqf index 6f59798cc6..4a26e2c03d 100644 --- a/addons/common/functions/fnc_getTurretGunner.sqf +++ b/addons/common/functions/fnc_getTurretGunner.sqf @@ -14,19 +14,4 @@ params [["_vehicle", objNull, [objNull]]]; -private _turrets = allTurrets [_vehicle, true]; - -private _turret = []; - -{ - private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; - - _config = [_config, _x] call FUNC(getTurretConfigPath); - - if (getNumber (_config >> "primaryGunner") == 1) exitWith { - _turret = _x; - }; - false -} count _turrets; - -_turret +fullCrew [_vehicle, "gunner", true] apply {_x select 3} param [0, []] // return diff --git a/addons/common/functions/fnc_getTurrets.sqf b/addons/common/functions/fnc_getTurrets.sqf index 229f3ab1f7..0479580764 100644 --- a/addons/common/functions/fnc_getTurrets.sqf +++ b/addons/common/functions/fnc_getTurrets.sqf @@ -8,12 +8,14 @@ * Return Value: * Turret Indecies * - * Public: Yes + * Public: No * * Note: It's advised to use allTurrets [_vehicle, true] instead whenever possible */ #include "script_component.hpp" +ACE_DEPRECATED("ace_common_fnc_getTurrets","3.7.0","allTurrets [_vehicle, true]"); + params ["_type"]; private _varName = format [QGVAR(CachedTurrets_%1), _type]; diff --git a/addons/common/functions/fnc_getTurretsFFV.sqf b/addons/common/functions/fnc_getTurretsFFV.sqf index 8c471824cf..5c36e20197 100644 --- a/addons/common/functions/fnc_getTurretsFFV.sqf +++ b/addons/common/functions/fnc_getTurretsFFV.sqf @@ -14,19 +14,4 @@ params [["_vehicle", objNull, [objNull]]]; -private _turrets = allTurrets [_vehicle, true]; - -private _turret = []; - -{ - private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; - - _config = [_config, _x] call FUNC(getTurretConfigPath); - - if (getNumber (_config >> "isPersonTurret") == 1) then { - _turret pushBack _x; - }; - false -} count _turrets; - -_turret +fullCrew [_vehicle, "turret", true] select {_x select 4} apply {_x select 3} // return diff --git a/addons/common/functions/fnc_getTurretsOther.sqf b/addons/common/functions/fnc_getTurretsOther.sqf index 408a5529d5..ef2a1278dc 100644 --- a/addons/common/functions/fnc_getTurretsOther.sqf +++ b/addons/common/functions/fnc_getTurretsOther.sqf @@ -14,24 +14,6 @@ params [["_vehicle", objNull, [objNull]]]; -private _turrets = allTurrets [_vehicle, true]; - -private _turret = []; - -{ - private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; - - _config = [_config, _x] call FUNC(getTurretConfigPath); - - if ( - getNumber (_config >> "isCopilot") != 1 - && {getNumber (_config >> "primaryGunner") != 1} - && {getNumber (_config >> "primaryObserver") != 1} - && {getNumber (_config >> "isPersonTurret") != 1} - ) then { - _turret pushBack _x; - }; - false -} count _turrets; - -_turret +fullCrew [_vehicle, "turret", true] select {!(_x select 4)} apply {_x select 3} select { + getNumber ([_vehicle, _x] call CBA_fnc_getTurret >> "isCopilot") != 1 +} // return diff --git a/addons/common/functions/fnc_getWeaponMuzzles.sqf b/addons/common/functions/fnc_getWeaponMuzzles.sqf index d75a01f2e3..e252d879f9 100644 --- a/addons/common/functions/fnc_getWeaponMuzzles.sqf +++ b/addons/common/functions/fnc_getWeaponMuzzles.sqf @@ -18,7 +18,7 @@ private _muzzles = getArray (configFile >> "CfgWeapons" >> _weapon >> "muzzles") { if (_x == "this") then { - _muzzles set [_forEachIndex, _weapon]; + _muzzles set [_forEachIndex, configName (configFile >> "CfgWeapons" >> _weapon)]; }; } forEach _muzzles; diff --git a/addons/common/functions/fnc_getWeaponState.sqf b/addons/common/functions/fnc_getWeaponState.sqf index e7b7bb80ec..73e5897236 100644 --- a/addons/common/functions/fnc_getWeaponState.sqf +++ b/addons/common/functions/fnc_getWeaponState.sqf @@ -4,7 +4,7 @@ * * Arguments: * 0: unit - * 1: weapon + * 1: weapon (optional, default: units current weapon) * * Return Value: * 0: Attachements @@ -16,21 +16,19 @@ */ #include "script_component.hpp" -params ["_unit", "_weapon"]; +params [["_unit", objNull, [objNull]], ["_weapon", nil, [""]]]; + +if (isNil "_weapon") then { + _weapon = currentWeapon _unit; +}; + +private _attachments = [_unit weaponAccessories _weapon] param [0, ["","","",""]]; private _muzzles = _weapon call FUNC(getWeaponMuzzles); -private _weaponInfo = [["","","",""], primaryWeaponItems _unit, secondaryWeaponItems _unit, handgunItems _unit] select ((["", primaryWeapon _unit, secondaryWeapon _unit, handgunWeapon _unit] find _weapon) max 0); - // get loaded magazines and ammo -private _magazines = []; -private _ammo = []; - -{ - _magazines pushBack ""; - _ammo pushBack 0; - false -} count _muzzles; +private _magazines = _muzzles apply {""}; +private _ammo = _muzzles apply {0}; { if (_x select 2) then { @@ -44,6 +42,4 @@ private _ammo = []; false } count magazinesAmmoFull _unit; -_weaponInfo append [_muzzles, _magazines, _ammo]; - -_weaponInfo +[_attachments, _muzzles, _magazines, _ammo]; diff --git a/addons/common/functions/fnc_handleEngine.sqf b/addons/common/functions/fnc_handleEngine.sqf new file mode 100644 index 0000000000..829ad5bb49 --- /dev/null +++ b/addons/common/functions/fnc_handleEngine.sqf @@ -0,0 +1,19 @@ +/* + * Author: BaerMitUmlaut + * Blocks turning on the vehicles engine if set by the status effect handler. + * + * Arguments: + * 0: Vehicle + * 1: Engine state + * + * Return Value: + * None + * + * Public: No + */ +#include "script_component.hpp" +params ["_vehicle", "_engineOn"]; + +if (local _vehicle && {_engineOn} && {_vehicle getVariable [QGVAR(blockEngine), false]}) then { + _vehicle engineOn false; +}; diff --git a/addons/common/functions/fnc_handleScrollWheel.sqf b/addons/common/functions/fnc_handleScrollWheel.sqf index c0b88f9ed7..037b7b640b 100644 --- a/addons/common/functions/fnc_handleScrollWheel.sqf +++ b/addons/common/functions/fnc_handleScrollWheel.sqf @@ -12,11 +12,6 @@ */ #include "script_component.hpp" -// prevents a bug that causes the MouseZChanged to trigger N-times, where N is the number of times you consecutively pressed "Restart" instead of "Preview" in the editor -if (GVAR(ScrollWheelFrame) == diag_frameno) exitWith {}; - -GVAR(ScrollWheelFrame) = diag_frameno; - { [_this select 1] call _x; false diff --git a/addons/common/functions/fnc_hashHasKey.sqf b/addons/common/functions/fnc_hashHasKey.sqf index b2978f9cc4..97998c1298 100644 --- a/addons/common/functions/fnc_hashHasKey.sqf +++ b/addons/common/functions/fnc_hashHasKey.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp" -// diag_log text format["%1 HASH HAS KEY: %2", ACE_diagTime, _this]; +// diag_log text format["%1 HASH HAS KEY: %2", diag_tickTime, _this]; params ["_hash", "_key"]; diff --git a/addons/common/functions/fnc_hashSet.sqf b/addons/common/functions/fnc_hashSet.sqf index 10e2881c10..0890578857 100644 --- a/addons/common/functions/fnc_hashSet.sqf +++ b/addons/common/functions/fnc_hashSet.sqf @@ -12,7 +12,7 @@ */ #include "script_component.hpp" -// diag_log text format["%1 HASH SET: %2", ACE_diagTime, _this]; +// diag_log text format["%1 HASH SET: %2", diag_tickTime, _this]; params ["_hash", "_key", "_val"]; diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf index 3071ffbd47..6c728134d1 100644 --- a/addons/common/functions/fnc_loadPerson.sqf +++ b/addons/common/functions/fnc_loadPerson.sqf @@ -21,33 +21,18 @@ private _vehicle = objNull; if (!([_caller, _unit, ["isNotDragging", "isNotCarrying"]] call FUNC(canInteractWith)) || {_caller == _unit}) exitWith {_vehicle}; -private _loadcar = nearestObject [_unit, "Car"]; +private _nearVehicles = nearestObjects [_unit, ["Car", "Air", "Tank", "Ship_F"], 10]; -if (_unit distance _loadcar <= 10) then { - _vehicle = _loadcar; -} else { - private _loadair = nearestObject [_unit, "Air"]; - - if (_unit distance _loadair <= 10) then { - _vehicle = _loadair; - } else { - private _loadtank = nearestObject [_unit, "Tank"]; - - if (_unit distance _loadtank <= 10) then { - _vehicle = _loadtank; - } else { - private _loadboat = nearestObject [_unit, "Ship_F"]; - - if (_unit distance _loadboat <= 10) then { - _vehicle = _loadboat; - }; - }; +{ + TRACE_1("",_x); + if ((_x emptyPositions "cargo" > 0) || {_x emptyPositions "gunner" > 0}) exitWith { + _vehicle = _x; }; -}; +} forEach _nearVehicles; if (!isNull _vehicle) then { [_unit, true, GROUP_SWITCH_ID, side group _caller] call FUNC(switchToGroupSide); - [[_unit, _vehicle, _caller], QFUNC(loadPersonLocal), _unit, false] call FUNC(execRemoteFnc); + ["loadPersonEvent", _unit, [_unit, _vehicle, _caller]] call FUNC(objectEvent); }; _vehicle diff --git a/addons/common/functions/fnc_onAnswerRequest.sqf b/addons/common/functions/fnc_onAnswerRequest.sqf index d88969b059..e462a4bbf8 100644 --- a/addons/common/functions/fnc_onAnswerRequest.sqf +++ b/addons/common/functions/fnc_onAnswerRequest.sqf @@ -20,7 +20,7 @@ if (!isNil "_info") then { _info params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"]; private _replyParams = [_info, _accepted]; - [_replyParams, QFUNC(requestCallback), _caller, false] call FUNC(execRemoteFnc); + [QGVAR(requestCallback), _caller, _replyParams] call FUNC(objectEvent); _unit setVariable [_id, nil]; }; diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index e842590f35..d8503f5223 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -34,7 +34,7 @@ createDialog QGVAR(ProgressBar_Dialog); //Adjust position based on user setting: private _ctrlPos = ctrlPosition (uiNamespace getVariable QGVAR(ctrlProgressBarTitle)); -_ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))]; +_ctrlPos set [1, ((0 + 29 * GVAR(settingProgressBarLocation)) * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))]; (uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlSetPosition _ctrlPos; (uiNamespace getVariable QGVAR(ctrlProgressBG)) ctrlCommit 0; @@ -46,7 +46,7 @@ _ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW / [{ (_this select 0) params ["_args", "_onFinish", "_onFail", "_condition", "_player", "_startTime", "_totalTime", "_exceptions"]; - private _elapsedTime = ACE_time - _startTime; + private _elapsedTime = CBA_missionTime - _startTime; private _errorCode = -1; // this does not check: target fell unconscious, target died, target moved inside vehicle / left vehicle, target moved outside of players range, target moves at all. @@ -97,4 +97,4 @@ _ctrlPos set [1, ((0 + 29 * GVAR(SettingProgressBarLocation)) * ((((safezoneW / //Update Progress Bar (ratio of elepased:total) (uiNamespace getVariable QGVAR(ctrlProgressBar)) progressSetPosition (_elapsedTime / _totalTime); }; -}, 0, [_args, _onFinish, _onFail, _condition, _player, ACE_time, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler; +}, 0, [_args, _onFinish, _onFail, _condition, _player, CBA_missionTime, _totalTime, _exceptions]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/common/functions/fnc_readSettingFromModule.sqf b/addons/common/functions/fnc_readSettingFromModule.sqf index f7cb361c1b..3e2a5d862e 100644 --- a/addons/common/functions/fnc_readSettingFromModule.sqf +++ b/addons/common/functions/fnc_readSettingFromModule.sqf @@ -24,5 +24,15 @@ if (isNil {_logic getVariable _moduleVariable}) exitWith { ACE_LOGWARNING_2("Warning in %1 module: %2 setting is missing. Probably an obsolete version of the module is used in the mission.",typeOf _logic,_moduleVariable); }; +private _value = _logic getVariable _moduleVariable; +if (_value isEqualTo -1) then { + //3den missions will save modules with value = 0 as -1 + //If the setting has a "values" array, we should be able to assume that -1 is not a valid number as it would not be a valid index for the array + if (isArray (configFile >> "ACE_Settings" >> _settingName >> "values")) then { + ACE_LOGWARNING_2("Module For Setting [%1] is saved as (-1), switching to (0) - missionVersion [%2]",_settingName,missionVersion); + _value = 0; + }; +}; + // Set the setting globally and force it -[_settingName, _logic getVariable _moduleVariable, true, true] call FUNC(setSetting); +[_settingName, _value, true, true] call FUNC(setSetting); diff --git a/addons/common/functions/fnc_receiveRequest.sqf b/addons/common/functions/fnc_receiveRequest.sqf index 75f684f5dd..1bb48428df 100644 --- a/addons/common/functions/fnc_receiveRequest.sqf +++ b/addons/common/functions/fnc_receiveRequest.sqf @@ -45,7 +45,7 @@ GVAR(RECIEVE_REQUEST_ADD_ACTION_DECLINE) = _target addAction ["Decline", compile GVAR(RECIEVE_REQUEST_ID_KEY_BINDING) = _requestID; -GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn { // @todo +GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [CBA_missionTime, _target, _requestID] spawn { // @todo params ["_time", "_target", "_requestID"]; _time = _time + 40; @@ -55,7 +55,7 @@ GVAR(RECIEVE_REQUEST_TIME_OUT_SCRIPT) = [ACE_time, _target, _requestID] spawn { waitUntil { _id = _target getVariable _requestID; - (ACE_time > _time || isNil "_id") + (CBA_missionTime > _time || isNil "_id") }; _target setVariable [_requestID, nil]; diff --git a/addons/common/functions/fnc_removeBinocularMagazine.sqf b/addons/common/functions/fnc_removeBinocularMagazine.sqf index 487295ccc3..4f1e0fcdd6 100644 --- a/addons/common/functions/fnc_removeBinocularMagazine.sqf +++ b/addons/common/functions/fnc_removeBinocularMagazine.sqf @@ -15,13 +15,6 @@ */ #include "script_component.hpp" -params [["_unit", objNull, [objNull]]]; +ACE_DEPRECATED("ace_common_fnc_removeBinocularMagazine","3.8.0","CBA_fnc_removeBinocularMagazine"); -private _binocular = binocular _unit; -private _selectBinocular = currentWeapon _unit == _binocular; - -_unit addWeapon _binocular; - -if (_selectBinocular) then { - _unit selectWeapon _binocular; -}; +_this call CBA_fnc_removeBinocularMagazine diff --git a/addons/common/functions/fnc_removeSyncedEventHandler.sqf b/addons/common/functions/fnc_removeSyncedEventHandler.sqf index 126bf0b70f..23803acdd1 100644 --- a/addons/common/functions/fnc_removeSyncedEventHandler.sqf +++ b/addons/common/functions/fnc_removeSyncedEventHandler.sqf @@ -15,7 +15,7 @@ params ["_name"]; if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith { - ACE_LOGERROR("Synced event key not found."); + ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name); false }; diff --git a/addons/common/functions/fnc_sendRequest.sqf b/addons/common/functions/fnc_sendRequest.sqf index c8d2ef7e2b..6df60cf24d 100644 --- a/addons/common/functions/fnc_sendRequest.sqf +++ b/addons/common/functions/fnc_sendRequest.sqf @@ -20,7 +20,7 @@ params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"]; if (isPlayer _target) then { // Pass request on to target locality for player accept/decline. - [[_caller, _target, _requestID, _requestMessage, _callBack], QFUNC(receiveRequest), _target, false] call FUNC(execRemoteFnc); + [QGVAR(receiveRequest), _target, [_caller, _target, _requestID, _requestMessage, _callBack]] call FUNC(objectEvent); } else { // accept it, since it's an AI. [_caller, _target, true] call compile _callBack; diff --git a/addons/common/functions/fnc_serverLog.sqf b/addons/common/functions/fnc_serverLog.sqf index 2525f81c95..ca4ba69f5d 100644 --- a/addons/common/functions/fnc_serverLog.sqf +++ b/addons/common/functions/fnc_serverLog.sqf @@ -20,5 +20,5 @@ params [["_msg", "", [""]]]; if (isServer) then { diag_log text _msg; } else { - [_this, QFUNC(serverLog), 1] call FUNC(execRemoteFnc); + [QGVAR(serverLog), _this] call FUNC(serverEvent); }; diff --git a/addons/common/functions/fnc_setAllGear.sqf b/addons/common/functions/fnc_setAllGear.sqf index 152eb4fd60..6334991796 100644 --- a/addons/common/functions/fnc_setAllGear.sqf +++ b/addons/common/functions/fnc_setAllGear.sqf @@ -18,6 +18,8 @@ */ #include "script_component.hpp" +ACE_DEPRECATED("ace_common_fnc_setAllGear","3.7.0","setUnitLoadout"); + params ["_unit", "_allGear", ["_clearAttachments", false], ["_clearBackpack", false]]; if (!local _unit) exitWith { diff --git a/addons/common/functions/fnc_setHearingCapability.sqf b/addons/common/functions/fnc_setHearingCapability.sqf index 7bd375a58b..5b1e7a5a3a 100644 --- a/addons/common/functions/fnc_setHearingCapability.sqf +++ b/addons/common/functions/fnc_setHearingCapability.sqf @@ -5,48 +5,44 @@ * Arguments: * 0: id * 1: settings - * 2: add (default: true) + * 2: add [true] OR remove [false] (default: true) * * Return Value: * None * - * Public: Yes + * Example: + * ["earwax", 0.5, true] call ace_common_fnc_setHearingCapability * - * Note: uses player + * Public: Yes */ #include "script_component.hpp" -params ["_id", "_settings", ["_add", true]]; - -private _map = missionNamespace getVariable [QGVAR(setHearingCapabilityMap),[]]; +params ["_id", "_setting", ["_add", true]]; private _exists = false; - -{ - if (_id == _x select 0) exitWith { - _exists = true; - if (_add) then { - _x set [1, _settings]; - } else { - _map set [_forEachIndex, 0]; - _map = _map - [0]; - }; - }; -} forEach _map; - -if (!_exists && _add) then { - _map pushBack [_id, _settings]; -}; - -missionNamespace setVariable [QGVAR(setHearingCapabilityMap), _map]; - -// find lowest volume private _lowestVolume = 1; -{ - _lowestVolume = (_x select 1) min _lowestVolume; - false -} count _map; +GVAR(setHearingCapabilityMap) = GVAR(setHearingCapabilityMap) select { + _x params ["_xID", "_xSetting"]; + if (_id == _xID) then { + _exists = true; + if (_add) then { + _x set [1, _setting]; + _lowestVolume = _lowestVolume min _setting; + true + } else { + false + }; + } else { + _lowestVolume = _lowestVolume min _xSetting; + true + }; +}; + +if (!_exists && _add) then { + _lowestVolume = _lowestVolume min _setting; + GVAR(setHearingCapabilityMap) pushBack [_id, _setting]; +}; // in game sounds 0 fadeSound _lowestVolume; @@ -54,5 +50,5 @@ private _lowestVolume = 1; 0 fadeMusic _lowestVolume; // Set Radio mod variables. -player setVariable ["tf_globalVolume", _lowestVolume]; +ACE_player setVariable ["tf_globalVolume", _lowestVolume]; if (!isNil "acre_api_fnc_setGlobalVolume") then { [_lowestVolume^0.33] call acre_api_fnc_setGlobalVolume; }; diff --git a/addons/common/functions/fnc_setName.sqf b/addons/common/functions/fnc_setName.sqf index b9ecbdc3a6..1b2b515ec2 100644 --- a/addons/common/functions/fnc_setName.sqf +++ b/addons/common/functions/fnc_setName.sqf @@ -19,13 +19,7 @@ if (isNull _unit || {!alive _unit}) exitWith {}; if (_unit isKindOf "CAManBase") then { private _sanitizedName = [name _unit, true] call FUNC(sanitizeString); private _rawName = [name _unit, false] call FUNC(sanitizeString); - - //Debug Testing Code (with html tags): - // private _sanitizedName = ["Name", true] call FUNC(sanitizeString); - // private _rawName = ["Name", false] call FUNC(sanitizeString); - - //if (_name != _unit getVariable ["ACE_Name", ""]) then { + _unit setVariable ["ACE_Name", _sanitizedName, true]; _unit setVariable ["ACE_NameRaw", _rawName, true]; - //}; }; diff --git a/addons/common/functions/fnc_setVariablePublic.sqf b/addons/common/functions/fnc_setVariablePublic.sqf index bf6b35a862..1cfba0a422 100644 --- a/addons/common/functions/fnc_setVariablePublic.sqf +++ b/addons/common/functions/fnc_setVariablePublic.sqf @@ -50,4 +50,4 @@ TRACE_2("Starting Embargo", _varName, _delay); if (!(_value isEqualTo _curValue)) then { _this call FUNC(setVariablePublic); }; -}, _this, _delay] call FUNC(waitAndExecute); +}, _this, _delay] call CBA_fnc_waitAndExecute; diff --git a/addons/common/functions/fnc_syncedEvent.sqf b/addons/common/functions/fnc_syncedEvent.sqf index 4ed8107330..c752d1eba2 100644 --- a/addons/common/functions/fnc_syncedEvent.sqf +++ b/addons/common/functions/fnc_syncedEvent.sqf @@ -17,7 +17,7 @@ params ["_name", "_args", ["_ttl", 0]]; if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith { - ACE_LOGERROR("Synced event key not found."); + ACE_LOGERROR_1("Synced event key [%1] not found (syncedEvent).", _name); false }; diff --git a/addons/common/functions/fnc_syncedEventPFH.sqf b/addons/common/functions/fnc_syncedEventPFH.sqf index 62df8f10a7..d5a2623cd8 100644 --- a/addons/common/functions/fnc_syncedEventPFH.sqf +++ b/addons/common/functions/fnc_syncedEventPFH.sqf @@ -34,7 +34,7 @@ if (!isServer) exitWith {false}; if (_globalEventTTL isEqualType {}) then { _ttlReturn = [_eventTime, _eventEntry] call _globalEventTTL; } else { - _ttlReturn = call {_globalEventTTL < 1 || {ACE_diagTime < (_eventEntry select 0) + _globalEventTTL}}; + _ttlReturn = call {_globalEventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _globalEventTTL}}; }; if (_ttlReturn) then { @@ -44,7 +44,7 @@ if (!isServer) exitWith {false}; if (_eventTTL isEqualType {}) then { _ttlReturn = [_eventTime, _eventEntry] call _eventTTL; } else { - _ttlReturn = call {_eventTTL < 1 || {ACE_diagTime < _time + _eventTTL}}; + _ttlReturn = call {_eventTTL < 1 || {diag_tickTime < _time + _eventTTL}}; }; }; diff --git a/addons/common/functions/fnc_throttledPublicVariable.sqf b/addons/common/functions/fnc_throttledPublicVariable.sqf index 67cfc50f9a..3aaa3c8f47 100644 --- a/addons/common/functions/fnc_throttledPublicVariable.sqf +++ b/addons/common/functions/fnc_throttledPublicVariable.sqf @@ -25,7 +25,7 @@ if (isNil QGVAR(publishSchedId)) then { GVAR(publishNextTime) = 1e7; GVAR(publishSchedId) = [{ - if (ACE_diagTime > GVAR(publishNextTime)) then { + if (diag_tickTime > GVAR(publishNextTime)) then { { _x params [_unit, _varName]; _unit setVariable [_varName, _unit getVariable _varName, true]; @@ -41,8 +41,8 @@ if (isNil QGVAR(publishSchedId)) then { // If the variable is not on the list if (GVAR(publishVarNames) find [_unit, _varName] == -1) exitWith { GVAR(publishVarNames) pushBack [_unit, _varName]; - GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay); + GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay); }; // If the variable is on the list -GVAR(publishNextTime) = GVAR(publishNextTime) min (ACE_diagTime + _maxDelay); +GVAR(publishNextTime) = GVAR(publishNextTime) min (diag_tickTime + _maxDelay); diff --git a/addons/common/functions/fnc_timePFH.sqf b/addons/common/functions/fnc_timePFH.sqf deleted file mode 100644 index e5366d331e..0000000000 --- a/addons/common/functions/fnc_timePFH.sqf +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Author: jaynus - * PFEH to set all Ace Time Variables - * - * Arguments: - * None - * - * Return Value: - * None - * - * Public: No - */ -#include "script_component.hpp" - -BEGIN_COUNTER(timePFH); - -private _lastTickTime = ACE_diagTime; -private _lastGameTime = ACE_gameTime; - -ACE_gameTime = time; -ACE_diagTime = diag_tickTime; - -private _delta = ACE_diagTime - _lastTickTime; - -if (ACE_gameTime <= _lastGameTime) then { - TRACE_1("paused",_delta); - ACE_paused = true; - // Game is paused or not running - ACE_pausedTime = ACE_pausedTime + _delta; - ACE_virtualPausedTime = ACE_pausedTime + (_delta * accTime); -} else { - TRACE_1("live",_delta); - ACE_paused = false; - // Time is updating - ACE_realTime = ACE_realTime + _delta; - ACE_virtualTime = ACE_virtualTime + (_delta * accTime); - ACE_time = ACE_virtualTime; -}; - -END_COUNTER(timePFH); diff --git a/addons/common/functions/fnc_unloadPerson.sqf b/addons/common/functions/fnc_unloadPerson.sqf index 72816f2c3f..b4c57457af 100644 --- a/addons/common/functions/fnc_unloadPerson.sqf +++ b/addons/common/functions/fnc_unloadPerson.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson)) +#define GROUP_SWITCH_ID QFUNC(loadPerson) params ["_unit"]; diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index ff5813434a..741accb689 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -14,7 +14,7 @@ */ #include "script_component.hpp" -#define GROUP_SWITCH_ID QUOTE(FUNC(loadPerson)) +#define GROUP_SWITCH_ID QFUNC(loadPerson) params ["_unit", "_vehicle", ["_unloader", objNull]]; TRACE_3("params",_unit,_vehicle,_unloader); @@ -58,10 +58,10 @@ _unit action ["Eject", vehicle _unit]; if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then { [_unit, _anim, 2, true] call FUNC(doAnimation); }; - }, [_unit, _anim], 0.5] call FUNC(waitAndExecute); + }, [_unit, _anim], 0.5] call CBA_fnc_waitAndExecute; }; }; -}, [_unit, _emptyPos], 0.5] call FUNC(waitAndExecute); +}, [_unit, _emptyPos], 0.5] call CBA_fnc_waitAndExecute; [_unit, false, GROUP_SWITCH_ID, side group _unit] call FUNC(switchToGroupSide); diff --git a/addons/common/functions/fnc_waitAndExecute.sqf b/addons/common/functions/fnc_waitAndExecute.sqf index 6f282ba656..1ac0d3f54d 100644 --- a/addons/common/functions/fnc_waitAndExecute.sqf +++ b/addons/common/functions/fnc_waitAndExecute.sqf @@ -17,7 +17,6 @@ */ #include "script_component.hpp" -params ["_func", "_params", "_delay"]; +ACE_DEPRECATED("ace_common_fnc_waitAndExecute","3.8.0","CBA_fnc_waitAndExecute"); -GVAR(waitAndExecArray) pushBack [ACE_time + _delay, _func, _params]; -GVAR(waitAndExecArray) sort true; +_this call CBA_fnc_waitAndExecute; diff --git a/addons/common/functions/fnc_waitUntilAndExecute.sqf b/addons/common/functions/fnc_waitUntilAndExecute.sqf index bbc6c540fe..76f3d22ce1 100644 --- a/addons/common/functions/fnc_waitUntilAndExecute.sqf +++ b/addons/common/functions/fnc_waitUntilAndExecute.sqf @@ -17,7 +17,8 @@ */ #include "script_component.hpp" -TRACE_1("Adding",_this); +ACE_DEPRECATED("ace_common_fnc_waitUntilAndExecute","3.8.0","CBA_fnc_waitUntilAndExecute"); + +_this call CBA_fnc_waitUntilAndExecute; -GVAR(waitUntilAndExecArray) pushBack _this; nil diff --git a/addons/common/init_handleModifierKey.sqf b/addons/common/init_handleModifierKey.sqf index dd07db621c..7fe2be6476 100644 --- a/addons/common/init_handleModifierKey.sqf +++ b/addons/common/init_handleModifierKey.sqf @@ -12,9 +12,17 @@ */ #include "script_component.hpp" -disableSerialization; +_this spawn {// + waitUntil {!isNull findDisplay 46};// + sleep 2;// -params ["_display"]; + disableSerialization; -_display displayAddEventHandler ["KeyDown", FUNC(handleModifierKey)]; -_display displayAddEventHandler ["KeyUp", FUNC(handleModifierKeyUp)]; + params ["_display"]; + + _display displayAddEventHandler ["KeyDown", {_this call FUNC(handleModifierKey)}]; + _display displayAddEventHandler ["KeyUp", {_this call FUNC(handleModifierKeyUp)}]; +};// + +//@todo, remove all lines with comments after CBA update, events rewrite branch +// note 2, will break in save games after ~ 10 seconds thanks to CBA, fixed with above diff --git a/addons/common/init_versionTooltip.sqf b/addons/common/init_versionTooltip.sqf index 7aef3f4786..ce0d005a14 100644 --- a/addons/common/init_versionTooltip.sqf +++ b/addons/common/init_versionTooltip.sqf @@ -30,7 +30,7 @@ _display setVariable [QGVAR(versionTooltip), [_display] spawn { _ctrl ctrlCommit 0; // pls ignore - _ctrl ctrlSetText QUOTE(PATHTOF(data\icon_banana_ca.paa)); + _ctrl ctrlSetText QPATHTOF(data\icon_banana_ca.paa); // animate with random speed _position set [1, 1 - safezoneY]; diff --git a/addons/common/scripts/checkVersionNumber.sqf b/addons/common/scripts/checkVersionNumber.sqf index 07bd443a06..7b1fbca291 100644 --- a/addons/common/scripts/checkVersionNumber.sqf +++ b/addons/common/scripts/checkVersionNumber.sqf @@ -100,7 +100,7 @@ if (!isServer) then { _error = _error call _fnc_cutComma; diag_log text _error; - [_error, "{systemChat _this}"] call FUNC(execRemoteFnc); + [QGVAR(systemChatGlobal), _error] call FUNC(globalEvent); }; _missingAddonServer = false; @@ -117,7 +117,7 @@ if (!isServer) then { _error = _error call _fnc_cutComma; diag_log text _error; - [_error, "{systemChat _this}"] call FUNC(execRemoteFnc); + [QGVAR(systemChatGlobal), _error] call FUNC(globalEvent); }; _oldVersionClient = false; @@ -134,7 +134,7 @@ if (!isServer) then { _error = _error call _fnc_cutComma; diag_log text _error; - [_error, "{systemChat _this}"] call FUNC(execRemoteFnc); + [QGVAR(systemChatGlobal), _error] call FUNC(globalEvent); }; _oldVersionServer = false; @@ -151,7 +151,7 @@ if (!isServer) then { _error = _error call _fnc_cutComma; diag_log text _error; - [_error, "{systemChat _this}"] call FUNC(execRemoteFnc); + [QGVAR(systemChatGlobal), _error] call FUNC(globalEvent); }; ACE_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer]; diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index 9ff98bf95f..7521b65982 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -512,7 +512,7 @@ Was soll mit Leuten geschehen, die nicht die richtigen PBO-Dateien geladen haben? Co udělat s lidmi, co nemají správné addony? O que fazer com pessoas que não tem os PBOs corretos? - Que faire avec les personnes n'ayant pas les bon PBO ? + Que faire avec les personnes n'ayant pas les bons PBO ? Mi legyen azokkal a személyekkel, akiknek nincsenek meg a helyes PBO-k? Что делать с игроками с неправильными аддонами? Cosa fare con giocatori che non hanno i PBO corretti? @@ -596,7 +596,7 @@ Welche Addons werden dennoch erlaubt? Jaké addony jsou povoleny? Quais addons são permitidos de qualquer maneira? - Quels addons sont tolérés + Quels addons sont tolérés ? Milyen bővítmények vannak feltétlenül engedélyezve? Какие аддоны дополнительно разрешены? Quali addon sono permessi in ogni caso? @@ -802,6 +802,7 @@ Non c'è spazio per scaricare No hay espacio para descargar. Pas de place pour décharger + Nedostatek místa k vyložení Sem espaço para descarregar diff --git a/addons/concertina_wire/CfgVehicles.hpp b/addons/concertina_wire/CfgVehicles.hpp index 2a0b8cead2..d7f5d0d82a 100644 --- a/addons/concertina_wire/CfgVehicles.hpp +++ b/addons/concertina_wire/CfgVehicles.hpp @@ -1,14 +1,16 @@ +class CBA_Extended_EventHandlers; + class CfgVehicles { class Fence; - class ThingX; - class NonStrategic; - class ACE_ConcertinaWireNoGeo: Fence { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + scope = 1; displayName = ""; - model = PATHTOF(data\ACE_ConcertinaWireNoGeo.p3d); + model = QPATHTOF(data\ACE_ConcertinaWireNoGeo.p3d); destrType = "DestructTent"; accuracy = 0.3; mapSize = 2.8; @@ -73,7 +75,7 @@ class CfgVehicles { class ACE_ConcertinaWire: ACE_ConcertinaWireNoGeo { scope = 2; displayName = $STR_ACE_CONCERTINA_WIRE; - model = PATHTOF(data\ACE_ConcertinaWire.p3d); + model = QPATHTOF(data\ACE_ConcertinaWire.p3d); EGVAR(logistics_wirecutter,isFence) = 1; class ACE_Actions { class ACE_MainActions { @@ -84,21 +86,26 @@ class CfgVehicles { selection = ""; displayName = "$STR_ACE_UNROLLWIRE"; distance = 5; - condition = "true"; + condition = "alive _target"; statement = QUOTE([ARR_2(_target,_player)] call FUNC(dismount)); showDisabled = 0; exceptions[] = {}; priority = 5; - icon = PATHTOF(UI\icon_sandbag_ca.paa); + icon = QPATHTOF(UI\icon_sandbag_ca.paa); }; }; }; }; + + class ThingX; class ACE_ConcertinaWireCoil: ThingX { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + scope = 2; displayName = $STR_ACE_CONCERTINA_WIRECOIL; - model = PATHTOF(data\ACE_ConcertinaWireCoil.p3d); + model = QPATHTOF(data\ACE_ConcertinaWireCoil.p3d); mapsize = 0.5; animated = 0; nameSound = "fence"; @@ -112,7 +119,7 @@ class CfgVehicles { accuracy = 1000; autocenter = 0; EGVAR(dragging,canDrag) = 1; - EGVAR(dragging,dragPosition[]) = {0,0.5,0.5}; + EGVAR(dragging,dragPosition)[] = {0,0.5,0.5}; EGVAR(dragging,dragDirection) = 0; EGVAR(cargo,size) = 1; EGVAR(cargo,canLoad) = 1; @@ -127,17 +134,20 @@ class CfgVehicles { distance = 4; condition = "true"; //wait a frame to handle "Do When releasing action menu key" option: - statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call EFUNC(common,execNextFrame)); + statement = QUOTE([ARR_2({_this call FUNC(deploy)}, [ARR_2(_target,_player)])] call CBA_fnc_execNextFrame); showDisabled = 0; exceptions[] = {}; priority = 5; - icon = PATHTOF(UI\icon_sandbag_ca.paa); + icon = QPATHTOF(UI\icon_sandbag_ca.paa); }; }; }; }; + class NonStrategic; class Land_Razorwire_F: NonStrategic { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; }; }; diff --git a/addons/concertina_wire/config.cpp b/addons/concertina_wire/config.cpp index 06b7bf5d86..5333c83bb5 100644 --- a/addons/concertina_wire/config.cpp +++ b/addons/concertina_wire/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_apl", "ace_interaction"}; - author[] = {"Rocko", "Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Rocko", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf index 6e8ae8f4f5..50429c054b 100644 --- a/addons/concertina_wire/functions/fnc_dismount.sqf +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -18,7 +18,7 @@ if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith { [{ _this call FUNC(dismount); - }, _this] call EFUNC(common,execNextFrame); + }, _this] call CBA_fnc_execNextFrame; }; params ["_wire", "_unit"]; diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf index ac59798d10..1af3f93151 100644 --- a/addons/concertina_wire/functions/fnc_handleKilled.sqf +++ b/addons/concertina_wire/functions/fnc_handleKilled.sqf @@ -14,13 +14,17 @@ */ #include "script_component.hpp" params ["_wire", "_killer"]; +TRACE_2("params",_wire,_killer); private ["_distance", "_vehicle"]; if (isNull _killer) then { _killer = _wire getVariable ["ace_concertina_wire_lastDamager", objNull]; if (isNull _killer) then { - _killer = nearestObject [_wire, "car"]; + private _midPoint = ((_wire selectionPosition "start") vectorAdd (_wire selectionPosition "deploy")) vectorMultiply 0.5; + { + if ((vectorMagnitude velocity _x) > 0) exitWith {_killer = _x}; + } forEach (nearestObjects [(_wire modelToWorld _midPoint), ["Car"], 8]); }; }; if (isNull _killer || {_killer == _wire} || {_killer == gunner (vehicle _killer)}) exitWith {}; diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf index dffa15b609..0bca28c3cf 100644 --- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -114,7 +114,7 @@ if (_mode == 1) then { _vDir = getDir _vehicle; _vehicle setPosASL (_vPos vectorAdd [-0.35 * sin(_vDir), -0.35 * cos(_vDir), 0]); // TODO: Needs to be placed in safe distance to wire, so we do not constantly re-spawn new wires - }, [_vehicle, _wire], 0.1] call EFUNC(common,waitAndExecute); + }, [_vehicle, _wire], 0.1] call CBA_fnc_waitAndExecute; }; //TODO: Create broken geoless wire (two version) diff --git a/addons/dagr/CfgVehicles.hpp b/addons/dagr/CfgVehicles.hpp index 7f0a7f6cff..89bfd8af4e 100644 --- a/addons/dagr/CfgVehicles.hpp +++ b/addons/dagr/CfgVehicles.hpp @@ -9,7 +9,7 @@ class CfgVehicles { statement = QUOTE(call FUNC(menuInit)); showDisabled = 0; priority = 0.1; - icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa)); + icon = QPATHTOF(UI\DAGR_Icon.paa); exceptions[] = {"isNotInside", "isNotSitting"}; class GVAR(toggle) { displayName = CSTRING(ToggleDAGR); @@ -17,7 +17,7 @@ class CfgVehicles { statement = QUOTE(call FUNC(toggleOverlay)); showDisabled = 0; priority = 0.2; - icon = QUOTE(PATHTOF(UI\DAGR_Icon.paa)); + icon = QPATHTOF(UI\DAGR_Icon.paa); exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; }; diff --git a/addons/dagr/CfgWeapons.hpp b/addons/dagr/CfgWeapons.hpp index 9fcd903cdd..b6601e094c 100644 --- a/addons/dagr/CfgWeapons.hpp +++ b/addons/dagr/CfgWeapons.hpp @@ -7,9 +7,9 @@ class CfgWeapons { author[] = {$STR_ACE_Common_ACETeam, "Ruthberg"}; scope = 2; displayName = CSTRING(Name); - model = QUOTE(PATHTOF(data\DAGR.p3d)); + model = QPATHTOF(data\DAGR.p3d); descriptionShort = CSTRING(Description); - picture = PATHTOF(UI\DAGR_Icon.paa); + picture = QPATHTOF(UI\DAGR_Icon.paa); icon = "iconObject_circle"; mapSize = 0.034; class ItemInfo: InventoryItem_Base_F { diff --git a/addons/dagr/Dialog.hpp b/addons/dagr/Dialog.hpp index 17c065f830..52e3a8f683 100644 --- a/addons/dagr/Dialog.hpp +++ b/addons/dagr/Dialog.hpp @@ -76,349 +76,349 @@ class RscText; class DAGR_Button { - idc = -1; - type = CT_BUTTON; - style = ST_LEFT; - font = "RobotoCondensed"; - sizeEx = 0.02; - colorText[] = { 0, 1, 0, 1 }; - colorFocused[] = { 0, 0, 0, 0 }; // border color for focused state - colorDisabled[] = { 0, 0, 0, 0 }; // text color for disabled state - colorBackground[] = { 0, 0, 0, 0 }; - colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // background color for disabled state - colorBackgroundActive[] = { 0, 0, 0, 0 }; // background color for active state - offsetX = 0; - offsetY = 0; - offsetPressedX = 0; - offsetPressedY = 0; - colorShadow[] = { 0, 0, 0, 0 }; - colorBorder[] = { 0, 0, 0, 0 }; - borderSize = 0; - soundEnter[] = { "", 0, 1 }; // no sound - soundPush[] = { "", 0, 1 }; - soundClick[] = { "", 0, 1 }; // no sound - soundEscape[] = { "", 0, 1 }; // no sound - x = 0.5; - y = 0.5; - w = 0.07; - h = 0.05; - text = ""; - action = ""; + idc = -1; + type = CT_BUTTON; + style = ST_LEFT; + font = "RobotoCondensed"; + sizeEx = 0.02; + colorText[] = { 0, 1, 0, 1 }; + colorFocused[] = { 0, 0, 0, 0 }; // border color for focused state + colorDisabled[] = { 0, 0, 0, 0 }; // text color for disabled state + colorBackground[] = { 0, 0, 0, 0 }; + colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // background color for disabled state + colorBackgroundActive[] = { 0, 0, 0, 0 }; // background color for active state + offsetX = 0; + offsetY = 0; + offsetPressedX = 0; + offsetPressedY = 0; + colorShadow[] = { 0, 0, 0, 0 }; + colorBorder[] = { 0, 0, 0, 0 }; + borderSize = 0; + soundEnter[] = { "", 0, 1 }; // no sound + soundPush[] = { "", 0, 1 }; + soundClick[] = { "", 0, 1 }; // no sound + soundEscape[] = { "", 0, 1 }; // no sound + x = 0.5; + y = 0.5; + w = 0.07; + h = 0.05; + text = ""; + action = ""; }; class DAGR_Menu_Pic { - type = 0; - idc = -1; - style = 48; - x = 0; - y = 0; - w = 0.7; - h = 1.4; - text = ""; - colorBackground[] = {}; - colorText[] = {}; - font = "RobotoCondensed"; - sizeEx = 0.04; - waitForLoad = 0; + type = 0; + idc = -1; + style = 48; + x = 0; + y = 0; + w = 0.7; + h = 1.4; + text = ""; + colorBackground[] = {}; + colorText[] = {}; + font = "RobotoCondensed"; + sizeEx = 0.04; + waitForLoad = 0; }; class DAGR_Menu_Text { - type = 0; - idc = -1; - style = 0x00; - x = 0.5; - y = 0.5; - w = 0.15; - h = 0.15; - colorBackground[] = { 0, 0, 0, 0 }; - colorText[] = { 0.239, 0.216, 0.153, 1 }; - font = "RobotoCondensed"; - sizeEx = 0.03; - waitForLoad = 0; - text = ""; + type = 0; + idc = -1; + style = 0x00; + x = 0.5; + y = 0.5; + w = 0.15; + h = 0.15; + colorBackground[] = { 0, 0, 0, 0 }; + colorText[] = { 0.239, 0.216, 0.153, 1 }; + font = "RobotoCondensed"; + sizeEx = 0.03; + waitForLoad = 0; + text = ""; }; class DAGR_Menu { - idd = 266860; - movingEnable = false; - duration = 100000; - fadein = 0; - fadeout = 0; - name = "Dagr_Menu"; - onLoad = "uiNamespace setVariable ['DAGR_Menu', _this select 0]"; + idd = 266860; + movingEnable = false; + duration = 100000; + fadein = 0; + fadeout = 0; + name = "Dagr_Menu"; + onLoad = "uiNamespace setVariable ['DAGR_Menu', _this select 0]"; onUnload = QUOTE(GVAR(PWR) = true); // Simulate pressing the power button - controls[] = {"DAGR_MENU_UI", "DAGR_PWR_Button", "DAGR_UP_Button", "DAGR_DOWN_Button", "DAGR_LEFT_Button", "DAGR_RIGHT_Button", "DAGR_NEXT_Button", - "DAGR_SEL_Button", "DAGR_MENU_Button", "DAGR_F1_Button", "DAGR_F2_Button", "DAGR_F3_Button", "DAGR_F1_Text", "DAGR_F2_Text", "DAGR_F3_Text", "DAGR_MENU_OPTION0", - "DAGR_MENU_OPTION1", "DAGR_MENU_OPTION2", "DAGR_MENU_OPTION3", "DAGR_MENU_OPTION4", "DAGR_MENU_SELECTION0", "DAGR_MENU_SELECTION1", "DAGR_MENU_SELECTION2", - "DAGR_MENU_SELECTION3", "DAGR_MENU_SELECTION4", "DAGR_MENU_Main_Text", "DAGR_MENU_PSELECTION1", "DAGR_MENU_PSELECTION2", "DAGR_MENU_PSELECTION3", - "DAGR_MENU_PSELECTION4", "DAGR_MENU_PSELECTION5", "DAGR_MENU_PSELECTION6","DAGR_MENU_PSELECTION7", "DAGR_MENU_PSELECTION8"}; + controls[] = {"DAGR_MENU_UI", "DAGR_PWR_Button", "DAGR_UP_Button", "DAGR_DOWN_Button", "DAGR_LEFT_Button", "DAGR_RIGHT_Button", "DAGR_NEXT_Button", + "DAGR_SEL_Button", "DAGR_MENU_Button", "DAGR_F1_Button", "DAGR_F2_Button", "DAGR_F3_Button", "DAGR_F1_Text", "DAGR_F2_Text", "DAGR_F3_Text", "DAGR_MENU_OPTION0", + "DAGR_MENU_OPTION1", "DAGR_MENU_OPTION2", "DAGR_MENU_OPTION3", "DAGR_MENU_OPTION4", "DAGR_MENU_SELECTION0", "DAGR_MENU_SELECTION1", "DAGR_MENU_SELECTION2", + "DAGR_MENU_SELECTION3", "DAGR_MENU_SELECTION4", "DAGR_MENU_Main_Text", "DAGR_MENU_PSELECTION1", "DAGR_MENU_PSELECTION2", "DAGR_MENU_PSELECTION3", + "DAGR_MENU_PSELECTION4", "DAGR_MENU_PSELECTION5", "DAGR_MENU_PSELECTION6","DAGR_MENU_PSELECTION7", "DAGR_MENU_PSELECTION8"}; - class DAGR_MENU_UI : DAGR_Menu_Pic { - idc = 266861; - x = 0.175; - y = -0.173; - text = QUOTE(PATHTOF(UI\dagr_menu.paa)); - sizeEx = 0.1; - }; + class DAGR_MENU_UI : DAGR_Menu_Pic { + idc = 266861; + x = 0.175; + y = -0.173; + text = QPATHTOF(UI\dagr_menu.paa); + sizeEx = 0.1; + }; - class DAGR_PWR_Button : DAGR_Button { - idc = 266863; - action = QUOTE(GVAR(PWR) = true); - x = 0.40; - y = 0.65; - }; + class DAGR_PWR_Button : DAGR_Button { + idc = 266863; + action = QUOTE(GVAR(PWR) = true); + x = 0.40; + y = 0.65; + }; - class DAGR_UP_Button : DAGR_Button { - idc = 266864; - action = QUOTE(GVAR(UP) = true); - x = 0.50; - y = 0.675; - }; + class DAGR_UP_Button : DAGR_Button { + idc = 266864; + action = QUOTE(GVAR(UP) = true); + x = 0.50; + y = 0.675; + }; - class DAGR_DOWN_Button : DAGR_Button { - idc = 266865; - action = QUOTE(GVAR(DOWN) = true); - x = 0.50; - y = 0.81; - }; + class DAGR_DOWN_Button : DAGR_Button { + idc = 266865; + action = QUOTE(GVAR(DOWN) = true); + x = 0.50; + y = 0.81; + }; - class DAGR_LEFT_Button : DAGR_Button { - idc = 266866; - action = QUOTE(GVAR(LEFT) = true); - x = 0.40; - y = 0.735; - w = 0.05; - h = 0.07; - }; + class DAGR_LEFT_Button : DAGR_Button { + idc = 266866; + action = QUOTE(GVAR(LEFT) = true); + x = 0.40; + y = 0.735; + w = 0.05; + h = 0.07; + }; - class DAGR_RIGHT_Button : DAGR_Button { - idc = 266867; - action = QUOTE(GVAR(RIGHT) = true); - x = 0.62; - y = 0.735; - w = 0.05; - h = 0.07; - }; + class DAGR_RIGHT_Button : DAGR_Button { + idc = 266867; + action = QUOTE(GVAR(RIGHT) = true); + x = 0.62; + y = 0.735; + w = 0.05; + h = 0.07; + }; - class DAGR_NEXT_Button : DAGR_Button { - idc = 266868; - action = QUOTE(DAGR_NEXT = true); - x = 0.60; - y = 0.65; - }; + class DAGR_NEXT_Button : DAGR_Button { + idc = 266868; + action = QUOTE(DAGR_NEXT = true); + x = 0.60; + y = 0.65; + }; - class DAGR_SEL_Button : DAGR_Button { - idc = 266869; - action = QUOTE(GVAR(SEL) = true); - x = 0.54; - y = 0.735; - w = 0.06; - h = 0.06; - }; + class DAGR_SEL_Button : DAGR_Button { + idc = 266869; + action = QUOTE(GVAR(SEL) = true); + x = 0.54; + y = 0.735; + w = 0.06; + h = 0.06; + }; - class DAGR_MENU_Button : DAGR_Button { - idc = 266870; - action = QUOTE(GVAR(MENU_B) = true); - x = 0.46; - y = 0.735; - w = 0.06; - h = 0.06; - }; + class DAGR_MENU_Button : DAGR_Button { + idc = 266870; + action = QUOTE(GVAR(MENU_B) = true); + x = 0.46; + y = 0.735; + w = 0.06; + h = 0.06; + }; - class DAGR_F1_Button : DAGR_Button { - idc = 266871; - action = QUOTE(GVAR(F1) = true); - x = 0.40; - y = 0.575; - }; + class DAGR_F1_Button : DAGR_Button { + idc = 266871; + action = QUOTE(GVAR(F1) = true); + x = 0.40; + y = 0.575; + }; - class DAGR_F2_Button : DAGR_Button { - idc = 266872; - action = QUOTE(GVAR(F2) = true); - x = 0.495; - y = 0.575; - }; + class DAGR_F2_Button : DAGR_Button { + idc = 266872; + action = QUOTE(GVAR(F2) = true); + x = 0.495; + y = 0.575; + }; - class DAGR_F3_Button : DAGR_Button { - idc = 266873; - action = QUOTE(GVAR(F3) = true); - x = 0.59; - y = 0.575; - }; + class DAGR_F3_Button : DAGR_Button { + idc = 266873; + action = QUOTE(GVAR(F3) = true); + x = 0.59; + y = 0.575; + }; - class DAGR_F1_Text : DAGR_Menu_Text { - idc = 266874; - x = 0.388; - y = 0.38; - text = ""; - }; + class DAGR_F1_Text : DAGR_Menu_Text { + idc = 266874; + x = 0.388; + y = 0.38; + text = ""; + }; - class DAGR_F2_Text : DAGR_Menu_Text { - idc = 266875; - x = 0.506; - y = 0.38; - }; + class DAGR_F2_Text : DAGR_Menu_Text { + idc = 266875; + x = 0.506; + y = 0.38; + }; - class DAGR_F3_Text : DAGR_Menu_Text { - idc = 266876; - x = 0.612; - y = 0.38; - }; + class DAGR_F3_Text : DAGR_Menu_Text { + idc = 266876; + x = 0.612; + y = 0.38; + }; - class DAGR_MENU_OPTION0 : DAGR_Menu_Text { - idc = 2668777; - style = 0x02; - sizeEx = 0.035; - x = 0.43; - y = 0.19; - }; + class DAGR_MENU_OPTION0 : DAGR_Menu_Text { + idc = 2668777; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.19; + }; - class DAGR_MENU_OPTION1 : DAGR_Menu_Text { - idc = 2668778; - style = 0x02; - sizeEx = 0.035; - x = 0.43; - y = 0.225; - }; + class DAGR_MENU_OPTION1 : DAGR_Menu_Text { + idc = 2668778; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.225; + }; - class DAGR_MENU_OPTION2 : DAGR_Menu_Text { - idc = 2668779; - style = 0x02; - sizeEx = 0.035; - x = 0.43; - y = 0.26; - }; + class DAGR_MENU_OPTION2 : DAGR_Menu_Text { + idc = 2668779; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.26; + }; - class DAGR_MENU_OPTION3 : DAGR_Menu_Text { - idc = 2668780; - style = 0x02; - sizeEx = 0.035; - x = 0.43; - y = 0.295; - }; + class DAGR_MENU_OPTION3 : DAGR_Menu_Text { + idc = 2668780; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.295; + }; - class DAGR_MENU_OPTION4 : DAGR_Menu_Text { - idc = 2668781; - style = 0x02; - sizeEx = 0.035; - x = 0.43; - y = 0.33; - }; - class DAGR_MENU_SELECTION0 : DAGR_Menu_Pic { - idc = 2668783; - x = 0.42; - y = 0.246; - w = 0.17; - h = 0.035; - sizeEx = 0.05; - }; + class DAGR_MENU_OPTION4 : DAGR_Menu_Text { + idc = 2668781; + style = 0x02; + sizeEx = 0.035; + x = 0.43; + y = 0.33; + }; + class DAGR_MENU_SELECTION0 : DAGR_Menu_Pic { + idc = 2668783; + x = 0.42; + y = 0.246; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; - class DAGR_MENU_SELECTION1 : DAGR_Menu_Pic { - idc = 2668784; - x = 0.42; - y = 0.281; - w = 0.17; - h = 0.035; - sizeEx = 0.05; - }; + class DAGR_MENU_SELECTION1 : DAGR_Menu_Pic { + idc = 2668784; + x = 0.42; + y = 0.281; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; - class DAGR_MENU_SELECTION2 : DAGR_Menu_Pic { - idc = 2668785; - x = 0.42; - y = 0.316; - w = 0.17; - h = 0.035; - sizeEx = 0.05; - }; + class DAGR_MENU_SELECTION2 : DAGR_Menu_Pic { + idc = 2668785; + x = 0.42; + y = 0.316; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; - class DAGR_MENU_SELECTION3 : DAGR_Menu_Pic { - idc = 2668786; - x = 0.42; - y = 0.351; - w = 0.17; - h = 0.035; - sizeEx = 0.05; - }; + class DAGR_MENU_SELECTION3 : DAGR_Menu_Pic { + idc = 2668786; + x = 0.42; + y = 0.351; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; - class DAGR_MENU_SELECTION4 : DAGR_Menu_Pic { - idc = 2668787; - x = 0.42; - y = 0.386; - w = 0.17; - h = 0.035; - sizeEx = 0.05; - }; + class DAGR_MENU_SELECTION4 : DAGR_Menu_Pic { + idc = 2668787; + x = 0.42; + y = 0.386; + w = 0.17; + h = 0.035; + sizeEx = 0.05; + }; - class DAGR_MENU_Main_Text : DAGR_Menu_Text { - idc = 2668782; - style = ST_CENTER; - x = 0.38; - y = 0.32; - w = 0.25; - h = 0.035; - sizeEx = 0.04; - }; + class DAGR_MENU_Main_Text : DAGR_Menu_Text { + idc = 2668782; + style = ST_CENTER; + x = 0.38; + y = 0.32; + w = 0.25; + h = 0.035; + sizeEx = 0.04; + }; - class DAGR_MENU_PSELECTION1 : DAGR_Menu_Pic { - idc = 2668788; - x = 0.451; - y = 0.352; - w = 0.01; - h = 0.003; - }; + class DAGR_MENU_PSELECTION1 : DAGR_Menu_Pic { + idc = 2668788; + x = 0.451; + y = 0.352; + w = 0.01; + h = 0.003; + }; - class DAGR_MENU_PSELECTION2 : DAGR_Menu_Pic { - idc = 2668789; - x = 0.465; - y = 0.352; - w = 0.01; - h = 0.003; - }; + class DAGR_MENU_PSELECTION2 : DAGR_Menu_Pic { + idc = 2668789; + x = 0.465; + y = 0.352; + w = 0.01; + h = 0.003; + }; - class DAGR_MENU_PSELECTION3 : DAGR_Menu_Pic { - idc = 2668790; - x = 0.479; - y = 0.352; - w = 0.01; - h = 0.003; - }; + class DAGR_MENU_PSELECTION3 : DAGR_Menu_Pic { + idc = 2668790; + x = 0.479; + y = 0.352; + w = 0.01; + h = 0.003; + }; - class DAGR_MENU_PSELECTION4 : DAGR_Menu_Pic { - idc = 2668791; - x = 0.493; - y = 0.352; - w = 0.01; - h = 0.003; - }; + class DAGR_MENU_PSELECTION4 : DAGR_Menu_Pic { + idc = 2668791; + x = 0.493; + y = 0.352; + w = 0.01; + h = 0.003; + }; - class DAGR_MENU_PSELECTION5 : DAGR_Menu_Pic { - idc = 2668792; - x = 0.507; - y = 0.352; - w = 0.01; - h = 0.003; - }; + class DAGR_MENU_PSELECTION5 : DAGR_Menu_Pic { + idc = 2668792; + x = 0.507; + y = 0.352; + w = 0.01; + h = 0.003; + }; - class DAGR_MENU_PSELECTION6 : DAGR_Menu_Pic { - idc = 2668793; - x = 0.521; - y = 0.352; - w = 0.01; - h = 0.003; - }; + class DAGR_MENU_PSELECTION6 : DAGR_Menu_Pic { + idc = 2668793; + x = 0.521; + y = 0.352; + w = 0.01; + h = 0.003; + }; - class DAGR_MENU_PSELECTION7 : DAGR_Menu_Pic { - idc = 2668794; - x = 0.535; - y = 0.352; - w = 0.01; - h = 0.003; - }; + class DAGR_MENU_PSELECTION7 : DAGR_Menu_Pic { + idc = 2668794; + x = 0.535; + y = 0.352; + w = 0.01; + h = 0.003; + }; - class DAGR_MENU_PSELECTION8 : DAGR_Menu_Pic { - idc = 2668795; - x = 0.549; - y = 0.352; - w = 0.01; - h = 0.003; - }; + class DAGR_MENU_PSELECTION8 : DAGR_Menu_Pic { + idc = 2668795; + x = 0.549; + y = 0.352; + w = 0.01; + h = 0.003; + }; }; diff --git a/addons/dagr/RscTitles.hpp b/addons/dagr/RscTitles.hpp index 9ab34ee86f..ab70517c9a 100644 --- a/addons/dagr/RscTitles.hpp +++ b/addons/dagr/RscTitles.hpp @@ -1,95 +1,95 @@ class RscTitles { - class DAGR_Text { - type = 0; - idc = -1; - style = 0x01; - x = 0; - y = 0; - w = 0.15; - h = 0.050; - text = ""; - colorBackground[] = { 0, 0, 0, 0 }; - colorText[] = { 0.239, 0.216, 0.153, 1 }; - font = "RobotoCondensed"; - sizeEx = 0.04; - waitForLoad = 0; - }; - class DAGR_Pic { - type = 0; - idc = -1; - style = 48; - x = 0; - y = 0; - w = 0.50; - h = 0.50; - text = ""; - colorBackground[] = {}; - colorText[] = {}; - font = "RobotoCondensed"; - sizeEx = 0.02; - waitForLoad = 0; - }; + class DAGR_Text { + type = 0; + idc = -1; + style = 0x01; + x = 0; + y = 0; + w = 0.15; + h = 0.050; + text = ""; + colorBackground[] = { 0, 0, 0, 0 }; + colorText[] = { 0.239, 0.216, 0.153, 1 }; + font = "RobotoCondensed"; + sizeEx = 0.04; + waitForLoad = 0; + }; + class DAGR_Pic { + type = 0; + idc = -1; + style = 48; + x = 0; + y = 0; + w = 0.50; + h = 0.50; + text = ""; + colorBackground[] = {}; + colorText[] = {}; + font = "RobotoCondensed"; + sizeEx = 0.02; + waitForLoad = 0; + }; - class DAGR_Display { - idd = 266850; - movingEnable = false; - duration = 100000; - fadein = 0; - fadeout = 0; - name = "Dagr_Display"; - onLoad="uiNamespace setVariable ['DAGR_Display', _this select 0]"; - controls[] = {"DAGR_UI", "DAGR_Grid", "DAGR_Speed", "DAGR_Elevation", "DAGR_Heading", "DAGR_Time", "DAGR_WP", "DAGR_Bearing", "DAGR_DIST"}; + class DAGR_Display { + idd = 266850; + movingEnable = false; + duration = 100000; + fadein = 0; + fadeout = 0; + name = "Dagr_Display"; + onLoad="uiNamespace setVariable ['DAGR_Display', _this select 0]"; + controls[] = {"DAGR_UI", "DAGR_Grid", "DAGR_Speed", "DAGR_Elevation", "DAGR_Heading", "DAGR_Time", "DAGR_WP", "DAGR_Bearing", "DAGR_DIST"}; - class DAGR_UI : DAGR_Pic { - idc = 266856; - x = "(SafeZoneW + SafeZoneX) - 0.45"; - y = "(SafeZoneH + SafeZoneY) - 0.47"; - }; + class DAGR_UI : DAGR_Pic { + idc = 266856; + x = "(SafeZoneW + SafeZoneX) - 0.45"; + y = "(SafeZoneH + SafeZoneY) - 0.47"; + }; - class DAGR_Grid : DAGR_Text { - idc = 266851; - x = "(SafeZoneW + SafeZoneX) - 0.370";// 0.830 - y = "(SafeZoneH + SafeZoneY)- 0.250";// 0.845 - w = 0.25; - h = 0.06; - sizeEx = 0.07; - }; - class DAGR_Speed : DAGR_Text { - idc = 266852; - x = "(SafeZoneW + SafeZoneX) - 0.388"; //0.812 - y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 - }; - class DAGR_Elevation : DAGR_Text { - idc = 266853; - x = "(SafeZoneW + SafeZoneX) - 0.270"; //0.930 - y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 - }; - class DAGR_Heading : DAGR_Text { - idc = 266854; - x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787 - y = "(SafeZoneH + SafeZoneY) - 0.1294"; //0.9656 - }; - class DAGR_Time : DAGR_Text { - idc = 266855; - x = "(SafeZoneW + SafeZoneX) - 0.275"; //0.925 - y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965 - }; + class DAGR_Grid : DAGR_Text { + idc = 266851; + x = "(SafeZoneW + SafeZoneX) - 0.370";// 0.830 + y = "(SafeZoneH + SafeZoneY)- 0.250";// 0.845 + w = 0.25; + h = 0.06; + sizeEx = 0.07; + }; + class DAGR_Speed : DAGR_Text { + idc = 266852; + x = "(SafeZoneW + SafeZoneX) - 0.388"; //0.812 + y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 + }; + class DAGR_Elevation : DAGR_Text { + idc = 266853; + x = "(SafeZoneW + SafeZoneX) - 0.270"; //0.930 + y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 + }; + class DAGR_Heading : DAGR_Text { + idc = 266854; + x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787 + y = "(SafeZoneH + SafeZoneY) - 0.1294"; //0.9656 + }; + class DAGR_Time : DAGR_Text { + idc = 266855; + x = "(SafeZoneW + SafeZoneX) - 0.275"; //0.925 + y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965 + }; - class DAGR_WP : DAGR_Text { - idc = 266857; - x = "(SafeZoneW + SafeZoneX) - 0.235"; //0.965 - y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 - }; + class DAGR_WP : DAGR_Text { + idc = 266857; + x = "(SafeZoneW + SafeZoneX) - 0.235"; //0.965 + y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 + }; - class DAGR_Bearing : DAGR_Text { - idc = 266858; - x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787 - y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 - }; - class DAGR_DIST : DAGR_Text { - idc = 266859; - x = "(SafeZoneW + SafeZoneX) - 0.265"; //0.935 - y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965 - }; - }; + class DAGR_Bearing : DAGR_Text { + idc = 266858; + x = "(SafeZoneW + SafeZoneX) - 0.413"; //0.787 + y = "(SafeZoneH + SafeZoneY) - 0.181"; //0.914 + }; + class DAGR_DIST : DAGR_Text { + idc = 266859; + x = "(SafeZoneW + SafeZoneX) - 0.265"; //0.935 + y = "(SafeZoneH + SafeZoneY) - 0.129"; //0.965 + }; + }; }; diff --git a/addons/dagr/config.cpp b/addons/dagr/config.cpp index 9f46660aaa..1f440744f4 100644 --- a/addons/dagr/config.cpp +++ b/addons/dagr/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_DAGR"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_weather"}; - author[] = {"Rosuto", "Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Rosuto", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index e4fb341537..9bf36c393c 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -134,19 +134,19 @@ GVAR(menuRun) = true; GVAR(vectorConnected) = false; if (!GVAR(busy)) then { GVAR(busy) = true; - GVAR(busyTimer) = ACE_time; + GVAR(busyTimer) = CBA_missionTime; }; (__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data."; - if (ACE_time - GVAR(busyTimer) > 0.5) then { + if (CBA_missionTime - GVAR(busyTimer) > 0.5) then { (__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data.."; }; - if (ACE_time - GVAR(busyTimer) > 1.0) then { + if (CBA_missionTime - GVAR(busyTimer) > 1.0) then { (__dsp displayCtrl __mainText) ctrlSetText "Acquiring Data..."; }; - if (ACE_time - GVAR(busyTimer) > 1.5) then { + if (CBA_missionTime - GVAR(busyTimer) > 1.5) then { (__dsp displayCtrl __mainText) ctrlSetText "Position Acquired"; }; - if (ACE_time - GVAR(busyTimer) > 3.0) then { + if (CBA_missionTime - GVAR(busyTimer) > 3.0) then { GVAR(busy) = false; }; }; @@ -156,7 +156,7 @@ GVAR(menuRun) = true; if (!GVAR(busy)) then { GVAR(showNoWaypointsFound) = true; GVAR(busy) = true; - GVAR(busyTimer) = ACE_time; + GVAR(busyTimer) = CBA_missionTime; }; } else { GVAR(menu) = "goto_wp"; GVAR(numSelections) = GVAR(numWaypoints); GVAR(selection) = 0; @@ -168,7 +168,7 @@ GVAR(menuRun) = true; }; }; if (GVAR(busy) && GVAR(showNoWaypointsFound)) then { - if (ACE_time - GVAR(busyTimer) > 2) then { + if (CBA_missionTime - GVAR(busyTimer) > 2) then { GVAR(showNoWaypointsFound) = false; GVAR(busy) = false; }; @@ -179,7 +179,7 @@ GVAR(menuRun) = true; (__dsp displayCtrl __Option2) ctrlSetText "WP LIST"; (__dsp displayCtrl __Option3) ctrlSetText "CONNECT TO"; (__dsp displayCtrl __Option4) ctrlSetText "OPTIONS"; - (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa); }; }; case "goto_wp": { @@ -190,7 +190,7 @@ GVAR(menuRun) = true; (__dsp displayCtrl __Option3) ctrlSetText GVAR(wpString3); (__dsp displayCtrl __Option4) ctrlSetText GVAR(wpString4); if (GVAR(numSelections) > 0) then { - (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa); }; }; if (GVAR(SEL)) then { @@ -206,21 +206,21 @@ GVAR(menuRun) = true; if (!GVAR(busy)) then { GVAR(showInfoUpdating) = true; GVAR(busy) = true; - GVAR(busyTimer) = ACE_time; + GVAR(busyTimer) = CBA_missionTime; }; }; if (GVAR(busy) && GVAR(showInfoUpdating)) then { (__dsp displayCtrl __mainText) ctrlSetText "Info Update."; - if (ACE_time - GVAR(busyTimer) > 1) then { + if (CBA_missionTime - GVAR(busyTimer) > 1) then { (__dsp displayCtrl __mainText) ctrlSetText "Info Update.."; }; - if (ACE_time - GVAR(busyTimer) > 1.2) then { + if (CBA_missionTime - GVAR(busyTimer) > 1.2) then { (__dsp displayCtrl __mainText) ctrlSetText "Info Update..."; }; - if (ACE_time - GVAR(busyTimer) > 1.4) then { + if (CBA_missionTime - GVAR(busyTimer) > 1.4) then { (__dsp displayCtrl __mainText) ctrlSetText "Info Updated"; }; - if (ACE_time - GVAR(busyTimer) > 2.9) then { + if (CBA_missionTime - GVAR(busyTimer) > 2.9) then { GVAR(showInfoUpdating) = false; GVAR(busy) = false; }; @@ -238,7 +238,7 @@ GVAR(menuRun) = true; (__dsp displayCtrl __F2) ctrlSetText "Edit"; (__dsp displayCtrl __F3) ctrlSetText "Delete"; if (GVAR(numSelections) > 0) then { - (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa); }; }; if (GVAR(F3) && GVAR(numWaypoints) > 0) then { @@ -289,21 +289,21 @@ GVAR(menuRun) = true; GVAR(numSelections) = GVAR(numWaypoints); GVAR(showDeleting) = true; GVAR(busy) = true; - GVAR(busyTimer) = ACE_time; + GVAR(busyTimer) = CBA_missionTime; }; }; if (GVAR(busy) && GVAR(showDeleting)) then { (__dsp displayCtrl __mainText) ctrlSetText "Deleting."; - if (ACE_time - GVAR(busyTimer) > 1) then { + if (CBA_missionTime - GVAR(busyTimer) > 1) then { (__dsp displayCtrl __mainText) ctrlSetText "Deleting.."; }; - if (ACE_time - GVAR(busyTimer) > 1.2) then { + if (CBA_missionTime - GVAR(busyTimer) > 1.2) then { (__dsp displayCtrl __mainText) ctrlSetText "Deleting..."; }; - if (ACE_time - GVAR(busyTimer) > 1.4) then { + if (CBA_missionTime - GVAR(busyTimer) > 1.4) then { (__dsp displayCtrl __mainText) ctrlSetText "Waypoint Deleted"; }; - if (ACE_time - GVAR(busyTimer) > 2.9) then { + if (CBA_missionTime - GVAR(busyTimer) > 2.9) then { GVAR(showDeleting) = false; GVAR(busy) = false; }; @@ -313,7 +313,7 @@ GVAR(menuRun) = true; if (!GVAR(busy)) then { GVAR(showOutOfSpace) = true; GVAR(busy) = true; - GVAR(busyTimer) = ACE_time; + GVAR(busyTimer) = CBA_missionTime; }; } else { GVAR(digit1) = 0; @@ -330,7 +330,7 @@ GVAR(menuRun) = true; }; if (GVAR(busy) && GVAR(showOutOfSpace)) then { (__dsp displayCtrl __mainText) ctrlSetText "Out of Space"; - if (ACE_time - GVAR(busyTimer) > 2.5) then { + if (CBA_missionTime - GVAR(busyTimer) > 2.5) then { GVAR(showOutOfSpace) = false; GVAR(busy) = false; }; @@ -399,7 +399,7 @@ GVAR(menuRun) = true; (__dsp displayCtrl __F3) ctrlSetText "Cancel"; GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8); (__dsp displayCtrl __mainText) ctrlSetText GVAR(output); - (__dsp displayCtrl __PSelection1 + GVAR(pointer)) ctrlSetText QUOTE(PATHTOF(UI\DAGR_PSelection.paa)); + (__dsp displayCtrl __PSelection1 + GVAR(pointer)) ctrlSetText QPATHTOF(UI\DAGR_PSelection.paa); }; if (GVAR(F1)) then { if (!GVAR(busy)) then { @@ -425,22 +425,22 @@ GVAR(menuRun) = true; }; }; GVAR(busy) = true; - GVAR(busyTimer) = ACE_time; + GVAR(busyTimer) = CBA_missionTime; }; (__dsp displayCtrl __F1) ctrlSetText ""; (__dsp displayCtrl __F2) ctrlSetText ""; (__dsp displayCtrl __F3) ctrlSetText ""; (__dsp displayCtrl __mainText) ctrlSetText "Saving."; - if (ACE_time - GVAR(busyTimer) > 1) then { + if (CBA_missionTime - GVAR(busyTimer) > 1) then { (__dsp displayCtrl __mainText) ctrlSetText "Saving.."; }; - if (ACE_time - GVAR(busyTimer) > 1.2) then { + if (CBA_missionTime - GVAR(busyTimer) > 1.2) then { (__dsp displayCtrl __mainText) ctrlSetText "Saving..."; }; - if (ACE_time - GVAR(busyTimer) > 1.4) then { + if (CBA_missionTime - GVAR(busyTimer) > 1.4) then { (__dsp displayCtrl __mainText) ctrlSetText "Waypoint Saved"; }; - if (ACE_time - GVAR(busyTimer) > 2.9) then { + if (CBA_missionTime - GVAR(busyTimer) > 2.9) then { GVAR(edit) = false; GVAR(add) = false; GVAR(busy) = false; @@ -464,7 +464,7 @@ GVAR(menuRun) = true; if (GVAR(F3)) then { if (!GVAR(busy)) then { GVAR(busy) = true; - GVAR(busyTimer) = ACE_time; + GVAR(busyTimer) = CBA_missionTime; } else { (__dsp displayCtrl __F1) ctrlSetText "Save"; (__dsp displayCtrl __F2) ctrlSetText "Vector"; @@ -472,7 +472,7 @@ GVAR(menuRun) = true; GVAR(output) = str GVAR(digit1) + str GVAR(digit2) + str GVAR(digit3) + str GVAR(digit4) + str GVAR(digit5) + str GVAR(digit6) + str GVAR(digit7) + str GVAR(digit8); (__dsp displayCtrl __mainText) ctrlSetText GVAR(output); }; - if (ACE_time - GVAR(busyTimer) > 0.1) then { + if (CBA_missionTime - GVAR(busyTimer) > 0.1) then { GVAR(add) = false; GVAR(edit) = false; GVAR(busy) = false; @@ -507,22 +507,22 @@ GVAR(menuRun) = true; case "connect": { if (!GVAR(busy)) then { (__dsp displayCtrl __Option0) ctrlSetText "Vector 21"; - (__dsp displayCtrl __Selection0) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + (__dsp displayCtrl __Selection0) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa); }; if (GVAR(SEL)) then { if (!GVAR(busy)) then { GVAR(busy) = true; - GVAR(busyTimer) = ACE_time; + GVAR(busyTimer) = CBA_missionTime; }; (__dsp displayCtrl __mainText) ctrlSetText "Connecting."; - if (ACE_time - GVAR(busyTimer) > 0.2) then { + if (CBA_missionTime - GVAR(busyTimer) > 0.2) then { (__dsp displayCtrl __mainText) ctrlSetText "Connecting.."; }; - if (ACE_time - GVAR(busyTimer) > 0.4) then { + if (CBA_missionTime - GVAR(busyTimer) > 0.4) then { (__dsp displayCtrl __mainText) ctrlSetText "Connecting..."; }; - if (ACE_time - GVAR(busyTimer) > 0.6) then { - if (ACE_player hasWeapon "ACE_Vector") then { + if (CBA_missionTime - GVAR(busyTimer) > 0.6) then { + if (({_x isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]} count (weapons ACE_player)) > 0) then { GVAR(displaySelection) = "VECTOR"; (__dsp displayCtrl __mainText) ctrlSetText "Vector Connected"; GVAR(vectorConnected) = true; @@ -531,7 +531,7 @@ GVAR(menuRun) = true; GVAR(vectorConnected) = false; }; }; - if (ACE_time - GVAR(busyTimer) > 3.1) then { + if (CBA_missionTime - GVAR(busyTimer) > 3.1) then { GVAR(busy) = false; if (GVAR(vectorConnected)) then { GVAR(menu) = "main"; GVAR(numSelections) = 5; @@ -542,7 +542,7 @@ GVAR(menuRun) = true; case "options": { (__dsp displayCtrl __Option0) ctrlSetText "Signal Delay"; (__dsp displayCtrl __Option1) ctrlSetText (if (GVAR(useDegrees)) then { "Direction: Deg" } else { "Direction: MIL" }); - (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QUOTE(PATHTOF(UI\DAGR_Selection.paa)); + (__dsp displayCtrl (__Selection0 + GVAR(selection))) ctrlSetText QPATHTOF(UI\DAGR_Selection.paa); if (GVAR(SEL)) then { GVAR(vectorConnected) = false; switch (GVAR(selection)) do { @@ -556,19 +556,19 @@ GVAR(menuRun) = true; GVAR(updateInterval) = GVAR(tmpUpdateRate); if (!GVAR(busy)) then { GVAR(busy) = true; - GVAR(busyTimer) = ACE_time; + GVAR(busyTimer) = CBA_missionTime; }; (__dsp displayCtrl __mainText) ctrlSetText "Updating."; - if (ACE_time - GVAR(busyTimer) > 0.2) then { + if (CBA_missionTime - GVAR(busyTimer) > 0.2) then { (__dsp displayCtrl __mainText) ctrlSetText "Updating.."; }; - if (ACE_time - GVAR(busyTimer) > 0.4) then { + if (CBA_missionTime - GVAR(busyTimer) > 0.4) then { (__dsp displayCtrl __mainText) ctrlSetText "Updating..."; }; - if (ACE_time - GVAR(busyTimer) > 0.6) then { + if (CBA_missionTime - GVAR(busyTimer) > 0.6) then { (__dsp displayCtrl __mainText) ctrlSetText "Update Success"; }; - if (ACE_time - GVAR(busyTimer) > 2.1) then { + if (CBA_missionTime - GVAR(busyTimer) > 2.1) then { GVAR(busy) = false; GVAR(menu) = "options"; GVAR(numSelections) = 2; }; diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf index 63350c71a3..a981514e54 100644 --- a/addons/dagr/functions/fnc_outputData.sqf +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -25,7 +25,7 @@ #define __timeControl (__display displayCtrl 266855) #define __background (__display displayCtrl 266856) -__background ctrlSetText QUOTE(PATHTOF(UI\dagr_gps.paa)); +__background ctrlSetText QPATHTOF(UI\dagr_gps.paa); if (GVAR(outputPFH) != -1) exitWith {}; diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index ef93a53d8a..23996c46b4 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -27,7 +27,7 @@ private ["_xGrid", "_yGrid", "_dagrGrid", "_bearing", "_dagrDist", "_dagrElevati #define __timeControl (__display displayCtrl 266855) #define __background (__display displayCtrl 266856) -__background ctrlSetText QUOTE(PATHTOF(UI\dagr_vector.paa)); +__background ctrlSetText QPATHTOF(UI\dagr_vector.paa); if (GVAR(noVectorData)) exitWith {}; GVAR(LAZPOS) params ["_lazPosX", "_lazPosY", "_lazPosZ"]; diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index 204a5ef556..2d1aee4d4e 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -25,7 +25,7 @@ #define __timeControl (__display displayCtrl 266859) #define __background (__display displayCtrl 266856) -__background ctrlSetText QUOTE(PATHTOF(UI\dagr_wp.paa)); +__background ctrlSetText QPATHTOF(UI\dagr_wp.paa); if (GVAR(outputPFH) != -1) exitWith {}; diff --git a/addons/dagr/initKeybinds.sqf b/addons/dagr/initKeybinds.sqf index 66bd08190e..74a522e87f 100644 --- a/addons/dagr/initKeybinds.sqf +++ b/addons/dagr/initKeybinds.sqf @@ -37,7 +37,7 @@ _conditonCode = { _toggleCode = { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {}; - + // Statement [] call FUNC(toggleOverlay); if (!GVAR(run)) then { @@ -56,4 +56,4 @@ _closeCode = { closeDialog 0; }; }; -["DAGR", QUOTE(PATHTOF(UI\DAGR_Icon.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); +["DAGR", QPATHTOF(UI\DAGR_Icon.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); diff --git a/addons/dagr/stringtable.xml b/addons/dagr/stringtable.xml index f744359bcb..01b43391ab 100644 --- a/addons/dagr/stringtable.xml +++ b/addons/dagr/stringtable.xml @@ -32,7 +32,7 @@ Mostrar DAGR Přepnout DAGR Apri DAGR - Afficher le DAGR + Activer/Desactiver le DAGR Defense Advanced GPS Receiver @@ -46,4 +46,4 @@ Defense Advanced GPS Receiver - \ No newline at end of file + diff --git a/addons/difficulties/$PBOPREFIX$ b/addons/difficulties/$PBOPREFIX$ deleted file mode 100644 index 6280fc4731..0000000000 --- a/addons/difficulties/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\difficulties \ No newline at end of file diff --git a/addons/difficulties/CfgDifficulties.hpp b/addons/difficulties/CfgDifficulties.hpp deleted file mode 100644 index a65d31f1a5..0000000000 --- a/addons/difficulties/CfgDifficulties.hpp +++ /dev/null @@ -1,33 +0,0 @@ - -class CfgDifficulties { - class Mercenary { - class Flags { - armor[] = {0,0}; - friendlyTag[] = {0,0}; - enemyTag[] = {0,0}; - mineTag[] = {0,0}; - hud[] = {0,1};//{1,1}; - hudPerm[] = {0,0}; - hudWp[] = {0,0}; - hudWpPerm[] = {0,0}; - autoSpot[] = {0,1}; - map[] = {0,0}; - weaponCursor[] = {0,1};//{1,1}; - autoGuideAT[] = {0,0}; - clockIndicator[] = {0,0}; - 3rdPersonView[] = {0,0}; - autoAim[] = {0,0}; - unlimitedSaves[] = {0,0}; - deathMessages[] = {0,1};//{1,1}; - netStats[] = {0,1};//{1,1}; - vonID[] = {0,1}; - cameraShake[] = {1,0}; - hudGroupInfo[] = {0,0}; - extendetInfoType[] = {0,0}; - roughLanding[] = {0,0}; - windEnabled[] = {1,0}; - autoTrimEnabled[] = {0,0}; - stressDamageEnabled[] = {1,0}; - }; - }; -}; diff --git a/addons/difficulties/config.cpp b/addons/difficulties/config.cpp deleted file mode 100644 index 34784706a0..0000000000 --- a/addons/difficulties/config.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2/"; - VERSION_CONFIG; - }; -}; - -#include "CfgDifficulties.hpp" diff --git a/addons/difficulties/script_component.hpp b/addons/difficulties/script_component.hpp deleted file mode 100644 index b6f387b02f..0000000000 --- a/addons/difficulties/script_component.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#define COMPONENT difficulties -#include "\z\ace\addons\main\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE -// #define CBA_DEBUG_SYNCHRONOUS -// #define ENABLE_PERFORMANCE_COUNTERS - -#ifdef DEBUG_ENABLED_DIFFICULTIES - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_ENABLED_DIFFICULTIES - #define DEBUG_SETTINGS DEBUG_ENABLED_DIFFICULTIES -#endif - -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/disarming/CfgVehicles.hpp b/addons/disarming/CfgVehicles.hpp index b4a1a4c7dd..1d04bb157c 100644 --- a/addons/disarming/CfgVehicles.hpp +++ b/addons/disarming/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { distance = 3.5; condition = QUOTE([ARR_2(_player,_target)] call FUNC(canPlayerDisarmUnit)); statement = QUOTE([ARR_2(_player,_target)] call FUNC(openDisarmDialog)); - icon = PATHTOF(UI\disarm.paa); + icon = QPATHTOF(UI\disarm.paa); exceptions[] = {}; }; }; diff --git a/addons/disarming/CfgWeapons.hpp b/addons/disarming/CfgWeapons.hpp index 404ef4aa76..4e7122ba41 100644 --- a/addons/disarming/CfgWeapons.hpp +++ b/addons/disarming/CfgWeapons.hpp @@ -5,7 +5,7 @@ class CfgWeapons { class ACE_DebugPotato: ACE_ItemCore { displayName = "ACE Potato (debug)"; descriptionShort = "Glorious Potato
If you see this in game it means someone fucked up"; - picture = QUOTE(PATHTOF(UI\potato_ca.paa)); + picture = QPATHTOF(UI\potato_ca.paa); scope = 1; class ItemInfo: InventoryItem_Base_F { mass = 1; diff --git a/addons/disarming/config.cpp b/addons/disarming/config.cpp index 00f8204b09..6bf3397106 100644 --- a/addons/disarming/config.cpp +++ b/addons/disarming/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_DebugPotato"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ACE_Interaction"}; - author[] = {"PabstMirror"}; - authorUrl = "https://github.com/PabstMirror/"; + author = ECSTRING(common,ACETeam); + authors[] = {"PabstMirror"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index be2f932028..c9eb920084 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -67,7 +67,7 @@ if (isNull _holder) exitWith { if (_holder getVariable [QGVAR(holderInUse), false]) exitWith { [{ _this call FUNC(disarmDropItems); - }, _this] call EFUNC(common,execNextFrame); + }, _this] call CBA_fnc_execNextFrame; }; _holder setVariable [QGVAR(holderInUse), true]; @@ -177,7 +177,7 @@ if (_holderIsEmpty) then { _needToRemoveVest = ((vest _target) != "") && {(vest _target) in _listOfItemsToRemove}; _needToRemoveUniform = ((uniform _target) != "") && {(uniform _target) in _listOfItemsToRemove}; - if ((ACE_time < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then { + if ((CBA_missionTime < _maxWaitTime) && {[_target] call FUNC(canBeDisarmed)} && {_needToRemoveWeapon || _needToRemoveMagazines || _needToRemoveBackpack}) then { //action drop weapons (keeps loaded magazine and attachements) { if (_x in _listOfItemsToRemove) then { @@ -233,7 +233,7 @@ if (_holderIsEmpty) then { clearItemCargoGlobal _holder; }; //Verify we didn't timeout waiting on drop action - if (ACE_time >= _maxWaitTime) exitWith { + if (CBA_missionTime >= _maxWaitTime) exitWith { _holder setVariable [QGVAR(holderInUse), false]; [_caller, _target, "Debug: Drop Actions Timeout"] call FUNC(eventTargetFinish); }; @@ -263,4 +263,4 @@ if (_holderIsEmpty) then { [_caller, _target, ""] call FUNC(eventTargetFinish); }; -}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (ACE_time + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler; +}, 0.0, [_caller,_target, _listOfItemsToRemove, _holder, _holderIsEmpty, (CBA_missionTime + TIME_MAX_WAIT), _doNotDropAmmo, _targetMagazinesEnd]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/disarming/functions/fnc_eventCallerFinish.sqf b/addons/disarming/functions/fnc_eventCallerFinish.sqf index e1376f4052..bf1daee2f0 100644 --- a/addons/disarming/functions/fnc_eventCallerFinish.sqf +++ b/addons/disarming/functions/fnc_eventCallerFinish.sqf @@ -23,4 +23,4 @@ params ["_caller", "_target", "_errorMsg"]; if (_caller != ACE_player) exitWith {}; systemChat format ["Debug-Caller: Disarm finished from [%1] with code [%2]", _target, _errorMsg]; -ACE_LOGINFO_2("%1 - eventCallerFinish: %2",ACE_time,_this); +ACE_LOGINFO_2("%1 - eventCallerFinish: %2",CBA_missionTime,_this); diff --git a/addons/disarming/functions/fnc_eventTargetFinish.sqf b/addons/disarming/functions/fnc_eventTargetFinish.sqf index b7364a8f40..9af811adc7 100644 --- a/addons/disarming/functions/fnc_eventTargetFinish.sqf +++ b/addons/disarming/functions/fnc_eventTargetFinish.sqf @@ -22,6 +22,6 @@ params ["_caller", "_target", "_errorMsg"]; if (_errorMsg != "") then { - ACE_LOGINFO_2("%1 - eventTargetFinish: %2",ACE_time,_this); + ACE_LOGINFO_2("%1 - eventTargetFinish: %2",CBA_missionTime,_this); ["DisarmDebugCallback", [_caller], [_caller, _target, _errorMsg]] call EFUNC(common,targetEvent); }; diff --git a/addons/disarming/stringtable.xml b/addons/disarming/stringtable.xml index 61eaf9af59..dfa030273a 100644 --- a/addons/disarming/stringtable.xml +++ b/addons/disarming/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/disposable/CfgMagazines.hpp b/addons/disposable/CfgMagazines.hpp index d26d5ecea2..d9ad0508db 100644 --- a/addons/disposable/CfgMagazines.hpp +++ b/addons/disposable/CfgMagazines.hpp @@ -5,7 +5,7 @@ class CfgMagazines { scope = 1; scopeArsenal = 1; displayName = CSTRING(PreloadedMissileDummy); - picture = PATHTOEF(common,UI\blank_CO.paa); + picture = QPATHTOEF(common,UI\blank_CO.paa); weaponPoolAvailable = 0; mass = 0; }; diff --git a/addons/disposable/config.cpp b/addons/disposable/config.cpp index 0f256824d7..e240206938 100644 --- a/addons/disposable/config.cpp +++ b/addons/disposable/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/disposable/stringtable.xml b/addons/disposable/stringtable.xml index acdc79473c..ac2b76ee7f 100644 --- a/addons/disposable/stringtable.xml +++ b/addons/disposable/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/dragging/CfgEventHandlers.hpp b/addons/dragging/CfgEventHandlers.hpp index 313406a3f1..226efc5ef7 100644 --- a/addons/dragging/CfgEventHandlers.hpp +++ b/addons/dragging/CfgEventHandlers.hpp @@ -55,3 +55,9 @@ class Extended_AnimChanged_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/dragging/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp index be5021fd43..ba4ff87186 100644 --- a/addons/dragging/CfgVehicles.hpp +++ b/addons/dragging/CfgVehicles.hpp @@ -1,19 +1,20 @@ +class CBA_Extended_EventHandlers; + class CfgVehicles { // Static weapons class LandVehicle; class StaticWeapon: LandVehicle { GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1.2,0}; + GVAR(carryPosition)[] = {0,1.2,0}; GVAR(carryDirection) = 0; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.2,0}; + GVAR(dragPosition)[] = {0,1.2,0}; GVAR(dragDirection) = 0; }; - //remove actions from Taru Pods - class Pod_Heli_Transport_04_base_F: StaticWeapon { + class StaticCannon: StaticWeapon { GVAR(canCarry) = 0; GVAR(canDrag) = 0; }; @@ -21,23 +22,24 @@ class CfgVehicles { class StaticMortar; class Mortar_01_base_F: StaticMortar { GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1.2,0}; + GVAR(carryPosition)[] = {0,1.2,0}; GVAR(carryDirection) = 0; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.2,0}; + GVAR(dragPosition)[] = {0,1.2,0}; GVAR(dragDirection) = 0; }; // ammo boxes class ThingX; + class Items_base_F; class ReammoBox_F: ThingX { GVAR(canCarry) = 0; - GVAR(carryPosition[]) = {0,1,1}; + GVAR(carryPosition)[] = {0,1,1}; GVAR(carryDirection) = 0; GVAR(canDrag) = 0; - GVAR(dragPosition[]) = {0,1.2,0}; + GVAR(dragPosition)[] = {0,1.2,0}; GVAR(dragDirection) = 0; }; @@ -45,6 +47,11 @@ class CfgVehicles { GVAR(canCarry) = 0; GVAR(canDrag) = 0; }; + //remove actions from Taru Pods + class Pod_Heli_Transport_04_base_F: Slingload_base_F { + GVAR(canCarry) = 0; + GVAR(canDrag) = 0; + }; class EAST_Box_Base: ReammoBox_F { GVAR(canCarry) = 1; @@ -83,44 +90,73 @@ class CfgVehicles { GVAR(canDrag) = 0; }; - // Barrier - class RoadCone_F: ThingX { - XEH_ENABLED; + //Plastic and metal case + class PlasticCase_01_base_F: Items_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; GVAR(canCarry) = 1; GVAR(carryPosition[]) = {0,1,1}; - GVAR(carryDirection) = 0; + GVAR(carryDirection) = 270; + + GVAR(canDrag) = 1; + GVAR(dragPosition[]) = {0,1.2,0}; + GVAR(dragDirection) = 0; + }; + class MetalCase_01_base_F: Items_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(canCarry) = 1; + GVAR(carryPosition[]) = {0,1,1}; + GVAR(carryDirection) = 270; GVAR(canDrag) = 1; GVAR(dragPosition[]) = {0,1.2,0}; GVAR(dragDirection) = 0; }; + // Barrier + class RoadCone_F: ThingX { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + + GVAR(canCarry) = 1; + GVAR(carryPosition)[] = {0,1,1}; + GVAR(carryDirection) = 0; + + GVAR(canDrag) = 1; + GVAR(dragPosition)[] = {0,1.2,0}; + GVAR(dragDirection) = 0; + }; + class RoadBarrier_F: RoadCone_F { - GVAR(carryPosition[]) = {0,1,0.300671}; + GVAR(carryPosition)[] = {0,1,0.300671}; }; class ACE_RepairItem_Base: ThingX {}; class ACE_Track: ACE_RepairItem_Base { GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1,1}; + GVAR(carryPosition)[] = {0,1,1}; GVAR(carryDirection) = 0; }; class ACE_Wheel: ACE_RepairItem_Base { GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1,1}; + GVAR(carryPosition)[] = {0,1,1}; GVAR(carryDirection) = 0; }; class Lamps_base_F; class Land_PortableLight_single_F: Lamps_base_F { GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1.2,0}; + GVAR(carryPosition)[] = {0,1.2,0}; GVAR(carryDirection) = 180; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.2,0}; + GVAR(dragPosition)[] = {0,1.2,0}; GVAR(dragDirection) = 180; }; }; diff --git a/addons/dragging/UI/icons/box_carry.paa b/addons/dragging/UI/icons/box_carry.paa new file mode 100644 index 0000000000..5e9c83057c Binary files /dev/null and b/addons/dragging/UI/icons/box_carry.paa differ diff --git a/addons/dragging/UI/icons/box_drag.paa b/addons/dragging/UI/icons/box_drag.paa new file mode 100644 index 0000000000..56ae3af83b Binary files /dev/null and b/addons/dragging/UI/icons/box_drag.paa differ diff --git a/addons/dragging/UI/icons/person_carry.paa b/addons/dragging/UI/icons/person_carry.paa new file mode 100644 index 0000000000..30e8da32a9 Binary files /dev/null and b/addons/dragging/UI/icons/person_carry.paa differ diff --git a/addons/dragging/UI/icons/person_drag.paa b/addons/dragging/UI/icons/person_drag.paa new file mode 100644 index 0000000000..39dfac3546 Binary files /dev/null and b/addons/dragging/UI/icons/person_drag.paa differ diff --git a/addons/dragging/XEH_missionDisplayLoad.sqf b/addons/dragging/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/dragging/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/dragging/XEH_postInit.sqf b/addons/dragging/XEH_postInit.sqf index 5a54f8c8a2..9e20d8ee60 100644 --- a/addons/dragging/XEH_postInit.sqf +++ b/addons/dragging/XEH_postInit.sqf @@ -8,8 +8,6 @@ if (isServer) then { if (!hasInterface) exitWith {}; -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - if (isNil "ACE_maxWeightDrag") then { ACE_maxWeightDrag = 800; }; diff --git a/addons/dragging/config.cpp b/addons/dragging/config.cpp index 0c9cfb3c43..a3e87c5824 100644 --- a/addons/dragging/config.cpp +++ b/addons/dragging/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"Garth 'L-H' de Wet", "commy2"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"Garth 'L-H' de Wet", "commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf index ec00693825..2624bbf05c 100644 --- a/addons/dragging/functions/fnc_carryObject.sqf +++ b/addons/dragging/functions/fnc_carryObject.sqf @@ -64,7 +64,7 @@ if (_target isKindOf "CAManBase") then { }; // check everything -[FUNC(carryObjectPFH), 0.5, [_unit, _target, ACE_time]] call CBA_fnc_addPerFrameHandler; +[FUNC(carryObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; // reset current dragging height. GVAR(currentHeightChange) = 0; diff --git a/addons/dragging/functions/fnc_carryObjectPFH.sqf b/addons/dragging/functions/fnc_carryObjectPFH.sqf index 948af15891..963921efa7 100644 --- a/addons/dragging/functions/fnc_carryObjectPFH.sqf +++ b/addons/dragging/functions/fnc_carryObjectPFH.sqf @@ -20,7 +20,7 @@ #include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING - systemChat format ["%1 carryObjectPFH running", ACE_time]; + systemChat format ["%1 carryObjectPFH running", CBA_missionTime]; #endif params ["_args", "_idPFH"]; @@ -34,10 +34,10 @@ if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith { // 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); - if ((_unit distance _target > 10) && {(ACE_time - _startTime) < 1}) exitWith { + 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 durring 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,ACE_time); + TRACE_3("ignoring bad distance at start",_unit distance _target,_startTime,CBA_missionTime); }; [_unit, _target] call FUNC(dropObject_carry); [_idPFH] call CBA_fnc_removePerFrameHandler; diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index 3237ddbb07..751baccf06 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -53,7 +53,7 @@ _unit setVariable [QGVAR(ReleaseActionID), [ [localize LSTRING(Drop), ""] call EFUNC(interaction,showMouseHint); // check everything -[FUNC(dragObjectPFH), 0.5, [_unit, _target, ACE_time]] call CBA_fnc_addPerFrameHandler; +[FUNC(dragObjectPFH), 0.5, [_unit, _target, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; // reset current dragging height. GVAR(currentHeightChange) = 0; diff --git a/addons/dragging/functions/fnc_dragObjectPFH.sqf b/addons/dragging/functions/fnc_dragObjectPFH.sqf index ab117e90fd..08aeba738b 100644 --- a/addons/dragging/functions/fnc_dragObjectPFH.sqf +++ b/addons/dragging/functions/fnc_dragObjectPFH.sqf @@ -20,7 +20,7 @@ #include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING - systemChat format ["%1 dragObjectPFH running", ACE_time]; + systemChat format ["%1 dragObjectPFH running", CBA_missionTime]; #endif params ["_args", "_idPFH"]; @@ -34,10 +34,10 @@ if !(_unit getVariable [QGVAR(isDragging), false]) exitWith { // 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); - if ((_unit distance _target > 10) && {(ACE_time - _startTime) < 1}) exitWith { + 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 durring 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,ACE_time); + TRACE_3("ignoring bad distance at start",_unit distance _target,_startTime,CBA_missionTime); }; [_unit, _target] call FUNC(dropObject); [_idPFH] call CBA_fnc_removePerFrameHandler; diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf index e3547ca63a..c97284618c 100644 --- a/addons/dragging/functions/fnc_handleScrollWheel.sqf +++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf @@ -40,4 +40,8 @@ detach _carriedItem; _carriedItem setPosATL _position; _carriedItem attachTo [_unit]; +//reset the carry direction +private _direction = _carriedItem getVariable [QGVAR(carryDirection), 0]; +["setDir", _carriedItem, [_carriedItem, _direction]] call EFUNC(common,targetEvent); + true diff --git a/addons/dragging/functions/fnc_setCarryable.sqf b/addons/dragging/functions/fnc_setCarryable.sqf index 9e15e42446..0253c6ed4b 100644 --- a/addons/dragging/functions/fnc_setCarryable.sqf +++ b/addons/dragging/functions/fnc_setCarryable.sqf @@ -43,7 +43,9 @@ if (_type in _initializedClasses) exitWith {}; _initializedClasses pushBack _type; GVAR(initializedClasses_carry) = _initializedClasses; -private _carryAction = [QGVAR(carry), localize LSTRING(Carry), "", {[_player, _target] call FUNC(startCarry)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction); +private _icon = [QUOTE(PATHTOF(UI\icons\box_carry.paa)), QUOTE(PATHTOF(UI\icons\person_carry.paa))] select (_object isKindOf "Man"); + +private _carryAction = [QGVAR(carry), localize LSTRING(Carry), _icon, {[_player, _target] call FUNC(startCarry)}, {[_player, _target] call FUNC(canCarry)}] call EFUNC(interact_menu,createAction); private _dropAction = [QGVAR(drop_carry), localize LSTRING(Drop), "", {[_player, _target] call FUNC(dropObject_carry)}, {[_player, _target] call FUNC(canDrop_carry)}] call EFUNC(interact_menu,createAction); [_type, 0, ["ACE_MainActions"], _carryAction] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf index 0adcb624d8..4c4d11ecf6 100644 --- a/addons/dragging/functions/fnc_setDraggable.sqf +++ b/addons/dragging/functions/fnc_setDraggable.sqf @@ -44,7 +44,9 @@ if (_type in _initializedClasses) exitWith {}; _initializedClasses pushBack _type; GVAR(initializedClasses) = _initializedClasses; -private _dragAction = [QGVAR(drag), localize LSTRING(Drag), "", {[_player, _target] call FUNC(startDrag)}, {[_player, _target] call FUNC(canDrag)}] call EFUNC(interact_menu,createAction); +private _icon = [QUOTE(PATHTOF(UI\icons\box_drag.paa)), QUOTE(PATHTOF(UI\icons\person_drag.paa))] select (_object isKindOf "Man"); + +private _dragAction = [QGVAR(drag), localize LSTRING(Drag), _icon, {[_player, _target] call FUNC(startDrag)}, {[_player, _target] call FUNC(canDrag)}] call EFUNC(interact_menu,createAction); private _dropAction = [QGVAR(drop), localize LSTRING(Drop), "", {[_player, _target] call FUNC(dropObject)}, {[_player, _target] call FUNC(canDrop)}] call EFUNC(interact_menu,createAction); [_type, 0, ["ACE_MainActions"], _dragAction] call EFUNC(interact_menu,addActionToClass); diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index fd528b0104..1890dbac1a 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -26,7 +26,7 @@ if (_weight > missionNamespace getVariable ["ACE_maxWeightCarry", 1E11]) exitWit [localize LSTRING(UnableToDrag)] call EFUNC(common,displayTextStructured); }; -private _timer = ACE_time + 5; +private _timer = CBA_missionTime + 5; // handle objects vs persons if (_target isKindOf "CAManBase") then { @@ -46,7 +46,7 @@ if (_target isKindOf "CAManBase") then { [_unit, "AcinPknlMstpSnonWnonDnon_AcinPercMrunSnonWnonDnon", 2, true] call EFUNC(common,doAnimation); [_target, "AinjPfalMstpSnonWrflDnon_carried_Up", 2, true] call EFUNC(common,doAnimation); - _timer = ACE_time + 15; + _timer = CBA_missionTime + 15; } else { diff --git a/addons/dragging/functions/fnc_startCarryPFH.sqf b/addons/dragging/functions/fnc_startCarryPFH.sqf index 4d39672a9e..007469d960 100644 --- a/addons/dragging/functions/fnc_startCarryPFH.sqf +++ b/addons/dragging/functions/fnc_startCarryPFH.sqf @@ -20,7 +20,7 @@ #include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING - systemChat format ["%1 startCarryPFH running", ACE_time]; + systemChat format ["%1 startCarryPFH running", CBA_missionTime]; #endif params ["_args", "_idPFH"]; @@ -28,28 +28,28 @@ _args params ["_unit", "_target", "_timeOut"]; // handle aborting carry if !(_unit getVariable [QGVAR(isCarrying), false]) exitWith { - TRACE_4("carry false",_unit,_target,_timeOut,ACE_time); + TRACE_4("carry false",_unit,_target,_timeOut,CBA_missionTime); [_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,ACE_time); + TRACE_4("dead/distance",_unit,_target,_timeOut,CBA_missionTime); [_unit, _target] call FUNC(dropObject); [_idPFH] call CBA_fnc_removePerFrameHandler; }; // handle persons vs objects if (_target isKindOf "CAManBase") then { - if (ACE_time > _timeOut) exitWith { - TRACE_4("Start carry person",_unit,_target,_timeOut,ACE_time); + if (CBA_missionTime > _timeOut) exitWith { + TRACE_4("Start carry person",_unit,_target,_timeOut,CBA_missionTime); [_unit, _target] call FUNC(carryObject); [_idPFH] call CBA_fnc_removePerFrameHandler; }; } else { - if (ACE_time > _timeOut) exitWith { - TRACE_4("timeout",_unit,_target,_timeOut,ACE_time); + if (CBA_missionTime > _timeOut) exitWith { + TRACE_4("timeout",_unit,_target,_timeOut,CBA_missionTime); [_idPFH] call CBA_fnc_removePerFrameHandler; // drop if in timeout @@ -59,7 +59,7 @@ if (_target isKindOf "CAManBase") then { // wait for the unit to stand up if (stance _unit == "STAND") exitWith { - TRACE_4("Start carry object",_unit,_target,_timeOut,ACE_time); + TRACE_4("Start carry object",_unit,_target,_timeOut,CBA_missionTime); [_unit, _target] call FUNC(carryObject); [_idPFH] call CBA_fnc_removePerFrameHandler; diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 24a279e7a7..8c46fbe122 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -39,7 +39,7 @@ _unit selectWeapon primaryWeapon _unit; [_unit, _target, true] call EFUNC(common,claim); // can't play action that depends on weapon if it was added the same frame -[{_this playActionNow "grabDrag";}, _unit] call EFUNC(common,execNextFrame); +[{_this playActionNow "grabDrag";}, _unit] call CBA_fnc_execNextFrame; // move a bit closer and adjust direction when trying to pick up a person if (_target isKindOf "CAManBase") then { @@ -52,4 +52,4 @@ if (_target isKindOf "CAManBase") then { // prevents draging and carrying at the same time _unit setVariable [QGVAR(isDragging), true, true]; -[FUNC(startDragPFH), 0.2, [_unit, _target, ACE_time + 5]] call CBA_fnc_addPerFrameHandler; +[FUNC(startDragPFH), 0.2, [_unit, _target, CBA_missionTime + 5]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/dragging/functions/fnc_startDragPFH.sqf b/addons/dragging/functions/fnc_startDragPFH.sqf index cfa84fe279..c7843cfdc9 100644 --- a/addons/dragging/functions/fnc_startDragPFH.sqf +++ b/addons/dragging/functions/fnc_startDragPFH.sqf @@ -20,7 +20,7 @@ #include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING - systemChat format ["%1 startDragPFH running", ACE_time]; + systemChat format ["%1 startDragPFH running", CBA_missionTime]; #endif params ["_args", "_idPFH"]; @@ -28,20 +28,20 @@ _args params ["_unit", "_target", "_timeOut"]; // handle aborting drag if !(_unit getVariable [QGVAR(isDragging), false]) exitWith { - TRACE_4("drag false",_unit,_target,_timeOut,ACE_time); + TRACE_4("drag false",_unit,_target,_timeOut,CBA_missionTime); [_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,ACE_time); + TRACE_4("dead/distance",_unit,_target,_timeOut,CBA_missionTime); [_unit, _target] call FUNC(dropObject); [_idPFH] call CBA_fnc_removePerFrameHandler; }; -// timeout. Do nothing. Quit. ACE_time, because anim length is linked to ingame time. -if (ACE_time > _timeOut) exitWith { - TRACE_4("timeout",_unit,_target,_timeOut,ACE_time); +// timeout. Do nothing. Quit. 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; // drop if in timeout @@ -51,7 +51,7 @@ if (ACE_time > _timeOut) exitWith { // unit is ready to start dragging if (animationState _unit in DRAG_ANIMATIONS) exitWith { - TRACE_4("Start Dragging",_unit,_target,_timeOut,ACE_time); + TRACE_4("Start Dragging",_unit,_target,_timeOut,CBA_missionTime); [_unit, _target] call FUNC(dragObject); [_idPFH] call CBA_fnc_removePerFrameHandler; diff --git a/addons/dragging/stringtable.xml b/addons/dragging/stringtable.xml index 5027863807..b0334f3ca2 100644 --- a/addons/dragging/stringtable.xml +++ b/addons/dragging/stringtable.xml @@ -58,7 +58,7 @@ Zvýšit/Snížit Alza/Abbassa Subir/Bajar - Lever/abaisser + Lever/Baisser - \ No newline at end of file + diff --git a/addons/explosives/ACE_Settings.hpp b/addons/explosives/ACE_Settings.hpp index ef6a723d5b..e103b6e018 100644 --- a/addons/explosives/ACE_Settings.hpp +++ b/addons/explosives/ACE_Settings.hpp @@ -1,13 +1,17 @@ class ACE_Settings { - class GVAR(RequireSpecialist) { + class GVAR(requireSpecialist) { + displayName = CSTRING(RequireSpecialist_DisplayName); + description = CSTRING(RequireSpecialist_Description); value = 0; typeName = "BOOL"; }; - class GVAR(PunishNonSpecialists) { + class GVAR(punishNonSpecialists) { + displayName = CSTRING(PunishNonSpecialists_DisplayName); + description = CSTRING(PunishNonSpecialists_Description); value = 1; typeName = "BOOL"; }; - class GVAR(ExplodeOnDefuse) { + class GVAR(explodeOnDefuse) { displayName = CSTRING(ExplodeOnDefuse_DisplayName); description = CSTRING(ExplodeOnDefuse_Description); value = 1; diff --git a/addons/explosives/ACE_Triggers.hpp b/addons/explosives/ACE_Triggers.hpp index 280906432f..145ae0804e 100644 --- a/addons/explosives/ACE_Triggers.hpp +++ b/addons/explosives/ACE_Triggers.hpp @@ -11,52 +11,52 @@ onSetup parameters: class Command { isAttachable = 1; displayName = CSTRING(clacker_displayName); - picture = PATHTOF(Data\UI\Clacker.paa); + picture = QPATHTOF(Data\UI\Clacker.paa); onPlace = QUOTE(_this call FUNC(AddClacker);false); requires[] = {"ACE_Clacker"}; }; class MK16_Transmitter: Command { isAttachable = 1; displayName = CSTRING(M152_displayName); - picture = PATHTOF(Data\UI\MK16_Reciever_ca.paa); + picture = QPATHTOF(Data\UI\MK16_Reciever_ca.paa); requires[] = {"ACE_M26_Clacker"}; }; class DeadManSwitch: Command { isAttachable = 1; displayName = CSTRING(DeadManSwitch_displayName); - picture = PATHTOF(Data\UI\DeadmanSwitch.paa); + picture = QPATHTOF(Data\UI\DeadmanSwitch.paa); requires[] = {"ACE_DeadManSwitch"}; }; class Cellphone: Command { isAttachable = 1; displayName = CSTRING(cellphone_displayName); - picture = PATHTOF(Data\UI\Cellphone_UI.paa); + picture = QPATHTOF(Data\UI\Cellphone_UI.paa); onPlace = QUOTE(_this call FUNC(addCellphoneIED);false); requires[] = {"ACE_Cellphone"}; }; class PressurePlate { isAttachable = 0; displayName = CSTRING(PressurePlate); - picture = PATHTOF(Data\UI\PressurePlate.paa); + picture = QPATHTOF(Data\UI\PressurePlate.paa); onPlace = QUOTE(false); }; class IRSensor { isAttachable = 0; displayName = CSTRING(IRSensor); - picture = PATHTOF(Data\UI\PressurePlate.paa); + picture = QPATHTOF(Data\UI\PressurePlate.paa); onPlace = "false"; }; class Timer { isAttachable = 1; displayName = CSTRING(timerName); - picture = PATHTOF(data\UI\Timer.paa); + picture = QPATHTOF(data\UI\Timer.paa); onPlace = QUOTE([ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false); onSetup = QUOTE(_this call FUNC(openTimerSetUI);true); }; class Tripwire { isAttachable = 0; displayName = CSTRING(TripWire); - picture = PATHTOF(Data\UI\Tripwire.paa); + picture = QPATHTOF(Data\UI\Tripwire.paa); onPlace = "false"; }; }; diff --git a/addons/explosives/CfgAmmo.hpp b/addons/explosives/CfgAmmo.hpp index 977e01e3af..8d81a52613 100644 --- a/addons/explosives/CfgAmmo.hpp +++ b/addons/explosives/CfgAmmo.hpp @@ -31,14 +31,14 @@ class CfgAmmo { class ClaymoreDirectionalMine_Remote_Ammo: DirectionalBombBase { GVAR(magazine) = "ClaymoreDirectionalMine_Remote_Mag"; GVAR(Explosive) = "ClaymoreDirectionalMine_Remote_Ammo_Scripted"; - GVAR(defuseObjectPosition[]) = {0, 0, 0.038}; + GVAR(defuseObjectPosition)[] = {0, 0, 0.038}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; }; // class ClaymoreDirectionalMine_Remote_Ammo_Scripted: ClaymoreDirectionalMine_Remote_Ammo {}; class APERSTripMine_Wire_Ammo: DirectionalBombBase { - GVAR(defuseObjectPosition[]) = {-1.415, 0, 0.12}; + GVAR(defuseObjectPosition)[] = {-1.415, 0, 0.12}; }; class SLAMDirectionalMine_Wire_Ammo: DirectionalBombBase { @@ -66,7 +66,7 @@ class CfgAmmo { class DemoCharge_Remote_Ammo: PipeBombBase { GVAR(magazine) = "DemoCharge_Remote_Mag"; GVAR(Explosive) = "DemoCharge_Remote_Ammo_Scripted"; - GVAR(defuseObjectPosition[]) = {0.07, 0, 0.055}; + GVAR(defuseObjectPosition)[] = {0.07, 0, 0.055}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; hit = 500; @@ -76,7 +76,7 @@ class CfgAmmo { class SatchelCharge_Remote_Ammo: PipeBombBase { GVAR(magazine) = "SatchelCharge_Remote_Mag"; GVAR(Explosive) = "SatchelCharge_Remote_Ammo_Scripted"; - GVAR(defuseObjectPosition[]) = {0.1, 0.1, 0.05}; + GVAR(defuseObjectPosition)[] = {0.1, 0.1, 0.05}; soundActivation[] = {"", 0, 0, 0}; soundDeactivation[] = {"", 0, 0, 0}; }; diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp index 0a40c12726..ced23c6b56 100644 --- a/addons/explosives/CfgEventHandlers.hpp +++ b/addons/explosives/CfgEventHandlers.hpp @@ -32,3 +32,9 @@ class Extended_Put_EventHandlers { GVAR(takeHandler) = QUOTE([ARR_3(_this select 1, _this select 0, _this select 2)] call FUNC(onInventoryChanged)); }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/explosives/CfgModule.hpp b/addons/explosives/CfgModule.hpp index b651903f59..a4e0d8dbd2 100644 --- a/addons/explosives/CfgModule.hpp +++ b/addons/explosives/CfgModule.hpp @@ -3,11 +3,11 @@ class ACE_ModuleExplosive: ACE_Module { author = ECSTRING(common,ACETeam); category = "ACE"; displayName = CSTRING(Module_DisplayName); - function = QUOTE(FUNC(module)); + function = QFUNC(module); scope = 2; isGlobal = 1; isSingular = 1; - icon = PATHTOF(UI\Icon_Module_Explosives_ca.paa); + icon = QPATHTOF(UI\Icon_Module_Explosives_ca.paa); class Arguments { class RequireSpecialist { displayName = CSTRING(RequireSpecialist_DisplayName); diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 9be3a936e5..68d0ac1427 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -1,3 +1,6 @@ + +class CBA_Extended_EventHandlers; + class CfgVehicles { class Man; class CAManBase: Man { @@ -9,7 +12,7 @@ class CfgVehicles { exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 1; priority = 4; - icon = PATHTOF(UI\Explosives_Menu_ca.paa); + icon = QPATHTOF(UI\Explosives_Menu_ca.paa); insertChildren = QUOTE([_player] call FUNC(addTransmitterActions);); //Sub-menu items class ACE_Place { @@ -19,7 +22,7 @@ class CfgVehicles { insertChildren = QUOTE([_player] call FUNC(addExplosiveActions);); exceptions[] = {"isNotSwimming"}; showDisabled = 1; - icon = PATHTOF(UI\Place_Explosive_ca.paa); + icon = QPATHTOF(UI\Place_Explosive_ca.paa); priority = 1; }; class ACE_Cellphone { @@ -28,7 +31,7 @@ class CfgVehicles { statement = "closeDialog 0;createDialog 'Rsc_ACE_PhoneInterface';"; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; showDisabled = 0; - icon = PATHTOF(Data\UI\Cellphone_UI.paa); + icon = QPATHTOF(Data\UI\Cellphone_UI.paa); priority = 0.8; }; }; @@ -37,15 +40,17 @@ class CfgVehicles { class Items_base_F; class ACE_DefuseObject: Items_base_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + author = "ACE"; _generalMacro = "ACE_DefuseObject"; displayName = "ACE Defuse Helper"; mapSize = 0.2; icon = "iconObject_1x2"; model = "\A3\Weapons_f\dummyweapon.p3d"; - scope = 2; - scopeCurator = 1; + scope = 1; vehicleClass = "Cargo"; class ACE_Actions { class ACE_MainActions { @@ -58,45 +63,44 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player,_target)] call FUNC(startDefuse);); exceptions[] = {"isNotSwimming"}; showDisabled = 0; - icon = PATHTOF(UI\Defuse_ca.paa); + icon = QPATHTOF(UI\Defuse_ca.paa); priority = 0.8; - distance = 1; }; }; }; }; class ACE_Explosives_Place: Items_base_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + author = "ACE"; _generalMacro = "ACE_Explosives_Place"; displayName = "Multi-meter"; mapSize = 0.2; icon = "iconObject_1x2"; model = "\A3\Structures_F\Items\Tools\MultiMeter_F.p3d"; - scope = 2; - scopeCurator = 1; + scope = 1; vehicleClass = "Cargo"; class ACE_Actions { class ACE_MainActions { selection = ""; - distance = 1; + distance = 1.5; condition = "true"; class ACE_SetTrigger { selection = ""; displayName = CSTRING(TriggerMenu); - distance = 1; condition = "true"; statement = ""; insertChildren = QUOTE([ARR_3(_target getVariable QUOTE(QGVAR(class)),_target,_player)] call FUNC(addTriggerActions);); showDisabled = 0; exceptions[] = {"isNotSwimming"}; priority = 5; - icon = QUOTE(PATHTOF(UI\Explosives_Menu_ca.paa)); + icon = QPATHTOF(UI\Explosives_Menu_ca.paa); }; class ACE_PickUp { selection = ""; displayName = CSTRING(Pickup); - distance = 1; condition = "true"; statement = QUOTE([ARR_2(_player,_target getVariable QUOTE(QGVAR(class)))] call EFUNC(common,addToInventory);deleteVehicle _target;); showDisabled = 0; diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index cd900b2da3..a3f3b32d4c 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -11,8 +11,8 @@ class CfgWeapons { scope = 2; displayName = CSTRING(clacker_displayName); descriptionShort = CSTRING(clacker_description); - picture = PATHTOF(Data\UI\Clacker.paa); - model = QUOTE(PATHTOF(data\ace_m57.p3d)); + picture = QPATHTOF(Data\UI\Clacker.paa); + model = QPATHTOF(data\ace_m57.p3d); GVAR(Range) = 250; GVAR(Detonator) = 1; GVAR(triggerType) = "Command"; @@ -24,7 +24,7 @@ class CfgWeapons { }; class ACE_M26_Clacker: ACE_Clacker { displayName = CSTRING(M152_Clacker_displayName); - picture = PATHTOF(Data\UI\MK26_Transmitter_ca.paa); + picture = QPATHTOF(Data\UI\MK26_Transmitter_ca.paa); GVAR(Range) = 5000; GVAR(triggerType) = "MK16_Transmitter"; }; @@ -32,7 +32,7 @@ class CfgWeapons { scope = 2; displayName = CSTRING(DefusalKit_displayName); descriptionShort = CSTRING(DefusalKit_description); - picture = PATHTOF(Data\UI\Pliers.paa); + picture = QPATHTOF(Data\UI\Pliers.paa); model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d"; class ItemInfo: ACE_ExplosiveItem { @@ -44,7 +44,7 @@ class CfgWeapons { scope = 2; displayName = CSTRING(DeadManSwitch_displayName); descriptionShort = CSTRING(DeadManSwitch_description); - picture = PATHTOF(Data\UI\DeadmanSwitch.paa); + picture = QPATHTOF(Data\UI\DeadmanSwitch.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; GVAR(Range) = 100; GVAR(Detonator) = 1; @@ -59,7 +59,7 @@ class CfgWeapons { scope = 2; displayName = CSTRING(cellphone_displayName); descriptionShort = CSTRING(cellphone_description); - picture = PATHTOF(Data\UI\Cellphone_UI.paa); + picture = QPATHTOF(Data\UI\Cellphone_UI.paa); model = "\A3\weapons_F\ammo\mag_univ.p3d"; GVAR(Range) = 15000; GVAR(Detonator) = 1; diff --git a/addons/explosives/ExplosivesUI.hpp b/addons/explosives/ExplosivesUI.hpp index 45582a8564..cf97794d8f 100644 --- a/addons/explosives/ExplosivesUI.hpp +++ b/addons/explosives/ExplosivesUI.hpp @@ -113,7 +113,7 @@ class Rsc_ACE_PhoneInterface { class controls { class RscPicture_1200: RscPicture { idc = 1200; - text = PATHTOF(Data\UI\Cellphone_Background.paa); + text = QPATHTOF(Data\UI\Cellphone_Background.paa); x = 0.231875 * safezoneW + safezoneX; y = 0.104 * safezoneH + safezoneY; w = 0.195937 * safezoneW; diff --git a/addons/explosives/XEH_PREP.hpp b/addons/explosives/XEH_PREP.hpp index b3686a986f..0d8a4eeca5 100644 --- a/addons/explosives/XEH_PREP.hpp +++ b/addons/explosives/XEH_PREP.hpp @@ -6,6 +6,7 @@ PREP(addExplosiveActions); PREP(addToSpeedDial); PREP(addTransmitterActions); PREP(addTriggerActions); +PREP(cancelPlacement); PREP(canDefuse); PREP(canDetonate); PREP(connectExplosive); diff --git a/addons/explosives/XEH_missionDisplayLoad.sqf b/addons/explosives/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..1475f774e8 --- /dev/null +++ b/addons/explosives/XEH_missionDisplayLoad.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; +_display displayAddEventHandler ["MouseButtonDown", {[ACE_player, _this select 1] call FUNC(cancelPlacement)}]; diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index e8f12ca6e3..f81cef5f79 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -17,6 +17,7 @@ //Event for setting explosive placement angle/pitch: [QGVAR(place), {_this call FUNC(setPosition)}] call EFUNC(common,addEventHandler); +[QGVAR(startDefuse), FUNC(startDefuse)] call EFUNC(common,addEventHandler); //When getting knocked out in medical, trigger deadman explosives: //Event is global, only run on server (ref: ace_medical_fnc_setUnconscious) @@ -27,6 +28,18 @@ if (isServer) then { TRACE_1("Knocked Out, Doing Deadman", _unit); [_unit] call FUNC(onIncapacitated); }] call EFUNC(common,addEventHandler); + + ["clientRequestsOrientations", { + params ["_logic"]; + TRACE_1("clientRequestsOrientations received:",_logic); + // Filter the array before sending it + GVAR(explosivesOrientations) = GVAR(explosivesOrientations) select { + _x params ["_explosive"]; + (!isNull _explosive && {alive _explosive}) + }; + TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations)); + ["serverSendsOrientations", _logic, [GVAR(explosivesOrientations)]] call EFUNC(common,targetEvent); + }] call EFUNC(common,addEventHandler); }; if (!hasInterface) exitWith {}; @@ -38,19 +51,7 @@ GVAR(CurrentSpeedDial) = 0; // In case we are a JIP client, ask the server for orientation of any previously // placed mine. -if (isServer) then { - ["clientRequestsOrientations", { - params ["_logic"]; - TRACE_1("clientRequestsOrientations received:",_logic); - // Filter the array before sending it - GVAR(explosivesOrientations) = GVAR(explosivesOrientations) select { - _x params ["_explosive"]; - (!isNull _explosive && {alive _explosive}) - }; - TRACE_1("serverSendsOrientations sent:",GVAR(explosivesOrientations)); - ["serverSendsOrientations", _logic, [GVAR(explosivesOrientations)]] call EFUNC(common,targetEvent); - }] call EFUNC(common,addEventHandler); -} else { +if (didJIP) then { ["serverSendsOrientations", { params ["_explosivesOrientations"]; TRACE_1("serverSendsOrientations received:",_explosivesOrientations); @@ -59,14 +60,12 @@ if (isServer) then { TRACE_3("orientation set:",_explosive,_direction,_pitch); [_explosive, _direction, _pitch] call FUNC(setPosition); } forEach _explosivesOrientations; - private _group = group GVAR(localLogic); deleteVehicle GVAR(localLogic); GVAR(localLogic) = nil; - deleteGroup _group; }] call EFUNC(common,addEventHandler); // Create a logic to get the client ID - GVAR(localLogic) = (createGroup sideLogic) createUnit ["Logic", [0,0,0], [], 0, "NONE"]; + GVAR(localLogic) = ([sideLogic] call CBA_fnc_getSharedGroup) createUnit ["Logic", [0,0,0], [], 0, "NONE"]; TRACE_1("clientRequestsOrientations sent:",GVAR(localLogic)); ["clientRequestsOrientations", [GVAR(localLogic)]] call EFUNC(common,serverEvent); }; @@ -81,5 +80,3 @@ if (isServer) then { _this call FUNC(interactEH); }] call EFUNC(common,addEventHandler); - -[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(common,addScrollWheelEventHandler); diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index 3fc047fa6a..5eb92848c7 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_Clacker", "ACE_DefusalKit", "ACE_M26_Clacker", "ACE_DeadManSwitch", "ACE_Cellphone"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"Garth 'L-H' de Wet"}; - authorUrl = "http://garth.snakebiteink.co.za/"; + author = ECSTRING(common,ACETeam); + authors[] = {"Garth 'L-H' de Wet"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/explosives/functions/fnc_addExplosiveActions.sqf b/addons/explosives/functions/fnc_addExplosiveActions.sqf index e744af6bce..fc494a5fad 100644 --- a/addons/explosives/functions/fnc_addExplosiveActions.sqf +++ b/addons/explosives/functions/fnc_addExplosiveActions.sqf @@ -45,7 +45,7 @@ _children = []; format ["Explosive_%1", _forEachIndex], format [_name + " (%1)", _itemCount select _forEachIndex], getText(_x >> "picture"), - {[{_this call FUNC(setupExplosive)}, _this] call EFUNC(common,execNextFrame)}, + {[{_this call FUNC(setupExplosive)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, (configName _x) diff --git a/addons/explosives/functions/fnc_cancelPlacement.sqf b/addons/explosives/functions/fnc_cancelPlacement.sqf new file mode 100644 index 0000000000..e6bd60f637 --- /dev/null +++ b/addons/explosives/functions/fnc_cancelPlacement.sqf @@ -0,0 +1,23 @@ +/* + * Author: Garth 'L-H' de Wet + * Cancels explosives placement. + * + * Arguments: + * 0: Unit + * 1: Key + * + * Return Value: + * None + * + * Example: + * [unit, 1] call ace_explosives_fnc_cancelPlacement + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_key"]; + +if (_key != 1 || {!GVAR(pfeh_running)}) exitWith {}; + +GVAR(placeAction) = PLACE_CANCEL; diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index a01f181635..b7f4893e52 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -49,6 +49,6 @@ if (getNumber (ConfigFile >> "CfgAmmo" >> typeOf (_item select 0) >> "TriggerWhe if (!isNull _explosive) then { _explosive setDamage 1; }; -}, [_item select 0], (_item select 1)] call EFUNC(common,waitAndExecute); +}, [_item select 0], (_item select 1)] call CBA_fnc_waitAndExecute; _result diff --git a/addons/explosives/functions/fnc_dialPhone.sqf b/addons/explosives/functions/fnc_dialPhone.sqf index 44addcda9f..6bfeac8595 100644 --- a/addons/explosives/functions/fnc_dialPhone.sqf +++ b/addons/explosives/functions/fnc_dialPhone.sqf @@ -40,7 +40,7 @@ if (_unit == ace_player) then { [{ playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75]; (_this select 0) setVariable [QGVAR(Dialing), false, true]; - }, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call EFUNC(common,waitAndExecute); + }, [_unit,_explosive select 0], 0.25 * (count _arr - 4)] call CBA_fnc_waitAndExecute; [_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2)] call FUNC(startTimer); }; }; diff --git a/addons/explosives/functions/fnc_handleScrollWheel.sqf b/addons/explosives/functions/fnc_handleScrollWheel.sqf index 0d5fdd2aba..36530afb08 100644 --- a/addons/explosives/functions/fnc_handleScrollWheel.sqf +++ b/addons/explosives/functions/fnc_handleScrollWheel.sqf @@ -15,7 +15,7 @@ */ #include "script_component.hpp" -if ((!GVAR(pfeh_running)) || {ACE_Modifier == 0}) exitWith {false}; +if (!GVAR(pfeh_running)) exitWith {false}; GVAR(TweakedAngle) = ((GVAR(TweakedAngle) + 7.2 * _this) + 360) % 360; diff --git a/addons/explosives/functions/fnc_scriptedExplosive.sqf b/addons/explosives/functions/fnc_scriptedExplosive.sqf index b4abb204b3..6a554ac09c 100644 --- a/addons/explosives/functions/fnc_scriptedExplosive.sqf +++ b/addons/explosives/functions/fnc_scriptedExplosive.sqf @@ -4,7 +4,7 @@ * detonate editor-placed explosives. * * Arguments: - * 0: Explosives objects to detonate + * 0: Explosives objects to detonate * 1: Fuze delay (for each explosive; use negative number for random time up to value) * * Return Value: @@ -18,10 +18,13 @@ */ #include "script_component.hpp" -params ["_explosiveArr",["_fuzeTime",0]]; +params [["_explosiveArr", [], [[], objNull]], ["_fuzeTime", 0, [0]]]; + +if (_explosiveArr isEqualType objNull) then { + _explosiveArr = [_explosiveArr]; +}; -private _detTime; { - _detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime}; + private _detTime = if (_fuzeTime < 0) then {random abs _fuzeTime} else {_fuzeTime}; [objNull, -1, [_x, _detTime]] call FUNC(detonateExplosive); } forEach _explosiveArr; diff --git a/addons/explosives/functions/fnc_setSpeedDial.sqf b/addons/explosives/functions/fnc_setSpeedDial.sqf index 9013c812cc..7e68c9016f 100644 --- a/addons/explosives/functions/fnc_setSpeedDial.sqf +++ b/addons/explosives/functions/fnc_setSpeedDial.sqf @@ -14,8 +14,7 @@ * * Public: No */ - #include "script_component.hpp" - +#include "script_component.hpp" private ["_speedDial", "_amount"]; _speedDial = ace_player getVariable [QGVAR(SpeedDial), []]; diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index b1fdf7216b..6dd1094c6a 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -141,10 +141,10 @@ GVAR(TweakedAngle) = 0; //Don't allow placing in a bad position: if (_badPosition && {GVAR(placeAction) == PLACE_APPROVE}) then {GVAR(placeAction) = PLACE_WAITING;}; - if (((inputAction "zoomTemp") > 0) || //Cancel on RMB, For some reason this works (when held) but AddActionEventHandler doesn't - {_unit != ACE_player} || - {!([_unit, objNull, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} || - {!(_magClassname in (magazines _unit))}) then { + if (_unit != ACE_player || + {!([_unit, objNull, ["isNotSwimming"]] call EFUNC(common,canInteractWith))} || + {!(_magClassname in (magazines _unit))} + ) then { GVAR(placeAction) = PLACE_CANCEL; }; @@ -187,7 +187,7 @@ GVAR(TweakedAngle) = 0; _unit removeMagazine _magClassname; _unit playActionNow "PutDown"; _unit setVariable [QGVAR(PlantingExplosive), true]; - [{_this setVariable [QGVAR(PlantingExplosive), false]}, _unit, 1.5] call EFUNC(common,waitAndExecute); + [{_this setVariable [QGVAR(PlantingExplosive), false]}, _unit, 1.5] call CBA_fnc_waitAndExecute; }; } else { diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf index 84d7274069..e9ba668e0e 100644 --- a/addons/explosives/functions/fnc_startDefuse.sqf +++ b/addons/explosives/functions/fnc_startDefuse.sqf @@ -44,7 +44,7 @@ if (STANCE _unit == "Prone") then { if (ACE_player != _unit) then { // If the unit is a player, call the function on the player. if (isPlayer _unit) then { - [[_unit, _target], QFUNC(startDefuse), _unit] call EFUNC(common,execRemoteFnc); + [QGVAR(startDefuse), _unit, [_unit, _target]] call EFUNC(common,objectEvent); } else { _unit playActionNow _actionToPlay; _unit disableAI "MOVE"; @@ -56,7 +56,7 @@ if (ACE_player != _unit) then { [_unit, _target] call FUNC(defuseExplosive); _unit enableAI "MOVE"; _unit enableAI "TARGET"; - }, [_unit, _target], _defuseTime] call EFUNC(common,waitAndExecute); + }, [_unit, _target], _defuseTime] call CBA_fnc_waitAndExecute; }; } else { _unit playActionNow _actionToPlay; diff --git a/addons/explosives/functions/fnc_startTimer.sqf b/addons/explosives/functions/fnc_startTimer.sqf index ca219ed13c..1f529d9765 100644 --- a/addons/explosives/functions/fnc_startTimer.sqf +++ b/addons/explosives/functions/fnc_startTimer.sqf @@ -25,4 +25,4 @@ TRACE_2("params",_explosive,_delay); if (!isNull _explosive) then { [_explosive, -1, [_explosive, 0]] call FUNC(detonateExplosive); }; -}, [_explosive], _delay] call EFUNC(common,waitAndExecute); +}, [_explosive], _delay] call CBA_fnc_waitAndExecute; diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index 80962d12dd..206f92e977 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -45,7 +45,7 @@ Odpálit VŠE Detonuj wszystkie Detona Tutti - Mise à feu (tous) + Tout mettre à feu Explosive code: %1 @@ -107,16 +107,16 @@ Отмена - +Ctrl rotate - +Strg drehen - +Ctrl girar - +Ctrl tourner - +Ctrl rotazione - +Ctrl otočit - +Ctrl forgatás - +Ctrl obrót - +Ctrl rotaciona - +Ctrl Bращать + Rotate + Drehen + Girar + Tourner + Rotazione + Otočit + Forgatás + Obrót + Rotaciona + Bращать Turn On Thor III @@ -315,7 +315,7 @@ "Zünden"-Menü Menú de detonación Menu detonacji - Menu de mise à feux + Menu de mise à feu Menu detonace Menù di detonazione Robbantási menü @@ -646,7 +646,9 @@ Mina M6 SLAM (atak od dołu) Mina M6 SLAM (Ataque Inferior) - Mine M6 SLAM (Par le bas) + Mine M6 SLAM (par le bas) + Mina M6 SLAM (base) + M6 SLAM (Útok zespoda) Mina M6 SLAM (Ataque Inferior) @@ -661,7 +663,9 @@ Mina M6 SLAM (atak od boku) Mina M6 SLAM (Ataque Lateral) - Mine M6 SLAM (De flanc) + Mine M6 SLAM (de flanc) + STR_ACE_Explosives_Module_SLAMBottomAttack_DisplayName M6 SLAM Mine (Bottom Attack) Mine M6 SLAM (par le bas) M6-SLAM-Mine (Bodenangriff) Mina M6 SLAM (base) Mina M6 SLAM (atak od dołu) Mina M6 SLAM (Laterale) + M6 SLAM (Útok do strany) Mina M6 SLAM (Ataque Lateral) @@ -677,6 +681,8 @@ Duży IED (miejski, płyta naciskowa) IED Grande (Urbano, Placa de presión) Grand EEI (Urbain, plaque de pression) + IED grande (urbano, a pressione) + IED, Velké (Městské, Nášlapné) IED Grande (Urbano, Placa de pressão) @@ -692,6 +698,8 @@ Duży IED (zakopany, płyta naciskowa) IED Grande (Enterrado, Placa de presión) Grand EEI (Enterré, plaque de pression) + IED grande (interrato, a pressione) + IED, Velké (Zakopané, Nášlapné) IED Grande (Enterrado, Placa de pressão) @@ -707,6 +715,8 @@ Mały IED (miejski, płyta naciskowa) IED Pequeño (Urbano, Placa de presión) Petit EEI (Urbain, plaque de pression) + IED piccolo (urbano, a pressione) + IED, Malé (Městské, Nášlapné) IED Pequeno(Urbano, Placa de pressão) @@ -722,6 +732,8 @@ Mały IED (zakopany, płyta naciskowa) IED Pequeño (Enterrado, Placa de presión) Petit EEI (Enterré, plaque de pression) + IED piccolo (interrato, a pressione) + IED, Malé (Zakopané, Nášlapné) IED Pequeno (Enterrado, Placa de pressão) diff --git a/addons/fastroping/$PBOPREFIX$ b/addons/fastroping/$PBOPREFIX$ index 352dc2c83a..c2389fdaf5 100644 --- a/addons/fastroping/$PBOPREFIX$ +++ b/addons/fastroping/$PBOPREFIX$ @@ -1 +1 @@ -z\ace\addons\fastroping +z\ace\addons\fastroping diff --git a/addons/fastroping/CfgEventHandlers.hpp b/addons/fastroping/CfgEventHandlers.hpp index e75956f440..0d3301d6e0 100644 --- a/addons/fastroping/CfgEventHandlers.hpp +++ b/addons/fastroping/CfgEventHandlers.hpp @@ -1,3 +1,9 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + class Extended_PreInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preInit)); diff --git a/addons/fastroping/CfgMoves.hpp b/addons/fastroping/CfgMoves.hpp index da2d0f0613..b978539432 100644 --- a/addons/fastroping/CfgMoves.hpp +++ b/addons/fastroping/CfgMoves.hpp @@ -8,32 +8,12 @@ class CfgMovesBasic { class CfgMovesMaleSdr: CfgMovesBasic { class States { class Crew; - class ACE_freefallLoop: Crew { - file = PATHTOF(anim\freefallLoop.rtm); + class ACE_FastRoping: Crew { + file = QPATHTOF(anim\fastroping.rtm); interpolateTo[] = {"Unconscious", 1}; disableWeapons = 1; disableWeaponsLong = 1; canReload = 0; - looped = 1; - speed = 0.204082; - }; - class ACE_freefallStart: Crew { - file = PATHTOF(anim\freefallStart.rtm); - interpolateTo[] = {"Unconscious", 1}; - disableWeapons = 1; - disableWeaponsLong = 1; - canReload = 0; - looped = 0; - speed = 0.61224502; - }; - class ACE_slidingLoop: Crew { - file = PATHTOF(anim\slidingLoop.rtm); - interpolateTo[] = {"Unconscious", 1}; - disableWeapons = 1; - disableWeaponsLong = 1; - canReload = 0; - looped = 1; - speed = 0.441176; }; }; }; diff --git a/addons/fastroping/CfgSounds.hpp b/addons/fastroping/CfgSounds.hpp new file mode 100644 index 0000000000..97479ecafb --- /dev/null +++ b/addons/fastroping/CfgSounds.hpp @@ -0,0 +1,12 @@ +class CfgSounds { + class GVAR(Rope) { + name = "ACE_Fastroping_Rope"; + sound[] = {QUOTE(PATHTOF(data\sounds\fastroping_rope.ogg)), 10, 1.0}; + titles[] = {}; + }; + class GVAR(Thud) { + name = "ACE_Fastroping_Thud"; + sound[] = {QUOTE(PATHTOF(data\sounds\fastroping_thud.ogg)), 10, 1.0}; + titles[] = {}; + }; +}; \ No newline at end of file diff --git a/addons/fastroping/CfgVehicles.hpp b/addons/fastroping/CfgVehicles.hpp index 560f60cffc..9d45264853 100644 --- a/addons/fastroping/CfgVehicles.hpp +++ b/addons/fastroping/CfgVehicles.hpp @@ -4,7 +4,7 @@ control = "Checkbox"; \ displayName = CSTRING(Eden_equipFRIES); \ tooltip = CSTRING(Eden_equipFRIES_Tooltip); \ - expression = [_this] call FUNC(equipFRIES); \ + expression = QUOTE([_this] call FUNC(equipFRIES)); \ typeName = "BOOL"; \ condition = "objectVehicle"; \ defaultValue = false; \ @@ -12,19 +12,78 @@ } class CfgVehicles { - class Building; - class NonStrategic: Building { - class AnimationSources; + class Logic; + class Module_F: Logic { + class ModuleDescription; }; - class ACE_friesBase: NonStrategic { + class ACE_Module: Module_F {}; + class ACE_moduleEquipFRIES: ACE_Module { + scope = 2; + displayName = CSTRING(Module_FRIES_DisplayName); + icon = QPATHTOF(UI\Icon_Module_FRIES_ca.paa); + category = "ACE"; + function = QFUNC(moduleEquipFRIES); + functionPriority = 10; + isGlobal = 0; + isTriggerActivated = 0; + isDisposable = 0; + author = "BaerMitUmlaut"; + + class ModuleDescription: ModuleDescription { + description = CSTRING(Module_FRIES_Description); + sync[] = {"AnyVehicle"}; + }; + }; + + class Air; + class Helicopter: Air { + class ACE_SelfActions { + class ACE_prepareFRIES { + displayName = CSTRING(Interaction_prepareFRIES); + condition = QUOTE([vehicle _player] call FUNC(canPrepareFRIES)); + statement = QUOTE([vehicle _player] call FUNC(prepareFRIES)); + showDisabled = 0; + priority = 1; + }; + class ACE_deployRopes { + displayName = CSTRING(Interaction_deployRopes); + condition = QUOTE([ARR_2(_player, vehicle _player)] call FUNC(canDeployRopes)); + statement = QUOTE([ARR_2(QUOTE(QGVAR(deployRopes)), [vehicle _player])] call EFUNC(common,serverEvent)); + showDisabled = 0; + priority = 1; + }; + class ACE_cutRopes { + displayName = CSTRING(Interaction_cutRopes); + condition = [vehicle _player] call FUNC(canCutRopes); + statement = [vehicle _player] call FUNC(cutRopes); + showDisabled = 0; + priority = 1; + }; + class ACE_fastRope { + displayName = CSTRING(Interaction_fastRope); + condition = [_player, vehicle _player] call FUNC(canFastRope); + statement = [_player, vehicle _player] call FUNC(fastRope); + showDisabled = 0; + priority = 1; + }; + }; + }; + + class Helicopter_Base_F; + class ACE_friesBase: Helicopter_Base_F { destrType = ""; + class Turrets {}; + class ACE_Actions {}; + class ACE_SelfActions {}; + EGVAR(cargo,hasCargo) = 0; + EGVAR(cargo,space) = 0; }; class ACE_friesAnchorBar: ACE_friesBase { author = "jokoho48"; scope = 1; - model = PATHTOF(data\friesAnchorBar.p3d); + model = QPATHTOF(data\friesAnchorBar.p3d); animated = 1; - class AnimationSources: AnimationSources { + class AnimationSources { class extendHookRight { source = "user"; initPhase = 0; @@ -40,9 +99,9 @@ class CfgVehicles { class ACE_friesGantry: ACE_friesBase { author = "jokoho48"; scope = 1; - model = PATHTOF(data\friesGantry.p3d); + model = QPATHTOF(data\friesGantry.p3d); animated = 1; - class AnimationSources: AnimationSources { + class AnimationSources { class adjustWidth { source = "user"; initPhase = 0.211; @@ -58,6 +117,16 @@ class CfgVehicles { initPhase = 0; animPeriod = 0; }; + class hideGantryLeft { + source = "user"; + initPhase = 0; + animPeriod = 0; + }; + class hideGantryRight { + source = "user"; + initPhase = 0; + animPeriod = 0; + }; }; }; class ACE_friesGantryReverse: ACE_friesGantry { @@ -80,128 +149,94 @@ class CfgVehicles { }; }; - class Logic; - class Module_F: Logic { - class ModuleDescription; - }; - class ACE_Module: Module_F {}; - class ACE_moduleEquipFRIES: ACE_Module { - scope = 2; - displayName = CSTRING(Module_FRIES_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_FRIES_ca.paa)); - category = "ACE"; - function = QUOTE(FUNC(moduleEquipFRIES)); - functionPriority = 10; - isGlobal = 0; - isTriggerActivated = 0; - isDisposable = 0; - author = "BaerMitUmlaut"; - - class ModuleDescription: ModuleDescription { - description = CSTRING(Module_FRIES_Description); - sync[] = {"AnyVehicle"}; - }; - }; - - class Air; - class Helicopter: Air { - class ACE_SelfActions { - class ACE_prepareFRIES { - displayName = CSTRING(Interaction_prepareFRIES); - condition = [vehicle _player] call FUNC(canPrepareFRIES); - statement = [vehicle _player] call FUNC(prepareFRIES); - showDisabled = 0; - priority = 1; - }; - class ACE_deployRopes { - displayName = CSTRING(Interaction_deployRopes); - condition = [_player, vehicle _player] call FUNC(canDeployRopes); - statement = [QGVAR(deployRopes), [vehicle _player]] call EFUNC(common,serverEvent); - showDisabled = 0; - priority = 1; - }; - class ACE_cutRopes { - displayName = CSTRING(Interaction_cutRopes); - condition = [vehicle _player] call FUNC(canCutRopes); - statement = [vehicle _player] call FUNC(cutRopes); - showDisabled = 0; - priority = 1; - }; - class ACE_fastRope { - displayName = CSTRING(Interaction_fastRope); - condition = [_player, vehicle _player] call FUNC(canFastRope); - statement = [_player, vehicle _player] call FUNC(fastRope); - showDisabled = 0; - priority = 1; - }; - }; - }; - - class Helicopter_Base_H; - class Helicopter_Base_F; - class GVAR(helper): Helicopter_Base_F { author = "KoffeinFlummi"; scope = 1; - model = PATHTOF(data\helper.p3d); - class ACE_Actions { - class ACE_MainActions { - condition = "false"; - }; - }; + model = QPATHTOF(data\helper.p3d); + class ACE_Actions {}; class Turrets {}; }; + class Helicopter_Base_H; class Heli_Light_02_base_F: Helicopter_Base_H { GVAR(enabled) = 1; - GVAR(ropeOrigins[]) = {{1.41, 1.38, 0}, {-1.41, 1.38, 0}}; + GVAR(ropeOrigins)[] = {{1.41, 1.38, 0}, {-1.41, 1.38, 0}}; GVAR(onPrepare) = QFUNC(onPrepareCommon); GVAR(onCut) = QFUNC(onCutCommon); }; class Heli_Attack_02_base_F: Helicopter_Base_F { GVAR(enabled) = 1; - GVAR(ropeOrigins[]) = {{1.25, 1.5, -0.6}, {-1.1, 1.5, -0.6}}; + GVAR(ropeOrigins)[] = {{1.25, 1.5, -0.6}, {-1.1, 1.5, -0.6}}; GVAR(onPrepare) = QFUNC(onPrepareCommon); GVAR(onCut) = QFUNC(onCutCommon); }; class Heli_Transport_01_base_F: Helicopter_Base_H { GVAR(enabled) = 2; - GVAR(ropeOrigins[]) = {"ropeOriginRight", "ropeOriginLeft"}; + GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"}; GVAR(friesType) = "ACE_friesAnchorBar"; - GVAR(friesAttachmentPoint[]) = {0.065, 2.2, -0.15}; + GVAR(friesAttachmentPoint)[] = {0.065, 2.2, -0.15}; GVAR(onPrepare) = QFUNC(onPrepareCommon); GVAR(onCut) = QFUNC(onCutCommon); EQUIP_FRIES_ATTRIBUTE; }; class Heli_Transport_02_base_F: Helicopter_Base_H { GVAR(enabled) = 1; - GVAR(ropeOrigins[]) = {{0.94, -4.82, -1.16}, {-0.94, -4.82, -1.16}}; + GVAR(ropeOrigins)[] = {{0.94, -4.82, -1.16}, {-0.94, -4.82, -1.16}}; + GVAR(onPrepare) = QFUNC(onPrepareCommon); + GVAR(onCut) = QFUNC(onCutCommon); + + class UserActions { + class Ramp_Open; + class Ramp_Close: Ramp_Open { + condition = QUOTE([ARR_5(this,'CargoRamp_Open',[[0],[1],[2]])] call FUNC(canCloseRamp)); + }; + }; }; class Heli_Transport_03_base_F: Helicopter_Base_H { GVAR(enabled) = 1; - GVAR(ropeOrigins[]) = {{0.75, -5.29, -0.11}, {-0.87, -5.29, -0.11}}; + GVAR(ropeOrigins)[] = {{0.75, -5.29, -0.11}, {-0.87, -5.29, -0.11}}; + GVAR(onPrepare) = QFUNC(onPrepareCommon); + GVAR(onCut) = QFUNC(onCutCommon); + + class UserActions { + class Ramp_Open; + class Ramp_Close: Ramp_Open { + condition = QUOTE([ARR_5(this,'Door_rear_source',[[0],[3],[4]])] call FUNC(canCloseRamp)); + }; + }; }; class Heli_light_03_base_F: Helicopter_Base_F { GVAR(enabled) = 2; - GVAR(ropeOrigins[]) = {"ropeOriginRight", "ropeOriginLeft"}; + GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"}; GVAR(friesType) = "ACE_friesGantryReverse"; - GVAR(friesAttachmentPoint[]) = {1.04, 2.5, -0.34}; + GVAR(friesAttachmentPoint)[] = {-1.04, 2.5, -0.34}; EQUIP_FRIES_ATTRIBUTE; }; class Heli_light_03_unarmed_base_F: Heli_light_03_base_F { GVAR(enabled) = 2; - GVAR(ropeOrigins[]) = {"ropeOriginRight", "ropeOriginLeft"}; + GVAR(ropeOrigins)[] = {"ropeOriginRight", "ropeOriginLeft"}; GVAR(friesType) = "ACE_friesGantry"; - GVAR(friesAttachmentPoint[]) = {-1.07, 3.26, -0.5}; + GVAR(friesAttachmentPoint)[] = {-1.07, 3.26, -0.5}; EQUIP_FRIES_ATTRIBUTE; }; - class Heli_Transport_04_base_F; + class Heli_Transport_04_base_F: Helicopter_Base_H { + class UserActions; + }; class O_Heli_Transport_04_bench_F: Heli_Transport_04_base_F { GVAR(enabled) = 1; - GVAR(ropeOrigins[]) = {{1.03, 1.6, -0.23}, {1.03, -1.36, -0.23}, {-1.23, 1.6, -0.23}, {-1.23, -1.36, -0.23}}; + GVAR(ropeOrigins)[] = {{1.03, 1.6, -0.23}, {1.03, -1.36, -0.23}, {-1.23, 1.6, -0.23}, {-1.23, -1.36, -0.23}}; }; class O_Heli_Transport_04_covered_F: Heli_Transport_04_base_F { GVAR(enabled) = 1; - GVAR(ropeOrigins[]) = {{0.83, -4.7, -0.03}, {-1.02, -4.7, -0.03}}; + GVAR(ropeOrigins)[] = {{0.83, -4.7, -0.03}, {-1.02, -4.7, -0.03}}; + GVAR(onPrepare) = QFUNC(onPrepareCommon); + GVAR(onCut) = QFUNC(onCutCommon); + + class UserActions: UserActions { + class CloseDoor_6; + class Ramp_Close: CloseDoor_6 { + condition = QUOTE([ARR_6(this,'Door_6_source',[[0],[1],[2],[3]])] call FUNC(canCloseRamp)); + }; + }; }; }; diff --git a/addons/fastroping/CfgWaypoints.hpp b/addons/fastroping/CfgWaypoints.hpp new file mode 100644 index 0000000000..f3303c28ff --- /dev/null +++ b/addons/fastroping/CfgWaypoints.hpp @@ -0,0 +1,11 @@ +class CfgWaypoints { + class ACE { + displayName = "ACE"; + class Fastrope { + displayName = CSTRING(Waypoint_Fastrope); + displayNameDebug = "Fastrope"; + file = QPATHTOF(functions\fnc_deployAIWaypoint.sqf); + icon = QPATHTOF(UI\Icon_Waypoint.paa); + }; + }; +}; diff --git a/addons/difficulties/README.md b/addons/fastroping/README.md similarity index 53% rename from addons/difficulties/README.md rename to addons/fastroping/README.md index 4aefb4570a..49fcf00960 100644 --- a/addons/difficulties/README.md +++ b/addons/fastroping/README.md @@ -1,12 +1,11 @@ -ace_difficulties -================ - -Changes the elite difficulty setting to more closely resemble Arma 2. +ace_fastroping +========== +Introducing the ability to fastrope out of heliocopters. ## Maintainers The people responsible for merging changes to this component or answering potential questions. +- [BaerMitUmlaut](https://github.com/BaerMitUmlaut) - [KoffeinFlummi](https://github.com/KoffeinFlummi) -- [commy2](https://github.com/commy2) diff --git a/addons/fastroping/UI/Icon_Waypoint.paa b/addons/fastroping/UI/Icon_Waypoint.paa new file mode 100644 index 0000000000..4f7d9086ae Binary files /dev/null and b/addons/fastroping/UI/Icon_Waypoint.paa differ diff --git a/addons/fastroping/XEH_PREP.hpp b/addons/fastroping/XEH_PREP.hpp new file mode 100644 index 0000000000..99e1c8b817 --- /dev/null +++ b/addons/fastroping/XEH_PREP.hpp @@ -0,0 +1,18 @@ +PREP(canCloseRamp); +PREP(canCutRopes); +PREP(canDeployRopes); +PREP(canFastRope); +PREP(canPrepareFRIES); +PREP(checkVehicleThread); +PREP(cutRopes); +PREP(deployAI); +PREP(deployRopes); +PREP(equipFRIES); +PREP(fastRope); +PREP(fastRopeLocalPFH); +PREP(fastRopeServerPFH); +PREP(moduleEquipFRIES); +PREP(onCutCommon); +PREP(onPrepareCommon); +PREP(onRopeBreak); +PREP(prepareFRIES); diff --git a/addons/fastroping/XEH_postInit.sqf b/addons/fastroping/XEH_postInit.sqf index 873d1091e5..ae88feaa76 100644 --- a/addons/fastroping/XEH_postInit.sqf +++ b/addons/fastroping/XEH_postInit.sqf @@ -7,8 +7,3 @@ [QGVAR(startFastRope), { [FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler; }] call EFUNC(common,addEventHandler); - -[QGVAR(ropeDetach), { - params ["_object", "_rope"]; - _object ropeDetach _rope; -}] call EFUNC(common,addEventHandler); diff --git a/addons/fastroping/XEH_preInit.sqf b/addons/fastroping/XEH_preInit.sqf index 39aeb66a94..a7feade1c3 100644 --- a/addons/fastroping/XEH_preInit.sqf +++ b/addons/fastroping/XEH_preInit.sqf @@ -2,20 +2,6 @@ ADDON = false; -PREP(canCutRopes); -PREP(canDeployRopes); -PREP(canFastRope); -PREP(canPrepareFRIES); -PREP(cutRopes); -PREP(deployRopes); -PREP(equipFRIES); -PREP(fastRope); -PREP(fastRopeLocalPFH); -PREP(fastRopeServerPFH); -PREP(moduleEquipFRIES); -PREP(onCutCommon); -PREP(onPrepareCommon); -PREP(onRopeBreak); -PREP(prepareFRIES); +#include "XEH_PREP.hpp" ADDON = true; diff --git a/addons/headless/XEH_preStart.sqf b/addons/fastroping/XEH_preStart.sqf similarity index 100% rename from addons/headless/XEH_preStart.sqf rename to addons/fastroping/XEH_preStart.sqf diff --git a/addons/fastroping/anim/LICENSE b/addons/fastroping/anim/LICENSE deleted file mode 100644 index 2274430c9b..0000000000 --- a/addons/fastroping/anim/LICENSE +++ /dev/null @@ -1,110 +0,0 @@ -ARMA PUBLIC LICENSE -https://www.bistudio.com/community/licenses/arma-public-license - -Brief summary of this Licence - -PLEASE, NOTE THAT THIS SUMMARY HAS NO LEGAL EFFECT AND IS ONLY OF AN INFORMATORY NATURE DESIGNED FOR YOU TO GET THE BASIC INFORMATION ABOUT THE CONTENT OF THIS LICENCE. THE ONLY LEGALLY BINDING PROVISIONS ARE THOSE IN THE ORIGINAL AND FULL TEXT OF THIS LICENCE. - -With this licence you are free to adapt (i.e. modify, rework or update) and share (i.e. copy, distribute or transmit) the material under the following conditions: - - Attribution - You must attribute the material in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the material). - Noncommercial - You may not use this material for any commercial purposes. - Arma Only - You may not convert or adapt this material to be used in other games than Arma. - -By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Arma Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. - -Section 1 - Definitions - - Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. - Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. - ArmaOnly means primarily intended for or directed towards the use in any of existing and future Arma games, including but not limited to Arma: Cold War Assault, Arma, Arma 2 and Arma 3 and its official sequels and expansion packs. - Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. - Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. - Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. - Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. - Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. - Licensor means the individual(s) or entity(ies) granting rights under this Public License. - NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. - Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. - Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. - You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. - -Section 2 – Scope - - License grant - Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: - reproduce and Share the Licensed Material, in whole or in part, for NonCommercial and ArmaOnly purposes only; and - produce, reproduce, and Share Adapted Material for NonCommercial and ArmaOnly purposes only. - Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. - Term. The term of this Public License is specified in Section 6(a). - Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. - Downstream recipients. - Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. - No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. - No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(a)(i). - Other rights - Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. - Patent and trademark rights are not licensed under this Public License. - To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial and ArmaOnly purposes. - -Section 3 – License Conditions - -Your exercise of the Licensed Rights is expressly made subject to the following conditions. - - Attribution - - If You Share the Licensed Material (including in modified form), You must: - retain the following if it is supplied by the Licensor with the Licensed Material: - identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); - a copyright notice; - a notice that refers to this Public License; - a notice that refers to the disclaimer of warranties; - a URI or hyperlink to the Licensed Material to the extent reasonably practicable; - indicate if You modified the Licensed Material and retain an indication of any previous modifications; and - indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. - You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. - If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(a) to the extent reasonably practicable. - If You Share Adapted Material You produce, the Adapter’s License You apply must not prevent recipients of the Adapted Material from complying with this Public License. - -Section 4 – Sui Generis Database Rights - -Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: - - for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial and ArmaOnly purposes only; - if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and - You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. - -Section 5 – Disclaimer of Warranties and Limitation of Liability - - Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. - To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. - The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. - -Section 6 – Term and Termination - - This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. - - Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: - automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or - upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. - For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. - Sections 1, 5, 6, 7, and 8 survive termination of this Public License. - -Section 7 – Other Terms and Conditions - - The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. - Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. - -Section 8 – Interpretation - - For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. - To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. - No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. - Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. - -Bohemia Interactive Notices - - Bohemia Interactive a.s. is not a party to this License, and makes no warranty whatsoever in connection with the Licensed Material. Bohemia Interactive a.s. will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, Bohemia Interactive a.s. may elect to apply the Public License to material it publishes and in those instances it becomes the "Licensor". - Except for the limited purpose of indicating to the public that the Licensed Material is shared under this Public License, Bohemia Interactive a.s. does not authorize the use by either party of the trademarks "Arma", "Bohemia Interactive" or any related trademark or logo of Arma or Bohemia Interactive without the prior written consent of Bohemia Interactive a.s. diff --git a/addons/fastroping/anim/fastroping.rtm b/addons/fastroping/anim/fastroping.rtm new file mode 100644 index 0000000000..9742732a56 Binary files /dev/null and b/addons/fastroping/anim/fastroping.rtm differ diff --git a/addons/fastroping/anim/freefallLoop.rtm b/addons/fastroping/anim/freefallLoop.rtm deleted file mode 100644 index 1046bdd4c0..0000000000 Binary files a/addons/fastroping/anim/freefallLoop.rtm and /dev/null differ diff --git a/addons/fastroping/anim/freefallStart.rtm b/addons/fastroping/anim/freefallStart.rtm deleted file mode 100644 index 58aeccc0d9..0000000000 Binary files a/addons/fastroping/anim/freefallStart.rtm and /dev/null differ diff --git a/addons/fastroping/anim/slidingLoop.rtm b/addons/fastroping/anim/slidingLoop.rtm deleted file mode 100644 index def4133633..0000000000 Binary files a/addons/fastroping/anim/slidingLoop.rtm and /dev/null differ diff --git a/addons/fastroping/config.cpp b/addons/fastroping/config.cpp index 25ec1876fa..c451a1b0dd 100644 --- a/addons/fastroping/config.cpp +++ b/addons/fastroping/config.cpp @@ -6,12 +6,15 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"KoffeinFlummi", "BaerMitUmlaut"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi", "BaerMitUmlaut"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgEventHandlers.hpp" #include "CfgMoves.hpp" +#include "CfgSounds.hpp" #include "CfgVehicles.hpp" +#include "CfgWaypoints.hpp" diff --git a/addons/fastroping/data/model.cfg b/addons/fastroping/data/model.cfg index de8c55b45d..3291e7a509 100644 --- a/addons/fastroping/data/model.cfg +++ b/addons/fastroping/data/model.cfg @@ -90,6 +90,24 @@ class CfgModels { angle0 = "rad 0"; angle1 = "rad 360"; }; + class hideGantryLeft { + type = "hide"; + source = ""; + selection = "gantryLeft"; + animPeriod = 0; + minValue = 0; + maxValue = 1; + hideValue = 0.99999; + }; + class hideGantryRight { + type = "hide"; + source = ""; + selection = "gantryRight"; + animPeriod = 0; + minValue = 0; + maxValue = 1; + hideValue = 0.99999; + }; }; }; }; diff --git a/addons/fastroping/data/sounds/LICENSE.md b/addons/fastroping/data/sounds/LICENSE.md new file mode 100644 index 0000000000..71835222cd --- /dev/null +++ b/addons/fastroping/data/sounds/LICENSE.md @@ -0,0 +1,6 @@ +Source sounds are adapted and changed. + +**Fastroping_Rope (fastroping_rope.ogg):** +"[Rub.aif](http://freesound.org/people/le_abbaye_Noirlac/sounds/129471/)" by [Tessa Elieff](http://freesound.org/people/le_abbaye_Noirlac/) is [CreativeCommons Attributions 3.0](http://creativecommons.org/licenses/by/3.0/) + +All other sounds from helenacm and Adam_N, both under Creative Commons 0 (no attribution required). \ No newline at end of file diff --git a/addons/fastroping/data/sounds/fastroping_rope.ogg b/addons/fastroping/data/sounds/fastroping_rope.ogg new file mode 100644 index 0000000000..ec68da2960 Binary files /dev/null and b/addons/fastroping/data/sounds/fastroping_rope.ogg differ diff --git a/addons/fastroping/data/sounds/fastroping_thud.ogg b/addons/fastroping/data/sounds/fastroping_thud.ogg new file mode 100644 index 0000000000..40fd823fcf Binary files /dev/null and b/addons/fastroping/data/sounds/fastroping_thud.ogg differ diff --git a/addons/fastroping/functions/fnc_canCloseRamp.sqf b/addons/fastroping/functions/fnc_canCloseRamp.sqf new file mode 100644 index 0000000000..58827cb29b --- /dev/null +++ b/addons/fastroping/functions/fnc_canCloseRamp.sqf @@ -0,0 +1,29 @@ +/* + * Author: BaerMitUmlaut + * Checks if the player can close the ramp of the given helo. + * + * Arguments: + * 0: The helicopter + * 1: The ramp animation name + * 2: Turret paths that can close the ramp + * + * Return Value: + * Able to close ramp + * + * Example: + * [_player, _vehicle] call ace_fastroping_fnc_canCloseRamp + * + * Public: No + */ + +#include "script_component.hpp" +params ["_vehicle", "_door", "_turretPaths"]; + +(_vehicle doorPhase _door > 0.5) && +{alive _vehicle} && +{(_vehicle getVariable ["bis_disabled_Ramp", 0]) != 1} && +{!(_vehicle getVariable [QGVAR(doorsLocked), false])} && +{ + (ACE_player == driver _vehicle) || + {((assignedVehicleRole ACE_player) param [1, []]) in _turretPaths} +} diff --git a/addons/fastroping/functions/fnc_canDeployRopes.sqf b/addons/fastroping/functions/fnc_canDeployRopes.sqf index 59a26c6a17..6c8f1d28ed 100644 --- a/addons/fastroping/functions/fnc_canDeployRopes.sqf +++ b/addons/fastroping/functions/fnc_canDeployRopes.sqf @@ -17,14 +17,16 @@ #include "script_component.hpp" params ["_unit", "_vehicle"]; -private ["_deployedRopes", "_config"]; +private ["_config", "_enabled", "_deploymentStage"]; -_deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; _config = configFile >> "CfgVehicles" >> typeOf _vehicle; +_enabled = getNumber (_config >> QGVAR(enabled)); +_deploymentStage = _vehicle getVariable [QGVAR(deploymentStage), 0]; -((driver _vehicle != _unit) && +(driver _vehicle != _unit) && +{getPos _vehicle select 2 > 2} && +{_enabled == 1 || {_enabled == 2 && {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}}} && { - ((_vehicle getVariable [QGVAR(deploymentStage), 0]) == 2) || - {!(isText (_config >> QGVAR(onPrepare))) && {(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0}} -} && -{getPos _vehicle select 2 > 2}) + (_deploymentStage == 0 && {getText (_config >> QGVAR(onPrepare)) == ""}) || + {_deploymentStage == 2 && {getText (_config >> QGVAR(onPrepare)) != ""}} +} diff --git a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf index 8231dca805..67e2165c3f 100644 --- a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf @@ -16,12 +16,9 @@ #include "script_component.hpp" params ["_vehicle"]; -private ["_deployedRopes", "_config"]; -_deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; -_config = configFile >> "CfgVehicles" >> typeOf _vehicle; +private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; -(isNumber (_config >> QGVAR(enabled)) && -{(getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}} && +((getNumber (_config >> QGVAR(enabled)) == 1) || {!(isNull (_vehicle getVariable [QGVAR(FRIES), objNull]))}) && {(_vehicle getVariable [QGVAR(deploymentStage), 0]) == 0} && -{isText (_config >> QGVAR(onPrepare))}) +{getText (_config >> QGVAR(onPrepare)) != ""} diff --git a/addons/fastroping/functions/fnc_checkVehicleThread.sqf b/addons/fastroping/functions/fnc_checkVehicleThread.sqf new file mode 100644 index 0000000000..38a2cad8c6 --- /dev/null +++ b/addons/fastroping/functions/fnc_checkVehicleThread.sqf @@ -0,0 +1,25 @@ +/* + * Author: BaerMitUmlaut + * Checks if the given helicopter still exits, and if not, destroys the FRIES. + * + * Arguments: + * 0: The helicopter + * 1: The helicopter's FRIES + * + * Return Value: + * None + * + * Example: + * [_vehicle, _fries] call ace_fastroping_fnc_checkVehicleThread + * + * Public: No + */ + +#include "script_component.hpp" +params ["_vehicle", "_fries"]; + +if (isNull _vehicle) then { + deleteVehicle _fries; +} else { + [FUNC(checkVehicleThread), _this, 5] call CBA_fnc_waitAndExecute; +}; diff --git a/addons/fastroping/functions/fnc_cutRopes.sqf b/addons/fastroping/functions/fnc_cutRopes.sqf index 88b02a70af..d619a24297 100644 --- a/addons/fastroping/functions/fnc_cutRopes.sqf +++ b/addons/fastroping/functions/fnc_cutRopes.sqf @@ -32,8 +32,11 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; }; }; - [QGVAR(ropeDetach), [_hook, _ropeTop]] call EFUNC(common,serverEvent); - [{{deleteVehicle _x} count _this}, [_ropeTop, _ropeBottom, _dummy, _hook], 60] call EFUNC(common,waitAndExecute); + //Destroy rope + //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; _vehicle setVariable [QGVAR(deployedRopes), [], true]; @@ -47,4 +50,4 @@ if (isText (_config >> QGVAR(onCut))) then { [{ _this setVariable [QGVAR(deploymentStage), 0, true]; -}, _vehicle, _waitTime] call EFUNC(common,waitAndExecute); +}, _vehicle, _waitTime] call CBA_fnc_waitAndExecute; diff --git a/addons/fastroping/functions/fnc_deployAI.sqf b/addons/fastroping/functions/fnc_deployAI.sqf new file mode 100644 index 0000000000..843f23cdb5 --- /dev/null +++ b/addons/fastroping/functions/fnc_deployAI.sqf @@ -0,0 +1,96 @@ +/* + * Author: BaerMitUmlaut + * Auomatically deploy a helicopter filled with AI units. + * + * Arguments: + * 0: The helicopter + * 1: Deploy special roles (gunners, copilot) (default: false) + * 2: Create deployment group (default: true) + * + * Return Value: + * None + * + * Example: + * [_vehicle] call ace_fastroping_fnc_deployAI + * + * Public: Yes + */ + +#include "script_component.hpp" +params [["_vehicle", objNull, [objNull]], ["_deploySpecial", false, [true]], ["_createDeploymentGroup", true, [true]]]; +private ["_config", "_configEnabled", "_deployTime", "_unitsToDeploy", "_deployGroup"]; + +if (isNull _vehicle || {!(_vehicle isKindOf "Helicopter")}) exitWith { + if (hasInterface) then { + // Note: BIS_fnc_guiMessage causes a CTD with call, so spawn is used instead. + ["deployAI was called with an invalid or non-existant vehicle.", QFUNC(deployAI)] spawn BIS_fnc_guiMessage; + }; + ACE_LOGERROR('FUNC(deployAI): deployAI was called with an invalid or non-existant vehicle.'); +}; + +_config = configFile >> "CfgVehicles" >> typeOf _vehicle; +_configEnabled = getNumber (_config >> QGVAR(enabled)); +if (_configEnabled == 0) exitWith { + if (hasInterface) then { + [format ["You cannot fast rope from a ""%1"" helicopter.", getText (_config >> "DisplayName")], QFUNC(deployAI)] spawn BIS_fnc_guiMessage; + }; + ACE_LOGERROR_1('FUNC(deployAI): You cannot fast rope from a "%1" helicopter.',getText (_config >> "DisplayName")); +}; + +if (_configEnabled == 2 && {isNull (_vehicle getVariable [QGVAR(FRIES), objNull])}) exitWith { + if (hasInterface) then { + [format ["""%1"" requires a FRIES for fastroping, but has not been equipped with one.", getText (_config >> "DisplayName")], QFUNC(deployAI)] spawn BIS_fnc_guiMessage; + }; + ACE_LOGERROR_1('FUNC(deployAI): "%1" requires a FRIES for fastroping but has not been equipped with one.',getText (_config >> "DisplayName")); +}; + +_unitsToDeploy = crew _vehicle; +if (_deploySpecial) then { + _unitsToDeploy deleteAt (_unitsToDeploy find driver _vehicle); +} else { + _unitsToDeploy = _unitsToDeploy select {(assignedVehicleRole _x) select 0 == "cargo"}; +}; + +if (_unitsToDeploy isEqualTo []) exitWith { + ACE_LOGWARNING_1('FUNC(deployAI): Found no units to deploy in "%1".',getText (_config >> "DisplayName")); +}; + +if (_createDeploymentGroup) then { + _deployGroup = createGroup side (_unitsToDeploy select 0); + _unitsToDeploy joinSilent _deployGroup; +}; + +_deployTime = 0; +if (getText (_config >> QGVAR(onPrepare)) != "") then { + _deployTime = [_vehicle] call (missionNamespace getVariable (getText (_config >> QGVAR(onPrepare)))); +}; +[{[_this] call FUNC(deployRopes)}, _vehicle, _deployTime] call CBA_fnc_waitAndExecute; +driver _vehicle disableAI "MOVE"; + +DFUNC(deployAIRecursive) = { + params ["_vehicle", "_unitsToDeploy"]; + + private _unit = _unitsToDeploy deleteAt 0; + unassignVehicle _unit; + [_unit, _vehicle] call FUNC(fastRope); + + if !(_unitsToDeploy isEqualTo []) then { + [{ + [{ + params ["_vehicle"]; + private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; + ({!(_x select 5)} count (_deployedRopes)) > 0 + }, FUNC(deployAIRecursive), _this] call CBA_fnc_waitUntilAndExecute; + }, [_vehicle, _unitsToDeploy], 1] call CBA_fnc_waitAndExecute; + } else { + [{ + private _deployedRopes = _this getVariable [QGVAR(deployedRopes), []]; + ({_x select 5} count (_deployedRopes)) == 0 + }, { + [_this] call FUNC(cutRopes); + driver _this enableAI "MOVE"; + }, _vehicle] call CBA_fnc_waitUntilAndExecute; + }; +}; + +[FUNC(deployAIRecursive), [_vehicle, _unitsToDeploy], _deployTime + 4] call CBA_fnc_waitAndExecute; diff --git a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf new file mode 100644 index 0000000000..9d8f4a03e2 --- /dev/null +++ b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf @@ -0,0 +1,42 @@ +/* + * Author: BaerMitUmlaut + * Waypoint function for the fast rope waypoint. + * + * Arguments: + * 0: Group + * 1: Waypoint position + * + * Return Value: + * true + * + * Example: + * [_group, [6560, 12390, 0]] call ace_fastroping_fnc_deployAIWayoint + * + * Public: No + */ + +#include "script_component.hpp" +params [["_group", grpNull, [grpNull]], ["_position", [0, 0, 0], [[]], 3]]; +private ["_vehicle", "_commander", "_speedMode"]; + +_vehicle = vehicle leader _group; +_commander = effectiveCommander _vehicle; +_speedMode = speedMode _group; + +// - Approach ----------------------------------------------------------------- +if (_vehicle distance2D _position > 50) then { + _group setSpeedMode "LIMITED"; + _vehicle flyInHeight 20; + _commander doMove _position; + waitUntil {_vehicle distance2D _position < 50}; + waitUntil {vectorMagnitude (velocity _vehicle) < 3}; + //doStop _commander; +}; + +// - Deployment --------------------------------------------------------------- +[_vehicle] call FUNC(deployAI); +waitUntil {!((_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo [])}; +waitUntil {(_vehicle getVariable [QGVAR(deployedRopes), []]) isEqualTo []}; +_group setSpeedMode _speedMode; + +true diff --git a/addons/fastroping/functions/fnc_equipFRIES.sqf b/addons/fastroping/functions/fnc_equipFRIES.sqf index 8e93a121f5..6d714611be 100644 --- a/addons/fastroping/functions/fnc_equipFRIES.sqf +++ b/addons/fastroping/functions/fnc_equipFRIES.sqf @@ -35,5 +35,6 @@ if !(isNumber (_config >> QGVAR(enabled))) then { [_vehicle] call FUNC(cutRopes); }; }]; + [FUNC(checkVehicleThread), [_vehicle, _fries], 5] call CBA_fnc_waitAndExecute; }; }; diff --git a/addons/fastroping/functions/fnc_fastRope.sqf b/addons/fastroping/functions/fnc_fastRope.sqf index 9d91697d22..e3bd21482f 100644 --- a/addons/fastroping/functions/fnc_fastRope.sqf +++ b/addons/fastroping/functions/fnc_fastRope.sqf @@ -24,7 +24,7 @@ _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; _usableRope = _deployedRopes select 0; _usableRopeIndex = 0; { - if !(_x select 6) exitWith { + if !(_x select 5) exitWith { _usableRope = _x; _usableRopeIndex = _forEachIndex; }; @@ -35,6 +35,6 @@ _deployedRopes set [_usableRopeIndex, _usableRope]; _vehicle setVariable [QGVAR(deployedRopes), _deployedRopes, true]; //Start server PFH asap -[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex]] call EFUNC(common,serverEvent); +[QGVAR(startFastRope), [_unit, _vehicle, _usableRope, _usableRopeIndex, false]] call EFUNC(common,serverEvent); moveOut _unit; -[FUNC(fastRopeLocalPFH), 0, [_unit, _vehicle, _usableRope, _usableRopeIndex]] call CBA_fnc_addPerFrameHandler; +[FUNC(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 8eaeb9c938..3a1e8d5707 100644 --- a/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf +++ b/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" params ["_arguments", "_pfhHandle"]; -_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex"]; +_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_timeToPlayRopeSound"]; _rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"]; private ["_vectorUp", "_vectorDir", "_origin"]; @@ -25,26 +25,25 @@ private ["_vectorUp", "_vectorDir", "_origin"]; if (vehicle _unit != _unit) exitWith {}; //Start fast roping -if (animationState _unit != "ACE_slidingLoop") exitWith { +if (animationState _unit != "ACE_FastRoping") exitWith { _unit disableCollisionWith _dummy; - _unit attachTo [_dummy, [0, 0, -0.5]]; - [_unit, "ACE_slidingLoop", 2] call EFUNC(common,doAnimation); + _unit attachTo [_dummy, [0, 0, -1.45]]; + [_unit, "ACE_FastRoping", 2] call EFUNC(common,doAnimation); }; + //End of fast rope if (isNull attachedTo _unit) exitWith { - if ((getPos _unit) select 2 > 1) then { - [_unit, "ACE_freeFallStart", 2] call EFUNC(common,doAnimation); - [_unit, "ACE_freeFallLoop", 1] call EFUNC(common,doAnimation); - [{ - isTouchingGround _this - }, { - [_this, "", 2] call EFUNC(common,doAnimation); - }, _unit] call EFUNC(common,waitUntilAndExecute); - } else { - [_unit, "", 2] call EFUNC(common,doAnimation); - }; + TRACE_1("exit pfeh",_unit); + [_unit, "", 2] call EFUNC(common,doAnimation); _unit setVectorUp [0, 0, 1]; + playSound QGVAR(Thud); + [_pfhHandle] call CBA_fnc_removePerFrameHandler; }; + +if (diag_tickTime > _timeToPlayRopeSound) then { + _arguments set [4, (_timeToPlayRopeSound + 1)]; + playSound QGVAR(Rope); +}; diff --git a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf index 0446a332d3..2ebffe680e 100644 --- a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf +++ b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" params ["_arguments", "_pfhHandle"]; -_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex"]; +_arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_hasBeenAttached"]; _rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook", "_occupied"]; private ["_vectorUp", "_vectorDir", "_origin"]; @@ -25,7 +25,7 @@ private ["_vectorUp", "_vectorDir", "_origin"]; if (vehicle _unit != _unit) exitWith {}; //Start fast roping -if (animationState _unit != "ACE_slidingLoop") exitWith { +if (getMass _dummy != 80) exitWith { //Fix for twitchyness _dummy setMass 80; _dummy setCenterOfMass [0, 0, -2]; @@ -37,8 +37,15 @@ if (animationState _unit != "ACE_slidingLoop") exitWith { ropeUnwind [_ropeBottom, 6, 0.5]; }; -//Check if rope broke and unit is falling -if (isNull attachedTo _unit) exitWith { +//Check if the player has been attached to the rope yet +if (!_hasBeenAttached && {!(isNull attachedTo _unit)}) then { + _hasBeenAttached = true; + _arguments set [4, true]; +}; + +//Exit when the unit has been detached and is falling (rope broke, heli flew too fast, etc.) +//Make sure this isn't executed before the unit is actually fastroping +if (_hasBeenAttached && {isNull attachedTo _unit}) exitWith { [_pfhHandle] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/fastroping/functions/fnc_onCutCommon.sqf b/addons/fastroping/functions/fnc_onCutCommon.sqf index 7bfb95b68b..004c176b65 100644 --- a/addons/fastroping/functions/fnc_onCutCommon.sqf +++ b/addons/fastroping/functions/fnc_onCutCommon.sqf @@ -24,16 +24,24 @@ if !(isNull _fries) then { [{ _this animateDoor ["door_R", 0]; _this animateDoor ["door_L", 0]; - _vehicle animate ["dvere1_posunZ", 0]; - _vehicle animate ["dvere2_posunZ", 0]; - }, _vehicle, 2] call EFUNC(common,waitAndExecute); + _this animateDoor ["CargoRamp_Open", 0]; + _this animateDoor ["Door_rear_source", 0]; + _this animateDoor ["Door_6_source", 0]; + _this animate ["dvere1_posunZ", 0]; + _this animate ["dvere2_posunZ", 0]; + _this setVariable [QGVAR(doorsLocked), false, true]; + }, _vehicle, 2] call CBA_fnc_waitAndExecute; 4 } else { _vehicle animateDoor ["door_R", 0]; _vehicle animateDoor ["door_L", 0]; + _vehicle animateDoor ["CargoRamp_Open", 0]; + _vehicle animateDoor ["Door_rear_source", 0]; + _vehicle animateDoor ["Door_6_source", 0]; _vehicle animate ["dvere1_posunZ", 0]; _vehicle animate ["dvere2_posunZ", 0]; + _vehicle setVariable [QGVAR(doorsLocked), false, true]; 2 }; diff --git a/addons/fastroping/functions/fnc_onPrepareCommon.sqf b/addons/fastroping/functions/fnc_onPrepareCommon.sqf index d9138ea0e2..37eb6c7eb8 100644 --- a/addons/fastroping/functions/fnc_onPrepareCommon.sqf +++ b/addons/fastroping/functions/fnc_onPrepareCommon.sqf @@ -22,15 +22,20 @@ _waitTime = 2; _vehicle animateDoor ["door_R", 1]; _vehicle animateDoor ["door_L", 1]; +_vehicle animateDoor ["CargoRamp_Open", 1]; +_vehicle animateDoor ["Door_rear_source", 1]; +_vehicle animateDoor ["Door_6_source", 1]; _vehicle animate ["dvere1_posunZ", 1]; _vehicle animate ["dvere2_posunZ", 1]; +_vehicle setVariable [QGVAR(doorsLocked), true, true]; + _fries = _vehicle getVariable [QGVAR(FRIES), objNull]; if !(isNull _fries) then { [{ _this animate ["extendHookRight", 1]; _this animate ["extendHookLeft", 1]; - }, _fries, 2] call EFUNC(common,waitAndExecute); + }, _fries, 2] call CBA_fnc_waitAndExecute; _waitTime = 4; }; diff --git a/addons/fastroping/functions/fnc_prepareFRIES.sqf b/addons/fastroping/functions/fnc_prepareFRIES.sqf index 4896259014..e4bce8458c 100644 --- a/addons/fastroping/functions/fnc_prepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_prepareFRIES.sqf @@ -29,4 +29,4 @@ if (isText (_config >> QGVAR(onPrepare))) then { [{ _this setVariable [QGVAR(deploymentStage), 2, true]; -}, _vehicle, _waitTime] call EFUNC(common,waitAndExecute); +}, _vehicle, _waitTime] call CBA_fnc_waitAndExecute; diff --git a/addons/fastroping/script_component.hpp b/addons/fastroping/script_component.hpp index ccfa2c3e56..3770bfe0d4 100644 --- a/addons/fastroping/script_component.hpp +++ b/addons/fastroping/script_component.hpp @@ -1,6 +1,11 @@ #define COMPONENT fastroping #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS +// #define ENABLE_PERFORMANCE_COUNTERS + #ifdef DEBUG_ENABLED_FASTROPING #define DEBUG_MODE_FULL #endif diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index 997ff32ecf..7f08df7ed8 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -6,6 +6,9 @@ Rüste FRIES aus Wyposaż FRIES Equiper le FRIES + Equipar FRIES + Equipaggia la FRIES + Vybavit FRIES Equipar FRIES @@ -13,6 +16,9 @@ Rüstet kompatible Helikopter mit einem Fast Rope Insertion Extraction System aus. Wyposaża kompatybilne helikoptery w zestaw Fast Rope Insertion Extraction System. Equipe les hélicoptères compatibles avec un Module Fast Rope Insertion Extraction System. + Equipar helicoptero compatible con un Sistema de Inserción Extracción Fast Rope. + Equipagga l'elicottero compatibile con il Fast Rope Insertion Exstraction System + Vybavit kompatibilní vrtulníky systémem Fast Rope Insertion Extraction (FRIES). Equipa um helicóptero compatível com o Fast Rope Insertion Exctraction System. @@ -20,6 +26,9 @@ Bereite Fast Roping System vor Przygotuj system zjazdu na linach Préparer le système de corde lisse + Preparar el sistema fast roping + Prepara le corde + Připravit systém slaňování Prepara sistema de descida rápida @@ -27,6 +36,9 @@ Seile auswerfen Wypuść liny Déployer les cordes + Desplegar cuerdas + Srotola le corde + Připravit lana Jogar cordas @@ -34,6 +46,9 @@ Abseilen Zjedź na linie Descendre à la corde + Descender por la cuerda + Scendi sulla corda + SLANIT Descida rápida @@ -41,6 +56,9 @@ Seile abwerfen Odetnij liny Détacher les cordes + Cortar cuerdas + Taglia le corde + Odříznout lano Cortar cordas @@ -48,6 +66,9 @@ Rüste Helicopter mit FRIES aus Wyposaż helikopter w FRIES Equiper l'hélicoptère avec le FRIED + Equipar helicoptero con FRIES + Equipaggia l'elicottero con FRIES + Vybavit vrtulník pomocí FRIES Equipar helicóptero com FRIES @@ -55,6 +76,14 @@ Rüstet den ausgewählten Helicopter mit einem Fast Rope Insertion Extraction System aus Wyposaża wybrany helikopter w zestaw Fast Rope Insertion Extraction System Equipe l'hélicoptère sélectionné avec un Fast Rope Insertion Extraction System + Equipa el helicoptero seleccionado con un Sistema de Inserción Extracción Fast Rope + Equipaggia l'elicottero selezionato con il Fast Rope Insertion Extraction System + Vybavit vybraný vrtulník systémem Fast Rope Insertion Extraction (FRIES) + + + LET UNITS FAST ROPE + EINHEITEN ABSEILEN LASSEN + SCENDI DALLE CORDE Equipa o helicóptero selecionado com o Fast Rope Insertion Extraction System diff --git a/addons/fcs/ACE_UI.hpp b/addons/fcs/ACE_UI.hpp new file mode 100644 index 0000000000..ca35779f36 --- /dev/null +++ b/addons/fcs/ACE_UI.hpp @@ -0,0 +1,7 @@ +class ACE_UI { + class gunnerZeroing { + class conditions { + ADDON = "false"; + }; + }; +}; diff --git a/addons/fcs/config.cpp b/addons/fcs/config.cpp index 12edf02ba3..a38cee5d7d 100644 --- a/addons/fcs/config.cpp +++ b/addons/fcs/config.cpp @@ -6,13 +6,15 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"KoffeinFlummi","BadGuy (simon84)","commy2"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi","BadGuy (simon84)","commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgEventHandlers.hpp" +#include "ACE_UI.hpp" #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" diff --git a/addons/fcs/functions/fnc_adjustRange.sqf b/addons/fcs/functions/fnc_adjustRange.sqf index f6f543d35a..bed9389716 100644 --- a/addons/fcs/functions/fnc_adjustRange.sqf +++ b/addons/fcs/functions/fnc_adjustRange.sqf @@ -22,6 +22,7 @@ private _min = getNumber (_turretConfig >> QGVAR(MinDistance)); private _max = getNumber (_turretConfig >> QGVAR(MaxDistance)); private _distance = _vehicle getVariable [format ["%1_%2", QGVAR(Distance), _turret], _min]; +TRACE_4("",_distance,_delta,_min,_max); _distance = _distance + _delta; _distance = _distance min _max; diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index 9908832824..6d489de006 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -15,6 +15,7 @@ */ #include "script_component.hpp" params ["_vehicle","_turret","_distance","_angleTarget"]; +TRACE_4("params",_vehicle,_turret,_distance,_angleTarget); private _FCSMagazines = []; private _FCSElevation = []; diff --git a/addons/fcs/functions/fnc_canUseFCS.sqf b/addons/fcs/functions/fnc_canUseFCS.sqf index 91b49554c2..3899584788 100644 --- a/addons/fcs/functions/fnc_canUseFCS.sqf +++ b/addons/fcs/functions/fnc_canUseFCS.sqf @@ -8,9 +8,13 @@ * Return Value: * Boolean * + * Example: + * [] call ace_fcs_fnc_canUseFCS + * * Public: No */ #include "script_component.hpp" getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1 -&& {cameraView == "GUNNER"} // return +&& {cameraView == "GUNNER"} +&& {!([ACE_player] call CBA_fnc_canUseWeapon)} //Not Turned Out diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index a9f4975780..4c9b7d8b85 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -16,10 +16,11 @@ TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); private _FCSMagazines = _vehicle getVariable [format ["%1_%2", QGVAR(Magazines), _turret], []]; -private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret]; if !(_magazine in _FCSMagazines) exitWith {}; +private _FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret]; + // GET ELEVATION OFFSET OF CURRENT MAGAZINE private _offset = 0; diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index e61baed136..3c4943badf 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -29,7 +29,7 @@ private _distance = [ if !(!GVAR(enabled) && FUNC(canUseFCS)) exitWith {}; GVAR(Enabled) = true; -GVAR(time) = ACE_time; +GVAR(time) = CBA_missionTime; private _weaponDirection = _vehicle weaponDirection (_vehicle currentWeaponTurret _turret); // @todo doesn't work for sub turrets diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index 919ac3a58e..a07f5d5d35 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -14,6 +14,7 @@ #include "script_component.hpp" params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]]; +TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound); private _turretConfig = [configFile >> "CfgVehicles" >> typeOf _vehicle, _turret] call EFUNC(common,getTurretConfigPath); @@ -23,6 +24,8 @@ if (isNil "_distance") then { getNumber (_turretConfig >> QGVAR(MaxDistance)), getNumber (_turretConfig >> QGVAR(MinDistance)) ] call FUNC(getRange); +} else { + ((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) ctrlSetText ([_distance, 4, 0] call CBA_fnc_formatNumber); }; // MOVING TARGETS @@ -41,10 +44,10 @@ private _angleTarget = asin (_weaponDirection select 2); private _movingAzimuth = 0; -if (ACE_time - GVAR(time) > 1 && GVAR(time) != -1 && isNil {_this select 2}) then { +if (CBA_missionTime - GVAR(time) > 1 && GVAR(time) != -1 && isNil {_this select 2}) then { // calculate speed of target private _posTarget = (getPosASL _vehicle) vectorAdd (_weaponDirection vectorMultiply _distance); - private _velocityTarget = (_posTarget vectorDiff GVAR(position)) vectorMultiply (1 / (ACE_time - GVAR(time))); + private _velocityTarget = (_posTarget vectorDiff GVAR(position)) vectorMultiply (1 / (CBA_missionTime - GVAR(time))); // estimate time to target private _magazine = _vehicle currentMagazineTurret _turret; diff --git a/addons/fcs/stringtable.xml b/addons/fcs/stringtable.xml index 035d9d7a36..8750d2a4e3 100644 --- a/addons/fcs/stringtable.xml +++ b/addons/fcs/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/finger/CfgVehicles.hpp b/addons/finger/CfgVehicles.hpp index 74229968e4..8125e7f2f5 100644 --- a/addons/finger/CfgVehicles.hpp +++ b/addons/finger/CfgVehicles.hpp @@ -4,7 +4,7 @@ class CfgVehicles { scope = 2; category = "ACE"; displayName = CSTRING(moduleSettings_displayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_finger_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_finger_ca.paa); function = QFUNC(moduleSettings); isGlobal = 0; isSingular = 1; diff --git a/addons/finger/XEH_postInit.sqf b/addons/finger/XEH_postInit.sqf index 394c0cfd3b..94a22d7224 100644 --- a/addons/finger/XEH_postInit.sqf +++ b/addons/finger/XEH_postInit.sqf @@ -11,7 +11,7 @@ GVAR(pfeh_id) = -1; if (!GVAR(enabled)) exitWith {}; [QGVAR(fingered), {_this call FUNC(incomingFinger)}] call EFUNC(common,addEventHandler); - + ["ACE3 Common", QGVAR(finger), [(localize LSTRING(keyComb)), (localize LSTRING(keyComb_description))], diff --git a/addons/finger/config.cpp b/addons/finger/config.cpp index 2cc3be5ddd..fa953b4298 100644 --- a/addons/finger/config.cpp +++ b/addons/finger/config.cpp @@ -1,18 +1,19 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {QGVAR(moduleSettings)}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"Drill"}; - authorUrl = "https://github.com/TheDrill/"; - VERSION_CONFIG; - }; -}; - - -#include "ACE_Settings.hpp" -#include "CfgEventHandlers.hpp" -#include "CfgVehicles.hpp" +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {QGVAR(moduleSettings)}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Drill"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + + +#include "ACE_Settings.hpp" +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" diff --git a/addons/finger/functions/fnc_incomingFinger.sqf b/addons/finger/functions/fnc_incomingFinger.sqf index 02c870a519..0b21bd4930 100644 --- a/addons/finger/functions/fnc_incomingFinger.sqf +++ b/addons/finger/functions/fnc_incomingFinger.sqf @@ -27,7 +27,7 @@ _fingerPos = if (_sourceUnit == ACE_player) then { _fingerPosPrecise vectorAdd [random (2*FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2*FP_RANDOMIZATION_X) - FP_RANDOMIZATION_X, random (2*FP_RANDOMIZATION_Y) - FP_RANDOMIZATION_Y] }; -_data = [ACE_diagTime, _fingerPos, ([_sourceUnit, false, true] call EFUNC(common,getName))]; +_data = [diag_tickTime, _fingerPos, ([_sourceUnit, false, true] call EFUNC(common,getName))]; HASH_SET(GVAR(fingersHash), _sourceUnit, _data); if (GVAR(pfeh_id) == -1) then { diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf index 1ce83d62dc..f569331eb7 100644 --- a/addons/finger/functions/fnc_keyPress.sqf +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -25,9 +25,9 @@ if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "Stat //Check camera view (not in GUNNER) if !(cameraView in ["INTERNAL", "EXTERNAL"]) exitWith {false}; //Exit if run recently (run every 1 seconds) -if (ACE_diagTime < (GVAR(lastFPTime) + FP_ACTION_TIMEOUT)) exitWith {true}; +if (diag_tickTime < (GVAR(lastFPTime) + FP_ACTION_TIMEOUT)) exitWith {true}; -GVAR(lastFPTime) = ACE_diagTime; +GVAR(lastFPTime) = diag_tickTime; _fingerPosPrecise = positionCameraToWorld [0, 0, FP_DISTANCE]; _playerEyePos = eyePos ACE_player; diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf index 61c8f077ab..41fb718146 100644 --- a/addons/finger/functions/fnc_perFrameEH.sqf +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -31,7 +31,7 @@ _iconSize = BASE_SIZE * _fovCorrection; { _data = HASH_GET(GVAR(fingersHash), _x); _data params ["_lastTime", "_pos", "_name"]; - _timeLeftToShow = _lastTime + FP_TIMEOUT - ACE_diagTime; + _timeLeftToShow = _lastTime + FP_TIMEOUT - diag_tickTime; if (_timeLeftToShow <= 0) then { HASH_REM(GVAR(fingersHash), _x); } else { @@ -41,7 +41,7 @@ _iconSize = BASE_SIZE * _fovCorrection; _drawColor set [3, ((_drawColor select 3) * (_timeLeftToShow / 0.5))]; }; - drawIcon3D [QUOTE(PATHTOF(UI\fp_icon2.paa)), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "RobotoCondensed"]; + drawIcon3D [QPATHTOF(UI\fp_icon2.paa), _drawColor, _pos, _iconSize, _iconSize, 0, _name, 1, 0.03, "RobotoCondensed"]; }; } count (GVAR(fingersHash) select 0); diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index 66576f8e6f..3f68d337f2 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -5,7 +5,7 @@ Show pointing indicator to self Zeigersymbol einem selbst anzeigen Индикатор пальца для показывающего - Afficher un indicateur de pointage pour soit même + Afficher un indicateur de pointage pour soi-même Pokaż indykator wskazywania palcem dla siebie Saját mutatási indikátor megjelenítése Mostrar indicador para si mesmo @@ -53,7 +53,7 @@ Action "point a finger at" Aktion: "Zeige Finger auf" Действие "показать пальцем на" - Action 'Pointer le doigt vers" + Action 'Pointer du doigt" Akcja "wskaż palcem" Cselekvés "ujj rámutatása" Ação "Apontar um dedo para" @@ -76,7 +76,7 @@ Pointing Settings Zeigen Einstellungen - Option "Montrer du doigt" + Options "Montrer du doigt" Ustawienia wskazywania palcem Ujj beállításai Preferências de apontamento @@ -88,7 +88,7 @@ Pointing Enabled Zeigen aktiviert - Activer "Montrer du doigt" + "Montrer du doigt" activé Aktywuj wskazywanie Mutatás engedélyezése Apontamento ativado @@ -122,4 +122,4 @@ Distanza massima tra giocatori per mostrare l'indicatore di puntamento [default: 4 metri] - \ No newline at end of file + diff --git a/addons/flashlights/CfgWeapons.hpp b/addons/flashlights/CfgWeapons.hpp index 09fe70d764..84edac6c85 100644 --- a/addons/flashlights/CfgWeapons.hpp +++ b/addons/flashlights/CfgWeapons.hpp @@ -17,8 +17,8 @@ class CfgWeapons { class ACE_Flashlight_MX991: ACE_ItemCore { displayName = CSTRING(MX991_DisplayName); descriptionShort = CSTRING(MX991_Description); - model = QUOTE(PATHTOF(data\MX_991.p3d)); - picture = PATHTOF(UI\mx991_ca.paa); + model = QPATHTOF(data\MX_991.p3d); + picture = QPATHTOF(UI\mx991_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 1; @@ -32,8 +32,8 @@ class CfgWeapons { class ACE_Flashlight_KSF1: ACE_ItemCore { displayName = CSTRING(KSF1_DisplayName); descriptionShort = CSTRING(KSF1_Description); - model = QUOTE(PATHTOF(data\KSF_1.p3d)); - picture = PATHTOF(UI\ksf1_ca.paa); + model = QPATHTOF(data\KSF_1.p3d); + picture = QPATHTOF(UI\ksf1_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 1; @@ -47,8 +47,8 @@ class CfgWeapons { class ACE_Flashlight_XL50: ACE_ItemCore { displayName = CSTRING(XL50_DisplayName); descriptionShort = CSTRING(XL50_Description); - model = QUOTE(PATHTOF(data\Maglight.p3d)); - picture = PATHTOF(UI\xl50_ca.paa); + model = QPATHTOF(data\Maglight.p3d); + picture = QPATHTOF(UI\xl50_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 1; diff --git a/addons/flashlights/config.cpp b/addons/flashlights/config.cpp index b34c4b8000..08349be0a7 100644 --- a/addons/flashlights/config.cpp +++ b/addons/flashlights/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_Flashlight_MX991", "ACE_Flashlight_KSF1", "ACE_Flashlight_XL50"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"voiper"}; - authorUrl = "https://github.com/voiperr/"; + author = ECSTRING(common,ACETeam); + authors[] = {"voiper"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/flashlights/stringtable.xml b/addons/flashlights/stringtable.xml index 3eb413f61c..dad3158b38 100644 --- a/addons/flashlights/stringtable.xml +++ b/addons/flashlights/stringtable.xml @@ -21,7 +21,7 @@ Svítilna s červeným filtrem. Pro nahlédnutí do mapy. Linterna con filtro rojo. Para su uso en el mapa. Torcia con filtro rosso. Da usare in mappa. - Lampe torche avec un filtre rouge. Pour utilisation sur carte. + Lampe de poche avec un filtre rouge. Pour éclairer une carte. Maglite XL50 @@ -43,7 +43,7 @@ Bílá mini svítilna. Pro nahlédnutí do mapy. Mini linterna blanca. Para su uso en el mapa. Mini-torcia bianca. Da usare in mappa. - Mini lampe torche. Pour utilisation sur carte. + Lampe de poche (blanche). Pour éclairer une carte. KSF-1 @@ -65,7 +65,7 @@ Svítilna s červeným filtrem. Pro nahlédnutí do mapy. Linterna con filtro rojo. Para su uso en el mapa. Torcia con filtro rosso. Da usare in mappa. - Lampe torche avec un filtre rouge. Pour utilisation sur carte. + Lampe de poche avec un filtre rouge. Pour éclairer une carte. - \ No newline at end of file + diff --git a/addons/flashsuppressors/CfgWeapons.hpp b/addons/flashsuppressors/CfgWeapons.hpp index ae957ba4b0..e807dc2ae9 100644 --- a/addons/flashsuppressors/CfgWeapons.hpp +++ b/addons/flashsuppressors/CfgWeapons.hpp @@ -29,32 +29,73 @@ class asdg_MuzzleSlot_45ACP_SMG: asdg_MuzzleSlot { // for .45ACP universal mount ACE_muzzle_mzls_smg_01 = 1; }; }; +class asdg_MuzzleSlot_762MG: asdg_MuzzleSlot { // for 7.62, 6.5 and 5.56 universal mount MG suppressors + class compatibleItems { + ACE_muzzle_mzls_B = 1; + }; +}; class MuzzleSlot; class CfgWeapons { - - /* MX */ - - class Rifle; - class Rifle_Base_F: Rifle { + class Rifle_Base_F; + + class Rifle_Long_Base_F: Rifle_Base_F { class WeaponSlotsInfo; }; - class arifle_MX_Base_F: Rifle_Base_F { + /* MX */ + class arifle_MX_Base_F: Rifle_Base_F { + class WeaponSlotsInfo; + }; + + class arifle_MXC_F: arifle_MX_Base_F { class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_H"}; + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_MX_F: arifle_MX_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_MX_GL_F: arifle_MX_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; }; }; }; - class arifle_MX_SW_F: arifle_MX_Base_F { class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - // Shit is broken again - //compatibleItems[] += {"ACE_muzzle_mzls_H"}; - compatibleItems[] = {"muzzle_snds_H","muzzle_snds_H_SW","ACE_muzzle_mzls_H"}; + class MuzzleSlot: asdg_MuzzleSlot_762MG { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_MXM_F: arifle_MX_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; }; }; }; @@ -62,41 +103,49 @@ class CfgWeapons { /* Katiba */ - class arifle_katiba_Base_F: Rifle_Base_F { + class arifle_Katiba_Base_F: Rifle_Base_F { + class WeaponSlotsInfo; + }; + class arifle_Katiba_F: arifle_Katiba_Base_F { class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_H"}; + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_Katiba_C_F: arifle_Katiba_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; + }; + }; + }; + class arifle_Katiba_GL_F: arifle_Katiba_Base_F { + class WeaponSlotsInfo: WeaponSlotsInfo { + class MuzzleSlot: asdg_MuzzleSlot_762 { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; }; }; }; /* Other */ - - class Rifle_Long_Base_F: Rifle_Base_F { - class WeaponSlotsInfo; - }; - - class DMR_01_base_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_B"}; - }; - }; - }; - class LMG_Mk200_F: Rifle_Long_Base_F { class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_H"}; - }; - }; - }; - - class LMG_Zafir_F: Rifle_Long_Base_F { - class WeaponSlotsInfo: WeaponSlotsInfo { - class MuzzleSlot: MuzzleSlot { - compatibleItems[] += {"ACE_muzzle_mzls_B"}; + class MuzzleSlot: asdg_MuzzleSlot_762MG { + class compatibleItems: compatibleItems { + ACE_muzzle_mzls_H = 1; + ACE_muzzle_mzls_B = 0; + }; }; }; }; diff --git a/addons/flashsuppressors/config.cpp b/addons/flashsuppressors/config.cpp index b8e0c1e120..378858d71c 100644 --- a/addons/flashsuppressors/config.cpp +++ b/addons/flashsuppressors/config.cpp @@ -14,8 +14,9 @@ class CfgPatches { }; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/flashsuppressors/stringtable.xml b/addons/flashsuppressors/stringtable.xml index 5f6a0ebc86..f075f1aa34 100644 --- a/addons/flashsuppressors/stringtable.xml +++ b/addons/flashsuppressors/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/fonts/CfgFontFamilies.hpp b/addons/fonts/CfgFontFamilies.hpp index 963a35fa8e..80c8114624 100644 --- a/addons/fonts/CfgFontFamilies.hpp +++ b/addons/fonts/CfgFontFamilies.hpp @@ -2,38 +2,38 @@ class CfgFontFamilies { class PixelSplitterBold { - fonts[] = { PATHTOF(PixelSplitterBold\PixelSplitterBold6), - PATHTOF(PixelSplitterBold\PixelSplitterBold7), - PATHTOF(PixelSplitterBold\PixelSplitterBold8), - PATHTOF(PixelSplitterBold\PixelSplitterBold9), - PATHTOF(PixelSplitterBold\PixelSplitterBold10), - PATHTOF(PixelSplitterBold\PixelSplitterBold11), - PATHTOF(PixelSplitterBold\PixelSplitterBold12), - PATHTOF(PixelSplitterBold\PixelSplitterBold13), - PATHTOF(PixelSplitterBold\PixelSplitterBold14), - PATHTOF(PixelSplitterBold\PixelSplitterBold15), - PATHTOF(PixelSplitterBold\PixelSplitterBold16), - PATHTOF(PixelSplitterBold\PixelSplitterBold17), - PATHTOF(PixelSplitterBold\PixelSplitterBold18), - PATHTOF(PixelSplitterBold\PixelSplitterBold19), - PATHTOF(PixelSplitterBold\PixelSplitterBold20), - PATHTOF(PixelSplitterBold\PixelSplitterBold21), - PATHTOF(PixelSplitterBold\PixelSplitterBold22), - PATHTOF(PixelSplitterBold\PixelSplitterBold23), - PATHTOF(PixelSplitterBold\PixelSplitterBold24), - PATHTOF(PixelSplitterBold\PixelSplitterBold25), - PATHTOF(PixelSplitterBold\PixelSplitterBold26), - PATHTOF(PixelSplitterBold\PixelSplitterBold27), - PATHTOF(PixelSplitterBold\PixelSplitterBold28), - PATHTOF(PixelSplitterBold\PixelSplitterBold29), - PATHTOF(PixelSplitterBold\PixelSplitterBold30), - PATHTOF(PixelSplitterBold\PixelSplitterBold31), - PATHTOF(PixelSplitterBold\PixelSplitterBold34), - PATHTOF(PixelSplitterBold\PixelSplitterBold35), - PATHTOF(PixelSplitterBold\PixelSplitterBold37), - PATHTOF(PixelSplitterBold\PixelSplitterBold46) + fonts[] = { QPATHTOF(PixelSplitterBold\PixelSplitterBold6), + QPATHTOF(PixelSplitterBold\PixelSplitterBold7), + QPATHTOF(PixelSplitterBold\PixelSplitterBold8), + QPATHTOF(PixelSplitterBold\PixelSplitterBold9), + QPATHTOF(PixelSplitterBold\PixelSplitterBold10), + QPATHTOF(PixelSplitterBold\PixelSplitterBold11), + QPATHTOF(PixelSplitterBold\PixelSplitterBold12), + QPATHTOF(PixelSplitterBold\PixelSplitterBold13), + QPATHTOF(PixelSplitterBold\PixelSplitterBold14), + QPATHTOF(PixelSplitterBold\PixelSplitterBold15), + QPATHTOF(PixelSplitterBold\PixelSplitterBold16), + QPATHTOF(PixelSplitterBold\PixelSplitterBold17), + QPATHTOF(PixelSplitterBold\PixelSplitterBold18), + QPATHTOF(PixelSplitterBold\PixelSplitterBold19), + QPATHTOF(PixelSplitterBold\PixelSplitterBold20), + QPATHTOF(PixelSplitterBold\PixelSplitterBold21), + QPATHTOF(PixelSplitterBold\PixelSplitterBold22), + QPATHTOF(PixelSplitterBold\PixelSplitterBold23), + QPATHTOF(PixelSplitterBold\PixelSplitterBold24), + QPATHTOF(PixelSplitterBold\PixelSplitterBold25), + QPATHTOF(PixelSplitterBold\PixelSplitterBold26), + QPATHTOF(PixelSplitterBold\PixelSplitterBold27), + QPATHTOF(PixelSplitterBold\PixelSplitterBold28), + QPATHTOF(PixelSplitterBold\PixelSplitterBold29), + QPATHTOF(PixelSplitterBold\PixelSplitterBold30), + QPATHTOF(PixelSplitterBold\PixelSplitterBold31), + QPATHTOF(PixelSplitterBold\PixelSplitterBold34), + QPATHTOF(PixelSplitterBold\PixelSplitterBold35), + QPATHTOF(PixelSplitterBold\PixelSplitterBold37), + QPATHTOF(PixelSplitterBold\PixelSplitterBold46) }; spaceWidth = 0.5; spacing = 0.065; }; -}; \ No newline at end of file +}; diff --git a/addons/fonts/config.cpp b/addons/fonts/config.cpp index f37dba286c..dc6b4c705f 100644 --- a/addons/fonts/config.cpp +++ b/addons/fonts/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_main"}; - author[] = {"jaynus"}; - authorUrl = "https://github.com/jaynus/"; + author = ECSTRING(common,ACETeam); + authors[] = {"jaynus"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/frag/ACE_Settings.hpp b/addons/frag/ACE_Settings.hpp index 3e1c83839b..4dfa172bb3 100644 --- a/addons/frag/ACE_Settings.hpp +++ b/addons/frag/ACE_Settings.hpp @@ -1,19 +1,19 @@ class ACE_Settings { - class GVAR(Enabled) { + class GVAR(enabled) { category = CSTRING(Module_DisplayName); displayName = CSTRING(EnableFrag); description = CSTRING(EnableFrag_Desc); typeName = "BOOL"; value = 1; }; - class GVAR(SpallEnabled) { + class GVAR(spallEnabled) { category = CSTRING(Module_DisplayName); displayName = CSTRING(EnableSpall); description = CSTRING(EnableSpall_Desc); typeName = "BOOL"; value = 0; }; - class GVAR(ReflectionsEnabled) { + class GVAR(reflectionsEnabled) { category = CSTRING(Module_DisplayName); displayName = CSTRING(EnableReflections); description = CSTRING(EnableReflections_Desc); @@ -27,7 +27,7 @@ class ACE_Settings { typeName = "SCALAR"; value = 500; }; - class GVAR(MaxTrackPerFrame) { + class GVAR(maxTrackPerFrame) { category = CSTRING(Module_DisplayName); displayName = CSTRING(MaxTrackPerFrame); description = CSTRING(MaxTrackPerFrame_Desc); @@ -35,7 +35,7 @@ class ACE_Settings { value = 50; }; - class GVAR(EnableDebugTrace) { + class GVAR(enableDebugTrace) { category = CSTRING(Module_DisplayName); displayName = CSTRING(EnableDebugTrace); description = CSTRING(EnableDebugTrace_Desc); diff --git a/addons/frag/CfgAmmo.hpp b/addons/frag/CfgAmmo.hpp index 41734d2806..cd6cc64cfd 100644 --- a/addons/frag/CfgAmmo.hpp +++ b/addons/frag/CfgAmmo.hpp @@ -8,11 +8,11 @@ class CfgAmmo { //class ace_arty_105mm_m1_m782_delay: ace_arty_105mm_m1_m782_prox { // GVAR(skip) = 1; //}; - + class Bo_GBU12_LGB; class ACE_GBU12 : Bo_GBU12_LGB { GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"}; GVAR(metal) = 140000; GVAR(charge) = 87000; @@ -27,7 +27,7 @@ class CfgAmmo { class Grenade; class GrenadeHand: Grenade { GVAR(enabled) = 1; - + GVAR(skip) = 0; GVAR(force) = 1; // This is a good high-drag frag type for grenades. @@ -52,7 +52,7 @@ class CfgAmmo { class R_Hydra_HE: RocketBase { // Source: http://fas.org/man/dod-101/sys/missile/hydra-70.htm GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"}; GVAR(metal) = 3850; GVAR(charge) = 1040; @@ -74,18 +74,19 @@ class CfgAmmo { class BombCore; class Bo_Mk82: BombCore { GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"}; GVAR(metal) = 140000; GVAR(charge) = 87000; GVAR(gurney_c) = 2320; GVAR(gurney_k) = 1/2; }; - + class G_40mm_HE: GrenadeBase { // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441 GVAR(enabled) = 1; - + GVAR(force) = 1; + GVAR(classes)[] = {"ACE_frag_tiny_HD"}; GVAR(metal) = 200; GVAR(charge) = 32; @@ -95,20 +96,21 @@ class CfgAmmo { class G_40mm_HEDP: G_40mm_HE { // Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M433 GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_tiny_HD"}; GVAR(metal) = 200; GVAR(charge) = 45; GVAR(gurney_c) = 2830; GVAR(gurney_k) = 1/2; }; - + class ACE_G_40mm_HEDP: G_40mm_HEDP { }; class ACE_G_40mm_HE: G_40mm_HE { }; class ACE_G_40mm_Practice: ACE_G_40mm_HE { GVAR(skip) = 1; + GVAR(force) = 0; }; class ACE_G40mm_HE_VOG25P: G_40mm_HE { GVAR(skip) = 0; @@ -121,7 +123,7 @@ class CfgAmmo { class Sh_155mm_AMOS: ShellBase { // Source: http://www.globalsecurity.org/military/systems/munitions/m795.htm GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"}; GVAR(metal) = 36000; GVAR(charge) = 9979; @@ -131,7 +133,7 @@ class CfgAmmo { class Sh_82mm_AMOS : Sh_155mm_AMOS { // Source: http://www.arsenal-bg.com/defense_police/mortar_bombs_82mm.htm GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"}; GVAR(metal) = 3200; GVAR(charge) = 420; @@ -140,7 +142,7 @@ class CfgAmmo { }; class ModuleOrdnanceMortar_F_Ammo: Sh_82mm_AMOS { GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"}; GVAR(metal) = 800; GVAR(charge) = 4200; @@ -149,7 +151,7 @@ class CfgAmmo { }; class Sh_105mm_HEAT_MP : Sh_125mm_HEAT { GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"}; GVAR(metal) = 11400; GVAR(charge) = 7100; @@ -158,7 +160,7 @@ class CfgAmmo { }; class Sh_120mm_HE : ShellBase { GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"}; GVAR(metal) = 23000; GVAR(charge) = 3148; @@ -167,7 +169,7 @@ class CfgAmmo { }; class Sh_125mm_HE: Sh_120mm_HE { GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"}; GVAR(metal) = 16000; GVAR(charge) = 3200; @@ -176,7 +178,7 @@ class CfgAmmo { }; class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS { GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"}; GVAR(metal) = 1950; GVAR(charge) = 15800; @@ -203,7 +205,7 @@ class CfgAmmo { class Missile_AGM_02_F : MissileBase { // Source: http://fas.org/man/dod-101/sys/smart/agm-65.htm GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"}; GVAR(metal) = 56250; GVAR(charge) = 39000; @@ -213,7 +215,7 @@ class CfgAmmo { class M_Hellfire_AT: MissileBase { // Source: http://www.designation-systems.net/dusrm/m-114.html GVAR(enabled) = 1; - + GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"}; GVAR(metal) = 8000; GVAR(charge) = 2400; @@ -471,6 +473,6 @@ class CfgAmmo { class ACE_frag_spall_huge: ACE_frag_huge { timeToLive = 0.3; }; - + #include "CfgAmmoReflections.hpp" }; diff --git a/addons/frag/XEH_PREP.hpp b/addons/frag/XEH_PREP.hpp index 926cbaab0c..2fed1630f2 100644 --- a/addons/frag/XEH_PREP.hpp +++ b/addons/frag/XEH_PREP.hpp @@ -1,3 +1,4 @@ +PREP(dev_debugAmmo); PREP(doSpall); PREP(fired); diff --git a/addons/frag/config.cpp b/addons/frag/config.cpp index 16af88bfc4..1727570003 100644 --- a/addons/frag/config.cpp +++ b/addons/frag/config.cpp @@ -1,15 +1,17 @@ -#include "script_component.hpp" -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[] = {"Nou"}; - VERSION_CONFIG; - }; -}; - -#include "CfgEventhandlers.hpp" -#include "CfgAmmo.hpp" -#include "ACE_Settings.hpp" \ No newline at end of file +#include "script_component.hpp" +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Nou"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgEventhandlers.hpp" +#include "CfgAmmo.hpp" +#include "ACE_Settings.hpp" diff --git a/addons/frag/functions/fnc_addTrack.sqf b/addons/frag/functions/fnc_addTrack.sqf index 680dc31c37..922e37e719 100644 --- a/addons/frag/functions/fnc_addTrack.sqf +++ b/addons/frag/functions/fnc_addTrack.sqf @@ -20,4 +20,4 @@ _positions set[(count _positions), [(getPos _obj), _objSpd]]; _data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color]; GVAR(traces) set[_index, _data]; -[DFUNC(trackTrace), 0, [_obj, _index, ACE_time]] call CBA_fnc_addPerFrameHandler; +[DFUNC(trackTrace), 0, [_obj, _index, CBA_missionTime]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/frag/functions/fnc_dev_debugAmmo.sqf b/addons/frag/functions/fnc_dev_debugAmmo.sqf new file mode 100644 index 0000000000..1323639621 --- /dev/null +++ b/addons/frag/functions/fnc_dev_debugAmmo.sqf @@ -0,0 +1,62 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" + +params [["_debugMissing", true, [false]], ["_debugForce", false, [false]], ["_debugNonFrag", false, [false]]]; + +diag_log text format ["~~~~~~~~~~~~~Start [%1]~~~~~~~~~~~~~", _this]; + +private _allMagsConfigs = configProperties [configFile >> "CfgMagazines", "isClass _x", true]; +private _processedCfgAmmos = []; + +{ + private _ammo = toLower getText (_x >> "ammo"); + if ((_ammo != "") && {!(_ammo in _processedCfgAmmos)}) then { + _processedCfgAmmos pushBack _ammo; + + //Ignore mines/bombs + if (_ammo isKindOf "TimeBombCore") exitWith {}; + + _ammoConfig = configFile >> "CfgAmmo" >> _ammo; + + //Read configs and test if it would actually cause a frag, using same logic as FUNC(pfhRound) + private _skip = getNumber (_ammoConfig >> QGVAR(skip)); + private _explosive = getNumber (_ammoConfig >> "explosive"); + private _indirectRange = getNumber (_ammoConfig >> "indirectHitRange"); + private _force = getNumber (_ammoConfig >> QGVAR(force)); + private _fragPower = getNumber(_ammoConfig >> "indirecthit")*(sqrt((getNumber (_ammoConfig >> "indirectHitRange")))); + + private _shouldAdd = (_skip == 0) && {(_force == 1) || {_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}}}; + + if (_shouldAdd) then { + if (_debugForce && {((getNumber(_ammoConfig >> "hit")) < 5) || {_fragPower < 10}}) then { + diag_log text format ["Ammo [%1] from Mag [%2] - Weak but will still frag!",_ammo,configName _x]; + diag_log text format [" - _force=%1,_fragPower=%2",_force,_fragPower]; + }; + + _warn = false; + + _fragTypes = getArray (_ammoConfig >> "ACE_frag_CLASSES"); + if(_fragTypes isEqualTo []) then {_warn = true;}; + _c = getNumber(_ammoConfig >> "ACE_frag_CHARGE"); + if(_c == 0) then {_warn = true;}; + _m = getNumber(_ammoConfig >> "ACE_frag_METAL"); + if(_m == 0) then {_warn = true;}; + _k = getNumber(_ammoConfig >> "ACE_frag_GURNEY_K"); + if(_k == 0) then {_warn = true;}; + _gC = getNumber(_ammoConfig >> "ACE_frag_GURNEY_C"); + if(_gC == 0) then { _warn = true;}; + + if(_debugMissing && _warn) then { + diag_log text format ["Ammo [%1] from Mag [%2] MISSING frag configs:",_ammo,configName _x]; + diag_log text format [" - _c=%1,_m=%2,_k=%3,_gC=%4,_fragTypes=%5",_c,_m,_k,_gC,_fragTypes]; + }; + } else { + if (_debugNonFrag && {isArray (_ammoConfig >> "ACE_frag_CLASSES")}) then { + diag_log text format ["Ammo [%1] from Mag [%2] has frag configs but will NOT frag:",_ammo,configName _x]; + diag_log text format ["- skip=%1,explosive=%2,indirectHitRange=%3,force=%4,fragPower=%5",_skip,_explosive,_indirectRange,_force,_fragPower]; + }; + }; + }; +} forEach _allMagsConfigs; + +diag_log text format ["~~~~~~~~~~~~~End [%1-%2]~~~~~~~~~~~~~", count _allMagsConfigs, count _processedCfgAmmos]; diff --git a/addons/frag/functions/fnc_doReflections.sqf b/addons/frag/functions/fnc_doReflections.sqf index 7702e34fd5..64d8ede26d 100644 --- a/addons/frag/functions/fnc_doReflections.sqf +++ b/addons/frag/functions/fnc_doReflections.sqf @@ -13,10 +13,6 @@ if(count _this > 2) then { if(_depth <= 2) then { _indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange"); _indirectHit = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHit"); - - - - _testParams = [_pos, [_indirectHitRange, _indirectHit], [], [], -4, _depth, 0]; [DFUNC(findReflections), 0, _testParams] call CBA_fnc_addPerFrameHandler; }; diff --git a/addons/frag/functions/fnc_drawTraces.sqf b/addons/frag/functions/fnc_drawTraces.sqf index ac95957ad4..494a2af727 100644 --- a/addons/frag/functions/fnc_drawTraces.sqf +++ b/addons/frag/functions/fnc_drawTraces.sqf @@ -18,12 +18,11 @@ private ["_color", "_index", "_lastPos", "_lastSpd", "_max", "_positions", "_sta } else { _data2 = _positions select (_index + ACE_TRACE_DRAW_INC); }; - + _pos1 = _data1 select 0; _pos2 = _data2 select 0; _index = _index + ACE_TRACE_DRAW_INC; - - + drawLine3D [_pos1, _pos2, _color]; _lastPos = _pos2; _lastSpd = _data1 select 1; diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index 8c72ae8bac..64e82b6f83 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -9,7 +9,7 @@ if(!isServer) exitWith { }; BEGIN_COUNTER(frago); -// _startTime = ACE_diagTime; +// _startTime = diag_tickTime; private ["_startTime", "_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed", "_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom", "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_boundingBox", "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir", "_currentCount", "_count", "_vecVar", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount", "_sectorSize", "_sectorOffset", "_i", "_randomDir", "_endTime", "_target"]; @@ -214,5 +214,5 @@ if(_isArmed && (count _objects) > 0) then { // ACE_player sideChat format["total frags: %1", GVAR(TOTALFRAGS)]; // ACE_player sideChat format["tracks: %1", (count GVAR(trackedObjects))]; // #endif -// _endTime = ACE_diagTime; +// _endTime = diag_tickTime; END_COUNTER(frago); \ No newline at end of file diff --git a/addons/frag/functions/fnc_spallHP.sqf b/addons/frag/functions/fnc_spallHP.sqf index 3756bb1416..09008c97cb 100644 --- a/addons/frag/functions/fnc_spallHP.sqf +++ b/addons/frag/functions/fnc_spallHP.sqf @@ -21,7 +21,7 @@ if ((_this select 0) <= (count GVAR(spallHPData))) then { // diag_log text format["%1: %2", _forEachIndex, _x]; // } forEach _hp; // } forEach (_this select 1); - [DFUNC(doSpall), [_this, _forEachIndex]] call EFUNC(common,execNextFrame); + [DFUNC(doSpall), [_this, _forEachIndex]] call CBA_fnc_execNextFrame; // player sideChat "WEEE"; } forEach (_this select 1); }; diff --git a/addons/frag/functions/fnc_spallTrack.sqf b/addons/frag/functions/fnc_spallTrack.sqf index afe4bc1931..3a02d2bd04 100644 --- a/addons/frag/functions/fnc_spallTrack.sqf +++ b/addons/frag/functions/fnc_spallTrack.sqf @@ -22,7 +22,7 @@ if (count _intersectsWith > 0) then { if(!(_x in _foundObjects)) then { // diag_log text format["Adding HP: %1", _x]; _index = (count GVAR(spallHPData)); - _hpId = _x addEventHandler ["hitPart", compile format["[%1, _this] call " + QUOTE(FUNC(spallHP)), _index]]; + _hpId = _x addEventHandler ["hitPart", compile format["[%1, _this] call " + QFUNC(spallHP), _index]]; _foundObjects set[(count _foundObjects), _x]; _foundObjectHPIds set[(count _foundObjectHPIds), _hpId]; _data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds]; diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index 9bd159ab4f..c7afb23097 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -67,6 +67,7 @@ Simulazione Riflessi Esplosioni Druckwellensimulation Activar simulación de reflexiones + Simulation de la réflection des explosions. Simulação de reflexo de explosão @@ -75,6 +76,7 @@ Abilita la Simulazione Riflessi Esplosioni di ACE Aktiviere die ACE-Druckwellensimulation Activa la simulación de reflexiones para las explosiones. + Activer la simulation de la réfléction des explosions ACE. Ativa a simulação de reflexo de explosão do ACE @@ -96,7 +98,7 @@ Diese Einstellung steuert die maximale Anzahl an Projektilen, die das Splitter- und Explosionssystem gleichzeitig verfolgen wird. Wenn mehr Projektile abgefeuert werden, werden sie nicht verfolgt werden. Diese Einstellung zu verringern, kann FPS-Einbrüche bei Szenarien mit vielen Projektilen verhindern (>200 Objekte gleichzeitig in der Luft) Toto nastavení kontroluje maximální množství projektilů z fragmentace a úlomků, která jsou sledována v dané době. Pokud je vystřeleno více projektilů, tak nebudou sledovány. Snižte toto nastavení pokud si nepřejete propady FPS v situacích, kde je velké množství projektilů ( >200 nábojů najednou ve vzduchu) 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) - Cette option controle le nombre maximum de projectile et d'éclat résultant de la fragmentation que le système suivra à un moment T. Si plus de projectiles sont générés, ils ne seront pas pris en compte. Baisser cette option si vous ne voulez pas de baisse de FPS en cas d'un nombre important de projectiles (>200 éclats en même temps) + Cette option contrôle le nombre maximum de projectiles et d'éclats résultant de la fragmentation que le système suivra à un moment T. Si plus de projectiles sont générés, ils ne seront pas pris en compte. Baisser cette option si vous ne voulez pas de baisse de FPS en cas d'un 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 одновременно летящих снарядов) Questo parametro controlla il numero massimo di proiettili che la frammentazione e il sistema di spalling tracciano in ogni momento. Se più proiettili sono sparati, non verranno tracciati. Abbassa questo parametro se non vuoi cali di FPS in scenari con molti proiettili (>200 proiettili in aria contemporaneamente) @@ -108,7 +110,7 @@ Maks. liczba pocisków na klatkę Maximální počet projektilů za jeden snímek Projéteis máximos por quadro - Nombre maximal de projectile par image + Nombre maximal de projectiles par image Maximum repesz/képkocka Макс. количество снарядов за кадр Numero massimo di proiettili per Frame @@ -120,7 +122,7 @@ El número de cálculos de esquirlas que se hará en cualquier cuadro. Esto ayuda a dispersar el impacto en FPS del seguimiento de esquirlas de balas a través de múltiples cuadros, lo que limita aún más su impacto. Počet úlomků v daném snímku. Toto pomáhá rozšířit FPS dopad sledovaného úlomku napříč více snímky, omezuje jeho vliv ještě více. O número de cálculos por estilhaço rastreado para executar em qualquer quadro. Isso ajuda a distribuir o impacto no FPS do rastreamento de estilhaço em vários quadros, o que limita o seu impacto ainda mais. - Le nombre d'éclat à calculer dans chaque images. Ceci permet de diffuser l'impact sur les FPS dans de multiples images, le limitant d'autant plus. + Le nombre d'éclats à calculer dans chaque image. Ceci permet de diffuser l'impact sur les FPS dans de multiples images, limitant la perte de FPS. A lepattogzási útvonalak számításának darabjai képkockánként. Ez eloszlatja az FPS-megszakadást több képkockára, ezzel csökkentve a súlyosságát. Число обрабатываемых осколков за кадр. Это позволяет распределить нагрузку по отслеживанию осколков между несколькими кадрами, чтобы предотвратить падение FPS. Il numero di calcoli per tracciamento di spalling ad ogni frame. Questo aiuta a distribuire l'impatto del tracciamento dello spalling su più frame, limitando ancora di più l'impatto. @@ -150,4 +152,4 @@ (Solo SP) Richiede un restart editor/missione. Abilita il tracciamento visivo di schegge da frammentazione/spalling in modalità Giocatore Singolo. - \ No newline at end of file + diff --git a/addons/gestures/ACE_Settings.hpp b/addons/gestures/ACE_Settings.hpp index a9e77807c0..8ed8aedb6b 100644 --- a/addons/gestures/ACE_Settings.hpp +++ b/addons/gestures/ACE_Settings.hpp @@ -4,8 +4,8 @@ class ACE_Settings { typeName = "SCALAR"; isClientSettable = 1; category = ECSTRING(interact_menu,Category_InteractionMenu); - displayName = CSTRING(showOnInteractionMenu_displayName); - description = CSTRING(showOnInteractionMenu_description); - values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(justKeybinds), CSTRING(keysAndInteractionMenu)}; + displayName = CSTRING(ShowOnInteractionMenu_displayName); + description = CSTRING(ShowOnInteractionMenu_description); + values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(JustKeybinds), CSTRING(KeysAndInteractionMenu)}; }; }; diff --git a/addons/gestures/CfgEventHandlers.hpp b/addons/gestures/CfgEventHandlers.hpp index e2b5ef729b..83a4cf763c 100644 --- a/addons/gestures/CfgEventHandlers.hpp +++ b/addons/gestures/CfgEventHandlers.hpp @@ -19,6 +19,6 @@ class Extended_PostInit_EventHandlers { class Extended_DisplayLoad_EventHandlers { class RscDisplayMission { - ADDON = QUOTE(_this call COMPILE_FILE(XEH_mainDislayLoad)); + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); }; }; diff --git a/addons/gestures/CfgVehicles.hpp b/addons/gestures/CfgVehicles.hpp index d3c7b5ca21..2c099bcc45 100644 --- a/addons/gestures/CfgVehicles.hpp +++ b/addons/gestures/CfgVehicles.hpp @@ -9,134 +9,107 @@ class CfgVehicles { statement = ""; showDisabled = 1; priority = 3.5; - icon = PATHTOF(UI\gestures_ca.paa); + icon = QPATHTOF(UI\gestures_ca.paa); class GVAR(Advance) { - displayName = CSTRING(BIgestureAdvance); - condition = QUOTE(canStand _target); + displayName = CSTRING(Advance); + condition = QUOTE(true); statement = QUOTE(_target playActionNow 'gestureAdvance';); showDisabled = 1; priority = 1.9; }; class GVAR(Go) { - displayName = CSTRING(BIgestureGo); - condition = QUOTE(canStand _target); + displayName = CSTRING(Go); + condition = QUOTE(true); statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2);); showDisabled = 1; priority = 1.8; }; class GVAR(Follow) { - displayName = CSTRING(BIgestureFollow); - condition = QUOTE(canStand _target); + displayName = CSTRING(Follow); + condition = QUOTE(true); statement = QUOTE(_target playActionNow 'gestureFollow';); showDisabled = 1; priority = 1.7; }; class GVAR(Up) { - displayName = CSTRING(BIgestureUp); - condition = QUOTE(canStand _target); + displayName = CSTRING(Up); + condition = QUOTE(true); statement = QUOTE(_target playActionNow 'gestureUp';); showDisabled = 1; priority = 1.5; }; class GVAR(CeaseFire) { - displayName = CSTRING(BIgestureCeaseFire); - condition = QUOTE(canStand _target); + displayName = CSTRING(CeaseFire); + condition = QUOTE(true); statement = QUOTE(_target playActionNow 'gestureCeaseFire';); showDisabled = 1; priority = 1.3; }; - class GVAR(Freeze) { - displayName = CSTRING(BIgestureFreeze); - condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow 'gestureFreeze';); + class GVAR(Stop) { + displayName = CSTRING(Stop); + condition = QUOTE(true); + statement = QUOTE(_target playActionNow 'gestureFreeze';); // BI animation - is actualls "stop" in all stances but prone showDisabled = 1; priority = 1.2; }; class GVAR(Forward) { - displayName = CSTRING(forward); - condition = QUOTE(canStand _target && GVAR(ReloadMutex)); + displayName = CSTRING(Forward); + condition = QUOTE(true); statement = QUOTE(QUOTE(QGVAR(forward)) call FUNC(playSignal)); showDisabled = 1; priority = 1.9; }; class GVAR(Regroup) { - displayName = CSTRING(regroup); - condition = QUOTE(canStand _target && GVAR(ReloadMutex)); + displayName = CSTRING(Regroup); + condition = QUOTE(true); statement = QUOTE(QUOTE(QGVAR(regroup)) call FUNC(playSignal)); showDisabled = 1; priority = 1.8; }; - class GVAR(Stop) { - displayName = CSTRING(stop); - condition = QUOTE(canStand _target && GVAR(ReloadMutex)); - statement = QUOTE(QUOTE(QGVAR(stop)) call FUNC(playSignal)); + class GVAR(Freeze) { + displayName = CSTRING(Freeze); + condition = QUOTE(true); + statement = QUOTE(QUOTE(QGVAR(freeze)) call FUNC(playSignal)); showDisabled = 1; priority = 1.7; }; class GVAR(Cover) { - displayName = CSTRING(cover); - condition = QUOTE(canStand _target && GVAR(ReloadMutex)); + displayName = CSTRING(Cover); + condition = QUOTE(true); statement = QUOTE(QUOTE(QGVAR(cover)) call FUNC(playSignal)); showDisabled = 1; priority = 1.6; }; class GVAR(Point) { - displayName = CSTRING(point); - condition = QUOTE(canStand _target && GVAR(ReloadMutex)); + displayName = CSTRING(Point); + condition = QUOTE(true); statement = QUOTE(QUOTE(QGVAR(point)) call FUNC(playSignal)); showDisabled = 1; priority = 1.5; }; class GVAR(Engage) { - displayName = CSTRING(engage); - condition = QUOTE(canStand _target && GVAR(ReloadMutex)); + displayName = CSTRING(Engage); + condition = QUOTE(true); statement = QUOTE(QUOTE(QGVAR(engage)) call FUNC(playSignal)); showDisabled = 1; priority = 1.4; }; class GVAR(Hold) { - displayName = CSTRING(hold); - condition = QUOTE(canStand _target && GVAR(ReloadMutex)); + displayName = CSTRING(Hold); + condition = QUOTE(true); statement = QUOTE(QUOTE(QGVAR(hold)) call FUNC(playSignal)); showDisabled = 1; priority = 1.3; }; class GVAR(Warning) { - displayName = CSTRING(warning); - condition = QUOTE(canStand _target && GVAR(ReloadMutex)); + displayName = CSTRING(Warning); + condition = QUOTE(true); statement = QUOTE(QUOTE(QGVAR(warning)) call FUNC(playSignal)); showDisabled = 1; priority = 1.2; }; - /* - class class GVAR(Yes) { - displayName = ECSTRING(common,Yes); - condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow ([ARR_2('gestureYes','gestureNod')] select floor random 2);); - showDisabled = 1; - priority = 1.1; - }; - - class class GVAR(No) { - displayName = ECSTRING(common,No); - condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow 'gestureNo';); - showDisabled = 1; - priority = 1.0; - }; - - class class GVAR(Hi) { - displayName = CSTRING(Hi); - condition = QUOTE(canStand _target); - statement = QUOTE(_target playActionNow ([ARR_3('gestureHi','gestureHiB','gestureHiC')] select floor random 3);); - showDisabled = 1; - priority = 0.9; - }; - */ - }; - }; }; }; diff --git a/addons/testmissions/README.md b/addons/gestures/README.md similarity index 50% rename from addons/testmissions/README.md rename to addons/gestures/README.md index e8737f0ab6..e224ff6d69 100644 --- a/addons/testmissions/README.md +++ b/addons/gestures/README.md @@ -1,11 +1,11 @@ -ace_testmissions -=========== +ace_gestures +======== -Provides test missions. +Gestures system in interaction menu and keybinds. ## Maintainers The people responsible for merging changes to this component or answering potential questions. -- None +- [jokoho48](https://github.com/jokoho48) diff --git a/addons/gestures/XEH_mainDislayLoad.sqf b/addons/gestures/XEH_missionDisplayLoad.sqf similarity index 86% rename from addons/gestures/XEH_mainDislayLoad.sqf rename to addons/gestures/XEH_missionDisplayLoad.sqf index 4b5c2ca63b..856f361d3a 100644 --- a/addons/gestures/XEH_mainDislayLoad.sqf +++ b/addons/gestures/XEH_missionDisplayLoad.sqf @@ -4,9 +4,6 @@ disableSerialization; params ["_display"]; -// reload mutex, you can't play signal while reloading -GVAR(ReloadMutex) = true; - _display displayAddEventHandler ["KeyDown", { if ((_this select 1) in actionKeys "ReloadMagazine") then { if (isNull ACE_player || {!alive ACE_player}) exitWith {false}; @@ -28,7 +25,7 @@ _display displayAddEventHandler ["KeyDown", { }; TRACE_2("Reloading, blocking gestures",_weapon,_duration); - [{GVAR(ReloadMutex) = true;}, [], _duration] call EFUNC(common,waitAndExecute); + [{GVAR(ReloadMutex) = true;}, [], _duration] call CBA_fnc_waitAndExecute; }; }; false diff --git a/addons/gestures/XEH_postInit.sqf b/addons/gestures/XEH_postInit.sqf index d9cfc74e04..6d9e057e29 100644 --- a/addons/gestures/XEH_postInit.sqf +++ b/addons/gestures/XEH_postInit.sqf @@ -2,4 +2,48 @@ if (!hasInterface) exitWith {}; -#include "key.sqf" +// reload mutex, you can't play signal while reloading +GVAR(ReloadMutex) = true; + +// Add keybinds +{ + _x params ["_currentName", "_key", ["_vanillaKey", false] ]; + + // Don't add "ace_gestures_" prefix to BI gestures + private _signalName = if (_vanillaKey) then { + format ["BIgesture%1", _currentName]; + } else { + format [QGVAR(%1), _currentName]; + }; + + private _code = compile format [QUOTE('%1' call FUNC(playSignal)), _signalName]; + + TRACE_4("Adding KeyBind",_currentName,_signalName,_code,_key); + + [ + "ACE3 Gestures", + _currentName, + localize format [LSTRING(%1), _currentName], + _code, + {false}, + [_key, [false, (_key != -1), false]], + false + ] call CBA_fnc_addKeybind; + + false +} count [ + ["Freeze", 80], // Numpad 2 + ["Cover", 81], // Numpad 3 + ["Forward", 75], // Numpad 4 + ["Regroup", 76], // Numpad 5 + ["Engage", 77], // Numpad 6 + ["Point", 71], // Numpad 7 + ["Hold", 72], // Numpad 8 + ["Warning", 73], // Numpad 9 + ["Go", -1, true], + ["Advance", -1, true], + ["Follow", -1, true], + ["Up", -1, true], + ["Stop", -1, true], + ["CeaseFire", -1, true] +]; diff --git a/addons/gestures/anim/ace_stop.rtm b/addons/gestures/anim/ace_freeze.rtm similarity index 100% rename from addons/gestures/anim/ace_stop.rtm rename to addons/gestures/anim/ace_freeze.rtm diff --git a/addons/gestures/anim/ace_stop_stand_lowered.rtm b/addons/gestures/anim/ace_freeze_stand_lowered.rtm similarity index 100% rename from addons/gestures/anim/ace_stop_stand_lowered.rtm rename to addons/gestures/anim/ace_freeze_stand_lowered.rtm diff --git a/addons/gestures/cfgMovesBasic.hpp b/addons/gestures/cfgMovesBasic.hpp index a708787fd5..30e2d4d2dd 100644 --- a/addons/gestures/cfgMovesBasic.hpp +++ b/addons/gestures/cfgMovesBasic.hpp @@ -1,7 +1,7 @@ class CfgMovesBasic { class ManActions { GVAR(forward) = QGVAR(forward); - GVAR(stop) = QGVAR(stop); + GVAR(freeze) = QGVAR(freeze); GVAR(cover) = QGVAR(cover); GVAR(regroup) = QGVAR(regroup); GVAR(engage) = QGVAR(engage); @@ -10,7 +10,7 @@ class CfgMovesBasic { GVAR(warning) = QGVAR(warningS); GVAR(forwardStandLowered) = QGVAR(forwardStandLowered); - GVAR(stopStandLowered) = QGVAR(stopStandLowered); + GVAR(freezeStandLowered) = QGVAR(freezeStandLowered); GVAR(coverStandLowered) = QGVAR(coverStandLowered); GVAR(regroupStandLowered) = QGVAR(regroupStandLowered); GVAR(engageStandLowered) = QGVAR(engageStandLowered); @@ -22,7 +22,7 @@ class CfgMovesBasic { class Actions { class NoActions: ManActions { GVAR(forward)[] = {QGVAR(forward), "Gesture"}; - GVAR(stop)[] = {QGVAR(stop), "Gesture"}; + GVAR(freeze)[] = {QGVAR(freeze), "Gesture"}; GVAR(cover)[] = {QGVAR(cover), "Gesture"}; GVAR(regroup)[] = {QGVAR(regroup), "Gesture"}; GVAR(engage)[] = {QGVAR(engage), "Gesture"}; @@ -31,7 +31,7 @@ class CfgMovesBasic { GVAR(warning)[] = {QGVAR(warning), "Gesture"}; GVAR(forwardStandLowered)[] = {QGVAR(forwardStandLowered), "Gesture"}; - GVAR(stopStandLowered)[] = {QGVAR(stopStandLowered), "Gesture"}; + GVAR(freezeStandLowered)[] = {QGVAR(freezeStandLowered), "Gesture"}; GVAR(coverStandLowered)[] = {QGVAR(coverStandLowered), "Gesture"}; GVAR(regroupStandLowered)[] = {QGVAR(regroupStandLowered), "Gesture"}; GVAR(engageStandLowered)[] = {QGVAR(engageStandLowered), "Gesture"}; @@ -126,75 +126,75 @@ class CfgGesturesMale { }; class GVAR(forward): GVAR(Base) { - file = QUOTE(PATHTOF(anim\ace_forward.rtm)); + file = QPATHTOF(anim\ace_forward.rtm); speed = 1; }; class GVAR(forwardStandLowered): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_forward_stand_lowered.rtm)); + file = QPATHTOF(anim\ace_forward_stand_lowered.rtm); }; - class GVAR(stop): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_stop.rtm)); + class GVAR(freeze): GVAR(forward) { + file = QPATHTOF(anim\ace_freeze.rtm); speed = 0.6; }; - class GVAR(stopStandLowered): GVAR(stop) { - file = QUOTE(PATHTOF(anim\ace_stop_stand_lowered.rtm)); + class GVAR(freezeStandLowered): GVAR(freeze) { + file = QPATHTOF(anim\ace_freeze_stand_lowered.rtm); }; class GVAR(cover): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_cover.rtm)); + file = QPATHTOF(anim\ace_cover.rtm); speed = 0.8; }; class GVAR(coverStandLowered): GVAR(cover) { - file = QUOTE(PATHTOF(anim\ace_cover_stand_lowered.rtm)); + file = QPATHTOF(anim\ace_cover_stand_lowered.rtm); }; class GVAR(regroup): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_regroup.rtm)); + file = QPATHTOF(anim\ace_regroup.rtm); speed = 0.8; }; class GVAR(regroupStandLowered): GVAR(regroup) { - file = QUOTE(PATHTOF(anim\ace_regroup_stand_lowered.rtm)); + file = QPATHTOF(anim\ace_regroup_stand_lowered.rtm); }; class GVAR(engage): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_engage.rtm)); + file = QPATHTOF(anim\ace_engage.rtm); speed = 0.9; }; class GVAR(engageStandLowered): GVAR(engage) { - file = QUOTE(PATHTOF(anim\ace_engage_stand_lowered.rtm)); + file = QPATHTOF(anim\ace_engage_stand_lowered.rtm); }; class GVAR(point): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_point.rtm)); + file = QPATHTOF(anim\ace_point.rtm); speed = 0.8; }; class GVAR(pointStandLowered): GVAR(point) { - file = QUOTE(PATHTOF(anim\ace_point_stand_lowered.rtm)); + file = QPATHTOF(anim\ace_point_stand_lowered.rtm); }; class GVAR(hold): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_hold.rtm)); + file = QPATHTOF(anim\ace_hold.rtm); speed = 0.8; }; class GVAR(holdStandLowered): GVAR(hold) { - file = QUOTE(PATHTOF(anim\ace_hold_stand_lowered.rtm)); + file = QPATHTOF(anim\ace_hold_stand_lowered.rtm); }; class GVAR(warning): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_warning.rtm)); + file = QPATHTOF(anim\ace_warning.rtm); speed = 0.8; }; class GVAR(warningStandLowered): GVAR(warning) { - file = QUOTE(PATHTOF(anim\ace_warning_stand_lowered.rtm)); + file = QPATHTOF(anim\ace_warning_stand_lowered.rtm); }; }; }; diff --git a/addons/gestures/config.cpp b/addons/gestures/config.cpp index 39cb8f0951..660c1eeff5 100644 --- a/addons/gestures/config.cpp +++ b/addons/gestures/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interact_menu"}; - author[] = {"joko // Jonas", "Emperias", "Zigomarvin"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"joko // Jonas", "Emperias", "Zigomarvin"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/gestures/functions/fnc_playSignal.sqf b/addons/gestures/functions/fnc_playSignal.sqf index feb79f5370..8f20c690ef 100644 --- a/addons/gestures/functions/fnc_playSignal.sqf +++ b/addons/gestures/functions/fnc_playSignal.sqf @@ -14,7 +14,7 @@ * Public: No */ #include "script_component.hpp" - + TRACE_1("params",_this); if (!GVAR(ReloadMutex)) exitWith {false}; diff --git a/addons/gestures/key.sqf b/addons/gestures/key.sqf deleted file mode 100644 index 54d6d50c0c..0000000000 --- a/addons/gestures/key.sqf +++ /dev/null @@ -1,42 +0,0 @@ -#include "\a3\editor_f\Data\Scripts\dikCodes.h" - -{ - _x params ["_currentName","_key"]; - - private _signalName = format [QGVAR(%1), _currentName]; - if (_currentName select [0,2] == "BI") then { - //Don't add "ace_gestures_" prefix to BI gestures - _signalName = _currentName; - }; - - private _code = (compile format [QUOTE('%1' call FUNC(playSignal);), _signalName]); - - TRACE_4("Adding KeyBind",_currentName,_signalName,_code,_key); - - [ - "ACE3 Gestures", - _currentName, - localize format[LSTRING(%1), _currentName], - _code, - {false}, - [_key, [false, (_key != -1), false]], - false - ] call CBA_fnc_addKeybind; - - false -} count [ - ["stop", DIK_NUMPAD2], - ["cover", DIK_NUMPAD3], - ["forward", DIK_NUMPAD4], - ["regroup", DIK_NUMPAD5], - ["engage", DIK_NUMPAD6], - ["point", DIK_NUMPAD7], - ["hold", DIK_NUMPAD8], - ["warning", DIK_NUMPAD9], - ["BIgestureGo", -1], - ["BIgestureAdvance", -1], - ["BIgestureFollow", -1], - ["BIgestureUp", -1], - ["BIgestureFreeze", -1], - ["BIgestureCeaseFire", -1] -]; diff --git a/addons/gestures/stringtable.xml b/addons/gestures/stringtable.xml index d554ee8fa0..bd9474f8c1 100644 --- a/addons/gestures/stringtable.xml +++ b/addons/gestures/stringtable.xml @@ -25,7 +25,7 @@ Gestos Gesti - + Advance Vordringen Avanzar @@ -37,7 +37,7 @@ Avançar Avanzare - + Go Los Adelante @@ -49,7 +49,7 @@ Mover-se Muoversi - + Follow Folgen Seguirme @@ -61,7 +61,7 @@ Seguir Seguire - + Up Aufstehen Arriba @@ -73,7 +73,7 @@ Acima Alzarsi - + Cease Fire Feuer einstellen Alto el fuego @@ -85,19 +85,18 @@ Cessar Fogo Cessare il Fuoco - - Point - Zeigen - Señalar - Wskazać - Ukázat - Pointer - Показать направление - Mutat - Apontar - Puntare a + + Stop + Stop + Halt + Stop + Стоп + Parar + Stop + Stop + Detenerse - + Freeze Keine Bewegung Alto @@ -109,20 +108,7 @@ Alto Fermi - - - Stop - Stop - Halt - Stop - Стоп - Parar - Stop - Stop - Detenerse - - - + Cover Deckung Cubrirse @@ -134,8 +120,7 @@ Proteger-se Copertura - - + Rally up Regroupement Sammeln @@ -146,8 +131,7 @@ Raggruppare Reunirse - - + Move forward En avant Vorwärts Bewegen @@ -158,8 +142,7 @@ Muovere avanti Avanzar - - + Engage Angriff Engager @@ -170,8 +153,7 @@ Ingaggiare Atacar - - + Point Pointer Zeigen @@ -182,8 +164,7 @@ Puntare Señalar - - + Hold Tenir Anhalten @@ -194,8 +175,7 @@ Mantenere Esperar - - + Warning Attention Achtung @@ -206,69 +186,45 @@ Attenzione Atención - - Hi - Hallo - Hola - Witaj - Ahoj - Salut - Привет - Helló - Olá - Ciao - - - Attack - Angreifen - Atacar - Do ataku - Zaútočit - Attaquer - Атаковать - Támadás - Atacar - Attaccare - - + Show Gestures On Interaction Menu Zeige Gesten im Interaktionsmenü Zobrazit posunky v interakčním menu Pokaż gesty w menu interakcji Mostra Gesti su Menù Interazione Mostrar gestos en el menú de interacción - Afficher les signaux dans le menu d'interaction + Afficher les gestes au menu d'interaction. Mostrar gestos no menu de interação - + Show gestures on the self interaction menu, or just use keybinds, or disable completely Zeige Gesten im Selbst-Interkationsmenü, lege sie auf Schnelltasten, oder deaktiviere sie vollständig. Zobrazit posunky pro vlastní interakční menu, nebo prostě použít klávesové zkratky, nebo to zakázat úplně Pokaż listę gestów w menu własnej interakcji, użyj tylko skrótów na klawiaturze lub wyłącz całkowicie Mostra Gesti nel Menù Interazione Personale, o usa solamente Hotkey, o disabilita completamente Muestror los gestos en el menú de interacción propia, utilizar solo combinación de teclas o desactivarlos completamente - Affiche les signaux dans le menu d'interaction personnel, ou seulement par raccourcis, ou encore les désactiver complètement + Afficher les gestes dans le menu d'interaction personnel, ou seulement utiliser les touches, ou desactiver complètement. Mostra gestos no menu de interação, ou utilize um dos atalhos de teclado ou desative completamente - + Just Keybinds Nur Schnelltasten Pouze klávesové zkratky Tylko skróty klaw. Solo Hotkey Solo mediante teclas - Juste par raccourcis + Seulement les touches Somente atalhos de teclado - + Keybinds + Interaction Menu Schnelltasten+ Interaktionsmenü Klávesové zkratky + interakční menu Skróty klaw. + menu interakcji Hotkey + Menù Interazione Teclas y Menú de Interacción - Raccourcis et menu d'interaction + Touches + menu d'interaction Atalhos + Menu de Interação - \ No newline at end of file + diff --git a/addons/gforces/ACE_Settings.hpp b/addons/gforces/ACE_Settings.hpp new file mode 100644 index 0000000000..dbe6dec13a --- /dev/null +++ b/addons/gforces/ACE_Settings.hpp @@ -0,0 +1,8 @@ +class ACE_Settings { + class GVAR(enabledFor) { + displayName = CSTRING(enabledFor_displayName); + typeName = "SCALAR"; + value = 1; + values[] = {ECSTRING(Common,Disabled), CSTRING(enabledFor_onlyAircraft), ECSTRING(Common,Enabled)}; + }; +}; diff --git a/addons/gforces/XEH_PREP.hpp b/addons/gforces/XEH_PREP.hpp index 1d3d8dac05..d7ef509174 100644 --- a/addons/gforces/XEH_PREP.hpp +++ b/addons/gforces/XEH_PREP.hpp @@ -1,2 +1,2 @@ - +PREP(addPFEH); PREP(pfhUpdateGForces); diff --git a/addons/gforces/XEH_postInit.sqf b/addons/gforces/XEH_postInit.sqf index 23abe8e826..d1df112606 100644 --- a/addons/gforces/XEH_postInit.sqf +++ b/addons/gforces/XEH_postInit.sqf @@ -2,14 +2,38 @@ if (!hasInterface) exitWith {}; -// Setup ppEffect -GVAR(GForces_CC) = ppEffectCreate ["ColorCorrections", 4215]; -GVAR(GForces_CC) ppEffectEnable true; -GVAR(GForces_CC) ppEffectForceInNVG true; -GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]]; -GVAR(GForces_CC) ppEffectCommit 0.4; +GVAR(pfID) = -1; -GVAR(lastUpdateTime) = 0; -GVAR(oldVel) = [0,0,0]; +["SettingsInitialized", { + TRACE_1("SettingsInitialized eh",GVAR(enabledFor)); -[DFUNC(pfhUpdateGForces), 0, []] call CBA_fnc_addPerFrameHandler; + if (GVAR(enabledFor) == 0) exitWith {}; //Module has no effect if enabledFor is "None" + if (GVAR(enabledFor) == 2) exitWith { //PFEH is always on when enabledFor is "All" + [] call FUNC(addPFEH); + TRACE_1("adding perm PFEH",GVAR(pfID)); + }; + + //PFEH only runs when player is in a type "Air" vehicle when enabledFor is "Aircraft" + + if ((!isNull (vehicle ACE_player)) && {(vehicle ACE_player) isKindOf "Air"}) then { //"playerVehicleChanged" can happen before "settingInit" + [] call FUNC(addPFEH); + TRACE_1("adding temp PFEH [start in]",GVAR(pfID)); + }; + ["playerVehicleChanged", { + params ["", "_vehicle"]; + TRACE_2("playerVehicleChanged",_vehicle,typeOf _vehicle); + if (_vehicle isKindOf "Air") then { + if (GVAR(pfID) == -1) then { + [] call FUNC(addPFEH); + TRACE_1("adding temp PFEH",GVAR(pfID)); + }; + } else { + if (GVAR(pfID) != -1) then { + TRACE_1("removing temp PFEH",GVAR(pfID)); + ppEffectDestroy GVAR(GForces_CC); + [GVAR(pfID)] call CBA_fnc_removePerFrameHandler; + GVAR(pfID) = -1; + }; + }; + }] call EFUNC(common,addEventHandler); +}] call EFUNC(common,addEventHandler); diff --git a/addons/gforces/config.cpp b/addons/gforces/config.cpp index 6c40f4ce1c..58f11020eb 100644 --- a/addons/gforces/config.cpp +++ b/addons/gforces/config.cpp @@ -6,14 +6,14 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"KoffeinFlummi", "esteldunedain"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi", "esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; +#include "ACE_Settings.hpp" #include "CfgEventHandlers.hpp" - #include "CfgWeapons.hpp" - #include "CfgVehicles.hpp" diff --git a/addons/gforces/functions/fnc_addPFEH.sqf b/addons/gforces/functions/fnc_addPFEH.sqf new file mode 100644 index 0000000000..50311c3a06 --- /dev/null +++ b/addons/gforces/functions/fnc_addPFEH.sqf @@ -0,0 +1,29 @@ +/* + * Author: KoffeinFlummi and esteldunedain + * Adds the PFEH + * + * Argument: + * None + * + * Return value: + * None + * + * Public: No + */ +#include "script_component.hpp" + +//Reset forces array +GVAR(GForces) = []; +GVAR(GForces_Index) = 0; + +// Setup ppEffect +GVAR(GForces_CC) = ppEffectCreate ["ColorCorrections", 4215]; +GVAR(GForces_CC) ppEffectEnable true; +GVAR(GForces_CC) ppEffectForceInNVG true; +GVAR(GForces_CC) ppEffectAdjust [1,1,0,[0,0,0,1],[0,0,0,0],[1,1,1,1],[10,10,0,0,0,0.1,0.5]]; +GVAR(GForces_CC) ppEffectCommit 0.4; + +GVAR(lastUpdateTime) = 0; +GVAR(oldVel) = [0,0,0]; + +GVAR(pfID) = [DFUNC(pfhUpdateGForces), 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf index dd569781e7..7909f3d0ee 100644 --- a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf +++ b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf @@ -13,14 +13,14 @@ */ #include "script_component.hpp" -EXPLODE_2_PVT(_this,_params,_pfhId); - // Update the g-forces at constant mission time intervals (taking accTime into account) -if ((ACE_time - GVAR(lastUpdateTime)) < INTERVAL) exitWith {}; -GVAR(lastUpdateTime) = ACE_time; +if ((CBA_missionTime - GVAR(lastUpdateTime)) < INTERVAL) exitWith {}; +GVAR(lastUpdateTime) = CBA_missionTime; if (isNull ACE_player || !(alive ACE_player)) exitWith {}; +BEGIN_COUNTER(everyInterval); + private _newVel = velocity (vehicle ACE_player); private _accel = ((_newVel vectorDiff GVAR(oldVel)) vectorMultiply (1 / INTERVAL)) vectorAdd [0, 0, 9.8]; // Cap maximum G's to +- 10 to avoid g-effects when the update is low fps. @@ -91,3 +91,5 @@ if !(ACE_player getVariable ["ACE_isUnconscious", false]) then { }; GVAR(GForces_CC) ppEffectCommit INTERVAL; + +END_COUNTER(everyInterval); diff --git a/addons/gforces/stringtable.xml b/addons/gforces/stringtable.xml new file mode 100644 index 0000000000..f5d5f1b12d --- /dev/null +++ b/addons/gforces/stringtable.xml @@ -0,0 +1,17 @@ + + + + + Gforces Effects + Gforces Effekte + Efectos Gforces + G Force efekty + + + Only Aircraft + Nur Luftfahrzeug + Sólo Aeronave + Pouze letadla + + + \ No newline at end of file diff --git a/addons/goggles/RscTitles.hpp b/addons/goggles/RscTitles.hpp index 6c1b9870b6..5544b9b132 100644 --- a/addons/goggles/RscTitles.hpp +++ b/addons/goggles/RscTitles.hpp @@ -1,6 +1,6 @@ class RscTitles{ #include "define.hpp" - + class RscACE_Goggles_BaseTitle{ idd = -1; onLoad = "uiNamespace setVariable ['ACE_Goggles_Display', _this select 0]"; @@ -9,25 +9,25 @@ class RscTitles{ fadeOut=0.5; movingEnable = false; duration = 10e10; - name = "RscACE_Goggles_BaseTitle"; + name = "RscACE_Goggles_BaseTitle"; class controls; }; - + class RscACE_Goggles:RscACE_Goggles_BaseTitle{ idd = 1044; - name = "RscACE_Goggles"; + name = "RscACE_Goggles"; class controls{ class gogglesImage: RscPicture{ idc = 10650; }; }; }; - + class RscACE_GogglesEffects:RscACE_Goggles_BaseTitle{ idd = 1045; onLoad = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', _this select 0]"; onUnload = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', displayNull]"; - name = "RscACE_GogglesEffects"; + name = "RscACE_GogglesEffects"; fadeIn=0; fadeOut=0.5; class controls{ @@ -39,4 +39,4 @@ class RscTitles{ }; }; }; -}; \ No newline at end of file +}; diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index 832c961178..2885f8e4a6 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -31,7 +31,6 @@ GVAR(EffectsActive) = false; SETGLASSES(ace_player,GLASSESDEFAULT); -GVAR(EyesDamageScript) = -1; GVAR(FrameEvent) = [false, [false, 20]]; GVAR(PostProcessEyes_Enabled) = false; GVAR(DustHandler) = -1; @@ -42,13 +41,15 @@ GVAR(surfaceCache) = ""; GVAR(surfaceCacheIsDust) = false; // init GlassesChanged eventhandler -GVAR(OldGlasses) = "#NULLSTRING"; +GVAR(OldGlasses) = ""; ["playerInventoryChanged", { - (_this select 1) params ["", "_currentGlasses"]; + params ["_unit"]; + + private _currentGlasses = goggles _unit; if (GVAR(OldGlasses) != _currentGlasses) then { - ["GlassesChanged", [ACE_player, _currentGlasses]] call EFUNC(common,localEvent); + ["GlassesChanged", [_unit, _currentGlasses]] call EFUNC(common,localEvent); GVAR(OldGlasses) = _currentGlasses; }; }] call EFUNC(common,addEventHandler); @@ -81,16 +82,16 @@ GVAR(OldGlasses) = "#NULLSTRING"; GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [1, 1, 1, 0]]; GVAR(PostProcessEyes) ppEffectCommit 5; - GVAR(EyesDamageScript) = [{ + [{ params ["_unit"]; GVAR(PostProcessEyes) ppEffectEnable false; _unit setVariable ["ACE_EyesDamaged", false]; - }, _this, 5] call EFUNC(common,waitAndExecute); + }, _this, 5] call CBA_fnc_waitAndExecute; - }, _unit, 25] call EFUNC(common,waitAndExecute); + }, _unit, 25] call CBA_fnc_waitAndExecute; }] call EFUNC(common,addEventHandler); diff --git a/addons/goggles/config.cpp b/addons/goggles/config.cpp index 0812200a87..6a20daaee7 100644 --- a/addons/goggles/config.cpp +++ b/addons/goggles/config.cpp @@ -7,16 +7,17 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Garth 'L-H' de Wet"}; - authorUrl = "http://garth.snakebiteink.co.za/"; + author = ECSTRING(common,ACETeam); + authors[] = {"Garth 'L-H' de Wet"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgEventHandlers.hpp" -#define COMBAT_GOGGLES ACE_Overlay = QUOTE(PATHTOF(textures\HUD\CombatGoggles.paa)); \ - ACE_OverlayCracked = QUOTE(PATHTOF(textures\HUD\CombatGogglesCracked.paa)); \ +#define COMBAT_GOGGLES ACE_Overlay = QPATHTOF(textures\HUD\CombatGoggles.paa); \ + ACE_OverlayCracked = QPATHTOF(textures\HUD\CombatGogglesCracked.paa); \ ACE_Resistance = 2; \ ACE_Protection = 1; @@ -26,10 +27,10 @@ class CfgGlasses { ACE_TintAmount=0; ACE_Overlay = ""; ACE_OverlayDirt = "A3\Ui_f\data\igui\rsctitles\HealthTextures\dust_upper_ca.paa"; - ACE_OverlayCracked = QUOTE(PATHTOF(textures\HUD\Cracked.paa)); + ACE_OverlayCracked = QPATHTOF(textures\HUD\Cracked.paa); ACE_Resistance = 0; ACE_Protection = 0; - ACE_DustPath = QUOTE(PATHTOF(textures\fx\dust\%1.paa)); + ACE_DustPath = QPATHTOF(textures\fx\dust\%1.paa); }; class G_Combat:None { @@ -37,8 +38,8 @@ class CfgGlasses { }; class G_Diving { - ACE_Overlay = QUOTE(PATHTOF(textures\HUD\DivingGoggles.paa)); - ACE_OverlayCracked = QUOTE(PATHTOF(textures\HUD\DivingGogglesCracked.paa)); + ACE_Overlay = QPATHTOF(textures\HUD\DivingGoggles.paa); + ACE_OverlayCracked = QPATHTOF(textures\HUD\DivingGogglesCracked.paa); ACE_Resistance = 2; ACE_Protection = 1; }; @@ -209,7 +210,7 @@ class CfgGesturesMale { class States { class GestureFreezeStand; class GestureWipeFace: GestureFreezeStand { - file = QUOTE(PATHTOF(anim\WipeGlasses.rtm)); + file = QPATHTOF(anim\WipeGlasses.rtm); canPullTrigger = 0; }; }; diff --git a/addons/goggles/functions/fnc_applyDustEffect.sqf b/addons/goggles/functions/fnc_applyDustEffect.sqf index 944b98f127..9921bfdfd9 100644 --- a/addons/goggles/functions/fnc_applyDustEffect.sqf +++ b/addons/goggles/functions/fnc_applyDustEffect.sqf @@ -50,7 +50,7 @@ SETDUST(DBULLETS,0); GVAR(DustHandler) = -1; GVAR(DustHandler) = [{ - if (ACE_diagTime >= GETDUSTT(DTIME) + 3) then { + if (diag_tickTime >= GETDUSTT(DTIME) + 3) then { SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2)); private _amount = 1 - (GETDUSTT(DAMOUNT) * 0.125); @@ -71,7 +71,7 @@ GVAR(DustHandler) = [{ if (GVAR(DustHandler) == -1) then { GVAR(PostProcessEyes) ppEffectEnable false }; - }, [], 2] call EFUNC(common,waitAndExecute); + }, [], 2] call CBA_fnc_waitAndExecute; [GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler; GVAR(DustHandler) = -1; diff --git a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf index bc8d0bafbf..7a883ab7e7 100644 --- a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf +++ b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf @@ -50,7 +50,7 @@ if !(_rotorWash select 0) exitWith { if (GVAR(DustHandler) == -1) then { GVAR(PostProcessEyes) ppEffectEnable false; } - }, [], 2] call EFUNC(common,waitAndExecute); + }, [], 2] call CBA_fnc_waitAndExecute; [GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler; GVAR(DustHandler) = -1; diff --git a/addons/goggles/functions/fnc_clearGlasses.sqf b/addons/goggles/functions/fnc_clearGlasses.sqf index d0b14e4f90..f1622c8680 100644 --- a/addons/goggles/functions/fnc_clearGlasses.sqf +++ b/addons/goggles/functions/fnc_clearGlasses.sqf @@ -26,7 +26,7 @@ _effects set [BROKEN, _broken]; SETGLASSES(_unit,_effects); -if (stance _unit != "PRONE") then { +if ((stance _unit != "PRONE") && {primaryWeapon _unit != ""} && {currentWeapon _unit == primaryWeapon _unit}) then { _unit playActionNow "gestureWipeFace"; }; @@ -34,7 +34,7 @@ if (stance _unit != "PRONE") then { if (cameraView == "INTERNAL") then { addCamShake [5, 1.75, 2]; }; -}, [], 0.3] call EFUNC(common,waitAndExecute); +}, [], 0.3] call CBA_fnc_waitAndExecute; call FUNC(removeDirtEffect); call FUNC(removeRainEffect); diff --git a/addons/goggles/functions/fnc_handleFired.sqf b/addons/goggles/functions/fnc_handleFired.sqf index dcfcc51bec..066bc040f7 100644 --- a/addons/goggles/functions/fnc_handleFired.sqf +++ b/addons/goggles/functions/fnc_handleFired.sqf @@ -60,14 +60,14 @@ if (!GVAR(surfaceCacheIsDust)) exitWith {true}; // increment dust value with type bullet _bullets = GETDUSTT(DBULLETS); -if (ACE_diagTime - GETDUSTT(DTIME) > 1) then { +if (diag_tickTime - GETDUSTT(DTIME) > 1) then { _bullets = 0; }; _bullets = _bullets + 1; SETDUST(DBULLETS,_bullets); -SETDUST(DTIME,ACE_diagTime); +SETDUST(DTIME,diag_tickTime); // apply dust effect if the amount of fired bullets is over the threshold if (GETDUSTT(DAMOUNT) < 2) then { diff --git a/addons/goggles/stringtable.xml b/addons/goggles/stringtable.xml index 6b5a623715..ce337760d7 100644 --- a/addons/goggles/stringtable.xml +++ b/addons/goggles/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/grenades/CfgAmmo.hpp b/addons/grenades/CfgAmmo.hpp index 5aa33284c8..a5971044f9 100644 --- a/addons/grenades/CfgAmmo.hpp +++ b/addons/grenades/CfgAmmo.hpp @@ -81,7 +81,7 @@ class CfgAmmo { class ACE_G_M84: SmokeShell { GVAR(flashbang) = 1; - model = PATHTOF(models\ACE_m84_thrown.p3d); + model = QPATHTOF(models\ACE_m84_thrown.p3d); dangerRadiusHit = -1; suppressionRadiusHit = 20; typicalSpeed = 22; diff --git a/addons/grenades/CfgMagazines.hpp b/addons/grenades/CfgMagazines.hpp index 16dd9929ff..d1d9127fa4 100644 --- a/addons/grenades/CfgMagazines.hpp +++ b/addons/grenades/CfgMagazines.hpp @@ -59,8 +59,8 @@ class CfgMagazines { displayname = CSTRING(M84_Name); descriptionshort = CSTRING(M84_Description); displayNameShort = "M84"; - model = PATHTOF(models\ACE_m84.p3d); - picture = PATHTOF(UI\ACE_m84_x_ca.paa); + model = QPATHTOF(models\ACE_m84.p3d); + picture = QPATHTOF(UI\ACE_m84_x_ca.paa); ammo = "ACE_G_M84"; mass = 4; }; diff --git a/addons/grenades/config.cpp b/addons/grenades/config.cpp index 2f9e631fe1..7d98e13a24 100644 --- a/addons/grenades/config.cpp +++ b/addons/grenades/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2", "KoffeinFlummi"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2", "KoffeinFlummi"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/grenades/functions/fnc_flare.sqf b/addons/grenades/functions/fnc_flare.sqf index 74360e39b9..be2b4ce952 100644 --- a/addons/grenades/functions/fnc_flare.sqf +++ b/addons/grenades/functions/fnc_flare.sqf @@ -36,4 +36,4 @@ _light setLightDayLight true; _light lightAttachObject [_projectile, [0,0,0]]; //_light attachTo [_projectile, [0,0,0]]; -[{deleteVehicle _this}, _light, _timeToLive, 1] call EFUNC(common,waitAndExecute); +[{deleteVehicle _this}, _light, _timeToLive, 1] call CBA_fnc_waitAndExecute; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index c708f3a3cf..0d0779ccef 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -36,8 +36,8 @@ if (hasInterface) then { [{ params ["_light"]; deleteVehicle _light; - }, [_light], 0.2] call EFUNC(common,waitAndExecute); - }, [_light], 0.1] call EFUNC(common,waitAndExecute); + }, [_light], 0.2] call CBA_fnc_waitAndExecute; + }, [_light], 0.1] call CBA_fnc_waitAndExecute; }; // Affect local AI @@ -67,7 +67,7 @@ _affected = _affected - [ACE_player]; }; _unit setSkill (skill _unit * 50); - }, [_x], 7 * _strength] call EFUNC(common,waitAndExecute); + }, [_x], 7 * _strength] call CBA_fnc_waitAndExecute; }; } count _affected; @@ -126,12 +126,12 @@ if (hasInterface && {!isNull ACE_player} && {alive ACE_player}) then { GVAR(flashbangPPEffectCC) ppEffectAdjust [1,1,0,[1,1,1,0],[0,0,0,1],[0,0,0,0]]; GVAR(flashbangPPEffectCC) ppEffectCommit (10 * _strength); - }, [_strength], 7 * _strength] call EFUNC(common,waitAndExecute); + }, [_strength], 7 * _strength] call CBA_fnc_waitAndExecute; //FULLRECOVERY - end effect [{ GVAR(flashbangPPEffectCC) ppEffectEnable false; - }, [], 17 * _strength] call EFUNC(common,waitAndExecute); + }, [], 17 * _strength] call CBA_fnc_waitAndExecute; }; if (_strength > 0.2) then { diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index 284c573c2e..e603dd8743 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -32,7 +32,7 @@ if (local _unit) then { if (getNumber (_config >> QGVAR(flashbang)) == 1) then { private _fuzeTime = getNumber (_config >> "explosionTime"); - [FUNC(flashbangThrownFuze), [_projectile], _fuzeTime] call EFUNC(common,waitAndExecute); + [FUNC(flashbangThrownFuze), [_projectile], _fuzeTime] call CBA_fnc_waitAndExecute; }; }; @@ -42,7 +42,7 @@ if (getNumber (_config >> QGVAR(flare)) == 1) then { private _color = getArray (_config >> QGVAR(color)); private _intensity = _color deleteAt 3; - [FUNC(flare), [_projectile, _color, _intensity, _timeToLive], _fuzeTime, 0] call EFUNC(common,waitAndExecute); + [FUNC(flare), [_projectile, _color, _intensity, _timeToLive], _fuzeTime, 0] call CBA_fnc_waitAndExecute; }; // handle throw modes diff --git a/addons/grenades/stringtable.xml b/addons/grenades/stringtable.xml index a05f6635cd..44d9e7ad47 100644 --- a/addons/grenades/stringtable.xml +++ b/addons/grenades/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/headless/$PBOPREFIX$ b/addons/headless/$PBOPREFIX$ deleted file mode 100644 index 553c595da0..0000000000 --- a/addons/headless/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\headless diff --git a/addons/headless/ACE_Settings.hpp b/addons/headless/ACE_Settings.hpp deleted file mode 100644 index 6c8246a06b..0000000000 --- a/addons/headless/ACE_Settings.hpp +++ /dev/null @@ -1,20 +0,0 @@ -class ACE_Settings { - class GVAR(Enabled) { - value = 0; - typeName = "BOOL"; - displayName = ECSTRING(common,Enabled); - description = CSTRING(EnabledDesc); - }; - class GVAR(Delay) { - value = DELAY_DEFAULT; - typeName = "SCALAR"; - displayName = CSTRING(Delay); - description = CSTRING(DelayDesc); - }; - class GVAR(Log) { - value = 0; - typeName = "BOOL"; - displayName = CSTRING(Log); - description = CSTRING(LogDesc); - }; -}; diff --git a/addons/headless/CfgVehicles.hpp b/addons/headless/CfgVehicles.hpp deleted file mode 100644 index aa3837f6ae..0000000000 --- a/addons/headless/CfgVehicles.hpp +++ /dev/null @@ -1,37 +0,0 @@ -class CfgVehicles { - class ACE_Module; - class GVAR(module): ACE_Module { - author = ECSTRING(common,ACETeam); - category = "ACE_missionModules"; - displayName = CSTRING(Module); - function = QFUNC(moduleInit); - scope = 2; - isGlobal = 1; // Global - isTriggerActivated = 0; - isDisposable = 0; - icon = QUOTE(PATHTOF(UI\Icon_Module_Headless_ca.paa)); - class Arguments { - class Enabled { - displayName = ECSTRING(common,Enabled); - description = CSTRING(EnabledDesc); - typeName = "BOOL"; - defaultValue = 0; - }; - class Delay { - displayName = CSTRING(Delay); - description = CSTRING(DelayDesc); - typeName = "NUMBER"; - defaultValue = DELAY_DEFAULT; - }; - class Log { - displayName = CSTRING(Log); - description = CSTRING(LogDesc); - typeName = "BOOL"; - defaultValue = 0; - }; - }; - class ModuleDescription { - description = CSTRING(ModuleDesc); - }; - }; -}; diff --git a/addons/headless/README.md b/addons/headless/README.md deleted file mode 100644 index ab3d1ef403..0000000000 --- a/addons/headless/README.md +++ /dev/null @@ -1,16 +0,0 @@ -ace_headless -============ - -Adds automatic passing of AI groups to (up to 3) Headless Clients. -- Automatic Headless Client recognition -- Event-based transferring (on unit spawn, Headless Client connect and disconnect) -- Round-robin transferring when more than 1 Headless Client is present -- Mission makers can use the following to prevent a group from transferring to a Headless Client: - `this setVariable ["ace_headless_blacklist", true, true];` - - -## Maintainers - -The people responsible for merging changes to this component or answering potential questions. - -- [Jonpas](http://github.com/jonpas) diff --git a/addons/headless/UI/Icon_Module_Headless_ca.paa b/addons/headless/UI/Icon_Module_Headless_ca.paa deleted file mode 100644 index a3e23a8537..0000000000 Binary files a/addons/headless/UI/Icon_Module_Headless_ca.paa and /dev/null differ diff --git a/addons/headless/XEH_PREP.hpp b/addons/headless/XEH_PREP.hpp deleted file mode 100644 index 8d2aaa2cfb..0000000000 --- a/addons/headless/XEH_PREP.hpp +++ /dev/null @@ -1,7 +0,0 @@ - -PREP(handleConnectHC); -PREP(handleDisconnect); -PREP(handleInitPost); -PREP(moduleInit); -PREP(rebalance); -PREP(transferGroups); diff --git a/addons/headless/XEH_postInit.sqf b/addons/headless/XEH_postInit.sqf deleted file mode 100644 index 7b8a4615dc..0000000000 --- a/addons/headless/XEH_postInit.sqf +++ /dev/null @@ -1,16 +0,0 @@ -#include "script_component.hpp" - -// Exit on player clients that are not hosts -if (hasInterface && !isServer) exitWith {}; - -["SettingsInitialized", { - if (isServer) then { - // Add disconnect EH if HC transferring enabled - if (GVAR(Enabled)) then { - addMissionEventHandler ["HandleDisconnect", {_this call FUNC(handleDisconnect)}]; - }; - } else { - // Register HC (this part happens on HC only) - ["ACE_HeadlessClientJoined", [player]] call EFUNC(common,globalEvent); - }; -}] call EFUNC(common,addEventHandler); diff --git a/addons/headless/XEH_preInit.sqf b/addons/headless/XEH_preInit.sqf deleted file mode 100644 index 2455c9f999..0000000000 --- a/addons/headless/XEH_preInit.sqf +++ /dev/null @@ -1,13 +0,0 @@ -#include "script_component.hpp" - -ADDON = false; - -#include "XEH_PREP.hpp" - -if (isServer) then { - GVAR(headlessClients) = []; - GVAR(inRebalance) = false; - ["ACE_HeadlessClientJoined", FUNC(handleConnectHC)] call EFUNC(common,addEventHandler); -}; - -ADDON = true; diff --git a/addons/headless/config.cpp b/addons/headless/config.cpp deleted file mode 100644 index 9c4c6b9120..0000000000 --- a/addons/headless/config.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - author[]= {"Jonpas"}; - authorUrl = "https://github.com/jonpas"; - VERSION_CONFIG; - }; -}; - -#include "ACE_Settings.hpp" -#include "CfgEventHandlers.hpp" -#include "CfgVehicles.hpp" diff --git a/addons/headless/functions/fnc_handleConnectHC.sqf b/addons/headless/functions/fnc_handleConnectHC.sqf deleted file mode 100644 index 19293e9229..0000000000 --- a/addons/headless/functions/fnc_handleConnectHC.sqf +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Author: Jonpas - * Registers connected Headless Client for use. - * - * Arguments: - * 0: Headless Client - * - * Return Value: - * None - * - * Example: - * [headlessClient] call ace_headless_handleConnectHC; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_headlessClient"]; - -// Delay until settings are initialized (for checking if HC trasnferring is enabled) -if (!EGVAR(common,settingsInitFinished)) exitWith { - EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(handleConnectHC), _this]; -}; - -// Exit if HC transferring disabled or HC already registered -if (!GVAR(Enabled) || {_headlessClient in GVAR(headlessClients)}) exitWith {}; - -// Register for use -GVAR(headlessClients) pushBack _headlessClient; - -if (GVAR(Log)) then { - ACE_LOGINFO_1("Registered HC: %1",_headlessClient); -}; - -// Rebalance -[true] call FUNC(rebalance); diff --git a/addons/headless/functions/fnc_handleDisconnect.sqf b/addons/headless/functions/fnc_handleDisconnect.sqf deleted file mode 100644 index dc20379458..0000000000 --- a/addons/headless/functions/fnc_handleDisconnect.sqf +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Author: Jonpas - * Removes Headless Client from use. - * - * Arguments: - * 0: Object - * - * Return Value: - * Transfer To Server - * - * Example: - * [unit] call ace_headless_handleDisconnect; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_object"]; - -// Exit if not HC -if !(_object in GVAR(headlessClients)) exitWith {}; - -// Remove HC -GVAR(headlessClients) deleteAt (GVAR(headlessClients) find _object); - -if (GVAR(Log)) then { - ACE_LOGINFO_1("Removed HC: %1",_object); -}; - -// Rebalance -[true] call FUNC(rebalance); - -// Prevent transferring of HC to server -false diff --git a/addons/headless/functions/fnc_handleInitPost.sqf b/addons/headless/functions/fnc_handleInitPost.sqf deleted file mode 100644 index fd75367ce7..0000000000 --- a/addons/headless/functions/fnc_handleInitPost.sqf +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Author: Jonpas - * Request a rebalance. - * - * Arguments: - * 0: Object - * - * Return Value: - * None - * - * Example: - * [object] call ace_headless_handleInitPost; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_object"]; - -TRACE_1("InitPost",_object); - -// Delay until settings are initialized (for checking if HC trasnferring is enabled) -if (!EGVAR(common,settingsInitFinished)) exitWith { - EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(handleInitPost), _this]; -}; - -// Exit if HC transferring disabled or object not a unit (including unit inside vehicle) or is player -if (!GVAR(Enabled) || {!(_object in allUnits)} || {isPlayer _object}) exitWith {}; - -// Rebalance -[false] call FUNC(rebalance); diff --git a/addons/headless/functions/fnc_moduleInit.sqf b/addons/headless/functions/fnc_moduleInit.sqf deleted file mode 100644 index dc06d95b3b..0000000000 --- a/addons/headless/functions/fnc_moduleInit.sqf +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Author: Jonpas - * Initializes the Headless module. - * - * Arguments: - * 0: The module logic - * 1: Units (Unused) - * 2: Activated - * - * Return Value: - * None - * - * Public: No - */ -#include "script_component.hpp" - -if (!isServer) exitWith {}; - -params ["_logic", "", "_activated"]; - -if (!_activated) exitWith {}; - -[_logic, QGVAR(Enabled), "Enabled"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(Delay), "Delay"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(Log), "Log"] call EFUNC(common,readSettingFromModule); - -ACE_LOGINFO("Headless Module Initialized."); diff --git a/addons/headless/functions/fnc_rebalance.sqf b/addons/headless/functions/fnc_rebalance.sqf deleted file mode 100644 index 1c792ff94a..0000000000 --- a/addons/headless/functions/fnc_rebalance.sqf +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Author: Jonpas - * Rebalance AI groups accross HCs. - * - * Arguments: - * 0: Force - * - * Return Value: - * None - * - * Example: - * [false] call ace_headless_rebalance; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_force"]; - -TRACE_3("Rebalance",GVAR(inRebalance),GVAR(headlessClients),_force); - -// Exit if waiting for rebalance or no HCs present -if (GVAR(inRebalance) || {GVAR(headlessClients) isEqualTo []}) exitWith {}; - -// Transfer after rebalance delay -[FUNC(transferGroups), [_force], GVAR(Delay)] call EFUNC(common,waitAndExecute); - -// Currently in rebalance flag -GVAR(inRebalance) = true; diff --git a/addons/headless/functions/fnc_transferGroups.sqf b/addons/headless/functions/fnc_transferGroups.sqf deleted file mode 100644 index 892e9b58ff..0000000000 --- a/addons/headless/functions/fnc_transferGroups.sqf +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Author: Jonpas - * Transfers AI groups to Headess Client(s). - * - * Arguments: - * 0: Force - * - * Return Value: - * None - * - * Example: - * [false] call ace_headless_fnc_transferGroups; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_force"]; - -GVAR(headlessClients) params [ - ["_HC1", objNull, [objNull] ], - ["_HC2", objNull, [objNull] ], - ["_HC3", objNull, [objNull] ] -]; - -if (GVAR(Log)) then { - ACE_LOGINFO_2("Present HCs: %1 - Full Rebalance: %2",GVAR(headlessClients),_force); -}; - - -// Enable round-robin load balancing if more than one HC is present -private _loadBalance = [false, true] select (count GVAR(headlessClients) > 1); - - -// Get IDs and determine first HC to start with -private _idHC1 = -1; -private _idHC2 = -1; -private _idHC3 = -1; -private _currentHC = 0; - -if (!local _HC1) then { - _idHC1 = owner _HC1; - _currentHC = 1; -}; - -if (!local _HC2) then { - _idHC2 = owner _HC2; - - if (_currentHC == 0) then { - _currentHC = 2; - }; -}; - -if (!local _HC3) then { - _idHC3 = owner _HC3; - - if (_currentHC == 0) then { - _currentHC = 3; - }; -}; - - -// Prepare statistics -private _numTransferredHC1 = 0; -private _numTransferredHC2 = 0; -private _numTransferredHC3 = 0; - - -// Transfer AI groups -{ - // No transfer if empty group - private _transfer = !(_x isEqualTo []); - - if (_transfer) then { - { - // No transfer if already transferred - if (!_force && {(owner _x) in [_idHC1, _idHC2, _idHC3]}) exitWith { - _transfer = false; - }; - - // No transfer if player in this group - if (isPlayer _x) exitWith { - _transfer = false; - }; - - // No transfer if any unit in group is blacklisted - if (_x getVariable [QGVAR(blacklist), false]) exitWith { - _transfer = false; - }; - - // No transfer if vehicle unit is in or crew in that vehicle is blacklisted - if (vehicle _x != _x && {(vehicle _x) getVariable [QGVAR(blacklist), false]}) exitWith { - _transfer = false; - }; - } forEach (units _x); - }; - - - // Round robin between HCs if load balance enabled, else pass all to one HC - if (_transfer) then { - switch (_currentHC) do { - case 1: { - private _transferred = _x setGroupOwner _idHC1; - if (_loadBalance) then { - _currentHC = [3, 2] select (!local _HC2); - }; - if (_transferred) then { - _numTransferredHC1 = _numTransferredHC1 + 1; - }; - }; - case 2: { - private _transferred = _x setGroupOwner _idHC2; - if (_loadBalance) then { - _currentHC = [1, 3] select (!local _HC3); - }; - if (_transferred) then { - _numTransferredHC2 = _numTransferredHC2 + 1; - }; - }; - case 3: { - private _transferred = _x setGroupOwner _idHC3; - if (_loadBalance) then { - _currentHC = [2, 1] select (!local _HC1); - }; - if (_transferred) then { - _numTransferredHC3 = _numTransferredHC3 + 1; - }; - }; - default { - TRACE_1("No Valid HC to transfer to",_currentHC); - }; - }; - }; -} forEach allGroups; - - -if (GVAR(Log)) then { - private _numTransferredTotal = _numTransferredHC1 + _numTransferredHC2 + _numTransferredHC3; - ACE_LOGINFO_4("Groups Transferred: Total: %1 - HC1: %2 - HC2: %3 - HC3: %4",_numTransferredTotal,_numTransferredHC1,_numTransferredHC2,_numTransferredHC3); -}; - - -// Allow rebalance flag -GVAR(inRebalance) = false; diff --git a/addons/headless/functions/script_component.hpp b/addons/headless/functions/script_component.hpp deleted file mode 100644 index a38efad3a9..0000000000 --- a/addons/headless/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\headless\script_component.hpp" diff --git a/addons/headless/script_component.hpp b/addons/headless/script_component.hpp deleted file mode 100644 index c69bd780c9..0000000000 --- a/addons/headless/script_component.hpp +++ /dev/null @@ -1,15 +0,0 @@ -#define COMPONENT headless -#include "\z\ace\addons\main\script_mod.hpp" - -#ifdef DEBUG_ENABLED_HEADLESS - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_SETTINGS_HEADLESS - #define DEBUG_SETTINGS DEBUG_SETTINGS_HEADLESS -#endif - -#include "\z\ace\addons\main\script_macros.hpp" - - -#define DELAY_DEFAULT 15 diff --git a/addons/headless/stringtable.xml b/addons/headless/stringtable.xml deleted file mode 100644 index bc0acd8481..0000000000 --- a/addons/headless/stringtable.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Headless - Headless - Headless - Headless - Headless - Headless - Headless - - - This module allows you to setup automatic transferring of AI to Headless Clients. (Default: No) - Dieses Modul erlaubt es dir, die KI automatisch auf einen Headless Client zu transferieren. (Standard: Nein) - Moduł ten pozwala ustawić automatyczne przenoszenie AI do Headless Clientów. (Domyślnie: Nie) - Questo modulo ti consente di impostare il trasferimento automatico di IA all'Headless Client (Default: No) - Éste módulo permite activar la transferencia automática de IA al Headless Client. (Por defecto: No) - Ce module permet de configurer le trasnfert automatique des IA vers les Headless Client. (Défaut : Non) - Este módulo permite que você configure a transferência de AI's de forma automática para os Headless Clients (Padrão: Não) - - - Enables transferring of AI to Headless Clients. - Aktiviert den Transfer der KI auf Headless Clients. - Aktywuje przenoszenie AI do Headless Clientów - Abilita trasferimento di IA a Headless Client - Habilita la transferencia de IA al Headless Client. - Autorise le transfert d'IA vers les Headless Clients. - Ativa a transferência de AI para os Headless Clients - - - Delay - Verzögerung - Opóźnienie - Ritardo - Retardo - Délai - Atraso - - - Minimal delay between transfers, in seconds. (Default: 15) - Minimale Verzögerung zwischen Transfers in Sekunden. (Standard: 15) - Minimalne opóźnienie w sekundach pomiędzy transferami. (Domyślnie: 15) - Ritardo minimo tra trasferimenti, in secondi. (Default: 15) - Retardo mínimo entre transferencias, en segundos (Por defecto: 15) - Délai minimum entre les transferts, en secondes. (Défaut : 15) - Atraso mínimo entre transferências, em segundos. (Padrão: 15) - - - Log - Protokolldatei anlegen - Dziennik - Log - Registro - Journal - Registro - - - Log transfer statistics and Headless Client (dis)connections to RPT. (Default: No) - Zeichnet Transferstatistiken, Verbindungen und Verbindungsabbrüche in einer RPT-Datei auf. (Standard: Nein) - Zapisuj statystyki transferów oraz status Headless Clienta do RPT. (Domyślnie: Nie) - Logga statistiche trasferimenti e (dis)connessioni di Headless Client su RPT. (Default: No) - Registrar transferencias y (des)conexiones del Headless Client en el RPT. (Por defecto: No) - Enregistre les statistiques de transfert et les (dé)connections du Headless Client vers le RPT. (Défaut : Non) - Registra as estatísticas de transferências e (des)conexões dos Headless Clients para o RPT. (Padrão: Não) - - - \ No newline at end of file diff --git a/addons/hearing/ACE_Settings.hpp b/addons/hearing/ACE_Settings.hpp index dcae85fa25..2fb2a46211 100644 --- a/addons/hearing/ACE_Settings.hpp +++ b/addons/hearing/ACE_Settings.hpp @@ -1,22 +1,22 @@ class ACE_Settings { - class GVAR(EnableCombatDeafness) { + class GVAR(enableCombatDeafness) { category = CSTRING(Module_DisplayName); value = 1; typeName = "BOOL"; displayName = CSTRING(EnableCombatDeafness_DisplayName); description = CSTRING(EnableCombatDeafness_Description); }; - class GVAR(EarplugsVolume) { + class GVAR(earplugsVolume) { category = CSTRING(Module_DisplayName); value = 0.5; typeName = "SCALAR"; }; - class GVAR(UnconsciousnessVolume) { + class GVAR(unconsciousnessVolume) { category = CSTRING(Module_DisplayName); value = 0.4; typeName = "SCALAR"; }; - class GVAR(DisableEarRinging) { + class GVAR(disableEarRinging) { category = CSTRING(Module_DisplayName); value = 0; typeName = "BOOL"; diff --git a/addons/hearing/CfgEventHandlers.hpp b/addons/hearing/CfgEventHandlers.hpp index 352f802435..aa8dbf5134 100644 --- a/addons/hearing/CfgEventHandlers.hpp +++ b/addons/hearing/CfgEventHandlers.hpp @@ -25,22 +25,6 @@ class Extended_Init_EventHandlers { }; }; -class Extended_FiredNear_EventHandlers { - class AllVehicles { - class GVAR(FiredNear) { - clientFiredNear = QUOTE(_this call FUNC(firedNear);); - }; - }; -}; - -class Extended_Explosion_EventHandlers { - class CAManBase { - class GVAR(ExplosionNear) { - clientExplosion = QUOTE(_this call FUNC(explosionNear);); - }; - }; -}; - class Extended_Respawn_EventHandlers { class CAManBase { class ADDON { diff --git a/addons/hearing/CfgSounds.hpp b/addons/hearing/CfgSounds.hpp index 7afdae88cb..6df1b39193 100644 --- a/addons/hearing/CfgSounds.hpp +++ b/addons/hearing/CfgSounds.hpp @@ -1,34 +1,34 @@ class CfgSounds { class ACE_EarRinging_Weak { - sound[] = {QUOTE(PATHTOF(sounds\ACE_earringing_weak.wav)),8,1.7}; + sound[] = {QPATHTOF(sounds\ACE_earringing_weak.wav),8,1.7}; titles[] = {}; }; class ACE_EarRinging_Medium { - sound[] = {QUOTE(PATHTOF(sounds\ACE_earringing_medium.wav)),8,1.7}; + sound[] = {QPATHTOF(sounds\ACE_earringing_medium.wav),8,1.7}; titles[] = {}; }; class ACE_EarRinging_Heavy { - sound[] = {QUOTE(PATHTOF(sounds\ACE_earringing_heavy.wav)),8,1.7}; + sound[] = {QPATHTOF(sounds\ACE_earringing_heavy.wav),8,1.7}; titles[] = {}; }; class ACE_Combat_Deafness_Heavy { - sound[] = {QUOTE(PATHTOF(sounds\deafness.ogg)),8,1}; + sound[] = {QPATHTOF(sounds\deafness.ogg),8,1}; titles[] = {}; }; class ACE_Combat_Deafness_Medium { - sound[] = {QUOTE(PATHTOF(sounds\deafness.ogg)),3,1}; + sound[] = {QPATHTOF(sounds\deafness.ogg),3,1}; titles[] = {}; }; class ACE_Combat_Deafness_Heavy_NoRing { - sound[] = {QUOTE(PATHTOF(sounds\deafness_noring.ogg)),8,1}; + sound[] = {QPATHTOF(sounds\deafness_noring.ogg),8,1}; titles[] = {}; }; class ACE_Combat_Deafness_Medium_NoRing { - sound[] = {QUOTE(PATHTOF(sounds\deafness_noring.ogg)),3,1}; + sound[] = {QPATHTOF(sounds\deafness_noring.ogg),3,1}; + titles[] = {}; + }; + class ACE_Ring_Backblast { + sound[] = {QPATHTOF(sounds\backblast_ring.ogg),1,1}; titles[] = {}; }; - class ACE_Ring_Backblast { - sound[] = {QUOTE(PATHTOF(sounds\backblast_ring.ogg)),1,1}; - titles[] = {}; - }; }; diff --git a/addons/hearing/CfgVehicles.hpp b/addons/hearing/CfgVehicles.hpp index 17dec1641b..760ed95a03 100644 --- a/addons/hearing/CfgVehicles.hpp +++ b/addons/hearing/CfgVehicles.hpp @@ -10,7 +10,7 @@ class CfgVehicles { statement = QUOTE( [_player] call FUNC(putInEarPlugs) ); showDisabled = 0; priority = 2.5; - icon = PATHTOF(UI\ACE_earplugs_x_ca.paa); + icon = QPATHTOF(UI\ACE_earplugs_x_ca.paa); }; class ACE_RemoveEarplugs { displayName = CSTRING(EarPlugs_Off); @@ -19,7 +19,7 @@ class CfgVehicles { statement = QUOTE( [_player] call FUNC(removeEarPlugs) ); showDisabled = 0; priority = 2.5; - icon = PATHTOF(UI\ACE_earplugs_x_ca.paa); + icon = QPATHTOF(UI\ACE_earplugs_x_ca.paa); }; }; }; @@ -100,7 +100,7 @@ class CfgVehicles { scope = 2; isGlobal = 1; isSingular = 1; - icon = PATHTOF(UI\Icon_Module_Hearing_ca.paa); + icon = QPATHTOF(UI\Icon_Module_Hearing_ca.paa); class Arguments { class EnableCombatDeafness { displayName = CSTRING(EnableCombatDeafness_DisplayName); diff --git a/addons/hearing/CfgWeapons.hpp b/addons/hearing/CfgWeapons.hpp index af7b7d4cb3..c063c0e896 100644 --- a/addons/hearing/CfgWeapons.hpp +++ b/addons/hearing/CfgWeapons.hpp @@ -5,8 +5,8 @@ class CfgWeapons { class ACE_EarPlugs: ACE_ItemCore { displayName = CSTRING(EarPlugs_Name); descriptionShort = CSTRING(EarPlugs_Description); - model = QUOTE(PATHTOF(data\ace_earplugs.p3d)); - picture = PATHTOF(UI\ACE_earplugs_x_ca.paa); + model = QPATHTOF(data\ace_earplugs.p3d); + picture = QPATHTOF(UI\ACE_earplugs_x_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 1; diff --git a/addons/hearing/XEH_postInit.sqf b/addons/hearing/XEH_postInit.sqf index cbae40dee0..fdd61ccfde 100644 --- a/addons/hearing/XEH_postInit.sqf +++ b/addons/hearing/XEH_postInit.sqf @@ -17,6 +17,10 @@ GVAR(volumeAttenuation) = 1; // Only run PFEH and install event handlers if combat deafness is enabled if (!GVAR(EnableCombatDeafness)) exitWith {}; + //Add XEH: + ["CAManBase", "FiredNear", FUNC(firedNear)] call CBA_fnc_addClassEventHandler; + ["CAManBase", "Explosion", FUNC(explosionNear)] call CBA_fnc_addClassEventHandler; + // Update hearing protection now: [] call FUNC(updateHearingProtection); diff --git a/addons/hearing/config.cpp b/addons/hearing/config.cpp index 5d130e589a..3a52c369d8 100644 --- a/addons/hearing/config.cpp +++ b/addons/hearing/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_EarPlugs"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction", "A3_Characters_F", "A3_Characters_F_Kart"}; - author[] = {"KoffeinFlummi", "esteldunedain", "HopeJ", "commy2", "Rocko", "Rommel", "Ruthberg"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi", "esteldunedain", "HopeJ", "commy2", "Rocko", "Rommel", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/hearing/functions/fnc_explosionNear.sqf b/addons/hearing/functions/fnc_explosionNear.sqf index 799de52320..76c6707de5 100644 --- a/addons/hearing/functions/fnc_explosionNear.sqf +++ b/addons/hearing/functions/fnc_explosionNear.sqf @@ -16,9 +16,6 @@ */ #include "script_component.hpp" -// Only run if combat deafness is enabled -if (!GVAR(EnableCombatDeafness)) exitWith {}; - params ["_unit", "_damage"]; if (_unit != ACE_player) exitWith {}; diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index f583ab0050..46bbee4fae 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -22,9 +22,6 @@ */ #include "script_component.hpp" -// Only run if combat deafness is enabled -if (!GVAR(EnableCombatDeafness)) exitWith {}; - params ["_object", "_firer", "_distance", "_weapon", "", "", "_ammo"]; //Only run if firedNear object is player or player's vehicle: diff --git a/addons/hearing/functions/fnc_updateVolume.sqf b/addons/hearing/functions/fnc_updateVolume.sqf index 58eedc7b39..01ab58ef76 100644 --- a/addons/hearing/functions/fnc_updateVolume.sqf +++ b/addons/hearing/functions/fnc_updateVolume.sqf @@ -16,6 +16,12 @@ */ #include "script_component.hpp" +if (!alive ACE_player) exitWith { + if (missionNameSpace getVariable [QGVAR(disableVolumeUpdate), false]) exitWith {}; + TRACE_1("dead - removing hearing effects",ACE_player); + [QUOTE(ADDON), 1, true] call EFUNC(common,setHearingCapability); +}; + (_this select 0) params ["_justUpdateVolume"]; GVAR(deafnessDV) = (GVAR(deafnessDV) min 20) max 0; @@ -27,8 +33,8 @@ if (!_justUpdateVolume) then { if (GVAR(deafnessDV) - GVAR(deafnessPrior) > 1 || GVAR(deafnessDV) > 10) then { - if (ACE_time - GVAR(time3) < 3) exitWith {}; - GVAR(time3) = ACE_time; + if (CBA_missionTime - GVAR(time3) < 3) exitWith {}; + GVAR(time3) = CBA_missionTime; if (GVAR(deafnessDV) > 19.75) then { playSound (["ACE_Combat_Deafness_Heavy", "ACE_Combat_Deafness_Heavy_NoRing"] select GVAR(DisableEarRinging)); @@ -54,9 +60,4 @@ if (ACE_player getVariable ["ACE_isUnconscious", false]) then { _volume = _volume min GVAR(UnconsciousnessVolume); }; -private _soundTransitionTime = if (_justUpdateVolume) then {0.1} else {1}; - -_soundTransitionTime fadeSound _volume; -_soundTransitionTime fadeSpeech _volume; -ACE_player setVariable ["tf_globalVolume", _volume]; -if (!isNil "acre_api_fnc_setGlobalVolume") then {[_volume^(0.33)] call acre_api_fnc_setGlobalVolume;}; +[QUOTE(ADDON), _volume, true] call EFUNC(common,setHearingCapability); diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index ef36f3737c..f52b0c9812 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -20,7 +20,7 @@ Stopery do uszu umożliwiają użytkownikowi przebywać w pobliżu głośnej broni bez poniesienia konsekwencji jaką jest utrata słuchu. Ochranné špunty umožňují uživateli, aby neutrpěl zranění jeho sluchu v blízkosti hlasitých zbraní. Беруши позволяют носителю находиться возле громкого вооружения без потери слуха. - Bouchons Anti-Bruits pour la prévention des traumatismes sonores aigus. + Bouchons Anti-Bruits pour la prévention des traumatismes sonores aigüs. Erősebb hanghatásoktól védő füldugó, megakadályozza a nagy hanggal járó fegyverzettől való halláskárosodást. Protetor para ouvidos permitem que o usuário esteja próximo a ruídos sem danificar sua audição. Proteggono l'apparato uditivo, permettendo a chi li indossa di resistere ai suoni particolarmente forti senza alcun danno. @@ -114,7 +114,8 @@ Deaktiviert Ohrklingeln wenn der Spieler Hörschäden davonträgt. Desactiva el efecto de zumbido cuando el jugador recibe daño auditivo. Usuń szum w uszach przy chwilowej utracie słuchu. - Enlève l'effet de bourdonnement lorsque le joueur subis des traumatismes sonores + Enlève les acouphènes quand le joueur prend des dommages auditifs. + Quando il giocatore riceve danni all'udito, non fa sentire i fischi nelle orecchie Remove o efeito de zunido quando o jogador recebe dano na audição @@ -150,7 +151,7 @@ Ativar surdez em combate? Уменьшает возможность игрока слышать звуки при повреждении органов слуха Riduci l'abilità uditiva quando il giocatore riceve danno uditivo - Reduit les capacités auditives lorsque le joueur subit des traumatismes sonores + Réduire l'audition lorsque le joueur prend des dommages auditifs. Controls combat deafness and ear ringing. When activated, players can be deafened when a gun is fired in their vicinity or an explosion takes place without hearing protection @@ -173,6 +174,7 @@ Efecto Zeus RC Vliv na Zeus RC Effetto Zeus RC + Effets Zeus RC Allow zeus remote controlled units to be able to take hearing damage. @@ -183,6 +185,7 @@ Permitir a las unidades por control remoto de zeus que puedan tener daños auditivos. Aktivovat efekt ztráty sluchu pro vzdáleně ovládané jednotky. Consenti alle unità controllate in remoto da Zeus di ricevere danni all'udito. + Autoriser le Zeus contrôlé à distance de prendre des dommages auditifs. Add earplugs to units @@ -193,6 +196,7 @@ Přidat špunty jednotce Aggiungi Tappi per Orecchie alle unità Agregar tapones de oida a la unidad + Ajouter des bouchons anti-bruits aux unités. Add the `ACE_EarPlugs` item to all units that have loud weapons. Can disable if using custom loadouts. @@ -203,6 +207,7 @@ Přidat `ACE_EarPlugs` všem jednotkám které mají zbraň. Můžete vypnout, pokud používáte vlastní výbavu. Aggiungi l'oggetto 'ACE_EarPlugs' a tutte le unità che hanno armi rumorose. Può essere disabilitato se vengono usati loadout personalizzati. Agregar el item `ACE_EarPlugs` a todas las unidades equipadas con armas muy ruidosas. Desactivar si quieren utilizarse equipamientos personalizados. + Ajouter l'item "ACE_EarPlugs" à toutes les unités qui ont des armes lourdes. Peut être desactivé si des équipements personnels sont utilisés. \ No newline at end of file diff --git a/addons/hitreactions/config.cpp b/addons/hitreactions/config.cpp index 77b68b77f5..d6146a6b29 100644 --- a/addons/hitreactions/config.cpp +++ b/addons/hitreactions/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/hitreactions/functions/fnc_fallDown.sqf b/addons/hitreactions/functions/fnc_fallDown.sqf index 9ed43ae14f..03484438eb 100644 --- a/addons/hitreactions/functions/fnc_fallDown.sqf +++ b/addons/hitreactions/functions/fnc_fallDown.sqf @@ -31,7 +31,7 @@ if (_unit == ACE_player) then { }; // play scream sound -if (!isNil QUOTE(EFUNC(medical,playInjuredSound))) then { +if (!isNil QEFUNC(medical,playInjuredSound)) then { [_unit] call EFUNC(medical,playInjuredSound); }; diff --git a/addons/huntir/CfgAmmo.hpp b/addons/huntir/CfgAmmo.hpp index fac4d6fe60..a9cd260d0f 100644 --- a/addons/huntir/CfgAmmo.hpp +++ b/addons/huntir/CfgAmmo.hpp @@ -1,12 +1,12 @@ class CfgAmmo { class FlareBase; class F_HuntIR: FlareBase { - model = PATHTOF(data\ace_m1070_armed.p3d); + model = QPATHTOF(data\ace_m1070_armed.p3d); lightColor[] = {0, 0, 0, 0}; smokeColor[] = {0, 0, 0, 0}; timeToLive = 6; }; - + class ShellBase; class ACE_HuntIR_Propell: ShellBase { supersonicCrackNear[] = {"",0.316228,1,50}; @@ -26,6 +26,7 @@ class CfgAmmo { soundHit6[] = {"",3.16228,1,2000}; soundHit7[] = {"",3.16228,1,2000}; soundHit8[] = {"",3.16228,1,2000}; + SoundSetExplosion[] = {}; multiSoundHit[] = {}; class HitEffects {}; soundFakeFall0[] = {"",3.16228,1,1000}; @@ -33,13 +34,13 @@ class CfgAmmo { soundFakeFall2[] = {"",3.16228,1,1000}; soundFakeFall3[] = {"",3.16228,1,1000}; soundFakeFall[] = {}; - hit = 0; - indirectHit = 0; - indirectHitRange = 0; - explosive = 1; - model = "\A3\weapons_f\empty"; - airFriction = 0; - timeToLive = 1; - explosionTime = 0.001; + hit = 0; + indirectHit = 0; + indirectHitRange = 0; + explosive = 1; + model = "\A3\weapons_f\empty"; + airFriction = 0; + timeToLive = 1; + explosionTime = 0.001; }; }; diff --git a/addons/huntir/CfgMagazines.hpp b/addons/huntir/CfgMagazines.hpp index c11f81a98c..62ae785333 100644 --- a/addons/huntir/CfgMagazines.hpp +++ b/addons/huntir/CfgMagazines.hpp @@ -5,7 +5,7 @@ class CfgMagazines { displayName = CSTRING(magazine_displayName); displayNameShort = "HuntIR"; descriptionShort = ""; - picture = PATHTOF(data\m_m1070_ca.paa); + picture = QPATHTOF(data\m_m1070_ca.paa); ammo = "F_HuntIR"; }; }; diff --git a/addons/huntir/CfgVehicles.hpp b/addons/huntir/CfgVehicles.hpp index 3b6486aaf7..cd5054a2da 100644 --- a/addons/huntir/CfgVehicles.hpp +++ b/addons/huntir/CfgVehicles.hpp @@ -10,7 +10,7 @@ class CfgVehicles { statement = QUOTE(call FUNC(huntir)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\w_huntir_monitor_ca.paa); + icon = QPATHTOF(UI\w_huntir_monitor_ca.paa); exceptions[] = {}; }; }; @@ -23,7 +23,7 @@ class CfgVehicles { castDriverShadow = 0; destrType = "DestructDefault"; displayName = "HuntIR"; - model = PATHTOF(data\huntir.p3d); + model = QPATHTOF(data\huntir.p3d); scope = 1; soundCrash[] = {"", db-30, 1 }; soundEnviron[] = {"z\ace\addons\apl\sounds\padak_let", 0.316228, 1, 80}; @@ -73,7 +73,7 @@ class CfgVehicles { class ReammoBox_F; class ACE_HuntIR_Box: ReammoBox_F { - model = PATHTOF(data\ace_huntirbox.p3d); + model = QPATHTOF(data\ace_huntirbox.p3d); displayName = $STR_DN_ACE_HUNTIRBOX; class TransportItems { MACRO_ADDITEM(ACE_HuntIR_monitor,5); diff --git a/addons/huntir/CfgWeapons.hpp b/addons/huntir/CfgWeapons.hpp index 6ff271d604..979fc8875c 100644 --- a/addons/huntir/CfgWeapons.hpp +++ b/addons/huntir/CfgWeapons.hpp @@ -2,19 +2,19 @@ class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; - + class ACE_HuntIR_monitor: ACE_ItemCore { scope = 2; displayName = CSTRING(monitor_displayName); - picture = PATHTOF(UI\w_huntir_monitor_ca.paa); + picture = QPATHTOF(UI\w_huntir_monitor_ca.paa); descriptionShort = CSTRING(monitor_displayName); - model = PATHTOF(data\ace_huntir_monitor.p3d); + model = QPATHTOF(data\ace_huntir_monitor.p3d); class ItemInfo: InventoryItem_Base_F { mass = 20; }; }; - + class GrenadeLauncher; class UGL_F: GrenadeLauncher { magazines[] += {"ACE_HuntIR_M203"}; @@ -23,7 +23,7 @@ class CfgWeapons { //magazines[] += {"ACE_HuntIR_M203"}; magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell","ACE_HuntIR_M203"}; }; - + class Rifle_Base_F; class arifle_MX_Base_F: Rifle_Base_F { class GL_3GL_F: UGL_F { diff --git a/addons/huntir/Dialog.hpp b/addons/huntir/Dialog.hpp index ca1e85466b..745bef8dc3 100644 --- a/addons/huntir/Dialog.hpp +++ b/addons/huntir/Dialog.hpp @@ -154,7 +154,7 @@ class ace_huntir_cam_dialog { w = __W; h = __H + 0.2; border = 0; - text = PATHTOF(UI\ace_huntir_monitor_on.paa); + text = QPATHTOF(UI\ace_huntir_monitor_on.paa); }; class CAM_HEIGHT { type = CT_STATIC; @@ -311,7 +311,7 @@ class ace_huntir_cam_dialog_off: ace_huntir_cam_dialog_inactive { class RIGHT_BORDER: RIGHT_BORDER {}; class PRESS_HELP: PRESS_HELP {}; class HELP_DIALOG: HELP_DIALOG {}; - class CAM_BG: CAM_BG { text = PATHTOF(UI\ace_huntir_monitor_off.paa); }; + class CAM_BG: CAM_BG { text = QPATHTOF(UI\ace_huntir_monitor_off.paa); }; }; //ACTIVE PARA CAMERA DIALOG class ace_huntir_help_dialog: ace_huntir_cam_dialog { diff --git a/addons/huntir/XEH_postInit.sqf b/addons/huntir/XEH_postInit.sqf index 0c518dfcea..038cd62051 100644 --- a/addons/huntir/XEH_postInit.sqf +++ b/addons/huntir/XEH_postInit.sqf @@ -11,4 +11,3 @@ GVAR(ELEVAT) = 0.01; // Register fire event handler // Don't run for non players, as they are too dumb to launch huntirs anyway ["firedPlayer", DFUNC(handleFired)] call EFUNC(common,addEventHandler); -["firedPlayerNonLocal", DFUNC(handleFired)] call EFUNC(common,addEventHandler); diff --git a/addons/huntir/config.cpp b/addons/huntir/config.cpp index 5fb106ad2d..ce4b10bab1 100644 --- a/addons/huntir/config.cpp +++ b/addons/huntir/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_HuntIR_monitor"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Norrin", "Rocko", "Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Norrin", "Rocko", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 2eb7611a6a..80d5e33043 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -145,7 +145,7 @@ GVAR(no_cams) sort true; ctrlSetText [1, format["%1 m", round(GVAR(pos) select 2)]]; ctrlSetText [2, format["%1", GVAR(cur_cam) + 1]]; - _cam_time = ACE_time - (GVAR(huntIR) getVariable [QGVAR(startTime), ACE_time]); + _cam_time = CBA_missionTime - (GVAR(huntIR) getVariable [QGVAR(startTime), CBA_missionTime]); ctrlSetText [3, format["%1 s", round(_cam_time)]]; _cam_pos = getPosVisual GVAR(huntIR); _cam_pos = format ["X = %1, Y = %2", round (_cam_pos select 0), round (_cam_pos select 1)]; diff --git a/addons/huntir/functions/fnc_handleFired.sqf b/addons/huntir/functions/fnc_handleFired.sqf index 551b9975b6..b7e8c2a010 100644 --- a/addons/huntir/functions/fnc_handleFired.sqf +++ b/addons/huntir/functions/fnc_handleFired.sqf @@ -1,7 +1,7 @@ /* * Author: Norrin, Rocko, Ruthberg * - * Handles HuntIR projectiles. Called from the unified fired EH for all CAManBase. + * Handles HuntIR projectiles. Called from the unified fired EH for the local player. * * Arguments: * None. Parameters inherited from EFUNC(common,firedEH) @@ -34,7 +34,7 @@ if (!hasInterface) exitWith {}; params ["_position"]; _huntir = createVehicle ["ACE_HuntIR", _position, [], 0, "FLY"]; _huntir setPosATL _position; - _huntir setVariable [QGVAR(startTime), ACE_time, true]; + _huntir setVariable [QGVAR(startTime), CBA_missionTime, true]; [{ params ["_args", "_idPFH"]; _args params ["_huntir"]; @@ -50,5 +50,5 @@ if (!hasInterface) exitWith {}; _huntir setVectorUp [0, 0, 1]; }; }, 0, [_huntir]] call CBA_fnc_addPerFrameHandler; - }, [getPosATL _projectile vectorAdd [0, 0, 50]], 2, 0] call EFUNC(common,waitAndExecute); -}, [_projectile], 5, 0] call EFUNC(common,waitAndExecute); + }, [getPosATL _projectile vectorAdd [0, 0, 50]], 2, 0] call CBA_fnc_waitAndExecute; +}, [_projectile], 5, 0] call CBA_fnc_waitAndExecute; diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf index e06ada87ea..72a0ecee64 100644 --- a/addons/huntir/functions/fnc_huntir.sqf +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -30,7 +30,7 @@ createDialog "ace_huntir_cam_dialog_off"; createDialog "ace_huntir_cam_dialog_inactive"; uiNameSpace setVariable ["ace_huntir_monitor", findDisplay 18881]; [{ - GVAR(startTime) = ACE_time; + GVAR(startTime) = CBA_missionTime; GVAR(done) = false; GVAR(connectionDelay) = 5; GVAR(state) = "searching"; @@ -44,7 +44,7 @@ createDialog "ace_huntir_cam_dialog_off"; }; private ["_elapsedTime", "_nearestHuntIRs"]; - _elapsedTime = ACE_time - GVAR(startTime); + _elapsedTime = CBA_missionTime - GVAR(startTime); _nearestHuntIRs = ACE_player nearEntities ["ACE_HuntIR", HUNTIR_MAX_TRANSMISSION_RANGE]; if ((!dialog) || GVAR(done)) exitWith { @@ -90,9 +90,9 @@ createDialog "ace_huntir_cam_dialog_off"; GVAR(done) = true; closedialog 0; HUNTIR_BACKGROUND_LAYER_ID cutText ["", "PLAIN"]; - }, [], 3, 0] call EFUNC(common,waitAndExecute); + }, [], 3, 0] call CBA_fnc_waitAndExecute; }; }; }, __TYPE_WRITER_DELAY, []] call CBA_fnc_addPerFrameHandler; - }, [], 0.5, 0] call EFUNC(common,waitAndExecute); -}, [], 1, 0] call EFUNC(common,waitAndExecute); + }, [], 0.5, 0] call CBA_fnc_waitAndExecute; +}, [], 1, 0] call CBA_fnc_waitAndExecute; diff --git a/addons/huntir/stringtable.xml b/addons/huntir/stringtable.xml index 2331c3855c..8648f58ea9 100644 --- a/addons/huntir/stringtable.xml +++ b/addons/huntir/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/interact_menu/ACE_Settings.hpp b/addons/interact_menu/ACE_Settings.hpp index 075408499b..a36d3dd98d 100644 --- a/addons/interact_menu/ACE_Settings.hpp +++ b/addons/interact_menu/ACE_Settings.hpp @@ -1,5 +1,5 @@ class ACE_Settings { - class GVAR(AlwaysUseCursorSelfInteraction) { + class GVAR(alwaysUseCursorSelfInteraction) { value = 0; typeName = "BOOL"; isClientSettable = 1; @@ -14,14 +14,14 @@ class ACE_Settings { displayName = CSTRING(cursorKeepCentered); description = CSTRING(cursorKeepCenteredDescription); }; - class GVAR(AlwaysUseCursorInteraction) { + class GVAR(alwaysUseCursorInteraction) { value = 0; typeName = "BOOL"; isClientSettable = 1; category = CSTRING(Category_InteractionMenu); displayName = CSTRING(AlwaysUseCursorInteraction); }; - class GVAR(UseListMenu) { + class GVAR(useListMenu) { value = 0; typeName = "BOOL"; isClientSettable = 1; diff --git a/addons/interact_menu/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index ac3ee9b0f5..8711f8c180 100644 --- a/addons/interact_menu/XEH_preInit.sqf +++ b/addons/interact_menu/XEH_preInit.sqf @@ -4,6 +4,9 @@ ADDON = false; #include "XEH_PREP.hpp" +GVAR(ActNamespace) = [] call CBA_fnc_createNamespace; +GVAR(ActSelfNamespace) = [] call CBA_fnc_createNamespace; + // Event handlers for all interact menu controls DFUNC(handleMouseMovement) = { if (GVAR(cursorKeepCentered)) then { @@ -24,7 +27,7 @@ GVAR(keyDownSelfAction) = false; GVAR(keyDownTime) = 0; GVAR(openedMenuType) = -1; -GVAR(lastTime) = ACE_diagTime; +GVAR(lastTime) = diag_tickTime; GVAR(rotationAngle) = 0; GVAR(selectedAction) = [[],[]]; @@ -40,8 +43,15 @@ GVAR(lastPath) = []; GVAR(expanded) = false; -GVAR(startHoverTime) = ACE_diagTime; -GVAR(expandedTime) = ACE_diagTime; +GVAR(startHoverTime) = diag_tickTime; +GVAR(expandedTime) = diag_tickTime; + +// reset on mission load +addMissionEventHandler ["Loaded", { + GVAR(startHoverTime) = 0; + GVAR(expandedTime) = 0; +}]; + GVAR(iconCtrls) = []; GVAR(iconCount) = 0; diff --git a/addons/interact_menu/config.cpp b/addons/interact_menu/config.cpp index 8909c3d685..f84fea7ef9 100644 --- a/addons/interact_menu/config.cpp +++ b/addons/interact_menu/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"NouberNou", "esteldunedain"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"NouberNou", "esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index 68efce4f2c..56ae64e5f9 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -30,10 +30,11 @@ if (_typeNum == 0) then { [_objectType] call FUNC(compileMenuSelfAction); }; -private _varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType]; -private _actionTrees = missionNamespace getVariable [_varName, []]; -if((count _actionTrees) == 0) then { - missionNamespace setVariable [_varName, _actionTrees]; +private _namespace = [GVAR(ActNamespace), GVAR(ActSelfNamespace)] select _typeNum; +private _actionTrees = _namespace getVariable _objectType; +if (isNil "_actionTrees") then { + _actionTrees = []; + _namespace setVariable [_objectType, _actionTrees]; }; if (_parentPath isEqualTo ["ACE_MainActions"]) then { diff --git a/addons/interact_menu/functions/fnc_addMainAction.sqf b/addons/interact_menu/functions/fnc_addMainAction.sqf index 161e12d6de..4370f4d2ee 100644 --- a/addons/interact_menu/functions/fnc_addMainAction.sqf +++ b/addons/interact_menu/functions/fnc_addMainAction.sqf @@ -18,8 +18,12 @@ params ["_objectType", "_typeNum"]; -private _varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType]; -private _actionTrees = missionNamespace getVariable [_varName, []]; +private _namespace = [GVAR(ActNamespace), GVAR(ActSelfNamespace)] select _typeNum; +private _actionTrees = _namespace getVariable _objectType; +if (isNil "_actionTrees") then { + _actionTrees = []; +}; + private _parentNode = [_actionTrees, ["ACE_MainActions"]] call FUNC(findActionNode); if (isNil {_parentNode}) then { diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 02941626d1..7f2ca38540 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -18,10 +18,10 @@ private _objectType = _target; if (_target isEqualType objNull) then { _objectType = typeOf _target; }; -private _actionsVarName = format [QGVAR(Act_%1), _objectType]; +private _namespace = GVAR(ActNamespace); // Exit if the action menu is already compiled for this class -if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {}; +if !(isNil {_namespace getVariable _objectType}) exitWith {}; private _recurseFnc = { params ["_actionsCfg", "_parentDistance"]; @@ -104,7 +104,7 @@ private _actionsCfg = configFile >> "CfgVehicles" >> _objectType >> "ACE_Actions TRACE_1("Building ACE_Actions",_objectType); private _actions = [_actionsCfg, 0] call _recurseFnc; -missionNamespace setVariable [_actionsVarName, _actions]; +_namespace setVariable [_objectType, _actions]; /* [ diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index de1364ee84..eb9727a072 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -18,10 +18,10 @@ private _objectType = _target; if (_target isEqualType objNull) then { _objectType = typeOf _target; }; -private _actionsVarName = format [QGVAR(SelfAct_%1), _objectType]; +private _namespace = GVAR(ActSelfNamespace); // Exit if the action menu is already compiled for this class -if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {}; +if !(isNil {_namespace getVariable _objectType}) exitWith {}; private _recurseFnc = { @@ -125,4 +125,4 @@ private _actions = [ ] ]; -missionNamespace setVariable [_actionsVarName, _actions]; +_namespace setVariable [_objectType, _actions]; diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index b71130a248..4d9f0af4db 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -32,7 +32,7 @@ if (_menuType == 0) then { GVAR(keyDown) = false; GVAR(keyDownSelfAction) = true; }; -GVAR(keyDownTime) = ACE_diagTime; +GVAR(keyDownTime) = diag_tickTime; GVAR(openedMenuType) = _menuType; GVAR(lastTimeSearchedActions) = -1000; GVAR(ParsedTextCached) = []; @@ -83,21 +83,21 @@ if (GVAR(openedMenuType) == 0) then { if (vehicle ACE_player != ACE_player) then { GVAR(menuDepthPath) = [["ACE_SelfActions", (vehicle ACE_player)]]; GVAR(expanded) = true; - GVAR(expandedTime) = ACE_diagTime; + GVAR(expandedTime) = diag_tickTime; GVAR(lastPath) = +GVAR(menuDepthPath); GVAR(startHoverTime) = -1000; }; } else { GVAR(menuDepthPath) = [["ACE_ZeusActions", (getAssignedCuratorLogic player)]]; GVAR(expanded) = true; - GVAR(expandedTime) = ACE_diagTime; + GVAR(expandedTime) = diag_tickTime; GVAR(lastPath) = +GVAR(menuDepthPath); GVAR(startHoverTime) = -1000; }; } else { GVAR(menuDepthPath) = [["ACE_SelfActions", ACE_player]]; GVAR(expanded) = true; - GVAR(expandedTime) = ACE_diagTime; + GVAR(expandedTime) = diag_tickTime; GVAR(lastPath) = +GVAR(menuDepthPath); GVAR(startHoverTime) = -1000; }; diff --git a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf index c95f53f152..a01078ad3b 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf @@ -19,18 +19,20 @@ params ["_objectType", "_typeNum", "_fullPath"]; -private ["_res","_varName","_actionTrees", "_parentNode", "_found"]; -_res = _fullPath call FUNC(splitPath); +private _res = _fullPath call FUNC(splitPath); _res params ["_parentPath", "_actionName"]; -_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType]; -_actionTrees = missionNamespace getVariable [_varName, []]; +private _namespace = [GVAR(ActNamespace), GVAR(ActSelfNamespace)] select _typeNum; +private _actionTrees = _namespace getVariable _objectType; +if (isNil "_actionTrees") then { + _actionTrees = []; +}; -_parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode); +private _parentNode = [_actionTrees, _parentPath] call FUNC(findActionNode); if (isNil {_parentNode}) exitWith {}; // Iterate through children of the father -_found = false; +private _found = false; { if (((_x select 0) select 0) == _actionName) exitWith { TRACE_2("Deleting Action", _forEachIndex, _x); diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index 117a828b0b..00745a406f 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -51,12 +51,12 @@ if (GVAR(openedMenuType) >= 0) then { private _closest = GVAR(currentOptions) select _closestSelection; _closest params ["_action", "_sPos", "_hoverPath"]; - private _cTime = ACE_diagTime; + private _cTime = diag_tickTime; private _delta = _cTime - GVAR(lastTime); GVAR(lastTime) = _cTime; GVAR(rotationAngle) = (GVAR(rotationAngle) + (270*_delta)) mod 360; - [_sPos, format [QUOTE(PATHTOF(ui\selector%1.paa)), floor (((abs GVAR(rotationAngle)) mod 90) / 6)]] call FUNC(renderSelector); + [_sPos, format [QPATHTOF(ui\selector%1.paa), floor (((abs GVAR(rotationAngle)) mod 90) / 6)]] call FUNC(renderSelector); _foundTarget = true; GVAR(actionSelected) = true; @@ -65,17 +65,17 @@ if (GVAR(openedMenuType) >= 0) then { private _misMatch = !(GVAR(lastPath) isEqualTo _hoverPath); - if(_misMatch && {ACE_diagTime-GVAR(expandedTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then { - GVAR(startHoverTime) = ACE_diagTime; + if(_misMatch && {diag_tickTime-GVAR(expandedTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then { + GVAR(startHoverTime) = diag_tickTime; GVAR(lastPath) = _hoverPath; GVAR(expanded) = false; } else { - if(!GVAR(expanded) && {ACE_diagTime-GVAR(startHoverTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then { + if(!GVAR(expanded) && {diag_tickTime-GVAR(startHoverTime) > linearConversion [0, 2, GVAR(menuAnimationSpeed), 0.25, 0.08333333]}) then { GVAR(expanded) = true; // Start the expanding menu animation only if the user is not going up the menu if !([GVAR(menuDepthPath),GVAR(lastPath)] call FUNC(isSubPath)) then { - GVAR(expandedTime) = ACE_diagTime; + GVAR(expandedTime) = diag_tickTime; }; GVAR(menuDepthPath) = +GVAR(lastPath); diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 1d42f38c6c..d3df02ca40 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -24,7 +24,7 @@ private _fnc_renderNearbyActions = { #define MAXINTERACTOBJECTS 3 GVAR(foundActions) = []; - GVAR(lastTimeSearchedActions) = ACE_diagTime; + GVAR(lastTimeSearchedActions) = diag_tickTime; private _numInteractObjects = 0; private _nearestObjects = nearestObjects [ACE_player, ["All"], 13]; @@ -54,8 +54,9 @@ private _fnc_renderNearbyActions = { } count GVAR(objectActionList); // Iterate through base level class actions and render them if appropiate - private _actionsVarName = format [QGVAR(Act_%1), typeOf _target]; - private _classActions = missionNamespace getVariable [_actionsVarName, []]; + private _namespace = GVAR(ActNamespace); + private _classActions = _namespace getVariable typeOf _target; + { private _action = _x; // Try to render the menu @@ -95,8 +96,8 @@ private _fnc_renderSelfActions = { GVAR(objectActionList) = _target getVariable [QGVAR(selfActions), []]; // Iterate through base level class actions and render them if appropiate - private _actionsVarName = format [QGVAR(SelfAct_%1), typeOf _target]; - private _classActions = missionNamespace getVariable [_actionsVarName, []]; + private _namespace = GVAR(ActSelfNamespace); + private _classActions = _namespace getVariable typeOf _target; private _pos = if !(GVAR(useCursorMenu)) then { //Convert to ASL, add offset and then convert back to AGL (handles waves when over water) @@ -127,7 +128,7 @@ GVAR(collectedActionPoints) resize 0; if (GVAR(openedMenuType) == 0) then { if (isNull curatorCamera) then { if (vehicle ACE_player == ACE_player) then { - if (ACE_diagTime > GVAR(lastTimeSearchedActions) + 0.20) then { + if (diag_tickTime > GVAR(lastTimeSearchedActions) + 0.20) then { // Once every 0.2 secs, collect nearby objects active and visible action points and render them call _fnc_renderNearbyActions; } else { diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index 6abb980620..f975db17f1 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -99,8 +99,8 @@ if (GVAR(UseListMenu)) then { // Animate menu scale if (_menuInSelectedPath && {_menuDepth == count _path}) then { - _scaleX = _scaleX * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * linearConversion [0, 2, GVAR(menuAnimationSpeed), 8, 16]) min 1)); - _scaleY = _scaleY * (0.3 + 0.7 * (((ACE_diagTime - GVAR(expandedTime)) * linearConversion [0, 2, GVAR(menuAnimationSpeed), 8, 16]) min 1)); + _scaleX = _scaleX * (0.3 + 0.7 * (((diag_tickTime - GVAR(expandedTime)) * linearConversion [0, 2, GVAR(menuAnimationSpeed), 8, 16]) min 1)); + _scaleY = _scaleY * (0.3 + 0.7 * (((diag_tickTime - GVAR(expandedTime)) * linearConversion [0, 2, GVAR(menuAnimationSpeed), 8, 16]) min 1)); }; private _target = _actionObject; diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index 6ea279c110..aac120ddbc 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -310,6 +310,7 @@ Menu interakce Menú de interacción Menù Interazioni + Menu d'interaction Interaction Animation Speed @@ -320,6 +321,7 @@ Rychlost animace interakce Velocità Animazioni Interazioni Velocidad de animación del menú de interacción + Vitesse des animations du menu d'interaction Makes menu animations faster and decreases the time needed to hover to show sub actions @@ -330,6 +332,7 @@ Zrychlí animaci menu a sníží tak čas potřebný pro plné zobrazení podmenu Rende le animazioni Menù più veloci e diminuisce il tempo richiesto per mostrare sotto-azioni Hace la animación del menú más rápida, reduciendo el tiempo necesario para abrir sub-acciones. + Rendre le menu d'interaction plus rapide et reduire le temps nécessaire de survol d'une action pour afficher les sous-actions. \ No newline at end of file diff --git a/addons/interaction/ACE_Settings.hpp b/addons/interaction/ACE_Settings.hpp index a4e6dad42c..e95947ec75 100644 --- a/addons/interaction/ACE_Settings.hpp +++ b/addons/interaction/ACE_Settings.hpp @@ -1,6 +1,8 @@ class ACE_Settings { - class GVAR(EnableTeamManagement) { + class GVAR(enableTeamManagement) { + displayName = CSTRING(EnableTeamManagement_DisplayName); + description = CSTRING(EnableTeamManagement_Description); value = 1; typeName = "BOOL"; }; diff --git a/addons/interaction/CfgEventHandlers.hpp b/addons/interaction/CfgEventHandlers.hpp index 93be6e902b..f4febe40e9 100644 --- a/addons/interaction/CfgEventHandlers.hpp +++ b/addons/interaction/CfgEventHandlers.hpp @@ -24,3 +24,9 @@ class Extended_Respawn_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 5c3366c9f0..dd6ca32de6 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -1,3 +1,6 @@ + +class CBA_Extended_EventHandlers; + class CfgVehicles { class ACE_Module; class ACE_ModuleInteraction: ACE_Module { @@ -8,7 +11,7 @@ class CfgVehicles { scope = 2; isGlobal = 1; isSingular = 1; - icon = PATHTOF(UI\Icon_Module_Interaction_ca.paa); + icon = QPATHTOF(UI\Icon_Module_Interaction_ca.paa); class Arguments { class EnableTeamManagement { displayName = CSTRING(EnableTeamManagement_DisplayName); @@ -65,14 +68,14 @@ class CfgVehicles { statement = ""; showDisabled = 0; priority = 3.2; - icon = PATHTOF(UI\team\team_management_ca.paa); + icon = QPATHTOF(UI\team\team_management_ca.paa); class ACE_AssignTeamRed { displayName = CSTRING(AssignTeamRed); condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam)); statement = QUOTE([ARR_2(_target,'RED')] call DFUNC(joinTeam)); showDisabled = 1; - icon = PATHTOF(UI\team\team_red_ca.paa); + icon = QPATHTOF(UI\team\team_red_ca.paa); priority = 2.4; }; class ACE_AssignTeamGreen { @@ -80,7 +83,7 @@ class CfgVehicles { condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam)); statement = QUOTE([ARR_2(_target,'GREEN')] call DFUNC(joinTeam)); showDisabled = 1; - icon = PATHTOF(UI\team\team_green_ca.paa); + icon = QPATHTOF(UI\team\team_green_ca.paa); priority = 2.3; }; class ACE_AssignTeamBlue { @@ -88,7 +91,7 @@ class CfgVehicles { condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam)); statement = QUOTE([ARR_2(_target,'BLUE')] call DFUNC(joinTeam)); showDisabled = 1; - icon = PATHTOF(UI\team\team_blue_ca.paa); + icon = QPATHTOF(UI\team\team_blue_ca.paa); priority = 2.2; }; class ACE_AssignTeamYellow { @@ -96,7 +99,7 @@ class CfgVehicles { condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam)); statement = QUOTE([ARR_2(_target,'YELLOW')] call DFUNC(joinTeam)); showDisabled = 1; - icon = PATHTOF(UI\team\team_yellow_ca.paa); + icon = QPATHTOF(UI\team\team_yellow_ca.paa); priority = 2.1; }; class ACE_UnassignTeam { @@ -104,7 +107,7 @@ class CfgVehicles { condition = QUOTE([ARR_2(_player,_target)] call DFUNC(canJoinTeam) && {assignedTeam _target != 'MAIN'}); statement = QUOTE([ARR_2(_target,'MAIN')] call DFUNC(joinTeam)); showDisabled = 1; - icon = PATHTOF(UI\team\team_white_ca.paa); + icon = QPATHTOF(UI\team\team_white_ca.paa); priority = 2.5; }; }; @@ -115,7 +118,7 @@ class CfgVehicles { statement = QUOTE([_player] joinSilent group _target); showDisabled = 0; priority = 2.6; - icon = PATHTOF(UI\team\team_management_ca.paa); + icon = QPATHTOF(UI\team\team_management_ca.paa); }; class ACE_GetDown { displayName = CSTRING(GetDown); @@ -220,7 +223,7 @@ class CfgVehicles { statement = ""; showDisabled = 1; priority = 3.2; - icon = PATHTOF(UI\team\team_management_ca.paa); + icon = QPATHTOF(UI\team\team_management_ca.paa); class ACE_JoinTeamRed { displayName = CSTRING(JoinTeamRed); @@ -229,7 +232,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player,'RED')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.4; - icon = PATHTOF(UI\team\team_red_ca.paa); + icon = QPATHTOF(UI\team\team_red_ca.paa); }; class ACE_JoinTeamGreen { displayName = CSTRING(JoinTeamGreen); @@ -238,7 +241,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player,'GREEN')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.3; - icon = PATHTOF(UI\team\team_green_ca.paa); + icon = QPATHTOF(UI\team\team_green_ca.paa); }; class ACE_JoinTeamBlue { displayName = CSTRING(JoinTeamBlue); @@ -247,7 +250,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player,'BLUE')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.2; - icon = PATHTOF(UI\team\team_blue_ca.paa); + icon = QPATHTOF(UI\team\team_blue_ca.paa); }; class ACE_JoinTeamYellow { displayName = CSTRING(JoinTeamYellow); @@ -256,7 +259,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player,'YELLOW')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.1; - icon = PATHTOF(UI\team\team_yellow_ca.paa); + icon = QPATHTOF(UI\team\team_yellow_ca.paa); }; class ACE_LeaveTeam { displayName = CSTRING(LeaveTeam); @@ -265,7 +268,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player,'MAIN')] call DFUNC(joinTeam)); showDisabled = 1; priority = 2.5; - icon = PATHTOF(UI\team\team_white_ca.paa); + icon = QPATHTOF(UI\team\team_white_ca.paa); }; class ACE_BecomeLeader { displayName = CSTRING(BecomeLeader); @@ -274,7 +277,7 @@ class CfgVehicles { statement = QUOTE(_this call DFUNC(doBecomeLeader)); showDisabled = 1; priority = 1.0; - icon = PATHTOF(UI\team\team_white_ca.paa); + icon = QPATHTOF(UI\team\team_white_ca.paa); }; class ACE_LeaveGroup { displayName = CSTRING(LeaveGroup); @@ -283,7 +286,7 @@ class CfgVehicles { statement = QUOTE(_oldGroup = units group _player; _newGroup = createGroup side _player; [_player] joinSilent _newGroup; {_player reveal _x} forEach _oldGroup;); showDisabled = 1; priority = 1.2; - icon = PATHTOF(UI\team\team_management_ca.paa); + icon = QPATHTOF(UI\team\team_management_ca.paa); }; }; @@ -352,6 +355,32 @@ class CfgVehicles { }; }; + class Motorcycle: LandVehicle { + class ACE_Actions { + class ACE_MainActions { + displayName = CSTRING(MainAction); + selection = ""; + distance = 10; + condition = "true"; + class ACE_Passengers { + displayName = CSTRING(Passengers); + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); + }; + }; + }; + + class ACE_SelfActions { + class ACE_Passengers { + displayName = CSTRING(Passengers); + condition = "true"; + statement = ""; + insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); + }; + }; + }; + class Air; class Helicopter: Air { class ACE_Actions { @@ -417,7 +446,7 @@ class CfgVehicles { class ACE_Push { displayName = CSTRING(Push); distance = 6; - condition = QUOTE(getMass _target <= 2600 && {alive _target} && {vectorMagnitude velocity _target < 3}); + condition = QUOTE(_target call FUNC(canPush)); statement = QUOTE(_this call FUNC(push)); showDisabled = 0; priority = -1; @@ -467,14 +496,6 @@ class CfgVehicles { }; }; - class Pod_Heli_Transport_04_base_F: StaticWeapon { - class ACE_Actions: ACE_Actions { - class ACE_MainActions: ACE_MainActions { - distance = 5; - }; - }; - }; - class StaticMGWeapon: StaticWeapon {}; class HMG_01_base_F: StaticMGWeapon {}; @@ -523,6 +544,14 @@ class CfgVehicles { class ACE_SelfActions {}; }; + class Slingload_base_F: ReammoBox_F {}; + class Pod_Heli_Transport_04_base_F: Slingload_base_F { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + distance = 5; + }; + }; + }; class ACE_RepairItem_Base: ThingX { class ACE_Actions { @@ -539,8 +568,11 @@ class CfgVehicles { class Lamps_base_F; class Land_PortableLight_single_F: Lamps_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + scope = 2; - XEH_ENABLED; class ACE_Actions { class ACE_MainActions { displayName = CSTRING(MainAction); @@ -571,7 +603,7 @@ class CfgVehicles { class Land_PortableLight_double_off_F: Land_PortableLight_double_F { scope = 1; }; - + class RoadCone_F: ThingX { class ACE_Actions { class ACE_MainActions { diff --git a/addons/interaction/RscTitles.hpp b/addons/interaction/RscTitles.hpp index d03d3e0f36..71070b1715 100644 --- a/addons/interaction/RscTitles.hpp +++ b/addons/interaction/RscTitles.hpp @@ -170,7 +170,7 @@ class RscTitles { class controls { class SelectIcon: RscInteractionHelperIcon{ idc = 1200; - text = PATHTOF(UI\mouse_left_ca.paa); + text = QPATHTOF(UI\mouse_left_ca.paa); y = 17.5 * GUI_GRID_H; }; class SelectText: RscInteractionText{ @@ -180,7 +180,7 @@ class RscTitles { }; class GoBackIcon: RscInteractionHelperIcon{ idc = 1201; - text = PATHTOF(UI\mouse_right_ca.paa); + text = QPATHTOF(UI\mouse_right_ca.paa); y = 19.5 * GUI_GRID_H; }; class GoBackText: RscInteractionText{ @@ -190,7 +190,7 @@ class RscTitles { }; class ScrollIcon: RscInteractionHelperIcon{ idc = 1202; - text = PATHTOF(UI\mouse_scroll_ca.paa); + text = QPATHTOF(UI\mouse_scroll_ca.paa); y = 18.5 * GUI_GRID_H; }; class ScrollText: RscInteractionText{ diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp index 71facedc3f..be6158cdd5 100644 --- a/addons/interaction/XEH_PREP.hpp +++ b/addons/interaction/XEH_PREP.hpp @@ -32,6 +32,7 @@ PREP(handleScrollWheel); PREP(openDoor); // interaction with boats +PREP(canPush); PREP(push); PREP(switchLamp); diff --git a/addons/interaction/XEH_missionDisplayLoad.sqf b/addons/interaction/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/interaction/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index c57fd09191..66e0cb1341 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -32,8 +32,6 @@ if (!hasInterface) exitWith {}; GVAR(isOpeningDoor) = false; -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - ["tapShoulder", { params ["_unit", "_shoulderNum"]; diff --git a/addons/interaction/config.cpp b/addons/interaction/config.cpp index 2413256bf4..5a21e452e3 100644 --- a/addons/interaction/config.cpp +++ b/addons/interaction/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interact_menu"}; - author[] = {"commy2", "KoffeinFlummi", "esteldunedain", "bux578", "dixon13"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2", "KoffeinFlummi", "esteldunedain", "bux578", "dixon13"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/interaction/functions/fnc_addPassengerActions.sqf b/addons/interaction/functions/fnc_addPassengerActions.sqf index 47a845601b..ca87542172 100644 --- a/addons/interaction/functions/fnc_addPassengerActions.sqf +++ b/addons/interaction/functions/fnc_addPassengerActions.sqf @@ -20,8 +20,11 @@ params ["", "", "_parameters"]; _parameters params ["_unit"]; -private _varName = format [QEGVAR(interact_menu,Act_%1), typeOf _unit]; -private _actionTrees = missionNamespace getVariable [_varName, []]; +private _namespace = EGVAR(interact_menu,ActNamespace); +private _actionTrees = _namespace getVariable typeOf _unit; +if (isNil "_actionTrees") then { + _actionTrees = []; +}; private _actions = []; diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 8ee95b7eb9..7b8ad69ee0 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -34,7 +34,7 @@ _actions = []; ] select (([driver _vehicle, gunner _vehicle, commander _vehicle] find _unit) + 1); if (_unit getVariable [QEGVAR(captives,isHandcuffed), false]) then { - _icon = QUOTE(PATHTOEF(captives,UI\handcuff_ca.paa)); + _icon = QPATHTOEF(captives,UI\handcuff_ca.paa); }; _actions pushBack [ diff --git a/addons/interaction/functions/fnc_canPush.sqf b/addons/interaction/functions/fnc_canPush.sqf new file mode 100644 index 0000000000..478c89ca45 --- /dev/null +++ b/addons/interaction/functions/fnc_canPush.sqf @@ -0,0 +1,22 @@ +/* + * Author: Jonpas + * Checks if the boat can be pushed. + * + * Arguments: + * 0: Target + * + * Return Value: + * Can Push + * + * Example: + * [target] call ace_interaction_fnc_canPush + * + * Public: No + */ +#include "script_component.hpp" + +params ["_target"]; + +alive _target && +{getMass _target <= 2600 || getNumber (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(canPush)) == 1} && +{vectorMagnitude velocity _target < 3} diff --git a/addons/interaction/functions/fnc_hideMouseHint.sqf b/addons/interaction/functions/fnc_hideMouseHint.sqf index d7f9d9140e..709b798fed 100644 --- a/addons/interaction/functions/fnc_hideMouseHint.sqf +++ b/addons/interaction/functions/fnc_hideMouseHint.sqf @@ -19,4 +19,7 @@ if (isNull (uiNamespace getVariable ["ACE_Helper_Display", objNull])) exitWith { (QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; -["mouseHint", []] call EFUNC(common,showHud); //This is equivalent to the old showHud true +// Disable action menu, showHud also disables all scripted UI (such as drawIcon3D) +inGameUISetEventHandler ["PrevAction", "false"]; +inGameUISetEventHandler ["NextAction", "false"]; +inGameUISetEventHandler ["Action", "false"]; diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index b2249d1589..180c01fba9 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -62,10 +62,10 @@ GVAR(usedScrollWheel) = false; }; // this allows for holding the door in it's current state. - if (ACE_time > _time && {diag_frameno > _frame}) then { + if (CBA_missionTime > _time && {diag_frameno > _frame}) then { GVAR(usedScrollWheel) = true; }; // do incremental door opening {_house animate [_x, GVAR(doorTargetPhase)]; false} count _animations; -}, 0.1, [_house, _animations, getPosASL ACE_player, ACE_time + 0.2, diag_frameno + 2]] call CBA_fnc_addPerFrameHandler; +}, 0.1, [_house, _animations, getPosASL ACE_player, CBA_missionTime + 0.2, diag_frameno + 2]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/interaction/functions/fnc_push.sqf b/addons/interaction/functions/fnc_push.sqf index 9a6c86a18e..bdeaf29012 100644 --- a/addons/interaction/functions/fnc_push.sqf +++ b/addons/interaction/functions/fnc_push.sqf @@ -18,8 +18,7 @@ params ["_boat", "_unit"]; -private "_newVelocity"; -_newVelocity = vectorDir _unit; +private _newVelocity = vectorDir _unit; _newVelocity set [2, 0.25]; _newVelocity = _newVelocity vectorMultiply 2; diff --git a/addons/interaction/functions/fnc_showMouseHint.sqf b/addons/interaction/functions/fnc_showMouseHint.sqf index 429b7d7670..57c8a7bf50 100644 --- a/addons/interaction/functions/fnc_showMouseHint.sqf +++ b/addons/interaction/functions/fnc_showMouseHint.sqf @@ -50,4 +50,7 @@ if (_scroll == "") exitWith { (_display displayCtrl 1002) ctrlSetText _scroll; -["mouseHint", [false, true, true, true, true, true, true, false]] call EFUNC(common,showHud); //This is equivalent to the old showHud false +// Enable action menu +inGameUISetEventHandler ["PrevAction", "true"]; +inGameUISetEventHandler ["NextAction", "true"]; +inGameUISetEventHandler ["Action", "true"]; diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 4417c11f75..d9adf095fe 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -355,6 +355,8 @@ Esci Aussteigen! Sal del vehículo! + Sortez ! + Vystupte Saia @@ -710,6 +712,9 @@ Aktivieren Włącz Encender + Allumer + Accendi + Zapnout Ligar @@ -717,6 +722,9 @@ Deaktivieren Wyłącz Apagar + Eteindre + Spegni + Vypnout Desligar @@ -728,6 +736,7 @@ Podat zásobník Passa caricatore Pasar cargador + Donner un chargeur Primary magazine @@ -738,6 +747,7 @@ Zásobník do primární zbraně Caricatore Primario Cargador primario + Chargeur d'arme principale Pistol magazine @@ -748,6 +758,7 @@ Zásobník do pistole Caricatore Pistola Cargador de pistola + Chargeur d'arme secondaire %1 passed you a %2 magazine. @@ -755,9 +766,10 @@ %1 podał Ci magazynek %2. %1 передал вам магазин %2. %1 passou a você um carregador %2. - %1 ti podal %2 zásobník. + %1 ti podal zásobník %2. %1 ti ha passato un caricatore %2 . %1 te pasó un cargador %2. + %1 vous a passé un chargeur %2. Show "pass magazine" interaction @@ -768,6 +780,7 @@ Zobrazit "interakci "podat zásobník" Mostra interazione "passa caricatore" Mostrar "Pasar cargador" en el menú de interacción + Montrer l'interaction "donner un chargeur". \ No newline at end of file diff --git a/addons/inventory/XEH_postInit.sqf b/addons/inventory/XEH_postInit.sqf index bf7adec77a..7135383734 100644 --- a/addons/inventory/XEH_postInit.sqf +++ b/addons/inventory/XEH_postInit.sqf @@ -2,6 +2,35 @@ if (!hasInterface) exitWith {}; +// cache config +// items in the inventory display can only be distinguished by their lb names and pictures +// this can cause collisions (mainly weapons with attachments), +// but if the item has the same name and picture it at least shouldn't change the filter anyway +// luckily we don't need private items, so dummy and parent classes are out of the picture + +GVAR(ItemKeyNamespace) = [] call CBA_fnc_createNamespace; + +private _fnc_addToCache = { + private _displayName = getText (_this >> "displayName"); + private _picture = getText (_this >> "picture"); + + // list box seems to delete the leading backslash + if (_picture select [0,1] == "\") then { + _picture = _picture select [1]; + }; + + GVAR(ItemKeyNamespace) setVariable [format ["%1:%2", _displayName, _picture], _this]; +}; + +private _allItems = []; + +_allItems append ("getNumber (_x >> 'scope') > 0" configClasses (configFile >> "CfgWeapons")); +_allItems append ("getNumber (_x >> 'scope') > 0" configClasses (configFile >> "CfgGlasses")); +_allItems append ("getNumber (_x >> 'scope') == 2" configClasses (configFile >> "CfgMagazines")); +_allItems append ("getNumber (_x >> 'scope') > 0 && {getNumber (_x >> 'isBackpack') == 1}" configClasses (configFile >> "CfgVehicles")); + +{_x call _fnc_addToCache; false} count _allItems; + GVAR(customFilters) = []; GVAR(selectedFilterIndex) = -1; diff --git a/addons/inventory/XEH_preInit.sqf b/addons/inventory/XEH_preInit.sqf index 535b9be656..a7feade1c3 100644 --- a/addons/inventory/XEH_preInit.sqf +++ b/addons/inventory/XEH_preInit.sqf @@ -4,47 +4,4 @@ ADDON = false; #include "XEH_PREP.hpp" -// cache config -// items in the inventory display can only be distinguished by their lb names and pictures -// this can cause collisions (mainly weapons with attachments), -// but if the item has the same name and picture it at least shouldn't change the filter anyway -// luckily we don't need private items, so dummy and parent classes are out of the picture - -if !(uiNamespace getVariable [QGVAR(configCached), false]) then { - private _fnc_addToCache = { - private _displayName = getText (_this >> "displayName"); - private _picture = getText (_this >> "picture"); - - // list box seems to delete the leading backslash - if (_picture select [0,1] == "\") then { - _picture = _picture select [1]; - }; - - uiNamespace setVariable [format [QGVAR(ItemKey:%1:%2), _displayName, _picture], _this]; - }; - - // weapons and items - { - if (getNumber (_x >> "scope") > 0) then {_x call _fnc_addToCache}; - false - } count ( - ("true" configClasses (configFile >> "CfgWeapons")) + - ("true" configClasses (configFile >> "CfgGlasses")) - ); - - // magazines - { - if (getNumber (_x >> "scope") == 2) then {_x call _fnc_addToCache}; - false - } count ("true" configClasses (configFile >> "CfgMagazines")); - - // backpacks - { - if (getNumber (_x >> "scope") > 0 && {getNumber (_x >> "isBackpack") == 1}) then {_x call _fnc_addToCache}; - false - } count ("true" configClasses (configFile >> "CfgVehicles")); - - uiNamespace setVariable [QGVAR(configCached), true]; -}; - ADDON = true; diff --git a/addons/inventory/config.cpp b/addons/inventory/config.cpp index f0982a46b4..adef451644 100644 --- a/addons/inventory/config.cpp +++ b/addons/inventory/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Pabst Mirror, commy2"}; - authorUrl = "https://github.com/PabstMirror/"; + author = ECSTRING(common,ACETeam); + authors[] = {"Pabst Mirror, commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/inventory/functions/fnc_forceItemListUpdate.sqf b/addons/inventory/functions/fnc_forceItemListUpdate.sqf index 89142b99ff..e5358212bb 100644 --- a/addons/inventory/functions/fnc_forceItemListUpdate.sqf +++ b/addons/inventory/functions/fnc_forceItemListUpdate.sqf @@ -23,12 +23,9 @@ if (_filterFunction isEqualType {}) then { private _i = 0; while {_i < lbSize _itemList} do { - private _config = uiNamespace getVariable [ - format [QGVAR(ItemKey:%1:%2), _itemList lbText _i, _itemList lbPicture _i], - configNull - ]; + private _config = GVAR(ItemKeyNamespace) getVariable format ["%1:%2", _itemList lbText _i, _itemList lbPicture _i]; - if (!isNull _config && {!(_config call _filterFunction)}) then { + if (!isNil "_config" && {!(_config call _filterFunction)}) then { _itemList lbDelete _i; // in case the filter function returns nil. Otherwise could lock up the game. diff --git a/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf b/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf index 6e48c1ec2a..0e1daa4a52 100644 --- a/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf +++ b/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf @@ -28,7 +28,7 @@ _filter ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChanged)}]; [{ disableSerialization; params ["_filter"]; - + // remove "All", so we can push it to the back later. // to keep localization we can keep the lbText (displayed name). private _index = lbSize _filter - 1; @@ -53,7 +53,7 @@ _filter ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChanged)}]; // readd "All" filter to last position and select it _index = _filter lbAdd _nameAll; _filter lbSetCurSel _index; -}, [_filter]] call EFUNC(common,execNextFrame); +}, [_filter]] call CBA_fnc_execNextFrame; // monitor changes that can happen and force our update private _dummyControl = _display ctrlCreate ["RscMapControl", -1]; diff --git a/addons/inventory/functions/fnc_onLBSelChanged.sqf b/addons/inventory/functions/fnc_onLBSelChanged.sqf index 61e4b12b10..5ae49049fe 100644 --- a/addons/inventory/functions/fnc_onLBSelChanged.sqf +++ b/addons/inventory/functions/fnc_onLBSelChanged.sqf @@ -24,4 +24,4 @@ GVAR(selectedFilterIndex) = _index; params ["_display"]; [_display] call FUNC(forceItemListUpdate); -}, [ctrlParent _filter]] call EFUNC(common,execNextFrame); +}, [ctrlParent _filter]] call CBA_fnc_execNextFrame; diff --git a/addons/inventory/stringtable.xml b/addons/inventory/stringtable.xml index 60bb41681d..56412a00b3 100644 --- a/addons/inventory/stringtable.xml +++ b/addons/inventory/stringtable.xml @@ -32,6 +32,7 @@ Plecaki Zaini Mochilas + Sacs à dos Mochilas @@ -41,6 +42,7 @@ Hełmy Copricapi Cascos + Equipement de tête Capacetes @@ -50,6 +52,7 @@ Gogle Occhiali Gafas + Lunettes Óculos @@ -59,6 +62,7 @@ Uniformy Uniformi Uniformes + Uniformes Uniformes @@ -68,6 +72,7 @@ Kamizelki Vests Chalecos + Gilets Coletes @@ -77,6 +82,7 @@ Granaty Granate Granadas + Grenades Granadas @@ -86,6 +92,7 @@ Medyczne Medico Médico + Médical Médico diff --git a/addons/javelin/CfgMagazines.hpp b/addons/javelin/CfgMagazines.hpp index 3053cf1fa1..80111d9484 100644 --- a/addons/javelin/CfgMagazines.hpp +++ b/addons/javelin/CfgMagazines.hpp @@ -10,7 +10,7 @@ class CfgMagazines { class Titan_AT: Titan_AA { ammo = "ACE_Javelin_FGM148"; //from misssileGuidance, was "M_Titan_AT" }; - + //Handheld Titan "AP" Magazine (SACLOS? "Anti-personal") // class Titan_AP: Titan_AA { //??? diff --git a/addons/javelin/CfgVehicles.hpp b/addons/javelin/CfgVehicles.hpp index 1cd527089d..37023a8bd6 100644 --- a/addons/javelin/CfgVehicles.hpp +++ b/addons/javelin/CfgVehicles.hpp @@ -3,22 +3,22 @@ class CfgVehicles { class StaticWeapon : LandVehicle { class Turrets; }; - + class StaticMGWeapon : StaticWeapon { class Turrets : Turrets { class MainTurret; }; }; class AT_01_base_F: StaticMGWeapon {}; - + class B_static_AT_F: AT_01_base_F { class Turrets : Turrets { class MainTurret : MainTurret { weapons[] = { QGVAR(Titan_Static) }; magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"}; - + turretInfoType = "ACE_RscOptics_javelin"; - gunnerOpticsModel = PATHTOF(data\reticle_titan.p3d); + gunnerOpticsModel = QPATHTOF(data\reticle_titan.p3d); opticsZoomMin = 0.08333; opticsZoomMax = 0.04167; opticsZoomInit = 0.08333; @@ -34,9 +34,9 @@ class CfgVehicles { class MainTurret : MainTurret { weapons[] = { QGVAR(Titan_Static) }; magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"}; - + turretInfoType = "ACE_RscOptics_javelin"; - gunnerOpticsModel = PATHTOF(data\reticle_titan.p3d); + gunnerOpticsModel = QPATHTOF(data\reticle_titan.p3d); opticsZoomMin = 0.08333; opticsZoomMax = 0.04167; opticsZoomInit = 0.08333; @@ -52,9 +52,9 @@ class CfgVehicles { class MainTurret : MainTurret { weapons[] = { QGVAR(Titan_Static) }; magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"}; - + turretInfoType = "ACE_RscOptics_javelin"; - gunnerOpticsModel = PATHTOF(data\reticle_titan.p3d); + gunnerOpticsModel = QPATHTOF(data\reticle_titan.p3d); opticsZoomMin = 0.08333; opticsZoomMax = 0.04167; opticsZoomInit = 0.08333; @@ -65,4 +65,4 @@ class CfgVehicles { }; }; }; -}; \ No newline at end of file +}; diff --git a/addons/javelin/CfgWeapons.hpp b/addons/javelin/CfgWeapons.hpp index 75aaf7c332..b60f887396 100644 --- a/addons/javelin/CfgWeapons.hpp +++ b/addons/javelin/CfgWeapons.hpp @@ -1,38 +1,38 @@ class CfgWeapons { class Launcher; class MissileLauncher; - + class Launcher_Base_F : Launcher { - class WeaponSlotsInfo; + class WeaponSlotsInfo; }; // @TODO: AA by default, motherfuckers class missiles_titan : MissileLauncher { - + }; - + class missiles_titan_at : missiles_titan { }; - class GVAR(Titan_Static) : missiles_titan_at { + class GVAR(Titan_Static) : missiles_titan_at { GVAR(enabled) = 1; weaponInfoType = "ACE_RscOptics_javelin"; - modelOptics = PATHTOF(data\reticle_titan.p3d); - + modelOptics = QPATHTOF(data\reticle_titan.p3d); + canLock = 0; magazines[] = {"1Rnd_GAT_missiles"}; lockingTargetSound[] = {"",0,1}; lockedTargetSound[] = {"",0,1}; }; - + // @TODO: AA by default, motherfuckers class launch_Titan_base : Launcher_Base_F {}; - + class launch_Titan_short_base : launch_Titan_base { }; - + class launch_B_Titan_short_F: launch_Titan_short_base { GVAR(enabled) = 1; weaponInfoType = "ACE_RscOptics_javelin"; - modelOptics = PATHTOF(data\reticle_titan.p3d); - + modelOptics = QPATHTOF(data\reticle_titan.p3d); + canLock = 0; lockingTargetSound[] = {"",0,1}; @@ -41,8 +41,8 @@ class CfgWeapons { class launch_I_Titan_short_F: launch_Titan_short_base { GVAR(enabled) = 1; weaponInfoType = "ACE_RscOptics_javelin"; - modelOptics = PATHTOF(data\reticle_titan.p3d); - + modelOptics = QPATHTOF(data\reticle_titan.p3d); + canLock = 0; lockingTargetSound[] = {"",0,1}; @@ -51,22 +51,22 @@ class CfgWeapons { class launch_O_Titan_short_F: launch_Titan_short_base { GVAR(enabled) = 1; weaponInfoType = "ACE_RscOptics_javelin"; - modelOptics = PATHTOF(data\reticle_titan.p3d); - + modelOptics = QPATHTOF(data\reticle_titan.p3d); + canLock = 0; - - + + lockingTargetSound[] = {"",0,1}; lockedTargetSound[] = {"",0,1}; }; class launch_Titan_short_F: launch_Titan_short_base { GVAR(enabled) = 1; weaponInfoType = "ACE_RscOptics_javelin"; - modelOptics = PATHTOF(data\reticle_titan.p3d); - + modelOptics = QPATHTOF(data\reticle_titan.p3d); + canLock = 0; lockingTargetSound[] = {"",0,1}; lockedTargetSound[] = {"",0,1}; }; -}; \ No newline at end of file +}; diff --git a/addons/javelin/RscInGameUI.hpp b/addons/javelin/RscInGameUI.hpp index ea1e12626c..f60533de45 100644 --- a/addons/javelin/RscInGameUI.hpp +++ b/addons/javelin/RscInGameUI.hpp @@ -15,7 +15,7 @@ class RscInGameUI { controls[] = { "ACE_javelin_elements_group", "ACE_Targeting" }; //, "ACE_TargetingConstrains", "ACE_TargetingGate", "ACE_TargetingLines"}; onLoad = QUOTE(_this call FUNC(onOpticLoad)); onUnload = QUOTE(_this call FUNC(onOpticUnload)); - + class ACE_javelin_elements_group: RscControlsGroup { x = "SafezoneX"; @@ -44,7 +44,7 @@ class RscInGameUI { w = 0; h = 0; }; - + class ACE_javelin_Day_mode_off: RscPicture { idc = 1001; x = "(SafezoneX+(SafezoneW -SafezoneH*3/4)/2)+ (0.03/4)*3*SafezoneH - SafezoneX"; @@ -123,7 +123,7 @@ class RscInGameUI { h = 0; colorText[] = {0.2941,0.8745,0.2157,1}; }; - + }; }; class CA_Javelin_NFOV_mode_off: ACE_javelin_Day_mode_off { @@ -191,7 +191,7 @@ class RscInGameUI { h = "0.1895*SafezoneH"; colorText[] = {0.2941,0.8745,0.2157,1}; }; - + }; }; @@ -253,12 +253,12 @@ class RscInGameUI { }; class ACE_Targeting : RscControlsGroup { idc = 6999; - + x = "SafezoneX"; y = "SafezoneY"; w = "SafezoneW"; h = "SafezoneH"; - + enabled = 0; class Controls { class ACE_TargetingConstrains: RscControlsGroup { @@ -266,7 +266,7 @@ class RscInGameUI { y = "SafezoneY"; w = "SafezoneW-SafezoneX"; h = "SafezoneH-SafezoneY"; - + enabled = 0; class VScrollbar { autoScrollSpeed = -1; @@ -306,7 +306,7 @@ class RscInGameUI { }; class OpticsBorders: RscPicture { idc = 699105; - text = PATHTOF(data\javelin_ui_border_ca.paa); + text = QPATHTOF(data\javelin_ui_border_ca.paa); colorText[] = {0,0,0,1}; x = "((SafezoneW -(3.1/4)*SafezoneH)/2) - SafezoneX"; y = "0.15*SafezoneH-SafezoneY"; @@ -315,7 +315,7 @@ class RscInGameUI { }; }; }; - + class ACE_TargetingGate : ACE_TargetingConstrains { idc = 699200; class Controls { @@ -401,8 +401,8 @@ class RscInGameUI { }; }; }; - - + + class ACE_TargetingLines: ACE_TargetingConstrains { idc = 699300; class Controls { @@ -451,4 +451,4 @@ ACE_Titan_TOP_off: 1006 ACE_Titan_DIR: 1007 ACE_Titan_FLTR_mode_off: 1002 ACE_Titan_FLTR_mode: 161 -*/ \ No newline at end of file +*/ diff --git a/addons/javelin/config.cpp b/addons/javelin/config.cpp index 8dfc970902..b789bfea01 100644 --- a/addons/javelin/config.cpp +++ b/addons/javelin/config.cpp @@ -5,7 +5,9 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { "ace_main", "ace_common", "ace_missileguidance" }; + requiredAddons[] = {"ace_main", "ace_common", "ace_missileguidance"}; + author = ECSTRING(common,ACETeam); + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index f561806eaa..6608b13ecc 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -20,7 +20,7 @@ _currentShooter = (vehicle ACE_player); _args = uiNamespace getVariable[QGVAR(arguments), [] ]; if( (count _args) > 0) then { _lastTick = _args select 0; - if(ACE_diagTime - _lastTick > 1) then { + if(diag_tickTime - _lastTick > 1) then { [] call FUNC(onOpticLoad); }; }; @@ -98,8 +98,17 @@ if (_range > 50 && {_range < 2500}) then { }; }; -if (isNull _newTarget) then { - _newTarget = cursorTarget; +if ((isNull _newTarget) && {cursorObject isKindOf "AllVehicles"}) then { + private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorObject, ace_player, cursorObject, true, 1]; + if (_intersectionsToCursorTarget isEqualTo []) then { + _newTarget = cursorObject; + }; +}; +if ((isNull _newTarget) && {cursorTarget isKindOf "AllVehicles"}) then { + private _intersectionsToCursorTarget = lineIntersectsSurfaces [(AGLtoASL positionCameraToWorld [0,0,0]), aimPos cursorTarget, ace_player, cursorTarget, true, 1]; + if (_intersectionsToCursorTarget isEqualTo []) then { + _newTarget = cursorTarget; + }; }; // Create constants @@ -184,12 +193,12 @@ if (isNull _newTarget) then { // Lock on after 3 seconds if(_currentTarget != _newTarget) then { TRACE_1("New Target, reseting locking", _newTarget); - _lockTime = ACE_diagTime; + _lockTime = diag_tickTime; _currentTarget = _newTarget; playSound "ACE_Javelin_Locking"; } else { - if(ACE_diagTime - _lockTime > __LOCKONTIME + _randomLockInterval) then { + if(diag_tickTime - _lockTime > __LOCKONTIME + _randomLockInterval) then { TRACE_2("LOCKED!", _currentTarget, _lockTime); __JavelinIGUISeek ctrlSetTextColor __ColorGreen; @@ -231,9 +240,9 @@ if (isNull _newTarget) then { // Allow fire _fireDisabledEH = [_fireDisabledEH] call FUNC(enableFire); - if(ACE_diagTime > _soundTime) then { + if(diag_tickTime > _soundTime) then { playSound "ACE_Javelin_Locked"; - _soundTime = ACE_diagTime + 0.25; + _soundTime = diag_tickTime + 0.25; }; } else { __JavelinIGUITargeting ctrlShow true; @@ -265,9 +274,9 @@ if (isNull _newTarget) then { {_x ctrlCommit __TRACKINTERVAL} forEach [__JavelinIGUITargetingGateTL,__JavelinIGUITargetingGateTR,__JavelinIGUITargetingGateBL,__JavelinIGUITargetingGateBR]; - if(ACE_diagTime > _soundTime) then { + if(diag_tickTime > _soundTime) then { playSound "ACE_Javelin_Locking"; - _soundTime = ACE_diagTime + 0.25; + _soundTime = diag_tickTime + 0.25; }; // Disallow fire _fireDisabledEH = [_fireDisabledEH] call FUNC(disableFire); @@ -294,7 +303,7 @@ if (isNull _newTarget) then { //TRACE_2("", _newTarget, _currentTarget); // Save arguments for next run -_args set[0, ACE_diagTime]; +_args set[0, diag_tickTime]; _args set[1, _currentTarget]; _args set[2, _runTime]; _args set[3, _lockTime]; diff --git a/addons/javelin/functions/fnc_onOpticLoad.sqf b/addons/javelin/functions/fnc_onOpticLoad.sqf index cb4eac74f9..85624712e3 100644 --- a/addons/javelin/functions/fnc_onOpticLoad.sqf +++ b/addons/javelin/functions/fnc_onOpticLoad.sqf @@ -24,7 +24,7 @@ if(GVAR(pfehID) != -1) then { uiNameSpace setVariable [QGVAR(arguments), [ - ACE_diagTime, // Last runtime + diag_tickTime, // Last runtime objNull, // currentTargetObject 0, // Run Time 0, // Lock Time diff --git a/addons/javelin/stringtable.xml b/addons/javelin/stringtable.xml index 385abf586e..dcc03dca91 100644 --- a/addons/javelin/stringtable.xml +++ b/addons/javelin/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/kestrel4500/CfgVehicles.hpp b/addons/kestrel4500/CfgVehicles.hpp index 9ca6510928..ccc4fa3bd2 100644 --- a/addons/kestrel4500/CfgVehicles.hpp +++ b/addons/kestrel4500/CfgVehicles.hpp @@ -9,7 +9,7 @@ class CfgVehicles { statement = QUOTE(call FUNC(createKestrelDialog)); showDisabled = 0; priority = 0.1; - icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); + icon = QPATHTOF(UI\Kestrel4500_Icon.paa); exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; class GVAR(show) { displayName = CSTRING(ShowKestrel); @@ -17,7 +17,7 @@ class CfgVehicles { statement = QUOTE(call FUNC(displayKestrel)); showDisabled = 0; priority = 0.2; - icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); + icon = QPATHTOF(UI\Kestrel4500_Icon.paa); exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; class GVAR(hide) { @@ -26,7 +26,7 @@ class CfgVehicles { statement = QUOTE(call FUNC(displayKestrel)); showDisabled = 0; priority = 0.3; - icon = QUOTE(PATHTOF(UI\Kestrel4500_Icon.paa)); + icon = QPATHTOF(UI\Kestrel4500_Icon.paa); exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; }; diff --git a/addons/kestrel4500/CfgWeapons.hpp b/addons/kestrel4500/CfgWeapons.hpp index c31b736ac6..8b318994a2 100644 --- a/addons/kestrel4500/CfgWeapons.hpp +++ b/addons/kestrel4500/CfgWeapons.hpp @@ -8,8 +8,8 @@ class CfgWeapons { scope = 2; displayName = CSTRING(Name); descriptionShort = CSTRING(Description); - model = PATHTOF(data\kestrel4500.p3d); - picture = PATHTOF(UI\Kestrel4500.paa); + model = QPATHTOF(data\kestrel4500.p3d); + picture = QPATHTOF(UI\Kestrel4500.paa); icon = "iconObject_circle"; mapSize = 0.034; diff --git a/addons/kestrel4500/RscTitles.hpp b/addons/kestrel4500/RscTitles.hpp index 7046918935..276e8c4392 100644 --- a/addons/kestrel4500/RscTitles.hpp +++ b/addons/kestrel4500/RscTitles.hpp @@ -348,25 +348,25 @@ class RscTitles { fadeout = 0; class controls { class Preload_0 { - text = PATHTOF(UI\Kestrel4500_0.paa); + text = QPATHTOF(UI\Kestrel4500_0.paa); }; class Preload_1 { - text = PATHTOF(UI\Kestrel4500_1.paa); + text = QPATHTOF(UI\Kestrel4500_1.paa); }; class Preload_2 { - text = PATHTOF(UI\Kestrel4500_2.paa); + text = QPATHTOF(UI\Kestrel4500_2.paa); }; class Preload_3 { - text = PATHTOF(UI\Kestrel4500_3.paa); + text = QPATHTOF(UI\Kestrel4500_3.paa); }; class Preload_4 { - text = PATHTOF(UI\Kestrel4500_4.paa); + text = QPATHTOF(UI\Kestrel4500_4.paa); }; class Preload_5 { - text = PATHTOF(UI\Kestrel4500_5.paa); + text = QPATHTOF(UI\Kestrel4500_5.paa); }; class Preload_6 { - text = PATHTOF(UI\Kestrel4500_6.paa); + text = QPATHTOF(UI\Kestrel4500_6.paa); }; }; }; diff --git a/addons/kestrel4500/XEH_postInit.sqf b/addons/kestrel4500/XEH_postInit.sqf index f22fc2228f..9511041bd2 100644 --- a/addons/kestrel4500/XEH_postInit.sqf +++ b/addons/kestrel4500/XEH_postInit.sqf @@ -11,7 +11,7 @@ GVAR(MinAvgMax) = false; GVAR(MinAvgMaxMode) = 0; GVAR(referenceHeadingMenu) = 0; GVAR(referenceHeadingAutoSet) = true; -GVAR(manualSetCooldown) = ACE_diagTime; +GVAR(manualSetCooldown) = diag_tickTime; GVAR(headingSetDisplayTimer) = 0; GVAR(Menu) = 1; diff --git a/addons/kestrel4500/config.cpp b/addons/kestrel4500/config.cpp index 95a533fd9f..74e2f18f19 100644 --- a/addons/kestrel4500/config.cpp +++ b/addons/kestrel4500/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_Kestrel4500"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ACE_common", "ACE_weather"}; - author[] = {ECSTRING(common,ACETeam), "Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {ECSTRING(common,ACETeam), "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/kestrel4500/functions/fnc_buttonPressed.sqf b/addons/kestrel4500/functions/fnc_buttonPressed.sqf index 83c471092a..a051f6b1b6 100644 --- a/addons/kestrel4500/functions/fnc_buttonPressed.sqf +++ b/addons/kestrel4500/functions/fnc_buttonPressed.sqf @@ -33,12 +33,12 @@ switch (_this) do { case 2: { // Auto set GVAR(RefHeading) = (getDir ACE_player) % 360; GVAR(referenceHeadingMenu) = 0; - GVAR(headingSetDisplayTimer) = ACE_diagTime; + GVAR(headingSetDisplayTimer) = diag_tickTime; }; case 3: { // Manual set GVAR(RefHeading) = GVAR(TmpHeading); GVAR(referenceHeadingMenu) = 0; - GVAR(headingSetDisplayTimer) = ACE_diagTime; + GVAR(headingSetDisplayTimer) = diag_tickTime; }; }; }; @@ -73,13 +73,13 @@ switch (_this) do { GVAR(MinAvgMax) = !GVAR(MinAvgMax); } else { if (GVAR(referenceHeadingMenu) == 3) then { - if (ACE_diagTime - GVAR(manualSetCooldown) < 0.2) then { + if (diag_tickTime - GVAR(manualSetCooldown) < 0.2) then { GVAR(TmpHeading) = GVAR(TmpHeading) - 10; } else { GVAR(TmpHeading) = GVAR(TmpHeading) - 1; }; GVAR(TmpHeading) = (GVAR(TmpHeading) + 360) % 360; - GVAR(manualSetCooldown) = ACE_diagTime; + GVAR(manualSetCooldown) = diag_tickTime; }; }; }; @@ -88,13 +88,13 @@ switch (_this) do { GVAR(MinAvgMax) = !GVAR(MinAvgMax); } else { if (GVAR(referenceHeadingMenu) == 3) then { - if (ACE_diagTime - GVAR(manualSetCooldown) < 0.2) then { + if (diag_tickTime - GVAR(manualSetCooldown) < 0.2) then { GVAR(TmpHeading) = GVAR(TmpHeading) + 10; } else { GVAR(TmpHeading) = GVAR(TmpHeading) + 1; }; GVAR(TmpHeading) = (GVAR(TmpHeading) + 360) % 360; - GVAR(manualSetCooldown) = ACE_diagTime; + GVAR(manualSetCooldown) = diag_tickTime; }; }; }; diff --git a/addons/kestrel4500/functions/fnc_displayKestrel.sqf b/addons/kestrel4500/functions/fnc_displayKestrel.sqf index 64d06fea1c..28de70a13d 100644 --- a/addons/kestrel4500/functions/fnc_displayKestrel.sqf +++ b/addons/kestrel4500/functions/fnc_displayKestrel.sqf @@ -59,8 +59,8 @@ GVAR(Overlay) = true; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - if (ACE_diagTime > GVAR(updateTimer)) then { - GVAR(updateTimer) = ACE_diagTime + 1; + if (diag_tickTime > GVAR(updateTimer)) then { + GVAR(updateTimer) = diag_tickTime + 1; private ["_outputData"]; _outputData = [] call FUNC(generateOutputData); @@ -126,7 +126,7 @@ GVAR(Overlay) = true; }; call FUNC(updateImpellerState); - __ctrlKestrel4500 ctrlSetText format [QUOTE(PATHTOF(UI\Kestrel4500_%1.paa)), floor(GVAR(ImpellerState) % 7)]; + __ctrlKestrel4500 ctrlSetText format [QPATHTOF(UI\Kestrel4500_%1.paa), floor(GVAR(ImpellerState) % 7)]; }, 0.01, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index 016baebef7..c3bce5efa2 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -31,7 +31,7 @@ */ #include "script_component.hpp" -if (ACE_diagTime - GVAR(headingSetDisplayTimer) < 0.8) exitWith {["", "", " Heading Set", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]}; +if (diag_tickTime - GVAR(headingSetDisplayTimer) < 0.8) exitWith {["", "", " Heading Set", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]}; private ["_playerDir", "_playerAltitude", "_temperature", "_humidity", "_barometricPressure", "_airDensity", "_densityAltitude", "_chill", "_heatIndex", "_dewPoint", "_wetBulb", "_dayString", "_monthString", "_windSpeed", "_windDir", "_textTop", "_textCenterBig", "_textCenter", "_textCenterLine1Left", "_textCenterLine2Left", "_textCenterLine3Left", "_textCenterLine1Right", "_textCenterLine2Right", "_textCenterLine3Right", "_textInfoLine1", "_textInfoLine2", "_textBottomBig", "_textCenterLine1", "_textCenterLine2", "_textCenterLine3", "_textCenterLine4", "_textCenterLine5", "_textCenterLine6"]; diff --git a/addons/kestrel4500/initKeybinds.sqf b/addons/kestrel4500/initKeybinds.sqf index 5793d36976..8c99271970 100644 --- a/addons/kestrel4500/initKeybinds.sqf +++ b/addons/kestrel4500/initKeybinds.sqf @@ -5,7 +5,7 @@ if (GVAR(Kestrel4500)) exitWith { closeDialog 0; false - }; + }; // Statement [] call FUNC(createKestrelDialog); false @@ -17,7 +17,7 @@ { // Conditions: canInteract if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {false}; - + // Statement [] call FUNC(displayKestrel); false @@ -34,7 +34,7 @@ _conditonCode = { _toggleCode = { // Conditions: canInteract if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {}; - + // Statement if (!GVAR(Overlay)) then { //If no overlay, show it: @@ -56,4 +56,4 @@ _closeCode = { closeDialog 0; }; }; -[(localize LSTRING(Name)), QUOTE(PATHTOF(UI\Kestrel4500.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); +[(localize LSTRING(Name)), QPATHTOF(UI\Kestrel4500.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); diff --git a/addons/kestrel4500/stringtable.xml b/addons/kestrel4500/stringtable.xml index defb44c2dc..3ad9e8824f 100644 --- a/addons/kestrel4500/stringtable.xml +++ b/addons/kestrel4500/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/laser/CfgVehicles.hpp b/addons/laser/CfgVehicles.hpp index d8976ac204..780107fdf7 100644 --- a/addons/laser/CfgVehicles.hpp +++ b/addons/laser/CfgVehicles.hpp @@ -6,20 +6,20 @@ class CfgVehicles { model = "\A3\Weapons_F\empty.p3d"; destrType = "DestructNo"; simulation = "LaserTarget"; - + class EventHandlers { init = QUOTE(_this call FUNC(laser_init)); }; }; - + // Visual laserTarget override class ACE_LaserTarget_Visual : LaserTarget { simulation = "LaserTarget"; model = "\A3\Weapons_f\laserTgt.p3d"; }; - + // Vehicle lockable configurations - + class AllVehicles; class Air: AllVehicles { class Turrets; @@ -42,4 +42,4 @@ class CfgVehicles { }; }; }; -}; \ No newline at end of file +}; diff --git a/addons/laser/CfgWeapons.hpp b/addons/laser/CfgWeapons.hpp index 70a25e6f85..6dff36a4e8 100644 --- a/addons/laser/CfgWeapons.hpp +++ b/addons/laser/CfgWeapons.hpp @@ -1,7 +1,6 @@ class CfgWeapons { class Binocular; - class Laserdesignator : Binocular { visionMode[] = {"Normal","NVG"}; }; diff --git a/addons/laser/RscInGameUI.hpp b/addons/laser/RscInGameUI.hpp index d87136c960..08f0a794be 100644 --- a/addons/laser/RscInGameUI.hpp +++ b/addons/laser/RscInGameUI.hpp @@ -8,11 +8,10 @@ class RscInGameUI { class RscOptics_LaserDesignator { idd = 300; controls[] = {"CA_IGUI_elements_group"}; - + onLoad = "uiNameSpace setVariable ['ACE_RscOptics_LaserDesignator',(_this select 0)];"; onUnload = "uiNameSpace setVariable ['ACE_RscOptics_LaserDesignator',nil];"; - - + class CA_IGUI_elements_group: RscControlsGroup { idc = 170; @@ -118,7 +117,7 @@ class RscInGameUI { w = "3.5 * (0.01875 * SafezoneH)"; h = "1.6 * (0.025 * SafezoneH)"; }; - + class ACE_LaserCode_Helper : RscMapControl { idc = -1; onDraw = QUOTE(_this call FUNC(onLaserDesignatorDraw)); @@ -141,4 +140,4 @@ class RscInGameUI { }; }; }; -}; \ No newline at end of file +}; diff --git a/addons/laser/config.cpp b/addons/laser/config.cpp index ad368cdc2d..3ba439f047 100644 --- a/addons/laser/config.cpp +++ b/addons/laser/config.cpp @@ -5,7 +5,9 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { "ace_common" }; + requiredAddons[] = {"ace_common"}; + author = ECSTRING(common,ACETeam); + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; @@ -13,4 +15,4 @@ class CfgPatches { #include "CfgEventhandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" -#include "RscInGameUI.hpp" \ No newline at end of file +#include "RscInGameUI.hpp" diff --git a/addons/laser/functions/fnc_laserOff.sqf b/addons/laser/functions/fnc_laserOff.sqf index 84613cd988..7899ec1253 100644 --- a/addons/laser/functions/fnc_laserOff.sqf +++ b/addons/laser/functions/fnc_laserOff.sqf @@ -8,7 +8,7 @@ * Return value: * None */ - + #include "script_component.hpp" private ["_uuid"]; diff --git a/addons/laser/functions/fnc_laserOn.sqf b/addons/laser/functions/fnc_laserOn.sqf index 901fa04b9a..12873b5ed0 100644 --- a/addons/laser/functions/fnc_laserOn.sqf +++ b/addons/laser/functions/fnc_laserOn.sqf @@ -17,7 +17,7 @@ #include "script_component.hpp" private ["_uuid", "_args"]; -_uuid = format["%1%2%3", floor ACE_diagTime, floor random 1000, floor random 10000]; -_args = [_uuid, _this]; -["laser_laserOn", _args] call EFUNC(common,globalEvent); -_uuid; +_uuid = format["%1%2%3", floor diag_tickTime, floor random 1000, floor random 10000]; +_args = [_uuid, _this]; +["laser_laserOn", _args] call EFUNC(common,globalEvent); +_uuid; diff --git a/addons/laser/functions/fnc_laserTargetPFH.sqf b/addons/laser/functions/fnc_laserTargetPFH.sqf index 6d993b07de..8726ce4201 100644 --- a/addons/laser/functions/fnc_laserTargetPFH.sqf +++ b/addons/laser/functions/fnc_laserTargetPFH.sqf @@ -12,7 +12,7 @@ _uuid = _args select 2; if(isNull _laserTarget || !alive _shooter) exitWith { [(_this select 1)] call CBA_fnc_removePerFrameHandler; REM(GVAR(VanillaLasers), _laserTarget); - + // Remove laseron [_uuid] call FUNC(laserOff); }; @@ -28,4 +28,3 @@ drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa", [1,0,0,1], (A } forEach DRAW_LINES; DRAW_LINES = []; #endif - diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index 22287f1342..45b60a69c1 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -62,7 +62,7 @@ _finalOwner = nil; }; }; }; - + //Handle Weird Data Return if (_laser params [["_laserPos", [], [[]], 3], ["_laserDir", [], [[]], 3]]) then { _res = [_laserPos, _laserDir, _divergence] call FUNC(shootCone); diff --git a/addons/laser/stringtable.xml b/addons/laser/stringtable.xml index f51b9cd127..4a478096d0 100644 --- a/addons/laser/stringtable.xml +++ b/addons/laser/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/laser_selfdesignate/config.cpp b/addons/laser_selfdesignate/config.cpp index 597500caf6..60595e2d0d 100644 --- a/addons/laser_selfdesignate/config.cpp +++ b/addons/laser_selfdesignate/config.cpp @@ -5,7 +5,9 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_laser"}; + requiredAddons[] = {"ace_laser"}; + author = ECSTRING(common,ACETeam); + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf index e585a409ff..24f19506fe 100644 --- a/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf +++ b/addons/laser_selfdesignate/functions/fnc_laserHudDesignateOn.sqf @@ -32,7 +32,7 @@ FUNC(laserHudDesignatePFH) = { }; if( (count _args) < 4) then { - _args set[3, ACE_diagTime + FCS_UPDATE_DELAY]; + _args set[3, diag_tickTime + FCS_UPDATE_DELAY]; }; _forceUpdateTime = _args select 3; @@ -57,9 +57,9 @@ FUNC(laserHudDesignatePFH) = { }; */ - if(ACE_diagTime > _forceUpdateTime) then { + if(diag_tickTime > _forceUpdateTime) then { ["ace_fcs_forceUpdate", []] call ace_common_fnc_localEvent; - _args set[3, ACE_diagTime + FCS_UPDATE_DELAY]; + _args set[3, diag_tickTime + FCS_UPDATE_DELAY]; }; _this set[0, _args]; diff --git a/addons/laser_selfdesignate/stringtable.xml b/addons/laser_selfdesignate/stringtable.xml index 17c562a2bb..cdd7439200 100644 --- a/addons/laser_selfdesignate/stringtable.xml +++ b/addons/laser_selfdesignate/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/laserpointer/config.cpp b/addons/laserpointer/config.cpp index cbb3105696..63ac154471 100644 --- a/addons/laserpointer/config.cpp +++ b/addons/laserpointer/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_acc_pointer_red","ACE_acc_pointer_green","ACE_acc_pointer_green_IR"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/laserpointer/stringtable.xml b/addons/laserpointer/stringtable.xml index afd11addb1..1e4b150c3d 100644 --- a/addons/laserpointer/stringtable.xml +++ b/addons/laserpointer/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/logistics_uavbattery/CfgSounds.hpp b/addons/logistics_uavbattery/CfgSounds.hpp index 530c5b86a9..3cf83715ba 100644 --- a/addons/logistics_uavbattery/CfgSounds.hpp +++ b/addons/logistics_uavbattery/CfgSounds.hpp @@ -1,7 +1,7 @@ class CfgSounds { class ACE_replaceUAVBattery { name = "ACE_replaceUAVBattery"; - sound[]={QUOTE(PATHTOF(sounds\exchange_battery.ogg)),1,1}; + sound[]={QPATHTOF(sounds\exchange_battery.ogg),1,1}; titles[]={}; }; }; diff --git a/addons/logistics_uavbattery/CfgVehicles.hpp b/addons/logistics_uavbattery/CfgVehicles.hpp index a6f2db786f..2daa8c8011 100644 --- a/addons/logistics_uavbattery/CfgVehicles.hpp +++ b/addons/logistics_uavbattery/CfgVehicles.hpp @@ -20,7 +20,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player, _target)] call FUNC(refuelUAV)); showDisabled = 0; priority = 1.245; - icon = QUOTE(PATHTOF(ui\UAV_battery_ca.paa)); + icon = QPATHTOF(ui\UAV_battery_ca.paa); }; }; }; diff --git a/addons/logistics_uavbattery/CfgWeapons.hpp b/addons/logistics_uavbattery/CfgWeapons.hpp index 46120f7c3d..8beedff39b 100644 --- a/addons/logistics_uavbattery/CfgWeapons.hpp +++ b/addons/logistics_uavbattery/CfgWeapons.hpp @@ -6,8 +6,8 @@ class CfgWeapons { scope = 2; displayName = CSTRING(Battery_Name); descriptionShort = CSTRING(Battery_Description); - model = QUOTE(PATHTOF(data\ace_battery.p3d)); - picture = QUOTE(PATHTOF(ui\UAV_battery_ca.paa)); + model = QPATHTOF(data\ace_battery.p3d); + picture = QPATHTOF(ui\UAV_battery_ca.paa); class ItemInfo: InventoryItem_Base_F { mass = 20; }; diff --git a/addons/logistics_uavbattery/config.cpp b/addons/logistics_uavbattery/config.cpp index c6123e590f..5197a899e3 100644 --- a/addons/logistics_uavbattery/config.cpp +++ b/addons/logistics_uavbattery/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_UAVBattery"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"marc_book"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"marc_book"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/logistics_uavbattery/stringtable.xml b/addons/logistics_uavbattery/stringtable.xml index c38c3daae3..6ff6e4b52d 100644 --- a/addons/logistics_uavbattery/stringtable.xml +++ b/addons/logistics_uavbattery/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/logistics_wirecutter/CfgSounds.hpp b/addons/logistics_wirecutter/CfgSounds.hpp index 9958190ec1..598e72255b 100644 --- a/addons/logistics_wirecutter/CfgSounds.hpp +++ b/addons/logistics_wirecutter/CfgSounds.hpp @@ -1,12 +1,12 @@ class CfgSounds { class ACE_Wirecutter_sound { name = "ACE_wirecutter_sound"; - sound[] = {QUOTE(PATHTOF(sound\wire_cut.ogg)), "db-0", 1}; + sound[] = {QPATHTOF(sound\wire_cut.ogg), "db-0", 1}; titles[] = {}; }; class ACE_Wirecutter_sound_long { name = "ACE_wirecutter_sound_long"; - sound[] = {QUOTE(PATHTOF(sound\wire_cut_long.ogg)), "db-0", 1}; + sound[] = {QPATHTOF(sound\wire_cut_long.ogg), "db-0", 1}; titles[] = {}; }; }; diff --git a/addons/logistics_wirecutter/CfgWeapons.hpp b/addons/logistics_wirecutter/CfgWeapons.hpp index 2b365cc8e6..0674c44f1a 100644 --- a/addons/logistics_wirecutter/CfgWeapons.hpp +++ b/addons/logistics_wirecutter/CfgWeapons.hpp @@ -6,8 +6,8 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); displayName = CSTRING(wirecutterName); descriptionShort = CSTRING(wirecutterDescription); - model = QUOTE(PATHTOF(data\ace_wirecutter.p3d)); - picture = QUOTE(PATHTOF(ui\item_wirecutter_ca.paa)); + model = QPATHTOF(data\ace_wirecutter.p3d); + picture = QPATHTOF(ui\item_wirecutter_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 65; diff --git a/addons/logistics_wirecutter/config.cpp b/addons/logistics_wirecutter/config.cpp index d83cff4035..910dcdc9bb 100644 --- a/addons/logistics_wirecutter/config.cpp +++ b/addons/logistics_wirecutter/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_wirecutter"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"gpgpgpgp", "PabstMirror"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"gpgpgpgp", "PabstMirror"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf index e28ff17db6..f926a53e01 100644 --- a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf +++ b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf @@ -56,7 +56,7 @@ TRACE_1("Starting wire-cut action PFEH",_interactionType); if ([_x] call FUNC(isFence)) then { _fencesHelped pushBack _x; _helper = "ACE_LogicDummy" createVehicleLocal (getpos _x); - _action = [QGVAR(helperCutFence), (localize LSTRING(CutFence)), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), _fncStatement, _fncCondition, {}, _x, {[0,0,0]}, 5.5] call EFUNC(interact_menu,createAction); + _action = [QGVAR(helperCutFence), (localize LSTRING(CutFence)), QPATHTOF(ui\wirecutter_ca.paa), _fncStatement, _fncCondition, {}, _x, {[0,0,0]}, 5.5] call EFUNC(interact_menu,createAction); [_helper, 0, [],_action] call EFUNC(interact_menu,addActionToObject); _helper setPosASL ((getPosASL _x) vectorAdd [0,0,1.25]); _addedHelpers pushBack _helper; diff --git a/addons/logistics_wirecutter/stringtable.xml b/addons/logistics_wirecutter/stringtable.xml index ef5d0522e3..1f9955f4be 100644 --- a/addons/logistics_wirecutter/stringtable.xml +++ b/addons/logistics_wirecutter/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/magazinerepack/ACE_Settings.hpp b/addons/magazinerepack/ACE_Settings.hpp index 0b7b2d4628..940af87d15 100644 --- a/addons/magazinerepack/ACE_Settings.hpp +++ b/addons/magazinerepack/ACE_Settings.hpp @@ -1,16 +1,16 @@ class ACE_Settings { //Time to move a round from one magazine to another - class GVAR(TimePerAmmo) { + class GVAR(timePerAmmo) { value = 1.5; typeName = "SCALAR"; }; //Time to swap between magazines when repacking - class GVAR(TimePerMagazine) { + class GVAR(timePerMagazine) { value = 2.0; typeName = "SCALAR"; }; //Time to relink 2 belts together - class GVAR(TimePerBeltLink) { + class GVAR(timePerBeltLink) { value = 8.0; typeName = "SCALAR"; }; diff --git a/addons/magazinerepack/CfgSounds.hpp b/addons/magazinerepack/CfgSounds.hpp index 1390397e5e..a189c18b9c 100644 --- a/addons/magazinerepack/CfgSounds.hpp +++ b/addons/magazinerepack/CfgSounds.hpp @@ -1,12 +1,12 @@ class CfgSounds { class GVAR(soundMagazineFinished) { name = QGVAR(soundMagazineFinished); - sound[]={QUOTE(PATHTOF(sounds\magrepack_finished.wav)),1,1}; + sound[]={QPATHTOF(sounds\magrepack_finished.wav),1,1}; titles[]={}; }; class GVAR(soundRoundFinished) { name = QGVAR(soundRoundFinished); - sound[] = {QUOTE(PATHTOF(sounds\magrepack_single.wav)),1,1}; + sound[] = {QPATHTOF(sounds\magrepack_single.wav),1,1}; titles[] = {}; }; }; diff --git a/addons/magazinerepack/CfgVehicles.hpp b/addons/magazinerepack/CfgVehicles.hpp index 78af19bcfe..0bf4833bf0 100644 --- a/addons/magazinerepack/CfgVehicles.hpp +++ b/addons/magazinerepack/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { exceptions[] = {"isNotInside", "isNotSitting"}; insertChildren = QUOTE(_this call FUNC(getMagazineChildren)); priority = -2; - icon = QUOTE(PATHTOF(UI\repack_ca.paa)); + icon = QPATHTOF(UI\repack_ca.paa); }; }; }; diff --git a/addons/magazinerepack/config.cpp b/addons/magazinerepack/config.cpp index 47c0ac889c..c660b44ca7 100644 --- a/addons/magazinerepack/config.cpp +++ b/addons/magazinerepack/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"commy2","esteldunedain"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2","esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/magazinerepack/stringtable.xml b/addons/magazinerepack/stringtable.xml index 1fc873f0c3..b89b4b587d 100644 --- a/addons/magazinerepack/stringtable.xml +++ b/addons/magazinerepack/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/main/CfgSettings.hpp b/addons/main/CfgSettings.hpp new file mode 100644 index 0000000000..58cb824a6f --- /dev/null +++ b/addons/main/CfgSettings.hpp @@ -0,0 +1,17 @@ + +class CfgSettings { + class CBA { + class Versioning { + class ACE { + class dependencies { + //ACE will hard exit if this is missing + CBA[] = {"cba_main", REQUIRED_CBA_VERSION, "(true)"}; + + //Warnings for missing RHS compat pbos + compat_rhs_afrf3[] = {"ace_compat_rhs_afrf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhs_main')"}; + compat_rhs_usf3[] = {"ace_compat_rhs_usf3", {VERSION_AR}, "isClass (configFile >> 'CfgPatches' >> 'rhsusf_main')"}; + }; + }; + }; + }; +}; diff --git a/addons/main/config.cpp b/addons/main/config.cpp index 857478a442..9969e52447 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -1,590 +1,591 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = { - // Vanilla - "3den", - "a3_air_f", - "a3_air_f_beta", - "a3_air_f_beta_heli_attack_01", - "a3_air_f_beta_heli_attack_02", - "a3_air_f_beta_heli_transport_01", - "a3_air_f_beta_heli_transport_02", - "a3_air_f_beta_parachute_01", - "a3_air_f_beta_parachute_02", - "a3_air_f_epb_heli_light_03", - "a3_air_f_epc_plane_cas_01", - "a3_air_f_epc_plane_cas_02", - "a3_air_f_epc_plane_fighter_03", - "a3_air_f_gamma_plane_fighter_03", - "a3_air_f_gamma_uav_01", - "a3_air_f_gamma_uav_02", - "a3_air_f_heli", - "a3_air_f_heli_heli_attack_01", - "a3_air_f_heli_heli_attack_02", - "a3_air_f_heli_heli_light_01", - "a3_air_f_heli_heli_light_02", - "a3_air_f_heli_heli_light_03", - "a3_air_f_heli_heli_transport_01", - "a3_air_f_heli_heli_transport_02", - "a3_air_f_heli_heli_transport_03", - "a3_air_f_heli_heli_transport_04", - "a3_air_f_heli_light_01", - "a3_air_f_heli_light_02", - "a3_animals_f", - "a3_animals_f_animconfig", - "a3_animals_f_chicken", - "a3_animals_f_dog", - "a3_animals_f_fishes", - "a3_animals_f_goat", - "a3_animals_f_kestrel", - "a3_animals_f_rabbit", - "a3_animals_f_seagull", - "a3_animals_f_sheep", - "a3_animals_f_snakes", - "a3_animals_f_turtle", - "a3_anims_f", - "a3_anims_f_config_sdr", - "a3_anims_f_epa", - "a3_anims_f_epc", - "a3_anims_f_exp_a", - "a3_anims_f_heli", - "a3_anims_f_kart", - "a3_anims_f_mark_deployment", - "a3_armor_f", - "a3_armor_f_amv", - "a3_armor_f_apc_wheeled_03", - "a3_armor_f_beta", - "a3_armor_f_beta_apc_tracked_02", - "a3_armor_f_epb_apc_tracked_03", - "a3_armor_f_epb_mbt_03", - "a3_armor_f_epc_mbt_01", - "a3_armor_f_marid", - "a3_armor_f_panther", - "a3_armor_f_slammer", - "a3_armor_f_t100k", - "a3_baseconfig_f", - "a3_boat_f", - "a3_boat_f_beta_boat_armed_01", - "a3_boat_f_beta_boat_transport_01", - "a3_boat_f_boat_armed_01", - "a3_boat_f_boat_transport_01", - "a3_boat_f_civilian_boat", - "a3_boat_f_epc_submarine_01_f", - "a3_boat_f_gamma_boat_transport_01", - "a3_boat_f_heli_boat_armed_01", - "a3_boat_f_heli_sdv_01", - "a3_boat_f_sdv_01", - "a3_boat_f_trawler", - "a3_cargoposes_f", - "a3_cargoposes_f_heli", - "a3_characters_f", - "a3_characters_f_beta", - "a3_characters_f_blufor", - "a3_characters_f_bootcamp", - "a3_characters_f_bootcamp_common", - "a3_characters_f_civil", - "a3_characters_f_common", - "a3_characters_f_epa", - "a3_characters_f_epb", - "a3_characters_f_epb_heads", - "a3_characters_f_epc", - "a3_characters_f_gamma", - "a3_characters_f_heads", - "a3_characters_f_indep", - "a3_characters_f_kart", - "a3_characters_f_mark", - "a3_characters_f_opfor", - "a3_characters_f_proxies", - "a3_data_f", - "a3_data_f_bootcamp", - "a3_data_f_curator", - "a3_data_f_curator_characters", - "a3_data_f_curator_eagle", - "a3_data_f_curator_intel", - "a3_data_f_curator_misc", - "a3_data_f_curator_respawn", - "a3_data_f_curator_virtual", - "a3_data_f_exp_a", - "a3_data_f_exp_a_virtual", - "a3_data_f_exp_b", - "a3_data_f_heli", - "a3_data_f_hook", - "a3_data_f_kart", - "a3_data_f_kart_particleeffects", - "a3_data_f_mark", - "a3_data_f_particleeffects", - "a3_dubbing_radio_f", - "a3_editor_f", - "a3_functions_f", - "a3_functions_f_bootcamp", - "a3_functions_f_curator", - "a3_functions_f_epa", - "a3_functions_f_epc", - "a3_functions_f_exp_a", - "a3_functions_f_heli", - "a3_functions_f_mark", - "a3_functions_f_mp_mark", - "a3_language_f", - "a3_language_f_beta", - "a3_language_f_bootcamp", - "a3_language_f_curator", - "a3_language_f_epa", - "a3_language_f_epb", - "a3_language_f_epc", - "a3_language_f_exp_a", - "a3_language_f_gamma", - "a3_language_f_heli", - "a3_language_f_kart", - "a3_language_f_mark", - "a3_language_f_mp_mark", - "a3_languagemissions_f", - "a3_languagemissions_f_beta", - "a3_languagemissions_f_gamma", - "a3_languagemissions_f_kart", - "a3_languagemissions_f_mp_mark", - "a3_map_altis", - "a3_map_altis_scenes", - "a3_map_data", - "a3_map_stratis", - "a3_map_stratis_scenes", - "a3_map_vr_scenes", - "a3_misc_f", - "a3_misc_f_helpers", - "a3_missions_f", - "a3_missions_f_beta", - "a3_missions_f_bootcamp", - "a3_missions_f_curator", - "a3_missions_f_epa", - "a3_missions_f_epb", - "a3_missions_f_epc", - "a3_missions_f_exp_a", - "a3_missions_f_gamma", - "a3_missions_f_heli", - "a3_missions_f_kart", - "a3_missions_f_mark", - "a3_missions_f_mp_mark", - "a3_modules_f", - "a3_modules_f_beta", - "a3_modules_f_beta_firingdrills", - "a3_modules_f_bootcamp", - "a3_modules_f_bootcamp_misc", - "a3_modules_f_curator", - "a3_modules_f_curator_animals", - "a3_modules_f_curator_cas", - "a3_modules_f_curator_chemlights", - "a3_modules_f_curator_curator", - "a3_modules_f_curator_effects", - "a3_modules_f_curator_environment", - "a3_modules_f_curator_flares", - "a3_modules_f_curator_intel", - "a3_modules_f_curator_lightning", - "a3_modules_f_curator_mines", - "a3_modules_f_curator_misc", - "a3_modules_f_curator_multiplayer", - "a3_modules_f_curator_objectives", - "a3_modules_f_curator_ordnance", - "a3_modules_f_curator_respawn", - "a3_modules_f_curator_smokeshells", - "a3_modules_f_dyno", - "a3_modules_f_effects", - "a3_modules_f_epb", - "a3_modules_f_epb_misc", - "a3_modules_f_events", - "a3_modules_f_exp_a", - "a3_modules_f_groupmodifiers", - "a3_modules_f_hc", - "a3_modules_f_heli", - "a3_modules_f_heli_spawnai", - "a3_modules_f_intel", - "a3_modules_f_kart", - "a3_modules_f_kart_timetrials", - "a3_modules_f_livefeed", - "a3_modules_f_mark", - "a3_modules_f_mark_firingdrills", - "a3_modules_f_mark_objectives", - "a3_modules_f_marta", - "a3_modules_f_misc", - "a3_modules_f_mp_mark", - "a3_modules_f_multiplayer", - "a3_modules_f_objectmodifiers", - "a3_modules_f_sites", - "a3_modules_f_skirmish", - "a3_modules_f_strategicmap", - "a3_modules_f_supports", - "a3_modules_f_uav", - "a3_music_f", - "a3_music_f_bootcamp", - "a3_music_f_epa", - "a3_music_f_epb", - "a3_music_f_epc", - "a3_music_f_heli", - "a3_music_f_mark", - "a3_plants_f_bush", - "a3_props_f_exp_a", - "a3_props_f_exp_a_military", - "a3_props_f_exp_a_military_equipment", - "a3_roads_f", - "a3_rocks_f", - "a3_signs_f", - "a3_signs_f_ad", - "a3_soft_f", - "a3_soft_f_beta_quadbike", - "a3_soft_f_bootcamp_offroad_01", - "a3_soft_f_bootcamp_quadbike", - "a3_soft_f_bootcamp_truck", - "a3_soft_f_car", - "a3_soft_f_crusher_ugv", - "a3_soft_f_epc_truck_03", - "a3_soft_f_gamma_hemtt", - "a3_soft_f_gamma_offroad", - "a3_soft_f_gamma_quadbike", - "a3_soft_f_gamma_truckheavy", - "a3_soft_f_heli_car", - "a3_soft_f_heli_crusher_ugv", - "a3_soft_f_heli_mrap_01", - "a3_soft_f_heli_mrap_02", - "a3_soft_f_heli_mrap_03", - "a3_soft_f_heli_quadbike", - "a3_soft_f_heli_suv", - "a3_soft_f_heli_truck", - "a3_soft_f_hemtt", - "a3_soft_f_kart_kart_01", - "a3_soft_f_mrap_01", - "a3_soft_f_mrap_02", - "a3_soft_f_mrap_03", - "a3_soft_f_offroad_01", - "a3_soft_f_quadbike", - "a3_soft_f_suv", - "a3_soft_f_truck", - "a3_soft_f_truckheavy", - "a3_sounds_f", - "a3_sounds_f_bootcamp", - "a3_sounds_f_epb", - "a3_sounds_f_epc", - "a3_sounds_f_exp_a", - "a3_sounds_f_mark", - "a3_static_f", - "a3_static_f_beta_mortar_01", - "a3_static_f_gamma", - "a3_static_f_gamma_aa", - "a3_static_f_gamma_at", - "a3_static_f_gamma_mortar_01", - "a3_static_f_mark_designator_01", - "a3_static_f_mark_designator_02", - "a3_static_f_mortar_01", - "a3_structures_f", - "a3_structures_f_bootcamp_civ_camping", - "a3_structures_f_bootcamp_civ_sportsgrounds", - "a3_structures_f_bootcamp_ind_cargo", - "a3_structures_f_bootcamp_items_electronics", - "a3_structures_f_bootcamp_items_food", - "a3_structures_f_bootcamp_items_sport", - "a3_structures_f_bootcamp_system", - "a3_structures_f_bootcamp_training", - "a3_structures_f_bootcamp_vr_blocks", - "a3_structures_f_bootcamp_vr_coverobjects", - "a3_structures_f_bootcamp_vr_helpers", - "a3_structures_f_bridges", - "a3_structures_f_civ", - "a3_structures_f_civ_accessories", - "a3_structures_f_civ_ancient", - "a3_structures_f_civ_belltowers", - "a3_structures_f_civ_calvaries", - "a3_structures_f_civ_camping", - "a3_structures_f_civ_chapels", - "a3_structures_f_civ_constructions", - "a3_structures_f_civ_dead", - "a3_structures_f_civ_garbage", - "a3_structures_f_civ_graffiti", - "a3_structures_f_civ_infoboards", - "a3_structures_f_civ_kiosks", - "a3_structures_f_civ_lamps", - "a3_structures_f_civ_market", - "a3_structures_f_civ_offices", - "a3_structures_f_civ_pavements", - "a3_structures_f_civ_playground", - "a3_structures_f_civ_sportsgrounds", - "a3_structures_f_civ_statues", - "a3_structures_f_civ_tourism", - "a3_structures_f_dominants", - "a3_structures_f_dominants_amphitheater", - "a3_structures_f_dominants_castle", - "a3_structures_f_dominants_church", - "a3_structures_f_dominants_hospital", - "a3_structures_f_dominants_lighthouse", - "a3_structures_f_dominants_wip", - "a3_structures_f_epa_civ_camping", - "a3_structures_f_epa_civ_constructions", - "a3_structures_f_epa_items_electronics", - "a3_structures_f_epa_items_food", - "a3_structures_f_epa_items_medical", - "a3_structures_f_epa_items_tools", - "a3_structures_f_epa_items_vessels", - "a3_structures_f_epa_mil_scrapyard", - "a3_structures_f_epa_walls", - "a3_structures_f_epb_civ_accessories", - "a3_structures_f_epb_civ_camping", - "a3_structures_f_epb_civ_dead", - "a3_structures_f_epb_civ_garbage", - "a3_structures_f_epb_civ_graffiti", - "a3_structures_f_epb_civ_playground", - "a3_structures_f_epb_furniture", - "a3_structures_f_epb_items_documents", - "a3_structures_f_epb_items_luggage", - "a3_structures_f_epb_items_military", - "a3_structures_f_epb_items_vessels", - "a3_structures_f_epb_naval_fishing", - "a3_structures_f_epc_civ_accessories", - "a3_structures_f_epc_civ_camping", - "a3_structures_f_epc_civ_garbage", - "a3_structures_f_epc_civ_infoboards", - "a3_structures_f_epc_civ_kiosks", - "a3_structures_f_epc_civ_playground", - "a3_structures_f_epc_civ_tourism", - "a3_structures_f_epc_dominants_ghosthotel", - "a3_structures_f_epc_dominants_stadium", - "a3_structures_f_epc_furniture", - "a3_structures_f_epc_items_documents", - "a3_structures_f_epc_items_electronics", - "a3_structures_f_epc_walls", - "a3_structures_f_exp_a", - "a3_structures_f_exp_a_vr_blocks", - "a3_structures_f_exp_a_vr_helpers", - "a3_structures_f_furniture", - "a3_structures_f_heli_civ_accessories", - "a3_structures_f_heli_civ_constructions", - "a3_structures_f_heli_civ_garbage", - "a3_structures_f_heli_civ_market", - "a3_structures_f_heli_furniture", - "a3_structures_f_heli_ind_airport", - "a3_structures_f_heli_ind_cargo", - "a3_structures_f_heli_ind_machines", - "a3_structures_f_heli_items_airport", - "a3_structures_f_heli_items_electronics", - "a3_structures_f_heli_items_food", - "a3_structures_f_heli_items_luggage", - "a3_structures_f_heli_items_sport", - "a3_structures_f_heli_items_tools", - "a3_structures_f_heli_vr_helpers", - "a3_structures_f_households", - "a3_structures_f_households_addons", - "a3_structures_f_households_house_big01", - "a3_structures_f_households_house_big02", - "a3_structures_f_households_house_shop01", - "a3_structures_f_households_house_shop02", - "a3_structures_f_households_house_small01", - "a3_structures_f_households_house_small02", - "a3_structures_f_households_house_small03", - "a3_structures_f_households_slum", - "a3_structures_f_households_stone_big", - "a3_structures_f_households_stone_shed", - "a3_structures_f_households_stone_small", - "a3_structures_f_households_wip", - "a3_structures_f_ind", - "a3_structures_f_ind_airport", - "a3_structures_f_ind_cargo", - "a3_structures_f_ind_carservice", - "a3_structures_f_ind_concretemixingplant", - "a3_structures_f_ind_crane", - "a3_structures_f_ind_dieselpowerplant", - "a3_structures_f_ind_factory", - "a3_structures_f_ind_fuelstation", - "a3_structures_f_ind_fuelstation_small", - "a3_structures_f_ind_pipes", - "a3_structures_f_ind_powerlines", - "a3_structures_f_ind_reservoirtank", - "a3_structures_f_ind_shed", - "a3_structures_f_ind_solarpowerplant", - "a3_structures_f_ind_tank", - "a3_structures_f_ind_transmitter_tower", - "a3_structures_f_ind_wavepowerplant", - "a3_structures_f_ind_windmill", - "a3_structures_f_ind_windpowerplant", - "a3_structures_f_items", - "a3_structures_f_items_cans", - "a3_structures_f_items_documents", - "a3_structures_f_items_electronics", - "a3_structures_f_items_gadgets", - "a3_structures_f_items_luggage", - "a3_structures_f_items_medical", - "a3_structures_f_items_military", - "a3_structures_f_items_stationery", - "a3_structures_f_items_tools", - "a3_structures_f_items_valuables", - "a3_structures_f_items_vessels", - "a3_structures_f_kart_civ_sportsgrounds", - "a3_structures_f_kart_mil_flags", - "a3_structures_f_kart_signs_companies", - "a3_structures_f_mark_items_military", - "a3_structures_f_mark_items_sport", - "a3_structures_f_mark_mil_flags", - "a3_structures_f_mark_training", - "a3_structures_f_mark_vr_helpers", - "a3_structures_f_mark_vr_shapes", - "a3_structures_f_mark_vr_targets", - "a3_structures_f_mil", - "a3_structures_f_mil_bagbunker", - "a3_structures_f_mil_bagfence", - "a3_structures_f_mil_barracks", - "a3_structures_f_mil_bunker", - "a3_structures_f_mil_cargo", - "a3_structures_f_mil_flags", - "a3_structures_f_mil_fortification", - "a3_structures_f_mil_helipads", - "a3_structures_f_mil_offices", - "a3_structures_f_mil_radar", - "a3_structures_f_mil_scrapyard", - "a3_structures_f_mil_shelters", - "a3_structures_f_mil_tenthangar", - "a3_structures_f_naval", - "a3_structures_f_naval_buoys", - "a3_structures_f_naval_fishing", - "a3_structures_f_naval_piers", - "a3_structures_f_naval_rowboats", - "a3_structures_f_research", - "a3_structures_f_signs_companies", - "a3_structures_f_system", - "a3_structures_f_training", - "a3_structures_f_training_invisibletarget", - "a3_structures_f_walls", - "a3_structures_f_wrecks", - "a3_supplies_f_heli", - "a3_supplies_f_heli_bladders", - "a3_supplies_f_heli_cargonets", - "a3_supplies_f_heli_fuel", - "a3_supplies_f_heli_slingload", - "a3_supplies_f_mark", - "a3_uav_f_characters_f_gamma", - "a3_uav_f_weapons_f_gamma_ammoboxes", - "a3_ui_f", - "a3_ui_f_bootcamp", - "a3_ui_f_curator", - "a3_ui_f_exp_a", - "a3_ui_f_heli", - "a3_ui_f_kart", - "a3_ui_f_mark", - "a3_ui_f_mp_mark", - "a3_uifonts_f", - "a3_weapons_f", - "a3_weapons_f_aaf", - "a3_weapons_f_acc", - "a3_weapons_f_ammoboxes", - "a3_weapons_f_beta", - "a3_weapons_f_beta_acc", - "a3_weapons_f_beta_ammoboxes", - "a3_weapons_f_beta_ebr", - "a3_weapons_f_beta_rifles_khaybar", - "a3_weapons_f_beta_rifles_mx", - "a3_weapons_f_beta_rifles_trg20", - "a3_weapons_f_bootcamp", - "a3_weapons_f_bootcamp_ammoboxes", - "a3_weapons_f_bootcamp_longrangerifles_gm6", - "a3_weapons_f_bootcamp_longrangerifles_m320", - "a3_weapons_f_csat", - "a3_weapons_f_dummyweapons", - "a3_weapons_f_ebr", - "a3_weapons_f_epa", - "a3_weapons_f_epa_acc", - "a3_weapons_f_epa_ammoboxes", - "a3_weapons_f_epa_ebr", - "a3_weapons_f_epa_longrangerifles_dmr_01", - "a3_weapons_f_epa_longrangerifles_gm6", - "a3_weapons_f_epa_rifles_mx", - "a3_weapons_f_epb", - "a3_weapons_f_epb_acc", - "a3_weapons_f_epb_ammoboxes", - "a3_weapons_f_epb_longrangerifles_gm3", - "a3_weapons_f_epb_longrangerifles_m320", - "a3_weapons_f_epb_rifles_mx_black", - "a3_weapons_f_epc", - "a3_weapons_f_explosives", - "a3_weapons_f_fia", - "a3_weapons_f_gamma", - "a3_weapons_f_gamma_acc", - "a3_weapons_f_gamma_ammoboxes", - "a3_weapons_f_gamma_items", - "a3_weapons_f_headgear", - "a3_weapons_f_itemholders", - "a3_weapons_f_items", - "a3_weapons_f_kart", - "a3_weapons_f_kart_pistols_pistol_signal_f", - "a3_weapons_f_launchers_law", - "a3_weapons_f_launchers_nlaw", - "a3_weapons_f_launchers_titan", - "a3_weapons_f_longrangerifles_gm6", - "a3_weapons_f_longrangerifles_m320", - "a3_weapons_f_machineguns_m200", - "a3_weapons_f_machineguns_zafir", - "a3_weapons_f_mark", - "a3_weapons_f_mark_acc", - "a3_weapons_f_mark_ebr", - "a3_weapons_f_mark_longrangerifles_dmr_01", - "a3_weapons_f_mark_longrangerifles_dmr_02", - "a3_weapons_f_mark_longrangerifles_dmr_03", - "a3_weapons_f_mark_longrangerifles_dmr_04", - "a3_weapons_f_mark_longrangerifles_dmr_05", - "a3_weapons_f_mark_longrangerifles_dmr_06", - "a3_weapons_f_mark_longrangerifles_gm6", - "a3_weapons_f_mark_longrangerifles_gm6_camo", - "a3_weapons_f_mark_longrangerifles_m320", - "a3_weapons_f_mark_longrangerifles_m320_camo", - "a3_weapons_f_mark_machineguns_m200", - "a3_weapons_f_mark_machineguns_mmg_01", - "a3_weapons_f_mark_machineguns_mmg_02", - "a3_weapons_f_mark_machineguns_zafir", - "a3_weapons_f_mark_rifles_khaybar", - "a3_weapons_f_mark_rifles_mk20", - "a3_weapons_f_mark_rifles_mx", - "a3_weapons_f_mark_rifles_sdar", - "a3_weapons_f_mark_rifles_trg20", - "a3_weapons_f_nato", - "a3_weapons_f_pistols_acpc2", - "a3_weapons_f_pistols_p07", - "a3_weapons_f_pistols_pdw2000", - "a3_weapons_f_pistols_pistol_heavy_01", - "a3_weapons_f_pistols_pistol_heavy_02", - "a3_weapons_f_pistols_rook40", - "a3_weapons_f_rifles_khaybar", - "a3_weapons_f_rifles_mk20", - "a3_weapons_f_rifles_mx", - "a3_weapons_f_rifles_sdar", - "a3_weapons_f_rifles_smg_02", - "a3_weapons_f_rifles_trg20", - "a3_weapons_f_rifles_vector", - "a3_weapons_f_uniforms", - "a3_weapons_f_vests", - "a3data", - "map_vr", - // CBA - "extended_eventhandlers", - "cba_ui", - "cba_xeh", - "cba_xeh_a3", - "cba_jr" - }; - author[] = {ECSTRING(common,ACETeam)}; - authorUrl = "http://ace3mod.com/"; - VERSION_CONFIG; - }; -}; - -class CfgMods { - class PREFIX { - dir = "@ace"; - name = "Advanced Combat Environment 3"; - picture = "A3\Ui_f\data\Logos\arma3_expansion_alpha_ca"; - hidePicture = "true"; - hideName = "true"; - actionName = "Website"; - action = "http://ace3mod.com/"; - description = "Issue Tracker: https://github.com/acemod/ACE3/issues"; - }; -}; - -#include "CfgModuleCategories.hpp" -#include "CfgVehicleClasses.hpp" +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = { + // Vanilla + "3den", + "a3_air_f", + "a3_air_f_beta", + "a3_air_f_beta_heli_attack_01", + "a3_air_f_beta_heli_attack_02", + "a3_air_f_beta_heli_transport_01", + "a3_air_f_beta_heli_transport_02", + "a3_air_f_beta_parachute_01", + "a3_air_f_beta_parachute_02", + "a3_air_f_epb_heli_light_03", + "a3_air_f_epc_plane_cas_01", + "a3_air_f_epc_plane_cas_02", + "a3_air_f_epc_plane_fighter_03", + "a3_air_f_gamma_plane_fighter_03", + "a3_air_f_gamma_uav_01", + "a3_air_f_gamma_uav_02", + "a3_air_f_heli", + "a3_air_f_heli_heli_attack_01", + "a3_air_f_heli_heli_attack_02", + "a3_air_f_heli_heli_light_01", + "a3_air_f_heli_heli_light_02", + "a3_air_f_heli_heli_light_03", + "a3_air_f_heli_heli_transport_01", + "a3_air_f_heli_heli_transport_02", + "a3_air_f_heli_heli_transport_03", + "a3_air_f_heli_heli_transport_04", + "a3_air_f_heli_light_01", + "a3_air_f_heli_light_02", + "a3_animals_f", + "a3_animals_f_animconfig", + "a3_animals_f_chicken", + "a3_animals_f_dog", + "a3_animals_f_fishes", + "a3_animals_f_goat", + "a3_animals_f_kestrel", + "a3_animals_f_rabbit", + "a3_animals_f_seagull", + "a3_animals_f_sheep", + "a3_animals_f_snakes", + "a3_animals_f_turtle", + "a3_anims_f", + "a3_anims_f_config_sdr", + "a3_anims_f_epa", + "a3_anims_f_epc", + "a3_anims_f_exp_a", + "a3_anims_f_heli", + "a3_anims_f_kart", + "a3_anims_f_mark_deployment", + "a3_armor_f", + "a3_armor_f_amv", + "a3_armor_f_apc_wheeled_03", + "a3_armor_f_beta", + "a3_armor_f_beta_apc_tracked_02", + "a3_armor_f_epb_apc_tracked_03", + "a3_armor_f_epb_mbt_03", + "a3_armor_f_epc_mbt_01", + "a3_armor_f_marid", + "a3_armor_f_panther", + "a3_armor_f_slammer", + "a3_armor_f_t100k", + "a3_baseconfig_f", + "a3_boat_f", + "a3_boat_f_beta_boat_armed_01", + "a3_boat_f_beta_boat_transport_01", + "a3_boat_f_boat_armed_01", + "a3_boat_f_boat_transport_01", + "a3_boat_f_civilian_boat", + "a3_boat_f_epc_submarine_01_f", + "a3_boat_f_gamma_boat_transport_01", + "a3_boat_f_heli_boat_armed_01", + "a3_boat_f_heli_sdv_01", + "a3_boat_f_sdv_01", + "a3_boat_f_trawler", + "a3_cargoposes_f", + "a3_cargoposes_f_heli", + "a3_characters_f", + "a3_characters_f_beta", + "a3_characters_f_blufor", + "a3_characters_f_bootcamp", + "a3_characters_f_bootcamp_common", + "a3_characters_f_civil", + "a3_characters_f_common", + "a3_characters_f_epa", + "a3_characters_f_epb", + "a3_characters_f_epb_heads", + "a3_characters_f_epc", + "a3_characters_f_gamma", + "a3_characters_f_heads", + "a3_characters_f_indep", + "a3_characters_f_kart", + "a3_characters_f_mark", + "a3_characters_f_opfor", + "a3_characters_f_proxies", + "a3_data_f", + "a3_data_f_bootcamp", + "a3_data_f_curator", + "a3_data_f_curator_characters", + "a3_data_f_curator_eagle", + "a3_data_f_curator_intel", + "a3_data_f_curator_misc", + "a3_data_f_curator_respawn", + "a3_data_f_curator_virtual", + "a3_data_f_exp_a", + "a3_data_f_exp_a_virtual", + "a3_data_f_exp_b", + "a3_data_f_heli", + "a3_data_f_hook", + "a3_data_f_kart", + "a3_data_f_kart_particleeffects", + "a3_data_f_mark", + "a3_data_f_particleeffects", + "a3_dubbing_radio_f", + "a3_editor_f", + "a3_functions_f", + "a3_functions_f_bootcamp", + "a3_functions_f_curator", + "a3_functions_f_epa", + "a3_functions_f_epc", + "a3_functions_f_exp_a", + "a3_functions_f_heli", + "a3_functions_f_mark", + "a3_functions_f_mp_mark", + "a3_language_f", + "a3_language_f_beta", + "a3_language_f_bootcamp", + "a3_language_f_curator", + "a3_language_f_epa", + "a3_language_f_epb", + "a3_language_f_epc", + "a3_language_f_exp_a", + "a3_language_f_gamma", + "a3_language_f_heli", + "a3_language_f_kart", + "a3_language_f_mark", + "a3_language_f_mp_mark", + "a3_languagemissions_f", + "a3_languagemissions_f_beta", + "a3_languagemissions_f_gamma", + "a3_languagemissions_f_kart", + "a3_languagemissions_f_mp_mark", + "a3_map_altis", + "a3_map_altis_scenes", + "a3_map_data", + "a3_map_stratis", + "a3_map_stratis_scenes", + "a3_map_vr_scenes", + "a3_misc_f", + "a3_misc_f_helpers", + "a3_missions_f", + "a3_missions_f_beta", + "a3_missions_f_bootcamp", + "a3_missions_f_curator", + "a3_missions_f_epa", + "a3_missions_f_epb", + "a3_missions_f_epc", + "a3_missions_f_exp_a", + "a3_missions_f_gamma", + "a3_missions_f_heli", + "a3_missions_f_kart", + "a3_missions_f_mark", + "a3_missions_f_mp_mark", + "a3_modules_f", + "a3_modules_f_beta", + "a3_modules_f_beta_firingdrills", + "a3_modules_f_bootcamp", + "a3_modules_f_bootcamp_misc", + "a3_modules_f_curator", + "a3_modules_f_curator_animals", + "a3_modules_f_curator_cas", + "a3_modules_f_curator_chemlights", + "a3_modules_f_curator_curator", + "a3_modules_f_curator_effects", + "a3_modules_f_curator_environment", + "a3_modules_f_curator_flares", + "a3_modules_f_curator_intel", + "a3_modules_f_curator_lightning", + "a3_modules_f_curator_mines", + "a3_modules_f_curator_misc", + "a3_modules_f_curator_multiplayer", + "a3_modules_f_curator_objectives", + "a3_modules_f_curator_ordnance", + "a3_modules_f_curator_respawn", + "a3_modules_f_curator_smokeshells", + "a3_modules_f_dyno", + "a3_modules_f_effects", + "a3_modules_f_epb", + "a3_modules_f_epb_misc", + "a3_modules_f_events", + "a3_modules_f_exp_a", + "a3_modules_f_groupmodifiers", + "a3_modules_f_hc", + "a3_modules_f_heli", + "a3_modules_f_heli_spawnai", + "a3_modules_f_intel", + "a3_modules_f_kart", + "a3_modules_f_kart_timetrials", + "a3_modules_f_livefeed", + "a3_modules_f_mark", + "a3_modules_f_mark_firingdrills", + "a3_modules_f_mark_objectives", + "a3_modules_f_marta", + "a3_modules_f_misc", + "a3_modules_f_mp_mark", + "a3_modules_f_multiplayer", + "a3_modules_f_objectmodifiers", + "a3_modules_f_sites", + "a3_modules_f_skirmish", + "a3_modules_f_strategicmap", + "a3_modules_f_supports", + "a3_modules_f_uav", + "a3_music_f", + "a3_music_f_bootcamp", + "a3_music_f_epa", + "a3_music_f_epb", + "a3_music_f_epc", + "a3_music_f_heli", + "a3_music_f_mark", + "a3_plants_f_bush", + "a3_props_f_exp_a", + "a3_props_f_exp_a_military", + "a3_props_f_exp_a_military_equipment", + "a3_roads_f", + "a3_rocks_f", + "a3_signs_f", + "a3_signs_f_ad", + "a3_soft_f", + "a3_soft_f_beta_quadbike", + "a3_soft_f_bootcamp_offroad_01", + "a3_soft_f_bootcamp_quadbike", + "a3_soft_f_bootcamp_truck", + "a3_soft_f_car", + "a3_soft_f_crusher_ugv", + "a3_soft_f_epc_truck_03", + "a3_soft_f_gamma_hemtt", + "a3_soft_f_gamma_offroad", + "a3_soft_f_gamma_quadbike", + "a3_soft_f_gamma_truckheavy", + "a3_soft_f_heli_car", + "a3_soft_f_heli_crusher_ugv", + "a3_soft_f_heli_mrap_01", + "a3_soft_f_heli_mrap_02", + "a3_soft_f_heli_mrap_03", + "a3_soft_f_heli_quadbike", + "a3_soft_f_heli_suv", + "a3_soft_f_heli_truck", + "a3_soft_f_hemtt", + "a3_soft_f_kart_kart_01", + "a3_soft_f_mrap_01", + "a3_soft_f_mrap_02", + "a3_soft_f_mrap_03", + "a3_soft_f_offroad_01", + "a3_soft_f_quadbike", + "a3_soft_f_suv", + "a3_soft_f_truck", + "a3_soft_f_truckheavy", + "a3_sounds_f", + "a3_sounds_f_bootcamp", + "a3_sounds_f_epb", + "a3_sounds_f_epc", + "a3_sounds_f_exp_a", + "a3_sounds_f_mark", + "a3_static_f", + "a3_static_f_beta_mortar_01", + "a3_static_f_gamma", + "a3_static_f_gamma_aa", + "a3_static_f_gamma_at", + "a3_static_f_gamma_mortar_01", + "a3_static_f_mark_designator_01", + "a3_static_f_mark_designator_02", + "a3_static_f_mortar_01", + "a3_structures_f", + "a3_structures_f_bootcamp_civ_camping", + "a3_structures_f_bootcamp_civ_sportsgrounds", + "a3_structures_f_bootcamp_ind_cargo", + "a3_structures_f_bootcamp_items_electronics", + "a3_structures_f_bootcamp_items_food", + "a3_structures_f_bootcamp_items_sport", + "a3_structures_f_bootcamp_system", + "a3_structures_f_bootcamp_training", + "a3_structures_f_bootcamp_vr_blocks", + "a3_structures_f_bootcamp_vr_coverobjects", + "a3_structures_f_bootcamp_vr_helpers", + "a3_structures_f_bridges", + "a3_structures_f_civ", + "a3_structures_f_civ_accessories", + "a3_structures_f_civ_ancient", + "a3_structures_f_civ_belltowers", + "a3_structures_f_civ_calvaries", + "a3_structures_f_civ_camping", + "a3_structures_f_civ_chapels", + "a3_structures_f_civ_constructions", + "a3_structures_f_civ_dead", + "a3_structures_f_civ_garbage", + "a3_structures_f_civ_graffiti", + "a3_structures_f_civ_infoboards", + "a3_structures_f_civ_kiosks", + "a3_structures_f_civ_lamps", + "a3_structures_f_civ_market", + "a3_structures_f_civ_offices", + "a3_structures_f_civ_pavements", + "a3_structures_f_civ_playground", + "a3_structures_f_civ_sportsgrounds", + "a3_structures_f_civ_statues", + "a3_structures_f_civ_tourism", + "a3_structures_f_dominants", + "a3_structures_f_dominants_amphitheater", + "a3_structures_f_dominants_castle", + "a3_structures_f_dominants_church", + "a3_structures_f_dominants_hospital", + "a3_structures_f_dominants_lighthouse", + "a3_structures_f_dominants_wip", + "a3_structures_f_epa_civ_camping", + "a3_structures_f_epa_civ_constructions", + "a3_structures_f_epa_items_electronics", + "a3_structures_f_epa_items_food", + "a3_structures_f_epa_items_medical", + "a3_structures_f_epa_items_tools", + "a3_structures_f_epa_items_vessels", + "a3_structures_f_epa_mil_scrapyard", + "a3_structures_f_epa_walls", + "a3_structures_f_epb_civ_accessories", + "a3_structures_f_epb_civ_camping", + "a3_structures_f_epb_civ_dead", + "a3_structures_f_epb_civ_garbage", + "a3_structures_f_epb_civ_graffiti", + "a3_structures_f_epb_civ_playground", + "a3_structures_f_epb_furniture", + "a3_structures_f_epb_items_documents", + "a3_structures_f_epb_items_luggage", + "a3_structures_f_epb_items_military", + "a3_structures_f_epb_items_vessels", + "a3_structures_f_epb_naval_fishing", + "a3_structures_f_epc_civ_accessories", + "a3_structures_f_epc_civ_camping", + "a3_structures_f_epc_civ_garbage", + "a3_structures_f_epc_civ_infoboards", + "a3_structures_f_epc_civ_kiosks", + "a3_structures_f_epc_civ_playground", + "a3_structures_f_epc_civ_tourism", + "a3_structures_f_epc_dominants_ghosthotel", + "a3_structures_f_epc_dominants_stadium", + "a3_structures_f_epc_furniture", + "a3_structures_f_epc_items_documents", + "a3_structures_f_epc_items_electronics", + "a3_structures_f_epc_walls", + "a3_structures_f_exp_a", + "a3_structures_f_exp_a_vr_blocks", + "a3_structures_f_exp_a_vr_helpers", + "a3_structures_f_furniture", + "a3_structures_f_heli_civ_accessories", + "a3_structures_f_heli_civ_constructions", + "a3_structures_f_heli_civ_garbage", + "a3_structures_f_heli_civ_market", + "a3_structures_f_heli_furniture", + "a3_structures_f_heli_ind_airport", + "a3_structures_f_heli_ind_cargo", + "a3_structures_f_heli_ind_machines", + "a3_structures_f_heli_items_airport", + "a3_structures_f_heli_items_electronics", + "a3_structures_f_heli_items_food", + "a3_structures_f_heli_items_luggage", + "a3_structures_f_heli_items_sport", + "a3_structures_f_heli_items_tools", + "a3_structures_f_heli_vr_helpers", + "a3_structures_f_households", + "a3_structures_f_households_addons", + "a3_structures_f_households_house_big01", + "a3_structures_f_households_house_big02", + "a3_structures_f_households_house_shop01", + "a3_structures_f_households_house_shop02", + "a3_structures_f_households_house_small01", + "a3_structures_f_households_house_small02", + "a3_structures_f_households_house_small03", + "a3_structures_f_households_slum", + "a3_structures_f_households_stone_big", + "a3_structures_f_households_stone_shed", + "a3_structures_f_households_stone_small", + "a3_structures_f_households_wip", + "a3_structures_f_ind", + "a3_structures_f_ind_airport", + "a3_structures_f_ind_cargo", + "a3_structures_f_ind_carservice", + "a3_structures_f_ind_concretemixingplant", + "a3_structures_f_ind_crane", + "a3_structures_f_ind_dieselpowerplant", + "a3_structures_f_ind_factory", + "a3_structures_f_ind_fuelstation", + "a3_structures_f_ind_fuelstation_small", + "a3_structures_f_ind_pipes", + "a3_structures_f_ind_powerlines", + "a3_structures_f_ind_reservoirtank", + "a3_structures_f_ind_shed", + "a3_structures_f_ind_solarpowerplant", + "a3_structures_f_ind_tank", + "a3_structures_f_ind_transmitter_tower", + "a3_structures_f_ind_wavepowerplant", + "a3_structures_f_ind_windmill", + "a3_structures_f_ind_windpowerplant", + "a3_structures_f_items", + "a3_structures_f_items_cans", + "a3_structures_f_items_documents", + "a3_structures_f_items_electronics", + "a3_structures_f_items_gadgets", + "a3_structures_f_items_luggage", + "a3_structures_f_items_medical", + "a3_structures_f_items_military", + "a3_structures_f_items_stationery", + "a3_structures_f_items_tools", + "a3_structures_f_items_valuables", + "a3_structures_f_items_vessels", + "a3_structures_f_kart_civ_sportsgrounds", + "a3_structures_f_kart_mil_flags", + "a3_structures_f_kart_signs_companies", + "a3_structures_f_mark_items_military", + "a3_structures_f_mark_items_sport", + "a3_structures_f_mark_mil_flags", + "a3_structures_f_mark_training", + "a3_structures_f_mark_vr_helpers", + "a3_structures_f_mark_vr_shapes", + "a3_structures_f_mark_vr_targets", + "a3_structures_f_mil", + "a3_structures_f_mil_bagbunker", + "a3_structures_f_mil_bagfence", + "a3_structures_f_mil_barracks", + "a3_structures_f_mil_bunker", + "a3_structures_f_mil_cargo", + "a3_structures_f_mil_flags", + "a3_structures_f_mil_fortification", + "a3_structures_f_mil_helipads", + "a3_structures_f_mil_offices", + "a3_structures_f_mil_radar", + "a3_structures_f_mil_scrapyard", + "a3_structures_f_mil_shelters", + "a3_structures_f_mil_tenthangar", + "a3_structures_f_naval", + "a3_structures_f_naval_buoys", + "a3_structures_f_naval_fishing", + "a3_structures_f_naval_piers", + "a3_structures_f_naval_rowboats", + "a3_structures_f_research", + "a3_structures_f_signs_companies", + "a3_structures_f_system", + "a3_structures_f_training", + "a3_structures_f_training_invisibletarget", + "a3_structures_f_walls", + "a3_structures_f_wrecks", + "a3_supplies_f_heli", + "a3_supplies_f_heli_bladders", + "a3_supplies_f_heli_cargonets", + "a3_supplies_f_heli_fuel", + "a3_supplies_f_heli_slingload", + "a3_supplies_f_mark", + "a3_uav_f_characters_f_gamma", + "a3_uav_f_weapons_f_gamma_ammoboxes", + "a3_ui_f", + "a3_ui_f_bootcamp", + "a3_ui_f_curator", + "a3_ui_f_exp_a", + "a3_ui_f_heli", + "a3_ui_f_kart", + "a3_ui_f_mark", + "a3_ui_f_mp_mark", + "a3_uifonts_f", + "a3_weapons_f", + "a3_weapons_f_aaf", + "a3_weapons_f_acc", + "a3_weapons_f_ammoboxes", + "a3_weapons_f_beta", + "a3_weapons_f_beta_acc", + "a3_weapons_f_beta_ammoboxes", + "a3_weapons_f_beta_ebr", + "a3_weapons_f_beta_rifles_khaybar", + "a3_weapons_f_beta_rifles_mx", + "a3_weapons_f_beta_rifles_trg20", + "a3_weapons_f_bootcamp", + "a3_weapons_f_bootcamp_ammoboxes", + "a3_weapons_f_bootcamp_longrangerifles_gm6", + "a3_weapons_f_bootcamp_longrangerifles_m320", + "a3_weapons_f_csat", + "a3_weapons_f_dummyweapons", + "a3_weapons_f_ebr", + "a3_weapons_f_epa", + "a3_weapons_f_epa_acc", + "a3_weapons_f_epa_ammoboxes", + "a3_weapons_f_epa_ebr", + "a3_weapons_f_epa_longrangerifles_dmr_01", + "a3_weapons_f_epa_longrangerifles_gm6", + "a3_weapons_f_epa_rifles_mx", + "a3_weapons_f_epb", + "a3_weapons_f_epb_acc", + "a3_weapons_f_epb_ammoboxes", + "a3_weapons_f_epb_longrangerifles_gm3", + "a3_weapons_f_epb_longrangerifles_m320", + "a3_weapons_f_epb_rifles_mx_black", + "a3_weapons_f_epc", + "a3_weapons_f_explosives", + "a3_weapons_f_fia", + "a3_weapons_f_gamma", + "a3_weapons_f_gamma_acc", + "a3_weapons_f_gamma_ammoboxes", + "a3_weapons_f_gamma_items", + "a3_weapons_f_headgear", + "a3_weapons_f_itemholders", + "a3_weapons_f_items", + "a3_weapons_f_kart", + "a3_weapons_f_kart_pistols_pistol_signal_f", + "a3_weapons_f_launchers_law", + "a3_weapons_f_launchers_nlaw", + "a3_weapons_f_launchers_titan", + "a3_weapons_f_longrangerifles_gm6", + "a3_weapons_f_longrangerifles_m320", + "a3_weapons_f_machineguns_m200", + "a3_weapons_f_machineguns_zafir", + "a3_weapons_f_mark", + "a3_weapons_f_mark_acc", + "a3_weapons_f_mark_ebr", + "a3_weapons_f_mark_longrangerifles_dmr_01", + "a3_weapons_f_mark_longrangerifles_dmr_02", + "a3_weapons_f_mark_longrangerifles_dmr_03", + "a3_weapons_f_mark_longrangerifles_dmr_04", + "a3_weapons_f_mark_longrangerifles_dmr_05", + "a3_weapons_f_mark_longrangerifles_dmr_06", + "a3_weapons_f_mark_longrangerifles_gm6", + "a3_weapons_f_mark_longrangerifles_gm6_camo", + "a3_weapons_f_mark_longrangerifles_m320", + "a3_weapons_f_mark_longrangerifles_m320_camo", + "a3_weapons_f_mark_machineguns_m200", + "a3_weapons_f_mark_machineguns_mmg_01", + "a3_weapons_f_mark_machineguns_mmg_02", + "a3_weapons_f_mark_machineguns_zafir", + "a3_weapons_f_mark_rifles_khaybar", + "a3_weapons_f_mark_rifles_mk20", + "a3_weapons_f_mark_rifles_mx", + "a3_weapons_f_mark_rifles_sdar", + "a3_weapons_f_mark_rifles_trg20", + "a3_weapons_f_nato", + "a3_weapons_f_pistols_acpc2", + "a3_weapons_f_pistols_p07", + "a3_weapons_f_pistols_pdw2000", + "a3_weapons_f_pistols_pistol_heavy_01", + "a3_weapons_f_pistols_pistol_heavy_02", + "a3_weapons_f_pistols_rook40", + "a3_weapons_f_rifles_khaybar", + "a3_weapons_f_rifles_mk20", + "a3_weapons_f_rifles_mx", + "a3_weapons_f_rifles_sdar", + "a3_weapons_f_rifles_smg_02", + "a3_weapons_f_rifles_trg20", + "a3_weapons_f_rifles_vector", + "a3_weapons_f_uniforms", + "a3_weapons_f_vests", + "a3data", + "map_vr", + // CBA + "extended_eventhandlers", + "cba_ui", + "cba_xeh", + "cba_xeh_a3", + "cba_jr" + }; + author = ECSTRING(common,ACETeam); + url = CSTRING(URL); + VERSION_CONFIG; + }; +}; + +class CfgMods { + class PREFIX { + dir = "@ace"; + name = "Advanced Combat Environment 3"; + picture = "A3\Ui_f\data\Logos\arma3_expansion_alpha_ca"; + hidePicture = "true"; + hideName = "true"; + actionName = "Website"; + action = CSTRING(URL); + description = "Issue Tracker: https://github.com/acemod/ACE3/issues"; + }; +}; + +#include "CfgSettings.hpp" +#include "CfgModuleCategories.hpp" +#include "CfgVehicleClasses.hpp" diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index a64c8e014d..503cee0619 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -12,8 +12,6 @@ #define QFUNC(var1) QUOTE(DFUNC(var1)) #define QEFUNC(var1,var2) QUOTE(DEFUNC(var1,var2)) -#define PATHTOEF(var1,var2) PATHTOF_SYS(PREFIX,var1,var2) - #define GETVAR_SYS(var1,var2) getVariable [ARR_2(QUOTE(var1),var2)] #define SETVAR_SYS(var1,var2) setVariable [ARR_2(QUOTE(var1),var2)] #define SETPVAR_SYS(var1,var2) setVariable [ARR_3(QUOTE(var1),var2,true)] @@ -82,12 +80,12 @@ #define TYPE_BACKPACK 901 #ifdef DISABLE_COMPILE_CACHE - #define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf)) + #define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,fncName).sqf) #else - #define PREP(fncName) [QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf)), QFUNC(fncName)] call CBA_fnc_compileFunction + #define PREP(fncName) [QPATHTOF(functions\DOUBLES(fnc,fncName).sqf), QFUNC(fncName)] call CBA_fnc_compileFunction #endif -#define PREP_MODULE(folder) [] call compile preprocessFileLineNumbers QUOTE(PATHTOF(folder\__PREP__.sqf)) +#define PREP_MODULE(folder) [] call compile preprocessFileLineNumbers QPATHTOF(folder\__PREP__.sqf) #define HASH_CREATE ([] call EFUNC(common,hashCreate)) #define HASH_SET(hash, key, val) ([hash, key, val, __FILE__, __LINE__] call EFUNC(common,hashSet)) @@ -101,9 +99,6 @@ #define HASHLIST_SET(hashList, index, value) ([hashList, index, value, __FILE__, __LINE__] call EFUNC(common,hashListSet)) #define HASHLIST_PUSH(hashList, value) ([hashList, value, __FILE__, __LINE__] call EFUNC(common,hashListPush)) -// Time functions for accuracy per frame -#define ACE_tickTime (ACE_time + (diag_tickTime - ACE_diagTime)) - #define ACE_isHC (!hasInterface && !isDedicated) #define IDC_STAMINA_BAR 193 diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 0c3a2816bc..cda38b0458 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -1,15 +1,16 @@ -// COMPONENT should be defined in the script_component.hpp and included BEFORE this hpp - -#define MAINPREFIX z -#define PREFIX ace - -#define MAJOR 3 -#define MINOR 4 -#define PATCHLVL 3 -#define BUILD 0 - -#define VERSION MAJOR.MINOR.PATCHLVL.BUILD -#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD - -// MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 1.56 +// COMPONENT should be defined in the script_component.hpp and included BEFORE this hpp + +#define MAINPREFIX z +#define PREFIX ace + +#define MAJOR 3 +#define MINOR 5 +#define PATCHLVL 1 +#define BUILD 0 + +#define VERSION MAJOR.MINOR.PATCHLVL.BUILD +#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD + +// MINIMAL required version for the Mod. Components can specify others.. +#define REQUIRED_VERSION 1.56 +#define REQUIRED_CBA_VERSION {2,4,0} diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index b1baef93a9..4648225f9f 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,6 +10,18 @@ ACE Logistika ACE Logística Logistica ACE + ACE Logistique + + + http://ace3mod.com/ + http://ace3mod.com/ + http://ace3mod.com/ + http://ace3mod.com/ + http://ace3mod.com/ + http://ace3mod.com/ + http://ace3mod.com/ + http://ace3mod.com/ + http://ace3mod.com/ - \ No newline at end of file + diff --git a/addons/map/ACE_Settings.hpp b/addons/map/ACE_Settings.hpp index 6ff2e1e867..b04c7b39b3 100644 --- a/addons/map/ACE_Settings.hpp +++ b/addons/map/ACE_Settings.hpp @@ -62,7 +62,7 @@ class ACE_Settings { displayName = CSTRING(MapShowCursorCoordinates_DisplayName); description = CSTRING(MapShowCursorCoordinates_Description); }; - class GVAR(DefaultChannel) { + class GVAR(defaultChannel) { category = CSTRING(Module_DisplayName); value = -1; typeName = "SCALAR"; diff --git a/addons/map/CfgAmmo.hpp b/addons/map/CfgAmmo.hpp index 9e98d0efea..82ff6841cb 100644 --- a/addons/map/CfgAmmo.hpp +++ b/addons/map/CfgAmmo.hpp @@ -1,48 +1,54 @@ class CfgAmmo { - - class FlareCore; - class FlareBase: FlareCore {}; - class F_20mm_White: FlareBase {}; + class Chemlight_base; - class ACE_FlashlightProxy_White: F_20mm_White { + class ACE_FlashlightProxy_White: Chemlight_base { model = "\A3\Weapons_f\empty"; - effectFlare = "FlareShell"; + effectsSmoke = "ACE_FlashlightEffect_White"; + explosionTime = 0.01; + timeToLive = 1e10; - triggerTime = 0; - intensity = 0.5; - flareSize = 1; - timeToLive = 10e10; - - lightColor[] = {1,1,1,1}; - - grenadeBurningSound[] = {}; - grenadeFireSound[] = {}; - soundTrigger[] = {}; - SmokeShellSoundHit1[] = {}; - SmokeShellSoundHit2[] = {}; - SmokeShellSoundHit3[] = {}; - SmokeShellSoundLoop1[] = {}; - SmokeShellSoundLoop2[] = {}; + soundImpactHard1[] = {"",1,1}; + soundImpactHard2[] = {"",1,1}; + soundImpactHard3[] = {"",1,1}; + soundImpactHard4[] = {"",1,1}; + soundImpactHard5[] = {"",1,1}; + soundImpactHard6[] = {"",1,1}; + soundImpactHard7[] = {"",1,1}; + soundImpactIron1[] = {"",1,1}; + soundImpactIron2[] = {"",1,1}; + soundImpactIron3[] = {"",1,1}; + soundImpactIron4[] = {"",1,1}; + soundImpactIron5[] = {"",1,1}; + soundImpactSoft1[] = {"",1,1}; + soundImpactSoft2[] = {"",1,1}; + soundImpactSoft3[] = {"",1,1}; + soundImpactSoft4[] = {"",1,1}; + soundImpactSoft5[] = {"",1,1}; + soundImpactSoft6[] = {"",1,1}; + soundImpactSoft7[] = {"",1,1}; + soundImpactWater1[] = {"",1,1}; + soundImpactWater2[] = {"",1,1}; + soundImpactWater3[] = {"",1,1}; + soundImpactWoodExt1[] = {"",1,1}; + soundImpactWoodExt2[] = {"",1,1}; + soundImpactWoodExt3[] = {"",1,1}; + soundImpactWoodExt4[] = {"",1,1}; }; class ACE_FlashlightProxy_Red: ACE_FlashlightProxy_White { - intensity = 1; - lightColor[] = {1,0,0,1}; - }; - - class ACE_FlashlightProxy_Green: ACE_FlashlightProxy_White { - intensity = 1; - lightColor[] = {0,1,0,1}; + effectsSmoke = "ACE_FlashlightEffect_Red"; }; class ACE_FlashlightProxy_Blue: ACE_FlashlightProxy_White { - intensity = 1.5; - lightColor[] = {0.25,0.25,1,1}; + effectsSmoke = "ACE_FlashlightEffect_Blue"; + }; + + class ACE_FlashlightProxy_Green: ACE_FlashlightProxy_White { + effectsSmoke = "ACE_FlashlightEffect_Green"; }; class ACE_FlashlightProxy_Yellow: ACE_FlashlightProxy_White { - intensity = 1; - lightColor[] = {1,1,0.5,1}; + effectsSmoke = "ACE_FlashlightEffect_Yellow"; }; }; \ No newline at end of file diff --git a/addons/map/CfgLights.hpp b/addons/map/CfgLights.hpp new file mode 100644 index 0000000000..bd69f9acbf --- /dev/null +++ b/addons/map/CfgLights.hpp @@ -0,0 +1,35 @@ +class CfgLights { + + class Chemlight_Blue; + + class ACE_FlashlightLight_White: Chemlight_Blue { + brightness = 100; + color[] = {1,1,1,1}; + diffuse[] = {1,1,1}; + intensity = 100; + position[] = {0,0,0}; + + class Attenuation { + constant = 0; + linear = 0; + quadratic = 10000; + start = 0.075; + }; + }; + + class ACE_FlashlightLight_Red: ACE_FlashlightLight_White { + diffuse[] = {1,0,0}; + }; + + class ACE_FlashlightLight_Blue: ACE_FlashlightLight_White { + diffuse[] = {0.25,0.25,1}; + }; + + class ACE_FlashlightLight_Green: ACE_FlashlightLight_White { + diffuse[] = {0,1,0}; + }; + + class ACE_FlashlightLight_Yellow: ACE_FlashlightLight_White { + diffuse[] = {1,1,0.4}; + }; +}; \ No newline at end of file diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index df52756eee..16eba79cb2 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -24,7 +24,7 @@ class CfgVehicles { scope = 2; isGlobal = 1; isSingular = 1; - icon = PATHTOF(UI\Icon_Module_Map_ca.paa); + icon = QPATHTOF(UI\Icon_Module_Map_ca.paa); class Arguments { class MapIllumination { displayName = CSTRING(MapIllumination_DisplayName); @@ -84,7 +84,7 @@ class CfgVehicles { scope = 2; isGlobal = 0; isSingular = 1; - icon = PATHTOF(UI\Icon_Module_BFTracking_ca.paa); + icon = QPATHTOF(UI\Icon_Module_BFTracking_ca.paa); class Arguments { class Enabled { displayName = CSTRING(BFT_Enabled_DisplayName); diff --git a/addons/map/Effects.hpp b/addons/map/Effects.hpp new file mode 100644 index 0000000000..1dc9b4c993 --- /dev/null +++ b/addons/map/Effects.hpp @@ -0,0 +1,36 @@ +// "Smoke" effect classes for global flashlight glow + +class ACE_FlashlightEffect_White { + class Light1 { + simulation = "light"; + type = "ACE_FlashlightLight_White"; + }; +}; + +class ACE_FlashlightEffect_Red { + class Light1 { + simulation = "light"; + type = "ACE_FlashlightLight_Red"; + }; +}; + +class ACE_FlashlightEffect_Blue { + class Light1 { + simulation = "light"; + type = "ACE_FlashlightLight_Blue"; + }; +}; + +class ACE_FlashlightEffect_Green { + class Light1 { + simulation = "light"; + type = "ACE_FlashlightLight_Green"; + }; +}; + +class ACE_FlashlightEffect_Yellow { + class Light1 { + simulation = "light"; + type = "ACE_FlashlightLight_Yellow"; + }; +}; \ No newline at end of file diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index 00e9e737cf..7ee567cabf 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -9,10 +9,11 @@ if (isServer) then { { if (_x isKindOf "ACE_FlashlightProxy_White") then { // ACE_LOGINFO_2("Deleting leftover light [%1:%2] from DC player [%3]", _x, typeOf _x, _disconnectedPlayer); + detach _x; deleteVehicle _x; }; } forEach attachedObjects _disconnectedPlayer; - + nil }]; }; @@ -29,7 +30,7 @@ call FUNC(determineZoom); if (isNull findDisplay 12) exitWith {}; GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5]; - GVAR(lastStillTime) = ACE_time; + GVAR(lastStillTime) = CBA_missionTime; GVAR(isShaking) = false; //map sizes are multiples of 1280 diff --git a/addons/map/config.cpp b/addons/map/config.cpp index 6d6b4030ec..78bf2340b7 100644 --- a/addons/map/config.cpp +++ b/addons/map/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"KoffeinFlummi","Rocko","esteldunedain"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi","Rocko","esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; @@ -29,6 +30,8 @@ class RscEdit; #include "CfgVehicles.hpp" #include "CfgAmmo.hpp" #include "CfgSounds.hpp" +#include "CfgLights.hpp" +#include "Effects.hpp" class RscMapControl { maxSatelliteAlpha = 0.5; @@ -160,4 +163,4 @@ class RscDisplayServerGetReady: RscDisplayGetReady { #include "MapControls.hpp" }; }; -}; +}; \ No newline at end of file diff --git a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf index 34d41bb49c..cecf228924 100644 --- a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf +++ b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf @@ -33,7 +33,7 @@ if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then { private _markerType = [_x] call EFUNC(common,getMarkerType); private _colour = format ["Color%1", side _x]; - private _marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]]; + private _marker = createMarkerLocal [format ["ACE_BFT_%1", _forEachIndex], [(getPos _x) select 0, (getPos _x) select 1]]; _marker setMarkerTypeLocal _markerType; _marker setMarkerColorLocal _colour; _marker setMarkerTextLocal (name _x); diff --git a/addons/map/functions/fnc_compileFlashlightMenu.sqf b/addons/map/functions/fnc_compileFlashlightMenu.sqf index bc6746f46e..836b483a20 100644 --- a/addons/map/functions/fnc_compileFlashlightMenu.sqf +++ b/addons/map/functions/fnc_compileFlashlightMenu.sqf @@ -30,7 +30,7 @@ _flashlights = [_player] call FUNC(getUnitFlashlights); _cfg = (configFile >> "CfgWeapons" >> _x); _displayName = getText (_cfg >> "displayName"); _icon = getText (_cfg >> "picture"); - + _statement = if (GVAR(flashlightInUse) == _x) then { _displayName = format [localize LSTRING(turnLightOff), _displayName]; {[""] call FUNC(switchFlashlight)} diff --git a/addons/map/functions/fnc_flashlightGlow.sqf b/addons/map/functions/fnc_flashlightGlow.sqf index 011489f321..799b99e3d2 100644 --- a/addons/map/functions/fnc_flashlightGlow.sqf +++ b/addons/map/functions/fnc_flashlightGlow.sqf @@ -20,7 +20,10 @@ private ["_light", "_color", "_class"]; params ["_flashlight"]; _light = GVAR(glow); -if (!isNull _light) then {deleteVehicle _light}; +if (!isNull _light) then { + detach _light; + deleteVehicle _light; +}; if (_flashlight != "") then { _color = getText (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour"); @@ -28,9 +31,9 @@ if (_flashlight != "") then { _class = format["ACE_FlashlightProxy_%1", _color]; _light = _class createVehicle [0,0,0]; - _light attachTo [ACE_player, [0,0.5,-0.1], "head"]; + _light attachTo [ACE_player, [0,0.1,-0.05], "neck"]; } else { _light = objNull; }; -GVAR(glow) = _light; +GVAR(glow) = _light; \ No newline at end of file diff --git a/addons/map/functions/fnc_updateMapEffects.sqf b/addons/map/functions/fnc_updateMapEffects.sqf index 0e36a6fdd6..b89a75aa32 100644 --- a/addons/map/functions/fnc_updateMapEffects.sqf +++ b/addons/map/functions/fnc_updateMapEffects.sqf @@ -44,8 +44,8 @@ if (GVAR(mapShake)) then { _amplitude = (_speed - 0.1) / 5 * (1000 * _mapScale); _time = 0.1; - _shakePos = [(GVAR(lastStillPosition) select 0) + sin((ACE_time + _time - GVAR(lastStillTime))*100) * _amplitude * 0.25, - (GVAR(lastStillPosition) select 1) + sin((ACE_time + _time - GVAR(lastStillTime))*260) * _amplitude]; + _shakePos = [(GVAR(lastStillPosition) select 0) + sin((CBA_missionTime + _time - GVAR(lastStillTime))*100) * _amplitude * 0.25, + (GVAR(lastStillPosition) select 1) + sin((CBA_missionTime + _time - GVAR(lastStillTime))*260) * _amplitude]; _mapCtrl ctrlMapAnimAdd [_time, _mapScale, _shakePos]; ctrlMapAnimCommit _mapCtrl; @@ -62,7 +62,7 @@ if (GVAR(mapShake)) then { } else { // The map is still, store state GVAR(lastStillPosition) = _mapCentre; - GVAR(lastStillTime) = ACE_time; + GVAR(lastStillTime) = CBA_missionTime; }; }; }; diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index 2fb0283cd3..73bf0cc774 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -45,6 +45,7 @@ Resplandor de linterna en el mapa? Nasvícení mapy pomocí baterky? Luce della torcia in mappa? + Lumière de la lampe de carte Add external glow to players who use flashlight on map? @@ -360,6 +361,7 @@ Zvolit kanál po startu Imposta Canale all'Avvio Setear canal al comenzar + Définir le canal de départ Change the starting marker channel at mission start @@ -370,6 +372,7 @@ Nastavit kanál po startu mise Cambia il canale marker iniziale all'avvio di missione Cambiar el canal de marcadores inicial al comenzar la misión + Changer le marqueur du canal de départ au départ de la mission \ No newline at end of file diff --git a/addons/map_gestures/ACE_Settings.hpp b/addons/map_gestures/ACE_Settings.hpp index 0038027e3b..3730c08c58 100644 --- a/addons/map_gestures/ACE_Settings.hpp +++ b/addons/map_gestures/ACE_Settings.hpp @@ -44,16 +44,16 @@ class ACE_Settings { typeName = "COLOR"; value[] = {1, 0.88, 0, 0.7}; }; - class GVAR(GroupColorConfigurations) { - displayName = CSTRING(GroupColorConfigurations_displayName); - description = CSTRING(GroupColorConfigurations_description); + class GVAR(groupColorConfigurations) { + displayName = CSTRING(groupColorConfigurations_displayName); + description = CSTRING(groupColorConfigurations_description); category = CSTRING(mapGestures_category); typeName = "ARRAY"; value[] = {}; }; - class GVAR(GroupColorConfigurationMapping) { - displayName = CSTRING(GroupColorConfigurationMapping_displayName); - description = CSTRING(GroupColorConfigurationMapping_description); + class GVAR(groupColorConfigurationMapping) { + displayName = CSTRING(groupColorConfigurationMapping_displayName); + description = CSTRING(groupColorConfigurationMapping_description); category = CSTRING(mapGestures_category); typeName = "ARRAY"; value[] = {{}, {}}; diff --git a/addons/map_gestures/CfgVehicles.hpp b/addons/map_gestures/CfgVehicles.hpp index d4c88883e6..5593d66181 100644 --- a/addons/map_gestures/CfgVehicles.hpp +++ b/addons/map_gestures/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { isGlobal = 0; isSingular = 1; author = ECSTRING(common,ACETeam); - icon = PATHTOF(ui\icon_module_map_gestures_ca.paa); + icon = QPATHTOF(ui\icon_module_map_gestures_ca.paa); class Arguments { class enabled { displayName = CSTRING(enabled_DisplayName); @@ -49,7 +49,7 @@ class CfgVehicles { function = QFUNC(moduleGroupSettings); isGlobal = 0; author = ECSTRING(common,ACETeam); - icon = PATHTOF(ui\icon_module_map_gestures_ca.paa); + icon = QPATHTOF(ui\icon_module_map_gestures_ca.paa); class Arguments { class leadColor { displayName = CSTRING(leadColor_displayName); diff --git a/addons/map_gestures/config.cpp b/addons/map_gestures/config.cpp index 72e7f82078..52f333c717 100644 --- a/addons/map_gestures/config.cpp +++ b/addons/map_gestures/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Dslyecxi", "MikeMatrix"}; - authorUrl = "https://github.com/MikeMatrix"; + author = ECSTRING(common,ACETeam); + authors[] = {"Dslyecxi", "MikeMatrix"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index 141a95bc50..e89d6c07a3 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -10,6 +10,7 @@ Gesti Mappa Kartenzeichen Gestos en mapa + Gestes de carte Enabled @@ -20,6 +21,7 @@ Abilita Aktiviert Activado + Activer Map Gesture Max Range @@ -30,6 +32,7 @@ Distanza Massima Gesti Mappa Maximale Reichweite der Kartenzeichen Máx. dist. para gestos en mapa + Distance max. des gestes de carte Max range between players to show the map gesture indicator [default: 7 meters] @@ -40,6 +43,7 @@ Distanza massima tra giocatori per mostrare i gesti in mappa [default: 7 metri] Maximale Reichweite zwischen Spielern um Kartenzeichen anzuzeigen (Standard: 7 Meter) Máxima distancia a la cual pueden verse el indicador de gestos [defecto: 7 m] + Distance max. entre les joueurs pour montrer le pointage sur carte. (Défaut : 7m) Lead Default Color @@ -50,6 +54,7 @@ Colore Default Caposquadra Gruppenführer-Standardfarbe Color por defecto para el lider + Couleur principale de commandement. Fallback Color value for group leaders when there is no group setting. [Module: leave blank to not force on clients] @@ -59,6 +64,7 @@ Colore di riserva dei capisquadra quando non c'è nessuna impostazione gruppo. [Modulo: lascia vuoto per non forzare su clients] Ersatz-Farbwert für Gruppenführer wenn keine Gruppeneinstellung vorhanden ist. [Modul: leer lassen um Anwendung bei Clients nicht zu erzwingen] Color por defecto para líderes cuando no está configurado [Módulo: dejar en blanco para no forzar] + Couleur par défaut pour les chefs de groupe quand il n'y a pas de réglage pour le groupe. (Module : laisser vide pour ne pas forcer chez les clients) Default Color @@ -69,6 +75,7 @@ Colore Default Standardfarbe Color por defecto + Couleur par défaut Fallback Color value when there is no group setting. [Module: leave blank to not force on clients] @@ -78,6 +85,7 @@ Colore di riserva quando non ci sono impostazioni gruppo. [Modulo: lascia vuto per non forzare sui clients] Ersatz-Farbwert wenn keine Gruppeneinstellung vorhanden ist. [Modul: leer lassen um Anwendung bei Clients nicht zu erzwingen] Color por defecto cuando no está configurado [Módulo: dejar en blanco para no forzar] + Couleur par défaut quand il n'y a pas de réglage pour le groupe. (Module : laisser vide pour ne pas forcer chez les clients) Lead Color @@ -88,6 +96,7 @@ Colore Caposquadra Gruppenführer-Farbe Color para el líder + Couleur de commandement Color value for group leaders of groups synced with this module. @@ -97,6 +106,7 @@ Colore dei Caposquadra per gruppi sincronizzati con questo modulo. Farbwert für Gruppenführer, die mit diesem Modul synchronisiert werden. Color para los líderes de los grupos sincronizados al módulo. + Couleur pour les chefs de groupe des groupes synchronisés avec le module. Color @@ -107,6 +117,7 @@ Colore Farbe Color + Couleur Color value for group members of groups synced with this module. @@ -116,6 +127,7 @@ Colore per membri di gruppi sincronizzati con questo modulo. Farbwert für Gruppenmitglieder, die mit diesem Modul synchronisiert werden. Color para los miembros de los grupos sincronizados al módulo. + Couleur pour les membres du groupe synchronisé avec ce module. Map Gestures - Group Settings @@ -126,6 +138,7 @@ Gesti Mappa - Impostazioni Gruppi Kartenzeichen - Gruppeneinstellungen Gestos en mapas - Configuración de grupos + Gestes de carte - réglages de groupe Update Interval @@ -136,6 +149,7 @@ Intervallo Aggiornamento Update-Intervall Período de actualización + Intervalle de mise à jour Time between data updates. @@ -146,6 +160,7 @@ Intervallo tra aggiornamenti dati. Zeit zwischen Datenupdates. Tiempo entre actualizaciones sucesivas. + Temps entre les actualisations de données Group color configurations @@ -156,6 +171,7 @@ Configurazioni colori dei gruppi Konfiguration der Gruppenfarbe Configuración de color de grupo + Configuration des couleurs de groupe Group color configuration containing arrays of color pairs ([leadColor, color]). @@ -165,6 +181,7 @@ Configurazioni colori gruppi contenenti array di coppie di colori ([leadColor, color]). Konfiguration der Gruppenfarbe mit zugeordneten Farbpaaren der Aufstellung ([leadColor, color]). Configuración de color de grupo conteniendo una lista de pares de colores ([colorLider, colo]). + Configuration des couleurs de groupe contenant des tableaux de paires de couleurs ([couleurDeCommandement, couleur]). Hash of Group ID mapped to the Group color configuration index. @@ -174,6 +191,7 @@ Hash degli ID Gruppi mappati nell'indice configurazioni colori gruppi. Hashwert der Gruppen-ID, die dem Konfigurations-Index der Gruppenfarbe zugeordnet werden. ID de Grupo mapeado al índice de la configuración de color de grupo. + Hash de l'identifiant du groupe mappé à l'index de la configuration de la couleur du groupe. GroupID Color configuration mapping @@ -183,6 +201,7 @@ Mappatura configurazioni colori GroupID Gruppen-ID-Farbe Konfigurationszuordnung Mapeado de ID de Grupo + Configuration du mappage de l'identifiant de la couleur du groupe. Enables the Map Gestures. @@ -193,6 +212,7 @@ Abilita i Gesti Mappa Aktiviert die Kartenzeichen. Activar Gestos en Mapa + Activer les gestes de carte Name Text Color @@ -203,6 +223,7 @@ Colore Testo Nome Farbe der Namenstexte. Color de los nombres + Couleur du texte du nom Color of the name tag text besides the map gestures mark. @@ -212,6 +233,7 @@ Colore del testo dei nametag oltre a quello dei Gesti Mappa Farbe der Namenstexte neben der Kartenzeichen-Markierung. Color de los nombres dibujados al lado del marcados de gestos. + Couleur des tags de nom à côté de marqueur de pointage sur carte. Map Gestures @@ -222,6 +244,7 @@ Gesti Mappa Kartenzeichen Gestos en mapa + Gestes de carte diff --git a/addons/maptools/ACE_Settings.hpp b/addons/maptools/ACE_Settings.hpp index 9c53a84a7c..0a88948a7f 100644 --- a/addons/maptools/ACE_Settings.hpp +++ b/addons/maptools/ACE_Settings.hpp @@ -1,5 +1,5 @@ class ACE_Settings { - class GVAR(EveryoneCanDrawOnBriefing) { + class GVAR(everyoneCanDrawOnBriefing) { value = 1; typeName = "BOOL"; }; diff --git a/addons/maptools/CfgWeapons.hpp b/addons/maptools/CfgWeapons.hpp index 5cec99bfb0..dc7a7046dd 100644 --- a/addons/maptools/CfgWeapons.hpp +++ b/addons/maptools/CfgWeapons.hpp @@ -5,8 +5,8 @@ class CfgWeapons { class ACE_MapTools: ACE_ItemCore { displayName = CSTRING(Name); descriptionShort = CSTRING(Description); - model = QUOTE(PATHTOF(data\ace_MapTools.p3d)); - picture = PATHTOF(UI\maptool_item.paa); + model = QPATHTOF(data\ace_MapTools.p3d); + picture = QPATHTOF(UI\maptool_item.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 1; diff --git a/addons/maptools/MapGpsUI.hpp b/addons/maptools/MapGpsUI.hpp index 170f0d1620..c5b230f163 100644 --- a/addons/maptools/MapGpsUI.hpp +++ b/addons/maptools/MapGpsUI.hpp @@ -26,7 +26,7 @@ class RscTitles { y = Y_gps; w = W_gps; h = H_gps; - text = PATHTOF(UI\mapGps.paa); + text = QPATHTOF(UI\mapGps.paa); colorBackground[] = {1, 1, 1, 1}; }; class heading: RscText{ diff --git a/addons/maptools/config.cpp b/addons/maptools/config.cpp index 1e82cd2269..6fedff6302 100644 --- a/addons/maptools/config.cpp +++ b/addons/maptools/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_MapTools"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"esteldunedain"}; - authorUrl = "https://github.com/esteldunedain/"; + author = ECSTRING(common,ACETeam); + authors[] = {"esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/maptools/functions/fnc_calculateMapScale.sqf b/addons/maptools/functions/fnc_calculateMapScale.sqf index 78bfae43af..018edf68d9 100644 --- a/addons/maptools/functions/fnc_calculateMapScale.sqf +++ b/addons/maptools/functions/fnc_calculateMapScale.sqf @@ -14,7 +14,7 @@ private ["_screenOffset", "_pos"]; -_pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5]; +_pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5]; _screenOffset = ((findDisplay 12) displayCtrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)]; (_screenOffset select 0) - 0.5 diff --git a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf index 092f0720c2..4a77f4a6c3 100644 --- a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf +++ b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf @@ -6,15 +6,15 @@ private ["_mapGpsDisplay", "_ctrl"]; if ((!("ItemGPS" in assigneditems ACE_player)) || {isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull])}) exitWith { - ("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; //close GPS RSC - [(_this select 1)] call CBA_fnc_removePerFrameHandler; //remove frameHandler + ("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; // Close GPS RSC + [(_this select 1)] call CBA_fnc_removePerFrameHandler; // Remove frameHandler }; disableSerialization; _mapGpsDisplay = uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull]; _ctrl = _mapGpsDisplay displayCtrl 913590; -_ctrl ctrlSetText str(round(getDir ACE_player)); //set Heading +_ctrl ctrlSetText str (round (getDir ACE_player)); // Set Heading _ctrl = _mapGpsDisplay displayCtrl 913591; -_ctrl ctrlSetText str(round((getPosASL ACE_player) select 2)); //set Altitude +_ctrl ctrlSetText str (round ((getPosASL ACE_player) select 2) + EGVAR(common,mapAltitude)); // Set Altitude _ctrl = _mapGpsDisplay displayCtrl 913592; -_ctrl ctrlSetText mapGridPosition ACE_player; //set grid cords +_ctrl ctrlSetText mapGridPosition ACE_player; // Set grid cords diff --git a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf index 5d11c6a6e9..530d213773 100644 --- a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf +++ b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf @@ -35,10 +35,10 @@ if (!("ACE_MapTools" in items ACE_player)|| {GVAR(mapTool_Shown) == 0}) exitWith _rotatingTexture = ""; _textureWidth = 0; if (GVAR(mapTool_Shown) == 1) then { - _rotatingTexture = QUOTE(PATHTOF(data\mapToolRotatingNormal.paa)); + _rotatingTexture = QPATHTOF(data\mapToolRotatingNormal.paa); _textureWidth = TEXTURE_WIDTH_IN_M; } else { - _rotatingTexture = QUOTE(PATHTOF(data\mapToolRotatingSmall.paa)); + _rotatingTexture = QPATHTOF(data\mapToolRotatingSmall.paa); _textureWidth = TEXTURE_WIDTH_IN_M / 2; }; @@ -51,7 +51,7 @@ _scaleY = _scaleX * ((_resWidth / _resHeight) / _aspectRatio); //handle bad aspe _xPos = GVAR(mapTool_pos) select 0; _yPos = (GVAR(mapTool_pos) select 1) + _textureWidth * CENTER_OFFSET_Y_PERC; -_theMap drawIcon [QUOTE(PATHTOF(data\mapToolFixed.paa)), [1,1,1,1], [_xPos,_yPos], _scaleX, _scaleY, 0, "", 0]; +_theMap drawIcon [QPATHTOF(data\mapToolFixed.paa), [1,1,1,1], [_xPos,_yPos], _scaleX, _scaleY, 0, "", 0]; // Position and rotation of the rotating part _xPos = (GVAR(mapTool_pos) select 0) + sin(GVAR(mapTool_angle)) * _textureWidth * CENTER_OFFSET_Y_PERC; diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml index cde1096170..3db0d4d972 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/markers/CfgEventHandlers.hpp b/addons/markers/CfgEventHandlers.hpp index becf395052..e1f9294767 100644 --- a/addons/markers/CfgEventHandlers.hpp +++ b/addons/markers/CfgEventHandlers.hpp @@ -16,3 +16,9 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDiary { + ADDON = QUOTE(_this call FUNC(mapDisplayInitEH)); + }; +}; diff --git a/addons/markers/XEH_PREP.hpp b/addons/markers/XEH_PREP.hpp index 67344454ec..c6ad5c6ba2 100644 --- a/addons/markers/XEH_PREP.hpp +++ b/addons/markers/XEH_PREP.hpp @@ -1,6 +1,7 @@ PREP(getEnabledChannels); PREP(initInsertMarker); +PREP(mapDisplayInitEH); PREP(mapDrawEH); PREP(onLBSelChangedChannel); PREP(onLBSelChangedColor); diff --git a/addons/markers/config.cpp b/addons/markers/config.cpp index 24d3c778d8..658a3ab370 100644 --- a/addons/markers/config.cpp +++ b/addons/markers/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 08c078c4f5..549a89730d 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -22,7 +22,7 @@ disableserialization; params ["_display"]; TRACE_1("params",_display); - + //Can't place markers when can't interact if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith { _display closeDisplay 2; //emulate "Cancel" button @@ -238,4 +238,4 @@ //Update now and add eventHandler: [_aceAngleSlider, _curSelAngle] call FUNC(onSliderPosChangedAngle); _aceAngleSlider ctrlAddEventHandler ["SliderPosChanged", {_this call FUNC(onSliderPosChangedAngle)}]; -}, _this] call EFUNC(common,execNextFrame); +}, _this] call CBA_fnc_execNextFrame; diff --git a/addons/markers/functions/fnc_mapDisplayInitEH.sqf b/addons/markers/functions/fnc_mapDisplayInitEH.sqf new file mode 100644 index 0000000000..662f6f80c0 --- /dev/null +++ b/addons/markers/functions/fnc_mapDisplayInitEH.sqf @@ -0,0 +1,34 @@ +/* + * Author: PabstMirror + * Handles XEH DisplayLoad for the various map displays (RscDiary) + * + * Arguments: + * 0: Map Display (idd 12,37,52,53) + * + * Return Value: + * None + * + * Example: + * [display] call ace_markers_fnc_mapDisplayInitEH + * + * Public: No + */ +#include "script_component.hpp" + +disableSerialization; + +params ["_display"]; +TRACE_1("params",_display); + +private _bisShapeLB = _display displayctrl 1091; +private _curSelShape = missionNamespace getVariable [QGVAR(curSelMarkerShape), 0]; +TRACE_2("shape",_bisShapeLB,_curSelShape); +_bisShapeLB ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedShape)}]; +_bisShapeLB lbSetCurSel _curSelShape; + + +private _bisColorLB = _display displayctrl 1090; +private _curSelColor = missionNamespace getVariable [QGVAR(curSelMarkerColor), 0]; +TRACE_2("color",_bisColorLB,_curSelColor); +_bisColorLB ctrlAddEventHandler ["LBSelChanged", {_this call FUNC(onLBSelChangedColor)}]; +_bisColorLB lbSetCurSel _curSelColor; diff --git a/addons/markers/functions/fnc_onLBSelChangedColor.sqf b/addons/markers/functions/fnc_onLBSelChangedColor.sqf index 215cd72580..dc186a6c61 100644 --- a/addons/markers/functions/fnc_onLBSelChangedColor.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedColor.sqf @@ -26,3 +26,15 @@ GVAR(curSelMarkerColor) = _index; private _config = (configFile >> "CfgMarkerColors") select _data; GVAR(currentMarkerColorConfigName) = configName _config; + +//Set map display to same color: +private _bisColorLB = switch (false) do { + case (isNull findDisplay 12): {(findDisplay 12) displayCtrl 1090}; + case (isNull findDisplay 52): {(findDisplay 52) displayCtrl 1090}; + case (isNull findDisplay 53): {(findDisplay 53) displayCtrl 1090}; + case (isNull findDisplay 37): {(findDisplay 37) displayCtrl 1090}; + default {controlNull}; +}; +if (_ctrl != _bisColorLB) then { //Don't set what we got a EH from + _bisColorLB lbSetCurSel GVAR(curSelMarkerColor); +}; diff --git a/addons/markers/functions/fnc_onLBSelChangedShape.sqf b/addons/markers/functions/fnc_onLBSelChangedShape.sqf index 41f0f30a0d..6fd9aabd89 100644 --- a/addons/markers/functions/fnc_onLBSelChangedShape.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedShape.sqf @@ -26,3 +26,15 @@ GVAR(curSelMarkerShape) = _index; private _config = (configFile >> "CfgMarkers") select _data; GVAR(currentMarkerConfigName) = configName _config; + +//Set map display to same shape: +private _bisShapeLB = switch (false) do { + case (isNull findDisplay 12): {(findDisplay 12) displayCtrl 1091}; + case (isNull findDisplay 52): {(findDisplay 52) displayCtrl 1091}; + case (isNull findDisplay 53): {(findDisplay 53) displayCtrl 1091}; + case (isNull findDisplay 37): {(findDisplay 37) displayCtrl 1091}; + default {controlNull}; +}; +if (_ctrl != _bisShapeLB) then { //Don't set what we got a EH from + _bisShapeLB lbSetCurSel GVAR(curSelMarkerShape); +}; diff --git a/addons/markers/functions/fnc_placeMarker.sqf b/addons/markers/functions/fnc_placeMarker.sqf index 5b0783b454..d3f52413be 100644 --- a/addons/markers/functions/fnc_placeMarker.sqf +++ b/addons/markers/functions/fnc_placeMarker.sqf @@ -32,5 +32,5 @@ if (_closeNum == 1) then { ] ]] call EFUNC(common,globalEvent); - }, []] call EFUNC(common,execNextFrame); + }, []] call CBA_fnc_execNextFrame; }; diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index 9d015b0403..44d64eb1e0 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/medical/ACE_Medical_Actions.hpp b/addons/medical/ACE_Medical_Actions.hpp index 5934203333..900e6cb26c 100644 --- a/addons/medical/ACE_Medical_Actions.hpp +++ b/addons/medical/ACE_Medical_Actions.hpp @@ -6,7 +6,7 @@ class ACE_Head { ACTION_CONDITION modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; class Bandage { displayName = CSTRING(Bandage); @@ -16,7 +16,7 @@ class ACE_Head { EXCEPTIONS showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; // Advanced medical class FieldDressing { @@ -27,28 +27,28 @@ class ACE_Head { EXCEPTIONS showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { displayName = CSTRING(Actions_QuikClot); condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class CheckPulse: fieldDressing { displayName = CSTRING(Actions_CheckPulse); @@ -83,7 +83,7 @@ class ACE_Torso { ACTION_CONDITION modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; class Bandage { displayName = CSTRING(Bandage); @@ -94,7 +94,7 @@ class ACE_Torso { showDisabled = 1; priority = 2; enableInside = 1; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PlaceInBodyBag { displayName = CSTRING(PlaceInBodyBag); @@ -115,7 +115,7 @@ class ACE_Torso { showDisabled = 1; priority = 2; enableInside = 1; - icon = PATHTOF(UI\icons\triageCard.paa); + icon = QPATHTOF(UI\icons\triageCard.paa); }; class Diagnose { displayName = CSTRING(Actions_Diagnose); @@ -138,35 +138,35 @@ class ACE_Torso { showDisabled = 0; priority = 2; enableInside = 1; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { displayName = CSTRING(Actions_QuikClot); condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class SurgicalKit: fieldDressing { displayName = CSTRING(Use_SurgicalKit); condition = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'body', 'SurgicalKit')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\surgicalKit.paa); + icon = QPATHTOF(UI\icons\surgicalKit.paa); }; class PersonalAidKit: fieldDressing { displayName = CSTRING(Use_Aid_Kit); @@ -190,7 +190,7 @@ class ACE_ArmLeft { ACTION_CONDITION modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; class Bandage { @@ -201,7 +201,7 @@ class ACE_ArmLeft { EXCEPTIONS showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; // Advanced medical @@ -213,70 +213,70 @@ class ACE_ArmLeft { EXCEPTIONS showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { displayName = CSTRING(Actions_QuikClot); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class Tourniquet: fieldDressing { displayName = CSTRING(Actions_Tourniquet); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\tourniquet.paa); + icon = QPATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = CSTRING(Inject_Morphine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Adenosine: Morphine { displayName = CSTRING(Inject_Adenosine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Epinephrine: Morphine { displayName = CSTRING(Inject_Epinephrine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class BloodIV: fieldDressing { displayName = CSTRING(Actions_Blood4_1000); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'BloodIV')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\iv.paa); + icon = QPATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { displayName = CSTRING(Actions_Blood4_500); @@ -353,7 +353,7 @@ class ACE_ArmRight { ACTION_CONDITION modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; class Bandage { @@ -364,7 +364,7 @@ class ACE_ArmRight { EXCEPTIONS showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; // Advanced medical @@ -376,14 +376,14 @@ class ACE_ArmRight { EXCEPTIONS showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); @@ -402,14 +402,14 @@ class ACE_ArmRight { condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\tourniquet.paa); + icon = QPATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = CSTRING(Inject_Morphine); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Adenosine: Morphine { @@ -417,7 +417,7 @@ class ACE_ArmRight { condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); @@ -436,7 +436,7 @@ class ACE_ArmRight { condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'BloodIV')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\iv.paa); + icon = QPATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { displayName = CSTRING(Actions_Blood4_500); @@ -514,7 +514,7 @@ class ACE_LegLeft { ACTION_CONDITION modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; class Bandage { @@ -525,7 +525,7 @@ class ACE_LegLeft { EXCEPTIONS showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; @@ -538,14 +538,14 @@ class ACE_LegLeft { EXCEPTIONS showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); @@ -564,28 +564,28 @@ class ACE_LegLeft { condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\tourniquet.paa); + icon = QPATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = CSTRING(Inject_Morphine); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Adenosine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Epinephrine: Morphine { displayName = CSTRING(Inject_Epinephrine); @@ -598,7 +598,7 @@ class ACE_LegLeft { condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'BloodIV')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\iv.paa); + icon = QPATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { displayName = CSTRING(Actions_Blood4_500); @@ -662,7 +662,7 @@ class ACE_LegRight { ACTION_CONDITION modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction)); EXCEPTIONS - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); distance = MEDICAL_ACTION_DISTANCE; class Bandage { @@ -673,7 +673,7 @@ class ACE_LegRight { EXCEPTIONS showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; @@ -686,14 +686,14 @@ class ACE_LegRight { EXCEPTIONS showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); @@ -712,21 +712,21 @@ class ACE_LegRight { condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\tourniquet.paa); + icon = QPATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = CSTRING(Inject_Morphine); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Adenosine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); @@ -745,7 +745,7 @@ class ACE_LegRight { condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(canTreatCached)); statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'BloodIV')] call DFUNC(treatment)); EXCEPTIONS - icon = PATHTOF(UI\icons\iv.paa); + icon = QPATHTOF(UI\icons\iv.paa); }; class BloodIV_500: BloodIV { displayName = CSTRING(Actions_Blood4_500); diff --git a/addons/medical/ACE_Medical_SelfActions.hpp b/addons/medical/ACE_Medical_SelfActions.hpp index 54a8ba60f5..fca025adcb 100644 --- a/addons/medical/ACE_Medical_SelfActions.hpp +++ b/addons/medical/ACE_Medical_SelfActions.hpp @@ -4,11 +4,11 @@ class Medical { exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); condition = "true"; - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); class ACE_Head { displayName = CSTRING(Head); - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,0,_this select 3)] call FUNC(modifyMedicalAction)); @@ -23,7 +23,7 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'head', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; // Advanced medical class FieldDressing { @@ -34,28 +34,28 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'head', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'head', 'PackingBandage')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); condition = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'head', 'ElasticBandage')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { displayName = CSTRING(Actions_QuikClot); condition = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'head', 'QuikClot')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class CheckPulse: fieldDressing { displayName = CSTRING(Actions_CheckPulse); @@ -81,7 +81,7 @@ class Medical { modifierFunction = QUOTE([ARR_4(_target,_player,1,_this select 3)] call FUNC(modifyMedicalAction)); showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); class Bandage { displayName = CSTRING(Bandage); @@ -91,7 +91,7 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'body', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class TriageCard { @@ -102,7 +102,7 @@ class Medical { statement = QUOTE([ARR_2(_target, true)] call DFUNC(displayTriageCard)); showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\triageCard.paa); + icon = QPATHTOF(UI\icons\triageCard.paa); }; // Advanced medical @@ -114,28 +114,28 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'body', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'body', 'PackingBandage')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); condition = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'body', 'ElasticBandage')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { displayName = CSTRING(Actions_QuikClot); condition = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'body', 'QuikClot')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; }; class ACE_ArmLeft { @@ -145,7 +145,7 @@ class Medical { statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,2,_this select 3)] call FUNC(modifyMedicalAction)); condition = "true"; - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); class Bandage { displayName = CSTRING(Bandage); @@ -155,7 +155,7 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; // Advanced medical @@ -167,63 +167,63 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'PackingBandage')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'ElasticBandage')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class QuikClot: fieldDressing { displayName = CSTRING(Actions_QuikClot); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'QuikClot')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class Tourniquet: fieldDressing { displayName = CSTRING(Actions_Tourniquet); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Tourniquet')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\tourniquet.paa); + icon = QPATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = CSTRING(Inject_Morphine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Morphine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Adenosine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Adenosine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Atropine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Epinephrine: Morphine { displayName = CSTRING(Inject_Epinephrine); condition = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_l', 'Epinephrine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class CheckPulse: fieldDressing { displayName = CSTRING(Actions_CheckPulse); @@ -252,7 +252,7 @@ class Medical { statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,3,_this select 3)] call FUNC(modifyMedicalAction)); condition = "true"; - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); class Bandage { displayName = CSTRING(Bandage); @@ -262,7 +262,7 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; // Advanced medical @@ -274,14 +274,14 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'PackingBandage')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); @@ -300,21 +300,21 @@ class Medical { condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Tourniquet')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\tourniquet.paa); + icon = QPATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = CSTRING(Inject_Morphine); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Morphine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Adenosine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'hand_r', 'Adenosine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); @@ -355,7 +355,7 @@ class Medical { statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,4,_this select 3)] call FUNC(modifyMedicalAction)); condition = "true"; - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); class Bandage { displayName = CSTRING(Bandage); @@ -365,7 +365,7 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; @@ -378,14 +378,14 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'PackingBandage')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); @@ -404,28 +404,28 @@ class Medical { condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Tourniquet')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\tourniquet.paa); + icon = QPATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = CSTRING(Inject_Morphine); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Morphine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Adenosine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Adenosine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'leg_l', 'Atropine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Epinephrine: Morphine { displayName = CSTRING(Inject_Epinephrine); @@ -447,7 +447,7 @@ class Medical { statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation)); modifierFunction = QUOTE([ARR_4(_target,_player,5,_this select 3)] call FUNC(modifyMedicalAction)); condition = "true"; - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); class Bandage { displayName = CSTRING(Bandage); @@ -457,7 +457,7 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Bandage')] call DFUNC(treatment)); showDisabled = 1; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; @@ -470,14 +470,14 @@ class Medical { statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'FieldDressing')] call DFUNC(treatment)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\bandage.paa); + icon = QPATHTOF(UI\icons\bandage.paa); }; class PackingBandage: fieldDressing { displayName = CSTRING(Actions_PackingBandage); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'PackingBandage')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\packingBandage.paa); + icon = QPATHTOF(UI\icons\packingBandage.paa); }; class ElasticBandage: fieldDressing { displayName = CSTRING(Actions_ElasticBandage); @@ -496,21 +496,21 @@ class Medical { condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Tourniquet')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\tourniquet.paa); + icon = QPATHTOF(UI\icons\tourniquet.paa); }; class Morphine: fieldDressing { displayName = CSTRING(Inject_Morphine); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Morphine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Adenosine: Morphine { displayName = CSTRING(Inject_Atropine); condition = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(canTreatCached)); exceptions[] = {"isNotInside"}; statement = QUOTE([ARR_4(_player, _target, 'leg_r', 'Adenosine')] call DFUNC(treatment)); - icon = PATHTOF(UI\icons\autoInjector.paa); + icon = QPATHTOF(UI\icons\autoInjector.paa); }; class Atropine: Morphine { displayName = CSTRING(Inject_Atropine); diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index 47d78d23e1..14205fbd30 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -1366,7 +1366,7 @@ class ACE_Medical_Advanced { timeInSystem = 900; maxDose = 4; inCompatableMedication[] = {}; - viscosityChange = 10; + viscosityChange = -10; }; class Epinephrine { painReduce = 0; diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index 30dcedfe5a..a785c2cad5 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -1,12 +1,16 @@ class ACE_Settings { class GVAR(level) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_level_DisplayName); + description = CSTRING(MedicalSettings_level_Description); value = 1; typeName = "SCALAR"; values[] = {"Disabled", "Basic", "Advanced"}; }; class GVAR(medicSetting) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_medicSetting_DisplayName); + description = CSTRING(MedicalSettings_medicSetting_Description); value = 1; typeName = "SCALAR"; values[] = {"Disabled", "Normal", "Advanced"}; @@ -20,6 +24,8 @@ class ACE_Settings { }; class GVAR(enableFor) { category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_enableFor_DisplayName); + description = CSTRING(AdvancedMedicalSettings_enableFor_Description); value = 0; typeName = "SCALAR"; values[] = {"Players only", "Players and AI"}; @@ -31,11 +37,15 @@ class ACE_Settings { }; class GVAR(bleedingCoefficient) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_bleedingCoefficient_DisplayName); + description = CSTRING(MedicalSettings_bleedingCoefficient_Description); typeName = "SCALAR"; value = 1; }; class GVAR(painCoefficient) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_painCoefficient_DisplayName); + description = CSTRING(MedicalSettings_painCoefficient_Description); typeName = "SCALAR"; value = 1; }; @@ -51,58 +61,80 @@ class ACE_Settings { }; class GVAR(enableAdvancedWounds) { category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_DisplayName); + description = CSTRING(AdvancedMedicalSettings_enableAdvancedWounds_Description); typeName = "BOOL"; value = false; }; class GVAR(enableVehicleCrashes) { category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_DisplayName); + description = CSTRING(AdvancedMedicalSettings_enableVehicleCrashes_Description); typeName = "BOOL"; value = 1; }; class GVAR(enableScreams) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_enableScreams_DisplayName); + description = CSTRING(MedicalSettings_enableScreams_Description); typeName = "BOOL"; value = 1; }; class GVAR(playerDamageThreshold) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_playerDamageThreshold_DisplayName); + description = CSTRING(MedicalSettings_playerDamageThreshold_Description); typeName = "SCALAR"; value = 1; }; class GVAR(AIDamageThreshold) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_AIDamageThreshold_DisplayName); + description = CSTRING(MedicalSettings_AIDamageThreshold_Description); typeName = "SCALAR"; value = 1; }; class GVAR(enableUnconsciousnessAI) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_enableUnconsciousnessAI_DisplayName); + description = CSTRING(MedicalSettings_enableUnconsciousnessAI_Description); value = 1; typeName = "SCALAR"; values[] = {"Disabled", "50/50", "Enabled"}; }; class GVAR(remoteControlledAI) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_remoteControlledAI_DisplayName); + description = CSTRING(MedicalSettings_remoteControlledAI_Description); typeName = "BOOL"; value = 1; }; class GVAR(preventInstaDeath) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_preventInstaDeath_DisplayName); + description = CSTRING(MedicalSettings_preventInstaDeath_Description); typeName = "BOOL"; value = 0; }; class GVAR(enableRevive) { category = CSTRING(Category_Medical); + displayName = CSTRING(ReviveSettings_enableRevive_DisplayName); + description = CSTRING(ReviveSettings_enableRevive_Description); typeName = "SCALAR"; value = 0; values[] = {"Disabled", "Players only", "Players and AI"}; }; class GVAR(maxReviveTime) { category = CSTRING(Category_Medical); + displayName = CSTRING(ReviveSettings_maxReviveTime_DisplayName); + description = CSTRING(ReviveSettings_maxReviveTime_Description); typeName = "SCALAR"; value = 120; }; class GVAR(amountOfReviveLives) { category = CSTRING(Category_Medical); + displayName = CSTRING(ReviveSettings_amountOfReviveLives_DisplayName); + description = CSTRING(ReviveSettings_amountOfReviveLives_Description); typeName = "SCALAR"; value = -1; }; @@ -113,6 +145,8 @@ class ACE_Settings { }; class GVAR(allowLitterCreation) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_allowLitterCreation_DisplayName); + description = CSTRING(MedicalSettings_allowLitterCreation_Description); typeName = "BOOL"; value = 1; }; @@ -130,53 +164,71 @@ class ACE_Settings { }; class GVAR(litterCleanUpDelay) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_litterCleanUpDelay_DisplayName); + description = CSTRING(MedicalSettings_litterCleanUpDelay_Description); typeName = "SCALAR"; value = 0; }; class GVAR(medicSetting_basicEpi) { category = CSTRING(Category_Medical); + displayName = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_DisplayName); + description = CSTRING(BasicMedicalSettings_medicSetting_basicEpi_Description); typeName = "SCALAR"; value = 1; values[] = {"Anyone", "Medics only", "Doctors only"}; }; class GVAR(medicSetting_PAK) { category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_DisplayName); + description = CSTRING(AdvancedMedicalSettings_medicSetting_PAK_Description); typeName = "SCALAR"; value = 1; values[] = {"Anyone", "Medics only", "Doctors only"}; }; class GVAR(medicSetting_SurgicalKit) { category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_DisplayName); + description = CSTRING(AdvancedMedicalSettings_medicSetting_SurgicalKit_Description); typeName = "SCALAR"; value = 1; values[] = {"Anyone", "Medics only", "Doctors only"}; }; class GVAR(consumeItem_PAK) { category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_DisplayName); + description = CSTRING(AdvancedMedicalSettings_consumeItem_PAK_Description); typeName = "SCALAR"; value = 0; values[] = {"No", "Yes"}; }; class GVAR(consumeItem_SurgicalKit) { category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_DisplayName); + description = CSTRING(AdvancedMedicalSettings_consumeItem_SurgicalKit_Description); typeName = "SCALAR"; value = 0; values[] = {"No", "Yes"}; }; class GVAR(useLocation_basicEpi) { category = CSTRING(Category_Medical); + displayName = CSTRING(BasicMedicalSettings_useLocation_basicEpi_DisplayName); + description = CSTRING(BasicMedicalSettings_useLocation_basicEpi_Description); typeName = "SCALAR"; value = 0; values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)}; }; class GVAR(useLocation_PAK) { category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_useLocation_PAK_DisplayName); + description = CSTRING(AdvancedMedicalSettings_useLocation_PAK_Description); typeName = "SCALAR"; value = 3; values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)}; }; class GVAR(useLocation_SurgicalKit) { category = CSTRING(Category_Medical); + displayName = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_DisplayName); + description = CSTRING(AdvancedMedicalSettings_useLocation_SurgicalKit_Description); typeName = "SCALAR"; value = 2; values[] = {CSTRING(AdvancedMedicalSettings_anywhere), CSTRING(AdvancedMedicalSettings_vehicle), CSTRING(AdvancedMedicalSettings_facility), CSTRING(AdvancedMedicalSettings_vehicleAndFacility), ECSTRING(common,Disabled)}; @@ -199,18 +251,22 @@ class ACE_Settings { }; class GVAR(keepLocalSettingsSynced) { category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_keepLocalSettingsSynced_DisplayName); + description = CSTRING(MedicalSettings_keepLocalSettingsSynced_Description); typeName = "BOOL"; value = 1; }; class GVAR(healHitPointAfterAdvBandage) { category = CSTRING(Category_Medical); - displayName = CSTRING(healHitPointAfterAdvBandage); + displayName = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_DisplayName); + description = CSTRING(AdvancedMedicalSettings_healHitPointAfterAdvBandage_Description); typeName = "BOOL"; value = 0; }; class GVAR(painIsOnlySuppressed) { category = CSTRING(Category_Medical); - displayName = CSTRING(painIsOnlySuppressed); + displayName = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_DisplayName); + description = CSTRING(AdvancedMedicalSettings_painIsOnlySuppressed_Description); typeName = "BOOL"; value = 1; }; @@ -232,7 +288,6 @@ class ACE_Settings { typeName = "BOOL"; value = 0; }; - class GVAR(menuTypeStyle) { category = CSTRING(Category_Medical); displayName = CSTRING(menuTypeDisplay); @@ -242,10 +297,10 @@ class ACE_Settings { values[] = {CSTRING(useSelection), CSTRING(useRadial), "Disabled"}; isClientSettable = 1; }; - class GVAR(delayUnconCaptive) { category = CSTRING(Category_Medical); - displayName = CSTRING(delayUnconCaptive); + displayName = CSTRING(MedicalSettings_delayUnconCaptive_DisplayName); + description = CSTRING(MedicalSettings_delayUnconCaptive_Description); typeName = "SCALAR"; value = 3; }; diff --git a/addons/medical/CfgEden.hpp b/addons/medical/CfgEden.hpp index 508d53d54c..a9b4594b66 100644 --- a/addons/medical/CfgEden.hpp +++ b/addons/medical/CfgEden.hpp @@ -16,9 +16,9 @@ class Cfg3DEN { class Value: ctrlToolbox { idc = 100; style = "0x02"; - x = "48 * (pixelW * 1.25 * 4)"; - w = "82 * (pixelW * 1.25 * 4)"; - h = "5 * (pixelH * 1.25 * 4)"; + x = "48 * (pixelW * pixelGrid * 0.25)"; + w = "82 * (pixelW * pixelGrid * 0.25)"; + h = "5 * (pixelH * pixelGrid * 0.25)"; rows = 1; columns = 4; strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)}; diff --git a/addons/medical/CfgSounds.hpp b/addons/medical/CfgSounds.hpp index 6b5fa48344..9cc5faedf9 100644 --- a/addons/medical/CfgSounds.hpp +++ b/addons/medical/CfgSounds.hpp @@ -1,37 +1,37 @@ class CfgSounds { class ACE_heartbeat_fast_1 { name = "ACE_heartbeat_fast_1"; - sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_1.wav)), "db+1", 1}; + sound[] = {QPATHTOF(sounds\heart_beats\fast_1.wav), "db+1", 1}; titles[] = {}; }; class ACE_heartbeat_fast_2 { name = "ACE_heartbeat_fast_2"; - sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_2.wav)), "db+1", 1}; + sound[] = {QPATHTOF(sounds\heart_beats\fast_2.wav), "db+1", 1}; titles[] = {}; }; class ACE_heartbeat_fast_3 { name = "ACE_heartbeat_fast_3"; - sound[] = {QUOTE(PATHTOF(sounds\heart_beats\fast_3.wav)), "db+1", 1}; + sound[] = {QPATHTOF(sounds\heart_beats\fast_3.wav), "db+1", 1}; titles[] = {}; }; class ACE_heartbeat_norm_1 { name = "ACE_heartbeat_norm_1"; - sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_1.wav)), "db+1", 1}; + sound[] = {QPATHTOF(sounds\heart_beats\norm_1.wav), "db+1", 1}; titles[] = {}; }; class ACE_heartbeat_norm_2 { name = "ACE_heartbeat_norm_2"; - sound[] = {QUOTE(PATHTOF(sounds\heart_beats\norm_2.wav)), "db+1", 1}; + sound[] = {QPATHTOF(sounds\heart_beats\norm_2.wav), "db+1", 1}; titles[] = {}; }; class ACE_heartbeat_slow_1 { name = "ACE_heartbeat_slow_1"; - sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_1.wav)), "db+1", 1}; + sound[] = {QPATHTOF(sounds\heart_beats\slow_1.wav), "db+1", 1}; titles[] = {}; }; class ACE_heartbeat_slow_2 { name = "ACE_heartbeat_slow_2"; - sound[] = {QUOTE(PATHTOF(sounds\heart_beats\slow_2.wav)), "db+1", 1}; + sound[] = {QPATHTOF(sounds\heart_beats\slow_2.wav), "db+1", 1}; titles[] = {}; }; }; diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index bddb8fc8a6..3425fa9ad3 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -1,6 +1,8 @@ #define MEDICAL_ACTION_DISTANCE 1.75 +class CBA_Extended_EventHandlers; + class CfgVehicles { class Logic; class Module_F: Logic { @@ -12,7 +14,7 @@ class CfgVehicles { class ACE_moduleMedicalSettings: ACE_Module { scope = 2; displayName = CSTRING(MedicalSettings_Module_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; function = QUOTE(DFUNC(moduleMedicalSettings)); functionPriority = 1; @@ -154,9 +156,9 @@ class CfgVehicles { class ACE_moduleBasicMedicalSettings: ACE_Module { scope = 2; displayName = CSTRING(BasicMedicalSettings_Module_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; - function = QUOTE(FUNC(moduleBasicMedicalSettings)); + function = QFUNC(moduleBasicMedicalSettings); functionPriority = 10; isGlobal = 2; isSingular = 1; @@ -196,9 +198,9 @@ class CfgVehicles { class ACE_moduleAdvancedMedicalSettings: ACE_Module { scope = 2; displayName = CSTRING(AdvancedMedicalSettings_Module_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; - function = QUOTE(FUNC(moduleAdvancedMedicalSettings)); + function = QFUNC(moduleAdvancedMedicalSettings); functionPriority = 10; isGlobal = 2; isSingular = 1; @@ -318,7 +320,7 @@ class CfgVehicles { class ACE_moduleReviveSettings: ACE_Module { scope = 2; displayName = CSTRING(ReviveSettings_Module_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; function = QUOTE(DFUNC(moduleReviveSettings)); functionPriority = 1; @@ -362,9 +364,9 @@ class CfgVehicles { class ACE_moduleAssignMedicRoles: Module_F { scope = 2; displayName = CSTRING(AssignMedicRoles_Module_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; - function = QUOTE(FUNC(moduleAssignMedicRoles)); + function = QFUNC(moduleAssignMedicRoles); functionPriority = 10; isGlobal = 2; isTriggerActivated = 0; @@ -409,9 +411,9 @@ class CfgVehicles { class ACE_moduleAssignMedicVehicle: Module_F { scope = 2; displayName = CSTRING(AssignMedicVehicle_Module_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; - function = QUOTE(FUNC(moduleAssignMedicalVehicle)); + function = QFUNC(moduleAssignMedicalVehicle); functionPriority = 10; isGlobal = 2; isTriggerActivated = 0; @@ -453,9 +455,9 @@ class CfgVehicles { class ACE_moduleAssignMedicalFacility: Module_F { scope = 2; displayName = CSTRING(AssignMedicalFacility_Module_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Medical_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; - function = QUOTE(FUNC(moduleAssignMedicalFacility)); + function = QFUNC(moduleAssignMedicalFacility); functionPriority = 10; isGlobal = 2; isTriggerActivated = 0; @@ -532,7 +534,7 @@ class CfgVehicles { exceptions[] = {"isNotInside"}; condition = QUOTE((vehicle _target != _target && vehicle _target == vehicle _player) || GVAR(menuTypeStyle) == 1); statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation)); - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); #undef EXCEPTIONS #undef ACTION_CONDITION @@ -547,7 +549,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionLoadUnit)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); exceptions[] = {"isNotDragging", "isNotCarrying"}; }; class GVAR(UnLoadPatient) { @@ -557,7 +559,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player, _target)] call DFUNC(actionUnloadUnit)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\icons\medical_cross.paa); + icon = QPATHTOF(UI\icons\medical_cross.paa); exceptions[] = {"isNotDragging", "isNotCarrying", "isNotInside"}; }; }; @@ -650,15 +652,18 @@ class CfgVehicles { class MapBoard_altis_F; class ACE_bodyBagObject: MapBoard_altis_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + scope = 1; scopeCurator = 2; side = -1; - model = QUOTE(PATHTOEF(apl,bodybag.p3d)); + model = QPATHTOEF(apl,bodybag.p3d); icon = ""; displayName = CSTRING(Bodybag_Display); EGVAR(dragging,canDrag) = 1; - EGVAR(dragging,dragPosition[]) = {0,1.2,0}; + EGVAR(dragging,dragPosition)[] = {0,1.2,0}; EGVAR(dragging,dragDirection) = 0; EGVAR(cargo,size) = 1; EGVAR(cargo,canLoad) = 1; @@ -681,40 +686,40 @@ class CfgVehicles { scopeCurator = 0; displayName = " "; destrType = "DestructNo"; - model = QUOTE(PATHTOF(data\littergeneric.p3d)); + model = QPATHTOF(data\littergeneric.p3d); }; class ACE_MedicalLitter_clean: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_clean.p3d)); + model = QPATHTOF(data\littergeneric_clean.p3d); }; class ACE_MedicalLitter_bandage1: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_bandages1.p3d)); + model = QPATHTOF(data\littergeneric_bandages1.p3d); }; class ACE_MedicalLitter_bandage2: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_bandages2.p3d)); + model = QPATHTOF(data\littergeneric_bandages2.p3d); }; class ACE_MedicalLitter_bandage3: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_bandages3.p3d)); + model = QPATHTOF(data\littergeneric_bandages3.p3d); }; class ACE_MedicalLitter_packingBandage: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_packingBandage.p3d)); + model = QPATHTOF(data\littergeneric_packingBandage.p3d); }; class ACE_MedicalLitter_gloves: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_gloves.p3d)); + model = QPATHTOF(data\littergeneric_gloves.p3d); }; class ACE_MedicalLitter_adenosine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_adenosine.p3d)); + model = QPATHTOF(data\littergeneric_adenosine.p3d); }; class ACE_MedicalLitter_atropine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_atropine.p3d)); + model = QPATHTOF(data\littergeneric_atropine.p3d); }; class ACE_MedicalLitter_epinephrine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_epinephrine.p3d)); + model = QPATHTOF(data\littergeneric_epinephrine.p3d); }; class ACE_MedicalLitter_morphine: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_morphine.p3d)); + model = QPATHTOF(data\littergeneric_morphine.p3d); }; class ACE_MedicalLitter_QuickClot: ACE_MedicalLitterBase { - model = QUOTE(PATHTOF(data\littergeneric_Quikclot.p3d)); + model = QPATHTOF(data\littergeneric_Quikclot.p3d); }; class Item_Base_F; class ACE_fieldDressingItem: Item_Base_F { @@ -875,7 +880,7 @@ class CfgVehicles { scopeCurator = 2; accuracy = 1000; displayName = CSTRING(medicalSupplyCrate); - model = PATHTOF(data\ace_medcrate.p3d); + model = QPATHTOF(data\ace_medcrate.p3d); author = ECSTRING(common,ACETeam); class TransportItems { MACRO_ADDITEM(ACE_fieldDressing,50); diff --git a/addons/medical/CfgWeapons.hpp b/addons/medical/CfgWeapons.hpp index 4bd5452794..df9a756a34 100644 --- a/addons/medical/CfgWeapons.hpp +++ b/addons/medical/CfgWeapons.hpp @@ -22,8 +22,8 @@ class CfgWeapons { class ACE_ItemCore; class ACE_fieldDressing: ACE_ItemCore { scope = 2; - model = QUOTE(PATHTOF(data\bandage.p3d)); - picture = QUOTE(PATHTOF(ui\items\fieldDressing_x_ca.paa)); + model = QPATHTOF(data\bandage.p3d); + picture = QPATHTOF(ui\items\fieldDressing_x_ca.paa); displayName = CSTRING(Bandage_Basic_Display); descriptionShort = CSTRING(Bandage_Basic_Desc_Short); descriptionUse = CSTRING(Bandage_Basic_Desc_Use); @@ -34,8 +34,8 @@ class CfgWeapons { class ACE_packingBandage: ACE_ItemCore { scope = 2; displayName = CSTRING(Packing_Bandage_Display); - picture = QUOTE(PATHTOF(ui\items\packingBandage_x_ca.paa)); - model = QUOTE(PATHTOF(data\packingbandage.p3d)); + picture = QPATHTOF(ui\items\packingBandage_x_ca.paa); + model = QPATHTOF(data\packingbandage.p3d); descriptionShort = CSTRING(Packing_Bandage_Desc_Short); descriptionUse = CSTRING(Packing_Bandage_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -45,7 +45,7 @@ class CfgWeapons { class ACE_elasticBandage: ACE_ItemCore { scope = 2; displayName = CSTRING(Bandage_Elastic_Display); - picture = QUOTE(PATHTOF(ui\items\elasticBandage_x_ca.paa)); + picture = QPATHTOF(ui\items\elasticBandage_x_ca.paa); model = "\A3\Structures_F_EPA\Items\Medical\Bandage_F.p3d"; descriptionShort = CSTRING(Bandage_Elastic_Desc_Short); descriptionUse = CSTRING(Bandage_Elastic_Desc_Use); @@ -56,8 +56,8 @@ class CfgWeapons { class ACE_tourniquet: ACE_ItemCore { scope = 2; displayName = CSTRING(Tourniquet_Display); - picture = QUOTE(PATHTOF(ui\items\tourniquet_x_ca.paa)); - model = QUOTE(PATHTOF(data\tourniquet.p3d)); + picture = QPATHTOF(ui\items\tourniquet_x_ca.paa); + model = QPATHTOF(data\tourniquet.p3d); descriptionShort = CSTRING(Tourniquet_Desc_Short); descriptionUse = CSTRING(Tourniquet_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -67,8 +67,8 @@ class CfgWeapons { class ACE_morphine: ACE_ItemCore { scope = 2; displayName = CSTRING(Morphine_Display); - picture = QUOTE(PATHTOF(ui\items\morphine_x_ca.paa)); - model = QUOTE(PATHTOF(data\morphine.p3d)); + picture = QPATHTOF(ui\items\morphine_x_ca.paa); + model = QPATHTOF(data\morphine.p3d); descriptionShort = CSTRING(Morphine_Desc_Short); descriptionUse = CSTRING(Morphine_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -78,8 +78,8 @@ class CfgWeapons { class ACE_adenosine: ACE_ItemCore { scope = 2; displayName = CSTRING(Adenosine_Display); - picture = QUOTE(PATHTOF(ui\items\adenosine_x_ca.paa)); - model = QUOTE(PATHTOF(data\adenosine.p3d)); + picture = QPATHTOF(ui\items\adenosine_x_ca.paa); + model = QPATHTOF(data\adenosine.p3d); descriptionShort = CSTRING(adenosine_Desc_Short); descriptionUse = CSTRING(adenosine_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -89,8 +89,8 @@ class CfgWeapons { class ACE_atropine: ACE_ItemCore { scope = 2; displayName = CSTRING(Atropine_Display); - picture = QUOTE(PATHTOF(ui\items\atropine_x_ca.paa)); - model = QUOTE(PATHTOF(data\atropine.p3d)); + picture = QPATHTOF(ui\items\atropine_x_ca.paa); + model = QPATHTOF(data\atropine.p3d); descriptionShort = CSTRING(Atropine_Desc_Short); descriptionUse = CSTRING(Atropine_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -100,8 +100,8 @@ class CfgWeapons { class ACE_epinephrine: ACE_ItemCore { scope = 2; displayName = CSTRING(Epinephrine_Display); - picture = QUOTE(PATHTOF(ui\items\epinephrine_x_ca.paa)); - model = QUOTE(PATHTOF(data\epinephrine.p3d)); + picture = QPATHTOF(ui\items\epinephrine_x_ca.paa); + model = QPATHTOF(data\epinephrine.p3d); descriptionShort = CSTRING(Epinephrine_Desc_Short); descriptionUse = CSTRING(Epinephrine_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -112,10 +112,10 @@ class CfgWeapons { class ACE_plasmaIV: ACE_ItemCore { scope = 2; displayName = CSTRING(Plasma_IV); - model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d)); + model = QPATHTOF(data\IVBag_1000ml.p3d); hiddenSelections[] = {"camo"}; - hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_1000ml_ca.paa)) }; - picture = QUOTE(PATHTOF(ui\items\plasmaIV_x_ca.paa)); + hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_1000ml_ca.paa) }; + picture = QPATHTOF(ui\items\plasmaIV_x_ca.paa); descriptionShort = CSTRING(Plasma_IV_Desc_Short); descriptionUse = CSTRING(Plasma_IV_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -124,27 +124,27 @@ class CfgWeapons { }; class ACE_plasmaIV_500: ACE_plasmaIV { displayName = CSTRING(Plasma_IV_500); - model = QUOTE(PATHTOF(data\IVBag_500ml.p3d)); - hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_500ml_ca.paa)) }; + model = QPATHTOF(data\IVBag_500ml.p3d); + hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_500ml_ca.paa) }; class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_plasmaIV_250: ACE_plasmaIV { displayName = CSTRING(Plasma_IV_250); - model = QUOTE(PATHTOF(data\IVBag_250ml.p3d)); - hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_plasma_250ml_ca.paa)) }; + model = QPATHTOF(data\IVBag_250ml.p3d); + hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_plasma_250ml_ca.paa) }; class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; }; class ACE_bloodIV: ACE_ItemCore { scope = 2; - model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d)); + model = QPATHTOF(data\IVBag_1000ml.p3d); displayName = CSTRING(Blood_IV); - picture = QUOTE(PATHTOF(ui\items\bloodIV_x_ca.paa)); + picture = QPATHTOF(ui\items\bloodIV_x_ca.paa); hiddenSelections[] = {"camo"}; - hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_1000ml_ca.paa)) }; + hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_1000ml_ca.paa) }; descriptionShort = CSTRING(Blood_IV_Desc_Short); descriptionUse = CSTRING(Blood_IV_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -153,16 +153,16 @@ class CfgWeapons { }; class ACE_bloodIV_500: ACE_bloodIV { displayName = CSTRING(Blood_IV_500); - model = QUOTE(PATHTOF(data\IVBag_500ml.p3d)); - hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_500ml_ca.paa)) }; + model = QPATHTOF(data\IVBag_500ml.p3d); + hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_500ml_ca.paa) }; class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_bloodIV_250: ACE_bloodIV { displayName = CSTRING(Blood_IV_250); - model = QUOTE(PATHTOF(data\IVBag_250ml.p3d)); - hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_blood_250ml_ca.paa)) }; + model = QPATHTOF(data\IVBag_250ml.p3d); + hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_blood_250ml_ca.paa) }; class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; @@ -170,10 +170,10 @@ class CfgWeapons { class ACE_salineIV: ACE_ItemCore { scope = 2; displayName = CSTRING(Saline_IV); - model = QUOTE(PATHTOF(data\IVBag_1000ml.p3d)); + model = QPATHTOF(data\IVBag_1000ml.p3d); hiddenSelections[] = {"camo"}; - hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_1000ml_ca.paa)) }; - picture = QUOTE(PATHTOF(ui\items\salineIV_x_ca.paa)); + hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_1000ml_ca.paa) }; + picture = QPATHTOF(ui\items\salineIV_x_ca.paa); descriptionShort = CSTRING(Saline_IV_Desc_Short); descriptionUse = CSTRING(Saline_IV_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -182,16 +182,16 @@ class CfgWeapons { }; class ACE_salineIV_500: ACE_salineIV { displayName = CSTRING(Saline_IV_500); - model = QUOTE(PATHTOF(data\IVBag_500ml.p3d)); - hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_500ml_ca.paa)) }; + model = QPATHTOF(data\IVBag_500ml.p3d); + hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_500ml_ca.paa) }; class ItemInfo: InventoryItem_Base_F { mass = 5; }; }; class ACE_salineIV_250: ACE_salineIV { displayName = CSTRING(Saline_IV_250); - model = QUOTE(PATHTOF(data\IVBag_250ml.p3d)); - hiddenSelectionsTextures[] = { QUOTE(PATHTOF(data\IVBag_saline_250ml_ca.paa)) }; + model = QPATHTOF(data\IVBag_250ml.p3d); + hiddenSelectionsTextures[] = { QPATHTOF(data\IVBag_saline_250ml_ca.paa) }; class ItemInfo: InventoryItem_Base_F { mass = 2.5; }; @@ -199,8 +199,8 @@ class CfgWeapons { class ACE_quikclot: ACE_ItemCore { scope = 2; displayName = CSTRING(QuikClot_Display); - model = QUOTE(PATHTOF(data\QuikClot.p3d)); - picture = QUOTE(PATHTOF(ui\items\quickclot_x_ca.paa)); + model = QPATHTOF(data\QuikClot.p3d); + picture = QPATHTOF(ui\items\quickclot_x_ca.paa); descriptionShort = CSTRING(QuikClot_Desc_Short); descriptionUse = CSTRING(QuikClot_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -210,7 +210,7 @@ class CfgWeapons { class ACE_personalAidKit: ACE_ItemCore { scope = 2; displayName = CSTRING(Aid_Kit_Display); - picture = QUOTE(PATHTOF(ui\items\personal_aid_kit_x_ca.paa)); + picture = QPATHTOF(ui\items\personal_aid_kit_x_ca.paa); descriptionShort = CSTRING(Aid_Kit_Desc_Short); descriptionUse = CSTRING(Aid_Kit_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -220,8 +220,8 @@ class CfgWeapons { class ACE_surgicalKit: ACE_ItemCore { scope=2; displayName= CSTRING(SurgicalKit_Display); - model = QUOTE(PATHTOF(data\surgical_kit.p3d)); - picture = QUOTE(PATHTOF(ui\items\surgicalKit_x_ca.paa)); + model = QPATHTOF(data\surgical_kit.p3d); + picture = QPATHTOF(ui\items\surgicalKit_x_ca.paa); descriptionShort = CSTRING(SurgicalKit_Desc_Short); descriptionUse = CSTRING(SurgicalKit_Desc_Use); class ItemInfo: InventoryItem_Base_F { @@ -231,12 +231,12 @@ class CfgWeapons { class ACE_bodyBag: ACE_ItemCore { scope=2; displayName= CSTRING(Bodybag_Display); - model = QUOTE(PATHTOF(data\bodybagItem.p3d)); - picture = QUOTE(PATHTOF(ui\items\bodybag_x_ca.paa)); + model = QPATHTOF(data\bodybagItem.p3d); + picture = QPATHTOF(ui\items\bodybag_x_ca.paa); descriptionShort = CSTRING(Bodybag_Desc_Short); descriptionUse = CSTRING(Bodybag_Desc_Use); class ItemInfo: InventoryItem_Base_F { - mass = 20; + mass = 7; }; }; }; diff --git a/addons/medical/XEH_PREP.hpp b/addons/medical/XEH_PREP.hpp index 4184f096f7..d7322082c6 100644 --- a/addons/medical/XEH_PREP.hpp +++ b/addons/medical/XEH_PREP.hpp @@ -16,7 +16,9 @@ PREP(addToLog); PREP(addToTriageCard); PREP(addUnconsciousCondition); PREP(addUnloadPatientActions); +PREP(addVitalLoop); PREP(adjustPainLevel); +PREP(bodyCleanupLoop); PREP(canAccessMedicalEquipment); PREP(canTreat); PREP(canTreatCached); @@ -56,12 +58,14 @@ PREP(isMedic); PREP(isMedicalVehicle); PREP(isInStableCondition); PREP(itemCheck); +PREP(medicationEffectLoop); PREP(modifyMedicalAction); PREP(onMedicationUsage); PREP(onWoundUpdateRequest); PREP(onPropagateWound); PREP(parseConfigForInjuries); PREP(playInjuredSound); +PREP(reviveStateLoop); PREP(selectionNameToNumber); PREP(serverRemoveBody); PREP(setCardiacArrest); @@ -96,6 +100,7 @@ PREP(treatmentTourniquet); PREP(treatmentTourniquetLocal); PREP(useItem); PREP(useItems); +PREP(vitalLoop); PREP(displayPatientInformation); PREP(displayTriageCard); PREP(dropDownTriageCard); @@ -113,3 +118,4 @@ PREP(unconsciousPFH); // Networked litter PREP(createLitter); PREP(handleCreateLitter); +PREP(litterCleanupLoop); diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 5d29d22cec..e26815ec7c 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -37,19 +37,15 @@ if (isServer) then {["placedInBodyBag", FUNC(serverRemoveBody)] call EFUNC(commo params ["_unit", "_status"]; if (local _unit) then { if (_status) then { - _unit setVariable ["tf_globalVolume", 0.4]; _unit setVariable ["tf_voiceVolume", 0, true]; _unit setVariable ["tf_unable_to_use_radio", true, true]; _unit setVariable ["acre_sys_core_isDisabled", true, true]; - if (!isNil "acre_api_fnc_setGlobalVolume") then { [0.4^0.33] call acre_api_fnc_setGlobalVolume; }; } else { - _unit setVariable ["tf_globalVolume", 1]; _unit setVariable ["tf_voiceVolume", 1, true]; _unit setVariable ["tf_unable_to_use_radio", false, true]; _unit setVariable ["acre_sys_core_isDisabled", false, true]; - if (!isNil "acre_api_fnc_setGlobalVolume") then { [1] call acre_api_fnc_setGlobalVolume; }; }; }; }] call EFUNC(common,addEventHandler); @@ -108,7 +104,7 @@ GVAR(effectPainCC) = [ // Initialize Other Variables GVAR(effectBlind) = false; -GVAR(effectTimeBlood) = ACE_time; +GVAR(effectTimeBlood) = CBA_missionTime; // MAIN EFFECTS LOOP [{ @@ -143,11 +139,11 @@ GVAR(effectTimeBlood) = ACE_time; [{ GVAR(effectBlindingCC) ppEffectAdjust [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]]; GVAR(effectBlindingCC) ppEffectCommit ((_this select 0) * 2); - }, [_strength], 0.01, 0] call EFUNC(common,waitAndExecute); + }, [_strength], 0.01, 0] call CBA_fnc_waitAndExecute; [{ GVAR(effectBlindingCC) ppEffectEnable false; - }, [], (_strength * 2) + 0.5, 0] call EFUNC(common,waitAndExecute); + }, [], (_strength * 2) + 0.5, 0] call CBA_fnc_waitAndExecute; GVAR(effectBlind) = false; }; @@ -155,8 +151,8 @@ GVAR(effectTimeBlood) = ACE_time; _bleeding = [ACE_player] call FUNC(getBloodLoss); // Bleeding Indicator - if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < ACE_time) then { - GVAR(effectTimeBlood) = ACE_time; + if (_bleeding > 0 and GVAR(effectTimeBlood) + 3.5 < CBA_missionTime) then { + GVAR(effectTimeBlood) = CBA_missionTime; [600 * _bleeding] call BIS_fnc_bloodEffect; }; @@ -172,8 +168,8 @@ GVAR(effectTimeBlood) = ACE_time; }, 0.5, []] call CBA_fnc_addPerFrameHandler; -GVAR(lastHeartBeat) = ACE_time; -GVAR(lastHeartBeatSound) = ACE_time; +GVAR(lastHeartBeat) = CBA_missionTime; +GVAR(lastHeartBeatSound) = CBA_missionTime; // HEARTRATE BASED EFFECTS [{ @@ -193,8 +189,8 @@ GVAR(lastHeartBeatSound) = ACE_time; GVAR(effectPainCC) ppEffectEnable false; }; } else { - if ((ACE_time > GVAR(lastHeartBeat) + _interval)) then { - GVAR(lastHeartBeat) = ACE_time; + if ((CBA_missionTime > GVAR(lastHeartBeat) + _interval)) then { + GVAR(lastHeartBeat) = CBA_missionTime; // Pain effect, no pain effect in zeus camera if (isNull curatorCamera) then { @@ -210,15 +206,15 @@ GVAR(lastHeartBeatSound) = ACE_time; [{ GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; GVAR(effectPainCA) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); + }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute; [{ GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; GVAR(effectPainCA) ppEffectCommit 0.01; - }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); + }, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute; [{ GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; GVAR(effectPainCA) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute; } else { GVAR(effectPainCA) ppEffectEnable false; }; @@ -232,15 +228,15 @@ GVAR(lastHeartBeatSound) = ACE_time; [{ GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; GVAR(effectPainCC) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); + }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call CBA_fnc_waitAndExecute; [{ GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; GVAR(effectPainCC) ppEffectCommit 0.01; - }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); + }, [_strength * 0.7], _interval * 0.3, 0] call CBA_fnc_waitAndExecute; [{ GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; GVAR(effectPainCC) ppEffectCommit (_this select 1); - }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call CBA_fnc_waitAndExecute; } else { GVAR(effectPainCC) ppEffectEnable false; }; @@ -251,8 +247,8 @@ GVAR(lastHeartBeatSound) = ACE_time; if (GVAR(level) >= 2 && {_heartRate > 0}) then { _minTime = 60 / _heartRate; - if (ACE_time - GVAR(lastHeartBeatSound) > _minTime) then { - GVAR(lastHeartBeatSound) = ACE_time; + if (CBA_missionTime - GVAR(lastHeartBeatSound) > _minTime) then { + GVAR(lastHeartBeatSound) = CBA_missionTime; // Heart rate sound effect if (_heartRate < 60) then { _sound = GVAR(heartBeatSounds_Normal) select (random((count GVAR(heartBeatSounds_Normal)) -1)); @@ -298,9 +294,7 @@ GVAR(lastHeartBeatSound) = ACE_time; ["isNotUnconscious", {!((_this select 0) getVariable ["ACE_isUnconscious", false])}] call EFUNC(common,addCanInteractWithCondition); // Item Event Handler -["playerInventoryChanged", { - [ACE_player] call FUNC(itemCheck); -}] call EFUNC(common,addEventHandler); +["playerInventoryChanged", FUNC(itemCheck)] call EFUNC(common,addEventHandler); if (hasInterface) then { ["PlayerJip", { diff --git a/addons/medical/XEH_preInit.sqf b/addons/medical/XEH_preInit.sqf index 85232498bd..a5dc596ba2 100644 --- a/addons/medical/XEH_preInit.sqf +++ b/addons/medical/XEH_preInit.sqf @@ -35,7 +35,7 @@ private _fixStatic = { 1 preloadObject (_this select 0); }, { TRACE_1("preload done",_this); - }, [_vehType]] call EFUNC(common,waitUntilAndExecute); + }, [_vehType]] call CBA_fnc_waitUntilAndExecute; }; }; ["StaticWeapon", "init", _fixStatic] call CBA_fnc_addClassEventHandler; @@ -47,7 +47,7 @@ addMissionEventHandler ["Loaded",{ 1 preloadObject (_this select 0); }, { TRACE_1("preload done",_this); - }, [_x]] call EFUNC(common,waitUntilAndExecute); + }, [_x]] call CBA_fnc_waitUntilAndExecute; } forEach GVAR(fixedStatics); }]; diff --git a/addons/medical/config.cpp b/addons/medical/config.cpp index d40fb9e6a6..911c9bd125 100644 --- a/addons/medical/config.cpp +++ b/addons/medical/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_fieldDressing", "ACE_packingBandage", "ACE_elasticBandage", "ACE_tourniquet", "ACE_morphine", "ACE_atropine", "ACE_epinephrine", "ACE_plasmaIV", "ACE_plasmaIV_500", "ACE_plasmaIV_250", "ACE_bloodIV", "ACE_bloodIV_500", "ACE_bloodIV_250", "ACE_salineIV", "ACE_salineIV_500", "ACE_salineIV_250", "ACE_quikclot", "ACE_personalAidKit", "ACE_surgicalKit", "ACE_bodyBag"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction", "ace_apl"}; - author[] = {"Glowbal", "KoffeinFlummi"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"Glowbal", "KoffeinFlummi"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/medical/functions/fnc_addDamageToUnit.sqf b/addons/medical/functions/fnc_addDamageToUnit.sqf index a11cc4689f..1969e3ff74 100644 --- a/addons/medical/functions/fnc_addDamageToUnit.sqf +++ b/addons/medical/functions/fnc_addDamageToUnit.sqf @@ -54,7 +54,7 @@ private _debugCode = { ACE_LOGERROR_6("addDamageToUnit - FAILED - [unit:%1, partNo:%2, addDmg:%3] results:[alive:%4 old:%5 new:%6]", _unit, _partNumber, _damageToAdd, alive _unit, _startDmg, _endDmg); }; }; -[{diag_frameno > (_this select 0)}, _debugCode, [_checkAtFrame, _unit, _startDmg, _damageToAdd, _partNumber]] call EFUNC(common,waitUntilAndExecute); +[{diag_frameno > (_this select 0)}, _debugCode, [_checkAtFrame, _unit, _startDmg, _damageToAdd, _partNumber]] call CBA_fnc_waitUntilAndExecute; #endif private _return = [_unit, _selection, (_currentDamage + _damageToAdd), _unit, _typeOfDamage, _hitpointIndex] call FUNC(handleDamage); diff --git a/addons/medical/functions/fnc_addToInjuredCollection.sqf b/addons/medical/functions/fnc_addToInjuredCollection.sqf index aa545f491e..77d2378d0d 100644 --- a/addons/medical/functions/fnc_addToInjuredCollection.sqf +++ b/addons/medical/functions/fnc_addToInjuredCollection.sqf @@ -8,52 +8,10 @@ * ReturnValue: * None * - * Public: Yes + * Deprecated */ - #include "script_component.hpp" -params ["_unit", ["_force", false]]; +ACE_DEPRECATED("ace_medical_fnc_addToInjuredCollection","3.7.0","ace_medical_fnc_addVitalLoop"); -if ([_unit] call FUNC(hasMedicalEnabled) || _force) then { - - if !(local _unit) exitWith { - ["addToInjuredCollection", _unit, [_unit, _force]] call EFUNC(common,targetEvent); - }; - - if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{}; - _unit setVariable [QGVAR(addedToUnitLoop), true, true]; - - [{ - params ["_args", "_idPFH"]; - _args params ["_unit", "_interval"]; - _interval = ACE_time - _interval; - (_this select 0) set [1, ACE_time]; - - if (!alive _unit || !local _unit) then { - [_idPFH] call CBA_fnc_removePerFrameHandler; - if (!local _unit) then { - if (GVAR(level) >= 2) then { - _unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), 80], true]; - _unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true]; - }; - _unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), 100], true]; - }; - } else { - [_unit, _interval] call FUNC(handleUnitVitals); - - private "_pain"; - _pain = _unit getVariable [QGVAR(pain), 0]; - if (_pain > (_unit getVariable [QGVAR(painSuppress), 0])) then { - // This introduces wierd unconscious behaviour for basic medical and possibly also advanced. - // TODO This is disabled as it's considered non critical code. - // We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely. - /*if (_pain > 0.7 && {random(1) > 0.6}) then { - [_unit] call FUNC(setUnconscious); - };*/ - - [_unit, _pain] call FUNC(playInjuredSound); - }; - }; - }, 1, [_unit, ACE_time]] call CBA_fnc_addPerFrameHandler; -}; +_this call FUNC(addVitalLoop); diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index ca54d8cd27..4fce53e0ab 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -29,7 +29,7 @@ _amount = 1; private "_info"; _info = _log select _forEachIndex; _info set [1,(_info select 1) + 1]; - _info set [2, ACE_gameTime]; + _info set [2, CBA_missionTime]; _log set [_forEachIndex, _info]; _amount = (_info select 1); @@ -38,7 +38,7 @@ _amount = 1; } forEach _log; if (!_inList) then { - _log pushBack [_newItem, 1, ACE_gameTime]; + _log pushBack [_newItem, 1, CBA_missionTime]; }; _unit setVariable [QGVAR(triageCard), _log, true]; ["Medical_onItemAddedToTriageCard", [_unit, _newItem, _amount]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_addVitalLoop.sqf b/addons/medical/functions/fnc_addVitalLoop.sqf new file mode 100644 index 0000000000..e0730322af --- /dev/null +++ b/addons/medical/functions/fnc_addVitalLoop.sqf @@ -0,0 +1,30 @@ +/* + * Author: Glowbal + * Enabled the vitals loop for a unit. + * + * Arguments: + * 0: The Unit + * + * ReturnValue: + * None + * + * Public: Yes + */ + +#include "script_component.hpp" + +params ["_unit", ["_force", false]]; + +if !([_unit] call FUNC(hasMedicalEnabled) || _force) exitWith {}; + +if !(local _unit) exitWith { + ["addVitalLoop", _unit, [_unit, _force]] call EFUNC(common,targetEvent); +}; + +// Quit if the unit already has a vital loop, or is dead, unless it's forced +if ((_unit getVariable[QGVAR(addedToUnitLoop),false] || !alive _unit) && !_force) exitWith{}; + +// Schedule the loop to be executed again 1 sec later +// @todo: should the loop be started righ away instead? +_unit setVariable [QGVAR(addedToUnitLoop), true, true]; +[DFUNC(vitalLoop), [_unit, CBA_missionTime], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/medical/functions/fnc_adjustPainLevel.sqf b/addons/medical/functions/fnc_adjustPainLevel.sqf index df82e06823..7b97cdc48f 100644 --- a/addons/medical/functions/fnc_adjustPainLevel.sqf +++ b/addons/medical/functions/fnc_adjustPainLevel.sqf @@ -35,6 +35,6 @@ _pain = _pain max 0; _unit setVariable [QGVAR(pain), _pain]; //Start up the vital watching (if not already running) -[_unit] call FUNC(addToInjuredCollection); +[_unit] call FUNC(addVitalLoop); _pain diff --git a/addons/medical/functions/fnc_bodyCleanupLoop.sqf b/addons/medical/functions/fnc_bodyCleanupLoop.sqf new file mode 100644 index 0000000000..af17ffcd34 --- /dev/null +++ b/addons/medical/functions/fnc_bodyCleanupLoop.sqf @@ -0,0 +1,30 @@ +/* + * Author: Glowbal, esteldunedain + * Loop that cleans up litter + * + * Arguments: + * None + * + * ReturnValue: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +{ + TRACE_2("body",_x,isPlayer _x); + if ((!isNull _x) && {!isPlayer _x}) then {deleteVehicle _x}; +} forEach GVAR(bodiesToDelete); + +// deleteVehicle doesn't have instant results so it won't usualy be filtered until next run +GVAR(bodiesToDelete) = GVAR(bodiesToDelete) - [objNull]; + +// If no more bodies remain, exit the loop +if (GVAR(bodiesToDelete) isEqualTo []) exitWith { + TRACE_1("array emptied - rem PFEH",GVAR(bodiesToDelete)); +}; + +// Schedule the loop to be executed again 20 sec later +[DFUNC(bodyCleanupLoop), [], 20] call CBA_fnc_waitAndExecute; diff --git a/addons/medical/functions/fnc_getCardiacOutput.sqf b/addons/medical/functions/fnc_getCardiacOutput.sqf index d07319e8b5..74da98012b 100644 --- a/addons/medical/functions/fnc_getCardiacOutput.sqf +++ b/addons/medical/functions/fnc_getCardiacOutput.sqf @@ -14,7 +14,7 @@ #include "script_component.hpp" /* - Cardiac output (Q or or CO ) is the volume of blood being pumped by the heart, in particular by a left or right ventricle in the ACE_time interval of one minute. CO may be measured in many ways, for example dm3/min (1 dm3 equals 1 litre). + Cardiac output (Q or or CO ) is the volume of blood being pumped by the heart, in particular by a left or right ventricle in the CBA_missionTime interval of one minute. CO may be measured in many ways, for example dm3/min (1 dm3 equals 1 litre). Source: http://en.wikipedia.org/wiki/Cardiac_output */ diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index 84ffa01258..49c5ab35f3 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -117,5 +117,5 @@ if (random(1) <= _reopeningChance) then { }; // Otherwise something went wrong, we we don't reopen them.. //}; - }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call EFUNC(common,waitAndExecute); + }, [_target, _impact, _part, _injuryIndex, +_injury], _delay] call CBA_fnc_waitAndExecute; }; diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf index c87d51a7e1..816202203a 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical/functions/fnc_handleCreateLitter.sqf @@ -29,7 +29,7 @@ _litterObject = _litterClass createVehicleLocal _position; _litterObject setDir _direction; _litterObject setPosATL _position; // Move the litter next frame to get rid of HORRIBLE spacing, fixes #1112 -[{ params ["_object", "_pos"]; _object setPosATL _pos; }, [_litterObject, _position]] call EFUNC(common,execNextFrame); +[{ params ["_object", "_pos"]; _object setPosATL _pos; }, [_litterObject, _position]] call CBA_fnc_execNextFrame; _maxLitterCount = getArray (configFile >> "ACE_Settings" >> QGVAR(litterSimulationDetail) >> "_values") select GVAR(litterSimulationDetail); if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then { @@ -41,25 +41,10 @@ if((count GVAR(allCreatedLitter)) > _maxLitterCount ) then { } forEach (_oldLitter select 1); }; -GVAR(allCreatedLitter) pushBack [ACE_time, [_litterObject]]; +GVAR(allCreatedLitter) pushBack [CBA_missionTime, [_litterObject]]; if(!GVAR(litterPFHRunning) && {GVAR(litterCleanUpDelay) > 0}) then { + // Start the litter cleanup loop GVAR(litterPFHRunning) = true; - [{ - { - _x params ["_time", "_objects"]; - if (ACE_time - _time >= GVAR(litterCleanUpDelay)) then { - { - deleteVehicle _x; - } forEach _objects; - GVAR(allCreatedLitter) set[_forEachIndex, objNull]; - }; - } forEach GVAR(allCreatedLitter); - GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull]; - - if ( (count GVAR(allCreatedLitter)) == 0) exitWith { - [(_this select 1)] call CBA_fnc_removePerFrameHandler; - GVAR(litterPFHRunning) = false; - }; - }, 30, []] call CBA_fnc_addPerFrameHandler; + call FUNC(litterCleanupLoop); }; diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index cd0b4b1b27..4cf237e949 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -102,8 +102,8 @@ if ((_minLethalDamage <= _newDamage) && {[_unit, [_effectiveSelectionName] call _damageReturn = _damageReturn min 0.89; }; - -[_unit] call FUNC(addToInjuredCollection); +// Start the loop that tracks the unit vitals +[_unit] call FUNC(addVitalLoop); if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitWith { private _delayedUnconsicous = false; @@ -120,11 +120,11 @@ if (_unit getVariable [QGVAR(preventInstaDeath), GVAR(preventInstaDeath)]) exitW if (_delayedUnconsicous) then { [{ [_this select 0, true] call FUNC(setUnconscious); - }, [_unit], 0.7] call EFUNC(common,waitAndExecute); + }, [_unit], 0.7] call CBA_fnc_waitAndExecute; } else { [{ [_this select 0, true] call FUNC(setUnconscious); - }, [_unit]] call EFUNC(common,execNextFrame); + }, [_unit]] call CBA_fnc_execNextFrame; }; 0.89; }; diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index cc969ce961..c1cf726399 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -58,6 +58,7 @@ if (_unit getVariable [QGVAR(isFalling), false]) then { } else { _newDamage = _newDamage * 0.5; }; + if (_newDamage < 0.075) then {_newDamage = 0;}; //Filter minor falling damage to non-leg hitpoints } else { if (_selectionName == "") then { _selectionName = selectRandom ["leg_l", "leg_r"]; diff --git a/addons/medical/functions/fnc_handleLocal.sqf b/addons/medical/functions/fnc_handleLocal.sqf index 91689f311f..42e8a9b7b2 100644 --- a/addons/medical/functions/fnc_handleLocal.sqf +++ b/addons/medical/functions/fnc_handleLocal.sqf @@ -17,14 +17,15 @@ params ["_unit", "_local"]; if (_local) then { + // If the unit had a loop tracking its vitals, restart it locally if (_unit getVariable[QGVAR(addedToUnitLoop),false]) then { - [_unit, true] call FUNC(addToInjuredCollection); + [_unit, true] call FUNC(addVitalLoop); }; if ((_unit getVariable ["ACE_isUnconscious",false]) && {count (_unit getVariable [QGVAR(unconsciousArguments), []]) >= 6}) then { private "_arguments"; _arguments = (_unit getVariable [QGVAR(unconsciousArguments), []]); - _arguments set [2, ACE_time]; + _arguments set [2, CBA_missionTime]; [DFUNC(unconsciousPFH), 0.1, _arguments ] call CBA_fnc_addPerFrameHandler; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index 6159351cc9..103561da0e 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -19,9 +19,9 @@ TRACE_3("ACE_DEBUG",_unit,_interval,_unit); if (_interval == 0) exitWith {}; _lastTimeValuesSynced = _unit getVariable [QGVAR(lastMomentValuesSynced), 0]; -_syncValues = (ACE_time - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced)); +_syncValues = (CBA_missionTime - _lastTimeValuesSynced >= (10 + floor(random(10))) && GVAR(keepLocalSettingsSynced)); if (_syncValues) then { - _unit setVariable [QGVAR(lastMomentValuesSynced), ACE_time]; + _unit setVariable [QGVAR(lastMomentValuesSynced), CBA_missionTime]; }; _bloodVolume = (_unit getVariable [QGVAR(bloodVolume), 100]) + ([_unit] call FUNC(getBloodVolumeChange)); @@ -110,6 +110,11 @@ if (GVAR(level) >= 2) then { }; }; + // Handle pain due tourniquets, that have been applied more than 120 s ago + private _oldTourniquets = (_unit getVariable [QGVAR(tourniquets), []]) select {_x > 0 && {CBA_missionTime - _x > 120}}; + // Increase pain at a rate of 0.001 units/s per old tourniquet + _painStatus = _painStatus + (count _oldTourniquets) * 0.001 * _interval; + // Set the vitals _heartRate = (_unit getVariable [QGVAR(heartRate), 80]) + (([_unit] call FUNC(getHeartRateChange)) * _interval); _unit setVariable [QGVAR(heartRate), _heartRate max 0, _syncValues]; @@ -117,10 +122,11 @@ if (GVAR(level) >= 2) then { _bloodPressure = [_unit] call FUNC(getBloodPressure); _unit setVariable [QGVAR(bloodPressure), _bloodPressure, _syncValues]; - if (_painStatus > 0 && {_painStatus < 10}) then { - _painReduce = if (_painStatus > 5) then {0.002} else {0.001}; - _unit setVariable [QGVAR(pain), (_painStatus - _painReduce * _interval) max 0, _syncValues]; - }; + _painReduce = if (_painStatus > 5) then {0.002} else {0.001}; + + // @todo: replace this and the rest of the setVariable with EFUNC(common,setApproximateVariablePublic) + _unit setVariable [QGVAR(pain), (_painStatus - _painReduce * _interval) max 0, _syncValues]; + TRACE_8("ACE_DEBUG_ADVANCED_VITALS",_painStatus,_painReduce,_heartRate,_bloodVolume,_bloodPressure,_interval,_syncValues,_unit); // TODO Disabled until implemented fully // Handle airway diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf index 868b07fbf4..504135c204 100644 --- a/addons/medical/functions/fnc_init.sqf +++ b/addons/medical/functions/fnc_init.sqf @@ -86,4 +86,4 @@ _unit setVariable [QGVAR(allLogs), [], true]; // items [{ _this call FUNC(itemCheck); -}, [_unit], 0.5, 0.1] call EFUNC(common,waitAndExecute); +}, [_unit], 0.5, 0.1] call CBA_fnc_waitAndExecute; diff --git a/addons/medical/functions/fnc_isInMedicalFacility.sqf b/addons/medical/functions/fnc_isInMedicalFacility.sqf index f934978d2b..313ee8eca4 100644 --- a/addons/medical/functions/fnc_isInMedicalFacility.sqf +++ b/addons/medical/functions/fnc_isInMedicalFacility.sqf @@ -19,7 +19,7 @@ params ["_unit"]; //Cache the results as this function could be called rapidly (_unit getVariable [QGVAR(cacheInFacility), [-9, false]]) params ["_expireTime", "_lastResult"]; -if (ACE_time < _expireTime) exitWith {_lastResult}; +if (CBA_missionTime < _expireTime) exitWith {_lastResult}; private _eyePos = eyePos _unit; private _isInBuilding = false; @@ -58,6 +58,6 @@ if (!_isInBuilding) then { }; //Save the results (with a 1 second expiry) -_unit setVariable [QGVAR(cacheInFacility), [ACE_time + 1, _isInBuilding]]; +_unit setVariable [QGVAR(cacheInFacility), [CBA_missionTime + 1, _isInBuilding]]; _isInBuilding; diff --git a/addons/medical/functions/fnc_litterCleanupLoop.sqf b/addons/medical/functions/fnc_litterCleanupLoop.sqf new file mode 100644 index 0000000000..00e301be6e --- /dev/null +++ b/addons/medical/functions/fnc_litterCleanupLoop.sqf @@ -0,0 +1,33 @@ +/* + * Author: Glowbal, esteldunedain + * Loop that cleans up litter + * + * Arguments: + * None + * + * ReturnValue: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +{ + _x params ["_time", "_objects"]; + if (CBA_missionTime - _time >= GVAR(litterCleanUpDelay)) then { + { + deleteVehicle _x; + } forEach _objects; + GVAR(allCreatedLitter) set[_forEachIndex, objNull]; + }; +} forEach GVAR(allCreatedLitter); +GVAR(allCreatedLitter) = GVAR(allCreatedLitter) - [objNull]; + +// If no more litter remaining, exit the loop +if ( (count GVAR(allCreatedLitter)) == 0) exitWith { + GVAR(litterPFHRunning) = false; +}; + +// Schedule the loop to be executed again 30 sec later +[DFUNC(litterCleanupLoop), [], 30] call CBA_fnc_waitAndExecute; diff --git a/addons/medical/functions/fnc_medicationEffectLoop.sqf b/addons/medical/functions/fnc_medicationEffectLoop.sqf new file mode 100644 index 0000000000..00ef00a82c --- /dev/null +++ b/addons/medical/functions/fnc_medicationEffectLoop.sqf @@ -0,0 +1,42 @@ +/* + * Author: Glowbal, esteldunedain + * Medication effect loop for an injection. + * + * Arguments: + * 0: Unit + * 1: Name of the Variable that is affected + * 2: Proportion of the effect applied + * 3: Rate at which the effect is applied + * 4: Viscosity adjustment rate + * 5: Pain reduction rate + * + * ReturnValue: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_unit", "_variableName", "_amountDecreased","_decreaseRate", "_viscosityAdjustmentRate", "_painReduceRate"]; + +// If the unit died the loop is finished +if (!alive _unit) exitWith {}; + +// If locality changed finish the local loop +if (!local _unit) exitWith {}; + +// Apply medicinal effect +private _usedMeds = (_unit getVariable [_variableName, 0]) - _decreaseRate; +_unit setVariable [_variableName, _usedMeds]; + +// Restore the viscosity while the medication is leaving the system +_unit setVariable [QGVAR(peripheralResistance), ((_unit getVariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustmentRate) max 0]; +_unit setVariable [QGVAR(painSuppress), ((_unit getVariable [QGVAR(painSuppress), 0]) - _painReduceRate) max 0]; + +// Exit if the medication has finished it's effect +_amountDecreased = _amountDecreased + _decreaseRate; +if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _unit) exitWith {}; + +// Schedule the loop to be executed again 1 sec later +[DFUNC(medicationEffectLoop), [_unit, _variableName, _amountDecreased, _decreaseRate, _viscosityAdjustmentRate, _painReduceRate], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index 02e5985297..f36a87855b 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -24,10 +24,10 @@ if (GVAR(level) < 2 || {!([_target] call FUNC(hasMedicalEnabled))}) exitWith { _pointDamage = (_target getVariable [QGVAR(bodyPartStatus), [0,0,0,0,0,0]]) select _selectionN; if (_pointDamage >= 0.8) exitWith { - _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; + _actionData set [2, QPATHTOF(UI\icons\medical_crossRed.paa)]; }; if (_pointDamage > 0) exitWith { - _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossYellow.paa))]; + _actionData set [2, QPATHTOF(UI\icons\medical_crossYellow.paa)]; }; }; @@ -36,6 +36,6 @@ _openWounds = _target getVariable [QGVAR(openWounds), []]; { _x params ["", "", "_selectionX", "_amountOf", "_x4"]; if (_amountOf > 0 && {(_selectionN == _selectionX)} && {_x4 > 0}) exitWith { - _actionData set [2, QUOTE(PATHTOF(UI\icons\medical_crossRed.paa))]; + _actionData set [2, QPATHTOF(UI\icons\medical_crossRed.paa)]; }; } forEach _openWounds; diff --git a/addons/medical/functions/fnc_moduleMedicalSettings.sqf b/addons/medical/functions/fnc_moduleMedicalSettings.sqf index dbf3d8084d..29398bbc35 100644 --- a/addons/medical/functions/fnc_moduleMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleMedicalSettings.sqf @@ -33,4 +33,4 @@ if !(_activated) exitWith {}; [_logic, QGVAR(bleedingCoefficient), "bleedingCoefficient"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(painCoefficient), "painCoefficient"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(keepLocalSettingsSynced), "keepLocalSettingsSynced"] call EFUNC(common,readSettingFromModule); -[_logic, QGVAR(delayUnconCaptive), "delayUnconCaptive"] call EFUNC(common,readSettingFromModule); +// [_logic, QGVAR(delayUnconCaptive), "delayUnconCaptive"] call EFUNC(common,readSettingFromModule); diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index fc7e8daa2d..28b1d4dd0b 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -77,22 +77,5 @@ if (_hasOverDosed > 0 && GVAR(enableOverdosing)) then { _decreaseAmount = 1 / _timeInSystem; _viscosityAdjustment = _viscosityChange / _timeInSystem; -[{ - params ["_args", "_idPFH"]; - _args params ["_target", "_timeInSystem", "_variable", "_amountDecreased","_decreaseAmount", "_viscosityAdjustment", "_painReduce"]; - private "_usedMeds"; - _usedMeds = _target getVariable [_variable, 0]; - _usedMeds = _usedMeds - _decreaseAmount; - _target setVariable [_variable, _usedMeds]; - - _amountDecreased = _amountDecreased + _decreaseAmount; - - // Restoring the viscosity while the medication is leaving the system - _target setVariable [QGVAR(peripheralResistance), ((_target getVariable [QGVAR(peripheralResistance), 100]) - _viscosityAdjustment) max 0]; - _target setVariable [QGVAR(painSuppress), ((_target getVariable [QGVAR(painSuppress), 0]) - _painReduce) max 0]; - - if (_amountDecreased >= 1 || (_usedMeds <= 0) || !alive _target) then { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - _args set [3, _amountDecreased]; -}, 1, [_target, _timeInSystem, _variable, 0, _decreaseAmount, _viscosityAdjustment, _painReduce / _timeInSystem] ] call CBA_fnc_addPerFrameHandler; +// Run the loop that computes the effect of the medication over time +[_target, _variable, 0, _decreaseAmount, _viscosityAdjustment, _painReduce / _timeInSystem] call FUNC(medicationEffectLoop); diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index 6dae7ab276..38b967b03e 100644 --- a/addons/medical/functions/fnc_playInjuredSound.sqf +++ b/addons/medical/functions/fnc_playInjuredSound.sqf @@ -76,7 +76,7 @@ if (_pain > 0 && {[_unit] call EFUNC(common,isAwake)}) exitWith { // Clean up the lock [{ (_this select 0) setVariable [QGVAR(playingInjuredSound),nil]; - }, [_unit], _delay, _delay] call EFUNC(common,waitAndExecute); + }, [_unit], _delay, _delay] call CBA_fnc_waitAndExecute; }; // Clean up in case there has not been played any sounds. diff --git a/addons/medical/functions/fnc_reviveStateLoop.sqf b/addons/medical/functions/fnc_reviveStateLoop.sqf new file mode 100644 index 0000000000..bfc55ae6d8 --- /dev/null +++ b/addons/medical/functions/fnc_reviveStateLoop.sqf @@ -0,0 +1,56 @@ +/* + * Author: Glowbal, esteldunedain + * Loop that handles a unit in the revive state. + * + * Arguments: + * 0: Unit + * + * ReturnValue: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_unit"]; + +// If locality changed finish the local loop +// @todo: reinitiate the loop elsewhere +if (!local _unit) exitWith {}; + +private _startTime = _unit getVariable [QGVAR(reviveStartTime), 0]; + +// Remove heartbeat +if (GVAR(level) >= 2) then { + if (_unit getVariable [QGVAR(heartRate), 60] > 0) then { + _unit setVariable [QGVAR(heartRate), 0]; + }; +}; + +// If we are in revive state in a blown up vehicle, try to unload so that people can access the body +if ((alive _unit) && {(vehicle _unit) != _unit} && {!alive (vehicle _unit)}) then { + TRACE_2("Unloading", _unit, vehicle _unit); + [_unit] call EFUNC(common,unloadPerson); +}; + +// If the timer run out, let the unit die and exit the loop +if (GVAR(maxReviveTime) > 0 && {CBA_missionTime - _startTime > GVAR(maxReviveTime)}) exitwith { + _unit setVariable [QGVAR(inReviveState), nil, true]; + _unit setVariable [QGVAR(reviveStartTime), nil]; + [_unit, true] call FUNC(setDead); +}; + +// If the unit was taken out from revive state, exit the loop +if !(_unit getVariable [QGVAR(inReviveState), false]) exitwith { + // Revived without dieing, so in case we have lifes, remove one. + if (GVAR(amountOfReviveLives) > 0) then { + _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; + _unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true]; + }; + + _unit setVariable [QGVAR(reviveStartTime), nil]; +}; + +// Schedule the loop to be executed again 1 sec later +[DFUNC(reviveStateLoop), [_unit], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/medical/functions/fnc_serverRemoveBody.sqf b/addons/medical/functions/fnc_serverRemoveBody.sqf index de089b199b..311199b1b8 100644 --- a/addons/medical/functions/fnc_serverRemoveBody.sqf +++ b/addons/medical/functions/fnc_serverRemoveBody.sqf @@ -26,23 +26,9 @@ TRACE_2("",_target,isPlayer _target); if (isNil QGVAR(bodiesToDelete)) then {GVAR(bodiesToDelete) = [];}; GVAR(bodiesToDelete) pushBack _target; -//Start up PFEH to wait for bodies to be free to delete -if ((count GVAR(bodiesToDelete)) == 1) then { - TRACE_1("starting PFEH",GVAR(bodiesToDelete)); - [{ - { - TRACE_2("body",_x,isPlayer _x); - if ((!isNull _x) && {!isPlayer _x}) then {deleteVehicle _x}; - } forEach GVAR(bodiesToDelete); - - //deleteVehicle doesn't have instant results so it won't usualy be filtered until next run - GVAR(bodiesToDelete) = GVAR(bodiesToDelete) - [objNull]; - - if (GVAR(bodiesToDelete) isEqualTo []) then { - TRACE_1("array emptied - rem PFEH",GVAR(bodiesToDelete)); - [_this select 1] call CBA_fnc_removePerFrameHandler; - }; - }, 20, []] call CBA_fnc_addPerFrameHandler; +// Start up a loop to wait for bodies to be free to delete +if ((count GVAR(bodiesToDelete)) > 0) then { + [] call FUNC(bodyCleanupLoop); }; nil diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 7b2c195f10..70e7d5c253 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -27,18 +27,17 @@ _unit setVariable [QGVAR(heartRate), 0]; _timeInCardiacArrest = 120 + round(random(600)); [{ - private ["_args","_unit","_startTime","_timeInCardiacArrest","_heartRate"]; params ["_args", "_idPFH"]; _args params ["_unit", "_startTime", "_timeInCardiacArrest"]; - _heartRate = _unit getVariable [QGVAR(heartRate), 80]; + private _heartRate = _unit getVariable [QGVAR(heartRate), 80]; if (_heartRate > 0 || !alive _unit) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; _unit setVariable [QGVAR(inCardiacArrest), nil,true]; }; - if (ACE_time - _startTime >= _timeInCardiacArrest) exitWith { + if (CBA_missionTime - _startTime >= _timeInCardiacArrest) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; _unit setVariable [QGVAR(inCardiacArrest), nil,true]; [_unit] call FUNC(setDead); }; -}, 1, [_unit, ACE_time, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler; +}, 1, [_unit, CBA_missionTime, _timeInCardiacArrest] ] call CBA_fnc_addPerFrameHandler; diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index 913431ccac..d68ba0e41f 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -38,44 +38,11 @@ if (((_reviveVal == 1 && {[_unit] call EFUNC(common,isPlayer)} || _reviveVal == }; _unit setVariable [QGVAR(inReviveState), true, true]; - _unit setVariable [QGVAR(reviveStartTime), ACE_time]; + _unit setVariable [QGVAR(reviveStartTime), CBA_missionTime]; [_unit, true] call FUNC(setUnconscious); - [{ - private "_startTime"; - params ["_args", "_idPFH"]; - _args params ["_unit"]; - _startTime = _unit getVariable [QGVAR(reviveStartTime), 0]; - - //If we are in reivie state in a blown up vehicle, try to unload so that people can access the body - if ((alive _unit) && {(vehicle _unit) != _unit} && {!alive (vehicle _unit)}) then { - TRACE_2("Unloading", _unit, vehicle _unit); - [_unit] call EFUNC(common,unloadPerson); - }; - - if (GVAR(maxReviveTime) > 0 && {ACE_time - _startTime > GVAR(maxReviveTime)}) exitwith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - _unit setVariable [QGVAR(inReviveState), nil, true]; - _unit setVariable [QGVAR(reviveStartTime), nil]; - [_unit, true] call FUNC(setDead); - }; - - if !(_unit getVariable [QGVAR(inReviveState), false]) exitwith { - // revived without dieing, so in case we have lifes, remove one. - if (GVAR(amountOfReviveLives) > 0) then { - _lifesLeft = _unit getVariable[QGVAR(amountOfReviveLives), GVAR(amountOfReviveLives)]; - _unit setVariable [QGVAR(amountOfReviveLives), _lifesLeft - 1, true]; - }; - - _unit setVariable [QGVAR(reviveStartTime), nil]; - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - if (GVAR(level) >= 2) then { - if (_unit getVariable [QGVAR(heartRate), 60] > 0) then { - _unit setVariable [QGVAR(heartRate), 0]; - }; - }; - }, 1, [_unit] ] call CBA_fnc_addPerFrameHandler; + // Run the loop that tracks the revive state + [_unit ] call FUNC(reviveStateLoop); false; }; @@ -92,7 +59,7 @@ if (isPLayer _unit) then { if (!_delaySetDamage) then { [_unit, 1] call FUNC(setStructuralDamage); } else { - [FUNC(setStructuralDamage), [_unit, 1]] call EFUNC(common,execNextFrame); + [FUNC(setStructuralDamage), [_unit, 1]] call CBA_fnc_execNextFrame; }; true; diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index 25bc8aacb5..dbeecce939 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -103,7 +103,7 @@ if (GVAR(delayUnconCaptive) == 0) then { if (_unit getVariable ["ACE_isUnconscious", false]) then { [_unit, "setCaptive", QGVAR(unconscious), true] call EFUNC(common,statusEffect_set); }; - },[_unit], GVAR(delayUnconCaptive)] call EFUNC(common,waitAndExecute); + },[_unit], GVAR(delayUnconCaptive)] call CBA_fnc_waitAndExecute; }; _anim = [_unit] call EFUNC(common,getDeathAnim); @@ -113,9 +113,9 @@ _anim = [_unit] call EFUNC(common,getDeathAnim); if ((_unit getVariable "ACE_isUnconscious") and (animationState _unit != _anim)) then { [_unit, _anim, 2, true] call EFUNC(common,doAnimation); }; -}, [_unit, _anim], 0.5, 0] call EFUNC(common,waitAndExecute); +}, [_unit, _anim], 0.5, 0] call CBA_fnc_waitAndExecute; -_startingTime = ACE_time; +_startingTime = CBA_missionTime; [DFUNC(unconsciousPFH), 0.1, [_unit, _originalPos, _startingTime, _minWaitingTime, false, vehicle _unit isKindOf "ParachuteBase"] ] call CBA_fnc_addPerFrameHandler; diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf index 98a4cf8c51..e6624507d1 100644 --- a/addons/medical/functions/fnc_translateSelections.sqf +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -46,7 +46,7 @@ if (_hitPointIndex isEqualTo true) exitWith { if (!isNil {_unit getHitPointDamage _returnHitPoint}) exitWith { _returnHitPoint; }; - + //Those VR fuckers have weird limb hitpoints private _hitPoints = switch (_selection) do { case ("hand_l"): {L_ARM_HITPOINTS}; diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index d7f80edc35..dfb0584e9f 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -23,7 +23,7 @@ params ["_caller", "_target", "_selectionName", "_className"]; if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitwith { [{ _this call FUNC(treatment); - }, _this] call EFUNC(common,execNextFrame); + }, _this] call CBA_fnc_execNextFrame; }; if !(_target isKindOf "CAManBase") exitWith {false}; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf index 07431ac66d..1a546dd8d0 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf @@ -20,7 +20,7 @@ params ["_caller","_target"]; if (_target getVariable [QGVAR(inReviveState), false]) then { _reviveStartTime = _target getVariable [QGVAR(reviveStartTime),0]; if (_reviveStartTime > 0) then { - _target setVariable [QGVAR(reviveStartTime), (_reviveStartTime + random(20)) min ACE_time]; + _target setVariable [QGVAR(reviveStartTime), (_reviveStartTime + random(20)) min CBA_missionTime]; }; }; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf index 5c02ecc0cb..5cfe73ab8d 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf @@ -15,7 +15,7 @@ #include "script_component.hpp" -private ["_openWounds", "_config", "_effectiveness","_mostEffectiveInjury", "_mostEffectiveSpot", "_woundEffectivenss", "_mostEffectiveInjury", "_impact", "_exit", "_classID", "_effectivenessFound", "_className", "_hitPoints", "_hitSelections", "_point", "_woundTreatmentConfig"]; +private ["_openWounds", "_config", "_effectiveness","_mostEffectiveInjury", "_mostEffectiveSpot", "_woundEffectiveness", "_mostEffectiveInjury", "_impact", "_exit", "_classID", "_effectivenessFound", "_className", "_hitPoints", "_hitSelections", "_point", "_woundTreatmentConfig"]; params ["_target", "_bandage", "_selectionName", ["_specificClass", -1]]; // Ensure it is a valid bodypart @@ -44,7 +44,7 @@ _exit = false; TRACE_2("OPENWOUND: ", _target, _x); // Only parse injuries that are for the selected bodypart. if (_partX == _part) then { - _woundEffectivenss = _effectiveness; + _woundEffectiveness = _effectiveness; // Select the classname from the wound classname storage _className = GVAR(woundClassNames) select _classID; @@ -54,7 +54,7 @@ _exit = false; // Collect the effectiveness from the used bandage for this wound type _woundTreatmentConfig = (_config >> _className); if (isNumber (_woundTreatmentConfig >> "effectiveness")) then { - _woundEffectivenss = getNumber (_woundTreatmentConfig >> "effectiveness"); + _woundEffectiveness = getNumber (_woundTreatmentConfig >> "effectiveness"); }; } else { ACE_LOGWARNING_2("No config for wound type [%1] config base [%2]", _className, _config); @@ -62,15 +62,15 @@ _exit = false; TRACE_2("Wound classes: ", _specificClass, _classID); if (_specificClass == _classID) exitWith { - _effectivenessFound = _woundEffectivenss; + _effectivenessFound = _woundEffectiveness; _mostEffectiveSpot = _forEachIndex; _mostEffectiveInjury = _x; _exit = true; }; // Check if this is the currently most effective found. - if (_woundEffectivenss * ((_x select 4) * (_x select 3)) > _effectivenessFound * ((_mostEffectiveInjury select 4) * (_mostEffectiveInjury select 3))) then { - _effectivenessFound = _woundEffectivenss; + if (_woundEffectiveness * ((_x select 4) * (_x select 3)) > _effectivenessFound * ((_mostEffectiveInjury select 4) * (_mostEffectiveInjury select 3))) then { + _effectivenessFound = _woundEffectiveness; _mostEffectiveSpot = _forEachIndex; _mostEffectiveInjury = _x; }; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf index 2c3cf4cc41..85f8485f6b 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -64,6 +64,7 @@ if (isNil _hrCallback) then { } else { _hrCallback = missionNamespace getVariable _hrCallback; }; +if (!(_hrCallback isEqualType {})) then {_hrCallback = {TRACE_1("callback was NOT code",_hrCallback)};}; // Adjust the heart rate based upon config entry _heartRate = _target getVariable [QGVAR(heartRate), 70]; diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf index be9b03c9f1..b8acc27c74 100644 --- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf @@ -16,32 +16,12 @@ private ["_tourniquets", "_part", "_applyingTo"]; params ["_target", "_tourniquetItem", "_selectionName"]; -[_target] call FUNC(addToInjuredCollection); +//If we're not already tracking vitals, start: +[_target] call FUNC(addVitalLoop); _part = [_selectionName] call FUNC(selectionNameToNumber); // Place a tourniquet on the bodypart _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; -_applyingTo = (_tourniquets select _part) + 1 + round(random(100)); -_tourniquets set[_part, _applyingTo]; +_tourniquets set [_part, CBA_missionTime]; _target setVariable [QGVAR(tourniquets), _tourniquets, true]; - -[{ - params ["_args", "_idPFH"]; - _args params ["_target", "_applyingTo", "_part", "_time"]; - - if (!alive _target) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - - _tourniquets = _target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]; - if !((_tourniquets select _part) == _applyingTo) exitWith { - // Tourniquet has been removed - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - if (ACE_time - _time > 120) then { - _target setVariable [QGVAR(pain), (_target getVariable [QGVAR(pain), 0]) + 0.005]; - }; -}, 5, [_target, _applyingTo, _part, ACE_time] ] call CBA_fnc_addPerFrameHandler; - -true diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf index d8a4d3b336..a9ef534346 100644 --- a/addons/medical/functions/fnc_treatment_success.sqf +++ b/addons/medical/functions/fnc_treatment_success.sqf @@ -92,7 +92,7 @@ _args call FUNC(createLitter); //If we're not already tracking vitals, start: if (!(_target getVariable [QGVAR(addedToUnitLoop),false])) then { - [_target] call FUNC(addToInjuredCollection); + [_target] call FUNC(addVitalLoop); }; ["medical_treatmentSuccess", [_caller, _target, _selectionName, _className]] call EFUNC(common,localEvent); diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf index e78c80f3ec..055753a0f3 100644 --- a/addons/medical/functions/fnc_unconsciousPFH.sqf +++ b/addons/medical/functions/fnc_unconsciousPFH.sqf @@ -130,13 +130,13 @@ if (_parachuteCheck) then { if (!local _unit) exitWith { TRACE_6("ACE_DEBUG_Unconscious_PFH",_unit, _args, _startingTime, _minWaitingTime, _idPFH, _unit getVariable QGVAR(unconsciousArguments)); - _args set [3, _minWaitingTime - (ACE_time - _startingTime)]; + _args set [3, _minWaitingTime - (CBA_missionTime - _startingTime)]; _unit setVariable [QGVAR(unconsciousArguments), _args, true]; [_idPFH] call CBA_fnc_removePerFrameHandler; }; // Ensure we are waiting at least a minimum period before checking if we can wake up the unit again, allows for temp knock outs -if ((ACE_time - _startingTime) >= _minWaitingTime) exitWith { +if ((CBA_missionTime - _startingTime) >= _minWaitingTime) exitWith { TRACE_2("ACE_DEBUG_Unconscious_Temp knock outs",_unit, [_unit] call FUNC(getUnconsciousCondition)); if (!([_unit] call FUNC(getUnconsciousCondition))) then { _unit setVariable ["ACE_isUnconscious", false, true]; diff --git a/addons/medical/functions/fnc_vitalLoop.sqf b/addons/medical/functions/fnc_vitalLoop.sqf new file mode 100644 index 0000000000..6e5bb7fb2b --- /dev/null +++ b/addons/medical/functions/fnc_vitalLoop.sqf @@ -0,0 +1,48 @@ +/* + * Author: Glowbal, esteldunedain + * Vital loop for a unit. + * + * Arguments: + * 0: The Unit + * 1: Time of last computation + * + * ReturnValue: + * None + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_unit", "_lastTime"]; + +// If the unit died the loop is finished +if (!alive _unit) exitWith {}; + +// If locality changed, broadcast the last medical state and finish the local loop +if (!local _unit) exitWith { + if (GVAR(level) >= 2) then { + _unit setVariable [QGVAR(heartRate), _unit getVariable [QGVAR(heartRate), 80], true]; + _unit setVariable [QGVAR(bloodPressure), _unit getVariable [QGVAR(bloodPressure), [80, 120]], true]; + }; + _unit setVariable [QGVAR(bloodVolume), _unit getVariable [QGVAR(bloodVolume), 100], true]; +}; + +// Handle unit vitals +[_unit, CBA_missionTime - _lastTime] call FUNC(handleUnitVitals); + +// Play injured sounds +private _pain = _unit getVariable [QGVAR(pain), 0]; +if (_pain > (_unit getVariable [QGVAR(painSuppress), 0])) then { + // This introduces wierd unconscious behaviour for basic medical and possibly also advanced. + // TODO This is disabled as it's considered non critical code. + // We will need to decide if we want unconscious triggered on high pain levels or if we can get rid of this entirely. + /*if (_pain > 0.7 && {random(1) > 0.6}) then { + [_unit] call FUNC(setUnconscious); + };*/ + + [_unit, _pain] call FUNC(playInjuredSound); +}; + +// Schedule the loop to be executed again 1 sec later +[DFUNC(vitalLoop), [_unit, CBA_missionTime], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index cee500b5d5..34172b6b09 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -54,6 +54,9 @@ Adenosin injizieren Inyectar Adenosina Wstrzyknij adenozynę + Injecter de l'adénosine + Inietta andenosina + Aplikovat adenosine Injetar Adenosina @@ -253,6 +256,9 @@ Adenosin injizieren... Inyectando Adenosina... Wstrzykiwanie adenozyny... + Injection d'adénosine... + Inietto l'andenosina + Aplikuji adenosine... Injetando Adenosina... @@ -361,14 +367,14 @@ Bendaggio compressivo Bandage gauze Bandagem de Compressão - Tlakový obvaz + Obvaz Tlakový Elastic Bandage Elastischer Verband Vendaje elástico Давящая повязка - Elastické obinadlo + Obavaz Elastický Bandaż elastyczny Pansement élastique Rögzitő kötszer @@ -442,7 +448,7 @@ Жгут Škrtidlo Staza - Tourniquet + Garrot Érszorító Laccio emostatico Torniquete @@ -454,7 +460,7 @@ Снять жгут Sundat škrtidlo Zdejmij stazę - Enlever le Tourniquet + Enlever le garrot Érszorító leszedése Rimuovi laccio emostatico Remover Torniquete @@ -764,7 +770,7 @@ Tourniquet [CAT] Жгут Torniquete [CAT] - Tourniquet [CAT] + Garrot [CAT] Staza [typ. CAT] Škrtidlo [CAT] Érszorító [CAT] @@ -829,14 +835,14 @@ Nyomókötszer Bendaggio compressivo Bandagem de Compressão - Tlakový obvaz + Obvaz (Tlakový) Used to pack medium to large wounds and stem the bleeding Wird verwendet, um mittlere bis große Wunden abzudecken und Blutungen zu stoppen Для тампонирования ран среднего и большого размера и остановки кровотечения. Se utiliza para vendar heridas medianas o grandes y detener el sangrado - Utilisé pour couvrir des blessures de taille moyenne à grande. Arrête l'hémorragies + Utilisé pour couvrir des blessures de taille moyenne à grande. Arrête l'hémorragie. Używany w celu opatrywania średnich i dużych ran oraz tamowania krwawienia. Dobrze radzi sobie z tamowaniem ran płatowych oraz postrzałowych. Közepestől nagyig terjedő sebek betakarására és vérzés elállítására használt kötszer Usato su ferite medie o larghe per fermare emorragie. @@ -847,7 +853,7 @@ A bandage used to pack the wound to stem bleeding and facilitate wound healing. Packing a wound is an option in large polytrauma injuries. Повязка для тампонирования раны, остановки кровотечения и лучшего заживления. При тяжёлых сочетанных ранениях возможно тампонирование раны. Se utiliza para detener la hemorragia de una herida y favorecer su cicatrización. Se usa en grandes lesiones o politraumatismos. - Bandage servant à recouvrir les blessures pour arrêter les hémmoragies et faciliter la guérisson. Recouvrir une blessure est optionnel dans le cas de blessures polytraumatiques + Bandage servant à recouvrir les blessures pour arrêter les hémoragies et faciliter la guérison. Recouvrir une blessure est optionnel dans le cas de blessures polytraumatiques. Opatrunek stosowany w celu zatrzymania krwawienia i osłony większych ran. Egy kötszerfajta, melyet a sebek nyomására használnak a vérzés elállítása és sebgyógyulás érdekében. A nyomókötés egy lehetőség nagyobb polytraumatikus sérülések esetén. Un bendaggio usato per coprire la ferita, fermare il sanguinamento e facilitarne la guarigione. Questa tecnica è opzionale su ferite multiple. @@ -862,7 +868,7 @@ Vendaje (Elástico) Bandage (Élastique) Bandaż (elastyczny) - Obvaz (elastický) + Obvaz (Elastický) Rögzító kötszer Benda (elastica) Bandagem (Elástica) @@ -896,7 +902,7 @@ Tourniquet [CAT] Жгут Torniquete (CAT) - Tourniquet (CAT) + Garrot (CAT) Staza (typ. CAT) Škrtidlo (CAT) Érszorító (CAT) @@ -934,7 +940,7 @@ Morfina auto-inyectable Auto-injecteur de Morphine Autostrzykawka z morfiną - Autoinjektor morfin + Auto-morfin Morfium autoinjektor Autoiniettore di morfina Auto-injetor de morfina @@ -968,6 +974,9 @@ Adenosin-Autoinjektor Asenosina auto-inyectable Autostrzykawka z adenozyną + Auto-injécteur d'adénosine + Autoiniettore di adenosina + Auto-adenosine Auto-injetor de Adenosina @@ -975,6 +984,9 @@ Wird verwendet um die Symptome von Epiniphrin zu lindern Utilizada para contrarrestar los effectos de la Epinefrina Adenozyna. Stosowana do zwalczania efektów działania adrenaliny. + Utilisé pour contrer les effets de l'adrénaline + Usato per contrastare l'effetto dell'epinefrina + Slouží jako protiváha Adrenalinu Usado para combater os efeitos da Epinefrina @@ -982,6 +994,9 @@ Ein Medikament, das die Symptome von Epiniphrin bekämpft. Medicamento usado para contrarrestar los efectos de la Epinefrina. Organiczny związek chemiczny z grupy nukleozydów. Skuteczna w leczeniu częstoskurczu komorowego. Działa rozszerzająco na naczynia krwionośne. + Un composé utilisé pour contrer les effets de l'adrénaline + Medicamento usato per contrastare l'effetto dell'epinefrina + Droga používaná k tlumení efektu Adrenalinu Uma droga usada para combater os efeitos da Epinefrina @@ -991,7 +1006,7 @@ Auto-injecteur d'Atropine Autostrzykawka AtroPen Atropin-Autoinjektor - Autoinjektor atropin + Auto-atropine Atropin autoinjektor Autoiniettore di atropina Auto-injetor de Atropina @@ -1027,7 +1042,7 @@ Auto-injecteur d'épinéphrine Autostrzykawka EpiPen Epiniphrin-Autoinjektor - Autoinjektor adrenalin + Auto-adrenalin Epinefrin autoinjektor Autoiniettore di adrenalina Auto-injetor de epinefrina @@ -1132,7 +1147,7 @@ Blood IV, for restoring a patients blood (keep cold) Пакет крови для возмещения объёма потерянной крови (хранить в холодильнике) Sangre intravenosa, para restarurar el volumen sanguíneo (mantener frío) - Cullot sanguin O- ,utiliser seulement lors de perte sanguine majeur afin de remplacer le volume sanguin perdu. Habituelment utiliser lors du transport ou dans un etablisement de soin. + Cullot sanguin O-, utilisé seulement lors de perte sanguine majeure afin de remplacer le volume sanguin perdu. Habituelment utilisé lors du transport ou dans un etablisement de soins. Krew IV, używana do uzupełnienia krwi u pacjenta, trzymać w warunkach chłodniczych. Vér-infúzió, intravénás bejuttatásra egy páciensnek (hidegen tárolandó) Sangue usato per ripristinare pazienti in cui si è verificata una perdita di sangue (conservare al fresco) @@ -1146,7 +1161,7 @@ Krew 0 Rh-, używana w rzadkich i szczególnych przypadkach do uzupełnienia krwi u pacjenta, zazwyczaj w trakcie fazie transportu rannej osoby do szpitala. Utilice sólo durante gran pérdida de sangre para reemplazar el volumen de sangre perdida. Uso habitual durante el transporte de heridos. Sangue 0 negativo usato per ripristinare sangue in pazienti in cui si è verificata una perdita di sangue. - Cullot sanguin O- utilisé dans de rares et stricts cas pour compléter une perte de sang importante. Administré normalement lors d'un MEDEVAC + Cullot sanguin O- utilisé dans de rares et stricts cas pour compléter une perte de sang importante. Administré normalement lors d'un MEDEVAC. O Negative Blutinfusion wird nur in seltenen Fällen verwendet, um den Bluthaushalt des Patienten zu ergänzen. Wird in der Regel wärend der Transportphase durchgeführt. Sangue O- , utilizado em casos raros para rapidamente repor o sangue. Uso habitual ocorre durante o transporte ou em estações de tratamento. Nullás vércsoportú, Rh-negatív vér-infúzió, melyet kritikus és ritka helyzetekben vérutánpótlásra használnak, jellemzően az orvosi ellátás szállítási fázisa közben. @@ -1282,7 +1297,7 @@ Elsősegélycsomag Pronto soccorso personale Kit De Primeiros Socorros Pessoal - Osobní lékárnička + Osobní lékárnička (PAK) Includes various treatment kit needed for stitching or advanced treatment @@ -1317,7 +1332,7 @@ Usar equipo de primeros auxilios Elsősegélycsomag használata Usar o kit de primeiros socorros - Použít osobní lékárničku + Použít osobní lékárničku (PAK) Usa il pronto soccorso personale @@ -1426,7 +1441,7 @@ Vérnyomás megmérése... Controllando la pressione sanguigna.. Aferindo Pressão Arterial... - Kontroluji krevní tlak... + Měřím krevní tlak... %1 checked Blood Pressure: %2 @@ -1437,7 +1452,7 @@ %1 sprawdził ciśnienie krwi: %2 %1 verificada la presión arterial: %2 %1 ellenőrizte a vérnyomást: %2 - %1 zkontrolován krevní tlak: %2 + %1 zkontroloval krevní tlak: %2 %1 verificou pressão arterial: %2 @@ -1462,7 +1477,7 @@ Wyczuwasz ciśnienie krwi o wartości %2/%3 Der Blutdruck liegt bei %2/%3 A Pressão Arterial é de %2/%3 - Našel jsi krevní tlak u %2/%3 + Naměřil si krevní tlak u %2/%3 You find a low blood pressure @@ -1474,7 +1489,7 @@ A vérnyomás alacsony La pressione sanguigna è bassa Pressão Arterial baixa - Naměřil jsi nízký krevní tlak + Naměřil si nízký krevní tlak You find a normal blood pressure @@ -1486,7 +1501,7 @@ A vérnyomás normális La pressione sanguigna è normale Pressão Arterial normal - Naměřil jsi normální krevní tlak + Naměřil si normální krevní tlak You find a high blood pressure @@ -1498,7 +1513,7 @@ A vérnyomás magas La pressione sanguigna è alta Pressão Arterial Alta - Naměřil jsi vysoký krevní tlak + Naměřil si vysoký krevní tlak You find no blood pressure @@ -1510,7 +1525,7 @@ Nem észlelhető vérnyomás La pressione sanguigna è assente Sem Pressão Arterial - Nenaměřil jsi žádný krevní tlak + Nenaměřil si žádný krevní tlak You fail to find a blood pressure @@ -1522,7 +1537,7 @@ Nem sikerült a vérnyomás megmérése Manca strumento per misurare pressione sanguigna Você falhou em aferir a Pressão Arterial - Nedokázal jsi změřit krevní tlak + Nedokázal si změřit krevní tlak Low @@ -1582,7 +1597,7 @@ Pulzus Polso Pulso - Tep + Puls Checking Heart Rate... @@ -1606,7 +1621,7 @@ A %1 ellenőrizve Hai diagnosticato %1 Você aferiu o paciente %1 - Zkontroloval jsi %1 + Zkontroloval si %1 %1 checked Heart Rate: %2 @@ -1690,7 +1705,7 @@ A szívverés-szám alacsony Hai riscontrato un debole battito cardiaco Freqüência Cardíaca baixa - Nahmatal jsi slabý srdeční tep + Nahmatal si slabý srdeční puls You find a strong Heart Rate @@ -1702,7 +1717,7 @@ A szívverés-szám magas Hai riscontrato un forte battito cardiaco Freqüência Cardíaca normal - Nahmatal jsi silný srdeční tep + Nahmatal si silný srdeční puls You find a normal Heart Rate @@ -1714,7 +1729,7 @@ A szívverés-szám normális Hai riscontrato un normale battito cardiaco Freqüência Cardíaca alta - Nahmatal jsi normální srdeční tep + Nahmatal si normální srdeční puls You find no Heart Rate @@ -1726,7 +1741,7 @@ Nem észlelhető szívverés Hai riscontrato una assenza di battito cardiaco Sem Freqüência Cardíaca - Nenašel jsi + Žádný puls Response @@ -2100,7 +2115,7 @@ %1 aplicou bandagem no paciente %1 již obvázal pacienta - + %1 performed CPR %1 wykonał cykl RKO %1 provádí CPR @@ -2109,6 +2124,7 @@ %1 realizou RCP %1 провел сердечно-легочную реанимацию %1 realicó RCP + %1 à fait une RPC %1 used %2 @@ -2146,16 +2162,6 @@ %1 aplicou um torniquete %1 použil škrtidlo - - %1 performed CPR - %1 hat eine HLW durchgeführt - %1 wykonał cykl RKO - %1 провел сердечно-легочную реанимацию - %1 realicó RCP - %1 realizou RCP - %1 provádí CPR - %1 ha eseguito CPR - %1 used Personal Aid Kit %1 hat das eigene Erste-Hilfe-Set verwendet @@ -2165,6 +2171,7 @@ %1 использовал аптечку %1 ha usato Kit Pronto Soccorso Personale %1 usó Kit de Primeros Auxilios + %1 à utilisé un PAK Heavily wounded @@ -2175,7 +2182,7 @@ Gravemente herido Lourdement blessé Erősen sérült - Těžce zraněn + Těžce raněn Gravemente ferido @@ -2187,7 +2194,7 @@ Levemente herido Légèrement blessé Enyhén sérült - Lehce zraněn + Lehce raněn Levemente ferido @@ -2199,7 +2206,7 @@ Muy levemente herido Très légèrement blessé Nagyon enyhén sérült - Velmi lehce zraněn + Velmi lehce raněn Muito levemente ferido @@ -2282,6 +2289,7 @@ Curar hitpoints totalmente enfaixados Heal fully bandaged hitpoints Cura hitpoints completamente bendati + Soigner les plaies entièrement bandées. Heilt vollständig bandagierte Trefferpunkte @@ -2793,7 +2801,7 @@ Tourniquet entfernen... Zdejmowanie stazy... Quitando torniquete... - Retire le tourniquet... + Retire le garrot... Removendo torniquete... Érszorító eltávolítása... Sundavám škrtidlo... @@ -3066,7 +3074,7 @@ KI kann bewusstlos werden Umožňuje AI upadnout do bezvědomí Permite IA ficar inconsciente - Autoriser les IA à tomber inconsciente + Autoriser les IA à tomber inconscients Engedélyezi az AI eszméletének elvesztését Permetti alle IA di diventare incoscienti @@ -3102,7 +3110,7 @@ Verhindere direkten Tod Zabránit okamžité smrti Previnir morte instantânea - Empêcher la morte instantanée + Empêcher la mort instantanée Azonnali halál kiiktatása Previeni morte istantanea @@ -3207,6 +3215,9 @@ Standard Sanitätseinstellungen [ACE] Podstawowe ustawienia medyczne Ajustes médicos básicos [ACE] + Réglages du système médical basic [ACE] + Impostazioni Mediche Di Base [ACE] + Základní zdravotnické nastavení [ACE] Ajustes médicos básicos [ACE] @@ -3322,6 +3333,9 @@ Erlaube Epiniphrin Permitir Epinefrina Ograniczenia adrenaliny + Autoriser l'adrénaline + Permette epinefrina + Povolit adrenalin Permitir Epinefrina @@ -3329,6 +3343,9 @@ Wer darf Epiniphrin zur vollständigen Heilung benutzen? (Standard Sanitätseinstellungen) Configura quienes pueden usar Epinefrina (Solo sistema médico básico) Kto może skorzystać z adrenaliny w celu pełnego uleczenia? (Tylko podstawowy system medyczny) + Qui peut utiliser l'adrénaline pour les soins complets ? (Médical basique seulement) + Chi può usare l'epinefrina per la cura completa? (solo per sistema medico di base) + Kdo může použít adrenalin k úplnému vyléčení? (Pouze základní zdravotní systém) Quem pode usar Epinefrina para cura completa? (Somente sistema médico básico) @@ -3337,7 +3354,7 @@ Ustawienie apteczek osobistych Permitir EPA Erlaube Erste-Hilfe-Set - Povolit osobní lékárničky + Povolit osobní lékárničky (PAK) Permitir Kit de Primeiros Socorros Permettre le kit de premier secours Elsősegélycsomag engedélyezése @@ -3420,6 +3437,9 @@ Orte für Epiniphrin Ubicaciones epinefrina Ograniczenia adrenaliny + Position des adrénalines + Ubicazione epinefrina + Oblast k použití adrenalinu Localizações de Epinefrina @@ -3427,6 +3447,9 @@ Wo kann Epiniphrin verwendet werden? (Standard Sanitätseinstellungen) Configura donde puede usarse Epinefrina (Solo sistema médico básico) Gdzie można korzystać z adrenaliny? (Podstawowy system medyczny) + Où peuvent être utilisées les adrénalines ? (Médical basique) + Dove si può usare l'epinefrina? (Sistema medico di base) + Kde může být použit adrenalin? (Pouze základní zdravotní systém) Onde pode-se usar a Epinefrina? (Somente sistema médico básico) @@ -3435,7 +3458,7 @@ Ograniczenie apteczek osobistych Ubicaciones del EPA Orte für Erste-Hilfe-Set - Lokace osobní lékárničky + Oblast k použití PAK Localizações do KPS Lieu d'utilisation du KPS Elsősegélycsomag helyek @@ -3447,7 +3470,7 @@ Gdzie można korzystać z apteczek osobistych? ¿Dónde se puede utilizar el equipo de primeros auxilios? Wo kann das Erste-Hilfe-Set verwendet werden? - Kde může být použita osobní lékárnička? + Kde může být použita osobní lékárnička (PAK)? Onde o kit de primeiros socorros pode ser utilizado? Où le Kit de Premier Secour peut être utilisé Hol lehet az elsősegélycsomagot használni? @@ -3456,7 +3479,7 @@ Condition PAK Bedingungen für d. Erste-Hilfe-Set - Podmínka osobní lékárničky + Podmínky pro použití osobní lékárničky Condición EPA Condition d'utilisation du KPS Warunek apteczek @@ -3468,7 +3491,7 @@ When can the PAK be used? Wann kann das Erste-Hilfe-Set verwendet werden? - Kde může být použita osobní lékárnička? + Kdy může být použita osobní lékárnička? ¿Cuando se puede utilizar el Equipo de primeros auxilios? Quand peut être utilisé le Kit de Premier Secours Po spełnieniu jakich warunków apteczka osobista może zostać zastosowana na pacjencie? @@ -3483,7 +3506,7 @@ Wszędzie Donde sea Überall - Kdekoli + Kdekoliv Qualquer lugar PArtout Akárhol @@ -3630,6 +3653,7 @@ Curar hitpoints Léčit hitponty Cura Hitpoints + Soigner les dommages Heal fully bandaged hitpoints @@ -3640,6 +3664,7 @@ Curar totalmente hitpoints enfaixados Heal fully bandaged hitpoints Cura Hitpoints completamente bendati + Soigner les plaies entièrement bandées. Pain suppression @@ -3670,6 +3695,8 @@ Behandlungseinstellungen der Standard ACE-Medizin konfigurieren Configure las opciones de tratamiento del sistema médico básico de ACE Skonfiguruj ustawienia leczenia podstawowego systemu medycznego ACE + Configure les réglages de traitement dans ACE médical basique + Configura le impostazioni trattamenti per ACE Medical di base Configura as opções de tratamento do sistema médico básico do ACE @@ -4089,6 +4116,7 @@ La distancia hasta %1 se ha agrandado demasiado para el tratamiento %1 je příliš daleko, léčba není možná Distanza da %1 è diventata troppo alta per permettere trattamento + %1 est trop loin pour être soigné This person (%1) is awake and cannot be loaded @@ -4099,6 +4127,7 @@ Esta pessoa (%1) está acordada e não pode ser carregada Tato osoba (%1) je vzhůru a nemůže být naložena Questa persona (%1) è sveglia e non può essere caricata. + Cette personne (%1) est consciente et ne peut être chargées. There is no tourniquet on this body part! @@ -4109,6 +4138,7 @@ Não existe nenhum torniquete nesta parte do corpo! Žádné škrtidlo na této části těla! Non c'è nessun laccio emostatico su questa parte del corpo! + Il n'y a pas de garrot sur ce membre ! Medical training @@ -4116,6 +4146,8 @@ Addestramento Medico Sanitätsausbildung Entrenamiento médico + Entraînement médical + Lékařský výcvik Treino médico @@ -4124,23 +4156,23 @@ L'oggetto in questione sarà un veicolo medico o meno. Legt fest, ob das Objekt ein Sanitätsfahrzeug ist. Es un vehículo médico? + Définit si le véhicule est un véhicule médical ou non. Se o objeto será ou não um veículo médico - - Delay cease fire of AI during medical unconsciousness - Verzögert Ende des KI-Beschusses bei medizinischer Bewustlosigkeit - Demora antes de volverse neutral al caer inconsciente - Opóźnij status captive u nieprzytomnych osób - Atraso durante cessar fogo da AI durante inconsciência médica - Delay cease fire of AI while player is unconscious for medical reasons. Verzögert das Ende des KI-Beschusses auf einen Spieler, wenn dieser aus medizinischen Gründen bewustlos wird. - Atraso durante cessar fogo da AI enquanto o jogador estiver inconsciente por motivos médicos + Ritarda il cessate il fuoco dell'IA quando il giocatore è svenuto per motivi medici. + Prodleva zastavení palby pro AI, pokud je hráč v bezvědomí ze zdravotních důvodů. + Atraso durante cessar fogo da AI durante inconsciência médica Delay cease fire of AI for unconsciousness Verzögert Ende des KI-Beschusses bei medizinischer Bewustlosigkeit + Demora antes de volverse neutral al caer inconsciente + Opóźnij status captive u nieprzytomnych osób + Ritarda il cessate il fuoco dell'IA quando si è svenuti + Prodleva zastavení palby AI na bezvědomé Atraso durante cessar fogo da AI durante inconsciência diff --git a/addons/medical/ui/RscTitles.hpp b/addons/medical/ui/RscTitles.hpp index 520a431d7b..76c1da46c0 100644 --- a/addons/medical/ui/RscTitles.hpp +++ b/addons/medical/ui/RscTitles.hpp @@ -19,34 +19,34 @@ class Rsctitles { colorBackground[] = {1,1,1,1}; colorPicture[] = {1,1,1,1}; colorText[] = {1,1,1,1}; - text = QUOTE(PATHTOF(ui\body_background.paa)); + text = QPATHTOF(ui\body_background.paa); }; class bodyImgHead: bodyImgBackground { idc = 50; colorBackground[] = {1,1,1,1}; colorPicture[] = {1,1,1,1}; colorText[] = {1,1,1,1}; - text = QUOTE(PATHTOF(ui\body_head.paa)); + text = QPATHTOF(ui\body_head.paa); }; class bodyImgTorso: bodyImgHead { idc = 51; - text = QUOTE(PATHTOF(ui\body_torso.paa)); + text = QPATHTOF(ui\body_torso.paa); }; class bodyImgArms_l: bodyImgHead { idc = 52; - text = QUOTE(PATHTOF(ui\body_arm_left.paa)); + text = QPATHTOF(ui\body_arm_left.paa); }; class bodyImgArms_r: bodyImgHead { idc = 53; - text = QUOTE(PATHTOF(ui\body_arm_right.paa)); + text = QPATHTOF(ui\body_arm_right.paa); }; class bodyImgLegs_l: bodyImgHead { idc = 54; - text = QUOTE(PATHTOF(ui\body_leg_left.paa)); + text = QPATHTOF(ui\body_leg_left.paa); }; class bodyImgLegs_r: bodyImgHead { idc = 55; - text = QUOTE(PATHTOF(ui\body_leg_right.paa)); + text = QPATHTOF(ui\body_leg_right.paa); }; class InjuryListLabel { idc = 199; diff --git a/addons/medical/ui/triagecard.hpp b/addons/medical/ui/triagecard.hpp index 1122c2e942..6a5138def8 100644 --- a/addons/medical/ui/triagecard.hpp +++ b/addons/medical/ui/triagecard.hpp @@ -30,11 +30,11 @@ class GVAR(triageCard) { SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {1,1,0,1}; colorBackground[] = {0,0,0,0}; - text = QUOTE(PATHTOF(ui\triage_card_corner_l.paa)); + text = QPATHTOF(ui\triage_card_corner_l.paa); }; class cornor_top_r: cornor_top_l { x = "20 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - text = QUOTE(PATHTOF(ui\triage_card_corner_r.paa)); + text = QPATHTOF(ui\triage_card_corner_r.paa); }; class TriageCardLabel { diff --git a/addons/medical_menu/CfgVehicles.hpp b/addons/medical_menu/CfgVehicles.hpp index d2bbf55fd1..1918511566 100644 --- a/addons/medical_menu/CfgVehicles.hpp +++ b/addons/medical_menu/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { class ACE_moduleMedicalMenuSettings: ACE_Module { scope = 2; displayName = CSTRING(module_DisplayName); - icon = QUOTE(PATHTOEF(medical,UI\Icon_Module_Medical_ca.paa)); + icon = QPATHTOEF(medical,UI\Icon_Module_Medical_ca.paa); category = "ACE_medical"; function = QUOTE(DFUNC(module)); functionPriority = 1; @@ -50,7 +50,7 @@ class CfgVehicles { exceptions[] = {"isNotInside"}; condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu)); statement = QUOTE([_target] call DFUNC(openMenu)); - icon = PATHTOEF(medical,UI\icons\medical_cross.paa); + icon = QPATHTOEF(medical,UI\icons\medical_cross.paa); }; }; @@ -63,7 +63,7 @@ class CfgVehicles { exceptions[] = {"isNotInside"}; condition = QUOTE([ARR_2(ACE_player,_target)] call FUNC(canOpenMenu)); statement = QUOTE([_target] call DFUNC(openMenu)); - icon = PATHTOEF(medical,UI\icons\medical_cross.paa); + icon = QPATHTOEF(medical,UI\icons\medical_cross.paa); }; }; }; diff --git a/addons/medical_menu/XEH_postInit.sqf b/addons/medical_menu/XEH_postInit.sqf index 92e2af341f..deddb4b3d8 100644 --- a/addons/medical_menu/XEH_postInit.sqf +++ b/addons/medical_menu/XEH_postInit.sqf @@ -12,7 +12,7 @@ GVAR(pendingReopen) = false; GVAR(pendingReopen) = false; [{ [GVAR(INTERACTION_TARGET)] call FUNC(openMenu); - }, []] call EFUNC(common,execNextFrame); + }, []] call CBA_fnc_execNextFrame; }; }] call EFUNC(common,addEventhandler); @@ -31,7 +31,7 @@ GVAR(pendingReopen) = false; false }, { - if (ACE_time - GVAR(lastOpenedOn) > 0.5) exitWith { + if (CBA_missionTime - GVAR(lastOpenedOn) > 0.5) exitWith { [objNull] call FUNC(openMenu); }; false diff --git a/addons/medical_menu/config.cpp b/addons/medical_menu/config.cpp index 27e0db03b9..bdc9bf1f25 100644 --- a/addons/medical_menu/config.cpp +++ b/addons/medical_menu/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_medical"}; - author[] = {$STR_ACE_Common_ACETeam, "Glowbal"}; - authorUrl = "http://ace3mod.com"; + author = ECSTRING(common,ACETeam); + authors[] = {"Glowbal"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf index 67e295e22e..97e5c19519 100644 --- a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf @@ -44,7 +44,7 @@ if (_name isEqualTo "toggle") exitWith { closeDialog 0; [{ [_this select 0] call FUNC(openMenu); - }, [_newTarget], 0.1] call EFUNC(common,waitAndExecute); + }, [_newTarget], 0.1] call CBA_fnc_waitAndExecute; }; // Clean the dropdown options list from all actions @@ -77,7 +77,7 @@ if (_name isEqualTo "triage") exitWith { _message = localize _message; }; }; - _triageCardTexts pushBack format["%1x - %2 (%3m)", _amount, _message, round((ACE_gameTime - _time) / 60)]; + _triageCardTexts pushBack format["%1x - %2 (%3m)", _amount, _message, round((CBA_missionTime - _time) / 60)]; nil; } count _log; diff --git a/addons/medical_menu/functions/fnc_openMenu.sqf b/addons/medical_menu/functions/fnc_openMenu.sqf index a8a51ff028..e6ed7e6135 100644 --- a/addons/medical_menu/functions/fnc_openMenu.sqf +++ b/addons/medical_menu/functions/fnc_openMenu.sqf @@ -34,6 +34,6 @@ if (dialog || {isNull _interactionTarget}) exitWith { GVAR(INTERACTION_TARGET) = _interactionTarget; createDialog QGVAR(medicalMenu); -GVAR(lastOpenedOn) = ACE_time; +GVAR(lastOpenedOn) = CBA_missionTime; true diff --git a/addons/medical_menu/stringtable.xml b/addons/medical_menu/stringtable.xml index 322897fa6b..e9812128f4 100644 --- a/addons/medical_menu/stringtable.xml +++ b/addons/medical_menu/stringtable.xml @@ -10,6 +10,7 @@ Menú médico Zdravotnikcá nabídka Menù Medico + Menu médical Allow Medical Menu @@ -20,6 +21,7 @@ Permitir menú médico Povolit zdravotnickou nabídku Consenti Menù Medico + Autoriser le menu médical Allow clients to use the medical menu @@ -30,6 +32,7 @@ Permitir a los clientes utilizar el menú médico Povolit klientům používat zdravotnickou nabídku Consenti ai clients di usare il Menù Medico + Autoriser les clients à utiliser le menu médical Use Medical menu @@ -40,6 +43,7 @@ Utiliza el menú médico Použít zdravotnickou nabídku Usa Menù Medico + Utiliser le menu médical If allowed by server, enable the option to use the Medical Menu through keybinding and interaction menu @@ -50,6 +54,7 @@ Si está permitido por el servidor, active la opción de utilizar el menú médico a través del menú de las teclas Pokud je povoleno serverem, umožní použít zdravotnickou nabídku skrze kláv. zkratku a interakční menu Se consentito dal server, abilita l'opzione di usare il Menù Medico attraverso hotkeys e menù interazione + Si autorisé par le serveur, active l'option d'utiliser le menu médical à travers les raccourcis clavier et le menu d'interaction. Re-open Medical menu @@ -60,6 +65,7 @@ Reabrir menú médico Znovu otevřít zdravotnickou nabídku Ri-apri Menù Medico + Ré-ouvrir le menu médical Re-open the medical menu after succesful treatment @@ -70,6 +76,7 @@ Reabre el menú médico despues de un tratamiento con éxito Znovu otevřít zdravotnickou nabídku po úspěšné léčbě Ri-Apri il Menù Medico dopo un trattamento riuscito + Ré-ouvrir le menu médical après un traitement réussi Open Medical Menu @@ -80,6 +87,7 @@ Abrir menú médico Otevřít zdravotnickou nabídku Apri Menù Medico + Ouvir le menu médical Medical Menu Settings @@ -90,6 +98,7 @@ Ajustes del mení médico Nastavení zdravotnické nabídky Impostazioni Menù Medico + Réglages du menu médical Configure the usage of the Medical Menu @@ -100,6 +109,7 @@ Configurar el uso del menú médico Konfigurace využití zdravotnické nabídky Configura l'uso del Menù Medico + Configurer l'utilisation du menu médical EXAMINE & TREATMENT @@ -285,7 +295,7 @@ Selectioner Bras Gauche Wybierz lewą rękę Selecionar Braço Esquerdo - Vybrat Levou Ruku + Vybrat Levou ruku Seleziona Braccio Sinistro @@ -296,7 +306,7 @@ Selectioner Bras Droit Wybierz prawą rękę Selecionar Braço Direito - Vybrat Pravou Ruku + Vybrat Pravou ruku Seleziona Braccio Destro @@ -307,7 +317,7 @@ Selectioner Jambe Gauche Wybierz lewą nogę Selecionar Perna Esquerda - Vybrat Levou Nohu + Vybrat Levou nohu Seleziona Gamba Sinistra @@ -318,7 +328,7 @@ Selectioner Jambe Droite Wybierz prawą nogę Selecionar Perna Direita - Vybrat Pravou Nohu + Vybrat Pravou nohu Seleziona Gamba Destra @@ -414,7 +424,7 @@ Mittel среднего размера Mediana - moyenne + Moyenne średnim Médio Střední @@ -436,7 +446,7 @@ Er hat %2 offene Wunden (%1) %2 открытые раны %1 Hay %2 Heridas Abiertas %1 - Il y a %2 %1 Blessure Ouverte + Il y a %2 %1 Blessure(s) Ouverte(s) Widzisz otwarte rany w ilości %2 o %1 rozmiarze Existem %2 ferimentos abertos %1 Jsou zde %2 %1 otevřené rány @@ -469,7 +479,7 @@ Er hat %2 verbundene Wunden (%1) %2 перевязанные раны %1 Hay %2 Heridas %1 Vendadas - Il y a %2 %1 Blessure Bandée + Il y a %2 %1 Blessure(s) Bandée(s) Widzisz %2 zabandażowanych ran o %1 rozmiarze Existem %2 ferimentos %1 tratados Jsou zde %2 %1 ovázané rány @@ -546,7 +556,7 @@ Blutung Кровотечение Sangrando - Seignement + Saignement Krwawienie zewnętrzne Sangrando Krvácí @@ -557,7 +567,7 @@ hat Schmerzen Испытывает боль Con Dolor - A De La Douleur + Souffre W bólu Com dor v bolestech @@ -571,7 +581,7 @@ A Perdu Bcp de Sang Stracił dużo krwi Perdeu muito sangue - Ztratil hodně Krve + Ztratil hodně krve Perso molto Sangue @@ -579,7 +589,7 @@ Tourniquet [CAT] Жгут Torniquete [CAT] - Garot [CAT] + Garrot [CAT] Opaska uciskowa [CAT] Torniquete [CAT] Škrtidlo [CAT] diff --git a/addons/medical_menu/ui/menu.hpp b/addons/medical_menu/ui/menu.hpp index c443819caa..16c79e7c6a 100644 --- a/addons/medical_menu/ui/menu.hpp +++ b/addons/medical_menu/ui/menu.hpp @@ -51,7 +51,7 @@ class GVAR(medicalMenu) { y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)"; w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)"; h = "3.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - text = QUOTE(PATHTOF(data\background_img.paa)); + text = QPATHTOF(data\background_img.paa); colorText[] = {1, 1, 1, 0.0}; }; class CatagoryLeft: HeaderName { @@ -94,42 +94,42 @@ class GVAR(medicalMenu) { colorBackground[] = {0,0,0,1}; colorPicture[] = {1,1,1,1}; colorText[] = {1,1,1,1}; - text = QUOTE(PATHTOF(data\icons\triage_card_small.paa)); + text = QPATHTOF(data\icons\triage_card_small.paa); }; class iconImg2: iconImg1 { idc = 112; x = "3 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - text = QUOTE(PATHTOF(data\icons\examine_patient_small.paa)); + text = QPATHTOF(data\icons\examine_patient_small.paa); }; class iconImg3: iconImg1 { idc = 113; x = "4.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - text = QUOTE(PATHTOF(data\icons\bandage_fracture_small.paa)); + text = QPATHTOF(data\icons\bandage_fracture_small.paa); }; class iconImg4: iconImg1 { idc = 114; x = "6 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - text = QUOTE(PATHTOF(data\icons\medication_small.paa)); + text = QPATHTOF(data\icons\medication_small.paa); }; class iconImg5: iconImg1 { idc = 115; x = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - text = QUOTE(PATHTOF(data\icons\airway_management_small.paa)); + text = QPATHTOF(data\icons\airway_management_small.paa); }; class iconImg6: iconImg1 { idc = 116; x = "9 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - text = QUOTE(PATHTOF(data\icons\advanced_treatment_small.paa)); + text = QPATHTOF(data\icons\advanced_treatment_small.paa); }; class iconImg7: iconImg1 { idc = 117; x = "10.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - text = QUOTE(PATHTOF(data\icons\icon_carry.paa)); + text = QPATHTOF(data\icons\icon_carry.paa); }; class iconImg8: iconImg1 { idc = 118; x = "12 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)"; - text = QUOTE(PATHTOF(data\icons\toggle_self_small.paa)); + text = QPATHTOF(data\icons\toggle_self_small.paa); }; @@ -274,7 +274,7 @@ class GVAR(medicalMenu) { colorBackground[] = {1,1,1,1}; colorPicture[] = {1,1,1,1}; colorText[] = {1,1,1,1}; - text = QUOTE(PATHTOEF(medical,ui\body_background.paa)); + text = QPATHTOEF(medical,ui\body_background.paa); }; class bodyImgHead: bodyImgBackground { idc = 50; @@ -286,28 +286,28 @@ class GVAR(medicalMenu) { colorBackground[] = {1,1,1,1}; colorPicture[] = {1,1,1,0.75}; colorText[] = {1,1,1,0.75}; - text = QUOTE(PATHTOEF(medical,ui\body_head.paa)); + text = QPATHTOEF(medical,ui\body_head.paa); }; class bodyImgTorso: bodyImgHead { idc = 51; - text = QUOTE(PATHTOEF(medical,ui\body_torso.paa)); + text = QPATHTOEF(medical,ui\body_torso.paa); }; class bodyImgArms_l: bodyImgHead { idc = 52; - text = QUOTE(PATHTOEF(medical,ui\body_arm_left.paa)); + text = QPATHTOEF(medical,ui\body_arm_left.paa); }; class bodyImgArms_r: bodyImgHead { idc = 53; - text = QUOTE(PATHTOEF(medical,ui\body_arm_right.paa)); + text = QPATHTOEF(medical,ui\body_arm_right.paa); }; class bodyImgLegs_l: bodyImgHead { idc = 54; - text = QUOTE(PATHTOEF(medical,ui\body_leg_left.paa)); + text = QPATHTOEF(medical,ui\body_leg_left.paa); }; class bodyImgLegs_r: bodyImgHead { idc = 55; - text = QUOTE(PATHTOEF(medical,ui\body_leg_right.paa)); + text = QPATHTOEF(medical,ui\body_leg_right.paa); }; diff --git a/addons/microdagr/ACE_Settings.hpp b/addons/microdagr/ACE_Settings.hpp index db175e7303..f1e7595b74 100644 --- a/addons/microdagr/ACE_Settings.hpp +++ b/addons/microdagr/ACE_Settings.hpp @@ -1,7 +1,10 @@ class ACE_Settings { - class GVAR(MapDataAvailable) { + class GVAR(mapDataAvailable) { + displayName = CSTRING(MapDataAvailable_DisplayName); + description = CSTRING(MapDataAvailable_Description); value = 2; typeName = "SCALAR"; isClientSettable = 0; + values[] = {CSTRING(MapFill_None), CSTRING(MapFill_OnlyRoads), CSTRING(MapFill_Full)}; }; -}; \ No newline at end of file +}; diff --git a/addons/microdagr/CfgVehicles.hpp b/addons/microdagr/CfgVehicles.hpp index 3fcf92beaa..cf596c9762 100644 --- a/addons/microdagr/CfgVehicles.hpp +++ b/addons/microdagr/CfgVehicles.hpp @@ -8,21 +8,21 @@ class CfgVehicles { displayName = CSTRING(configure); condition = QUOTE(([DISPLAY_MODE_DIALOG] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DIALOG}); statement = QUOTE([DISPLAY_MODE_DIALOG] call FUNC(openDisplay)); - icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); + icon = QPATHTOF(UI\icon_microDAGR.paa); exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; class GVAR(show) { //Opens the mini map displayName = CSTRING(show); condition = QUOTE(([DISPLAY_MODE_DISPLAY] call FUNC(canShow)) && {GVAR(currentShowMode) != DISPLAY_MODE_DISPLAY}); statement = QUOTE([DISPLAY_MODE_DISPLAY] call FUNC(openDisplay)); - icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); + icon = QPATHTOF(UI\icon_microDAGR.paa); exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; class GVAR(close) { displayName = CSTRING(closeUnit); condition = QUOTE(GVAR(currentShowMode) != DISPLAY_MODE_CLOSED); statement = QUOTE([DISPLAY_MODE_CLOSED] call FUNC(openDisplay)); - icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); + icon = QPATHTOF(UI\icon_microDAGR.paa); exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; }; @@ -39,7 +39,7 @@ class CfgVehicles { scope = 2; isGlobal = 0; isSingular = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_microDAGR_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_microDAGR_ca.paa); functionPriority = 0; class Arguments { class MapDataAvailable { @@ -72,7 +72,7 @@ class CfgVehicles { displayName = CSTRING(itemName); author = ECSTRING(common,ACETeam); vehicleClass = "Items"; - icon = QUOTE(PATHTOF(UI\icon_microDAGR.paa)); + icon = QPATHTOF(UI\icon_microDAGR.paa); class TransportItems { MACRO_ADDITEM(ACE_microDAGR,1); }; diff --git a/addons/microdagr/CfgWeapons.hpp b/addons/microdagr/CfgWeapons.hpp index 6fa84b6e7b..92ace96c53 100644 --- a/addons/microdagr/CfgWeapons.hpp +++ b/addons/microdagr/CfgWeapons.hpp @@ -7,8 +7,8 @@ class CfgWeapons { scope = 2; displayName = CSTRING(itemName); descriptionShort = CSTRING(itemDescription); - model = QUOTE(PATHTOF(data\MicroDAGR.p3d)); - picture = QUOTE(PATHTOF(images\microDAGR_item.paa)); + model = QPATHTOF(data\MicroDAGR.p3d); + picture = QPATHTOF(images\microDAGR_item.paa); class ItemInfo: InventoryItem_Base_F { mass = 2; }; diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf index c918bcf454..c11019cafb 100644 --- a/addons/microdagr/XEH_clientInit.sqf +++ b/addons/microdagr/XEH_clientInit.sqf @@ -16,7 +16,7 @@ _closeCode = { if (GVAR(currentShowMode) == DISPLAY_MODE_CLOSED) exitWith {}; [DISPLAY_MODE_CLOSED] call FUNC(openDisplay); }; -[(localize LSTRING(itemName)), QUOTE(PATHTOF(images\microDAGR_item.paa)), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); +[(localize LSTRING(itemName)), QPATHTOF(images\microDAGR_item.paa), _conditonCode, _toggleCode, _closeCode] call EFUNC(common,deviceKeyRegisterNew); //Add Eventhandler: diff --git a/addons/microdagr/config.cpp b/addons/microdagr/config.cpp index 7a39df8980..d8823d0dc0 100644 --- a/addons/microdagr/config.cpp +++ b/addons/microdagr/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_microDAGR"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"PabstMirror"}; - authorUrl = "https://github.com/PabstMirror/"; + author = ECSTRING(common,ACETeam); + authors[] = {"PabstMirror"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/microdagr/functions/fnc_canShow.sqf b/addons/microdagr/functions/fnc_canShow.sqf index 70e8989031..d339f80794 100644 --- a/addons/microdagr/functions/fnc_canShow.sqf +++ b/addons/microdagr/functions/fnc_canShow.sqf @@ -27,8 +27,10 @@ _returnValue = switch (_showType) do { ("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)} }; case (DISPLAY_MODE_DISPLAY): { - //Can't have minimap up while zoomed in - (cameraview != "GUNNER") && {"ACE_microDAGR" in (items ACE_player)} && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)} + //Can't have minimap up while zoomed in on foot, but allow drivers to use while in "Gunner" to handle non-3d vehicles like most tanks + ((cameraView != "GUNNER") || {(vehicle ACE_player != ACE_player) && {driver vehicle ACE_player == ACE_player}}) && + {"ACE_microDAGR" in (items ACE_player)} && + {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)} }; default { false }; }; diff --git a/addons/microdagr/functions/fnc_showApplicationPage.sqf b/addons/microdagr/functions/fnc_showApplicationPage.sqf index dba6b54f18..9b461d6b64 100644 --- a/addons/microdagr/functions/fnc_showApplicationPage.sqf +++ b/addons/microdagr/functions/fnc_showApplicationPage.sqf @@ -40,7 +40,7 @@ if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then { if (GVAR(currentWaypoint) == -2) then { (_display displayCtrl IDC_MODEDISPLAY_TARGETICON) ctrlSetText "\A3\ui_f\data\igui\rscingameui\rscoptics\laser_designator_iconLaserOn.paa" } else { - (_display displayCtrl IDC_MODEDISPLAY_TARGETICON) ctrlSetText QUOTE(PATHTOF(images\icon_menuMark.paa)); + (_display displayCtrl IDC_MODEDISPLAY_TARGETICON) ctrlSetText QPATHTOF(images\icon_menuMark.paa); }; }; }; @@ -100,19 +100,19 @@ if (GVAR(currentApplicationPage) == APP_MODE_MARK) then { //Buttons pushed: if (GVAR(currentApplicationPage) == APP_MODE_INFODISPLAY) then { - (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QUOTE(PATHTOF(images\button_pushedDown.paa)); + (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QPATHTOF(images\button_pushedDown.paa); } else { - (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QUOTE(PATHTOF(images\button_pushedUp.paa)); + (_display displayCtrl IDC_BUTTONBG0) ctrlSetText QPATHTOF(images\button_pushedUp.paa); }; if (GVAR(currentApplicationPage) == APP_MODE_COMPASS) then { - (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QUOTE(PATHTOF(images\button_pushedDown.paa)); + (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QPATHTOF(images\button_pushedDown.paa); } else { - (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QUOTE(PATHTOF(images\button_pushedUp.paa)); + (_display displayCtrl IDC_BUTTONBG1) ctrlSetText QPATHTOF(images\button_pushedUp.paa); }; if (GVAR(currentApplicationPage) == APP_MODE_MAP) then { - (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QUOTE(PATHTOF(images\button_pushedDown.paa)); + (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QPATHTOF(images\button_pushedDown.paa); } else { - (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QUOTE(PATHTOF(images\button_pushedUp.paa)); + (_display displayCtrl IDC_BUTTONBG2) ctrlSetText QPATHTOF(images\button_pushedUp.paa); }; //Update the page now: diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index 4b609085a8..5042cbac97 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -171,7 +171,7 @@ case (APP_MODE_WAYPOINTS): { _currentIndex = (_currentIndex max 0) min (count _waypoints); _wpListBox lbSetCurSel _currentIndex; - + //Reset focus to a dummy ctrl (top button), otherwise HOME/POS1 key goes to top of listBox and has keybind blocked ctrlSetFocus (_display displayCtrl IDC_TOPMENUBUTTON); }; @@ -193,7 +193,7 @@ case (APP_MODE_SETUP): { } else { _settingListBox lbSetTextRight [1, (localize LSTRING(settingOff))]; }; - + //Reset focus to a dummy ctrl (top button), otherwise HOME/POS1 key goes to top of listBox and has keybind blocked ctrlSetFocus (_display displayCtrl IDC_TOPMENUBUTTON); }; diff --git a/addons/microdagr/gui_controls.hpp b/addons/microdagr/gui_controls.hpp index a8fbb8f83f..c60201b34e 100644 --- a/addons/microdagr/gui_controls.hpp +++ b/addons/microdagr/gui_controls.hpp @@ -10,7 +10,7 @@ class controlsBackground { }; class StatusBarBS: RscPicture { idc = -1; - text = QUOTE(PATHTOF(images\microDAGR_topBar.paa)); + text = QPATHTOF(images\microDAGR_topBar.paa); x = X_PART(0); y = Y_PART(0); w = W_PART(25); @@ -187,7 +187,7 @@ class controls { }; class selfIcon: RscPicture { idc = -1; - text = QUOTE(PATHTOF(images\icon_self.paa)); + text = QPATHTOF(images\icon_self.paa); x = W_PART(0.5); y = H_PART(2); w = W_PART(4); @@ -242,7 +242,7 @@ class controls { }; class CompasIcon: RscPicture { idc = -1; - text = QUOTE(PATHTOF(images\icon_infoCompass.paa)); + text = QPATHTOF(images\icon_infoCompass.paa); x = W_PART(0.5); y = H_PART(8.5); w = W_PART(2); @@ -284,7 +284,7 @@ class controls { class controls { class TimeIcon: RscPicture { idc = -1; - text = QUOTE(PATHTOF(images\icon_infoClock.paa)); + text = QPATHTOF(images\icon_infoClock.paa); x = W_PART(0.5); y = H_PART(3.5); w = W_PART(2); @@ -315,7 +315,7 @@ class controls { class controls { class TargetIcon: RscPicture { idc = IDC_MODEDISPLAY_TARGETICON; - text = QUOTE(PATHTOF(images\icon_menuMark.paa)); + text = QPATHTOF(images\icon_menuMark.paa); x = W_PART(0.5); y = H_PART(0.5); w = W_PART(2); @@ -440,7 +440,7 @@ class controls { class mapTrackButton: GVAR(RscActiveTextPicture) { onbuttonclick = QUOTE(['autotrack'] call FUNC(modeMapButtons)); idc = IDC_MODEMAP_MAPTRACKBUTTON; - text = QUOTE(PATHTOF(images\icon_mapTrack.paa)); + text = QPATHTOF(images\icon_mapTrack.paa); x = X_PART(11); y = Y_PART(18.75); w = W_PART(3); @@ -449,14 +449,14 @@ class controls { class mapZoomIn: mapTrackButton { onbuttonclick = QUOTE(['zoomin'] call FUNC(modeMapButtons)); idc = IDC_MODEMAP_MAPZOOMIN; - text = QUOTE(PATHTOF(images\icon_mapPlus.paa)); + text = QPATHTOF(images\icon_mapPlus.paa); color[] = {1,1,1,0.4}; x = X_PART(4); }; class mapZoomOut: mapTrackButton { onbuttonclick = QUOTE(['zoomout'] call FUNC(modeMapButtons)); idc = IDC_MODEMAP_MAPZOOMOUT; - text = QUOTE(PATHTOF(images\icon_mapMinus.paa)); + text = QPATHTOF(images\icon_mapMinus.paa); color[] = {1,1,1,0.4}; x = X_PART(18); }; @@ -472,7 +472,7 @@ class controls { class Controls { class ButtonTL: GVAR(RscActiveTextPicture) { idc = -1; - text = QUOTE(PATHTOF(images\icon_menuMark.paa)); + text = QPATHTOF(images\icon_menuMark.paa); x = W_PART(3); y = H_PART(1.5); w = W_PART(8); @@ -480,7 +480,7 @@ class controls { onbuttonclick = QUOTE([4] call FUNC(saveCurrentAndSetNewMode)); }; class ButtonTR: ButtonTL { - text = QUOTE(PATHTOF(images\icon_menuWaypoints.paa)); + text = QPATHTOF(images\icon_menuWaypoints.paa); x = W_PART(14); y = H_PART(1.5); onbuttonclick = QUOTE([5] call FUNC(saveCurrentAndSetNewMode)); @@ -492,7 +492,7 @@ class controls { onbuttonclick = QUOTE(_this call FUNC(appMenuButtonConnectRangefinder)); }; class ButtonBR: ButtonTL { - text = QUOTE(PATHTOF(images\icon_menuSettings.paa)); + text = QPATHTOF(images\icon_menuSettings.paa); x = W_PART(14); y = H_PART(10.5); onbuttonclick = QUOTE([6] call FUNC(saveCurrentAndSetNewMode)); @@ -555,7 +555,7 @@ class controls { }; class DeleteButton: GVAR(RscActiveTextPicture) { idc = -1; - text = QUOTE(PATHTOF(images\icon_deleteButton.paa)); + text = QPATHTOF(images\icon_deleteButton.paa); x = W_PART(20); y = H_PART(2.75); w = W_PART(2); @@ -717,7 +717,7 @@ class controls { class ButtonBG0: RscPicture { idc = IDC_BUTTONBG0; - text = QUOTE(PATHTOF(images\button_pushedDown.paa)); + text = QPATHTOF(images\button_pushedDown.paa); x = X_PART(0 * (25/3)); y = Y_PART(21); w = W_PART((25/3)); @@ -733,7 +733,7 @@ class controls { }; class ButtonIcon0: GVAR(RscActiveTextPicture) { idc = -1; - text = QUOTE(PATHTOF(images\icon_info.paa)); + text = QPATHTOF(images\icon_info.paa); x = X_PART(0 * (25/3)); y = Y_PART(21); w = W_PART((25/3)); @@ -741,19 +741,19 @@ class controls { onbuttonclick = QUOTE([APP_MODE_INFODISPLAY] call FUNC(saveCurrentAndSetNewMode)); }; class ButtonIcon1: ButtonIcon0 { - text = QUOTE(PATHTOF(images\icon_compass.paa)); + text = QPATHTOF(images\icon_compass.paa); x = X_PART(1 * (25/3)); onbuttonclick = QUOTE([APP_MODE_COMPASS] call FUNC(saveCurrentAndSetNewMode)); }; class ButtonIcon2: ButtonIcon0 { - text = QUOTE(PATHTOF(images\icon_map.paa)); + text = QPATHTOF(images\icon_map.paa); x = X_PART(2 * (25/3)); onbuttonclick = QUOTE([APP_MODE_MAP] call FUNC(saveCurrentAndSetNewMode)); }; //At the end: The Big Shell overlay class MicroDagrShell: RscPicture { idc = IDC_MICRODAGRSHELL; - text = QUOTE(PATHTOF(images\microDAGR_shellPicture.paa)); + text = QPATHTOF(images\microDAGR_shellPicture.paa); x = X_PART(-14.77); y = Y_PART(-5.875); w = W_PART(53.62); diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index c7be9bf0bf..c20ea7aede 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -332,7 +332,7 @@ Wie viel Daten auf einem MicroDAGR zu sehen sind Kolik informací je načteno do MicroDAGR? Quanta informação é preenchida no mapa do MicroDAGR - Combien d'information apparaisse sur la carte du MicroDAGR + Combien d'informations apparaissent sur la carte du MicroDAGR Mennyi térképadatot tartalmaz a MicroDAGR Сколько данных должно отображаться на карте MicroDAGR Quanti dati sono trasferiti nella mappa del MicroDAGR @@ -380,7 +380,7 @@ Steuert wie viel Daten auf dem microDAGR zu sehen ist. Weniger Daten schränken die Kartenansicht ein, um mehr auf der Minimap zu sehen. Tento modul umožňuje kontrolovat, kolik informací je obsaženo v MicroDAGR. Menší množství dat omezené zobrazením mapy ukazují méně věcí na minimapě. Controla quantos dados são preenchidos nos itens microDAGR. Menos dados restringe a visualização de mapa para mostrar menos informações no minimapa. - Contrôle le nombre d'information disponible sur la carte du MicroDAGR. + Contrôle le nombre d'informations disponibles sur la carte du MicroDAGR. Meghatárroza a MicroDAGR objektumok térképének tartalmát. A kevesebb adat korlátozza a térképnézeti módot az eszközön. Контролирует, сколько данных должно отображаться на карте устройств MicroDAGR. Ограничивает объем отображаемых данных на миникарте. Controlla quanti dati sono presenti negli oggetti MicroDAGR. Meno dati costringono la vista mappa a mostrare meno informazioni nella minimappa. diff --git a/addons/missileguidance/ACE_GuidanceConfig.hpp b/addons/missileguidance/ACE_GuidanceConfig.hpp index f3434fef9b..96e417a7e8 100644 --- a/addons/missileguidance/ACE_GuidanceConfig.hpp +++ b/addons/missileguidance/ACE_GuidanceConfig.hpp @@ -3,42 +3,42 @@ class GVAR(AttackProfiles) { name = ""; visualName = ""; description = ""; - + functionName = QFUNC(attackProfile_LIN); }; class DIR { name = ""; visualName = ""; description = ""; - + functionName = QFUNC(attackProfile_DIR); }; class MID { name = ""; visualName = ""; description = ""; - + functionName = QFUNC(attackProfile_MID); }; class HI { name = ""; visualName = ""; description = ""; - + functionName = QFUNC(attackProfile_HI); }; class JAV_DIR { name = ""; visualName = ""; description = ""; - + functionName = QFUNC(attackProfile_JAV_DIR); }; class JAV_TOP { name = ""; visualName = ""; description = ""; - + functionName = QFUNC(attackProfile_JAV_TOP); }; }; @@ -48,14 +48,14 @@ class GVAR(SeekerTypes) { name = ""; visualName = ""; description = ""; - + functionName = QFUNC(seekerType_SALH); }; class Optic { name = ""; visualName = ""; description = ""; - + functionName = QFUNC(seekerType_Optic); }; }; diff --git a/addons/missileguidance/CfgMagazines.hpp b/addons/missileguidance/CfgMagazines.hpp index 31f4739417..a7e729cf32 100644 --- a/addons/missileguidance/CfgMagazines.hpp +++ b/addons/missileguidance/CfgMagazines.hpp @@ -1,6 +1,6 @@ class CfgMagazines { class 12Rnd_PG_missiles; - + class 6Rnd_ACE_Hydra70_DAGR : 12Rnd_PG_missiles { ammo = "ACE_Hydra70_DAGR"; count = 12; @@ -8,7 +8,7 @@ class CfgMagazines { displayNameShort = "6 Round DAGR"; descriptionShort = "6 Round DAGR"; weight = 36; - + }; class 12Rnd_ACE_Hydra70_DAGR : 6Rnd_ACE_Hydra70_DAGR { count = 12; @@ -24,7 +24,7 @@ class CfgMagazines { descriptionShort = "24 Round DAGR"; weight = 72; }; - + // Hellfires class 6Rnd_ACE_Hellfire_AGM114K : 12Rnd_PG_missiles { count = 12; @@ -33,7 +33,7 @@ class CfgMagazines { displayNameShort = "6Rnd_ACE_Hellfire_AGM114K"; descriptionShort = "6Rnd_ACE_Hellfire_AGM114K"; weight = 36; - + }; class 12Rnd_ACE_Hellfire_AGM114K : 6Rnd_ACE_Hydra70_DAGR { count = 12; @@ -49,5 +49,5 @@ class CfgMagazines { descriptionShort = "24Rnd_ACE_Hellfire_AGM114K"; weight = 72; }; - -}; \ No newline at end of file + +}; diff --git a/addons/missileguidance/CfgVehicles.hpp b/addons/missileguidance/CfgVehicles.hpp index 5069556078..16b4b87767 100644 --- a/addons/missileguidance/CfgVehicles.hpp +++ b/addons/missileguidance/CfgVehicles.hpp @@ -17,7 +17,7 @@ class CfgVehicles { class MainTurret; }; }; - + class ACE_Comanche_Test : B_Heli_Attack_01_F { scope = 1; scopeCurator = 0; @@ -32,5 +32,5 @@ class CfgVehicles { }; }; }; - + }; diff --git a/addons/missileguidance/config.cpp b/addons/missileguidance/config.cpp index 591a4f1c5e..365bd18327 100644 --- a/addons/missileguidance/config.cpp +++ b/addons/missileguidance/config.cpp @@ -5,7 +5,9 @@ class CfgPatches { units[] = {"ACE_Comanche_Test"}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_laser"}; + requiredAddons[] = {"ace_laser"}; + author = ECSTRING(common,ACETeam); + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/missileguidance/functions/fnc_doAttackProfile.sqf b/addons/missileguidance/functions/fnc_doAttackProfile.sqf index b9a3502035..171e169651 100644 --- a/addons/missileguidance/functions/fnc_doAttackProfile.sqf +++ b/addons/missileguidance/functions/fnc_doAttackProfile.sqf @@ -15,7 +15,7 @@ for [{_i=0}, {_i< (count _attackProfilesCfg) }, {_i=_i+1}] do { _testProfile = _attackProfilesCfg select _i; _testName = configName _testProfile; TRACE_3("", _testName, _testProfile, _attackProfilesCfg); - + if( _testName == _attackProfileName) exitWith { _attackProfile = _attackProfilesCfg select _i; }; @@ -26,4 +26,4 @@ if(!isNil "_attackProfile") then { _attackProfilePos = _this call (missionNamespace getVariable (getText (_attackProfile >> "functionName"))); }; -_attackProfilePos; \ No newline at end of file +_attackProfilePos; diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf index 081ab16353..bd300effe8 100644 --- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf +++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf @@ -16,7 +16,7 @@ for [{_i=0}, {_i< (count _seekerTypesCfg) }, {_i=_i+1}] do { _testProfile = _seekerTypesCfg select _i; _testName = configName _testProfile; TRACE_3("", _testName, _testProfile, _seekerTypesCfg); - + if( _testName == _seekerTypeName) exitWith { _seekerType = _seekerTypesCfg select _i; }; @@ -27,4 +27,4 @@ if(!isNil "_seekerType") then { _seekerProfilePos = _this call (missionNamespace getVariable (getText (_seekerType >> "functionName"))); }; -_seekerProfilePos; \ No newline at end of file +_seekerProfilePos; diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 122d690bae..918d8c68e3 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -24,7 +24,7 @@ _seekerParams = _args select 3; _stateParams = _args select 4; _lastRunTime = _stateParams select 0; -_runtimeDelta = ACE_diagTime - _lastRunTime; +_runtimeDelta = diag_tickTime - _lastRunTime; _adjustTime = 1; if(accTime > 0) then { @@ -100,7 +100,7 @@ _PS setDropInterval 3.0; hintSilent format["d: %1", _distanceToTarget]; #endif -_stateParams set[0, ACE_diagTime]; +_stateParams set[0, diag_tickTime]; _args set[4, _stateParams]; _this set[0, _args]; \ No newline at end of file diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf index 7fc77fdd56..85bb6c7719 100644 --- a/addons/missileguidance/functions/fnc_onFired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -11,7 +11,7 @@ if(GVAR(enabled) < 1 || {!local _projectile} ) exitWith { false }; if( !isPlayer _shooter && { GVAR(enabled) < 2 } ) exitWith { false }; // Bail on not missile -if(! (_ammo isKindOf "MissileBase") ) exitWith { false }; +if(! (_ammo isKindOf "MissileBase") ) exitWith { false }; private["_config", "_configs", "_enabled", "_target", "_seekerType", "_attackProfile"]; private["_args", "_canUseLock", "_guidingUnit", "_launchPos", "_lockMode", "_targetPos", "_vanillaTarget"]; @@ -30,7 +30,7 @@ _target = (vehicle _shooter) getVariable [QGVAR(target), nil]; _targetPos = (vehicle _shooter) getVariable [QGVAR(targetPosition), nil]; _seekerType = (vehicle _shooter) getVariable [QGVAR(seekerType), nil]; _attackProfile = (vehicle _shooter) getVariable [QGVAR(attackProfile), nil]; -_lockMode = (vehicle _shooter) getVariable [QGVAR(lockMode), nil]; +_lockMode = (vehicle _shooter) getVariable [QGVAR(lockMode), nil]; // @TODO: make this vehicle shooter, but we need to differentiate where its set in ace_laser _laserCode = _shooter getVariable [QEGVAR(laser,code), ACE_DEFAULT_LASER_CODE]; @@ -40,14 +40,14 @@ _launchPos = getPosASL (vehicle _shooter); TRACE_3("Begin guidance", _target, _seekerType, _attackProfile); -if ( isNil "_seekerType" || { ! ( _seekerType in (getArray (_config >> "seekerTypes" ) ) ) } ) then { +if (isNil "_seekerType" || {!(_seekerType in (getArray (_config >> "seekerTypes")))}) then { _seekerType = getText (_config >> "defaultSeekerType"); -}; -if ( isNil "_attackProfile" || { ! ( _attackProfile in (getArray (_config >> "attackProfiles" ) ) ) } ) then { - _attackProfile = getText (_config >> "defaultAttackProfile"); }; -if ( isNil "_lockMode" || { ! ( _lockMode in (getArray (_config >> "seekerLockModes" ) ) ) } ) then { - _lockMode = getText (_config >> "defaultSeekerLockMode"); +if (isNil "_attackProfile" || {!(_attackProfile in (getArray (_config >> "attackProfiles")))}) then { + _attackProfile = getText (_config >> "defaultAttackProfile"); +}; +if (isNil "_lockMode" || {!(_lockMode in (getArray (_config >> "seekerLockModes")))}) then { + _lockMode = getText (_config >> "defaultSeekerLockMode"); }; // If we didn't get a target, try to fall back on tab locking @@ -61,7 +61,7 @@ if(isNil "_target") then { // @TODO: Get vanilla target if(_canUseLock > 0 || difficulty < 1) then { _vanillaTarget = cursorTarget; - + TRACE_1("Using Vanilla Locking", _vanillaTarget); if(!isNil "_vanillaTarget") then { _target = _vanillaTarget; @@ -71,14 +71,14 @@ if(isNil "_target") then { }; TRACE_4("Beginning ACE guidance system",_target,_ammo,_seekerType,_attackProfile); -_args = [_this, - [_shooter, - [_target, _targetPos, _launchPos], - _seekerType, +_args = [_this, + [_shooter, + [_target, _targetPos, _launchPos], + _seekerType, _attackProfile, _lockMode, _laserInfo - ], + ], [ getNumber ( _config >> "minDeflection" ), getNumber ( _config >> "maxDeflection" ), @@ -89,9 +89,9 @@ _args = [_this, getNumber ( _config >> "seekerAccuracy" ), getNumber ( _config >> "seekerMaxRange" ) ], - [ ACE_diagTime, [], [] ] + [ diag_tickTime, [], [] ] ]; - + // Hand off to the guiding unit. We just use local player so local PFH fires for now // Laser code needs to give us a shooter for LOBL, or the seeker unit needs to be able to shift locality // Based on its homing laser @@ -115,4 +115,4 @@ _args = [_this, (vehicle _shooter) setVariable [QGVAR(seekerType), nil]; (vehicle _shooter) setVariable [QGVAR(attackProfile), nil]; (vehicle _shooter) setVariable [QGVAR(lockMode), nil]; -*/ \ No newline at end of file +*/ diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index 4b7df47b16..35b947ce97 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -20,7 +20,7 @@ Продвинутое наведение ракет, или ПНР, обеспечивает множество усовершествований для наведения и стрельбы ракет. Также, это система, необходимая для всех ракетных типов оружия. El guiado avanzado de misiles, o AMG en sus siglas en inglés, ofrece múltiples mejoras en el fijado y disparo de misiles. Es también un sistema requerido para armas de tipo misil. Das Erweiterte Raketenlenksystem, auch ERls genannt, bietet viele Verbesserungen zum Aufschalten und Feuern mittels gelenkter Raketen. - Le guidage avancé de missile, ou AMG en anglais, apporte de multiple améliorations au verouillage et au tir de missiles. C'est aussi un framework requis pour tout arme de type missile. + Le guidage avancé de missile, ou AMG en anglais, apporte de multiples améliorations au verouillage et au tir de missiles. C'est aussi un framework requis pour tout arme de type missile. A fejlett rakétairányító (vagy AMG) többféle módosítást tartalmaz a rakéták célkövetéséhez és tüzeléséhez. Ez egy szükséges keresztrendszer a rakéta-alapú fegyverekhez. Orientação avançada de mísseis ou OAM, fornece vários aprimoramentos para travamento de mísseis e disparos. Também é um sistema requerido para disparar armas que utilizem mísseis. Pokočilé navádění raket (AMG) poskytuje několik vylepšení pro lepší zaměření a následnou střelbu. Je to prvek vyžadovaný u typu zbraní jako jsou rakety. @@ -114,7 +114,7 @@ Tylko gracz Solo jugador Nur Spieler - Pouze hráči + Pouze hráč Somente jogador Seulement les joueurs Csak játékosok @@ -126,7 +126,7 @@ Gracz oraz AI Jugador e IA Spieler und KI - Hráči a AI + Hráč a AI Jogador e IA Joueurs et IA Játékosok és AI diff --git a/addons/missionmodules/CfgVehicles.hpp b/addons/missionmodules/CfgVehicles.hpp index ebf0b04f66..6a2f74b934 100644 --- a/addons/missionmodules/CfgVehicles.hpp +++ b/addons/missionmodules/CfgVehicles.hpp @@ -9,9 +9,9 @@ class CfgVehicles { class ACE_moduleAmbianceSound: Module_F { scope = 2; displayName = CSTRING(AmbianceSounds_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Ambient_Sounds_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Ambient_Sounds_ca.paa); category = "ACE_missionModules"; - function = QUOTE(FUNC(moduleAmbianceSound)); + function = QFUNC(moduleAmbianceSound); functionPriority = 1; isGlobal = 1; isTriggerActivated = 0; diff --git a/addons/missionmodules/config.cpp b/addons/missionmodules/config.cpp index 0867b486c6..2f58f5c42f 100644 --- a/addons/missionmodules/config.cpp +++ b/addons/missionmodules/config.cpp @@ -2,12 +2,13 @@ class CfgPatches { class ADDON { - units[] = {"cse_moduleAmbianceSound"}; + units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Glowbal"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"Glowbal"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf index 3ee45f324e..eb44a68f15 100644 --- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf +++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf @@ -74,7 +74,7 @@ if (_activated && local _logic) then { [_pfhHandle] call CBA_fnc_removePerFrameHandler; }; - if (ACE_time - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then { + if (CBA_missionTime - _lastTimePlayed >= ((_minDelayBetweensounds + random(_maxDelayBetweenSounds)) min _maxDelayBetweenSounds)) then { // Find all players in session. _allUnits = if (isMultiplayer) then {playableUnits} else {[ACE_player]}; @@ -109,11 +109,11 @@ if (_activated && local _logic) then { // If no unit is to close to this position, we will play the sound. if ({(_newPos distance _x < (_minimalDistance / 2))}count _allUnits == 0) then { playSound3D [selectRandom _ambianceSounds, objNull, false, _newPos, _volume, 1, 1000]; - _args set [8, ACE_time]; + _args set [8, CBA_missionTime]; }; }; }; - }, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, ACE_time] ] call CBA_fnc_addPerFrameHandler; + }, 0.1, [_logic, _ambianceSounds, _minimalDistance, _maximalDistance, _minDelayBetweensounds, _maxDelayBetweenSounds, _volume, _followPlayers, CBA_missionTime] ] call CBA_fnc_addPerFrameHandler; }; true; diff --git a/addons/missionmodules/stringtable.xml b/addons/missionmodules/stringtable.xml index 4fc1cd08b7..1043d99f64 100644 --- a/addons/missionmodules/stringtable.xml +++ b/addons/missionmodules/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/mk6mortar/ACE_Settings.hpp b/addons/mk6mortar/ACE_Settings.hpp index 6d1eebf942..cd7d4e64cb 100644 --- a/addons/mk6mortar/ACE_Settings.hpp +++ b/addons/mk6mortar/ACE_Settings.hpp @@ -1,21 +1,29 @@ class ACE_Settings { //These settings effect gameplay difficutly: defaults will leave the mortar the same as vanilla class GVAR(airResistanceEnabled) { + displayName = CSTRING(airResistanceEnabled_DisplayName); + description = CSTRING(airResistanceEnabled_Description); value = 0; typeName = "BOOL"; isClientSetable = 0; }; class GVAR(allowComputerRangefinder) { + displayName = CSTRING(allowComputerRangefinder_DisplayName); + description = CSTRING(allowComputerRangefinder_Description); value = 1; typeName = "BOOL"; isClientSetable = 0; }; class GVAR(allowCompass) { + displayName = CSTRING(allowCompass_DisplayName); + description = CSTRING(allowCompass_Description); value = 1; typeName = "BOOL"; isClientSetable = 0; }; class GVAR(useAmmoHandling) { + displayName = CSTRING(useAmmoHandling_DisplayName); + description = CSTRING(useAmmoHandling_Description); value = 0; typeName = "BOOL"; isClientSetable = 0; diff --git a/addons/mk6mortar/CfgVehicles.hpp b/addons/mk6mortar/CfgVehicles.hpp index 175cbf82f3..75b0277192 100644 --- a/addons/mk6mortar/CfgVehicles.hpp +++ b/addons/mk6mortar/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { condition = QUOTE(_this call FUNC(rangeTableCanUse)); statement = QUOTE(_this call FUNC(rangeTableOpen)); priority = 0; - icon = QUOTE(PATHTOF(UI\icon_rangeTable.paa)); + icon = QPATHTOF(UI\icon_rangeTable.paa); exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; }; @@ -102,7 +102,7 @@ class CfgVehicles { scope = 2; isGlobal = 0; isSingular = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_mk6_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_mk6_ca.paa); functionPriority = 0; class Arguments { class airResistanceEnabled { @@ -139,8 +139,7 @@ class CfgVehicles { class ACE_Box_82mm_Mo_HE: Box_NATO_AmmoOrd_F { displayName = CSTRING(HEBox_DisplayName); author = ECSTRING(common,ACETeam); - transportMaxWeapons = 4; - transportMaxMagazines = 8; + maximumLoad = 400; class TransportMagazines { MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_HE,8); }; @@ -161,7 +160,7 @@ class CfgVehicles { }; class ACE_Box_82mm_Mo_Combo: ACE_Box_82mm_Mo_HE { displayName = CSTRING(ComboBox_DisplayName); - transportMaxMagazines = 48; + maximumLoad = 2400; class TransportMagazines { MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_HE,32); MACRO_ADDMAGAZINE(ACE_1Rnd_82mm_Mo_Smoke,8); diff --git a/addons/mk6mortar/CfgWeapons.hpp b/addons/mk6mortar/CfgWeapons.hpp index f535840e99..cb5454321d 100644 --- a/addons/mk6mortar/CfgWeapons.hpp +++ b/addons/mk6mortar/CfgWeapons.hpp @@ -7,7 +7,7 @@ class CfgWeapons { scope = 2; displayName = CSTRING(rangetable_name); descriptionShort = CSTRING(rangetable_description); - picture = QUOTE(PATHTOF(UI\icon_rangeTable.paa)); + picture = QPATHTOF(UI\icon_rangeTable.paa); class ItemInfo: InventoryItem_Base_F { mass = 0.5; }; diff --git a/addons/mk6mortar/RscRangeTable.hpp b/addons/mk6mortar/RscRangeTable.hpp index 6bf0e51619..c719dd7ee4 100644 --- a/addons/mk6mortar/RscRangeTable.hpp +++ b/addons/mk6mortar/RscRangeTable.hpp @@ -7,7 +7,7 @@ class ACE_82mm_RangeTable_Dialog { class ControlsBackground { class TableBackground: RscPicture { idc = -1; - text = QUOTE(PATHTOF(UI\RangeTable_background.paa)); + text = QPATHTOF(UI\RangeTable_background.paa); x = "18 *(safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)"; y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)"; w = "16.2634559672906 * (safeZoneH / 40)"; diff --git a/addons/mk6mortar/XEH_postInit.sqf b/addons/mk6mortar/XEH_postInit.sqf index 5c82d55f50..9c098b8cdd 100644 --- a/addons/mk6mortar/XEH_postInit.sqf +++ b/addons/mk6mortar/XEH_postInit.sqf @@ -15,6 +15,8 @@ _static setMagazineTurretAmmo [_magazine, _ammoCount, [0]]; }] call EFUNC(common,addEventHandler); +["initMortar", {_this call FUNC(mortarInit);}] call EFUNC(common,addEventHandler); + if (!hasInterface) exitWith {}; ["playerVehicleChanged", {_this call FUNC(handlePlayerVehicleChanged);}] call EFUNC(common,addEventHandler); diff --git a/addons/mk6mortar/cfgMagazines.hpp b/addons/mk6mortar/cfgMagazines.hpp index 679539e1a2..a726bc5a9f 100644 --- a/addons/mk6mortar/cfgMagazines.hpp +++ b/addons/mk6mortar/cfgMagazines.hpp @@ -8,8 +8,8 @@ class cfgMagazines { displayName = CSTRING(magazine_HE_displayName); displayNameShort = ""; descriptionShort = CSTRING(magazine_descriptionShort); - model = PATHTOF(data\l16_ammo_he.p3d); - picture = PATHTOF(UI\w_l16_ammo_he_ca.paa); + model = QPATHTOF(data\l16_ammo_he.p3d); + picture = QPATHTOF(UI\w_l16_ammo_he_ca.paa); mass = 50; }; class 8Rnd_82mm_Mo_Smoke_white; @@ -21,8 +21,8 @@ class cfgMagazines { displayName = CSTRING(magazine_Smoke_displayName); displayNameShort = ""; descriptionShort = CSTRING(magazine_descriptionShort); - model = PATHTOF(data\l16_ammo_smk_white.p3d); - picture = PATHTOF(UI\w_l16_ammo_smk_white_ca.paa); + model = QPATHTOF(data\l16_ammo_smk_white.p3d); + picture = QPATHTOF(UI\w_l16_ammo_smk_white_ca.paa); mass = 50; }; class 8Rnd_82mm_Mo_Flare_white; @@ -34,8 +34,8 @@ class cfgMagazines { displayName = CSTRING(magazine_Illum_displayName); displayNameShort = ""; descriptionShort = CSTRING(magazine_descriptionShort); - model = PATHTOF(data\l16_ammo_illum.p3d); - picture = PATHTOF(UI\w_l16_ammo_illum_ca.paa); + model = QPATHTOF(data\l16_ammo_illum.p3d); + picture = QPATHTOF(UI\w_l16_ammo_illum_ca.paa); mass = 50; }; class 8Rnd_82mm_Mo_guided; @@ -47,8 +47,8 @@ class cfgMagazines { displayName = CSTRING(magazine_HE_Guided_displayName); displayNameShort = ""; descriptionShort = CSTRING(magazine_descriptionShort); - model = PATHTOF(data\l16_ammo_he.p3d); - picture = PATHTOF(UI\w_l16_ammo_he_ca.paa); + model = QPATHTOF(data\l16_ammo_he.p3d); + picture = QPATHTOF(UI\w_l16_ammo_he_ca.paa); mass = 50; }; class 8Rnd_82mm_Mo_LG; @@ -60,8 +60,8 @@ class cfgMagazines { displayName = CSTRING(magazine_HE_LaserGuided_displayName); displayNameShort = ""; descriptionShort = CSTRING(magazine_descriptionShort); - model = PATHTOF(data\l16_ammo_he.p3d); - picture = PATHTOF(UI\w_l16_ammo_he_ca.paa); + model = QPATHTOF(data\l16_ammo_he.p3d); + picture = QPATHTOF(UI\w_l16_ammo_he_ca.paa); mass = 50; }; }; diff --git a/addons/mk6mortar/config.cpp b/addons/mk6mortar/config.cpp index 102875a195..c445bd0a32 100644 --- a/addons/mk6mortar/config.cpp +++ b/addons/mk6mortar/config.cpp @@ -7,8 +7,9 @@ class CfgPatches { weapons[] = {"ACE_RangeTable_82mm","ace_mortar_82mm"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"PabstMirror","Grey","VKing"}; - authorUrl = "https://github.com/acemod"; + author = ECSTRING(common,ACETeam); + authors[] = {"PabstMirror","Grey","VKing"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf index 9d8b292070..d1e0a8dd05 100644 --- a/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf +++ b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf @@ -21,7 +21,7 @@ Example: private ["_startTime", "_muzzleVelocity", "_rangeToHit", "_airFriction", "_vacElevation", "_radicand", "_maxElev", "_minElev", "_error", "_solutionElevation", "_lastTestResult", "_numberOfAttempts", "_lineElevation", "_lineTimeOfFlight", "_lineHeightElevation", "_lineHeightTimeDelta", "_lineCrosswindDeg", "_lineHeadwindMeters", "_lineTailWindMeters", "_result"]; -_startTime = ACE_diagTime; +_startTime = diag_tickTime; _muzzleVelocity = _this select 0; _rangeToHit = _this select 1; @@ -74,6 +74,6 @@ _lineAirDensDec = (_rangeToHit - (_lastTestResult select 0)) / 10; _lastTestResult = [_lineElevation, _muzzleVelocity, _airFriction, 15, 1.1, 0, 0, 0, TIME_STEP] call FUNC(dev_simulateShot); _lineAirDensInc = (_rangeToHit - (_lastTestResult select 0)) / 10; -// systemChat format ["debug: Range %1 - in %2 sec", _rangeToHit, (ACE_diagTime - _startTime)]; +// systemChat format ["debug: Range %1 - in %2 sec", _rangeToHit, (diag_tickTime - _startTime)]; [_rangeToHit, _lineElevation, _lineHeightElevation, _lineHeightTimeDelta, _lineTimeOfFlight, _lineCrosswindDeg, _lineHeadwindMeters, _lineTailWindMeters, _lineTempDec, _lineTempInc, _lineAirDensDec, _lineAirDensInc] diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index e14fd77f6a..483a69d42b 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -70,8 +70,8 @@ if (_newMuzzleVelocityCoefficent != 1) then { [_pfID] call CBA_fnc_removePerFrameHandler; }; - _deltaT = ACE_time - _time; - _args set[2, ACE_time]; + _deltaT = CBA_missionTime - _time; + _args set[2, CBA_missionTime]; _bulletVelocity = velocity _shell; _bulletSpeed = vectorMagnitude _bulletVelocity; @@ -85,4 +85,4 @@ if (_newMuzzleVelocityCoefficent != 1) then { _shell setVelocity _bulletVelocity; -}, 0, [_projectile, MK6_82mm_AIR_FRICTION, ACE_time, _relativeDensity]] call CBA_fnc_addPerFrameHandler; +}, 0, [_projectile, MK6_82mm_AIR_FRICTION, CBA_missionTime, _relativeDensity]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf index 02049289aa..c3956d48a9 100644 --- a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf +++ b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf @@ -16,31 +16,30 @@ */ #include "script_component.hpp" -PARAMS_2(_player,_newVehicle); - -private["_tubeWeaponName" ,"_fireModes", "_lastFireMode"]; +params ["_player", "_newVehicle"]; if (isNull _newVehicle) exitWith {}; if (!(_newVehicle isKindOf "Mortar_01_base_F")) exitWith {}; // Run magazine handling initialization if enabled -if (!EGVAR(common,settingsInitFinished)) then { - EGVAR(common,runAtSettingsInitialized) pushBack [{ - if (GVAR(useAmmoHandling) && {!(_this getVariable [QGVAR(initialized),false]) && !(_this getVariable [QGVAR(exclude),false])}) then { - _this call FUNC(mortarInit); +if (!(_newVehicle getVariable [QGVAR(initialized),false]) && !(_newVehicle getVariable [QGVAR(exclude),false])) then { + // Make sure that mortar init is executed after settings init + [{ + params ["_mortar"]; + if (GVAR(useAmmoHandling) && {!(_mortar getVariable [QGVAR(initialized),false]) && !(_mortar getVariable [QGVAR(exclude),false])}) then { + //wait for proper turret locality change + [{ + ["initMortar", [_this], [_this]] call EFUNC(common,globalEvent); + }, _mortar, 0.05] call CBA_fnc_waitAndExecute; }; - }, _newVehicle]; -} else { - if (GVAR(useAmmoHandling) && {!(_newVehicle getVariable [QGVAR(initialized),false]) && !(_newVehicle getVariable [QGVAR(exclude),false])}) then { - _newVehicle call FUNC(mortarInit); - }; + }, _newVehicle] call EFUNC(common,runAfterSettingsInit); }; -_tubeWeaponName = (weapons _newVehicle) select 0; -_fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes"); +private _tubeWeaponName = (weapons _newVehicle) select 0; +private _fireModes = getArray (configFile >> "CfgWeapons" >> _tubeWeaponName >> "modes"); //Restore last firemode: -_lastFireMode = _newVehicle getVariable [QGVAR(lastFireMode), -1]; +private _lastFireMode = _newVehicle getVariable [QGVAR(lastFireMode), -1]; if (_lastFireMode != -1) then { _player action ["SwitchWeapon", _newVehicle, _player, _lastFireMode]; }; @@ -72,7 +71,7 @@ if (_lastFireMode != -1) then { _display = uiNamespace getVariable ["ACE_Mk6_RscWeaponRangeArtillery", displayNull]; if (isNull _display) exitWith {}; //It may be null for the first frame - _chargeText = format ["%1: %2 ", (localize LSTRING(rangetable_charge)), _currentChargeMode, QUOTE(PATHTOF(UI\ui_charges.paa))]; + _chargeText = format ["%1: %2 ", (localize LSTRING(rangetable_charge)), _currentChargeMode, QPATHTOF(UI\ui_charges.paa)]; //Hud should hidden in 3rd person _notGunnerView = cameraView != "GUNNER"; diff --git a/addons/mk6mortar/functions/fnc_mortarInit.sqf b/addons/mk6mortar/functions/fnc_mortarInit.sqf index 7c74cb8249..65d0ff74db 100644 --- a/addons/mk6mortar/functions/fnc_mortarInit.sqf +++ b/addons/mk6mortar/functions/fnc_mortarInit.sqf @@ -18,15 +18,16 @@ params ["_mortar"]; if (_mortar getVariable [QGVAR(initialized),false] || _mortar getVariable [QGVAR(exclude),false]) exitWith {TRACE_1("Exit",_mortar)}; +if (!(_mortar turretLocal [0])) exitWith {TRACE_1("Exit - turret not local",_mortar)}; -// Remove all magazines +// Remove all magazines from turret if (count magazines _mortar > 0) then { { - [QGVAR(removeMagazine), [_mortar, _x]] call EFUNC(common,globalEvent); + _mortar removeMagazineTurret [_x,[0]]; } forEach magazines _mortar; }; -// Replace current weapon with ammo handling weapon +// Replace current turret weapon with ammo handling weapon private _currentWeapon = _mortar weaponsTurret [0] select 0; private _newWeapon = ""; @@ -37,8 +38,8 @@ if (_currentWeapon == "mortar_82mm") then { }; if (_newWeapon != "") then { - _mortar removeWeaponGlobal _currentWeapon; - _mortar addWeaponGlobal _newWeapon; + _mortar removeWeaponTurret [_currentWeapon,[0]]; + _mortar addWeaponTurret [_newWeapon,[0]]; }; _mortar setVariable [QGVAR(initialized),true,true]; diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index b6f7ef719d..ba13c57627 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -149,6 +149,8 @@ Aktiviere Munitionshandhabung Usar manejo de munición. Aktywuj obsługę amunicji + Utiliser la gestion des munitions + Utilizza la gestione delle munizioni Usar manejo de munição @@ -156,6 +158,8 @@ Enfernt das Magzin des Mörsers. Es ist nun erforderlich, die einzelnen Patronen manuell zu laden. Dies beeinflusst nicht die KI-Truppen. Elimina los cargadores del mortero, requiriendo al artillero o cargador la carga manual de cada rondas. No afecta morteros controlados por IA. Usuwa magazynki moździerza, wymagając ładowania pojedynczych pocisków przez strzelca lub ładowniczego. Nie dotyczy moździerzy AI. + Enlever les chargeurs de mortier, requiert des obus individuels qui doivent être chargés par le tireur ou le servant. N'affect pas les mortiers IA. + Toglie i proiettili dal mortaio. I colpi singoli devono essere caricati dall'operatore. Non cambia quado l'IA spara. Elimina os carregadores do morteiro, requerendo que o atirador ou carregador utilize de forma individual a munição. Não afeta os morteiros controlados pela IA. @@ -163,6 +167,9 @@ Entferne Patrone Extraer ronda Wyładuj pocisk + Enlever l'obus + Togli proiettile + Odstranit náboj Remover munição @@ -170,6 +177,9 @@ Lade Mörser Cargar mortero Załaduj moździerz + Charger le mortier + Carica mortaio + Nabít minomet Carregar morteiro @@ -177,6 +187,8 @@ Mörser entladen Descargando ronda Rozładowywanie moździerza + Déchargement de l'obus + Scarica proiettile Descarregar munição @@ -184,6 +196,9 @@ Patrone vorbereiten Preparando ronda Przygotowywanie pocisku + Praparation de l'obus + Prepara il proiettile + Připavuji náboj Preparar munição @@ -191,6 +206,9 @@ Lade Sprengpatrone Cargar HE Załaduj pocisk wybuchowy + Charger HE + Carica proiettile esplosivo ad alto potenziale (HE) + Nabít HE Carregar HE @@ -198,6 +216,9 @@ Lade Nebelpatrone Cargar Humo Załaduj pocisk dymny + Charger Fumigène + Carica fumogeno + Nabít Dýmovnici Carregar Fumaça @@ -205,6 +226,9 @@ Lade Leuchtpatrone Cargar Iluminación Załaduj pocisk oświetlający + Charger Eclairante + Carica illuminante + Nabít Světlici Carregar Iluminação @@ -212,6 +236,9 @@ Lade gelenkte Sprengpatrone Cagar HE Guiada Załaduj kierowany pocisk wybuchowy + Charger HE guidé + Carica HE guidata + Nabít HE (Naváděné) Carregar HE Guiada @@ -219,6 +246,9 @@ Lade lasergelenkte Sprengpatrone Cargar HE Guiada por Laser Załaduj laserowo napr. pocisk wybuchowy + Charger HE guidé au laser + Carica HE a guida laser + Nabít HE (Naváděné laserem) Carregar HE Guiada por Laser @@ -226,6 +256,9 @@ 82mm Sprengpatrone Ronda 82mm HE Pocisk wybuchowy kal. 82mm + Obus de 82mm HE + Proiettile da 82mm HE + 82mm HE náboj Munição 82mm HE @@ -233,6 +266,9 @@ 82mm Nebelpatrone Ronda 82mm Humo Pocisk dymny kal. 82mm + Obus de 82mm fumigène + Proiettile Fumogeno da 82mm + 82mm Kouřový náboj Munição 82mm Fumaça @@ -240,6 +276,9 @@ 82mm Leuchtpatrone Ronda 82mm Iluminación Pocisk oświetlający kal. 82mm + Obus de 82mm éclairant + Proiettile illuminante da 82mm + 82mm Osvětlovací náboj Munição 82mm Iluminação @@ -247,6 +286,9 @@ 82mm gelenkte Sprengpatrone Ronda 82mm Guiada Kierowany pocisk wybuchowy kal. 82mm + Obus de 82mm HE guidé + Proiettile HE guidato + 82mm HE náboj (naváděný) Munição 82mm HE Guiada @@ -254,6 +296,9 @@ 82mm lasergelenkte Sprengpatrone Ronda 82mm Guiada por Laser Laserowo napr. pocisk wybuchowy kal. 82mm + Obus de 82mm HE guidé au laser + Proiettile HE a guida laser + 82mm HE náboj (naváděný laserem) Munição 82mm HE Guiada por Laser @@ -261,6 +306,9 @@ Wird im Mk6 Mörser verwendet Usada en el mortero Mk6 Używany w moździerzu Mk6 + Utilisé dans le mortier Mk6 + Usato nel mortaio Mk6 + Používá se u minometu Mk6 Usada no Morteiro MK6 @@ -268,6 +316,9 @@ [ACE] 82mm Sprengpatronenkiste [ACE] Caja de municiones 82mm HE [ACE] Skrzynka amunicji wybuchowej 82mm + [ACE] Obus de 82mm HE + [ACE] Scatola proiettili espolisvi ad alto potenziale (HE) da 82mm + [ACE] Bedna s municí (82mm HE) [ACE] Caixa de Munição 82mm HE @@ -275,6 +326,9 @@ [ACE] 82mm Nebelpatronenkiste [ACE] Caja de municiones 82mm Humo [ACE] Skrzynka amunicji dymnej 82mm + [ACE] Obus de 82mm fumigène + [ACE] Scatola fumogeni da 82mm + [ACE] Bedna s municí (82mm Dýmovnice) [ACE] Caixa de Munição 82mm Fumaça @@ -282,6 +336,9 @@ [ACE] 82mm Leuchtpatronenkiste [ACE] Caja de municiones 82mm Iluminacion [ACE] Skrzynka amunicji oświetlającej 82mm + [ACE] Obus de 82mm éclairants + [ACE] Scatola illuminanti da 82mm + [ACE] Bedna s municí (82mm Světlice) [ACE] Caixa de Munição 82mm Iluminação @@ -289,6 +346,9 @@ [ACE] 82mm Standardkiste [ACE] Caja de municiones 82mm por defecto [ACE] Skrzynka amunicji standardowej 82mm + [ACE] Obus de 82mm par défaut + [ACE] Scatola proiettili 82mm standard + [ACE] Bedna se standardní 82mm municí [ACE] Caixa de Munição 82mm Padrão diff --git a/addons/modules/XEH_postInit.sqf b/addons/modules/XEH_postInit.sqf index 0b8cc67842..8f0c430db2 100644 --- a/addons/modules/XEH_postInit.sqf +++ b/addons/modules/XEH_postInit.sqf @@ -4,7 +4,7 @@ ["InitSettingsFromModules", { // TODO This is a basic and limited implementation that mimics some of the functionality from the A3 module framework, but not all of it. // We have to execute this in the postInit XEH because on object init, the parameters of the modules are not yet available. They are if we execute it at the start of postInit execution. - + private _uniqueModulesHandled = []; { [_x] call { @@ -28,8 +28,8 @@ }; if (_isSingular && {_logicType in _uniqueModulesHandled}) then { //ToDo: should this be an exit? ACE_LOGWARNING_1("Module [%1] - More than 1 singular module placed", _logicType); - }; - if (_isSingular) then {_uniqueModulesHandled pushBack _logicType;}; + }; + if (_isSingular) then {_uniqueModulesHandled pushBack _logicType;}; if (_isGlobal || isServer) then { [_logic, (synchronizedObjects _logic), true] call _function; @@ -44,7 +44,7 @@ }; }; } forEach GVAR(moduleInitCollection); - + if (isServer) then { GVAR(serverModulesRead) = true; publicVariable QGVAR(serverModulesRead); diff --git a/addons/modules/config.cpp b/addons/modules/config.cpp index d25e193d32..aeb097fdff 100644 --- a/addons/modules/config.cpp +++ b/addons/modules/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_main"}; - author[] = {"Glowbal"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"Glowbal"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/movement/XEH_PREP.hpp b/addons/movement/XEH_PREP.hpp index 8e465970eb..04913f7670 100644 --- a/addons/movement/XEH_PREP.hpp +++ b/addons/movement/XEH_PREP.hpp @@ -1,5 +1,7 @@ +PREP(addLoadToUnitContainer); PREP(getWeight); PREP(canClimb); PREP(climb); PREP(handleClimb); +PREP(handleVirtualMass); diff --git a/addons/movement/XEH_postInit.sqf b/addons/movement/XEH_postInit.sqf index 806823f4c4..d9179a912a 100644 --- a/addons/movement/XEH_postInit.sqf +++ b/addons/movement/XEH_postInit.sqf @@ -3,6 +3,9 @@ if (!hasInterface) exitWith {}; +["playerChanged", FUNC(handleVirtualMass)] call FUNC(addEventHandler); +["playerInventoryChanged", FUNC(handleVirtualMass)] call FUNC(addEventHandler); + ["ACE3 Movement", QGVAR(climb), localize LSTRING(Climb), { // Conditions: canInteract diff --git a/addons/movement/config.cpp b/addons/movement/config.cpp index 8ea42fbf0c..a1d9b25be4 100644 --- a/addons/movement/config.cpp +++ b/addons/movement/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2","KoffeinFlummi","Tachii"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2","KoffeinFlummi","Tachii"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/movement/functions/fnc_addLoadToUnitContainer.sqf b/addons/movement/functions/fnc_addLoadToUnitContainer.sqf new file mode 100644 index 0000000000..a79b2ab917 --- /dev/null +++ b/addons/movement/functions/fnc_addLoadToUnitContainer.sqf @@ -0,0 +1,32 @@ +/* + * Author: commy2 + * Add (negative numbers to subtract) a virtual mass to a units container. + * + * Arguments: + * 0: The Unit + * 1: The Container + * 2: The Virtual Load + * + * Return Value: + * Success? + * + * Public: No + */ +#include "script_component.hpp" + +params [["_unit", objNull, [objNull]], ["_container", objNull, [objNull]], ["_virtualLoadToAdd", 0, [0]]]; + +if !(_container in [ + _unit, + uniformContainer _unit, + vestContainer _unit, + backpackContainer _unit +]) exitWith {false}; + +private _virtualLoad = (_container getVariable [QGVAR(vLoad), 0]) + _virtualLoadToAdd; +_container setVariable [QGVAR(vLoad), _virtualLoad, true]; + +// update +_unit call FUNC(handleVirtualMass); + +true diff --git a/addons/movement/functions/fnc_getWeight.sqf b/addons/movement/functions/fnc_getWeight.sqf index 11dd8c4ee6..b64abc3623 100644 --- a/addons/movement/functions/fnc_getWeight.sqf +++ b/addons/movement/functions/fnc_getWeight.sqf @@ -17,7 +17,18 @@ params ["_unit"]; -private _weight = loadAbs _unit * 0.1; +private _virtualLoad = 0; + +{ + _virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]); +} forEach [ + _unit, + uniformContainer _unit, + vestContainer _unit, + backpackContainer _unit +]; + +private _weight = (loadAbs _unit + _virtualLoad) * 0.1; if (GVAR(useImperial)) then { _weight = format ["%1lb", (round (_weight * 100)) / 100]; diff --git a/addons/movement/functions/fnc_handleVirtualMass.sqf b/addons/movement/functions/fnc_handleVirtualMass.sqf new file mode 100644 index 0000000000..13a7b77f9a --- /dev/null +++ b/addons/movement/functions/fnc_handleVirtualMass.sqf @@ -0,0 +1,43 @@ +/* + * Author: commy2 + * Recalculate the units loadCoef to emulate a mass added to uniform, vest or backpack. + * + * Arguments: + * 0: The Unit (usually the player) + * + * Return Value: + * Nothing + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit"]; + +// add sum of virtual loads +private _virtualLoad = 0; + +{ + _virtualLoad = _virtualLoad + (_x getVariable [QGVAR(vLoad), 0]); +} forEach [ + _unit, + uniformContainer _unit, + vestContainer _unit, + backpackContainer _unit +]; + +// get absolute vanilla load +private _absLoad = loadAbs _unit / load _unit; + +// try to preserve other changes to the "LoadCoef" unitTrait +private _loadCoef = _unit getVariable QGVAR(loadCoef); + +if (isNil "_loadCoef") then { + _loadCoef = _unit getUnitTrait "loadCoef"; + _unit setVariable [QGVAR(loadCoef), _loadCoef, true]; +}; + +// calc. new "virtual" loadCoef +private _virtualLoadCoef = (1 + _virtualLoad / _absLoad) * _loadCoef; + +_unit setUnitTrait ["loadCoef", _virtualLoadCoef]; diff --git a/addons/movement/stringtable.xml b/addons/movement/stringtable.xml index 4ab3d1253b..af5ce71af4 100644 --- a/addons/movement/stringtable.xml +++ b/addons/movement/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/mx2a/CfgWeapons.hpp b/addons/mx2a/CfgWeapons.hpp index 6f590e2ed4..7ff5943a88 100644 --- a/addons/mx2a/CfgWeapons.hpp +++ b/addons/mx2a/CfgWeapons.hpp @@ -5,9 +5,9 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); displayName = CSTRING(DisplayName); descriptionShort = CSTRING(Description); - model = PATHTOF(data\ace_mx2a.p3d); - modelOptics = QUOTE(PATHTOEF(apl,LWTS_optic.p3d)); - picture = PATHTOF(UI\w_mx2a_ca.paa); + model = QPATHTOF(data\ace_mx2a.p3d); + modelOptics = QPATHTOEF(apl,LWTS_optic.p3d); + picture = QPATHTOF(UI\w_mx2a_ca.paa); opticsZoomMax = 0.1; distanceZoomMax = 120; opticsZoomMin = 0.05; diff --git a/addons/mx2a/config.cpp b/addons/mx2a/config.cpp index 45b1643ed2..c59dc43dd3 100644 --- a/addons/mx2a/config.cpp +++ b/addons/mx2a/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_MX2A"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_apl"}; - author[] = {"Spooner", "tcp"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Spooner", "tcp"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/mx2a/stringtable.xml b/addons/mx2a/stringtable.xml index ad46cebfde..e2c7ed2dc7 100644 --- a/addons/mx2a/stringtable.xml +++ b/addons/mx2a/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/nametags/CfgVehicles.hpp b/addons/nametags/CfgVehicles.hpp index 7ca13b5aeb..6b8b8956ae 100644 --- a/addons/nametags/CfgVehicles.hpp +++ b/addons/nametags/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { scope = 2; isGlobal = 1; isSingular = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_NameTags_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_NameTags_ca.paa); class Arguments { class showPlayerNames { displayName = CSTRING(ShowPlayerNames); diff --git a/addons/nametags/XEH_postInit.sqf b/addons/nametags/XEH_postInit.sqf index 46d0e287d8..0ef4fde96b 100644 --- a/addons/nametags/XEH_postInit.sqf +++ b/addons/nametags/XEH_postInit.sqf @@ -14,7 +14,7 @@ GVAR(showNamesTime) = -10; if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; // Statement - GVAR(showNamesTime) = ACE_time; + GVAR(showNamesTime) = CBA_missionTime; if (call FUNC(canShow)) then{ call FUNC(doShow); }; // Return false so it doesn't block other actions false diff --git a/addons/nametags/config.cpp b/addons/nametags/config.cpp index a2d38254f1..b02dfa9297 100644 --- a/addons/nametags/config.cpp +++ b/addons/nametags/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = { "commy2", "esteldunedain" }; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = { "commy2", "esteldunedain" }; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/nametags/functions/common.hpp b/addons/nametags/functions/common.hpp index 6aeb24fc5a..ef3706cd32 100644 --- a/addons/nametags/functions/common.hpp +++ b/addons/nametags/functions/common.hpp @@ -17,6 +17,6 @@ "a3\ui_f\data\IGUI\Cfg\Actions\getindriver_ca.paa", \ "a3\ui_f\data\IGUI\Cfg\Actions\getincommander_ca.paa", \ "a3\ui_f\data\IGUI\Cfg\Actions\getingunner_ca.paa", \ - QUOTE(PATHTOF(UI\icon_position_ffv.paa)), \ + QPATHTOF(UI\icon_position_ffv.paa), \ "a3\ui_f\data\IGUI\Cfg\Actions\getincargo_ca.paa" \ ] diff --git a/addons/nametags/functions/fnc_doShow.sqf b/addons/nametags/functions/fnc_doShow.sqf index 615916de7f..18c434f4c6 100644 --- a/addons/nametags/functions/fnc_doShow.sqf +++ b/addons/nametags/functions/fnc_doShow.sqf @@ -35,16 +35,16 @@ _turretRoles = _data apply {_x select 1}; _roleType = CARGO; _toShow = []; { - switch (_x) do { + switch (_x) do { case commander _vehicle: { _roleType = COMMANDER; }; case gunner _vehicle: { _roleType = GUNNER; - }; - case driver _vehicle: { + }; + case driver _vehicle: { _roleType = if(_isAir) then { PILOT } else { DRIVER }; - }; + }; default { _index = _turretUnits find _x; if(_index !=-1 ) then { @@ -61,7 +61,7 @@ _toShow = [ _toShow, [], { - _x select 1 + _x select 1 }, "ASCEND", { @@ -71,7 +71,7 @@ _toShow = [ ] call BIS_fnc_sortBy; _roleImages = ROLE_IMAGES; -{ +{ _unit = _x select 0; _roleType = _x select 1; _text = _text + format["%1
", [_unit] call EFUNC(common,getName), _roleImages select _roleType]; diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index c564e6e90f..f031882da7 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -33,10 +33,10 @@ _fnc_parameters = { private _icon = ""; private _size = 0; if (_drawSoundwave) then { - _icon = format [QUOTE(PATHTOF(UI\soundwave%1.paa)), floor random 10]; + _icon = format [QPATHTOF(UI\soundwave%1.paa), floor random 10]; _size = 1; } else { - if (_drawRank) then { + if (_drawRank && {rank _target != ""}) then { _icon = format["\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa", toLower rank _target]; _size = 1; }; diff --git a/addons/nametags/functions/fnc_getVehicleData.sqf b/addons/nametags/functions/fnc_getVehicleData.sqf index b0e0b1ff34..656cb8dc81 100644 --- a/addons/nametags/functions/fnc_getVehicleData.sqf +++ b/addons/nametags/functions/fnc_getVehicleData.sqf @@ -1,6 +1,6 @@ /* * Author: aeroson - * Gathers and caches data needed by AGM_CrewInfo_fnc_doShow. + * Gathers and caches data needed by ace_nametags_fnc_doShow. * What really does make difference for the engine is simulation of CfgAmmo. * Priority of roles is: driver/pilot, gunner, copilot, commander, FFV, cargo. * diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index eed96b3101..d9d26cd0ac 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -47,13 +47,13 @@ switch (GVAR(showPlayerNames)) do { }; case 3: { // Player names Only Keypress - _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - ACE_time); + _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - CBA_missionTime); _enabledTagsNearby = (_onKeyPressAlphaMax) > 0 || (GVAR(showSoundWaves) == 2); _enabledTagsCursor = false; }; case 4: { // Player names Only Cursor and Keypress - _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - ACE_time); + _onKeyPressAlphaMax = 2 + (GVAR(showNamesTime) - CBA_missionTime); _enabledTagsNearby = (GVAR(showSoundWaves) == 2); _enabledTagsCursor = _onKeyPressAlphaMax > 0; }; diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index a945339ead..5f048eeb4e 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/nightvision/CfgVehicles.hpp b/addons/nightvision/CfgVehicles.hpp index 8b489ad64f..c540251dbb 100644 --- a/addons/nightvision/CfgVehicles.hpp +++ b/addons/nightvision/CfgVehicles.hpp @@ -19,9 +19,9 @@ class CfgVehicles { class GVAR(ModuleSettings): ACE_Module { scope = 2; displayName = CSTRING(Module_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_ca.paa); category = "ACE"; - function = QUOTE(FUNC(initModule)); + function = QFUNC(initModule); functionPriority = 1; isGlobal = 1; isTriggerActivated = 0; diff --git a/addons/nightvision/CfgWeapons.hpp b/addons/nightvision/CfgWeapons.hpp index 8a053a3262..72be31d8cf 100644 --- a/addons/nightvision/CfgWeapons.hpp +++ b/addons/nightvision/CfgWeapons.hpp @@ -47,7 +47,7 @@ class CfgWeapons { }; class ACE_NVG_Wide: NVGoggles { author = ECSTRING(common,ACETeam); - modelOptics = QUOTE(PATHTOF(models\ACE_nvg_wide_optics)); + modelOptics = QPATHTOF(models\ACE_nvg_wide_optics); displayName = CSTRING(NVG_FullScreen); ACE_NightVision_grain = 0.75; ACE_NightVision_blur = 0.055; diff --git a/addons/nightvision/XEH_postInitClient.sqf b/addons/nightvision/XEH_postInitClient.sqf index 17cb92f9cc..96badd59af 100644 --- a/addons/nightvision/XEH_postInitClient.sqf +++ b/addons/nightvision/XEH_postInitClient.sqf @@ -29,18 +29,18 @@ GVAR(ppEffectMuzzleFlash) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [ GVAR(ppEffectMuzzleFlash) ppEffectCommit 0; // Setup the event handlers -["playerInventoryChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler); +["playerInventoryChanged", FUNC(updatePPEffects)] call EFUNC(common,addEventHandler); ["playerVisionModeChanged", { _this call FUNC(updatePPEffects); _this call FUNC(onVisionModeChanged); }] call EFUNC(common,addEventHandler); -["cameraViewChanged", { +["cameraViewChanged", { _this call FUNC(updatePPEffects); _this call FUNC(onCameraViewChanged); }] call EFUNC(common,addEventHandler); -["playerVehicleChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler); -["playerTurretChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler); +["playerVehicleChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler); +["playerTurretChanged", {_this call FUNC(updatePPEffects)}] call EFUNC(common,addEventHandler); // Add keybinds ["ACE3 Equipment", QGVAR(IncreaseNVGBrightness), localize LSTRING(IncreaseNVGBrightness), diff --git a/addons/nightvision/config.cpp b/addons/nightvision/config.cpp index 1edeca6e5b..9397740e61 100644 --- a/addons/nightvision/config.cpp +++ b/addons/nightvision/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_NVG_Gen1", "ACE_NVG_Gen2", /*"ACE_NVG_Gen3",*/ "ACE_NVG_Gen4", "ACE_NVG_Wide"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2", "KoffeinFlummi", "PabstMirror"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2", "KoffeinFlummi", "PabstMirror"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index 21f97ed168..708860d134 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -142,6 +142,7 @@ Noktowizja Visione Notturna Visión Nocturna + Vision nocturne Settings for night vision. @@ -152,6 +153,7 @@ Ustawienia noktowizorów Impostazioni per visione notturna. Parámetros para visión nocturna + Réglage pour la vision nocturne Disable NVGs in scope @@ -162,6 +164,7 @@ Wył. NVG przy celowaniu Disabilita NVG nei mirini Desactivar NVG en miras + Desactiver les JVN dans les viseurs. Blocks the usage of night vision goggles whilst aiming down the sight. @@ -172,6 +175,7 @@ Uniemożliwia korzystanie z gogli noktowizyjnych przy celowaniu. Blocca l'uso di visori notturni mentre miri con ottiche. Desactiva el uso de gafas visión nocturna cuando se utilizan miras normales. + Bloque l'usage des JVN pendant la visée. \ No newline at end of file diff --git a/addons/noidle/config.cpp b/addons/noidle/config.cpp index 3c2ac1a9d6..b0792486f7 100644 --- a/addons/noidle/config.cpp +++ b/addons/noidle/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/noradio/config.cpp b/addons/noradio/config.cpp index 86697535f8..0781a4a15e 100644 --- a/addons/noradio/config.cpp +++ b/addons/noradio/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/norearm/config.cpp b/addons/norearm/config.cpp index 3477258612..2b670e0db1 100644 --- a/addons/norearm/config.cpp +++ b/addons/norearm/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/optics/CfgRscTitles.hpp b/addons/optics/CfgRscTitles.hpp index 3bbd6b62bc..42a2326a0e 100644 --- a/addons/optics/CfgRscTitles.hpp +++ b/addons/optics/CfgRscTitles.hpp @@ -33,7 +33,7 @@ class RscInGameUI { style = 48; size = 1; sizeEx = 0; - text = QUOTE(PATHTOF(reticles\ace_shortdot_reticle_1.paa)); + text = QPATHTOF(reticles\ace_shortdot_reticle_1.paa); w = 0; h = 0; }; @@ -115,73 +115,73 @@ class RscInGameUI { class ACE_RscWeapon_Hamr: ACE_RscWeapon_base { class ReticleDay: ReticleDay { - text = QUOTE(PATHTOF(reticles\hamr-reticle65_ca.paa)); + text = QPATHTOF(reticles\hamr-reticle65_ca.paa); }; class ReticleNight: ReticleNight { - text = QUOTE(PATHTOF(reticles\hamr-reticle65Illum_ca.paa)); + text = QPATHTOF(reticles\hamr-reticle65Illum_ca.paa); }; class BodyDay: BodyDay { - text = QUOTE(PATHTOF(reticles\hamr-body_ca.paa)); + text = QPATHTOF(reticles\hamr-body_ca.paa); }; class BodyNight: BodyNight { - text = QUOTE(PATHTOF(reticles\hamr-bodyNight_ca.paa)); + text = QPATHTOF(reticles\hamr-bodyNight_ca.paa); }; }; class ACE_RscWeapon_Arco: ACE_RscWeapon_base { class ReticleDay: ReticleDay { - text = QUOTE(PATHTOF(reticles\arco-reticle65_ca.paa)); + text = QPATHTOF(reticles\arco-reticle65_ca.paa); }; class ReticleNight: ReticleNight { - text = QUOTE(PATHTOF(reticles\arco-reticle65Illum_ca.paa)); + text = QPATHTOF(reticles\arco-reticle65Illum_ca.paa); }; class BodyDay: BodyDay { - text = QUOTE(PATHTOF(reticles\arco-body_ca.paa)); + text = QPATHTOF(reticles\arco-body_ca.paa); }; class BodyNight: BodyNight { - text = QUOTE(PATHTOF(reticles\arco-bodyNight_ca.paa)); + text = QPATHTOF(reticles\arco-bodyNight_ca.paa); }; }; class ACE_RscWeapon_MRCO: ACE_RscWeapon_base { class ReticleDay: ReticleDay { - text = QUOTE(PATHTOF(reticles\mrco-reticle556_ca.paa)); + text = QPATHTOF(reticles\mrco-reticle556_ca.paa); }; class ReticleNight: ReticleNight { - text = QUOTE(PATHTOF(reticles\mrco-reticle556Illum_ca.paa)); + text = QPATHTOF(reticles\mrco-reticle556Illum_ca.paa); }; class BodyDay: BodyDay { - text = QUOTE(PATHTOF(reticles\mrco-body_ca.paa)); + text = QPATHTOF(reticles\mrco-body_ca.paa); }; class BodyNight: BodyNight { - text = QUOTE(PATHTOF(reticles\mrco-bodyNight_ca.paa)); + text = QPATHTOF(reticles\mrco-bodyNight_ca.paa); }; }; class ACE_RscWeapon_SOS: ACE_RscWeapon_base { class ReticleDay: ReticleDay { - text = QUOTE(PATHTOF(reticles\sos-reticleMLR_ca.paa)); + text = QPATHTOF(reticles\sos-reticleMLR_ca.paa); }; class ReticleNight: ReticleNight { - text = QUOTE(PATHTOF(reticles\sos-reticleMLRIllum_ca.paa)); + text = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa); }; class BodyDay: BodyDay { - text = QUOTE(PATHTOF(reticles\sos-body_ca.paa)); + text = QPATHTOF(reticles\sos-body_ca.paa); }; class BodyNight: BodyNight { - text = QUOTE(PATHTOF(reticles\sos-bodyNight_ca.paa)); + text = QPATHTOF(reticles\sos-bodyNight_ca.paa); }; }; }; diff --git a/addons/optics/CfgWeapons.hpp b/addons/optics/CfgWeapons.hpp index 1be66d3aa2..668ca815b5 100644 --- a/addons/optics/CfgWeapons.hpp +++ b/addons/optics/CfgWeapons.hpp @@ -38,7 +38,7 @@ class CfgWeapons { weaponInfoType = "ACE_RscWeaponZeroing"; class ItemInfo: ItemInfo { - modelOptics = QUOTE(PATHTOF(models\ace_shortdot_optics.p3d)); + modelOptics = QPATHTOF(models\ace_shortdot_optics.p3d); class OpticsModes: OpticsModes { class Snip: Snip { @@ -65,10 +65,10 @@ class CfgWeapons { }; class ACE_optic_Hamr_2D: optic_Hamr { - GVAR(BodyDay) = QUOTE(PATHTOF(reticles\hamr-body_ca.paa)); - GVAR(BodyNight) = QUOTE(PATHTOF(reticles\hamr-bodyNight_ca.paa)); - GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\hamr-reticle65_ca.paa)); - GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\hamr-reticle65Illum_ca.paa)); + GVAR(BodyDay) = QPATHTOF(reticles\hamr-body_ca.paa); + GVAR(BodyNight) = QPATHTOF(reticles\hamr-bodyNight_ca.paa); + GVAR(ReticleDay) = QPATHTOF(reticles\hamr-reticle65_ca.paa); + GVAR(ReticleNight) = QPATHTOF(reticles\hamr-reticle65Illum_ca.paa); author = ECSTRING(common,ACETeam); _generalMacro = "ACE_optic_Hamr_2D"; @@ -76,7 +76,7 @@ class CfgWeapons { weaponInfoType = "ACE_RscWeapon_Hamr"; class ItemInfo: ItemInfo { - modelOptics = QUOTE(PATHTOF(models\ace_optics_reticle90.p3d)); + modelOptics = QPATHTOF(models\ace_optics_reticle90.p3d); class OpticsModes: OpticsModes { class Hamr2Collimator: Hamr2Collimator {}; @@ -101,7 +101,7 @@ class CfgWeapons { displayName = CSTRING(hamr_pip); class ItemInfo: ItemInfo { - modelOptics = QUOTE(PATHTOF(models\ace_optics_pip.p3d)); + modelOptics = QPATHTOF(models\ace_optics_pip.p3d); }; }; @@ -115,10 +115,10 @@ class CfgWeapons { }; class ACE_optic_Arco_2D: optic_Arco { - GVAR(BodyDay) = QUOTE(PATHTOF(reticles\arco-body_ca.paa)); - GVAR(BodyNight) = QUOTE(PATHTOF(reticles\arco-bodyNight_ca.paa)); - GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\arco-reticle65_ca.paa)); - GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\arco-reticle65Illum_ca.paa)); + GVAR(BodyDay) = QPATHTOF(reticles\arco-body_ca.paa); + GVAR(BodyNight) = QPATHTOF(reticles\arco-bodyNight_ca.paa); + GVAR(ReticleDay) = QPATHTOF(reticles\arco-reticle65_ca.paa); + GVAR(ReticleNight) = QPATHTOF(reticles\arco-reticle65Illum_ca.paa); author = ECSTRING(common,ACETeam); _generalMacro = "ACE_optic_Arco_2D"; @@ -126,7 +126,7 @@ class CfgWeapons { weaponInfoType = "ACE_RscWeapon_Arco"; class ItemInfo: ItemInfo { - modelOptics = QUOTE(PATHTOF(models\ace_optics_reticle90.p3d)); + modelOptics = QPATHTOF(models\ace_optics_reticle90.p3d); class OpticsModes: OpticsModes { class ARCO2collimator: ARCO2collimator {}; @@ -150,7 +150,7 @@ class CfgWeapons { displayName = CSTRING(arco_pip); class ItemInfo: ItemInfo { - modelOptics = QUOTE(PATHTOF(models\ace_optics_pip.p3d)); + modelOptics = QPATHTOF(models\ace_optics_pip.p3d); }; }; @@ -164,10 +164,10 @@ class CfgWeapons { }; class ACE_optic_MRCO_2D: optic_MRCO { - GVAR(BodyDay) = QUOTE(PATHTOF(reticles\mrco-body_ca.paa)); - GVAR(BodyNight) = QUOTE(PATHTOF(reticles\mrco-bodyNight_ca.paa)); - GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\mrco-reticle556_ca.paa)); - GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\mrco-reticle556Illum_ca.paa)); + GVAR(BodyDay) = QPATHTOF(reticles\mrco-body_ca.paa); + GVAR(BodyNight) = QPATHTOF(reticles\mrco-bodyNight_ca.paa); + GVAR(ReticleDay) = QPATHTOF(reticles\mrco-reticle556_ca.paa); + GVAR(ReticleNight) = QPATHTOF(reticles\mrco-reticle556Illum_ca.paa); author = ECSTRING(common,ACETeam); _generalMacro = "ACE_optic_MRCO_2D"; @@ -175,7 +175,7 @@ class CfgWeapons { weaponInfoType = "ACE_RscWeapon_MRCO"; class ItemInfo: ItemInfo { - modelOptics = QUOTE(PATHTOF(models\ace_optics_reticle90.p3d)); + modelOptics = QPATHTOF(models\ace_optics_reticle90.p3d); class OpticsModes: OpticsModes { class MRCOcq: MRCOcq {}; @@ -200,7 +200,7 @@ class CfgWeapons { displayName = CSTRING(valdada_pip); class ItemInfo: ItemInfo { - modelOptics = QUOTE(PATHTOF(models\ace_optics_pip.p3d)); + modelOptics = QPATHTOF(models\ace_optics_pip.p3d); }; }; @@ -214,10 +214,10 @@ class CfgWeapons { }; class ACE_optic_SOS_2D: optic_SOS { - GVAR(BodyDay) = QUOTE(PATHTOF(reticles\sos-body_ca.paa)); - GVAR(BodyNight) = QUOTE(PATHTOF(reticles\sos-bodyNight_ca.paa)); - GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\sos-reticleMLR_ca.paa)); - GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\sos-reticleMLRIllum_ca.paa)); + GVAR(BodyDay) = QPATHTOF(reticles\sos-body_ca.paa); + GVAR(BodyNight) = QPATHTOF(reticles\sos-bodyNight_ca.paa); + GVAR(ReticleDay) = QPATHTOF(reticles\sos-reticleMLR_ca.paa); + GVAR(ReticleNight) = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa); author = ECSTRING(common,ACETeam); _generalMacro = "ACE_optic_SOS_2D"; @@ -226,9 +226,15 @@ class CfgWeapons { class ItemInfo: ItemInfo { class OpticsModes: OpticsModes { - class Snip: Snip { - modelOptics[] = {QUOTE(PATHTOF(models\ace_optics_reticle90.p3d)),QUOTE(PATHTOF(models\ace_optics_reticle90.p3d))}; - opticsDisablePeripherialVision = 0; + class Snip: Snip { + modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d),QPATHTOF(models\ace_optics_reticle90.p3d)}; + useModelOptics = 1; + opticsZoomInit = 0.0116; + opticsZoomMax = 0.0464; + opticsZoomMin = 0.0116; + discreteFOV[] = {0.0464, 0.0116}; + opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1","ACE_OpticsRadBlur1"}; + opticsDisablePeripherialVision = 0; }; class Iron: Iron {}; }; @@ -244,7 +250,7 @@ class CfgWeapons { class ItemInfo: ItemInfo { class OpticsModes: OpticsModes { class Snip: Snip { - modelOptics[] = {QUOTE(PATHTOF(models\ace_optics_pip.p3d)),QUOTE(PATHTOF(models\ace_optics_pip.p3d))}; + modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d),QPATHTOF(models\ace_optics_pip.p3d)}; }; class Iron: Iron {}; }; @@ -260,10 +266,10 @@ class CfgWeapons { }; class ACE_optic_LRPS_2D: optic_LRPS { - GVAR(BodyDay) = QUOTE(PATHTOF(reticles\sos-body_ca.paa)); - GVAR(BodyNight) = QUOTE(PATHTOF(reticles\sos-bodyNight_ca.paa)); - GVAR(ReticleDay) = QUOTE(PATHTOF(reticles\sos-reticleMLR_ca.paa)); - GVAR(ReticleNight) = QUOTE(PATHTOF(reticles\sos-reticleMLRIllum_ca.paa)); + GVAR(BodyDay) = QPATHTOF(reticles\sos-body_ca.paa); + GVAR(BodyNight) = QPATHTOF(reticles\sos-bodyNight_ca.paa); + GVAR(ReticleDay) = QPATHTOF(reticles\sos-reticleMLR_ca.paa); + GVAR(ReticleNight) = QPATHTOF(reticles\sos-reticleMLRIllum_ca.paa); author = ECSTRING(common,ACETeam); _generalMacro = "ACE_optic_LRPS_2D"; @@ -273,11 +279,11 @@ class CfgWeapons { class ItemInfo: ItemInfo { class OpticsModes: OpticsModes { class Snip: Snip { - modelOptics[] = {QUOTE(PATHTOF(models\ace_optics_reticle90.p3d)),QUOTE(PATHTOF(models\ace_optics_reticle90.p3d))}; + modelOptics[] = {QPATHTOF(models\ace_optics_reticle90.p3d),QPATHTOF(models\ace_optics_reticle90.p3d)}; useModelOptics = 1; - opticsZoomInit = 0.01234; - opticsZoomMax = 0.04673; - opticsZoomMin = 0.01234; + opticsZoomInit = 0.0116; + opticsZoomMax = 0.0464; + opticsZoomMin = 0.0116; discreteFOV[] = {}; opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1","ACE_OpticsRadBlur1"}; opticsDisablePeripherialVision = 0; @@ -295,7 +301,7 @@ class CfgWeapons { class ItemInfo: ItemInfo { class OpticsModes: OpticsModes { class Snip: Snip { - modelOptics[] = {QUOTE(PATHTOF(models\ace_optics_pip.p3d)),QUOTE(PATHTOF(models\ace_optics_pip.p3d))}; + modelOptics[] = {QPATHTOF(models\ace_optics_pip.p3d),QPATHTOF(models\ace_optics_pip.p3d)}; }; }; }; diff --git a/addons/optics/config.cpp b/addons/optics/config.cpp index 79f71842ee..c63049356c 100644 --- a/addons/optics/config.cpp +++ b/addons/optics/config.cpp @@ -18,8 +18,9 @@ class CfgPatches { }; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Taosenai","KoffeinFlummi","commy2"}; - authorUrl = "http://www.ryanschultz.org/tmr/"; + author = ECSTRING(common,ACETeam); + authors[] = {"Taosenai","KoffeinFlummi","commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/optics/functions/fnc_onDrawScope2D.sqf b/addons/optics/functions/fnc_onDrawScope2D.sqf index 9ea038f877..82602842ca 100644 --- a/addons/optics/functions/fnc_onDrawScope2D.sqf +++ b/addons/optics/functions/fnc_onDrawScope2D.sqf @@ -19,7 +19,7 @@ if (!ctrlShown (_display displayCtrl 154)) exitWith { // @todo, all weapon types private ["_optic", "_isPIP"]; _optic = (primaryWeaponItems ACE_player) select 2; -_isPIP = (getText (configFile >> "CfgWeapons" >> _optic >> "ItemInfo" >> "modelOptics")) == QUOTE(PATHTOF(models\ace_optics_pip.p3d)); +_isPIP = (getText (configFile >> "CfgWeapons" >> _optic >> "ItemInfo" >> "modelOptics")) == QPATHTOF(models\ace_optics_pip.p3d); if (_isPIP) then { GVAR(camera) setPosATL positionCameraToWorld [0,0,0.4]; diff --git a/addons/optics/stringtable.xml b/addons/optics/stringtable.xml index 4fafdb1996..a6818a90d3 100644 --- a/addons/optics/stringtable.xml +++ b/addons/optics/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/optionsmenu/config.cpp b/addons/optionsmenu/config.cpp index 4acfef321f..0e564535b9 100644 --- a/addons/optionsmenu/config.cpp +++ b/addons/optionsmenu/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Glowbal", "PabstMirror"}; - authorUrl = "http://github.com/Glowbal"; + author = ECSTRING(common,ACETeam); + authors[] = {"Glowbal", "PabstMirror"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf index be771f7a3a..dd2c187bf7 100644 --- a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf +++ b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf @@ -17,7 +17,7 @@ private ["_var", "_unit", "_outputText", "_text"]; -#define MIN_ARRAY_SIZE 10 +#define MIN_ARRAY_SIZE 50 _outputText = { diag_log text (_this select 0); @@ -30,12 +30,20 @@ time = %1 ------Performance------ diag_fps = %2 -count ace_common_waitAndExecArray = %3 -count cba_common_perFrameHandlerArray = %4 (max %5) -count diag_activeSQFScripts = %6 -count diag_activeSQSScripts = %7 -count diag_activeMissionFSMs = %8", -time, diag_fps, count ace_common_waitAndExecArray, {!isNil "_x"} count cba_common_perFrameHandlerArray, count cba_common_perFrameHandlerArray, count diag_activeSQFScripts, count diag_activeSQSScripts,count diag_activeMissionFSMs]; +count cba_common_waitAndExecArray = %3 +count cba_common_waitUntilAndExecArray = %4 +count cba_common_perFrameHandlerArray = %5 (max %6) +count diag_activeSQFScripts = %7 +count diag_activeSQSScripts = %8 +count diag_activeMissionFSMs = %9", +time, +diag_fps, +count cba_common_waitAndExecArray, +count cba_common_waitUntilAndExecArray, +{!isNil "_x"} count cba_common_perFrameHandlerArray, count cba_common_perFrameHandlerArray, +count diag_activeSQFScripts, +count diag_activeSQSScripts, +count diag_activeMissionFSMs]; [_text] call _outputText; diff --git a/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf b/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf index 3129e32bef..123a156731 100644 --- a/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf +++ b/addons/optionsmenu/functions/fnc_onCategorySelectChanged.sqf @@ -22,6 +22,6 @@ disableSerialization; _settingsMenu = uiNamespace getVariable 'ACE_settingsMenu'; _ctrlComboBox = (_settingsMenu displayCtrl 14); -GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox; +GVAR(currentCategorySelection) = _ctrlComboBox lbValue (lbCurSel _ctrlComboBox); [true] call FUNC(settingsMenuUpdateList); diff --git a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf index 8e09608e07..43c17cd619 100644 --- a/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onServerSettingsMenuOpen.sqf @@ -54,7 +54,7 @@ GVAR(serverSideValues) = []; } forEach EGVAR(common,settings); //Delay a frame -[{ [MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame); +[{ [MENU_TAB_SERVER_OPTIONS] call FUNC(onServerListBoxShowSelectionChanged) }, []] call CBA_fnc_execNextFrame; disableSerialization; _menu = uiNamespace getVariable "ACE_serverSettingsMenu"; diff --git a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf index 104d8195cf..42157f230f 100644 --- a/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf +++ b/addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf @@ -21,6 +21,7 @@ private ["_setting", "_menu"]; // Filter only user setable setting GVAR(clientSideOptions) = []; GVAR(clientSideColors) = []; +private _clientSettableCategories = [""]; { // If the setting is user setable and not forced @@ -37,11 +38,12 @@ GVAR(clientSideColors) = []; if ((_x select 1) == "COLOR") then { GVAR(clientSideColors) pushBack _setting; }; + _clientSettableCategories pushBackUnique (_x select 8); //Add to list of user-settable categories }; } forEach EGVAR(common,settings); //Delay a frame -[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call EFUNC(common,execNextFrame); +[{ [MENU_TAB_OPTIONS] call FUNC(onListBoxShowSelectionChanged) }, []] call CBA_fnc_execNextFrame; disableSerialization; _menu = uiNamespace getVariable "ACE_settingsMenu"; @@ -55,10 +57,13 @@ if (GVAR(serverConfigGeneration) == 0) then { lbClear (_menu displayCtrl 14); { - if (_x == "") then { - _x = localize LSTRING(category_all); + if (_x in _clientSettableCategories) then { //only show category if it has user-settable options + if (_x == "") then { + _x = localize LSTRING(category_all); + }; + private _Index = (_menu displayCtrl 14) lbAdd _x; + (_menu displayCtrl 14) lbSetValue [_Index, _forEachIndex]; }; - (_menu displayCtrl 14) lbAdd _x; } forEach GVAR(categories); (_menu displayCtrl 14) lbSetCurSel GVAR(currentCategorySelection); //All Catagoies diff --git a/addons/optionsmenu/gui/define.hpp b/addons/optionsmenu/gui/define.hpp index ef9ef0d02b..c2b1faf9cf 100644 --- a/addons/optionsmenu/gui/define.hpp +++ b/addons/optionsmenu/gui/define.hpp @@ -92,6 +92,5 @@ class RscText; // Listbox styles #define LB_TEXTURES 0x10 #define LB_MULTI 0x20 -#define FontCSE "RobotoCondensed" #endif diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index 21fff4033d..b051e3f219 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -260,7 +260,7 @@ Wenn erlaubt, können die Einstellungsmodifikationen angezeigt und im SP exportiert werden. Wenn auf "Exportieren" geklickt wird, wird eine formatierte Config-Datei in der Zwischenablage abgespeichert. Pokud je povoleno, budete mít přístup k modifikaci nastavení a exportování v SP. Kliknutím na export umístníte formátovaný config do vaší schránky. Quando permitido, você tem acesso à modificação de definições e exportação em SP. Clicando em exportação colocará a configuração formatada em sua área de transferência. - Quand autoriser, vous pouvez accéder au modification et à l'exporation en solo. Cliquer sur exporter placera la configuration dans le presse papier + Quand autorisé, vous pouvez accéder aux modifications et à l'exporation en solo. Cliquer sur exporter placera la configuration dans le presse-papier Engedélyezéskor hozzáférést kapsz a beállítások módosításához és exportálásához egyjátékos módban. Exportáláskor a formázott konfiguráció a vágólapra kerül. Когда разршен, у вас появляется доступ к модификации настроек и экспорту их в одинночном режиме. Нажатие на кнопку Экспорт поместит форматированные настройки в буфер обмена. Quando consentito, hai accesso alle modifiche delle impostazioni ed esportazione in SP. Cliccando Esporta piazzera il config formattato sul tuo Blocco Note. @@ -356,7 +356,7 @@ Debug do schránky Debug in die Zwischenablage Depuração para área de transferência - Debug vers le presse papier + Debug vers le presse-papier Debug a vágólapra Отладка в буфер обмена Debug su Blocco Note @@ -368,7 +368,7 @@ Pošle debug informace do RPT a schránky. Protokolliert Debug-Informationen im RPT und speichert sie in der Zwischenablage. Envia informação de depuração para RPT e área de transferência. - Copie le Debug dans le RPT et le presse papier + Copie le Debug dans le RPT et le presse-papier Debug információt küld az RPT-be és a vágólapra. Отправляет отладочную информацию в RPT и буфер обмена. Invia informazioni di debug all'RPT e al Blocco Note @@ -430,6 +430,7 @@ Všechny Kategorie Todas las categorías Tutte le Categorie + Toutes les catégories Logistics @@ -440,6 +441,7 @@ Logistika Logística Logistica + Logistique \ No newline at end of file diff --git a/addons/overheating/ACE_Settings.hpp b/addons/overheating/ACE_Settings.hpp index 6cff3268ff..fc3237da0f 100644 --- a/addons/overheating/ACE_Settings.hpp +++ b/addons/overheating/ACE_Settings.hpp @@ -1,5 +1,5 @@ class ACE_Settings { - class GVAR(DisplayTextOnJam) { + class GVAR(displayTextOnJam) { typeName = "BOOL"; isClientSettable = 1; value = 1; @@ -38,4 +38,10 @@ class ACE_Settings { displayName = CSTRING(unJamFailChance_displayName); description = CSTRING(unJamFailChance_description); }; + class GVAR(enabled) { + typeName = "BOOL"; + value = 1; + displayName = CSTRING(enabled_displayName); + description = CSTRING(enabled_description); + }; }; diff --git a/addons/overheating/CfgEventHandlers.hpp b/addons/overheating/CfgEventHandlers.hpp index 492230513f..5da5fd0dc2 100644 --- a/addons/overheating/CfgEventHandlers.hpp +++ b/addons/overheating/CfgEventHandlers.hpp @@ -16,11 +16,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE( call COMPILE_FILE(XEH_postInit) ); }; }; - -class Extended_Take_EventHandlers { - class CAManBase { - class GVAR(UnjamReload) { - clientTake = QUOTE( _this call FUNC(handleTakeEH) ); - }; - }; -}; diff --git a/addons/overheating/CfgMagazines.hpp b/addons/overheating/CfgMagazines.hpp new file mode 100644 index 0000000000..cc040eca0f --- /dev/null +++ b/addons/overheating/CfgMagazines.hpp @@ -0,0 +1,11 @@ +class CfgMagazines { + class CA_Magazine; + class ACE_SpareBarrel: CA_Magazine { + displayName = CSTRING(SpareBarrelName); + descriptionshort = CSTRING(SpareBarrelDescription); + picture = QUOTE(PATHTOF(UI\spare_barrel_ca.paa)); + count = 1; + mass = 60; + ACE_isUnique = 1; + }; +}; diff --git a/addons/overheating/CfgSounds.hpp b/addons/overheating/CfgSounds.hpp index c32fc02abf..bd2831eeb6 100644 --- a/addons/overheating/CfgSounds.hpp +++ b/addons/overheating/CfgSounds.hpp @@ -1,26 +1,26 @@ class CfgSounds { class ACE_BarrelSwap { - sound[] = {QUOTE(PATHTOF(sounds\barrelswap.ogg)),5,1,200}; + sound[] = {QPATHTOF(sounds\barrelswap.ogg),5,1,200}; titles[] = {}; }; class GVAR(jamming_rifle) { name=QGVAR(jamming_rifle); - sound[]={QUOTE(PATHTOF(sounds\jamming_rifle.wav)),1,1}; + sound[]={QPATHTOF(sounds\jamming_rifle.wav),1,1}; titles[]={}; }; class GVAR(jamming_pistol) { name=QGVAR(jamming_pistol); - sound[]={QUOTE(PATHTOF(sounds\jamming_pistol.wav)),1,1}; + sound[]={QPATHTOF(sounds\jamming_pistol.wav),1,1}; titles[]={}; }; class GVAR(fixing_rifle) { name=QGVAR(fixing_rifle); - sound[]={QUOTE(PATHTOF(sounds\fixing_rifle.wav)),1,1}; + sound[]={QPATHTOF(sounds\fixing_rifle.wav),1,1}; titles[]={}; }; class GVAR(fixing_pistol) { name= QGVAR(fixing_pistol); - sound[]={QUOTE(PATHTOF(sounds\fixing_pistol.wav)),1,1}; + sound[]={QPATHTOF(sounds\fixing_pistol.wav),1,1}; titles[]={}; }; }; diff --git a/addons/overheating/CfgVehicles.hpp b/addons/overheating/CfgVehicles.hpp index c7d9c6790a..f7700fd7df 100644 --- a/addons/overheating/CfgVehicles.hpp +++ b/addons/overheating/CfgVehicles.hpp @@ -4,30 +4,57 @@ class CfgVehicles { class CAManBase: Man { class ACE_SelfActions { class ACE_Equipment { - class ACE_UnJam { + class GVAR(UnJam) { displayName = CSTRING(UnjamWeapon); - condition = QUOTE( [_player] call FUNC(canUnjam) ); + condition = QUOTE( GVAR(enabled) && {[_player] call FUNC(canUnjam)} ); exceptions[] = {"isNotInside", "isNotSitting"}; statement = QUOTE( [ARR_2(_player, currentMuzzle _player)] call FUNC(clearJam); ); showDisabled = 0; priority = 4; - icon = QUOTE(PATHTOF(UI\unjam_ca.paa)); + icon = QPATHTOF(UI\unjam_ca.paa); }; - class ACE_SwapBarrel { + class GVAR(SwapBarrel) { displayName = CSTRING(SwapBarrel); - condition = QUOTE( 'ACE_SpareBarrel' in items _player && {getNumber (configFile >> 'CfgWeapons' >> currentWeapon _player >> 'ACE_Overheating_allowSwapBarrel') == 1} ); - statement = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(swapBarrel); ); + condition = QUOTE( GVAR(enabled) && {'ACE_SpareBarrel' in magazines _player} && {getNumber (configFile >> 'CfgWeapons' >> currentWeapon _player >> 'ACE_Overheating_allowSwapBarrel') == 1} ); + statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(swapBarrel); ); showDisabled = 0; priority = 3; - icon = QUOTE(PATHTOF(UI\spare_barrel_ca.paa)); + icon = QPATHTOF(UI\spare_barrel_ca.paa); }; - class ACE_CheckTemperature { + class GVAR(CheckTemperature) { displayName = CSTRING(CheckTemperatureShort); - condition = "switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (secondaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}"; + condition = "ace_overheating_enabled && {switch (currentWeapon _player) do {case (''): {false}; case (primaryWeapon _player); case (handgunWeapon _player): {true}; default {false}}}"; exceptions[] = {"isNotInside", "isNotSitting"}; - statement = QUOTE( [ARR_2(_player, currentWeapon _player)] call FUNC(CheckTemperature); ); + statement = QUOTE( [ARR_3(_player, _player, currentWeapon _player)] call FUNC(checkTemperature); ); showDisabled = 0; priority = 2.9; + icon = QPATHTOF(UI\temp_ca.paa); + }; + class GVAR(CheckTemperatureSpareBarrels) { + displayName = CSTRING(CheckTemperatureSpareBarrelsShort); + condition = QUOTE( GVAR(enabled) && {'ACE_SpareBarrel' in magazines _player}); + exceptions[] = {"isNotInside", "isNotSitting"}; + statement = QUOTE( [_player] call FUNC(checkSpareBarrelsTemperatures); ); + showDisabled = 0; + priority = 2.8; + icon = QUOTE(PATHTOF(UI\temp_ca.paa)); + }; + }; + }; + + class ACE_Actions { + class ACE_Weapon { + class GVAR(SwapBarrel) { + displayName = CSTRING(SwapBarrel); + condition = QUOTE( GVAR(enabled) && {'ACE_SpareBarrel' in magazines _player} && {getNumber (configFile >> 'CfgWeapons' >> currentWeapon _target >> 'ACE_Overheating_allowSwapBarrel') == 1} ); + statement = QUOTE([ARR_3(_player, _target, currentWeapon _target)] call FUNC(swapBarrelAssistant);); + icon = QUOTE(PATHTOF(UI\spare_barrel_ca.paa)); + }; + class GVAR(CheckTemperature) { + displayName = CSTRING(CheckTemperatureShort); + condition = "ace_overheating_enabled && {switch (currentWeapon _target) do {case (''): {false}; case (primaryWeapon _target); case (handgunWeapon _target): {true}; default {false}}}"; + exceptions[] = {"isNotInside", "isNotSitting"}; + statement = QUOTE( [ARR_3(_player, _target, currentWeapon _target)] call FUNC(checkTemperature); ); icon = QUOTE(PATHTOF(UI\temp_ca.paa)); }; }; @@ -99,29 +126,4 @@ class CfgVehicles { MACRO_ADDITEM(ACE_SpareBarrel,6); }; }; - - // Add ACE_SpareBarrel to every machine gunner. - #define MACRO_ADDSPAREBARREL \ - items[] = {"FirstAidKit", "ACE_SpareBarrel"}; \ - respawnitems[] = {"FirstAidKit", "ACE_SpareBarrel"}; - - // NATO - class B_Soldier_02_f; class B_soldier_AR_F:B_Soldier_02_f {MACRO_ADDSPAREBARREL}; - class B_Soldier_support_base_F; class B_soldier_AAR_F:B_Soldier_support_base_F {MACRO_ADDSPAREBARREL}; - class B_Soldier_base_F; class B_CTRG_soldier_AR_A_F:B_Soldier_base_F {MACRO_ADDSPAREBARREL}; - - // Guerrilla - class I_G_Soldier_base_F; class I_G_Soldier_AR_F:I_G_Soldier_base_F {MACRO_ADDSPAREBARREL}; - class B_G_Soldier_AR_F:I_G_Soldier_AR_F {MACRO_ADDSPAREBARREL}; - class O_G_Soldier_AR_F:I_G_Soldier_AR_F {MACRO_ADDSPAREBARREL}; - - // Iran - class O_Soldier_base_F; class O_Soldier_AR_F:O_Soldier_base_F {MACRO_ADDSPAREBARREL}; - class O_Soldier_support_base_F; class O_Soldier_AAR_F:O_Soldier_support_base_F {MACRO_ADDSPAREBARREL}; - class O_Soldier_Urban_base; class O_soldierU_AR_F:O_Soldier_Urban_base {MACRO_ADDSPAREBARREL}; - class O_soldierU_AAR_F:O_Soldier_Urban_base {MACRO_ADDSPAREBARREL}; - - // Czech - class I_Soldier_02_F; class I_Soldier_AR_F:I_Soldier_02_F {MACRO_ADDSPAREBARREL}; - class I_Soldier_support_base_F; class I_Soldier_AAR_F:I_Soldier_support_base_F {MACRO_ADDSPAREBARREL}; }; diff --git a/addons/overheating/CfgWeapons.hpp b/addons/overheating/CfgWeapons.hpp index f59c4d7911..d4e0844652 100644 --- a/addons/overheating/CfgWeapons.hpp +++ b/addons/overheating/CfgWeapons.hpp @@ -2,18 +2,18 @@ class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; - class ACE_SpareBarrel: ACE_ItemCore { + class ACE_SpareBarrel: ACE_ItemCore { displayname = CSTRING(SpareBarrelName); descriptionshort = CSTRING(SpareBarrelDescription); //model = ""; - picture = QUOTE(PATHTOF(UI\spare_barrel_ca.paa)); + picture = QPATHTOF(UI\spare_barrel_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 30; }; }; - class RifleCore; + class RifleCore; class Rifle: RifleCore { //Mean Rounds Between Stoppages (this will be scaled based on the barrel temp) GVAR(mrbs) = 3000; diff --git a/addons/overheating/XEH_PREP.hpp b/addons/overheating/XEH_PREP.hpp index 312b8bb0c5..44fd931ca0 100644 --- a/addons/overheating/XEH_PREP.hpp +++ b/addons/overheating/XEH_PREP.hpp @@ -1,5 +1,7 @@ +PREP(calculateCooling); PREP(canUnjam); +PREP(checkSpareBarrelsTemperatures); PREP(checkTemperature); PREP(clearJam); PREP(displayTemperature); @@ -7,8 +9,12 @@ PREP(firedEH); PREP(getWeaponData); PREP(handleTakeEH); PREP(jamWeapon); +PREP(loadCoolestSpareBarrel); PREP(overheat); +PREP(sendSpareBarrelsTemperaturesHint); PREP(swapBarrel); +PREP(swapBarrelAssistant); PREP(swapBarrelCallback); +PREP(updateSpareBarrelsTemperaturesThread); PREP(updateTemperature); PREP(updateTemperatureThread); diff --git a/addons/overheating/XEH_postInit.sqf b/addons/overheating/XEH_postInit.sqf index 0bb2da22ca..e4935b8831 100644 --- a/addons/overheating/XEH_postInit.sqf +++ b/addons/overheating/XEH_postInit.sqf @@ -1,47 +1,69 @@ // by esteldunedain #include "script_component.hpp" -if (isServer) then { - GVAR(pseudoRandomList) = []; - // Construct a list of pseudo random 2D vectors - for "_i" from 0 to 30 do { - GVAR(pseudoRandomList) pushBack [-1 + random 2, -1 + random 2]; - }; - publicVariable QGVAR(pseudoRandomList); +if (hasInterface) then { + // Add keybinds + ["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon), + { + // Conditions: canInteract + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; + // Conditions: specific + + if !(GVAR(enabled) && {[ACE_player] call FUNC(canUnjam)}) exitWith {false}; + + // Statement + [ACE_player, currentMuzzle ACE_player, false] call FUNC(clearJam); + true + }, + {false}, + [19, [true, false, false]], false] call CBA_fnc_addKeybind; //SHIFT + R Key }; - -if !(hasInterface) exitWith {}; - -GVAR(cacheWeaponData) = call CBA_fnc_createNamespace; -GVAR(cacheAmmoData) = call CBA_fnc_createNamespace; -GVAR(cacheSilencerData) = call CBA_fnc_createNamespace; - -// Add keybinds -["ACE3 Weapons", QGVAR(unjamWeapon), localize LSTRING(UnjamWeapon), -{ - // Conditions: canInteract - if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; - // Conditions: specific - - if !([ACE_player] call FUNC(canUnjam)) exitWith {false}; - - // Statement - [ACE_player, currentMuzzle ACE_player, false] call FUNC(clearJam); - true -}, -{false}, -[19, [true, false, false]], false] call CBA_fnc_addKeybind; //SHIFT + R Key - - -// Schedule cool down calculation of player weapons at (infrequent) regular intervals -[] call FUNC(updateTemperatureThread); - ["SettingsInitialized", { + TRACE_1("SettingsInitialized eh", GVAR(enabled)); + if (!GVAR(enabled)) exitWith {}; + + if (isServer) then { + GVAR(pseudoRandomList) = []; + // Construct a list of pseudo random 2D vectors + for "_i" from 0 to 30 do { + GVAR(pseudoRandomList) pushBack [-1 + random 2, -1 + random 2]; + }; + publicVariable QGVAR(pseudoRandomList); + + // Keep track of the temperature of stored spare barrels + GVAR(storedSpareBarrels) = [] call CBA_fnc_hashCreate; + + // Install event handlers for spare barrels + ["spareBarrelsSendTemperatureHint", FUNC(sendSpareBarrelsTemperaturesHint)] call EFUNC(common,addEventHandler); + ["spareBarrelsLoadCoolest", FUNC(loadCoolestSpareBarrel)] call EFUNC(common,addEventHandler); + + // Schedule cool down calculation of stored spare barrels + [] call FUNC(updateSpareBarrelsTemperaturesThread); + }; + + if !(hasInterface) exitWith {}; + + GVAR(cacheWeaponData) = call CBA_fnc_createNamespace; + GVAR(cacheAmmoData) = call CBA_fnc_createNamespace; + GVAR(cacheSilencerData) = call CBA_fnc_createNamespace; + + //Add Take EH (for reload) + ["CAManBase", "Take", {_this call FUNC(handleTakeEH);}] call CBA_fnc_addClassEventHandler; + // Register fire event handler ["firedPlayer", DFUNC(firedEH)] call EFUNC(common,addEventHandler); // Only add eh to non local players if dispersion is enabled if (GVAR(overheatingDispersion)) then { ["firedPlayerNonLocal", DFUNC(firedEH)] call EFUNC(common,addEventHandler); }; + + // Schedule cool down calculation of player weapons at (infrequent) regular intervals + [] call FUNC(updateTemperatureThread); + + // Install event handler to display temp when a barrel was swapped + ["showWeaponTemperature", DFUNC(displayTemperature)] call EFUNC(common,addEventHandler); + // Install event handler to initiate an assisted barrel swap + ["initiateSwapBarrelAssisted", DFUNC(swapBarrel)] call EFUNC(common,addEventHandler); + }] call EFUNC(common,addEventHandler); diff --git a/addons/overheating/XEH_preInit.sqf b/addons/overheating/XEH_preInit.sqf index a7feade1c3..cdd1fa78dd 100644 --- a/addons/overheating/XEH_preInit.sqf +++ b/addons/overheating/XEH_preInit.sqf @@ -4,4 +4,16 @@ ADDON = false; #include "XEH_PREP.hpp" +if (isNil "CBA_fnc_getMagazineIndex") then { + CBA_fnc_getMagazineIndex = { + params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]]; + + private _displayName = getText (configFile >> "CfgMagazines" >> _magazine >> "displayName"); + + if (_displayName isEqualTo "") exitWith {[]}; + + (magazinesDetail _unit select {_x find _displayName == 0}) apply {_x = _x splitString "[:]"; _x select (count _x - 1)}; + }; +}; + ADDON = true; diff --git a/addons/overheating/config.cpp b/addons/overheating/config.cpp index c57e55913d..2c48191810 100644 --- a/addons/overheating/config.cpp +++ b/addons/overheating/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_SpareBarrel"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"commy2", "KoffeinFlummi", "esteldunedain"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2", "KoffeinFlummi", "esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; @@ -18,6 +19,8 @@ class CfgPatches { #include "CfgVehicles.hpp" +#include "CfgMagazines.hpp" + #include "CfgWeapons.hpp" #include "ACE_Settings.hpp" diff --git a/addons/overheating/functions/fnc_calculateCooling.sqf b/addons/overheating/functions/fnc_calculateCooling.sqf new file mode 100644 index 0000000000..955c41441e --- /dev/null +++ b/addons/overheating/functions/fnc_calculateCooling.sqf @@ -0,0 +1,58 @@ +/* + * Author: esteldunedain + * Calculate the cooling down of a weapon over a time interval. + * + * Argument: + * 0: Initial temperature + * 1: Barrel mass + * 2: Time interval + * + * Return value: + * Final temperature + * + * Example: + * [_temperature, _barrelMass, _totalTime] call ace_overheating_fnc_calculateCooling + * + * Public: No + */ +#include "script_component.hpp" + +params ["_temperature", "_barrelMass", "_totalTime"]; + +// If a long time passed since the last shot, there's no need to calculate anything; the weapon should be cool +if (_totalTime > 1800) exitWith {0}; + +//AR-15 (0.00570m bullet diameter) (barrel diameter usually 0.75" or 0.008255m radius) +//Steel Denisty = 7850 m^3 / kg +//Area of a cylinder (2/r)*(Pi * r^3 + V) - for a 0.008255m radius barrel -> Area = 210(1/meters) * Volume +//Adjusted volume for being hollowed out is ~1.1x +//So Area = 210 * 1.1 * (mass / 7850) = mass * 0.029427 (for steel near that diameter) + +private _barrelSurface = _barrelMass * 0.029427; + +TRACE_4("cooling",_temperature,_totalTime,_barrelMass,_barrelSurface); + +private _time = 0; +while {true} do { + private _deltaTime = (_totalTime - _time) min 20; + + _temperature = _temperature - ( + // Convective cooling + 25 * _barrelSurface * _temperature + // Radiative cooling + + 0.4 * 5.67e-8 * _barrelSurface * + ( (_temperature + 273.15)*(_temperature + 273.15) + * (_temperature + 273.15)*(_temperature + 273.15) + - 273.15 * 273.15 * 273.15 *273.15 ) + ) * _deltaTime / (_barrelMass * 466); + + if (_temperature < 1) exitWith {0}; + + if (isNil "_temperature") exitWith { + diag_log text format ["[ACE] ERROR: _totalTime = %1; _time = %2; _deltaTime = %3;", _totalTime, _time, _deltaTime]; + 0 + }; + + _time = _time + _deltaTime; + if (_time >= _totalTime) exitWith { _temperature max 0 }; +}; diff --git a/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf new file mode 100644 index 0000000000..e8dbaabec0 --- /dev/null +++ b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf @@ -0,0 +1,38 @@ +/* + * Author: esteldunedain + * Make the player check the temperature of his spare barrels + * + * Arguments: + * 0: Player + * + * Return Value: + * None + * + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player"]; + +// Check canInteractWith: +if (!([_player, objNull, ["isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith))) exitWith {}; + +// Make the unit go kneeling +[_player] call EFUNC(common,goKneeling); + +// Spawn a progress bar +[ + 5.0, + [_player], + { + params ["_args", "_elapsedTime", "_totalTime", "_errorCode"]; + _args params ["_player"]; + // Time has enlapsed, ask the server to send the hint + ['spareBarrelsSendTemperatureHint', [_player, _player]] call EFUNC(common,serverEvent); + }, + {}, + (localize LSTRING(CheckingSpareBarrelsTemperatures)), + {true}, + ["isNotInside", "isNotSitting"] +] call EFUNC(common,progressBar); diff --git a/addons/overheating/functions/fnc_checkTemperature.sqf b/addons/overheating/functions/fnc_checkTemperature.sqf index f720665620..0fb600f83a 100644 --- a/addons/overheating/functions/fnc_checkTemperature.sqf +++ b/addons/overheating/functions/fnc_checkTemperature.sqf @@ -3,8 +3,9 @@ * Make the player check the temperature of his weapon * * Arguments: - * 0: Player - * 1: Weapon + * 0: Unit checking + * 1: Unit that has the weapon + * 2: Weapon * * Return Value: * None @@ -16,17 +17,18 @@ */ #include "script_component.hpp" -params ["_player", "_weapon"]; -TRACE_2("params",_player,_weapon); +params ["_assistant", "_gunner", "_weapon"]; +TRACE_3("params",_assistant,_gunner,_weapon); // Play animation and report temperature -private _action = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_checkTemperatureAction"); - -if (_action == "") then { - _action = "Gear"; +private _action = "PutDown"; +if (_assistant isEqualTo _gunner) then { + _action = getText (configFile >> "CfgWeapons" >> _weapon >> "ACE_checkTemperatureAction"); + if (_action == "") then { + _action = "Gear"; + }; }; - -_player playActionNow _action; +_assistant playActionNow _action; // Waits a sec before displaying the temperature -[FUNC(displayTemperature), [_player, _weapon], 1.0] call EFUNC(common,waitAndExecute); +[FUNC(displayTemperature), [_gunner, _weapon], 1.0] call CBA_fnc_waitAndExecute; diff --git a/addons/overheating/functions/fnc_clearJam.sqf b/addons/overheating/functions/fnc_clearJam.sqf index 086e7dce43..7011385c02 100644 --- a/addons/overheating/functions/fnc_clearJam.sqf +++ b/addons/overheating/functions/fnc_clearJam.sqf @@ -55,14 +55,14 @@ if (_weapon in _jammedWeapons) then { if (GVAR(DisplayTextOnJam)) then { [{ [localize LSTRING(WeaponUnjammed)] call EFUNC(common,displayTextStructured); - }, [], _delay] call EFUNC(common,waitAndExecute); + }, [], _delay] call CBA_fnc_waitAndExecute; }; } else { // Failure if (GVAR(DisplayTextOnJam)) then { [{ [localize LSTRING(WeaponUnjamFailed)] call EFUNC(common,displayTextStructured); - }, [], _delay] call EFUNC(common,waitAndExecute); + }, [], _delay] call CBA_fnc_waitAndExecute; }; }; }; diff --git a/addons/overheating/functions/fnc_firedEH.sqf b/addons/overheating/functions/fnc_firedEH.sqf index 2cf607945c..5bd725b74d 100644 --- a/addons/overheating/functions/fnc_firedEH.sqf +++ b/addons/overheating/functions/fnc_firedEH.sqf @@ -65,8 +65,8 @@ if (_unit != ACE_player && (!GVAR(showParticleEffectsForEveryone) || {_unit dist }; //Particle Effects: -if (GVAR(showParticleEffects) && {(ACE_time > ((_unit getVariable [QGVAR(lastDrop), -1000]) + 0.40)) && {_scaledTemperature > 0.1}}) then { - _unit setVariable [QGVAR(lastDrop), ACE_time]; +if (GVAR(showParticleEffects) && {(CBA_missionTime > ((_unit getVariable [QGVAR(lastDrop), -1000]) + 0.40)) && {_scaledTemperature > 0.1}}) then { + _unit setVariable [QGVAR(lastDrop), CBA_missionTime]; private _direction = (_unit weaponDirection _weapon) vectorMultiply 0.25; private _position = (position _projectile) vectorAdd (_direction vectorMultiply (4*(random 0.30))); diff --git a/addons/overheating/functions/fnc_jamWeapon.sqf b/addons/overheating/functions/fnc_jamWeapon.sqf index 38184808d2..4e42f769f7 100644 --- a/addons/overheating/functions/fnc_jamWeapon.sqf +++ b/addons/overheating/functions/fnc_jamWeapon.sqf @@ -37,12 +37,15 @@ if (_ammo > 0) then { [{ params ["_unit", "_weapon", "_ammo"]; _unit setAmmo [_weapon, _ammo]; - }, [_unit, _weapon, _ammo]] call EFUNC(common,execNextFrame); + }, [_unit, _weapon, _ammo]] call CBA_fnc_execNextFrame; }; // only display the hint once, after you try to shoot an already jammed weapon GVAR(knowAboutJam) = false; +["weaponJammed", [_unit,_weapon]] call EFUNC(common,localEvent); + + if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then { private _condition = { diff --git a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf new file mode 100644 index 0000000000..7887a87ce6 --- /dev/null +++ b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf @@ -0,0 +1,53 @@ +/* + * Author: esteldunedain + * Collect the temperature of all the spare barrels a unit has and load the + * coolest on the unit weapon. Runs on the server. + * + * Argument: + * 0: Unit that has the spare barrels + * 1: Unit that has the weapon + * 2: Weapon + * 3: Weapon temp before switching + * 4: Mass of the removed barrel + * + * Return value: + * None + * + * + * Public: No + */ +#include "script_component.hpp" + +params ["_assistant", "_gunner", "_weapon", "_weaponTemp", "_barrelMass"]; +TRACE_5("loadCoolestSpareBarrel1",_assistant,_gunner,_weapon,_weaponTemp,_barrelMass); + +// Find all spare barrel the player has +private _allBarrels = [_assistant, "ACE_SpareBarrel"] call CBA_fnc_getMagazineIndex; +TRACE_1("_allBarrels",_allBarrels); +if ((count _allBarrels) < 1) exitWith {}; + +// Determine which on is coolest +private _coolestTemp = 10000; +private _coolestMag = _allBarrels select 0; +{ + private _temp = 0; + if ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashHasKey) then { + _temp = ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashGet) select 0; + }; + TRACE_2("loadCoolestSpareBarrel4",_x,_temp); + if (_temp < _coolestTemp) then { + _coolestTemp = _temp; + _coolestMag = _x; + }; +} forEach _allBarrels; +TRACE_3("loadCoolestSpareBarrel5",_coolestTemp,_coolestMag,_weaponTemp); + +// The new weapon temperature is similar to the coolest barrel +// Publish the new temperature value +_gunner setVariable [format [QGVAR(%1_temp), _weapon], _coolestTemp, true]; + +// Heat up the coolest barrel to the former weapon temperature +[GVAR(storedSpareBarrels), _coolestMag, [_weaponTemp, CBA_missionTime, _barrelMass]] call CBA_fnc_hashSet; + +// Send an event so the machines of the assistant and gunner can show the hint +["showWeaponTemperature", [_assistant, _gunner], [_gunner, _weapon]] call EFUNC(common,targetEvent); diff --git a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf new file mode 100644 index 0000000000..2ff248016d --- /dev/null +++ b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf @@ -0,0 +1,76 @@ +/* + * Author: esteldunedain + * Collect the temperature of all the spare barrels a unit has and send a hint + * to a client. Runs on the server. + * + * Argument: + * 0: Target unit of the hint + * 1: Unit that has the spare barrels + * + * Return value: + * None + * + * + * Public: No + */ +#include "script_component.hpp" + +params ["_player","_unit"]; + +// Find all spare barrel the player has +TRACE_2("sendSpareBarrelsTemperatureHunt",_player,_unit); +private _allBarrels = [_unit, "ACE_SpareBarrel"] call CBA_fnc_getMagazineIndex; +TRACE_1("_allBarrels",_allBarrels); +if ((count _allBarrels) < 1) exitWith {}; + +// Determine the temp of each barrel +private _temps = []; +{ + private _temp = 0; + if ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashHasKey) then { + _temp = ([GVAR(storedSpareBarrels), _x] call CBA_fnc_hashGet) select 0; + }; + _temps pushBack _temp; +} forEach _allBarrels; +TRACE_1("_temps",_temps); + +// Count cool +private _countCool = {_x < 20} count _temps; +private _countWarm = {(_x >= 20) && (_x < 100)} count _temps; +private _countHot = {(_x >= 100) && (_x < 200)} count _temps; +private _countVeryHot = {(_x >= 200) && (_x < 600)} count _temps; +private _countExtremelyHot = {_x >= 600} count _temps; +private _output = ["%1 %2%3%4 %5%6%7 %8%9%10 %11%12%13 %14"]; +private _size = 1.0; +if (_countCool > 0) then { + _output pushBack _countCool; + _output pushBack LSTRING(BarrelCool); + _output pushBack "
"; + _size = _size + 0.5; +}; +if (_countWarm > 0) then { + _output pushBack _countWarm; + _output pushBack LSTRING(BarrelWarm); + _output pushBack "
"; + _size = _size + 0.5; +}; +if (_countHot > 0) then { + _output pushBack _countHot; + _output pushBack LSTRING(BarrelHot); + _output pushBack "
"; + _size = _size + 0.5; +}; +if (_countVeryHot > 0) then { + _output pushBack _countVeryHot; + _output pushBack LSTRING(BarrelVeryHot); + _output pushBack "
"; + _size = _size + 0.5; +}; +if (_countExtremelyHot > 0) then { + _output pushBack _countExtremelyHot; + _output pushBack LSTRING(BarrelExtremelyHot); + _size = _size + 0.5; +}; + +TRACE_1("_output",_output); +["displayTextStructured", [_player], [_output, _size, _player]] call EFUNC(common,targetEvent); diff --git a/addons/overheating/functions/fnc_swapBarrel.sqf b/addons/overheating/functions/fnc_swapBarrel.sqf index bbdab91705..a63ef5a36a 100644 --- a/addons/overheating/functions/fnc_swapBarrel.sqf +++ b/addons/overheating/functions/fnc_swapBarrel.sqf @@ -3,29 +3,35 @@ * Make a unit start swapping it's barrel * * Argument: - * 0: Unit - * 1: Weapon + * 0: Unit initiating the action + * 1: Unit that has the weapon + * 2: Weapon * * Return value: * None * * Example: - * [player, currentWeapon player] call ace_overheating_fnc_swapBarrel + * [cursorTarget, player, currentWeapon player] call ace_overheating_fnc_swapBarrel * * Public: No */ #include "script_component.hpp" -params ["_player", "_weapon"]; -TRACE_2("params",_player,_weapon); +params ["_assistant", "_gunner", "_weapon"]; +TRACE_3("params",_assistant,_gunner,_weapon); // Make the standing player kneel down -if (stance _player != "PRONE") then { - [_player, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation); +if (stance _gunner != "PRONE") then { + [_gunner, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation); }; // Barrel dismount gesture -_player playActionNow QGVAR(GestureDismountMuzzle); +_gunner playActionNow QGVAR(GestureDismountMuzzle); playSound "ACE_BarrelSwap"; -[5, [_player, _weapon], {(_this select 0) call FUNC(swapBarrelCallback)}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar); +private _duration = 3.0; +if (_assistant isEqualTo _gunner) then { + _duration = 5.0; +}; + +[_duration, [_assistant,_gunner,_weapon], {(_this select 0) call FUNC(swapBarrelCallback)}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar); diff --git a/addons/overheating/functions/fnc_swapBarrelAssistant.sqf b/addons/overheating/functions/fnc_swapBarrelAssistant.sqf new file mode 100644 index 0000000000..5e3c31fc5e --- /dev/null +++ b/addons/overheating/functions/fnc_swapBarrelAssistant.sqf @@ -0,0 +1,33 @@ +/* + * Author: esteldunedain, Commy2 + * Make a unit start swapping the barrel of another unit + * + * Argument: + * 0: Unit initiating the action + * 1: Unit that has the weapon + * 2: Weapon + * + * Return value: + * None + * + * Example: + * [player, cursorTarget, currentWeapon cursorTarget] call ace_overheating_fnc_swapBarrelAssistant + * + * Public: No + */ +#include "script_component.hpp" + +params ["_assistant", "_gunner", "_weapon"]; +TRACE_3("params",_assistant,_gunner,_weapon); + +// Make the standing player kneel down +if (stance _assistant != "PRONE") then { + [_assistant, "amovpknlmstpsraswrfldnon", 1] call EFUNC(common,doAnimation); +}; + +// Barrel dismount gesture +playSound "ACE_BarrelSwap"; + +[3, [_assistant, _gunner, _weapon], {}, {}, (localize LSTRING(SwappingBarrel))] call EFUNC(common,progressBar); + +["initiateSwapBarrelAssisted", _gunner, [_assistant, _gunner, _weapon]] call EFUNC(common,objectEvent); diff --git a/addons/overheating/functions/fnc_swapBarrelCallback.sqf b/addons/overheating/functions/fnc_swapBarrelCallback.sqf index 9c62e77f21..df80981705 100644 --- a/addons/overheating/functions/fnc_swapBarrelCallback.sqf +++ b/addons/overheating/functions/fnc_swapBarrelCallback.sqf @@ -1,10 +1,11 @@ /* - * Author: Commy2 + * Author: Commy2, esteldunedain * Swap barrel callback * * Argument: - * 0: Unit - * 1: Weapon + * 0: Unit initiating the action + * 1: Unit that has the weapon + * 2: Weapon * * Return value: * None @@ -14,19 +15,29 @@ * * Public: No */ +// #define DEBUG_MODE_FULL #include "script_component.hpp" -params ["_player", "_weapon"]; -TRACE_2("params",_player,_weapon); +params ["_assistant", "_gunner", "_weapon"]; +TRACE_3("params",_assistant,_gunner,_weapon); -// Barrel mount gesture -_player playAction QGVAR(GestureMountMuzzle); -playSound "ACE_BarrelSwap"; +if (_assistant isEqualTo _gunner) then { + // Barrel mount gesture + _gunner playAction QGVAR(GestureMountMuzzle); + playSound "ACE_BarrelSwap"; +}; + +// don't consume the barrel, but rotate through them. +[localize LSTRING(SwappedBarrel), QPATHTOF(UI\spare_barrel_ca.paa)] call EFUNC(common,displayTextPicture); -// don't consume the barrel, but rotate through them. -[localize LSTRING(SwappedBarrel), QUOTE(PATHTOF(UI\spare_barrel_ca.paa))] call EFUNC(common,displayTextPicture); +private _temp = _gunner getVariable [format [QGVAR(%1_temp), _weapon], 0]; +private _barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0; -// Publish the temperature variable -_player setVariable [format [QGVAR(%1_temp), _weapon], 0, true]; +// Instruct the server to load the coolest spare barrel into the weapon and +// store the removed barrel with the former weapon temperature. The server +// also updates the current weapon temperature to match that of the new +// loaded barrel. +["spareBarrelsLoadCoolest", [_assistant, _gunner, _weapon, _temp, _barrelMass]] call EFUNC(common,serverEvent); + // Store the update time -_player setVariable [format [QGVAR(%1_time), _weapon], ACE_time]; +_gunner setVariable [format [QGVAR(%1_time), _weapon], CBA_missionTime]; diff --git a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf new file mode 100644 index 0000000000..602de01c3b --- /dev/null +++ b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf @@ -0,0 +1,40 @@ +/* + * Author: esteldunedain + * Calculate cooldown of all the stored spare barrels. + * + * Argument: + * None + * + * Return value: + * None + * + * Example: + * [] call ace_overheating_fnc_updateSpareBarrelsTemperaturesThread + * + * Public: No + */ +// #define DEBUG_MODE_FULL +#include "script_component.hpp" + +private _pairs = []; +TRACE_1("updateSpareBarrelsTemperaturesThread1",GVAR(storedSpareBarrels)); +[GVAR(storedSpareBarrels), {_pairs pushBack [_key, _value];}] call CBA_fnc_hashEachPair; +TRACE_1("updateSpareBarrelsTemperaturesThread2",_pairs); +{ + _x params ["_barrelMagazineID","_value"]; + _value params ["_initialTemp","_initialTime", "_barrelMass"]; + + // Calculate cooling + private _finalTemp = [_initialTemp, _barrelMass, CBA_missionTime - _initialTime] call FUNC(calculateCooling); + TRACE_4("updateSpareBarrelsTemperaturesThread3",_barrelMagazineID,_initialTemp,_finalTemp,_barrelMass); + if (_finalTemp < 5) then { + // The barrel is cool enough to keep calculating. Remove it from the hash + [GVAR(storedSpareBarrels), _barrelMagazineID] call CBA_fnc_hashRem; + } else { + // Store the new temp + [GVAR(storedSpareBarrels), _barrelMagazineID, [_finalTemp, CBA_missionTime, _barrelMass]] call CBA_fnc_hashSet; + }; +} forEach _pairs; + +// Schedule for execution again after 10 seconds +[DFUNC(updateSpareBarrelsTemperaturesThread), [], 10] call CBA_fnc_waitAndExecute; diff --git a/addons/overheating/functions/fnc_updateTemperature.sqf b/addons/overheating/functions/fnc_updateTemperature.sqf index 89d5975024..d5e29a150b 100644 --- a/addons/overheating/functions/fnc_updateTemperature.sqf +++ b/addons/overheating/functions/fnc_updateTemperature.sqf @@ -29,50 +29,9 @@ private _lastTime = _unit getVariable [_timeVarName, 0]; private _barrelMass = 0.50 * (getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass") / 22.0) max 1.0; -_fnc_cooling = { - params ["_temperature", "_barrelMass", "_totalTime"]; - - // If a long time passed since the last shot, there's no need to calculate anything; the weapon should be cool - if (_totalTime > 1800) exitWith {0}; - - //AR-15 (0.00570m bullet diameter) (barrel diameter usually 0.75" or 0.008255m radius) - //Steel Denisty = 7850 m^3 / kg - //Area of a cylinder (2/r)*(Pi * r^3 + V) - for a 0.008255m radius barrel -> Area = 210(1/meters) * Volume - //Adjusted volume for being hollowed out is ~1.1x - //So Area = 210 * 1.1 * (mass / 7850) = mass * 0.029427 (for steel near that diameter) - - private _barrelSurface = _barrelMass * 0.029427; - - TRACE_4("cooling",_temperature,_totalTime,_barrelMass,_barrelSurface); - - private _time = 0; - while {true} do { - private _deltaTime = (_totalTime - _time) min 20; - - _temperature = _temperature - ( - // Convective cooling - 25 * _barrelSurface * _temperature - // Radiative cooling - + 0.4 * 5.67e-8 * _barrelSurface * - ( (_temperature + 273.15)*(_temperature + 273.15) - * (_temperature + 273.15)*(_temperature + 273.15) - - 273.15 * 273.15 * 273.15 *273.15 ) - ) * _deltaTime / (_barrelMass * 466); - - if (_temperature < 1) exitWith {0}; - - if (isNil "_temperature") exitWith { - diag_log text format ["[ACE] ERROR: _totalTime = %1; _time = %2; _deltaTime = %3;", _totalTime, _time, _deltaTime]; - 0 - }; - - _time = _time + _deltaTime; - if (_time >= _totalTime) exitWith { _temperature max 0 }; - }; -}; - // Calculate cooling -_temperature = [_temperature, _barrelMass, ACE_time - _lastTime] call _fnc_cooling; +_temperature = [_temperature, _barrelMass, CBA_missionTime - _lastTime] call FUNC(calculateCooling); + TRACE_1("cooledTo",_temperature); // Calculate heating // Steel Heat Capacity = 466 J/(Kg.K) @@ -81,6 +40,6 @@ _temperature = _temperature + _heatIncrement / (_barrelMass * 466); // Publish the temperature variable [_unit, _tempVarName, _temperature, TEMP_TOLERANCE] call EFUNC(common,setApproximateVariablePublic); // Store the update time locally -_unit setVariable [_timeVarName, ACE_time]; +_unit setVariable [_timeVarName, CBA_missionTime]; _temperature diff --git a/addons/overheating/functions/fnc_updateTemperatureThread.sqf b/addons/overheating/functions/fnc_updateTemperatureThread.sqf index 76a332e480..476ff3e352 100644 --- a/addons/overheating/functions/fnc_updateTemperatureThread.sqf +++ b/addons/overheating/functions/fnc_updateTemperatureThread.sqf @@ -22,4 +22,4 @@ if ((_currentWeapon != "") && {_currentWeapon == primaryWeapon ACE_player || {_c }; // Schedule for execution again after 5 seconds -[DFUNC(updateTemperatureThread), [], 5] call EFUNC(common,waitAndExecute); +[DFUNC(updateTemperatureThread), [], 5] call CBA_fnc_waitAndExecute; diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index 492edd35ae..cafcf5f105 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -31,6 +31,8 @@ Efekty cząsteczkowe przegrzania Effetti Particelle Surriscaldamento Efectos de partículas + Effet de surchauffe + Částicové efekty přehřívání Efeito de parícula de superaquecimento @@ -39,6 +41,7 @@ Pokaż efekty cząsteczkowe kiedy broń się przegrzeje Mostra effetti particellari quando l'arma si surriscalda Muestra efectos de partículas cuando el arma del jugador se sobreacalienta + Montrer les effets lorsque l'arme surchauffe. Mostra efeitos de párticula quando a arma superaquece @@ -47,6 +50,8 @@ Pokaż efekty cząsteczkowe dla wszystkich Effetti Particellari Surriscaldamento per tutti Efectos de partículas para todos + Effets de surchauffe pour tout le monde. + Částicové efekty přehřívání pro všechny Efeito de partícula de superaquecimento para todos @@ -55,6 +60,7 @@ Pokazuje efekty cząsteczkowe kiedy broń innego gracza się przegrzeje Mostra effetti particellari quando l'arma di altri giocatori si surriscalda Muestra efectos de partículas cuando el arma de jugadores cercanos se sobreacalienta + Montrer les effets de surchauffe des autres joueurs. Mostra efeito de partículas quando a arma de outros jogadores superaquece @@ -63,6 +69,7 @@ Wpływ na rozrzut Dispersione Surriscaldamento Dispersión + Disperssion dûe à la surchauffe Disperção de superaquecimento @@ -71,6 +78,7 @@ Przegrzane bronie będą mniej celne oraz będą miały zmniejszoną prędkość pocisku. Wpływa na wszystkich graczy. Armi surriscaldate saranno meno precise ed avranno una ridotta velocità alla volata. Applica per tutti i giocatori. Las armas sobrecalentadas pierden precisión y tienen una velocidad de disparo reducida. Se aplica a todos los jugadores. + Les armes en surchauffe seront moins précises et auront une vitesse en sortie de bouche plus faible. S'applique pour tous les joueurs. Armas superaquecidas irão ser menos precisas e ter velocidade de disparo reduzidas. Aplica a todos os jogadores. @@ -78,6 +86,9 @@ Behebt Ladehemmung beim Nachladen Desencasquillar el arma al recargar. Usuń zacięcie przy przeładowaniu + Des-enrayer l'arme au rechargement. + Disinceppa l'arma quando si ricarica + Uvolnit zbraň při přebití Desemperrar arma no recarregamento @@ -85,6 +96,9 @@ Nachladen behebt eine Ladehemmung. Recargar el arma la desencasquilla. Przeładowywanie usuwa zacięcie + Recharger vide la chambre de l'arme + L'arma si disinceppa quando si ricarica + Přebití uvolní zaseknutou zbraň. Recarregar desemperra arma. @@ -92,6 +106,9 @@ Wahrscheinlichkeit, dass Ladehemmung nicht behoben wird Probabilidad de falla al desencasquillar. Szansa na porażkę usuw. zacięcia + Chance de rater le des-enrayement + Probabilità di sbagliare a disinceppare l'arma + Šance, že uvolnění zbraně selže Chance de falha de desemperramento @@ -99,6 +116,8 @@ Wahrscheinlichkeit, dass der Versuch eine Ladehemmung zu beheben fehl schlägt und erneut durchgeführt werden muss. Probabilidad de que el proceso de desencasquille falle, teniendo que repetirlo. Szansa na to, że przy przeładowaniu broni zacięcie nie zostanie usunięte, przez co czynność będzie musiała zostać powtórzona ponownie. + Probabilité qu'une action de des-enrayement échoue, nécessitant de recommencer. + Probabilità che si possa sbagliare a caso a disinceppare l'arma. Richiede di ripetere. Probabilidade que uma ação de desemperramento falhe, tendo que ser repetida @@ -166,6 +185,9 @@ Ladehemmung nicht behoben Falló el desencasquillado Porażka przy usuwaniu zacięcia + Toujours enrayé ! + Non si è disinceppata! + Zbrań se nepodařilo uvolnit Falha no desemperramento @@ -185,7 +207,7 @@ Lauf wird gewechselt... Cambiando el cañón... Wymienianie lufy... - Vyměňuji hlaveň... + Měním hlaveň... Changement du canon... Смена ствола... Cső kicserélése folyamatban... @@ -211,7 +233,7 @@ Sprawdź temperaturę broni Vérifier la température de l'arme Fegyver hőmérsékletének ellenőrzése - Zjistit teplotu zbraně + Zkontrolovat teplotu zbraně Conferir temperatura da arma Controlla la temperatura della canna Проверить температуру оружия @@ -240,6 +262,12 @@ Sto controllando la temperatura... Проверка температуры... + + Check spare barrels temperatures + + + Checking spare barrels temperatures... + Temperature Temperatur @@ -252,5 +280,28 @@ Temperatura Температура + + Cool Spare Barrel/s + + + Warm Spare Barrel/s + + + Hot Spare Barrel/s + + + Very Hot Spare Barrel/s + + + Extremely Hot Spare Barrel/s + + + Overheating Enabled + Überhitzen Aktiviert + Activada Sobrecalentamiento + + + Master enable for the overheating/jamming module + \ No newline at end of file diff --git a/addons/overpressure/config.cpp b/addons/overpressure/config.cpp index 0524f6e4c9..1839dc3ee1 100644 --- a/addons/overpressure/config.cpp +++ b/addons/overpressure/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2","KoffeinFlummi","esteldunedain"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2","KoffeinFlummi","esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/overpressure/functions/fnc_getDistance.sqf b/addons/overpressure/functions/fnc_getDistance.sqf index 341da388ca..616feb8660 100644 --- a/addons/overpressure/functions/fnc_getDistance.sqf +++ b/addons/overpressure/functions/fnc_getDistance.sqf @@ -30,7 +30,7 @@ private _distance = 999; { _x params ["_intersectPosASL", "_surfaceNormal", "_intersectObject"]; TRACE_3("Intersect",_intersectPosASL,_surfaceNormal,_intersectObject); - + //Hit something solid that can reflect - (Static covers Building) [Need to manually filter out _shoot for FFV shots] if ((isNull _intersectObject) || {(_intersectObject != _shooter) && {(_intersectObject isKindOf "Static") || {_intersectObject isKindOf "AllVehicles"}}}) exitWith { _distance = _posASL vectorDistance _intersectPosASL; diff --git a/addons/parachute/CfgVehicles.hpp b/addons/parachute/CfgVehicles.hpp index ff9196ca60..e734962a0e 100644 --- a/addons/parachute/CfgVehicles.hpp +++ b/addons/parachute/CfgVehicles.hpp @@ -19,7 +19,7 @@ class CfgVehicles { statement = QUOTE([_player] call FUNC(cutParachute)); showDisabled = 0; priority = 2.9; - icon = QUOTE(PATHTOF(UI\cut_ca.paa)); + icon = QPATHTOF(UI\cut_ca.paa); }; }; }; @@ -83,7 +83,8 @@ class CfgVehicles { //model = "\A3\Weapons_F\Ammoboxes\Bags\Backpack_Parachute"; // @todo // backpackSimulation = "ParachuteNonSteerable"; //ParachuteSteerable //Bis broke this in 1.40 ParachuteClass = "NonSteerable_Parachute_F"; - MACRO_HASRESERVE + ace_hasReserveParachute = 1; + ace_reserveParachute = "ACE_NonSteerableReserveParachute"; maximumLoad = 0; mass = 100; }; @@ -97,6 +98,10 @@ class CfgVehicles { ace_reserveParachute = ""; ace_hasReserveParachute = 0; }; + + class ACE_NonSteerableReserveParachute: ACE_ReserveParachute { + ParachuteClass = "NonSteerable_Parachute_F"; + }; class B_Soldier_05_f; class B_Pilot_F: B_Soldier_05_f {backpack = "ACE_NonSteerableParachute";}; class I_Soldier_04_F; class I_pilot_F: I_Soldier_04_F {backpack = "ACE_NonSteerableParachute";}; diff --git a/addons/parachute/CfgWeapons.hpp b/addons/parachute/CfgWeapons.hpp index 4ca785a1ea..b5dad94425 100644 --- a/addons/parachute/CfgWeapons.hpp +++ b/addons/parachute/CfgWeapons.hpp @@ -6,6 +6,6 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); descriptionShort = CSTRING(AltimeterDescription); displayName = CSTRING(AltimeterDisplayName); - picture = PATHTOF(UI\watch_altimeter.paa); + picture = QPATHTOF(UI\watch_altimeter.paa); }; }; diff --git a/addons/parachute/RscTitles.hpp b/addons/parachute/RscTitles.hpp index c6f41a7362..277db4d2f9 100644 --- a/addons/parachute/RscTitles.hpp +++ b/addons/parachute/RscTitles.hpp @@ -12,7 +12,7 @@ class RscTitles { class controls { class AltimeterImage: RscPicture { idc = 1200; - text = PATHTOF(UI\watch_altimeter.paa); + text = QPATHTOF(UI\watch_altimeter.paa); x = 0.118437 * safezoneW + safezoneX; y = 0.621 * safezoneH + safezoneY; w = 0.20625 * safezoneW; diff --git a/addons/parachute/XEH_postInit.sqf b/addons/parachute/XEH_postInit.sqf index 598661a3da..ad4044e6e5 100644 --- a/addons/parachute/XEH_postInit.sqf +++ b/addons/parachute/XEH_postInit.sqf @@ -43,5 +43,4 @@ GVAR(PFH) = false; // don't show speed and height when in expert mode ["infoDisplayChanged", {_this call FUNC(handleInfoDisplayChanged)}] call EFUNC(common,addEventHandler); -//[ACE_Player,([ACE_player] call EFUNC(common,getAllGear))] call FUNC(storeParachute); -["playerInventoryChanged", FUNC(storeParachute) ] call EFUNC(common,addEventHandler); +["playerInventoryChanged", FUNC(storeParachute)] call EFUNC(common,addEventHandler); diff --git a/addons/parachute/config.cpp b/addons/parachute/config.cpp index 3671177e28..dec722ea96 100644 --- a/addons/parachute/config.cpp +++ b/addons/parachute/config.cpp @@ -7,8 +7,9 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; VERSION_CONFIG; - author[] = {"Garth 'LH' de Wet"}; - authorUrl = "http://garth.snakebiteink.co.za/"; + author = ECSTRING(common,ACETeam); + authors[] = {"Garth 'LH' de Wet"}; + url = ECSTRING(main,URL); }; }; diff --git a/addons/parachute/functions/fnc_doLanding.sqf b/addons/parachute/functions/fnc_doLanding.sqf index cc32724e9d..213bf10887 100644 --- a/addons/parachute/functions/fnc_doLanding.sqf +++ b/addons/parachute/functions/fnc_doLanding.sqf @@ -20,8 +20,8 @@ GVAR(PFH) = false; [_unit, "AmovPercMevaSrasWrflDf_AmovPknlMstpSrasWrflDnon", 2] call EFUNC(common,doAnimation); _unit setVariable [QGVAR(chuteIsCut), false, true]; [{ - if (ACE_time >= ((_this select 0) select 0) + 1) then { + if (CBA_missionTime >= ((_this select 0) select 0) + 1) then { ((_this select 0) select 1) playActionNow "Crouch"; [(_this select 1)] call CALLSTACK(CBA_fnc_removePerFrameHandler); }; -}, 1, [ACE_time,_unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler); +}, 1, [CBA_missionTime,_unit]] call CALLSTACK(CBA_fnc_addPerFrameHandler); diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf index 466abfb77e..b8ee8add6d 100644 --- a/addons/parachute/functions/fnc_showAltimeter.sqf +++ b/addons/parachute/functions/fnc_showAltimeter.sqf @@ -37,7 +37,7 @@ GVAR(AltimeterActive) = true; _minute = floor ((daytime - _hour) * 60); _height = ((getPosASL _unit) select 2) + EGVAR(common,mapAltitude); - _curTime = ACE_time; + _curTime = CBA_missionTime; _timeDiff = _curTime - _prevTime; _descentRate = if(_timeDiff > 0) then {floor((_oldHeight - _height) / _timeDiff)} else {0}; @@ -47,4 +47,4 @@ GVAR(AltimeterActive) = true; (_this select 0) set [2, _height]; (_this select 0) set [3, _curTime]; -}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), ACE_time]] call CALLSTACK(CBA_fnc_addPerFrameHandler); +}, 0.2, [uiNamespace getVariable ["ACE_Altimeter", displayNull], _unit,floor ((getPosASL _unit) select 2), CBA_missionTime]] call CALLSTACK(CBA_fnc_addPerFrameHandler); diff --git a/addons/parachute/functions/fnc_storeParachute.sqf b/addons/parachute/functions/fnc_storeParachute.sqf index 42ad18b304..55e887f3e6 100644 --- a/addons/parachute/functions/fnc_storeParachute.sqf +++ b/addons/parachute/functions/fnc_storeParachute.sqf @@ -15,16 +15,17 @@ * Public: No */ #include "script_component.hpp" -private ["_unit","_backpack"]; -_unit = _this select 0; -_backpack = (_this select 1) select 6; -if ((vehicle _unit) isKindOf "ParachuteBase" && backpack _unit == "" && !(_unit getVariable [QGVAR(chuteIsCut),false]) && (_unit getVariable [QGVAR(hasReserve),false])) then { + +params ["_unit", "_gear"]; +private _backpack = _gear select 6; + +if ((vehicle _unit) isKindOf "ParachuteBase" && {backpack _unit == ""} && {!(_unit getVariable [QGVAR(chuteIsCut),false])} && {_unit getVariable [QGVAR(hasReserve),false]}) then { _unit addBackpackGlobal (_unit getVariable[QGVAR(backpackClass),"ACE_NonSteerableParachute"]); } else { - if ([false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute"))) then { + if ((getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")) == 1) then { _unit setVariable[QGVAR(backpackClass),getText(configFile >> "CfgVehicles" >> _backpack >> "ace_reserveParachute"),true]; }; - if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && !(animationState _unit == 'para_pilot')) then { + if (!(_unit getVariable [QGVAR(chuteIsCut),false]) && {!(animationState _unit == 'para_pilot')}) then { _unit setVariable [QGVAR(hasReserve),[false,true] select (getNumber(configFile >> "CfgVehicles" >> _backpack >> "ace_hasReserveParachute")),true]; }; }; diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index 83b6fc3409..880cc55e5f 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -64,7 +64,7 @@ Reserve Parachute Reserve Fallschirm - Mettre de coté le parachute (????) + Parachute de secours Spadochron awaryjny Tartalék ejtőernyő Para-quedas de reserva diff --git a/addons/rangecard/CfgVehicles.hpp b/addons/rangecard/CfgVehicles.hpp index 9e0793e36b..e7df701409 100644 --- a/addons/rangecard/CfgVehicles.hpp +++ b/addons/rangecard/CfgVehicles.hpp @@ -8,7 +8,7 @@ class CfgVehicles { distance = 2.0; condition = QUOTE(_target call FUNC(canCopy)); statement = QUOTE(_target call FUNC(updateClassNames)); - icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa)); + icon = QPATHTOF(UI\RangeCard_Icon.paa); }; }; }; @@ -20,7 +20,7 @@ class CfgVehicles { statement = QUOTE(false call FUNC(openRangeCard)); showDisabled = 0; priority = 0.1; - icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa)); + icon = QPATHTOF(UI\RangeCard_Icon.paa); exceptions[] = {"notOnMap"}; class GVAR(openCopy) { displayName = CSTRING(OpenRangeCardCopy); @@ -28,7 +28,7 @@ class CfgVehicles { statement = QUOTE(true call FUNC(openRangeCard)); showDisabled = 0; priority = 0.1; - icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa)); + icon = QPATHTOF(UI\RangeCard_Icon.paa); exceptions[] = {"notOnMap"}; }; class GVAR(makeCopy) { @@ -37,7 +37,7 @@ class CfgVehicles { statement = QUOTE(GVAR(ammoClassCopy) = GVAR(ammoClass); GVAR(magazineClassCopy) = GVAR(magazineClass); GVAR(weaponClassCopy) = GVAR(ammoClass);); showDisabled = 0; priority = 0.1; - icon = QUOTE(PATHTOF(UI\RangeCard_Icon.paa)); + icon = QPATHTOF(UI\RangeCard_Icon.paa); exceptions[] = {"notOnMap"}; }; }; diff --git a/addons/rangecard/CfgWeapons.hpp b/addons/rangecard/CfgWeapons.hpp index 7195c0a008..dfc643fa47 100644 --- a/addons/rangecard/CfgWeapons.hpp +++ b/addons/rangecard/CfgWeapons.hpp @@ -8,7 +8,7 @@ class CfgWeapons { scope = 2; displayName = CSTRING(Name); descriptionShort = CSTRING(Description); - picture = PATHTOF(UI\RangeCard_Icon.paa); + picture = QPATHTOF(UI\RangeCard_Icon.paa); icon = "iconObject_circle"; mapSize = 0.034; diff --git a/addons/rangecard/RscTitles.hpp b/addons/rangecard/RscTitles.hpp index c4da1862ca..8a2007b2b2 100644 --- a/addons/rangecard/RscTitles.hpp +++ b/addons/rangecard/RscTitles.hpp @@ -64,7 +64,7 @@ class ACE_RangeCard_Dialog { onLoad = "uiNamespace setVariable ['RangleCard_Display', (_this select 0)]"; onUnload = QUOTE(_this call FUNC(onCloseDialog)); objects[] = {}; - + class controls { class BACKGROUND { moving=1; @@ -79,7 +79,7 @@ class ACE_RangeCard_Dialog { h="1.62727"; colorBackground[]={1,1,1,1}; colorText[]={1,1,1,1}; - text=QUOTE(PATHTOF(UI\RangeCard.paa)); + text=QPATHTOF(UI\RangeCard.paa); }; class CAPTION_TEXT_1: RangeCard_RscText { idc=770000; diff --git a/addons/rangecard/config.cpp b/addons/rangecard/config.cpp index abe4e859f2..fd39a3a523 100644 --- a/addons/rangecard/config.cpp +++ b/addons/rangecard/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_RangeCard"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ACE_Advanced_Ballistics"}; - author = "Ruthberg"; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; @@ -14,4 +16,4 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" -#include "RscTitles.hpp" \ No newline at end of file +#include "RscTitles.hpp" diff --git a/addons/rangecard/functions/fnc_calculateSolution.sqf b/addons/rangecard/functions/fnc_calculateSolution.sqf index ea86d9986e..b921b71ff8 100644 --- a/addons/rangecard/functions/fnc_calculateSolution.sqf +++ b/addons/rangecard/functions/fnc_calculateSolution.sqf @@ -45,33 +45,14 @@ * Public: No */ #include "script_component.hpp" - -private ["_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed1", "_windSpeed2", "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_drag", "_bc", "_dragModel", "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude", "_directionOfFire", "_rangeCardSlot", "_useABConfig"]; -_scopeBaseAngle = _this select 0; -_bulletMass = _this select 1; -_boreHeight = _this select 2; -_airFriction = _this select 3; -_muzzleVelocity = _this select 4; -_temperature = _this select 5; -_barometricPressure = _this select 6; -_relativeHumidity = _this select 7; -_simSteps = _this select 8; -_windSpeed1 = (_this select 9) select 0; -_windSpeed2 = (_this select 9) select 1; -_windDirection = _this select 10; -_inclinationAngle = _this select 11; -_targetSpeed = _this select 12; -_targetRange = _this select 13; -_bc = _this select 14; -_dragModel = _this select 15; -_atmosphereModel = _this select 16; -_storeRangeCardData = _this select 17; -_stabilityFactor = _this select 18; -_twistDirection = _this select 19; -_latitude = _this select 20; -_directionOfFire = _this select 21; -_rangeCardSlot = _this select 22; -_useABConfig = _this select 23; +params [ + "_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", + "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed", + "_windDirection", "_inclinationAngle", "_targetSpeed", "_targetRange", "_bc", "_dragModel", + "_atmosphereModel", "_storeRangeCardData", "_stabilityFactor", "_twistDirection", "_latitude", + "_directionOfFire", "_rangeCardSlot", "_useABConfig" +]; +_windSpeed params ["_windSpeed1", "_windSpeed2"]; if (_storeRangeCardData) then { GVAR(rangeCardDataMVs) set [_rangeCardSlot, format[" %1", round(_muzzleVelocity)]]; @@ -138,19 +119,19 @@ _bulletVelocity set [2, Sin(_scopeBaseAngle) * _muzzleVelocity]; while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do { _bulletSpeed = vectorMagnitude _bulletVelocity; - + _speedTotal = _speedTotal + _bulletSpeed; _stepsTotal = _stepsTotal + 1; _speedAverage = (_speedTotal / _stepsTotal); - + if (_speedAverage > 450 && _bulletSpeed < _speedOfSound) exitWith {}; if (atan((_bulletPos select 2) / (abs(_bulletPos select 1) + 1)) < -2.254) exitWith {}; - + _trueVelocity = _bulletVelocity vectorDiff _wind1; _trueSpeed = vectorMagnitude _trueVelocity; - + if (_useABConfig) then { - _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then { + private _drag = if (missionNamespace getVariable [QEGVAR(advanced_ballistics,extensionAvailable), false]) then { parseNumber(("ace_advanced_ballistics" callExtension format["retard:%1:%2:%3", _dragModel, _bc, _trueSpeed])) } else { ([_dragModel, _bc, _trueSpeed] call EFUNC(advanced_ballistics,calculateRetardation)) @@ -215,4 +196,4 @@ if (_targetRange != 0) then { _kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2)); _kineticEnergy = _kineticEnergy * 0.737562149; -[_elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy, _verticalCoriolis * 60, _horizontalCoriolis * 60, _spinDrift * 60] \ No newline at end of file +[_elevation * 60, [_windage1 * 60, _windage2 * 60], _lead, _TOF, _bulletSpeed, _kineticEnergy, _verticalCoriolis * 60, _horizontalCoriolis * 60, _spinDrift * 60] diff --git a/addons/rangecard/functions/fnc_openRangeCard.sqf b/addons/rangecard/functions/fnc_openRangeCard.sqf index 3e886eb97a..ea085ed5b1 100644 --- a/addons/rangecard/functions/fnc_openRangeCard.sqf +++ b/addons/rangecard/functions/fnc_openRangeCard.sqf @@ -20,17 +20,17 @@ if (GVAR(RangeCardOpened)) exitWith {}; if (_this) then { if (GVAR(ammoClassCopy) != "" && GVAR(magazineClassCopy) != "" && GVAR(weaponClassCopy) != "") then { GVAR(RangeCardOpened) = true; - + createDialog "ACE_RangeCard_Dialog"; - + [GVAR(ammoClassCopy), GVAR(magazineClassCopy), GVAR(weaponClassCopy)] call FUNC(updateRangeCard); }; } else { if (ACE_player call FUNC(updateClassNames)) then { GVAR(RangeCardOpened) = true; - + createDialog "ACE_RangeCard_Dialog"; - + [GVAR(ammoClass), GVAR(magazineClass), GVAR(weaponClass)] call FUNC(updateRangeCard); }; }; diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index 04317d46d7..a7b0b996e2 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -107,7 +107,7 @@ _dragModel = _ammoConfig select 5; _atmosphereModel = _ammoConfig select 8; _bulletMass = 5; _boreHeight = 3.81; -_zeroRange = 100; +_zeroRange = 100; if (_bc == 0) then { _useABConfig = false; @@ -169,13 +169,13 @@ if (isNil {_cacheEntry}) then { { _mvShift = [_ammoConfig select 9, _x] call EFUNC(advanced_ballistics,calculateAmmoTemperatureVelocityShift); _mv = _muzzleVelocity + _mvShift; - + [_scopeBaseAngle,_bulletMass,_boreHeight,_airFriction,_mv,_x,_barometricPressure,_relativeHumidity,1000,[4,0],3,0,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,true,1.5,1,46,23,_forEachIndex,_useABConfig] call FUNC(calculateSolution); } forEach [-15, -5, 5, 10, 15, 20, 25, 30, 35]; - } else { + } else { [_scopeBaseAngle,_bulletMass,_boreHeight,_airFriction,_muzzleVelocity,15,_barometricPressure,_relativeHumidity,1000,[4,0],3,0,1,GVAR(rangeCardEndRange),_bc,_dragModel,_atmosphereModel,true,1.5,1,46,23,3,_useABConfig] call FUNC(calculateSolution); }; - + for "_i" from 0 to 9 do { GVAR(lastValidRow) pushBack count (GVAR(rangeCardDataElevation) select _i); while {count (GVAR(rangeCardDataElevation) select _i) < 50} do { @@ -190,7 +190,7 @@ if (isNil {_cacheEntry}) then { }; }; }; - + missionNamespace setVariable [format[QGVAR(%1_%2_%3), _ammoClass, _weaponClass, missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]], [GVAR(rangeCardDataElevation), GVAR(rangeCardDataWindage), GVAR(rangeCardDataLead), GVAR(rangeCardDataMVs), GVAR(lastValidRow)]]; } else { GVAR(rangeCardDataElevation) = _cacheEntry select 0; @@ -246,4 +246,4 @@ if (_useABConfig) then { } else { ctrlSetText [770020, ""]; ctrlSetText [770021, ""]; -}; \ No newline at end of file +}; diff --git a/addons/rangecard/stringtable.xml b/addons/rangecard/stringtable.xml index 0bd1160b87..e97a31195e 100644 --- a/addons/rangecard/stringtable.xml +++ b/addons/rangecard/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/realisticnames/CfgVehicles.hpp b/addons/realisticnames/CfgVehicles.hpp index 61864a8259..db42e693bf 100644 --- a/addons/realisticnames/CfgVehicles.hpp +++ b/addons/realisticnames/CfgVehicles.hpp @@ -636,12 +636,12 @@ class CfgVehicles { class Weapon_MMG_02_sand_F: Weapon_Base_F { displayName = CSTRING(MMG_02_sand); };*/ - + //attachments - + class Item_Base_F; - + class Item_acc_flashlight: Item_Base_F { - displayName="UTG Defender 126"; - }; + displayName="UTG Defender 126"; + }; }; diff --git a/addons/realisticnames/config.cpp b/addons/realisticnames/config.cpp index 6a8ea59290..d85fe9771d 100644 --- a/addons/realisticnames/config.cpp +++ b/addons/realisticnames/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"KoffeinFlummi","TaoSensai","commy2"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi","TaoSensai","commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index ad8338b0f1..b9f6c85b93 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/rearm/ACE_Settings.hpp b/addons/rearm/ACE_Settings.hpp index f4d6562807..798bbd7650 100644 --- a/addons/rearm/ACE_Settings.hpp +++ b/addons/rearm/ACE_Settings.hpp @@ -1,5 +1,6 @@ class ACE_Settings { class GVAR(level) { + category = ECSTRING(OptionsMenu,CategoryLogistics); displayName = CSTRING(RearmSettings_level_DisplayName); description = CSTRING(RearmSettings_level_Description); value = 0; diff --git a/addons/rearm/CfgVehicles.hpp b/addons/rearm/CfgVehicles.hpp index 30548aed76..44b7fe38af 100644 --- a/addons/rearm/CfgVehicles.hpp +++ b/addons/rearm/CfgVehicles.hpp @@ -1,3 +1,4 @@ + #define MACRO_REARM_ACTIONS \ class ACE_Actions { \ class ACE_MainActions { \ @@ -7,14 +8,14 @@ condition = QUOTE(_this call FUNC(canRearm)); \ statement = QUOTE(_player call FUNC(rearm)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_rearm_interact.paa); \ + icon = QPATHTOF(ui\icon_rearm_interact.paa); \ }; \ }; \ }; #define MACRO_REARM_TRUCK_ACTIONS \ - class ACE_Actions : ACE_Actions { \ - class ACE_MainActions : ACE_MainActions { \ + class ACE_Actions: ACE_Actions { \ + class ACE_MainActions: ACE_MainActions { \ class GVAR(TakeAmmo) { \ displayName = CSTRING(TakeAmmo); \ distance = REARM_ACTION_DISTANCE; \ @@ -23,7 +24,7 @@ exceptions[] = {"isNotInside"}; \ showDisabled = 0; \ priority = 2; \ - icon = PATHTOF(ui\icon_rearm_interact.paa); \ + icon = QPATHTOF(ui\icon_rearm_interact.paa); \ }; \ class GVAR(StoreAmmo) { \ displayName = CSTRING(StoreAmmo); \ @@ -31,17 +32,19 @@ condition = QUOTE(_this call FUNC(canStoreAmmo)); \ statement = QUOTE(_this call FUNC(storeAmmo)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_rearm_interact.paa); \ + icon = QPATHTOF(ui\icon_rearm_interact.paa); \ }; \ }; \ }; +class CBA_Extended_EventHandlers; + class CfgVehicles { class ACE_Module; - class ACE_moduleRearmSettings : ACE_Module { + class ACE_moduleRearmSettings: ACE_Module { scope = 2; displayName = CSTRING(RearmSettings_Module_DisplayName); - icon = QUOTE(PATHTOF(ui\icon_module_rearm.paa)); + icon = QPATHTOF(ui\icon_module_rearm.paa); category = "ACE_Logistics"; function = QFUNC(moduleRearmSettings); functionPriority = 1; @@ -76,99 +79,97 @@ class CfgVehicles { }; class LandVehicle; - class Car : LandVehicle { + class Car: LandVehicle { MACRO_REARM_ACTIONS }; - class Tank : LandVehicle { + class Tank: LandVehicle { MACRO_REARM_ACTIONS }; - class StaticWeapon : LandVehicle { + class StaticWeapon: LandVehicle { MACRO_REARM_ACTIONS }; class Air; - class Helicopter : Air { + class Helicopter: Air { MACRO_REARM_ACTIONS }; - class Plane : Air { + class Plane: Air { MACRO_REARM_ACTIONS }; class Ship; - class Ship_F : Ship { + class Ship_F: Ship { MACRO_REARM_ACTIONS }; // Ammo Vehicles (with full inheritance for granted ACE_Actions) - class Car_F : Car {}; - class Truck_F : Car_F {}; + class Car_F: Car {}; + class Truck_F: Car_F {}; - class Truck_03_base_F : Truck_F {}; - class O_Truck_03_ammo_F : Truck_03_base_F { + class Truck_03_base_F: Truck_F {}; + class O_Truck_03_ammo_F: Truck_03_base_F { transportAmmo = 0; MACRO_REARM_TRUCK_ACTIONS }; - class Truck_02_base_F : Truck_F {}; - class Truck_02_Ammo_base_F : Truck_02_base_F {}; - class I_Truck_02_ammo_F : Truck_02_Ammo_base_F { + class Truck_02_base_F: Truck_F {}; + class Truck_02_Ammo_base_F: Truck_02_base_F {}; + class I_Truck_02_ammo_F: Truck_02_Ammo_base_F { transportAmmo = 0; MACRO_REARM_TRUCK_ACTIONS }; - class O_Truck_02_Ammo_F : Truck_02_Ammo_base_F { + class O_Truck_02_Ammo_F: Truck_02_Ammo_base_F { transportAmmo = 0; MACRO_REARM_TRUCK_ACTIONS }; - class Truck_01_base_F : Truck_F {}; - class B_Truck_01_transport_F : Truck_01_base_F {}; - class B_Truck_01_mover_F : B_Truck_01_transport_F {}; - class B_Truck_01_ammo_F : B_Truck_01_mover_F { + class Truck_01_base_F: Truck_F {}; + class B_Truck_01_transport_F: Truck_01_base_F {}; + class B_Truck_01_mover_F: B_Truck_01_transport_F {}; + class B_Truck_01_ammo_F: B_Truck_01_mover_F { transportAmmo = 0; MACRO_REARM_TRUCK_ACTIONS }; - class Helicopter_Base_F : Helicopter {}; - class Helicopter_Base_H : Helicopter_Base_F {}; - class Heli_Transport_04_base_F : Helicopter_Base_H {}; - class O_Heli_Transport_04_ammo_F : Heli_Transport_04_base_F { + class Helicopter_Base_F: Helicopter {}; + class Helicopter_Base_H: Helicopter_Base_F {}; + class Heli_Transport_04_base_F: Helicopter_Base_H {}; + class O_Heli_Transport_04_ammo_F: Heli_Transport_04_base_F { transportAmmo = 0; MACRO_REARM_TRUCK_ACTIONS }; - class Pod_Heli_Transport_04_base_F: StaticWeapon {}; + class ThingX; + class ReammoBox_F: ThingX { + class ACE_Actions { + class ACE_MainActions {}; + }; + }; + class Slingload_base_F: ReammoBox_F {}; + class Slingload_01_Base_F: Slingload_base_F {}; + + class Pod_Heli_Transport_04_base_F: Slingload_base_F {}; class Land_Pod_Heli_Transport_04_ammo_F: Pod_Heli_Transport_04_base_F { transportAmmo = 0; MACRO_REARM_TRUCK_ACTIONS }; - class Slingload_base_F; - class Slingload_01_Base_F: Slingload_base_F { - class ACE_Actions { - class ACE_MainActions { - displayName = ECSTRING(interaction,MainAction); - selection = ""; - distance = 10; - condition = "true"; - }; - }; - }; - - class B_Slingload_01_Ammo_F : Slingload_01_Base_F { - XEH_ENABLED; + class B_Slingload_01_Ammo_F: Slingload_01_Base_F { transportAmmo = 0; MACRO_REARM_TRUCK_ACTIONS }; // Dummy Vehicles - class ThingX; - class GVAR(defaultCarriedObject) : ThingX { - XEH_ENABLED; + class GVAR(defaultCarriedObject): ThingX { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + displayName = QGVAR(dummy_obj); scope = 1; scopeCurator = 1; @@ -183,63 +184,63 @@ class CfgVehicles { exceptions[] = {"isNotInside"}; showDisabled = 0; priority = 2; - icon = PATHTOF(ui\icon_rearm_interact.paa); + icon = QPATHTOF(ui\icon_rearm_interact.paa); }; }; }; - class GVAR(Bo_GBU12_LGB) : GVAR(defaultCarriedObject) { + class GVAR(Bo_GBU12_LGB): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F\Ammo\Bomb_01_F.p3d"; }; - class GVAR(Bo_Mk82) : GVAR(defaultCarriedObject) { + class GVAR(Bo_Mk82): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F\Ammo\Bomb_02_F"; }; - class GVAR(Bomb_04_F) : GVAR(defaultCarriedObject) { + class GVAR(Bomb_04_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Bomb_04_F.p3d"; }; - class GVAR(Bomb_03_F) : GVAR(defaultCarriedObject) { + class GVAR(Bomb_03_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Bomb_03_F.p3d"; }; - class GVAR(Missile_AA_04_F) : GVAR(defaultCarriedObject) { + class GVAR(Missile_AA_04_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Missile_AA_04_F.p3d"; }; - class GVAR(Missile_AA_03_F) : GVAR(defaultCarriedObject) { + class GVAR(Missile_AA_03_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Missile_AA_03_F.p3d"; }; - class GVAR(Missile_AGM_02_F) : GVAR(defaultCarriedObject) { + class GVAR(Missile_AGM_02_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_02_F.p3d"; }; - class GVAR(Missile_AGM_01_F) : GVAR(defaultCarriedObject) { + class GVAR(Missile_AGM_01_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Missile_AGM_01_F.p3d"; }; - class GVAR(R_230mm_fly) : GVAR(defaultCarriedObject) { + class GVAR(R_230mm_fly): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F\Ammo\Missile_AT_02_F"; }; - class GVAR(R_230mm_HE) : GVAR(defaultCarriedObject) { + class GVAR(R_230mm_HE): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F\Ammo\Missile_AT_02_F"; }; - class GVAR(M_PG_AT) : GVAR(defaultCarriedObject) { + class GVAR(M_PG_AT): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F\Ammo\Rocket_01_F"; }; - class GVAR(Rocket_04_HE_F) : GVAR(defaultCarriedObject) { + class GVAR(Rocket_04_HE_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_HE_F.p3d"; }; - class GVAR(Rocket_03_HE_F) : GVAR(defaultCarriedObject) { + class GVAR(Rocket_03_HE_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d"; }; - class GVAR(Rocket_04_AP_F) : GVAR(defaultCarriedObject) { + class GVAR(Rocket_04_AP_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Rocket_04_AP_F.p3d"; }; - class GVAR(Rocket_03_AP_F) : GVAR(defaultCarriedObject) { + class GVAR(Rocket_03_AP_F): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_AP_F.p3d"; }; // Using wrong model - class GVAR(R_80mm_HE) : GVAR(defaultCarriedObject) { + class GVAR(R_80mm_HE): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d"; }; - class GVAR(R_60mm_HE) : GVAR(defaultCarriedObject) { + class GVAR(R_60mm_HE): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d"; }; - class GVAR(R_Hydra_HE) : GVAR(defaultCarriedObject) { + class GVAR(R_Hydra_HE): GVAR(defaultCarriedObject) { model = "\A3\Weapons_F_EPC\Ammo\Rocket_03_HE_F.p3d"; }; }; diff --git a/addons/rearm/config.cpp b/addons/rearm/config.cpp index c15721c9df..bd0a4980e2 100644 --- a/addons/rearm/config.cpp +++ b/addons/rearm/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"GitHawk", "Jonpas"}; - authorUrl = "https://ace3mod.com"; + author = ECSTRING(common,ACETeam); + authors[] = {"GitHawk", "Jonpas"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/rearm/functions/fnc_makeDummy.sqf b/addons/rearm/functions/fnc_makeDummy.sqf index 390ff658e0..5c19f8f12d 100644 --- a/addons/rearm/functions/fnc_makeDummy.sqf +++ b/addons/rearm/functions/fnc_makeDummy.sqf @@ -20,4 +20,4 @@ params [["_obj", objNull, [objNull]], ["_dirAndUp", [[1,0,0],[0,0,1]], [[]]]]; _obj setVectorDirAndUp _dirAndUp; _obj allowDamage false; -player disableCollisionWith _obj; +ACE_player disableCollisionWith _obj; diff --git a/addons/rearm/stringtable.xml b/addons/rearm/stringtable.xml index a4b037c5a5..7806735c57 100644 --- a/addons/rearm/stringtable.xml +++ b/addons/rearm/stringtable.xml @@ -10,6 +10,7 @@ Nastavení přezbrojení Impostazioni Riarmo Parámetros de rearme + Options de réarmement This module allows you to tweak rearm system settings. @@ -20,6 +21,7 @@ Tento modul umožňuje upravovat systém přezbrojení. Questo modulo ti consente di cambiare le impostazioni del sistema Riarmo. Este módulo permite cambiar los parámetros de rearme. + Ce module autorise l'amélioration du système de réarmement. Rearm Amount @@ -30,6 +32,7 @@ Rychlost přezbrojení Ammontare Riarmo Velocidad de rearme + Quantité à réarmer How fast should a vehicle be rearmed? @@ -40,6 +43,7 @@ Jak rychle bude vozidlo přezbrojeno? Quanto velocemente dovrebbe essere riarmato un veicolo? Cuán rápido es el proceso de rearme? + A quelle vitesse devrait être réarmé un véhicule ? Entire Vehicle @@ -50,6 +54,7 @@ Celé vozidlo Tutto il Veicolo Vehículo completo + Véhicule entier Entire Magazine @@ -60,6 +65,7 @@ Celý zásobník Tutto il Caricatore Cargador completo + Chargeur entier Amount based on caliber @@ -70,6 +76,7 @@ Rychlost závisí na ráži Ammontare basato sul calibro Cantidad basada en el calibre + Quantité basée sur le calibre Rearm @@ -80,6 +87,7 @@ Přezbrojit Riarma Rearmar + Réarmer Rearming %1 with %2... @@ -90,6 +98,7 @@ Přezbrojuji %1 za pomoci %2... Sto Riarmando %1 con %2... Rearmando %1 con %2... + Réarmement de %1 avec %2... Rearming %1... @@ -100,6 +109,7 @@ Přezbrojuji %1... Riarmando %1... Rearmando %1... + Réarmement de %1... Taking %1 for %2... @@ -110,6 +120,7 @@ Beru %1 pro %2... Sto prendendo %1 per %2... Tomando %1 para %2... + Prend %1 pour %2... Take ammo @@ -120,6 +131,7 @@ Vít munici Prendi munizioni Tomar munición + Prendre la munition Pick up ammo @@ -130,6 +142,7 @@ Sebrat munici Raccogli munizioni Levantar munición + Ramasser la munition Store ammo @@ -140,6 +153,7 @@ Uskladnit munici Riponi munizioni Guardar munición + Stocker la munition Storing %1 in %2... @@ -150,6 +164,7 @@ Ukládám %1 v %2... Sto riponendo %1 in %2... Guardando %1 en %2... + Stocke %1 dans %2... Picking up ammo... @@ -159,6 +174,7 @@ Pegando munição... Sto raccogliendo le munizioni... Levantando munición... + Ramassage des munitions... Rearmed %1 rounds of %2 on %3 @@ -169,6 +185,7 @@ Přezbrojeno % nábojů z %2 u %3 Riarmati %1 colpi di %2 su %3 Rearmadas %1 rondas de %2 en %3 + %1 balles réarmées de %2 dans %3 Smoke Screen @@ -201,6 +218,7 @@ 30mm HEI 30mm HEI 30mm HEI + 30mm HEI 30mm HEI-T @@ -211,6 +229,7 @@ 30mm HEI-T 30mm HEI-T 30mm HEI-T + 30mm HEI-T AIM-9 Sidewinder @@ -221,6 +240,7 @@ AIM-9 Sidewinder AIM-9 Sidewinder AIM-9 Sidewinder + AIM-9 Sidewinder Wympel R-73 @@ -231,6 +251,7 @@ Wympel R-73 Wympel R-73 Wympel R-73 + Wympel R-73 AGM-65 Maverick @@ -241,6 +262,7 @@ AGM-65 Maverick AGM-65 Maverick AGM-65 Maverick + AGM-65 Maverick Kh-25MTP @@ -251,6 +273,7 @@ Kh-25MTP Kh-25MTP Kh-25MTP + Kh-25MTP Hydra 70 HE @@ -261,6 +284,7 @@ Hydra 70 HE Hydra 70 HE Hydra 70 HE + Hydra 70 HE S-8 HE @@ -271,6 +295,7 @@ S-8 HE S-8 HE S-8 HE + S-8 HE Hydra 70 AP @@ -281,6 +306,7 @@ Hydra 70 AP Hydra 70 AP Hydra 70 AP + Hydra 70 AP S-8 AP @@ -291,6 +317,7 @@ S-8 AP S-8 AP S-8 AP + S-8 AP GBU-12 @@ -301,6 +328,7 @@ GBU-12 GBU-12 GBU-12 + GBU-12 FAB-250M-54 @@ -311,6 +339,7 @@ FAB-250M-54 FAB-250M-54 FAB-250M-54 + FAB-250M-54 \ No newline at end of file diff --git a/addons/recoil/CfgMoves.hpp b/addons/recoil/CfgMoves.hpp index ecad382cb5..29bca9c81a 100644 --- a/addons/recoil/CfgMoves.hpp +++ b/addons/recoil/CfgMoves.hpp @@ -7,7 +7,7 @@ // Go through all modes that have a camshakefire defined and change it to ours. class CfgMovesBasic { class Default { - camShakeFire = ACE_CAMSHAKEFIRE_NORMAL; + camShakeFire = ACE_CAMSHAKEFIRE_BASE; }; }; @@ -69,7 +69,7 @@ class CfgMovesMaleSdr: CfgMovesBasic { class AmovPknlMstpSrasWrflDnon; class AmovPknlMwlkSrasWrflDf: AmovPknlMstpSrasWrflDnon { - camShakeFire = ACE_CAMSHAKEFIRE_NORMAL; + camShakeFire = ACE_CAMSHAKEFIRE_BASE; }; class AmovPknlMrunSrasWrflDf; diff --git a/addons/recoil/config.cpp b/addons/recoil/config.cpp index 5b8002bc37..e6eee4a9af 100644 --- a/addons/recoil/config.cpp +++ b/addons/recoil/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/refuel/ACE_Settings.hpp b/addons/refuel/ACE_Settings.hpp index 0ae0accaad..b38a880641 100644 --- a/addons/refuel/ACE_Settings.hpp +++ b/addons/refuel/ACE_Settings.hpp @@ -1,5 +1,6 @@ class ACE_Settings { class GVAR(rate) { + category = ECSTRING(OptionsMenu,CategoryLogistics); displayName = CSTRING(RefuelSettings_speed_DisplayName); description = CSTRING(RefuelSettings_speed_Description); value = 1; diff --git a/addons/refuel/CfgVehicles.hpp b/addons/refuel/CfgVehicles.hpp index 5b6d9f483b..6774140cc7 100644 --- a/addons/refuel/CfgVehicles.hpp +++ b/addons/refuel/CfgVehicles.hpp @@ -1,3 +1,4 @@ + #define MACRO_REFUEL_ACTIONS \ class ACE_Actions: ACE_Actions { \ class ACE_MainActions: ACE_MainActions { \ @@ -8,41 +9,41 @@ statement = ""; \ showDisabled = 0; \ priority = 2; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ class GVAR(TakeNozzle) { \ displayName = CSTRING(TakeNozzle); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeNozzle)); \ statement = QUOTE([ARR_3(_player,_target,objNull)] call FUNC(TakeNozzle)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ class GVAR(CheckFuelCounter) { \ displayName = CSTRING(CheckFuelCounter); \ condition = "true"; \ statement = QUOTE([ARR_2(_player,_target)] call FUNC(readFuelCounter)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ class GVAR(CheckFuel) { \ displayName = CSTRING(CheckFuel); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canCheckFuel)); \ statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkFuel)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ class GVAR(Connect) { \ displayName = CSTRING(Connect); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canConnectNozzle)); \ statement = QUOTE([ARR_2(_player,_target)] call DFUNC(connectNozzle)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ class GVAR(Return) { \ displayName = CSTRING(Return); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canReturnNozzle)); \ statement = QUOTE([ARR_2(_player,_target)] call DFUNC(returnNozzle)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ }; \ }; \ @@ -58,13 +59,13 @@ statement = ""; \ showDisabled = 0; \ priority = 2; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ class GVAR(Connect) { \ displayName = CSTRING(Connect); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canConnectNozzle)); \ statement = QUOTE([ARR_2(_player,_target)] call DFUNC(connectNozzle)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ }; \ }; \ @@ -79,44 +80,46 @@ statement = ""; \ showDisabled = 0; \ priority = 2; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ class GVAR(PickUpNozzle) { \ displayName = CSTRING(TakeNozzle); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeNozzle)); \ statement = QUOTE([ARR_3(_player,objNull,_target)] call FUNC(TakeNozzle)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ class GVAR(TurnOn) { \ displayName = CSTRING(TurnOn); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTurnOn)); \ statement = QUOTE([ARR_2(_player,_target)] call DFUNC(turnOn)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ class GVAR(TurnOff) { \ displayName = CSTRING(TurnOff); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTurnOff)); \ statement = QUOTE([ARR_2(_player,_target)] call DFUNC(turnOff)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ class GVAR(Disconnect) { \ displayName = CSTRING(Disconnect); \ condition = QUOTE([ARR_2(_player,_target)] call FUNC(canDisconnect)); \ statement = QUOTE([ARR_2(_player,_target)] call DFUNC(disconnect)); \ exceptions[] = {"isNotInside"}; \ - icon = PATHTOF(ui\icon_refuel_interact.paa); \ + icon = QPATHTOF(ui\icon_refuel_interact.paa); \ }; \ }; \ }; +class CBA_Extended_EventHandlers; + class CfgVehicles { class ACE_Module; class ACE_moduleRefuelSettings: ACE_Module { scope = 2; displayName = CSTRING(RefuelSettings_Module_DisplayName); - icon = QUOTE(PATHTOF(ui\icon_module_refuel.paa)); + icon = QPATHTOF(ui\icon_module_refuel.paa); category = "ACE_Logistics"; function = QFUNC(moduleRefuelSettings); functionPriority = 1; @@ -135,29 +138,28 @@ class CfgVehicles { class ThingX; class ACE_refuel_fuelNozzle: ThingX { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + MACRO_NOZZLE_ACTIONS displayName = QGVAR(fuelNozzle); scope = 1; scopeCurator = 1; - model = PATHTOF(data\nozzle.p3d); + model = QPATHTOF(data\nozzle.p3d); }; class All; - class Static: All {}; - class Building: Static {}; - class NonStrategic: Building {}; - class HouseBase: NonStrategic {}; - class House: HouseBase {}; - class House_F: House {}; class House_Small_F: House_F { + class EventHandlers; + class ACE_Actions { class ACE_MainActions { displayName = ECSTRING(interaction,MainAction); @@ -478,20 +480,23 @@ class CfgVehicles { GVAR(fuelCargo) = 10000; }; - class Slingload_base_F; - class Slingload_01_Base_F: Slingload_base_F { + class ReammoBox_F: ThingX { class ACE_Actions { - class ACE_MainActions { - displayName = ECSTRING(interaction,MainAction); - selection = ""; - distance = 10; - condition = "true"; - }; + class ACE_MainActions {}; }; }; + class Slingload_base_F: ReammoBox_F {}; - class B_Slingload_01_Fuel_F: Slingload_01_Base_F { - XEH_ENABLED; + class Pod_Heli_Transport_04_base_F: Slingload_base_F {}; + class Land_Pod_Heli_Transport_04_fuel_F: Pod_Heli_Transport_04_base_F { + transportFuel = 0; //3k + MACRO_REFUEL_ACTIONS + GVAR(hooks)[] = {{-1.49,1.41,-.3}}; + GVAR(fuelCargo) = 10000; + }; + + class Slingload_01_Base_F: Slingload_base_F {}; + class B_Slingload_01_Fuel_F: Slingload_01_Base_F { transportFuel = 0; //3k MACRO_REFUEL_ACTIONS GVAR(hooks)[] = {{0.55,3.02,-0.5},{-0.52,3.02,-0.5}}; @@ -505,13 +510,6 @@ class CfgVehicles { GVAR(fuelCargo) = 10000; }; - class Pod_Heli_Transport_04_base_F: StaticWeapon {}; - class Land_Pod_Heli_Transport_04_fuel_F: Pod_Heli_Transport_04_base_F { - transportFuel = 0; //3k - MACRO_REFUEL_ACTIONS - GVAR(hooks)[] = {{-1.49,1.41,-.3}}; - GVAR(fuelCargo) = 10000; - }; class StorageBladder_base_F: NonStrategic { class ACE_Actions { @@ -524,7 +522,10 @@ class CfgVehicles { }; }; class Land_StorageBladder_01_F: StorageBladder_base_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + MACRO_REFUEL_ACTIONS transportFuel = 0; //60k GVAR(hooks)[] = {{-3.35,2.45,0.17}}; @@ -533,7 +534,10 @@ class CfgVehicles { // Vanilla buildings class Land_Fuelstation_Feed_F: House_Small_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + transportFuel = 0; //50k MACRO_REFUEL_ACTIONS GVAR(hooks)[] = {{0,0,-0.5}}; @@ -541,7 +545,10 @@ class CfgVehicles { }; class Land_fs_feed_F: House_Small_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + transportFuel = 0; //50k MACRO_REFUEL_ACTIONS GVAR(hooks)[] = {{-0.4,0.022,-.23}}; diff --git a/addons/refuel/XEH_postInit.sqf b/addons/refuel/XEH_postInit.sqf index 16c4232457..5078d808a2 100644 --- a/addons/refuel/XEH_postInit.sqf +++ b/addons/refuel/XEH_postInit.sqf @@ -5,3 +5,7 @@ if (isServer) then { addMissionEventHandler ["HandleDisconnect", {_this call FUNC(handleDisconnect)}]; }; + +[QGVAR(resetLocal), { + _this call FUNC(resetLocal); +}] call EFUNC(common,addEventHandler); diff --git a/addons/refuel/config.cpp b/addons/refuel/config.cpp index 6140cefe8c..2ace24fb92 100644 --- a/addons/refuel/config.cpp +++ b/addons/refuel/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_refuel_fuelNozzle"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"GitHawk"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"GitHawk"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/refuel/functions/fnc_canTurnOn.sqf b/addons/refuel/functions/fnc_canTurnOn.sqf index 98173e0fa4..e9de5c205c 100644 --- a/addons/refuel/functions/fnc_canTurnOn.sqf +++ b/addons/refuel/functions/fnc_canTurnOn.sqf @@ -27,4 +27,5 @@ if (isNull _unit || !(_nozzle getVariable [QGVAR(isRefueling), false]) && {[_nozzle getVariable QGVAR(source)] call FUNC(getFuel) != 0} && {!isNull (_nozzle getVariable [QGVAR(sink), objNull])} && - {(fuel (_nozzle getVariable QGVAR(sink))) < 1} + {(fuel (_nozzle getVariable QGVAR(sink))) < 1} && + {!(isEngineOn (_nozzle getVariable QGVAR(sink)))} diff --git a/addons/refuel/functions/fnc_checkFuel.sqf b/addons/refuel/functions/fnc_checkFuel.sqf index 6ba7a4928e..140021419d 100644 --- a/addons/refuel/functions/fnc_checkFuel.sqf +++ b/addons/refuel/functions/fnc_checkFuel.sqf @@ -27,9 +27,9 @@ private _fuel = [_target] call FUNC(getFuel); params ["_args"]; _args params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_fuel", 0, [0]]]; if (_fuel > 0 ) then { - ["displayTextStructured", [_unit], [[LSTRING(Hint_RemainingFuel), _fuel], 2, _unit]] call EFUNC(common,targetEvent); + ["displayTextStructured", _unit, [[LSTRING(Hint_RemainingFuel), _fuel], 2, _unit]] call EFUNC(common,objectEvent); } else { - ["displayTextStructured", [_unit], [LSTRING(Hint_Empty), 2, _unit]] call EFUNC(common,targetEvent); + ["displayTextStructured", _unit, [LSTRING(Hint_Empty), 2, _unit]] call EFUNC(common,objectEvent); }; true }, diff --git a/addons/refuel/functions/fnc_connectNozzle.sqf b/addons/refuel/functions/fnc_connectNozzle.sqf index d6b599b771..a124a331d5 100644 --- a/addons/refuel/functions/fnc_connectNozzle.sqf +++ b/addons/refuel/functions/fnc_connectNozzle.sqf @@ -28,7 +28,7 @@ if (isNull _nozzle) exitWith {}; GVAR(placeAction) = PLACE_WAITING; -[{[localize LSTRING(Connect_Action), ""] call EFUNC(interaction,showMouseHint)}, []] call EFUNC(common,execNextFrame); +[{[localize LSTRING(Connect_Action), ""] call EFUNC(interaction,showMouseHint)}, []] call CBA_fnc_execNextFrame; _unit setVariable [QGVAR(placeActionEH), [_unit, "DefaultAction", {true}, {GVAR(placeAction) = PLACE_APPROVE;}] call EFUNC(common,AddActionEventHandler)]; private _actionID = _unit addAction [format ["%1", localize LSTRING(Cancel)], {GVAR(placeAction) = PLACE_CANCEL;}]; diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index bf9b6b8092..1df5f1e208 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -119,7 +119,7 @@ _endPosTestOffset set [2, (_startingOffset select 2)]; }; }; }; - [[_nozzle, _dirAndUp], "{(_this select 0) setVectorDirAndUp (_this select 1)}", 2] call EFUNC(common,execRemoteFnc); + ["setVectorDirAndUp", _nozzle, [_nozzle, _dirAndUp]] call EFUNC(common,objectEvent); _nozzle setVariable [QGVAR(sink), _target, true]; _nozzle setVariable [QGVAR(isConnected), true, true]; _target setVariable [QGVAR(nozzle), _nozzle, true]; diff --git a/addons/refuel/functions/fnc_makeJerryCan.sqf b/addons/refuel/functions/fnc_makeJerryCan.sqf index 7a9552cfe3..c826948fa2 100644 --- a/addons/refuel/functions/fnc_makeJerryCan.sqf +++ b/addons/refuel/functions/fnc_makeJerryCan.sqf @@ -29,7 +29,7 @@ _target setVariable [QGVAR(source), _target, true]; // Main Action private _action = [QGVAR(Refuel), localize LSTRING(Refuel), - QUOTE(PATHTOF(ui\icon_refuel_interact.paa)), + QPATHTOF(ui\icon_refuel_interact.paa), {}, {true}, {}, @@ -41,7 +41,7 @@ private _action = [QGVAR(Refuel), // Add pickup _action = [QGVAR(PickUpNozzle), localize LSTRING(TakeNozzle), - QUOTE(PATHTOF(ui\icon_refuel_interact.paa)), + QPATHTOF(ui\icon_refuel_interact.paa), {[_player, objNull, _target] call FUNC(TakeNozzle)}, {[_player, _target] call FUNC(canTakeNozzle)}, {}, @@ -53,7 +53,7 @@ _action = [QGVAR(PickUpNozzle), // Add turnOn _action = [QGVAR(TurnOn), localize LSTRING(TurnOn), - QUOTE(PATHTOF(ui\icon_refuel_interact.paa)), + QPATHTOF(ui\icon_refuel_interact.paa), {[_player, _target] call FUNC(turnOn)}, {[_player, _target] call FUNC(canTurnOn)}, {}, @@ -65,7 +65,7 @@ _action = [QGVAR(TurnOn), // Add turnOff _action = [QGVAR(TurnOff), localize LSTRING(TurnOff), - QUOTE(PATHTOF(ui\icon_refuel_interact.paa)), + QPATHTOF(ui\icon_refuel_interact.paa), {[_player, _target] call FUNC(turnOff)}, {[_player, _target] call FUNC(canTurnOff)}, {}, @@ -77,7 +77,7 @@ _action = [QGVAR(TurnOff), // Add disconnect _action = [QGVAR(Disconnect), localize LSTRING(Disconnect), - QUOTE(PATHTOF(ui\icon_refuel_interact.paa)), + QPATHTOF(ui\icon_refuel_interact.paa), {[_player, _target] call FUNC(disconnect)}, {[_player, _target] call FUNC(canDisconnect)}, {}, diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf index 117cf5ea1e..62a006cda9 100644 --- a/addons/refuel/functions/fnc_refuel.sqf +++ b/addons/refuel/functions/fnc_refuel.sqf @@ -16,7 +16,7 @@ #include "script_component.hpp" -#define PFH_STEPSIZE 0.1 +#define PFH_STEPSIZE 1 params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_connectToPoint", [0,0,0], [[]], 3]]; @@ -52,6 +52,9 @@ private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> private _finished = false; private _fueling = _nozzle getVariable [QGVAR(isRefueling), false]; if (_fueling) then { + if (isEngineOn _sink) exitWith { + _nozzle setVariable [QGVAR(isRefueling), false, true]; + }; private _fuelInSource = [_source] call FUNC(getFuel); if (_fuelInSource == 0) exitWith { [LSTRING(Hint_SourceEmpty), 2, _unit] call EFUNC(common,displayTextStructured); @@ -76,11 +79,7 @@ private _maxFuel = getNumber (configFile >> "CfgVehicles" >> (typeOf _target) >> }; _unit setVariable [QGVAR(tempFuel), _fuelInSink]; - if !(local _sink) then { - [[_sink, _fuelInSink], "{(_this select 0) setFuel (_this select 1)}", _sink] call EFUNC(common,execRemoteFnc); - } else { - _sink setFuel _fuelInSink; - }; + ["setFuel", _sink, [_sink, _fuelInSink]] call EFUNC(common,objectEvent); [_source, _fuelInSource] call FUNC(setFuel); } else { _unit setVariable [QGVAR(tempFuel), fuel _sink]; diff --git a/addons/refuel/functions/fnc_reset.sqf b/addons/refuel/functions/fnc_reset.sqf index 8c9b2aaf6b..767e4b6c88 100644 --- a/addons/refuel/functions/fnc_reset.sqf +++ b/addons/refuel/functions/fnc_reset.sqf @@ -17,12 +17,7 @@ params [["_target", objNull, [objNull]]]; -if (local _target) then { - _target setHitPointDamage ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]; -} else { - [[_target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]], "{(_this select 0) setHitPointDamage (_this select 1)}", _target] call EFUNC(common,execRemoteFnc); -}; -_target setVariable [QGVAR(engineHit), nil, true]; +[_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set); _target setVariable [QGVAR(isConnected), false, true]; private _nozzle = _target getVariable [QGVAR(ownedNozzle), nil]; @@ -38,11 +33,7 @@ if !(isNil "_nozzle") then { }; { - if (local _x) then { - [_x, _nozzle] call FUNC(resetLocal); - } else { - [[_x, _nozzle], "{_this call FUNC(resetLocal)}", _x] call EFUNC(common,execRemoteFnc); - }; + [QGVAR(resetLocal), _x, [_x, _nozzle]] call EFUNC(common,objectEvent); } count allPlayers; deleteVehicle _nozzle; }; diff --git a/addons/refuel/functions/fnc_returnNozzle.sqf b/addons/refuel/functions/fnc_returnNozzle.sqf index 852a3d8c38..1bd364eafb 100644 --- a/addons/refuel/functions/fnc_returnNozzle.sqf +++ b/addons/refuel/functions/fnc_returnNozzle.sqf @@ -48,12 +48,7 @@ if (isNull _nozzle || {_source != _target}) exitWith {false}; }; deleteVehicle _nozzle; - if !(local _target) then { - [[_target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]], "{(_this select 0) setHitPointDamage (_this select 1)}", _sink] call EFUNC(common,execRemoteFnc); - } else { - _target setHitPointDamage ["HitEngine", _target getVariable [QGVAR(engineHit), 0]]; - }; - _target setVariable [QGVAR(engineHit), nil, true]; + [_target, "blockEngine", "ACE_Refuel", false] call EFUNC(common,statusEffect_set); }, "", localize LSTRING(ReturnAction), diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 3bccce15e2..87a212cd44 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -18,22 +18,16 @@ */ #include "script_component.hpp" -params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; - -[_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set); +params [ + ["_unit", objNull, [objNull]], + ["_target", objNull, [objNull]], + ["_nozzle", objNull, [objNull]] +]; REFUEL_HOLSTER_WEAPON private _endPosOffset = [0, 0, 0]; if (isNull _nozzle) then { // func is called on fuel truck - _target setVariable [QGVAR(engineHit), _target getHitPointDamage "HitEngine", true]; - if !(local _target) then { - [[_target, ["HitEngine", 1]], "{(_this select 0) setHitPointDamage (_this select 1)}", _sink] call EFUNC(common,execRemoteFnc); - } else { - _target setHitPointDamage ["HitEngine", 1]; - }; - - _target setVariable [QGVAR(isConnected), true, true]; _endPosOffset = getArray (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hooks)); if (count _endPosOffset == 2) then { if (_unit distance (_target modelToWorld (_endPosOffset select 0)) < _unit distance (_target modelToWorld (_endPosOffset select 1))) then { @@ -49,7 +43,11 @@ if (isNull _nozzle) then { // func is called on fuel truck [_unit, _target, _endPosOffset], { params ["_args"]; - _args params [["_unit", objNull, [objNull]], ["_target", objNull, [objNull]], ["_endPosOffset", [0,0,0], [[]], 3]]; + _args params [ + ["_unit", objNull, [objNull]], + ["_target", objNull, [objNull]], + ["_endPosOffset", [0, 0, 0], [[]], 3] + ]; private _newNozzle = "ACE_refuel_fuelNozzle" createVehicle position _unit; _newNozzle attachTo [_unit, [-0.02,0.05,-0.12], "righthandmiddle1"]; @@ -62,8 +60,12 @@ if (isNull _nozzle) then { // func is called on fuel truck }; _newNozzle setVariable [QGVAR(attachPos), _endPosOffset, true]; _newNozzle setVariable [QGVAR(source), _target, true]; + + [_target, "blockEngine", "ACE_Refuel", true] call EFUNC(common,statusEffect_set); + _target setVariable [QGVAR(isConnected), true, true]; _target setVariable [QGVAR(ownedNozzle), _newNozzle, true]; + [_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set); _unit setVariable [QGVAR(isRefueling), true]; private _actionID = _unit getVariable [QGVAR(ReleaseActionID), -1]; if (_actionID != -1) then { @@ -92,7 +94,11 @@ if (isNull _nozzle) then { // func is called on fuel truck [_unit, _nozzle], { params ["_args"]; - _args params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; + _args params [ + ["_unit", objNull, [objNull]], + ["_nozzle", objNull, [objNull]] + ]; + if (_nozzle getVariable [QGVAR(jerryCan), false]) then { _nozzle attachTo [_unit, [0,1,0], "pelvis"]; } else { @@ -100,6 +106,7 @@ if (isNull _nozzle) then { // func is called on fuel truck }; _unit setVariable [QGVAR(nozzle), _nozzle, true]; + [_unit, "forceWalk", "ACE_refuel", true] call EFUNC(common,statusEffect_set); _unit setVariable [QGVAR(isRefueling), true]; private _actionID = _unit getVariable [QGVAR(ReleaseActionID), -1]; if (_actionID != -1) then { @@ -129,8 +136,13 @@ if (isNull _nozzle) then { // func is called on fuel truck if !(_nozzle getVariable [QGVAR(jerryCan), false]) then { [{ params ["_args", "_pfID"]; - _args params [["_unit", player, [objNull]], ["_source", objNull, [objNull]], ["_endPosOffset", [0, 0, 0], [[]], 3]]; - _args params ["", "", "", ["_nozzle", _unit getVariable [QGVAR(nozzle), objNull], [objNull]]]; + _args params [ + ["_unit", player, [objNull]], + ["_source", objNull, [objNull]], + ["_endPosOffset", [0, 0, 0], [[]], 3], + ["_nozzle", _unit getVariable [QGVAR(nozzle), objNull], [objNull]] + ]; + if (isNull _source || {_unit distance (_source modelToWorld _endPosOffset) > (REFUEL_HOSE_LENGTH - 2)} || {!alive _source}) exitWith { if !(isNull _nozzle) then { [_unit, _nozzle] call FUNC(dropNozzle); diff --git a/addons/refuel/script_component.hpp b/addons/refuel/script_component.hpp index 02a9660bdd..f05018d3e8 100644 --- a/addons/refuel/script_component.hpp +++ b/addons/refuel/script_component.hpp @@ -22,6 +22,7 @@ #define REFUEL_HOLSTER_WEAPON \ _unit setVariable [QGVAR(selectedWeaponOnRefuel), currentWeapon _unit]; \ + _unit call EFUNC(common,fixLoweredRifleAnimation); \ _unit action ["SwitchWeapon", _unit, _unit, 99]; #define REFUEL_UNHOLSTER_WEAPON \ diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index 5c651e8d80..2df51ea540 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -10,6 +10,7 @@ Nastavení tankování Impostazioni Rifornimento Parámetros de reabastecimiento + Réglages de ravitaillement Flow Rate @@ -20,6 +21,7 @@ Rychlost tankování Rateo Flusso Caudal de llenado + Vitesse du ravitaillement How fast should a vehicle be refueled? @@ -30,6 +32,7 @@ Jak rychle bude vozidlo natankováno? Quanto velocemente dovrebbe essere rifornito un veicolo? Cuán rápido se reabastecen los vehículos? + A quelle vitesse devrait être ravitaillé un véhicule ? Refuel @@ -40,6 +43,7 @@ Natankovat Rifornisci Reabastecer + Ravitaillement Take fuel nozzle @@ -50,6 +54,7 @@ Vzít výdejní pistoli Prenti manica benzina Tomar surtidor + Prendre la pompe Taking fuel nozzle... @@ -60,6 +65,7 @@ Beru výdejní pistoli... Sto prendendo manica benzina... Tomando surtidor... + Prise de la pompe... Connect fuel nozzle @@ -70,6 +76,7 @@ Připojit výdejní pistoli Collega manica benzina Conectar surtidor + Connecter la pompe Connecting fuel nozzle... @@ -80,6 +87,7 @@ Připojuji výdejní pistoli... Sto collegando la manica benzina... Conectando surtidor... + Connection de la pompe... Disconnect fuel nozzle @@ -90,6 +98,7 @@ Odpojit výdejní pistoli Scollega manica benzina Desconectar surtidor + Déconnecter la pompe Connect @@ -100,6 +109,7 @@ Připojit Collega Conectar + Connecter Check remaining fuel @@ -110,6 +120,7 @@ Zkontrolovat zůstatek paliva Controlla benzina rimanente Verificar combustible remanente + Vérifier le carburant restant Checking remaining fuel... @@ -120,6 +131,7 @@ Kontroluji zůstatek paliva... Sto controllando la benzina rimanente... Verificando combustible remanente,,, + Vérifie le carburant restant... There are %1 liters left. @@ -130,6 +142,7 @@ Zbývá ještě %1 litrů. Sono rimasti %1 litri. Quedan %1 litros. + Il reste %1 litres. There is no fuel left. @@ -140,6 +153,7 @@ Bez paliva. Non è rimasta più benzina. No queda combustible. + Il n'y a plus de carburant. Cancel @@ -150,6 +164,7 @@ Zrušit Cancella Cancelar + Annuler Failed @@ -160,6 +175,7 @@ Neúspěšný Fallito Falló + Echoué Stop fueling @@ -170,6 +186,7 @@ Zastavit tankování Ferma rifornimento Detener reabastecimiento + Arrêter le ravitaillement Stopping fueling... @@ -180,6 +197,7 @@ Zastavuji tankování... Sto fermando il rifornimento... Deteniendo reabastecimiento... + Arrête le ravitaillement... Start fueling @@ -190,6 +208,7 @@ Začít tankovat Inizia rifornimento Comenzar reabastecimiento + Débute le ravitaillement Starting fueling... @@ -200,6 +219,7 @@ Spouštím tankování... Sto iniziando il rifornimento... Comenzando reabastecimiento... + Début du ravitaillement... %1 Liters fueled @@ -210,6 +230,7 @@ %1 litrů natankováno %1 litri riforniti %1 lt reabastecido + %1 litres ravitaillés The fuel source is empty. @@ -220,6 +241,7 @@ Zdroj paliva je prázdný. La fonte di benzina èvuota. La fuente de combustible está vacía. + La source de carburant est vide. Maximum fuel hose length reached. @@ -230,6 +252,7 @@ Dosažena maximální délka hadice Distanza massima della manica raggiunta. Máxima longitud de manguera alcanzada. + Tuyau tendu au maximum Fueling completed @@ -240,6 +263,7 @@ Tankování dokončeno Rifornimento completato Reabastecimiento completado + Ravitaillement terminé Fueling stopped @@ -250,6 +274,7 @@ Tankování zastaveno Rifornimento fermato Reabastecimiento detenido + Ravitaillement stoppé Fueling started @@ -260,6 +285,7 @@ Tankování zahájeno Rifornimento iniziato Comenzó el reabastecimiento + Ravitaillement débuté Return fuel nozzle @@ -270,6 +296,7 @@ Vrátit výdejní pistoli Riponi manica benzina Devolver surtidor + Retourner la pompe Returning fuel nozzle... @@ -280,6 +307,7 @@ Vracím výdejní pistoli... Sto riponendo la manica della benzina... Devolviendo el surtidor... + Retourne la pompe Check fuel counter @@ -290,6 +318,7 @@ Zkonrolovat palivoměr Controlla indicatore livello benzina Verificar el contador de combustible + Vérifier le compteur Checking fuel counter... @@ -300,6 +329,7 @@ Konroluji palivoměr... Sto controllando l'indicatore del livello benzina... Verificando el contador de combustible + Vérification du compteur... %1 liters have been fueled. @@ -310,6 +340,7 @@ %1 litrů bylo natankováno. %1 litri sono stati riforniti. Se reabastecieron %1 lt + %1 litres ont été écoulés. diff --git a/addons/reload/ACE_Settings.hpp b/addons/reload/ACE_Settings.hpp index 7b60527449..72d26b46cf 100644 --- a/addons/reload/ACE_Settings.hpp +++ b/addons/reload/ACE_Settings.hpp @@ -1,5 +1,5 @@ class ACE_Settings { - class GVAR(DisplayText) { + class GVAR(displayText) { typeName = "BOOL"; isClientSettable = 1; value = 1; diff --git a/addons/reload/ACE_UI.hpp b/addons/reload/ACE_UI.hpp new file mode 100644 index 0000000000..6dae3e5147 --- /dev/null +++ b/addons/reload/ACE_UI.hpp @@ -0,0 +1,7 @@ +class ACE_UI { + class ammoCount { + class conditions { + ADDON = "false"; + }; + }; +}; diff --git a/addons/reload/RscInGameUI.hpp b/addons/reload/RscInGameUI.hpp deleted file mode 100644 index 7310690f16..0000000000 --- a/addons/reload/RscInGameUI.hpp +++ /dev/null @@ -1,24 +0,0 @@ - -class RscControlsGroup; -class RscText; - -class RscInGameUI { - class RscUnitInfo { - // Soldiers - class WeaponInfoControlsGroupLeft: RscControlsGroup { - class controls { - class CA_AmmoCount: RscText { - sizeEx = 0; - }; - }; - }; - // Vehicles - /*class WeaponInfoControlsGroupRight: RscControlsGroup { - class controls { - class CA_AmmoCount: RscText { - sizeEx = 0; - }; - }; - };*/ - }; -}; diff --git a/addons/reload/config.cpp b/addons/reload/config.cpp index 6ded1cd687..1e97fa70f1 100644 --- a/addons/reload/config.cpp +++ b/addons/reload/config.cpp @@ -6,20 +6,16 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"commy2","KoffeinFlummi","esteldunedain"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2","KoffeinFlummi","esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgVehicles.hpp" - #include "CfgMagazines.hpp" - #include "CfgEventHandlers.hpp" - #include "CfgActions.hpp" - -#include "RscInGameUI.hpp" - #include "ACE_Settings.hpp" +#include "ACE_UI.hpp" diff --git a/addons/reload/functions/fnc_checkAmmo.sqf b/addons/reload/functions/fnc_checkAmmo.sqf index b0581a143a..8edfd172c0 100644 --- a/addons/reload/functions/fnc_checkAmmo.sqf +++ b/addons/reload/functions/fnc_checkAmmo.sqf @@ -34,4 +34,4 @@ if (_unit == _target) then { _unit playActionNow "Gear"; }; -[FUNC(displayAmmo), [_target], 1, 0.1] call EFUNC(common,waitAndExecute); +[FUNC(displayAmmo), [_target], 1, 0.1] call CBA_fnc_waitAndExecute; diff --git a/addons/reload/script_component.hpp b/addons/reload/script_component.hpp index 09993faaa4..eece5acec7 100644 --- a/addons/reload/script_component.hpp +++ b/addons/reload/script_component.hpp @@ -14,4 +14,4 @@ #define DEBUG_SETTINGS DEBUG_ENABLED_RELOAD #endif -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/addons/reload/stringtable.xml b/addons/reload/stringtable.xml index f7412e1d2e..647322e8e6 100644 --- a/addons/reload/stringtable.xml +++ b/addons/reload/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/reloadlaunchers/config.cpp b/addons/reloadlaunchers/config.cpp index 6a04f6339a..0ff68c0c9c 100644 --- a/addons/reloadlaunchers/config.cpp +++ b/addons/reloadlaunchers/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf index a07afe8e22..f6cd923845 100644 --- a/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf +++ b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf @@ -3,28 +3,31 @@ * Create one action per reloadable missile * * Argument: - * 1: Player (Object) - * 0: Target (Object) - * 2: Parameters ??? (Array) + * 1: Target (Object) + * 0: Player (Object) * * Return value: * Children actions (Array) * + * Public: No + * */ #include "script_component.hpp" -private ["_unit", "_target", "_parameters"]; +params ["_target", "_unit"]; +TRACE_2("params",_target,_unit); -_unit = _this select 1; -_target = _this select 0; -_parameters = _this select 2; // ??? +//Fast exit for common case: +private _weapon = secondaryWeapon _target; +if ((_weapon == "") || {(getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(enabled))) == 0}) exitWith { + TRACE_1("weapon not supported",_weapon); + [] +}; -private ["_actions", "_weapon", "_loadableMissiles"]; +private _actions = []; -_actions = []; - -_weapon = secondaryWeapon _target; -_loadableMissiles = [_unit, _weapon] call FUNC(getLoadableMissiles); +private _loadableMissiles = [_unit, _weapon] call FUNC(getLoadableMissiles); +TRACE_2("",_weapon,_loadableMissiles); { private ["_name", "_displayName", "_statement", "_condition", "_action"]; @@ -45,4 +48,5 @@ _loadableMissiles = [_unit, _weapon] call FUNC(getLoadableMissiles); _actions pushBack [_action, [], _unit]; } forEach _loadableMissiles; +TRACE_1("return",_actions); _actions diff --git a/addons/reloadlaunchers/functions/fnc_canLoad.sqf b/addons/reloadlaunchers/functions/fnc_canLoad.sqf index 5bbfe4dd87..116a900092 100644 --- a/addons/reloadlaunchers/functions/fnc_canLoad.sqf +++ b/addons/reloadlaunchers/functions/fnc_canLoad.sqf @@ -1,6 +1,5 @@ /* * Author: commy2 - * * Check of the unit can reload the launcher of target unit. * * Argument: @@ -11,15 +10,13 @@ * * Return value: * NONE + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target", "_weapon", "_magazine"]; - -_unit = _this select 0; -_target = _this select 1; -_weapon = _this select 2; -_magazine = _this select 3; +params ["_unit", "_target", "_weapon", "_magazine"]; +TRACE_4("params",_unit,_target,_weapon,_magazine); if (!alive _target) exitWith {false}; if (vehicle _target != _target) exitWith {false}; diff --git a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf index e75d826513..f466490b64 100644 --- a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf +++ b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf @@ -1,6 +1,5 @@ /* * Author: commy2 - * * Return all magazine types from reloaders inventory that are compatible with given weapon. * * Argument: @@ -9,17 +8,16 @@ * * Return value: * Reloable magazines (Array) + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_weapon"]; - -_unit = _this select 0; -_weapon = _this select 1; +params ["_unit", "_weapon"]; +TRACE_2("params",_unit,_weapon); // get available magazines of reloader, Note: "magazines" does not include currently loaded magazines -private "_magazines"; -_magazines = magazines _unit; +private _magazines = magazines _unit; // case sensitvity _magazines = _magazines apply {toLower _x}; diff --git a/addons/reloadlaunchers/functions/fnc_load.sqf b/addons/reloadlaunchers/functions/fnc_load.sqf index ce7b743df5..db18e7edaa 100644 --- a/addons/reloadlaunchers/functions/fnc_load.sqf +++ b/addons/reloadlaunchers/functions/fnc_load.sqf @@ -1,6 +1,5 @@ /* * Author: commy2 - * * Reload a launcher * * Argument: @@ -11,18 +10,19 @@ * * Return value: * NONE + * + * Public: No */ #include "script_component.hpp" -private ["_unit", "_target", "_weapon", "_magazine"]; +params ["_unit", "_target", "_weapon", "_magazine"]; +TRACE_4("params",_unit,_target,_weapon,_magazine); -_unit = _this select 0; -_target = _this select 1; -_weapon = _this select 2; -_magazine = _this select 3; - -private "_reloadTime"; -_reloadTime = getNumber (configFile >> "CfgWeapons" >> _weapon >> "magazineReloadTime"); +private _reloadTime = if (isNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(buddyReloadTime))) then { + getNumber (configFile >> "CfgWeapons" >> _weapon >> QGVAR(buddyReloadTime)) +} else { + 2.5 +}; // do animation [_unit] call EFUNC(common,goKneeling); diff --git a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf index fc802a025c..2aec180d22 100644 --- a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf +++ b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf @@ -1,6 +1,5 @@ /* * Author: commy2 - * * Reload a launcher * * Argument: @@ -11,10 +10,13 @@ * * Return value: * NONE + * + * Public: No */ #include "script_component.hpp" -PARAMS_4(_unit,_target,_weapon,_magazine); +params ["_unit","_target","_weapon","_magazine"]; +TRACE_4("params",_unit,_target,_weapon,_magazine); _target selectWeapon _weapon; diff --git a/addons/reloadlaunchers/stringtable.xml b/addons/reloadlaunchers/stringtable.xml index 5e38ce4009..72193d48e2 100644 --- a/addons/reloadlaunchers/stringtable.xml +++ b/addons/reloadlaunchers/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/repair/ACE_Repair.hpp b/addons/repair/ACE_Repair.hpp index d47773cd83..6e5eac4fa8 100644 --- a/addons/repair/ACE_Repair.hpp +++ b/addons/repair/ACE_Repair.hpp @@ -12,7 +12,7 @@ class ACE_Repair { condition = QUOTE(call FUNC(canReplaceWheel)); itemConsumed = 0; claimObjects[] = {{"ACE_Wheel"}}; - + callbackSuccess = QUOTE(call FUNC(doReplaceWheel)); callbackFailure = ""; callbackProgress = ""; diff --git a/addons/repair/ACE_Settings.hpp b/addons/repair/ACE_Settings.hpp index c3c8daad16..46228e2e44 100644 --- a/addons/repair/ACE_Settings.hpp +++ b/addons/repair/ACE_Settings.hpp @@ -1,5 +1,5 @@ class ACE_Settings { - class GVAR(DisplayTextOnRepair) { + class GVAR(displayTextOnRepair) { displayName = CSTRING(SettingDisplayTextName); description = CSTRING(SettingDisplayTextDesc); typeName = "BOOL"; @@ -7,7 +7,7 @@ class ACE_Settings { value = 1; category = ECSTRING(OptionsMenu,CategoryLogistics); }; - class GVAR(engineerSetting_Repair) { + class GVAR(engineerSetting_repair) { displayName = CSTRING(enginerSetting_Repair_name); description = CSTRING(enginerSetting_Repair_description); typeName = "SCALAR"; @@ -15,7 +15,7 @@ class ACE_Settings { values[] = {CSTRING(engineerSetting_anyone), CSTRING(engineerSetting_EngineerOnly), CSTRING(engineerSetting_RepairSpecialistOnly)}; category = ECSTRING(OptionsMenu,CategoryLogistics); }; - class GVAR(engineerSetting_Wheel) { + class GVAR(engineerSetting_wheel) { displayName = CSTRING(enginerSetting_Wheel_name); description = CSTRING(enginerSetting_Wheel_description); typeName = "SCALAR"; @@ -30,14 +30,14 @@ class ACE_Settings { value = 0.6; category = ECSTRING(OptionsMenu,CategoryLogistics); }; - class GVAR(repairDamageThreshold_Engineer) { + class GVAR(repairDamageThreshold_engineer) { displayName = CSTRING(repairDamageThreshold_Engineer_name); description = CSTRING(repairDamageThreshold_Engineer_description); typeName = "SCALAR"; value = 0.4; category = ECSTRING(OptionsMenu,CategoryLogistics); }; - class GVAR(consumeItem_ToolKit) { + class GVAR(consumeItem_toolKit) { displayName = CSTRING(consumeItem_ToolKit_name); description = CSTRING(consumeItem_ToolKit_description); typeName = "SCALAR"; @@ -77,4 +77,9 @@ class ACE_Settings { values[] = {"None", "ToolKit"}; _values[] = {{}, {"ToolKit"}}; }; + class GVAR(autoShutOffEngineWhenStartingRepair) { + typeName = "BOOL"; + value = 0; + category = ECSTRING(OptionsMenu,CategoryLogistics); + }; }; diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index d8885fddf9..ca315d68ec 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -16,9 +16,9 @@ class Cfg3DEN { class Value: ctrlToolbox { idc = 100; style = "0x02"; - x = "48 * (pixelW * 1.25 * 4)"; - w = "82 * (pixelW * 1.25 * 4)"; - h = "5 * (pixelH * 1.25 * 4)"; + x = "48 * (pixelW * pixelGrid * 0.25)"; + w = "82 * (pixelW * pixelGrid * 0.25)"; + h = "5 * (pixelH * pixelGrid * 0.25)"; rows = 1; columns = 4; strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignEngineerRole_role_none), CSTRING(AssignEngineerRole_role_engineer), CSTRING(AssignEngineerRole_role_specialist)}; diff --git a/addons/repair/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp index ffd75a38bc..94d7d7ea45 100644 --- a/addons/repair/CfgEventHandlers.hpp +++ b/addons/repair/CfgEventHandlers.hpp @@ -22,32 +22,34 @@ class Extended_InitPost_EventHandlers { class Car { class ADDON { init = QUOTE(_this call DFUNC(addRepairActions)); - serverInit = QUOTE(_this call DFUNC(addSpareParts)); + serverInit = QUOTE([ARR_3(_this select 0,1,'ACE_Wheel')] call DFUNC(addSpareParts)); }; }; class Tank { class ADDON { init = QUOTE(_this call DFUNC(addRepairActions)); - serverInit = QUOTE(_this call DFUNC(addSpareParts)); + serverInit = QUOTE([ARR_3(_this select 0,1,'ACE_Track')] call DFUNC(addSpareParts)); + }; + }; + class Motorcycle { + class ADDON { + init = QUOTE(_this call DFUNC(addRepairActions)); }; }; class Helicopter { class ADDON { init = QUOTE(_this call DFUNC(addRepairActions)); - serverInit = QUOTE(_this call DFUNC(addSpareParts)); - exclude[] = {QEGVAR(fastroping,helper)}; + exclude[] = {QEGVAR(fastroping,helper), "ACE_friesBase"}; }; }; class Plane { class ADDON { init = QUOTE(_this call DFUNC(addRepairActions)); - serverInit = QUOTE(_this call DFUNC(addSpareParts)); }; }; class Ship_F { class ADDON { init = QUOTE(_this call DFUNC(addRepairActions)); - serverInit = QUOTE(_this call DFUNC(addSpareParts)); }; }; }; diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index 1968023881..c2f2bfacc7 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -15,12 +15,14 @@ }; \ }; +class CBA_Extended_EventHandlers; + class CfgVehicles { class ACE_Module; class ACE_moduleRepairSettings: ACE_Module { scope = 2; displayName = CSTRING(moduleName); - icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa)); + icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); category = "ACE_Logistics"; function = QFUNC(moduleRepairSettings); functionPriority = 1; @@ -118,7 +120,7 @@ class CfgVehicles { class ACE_moduleAssignEngineerRoles: Module_F { scope = 2; displayName = CSTRING(AssignEngineerRole_Module_DisplayName); - icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa)); + icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); category = "ACE_Logistics"; function = QFUNC(moduleAssignEngineer); functionPriority = 10; @@ -162,7 +164,7 @@ class CfgVehicles { class ACE_moduleAssignRepairVehicle: Module_F { scope = 2; displayName = CSTRING(AssignRepairVehicle_Module_DisplayName); - icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa)); + icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); category = "ACE_Logistics"; function = QFUNC(moduleAssignRepairVehicle); functionPriority = 10; @@ -234,7 +236,7 @@ class CfgVehicles { class ACE_moduleAddSpareParts: Module_F { scope = 2; displayName = CSTRING(AddSpareParts_Module_DisplayName); - icon = QUOTE(PATHTOF(ui\Icon_Module_Repair_ca.paa)); + icon = QPATHTOF(ui\Icon_Module_Repair_ca.paa); category = "ACE_Logistics"; function = QFUNC(moduleAddSpareParts); functionPriority = 10; @@ -288,6 +290,10 @@ class CfgVehicles { MACRO_REPAIRVEHICLE }; + class Motorcycle: LandVehicle { + MACRO_REPAIRVEHICLE + }; + class Air; class Helicopter: Air { MACRO_REPAIRVEHICLE @@ -304,7 +310,10 @@ class CfgVehicles { class ThingX; class ACE_RepairItem_Base: ThingX { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + icon = "iconObject_circle"; mapSize = 0.7; accuracy = 0.2; @@ -317,7 +326,7 @@ class CfgVehicles { EGVAR(cargo,canLoad) = 1; author = "Hawkins"; scope = 2; - model = QUOTE(PATHTOF(data\ace_track.p3d)); + model = QPATHTOF(data\ace_track.p3d); displayName = CSTRING(SpareTrack); }; @@ -326,9 +335,9 @@ class CfgVehicles { EGVAR(cargo,canLoad) = 1; author = "Hawkins"; scope = 2; - model = QUOTE(PATHTOF(data\ace_wheel.p3d)); + model = QPATHTOF(data\ace_wheel.p3d); displayName = CSTRING(SpareWheel); - picture = QUOTE(PATHTOF(ui\tire_ca.paa)); + picture = QPATHTOF(ui\tire_ca.paa); }; // disable vanilla repair @@ -342,7 +351,7 @@ class CfgVehicles { class Helicopter_Base_H; class Heli_Transport_04_base_F: Helicopter_Base_H { - GVAR(hitpointGroups[]) = { {"HitEngine", {"HitEngine1", "HitEngine2"}}, {"Glass_1_hitpoint", {"Glass_2_hitpoint", "Glass_3_hitpoint", "Glass_4_hitpoint", "Glass_5_hitpoint", "Glass_6_hitpoint", "Glass_7_hitpoint", "Glass_8_hitpoint", "Glass_9_hitpoint", "Glass_10_hitpoint", "Glass_11_hitpoint", "Glass_12_hitpoint", "Glass_13_hitpoint", "Glass_14_hitpoint", "Glass_15_hitpoint", "Glass_16_hitpoint", "Glass_17_hitpoint", "Glass_18_hitpoint", "Glass_19_hitpoint", "Glass_20_hitpoint"}} }; + GVAR(hitpointGroups)[] = { {"HitEngine", {"HitEngine1", "HitEngine2"}}, {"Glass_1_hitpoint", {"Glass_2_hitpoint", "Glass_3_hitpoint", "Glass_4_hitpoint", "Glass_5_hitpoint", "Glass_6_hitpoint", "Glass_7_hitpoint", "Glass_8_hitpoint", "Glass_9_hitpoint", "Glass_10_hitpoint", "Glass_11_hitpoint", "Glass_12_hitpoint", "Glass_13_hitpoint", "Glass_14_hitpoint", "Glass_15_hitpoint", "Glass_16_hitpoint", "Glass_17_hitpoint", "Glass_18_hitpoint", "Glass_19_hitpoint", "Glass_20_hitpoint"}} }; }; class O_Heli_Transport_04_repair_F: Heli_Transport_04_base_F { GVAR(canRepair) = 1; @@ -357,12 +366,12 @@ class CfgVehicles { class Heli_Transport_02_base_F; class I_Heli_Transport_02_F: Heli_Transport_02_base_F { - GVAR(hitpointPositions[]) = {{"HitVRotor", {-1,-9.4,1.8}}, {"HitHRotor", {0,1.8,1.3}}}; + GVAR(hitpointPositions)[] = {{"HitVRotor", {-1,-9.4,1.8}}, {"HitHRotor", {0,1.8,1.3}}}; }; class Helicopter_Base_F; class Heli_light_03_base_F: Helicopter_Base_F { - GVAR(hitpointPositions[]) = {{"HitVRotor", {-0.5,-5.55,1.2}}, {"HitHRotor", {0,1.8,1.5}}}; + GVAR(hitpointPositions)[] = {{"HitVRotor", {-0.5,-5.55,1.2}}, {"HitHRotor", {0,1.8,1.5}}}; }; class B_APC_Tracked_01_base_F; @@ -372,12 +381,12 @@ class CfgVehicles { }; class B_APC_Tracked_01_AA_F: B_APC_Tracked_01_base_F { - GVAR(hitpointPositions[]) = {{"HitTurret", {0,-2,0}}}; + GVAR(hitpointPositions)[] = {{"HitTurret", {0,-2,0}}}; }; class Car_F; class Offroad_01_base_F: Car_F { - GVAR(hitpointGroups[]) = { {"HitGlass1", {"HitGlass2"}} }; + GVAR(hitpointGroups)[] = { {"HitGlass1", {"HitGlass2"}} }; }; class Offroad_01_repair_base_F: Offroad_01_base_F { GVAR(canRepair) = 1; @@ -385,7 +394,7 @@ class CfgVehicles { }; class MRAP_01_base_F: Car_F { - GVAR(hitpointGroups[]) = { {"HitGlass1", {"HitGlass2", "HitGlass3", "HitGlass4", "HitGlass5", "HitGlass6"}} }; + GVAR(hitpointGroups)[] = { {"HitGlass1", {"HitGlass2", "HitGlass3", "HitGlass4", "HitGlass5", "HitGlass6"}} }; }; class B_Truck_01_mover_F; @@ -416,9 +425,9 @@ class CfgVehicles { class Quadbike_01_base_F; class B_Quadbike_01_F: Quadbike_01_base_F { - GVAR(hitpointPositions[]) = { {"HitEngine", {0, 0.5, -0.7}}, {"HitFuel", {0, 0, -0.5}} }; + GVAR(hitpointPositions)[] = { {"HitEngine", {0, 0.5, -0.7}}, {"HitFuel", {0, 0, -0.5}} }; }; class Hatchback_01_base_F: Car_F { - GVAR(hitpointPositions[]) = {{"HitBody", {0, 0.7, -0.5}}, {"HitFuel", {0, -1.75, -0.75}}}; + GVAR(hitpointPositions)[] = {{"HitBody", {0, 0.7, -0.5}}, {"HitFuel", {0, -1.75, -0.75}}}; }; }; diff --git a/addons/repair/XEH_postInit.sqf b/addons/repair/XEH_postInit.sqf index 44ca157b0c..a18e19fe37 100644 --- a/addons/repair/XEH_postInit.sqf +++ b/addons/repair/XEH_postInit.sqf @@ -5,3 +5,5 @@ // wheels ["setWheelHitPointDamage", {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call EFUNC(common,addEventHandler); + +[QGVAR(useItem), EFUNC(common,useItem)] call EFUNC(common,addEventHandler); diff --git a/addons/repair/config.cpp b/addons/repair/config.cpp index d377342adf..e23eeeaea0 100644 --- a/addons/repair/config.cpp +++ b/addons/repair/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"commy2", "Glowbal", "Jonpas"}; - authorUrl = "https://ace3mod.com"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2", "Glowbal", "Jonpas"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/repair/functions/fnc_addSpareParts.sqf b/addons/repair/functions/fnc_addSpareParts.sqf index 74ea0d4c10..3d7247fcaa 100644 --- a/addons/repair/functions/fnc_addSpareParts.sqf +++ b/addons/repair/functions/fnc_addSpareParts.sqf @@ -21,8 +21,8 @@ params ["_vehicle", ["_amount", 1], ["_part", ""], ["_force", false]]; TRACE_2("params",_vehicle,_amount); -// Exit if ace_cargo is not loaded -if !(["ace_cargo"] call EFUNC(common,isModLoaded)) exitWith {}; +// Exit if ace_cargo is not loaded or no part supplied +if (!(["ace_cargo"] call EFUNC(common,isModLoaded)) || {_part == ""}) exitWith {}; // Collect until SettingsInitialized if (!EGVAR(common,settingsInitFinished)) exitWith { @@ -32,13 +32,5 @@ if (!EGVAR(common,settingsInitFinished)) exitWith { // Exit if not forced and add spare parts is disabled (after settings initted to make sure it really is) if (!_force && !GVAR(addSpareParts)) exitWith {}; -// Select appropriate part -if (_part == "") then { - if (_vehicle isKindOf "Car") then { _part = "ACE_Wheel" }; - if (_vehicle isKindOf "Tank") then { _part = "ACE_Track" }; -}; -// Exit if no appropriate part -if (_part == "") exitWith {}; - // Load ["AddCargoByClass", [_part, _vehicle, _amount]] call EFUNC(common,localEvent); diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index f7c3f60a8a..6027a34fd5 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -25,7 +25,8 @@ private ["_config", "_engineerRequired", "_items", "_return", "_condition", "_ve _config = (ConfigFile >> "ACE_Repair" >> "Actions" >> _className); if !(isClass _config) exitWith {false}; // or go for a default? -if(isEngineOn _target) exitWith {false}; + +// if(isEngineOn _target) exitWith {false}; // Ignore here so action shows, then exit and show warning when selected #3348 _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { getNumber (_config >> "requiredEngineer"); diff --git a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf index 2611d10b38..2ed50c5d0e 100644 --- a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf +++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf @@ -70,6 +70,8 @@ _wheelHitPointSelections = []; _bestIndex = -1; { 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)}; _xPos = _vehicle selectionPosition _x; if (_xPos isEqualTo [0,0,0]) exitWith {}; _xDist = _wheelCenterPos distance _xPos; diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index 25e58151c5..f5b7d8cbfc 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -36,7 +36,14 @@ _engineerRequired = if (isNumber (_config >> "requiredEngineer")) then { 0; }; if !([_caller, _engineerRequired] call FUNC(isEngineer)) exitWith {false}; -if (isEngineOn _target) exitWith {false}; + +if ((isEngineOn _target) && {GVAR(autoShutOffEngineWhenStartingRepair)}) then { + ["engineOn", _target, [_target, false]] call EFUNC(common,objectEvent); +}; +if ((isEngineOn _target) && {!GVAR(autoShutOffEngineWhenStartingRepair)}) exitWith { + ["displayTextStructured", [LSTRING(shutOffEngineWarning), 1.5, _caller]] call EFUNC(common,localEvent); + false +}; //Items can be an array of required items or a string to a ACE_Setting array _items = if (isArray (_config >> "items")) then { diff --git a/addons/repair/functions/fnc_useItem.sqf b/addons/repair/functions/fnc_useItem.sqf index 024ee76c29..4bae3e7918 100644 --- a/addons/repair/functions/fnc_useItem.sqf +++ b/addons/repair/functions/fnc_useItem.sqf @@ -20,8 +20,8 @@ params ["_unit", "_item"]; TRACE_2("params",_unit,_item); if ([_unit, _item] call EFUNC(common,hasItem)) exitWith { - [[_unit, _item], QUOTE(EFUNC(common,useItem)), _unit] call EFUNC(common,execRemoteFnc); /* TODO Replace by event system */ - [true, _unit]; + [QGVAR(useItem), _unit, [_unit, _item]] call EFUNC(common,objectEvent); + [true, _unit]; }; [false, objNull]; diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index 2a73fec0af..f92a370b83 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -46,6 +46,7 @@ Měním kolo... Cambiando rueda... Sto sostituendo la ruota... + Remplacement de la roue... Wheel replaced @@ -56,6 +57,7 @@ Kolo vyměněno Rueda cambiada Ruota sostituita + Roue remplacée Remove Wheel @@ -78,6 +80,7 @@ Odstraňuji kolo... Quitando rueda... Sto rimuovendo la ruota... + Démontage de la roue... Wheel removed @@ -88,6 +91,7 @@ Kolo odstraněno Rueda quitada Ruota rimossa + Roue démontée Change Track @@ -98,6 +102,7 @@ Vyměnit pás Cambiar oruga Cambia cingolo + Changer la chenille Replacing Track... @@ -108,6 +113,7 @@ Měním pás... Cambiando oruga... Sto sostituendo il cingolo... + Remplacement de la chenille... Track replaced @@ -118,6 +124,7 @@ Pás vyměněn Oruga cambiada Cingolo sostituito + Chenille remplacée Remove Track @@ -128,6 +135,7 @@ Odstranit pás Quitar oruga Rimuovi cingolo + Enlever la chenille Removing Track... @@ -138,6 +146,7 @@ Odstraňuji pás... Quitando oruga... Sto rimuovendo il cingolo... + Enlèvement de la chenille... Track removed @@ -148,6 +157,7 @@ Pás odstraněn Oruga quitada Cingolo rimosso + Chenille enlevée Full Repair @@ -158,6 +168,7 @@ Kompletní oprava Reparación completa Riparazione completa + Réparations complètes Repairing Vehicle... @@ -168,6 +179,7 @@ Opravuji vozidlo... Reparando vehículo... Sto riparando il veicolo... + Réparation du véhicule... Full Repair Locations @@ -178,6 +190,7 @@ Oblast pro kompletní opravu Lugares de reparación completa Luoghi Riparazione Completa + Lieu de réparation complète At what locations can a vehicle be fully repaired? @@ -188,6 +201,7 @@ ¿En qué lugares puede un vehículo ser reparado totalmente? V které oblasti může být vozidlo plně opraveno? In quali luoghi è possibile riparare completamente un veicolo? + Où peuvent être réparés complètement les véhicules ? Allow Full Repair @@ -198,6 +212,7 @@ Povolit kompletní opravu Permitir reparación completa Consenti Riparazione Completa + Autoriser les réparations complètes. Who can perform a full repair on a vehicle? @@ -208,6 +223,7 @@ ¿Quién puede realizar una reparación completa de un vehículo? Kdo může provést úplné opravy na vozidle? Chi può eseguire una riparazione completa su un veicolo? + Qui peut faire une réparation complète ? Add Spare Parts @@ -218,6 +234,7 @@ Добавлять запчасти Přidat náhradní díly Aggiungi Parti di Ricambio + Ajouter des pièces de rechange Add spare parts to vehicles (requires Cargo component)? @@ -228,6 +245,7 @@ Добавлять запасные части в технику (требуется модуль Грузоперевозок)? Přidat náhradní díly do vozidla (vyžaduje úložný prostor)? Aggiungi parti di ricambio ai veicoli (richiede componente Cargo)? + Ajouter des pièces de rechage aux véhicules ? (à besoin du système de cargaison) Repair >> @@ -250,6 +268,7 @@ Zobrazit text při opravě Mostrar texto en la reparación Mostra testo mentre ripari + Afficher du texte pendant la réparation Display a notification whenever you repair a vehicle @@ -260,6 +279,7 @@ Mostrar una notificación cada vez que se reparare un vehículo Zobrazit oznámení kdykoliv opravíš vozidlo Mostra una notifica quando stai riparando un veicolo + Afficher une notification lorsque l'on répare un véhicule Repairing... @@ -306,6 +326,7 @@ Kompletně opravená část Parte totalmente reparado Parte riparata completamente + Pièce entièrement réparée Partially repaired %1 @@ -316,6 +337,7 @@ Parcialmente reparada %1 %1 - částečně opraveno %1 parzialmente riparato + %1 pratiquement réparée Fully repaired %1 @@ -326,6 +348,7 @@ %1 - kompletně opraveno Totalmente reparada %1 %1 completamente riparato + %1 entièrement réparée Partially repaired %1 @@ -336,6 +359,7 @@ Parcialmente reparada %1 %1 - částečně opraveno %1 parzialmente riparato + %1 pratiquement réparée Body @@ -381,6 +405,7 @@ Estabilizador horizontal izquierdo Levý horizontální stabilizátor Stabilizzatore Orizzontale Sinistro + Stabilisateur horizontal gauche Linkes Höhenleitwerk @@ -391,6 +416,7 @@ Estabilizador horizontal derecho Pravý horizontální stabilizátor Stabilizzatore Orizzontale Destro + Stabilisateur horizontal droit Rechtes Höhenleitwerk @@ -401,6 +427,7 @@ Estabilizador Vertical Estabilizador vertical Stabilizzatore Verticale + Stabilisateur vertical Seitenleitwerk @@ -424,6 +451,7 @@ Transmissão Transmisión Trasmissione + Instruments Gear @@ -434,6 +462,7 @@ Rueda Podvozek Motore + Trains d'attérissage Starter @@ -444,6 +473,7 @@ Arranque Motor de arranque Motore d'avviamento + Démarreur Tail @@ -454,6 +484,7 @@ Tail Cauda Coda + Queue Pitot Tube @@ -464,6 +495,7 @@ Tubo de Pitot Tubo del pitot Tubo di Pitot + Sonde pitot Static Port @@ -474,6 +506,7 @@ Puerto estático Statický port Porta Statica + Port statique Ammo @@ -484,6 +517,7 @@ Munição Munición Munizioni + Munitions Turret @@ -518,6 +552,7 @@ Rakiety Misiles Missili + Missiles Left Track @@ -684,6 +719,7 @@ Cabrestante Naviják Gancio + Treuil Glass (right) @@ -728,6 +764,7 @@ ERA Reaktivpanzerung ERA + ERA ERA @@ -739,6 +776,7 @@ Ajustes de reparación Nastavení oprav Impostazioni Riparazioni + Réglages de réparation Provides a repair system for all types of vehicles. @@ -749,6 +787,7 @@ Proporciona un sistema de reparación para todo tipo de vehículos. Poskytuje rozsáhlý systém oprav pro všechny typy vozidel. Fornisce un sistema di riparazione per tutti i tipi di veicoli. + Fournit un système de réparation pour tous les types de véhicules. Anyone @@ -759,6 +798,7 @@ Kdokoliv Cualquiera Chiunque + Tout le monde Engineer only @@ -769,6 +809,7 @@ Pouze inženýr Solo ingeniero Solo Geniere + Ingénieurs seulement Repair Specialist only @@ -779,6 +820,7 @@ Pouze specialista na opravování Solo especialista en reparación Solo Specialista Riparazioni + Spécialistes de réparation seulement Allow Wheel @@ -789,6 +831,7 @@ Možnost Výměny Kol Permitir rueda Consenti Ruota + Autoriser les roues Who can remove and replace wheels? @@ -799,6 +842,7 @@ Kdo může odstranit a vyměnit kola? ¿Quién puede quitar y cambiar las ruedas? Chi può rimuovere e sostituire le ruote? + Qui peut enlever et remplacer les roues ? Allow Repair @@ -809,6 +853,7 @@ Možnost Opravování Permitir reparación Consenti Riparazioni + Autoriser les réparations Who can perform repair actions? @@ -819,6 +864,7 @@ Kdo může provádět opravy? ¿Quién puede realizar reparaciones? Chi può eseguire riparazioni? + Qui peut réparer ? Repair Threshold @@ -829,6 +875,7 @@ Umbral de reparación Práh oprav Limite Riparazioni + Seuil de réparation What is the maximum damage that can be repaired with a toolkit? @@ -839,6 +886,7 @@ ¿Cuál es el daño máximo que puede ser reparado con una caja de herramientas? Jaké maximální poškození může být opraveno pomocí opravárenské sady? Qual'è il danno massimo che può essere riparato con il Toolkit? + Quel est le maximum de dommages réparable par une trousse à outils ? Repair Threshold (Engineer) @@ -849,6 +897,7 @@ Umbral de Reparación (Ingeniero) Práh oprav (Inženýr) Limite Riparazioni (Geniere) + Seuil de réparatoin (ingénieur) What is the maximum damage that can be repaired by an engineer? @@ -859,6 +908,7 @@ ¿Cuál es el daño máximo que puede ser reparado por un ingeniero? Jaké maximální poškození může být opraveno pomoci inženýra? Qual'è il danno massimo che può essere riparato da un Geniere? + Quel est le maximum de dommages qui peuvent être réparés par un ingénieur ? Remove toolkit on use @@ -869,6 +919,7 @@ Eliminar conjunto de herramientas al usarlo Odstranit sadu nástrojů po použití Rimuovi Toolkit dopo l'uso + Enlever la trousse à outils après usage Should the toolkit be removed on usage? @@ -879,6 +930,7 @@ ¿Deben retirarse las herramientas al usarlas? Má být odstraněna sada nástroju po použití? Il Toolkit dev'essere rimosso dopo l'uso? + La trousse à outils devrait-elle être enlevée après usage ? Anywhere @@ -889,6 +941,7 @@ Kdekoliv En cualquier sitio Ovunque + N'importe où Repair Vehicle only @@ -899,6 +952,7 @@ Reparar solo en vehículo Pouze opravárenské vozidlo Solo Veicoli Riparazioni + Véhicule de réparation seulement Repair Facility only @@ -909,6 +963,7 @@ Reparar solo en instalación Pouze opravárenské zařízení Solo Strutture Riparazioni + Installation de réparation seulement Repair Facility or Vehicle @@ -919,6 +974,7 @@ Reparar en instalación o vehículo Opravárenské zařízení nebo vozidlo Strutture Riparazioni o Veicoli + Installations ou véhicule de réparation Assign Engineer @@ -929,6 +985,7 @@ Přiřadit Inženýra Asignar ingeniero Assegna Geniere + Assigner le rôle d'ingénieur List @@ -939,6 +996,7 @@ Seznam Lista Lista + Liste List of unit names that will be classified as engineer, separated by commas. @@ -949,6 +1007,7 @@ Lista de los nombres de las unidades que serán clasificados como ingeniero, separados por comas. Seznam jmen jednotek, které budou klasifikovány jako inženýr, oddělit čárkami. Lista di unità che verranno classificate come genieri, separate da virgole. + Liste des noms d'unités qui seront considérées ingénieurs. Séparé par des virgules Is Engineer @@ -959,6 +1018,7 @@ Es un ingeniero Inženýr E' Geniere + Est ingénieur Select the engineering skill level of the unit @@ -969,6 +1029,7 @@ Selecciona el nivel de conocimientos de ingeniería de la unidad Vyberte úroveň dovednosti inženýra pro jednotku Seleziona il livello di abilità geniere dell'unità + Sélectionner le niveau d'habilité en réparation de l'unité None @@ -979,6 +1040,7 @@ Nikdo Ningún Nessuna + Aucun Engineer @@ -989,6 +1051,7 @@ Inženýr Ingeniero Geniere + Ingénieur Specialist @@ -999,6 +1062,7 @@ Specialista Especialista Specialista Riparazioni + Spécialiste Assign one or multiple units as an engineer @@ -1009,6 +1073,7 @@ Asignar una o varias unidades como ingeniero Přiřaďte jednu nebo více osob jako inženýra Assegna una o più unità come genieri + Assigner un ou plusieurs unités comme ingénieur Assign Repair Vehicle @@ -1019,6 +1084,7 @@ Asignar vehículo de reparación Přiřaďte opraváresnké vozidlo Assegna Veicolo Riparazioni + Assigner en tant que véhicule de réparation List @@ -1029,6 +1095,7 @@ Seznam Lista Lista + Liste List of vehicles that will be classified as repair vehicle, separated by commas. @@ -1039,6 +1106,7 @@ Lista de los vehículos que se clasifican como vehículo de reparación, separados por comas. Seznam vozidel, která budou klasifikována jako opravárenská, oddělit čárkami. Lista di Veicoli che verranno considerati veicoli riparazioni, separati da virgole. + Liste de véhicules qui seront considérés comme véhicules de réparation. Séparé par des virgules. Is Repair Vehicle @@ -1049,6 +1117,7 @@ Es un vehículo de reparación Opravárenské vozidlo E' Veicolo Riparazioni + Est un véhicule de réparation Is the vehicle classified as a repair vehicle? @@ -1059,6 +1128,7 @@ ¿Está el vehículo clasificado como un vehículo de reparación? Je vozidlo klasifikováno jako opravárenské? Il veicolo è classificato dome veicolo riparazioni? + Le véhicule est-il considéré comme un véhicule de réparation ? Assign one or multiple vehicles as a repair vehicle @@ -1069,6 +1139,7 @@ Asignar uno o varios vehículos como vehículo de reparación Přiřaďte jedno nebo více vozidel jako opravárenské vozidlo Assegna uno o più veicoli come veicoli riparazioni + Assigner un ou plusieurs véhicules en tant que véhicule de réparation Assign Repair Facility @@ -1079,6 +1150,7 @@ Asignar instalación de reparación Přiřaďte opravárenské zařízení Assegna Struttura Riparazioni + Assigner en tant qu'installation de réparation List @@ -1089,6 +1161,7 @@ Seznam Lista Lista + Liste List of objects that will be classified as repair Facility, separated by commas. @@ -1099,6 +1172,7 @@ Lista de los objetos que se clasifican como instalaciones para la reparación, separados por comas. Seznam objektů, které budou klasifikovány jako opravárenské zařízení, oddělit čárkami. Lista di oggetti che verranno classificati come strutture riparazioni, separate da virgole. + Liste des objets considérés comme installations de réparation. Séparé par des virgules Is Repair Facility @@ -1109,6 +1183,7 @@ Es una instalación de reparación Opravárenské zařízení E' Struttura Riparazioni + Est une installation de réparation Is the object classified as a repair Facility? @@ -1119,6 +1194,7 @@ ¿Está el objeto clasificado como una instalación de reparación? Je objekt klasifikován jako opravárenské zařízení? L'oggetto è classificato come struttura riparazioni? + L'objet est-il considéré comme une installation de réparation ? Assign one or multiple objects as a repair Facility @@ -1129,6 +1205,7 @@ Asignar uno o varios objetos como una instalación de reparación Přiřaďte jeden nebo více objektů jako opravárenské zařízení Assegna uno o più oggetti come strutture riparazioni + Assigner un ou plusieurs objets en tant que véhicule de réparation Add Spare Parts @@ -1139,6 +1216,7 @@ Добавить запчасти Přidat náhradní díly Aggiungi Parti di Ricambio + Ajouter des pièces de rechange Add spare parts to one or multiple objects @@ -1149,6 +1227,7 @@ Добавить запасные части в одно или несколько транспортных средств Přidat náhradní díly do jednoho nebo více objektů Aggiungi parti di ricambio ad uno o più oggetti + Ajouter des pièces de rechange à un ou plusieurs objets List @@ -1159,6 +1238,7 @@ Список Seznam Lista + Liste List of objects that will get spare parts added, separated by commas. @@ -1169,6 +1249,7 @@ Список транспортных средств, в которые будут добавляться запчасти, разделенный запятыми. Seznam objektů, které dostanou náhradní díly, oddělit čárkami. Lista di oggetti a cui verranno aggiunte parti di ricambio, separate da virgole. + Liste des objets qui recevront des pièces de réparation en plus. Séparé par des virgules Part @@ -1179,6 +1260,7 @@ Запчасть Díl Parte + Pièce Spare part. @@ -1189,6 +1271,7 @@ Запасная часть. Náhradní díl. Parte di ricambio. + Pièce de rechange Amount @@ -1199,6 +1282,7 @@ Количество Množství Quantità + Quantité Number of selected spare parts. @@ -1209,6 +1293,7 @@ Число выбранных запасных частей. Počet vybraných náhradních dílů. Numero di parti di ricambio selezionate. + Nombre de pièces de rechange séléctionnées Wheel repair requirements @@ -1219,6 +1304,7 @@ Requerimentos para reparo de rodas Vyžaduje opravu kol Requisiti riparazione ruote + Exigences de réparation de roue Items required to remove/replace wheels @@ -1229,6 +1315,13 @@ Itens requeridos para remover/trocar rodas Položka vyžaduje odstraněná/vyměněná kola Oggetti richiesti per riparare/rimuovere ruote + Items exigés pour enlever/remplacer les roues + + + Engine must be off to repair + Motor muss ausgeschaltet zu reparieren sein + El motor necesita desactivado para la reparación + Pro opravu je zapotřebí vypnout motor \ No newline at end of file diff --git a/addons/respawn/ACE_Settings.hpp b/addons/respawn/ACE_Settings.hpp index f704d25412..7f0c4f9d96 100644 --- a/addons/respawn/ACE_Settings.hpp +++ b/addons/respawn/ACE_Settings.hpp @@ -1,14 +1,18 @@ class ACE_Settings { - class GVAR(SavePreDeathGear) { + class GVAR(savePreDeathGear) { + displayName = CSTRING(SavePreDeathGear_DisplayName); + description = CSTRING(SavePreDeathGear_Description); value = 0; typeName = "BOOL"; }; - class GVAR(RemoveDeadBodiesDisconnected) { + class GVAR(removeDeadBodiesDisconnected) { + displayName = CSTRING(RemoveDeadBodiesDisconnected_DisplayName); + description = CSTRING(RemoveDeadBodiesDisconnected_Description); value = 1; typeName = "BOOL"; }; - class GVAR(BodyRemoveTimer) { + class GVAR(bodyRemoveTimer) { value = 0; typeName = "SCALAR"; }; diff --git a/addons/respawn/CfgEventHandlers.hpp b/addons/respawn/CfgEventHandlers.hpp index 69d602300e..481d36cf30 100644 --- a/addons/respawn/CfgEventHandlers.hpp +++ b/addons/respawn/CfgEventHandlers.hpp @@ -14,6 +14,7 @@ class Extended_PreInit_EventHandlers { class Extended_PostInit_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_postInit)); + serverInit = QUOTE(call COMPILE_FILE(XEH_serverPostInit)); }; }; @@ -36,37 +37,37 @@ class Extended_Respawn_EventHandlers { class Extended_Init_EventHandlers { class ACE_Rallypoint_West { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; [ARR_3(_this select 0,'',west)] call FUNC(initRallypoint)); + init = QUOTE([ARR_3(_this select 0,'',west)] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_East { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; [ARR_3(_this select 0,'',east)] call FUNC(initRallypoint)); + init = QUOTE([ARR_3(_this select 0,'',east)] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_Independent { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; [ARR_3(_this select 0,'',independent)] call FUNC(initRallypoint)); + init = QUOTE([ARR_3(_this select 0,'',independent)] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_West_Base { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_nato_CO.paa'; [ARR_3(_this select 0,'respawn_west',west)] call FUNC(initRallypoint)); + init = QUOTE([ARR_3(_this select 0,'respawn_west',west)] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_East_Base { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_CSAT_CO.paa'; [ARR_3(_this select 0,'respawn_east',east)] call FUNC(initRallypoint)); + init = QUOTE([ARR_3(_this select 0,'respawn_east',east)] call FUNC(initRallypoint)); }; }; class ACE_Rallypoint_Independent_Base { class ADDON { - init = QUOTE((_this select 0) setFlagTexture '\A3\Data_F\Flags\Flag_AAF_CO.paa'; [ARR_3(_this select 0,'respawn_guerrila',independent)] call FUNC(initRallypoint)); //respawn_civilian + init = QUOTE([ARR_3(_this select 0,'respawn_guerrila',independent)] call FUNC(initRallypoint)); //respawn_civilian }; }; }; diff --git a/addons/respawn/CfgVehicles.hpp b/addons/respawn/CfgVehicles.hpp index 8fdfb5f0fc..103fab0537 100644 --- a/addons/respawn/CfgVehicles.hpp +++ b/addons/respawn/CfgVehicles.hpp @@ -1,4 +1,6 @@ +class CBA_Extended_EventHandlers; + class CfgVehicles { class ACE_Module; class ACE_ModuleRespawn: ACE_Module { @@ -8,7 +10,7 @@ class CfgVehicles { function = QFUNC(module); scope = 2; isGlobal = 0; - icon = QUOTE(PATHTOF(UI\Icon_Module_Respawn_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Respawn_ca.paa); class Arguments { class SavePreDeathGear { @@ -38,7 +40,7 @@ class CfgVehicles { function = QFUNC(moduleFriendlyFire); scope = 2; isGlobal = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_FriendlyFire_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_FriendlyFire_ca.paa); class Arguments {}; class ModuleDescription { @@ -53,7 +55,7 @@ class CfgVehicles { function = QFUNC(moduleRallypoint); scope = 2; isGlobal = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_Rallypoint_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Rallypoint_ca.paa); class Arguments {}; class ModuleDescription { @@ -78,20 +80,25 @@ class CfgVehicles { // rallypoints class FlagCarrier; class Flag_NATO_F: FlagCarrier { + class EventHandlers; class ACE_Actions; }; class Flag_CSAT_F: FlagCarrier { + class EventHandlers; class ACE_Actions; }; class Flag_AAF_F: FlagCarrier { + class EventHandlers; class ACE_Actions; }; // static class ACE_Rallypoint_West_Base: Flag_NATO_F { - XEH_ENABLED; + class EventHandlers: EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; author = ECSTRING(common,ACETeam); displayName = CSTRING(RallypointWestBase); @@ -111,7 +118,9 @@ class CfgVehicles { }; class ACE_Rallypoint_East_Base: Flag_CSAT_F { - XEH_ENABLED; + class EventHandlers: EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; author = ECSTRING(common,ACETeam); displayName = CSTRING(RallypointEastBase); @@ -131,7 +140,9 @@ class CfgVehicles { }; class ACE_Rallypoint_Independent_Base: Flag_AAF_F { - XEH_ENABLED; + class EventHandlers: EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; author = ECSTRING(common,ACETeam); displayName = CSTRING(RallypointIndependentBase); @@ -152,7 +163,9 @@ class CfgVehicles { // moveable class ACE_Rallypoint_West: Flag_NATO_F { - XEH_ENABLED; + class EventHandlers: EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; author = ECSTRING(common,ACETeam); displayName = CSTRING(RallypointWest); @@ -172,7 +185,9 @@ class CfgVehicles { }; class ACE_Rallypoint_East: Flag_CSAT_F { - XEH_ENABLED; + class EventHandlers: EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; author = ECSTRING(common,ACETeam); displayName = CSTRING(RallypointEast); @@ -192,7 +207,9 @@ class CfgVehicles { }; class ACE_Rallypoint_Independent: Flag_AAF_F { - XEH_ENABLED; + class EventHandlers: EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; author = ECSTRING(common,ACETeam); displayName = CSTRING(RallypointIndependent); diff --git a/addons/respawn/XEH_postInit.sqf b/addons/respawn/XEH_postInit.sqf index 22be7b86ac..dc112b388e 100644 --- a/addons/respawn/XEH_postInit.sqf +++ b/addons/respawn/XEH_postInit.sqf @@ -3,3 +3,5 @@ ["rallypointMoved", {_this call FUNC(updateRallypoint)}] call EFUNC(common,addEventhandler); ["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); // hide enemy rallypoint markers + +[QGVAR(showFriendlyFireMessageEvent), DFUNC(showFriendlyFireMessage)] call EFUNC(common,addEventHandler); diff --git a/addons/respawn/XEH_serverPostInit.sqf b/addons/respawn/XEH_serverPostInit.sqf new file mode 100644 index 0000000000..8ff14e209a --- /dev/null +++ b/addons/respawn/XEH_serverPostInit.sqf @@ -0,0 +1,17 @@ +#include "script_component.hpp" + +["SettingsInitialized", { + if (GVAR(RemoveDeadBodiesDisconnected)) then { + addMissionEventHandler ["HandleDisconnect", { + [{ + params ["_unit"]; + + if (!alive _unit) then { + deleteVehicle _unit; + }; + }, + _this, 4] call CBA_fnc_waitAndExecute; + false + }]; + }; +}] call EFUNC(common,addEventHandler); diff --git a/addons/respawn/config.cpp b/addons/respawn/config.cpp index 4a23d1f650..5305232543 100644 --- a/addons/respawn/config.cpp +++ b/addons/respawn/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_Rallypoint_West", "ACE_Rallypoint_East", "ACE_Rallypoint_Independent", "ACE_Rallypoint_West_Base", "ACE_Rallypoint_East_Base", "ACE_Rallypoint_Independent_Base"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "ace_common" }; - author[] = { "bux578", "commy2" }; - authorUrl = "https://github.com/bux578/"; + author = ECSTRING(common,ACETeam); + authors[] = { "bux578", "commy2" }; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/respawn/functions/fnc_handleKilled.sqf b/addons/respawn/functions/fnc_handleKilled.sqf index cd1ad33491..aa53c6741a 100644 --- a/addons/respawn/functions/fnc_handleKilled.sqf +++ b/addons/respawn/functions/fnc_handleKilled.sqf @@ -19,15 +19,11 @@ params ["_unit"]; // Saves the gear when the player! (and only him) is killed -if (ACE_player == _unit) then { - GVAR(unitGear) = []; - - if (GVAR(SavePreDeathGear)) then { - GVAR(unitGear) = [_unit] call EFUNC(common,getAllGear); - GVAR(unitGear) append [currentWeapon _unit, currentMuzzle _unit, currentWeaponMode _unit]; - }; +if (ACE_player == _unit && {GVAR(SavePreDeathGear)}) then { + _unit setVariable [QGVAR(unitGear), getUnitLoadout _unit]; + _unit setVariable [QGVAR(activeWeaponAndMuzzle), [currentWeapon _unit, currentMuzzle _unit, currentWeaponMode _unit]]; }; if (missionNamespace getVariable [QGVAR(showFriendlyFireMessage), false]) then { - [_this, QUOTE(DFUNC(showFriendlyFireMessage)), 2] call EFUNC(common,execRemoteFnc); + [QGVAR(showFriendlyFireMessageEvent), _this] call EFUNC(common,objectEvent); }; diff --git a/addons/respawn/functions/fnc_handleRespawn.sqf b/addons/respawn/functions/fnc_handleRespawn.sqf index ab5ecedbda..3b1ae1c86f 100644 --- a/addons/respawn/functions/fnc_handleRespawn.sqf +++ b/addons/respawn/functions/fnc_handleRespawn.sqf @@ -20,7 +20,11 @@ params ["_unit"]; // Restores the gear when the player respawns if (GVAR(SavePreDeathGear)) then { - [_unit, GVAR(unitGear)] call FUNC(restoreGear); + [ + _unit, + _unit getVariable QGVAR(unitGear), + _unit getVariable QGVAR(activeWeaponAndMuzzle) + ] call FUNC(restoreGear); }; // fix for setVariable public being lost on respawn for machines that JIP after the command was broadcasted diff --git a/addons/respawn/functions/fnc_initRallypoint.sqf b/addons/respawn/functions/fnc_initRallypoint.sqf index dba1ae5d0a..ce4e9c9d79 100644 --- a/addons/respawn/functions/fnc_initRallypoint.sqf +++ b/addons/respawn/functions/fnc_initRallypoint.sqf @@ -19,49 +19,46 @@ params ["_rallypoint", "_respawnMarker", "_side"]; -private "_name"; -_name = typeOf _rallypoint; +private _name = typeOf _rallypoint; + +if (isNil _name) then { + missionNamespace setVariable [_name, _rallypoint]; + + _rallypoint setVariable [QGVAR(side), _side]; + + if (isServer) then { + if (_respawnMarker != "" && {!(_respawnMarker in allMapMarkers)}) then { + createMarker [_respawnMarker, _rallypoint]; + }; + + ["rallypointMoved", [_rallypoint, _side]] call EFUNC(common,globalEvent); + }; +} else { + deleteVehicle _rallypoint; + ACE_LOGERROR("Multiple Rallypoints of same type."); +}; // init visible marker if (hasInterface) then { [{ params ["_rallypoint", "_respawnMarker", "_side", "_name"]; - private ["_marker", "_type", "_date"]; - - _marker = format ["ACE_Marker_%1", _name]; + private _marker = format ["ACE_Marker_%1", _name]; // exit if marker already exist if (_marker in allMapMarkers) exitWith {}; _marker = createMarkerLocal [_marker, getPosASL _rallypoint]; - _type = ["selector_selectedFriendly", "selector_selectedEnemy"] select (_respawnMarker == ""); + + private _type = ["selector_selectedFriendly", "selector_selectedEnemy"] select (_respawnMarker == ""); _marker setMarkerTypeLocal _type; _marker setMarkerAlphaLocal ([0,1] select (_side == playerSide)); // playerSide to guarantee init - _date = _rallypoint getVariable [QGVAR(markerDate), ""]; + private _date = _rallypoint getVariable [QGVAR(markerDate), ""]; _marker setMarkerTextLocal _date; _rallypoint setVariable [QGVAR(marker), _marker]; - }, [_rallypoint, _respawnMarker, _side, _name], 0.1] call EFUNC(common,waitAndExecute); -}; - -if (!isServer) exitWith {}; - -if (isNil _name) then { - missionNamespace setVariable [_name, _rallypoint]; - publicVariable _name; - - _rallypoint setVariable [QGVAR(side), _side, true]; - - if (_respawnMarker != "" && {!(_respawnMarker in allMapMarkers)}) then { - createMarker [_respawnMarker, _rallypoint]; - }; - - ["rallypointMoved", [_rallypoint, _side]] call EFUNC(common,globalEvent); -} else { - deleteVehicle _rallypoint; - ACE_LOGERROR("Multiple Rallypoints of same type."); + }, [_rallypoint, _respawnMarker, _side, _name], 0.1] call CBA_fnc_waitAndExecute; }; diff --git a/addons/respawn/functions/fnc_module.sqf b/addons/respawn/functions/fnc_module.sqf index ea6ba555d5..bc4f197c07 100644 --- a/addons/respawn/functions/fnc_module.sqf +++ b/addons/respawn/functions/fnc_module.sqf @@ -19,25 +19,9 @@ params ["_logic", "_units", "_activated"]; -if !(_activated) exitWith {}; +if (!_activated) exitWith {}; -GVAR(Module) = true; - -[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(SavePreDeathGear), "SavePreDeathGear"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(RemoveDeadBodiesDisconnected), "RemoveDeadBodiesDisconnected"] call EFUNC(common,readSettingFromModule); -if (isServer && {GVAR(RemoveDeadBodiesDisconnected)}) then { - addMissionEventHandler ["HandleDisconnect", { - [{ - params ["_unit"]; - - if (!alive _unit) then { - deleteVehicle _unit; - }; - }, - _this, 4] call EFUNC(common,waitAndExecute); - false - }]; -}; - ACE_LOGINFO("Respawn Module Initialized."); diff --git a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf index f5b982f0ea..3c3c02b3c9 100644 --- a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf +++ b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf @@ -27,7 +27,7 @@ if (isServer) then { missionNamespace setVariable [QGVAR(showFriendlyFireMessage), true]; publicVariable QGVAR(showFriendlyFireMessage); }, - [], 0.1] call EFUNC(common,waitAndExecute); + [], 0.1] call CBA_fnc_waitAndExecute; }; ACE_LOGINFO("Friendly Fire Messages Module Initialized."); diff --git a/addons/respawn/functions/fnc_moveRallypoint.sqf b/addons/respawn/functions/fnc_moveRallypoint.sqf index fa8aae40a5..f004a1e844 100644 --- a/addons/respawn/functions/fnc_moveRallypoint.sqf +++ b/addons/respawn/functions/fnc_moveRallypoint.sqf @@ -51,4 +51,4 @@ _position set [2, 0]; ["rallypointMoved", [_rallypoint, _side, _position]] call EFUNC(common,globalEvent); [localize LSTRING(Deployed)] call EFUNC(common,displayTextStructured); -}, [_rallypoint, _unit, _position], 5] call EFUNC(common,waitAndExecute); +}, [_rallypoint, _unit, _position], 5] call CBA_fnc_waitAndExecute; diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf index af3acb7fb4..a035bdd52d 100644 --- a/addons/respawn/functions/fnc_restoreGear.sqf +++ b/addons/respawn/functions/fnc_restoreGear.sqf @@ -19,30 +19,35 @@ params ["_unit", "_allGear", "_activeWeaponAndMuzzle"]; // restore all gear -[_unit, _allGear, true, true] call EFUNC(common,setAllGear); +if (!isNil "_allGear") then { + _unit setUnitLoadout _allGear; +}; // restore the last active weapon, muzzle and weaponMode -_activeWeaponAndMuzzle params ["_activeWeapon", "_activeMuzzle", "_activeWeaponMode"]; +if (!isNil "_activeWeaponAndMuzzle") then { + // @todo, replace this with CBA_fnc_selectWeapon after next CBA update + _activeWeaponAndMuzzle params ["_activeWeapon", "_activeMuzzle", "_activeWeaponMode"]; -if ( - (_activeMuzzle != "") && - {_activeMuzzle != _activeWeapon} && - {_activeMuzzle in getArray (configFile >> "CfgWeapons" >> _activeWeapon >> "muzzles")} -) then { - _unit selectWeapon _activeMuzzle; -} else { - if (_activeWeapon != "") then { - _unit selectWeapon _activeWeapon; - }; -}; - -if (currentWeapon _unit != "") then { - private _index = 0; - - while { - _index < 100 && {currentWeaponMode _unit != _activeWeaponMode} - } do { - _unit action ["SwitchWeapon", _unit, _unit, _index]; - _index = _index + 1; + if ( + (_activeMuzzle != "") && + {_activeMuzzle != _activeWeapon} && + {_activeMuzzle in getArray (configFile >> "CfgWeapons" >> _activeWeapon >> "muzzles")} + ) then { + _unit selectWeapon _activeMuzzle; + } else { + if (_activeWeapon != "") then { + _unit selectWeapon _activeWeapon; + }; + }; + + if (currentWeapon _unit != "") then { + private _index = 0; + + while { + _index < 100 && {currentWeaponMode _unit != _activeWeaponMode} + } do { + _unit action ["SwitchWeapon", _unit, _unit, _index]; + _index = _index + 1; + }; }; }; diff --git a/addons/respawn/functions/fnc_teleportToRallypoint.sqf b/addons/respawn/functions/fnc_teleportToRallypoint.sqf index 88bd0d6d52..8e766ce0e3 100644 --- a/addons/respawn/functions/fnc_teleportToRallypoint.sqf +++ b/addons/respawn/functions/fnc_teleportToRallypoint.sqf @@ -22,7 +22,7 @@ params ["_unit", "_side", "_rallypoint"]; private "_toBase"; _toBase = _rallypoint find "_Base" != -1; -_rallypoint = missionNamespace getVariable [_rallypoint, objNull], +_rallypoint = missionNamespace getVariable [_rallypoint, objNull]; if (isNull _rallypoint) exitWith {}; diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 060f8113a0..e0d04aabfa 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -260,6 +260,7 @@ Этот модуль позволяет вам указать место сбора, куда вы можете быстро телепортироваться с "базы". Требуется наличие соответствующих объектов на карте - базы и флага. Они могут быть найдены в категории Пусто -> ACE Возрождения. Questo modulo ti consente di usare Punti di Raccolta in missione, a cui ti puoi teleportare rapidamente dalla bandiera in base. Richiede il piazzamento di oggetti speciali in mappa - base e bandiera. Entrambi disponibili nella categoria Vuoto -> Respawn ACE 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 les "rally points" auxquels vous pouvez vous téléporter rapidement depuis un drapeau à la base. Il nécessite le placement d'objets spéciaux sur la carte - base et drapeau, disponibles dans la catégorie Vide -> ACE Respawn. Move Rallypoint diff --git a/addons/safemode/XEH_postInit.sqf b/addons/safemode/XEH_postInit.sqf index d9be666426..42f9dc3dd5 100644 --- a/addons/safemode/XEH_postInit.sqf +++ b/addons/safemode/XEH_postInit.sqf @@ -11,9 +11,9 @@ if (!hasInterface) exitWith {}; ["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode), { // Conditions: canInteract - if !([ACE_player, objNull, ["isNotEscorting"]] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotEscorting", "isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !([ACE_player] call CBA_fnc_canUseWeapon && {currentWeapon ACE_player != binocular ACE_player}) exitWith {false}; + if !([ACE_player] call CBA_fnc_canUseWeapon && {currentWeapon ACE_player != binocular ACE_player} && {currentWeapon ACE_player != ""}) exitWith {false}; // Statement [ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety); diff --git a/addons/safemode/config.cpp b/addons/safemode/config.cpp index 8371e7f35f..05510a53a5 100644 --- a/addons/safemode/config.cpp +++ b/addons/safemode/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/safemode/stringtable.xml b/addons/safemode/stringtable.xml index a6847c17c8..9717ba4dae 100644 --- a/addons/safemode/stringtable.xml +++ b/addons/safemode/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/sandbag/CfgEventHandlers.hpp b/addons/sandbag/CfgEventHandlers.hpp index 54701ffb3e..32d4ac80f4 100644 --- a/addons/sandbag/CfgEventHandlers.hpp +++ b/addons/sandbag/CfgEventHandlers.hpp @@ -32,3 +32,9 @@ class Extended_Killed_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/sandbag/CfgVehicles.hpp b/addons/sandbag/CfgVehicles.hpp index 494ff355e7..df18b42c06 100644 --- a/addons/sandbag/CfgVehicles.hpp +++ b/addons/sandbag/CfgVehicles.hpp @@ -1,4 +1,6 @@ +class CBA_Extended_EventHandlers; + class CfgVehicles { class Man; class CAManBase: Man { @@ -7,11 +9,11 @@ class CfgVehicles { displayName = CSTRING(DeploySandbag); condition = QUOTE(_this call FUNC(canDeploy)); //wait a frame to handle "Do When releasing action menu key" option - statement = QUOTE([ARR_2({_this call FUNC(deploy)},_this)] call EFUNC(common,execNextFrame)); + statement = QUOTE([ARR_2({_this call FUNC(deploy)},_this)] call CBA_fnc_execNextFrame); exceptions[] = {"isNotSwimming"}; showDisabled = 0; priority = 4; - icon = PATHTOF(UI\icon_sandbag_ca.paa); + icon = QPATHTOF(UI\icon_sandbag_ca.paa); }; }; }; @@ -44,18 +46,21 @@ class CfgVehicles { class ThingX; class ACE_SandbagObject: ThingX { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + author = ECSTRING(common,ACETeam); - XEH_ENABLED; scope = 2; - side = -1; - model = PATHTOF(data\ace_sandbag_build.p3d); + side = 3; + model = QPATHTOF(data\ace_sandbag_build.p3d); displayName = CSTRING(sandbag_displayName); vehicleClass = "ACE_Logistics_Items"; typicalCargo[] = {}; armor = 12000; // Withstand 200 5.56 bullets before sandbag hull is cheese mapSize = 0.4; nameSound = "Bunker"; - icon = PATHTOF(UI\icon_sandbag_ca.paa); + icon = QPATHTOF(UI\icon_sandbag_ca.paa); accuracy = 1000; destrType = "DestructDefault"; @@ -85,7 +90,7 @@ class CfgVehicles { showDisabled = 0; exceptions[] = {}; priority = 5; - icon = PATHTOF(UI\icon_sandbag_ca.paa); + icon = QPATHTOF(UI\icon_sandbag_ca.paa); }; }; }; @@ -93,7 +98,7 @@ class CfgVehicles { class ACE_SandbagObject_NoGeo: ACE_SandbagObject { scope = 1; - model = PATHTOF(data\ace_sandbag_nogeo.p3d); + model = QPATHTOF(data\ace_sandbag_nogeo.p3d); }; class Box_NATO_Support_F; diff --git a/addons/sandbag/CfgWeapons.hpp b/addons/sandbag/CfgWeapons.hpp index 1a26fc78d4..ce23c0924c 100644 --- a/addons/sandbag/CfgWeapons.hpp +++ b/addons/sandbag/CfgWeapons.hpp @@ -7,10 +7,10 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); scope = 2; displayName = CSTRING(sandbagEmpty_displayName); - model = PATHTOF(data\ace_sandbag_m.p3d); - picture = PATHTOF(data\m_sandbag_ca.paa); - - class ItemInfo: InventoryItem_Base_F { + model = QPATHTOF(data\ace_sandbag_m.p3d); + picture = QPATHTOF(data\m_sandbag_ca.paa); + + class ItemInfo: InventoryItem_Base_F { mass = 8; }; }; @@ -19,10 +19,10 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); scope = 2; displayName = CSTRING(sandbag_displayName); - model = PATHTOF(data\ace_sandbag_build.p3d); - picture = PATHTOF(data\m_sandbag_ca.paa); - - class ItemInfo: InventoryItem_Base_F { + model = QPATHTOF(data\ace_sandbag_build.p3d); + picture = QPATHTOF(data\m_sandbag_ca.paa); + + class ItemInfo: InventoryItem_Base_F { mass = 160; }; }; diff --git a/addons/sandbag/XEH_missionDisplayLoad.sqf b/addons/sandbag/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..cb85ffb9fb --- /dev/null +++ b/addons/sandbag/XEH_missionDisplayLoad.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; +_display displayAddEventHandler ["MouseButtonDown", {[ACE_player, _this select 1] call FUNC(deployCancel)}]; diff --git a/addons/sandbag/XEH_postInit.sqf b/addons/sandbag/XEH_postInit.sqf index c3f99c2a9b..d6e4c0aadc 100644 --- a/addons/sandbag/XEH_postInit.sqf +++ b/addons/sandbag/XEH_postInit.sqf @@ -11,8 +11,6 @@ GVAR(sandBag) = objNull; GVAR(deployPFH) = -1; GVAR(deployDirection) = 0; -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - // Cancel deploy sandbag if interact menu opened ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); diff --git a/addons/sandbag/config.cpp b/addons/sandbag/config.cpp index 6b7ce1a456..18f09c3970 100644 --- a/addons/sandbag/config.cpp +++ b/addons/sandbag/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_Sandbag", "ACE_Sandbag_empty"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"Rocko", "Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Rocko", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/sandbag/functions/fnc_deploy.sqf b/addons/sandbag/functions/fnc_deploy.sqf index 1a539929ff..735a736bbb 100644 --- a/addons/sandbag/functions/fnc_deploy.sqf +++ b/addons/sandbag/functions/fnc_deploy.sqf @@ -52,10 +52,4 @@ _unit setVariable [QGVAR(Deploy), [ {[_this select 0] call FUNC(deployConfirm)} ] call EFUNC(common,addActionEventHandler)]; -_unit setVariable [QGVAR(Cancel), [ - _unit, "zoomtemp", - {GVAR(deployPFH) != -1}, - {[_this select 0] call FUNC(deployCancel)} -] call EFUNC(common,addActionEventHandler)]; - _unit setVariable [QGVAR(isDeploying), true, true]; diff --git a/addons/sandbag/functions/fnc_deployCancel.sqf b/addons/sandbag/functions/fnc_deployCancel.sqf index bb9d691fa9..6cb38e4f73 100644 --- a/addons/sandbag/functions/fnc_deployCancel.sqf +++ b/addons/sandbag/functions/fnc_deployCancel.sqf @@ -3,7 +3,8 @@ * Cancels sandbag deployment * * Arguments: - * 0: unit + * 0: Unit + * 1: Key * * Return Value: * None @@ -15,7 +16,9 @@ */ #include "script_component.hpp" -params ["_unit"]; +params ["_unit", "_key"]; + +if (_key != 1 || {GVAR(deployPFH) == -1}) exitWith {}; // enable running again [_unit, "forceWalk", "ACE_Sandbag", false] call EFUNC(common,statusEffect_set); diff --git a/addons/sandbag/functions/fnc_deployConfirm.sqf b/addons/sandbag/functions/fnc_deployConfirm.sqf index 8c789fd124..c37e0ed0d9 100644 --- a/addons/sandbag/functions/fnc_deployConfirm.sqf +++ b/addons/sandbag/functions/fnc_deployConfirm.sqf @@ -41,7 +41,7 @@ _unit removeItem "ACE_Sandbag_empty"; _sandBag setDir _direction; GVAR(sandBag) = objNull; -}, [_unit], 1] call EFUNC(common,waitAndExecute); +}, [_unit], 1] call CBA_fnc_waitAndExecute; // remove deployment pfh [GVAR(deployPFH)] call CBA_fnc_removePerFrameHandler; @@ -51,7 +51,6 @@ GVAR(deployPFH) = -1; call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(common,removeActionEventHandler); -[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler); // play animation _unit playActionNow "PutDown"; diff --git a/addons/sandbag/functions/fnc_handleScrollWheel.sqf b/addons/sandbag/functions/fnc_handleScrollWheel.sqf index 94697d7691..20d403a7a1 100644 --- a/addons/sandbag/functions/fnc_handleScrollWheel.sqf +++ b/addons/sandbag/functions/fnc_handleScrollWheel.sqf @@ -15,9 +15,9 @@ */ #include "script_component.hpp" -params ["_scroll"]; +if (GVAR(deployPFH) == -1) exitWith {false}; -if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(deployPFH) == -1) exitWith { false }; +params ["_scroll"]; GVAR(deployDirection) = GVAR(deployDirection) + (_scroll * 5); diff --git a/addons/sandbag/functions/fnc_pickup.sqf b/addons/sandbag/functions/fnc_pickup.sqf index 7e04d047fd..fd4560fdec 100644 --- a/addons/sandbag/functions/fnc_pickup.sqf +++ b/addons/sandbag/functions/fnc_pickup.sqf @@ -37,4 +37,4 @@ _unit setVariable [QGVAR(isUsingSandbag), true]; } count (_unit nearObjects ["ACE_SandbagObject", 5]); [_unit, "ACE_Sandbag_empty"] call EFUNC(common,addToInventory); -}, [_unit, _sandbag], 1.5] call EFUNC(common,waitAndExecute); +}, [_unit, _sandbag], 1.5] call CBA_fnc_waitAndExecute; diff --git a/addons/sandbag/stringtable.xml b/addons/sandbag/stringtable.xml index 70db715d77..99be2bddf1 100644 --- a/addons/sandbag/stringtable.xml +++ b/addons/sandbag/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -146,16 +146,16 @@ Aqui não tem areia - +Ctrl rotate - +Strg drehen - +Ctrl girar - +Ctrl tourner - +Ctrl rotazione - +Ctrl otočit - +Ctrl forgatás - +Ctrl obrót - +Ctrl rotaciona - +Ctrl Bращать + Rotate + Drehen + Girar + Tourner + Rotazione + Otočit + Forgatás + Obrót + Rotaciona + Bращать - \ No newline at end of file + diff --git a/addons/scopes/CfgSounds.hpp b/addons/scopes/CfgSounds.hpp index 9063c7f730..2da106d79b 100644 --- a/addons/scopes/CfgSounds.hpp +++ b/addons/scopes/CfgSounds.hpp @@ -1,12 +1,12 @@ class CfgSounds { class ACE_Sound_Click; class ACE_Scopes_Click_1: ACE_Sound_Click { - sound[] = {QUOTE(PATHTOF(sounds\ACE_scopes_click.wav)),3, 2, 200}; + sound[] = {QPATHTOF(sounds\ACE_scopes_click.wav),3, 2, 200}; }; class ACE_Scopes_Click_2: ACE_Scopes_Click_1 { - sound[] = {QUOTE(PATHTOF(sounds\ACE_scopes_click.wav)), 3.3, 1.8, 200}; + sound[] = {QPATHTOF(sounds\ACE_scopes_click.wav), 3.3, 1.8, 200}; }; class ACE_Scopes_Click_3: ACE_Scopes_Click_1 { - sound[] = {QUOTE(PATHTOF(sounds\ACE_scopes_click.wav)), 2.8, 2.3, 200}; + sound[] = {QPATHTOF(sounds\ACE_scopes_click.wav), 2.8, 2.3, 200}; }; }; diff --git a/addons/scopes/CfgVehicles.hpp b/addons/scopes/CfgVehicles.hpp index 81756249e1..8a17384933 100644 --- a/addons/scopes/CfgVehicles.hpp +++ b/addons/scopes/CfgVehicles.hpp @@ -10,7 +10,7 @@ class CfgVehicles { statement = QUOTE([ACE_player] call FUNC(adjustZero)); showDisabled = 0; priority = 0.2; - //icon = QUOTE(PATHTOF(UI\...)); // TODO + //icon = QPATHTOF(UI\...); // TODO exceptions[] = {"notOnMap", "isNotInside", "isNotSitting"}; }; }; diff --git a/addons/scopes/CfgWeapons.hpp b/addons/scopes/CfgWeapons.hpp index 442d4c39d0..cd87167f22 100644 --- a/addons/scopes/CfgWeapons.hpp +++ b/addons/scopes/CfgWeapons.hpp @@ -1,16 +1,20 @@ class CfgWeapons { class ItemCore; class InventoryOpticsItem_Base_F; - + class optic_LRPS : ItemCore { - ACE_ScopeAdjust_Vertical[] = { -4, 30 }; - ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Vertical[] = {-4, 30}; + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { class OpticsModes { class Snip { - discreteDistance[] = { 100 }; + opticsZoomMin = 0.011; + opticsZoomMax = 0.045; + opticsZoomInit = 0.045; + discretefov[] = {0.045, 0.011}; + discreteDistance[] = {100}; discreteDistanceInitIndex = 0; }; }; @@ -18,14 +22,14 @@ class CfgWeapons { }; class optic_SOS : ItemCore { - ACE_ScopeAdjust_Vertical[] = { -4, 30 }; - ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Vertical[] = {-4, 30}; + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { class OpticsModes { class Snip { - discreteDistance[] = { 100 }; + discreteDistance[] = {100}; discreteDistanceInitIndex = 0; }; }; @@ -33,59 +37,71 @@ class CfgWeapons { }; class optic_DMS : ItemCore { - ACE_ScopeAdjust_Vertical[] = { -4, 20 }; - ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Vertical[] = {-4, 20}; + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { class OpticsModes { class Snip { - discreteDistance[] = { 100 }; + discreteDistance[] = {100}; discreteDistanceInitIndex = 0; }; }; }; }; - + class optic_AMS_base : ItemCore { - ACE_ScopeAdjust_Vertical[] = { -4, 30 }; - ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Vertical[] = {-4, 30}; + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { class OpticsModes { class AMS { - discreteDistance[] = { 100 }; + opticsZoomMin = 0.0285; + opticsZoomMax = 0.085; + opticsZoomInit = 0.085; + discretefov[] = {0.085, 0.0285}; + discreteDistance[] = {100}; discreteDistanceInitIndex = 0; }; }; }; }; - + class optic_KHS_base : ItemCore { - ACE_ScopeAdjust_Vertical[] = { -4, 30 }; - ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Vertical[] = {-4, 30}; + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { class OpticsModes { class KHS { - discreteDistance[] = { 100 }; + opticsZoomMin = 0.026; + opticsZoomMax = 0.06; + opticsZoomInit = 0.06; + discretefov[] = {0.06, 0.026}; + discreteDistance[] = {100}; discreteDistanceInitIndex = 0; }; }; }; }; - + class optic_KHS_old : ItemCore { - ACE_ScopeAdjust_Vertical[] = { -4, 30 }; - ACE_ScopeAdjust_Horizontal[] = { -6, 6 }; + ACE_ScopeAdjust_Vertical[] = {-4, 30}; + ACE_ScopeAdjust_Horizontal[] = {-6, 6}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { class OpticsModes { class KHS { - discreteDistance[] = { 100 }; + opticsZoomMin = 0.026; + opticsZoomMax = 0.06; + opticsZoomInit = 0.06; + discretefov[] = {0.06, 0.026}; + discreteDistance[] = {100}; discreteDistanceInitIndex = 0; }; }; diff --git a/addons/scopes/RscTitles.hpp b/addons/scopes/RscTitles.hpp index 7aec20458c..1a4bcc99c3 100644 --- a/addons/scopes/RscTitles.hpp +++ b/addons/scopes/RscTitles.hpp @@ -17,7 +17,7 @@ class RscTitles { class ACE_Scopes_Zeroing_BG : RscPicture { idc = 11; type = 0; - text = PATHTOF(UI\scopes_bg.paa); + text = QPATHTOF(UI\scopes_bg.paa); style = 48 + 0x800; scale = 1; sizeEx = 1; diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 8f2adeb0b7..1763bb7a32 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -10,10 +10,7 @@ if (!hasInterface) exitWith {}; // Check inventory when it changes -["playerInventoryChanged", { - [ACE_player] call FUNC(inventoryCheck); -}] call EFUNC(common,addEventhandler); - +["playerInventoryChanged", FUNC(inventoryCheck)] call EFUNC(common,addEventhandler); // Instantly hide knobs when scoping in ["cameraViewChanged", { @@ -36,8 +33,10 @@ if (!hasInterface) exitWith {}; ["ACE3 Scope Adjustment", QGVAR(AdjustUpMinor), localize LSTRING(AdjustUpMinor), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; + [ACE_player] call FUNC(inventoryCheck); // Statement @@ -49,8 +48,10 @@ if (!hasInterface) exitWith {}; ["ACE3 Scope Adjustment", QGVAR(AdjustDownMinor), localize LSTRING(AdjustDownMinor), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; + [ACE_player] call FUNC(inventoryCheck); // Statement @@ -62,8 +63,10 @@ if (!hasInterface) exitWith {}; ["ACE3 Scope Adjustment", QGVAR(AdjustLeftMinor), localize LSTRING(AdjustLeftMinor), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; + [ACE_player] call FUNC(inventoryCheck); // Statement @@ -75,8 +78,10 @@ if (!hasInterface) exitWith {}; ["ACE3 Scope Adjustment", QGVAR(AdjustRightMinor), localize LSTRING(AdjustRightMinor), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; + [ACE_player] call FUNC(inventoryCheck); // Statement @@ -88,8 +93,10 @@ if (!hasInterface) exitWith {}; ["ACE3 Scope Adjustment", QGVAR(AdjustUpMajor), localize LSTRING(AdjustUpMajor), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; + [ACE_player] call FUNC(inventoryCheck); // Statement @@ -101,8 +108,10 @@ if (!hasInterface) exitWith {}; ["ACE3 Scope Adjustment", QGVAR(AdjustDownMajor), localize LSTRING(AdjustDownMajor), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; + [ACE_player] call FUNC(inventoryCheck); // Statement @@ -114,8 +123,10 @@ if (!hasInterface) exitWith {}; ["ACE3 Scope Adjustment", QGVAR(AdjustLeftMajor), localize LSTRING(AdjustLeftMajor), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; + [ACE_player] call FUNC(inventoryCheck); // Statement @@ -127,8 +138,10 @@ if (!hasInterface) exitWith {}; ["ACE3 Scope Adjustment", QGVAR(AdjustRightMajor), localize LSTRING(AdjustRightMajor), { // Conditions: canInteract - if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false}; + if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific + if (!([ACE_player] call CBA_fnc_canUseWeapon)) exitWith {false}; + [ACE_player] call FUNC(inventoryCheck); // Statement diff --git a/addons/scopes/XEH_preInit.sqf b/addons/scopes/XEH_preInit.sqf index e33c54337d..a7feade1c3 100644 --- a/addons/scopes/XEH_preInit.sqf +++ b/addons/scopes/XEH_preInit.sqf @@ -4,6 +4,4 @@ ADDON = false; #include "XEH_PREP.hpp" -GVAR(fadeScript) = scriptNull; - ADDON = true; diff --git a/addons/scopes/config.cpp b/addons/scopes/config.cpp index 42be283044..fb1f0274ca 100644 --- a/addons/scopes/config.cpp +++ b/addons/scopes/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = { "ace_common" }; - author[] = {"KoffeinFlummi", "esteldunedain"}; - authorUrl = "https://github.com/KoffeinFlummi"; + author = ECSTRING(common,ACETeam); + authors[] = {"KoffeinFlummi", "esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/scopes/functions/fnc_adjustScope.sqf b/addons/scopes/functions/fnc_adjustScope.sqf index 50ee1a4f71..5b0c6d11a6 100644 --- a/addons/scopes/functions/fnc_adjustScope.sqf +++ b/addons/scopes/functions/fnc_adjustScope.sqf @@ -47,7 +47,7 @@ if ((count _maxHorizontal < 2) || (count _maxVertical < 2)) exitWith {false}; if ((_verticalIncrement == 0) && (_turretAndDirection in [ELEVATION_UP, ELEVATION_DOWN])) exitWith {false}; if ((_horizontalIncrement == 0) && (_turretAndDirection in [WINDAGE_UP, WINDAGE_DOWN])) exitWith {false}; -_zeroing = _adjustment select _weaponIndex; +_zeroing = _adjustment select _weaponIndex; _zeroing params ["_elevation", "_windage", "_zero"]; switch (_turretAndDirection) do { diff --git a/addons/scopes/functions/fnc_firedEH.sqf b/addons/scopes/functions/fnc_firedEH.sqf index d28c0dee7e..07eadb5620 100644 --- a/addons/scopes/functions/fnc_firedEH.sqf +++ b/addons/scopes/functions/fnc_firedEH.sqf @@ -24,6 +24,7 @@ _weaponIndex = [_unit, currentWeapon _unit] call EFUNC(common,getWeaponIndex); if (_weaponIndex < 0) exitWith {}; _zeroing = _adjustment select _weaponIndex; +TRACE_1("Adjusting With",_zeroing); if (_zeroing isEqualTo [0, 0, 0]) exitWith {}; diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index 43595bde87..eb47c692bf 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -45,13 +45,13 @@ _vertical ctrlSetText (str _elevation); _horizontal ctrlSetText (str _windage); // Set the time when to hide the knobs -GVAR(timeToHide) = ACE_diagTime + 3.0; +GVAR(timeToHide) = diag_tickTime + 3.0; if !(isNil QGVAR(fadePFH)) exitWith {}; // Launch a PFH to wait and fade out the knobs GVAR(fadePFH) = [{ - if (ACE_diagTime >= GVAR(timeToHide)) exitWith { + if (diag_tickTime >= GVAR(timeToHide)) exitWith { private "_layer"; params ["", "_pfhId"]; _layer = [QGVAR(Zeroing)] call BIS_fnc_rscLayer; diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml index beca0433c7..8dc7a9eba0 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -67,7 +67,7 @@ Большая корректировка ВНИЗ Ajuste mayor abajo Regola l'alzata in basso - Hausse --- + Hausse - - - Große Korrektur nach unten Nagy állítás le Ajuste grande para baixo @@ -91,7 +91,7 @@ Большая корректировка ВЛЕВО Ajuste mayor izquierda Regola il tiro a sinistra - Dérive --- + Dérive - - - Große Korrektur nach links Nagy állítás balra Ajuste grande para esquerda diff --git a/addons/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index fde1786268..95deed0dd6 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -1,3 +1,6 @@ + +class CBA_Extended_EventHandlers; + class CfgVehicles { class ACE_Module; class ACE_ModuleSitting: ACE_Module { @@ -5,10 +8,10 @@ class CfgVehicles { category = "ACE"; displayName = CSTRING(ModuleDisplayName); function = QFUNC(moduleInit); - scope = 2; + scope = 1; isGlobal = 1; isSingular = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_Sitting_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Sitting_ca.paa); class Arguments { class enable { displayName = CSTRING(Enable); @@ -31,72 +34,90 @@ class CfgVehicles { exceptions[] = {"isNotSitting"}; statement = QUOTE(_player call FUNC(stand)); priority = 0; - icon = PATHTOF(UI\stand_ca.paa); + icon = QPATHTOF(UI\stand_ca.paa); }; }; }; - class ThingX; // Folding Chair + class ThingX; class Land_CampingChair_V1_F: ThingX { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(canSit) = 1; GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, -0.1, -0.45}; + GVAR(sitPosition)[] = {0, -0.1, -0.45}; EGVAR(dragging,canCarry) = 1; - EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; EGVAR(dragging,carryDirection) = 180; }; // Camping Chair class Land_CampingChair_V2_F: ThingX { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(canSit) = 1; GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, -0.1, -0.45}; + GVAR(sitPosition)[] = {0, -0.1, -0.45}; EGVAR(dragging,canCarry) = 1; - EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; EGVAR(dragging,carryDirection) = 180; }; - class Furniture_base_F; // Chair (Plastic) + class Furniture_base_F: ThingX {}; class Land_ChairPlastic_F: Furniture_base_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(canSit) = 1; GVAR(sitDirection) = 90; - GVAR(sitPosition[]) = {0, 0, -0.5}; + GVAR(sitPosition)[] = {0, 0, -0.5}; EGVAR(dragging,canCarry) = 1; - EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; EGVAR(dragging,carryDirection) = 270; }; // Chair (Wooden) class Land_ChairWood_F: Furniture_base_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(canSit) = 1; GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, -0.05, 0}; + GVAR(sitPosition)[] = {0, -0.05, 0}; EGVAR(dragging,canCarry) = 1; - EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; EGVAR(dragging,carryDirection) = 180; }; // Office Chair class Land_OfficeChair_01_F: Furniture_base_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(canSit) = 1; GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, 0, -0.6}; + GVAR(sitPosition)[] = {0, 0, -0.6}; EGVAR(dragging,canCarry) = 1; - EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; EGVAR(dragging,carryDirection) = 180; }; // Rattan Chair class Land_RattanChair_01_F: Furniture_base_F { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(canSit) = 1; GVAR(sitDirection) = 180; - GVAR(sitPosition[]) = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) + GVAR(sitPosition)[] = {0, -0.1, -1}; // Z must be -1 due to chair's geometry (magic floating seat point) EGVAR(dragging,canCarry) = 1; - EGVAR(dragging,carryPosition[]) = {0, 0.75, 0.5}; + EGVAR(dragging,carryPosition)[] = {0, 0.75, 0.5}; EGVAR(dragging,carryDirection) = 180; }; }; diff --git a/addons/sitting/XEH_clientInit.sqf b/addons/sitting/XEH_clientInit.sqf index a167e0fea5..7efb38d41e 100644 --- a/addons/sitting/XEH_clientInit.sqf +++ b/addons/sitting/XEH_clientInit.sqf @@ -4,8 +4,7 @@ if (!hasInterface) exitWith {}; ["SettingsInitialized", { - TRACE_1("SettingInit", GVAR(enable)); - + if ([[QUOTE(ADDON), QGVAR(enable)], ["acex_sitting", "acex_sitting_enable"], "3.8.0"] call EFUNC(common,deprecateComponent)) exitwith {}; //If not enabled, then do not add CanInteractWith Condition or event handlers: if (!GVAR(enable)) exitWith {}; diff --git a/addons/sitting/config.cpp b/addons/sitting/config.cpp index 96d3edab7b..bf38435f22 100644 --- a/addons/sitting/config.cpp +++ b/addons/sitting/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"Jonpas"}; - authorUrl = "https://github.com/jonpas"; + author = ECSTRING(common,ACETeam); + authors[] = {"Jonpas"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/sitting/functions/fnc_addSitActions.sqf b/addons/sitting/functions/fnc_addSitActions.sqf index 98c9aba99f..4c449bac52 100644 --- a/addons/sitting/functions/fnc_addSitActions.sqf +++ b/addons/sitting/functions/fnc_addSitActions.sqf @@ -40,7 +40,7 @@ TRACE_1("Adding Sit Action",_type); private _sitAction = [ QGVAR(Sit), localize LSTRING(Sit), - QUOTE(PATHTOF(UI\sit_ca.paa)), + QPATHTOF(UI\sit_ca.paa), {_this call FUNC(sit)}, {_this call FUNC(canSit)}, {}, diff --git a/addons/sitting/stringtable.xml b/addons/sitting/stringtable.xml index 82d19827bb..f7c7b84b93 100644 --- a/addons/sitting/stringtable.xml +++ b/addons/sitting/stringtable.xml @@ -56,7 +56,7 @@ Moduł ten pozwala na włączenie lub wyłączenie możliwości siadania na krzesłach i toaletach. Tento modul dovoluje zakázat možnost sedět na židlých a toaletách. Este módulo te permite desactivar la capacidad de sentarse en sillas. - Ce module controle la capacité de s'assoir sur des chaises ou sur des toilettes + Ce module contrôle la capacité de s'assoir sur des chaises ou sur des toilettes Ez a modul lehetővé teszi a székekre és toalettekre való leülés letiltását. Этот модуль позволяет вам запретить возможность садиться на стулья и туалеты. Questo modulo ti permette di disabilitare la possibilità di sederti sulle sedie. diff --git a/addons/slideshow/CfgVehicles.hpp b/addons/slideshow/CfgVehicles.hpp index 7e82d48ffc..af3108eb59 100644 --- a/addons/slideshow/CfgVehicles.hpp +++ b/addons/slideshow/CfgVehicles.hpp @@ -9,7 +9,7 @@ class CfgVehicles { isGlobal = 1; isTriggerActivated = 0; isDisposable = 0; - icon = QUOTE(PATHTOF(UI\Icon_Module_Slideshow_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Slideshow_ca.paa); class Arguments { class Objects { displayName = CSTRING(Objects_DisplayName); diff --git a/addons/slideshow/config.cpp b/addons/slideshow/config.cpp index 3af3bd5354..3a2e757e6a 100644 --- a/addons/slideshow/config.cpp +++ b/addons/slideshow/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[]= {"Jonpas", "DaC"}; - authorUrl = "https://github.com/jonpas"; + author = ECSTRING(common,ACETeam); + authors[] = {"Jonpas", "DaC"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/slideshow/functions/fnc_autoTransition.sqf b/addons/slideshow/functions/fnc_autoTransition.sqf index 4c31c4ff6a..d54d629b66 100644 --- a/addons/slideshow/functions/fnc_autoTransition.sqf +++ b/addons/slideshow/functions/fnc_autoTransition.sqf @@ -37,4 +37,4 @@ missionNamespace setVariable [_varString, _currentSlide]; // Log current slide and execute Next slide TRACE_4("Auto-transition",_images select _currentSlide,_currentSlide,count _images,_duration); -[FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call EFUNC(common,waitAndExecute); +[FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call CBA_fnc_waitAndExecute; diff --git a/addons/slideshow/functions/fnc_createSlideshow.sqf b/addons/slideshow/functions/fnc_createSlideshow.sqf index 792905db0f..42d1498b88 100644 --- a/addons/slideshow/functions/fnc_createSlideshow.sqf +++ b/addons/slideshow/functions/fnc_createSlideshow.sqf @@ -80,5 +80,5 @@ if (_duration == 0) then { missionNamespace setVariable [_varString, 0]; // Automatic transitions handler - [FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call EFUNC(common,waitAndExecute); + [FUNC(autoTransition), [_objects, _images, _varString, _duration], _duration] call CBA_fnc_waitAndExecute; }; diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml index 6ca1cdfe27..4c45399ba6 100644 --- a/addons/slideshow/stringtable.xml +++ b/addons/slideshow/stringtable.xml @@ -87,7 +87,7 @@ List of images that will be used for the slide-show, separated by commas, with full path correctly formatted (eg. images\image.paa). Eine Liste von Bildern, die bei der Vorführung verwendet werden. (Durch Kommata getrennt, mit vollem Pfad angegeben (z.B Bilder\bild.paa)). - Liste d'images qui seront utilisées dans des diaporama, séparation par virgule, avec le chemin d'accès complet et formaté correctement (ie. images\image.paa) + Liste d'images qui seront utilisées dans des diaporamas, séparation par virgule, avec le chemin d'accès complet et formaté correctement (ie. images\image.paa) Lista obrazów, które zostaną użyte do pokazu slajdów, oddzielone przecinkiem, z poprawnym pełnym formatem ścieżki do obrazka (np. slajdy\obrazek.paa). A képek listája amit a vetítés használni fog, vesszővel elválasztva, megfelelően formázott teljes útvonallal (pl. képek\kép.paa) Lista das imagens que serão utilizadas na apresentação de slides, separadas por vírgula, com o caminho completo corretamente formatado (ex: imagens\imagem.paa). @@ -110,7 +110,7 @@ List of names that will be used for interaction entries, separated by commas, in order of images. - Liste de nom qui seront utilisés pour des interactions, séparation par virgule, dans l'ordre des images + Liste de noms qui seront utilisés pour des interactions, séparation par virgule, dans l'ordre des images Lista nazw, które zostaną użyte do nazwania wpisów interakcji, oddzielone przecinkiem, w kolejności obrazów. Olyan nevek listája, melyek interakciós célra kellenek, vesszővel elválasztva, kép szerinti sorrendben. Lista dos nomes que serão usados para entradas de interação, separados por vírgulas, na ordem das imagens. diff --git a/addons/smallarms/CfgWeapons.hpp b/addons/smallarms/CfgWeapons.hpp index c0f4b4daef..75d8ee6538 100644 --- a/addons/smallarms/CfgWeapons.hpp +++ b/addons/smallarms/CfgWeapons.hpp @@ -58,18 +58,12 @@ class CfgWeapons { // Grenade launchers ///////////////////////////////////// // Updated strings are in weapon configs. class GrenadeLauncher; - class UGL_F : GrenadeLauncher {}; + class UGL_F: GrenadeLauncher {}; // MXs //////////////////////////////////////////////////// - class arifle_MX_Base_F : Rifle_Base_F { - //magazines[] = {"30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag_Tracer", "100Rnd_65x39_caseless_mag", "100Rnd_65x39_caseless_mag_Tracer"}; - - // http://www.bushmaster.com/acr/#/intro - // 800 rpm (whatever, fictional lol) - - //class Single : Mode_SemiAuto {}; - class Single : Mode_SemiAuto { + class arifle_MX_Base_F: Rifle_Base_F { + class Single: Mode_SemiAuto { reloadTime = 0.075; }; @@ -78,20 +72,20 @@ class CfgWeapons { }; }; - class arifle_MX_SW_F : arifle_MX_Base_F { + class arifle_MX_SW_F: arifle_MX_Base_F { modes[] = {"Single", "manual", "close", "short", "medium", "far_optic1", "far_optic2"}; - //class Single : Single {}; - //class manual : FullAuto {}; + //class Single: Single {}; + //class manual: FullAuto {}; }; // Katibas //////////////////////////////////////////////////// - class arifle_katiba_Base_F : Rifle_Base_F { + class arifle_katiba_Base_F: Rifle_Base_F { // http://world.guns.ru/assault/iran/khaybar-kh2002-e.html // 800 rpm - class Single : Mode_SemiAuto { + class Single: Mode_SemiAuto { reloadTime = 0.075; }; @@ -102,16 +96,16 @@ class CfgWeapons { // SDAR ////////////////////////////////////////////////// - class SDAR_base_F : Rifle_Base_F { + class SDAR_base_F: Rifle_Base_F { modes[] = {"Single", "FullAuto"}; // Leave in the imaginary full-auto mode because, whatever. }; // Tavor TRG //////////////////////////////////////////////// - class Tavor_base_F : Rifle_Base_F { + class Tavor_base_F: Rifle_Base_F { // http://www.israel-weapon.com/files/brochure_2012/IWI_TAVOR_AR.pdf // 700 ~1000 rpm (850) - class Single : Mode_SemiAuto { + class Single: Mode_SemiAuto { reloadTime = 0.07; }; @@ -122,10 +116,10 @@ class CfgWeapons { // Mk20 (F2000) ////////////////////////////////////////////////// - class mk20_base_F : Rifle_Base_F { + class mk20_base_F: Rifle_Base_F { // http://www.fnherstal.com/primary-menu/products-capabilities/rifles/technical-data/product/182/232/182/1/_/fn-f2000R-standard.html // 850 rpm - class Single : Mode_SemiAuto { + class Single: Mode_SemiAuto { reloadTime = 0.07; }; @@ -136,14 +130,14 @@ class CfgWeapons { // SMG Vermin //////////////////////////////////////////////////// - class SMG_01_Base : Rifle_Base_F { + class SMG_01_Base: Rifle_Base_F { // http://kriss-usa.com/pdf/operatormanual/ // 1200 rpm - class Single : Mode_SemiAuto { + class Single: Mode_SemiAuto { reloadTime = 0.05; }; - class Burst : Mode_Burst { + class Burst: Mode_Burst { burst = 2; reloadTime = 0.05; }; @@ -155,17 +149,17 @@ class CfgWeapons { // SMG Scorpion //////////////////////////////////////////////////// - class SMG_02_base_F : Rifle_Base_F { + class SMG_02_base_F: Rifle_Base_F { //http://www.czub.cz/zbrojovka/cz-manual/Instruction-Manual-Scorpion-EVO-3-A1_en.pdf // 1150 rpm - class Single : Mode_SemiAuto { + class Single: Mode_SemiAuto { // http://www.stengg.com/upload/915fGdhTi3ggnnGQGGL.pdf // 900-1100 rpm (1000rpm) reloadTime = 0.052; }; - class Burst : Mode_Burst { + class Burst: Mode_Burst { reloadTime = 0.052; }; @@ -177,11 +171,9 @@ class CfgWeapons { // SMG PDW2000 /////////////////////////////////////////////////// class pdw2000_base_F: Rifle_Base_F { - magazines[] = {"30Rnd_9x21_Mag"}; - modes[] = {"Single", "FullAuto"}; // No burst on this thing - class Single : Mode_SemiAuto { + class Single: Mode_SemiAuto { // http://www.stengg.com/upload/915fGdhTi3ggnnGQGGL.pdf // 900-1100 rpm (1000rpm) reloadTime = 0.06; @@ -194,24 +186,18 @@ class CfgWeapons { // Pistols ////////////////////////////////////////////// - class hgun_P07_F : Pistol_Base_F { - magazines[] = {"16Rnd_9x21_Mag"}; - }; - - class hgun_Rook40_F : Pistol_Base_F { - magazines[] = {"16Rnd_9x21_Mag"}; - }; - - /*class hgun_ACPC2_F: Pistol_Base_F {}; + /*class hgun_P07_F: Pistol_Base_F {}; + class hgun_Rook40_F: Pistol_Base_F {}; + class hgun_ACPC2_F: Pistol_Base_F {}; class hgun_Pistol_heavy_01_F: Pistol_Base_F {}; class hgun_Pistol_heavy_02_F: Pistol_Base_F {};*/ // LMGs ////////////////////////////////////////////// - class LMG_Mk200_F : Rifle_Long_Base_F { + class LMG_Mk200_F: Rifle_Long_Base_F { modes[] = {"manual", "Single", "close", "short", "medium", "far_optic1", "far_optic2"}; - class manual : Mode_FullAuto { + class manual: Mode_FullAuto { // http://www.defensereview.com/kac-stoner-lmg-belt-fed-5-56mm-nato-lightweight-light-machine-gun-squad-automatic-weapon-lmgsaw-displayed-at-sofic-2010/ // 550 rpm reloadTime = 0.109; @@ -219,7 +205,7 @@ class CfgWeapons { // Add semi-auto mode. // Inherit from 'manual' for sound reasons. - class Single : manual { + class Single: manual { reloadTime = 0.109; dispersion = 0.00175; // radians. Equal to 6 MOA. autofire = 0; @@ -233,28 +219,28 @@ class CfgWeapons { class LMG_Zafir_F: Rifle_Long_Base_F { modes[] = {"FullAuto", "Single", "close", "short", "medium", "far_optic1", "far_optic2"}; - class FullAuto : Mode_FullAuto { + class FullAuto: Mode_FullAuto { reloadTime = 0.070; // 850 RPM on gas position 1 }; }; // Sniper and anti-materiel rifles ///////////////////////////////// - class EBR_base_F : Rifle_Long_Base_F { + class EBR_base_F: Rifle_Long_Base_F { // EMR/EBR is typically issued semi-auto AFAIK modes[] = {"Single", "single_close_optics1", "single_medium_optics1", "single_far_optics1"}; cursor = "arifle"; }; - class LRR_base_F : Rifle_Long_Base_F { + class LRR_base_F: Rifle_Long_Base_F { cursor = "arifle"; }; - class GM6_base_F : Rifle_Long_Base_F { + class GM6_base_F: Rifle_Long_Base_F { cursor = "arifle"; // Fuck your balancing, BI. - class Single : Mode_SemiAuto { + class Single: Mode_SemiAuto { // 250 rpm is probably the limit of the finger on a heavy bullpup trigger like this thing must have. reloadTime = 0.24; }; diff --git a/addons/smallarms/config.cpp b/addons/smallarms/config.cpp index e5731df7b3..5b211fa37e 100644 --- a/addons/smallarms/config.cpp +++ b/addons/smallarms/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"TaoSensai", "KoffeinFlummi"}; - authorUrl = "https://github.com/Taosenai/tmr"; + author = ECSTRING(common,ACETeam); + authors[] = {"TaoSensai", "KoffeinFlummi"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/spectator/ACE_Settings.hpp b/addons/spectator/ACE_Settings.hpp index 78402cff23..31e4ea3fd0 100644 --- a/addons/spectator/ACE_Settings.hpp +++ b/addons/spectator/ACE_Settings.hpp @@ -1,20 +1,28 @@ class ACE_Settings { class GVAR(filterUnits) { + displayName = CSTRING(units_DisplayName); + description = CSTRING(units_Description); typeName = "SCALAR"; value = 2; values[] = {CSTRING(units_none), CSTRING(units_players), CSTRING(units_playable), CSTRING(units_all)}; }; class GVAR(filterSides) { + displayName = CSTRING(sides_DisplayName); + description = CSTRING(sides_Description); typeName = "SCALAR"; value = 0; values[] = {CSTRING(sides_player), CSTRING(sides_friendly), CSTRING(sides_hostile), CSTRING(sides_all)}; }; class GVAR(restrictModes) { + displayName = CSTRING(modes_DisplayName); + description = CSTRING(modes_Description); typeName = "SCALAR"; value = 0; values[] = {CSTRING(modes_all), CSTRING(modes_unit), CSTRING(modes_free), CSTRING(modes_internal), CSTRING(modes_external)}; }; class GVAR(restrictVisions) { + displayName = CSTRING(visions_DisplayName); + description = CSTRING(visions_Description); typeName = "SCALAR"; value = 0; values[] = {CSTRING(modes_all), CSTRING(visions_nv), CSTRING(visions_ti), "$STR_Special_None"}; diff --git a/addons/spectator/CfgVehicles.hpp b/addons/spectator/CfgVehicles.hpp index f6869462ac..268aabbef5 100644 --- a/addons/spectator/CfgVehicles.hpp +++ b/addons/spectator/CfgVehicles.hpp @@ -3,7 +3,7 @@ class CfgVehicles { class GVAR(moduleSettings): ACE_Module { scope = 2; displayName = CSTRING(Settings_DisplayName); - icon = PATHTOF(UI\Icon_Module_Spectator_ca.paa); + icon = QPATHTOF(UI\Icon_Module_Spectator_ca.paa); category = "ACE"; function = QFUNC(moduleSpectatorSettings); isGlobal = 1; diff --git a/addons/spectator/XEH_postInit.sqf b/addons/spectator/XEH_postInit.sqf index 4b1f653223..ea3e6a5510 100644 --- a/addons/spectator/XEH_postInit.sqf +++ b/addons/spectator/XEH_postInit.sqf @@ -16,4 +16,16 @@ if (isServer) then { }; // Should prevent unending spectator on mission end -addMissionEventHandler ["Ended",{ [QGVAR(EndMission)] call FUNC(interrupt) }]; +if (isServer) then { + addMissionEventHandler ["Ended", { + [QGVAR(endMission), []] call EFUNC(common,globalEvent); + }]; +}; + +[QGVAR(endMission), { + if (GVAR(isSet)) then { + [false] call FUNC(setSpectator); + }; +}] call EFUNC(common,addEventHandler); + +[QGVAR(stageSpectator), FUNC(stageSpectator)] call EFUNC(common,addEventHandler); diff --git a/addons/spectator/config.cpp b/addons/spectator/config.cpp index 6e32ed0413..5907e7c3e1 100644 --- a/addons/spectator/config.cpp +++ b/addons/spectator/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"F3 Project","Head","SilentSpike","voiper"}; - authorUrl = "https://github.com/acemod"; + author = ECSTRING(common,ACETeam); + authors[] = {"F3 Project","Head","SilentSpike","voiper"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/spectator/functions/fnc_handleInterface.sqf b/addons/spectator/functions/fnc_handleInterface.sqf index a8a607d537..3a69bb1383 100644 --- a/addons/spectator/functions/fnc_handleInterface.sqf +++ b/addons/spectator/functions/fnc_handleInterface.sqf @@ -27,8 +27,11 @@ switch (toLower _mode) do { // Always show interface and hide map upon opening [_display,nil,nil,!GVAR(showInterface),GVAR(showMap)] call FUNC(toggleInterface); + // Initalize the unit tree + ["onUnitsUpdate",[(_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE]] call FUNC(handleInterface); + // Keep unit list and tree up to date - [FUNC(handleUnits), 21, _display] call CBA_fnc_addPerFrameHandler; + [FUNC(handleUnits), 9, _display] call CBA_fnc_addPerFrameHandler; // Handle 3D unit icons GVAR(iconHandler) = addMissionEventHandler ["Draw3D",FUNC(handleIcons)]; @@ -108,7 +111,7 @@ switch (toLower _mode) do { _timer ctrlCommit 0; _frame ctrlCommit 0; }; - },[],0.5] call EFUNC(common,waitAndExecute); + },[],0.5] call CBA_fnc_waitAndExecute; }; case "onunload": { // Kill GUI PFHs @@ -331,31 +334,40 @@ switch (toLower _mode) do { }; case "onunitsupdate": { _args params ["_tree"]; - private ["_cachedUnits","_cachedGrps","_cachedSides","_s","_g","_grp","_u","_unit","_side"]; + private ["_cachedUnits","_cachedGrps","_cachedSides","_sT","_gT","_uT","_s","_g","_u","_grp","_unit","_side"]; // Cache existing group and side nodes and cull removed data _cachedUnits = []; _cachedGrps = []; _cachedSides = []; - for "_s" from 0 to ((_tree tvCount []) - 1) do { - for "_g" from 0 to ((_tree tvCount [_s]) - 1) do { + // Track deleted nodes to account for decrease in index + _sT = _tree tvCount []; + for [{_s = 0;}, {_s < _sT}, {_s = _s + 1}] do { + _gT = _tree tvCount [_s]; + + for [{_g = 0;}, {_g < _gT}, {_g = _g + 1}] do { _grp = groupFromNetID (_tree tvData [_s,_g]); if (_grp in GVAR(groupList)) then { _cachedGrps pushBack _grp; _cachedGrps pushBack _g; - for "_u" from 0 to ((_tree tvCount [_s,_g])) do { + _uT = _tree tvCount [_s,_g]; + for [{_u = 0;}, {_u < _uT}, {_u = _u + 1}] do { _unit = objectFromNetId (_tree tvData [_s,_g,_u]); if (_unit in GVAR(unitList)) then { _cachedUnits pushBack _unit; } else { _tree tvDelete [_s,_g,_u]; + _u = _u - 1; + _uT = _uT - 1; }; }; } else { _tree tvDelete [_s,_g]; + _g = _g - 1; + _gT = _gT - 1; }; }; @@ -364,6 +376,8 @@ switch (toLower _mode) do { _cachedSides pushBack _s; } else { _tree tvDelete [_s]; + _s = _s - 1; + _sT = _sT - 1; }; }; @@ -476,7 +490,7 @@ switch (toLower _mode) do { [_this select 1] call CBA_fnc_removePerFrameHandler; },0] call CBA_fnc_addPerFrameHandler; - },[],5] call EFUNC(common,waitAndExecute); + },[],5] call CBA_fnc_waitAndExecute; true }; diff --git a/addons/spectator/functions/fnc_handleUnits.sqf b/addons/spectator/functions/fnc_handleUnits.sqf index c32961024c..f51c922b8e 100644 --- a/addons/spectator/functions/fnc_handleUnits.sqf +++ b/addons/spectator/functions/fnc_handleUnits.sqf @@ -36,5 +36,5 @@ if !(GVAR(camUnit) in GVAR(unitList)) then { // Reduce overhead when unit tree is hidden if (ctrlShown (_display displayCtrl IDC_UNIT)) then { // Reduce overhead by spreading across frames - [FUNC(handleInterface),["onUnitsUpdate",[(_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE]],1] call EFUNC(common,waitAndExecute); + [FUNC(handleInterface),["onUnitsUpdate",[(_display displayCtrl IDC_UNIT) controlsGroupCtrl IDC_UNIT_TREE]],1] call CBA_fnc_waitAndExecute; }; diff --git a/addons/spectator/functions/fnc_respawnTemplate.sqf b/addons/spectator/functions/fnc_respawnTemplate.sqf index 4584a1fc3c..fde8ef05ad 100644 --- a/addons/spectator/functions/fnc_respawnTemplate.sqf +++ b/addons/spectator/functions/fnc_respawnTemplate.sqf @@ -23,7 +23,7 @@ private ["_vision","_pos"]; // When all are dead with respawn type "None" the mission should end if ((_respawn == 0) && {{alive _x} count allPlayers <= 0}) exitWith { - [["endDeath",false],"BIS_fnc_endMission"] call EFUNC(common,execRemoteFnc); + ["BIS_fnc_endMission", ["endDeath", false]] call EFUNC(common,globalEvent); }; // Some environment information can be used for the initial camera attributes diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index ce9428cea4..83ed864219 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -92,12 +92,12 @@ if (_set) then { if (_this) then { _display displayAddEventHandler ["KeyDown", { if (_this select 1 == 1) then { - [false] call ace_spectator_fnc_setSpectator; + [false] call FUNC(setSpectator); true }; }]; }; - }, !_force] call EFUNC(common,execNextFrame); + }, !_force] call CBA_fnc_execNextFrame; // Cache and disable nametag settings if (["ace_nametags"] call EFUNC(common,isModLoaded)) then { diff --git a/addons/spectator/functions/fnc_stageSpectator.sqf b/addons/spectator/functions/fnc_stageSpectator.sqf index 926ac008dc..4d8a716f3d 100644 --- a/addons/spectator/functions/fnc_stageSpectator.sqf +++ b/addons/spectator/functions/fnc_stageSpectator.sqf @@ -27,7 +27,7 @@ params [["_unit",player,[objNull]], ["_set",true,[true]]]; if !(_set || (GETVAR(_unit,GVAR(isStaged),false))) exitWith {}; if !(local _unit) exitWith { - [[_unit, _set], QFUNC(stageSpectator), _unit] call EFUNC(common,execRemoteFnc); + [QGVAR(stageSpectator), _unit, [_unit, _set]] call EFUNC(common,objectEvent); }; // Prevent unit falling into water @@ -73,6 +73,6 @@ if ((player in GVAR(unitList)) || {ACE_player in GVAR(unitList)}) then { if (!(isNull (findDisplay 12249))) then {//If display is open now, close it and restart ACE_LOGWARNING("Player in unitList, call ace_spectator_fnc_stageSpectator before ace_spectator_fnc_setSpectator"); ["fixWeirdList", true] call FUNC(interrupt); - [{["fixWeirdList", false] call FUNC(interrupt);}, []] call EFUNC(common,execNextFrame); + [{["fixWeirdList", false] call FUNC(interrupt);}, []] call CBA_fnc_execNextFrame; }; }; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 2db602f145..bdb88a2675 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -10,6 +10,7 @@ Nastavení pozorovatele Ajustes de espectador Impostazioni Spettatore + Réglages de spectateur Configure how the spectator system will operate by default. @@ -20,6 +21,7 @@ Configurar cómo el sistema de espectador funcionará por defecto. Konfigurovat výchozí nastavení pozorovatele Configura come il sistema spettatore si comporterà di default. + Configure comment le système de spectateurs opère par défaut. Unit filter @@ -30,6 +32,7 @@ Filtr jednotek Filtro de unidad Filtro Unità + Filtre d'unités Method of filtering spectatable units. @@ -40,6 +43,7 @@ Método de filtrado de unidades de espectador Metoda filtrování pozorovaných jednotek. Metodo di filtraggio delle unità osservabili. + Méthode de filtration des unités regardables. No units @@ -50,6 +54,7 @@ Žádné jednotky Ninguna Nessuna unità + Pas d'unités Only players @@ -60,6 +65,7 @@ Pouze hráči Solo jugadores Solo giocatori + Joueurs seulements Playable Units @@ -70,6 +76,7 @@ Hratelné jednotky Unidades jugables Unità giocabili + Unités jouables All units @@ -80,6 +87,7 @@ Všechny jednotky Todas las unidades Tutte le unità + Toutes les unités Side filter @@ -90,6 +98,7 @@ Filtr stran Filtro de bando Filtro Lato + Filtre de faction Method of filtering spectatable sides. @@ -100,6 +109,7 @@ Método de filtrado de bandos de espectador Metoda filtrování pozorovaných stran. Metodo per filtrare i lati osservabili. + Méthode de filtration des factions regardables Player side @@ -110,6 +120,7 @@ Strana hráče Bando del jugador Lato giocatore + Faction du joueur Friendly sides @@ -120,6 +131,7 @@ Strana spojenců Bandos amigos Lati alleati + Factions amies Hostile sides @@ -130,6 +142,7 @@ Strana nepřítele Bandos enemigos Lati nemici + Factions hostiles All sides @@ -140,6 +153,7 @@ Všechny strany Todos los bandos Tutti i lati + Toutes les factions Camera modes @@ -150,6 +164,7 @@ Módy kamery Modos de cámara Modalità camera + Mode de caméra Camera modes that can be used. @@ -160,6 +175,7 @@ Modos de la cámara que se pueden utilizar. Módy kamery které mohou být použity. Modalità che la camera può utilizzare. + Modes de caméra qui peuvent être utilisés All @@ -170,6 +186,7 @@ Všechny Todos Tutte + Tous Free only @@ -180,15 +197,16 @@ Pouze volná Solo libre Solo libera + Libre seulement Internal only Erste Person //Bitte überprüfen! - Tylko wewnętrznaSomente internaТолько внутренняяPouze pohled z první osobySolo internaSolo interna + Tylko wewnętrznaSomente internaТолько внутренняяPouze pohled z první osobySolo internaSolo internaInterne seulement External only Dritte Person //Bitte überpfüfen! - Tylko zewnętrznaSomente externaТолько внешняяPouze pohled z třetí osobySolo externaSolo esterna + Tylko zewnętrznaSomente externaТолько внешняяPouze pohled z třetí osobySolo externaSolo esternaExterne seulement Internal and external Erste und dritte Person @@ -198,6 +216,7 @@ Pohled z první a třetí osoby Interna y externa Interna ed Esterna + Interne et externe Vision modes @@ -208,6 +227,7 @@ Modos de visión Módy zobrazení Modalità visuali + Modes de vision Vision modes that can be used. @@ -218,6 +238,7 @@ Modos de visión que pueden ser utilizados. Módy zobrazení které mohou být použity. Modalità visuali che possono essere usate. + Modes de visions qui peuvent être utilisés Night vision @@ -228,6 +249,7 @@ Noktovize Visión nocturna Visione Notturna + Vision nocturne Thermal imaging @@ -238,6 +260,7 @@ Termovize Imagen térmica Visione Termica + Vision thermique @@ -249,6 +272,7 @@ Unidades espectador Jednotky pozorovatele Unità Osservabili + Unités spectatrices Spectator Controls @@ -259,6 +283,7 @@ Controles de espectador Ovládání pozorovatele Controlli Osservatore + Contrôles de spectateur Free @@ -269,15 +294,16 @@ Volná Libre Libera + Libre Internal Erste Person //Bitte überprüfen! - WewnętrznaInternaВнутренняяPohled z první osobyInternaInterna + WewnętrznaInternaВнутренняяPohled z první osobyInternaInternaInterne External Dritte Person //Bitte überprüfen! - ZewnętrznaExternaВнешняяPohled z třetí osobyExternaEsterna + ZewnętrznaExternaВнешняяPohled z třetí osobyExternaEsternaExterne Normal Normal @@ -287,6 +313,7 @@ Normální Normal Normale + Normale Night @@ -294,9 +321,10 @@ Noc Visão Norturna Ночное - Noc + Noční Nocturna Notturno + Nuit Thermal @@ -304,9 +332,10 @@ Termo Térmica Тепловизор - Termál + Termální Térmica Termico + Thermique @@ -318,6 +347,7 @@ Volná Kamera Cámara libre Camera Libera + Caméra libre Camera Forward @@ -328,6 +358,7 @@ Vpřed (Kamera) Cámara delantera Camera Avanti + Caméra en avant Camera Backward @@ -338,6 +369,7 @@ Zpět (Kamera) Cámara trasera Camera Indietro + Caméra en arrière Camera Left @@ -348,6 +380,7 @@ Doleva (Kamera) Cámara izquierda Camera Sinistra + Caméra à gauche Camera Right @@ -358,6 +391,7 @@ Doprava (Kamera) Cámara derecha Camera Destra + Caméra à droite Camera Up @@ -368,6 +402,7 @@ Nahoru (Kamera) Cámara arriba Camera Su + Caméra en haut Camera Down @@ -378,6 +413,7 @@ Dolů (Kamera) Cámara abajo Camera Giù + Caméra en bas Pan Camera @@ -408,6 +444,7 @@ Zamknout kameru na Cíl Fijar cámara al objetivo Blocca la camera su obbiettivo + Verrouiller la caméra sur la cible Speed Boost @@ -418,6 +455,7 @@ Aumento de velocidad Zrychlení kamery Aumento Velocità + Boost de vitesse Interface @@ -428,6 +466,7 @@ Rozhraní Interfaz Interfaccia + Interface Toggle Interface @@ -438,6 +477,7 @@ Zobrazit/skrýt rozhraní Conmutar Apri Interfaccia + Bascule de l'interface Toggle Unit Icons @@ -448,6 +488,7 @@ Zobrazit/skrýt ikony jednotek Conmutar iconos de unidad Apri Icone Unità + Bascule des icônes des unités Toggle Unit List @@ -458,6 +499,7 @@ Zobrazit/skrýt seznam jednotek Conmutar lista de unidades Apri Lista Unità + Bascule de la liste des unités Toggle Toolbar @@ -468,6 +510,7 @@ Conmutar barra de herramientas Zobrazit/skrýt spodní panel Apri Barra degli Strumenti + Bascule de la barre d'outils Toggle Compass @@ -478,6 +521,7 @@ Zobrazit/skrýt kompas Conmutar brújula Apri Bussola + Basculer le compas Toggle Map @@ -488,6 +532,7 @@ Zobrazit/skrýt mapu Conmutar map Apri Mappa + Basculer la carte Toggle Help @@ -498,6 +543,7 @@ Zobrazit/skrýt ovládání Conmutar ayuda Apri Aiuti + Basculer l'aide Camera Attributes @@ -508,6 +554,7 @@ Atributos de cámara Atributy kamery Attributi Camera + Propriétés de la caméra Next Camera @@ -518,6 +565,7 @@ Následující kamera Siguiente cámara Prossima Camera + Caméra suivante Previous Camera @@ -528,6 +576,7 @@ Předchozí kamera Anterior cámara Precedente Camera + Caméra précédente Next Unit @@ -538,6 +587,7 @@ Následující jednotka Siguiente unidad Prossima Unità + Unité suivante Previous Unit @@ -548,6 +598,7 @@ Předchozí jednotka Anterior unidad Precedente Unità + Unité précédente Next Vision Mode @@ -558,6 +609,7 @@ Siguiente modo de visión Následující mód zobrazení Prossima Modalità Visiva + Mode de vision suivant Previous Vision Mode @@ -568,6 +620,7 @@ Anterior modo de visión Předchozí mód zobrazení Precedente Modalità Visiva + Mode de vision précédent Adjust Zoom @@ -578,6 +631,7 @@ Regulovat přiblížení Ajustar aumento Aggiusta Zoom + Ajuster le zoom Adjust Speed @@ -588,6 +642,7 @@ Regulovat rychlost Ajustar velocidad Aggiusta Velocità + Ajuster la vitesse Increment Zoom @@ -598,6 +653,7 @@ Incrementar aumento Regulovat přiblížení (pomalu) Aumenta Zoom + Augmenter le zoom Increment Speed @@ -608,6 +664,7 @@ Incrementar velocidad Regulovat rychlost (pomalu) Aumenta Velocità + Augmenter la vitesse Reset Zoom @@ -618,6 +675,7 @@ Obnovit přiblížení Reiniciar aumento Resetta Zoom + RAZ zoom Reset Speed @@ -628,6 +686,7 @@ Obnovit rychlost Reiniciar velocidad Resetta Velocità + RAZ vitesse \ No newline at end of file diff --git a/addons/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp index 434c1c96ca..ef5f1e1c3e 100644 --- a/addons/spottingscope/CfgVehicles.hpp +++ b/addons/spottingscope/CfgVehicles.hpp @@ -1,4 +1,6 @@ +class CBA_Extended_EventHandlers; + class CfgVehicles { class Man; class CAManBase: Man { @@ -10,7 +12,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player,'ACE_SpottingScope')] call FUNC(place)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\w_spottingscope_ca.paa); + icon = QPATHTOF(UI\w_spottingscope_ca.paa); }; }; }; @@ -51,12 +53,15 @@ class CfgVehicles { }; }; class ACE_SpottingScopeObject: StaticATWeapon { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + scope = 1; side = 1; typicalCargo[] = {"Soldier"}; displayName = CSTRING(DisplayName); - model = PATHTOF(data\ace_spottingscope.p3d); + model = QPATHTOF(data\ace_spottingscope.p3d); mapSize = 0.5; transportSoldier = 0; getInAction = "GetInLow"; @@ -73,7 +78,7 @@ class CfgVehicles { weapons[] = {}; magazines[] = {}; gunnerOpticsColor[] = {1,1,1,1}; - gunnerOpticsmodel = PATHTOF(data\m144_optic.p3d); + gunnerOpticsmodel = QPATHTOF(data\m144_optic.p3d); gunnerOpticsEffect[] = {"OpticsCHAbera1","OpticsBlur2"}; gunnerOutOpticsShowCursor = 0; gunnerOpticsShowCursor = 0; @@ -107,7 +112,7 @@ class CfgVehicles { }; }; EGVAR(dragging,canDrag) = 1; - EGVAR(dragging,dragPosition[]) = {0,1,0}; + EGVAR(dragging,dragPosition)[] = {0,1,0}; EGVAR(dragging,dragDirection) = 0; class ACE_Actions: ACE_Actions{ class ACE_MainActions: ACE_MainActions { @@ -121,7 +126,7 @@ class CfgVehicles { showDisabled = 0; exceptions[] = {}; priority = 5; - icon = PATHTOF(UI\w_spottingscope_ca.paa); + icon = QPATHTOF(UI\w_spottingscope_ca.paa); }; }; }; diff --git a/addons/spottingscope/CfgWeapons.hpp b/addons/spottingscope/CfgWeapons.hpp index 9b5825572b..9e190bab0d 100644 --- a/addons/spottingscope/CfgWeapons.hpp +++ b/addons/spottingscope/CfgWeapons.hpp @@ -2,15 +2,15 @@ class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; - + class ACE_SpottingScope: ACE_ItemCore { scope = 2; displayName = CSTRING(DisplayName); descriptionShort = ""; - picture = PATHTOF(UI\w_spottingscope_ca.paa); - model = PATHTOF(data\ace_spottingscope.p3d); - - class ItemInfo: InventoryItem_Base_F { + picture = QPATHTOF(UI\w_spottingscope_ca.paa); + model = QPATHTOF(data\ace_spottingscope.p3d); + + class ItemInfo: InventoryItem_Base_F { mass = 40; }; }; diff --git a/addons/spottingscope/config.cpp b/addons/spottingscope/config.cpp index c3541eed39..a92f91ec50 100644 --- a/addons/spottingscope/config.cpp +++ b/addons/spottingscope/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_SpottingScope"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_apl", "ace_interaction"}; - author[] = {"Rocko", "Scubaman3D", "Ruthberg", "commy2", "p1nga"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Rocko", "Scubaman3D", "Ruthberg", "commy2", "p1nga"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/spottingscope/functions/fnc_pickup.sqf b/addons/spottingscope/functions/fnc_pickup.sqf index 81c9bc10a5..cdcc78bea3 100644 --- a/addons/spottingscope/functions/fnc_pickup.sqf +++ b/addons/spottingscope/functions/fnc_pickup.sqf @@ -27,4 +27,4 @@ if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { [_unit, "ACE_SpottingScope"] call EFUNC(common,addToInventory); deleteVehicle _spottingScope; -}, [_spottingScope, _unit], 1, 0]call EFUNC(common,waitAndExecute); +}, [_spottingScope, _unit], 1, 0]call CBA_fnc_waitAndExecute; diff --git a/addons/spottingscope/functions/fnc_place.sqf b/addons/spottingscope/functions/fnc_place.sqf index 09f756c109..21560f948f 100644 --- a/addons/spottingscope/functions/fnc_place.sqf +++ b/addons/spottingscope/functions/fnc_place.sqf @@ -38,4 +38,4 @@ if ((_unit call CBA_fnc_getUnitAnim) select 0 == "stand") then { _spottingScope setVectorUp (surfaceNormal (position _spottingScope)); }; _unit reveal _spottingScope; -}, [_unit], 1, 0] call EFUNC(common,waitAndExecute); +}, [_unit], 1, 0] call CBA_fnc_waitAndExecute; diff --git a/addons/spottingscope/stringtable.xml b/addons/spottingscope/stringtable.xml index a562e31c8c..3a0b89b857 100644 --- a/addons/spottingscope/stringtable.xml +++ b/addons/spottingscope/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/switchunits/ACE_Settings.hpp b/addons/switchunits/ACE_Settings.hpp index 06c1ff274c..e3fc653cb2 100644 --- a/addons/switchunits/ACE_Settings.hpp +++ b/addons/switchunits/ACE_Settings.hpp @@ -1,29 +1,41 @@ class ACE_Settings { - class GVAR(EnableSwitchUnits) { + class GVAR(enableSwitchUnits) { value = 0; typeName = "BOOL"; }; - class GVAR(SwitchToWest) { + class GVAR(switchToWest) { + displayName = CSTRING(SwitchToWest_DisplayName); + description = CSTRING(SwitchToWest_Description); value = 0; typeName = "BOOL"; }; - class GVAR(SwitchToEast) { + class GVAR(switchToEast) { + displayName = CSTRING(SwitchToEast_DisplayName); + description = CSTRING(SwitchToEast_Description); value = 0; typeName = "BOOL"; }; - class GVAR(SwitchToIndependent) { + class GVAR(switchToIndependent) { + displayName = CSTRING(SwitchToIndependent_DisplayName); + description = CSTRING(SwitchToIndependent_Description); value = 0; typeName = "BOOL"; }; - class GVAR(SwitchToCivilian) { + class GVAR(switchToCivilian) { + displayName = CSTRING(SwitchToCivilian_DisplayName); + description = CSTRING(SwitchToCivilian_Description); value = 0; typeName = "BOOL"; }; - class GVAR(EnableSafeZone) { + class GVAR(enableSafeZone) { + displayName = CSTRING(EnableSafeZone_DisplayName); + description = CSTRING(EnableSafeZone_Description); value = 1; typeName = "BOOL"; }; - class GVAR(SafeZoneRadius) { + class GVAR(safeZoneRadius) { + displayName = CSTRING(SafeZoneRadius_DisplayName); + description = CSTRING(SafeZoneRadius_Description); value = 100; typeName = "SCALAR"; }; diff --git a/addons/switchunits/CfgVehicles.hpp b/addons/switchunits/CfgVehicles.hpp index f0549cb00e..1e12cc03d6 100644 --- a/addons/switchunits/CfgVehicles.hpp +++ b/addons/switchunits/CfgVehicles.hpp @@ -7,7 +7,7 @@ class CfgVehicles { function = FUNC(module); scope = 2; isGlobal = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_SwitchUnits_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_SwitchUnits_ca.paa); class Arguments { class SwitchToWest { displayName = CSTRING(SwitchToWest_DisplayName); diff --git a/addons/switchunits/XEH_postInit.sqf b/addons/switchunits/XEH_postInit.sqf index 5928804d7b..d5020391e6 100644 --- a/addons/switchunits/XEH_postInit.sqf +++ b/addons/switchunits/XEH_postInit.sqf @@ -27,3 +27,11 @@ if (missionNamespace getVariable [QGVAR(EnableSwitchUnits), false]) then { }; }] call EFUNC(common,addEventhandler); }; + +if (isServer) then { + [QGVAR(switchLocality), { + params ["_unit", "_player"]; + _unit setVariable [QGVAR(OriginalOwner), owner _unit, true]; + _unit setOwner (owner _player); + }] call EFUNC(common,addEventHandler); +}; diff --git a/addons/switchunits/config.cpp b/addons/switchunits/config.cpp index 22a4924709..1bdec70729 100644 --- a/addons/switchunits/config.cpp +++ b/addons/switchunits/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"bux578"}; - authorUrl = "https://github.com/bux578/"; + author = ECSTRING(common,ACETeam); + authors[] = {"bux578"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index d29e75b6a4..5d7eac6f1a 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -37,7 +37,7 @@ GVAR(AllMarkerNames) = []; // create markers { if (([_x] call FUNC(isValidAi) && (side group _x in _sides)) || (_x getVariable [QGVAR(IsPlayerControlled), false])) then { - + private _markerName = str _x; private _marker = createMarkerLocal [_markerName, position _x]; diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index a26b2d474a..64cc77c221 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -40,14 +40,7 @@ if (_leave) exitWith { // should switch locality // This doesn't work anymore, because one's now able to switch to units from a different side //[_unit] joinSilent group player; -[ - [_unit, player], - QUOTE({ - (_this select 0) setVariable [ARR_3(QUOTE(QGVAR(OriginalOwner)), owner (_this select 0), true)]; - (_this select 0) setOwner owner (_this select 1) - }), - 1 -] call EFUNC(common,execRemoteFnc); +[QGVAR(switchLocality), [_unit, player]] call EFUNC(common,serverEvent); [{ params ["_args", "_pfhId"]; @@ -79,12 +72,7 @@ if (_leave) exitWith { // set owner back to original owner private _oldOwner = _oldUnit getVariable[QGVAR(OriginalOwner), -1]; if (_oldOwner > -1) then { - [ - [_oldUnit, _oldOwner], - QUOTE({ - (_this select 0) setOwner (_this select 1) - }), 1 - ] call EFUNC(common,execRemoteFnc); + ["setOwner", [_oldUnit, _oldOwner]] call EFUNC(common,serverEvent); }; [localize LSTRING(SwitchedUnit)] call EFUNC(common,displayTextStructured); diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 1ccd4abe90..b1635cfae6 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -20,6 +20,7 @@ Próba zmiany Sto provando a cambiare Intentando cambiar + Essaye de basculer Tentando trocar @@ -161,7 +162,7 @@ Aktiviere eine Sicherheitszone um feindliche Einheiten? Spieler können nicht zu Einheiten in der Sicherheitszone wechseln. Povolit bezpečnou zónu kolem nepřátelských jednotek? Hráči se nemohou změnit strany/jednotky uvnitř bezpečné zóny. Habilitar uma zona segur ao redor das unidades inimigas? Jogadores não conseguirão trocar para unidades dentro dessa zona segura. - Activer une zone sécurisée autour des enemis? Les joueurs ne peuvent changer d'unité dand la zone sécurisée + Activer une zone sécurisée autour des enemis ? Les joueurs ne peuvent changer d'unité dand la zone sécurisée Engedélyezve legyen-e egy biztonságos zóna az ellenségek körül? A játékosok nem tudnak a biztonságos zónán belüli egységekre váltani. Включить безопасную зону вокруг вражеских юнитов? Игроки не могут переключаться на юнитов, находящихся в безопасной зоне. Abilita una zona sicura attorno ad unità nemiche? I giocatori non possono cambiare ad unità dentro la zona sicura. @@ -202,4 +203,4 @@ El módulo permite a las unidades cambiar de bando durante el juego. - \ No newline at end of file + diff --git a/addons/tacticalladder/CfgEventHandlers.hpp b/addons/tacticalladder/CfgEventHandlers.hpp index ed44329687..cb09874dab 100644 --- a/addons/tacticalladder/CfgEventHandlers.hpp +++ b/addons/tacticalladder/CfgEventHandlers.hpp @@ -24,3 +24,9 @@ class Extended_Killed_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/tacticalladder/CfgVehicles.hpp b/addons/tacticalladder/CfgVehicles.hpp index 496ed6fd73..e6525d8edd 100644 --- a/addons/tacticalladder/CfgVehicles.hpp +++ b/addons/tacticalladder/CfgVehicles.hpp @@ -1,4 +1,6 @@ +class CBA_Extended_EventHandlers; + class CfgVehicles { class Man; class CAManBase: Man { @@ -19,8 +21,8 @@ class CfgVehicles { scope = 2; displayName = CSTRING(DisplayName); descriptionShort = ""; - model = PATHTOF(data\ace_tacticalladder_pack.p3d); - picture = PATHTOF(UI\ace_tactical_ladder_pack_ca.paa); + model = QPATHTOF(data\ace_tacticalladder_pack.p3d); + picture = QPATHTOF(UI\ace_tactical_ladder_pack_ca.paa); maximumLoad = 0; mass = 50; }; @@ -34,10 +36,13 @@ class CfgVehicles { class House; class ACE_TacticalLadder: House { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + displayName = CSTRING(DisplayName); class DestructionEffects {}; - model = PATHTOF(data\ace_tacticalladder.p3d); + model = QPATHTOF(data\ace_tacticalladder.p3d); animated = 1; autocenter = 0; featureSize = 12; @@ -87,7 +92,7 @@ class CfgVehicles { distance = 4; condition = "true"; //wait a frame to handle "Do When releasing action menu key" option: - statement = QUOTE([ARR_2({_this call FUNC(positionTL)},[ARR_2(_player,_target)])] call EFUNC(common,execNextFrame)); + statement = QUOTE([ARR_2({_this call FUNC(positionTL)},[ARR_2(_player,_target)])] call CBA_fnc_execNextFrame); showDisabled = 0; exceptions[] = {}; priority = 5; diff --git a/addons/tacticalladder/XEH_missionDisplayLoad.sqf b/addons/tacticalladder/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..05419598b9 --- /dev/null +++ b/addons/tacticalladder/XEH_missionDisplayLoad.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; +_display displayAddEventHandler ["MouseButtonDown", {[ACE_player, _this select 1] call FUNC(cancelTLdeploy)}]; diff --git a/addons/tacticalladder/XEH_postInit.sqf b/addons/tacticalladder/XEH_postInit.sqf index 8ebf776987..ae59629a5a 100644 --- a/addons/tacticalladder/XEH_postInit.sqf +++ b/addons/tacticalladder/XEH_postInit.sqf @@ -8,7 +8,7 @@ GVAR(currentStep) = 3; GVAR(currentAngle) = 0; /*["interactMenuOpened", { - if ((ACE_time > GVAR(cancelTime)) && !isNull GVAR(ladder)) then { + if ((CBA_missionTime > GVAR(cancelTime)) && !isNull GVAR(ladder)) then { GVAR(ladder) call FUNC(cancelTLdeploy); }; }] call EFUNC(common,addEventHandler);*/ @@ -16,8 +16,6 @@ GVAR(currentAngle) = 0; // Cancel adjustment if interact menu opens ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - // Cancel adjusting on player change. ["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); ["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); diff --git a/addons/tacticalladder/config.cpp b/addons/tacticalladder/config.cpp index 02740639fe..11f15ac934 100644 --- a/addons/tacticalladder/config.cpp +++ b/addons/tacticalladder/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_apl", "ace_interaction"}; - author[] = {"Rocko", "Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Rocko", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/tacticalladder/data/model.cfg b/addons/tacticalladder/data/model.cfg index ba19d58c65..bc7da07960 100644 --- a/addons/tacticalladder/data/model.cfg +++ b/addons/tacticalladder/data/model.cfg @@ -35,76 +35,51 @@ class CfgSkeletons { "Camera","Pelvis", "weapon","Spine1", "launcher","Spine1", - //Head skeleton in hierarchy + + // Head skeleton in hierarchy "neck","Spine3", - "neck1","neck", - "head","neck1", - "HeadCutScene","head", - "jaw","head", - "chin","head", - "jaw_rf","head", - "jaw_rm","head", - "jaw_rs","head", - "jaw_lf","head", - "jaw_lm","head", - "jaw_ls","head", - "ear_r","head", - "ear_l","head", - "lip_lc","head", - "lip_lwlb","head", - "lip_lwlf","head", - "lip_lwm","head", - "lip_lwrf","head", - "lip_lwrb","head", - "lip_rc","head", - "lip_uprb","head", - "lip_uprf","head", - "lip_upm","head", - "lip_uplf","head", - "lip_uplb","head", - "nose_tip","head", - "nose_r","head", - "nose_l","head", - "zig_lt","head", - "zig_lm","head", - "zig_lb","head", - "zig_rt","head", - "zig_rm","head", - "zig_rb","head", - "cheek_r","head", - "cheek_l","head", - "eyebrow_lb","head", - "eyebrow_lm","head", - "eyebrow_lf","head", - "corr","head", - "eyebrow_rf","head", - "eyebrow_rm","head", - "eyebrow_rb","head", - "eye_upr","head", - "eye_lwr","head", - "eye_upl","head", - "eye_lwl","head", - "cheek_rf","head", - "cheek_rm","head", - "cheek_rb","head", - "cheek_lf","head", - "cheek_lm","head", - "cheek_lb","head", - "forehead_l","head", - "forehead_m","head", - "forehead_r","head", - "l_eye","head", - "r_eye","head", - "l_pupila","head", - "r_pupila","head", - "neck_t","head", - "neck_b","head", - "neck_r","head", - "neck_l","head", - "tongue_b","head", - "tongue_m","head", - "tongue_f","head", - //Left upper side + "neck1","neck", + "head","neck1", + + // New facial features + "Face_Hub","head", + "Face_Jawbone","Face_Hub", + "Face_Jowl","Face_Jawbone", + "Face_chopRight","Face_Jawbone", + "Face_chopLeft","Face_Jawbone", + "Face_LipLowerMiddle","Face_Jawbone", + "Face_LipLowerLeft","Face_Jawbone", + "Face_LipLowerRight","Face_Jawbone", + "Face_Chin","Face_Jawbone", + "Face_Tongue","Face_Jawbone", + "Face_CornerRight","Face_Hub", + "Face_CheekSideRight","Face_CornerRight", + "Face_CornerLeft","Face_Hub", + "Face_CheekSideLeft","Face_CornerLeft", + "Face_CheekFrontRight","Face_Hub", + "Face_CheekFrontLeft","Face_Hub", + "Face_CheekUpperRight","Face_Hub", + "Face_CheekUpperLeft","Face_Hub", + "Face_LipUpperMiddle","Face_Hub", + "Face_LipUpperRight","Face_Hub", + "Face_LipUpperLeft","Face_Hub", + "Face_NostrilRight","Face_Hub", + "Face_NostrilLeft","Face_Hub", + "Face_Forehead","Face_Hub", + "Face_BrowFrontRight","Face_Forehead", + "Face_BrowFrontLeft","Face_Forehead", + "Face_BrowMiddle","Face_Forehead", + "Face_BrowSideRight","Face_Forehead", + "Face_BrowSideLeft","Face_Forehead", + "Face_Eyelids","Face_Hub", + "Face_EyelidUpperRight","Face_Hub", + "Face_EyelidUpperLeft","Face_Hub", + "Face_EyelidLowerRight","Face_Hub", + "Face_EyelidLowerLeft","Face_Hub", + "EyeLeft","Face_Hub", + "EyeRight","Face_Hub", + + // Left upper side "LeftShoulder","Spine3", "LeftArm","LeftShoulder", "LeftArmRoll","LeftArm", @@ -127,7 +102,8 @@ class CfgSkeletons { "LeftHandThumb1","LeftHand", "LeftHandThumb2","LeftHandThumb1", "LeftHandThumb3","LeftHandThumb2", - //Right upper side + + // Right upper side "RightShoulder","Spine3", "RightArm","RightShoulder", "RightArmRoll","RightArm", @@ -150,25 +126,26 @@ class CfgSkeletons { "RightHandThumb1","RightHand", "RightHandThumb2","RightHandThumb1", "RightHandThumb3","RightHandThumb2", - //Left lower side + + // Left lower side "LeftUpLeg","Pelvis", "LeftUpLegRoll","LeftUpLeg", "LeftLeg","LeftUpLegRoll", "LeftLegRoll","LeftLeg", "LeftFoot","LeftLegRoll", "LeftToeBase","LeftFoot", - //Right lower side + + // Right lower side "RightUpLeg","Pelvis", "RightUpLegRoll","RightUpLeg", "RightLeg","RightUpLegRoll", "RightLegRoll","RightLeg", "RightFoot","RightLegRoll", "RightToeBase","RightFoot" - }; - // location of pivot points (local axes) for hierarchical animation - //pivotsModel="ca\Anims\Characters\Data\Skeleton\SkeletonPivots.p3d"; - pivotsModel=""; - }; + }; + // location of pivot points (local axes) for hierarchical animation + pivotsModel="A3\anims_f\data\skeleton\SkeletonPivots.p3d"; + }; }; class CfgModels { @@ -249,13 +226,14 @@ class CfgModels { }; }; class ArmaMan: Default { - htMin=60; - htMax=1800; - afMax=30; - mfMax=0; - mFact=1; - tBody=37; - sections[]= { + htMin = 60; // Minimum half-cooling time (in seconds) + htMax = 1800; // Maximum half-cooling time (in seconds) + afMax = 30; // Maximum temperature in case the model is alive (in celsius) + mfMax = 0; // Maximum temperature when the model is moving (in celsius) + mFact = 1; // Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)). + tBody = 37; // Metabolism temperature of the model (in celsius) + + sections[] = { "osobnost", "Head_Injury", "Body_Injury", @@ -274,9 +252,11 @@ class CfgModels { "Camo2", "personality", "hl", - "injury_head" + "injury_head", + "insignia", + "ghillie_hide" }; - skeletonName="OFP2_ManSkeleton"; + skeletonName = "OFP2_ManSkeleton"; }; class ace_tacticalladder_pack: ArmaMan { }; diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf index 940b2b612a..b009028c93 100644 --- a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf @@ -3,8 +3,8 @@ * Cancel tactical ladder deployment * * Arguments: - * 0: unit - * 1: ladder + * 0: Unit + * 1: Key * * Return Value: * None @@ -18,23 +18,24 @@ #define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"] -params ["_unit", "_ladder"]; +params ["_unit", "_key"]; + +if (_key != 1 || {isNull GVAR(ladder)}) exitWith {}; // enable running again [_unit, "forceWalk", "ACE_Ladder", false] call EFUNC(common,statusEffect_set); -detach _ladder; +detach GVAR(ladder); -_ladder animate ["rotate", 0]; +GVAR(ladder) animate ["rotate", 0]; { - _ladder animate [_x, 0]; + GVAR(ladder) animate [_x, 0]; } count __ANIMS; // remove mouse buttons and hint call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(Common,removeActionEventHandler); -[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler); GVAR(ladder) = objNull; diff --git a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf index 9d5783b327..3703fe1f47 100644 --- a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf @@ -34,7 +34,6 @@ detach _ladder; call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", _unit getVariable [QGVAR(Deploy), -1]] call EFUNC(common,removeActionEventHandler); -[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler); GVAR(ladder) = objNull; diff --git a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf index c22141ca24..e7d4136526 100644 --- a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf +++ b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf @@ -19,7 +19,7 @@ params ["_scroll"]; if (isNull GVAR(ladder)) exitWith { false }; -if (GETMVAR(ACE_Modifier,0) == 0) then { +if (ACE_Modifier == 0) then { private ["_currentStep"]; // Lengthening if (_scroll > 0) then { diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf index 94e28dea33..c47733dd5a 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -37,7 +37,7 @@ _ladder animate ["rotate", 0]; } count ["extract_1", "extract_2", "extract_3"]; // Extract ladder at head height (extract_3) GVAR(ladder) = _ladder; -GVAR(cancelTime) = ACE_time + 1; // Workaround to prevent accidental canceling +GVAR(cancelTime) = CBA_missionTime + 1; // Workaround to prevent accidental canceling GVAR(currentStep) = 3; GVAR(currentAngle) = 0; @@ -50,9 +50,3 @@ _unit setVariable [QGVAR(Deploy), [ {!isNull GVAR(ladder)}, {[_this select 0, GVAR(ladder)] call FUNC(confirmTLdeploy)} ] call EFUNC(common,addActionEventHandler)]; - -_unit setVariable [QGVAR(Cancel), [ - _unit, "zoomtemp", - {!isNull GVAR(ladder)}, - {[_this select 0, GVAR(ladder)] call FUNC(cancelTLdeploy)} -] call EFUNC(common,addActionEventHandler)]; diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml index c57765c5a6..7a60933ceb 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -46,6 +46,7 @@ Prodloužit Estendi, +Ctrl ruota Extender + Déployer +Ctrl tilt @@ -55,6 +56,8 @@ +Ctrl наклонить +Ctrl naklonit +Ctrl inclinar + +Ctrl incliner + +Ctrl per inclinare Position ladder diff --git a/addons/tagging/CfgVehicles.hpp b/addons/tagging/CfgVehicles.hpp index 602ee41d33..d384a2b01b 100644 --- a/addons/tagging/CfgVehicles.hpp +++ b/addons/tagging/CfgVehicles.hpp @@ -3,59 +3,33 @@ class CfgVehicles { class CAManBase: Man { class ACE_SelfActions { class ACE_Equipment { - class ACE_tagWallBlack { - displayName = CSTRING(tagWallBlack); + class ACE_TagBlack { + displayName = CSTRING(TagBlack); condition = QUOTE(('ACE_SpraypaintBlack' in items ACE_player) && {[] call FUNC(checkTaggable)}); - statement = QUOTE([ARR_2(ACE_player,'black')] call FUNC(tagWall)); + statement = QUOTE([ARR_2(ACE_player,'black' call FUNC(getTexture))] call FUNC(tag)); showDisabled = 0; priority = 3; - icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlack.paa)); + icon = QPATHTOF(UI\icons\iconTaggingBlack.paa); }; - class ACE_tagWallRed: ACE_tagWallBlack { - displayName = CSTRING(tagWallRed); + class ACE_TagRed: ACE_TagBlack { + displayName = CSTRING(TagRed); condition = QUOTE(('ACE_SpraypaintRed' in items ACE_player) && {[] call FUNC(checkTaggable)}); - statement = QUOTE([ARR_2(ACE_player,'red')] call FUNC(tagWall)); - icon = QUOTE(PATHTOF(UI\icons\iconTaggingRed.paa)); - }; - class ACE_tagWallGreen: ACE_tagWallBlack { - displayName = CSTRING(tagWallGreen); + statement = QUOTE([ARR_2(ACE_player,'red' call FUNC(getTexture))] call FUNC(tag)); + icon = QPATHTOF(UI\icons\iconTaggingRed.paa); + }; + class ACE_TagGreen: ACE_TagBlack { + displayName = CSTRING(TagGreen); condition = QUOTE(('ACE_SpraypaintGreen' in items ACE_player) && {[] call FUNC(checkTaggable)}); - statement = QUOTE([ARR_2(ACE_player,'green')] call FUNC(tagWall)); - icon = QUOTE(PATHTOF(UI\icons\iconTaggingGreen.paa)); - }; - class ACE_tagWallBlue: ACE_tagWallBlack { - displayName = CSTRING(tagWallBlue); + statement = QUOTE([ARR_2(ACE_player,'green' call FUNC(getTexture))] call FUNC(tag)); + icon = QPATHTOF(UI\icons\iconTaggingGreen.paa); + }; + class ACE_TagBlue: ACE_TagBlack { + displayName = CSTRING(TagBlue); condition = QUOTE(('ACE_SpraypaintBlue' in items ACE_player) && {[] call FUNC(checkTaggable)}); - statement = QUOTE([ARR_2(ACE_player,'blue')] call FUNC(tagWall)); - icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlue.paa)); + statement = QUOTE([ARR_2(ACE_player,'blue' call FUNC(getTexture))] call FUNC(tag)); + icon = QPATHTOF(UI\icons\iconTaggingBlue.paa); }; - /*class ACE_tagGroundBlack { - displayName = CSTRING(tagGroundBlack); - condition = QUOTE('ACE_SpraypaintBlack' in items ACE_player); - statement = QUOTE([ARR_2(ACE_player, 'black')] call FUNC(tagGround)); - showDisabled = 0; - priority = 3; - icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlack.paa)); - }; - class ACE_tagGroundRed: ACE_tagGroundBlack { - displayName = CSTRING(tagGroundRed); - condition = QUOTE('ACE_SpraypaintRed' in items ACE_player); - statement = QUOTE([ARR_2(ACE_player, 'red')] call FUNC(tagGround)); - icon = QUOTE(PATHTOF(UI\icons\iconTaggingRed.paa)); - }; - class ACE_tagGroundGreen: ACE_tagGroundBlack { - displayName = CSTRING(tagGroundGreen); - condition = QUOTE('ACE_SpraypaintGreen' in items ACE_player); - statement = QUOTE([ARR_2(ACE_player, 'green')] call FUNC(tagGround)); - icon = QUOTE(PATHTOF(UI\icons\iconTaggingGreen.paa)); - }; - class ACE_tagGroundBlue: ACE_tagGroundBlack { - displayName = CSTRING(tagGroundBlue); - condition = QUOTE('ACE_SpraypaintBlue' in items ACE_player); - statement = QUOTE([ARR_2(ACE_player, 'blue')] call FUNC(tagGround)); - icon = QUOTE(PATHTOF(UI\icons\iconTaggingBlue.paa)); - };*/ - }; + }; }; }; @@ -64,26 +38,26 @@ class CfgVehicles { author = "jokoho48"; scope = 2; scopeCurator = 2; - displayName = CSTRING(spraypaintBlack); + displayName = CSTRING(SpraypaintBlack); vehicleClass = "Items"; class TransportItems { MACRO_ADDITEM(ACE_SpraypaintBlack,1); }; }; class ACE_Item_SpraypaintRed: ACE_Item_SpraypaintBlack { - displayName = CSTRING(spraypaintRed); + displayName = CSTRING(SpraypaintRed); class TransportItems { MACRO_ADDITEM(ACE_SpraypaintRed,1); }; }; class ACE_Item_SpraypaintGreen: ACE_Item_SpraypaintBlack { - displayName = CSTRING(spraypaintGreen); + displayName = CSTRING(SpraypaintGreen); class TransportItems { MACRO_ADDITEM(ACE_SpraypaintGreen,1); }; }; class ACE_Item_SpraypaintBlue: ACE_Item_SpraypaintBlack { - displayName = CSTRING(spraypaintBlue); + displayName = CSTRING(SpraypaintBlue); class TransportItems { MACRO_ADDITEM(ACE_SpraypaintBlue,1); }; @@ -98,4 +72,4 @@ class CfgVehicles { MACRO_ADDITEM(ACE_SpraypaintGreen,5); }; }; -}; \ No newline at end of file +}; diff --git a/addons/tagging/CfgWeapons.hpp b/addons/tagging/CfgWeapons.hpp index a805a75679..1984b3b14a 100644 --- a/addons/tagging/CfgWeapons.hpp +++ b/addons/tagging/CfgWeapons.hpp @@ -6,28 +6,28 @@ class CfgWeapons { author = "jokoho48"; displayname = CSTRING(spraypaintBlack); descriptionShort = CSTRING(descSpraypaint); - picture = QUOTE(PATHTOF(UI\items\itemSpraypaintBlack.paa)); - model = QUOTE(PATHTOF(data\SprayCan.p3d)); + picture = QPATHTOF(UI\items\itemSpraypaintBlack.paa); + model = QPATHTOF(data\SprayCan.p3d); scope = 2; hiddenSelections[] = {"camo"}; - hiddenSelectionsTextures[] = {QUOTE(PATHTOF(data\spraycanBlack_co.paa))}; + hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanBlack_co.paa)}; class ItemInfo: InventoryItem_Base_F { mass = 10; }; }; class ACE_SpraypaintRed : ACE_SpraypaintBlack { displayname = CSTRING(spraypaintRed); - picture = QUOTE(PATHTOF(UI\items\itemSpraypaintRed.paa)); - hiddenSelectionsTextures[] = {QUOTE(PATHTOF(data\spraycanRed_co.paa))}; + picture = QPATHTOF(UI\items\itemSpraypaintRed.paa); + hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanRed_co.paa)}; }; class ACE_SpraypaintGreen : ACE_SpraypaintBlack { displayname = CSTRING(spraypaintGreen); - picture = QUOTE(PATHTOF(UI\items\itemSpraypaintGreen.paa)); - hiddenSelectionsTextures[] = {QUOTE(PATHTOF(data\spraycanGreen_co.paa))}; + picture = QPATHTOF(UI\items\itemSpraypaintGreen.paa); + hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanGreen_co.paa)}; }; class ACE_SpraypaintBlue : ACE_SpraypaintBlack { displayname = CSTRING(spraypaintBlue); - picture = QUOTE(PATHTOF(UI\items\itemSpraypaintBlue.paa)); - hiddenSelectionsTextures[] = {QUOTE(PATHTOF(data\spraycanBlue_co.paa))}; + picture = QPATHTOF(UI\items\itemSpraypaintBlue.paa); + hiddenSelectionsTextures[] = {QPATHTOF(data\spraycanBlue_co.paa)}; }; }; diff --git a/addons/tagging/XEH_PREP.hpp b/addons/tagging/XEH_PREP.hpp index eb29d5a9e3..f8a8598cd7 100644 --- a/addons/tagging/XEH_PREP.hpp +++ b/addons/tagging/XEH_PREP.hpp @@ -1,7 +1,5 @@ - PREP(checkTaggable); PREP(createTag); -PREP(tagDirection); -PREP(tagGround); -PREP(tagWall); +PREP(getTexture); +PREP(tag); PREP(tagTestingThread); diff --git a/addons/tagging/config.cpp b/addons/tagging/config.cpp index dcd1fb845d..a4161c1862 100644 --- a/addons/tagging/config.cpp +++ b/addons/tagging/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {"ACE_SpraypaintBlack", "ACE_SpraypaintRed", "ACE_SpraypaintGreen", "ACE_SpraypaintBlue"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"BaerMitUmlaut","esteldunedain"}; - authorUrl = "https://github.com/BaerMitUmlaut"; + author = ECSTRING(common,ACETeam); + authors[] = {"BaerMitUmlaut","esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/tagging/functions/fnc_checkTaggable.sqf b/addons/tagging/functions/fnc_checkTaggable.sqf index 4c8f0c750a..b77473f25b 100644 --- a/addons/tagging/functions/fnc_checkTaggable.sqf +++ b/addons/tagging/functions/fnc_checkTaggable.sqf @@ -1,5 +1,5 @@ /* - * Author: BaerMitUmlaut and esteldunedain + * Author: BaerMitUmlaut, esteldunedain * Checks if there is a taggable surface within 2.5m in front of the player. * * Arguments: diff --git a/addons/tagging/functions/fnc_createTag.sqf b/addons/tagging/functions/fnc_createTag.sqf index fdb2cd08b0..4f83196524 100644 --- a/addons/tagging/functions/fnc_createTag.sqf +++ b/addons/tagging/functions/fnc_createTag.sqf @@ -1,37 +1,42 @@ /* - * Author: BaerMitUmlaut and esteldunedain + * Author: BaerMitUmlaut, esteldunedain * Creates a tag and handle its destruction. Only execute on the server. * * Arguments: * 0: Position ASL * 1: Vector dir and up - * 2: Colour of the tag (valid colours are black, red, green and blue) - * 3: Object it should be tied too + * 2: Colour of the tag (valid colours are black, red, green and blue or full path to custom texture) + * 3: Object it should be tied to + * 4: Unit that created the tag * * Return Value: - * None + * Tag created * * Example: - * [positionASL, vectorDirAndUp, "black", object] call ace_tagging_fnc_createTag + * [positionASL, vectorDirAndUp, "z\ace\addons\tagging\UI\tags\black\0.paa", object] call ace_tagging_fnc_createTag * * Public: No */ #include "script_component.hpp" -params ["_tagPosASL", "_vectorDirAndUp", "_color", "_object"]; -TRACE_4("createTag:", _tagPosASL, _vectorDirAndUp, _color, _object); +params ["_tagPosASL", "_vectorDirAndUp", "_texture", "_object", "_unit"]; +TRACE_5("createTag:",_tagPosASL,_vectorDirAndUp,_texture,_object,_unit); -if !((toLower _color) in ["black", "red", "green", "blue"]) exitWith { - ACE_LOGERROR_1("%1 is not a valid tag colour.", _color); +if (_texture == "") exitWith { + ACE_LOGERROR_1("%1 is not a valid tag texture.",_texture); + false }; private _tag = "UserTexture1m_F" createVehicle [0,0,0]; -_tag setObjectTextureGlobal [0, '\z\ace\addons\tagging\UI\tags\' + _color + '\' + str (floor (random 3)) + '.paa']; +_tag setObjectTextureGlobal [0, _texture]; _tag setPosASL _tagPosASL; _tag setVectorDirAndUp _vectorDirAndUp; -if (isNull _object) exitWith {}; +// Throw a global event for mision makers +["tagCreated", [_tag, _texture, _object, _unit]] call EFUNC(common,globalEvent); + +if (isNull _object) exitWith {true}; // If the tag is applied to an object, handle its destruction _object setVariable [QGVAR(testVar), true]; @@ -69,3 +74,5 @@ GVAR(tagsToTest) pushBack [_tag, _tagPosASL, _vectorDirAndUp]; if (!GVAR(testingThread)) then { call FUNC(tagTestingThread); }; + +true diff --git a/addons/tagging/functions/fnc_getTexture.sqf b/addons/tagging/functions/fnc_getTexture.sqf new file mode 100644 index 0000000000..f7f6d7e5e2 --- /dev/null +++ b/addons/tagging/functions/fnc_getTexture.sqf @@ -0,0 +1,26 @@ +/* + * Author: BaerMitUmlaut, esteldunedain, Jonpas + * Puts together a full path to the given tag color texture. Internal ACE3 textures only. + * + * Arguments: + * 0: The colour of the tag (valid colours are black, red, green and blue) + * + * Return Value: + * Texture (full path), "" if not found + * + * Example: + * texture = ["blue"] call ace_tagging_fnc_getTexture + * + * Public: No + */ + +#include "script_component.hpp" + +params ["_color"]; + +if !((toLower _color) in ["black", "red", "green", "blue"]) exitWith { + ACE_LOGERROR_1("%1 is not a valid tag colour.",_color); + "" +}; + +QUOTE(PATHTOF(UI)) + "\tags\" + _color + "\" + str (floor (random 3)) + ".paa" diff --git a/addons/tagging/functions/fnc_tagDirection.sqf b/addons/tagging/functions/fnc_tag.sqf similarity index 76% rename from addons/tagging/functions/fnc_tagDirection.sqf rename to addons/tagging/functions/fnc_tag.sqf index 2c03d97fd0..c2b4a6601a 100644 --- a/addons/tagging/functions/fnc_tagDirection.sqf +++ b/addons/tagging/functions/fnc_tag.sqf @@ -1,25 +1,35 @@ /* - * Author: BaerMitUmlaut and esteldunedain - * If possible, create a tag on the first surface between Start and End positions + * Author: BaerMitUmlaut, esteldunedain + * Creates a tag on a wall that is on the closest surface within 2m on front of the unit. * * Arguments: - * 0: Unit - * 1: Start position ASL - * 2: End position ASL - * 3: The colour of the tag (valid colours are black, red, green and blue) + * 0: Unit + * 1: The colour of the tag (valid colours are black, red, green and blue or full path to custom texture) * * Return Value: - * Sucess + * Sucess * * Example: - * [startPosASL, directiom "blue"] call ace_tagging_fnc_tagDirection + * success = [player, "z\ace\addons\tagging\UI\tags\black\0.paa"] call ace_tagging_fnc_tag * - * Public: No + * Public: Yes */ #include "script_component.hpp" -params ["_unit", "_startPosASL", "_endPosASL", "_color"]; +params [ + ["_unit", objNull, [objNull]], + ["_texture", "", [""]] +]; + +if (isNull _unit || {_texture == ""}) exitWith { + ACE_LOGERROR_2("Tag parameters invalid. Unit: %1, Texture: %2",_unit,_texture); +}; + +private _startPosASL = eyePos _unit; +private _cameraPosASL = AGLToASL positionCameraToWorld [0, 0, 0]; +private _cameraDir = (AGLToASL positionCameraToWorld [0, 0, 1]) vectorDiff _cameraPosASL; +private _endPosASL = _startPosASL vectorAdd (_cameraDir vectorMultiply 2.5); // Check for intersections below the unit private _intersections = lineIntersectsSurfaces [_startPosASL, _endPosASL, _unit, objNull, true, 1, "GEOM", "FIRE"]; @@ -79,8 +89,6 @@ _fnc_isOk = { true }; -#define TAG_SIZE 0.6 - if ( !([ 0.5*TAG_SIZE, 0.5*TAG_SIZE] call _fnc_isOk) || {!([ 0.5*TAG_SIZE,-0.5*TAG_SIZE] call _fnc_isOk) || {!([-0.5*TAG_SIZE, 0.5*TAG_SIZE] call _fnc_isOk) || @@ -102,6 +110,6 @@ _unit playActionNow "PutDown"; // Tell the server to create the tag and handle its destruction ["createTag", _this] call EFUNC(common,serverEvent); -}, [_touchingPoint vectorAdd (_surfaceNormal vectorMultiply 0.06), _vectorDirAndUp, _color, _object, _unit], 0.6] call EFUNC(common,waitAndExecute); +}, [_touchingPoint vectorAdd (_surfaceNormal vectorMultiply 0.06), _vectorDirAndUp, _texture, _object, _unit], 0.6] call CBA_fnc_waitAndExecute; true diff --git a/addons/tagging/functions/fnc_tagGround.sqf b/addons/tagging/functions/fnc_tagGround.sqf deleted file mode 100644 index fa8d1795bf..0000000000 --- a/addons/tagging/functions/fnc_tagGround.sqf +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Author: BaerMitUmlaut and esteldunedain - * Creates a tag on the ground beneath the unit - * - * Arguments: - * 0: Unit - * 1: The colour of the tag (valid colours are black, red, green and blue) - * - * Return Value: - * None - * - * Example: - * [player, "blue"] call ace_tagging_fnc_tagGround - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_unit", "_color"]; - -private _startPosASL = getPosASL _unit; -private _endPosASL = _startPosASL vectorAdd [0, 0, -2] vectorAdd eyeDirection _unit; - -[_unit, _startPosASL, _endPosASL, _color] call FUNC(tagDirection); diff --git a/addons/tagging/functions/fnc_tagTestingThread.sqf b/addons/tagging/functions/fnc_tagTestingThread.sqf index 18d14e2e4f..ead21f8d91 100644 --- a/addons/tagging/functions/fnc_tagTestingThread.sqf +++ b/addons/tagging/functions/fnc_tagTestingThread.sqf @@ -16,8 +16,8 @@ #include "script_component.hpp" -_fnc_isLeaning = { - params ["_tag", "_tagPosASL", "_vectorDirAndUp"]; +GVAR(tagsToTest) = GVAR(tagsToTest) select { + _x params ["_tag", "_tagPosASL", "_vectorDirAndUp"]; _vectorDirAndUp params ["_v1", "_v2"]; @@ -34,7 +34,6 @@ _fnc_isLeaning = { }; true }; -GVAR(tagsToTest) = [GVAR(tagsToTest), _fnc_isLeaning] call EFUNC(common,filter); // If there's no more tag if (GVAR(tagsToTest) isEqualTo []) exitWith { @@ -42,5 +41,5 @@ if (GVAR(tagsToTest) isEqualTo []) exitWith { }; // Schedule for execution again after 5 seconds -[DFUNC(tagTestingThread), [], 5] call EFUNC(common,waitAndExecute); +[DFUNC(tagTestingThread), [], 5] call CBA_fnc_waitAndExecute; GVAR(testingThread) = true; diff --git a/addons/tagging/functions/fnc_tagWall.sqf b/addons/tagging/functions/fnc_tagWall.sqf deleted file mode 100644 index 9b6485f4e8..0000000000 --- a/addons/tagging/functions/fnc_tagWall.sqf +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Author: BaerMitUmlaut and esteldunedain - * Creates a tag on a wall that is on the closest surface within 2m on front of the unit. - * - * Arguments: - * 0: Unit - * 1: The colour of the tag (valid colours are black, red, green and blue) - * - * Return Value: - * None - * - * Example: - * [player, "blue"] call ace_tagging_fnc_tagWall - * - * Public: No - */ - -#include "script_component.hpp" - -params ["_unit", "_color"]; - -private _startPosASL = eyePos _unit; -private _cameraPosASL = AGLToASL positionCameraToWorld [0, 0, 0]; -private _cameraDir = (AGLToASL positionCameraToWorld [0, 0, 1]) vectorDiff _cameraPosASL; -private _endPosASL = _startPosASL vectorAdd (_cameraDir vectorMultiply 2.5); - -[_unit, _startPosASL, _endPosASL, _color] call FUNC(tagDirection); diff --git a/addons/tagging/script_component.hpp b/addons/tagging/script_component.hpp index 4217989fde..4836d2f209 100644 --- a/addons/tagging/script_component.hpp +++ b/addons/tagging/script_component.hpp @@ -1,8 +1,10 @@ #define COMPONENT tagging #include "\z\ace\addons\main\script_mod.hpp" -#define DEBUG_MODE_FULL -#define DISABLE_COMPILE_CACHE +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS +// #define ENABLE_PERFORMANCE_COUNTERS #ifdef DEBUG_ENABLED_BLANK #define DEBUG_MODE_FULL @@ -13,3 +15,6 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + + +#define TAG_SIZE 0.6 diff --git a/addons/tagging/stringtable.xml b/addons/tagging/stringtable.xml index a6a2ac4ae3..43f6a1e2d4 100644 --- a/addons/tagging/stringtable.xml +++ b/addons/tagging/stringtable.xml @@ -1,95 +1,94 @@  - + Tag black Schwarz markieren Marcar en negro Oznakuj na czarno + Tag noir + Marca nero + Označit černě Marcar em preto - + Tag red Rot markieren Marcar en rojo Oznakuj na czerwono + Tag rouge + Marca rosso + Označit červeně Marcar em vermelho - + Tag green Grün markieren Marcar en verde Oznakuj na zielono + Tag vert + Marca verde + Označit zeleně Marcar em verde - + Tag blue Blau markieren Marcar en azul Oznakuj na niebiesko + Tag bleu + Marca blu + Označit modře Marcar em azul - - Tag ground black - Boden schwarz markieren - Oznakuj ziemię na czarno - Marcar suelo en negro - Marcar chão em preto - - - Tag ground red - Boden rot markieren - Oznakuj ziemię na czerwono - Marcar suelo en rojo - Marcar chão em vermelho - - - Tag ground green - Boden grün markieren - Oznakuj ziemię na zielono - Marcar suelo en verde - Marcar chão em verde - - - Tag ground blue - Boden blau markieren - Oznakuj ziemię na niebiesko - Marcar suelo en azul - Marcar chão em azul - - + Black spray paint Schwarze Sprühfarbe Pintura negra Czarna farba w sprayu + Peinture pulvérisée noire + Bomboletta spray nera + Černý sprej Spray de tinta preta - + Red spray paint Rote Sprühfarbe Pintura roja Czerwona farba w sprayu + Peinture pulvérisée rouge + Bomboletta spray rossa + Červený sprej Spray de tinta vermelha - + Green spray paint Grüne Sprühfarbe Pintura verde Zielona farba w sprayu + Peinture pulvérisée verte + Bomboletta spray verde + Zelený sprej Spray de tinta verde - + Blue spray paint Blaue Sprühfarbe Pintura azul Niebieska farba w sprayu + Peinture pulvérisée bleue + Bomboletta spray blu + Modrý sprej Spray de tinta azul - + A can of spray paint for tagging walls. Eine Farbsprühdose um Wände zu markieren. Lata de pintura en aerosol para marcar. Farba w sprayu, służy do oznakowywania terenu. + Un spray de peinture pour taguer les murs. + Una bomboletta di spay per contrassegnare i muri. + Plechovka se sprejem k vytváření značek. Uma lata de tinta spray para marcar paredes. diff --git a/addons/testmissions/$PBOPREFIX$ b/addons/testmissions/$PBOPREFIX$ deleted file mode 100644 index c899a56127..0000000000 --- a/addons/testmissions/$PBOPREFIX$ +++ /dev/null @@ -1 +0,0 @@ -z\ace\addons\testmissions \ No newline at end of file diff --git a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/description.ext b/addons/testmissions/MPMissions/ACETestingMap1.Stratis/description.ext deleted file mode 100644 index d61b2cf200..0000000000 --- a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/description.ext +++ /dev/null @@ -1,17 +0,0 @@ -enableDebugConsole = 2; //note security risk - -// respawn = "GROUP"; -respawn = "BASE"; -// respawn = "BIRD"; -respawnDelay = 2; - -class Header { - gameType = Coop; - minPlayers = 1; - maxPlayers = 491; -}; - -onLoadName = "ACE3 Testing"; -// onLoadMission = ""; -// author = ""; -// loadScreen = ""; \ No newline at end of file diff --git a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/init.sqf b/addons/testmissions/MPMissions/ACETestingMap1.Stratis/init.sqf deleted file mode 100644 index f2c95b8ca2..0000000000 --- a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/init.sqf +++ /dev/null @@ -1 +0,0 @@ -enableSaving [false, false]; diff --git a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm b/addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm deleted file mode 100644 index 08bba0bcb1..0000000000 --- a/addons/testmissions/MPMissions/ACETestingMap1.Stratis/mission.sqm +++ /dev/null @@ -1,1248 +0,0 @@ -version=12; -class Mission -{ - addOns[]= - { - "A3_Characters_F_BLUFOR", - "a3_characters_f", - "a3_map_stratis", - "A3_armor_f_beta_APC_Tracked_02", - "A3_Characters_F_INDEP", - "ace_vehiclelock", - "A3_Soft_F_MRAP_01", - "A3_Soft_F_Car", - "ace_map", - "A3_Static_F_Gamma_AA", - "A3_Static_F_Mortar_01", - "A3_Static_F_Gamma", - "a3_static_f", - "ace_captives", - "A3_Armor_F_Slammer", - "A3_Air_F_Beta_Heli_Attack_01", - "ace_medical", - "ace_common", - "A3_Weapons_F_Ammoboxes", - "A3_Armor_F_EPB_APC_tracked_03", - "A3_Air_F_Heli_Light_01", - "A3_Air_F_Beta_Heli_Transport_01", - "A3_Armor_F_T100K", - "A3_Boat_F_Boat_Armed_01", - "A3_Boat_F_Civilian_Boat", - "A3_Boat_F_Boat_Transport_01", - "A3_Characters_F_Gamma", - "A3_Air_F_Gamma_UAV_02", - "A3_Static_F_Gamma_AT" - }; - addOnsAuto[]= - { - "A3_Characters_F_BLUFOR", - "a3_characters_f", - "A3_Characters_F_INDEP", - "ace_vehiclelock", - "ace_captives", - "A3_Air_F_Gamma_UAV_02", - "A3_Characters_F_Gamma", - "A3_Soft_F_MRAP_01", - "A3_Soft_F_Car", - "A3_Static_F_Gamma_AA", - "A3_Static_F_Mortar_01", - "A3_Static_F_Gamma", - "a3_static_f", - "A3_Armor_F_Slammer", - "ace_medical", - "ace_common", - "A3_Weapons_F_Ammoboxes", - "A3_Armor_F_EPB_APC_tracked_03", - "A3_Air_F_Beta_Heli_Attack_01", - "A3_Air_F_Heli_Light_01", - "A3_Air_F_Beta_Heli_Transport_01", - "A3_Armor_F_T100K", - "A3_Boat_F_Boat_Armed_01", - "A3_Boat_F_Civilian_Boat", - "A3_Boat_F_Boat_Transport_01", - "A3_Static_F_Gamma_AT", - "a3_map_stratis" - }; - randomSeed=709402; - class Intel - { - startWeather=0; - startWind=0; - startWaves=0.099999994; - forecastWeather=0; - forecastWind=0; - forecastWaves=0.099999994; - forecastLightnings=0.099999994; - year=2035; - month=7; - day=6; - hour=12; - minute=0; - startFogDecay=0.013; - forecastFogDecay=0.013; - }; - class Groups - { - items=19; - class Item0 - { - side="WEST"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1716.1971,5.5,5752.0244}; - azimut=-50.831005; - id=0; - side="WEST"; - vehicle="B_Soldier_F"; - player="PLAY CDG"; - leader=1; - skill=0.60000002; - init="this addItem ""ACE_key_civ"""; - description="Keys For CD"; - syncId=0; - synchronizations[]={3}; - }; - }; - }; - class Item1 - { - side="GUER"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1709.5989,5.5,5740.709}; - azimut=-67.220284; - id=1; - side="GUER"; - vehicle="I_soldier_F"; - player="PLAY CDG"; - leader=1; - skill=0.60000002; - init="this addItem ""ACE_key_east"""; - description="Keys for AB"; - syncId=1; - synchronizations[]={2}; - }; - }; - }; - class Item2 - { - side="LOGIC"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1712.0765,5.5,5743.5811}; - id=2; - side="LOGIC"; - vehicle="ACE_VehicleLock_ModuleSyncedAssign"; - leader=1; - lock="UNLOCKED"; - skill=0.60000002; - syncId=2; - synchronizations[]={1,6}; - }; - }; - }; - class Item3 - { - side="LOGIC"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1714.5892,5.5,5748.7002}; - id=3; - side="LOGIC"; - vehicle="ACE_VehicleLock_ModuleSyncedAssign"; - leader=1; - lock="UNLOCKED"; - skill=0.60000002; - syncId=3; - synchronizations[]={7,0}; - }; - }; - }; - class Item4 - { - side="LOGIC"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1715.7699,5.5,5745.752}; - class args - { - items=3; - class Item0 - { - value="1"; - parentCls="ACE_VehicleLock_ModuleSetup"; - typeName="LockVehicleInventory"; - }; - class Item1 - { - value="0"; - parentCls="ACE_VehicleLock_ModuleSetup"; - typeName="SetLockState"; - }; - class Item2 - { - value="15"; - parentCls="ACE_VehicleLock_ModuleSetup"; - typeName="DefaultLockpickStrength"; - }; - }; - id=4; - side="LOGIC"; - vehicle="ACE_VehicleLock_ModuleSetup"; - leader=1; - lock="UNLOCKED"; - skill=0.60000002; - }; - }; - }; - class Item5 - { - side="WEST"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1703.6329,5.5,5730.1909}; - azimut=119.576; - id=5; - side="WEST"; - vehicle="B_Soldier_F"; - player="PLAY CDG"; - leader=1; - skill=0.60000002; - text="Q"; - init="nul = this spawn {sleep 3; [_this] call ace_medical_fnc_setUnconscious};"; - description="Q Unconscious at start"; - }; - }; - }; - class Item6 - { - side="WEST"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1702.6882,5.5,5728.8687}; - azimut=103.13899; - id=6; - side="WEST"; - vehicle="B_Soldier_F"; - player="PLAY CDG"; - leader=1; - skill=0.60000002; - text="a1"; - description="Surrender At Start"; - syncId=4; - synchronizations[]={5}; - }; - }; - }; - class Item7 - { - side="LOGIC"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1701.0719,5.5,5727.5586}; - azimut=15.1769; - id=7; - side="LOGIC"; - vehicle="ace_captives_ModuleSurrender"; - leader=1; - lock="UNLOCKED"; - skill=0.60000002; - syncId=5; - synchronizations[]={4}; - }; - }; - }; - class Item8 - { - side="WEST"; - class Vehicles - { - items=4; - class Item0 - { - position[]={1703.7711,5.5,5715.2427}; - azimut=11.294894; - id=8; - side="WEST"; - vehicle="B_Soldier_TL_F"; - player="PLAY CDG"; - leader=1; - rank="CORPORAL"; - skill=0.60000002; - text="GrpNATO_A1_0"; - description="NATO Alpha 1 Fireteam Leader"; - }; - class Item1 - { - position[]={1706.2533,5.5,5712.9951}; - azimut=11.294894; - id=9; - side="WEST"; - vehicle="B_Soldier_LAT_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_A1_1"; - description="NATO Alpha 1 Rifleman (AT)"; - }; - class Item2 - { - position[]={1709.2836,5.5,5712.2866}; - azimut=11.294894; - id=10; - side="WEST"; - vehicle="B_Soldier_AAR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_A1_2"; - description="NATO Alpha 1 Assistant Automatic Rifleman"; - }; - class Item3 - { - position[]={1712.4042,5.5,5711.6323}; - azimut=11.294894; - id=11; - side="WEST"; - vehicle="B_Soldier_AR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_A1_3"; - description="NATO Alpha 1 Automatic Rifleman"; - }; - }; - }; - class Item9 - { - side="WEST"; - class Vehicles - { - items=4; - class Item0 - { - position[]={1700.8379,5.5,5704.4658}; - azimut=11.294894; - id=12; - side="WEST"; - vehicle="B_Soldier_TL_F"; - player="PLAY CDG"; - leader=1; - rank="CORPORAL"; - skill=0.60000002; - text="GrpNATO_A2_0"; - description="NATO Alpha 2 Fireteam Leader"; - }; - class Item1 - { - position[]={1703.1456,5.5,5702.0576}; - azimut=11.294894; - id=13; - side="WEST"; - vehicle="B_Soldier_LAT_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_A2_1"; - description="NATO Alpha 2 Rifleman (AT)"; - }; - class Item2 - { - position[]={1706.1492,5.5,5701.3618}; - azimut=11.294894; - id=14; - side="WEST"; - vehicle="B_Soldier_AAR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_A2_2"; - description="NATO Alpha 2 Assistant Automatic Rifleman"; - }; - class Item3 - { - position[]={1709.3947,5.5,5700.7007}; - azimut=11.294894; - id=15; - side="WEST"; - vehicle="B_Soldier_AR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_A2_3"; - description="NATO Alpha 2 Automatic Rifleman"; - }; - }; - }; - class Item10 - { - side="WEST"; - class Vehicles - { - items=4; - class Item0 - { - position[]={1696.9097,5.5,5693.7847}; - azimut=11.294894; - id=16; - side="WEST"; - vehicle="B_Soldier_TL_F"; - player="PLAY CDG"; - leader=1; - rank="CORPORAL"; - skill=0.60000002; - text="GrpNATO_A3_0"; - description="NATO Alpha 3 Fireteam Leader"; - }; - class Item1 - { - position[]={1699.3469,5.5,5691.3257}; - azimut=11.294894; - id=17; - side="WEST"; - vehicle="B_Soldier_LAT_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_A3_1"; - description="NATO Alpha 3 Rifleman (AT)"; - }; - class Item2 - { - position[]={1702.4423,5.5,5690.4912}; - azimut=11.294894; - id=18; - side="WEST"; - vehicle="B_Soldier_AAR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_A3_2"; - description="NATO Alpha 3 Assistant Automatic Rifleman"; - }; - class Item3 - { - position[]={1705.6521,5.5,5689.7666}; - azimut=11.294894; - id=19; - side="WEST"; - vehicle="B_Soldier_AR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_A3_3"; - description="NATO Alpha 3 Automatic Rifleman"; - }; - }; - }; - class Item11 - { - side="WEST"; - class Vehicles - { - items=4; - class Item0 - { - position[]={1685.6747,5.5,5720.1187}; - azimut=11.294894; - id=20; - side="WEST"; - vehicle="B_Soldier_TL_F"; - player="PLAY CDG"; - leader=1; - rank="CORPORAL"; - skill=0.60000002; - text="GrpNATO_B1_0"; - description="NATO Bravo 1 Fireteam Leader"; - }; - class Item1 - { - position[]={1688.1687,5.5,5717.9639}; - azimut=11.294894; - id=21; - side="WEST"; - vehicle="B_Soldier_LAT_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_B1_1"; - description="NATO Bravo 1 Rifleman (AT)"; - }; - class Item2 - { - position[]={1691.0776,5.5,5717.2754}; - azimut=11.294894; - id=22; - side="WEST"; - vehicle="B_Soldier_AAR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_B1_2"; - description="NATO Bravo 1 Assistant Automatic Rifleman"; - }; - class Item3 - { - position[]={1694.293,5.5,5716.6172}; - azimut=11.294894; - id=23; - side="WEST"; - vehicle="B_Soldier_AR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_B1_3"; - description="NATO Bravo 1 Automatic Rifleman"; - }; - }; - }; - class Item12 - { - side="WEST"; - class Vehicles - { - items=4; - class Item0 - { - position[]={1682.364,5.5,5709.4131}; - azimut=11.294894; - id=24; - side="WEST"; - vehicle="B_Soldier_TL_F"; - player="PLAY CDG"; - leader=1; - rank="CORPORAL"; - skill=0.60000002; - text="GrpNATO_B2_0"; - description="NATO Bravo 2 Fireteam Leader"; - }; - class Item1 - { - position[]={1685.1151,5.5,5707.0654}; - azimut=11.294894; - id=25; - side="WEST"; - vehicle="B_Soldier_LAT_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_B2_1"; - description="NATO Bravo 2 Rifleman (AT)"; - }; - class Item2 - { - position[]={1688.1718,5.5,5706.313}; - azimut=11.294894; - id=26; - side="WEST"; - vehicle="B_Soldier_AAR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_B2_2"; - description="NATO Bravo 2 Assistant Automatic Rifleman"; - }; - class Item3 - { - position[]={1691.5254,5.5,5705.6113}; - azimut=11.294894; - id=27; - side="WEST"; - vehicle="B_Soldier_AR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_B2_3"; - description="NATO Bravo 2 Automatic Rifleman"; - }; - }; - }; - class Item13 - { - side="WEST"; - class Vehicles - { - items=4; - class Item0 - { - position[]={1678.4825,5.5,5697.4468}; - azimut=11.294894; - id=28; - side="WEST"; - vehicle="B_Soldier_TL_F"; - player="PLAY CDG"; - leader=1; - rank="CORPORAL"; - skill=0.60000002; - text="GrpNATO_B3_0"; - description="NATO Bravo 3 Fireteam Leader"; - }; - class Item1 - { - position[]={1681.5645,5.5,5696.561}; - azimut=11.294894; - id=29; - side="WEST"; - vehicle="B_Soldier_LAT_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_B3_1"; - description="NATO Bravo 3 Rifleman (AT)"; - }; - class Item2 - { - position[]={1684.6531,5.5,5695.8491}; - azimut=11.294894; - id=30; - side="WEST"; - vehicle="B_Soldier_AAR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_B3_2"; - description="NATO Bravo 3 Assistant Automatic Rifleman"; - }; - class Item3 - { - position[]={1687.8109,5.5,5695.1021}; - azimut=11.294894; - id=31; - side="WEST"; - vehicle="B_Soldier_AR_F"; - player="PLAY CDG"; - skill=0.60000002; - text="GrpNATO_B3_3"; - description="NATO Bravo 3 Automatic Rifleman"; - }; - }; - }; - class Item14 - { - side="WEST"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1540.8328,-27.831757,6018.0283}; - azimut=4.41886; - special="FLY"; - id=32; - side="WEST"; - vehicle="B_UAV_02_CAS_F"; - isUAV=1; - leader=1; - skill=0.60000002; - }; - }; - }; - class Item15 - { - side="WEST"; - class Vehicles - { - items=1; - class Item0 - { - position[]={2861.0947,0,6407.8574}; - azimut=4.41886; - special="FLY"; - id=33; - side="WEST"; - vehicle="B_UAV_02_CAS_F"; - isUAV=1; - leader=1; - skill=0.60000002; - }; - }; - }; - class Item16 - { - side="WEST"; - class Vehicles - { - items=1; - class Item0 - { - position[]={1944.1785,0,6868.8906}; - azimut=4.41886; - special="FLY"; - id=34; - side="WEST"; - vehicle="B_UAV_02_CAS_F"; - isUAV=1; - leader=1; - skill=0.60000002; - }; - }; - }; - class Item17 - { - side="WEST"; - class Vehicles - { - items=4; - class Item0 - { - position[]={1713.3085,5.5,5725.0205}; - azimut=98.173798; - id=35; - side="WEST"; - vehicle="B_medic_F"; - player="PLAY CDG"; - leader=1; - rank="LIEUTENANT"; - skill=0.60000002; - text="Medic2"; - description="Medic 2"; - }; - class Item1 - { - position[]={1712.2098,5.5,5727.1675}; - azimut=98.173798; - id=36; - side="WEST"; - vehicle="B_medic_F"; - player="PLAY CDG"; - skill=0.60000002; - text="Medic1"; - description="Medic 1"; - }; - class Item2 - { - position[]={1711.6387,5.5,5725.041}; - azimut=98.173798; - id=37; - side="WEST"; - vehicle="B_medic_F"; - player="PLAY CDG"; - skill=0.60000002; - text="Medic3"; - description="Medic 3"; - }; - class Item3 - { - position[]={1710.0735,5.5,5726.4287}; - id=38; - side="WEST"; - vehicle="B_soldier_UAV_F"; - player="PLAY CDG"; - skill=0.60000002; - text="uavGuy"; - }; - }; - }; - class Item18 - { - side="WEST"; - class Vehicles - { - items=2; - class Item0 - { - position[]={1722.298,5.5,5733.4629}; - azimut=4.41886; - special="FLY"; - id=39; - side="WEST"; - vehicle="B_Soldier_F"; - player="PLAYER COMMANDER"; - leader=1; - skill=0.60000002; - text="R1"; - description="sp tester"; - }; - class Item1 - { - position[]={1722.7957,5.5,5732.481}; - azimut=4.41886; - special="FLY"; - id=40; - side="WEST"; - vehicle="B_Soldier_F"; - player="PLAY CDG"; - skill=0.60000002; - text="R2"; - description="sp tester2"; - }; - }; - }; - }; - class Vehicles - { - items=38; - class Item0 - { - position[]={1706.5913,5.5,5748.0903}; - azimut=-68.59301; - id=41; - side="EMPTY"; - vehicle="B_MRAP_01_F"; - leader=1; - skill=0.60000002; - text="car1"; - syncId=6; - synchronizations[]={2}; - }; - class Item1 - { - position[]={1707.5599,5.5,5753.0518}; - azimut=-65.45974; - id=42; - side="EMPTY"; - vehicle="B_MRAP_01_F"; - leader=1; - lock="LOCKED"; - skill=0.60000002; - text="car3"; - syncId=7; - synchronizations[]={3}; - }; - class Item2 - { - position[]={1708.7251,5.5,5757.8809}; - azimut=-65.45974; - id=43; - side="EMPTY"; - vehicle="C_Hatchback_01_F"; - leader=1; - lock="UNLOCKED"; - skill=0.60000002; - text="car4"; - }; - class Item3 - { - position[]={1704.4299,5.5,5742.8721}; - azimut=-68.59301; - id=44; - side="EMPTY"; - vehicle="C_Hatchback_01_F"; - leader=1; - lock="UNLOCKED"; - skill=0.60000002; - text="car0"; - init="this setVariable [""ACE_VehicleLock_lockSide"", east];"; - }; - class Item4 - { - position[]={1738.8502,5.5,5728.8525}; - azimut=101.05981; - id=45; - side="EMPTY"; - vehicle="B_static_AA_F"; - skill=0.60000002; - text="q1"; - }; - class Item5 - { - position[]={1738.4388,5.5,5726.1929}; - azimut=101.05981; - id=46; - side="EMPTY"; - vehicle="B_Mortar_01_F"; - skill=0.60000002; - text="q2"; - }; - class Item6 - { - position[]={1737.8582,5.5,5723.3979}; - azimut=101.05981; - id=47; - side="EMPTY"; - vehicle="B_HMG_01_high_F"; - skill=0.60000002; - text="q3"; - }; - class Item7 - { - position[]={1738.9786,5.5,5734.6968}; - azimut=104.535; - id=48; - side="EMPTY"; - vehicle="B_MBT_01_cannon_F"; - lock="UNLOCKED"; - skill=0.60000002; - }; - class Item8 - { - position[]={1734.713,5.5,5720.061}; - azimut=10.202663; - id=49; - side="EMPTY"; - vehicle="ACE_medicalSupplyCrate"; - leader=1; - skill=0.60000002; - }; - class Item9 - { - position[]={1737.2236,5.5,5719.5591}; - azimut=10.202663; - id=50; - side="EMPTY"; - vehicle="ACE_medicalSupplyCrate"; - leader=1; - skill=0.60000002; - }; - class Item10 - { - position[]={1733.2904,5.5,5717.6465}; - azimut=13.57355; - id=51; - side="EMPTY"; - vehicle="ACE_Box_Misc"; - leader=1; - skill=0.60000002; - }; - class Item11 - { - position[]={1736.1099,5.5,5717.1831}; - azimut=13.57355; - id=52; - side="EMPTY"; - vehicle="ACE_Box_Misc"; - leader=1; - skill=0.60000002; - }; - class Item12 - { - position[]={1732.4794,5.5,5715.4067}; - azimut=9.5156059; - id=53; - side="EMPTY"; - vehicle="Box_NATO_AmmoOrd_F"; - leader=1; - skill=0.60000002; - }; - class Item13 - { - position[]={1735.2601,5.5,5714.7891}; - azimut=9.5156059; - id=54; - side="EMPTY"; - vehicle="Box_NATO_AmmoOrd_F"; - leader=1; - skill=0.60000002; - }; - class Item14 - { - position[]={1743.4641,5.5,5753.5161}; - azimut=104.535; - id=55; - side="EMPTY"; - vehicle="B_MRAP_01_hmg_F"; - lock="UNLOCKED"; - skill=0.60000002; - }; - class Item15 - { - position[]={1741.916,5.5,5747.4302}; - azimut=104.535; - id=56; - side="EMPTY"; - vehicle="I_APC_tracked_03_cannon_F"; - lock="UNLOCKED"; - skill=0.60000002; - }; - class Item16 - { - position[]={1722.1113,5.5,5768.3818}; - azimut=193.13876; - id=57; - side="EMPTY"; - vehicle="B_Heli_Attack_01_F"; - skill=0.60000002; - }; - class Item17 - { - position[]={1733.6005,5.5,5765.2881}; - azimut=198.2417; - id=58; - side="EMPTY"; - vehicle="B_Heli_Light_01_armed_F"; - skill=0.60000002; - }; - class Item18 - { - position[]={1746.17,5.5,5764.1099}; - azimut=198.97742; - id=59; - side="EMPTY"; - vehicle="B_Heli_Transport_01_F"; - skill=0.60000002; - }; - class Item19 - { - position[]={1909.3875,10.094501,5668.21}; - azimut=4.41886; - id=60; - side="EMPTY"; - vehicle="O_MBT_02_cannon_F"; - skill=0.60000002; - }; - class Item20 - { - position[]={1724.0231,5.5,5722.8857}; - azimut=104.535; - id=61; - side="EMPTY"; - vehicle="Box_IND_Wps_F"; - skill=0.60000002; - }; - class Item21 - { - position[]={1724.6892,5.5,5724.7744}; - azimut=104.535; - id=62; - side="EMPTY"; - vehicle="Box_IND_Ammo_F"; - skill=0.60000002; - }; - class Item22 - { - position[]={1717.6512,5.5,5724.0181}; - azimut=104.535; - id=63; - side="EMPTY"; - vehicle="Box_IND_Wps_F"; - skill=0.60000002; - }; - class Item23 - { - position[]={1718.2023,5.5,5726.3066}; - azimut=104.535; - id=64; - side="EMPTY"; - vehicle="Box_IND_Ammo_F"; - skill=0.60000002; - }; - class Item24 - { - position[]={1733.6895,5.5,5706.4785}; - azimut=104.535; - id=65; - side="EMPTY"; - vehicle="Box_NATO_WpsLaunch_F"; - skill=0.60000002; - }; - class Item25 - { - position[]={1733.21,5.5,5704.1836}; - azimut=104.535; - id=66; - side="EMPTY"; - vehicle="Box_East_WpsLaunch_F"; - skill=0.60000002; - }; - class Item26 - { - position[]={1732.4906,5.5,5701.6831}; - azimut=104.535; - id=67; - side="EMPTY"; - vehicle="Box_IND_WpsLaunch_F"; - skill=0.60000002; - }; - class Item27 - { - position[]={1825.109,5.5,5676.3613}; - azimut=4.41886; - id=68; - side="EMPTY"; - vehicle="O_MBT_02_cannon_F"; - skill=0.60000002; - text="t1"; - }; - class Item28 - { - position[]={1894.5531,5.6621442,5745.1523}; - azimut=4.41886; - id=69; - side="EMPTY"; - vehicle="O_MBT_02_cannon_F"; - skill=0.60000002; - }; - class Item29 - { - position[]={1863.2545,5.5,5712.0615}; - azimut=4.41886; - id=70; - side="EMPTY"; - vehicle="O_MBT_02_cannon_F"; - skill=0.60000002; - }; - class Item30 - { - position[]={1740.923,5.5,5741.1685}; - azimut=104.535; - id=71; - side="EMPTY"; - vehicle="B_MBT_01_cannon_F"; - lock="UNLOCKED"; - skill=0.60000002; - }; - class Item31 - { - position[]={1721.363,5.5,5724.4956}; - azimut=104.535; - id=72; - side="EMPTY"; - vehicle="Box_NATO_Grenades_F"; - lock="UNLOCKED"; - skill=0.60000002; - }; - class Item32 - { - position[]={1722.3844,5.5,5727.0381}; - azimut=104.535; - id=73; - side="EMPTY"; - vehicle="Box_NATO_WpsSpecial_F"; - lock="UNLOCKED"; - skill=0.60000002; - }; - class Item33 - { - position[]={1644.8666,0,5751.0166}; - azimut=-19.956911; - id=74; - side="EMPTY"; - vehicle="B_Boat_Armed_01_minigun_F"; - skill=0.60000002; - }; - class Item34 - { - position[]={1639.6296,0,5741.1772}; - azimut=-19.956911; - id=75; - side="EMPTY"; - vehicle="B_Boat_Armed_01_minigun_F"; - skill=0.60000002; - }; - class Item35 - { - position[]={1636.3765,0,5727.1333}; - azimut=-19.9569; - id=76; - side="EMPTY"; - vehicle="C_Boat_Civil_01_F"; - skill=0.60000002; - }; - class Item36 - { - position[]={1652.0231,-0.71640843,5760.2349}; - azimut=-19.9569; - id=77; - side="EMPTY"; - vehicle="B_Boat_Transport_01_F"; - skill=0.60000002; - }; - class Item37 - { - position[]={1739.5898,5.5,5730.6455}; - azimut=101.06; - id=78; - side="EMPTY"; - vehicle="B_static_AT_F"; - skill=0.60000002; - text="q0"; - }; - }; -}; -class Intro -{ - addOns[]= - { - "a3_map_stratis" - }; - addOnsAuto[]= - { - "a3_map_stratis" - }; - randomSeed=13628778; - class Intel - { - timeOfChanges=1800.0002; - startWeather=0.30000001; - startWind=0.1; - startWaves=0.1; - forecastWeather=0.30000001; - forecastWind=0.1; - forecastWaves=0.1; - forecastLightnings=0.1; - year=2035; - month=7; - day=6; - hour=12; - minute=0; - startFogDecay=0.013; - forecastFogDecay=0.013; - }; -}; -class OutroWin -{ - addOns[]= - { - "a3_map_stratis" - }; - addOnsAuto[]= - { - "a3_map_stratis" - }; - randomSeed=8997795; - class Intel - { - timeOfChanges=1800.0002; - startWeather=0.30000001; - startWind=0.1; - startWaves=0.1; - forecastWeather=0.30000001; - forecastWind=0.1; - forecastWaves=0.1; - forecastLightnings=0.1; - year=2035; - month=7; - day=6; - hour=12; - minute=0; - startFogDecay=0.013; - forecastFogDecay=0.013; - }; -}; -class OutroLoose -{ - addOns[]= - { - "a3_map_stratis" - }; - addOnsAuto[]= - { - "a3_map_stratis" - }; - randomSeed=1617621; - class Intel - { - timeOfChanges=1800.0002; - startWeather=0.30000001; - startWind=0.1; - startWaves=0.1; - forecastWeather=0.30000001; - forecastWind=0.1; - forecastWaves=0.1; - forecastLightnings=0.1; - year=2035; - month=7; - day=6; - hour=12; - minute=0; - startFogDecay=0.013; - forecastFogDecay=0.013; - }; -}; diff --git a/addons/testmissions/config.cpp b/addons/testmissions/config.cpp deleted file mode 100644 index 3a73a661d5..0000000000 --- a/addons/testmissions/config.cpp +++ /dev/null @@ -1,20 +0,0 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_common"}; - VERSION_CONFIG; - }; -}; - -class CfgMissions { - class MPMissions { - class ACETestingMap1 { - briefingName = "ACE Testing Map 1"; - directory = QUOTE(PATHTO_R(MPMissions\ACETestingMap1.Stratis)); - }; - }; -}; diff --git a/addons/testmissions/script_component.hpp b/addons/testmissions/script_component.hpp deleted file mode 100644 index 718356494d..0000000000 --- a/addons/testmissions/script_component.hpp +++ /dev/null @@ -1,17 +0,0 @@ -#define COMPONENT testmissions -#include "\z\ace\addons\main\script_mod.hpp" - -// #define DEBUG_MODE_FULL -// #define DISABLE_COMPILE_CACHE -// #define CBA_DEBUG_SYNCHRONOUS -// #define ENABLE_PERFORMANCE_COUNTERS - -#ifdef DEBUG_ENABLED_TESTMISSIONS - #define DEBUG_MODE_FULL -#endif - -#ifdef DEBUG_ENABLED_TESTMISSIONS - #define DEBUG_SETTINGS DEBUG_ENABLED_TESTMISSIONS -#endif - -#include "\z\ace\addons\main\script_macros.hpp" \ No newline at end of file diff --git a/addons/thermals/config.cpp b/addons/thermals/config.cpp index 07d19d1b50..b4ad00f41c 100644 --- a/addons/thermals/config.cpp +++ b/addons/thermals/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"[TF]Nkey"}; - authorUrl = "https://github.com/michail-nikolaev/"; + author = ECSTRING(common,ACETeam); + authors[] = {"[TF]Nkey"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/trenches/CfgEventHandlers.hpp b/addons/trenches/CfgEventHandlers.hpp index 6db97e9c9d..5b2eb3a053 100644 --- a/addons/trenches/CfgEventHandlers.hpp +++ b/addons/trenches/CfgEventHandlers.hpp @@ -24,3 +24,9 @@ class Extended_Killed_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/trenches/CfgVehicles.hpp b/addons/trenches/CfgVehicles.hpp index 81880a4265..9c93e555ac 100644 --- a/addons/trenches/CfgVehicles.hpp +++ b/addons/trenches/CfgVehicles.hpp @@ -1,3 +1,26 @@ +class CBA_Extended_EventHandlers; + +#define ACE_TRENCHES_ACTIONS class ACE_Actions { \ + class ACE_MainActions { \ + displayName = ECSTRING(interaction,MainAction); \ + selection = ""; \ + distance = 3; \ + condition = QUOTE(true); \ + class ACE_ContinueDiggingTrench { \ + displayName = CSTRING(ContinueDiggingTrench); \ + condition = QUOTE([ARR_2(_target,_player)] call FUNC(canContinueDiggingTrench)); \ + statement = QUOTE([ARR_2(_target,_player)] call FUNC(continueDiggingTrench);); \ + priority = -1; \ + }; \ + class ACE_RemoveTrench { \ + displayName = CSTRING(RemoveEnvelope); \ + condition = QUOTE([ARR_2(_target,_player)] call FUNC(canRemoveTrench)); \ + statement = QUOTE([ARR_2(_target,_player)] call FUNC(removeTrench);); \ + priority = -1; \ + }; \ + }; \ + } + class CfgVehicles { class Man; class CAManBase: Man { @@ -5,23 +28,23 @@ class CfgVehicles { class ACE_Equipment { class GVAR(digEnvelopeSmall) { displayName = CSTRING(DigEnvelopeSmall); - condition = QUOTE([ARR_2(_this select 0,'ace_trenches_trenchSmall')] call FUNC(canDigTrench)); + condition = QUOTE(_player call FUNC(canDigTrench)); //wait a frame to handle "Do When releasing action menu key" option - statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ace_trenches_trenchSmall')])] call EFUNC(common,execNextFrame)); + statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_small')])] call CBA_fnc_execNextFrame); exceptions[] = {}; showDisabled = 0; priority = 4; - //icon = PATHTOF(UI\icon_sandbag_ca.paa); + //icon = QPATHTOF(UI\icon_sandbag_ca.paa); }; class GVAR(digEnvelopeBig) { displayName = CSTRING(DigEnvelopeBig); - condition = QUOTE([ARR_2(_this select 0,'ace_trenches_trenchBig')] call FUNC(canDigTrench)); + condition = QUOTE(_player call FUNC(canDigTrench)); //wait a frame to handle "Do When releasing action menu key" option - statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ace_trenches_trenchBig')])] call EFUNC(common,execNextFrame)); + statement = QUOTE([ARR_2({_this call FUNC(placeTrench)},[ARR_2(_this select 0,'ACE_envelope_big')])] call CBA_fnc_execNextFrame); exceptions[] = {}; showDisabled = 0; priority = 4; - //icon = PATHTOF(UI\icon_sandbag_ca.paa); + //icon = QPATHTOF(UI\icon_sandbag_ca.paa); }; }; }; @@ -32,27 +55,44 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); displayName = CSTRING(EnvelopeSmallName); descriptionShort = CSTRING(EnevlopeSmallDescription); - model = QUOTE(PATHTOEF(apl,ace_envelope_small4.p3d)); + model = QPATHTOEF(apl,ace_envelope_small4.p3d); scope = 2; + GVAR(diggingDuration) = 20; + GVAR(removalDuration) = 12; + GVAR(noGeoClass) = "ACE_envelope_small_NoGeo"; + GVAR(placementData)[] = {2,3,0.35}; + GVAR(grassCuttingPoints)[] = {{0,-0.5,0}}; + ACE_TRENCHES_ACTIONS; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; }; class ACE_envelope_big: BagFence_base_F { author = ECSTRING(common,ACETeam); displayName = CSTRING(EnvelopeBigName); descriptionShort = CSTRING(EnevlopeBigDescription); - model = QUOTE(PATHTOEF(apl,ace_envelope_big4.p3d)); + model = QPATHTOEF(apl,ace_envelope_big4.p3d); scope = 2; + GVAR(diggingDuration) = 25; + GVAR(removalDuration) = 15; + GVAR(noGeoClass) = "ACE_envelope_big_NoGeo"; + GVAR(placementData)[] = {6,1.1,0.20}; + GVAR(grassCuttingPoints)[] = {{-1.5,-1,0},{1.5,-1,0}}; + ACE_TRENCHES_ACTIONS; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; }; - class ACE_envelope_small_NoGeo: ACE_envelope_small { scope = 1; //@todo: replace by a no geo model - model = QUOTE(PATHTOEF(apl,ace_envelope_small4_nogeo.p3d)); + model = QPATHTOEF(apl,ace_envelope_small4_nogeo.p3d); }; class ACE_envelope_big_NoGeo: ACE_envelope_big { scope = 1; //@todo: replace by a no geo model - model = QUOTE(PATHTOEF(apl,ace_envelope_big4_nogeo.p3d)); + model = QPATHTOEF(apl,ace_envelope_big4_nogeo.p3d); }; class Box_NATO_Support_F; diff --git a/addons/trenches/CfgWeapons.hpp b/addons/trenches/CfgWeapons.hpp index 5b20e9e4c1..9f9049360a 100644 --- a/addons/trenches/CfgWeapons.hpp +++ b/addons/trenches/CfgWeapons.hpp @@ -6,8 +6,8 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); displayName = CSTRING(EntrenchingToolName); descriptionShort = CSTRING(EntrenchingToolDescription); - model = QUOTE(PATHTOEF(apl,ace_entrchtool.p3d)); - picture = QUOTE(PATHTOF(ui\w_entrchtool_ca.paa)); + model = QPATHTOEF(apl,ace_entrchtool.p3d); + picture = QPATHTOF(ui\w_entrchtool_ca.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 10; diff --git a/addons/trenches/XEH_PREP.hpp b/addons/trenches/XEH_PREP.hpp index a9050b83bd..2e671acb85 100644 --- a/addons/trenches/XEH_PREP.hpp +++ b/addons/trenches/XEH_PREP.hpp @@ -1,5 +1,8 @@ +PREP(canContinueDiggingTrench); PREP(canDigTrench); +PREP(canRemoveTrench); +PREP(continueDiggingTrench); PREP(handleInteractMenuOpened); PREP(handleKilled); PREP(handlePlayerChanged); @@ -9,3 +12,5 @@ PREP(handleUnconscious); PREP(placeCancel); PREP(placeConfirm); PREP(placeTrench); +PREP(removeTrench); +PREP(setTrenchPlacement); diff --git a/addons/trenches/XEH_missionDisplayLoad.sqf b/addons/trenches/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..2c4951ec7a --- /dev/null +++ b/addons/trenches/XEH_missionDisplayLoad.sqf @@ -0,0 +1,6 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; +_display displayAddEventHandler ["MouseButtonDown", {[ACE_player, _this select 1] call FUNC(placeCancel)}]; diff --git a/addons/trenches/XEH_postInit.sqf b/addons/trenches/XEH_postInit.sqf index d0e8775f05..ba84123009 100644 --- a/addons/trenches/XEH_postInit.sqf +++ b/addons/trenches/XEH_postInit.sqf @@ -12,8 +12,6 @@ GVAR(trench) = objNull; GVAR(digPFH) = -1; GVAR(digDirection) = 0; -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - // Cancel dig sandbag if interact menu opened ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); diff --git a/addons/trenches/XEH_preInit.sqf b/addons/trenches/XEH_preInit.sqf index 8b172b2b9e..a7feade1c3 100644 --- a/addons/trenches/XEH_preInit.sqf +++ b/addons/trenches/XEH_preInit.sqf @@ -4,10 +4,4 @@ ADDON = false; #include "XEH_PREP.hpp" -// Trench types -// Name of the object, name of th dummy no geo object, dx, dy -GVAR(trenchSmall) = ["ACE_envelope_small", "ACE_envelope_small_NoGeo", 2, 3, 0.35]; -GVAR(trenchBig) = ["ACE_envelope_big", "ACE_envelope_big_NoGeo", 6, 1.1, 0.20]; -GVAR(trenchType) = GVAR(trenchSmall); - ADDON = true; diff --git a/addons/trenches/config.cpp b/addons/trenches/config.cpp index e2f2b5b4fe..d6afd2f9d1 100644 --- a/addons/trenches/config.cpp +++ b/addons/trenches/config.cpp @@ -6,11 +6,13 @@ class CfgPatches { weapons[] = {"ACE_EntrenchingTool"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"Grey", "esteldunedain"}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {"Grey", "esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; + #include "CfgEventHandlers.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" diff --git a/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf b/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf new file mode 100644 index 0000000000..2e1942d6b8 --- /dev/null +++ b/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf @@ -0,0 +1,27 @@ +/* + * Author: SzwedzikPL + * Checks if a unit can continue digging a trench + * + * Arguments: + * 0: trench + * 1: unit + * + * Return Value: + * Can continue + * + * Example: + * [TrenchObj, ACE_player] call ace_trenches_fnc_canContinueDiggingTrench + * + * Public: No + */ +#include "script_component.hpp" + +params ["_trench", "_unit"]; + +if !("ACE_EntrenchingTool" in items _unit) exitWith {false}; +if ((_trench getVariable [QGVAR(progress), 0]) >= 1) exitWith {false}; + +// Prevent removing/digging trench by more than one person +if (_trench getVariable [QGVAR(digging), false]) exitWith {false}; + +true diff --git a/addons/trenches/functions/fnc_canDigTrench.sqf b/addons/trenches/functions/fnc_canDigTrench.sqf index 9dc5e29017..0cbed2d9b7 100644 --- a/addons/trenches/functions/fnc_canDigTrench.sqf +++ b/addons/trenches/functions/fnc_canDigTrench.sqf @@ -4,7 +4,6 @@ * * Arguments: * 0: Unit - * 1: Trench type * * Return Value: * Can dig @@ -18,17 +17,15 @@ #define SURFACE_BLACKLIST ["water", "concrete", "tarmac", "wood", "metal", "roof_tin", "roof_tiles", "wood_int", "concrete_int", "tiles_int", "metal_int", "stony", "rock", "int_concrete", "int_tiles", "int_wood", "tiling", "wavymetal", "int_metal"] -params ["_unit","_trenchTypeName"]; +params ["_unit"]; if !("ACE_EntrenchingTool" in items _unit) exitWith {false}; // Can't dig trench if above ground level if ((getPosATL _unit) select 2 > 0.05) exitWith {false}; -private ["_surfaceClass", "_surfaceType"]; - -_surfaceClass = (surfaceType getPosASL _unit) select [1]; -_surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); +private _surfaceClass = (surfaceType getPosASL _unit) select [1]; +private _surfaceType = getText (configFile >> "CfgSurfaces" >> _surfaceClass >> "soundEnviron"); TRACE_1("",_surfaceType); !(_surfaceType in SURFACE_BLACKLIST) diff --git a/addons/trenches/functions/fnc_canRemoveTrench.sqf b/addons/trenches/functions/fnc_canRemoveTrench.sqf new file mode 100644 index 0000000000..4e33857637 --- /dev/null +++ b/addons/trenches/functions/fnc_canRemoveTrench.sqf @@ -0,0 +1,26 @@ +/* + * Author: SzwedzikPL + * Checks if a unit can remove a trench + * + * Arguments: + * 0: trench + * 1: unit + * + * Return Value: + * Can remove + * + * Example: + * [TrenchObj, ACE_player] call ace_trenches_fnc_canRemoveTrench + * + * Public: No + */ +#include "script_component.hpp" + +params ["_trench", "_unit"]; + +if !("ACE_EntrenchingTool" in items _unit) exitWith {false}; + +// Prevent removing/digging trench by more than one person +if (_trench getVariable [QGVAR(digging), false]) exitWith {false}; + +true diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf new file mode 100644 index 0000000000..954eed1ca3 --- /dev/null +++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf @@ -0,0 +1,91 @@ +/* + * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support, esteldunedain + * Continue process of digging trench. + * + * Arguments: + * 0: trench + * 1: unit + * + * Return Value: + * None + * + * Example: + * [TrenchObj, ACE_player] call ace_trenches_fnc_continueDiggingTrench + * + * Public: No + */ +#include "script_component.hpp" + +params ["_trench", "_unit"]; +TRACE_2("continueDiggingTrench",_trench,_unit); + +private _actualProgress = _trench getVariable [QGVAR(progress), 0]; +if(_actualProgress == 1) exitWith {}; + +// Mark trench as being worked on +_trench setVariable [QGVAR(digging), true, true]; + +private _digTime = getNumber (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(diggingDuration)); +private _digTimeLeft = _digTime * (1 - _actualProgress); + +private _placeData = _trench getVariable [QGVAR(placeData), [[], []]]; +_placeData params ["_basePos", "_vecDirAndUp"]; + +private _trenchId = _unit getVariable [QGVAR(isDiggingId), -1]; +if(_trenchId < 0) then { + _trenchId = GVAR(trenchId); + _unit setVariable [QGVAR(isDiggingId), _trenchId, true]; + GVAR(trenchId) = GVAR(trenchId) + 1; +}; + +// Create progress bar +private _fnc_onFinish = { + (_this select 0) params ["_unit", "_trench"]; + _unit setVariable [QGVAR(isDiggingId), -1, true]; + _trench setVariable [QGVAR(digging), false, true]; + + // Save progress global + private _progress = _trench getVariable [QGVAR(progress), 0]; + _trench setVariable [QGVAR(progress), _progress, true]; + + // Reset animation + [_unit, "", 1] call EFUNC(common,doAnimation); +}; +private _fnc_onFailure = { + (_this select 0) params ["_unit", "_trench"]; + _unit setVariable [QGVAR(isDiggingId), -1, true]; + _trench setVariable [QGVAR(digging), false, true]; + + // Save progress global + private _progress = _trench getVariable [QGVAR(progress), 0]; + _trench setVariable [QGVAR(progress), _progress, true]; + + // Reset animation + [_unit, "", 1] call EFUNC(common,doAnimation); +}; +[(_digTimeLeft + 0.5), [_unit, _trench], _fnc_onFinish, _fnc_onFailure, localize LSTRING(DiggingTrench)] call EFUNC(common,progressBar); + +if(_actualProgress == 0) then { + [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 1.0], _vecDirAndUp, _actualProgress] call FUNC(setTrenchPlacement); + + //Remove grass + { + private _trenchGrassCutter = createVehicle ["Land_ClutterCutter_medium_F", [0, 0, 0], [], 0, "NONE"]; + private _cutterPos = AGLToASL (_trench modelToWorld _x); + _cutterPos set [2, getTerrainHeightASL _cutterPos]; + _trenchGrassCutter setPosASL _cutterPos; + deleteVehicle _trenchGrassCutter; + } foreach getArray (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(grassCuttingPoints)); +}; + +private _progressLeft = (_actualProgress * 10) + 1; +private ["_i"]; +for "_i" from _progressLeft to 10 do { + private _vectorDiffZ = 1 - (_i / 10); + private _delay = _digTime * ((_i / 10) - _actualProgress); + private _progress = _i / 10; + [DFUNC(setTrenchPlacement), [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, _vectorDiffZ], _vecDirAndUp, _progress], _delay] call CBA_fnc_waitAndExecute; +}; + +// Play animation +[_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation); diff --git a/addons/trenches/functions/fnc_handleScrollWheel.sqf b/addons/trenches/functions/fnc_handleScrollWheel.sqf index 783463dd25..5dbe661417 100644 --- a/addons/trenches/functions/fnc_handleScrollWheel.sqf +++ b/addons/trenches/functions/fnc_handleScrollWheel.sqf @@ -15,9 +15,9 @@ */ #include "script_component.hpp" -params ["_scroll"]; +if (GVAR(digPFH) == -1) exitWith {false}; -if (GETMVAR(ACE_Modifier,0) == 0 || GVAR(digPFH) == -1) exitWith { false }; +params ["_scroll"]; GVAR(digDirection) = GVAR(digDirection) + (_scroll * 5); diff --git a/addons/trenches/functions/fnc_placeCancel.sqf b/addons/trenches/functions/fnc_placeCancel.sqf index a48d6e3f5b..b3d6bf78da 100644 --- a/addons/trenches/functions/fnc_placeCancel.sqf +++ b/addons/trenches/functions/fnc_placeCancel.sqf @@ -3,7 +3,8 @@ * Cancels trench dig * * Arguments: - * 0: unit + * 0: Unit + * 1: Key * * Return Value: * None @@ -15,7 +16,9 @@ */ #include "script_component.hpp" -params ["_unit"]; +params ["_unit", "_key"]; + +if (_key != 1 || {GVAR(digPFH) == -1}) exitWith {}; // enable running again [_unit, "forceWalk", "ACE_Trenches", false] call EFUNC(common,statusEffect_set); @@ -31,6 +34,5 @@ GVAR(digPFH) = -1; call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", _unit getVariable [QGVAR(Dig), -1]] call EFUNC(common,removeActionEventHandler); -[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler); _unit setVariable [QGVAR(isPlacing), false, true]; diff --git a/addons/trenches/functions/fnc_placeConfirm.sqf b/addons/trenches/functions/fnc_placeConfirm.sqf index 797499a63f..7c3be2d901 100644 --- a/addons/trenches/functions/fnc_placeConfirm.sqf +++ b/addons/trenches/functions/fnc_placeConfirm.sqf @@ -28,7 +28,6 @@ GVAR(digPFH) = -1; call EFUNC(interaction,hideMouseHint); [_unit, "DefaultAction", _unit getVariable [QGVAR(Dig), -1]] call EFUNC(common,removeActionEventHandler); -[_unit, "zoomtemp", _unit getVariable [QGVAR(Cancel), -1]] call EFUNC(common,removeActionEventHandler); _unit setVariable [QGVAR(isPlacing), false, true]; @@ -37,9 +36,9 @@ params ["_unit"]; if (isNull GVAR(trench)) exitWith {}; deleteVehicle GVAR(trench); -private _trench = createVehicle [GVAR(trenchType) select 0, [0, 0, 0], [], 0, "NONE"]; +private _trench = createVehicle [GVAR(trenchClass), [0, 0, 0], [], 0, "NONE"]; -GVAR(trenchType) params ["", "", "_dx", "_dy", "_offset"]; +GVAR(trenchPlacementData) params ["_dx", "_dy", "_offset"]; private _basePos = GVAR(trenchPos); private _angle = (GVAR(digDirection) + getDir _unit); @@ -67,49 +66,8 @@ for [{_ix = -_dx/2},{_ix <= _dx/2},{_ix = _ix + _dx/3}] do { }; _basePos set [2, (_basePos select 2) + _minzoffset + _offset]; private _vecDirAndUp = [_v1, _v3]; - GVAR(trench) = objNull; -// Mark the unit as digging -private _trenchId = GVAR(trenchId); -_unit setVariable [QGVAR(isDiggingId), _trenchId, true]; -GVAR(trenchId) = GVAR(trenchId) + 1; +_trench setVariable [QGVAR(placeData), [_basePos, _vecDirAndUp], true]; -// Create progress bar -private _fnc_onFinish = { - (_this select 0) params ["_unit"]; - _unit setVariable [QGVAR(isDiggingId), -1, true]; -}; -private _fnc_onFailure = { - (_this select 0) params ["_unit"]; - _unit setVariable [QGVAR(isDiggingId), -1, true]; -}; -[12.5, [_unit], _fnc_onFinish, _fnc_onFailure, localize LSTRING(DiggingTrench)] call EFUNC(common,progressBar); - -// Schedule progressive raising of the trench -private _fnc_setPlacing = { - params ["_unit", "_trench", "_trenchId", "_pos", "_vecDirAndUp"]; - - // If the progress bar was cancelled, cancel elevation - // We use an uid to avoid any chance of an older trench being raised when a new one is built - if (_unit getVariable [QGVAR(isDiggingId), -1] != _trenchId) exitWith {}; - - _trench setPosASL _pos; - _trench setVectorDirAndUp _vecDirAndUp; -}; - -// For loops are for wimps -[_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 1.0], _vecDirAndUp] call _fnc_setPlacing; -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.9], _vecDirAndUp], 3.0] call EFUNC(common,waitAndExecute); -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.8], _vecDirAndUp], 4.0] call EFUNC(common,waitAndExecute); -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.7], _vecDirAndUp], 5.0] call EFUNC(common,waitAndExecute); -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.6], _vecDirAndUp], 6.0] call EFUNC(common,waitAndExecute); -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.5], _vecDirAndUp], 7.0] call EFUNC(common,waitAndExecute); -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.4], _vecDirAndUp], 8.0] call EFUNC(common,waitAndExecute); -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.3], _vecDirAndUp], 9.0] call EFUNC(common,waitAndExecute); -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.2], _vecDirAndUp],10.0] call EFUNC(common,waitAndExecute); -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.1], _vecDirAndUp],11.0] call EFUNC(common,waitAndExecute); -[_fnc_setPlacing, [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, 0.0], _vecDirAndUp],12.0] call EFUNC(common,waitAndExecute); - -// Play animation -[_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation); +[_trench, _unit] call FUNC(continueDiggingTrench); diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf index 21c4d92bb9..35a6706d30 100644 --- a/addons/trenches/functions/fnc_placeTrench.sqf +++ b/addons/trenches/functions/fnc_placeTrench.sqf @@ -4,29 +4,34 @@ * * Arguments: * 0: unit - * 1: Trench type + * 1: Trench class * * Return Value: * None * * Example: - * [ACE_player] call ace_trenches_fnc_placeTrench + * [ACE_player, "ACE_envelope_small"] call ace_trenches_fnc_placeTrench * * Public: No */ #include "script_component.hpp" -params ["_unit","_trenchTypeName"]; +params ["_unit", "_trenchClass"]; -GVAR(trenchType) = missionNamespace getVariable _trenchTypeName; +//Load trench data +private _noGeoModel = getText (configFile >> "CfgVehicles" >> _trenchClass >> QGVAR(noGeoClass)); +if(_noGeoModel == "") then {_noGeoModel = _trenchClass;}; + +GVAR(trenchClass) = _trenchClass; +GVAR(trenchPlacementData) = getArray (configFile >> "CfgVehicles" >> _trenchClass >> QGVAR(placementData)); +TRACE_1("",GVAR(trenchPlacementData)); -TRACE_2("",_trenchTypeName,GVAR(trenchType)); // prevent the placing unit from running [_unit, "forceWalk", "ACE_Trenches", true] call EFUNC(common,statusEffect_set); // create the trench private "_trench"; -_trench = createVehicle [GVAR(trenchType) select 1, [0, 0, 0], [], 0, "NONE"]; +_trench = createVehicle [_noGeoModel, [0, 0, 0], [], 0, "NONE"]; GVAR(trench) = _trench; @@ -38,7 +43,6 @@ GVAR(digDirection) = 0; // pfh that runs while the dig is in progress GVAR(digPFH) = [{ (_this select 0) params ["_unit", "_trench"]; - GVAR(trenchType) params ["", "", "_dx", "_dy", "_offset"]; // Cancel if the helper object is gone if (isNull _trench) exitWith { @@ -46,12 +50,12 @@ GVAR(digPFH) = [{ }; // Cancel if the place is no longer suitable - if !([_unit, GVAR(trenchType)] call FUNC(canDigTrench)) exitWith { + if !([_unit] call FUNC(canDigTrench)) exitWith { [_unit] call FUNC(placeCancel); }; // Update trench position - GVAR(trenchType) params ["", "", "_dx", "_dy", "_offset"]; + GVAR(trenchPlacementData) params ["_dx", "_dy", "_offset"]; private _basePos = eyePos _unit vectorAdd ([sin getDir _unit, +cos getDir _unit, 0] vectorMultiply 1.0); private _angle = (GVAR(digDirection) + getDir _unit); @@ -95,10 +99,4 @@ _unit setVariable [QGVAR(Dig), [ {[_this select 0] call FUNC(placeConfirm)} ] call EFUNC(common,addActionEventHandler)]; -_unit setVariable [QGVAR(Cancel), [ - _unit, "zoomtemp", - {GVAR(digPFH) != -1}, - {[_this select 0] call FUNC(placeCancel)} -] call EFUNC(common,addActionEventHandler)]; - _unit setVariable [QGVAR(isPlacing), true, true]; diff --git a/addons/trenches/functions/fnc_removeTrench.sqf b/addons/trenches/functions/fnc_removeTrench.sqf new file mode 100644 index 0000000000..53059f34bf --- /dev/null +++ b/addons/trenches/functions/fnc_removeTrench.sqf @@ -0,0 +1,77 @@ +/* + * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support and esteldunedain + * Removes trench + * + * Arguments: + * 0: trench + * 1: unit + * + * Return Value: + * None + * + * Example: + * [TrenchObj, ACE_player] call ace_trenches_fnc_removeTrench + * + * Public: No + */ +#include "script_component.hpp" + +params ["_trench", "_unit"]; +TRACE_2("removeTrench",_trench,_unit); + +private _actualProgress = _trench getVariable [QGVAR(progress), 0]; +if(_actualProgress == 0) exitWith {}; + +// Mark trench as being worked on +_trench setVariable [QGVAR(digging), true, true]; + +private _removeTime = getNumber (configFile >> "CfgVehicles" >> (typeof _trench) >> QGVAR(removalDuration)); +private _removeTimeLeft = _removeTime * _actualProgress; + +private _placeData = _trench getVariable [QGVAR(placeData), [[], []]]; +_placeData params ["_basePos", "_vecDirAndUp"]; + +private _trenchId = _unit getVariable [QGVAR(isDiggingId), -1]; +if(_trenchId < 0) then { + _trenchId = GVAR(trenchId); + _unit setVariable [QGVAR(isDiggingId), _trenchId, true]; + GVAR(trenchId) = GVAR(trenchId) + 1; +}; + +// Create progress bar +private _fnc_onFinish = { + (_this select 0) params ["_unit", "_trench"]; + _unit setVariable [QGVAR(isDiggingId), -1, true]; + + // Remove trench + deleteVehicle _trench; + + // Reset animation + [_unit, "", 1] call EFUNC(common,doAnimation); +}; +private _fnc_onFailure = { + (_this select 0) params ["_unit", "_trench"]; + _unit setVariable [QGVAR(isDiggingId), -1, true]; + _trench setVariable [QGVAR(digging), false, true]; + + // Save progress global + private _progress = _trench getVariable [QGVAR(progress), 0]; + _trench setVariable [QGVAR(progress), _progress, true]; + + // Reset animation + [_unit, "", 1] call EFUNC(common,doAnimation); +}; +[(_removeTimeLeft + 0.5), [_unit, _trench], _fnc_onFinish, _fnc_onFailure, localize LSTRING(RemovingTrench)] call EFUNC(common,progressBar); + +private _progressLeft = ((1 - _actualProgress) * 10) + 1; +private ["_i"]; +for "_i" from _progressLeft to 10 do { + private _vectorDiffZ = _i / 10; + private _delay = _removeTime * ((_i / 10) - (1 - _actualProgress)); + private _progress = 1 - (_i / 10); + + [DFUNC(setTrenchPlacement), [_unit, _trench, _trenchId, _basePos vectorDiff [0, 0, _vectorDiffZ], _vecDirAndUp, _progress], _delay] call CBA_fnc_waitAndExecute; +}; + +// Play animation +[_unit, "AinvPknlMstpSnonWnonDnon_medic4"] call EFUNC(common,doAnimation); diff --git a/addons/trenches/functions/fnc_setTrenchPlacement.sqf b/addons/trenches/functions/fnc_setTrenchPlacement.sqf new file mode 100644 index 0000000000..49c1efdaae --- /dev/null +++ b/addons/trenches/functions/fnc_setTrenchPlacement.sqf @@ -0,0 +1,33 @@ +/* + * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support and esteldunedain + * Sets trench placement + * + * Arguments: + * 0: unit + * 1: trench + * 2: trench id + * 3: position ASL + * 4: vector dir and up + * 5: progress + * + * Return Value: + * None + * + * Example: + * [ACE_player, TrenchObj, 2, [0,0,0], [[0,0,0],[0,0,0]], 0.5] call ace_trenches_fnc_setTrenchPlacement + * + * Public: No + */ +#include "script_component.hpp" + +params ["_unit", "_trench", "_trenchId", "_pos", "_vecDirAndUp", "_progress"]; + +// If the progress bar was cancelled, cancel elevation +// We use an uid to avoid any chance of an older trench being raised when a new one is built +if (_unit getVariable [QGVAR(isDiggingId), -1] != _trenchId) exitWith {}; + +_trench setPosASL _pos; +_trench setVectorDirAndUp _vecDirAndUp; + +// Save progress local +_trench setVariable [QGVAR(progress), _progress]; diff --git a/addons/trenches/script_component.hpp b/addons/trenches/script_component.hpp index 3bb65ab0a6..432308fa51 100644 --- a/addons/trenches/script_component.hpp +++ b/addons/trenches/script_component.hpp @@ -1,6 +1,11 @@ #define COMPONENT trenches #include "\z\ace\addons\main\script_mod.hpp" +// #define DEBUG_MODE_FULL +// #define DISABLE_COMPILE_CACHE +// #define CBA_DEBUG_SYNCHRONOUS +// #define ENABLE_PERFORMANCE_COUNTERS + #ifdef DEBUG_ENABLED_TRENCHES #define DEBUG_MODE_FULL #endif diff --git a/addons/trenches/stringtable.xml b/addons/trenches/stringtable.xml index 9140dff907..e9a64ae12b 100644 --- a/addons/trenches/stringtable.xml +++ b/addons/trenches/stringtable.xml @@ -7,6 +7,8 @@ Saperka Pala Pala para trincheras + Outil de tranchée + Polní lopatka Ferramenta de trincheira @@ -15,6 +17,8 @@ Mit Schanzzeug können Erdwälle oder Gräben ausgehoben werden. Pala Pala para trincheras + Outil de tranchée + Polní lopatky se používají k zákopovým a jiným pracem. Ferramenta de trincheira @@ -23,6 +27,7 @@ Wnęka - mała Fascia - Piccola Trinchera pequeña + Envelope - petite Trincheira - Pequena @@ -31,6 +36,8 @@ Mała jednoosobowa wnęka Piccola Trincea Personale Trinchera personal pequeña + Petite tranchée personelle + Malý zákop pro jednoho Trincheira pessoal pequena @@ -39,6 +46,8 @@ Kop małą wnękę Scava Trincea Piccola Cavar trinchera pequeña + Creuser une petite tranchée + Vykopat malý zákop Cavar trincheira pequena @@ -47,6 +56,7 @@ Wnęka - duża Fascia - Grande Trinchera grande + Enveloppe - grande Trincheira - Grande @@ -55,6 +65,8 @@ Duża jednoosobowa wnęka Grande Trincea Personale Trinchera personal grande + Grande tranchée personelle + Velký zákop pro jednoho Trincheira pessoal grande @@ -63,6 +75,8 @@ Kop dużą wnękę Scava Trincea Grande Cavar trinchera grande + Creuser une grande tranchée + Vykopat velký zákop Cavar trincheira grande @@ -71,6 +85,8 @@ Potwierdź kopanie Conferma Scava Confirmar cavado + Confirmer la creusée + Potvrdit kopání Confirmar excavação @@ -79,23 +95,43 @@ Anuluj kopanie Cancella Scava Cancelar cavado + Annuler la creusée + Zrušit kopání Cancelar excavação - +Ctrl rotate - +Strg drehen - +Ctrl obrót - +Ctrl ruota - +Ctrl rotar - +Ctrl rotaciona + Rotate + Drehen + Girar + Tourner + Rotazione + Otočit + Forgatás + Obrót + Rotaciona + Bращать Digging Trench Grabe Schützengraben - Kopanie okopu + Kopanie wnęki Sto Scavando la Trincea Cavando trinchera + Creuse la tranchée + Vykopat zákop Cavando trincheira + + Continue Digging Trench + Wzów kopanie wnęki + + + Remove Trench + Usuń wnękę + + + Removing Trench + Usuwanie wnęki + \ No newline at end of file diff --git a/addons/tripod/CfgEventHandlers.hpp b/addons/tripod/CfgEventHandlers.hpp index 6e31dde2cb..eaec430c1e 100644 --- a/addons/tripod/CfgEventHandlers.hpp +++ b/addons/tripod/CfgEventHandlers.hpp @@ -32,3 +32,9 @@ class Extended_Killed_EventHandlers { }; }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayMission { + ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); + }; +}; diff --git a/addons/tripod/CfgVehicles.hpp b/addons/tripod/CfgVehicles.hpp index de16d6867a..b30500ab00 100644 --- a/addons/tripod/CfgVehicles.hpp +++ b/addons/tripod/CfgVehicles.hpp @@ -1,3 +1,6 @@ + +class CBA_Extended_EventHandlers; + class CfgVehicles { class Man; class CAManBase: Man { @@ -8,7 +11,7 @@ class CfgVehicles { statement = QUOTE([ARR_2(_player,'ACE_Tripod')] call FUNC(place)); showDisabled = 0; priority = 2; - icon = PATHTOF(UI\w_sniper_tripod_ca.paa); + icon = QPATHTOF(UI\w_sniper_tripod_ca.paa); }; }; }; @@ -34,13 +37,16 @@ class CfgVehicles { class ThingX; class ACE_TripodObject: ThingX { - XEH_ENABLED; + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + EGVAR(dragging,canDrag) = 1; - EGVAR(dragging,dragPosition[]) = {0,1,0}; + EGVAR(dragging,dragPosition)[] = {0,1,0}; EGVAR(dragging,dragDirection) = 0; scope = 2; displayName = CSTRING(DisplayName); - model = PATHTOF(data\sniper_tripod.p3d); + model = QPATHTOF(data\sniper_tripod.p3d); class AnimationSources { class slide_down_tripod { @@ -70,7 +76,7 @@ class CfgVehicles { showDisabled = 0; exceptions[] = {}; priority = 5; - icon = PATHTOF(UI\w_sniper_tripod_ca.paa); + icon = QPATHTOF(UI\w_sniper_tripod_ca.paa); }; class ACE_Adjust { @@ -79,11 +85,11 @@ class CfgVehicles { distance = 5; condition = "true"; //wait a frame to handle "Do When releasing action menu key" option: - statement = QUOTE([ARR_2({_this call FUNC(adjust)}, [ARR_2(_player,_target)])] call EFUNC(common,execNextFrame)); + statement = QUOTE([ARR_2({_this call FUNC(adjust)}, [ARR_2(_player,_target)])] call CBA_fnc_execNextFrame); showDisabled = 0; exceptions[] = {}; priority = 5; - icon = PATHTOF(UI\w_sniper_tripod_ca.paa); + icon = QPATHTOF(UI\w_sniper_tripod_ca.paa); }; }; }; diff --git a/addons/tripod/CfgWeapons.hpp b/addons/tripod/CfgWeapons.hpp index 5ae0ee84d2..c83336e7a0 100644 --- a/addons/tripod/CfgWeapons.hpp +++ b/addons/tripod/CfgWeapons.hpp @@ -1,17 +1,17 @@ class CfgWeapons { class ACE_ItemCore; class InventoryItem_Base_F; - - class ACE_Tripod: ACE_ItemCore { - author[] = {"Rocko", "Scubaman3D"}; - scope = 2; - displayName = CSTRING(DisplayName); - descriptionShort = ""; - model = PATHTOF(data\w_sniper_tripod.p3d); - picture = PATHTOF(UI\w_sniper_tripod_ca.paa); - - class ItemInfo: InventoryItem_Base_F { + + class ACE_Tripod: ACE_ItemCore { + author[] = {"Rocko", "Scubaman3D"}; + scope = 2; + displayName = CSTRING(DisplayName); + descriptionShort = ""; + model = QPATHTOF(data\w_sniper_tripod.p3d); + picture = QPATHTOF(UI\w_sniper_tripod_ca.paa); + + class ItemInfo: InventoryItem_Base_F { mass = 40; }; - }; + }; }; diff --git a/addons/tripod/XEH_missionDisplayLoad.sqf b/addons/tripod/XEH_missionDisplayLoad.sqf new file mode 100644 index 0000000000..289d2f067a --- /dev/null +++ b/addons/tripod/XEH_missionDisplayLoad.sqf @@ -0,0 +1,5 @@ +#include "script_component.hpp" + +params ["_display"]; + +_display displayAddEventHandler ["MouseZChanged", {(_this select 1) call FUNC(handleScrollWheel)}]; diff --git a/addons/tripod/XEH_postInit.sqf b/addons/tripod/XEH_postInit.sqf index 6f2dc9b7e0..79aa7a69f2 100644 --- a/addons/tripod/XEH_postInit.sqf +++ b/addons/tripod/XEH_postInit.sqf @@ -9,8 +9,6 @@ GVAR(height) = 0; // Cancel adjustment if interact menu opens ["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler); -[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler); - // Cancel adjusting on player change. ["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); ["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler); diff --git a/addons/tripod/config.cpp b/addons/tripod/config.cpp index 80379019c3..1ee297e0e0 100644 --- a/addons/tripod/config.cpp +++ b/addons/tripod/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_Tripod"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"Rocko", "Scubaman3D", "Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Rocko", "Scubaman3D", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/tripod/functions/fnc_pickup.sqf b/addons/tripod/functions/fnc_pickup.sqf index 886aa5087e..9a291480ad 100644 --- a/addons/tripod/functions/fnc_pickup.sqf +++ b/addons/tripod/functions/fnc_pickup.sqf @@ -30,4 +30,4 @@ if (stance _unit == "STAND") then { deleteVehicle _tripod; [_unit, "ACE_Tripod"] call EFUNC(common,addToInventory); -}, [_unit, _tripod], 1] call EFUNC(common,waitAndExecute); +}, [_unit, _tripod], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/tripod/functions/fnc_place.sqf b/addons/tripod/functions/fnc_place.sqf index 3168703f31..64dc0786e8 100644 --- a/addons/tripod/functions/fnc_place.sqf +++ b/addons/tripod/functions/fnc_place.sqf @@ -53,4 +53,4 @@ if (stance _unit == "STAND") then { }; }, 0, [_tripod, _direction, _position]] call CBA_fnc_addPerFrameHandler; -}, [_unit], 1] call EFUNC(common,waitAndExecute); +}, [_unit], 1] call CBA_fnc_waitAndExecute; diff --git a/addons/ui/ACE_Settings.hpp b/addons/ui/ACE_Settings.hpp new file mode 100644 index 0000000000..e6c3e5e496 --- /dev/null +++ b/addons/ui/ACE_Settings.hpp @@ -0,0 +1,285 @@ +class ACE_Settings { + class GVAR(allowSelectiveUI) { + category = CSTRING(Category); + displayName = CSTRING(AllowSelectiveUI); + description = CSTRING(AllowSelectiveUI_Description); + typeName = "BOOL"; + value = 1; + }; + +// BASIC + class GVAR(soldierVehicleWeaponInfo) { + category = CSTRING(Category); + displayName = CSTRING(SoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(vehicleRadar) { + category = CSTRING(Category); + displayName = CSTRING(VehicleRadar); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(vehicleCompass) { + category = CSTRING(Category); + displayName = CSTRING(VehicleCompass); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(commandMenu) { + category = CSTRING(Category); + displayName = CSTRING(CommandMenu); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(groupBar) { + category = CSTRING(Category); + displayName = CSTRING(GroupBar); + typeName = "BOOL"; + value = 0; + isClientSettable = 1; + }; + +// ADVANCED + // Soldier + class GVAR(weaponName) { + category = CSTRING(Category); + displayName = CSTRING(WeaponName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(weaponNameBackground) { + category = CSTRING(Category); + displayName = CSTRING(WeaponNameBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(firingMode) { + category = CSTRING(Category); + displayName = CSTRING(FiringMode); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(ammoType) { + category = CSTRING(Category); + displayName = CSTRING(AmmoType); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(ammoCount) { + category = CSTRING(Category); + displayName = CSTRING(AmmoCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(magCount) { + category = CSTRING(Category); + displayName = CSTRING(MagCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(throwableName) { + category = CSTRING(Category); + displayName = CSTRING(throwableName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(throwableCount) { + category = CSTRING(Category); + displayName = CSTRING(throwableCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(zeroing) { + category = CSTRING(Category); + displayName = CSTRING(Zeroing); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(weaponLowerInfoBackground) { + category = CSTRING(Category); + displayName = CSTRING(WeaponLowerInfoBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(stance) { + category = CSTRING(Category); + displayName = CSTRING(Stance); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(staminaBar) { + category = CSTRING(Category); + displayName = CSTRING(StaminaBar); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + + // Gunner + class GVAR(gunnerWeaponName) { + category = CSTRING(Category); + displayName = CSTRING(GunnerWeaponName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(gunnerWeaponNameBackground) { + category = CSTRING(Category); + displayName = CSTRING(GunnerWeaponNameBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(gunnerFiringMode) { + category = CSTRING(Category); + displayName = CSTRING(GunnerFiringMode); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(gunnerAmmoType) { + category = CSTRING(Category); + displayName = CSTRING(GunnerAmmoType); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(gunnerAmmoCount) { + category = CSTRING(Category); + displayName = CSTRING(GunnerAmmoCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(gunnerMagCount) { + category = CSTRING(Category); + displayName = CSTRING(GunnerMagCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(gunnerLaunchableName) { + category = CSTRING(Category); + displayName = CSTRING(gunnerLaunchableName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(gunnerLaunchableCount) { + category = CSTRING(Category); + displayName = CSTRING(gunnerLaunchableCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(gunnerZeroing) { + category = CSTRING(Category); + displayName = CSTRING(GunnerZeroing); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(gunnerWeaponLowerInfoBackground) { + category = CSTRING(Category); + displayName = CSTRING(GunnerWeaponLowerInfoBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + + // Vehicle + class GVAR(vehicleName) { + category = CSTRING(Category); + displayName = CSTRING(VehicleName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(vehicleNameBackground) { + category = CSTRING(Category); + displayName = CSTRING(VehicleNameBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(vehicleFuelBar) { + category = CSTRING(Category); + displayName = CSTRING(VehicleFuelBar); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(vehicleSpeed) { + category = CSTRING(Category); + displayName = CSTRING(VehicleSpeed); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(vehicleAltitude) { + category = CSTRING(Category); + displayName = CSTRING(VehicleAltitude); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(vehicleDamage) { + category = CSTRING(Category); + displayName = CSTRING(VehicleDamage); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; + class GVAR(vehicleInfoBackground) { + category = CSTRING(Category); + displayName = CSTRING(VehicleInfoBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + value = 1; + isClientSettable = 1; + }; +}; diff --git a/addons/ui/ACE_UI.hpp b/addons/ui/ACE_UI.hpp new file mode 100644 index 0000000000..008d97db9b --- /dev/null +++ b/addons/ui/ACE_UI.hpp @@ -0,0 +1,180 @@ +#define ANYWHERE 0 +#define GROUND_ONLY 1 +#define VEHICLE_ONLY 2 + +class ACE_UI { + class weaponName { + idd = 300; + elements[] = {118}; + location = GROUND_ONLY; + class conditions {}; + }; + class weaponNameBackground { + idd = 300; + elements[] = {1001, 1008}; + location = GROUND_ONLY; + class conditions {}; + }; + class firingMode { + idd = 300; + elements[] = {187, 1203}; + location = GROUND_ONLY; + class conditions {}; + }; + class ammoType { + idd = 300; + elements[] = {155}; + location = GROUND_ONLY; + class conditions {}; + }; + class ammoCount { + idd = 300; + elements[] = {184}; + location = GROUND_ONLY; + class conditions {}; + }; + class magCount { + idd = 300; + elements[] = {185}; + location = GROUND_ONLY; + class conditions {}; + }; + class throwableName { + idd = 300; + elements[] = {152}; + location = GROUND_ONLY; + class conditions {}; + }; + class throwableCount { + idd = 300; + elements[] = {151}; + location = GROUND_ONLY; + class conditions {}; + }; + class zeroing { + idd = 300; + elements[] = {168}; + location = GROUND_ONLY; + class conditions {}; + }; + class weaponLowerInfoBackground { + idd = 300; + elements[] = {1202}; + location = GROUND_ONLY; + class conditions {}; + }; + class staminaBar { + idd = 305; + elements[] = {193}; + location = GROUND_ONLY; + class conditions {}; + }; + class stance { + idd = 303; + elements[] = {188, 1201}; + location = GROUND_ONLY; + class conditions {}; + }; + class gunnerWeaponName { + idd = 300; + elements[] = {118}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class gunnerWeaponNameBackground { + idd = 300; + elements[] = {1001, 1008}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class gunnerFiringMode { + idd = 300; + elements[] = {187, 1203}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class gunnerAmmoType { + idd = 300; + elements[] = {155}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class gunnerAmmoCount { + idd = 300; + elements[] = {184}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class gunnerMagCount { + idd = 300; + elements[] = {185}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class gunnerLaunchableName { + idd = 300; + elements[] = {152}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class gunnerLaunchableCount { + idd = 300; + elements[] = {151}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class gunnerZeroing { + idd = 300; + elements[] = {168}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class gunnerWeaponLowerInfoBackground { + idd = 300; + elements[] = {1202}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class vehicleName { + idd = 300; + elements[] = {120}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class vehicleNameBackground { + idd = 300; + elements[] = {1000, 1013}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class vehicleFuelBar { + idd = 300; + elements[] = {113, 1202}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class vehicleSpeed { + idd = 300; + elements[] = {121, 1004, 1006}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class vehicleAltitude { + idd = 300; + elements[] = {122, 1005, 1014}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class vehicleDamage { + idd = 300; + elements[] = {111}; + location = VEHICLE_ONLY; + class conditions {}; + }; + class vehicleInfoBackground { + idd = 300; + elements[] = {1200}; + location = VEHICLE_ONLY; + class conditions {}; + }; +}; diff --git a/addons/headless/CfgEventHandlers.hpp b/addons/ui/CfgEventHandlers.hpp similarity index 57% rename from addons/headless/CfgEventHandlers.hpp rename to addons/ui/CfgEventHandlers.hpp index b9c2681558..36c0fca8a3 100644 --- a/addons/headless/CfgEventHandlers.hpp +++ b/addons/ui/CfgEventHandlers.hpp @@ -1,4 +1,3 @@ - class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preStart)); @@ -13,14 +12,6 @@ class Extended_PreInit_EventHandlers { class Extended_PostInit_EventHandlers { class ADDON { - init = QUOTE(call COMPILE_FILE(XEH_postInit)); - }; -}; - -class Extended_InitPost_EventHandlers { - class AllVehicles { - class ADDON { - serverInit = QUOTE(_this call FUNC(handleInitPost)); - }; + clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit)); }; }; diff --git a/addons/ui/CfgVehicles.hpp b/addons/ui/CfgVehicles.hpp new file mode 100644 index 0000000000..0b1cc9b2a9 --- /dev/null +++ b/addons/ui/CfgVehicles.hpp @@ -0,0 +1,231 @@ +class CfgVehicles { + class ACE_Module; + class GVAR(Module): ACE_Module { + author = ECSTRING(common,ACETeam); + category = "ACE"; + displayName = CSTRING(ModuleName); + function = QFUNC(moduleInit); + scope = 2; + isGlobal = 1; + icon = QUOTE(PATHTOF(UI\Icon_Module_UI_ca.paa)); + class Arguments { + class allowSelectiveUI { + displayName = CSTRING(AllowSelectiveUI); + description = CSTRING(AllowSelectiveUI_Description); + typeName = "BOOL"; + defaultValue = 1; + }; + + // BASIC + class soldierVehicleWeaponInfo { + displayName = CSTRING(SoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class vehicleRadar { + displayName = CSTRING(VehicleRadar); + typeName = "BOOL"; + defaultValue = 1; + }; + class vehicleCompass { + displayName = CSTRING(VehicleCompass); + typeName = "BOOL"; + defaultValue = 1; + }; + class commandMenu { + displayName = CSTRING(CommandMenu); + typeName = "BOOL"; + defaultValue = 1; + }; + class groupBar { + displayName = CSTRING(GroupBar); + typeName = "BOOL"; + defaultValue = 0; + }; + + // ADVANCED + // Soldier + class weaponName { + displayName = CSTRING(WeaponName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class weaponNameBackground { + displayName = CSTRING(WeaponNameBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class firingMode { + displayName = CSTRING(FiringMode); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class ammoType { + displayName = CSTRING(AmmoType); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class ammoCount { + displayName = CSTRING(AmmoCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class magCount { + displayName = CSTRING(MagCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class throwableName { + displayName = CSTRING(throwableName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class throwableCount { + displayName = CSTRING(throwableCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class zeroing { + displayName = CSTRING(Zeroing); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class weaponLowerInfoBackground { + displayName = CSTRING(WeaponLowerInfoBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class stance { + displayName = CSTRING(Stance); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class staminaBar { + displayName = CSTRING(StaminaBar); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + + // Gunner + class gunnerWeaponName { + displayName = CSTRING(GunnerWeaponName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class gunnerWeaponNameBackground { + displayName = CSTRING(GunnerWeaponNameBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class gunnerFiringMode { + displayName = CSTRING(GunnerFiringMode); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class gunnerAmmoType { + displayName = CSTRING(GunnerAmmoType); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class gunnerAmmoCount { + displayName = CSTRING(GunnerAmmoCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class gunnerMagCount { + displayName = CSTRING(GunnerMagCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class gunnerLaunchableName { + displayName = CSTRING(gunnerLaunchableName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class gunnerLaunchableCount { + displayName = CSTRING(gunnerLaunchableCount); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class gunnerZeroing { + displayName = CSTRING(GunnerZeroing); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class gunnerWeaponLowerInfoBackground { + displayName = CSTRING(GunnerWeaponLowerInfoBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + + // Vehicle + class vehicleName { + displayName = CSTRING(VehicleName); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class vehicleNameBackground { + displayName = CSTRING(VehicleNameBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class vehicleFuelBar { + displayName = CSTRING(VehicleFuelBar); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class vehicleSpeed { + displayName = CSTRING(VehicleSpeed); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class vehicleAltitude { + displayName = CSTRING(VehicleAltitude); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class vehicleDamage { + displayName = CSTRING(VehicleDamage); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + class vehicleInfoBackground { + displayName = CSTRING(VehicleInfoBackground); + description = CSTRING(RequiresSoldierVehicleWeaponInfo); + typeName = "BOOL"; + defaultValue = 1; + }; + }; + class ModuleDescription { + description = CSTRING(ModuleDescription); + }; + }; +}; diff --git a/addons/ui/README.md b/addons/ui/README.md index 340e3ad0f6..c55ffbc5c7 100644 --- a/addons/ui/README.md +++ b/addons/ui/README.md @@ -1,7 +1,7 @@ ace_ui ======= -Removes vignette and changes the chat contrast on the map to allow easier reading. +Removes vignette, changes the chat contrast on the map to allow easier reading and provides settings to hide or show different UI elements. ## Maintainers @@ -9,3 +9,4 @@ Removes vignette and changes the chat contrast on the map to allow easier readin The people responsible for merging changes to this component or answering potential questions. - [VKing](https://github.com/VKing6) +- [Jonpas](https://github.com/jonpas) diff --git a/addons/ui/UI/Icon_Module_UI_ca.paa b/addons/ui/UI/Icon_Module_UI_ca.paa new file mode 100644 index 0000000000..f23b8b40c9 Binary files /dev/null and b/addons/ui/UI/Icon_Module_UI_ca.paa differ diff --git a/addons/ui/XEH_PREP.hpp b/addons/ui/XEH_PREP.hpp new file mode 100644 index 0000000000..8a6b4d2ce1 --- /dev/null +++ b/addons/ui/XEH_PREP.hpp @@ -0,0 +1,4 @@ +PREP(moduleInit); +PREP(setAdvancedElement); +PREP(setElements); +PREP(setElementVisibility); diff --git a/addons/ui/XEH_clientInit.sqf b/addons/ui/XEH_clientInit.sqf new file mode 100644 index 0000000000..72a754a28e --- /dev/null +++ b/addons/ui/XEH_clientInit.sqf @@ -0,0 +1,39 @@ +#include "script_component.hpp" + +// Exit on Headless +if (!hasInterface) exitWith {}; + +["SettingsInitialized", { + // Initial settings + [true] call FUNC(setElements); + + // On load and entering/exiting a vehicle + ["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)); + { + private _name = configName _x; + [_name, missionNamespace getVariable (format [QGVAR(%1), _name]), false, _force] call FUNC(setAdvancedElement); + } forEach ("true" configClasses (configFile >> "ACE_UI")); + + // Execute local event for when it's safe to modify UI through this API + // infoDisplayChanged can execute multiple times, make sure it only happens once + if (!GVAR(interfaceInitialized)) then { + ["InterfaceInitialized", []] call EFUNC(common,localEvent); + GVAR(interfaceInitialized) = true; + }; + }] call EFUNC(common,addEventHandler); + + // On changing settings + ["SettingChanged", { + params ["_name"]; + + if (_name in ELEMENTS_BASIC) then { + [false] call FUNC(setElements); + } else { + [_name select [7], missionNamespace getVariable _name, true] call FUNC(setAdvancedElement); + }; + }] call EFUNC(common,addEventHandler); + +}] call EFUNC(common,addEventHandler); diff --git a/addons/ui/XEH_preInit.sqf b/addons/ui/XEH_preInit.sqf new file mode 100644 index 0000000000..8646227653 --- /dev/null +++ b/addons/ui/XEH_preInit.sqf @@ -0,0 +1,10 @@ +#include "script_component.hpp" + +ADDON = false; + +#include "XEH_PREP.hpp" + +GVAR(elementsSet) = []; +GVAR(interfaceInitialized) = false; + +ADDON = true; diff --git a/addons/ui/XEH_preStart.sqf b/addons/ui/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/ui/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/ui/config.cpp b/addons/ui/config.cpp index f545600758..0b680ca136 100644 --- a/addons/ui/config.cpp +++ b/addons/ui/config.cpp @@ -6,11 +6,17 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"VKing", "Jonpas"}; - authorUrl = "http://ace3mod.com/"; + author = ECSTRING(common,ACETeam); + authors[] = {"VKing", "Jonpas"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; +#include "CfgEventHandlers.hpp" +#include "CfgVehicles.hpp" +#include "ACE_Settings.hpp" +#include "ACE_UI.hpp" + #include "RscChat.hpp" #include "RscVignette.hpp" diff --git a/addons/ui/functions/fnc_moduleInit.sqf b/addons/ui/functions/fnc_moduleInit.sqf new file mode 100644 index 0000000000..6bfe29392f --- /dev/null +++ b/addons/ui/functions/fnc_moduleInit.sqf @@ -0,0 +1,66 @@ +/* + * Author: Jonpas + * Initializes the UI module. + * + * Arguments: + * 0: Module Logic + * 1: Units + * 2: Activated + * + * Return Value: + * None + */ +#include "script_component.hpp" + +if (!isServer) exitWith {}; + +params ["_logic", "_units", "_activated"]; + +if (!_activated) exitWith {}; + +[_logic, QGVAR(allowSelectiveUI), "allowSelectiveUI"] call EFUNC(common,readSettingFromModule); + +// Basic +if (isArray (missionConfigFile >> "showHUD")) then { + // HUD visibility is hardcoded in mission config and showHUD command is overriden + ACE_LOGINFO("User Interface Module Failed to Initialize Basic settings - showHUD overriden in mission config!"); +} else { + [_logic, QGVAR(soldierVehicleWeaponInfo), "soldierVehicleWeaponInfo"] call EFUNC(common,readSettingFromModule); + [_logic, QGVAR(vehicleRadar), "vehicleRadar"] call EFUNC(common,readSettingFromModule); + [_logic, QGVAR(vehicleCompass), "vehicleCompass"] call EFUNC(common,readSettingFromModule); + [_logic, QGVAR(commandMenu), "commandMenu"] call EFUNC(common,readSettingFromModule); + [_logic, QGVAR(groupBar), "groupBar"] call EFUNC(common,readSettingFromModule); +}; + +// Advanced +[_logic, QGVAR(weaponName), "weaponName"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(weaponNameBackground), "weaponNameBackground"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(firingMode), "firingMode"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(ammoType), "ammoType"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(ammoCount), "ammoCount"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(magCount), "magCount"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(throwableName), "throwableName"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(throwableCount), "throwableCount"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(zeroing), "zeroing"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(weaponLowerInfoBackground), "weaponLowerInfoBackground"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(stance), "stance"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(staminaBar), "staminaBar"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerWeaponName), "gunnerWeaponName"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerWeaponNameBackground), "gunnerWeaponNameBackground"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerFiringMode), "gunnerFiringMode"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerAmmoType), "gunnerAmmoType"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerAmmoCount), "gunnerAmmoCount"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerMagCount), "gunnerMagCount"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerLaunchableName), "gunnerLaunchableName"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerLaunchableCount), "gunnerLaunchableCount"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerZeroing), "gunnerZeroing"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(gunnerWeaponLowerInfoBackground), "gunnerWeaponLowerInfoBackground"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(vehicleName), "vehicleName"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(vehicleNameBackground), "vehicleNameBackground"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(vehicleFuelBar), "vehicleFuelBar"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(vehicleSpeed), "vehicleSpeed"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(vehicleAltitude), "vehicleAltitude"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(vehicleDamage), "vehicleDamage"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(vehicleInfoBackground), "vehicleInfoBackground"] call EFUNC(common,readSettingFromModule); + +ACE_LOGINFO_1("User Interface Module Initialized. Allow client modifications: %1",GVAR(allowSelectiveUI)); diff --git a/addons/ui/functions/fnc_setAdvancedElement.sqf b/addons/ui/functions/fnc_setAdvancedElement.sqf new file mode 100644 index 0000000000..3f087d8974 --- /dev/null +++ b/addons/ui/functions/fnc_setAdvancedElement.sqf @@ -0,0 +1,85 @@ +/* + * Author: Jonpas + * Sets advanced visible element of the UI using displays and controls. + * + * Arguments: + * 0: Element Name + * 1: Show/Hide Element + * 2: Show Hint + * 3: Force change even when disallowed (default: false) + * + * Return Value: + * Successfully Set + * + * Example: + * ["ace_ui_ammoCount", true, false] call ace_ui_fnc_setAdvancedElement + * + * Public: No + */ +#include "script_component.hpp" + +params ["_element", "_show", ["_showHint", false, [true]], ["_force", false, [true]] ]; + +if (!_force && {!GVAR(allowSelectiveUI)}) exitWith { + [LSTRING(Disallowed), 2] call EFUNC(common,displayTextStructured); + false +}; + +private _config = configFile >> "ACE_UI" >> _element; + +// Exit if main vehicle type condition not fitting +private _location = getNumber (_config >> "location"); // (0-both, 1-ground, 2-vehicle) +private _currentLocation = ACE_player == vehicle ACE_player; +if ((_currentLocation && _location == 2) || (!_currentLocation && _location == 1)) exitWith {false}; + +private _idd = getNumber (_config >> "idd"); +private _elements = getArray (_config >> "elements"); + +// Get setting from config API +{ + private _condition = call compile (getText _x); + if !(_condition) exitWith { + TRACE_2("Condition False",_element,_x); + // Display and print info which component forced the element except for default vehicle check + if (_showHint) then { + [LSTRING(Disabled), 2] call EFUNC(common,displayTextStructured); + }; + _show = false; + }; +} forEach (configProperties [_config >> "conditions"]); + +// Get setting from scripted API +if (!_force) then { + private _index = GVAR(elementsSet) find [_element, _show]; + if (_index == -1) then { + _index = GVAR(elementsSet) find [_element, !_show]; + if (_index != -1) then { + if (_showHint) then { + [LSTRING(Disabled), 2] call EFUNC(common,displayTextStructured); + }; + _show = ((GVAR(elementsSet)) select _index) select 1; + }; + }; +}; + +_show = [1, 0] select _show; + +// Disable/Enable elements +private _success = false; +{ + private _idc = _x; + + // Loop through IGUI displays as they can be present several times for some reason + { + if (_idd == ctrlIDD _x) then { + //TRACE_3("Setting Element Visibility",_show,_idd,_idc); + + (_x displayCtrl _idc) ctrlSetFade _show; + (_x displayCtrl _idc) ctrlCommit 0; + + _success = true; + }; + } forEach (uiNamespace getVariable "IGUI_displays"); +} forEach _elements; + +_success diff --git a/addons/ui/functions/fnc_setElementVisibility.sqf b/addons/ui/functions/fnc_setElementVisibility.sqf new file mode 100644 index 0000000000..8fbe4cf294 --- /dev/null +++ b/addons/ui/functions/fnc_setElementVisibility.sqf @@ -0,0 +1,64 @@ +/* + * Author: Jonpas + * Setter for toggling advanced element visibility. + * + * Arguments: + * 0: Set/Unset + * 1: Element Name + * 2: Show/Hide Element (default: false) + * + * Return Value: + * None + * + * Example: + * [true, "ace_ui_ammoCount", false] call ace_ui_fnc_setElementVisibility + * + * Public: Yes + */ +#include "script_component.hpp" + +params [ + ["_set", true, [true]], + ["_element", "", [""]], + ["_show", false, [true]] +]; + +// Verify element is bound +if (!isClass (configFile >> "ACE_UI" >> _element)) exitWith { + ACE_LOGWARNING_1("Element '%1' does not exist",_element); +}; + +private _return = false; + +if (_set) then { + // Exit if element has been set from another component, print warning if after interface initialization + if ([_element, _show] in GVAR(elementsSet) || {[_element, !_show] in GVAR(elementsSet)}) exitWith { + if (GVAR(interfaceInitialized)) then { + ACE_LOGWARNING_2("Element '%1' already set in %2",_element,GVAR(elementsSet)); + }; + }; + + TRACE_3("Setting element",_element,_show,GVAR(elementsSet)); + private _success = [_element, _show, false, true] call FUNC(setAdvancedElement); + + if (_success) then { + GVAR(elementsSet) pushBack [_element, _show]; + _return = true; + }; +} else { + if ([_element, _show] in GVAR(elementsSet) || {[_element, !_show] in GVAR(elementsSet)}) then { + TRACE_3("Unsetting element",_element,_show,GVAR(elementsSet)); + + private _index = GVAR(elementsSet) find [_element, _show]; + if (_index == -1) then { + _index = GVAR(elementsSet) find [_element, !_show]; + }; + GVAR(elementsSet) deleteAt _index; + + [_element, _show, false, true] call FUNC(setAdvancedElement); + _return = true; + }; +}; + +TRACE_2("Visibility set",_return,GVAR(elementsSet)); +_return diff --git a/addons/ui/functions/fnc_setElements.sqf b/addons/ui/functions/fnc_setElements.sqf new file mode 100644 index 0000000000..877489aba4 --- /dev/null +++ b/addons/ui/functions/fnc_setElements.sqf @@ -0,0 +1,31 @@ +/* + * Author: Jonpas + * Sets basic visible elements of the UI using showHUD setter. + * + * Arguments: + * 0: Force change even when disallowed (default: false) + * + * Return Value: + * None + * + * Example: + * [false] call ace_ui_fnc_setElements + * + * Public: No + */ +#include "script_component.hpp" + +if (isArray (missionConfigFile >> "showHUD")) exitWith {}; + +params [ ["_force", false, [true]] ]; + +["ui", [ + true, + GVAR(soldierVehicleWeaponInfo), + GVAR(vehicleRadar), + GVAR(vehicleCompass), + true, + GVAR(commandMenu), + GVAR(groupBar), + true +]] call EFUNC(common,showHud); diff --git a/addons/ui/functions/script_component.hpp b/addons/ui/functions/script_component.hpp new file mode 100644 index 0000000000..656228f742 --- /dev/null +++ b/addons/ui/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\ui\script_component.hpp" diff --git a/addons/ui/script_component.hpp b/addons/ui/script_component.hpp index 2c669b78e5..d57697867c 100644 --- a/addons/ui/script_component.hpp +++ b/addons/ui/script_component.hpp @@ -15,3 +15,54 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + + +// Basic Elements +#define ELEMENTS_BASIC [QGVAR(soldierVehicleWeaponInfo), QGVAR(vehicleRadar), QGVAR(vehicleCompass), QGVAR(commandMenu), QGVAR(groupBar)] + +/* +RscUnitInfo = 300 +-------------------- +118 (Weapon Name / Gunner Weapon Name) ++ 1001 (Weapon Name Background 1/2 / Gunner Weapon Name Background 1/2) ++ 1008 (Weapon Name Background 2/2 / Gunner Weapon Name Background 2/2) + +187 (Firing Mode / Gunner Firing Mode) ++ 1203 (Firing Mode Background / Gunner Firing Mode Background) + +155 (Ammo Type / Gunner Ammo Type) +184 (Ammo Count / Gunner Ammo Count) +185 (Magazine Count / Gunner Magazine Count) +152 (Grenade/Flare Type / Launchable Type) +151 (Grenade/Flare Count / Launchable Count) +1202 (Lower Weapon Info Background / Gunner Lower Weapon Info Background) +168 (Zeroing / Gunner Zeroing) + + +120 (Vehicle Name) +1000 (Vehicle Name Background 1/2) ++ 1013 (Vehicle Name Background 2/2) + +113 (Vehicle Fuel Bar) ++ 1202 (Vehicle Fuel Bar Background) + +121 (Vehicle Speed Number) ++ 1004 (Vehicle Speed Unit) ++ 1006 (Vehicle Speed Background) +122 (Vehicle Altitude Number) ++ 1005 (Vehicle Altitude Units) ++ 1014 (Vehicle Altitude Background) +111 (Vehicle Damage) +1200 (Vehicle Info Background) + + +RscStanceInfo = 303 +-------------------- +188 (Stance) ++ 1201 (Stance Background) + + +RscStaminaBar = 305 +-------------------- +193 (Stamina Bar) +*/ diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml new file mode 100644 index 0000000000..61dcc18ee7 --- /dev/null +++ b/addons/ui/stringtable.xml @@ -0,0 +1,160 @@ + + + + + User Interface + Uživatelské rozhraní + + + User Interface + Uživatelské rozhraní + + + This module allows toggling visible user interface parts. + + + Allow Selective UI + Povolit selektivní UI + + + Allow client to modify their UI. + Povolit klientovi měnit jeho UI + + + Soldier/Vehicle/Weapon Information + Informace o Vojákovi/Vozidlu/Zbrani + + + Vehicle Radar + Radar vozidla + + + Vehicle Compass + Kompas vozidla + + + Command Menu + Menu rozkazů + + + Group Bar + Panel skupiny + + + Weapon Name + Název zbraně + + + Weapon Name Background + Název zbraně v pozadí + + + Firing Mode + Režim palby + + + Ammo Type + Typ munice + + + Ammo Count + Počet munice + + + Magazine Count + Počet zásobníků + + + Throwable Type + Typ granátů apod. + + + Throwable Count + Počet granátů apod. + + + Zeroing + Náměr + + + Weapon Lower Info Background + + + Stance + Postoj + + + Stamina Bar + Panel výdrže + + + Gunner Weapon Name + + + Gunner Weapon Name Background + + + Gunner Firing Mode + + + Gunner Ammo Type + + + Gunner Ammo Count + + + Gunner Magazine Count + + + Gunner Launchable Type + + + Gunner Launchable Count + + + Gunner Zeroing + + + Gunner Weapon Lower Info Background + + + Vehicle Name + Název vozidla + + + Vehicle Name Background + Název vozidla v pozadí + + + Vehicle Fuel Bar + Ukazatel paliva + + + Vehicle Speed + Rychlost vozidla + + + Vehicle Altitude + Výška vozidla + + + Vehicle Damage + Poškození vozidla + + + Vehicle Info Background + Info o vozidle v pozadí + + + Requires Soldier/Vehicle/Weapon Information. + Vyžaduje informace o Vojákovi/Vozidlu/Zbrani + + + Modifying User Interface is disabled. + Změna uživatelského rozhraní je zakázána. + + + Cannot modify a forced User Interface element. + + + diff --git a/addons/vector/CfgWeapons.hpp b/addons/vector/CfgWeapons.hpp index 019d774da8..cc2cf985f6 100644 --- a/addons/vector/CfgWeapons.hpp +++ b/addons/vector/CfgWeapons.hpp @@ -5,12 +5,17 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); displayName = CSTRING(VectorName); descriptionShort = CSTRING(VectorDescription); - model = PATHTOF(ace_vector.p3d); - modelOptics = PATHTOF(ace_vector_optics.p3d); - picture = PATHTOF(UI\ace_vector_x_ca.paa); + model = QPATHTOF(ace_vector.p3d); + modelOptics = QPATHTOF(ace_vector_optics.p3d); + picture = QPATHTOF(UI\ace_vector_x_ca.paa); visionMode[] = {"Normal","NVG"}; opticsZoomMax = 0.06621; opticsZoomMin = 0.06621; weaponInfoType = "ACE_RscOptics_vector"; }; + class ACE_VectorDay: ACE_Vector { + author = ECSTRING(common,ACETeam); + displayName = CSTRING(VectorDayName); + visionMode[] = {"Normal"}; + }; }; diff --git a/addons/vector/config.cpp b/addons/vector/config.cpp index e2a52b47ef..66b2a5c7ea 100644 --- a/addons/vector/config.cpp +++ b/addons/vector/config.cpp @@ -3,11 +3,12 @@ class CfgPatches { class ADDON { units[] = {"ACE_Item_Vector"}; - weapons[] = {"ACE_Vector"}; + weapons[] = {"ACE_Vector", "ACE_VectorDay"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Ghost","Hamburger SV","commy2","bux578"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"Ghost","Hamburger SV","commy2","bux578"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/vector/functions/fnc_convertToTexturesDegree.sqf b/addons/vector/functions/fnc_convertToTexturesDegree.sqf index a028012cec..b94c2edf64 100644 --- a/addons/vector/functions/fnc_convertToTexturesDegree.sqf +++ b/addons/vector/functions/fnc_convertToTexturesDegree.sqf @@ -32,25 +32,25 @@ if (GVAR(useMil)) then { _digit1 = floor (_number / 100); _digit2 = floor (_number / 10) - _digit1 * 10; _digit3 = _number mod 10; - _digit4 = QUOTE(PATHTOF(rsc\vector_degree.paa)); + _digit4 = QPATHTOF(rsc\vector_degree.paa); if (_isNegative) then { if (_digit1 == 0) then { if (_digit2 == 0) then { _digit1 = ""; - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; } else { - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; }; } else { - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = QPATHTOF(rsc\vector_minus.paa); + _digit4 = QPATHTOF(rsc\vector_minus.paa); }; } else { @@ -59,16 +59,16 @@ if (GVAR(useMil)) then { if (_digit2 == 0) then { _digit1 = ""; _digit2 = ""; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; } else { _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; }; } else { - _digit1 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit1]; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; + _digit1 = format [QPATHTOF(rsc\vector_%1.paa), _digit1]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; }; }; diff --git a/addons/vector/functions/fnc_convertToTexturesDistance.sqf b/addons/vector/functions/fnc_convertToTexturesDistance.sqf index ea0d054e5e..eb39febfe8 100644 --- a/addons/vector/functions/fnc_convertToTexturesDistance.sqf +++ b/addons/vector/functions/fnc_convertToTexturesDistance.sqf @@ -15,7 +15,7 @@ _isNegative = _number < 0; _number = abs _number; if (_number >= 10000) exitWith { - [QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa))] // return + [QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa)] // return }; private ["_digit1", "_digit2", "_digit3", "_digit4"]; @@ -32,25 +32,25 @@ if (_isNegative) then { if (_digit3 == 0) then { _digit1 = ""; _digit2 = ""; - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit3 = QPATHTOF(rsc\vector_minus.paa); + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; } else { _digit1 = ""; - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = QPATHTOF(rsc\vector_minus.paa); + _digit4 = QPATHTOF(rsc\vector_minus.paa); }; } else { @@ -61,24 +61,24 @@ if (_isNegative) then { _digit1 = ""; _digit2 = ""; _digit3 = ""; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; } else { _digit1 = ""; _digit2 = ""; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { - _digit1 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit1]; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit1 = format [QPATHTOF(rsc\vector_%1.paa), _digit1]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; }; diff --git a/addons/vector/functions/fnc_convertToTexturesFOS.sqf b/addons/vector/functions/fnc_convertToTexturesFOS.sqf index 6141e40fa8..7a77a3aab8 100644 --- a/addons/vector/functions/fnc_convertToTexturesFOS.sqf +++ b/addons/vector/functions/fnc_convertToTexturesFOS.sqf @@ -16,7 +16,7 @@ _isNegative = _number < 0; _number = abs _number; if (_number > 9999) exitWith { - [QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa))] // return + [QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa)] // return }; private ["_digit0", "_digit1", "_digit2", "_digit3", "_digit4"]; @@ -35,31 +35,31 @@ switch (_coordinate) do { if (_digit1 == 0) then { if (_digit2 == 0) then { if (_digit3 == 0) then { - _digit0 = QUOTE(PATHTOF(rsc\vector_l.paa)); + _digit0 = QPATHTOF(rsc\vector_l.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit3 = ""; _digit4 = ""; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_l.paa)); + _digit0 = QPATHTOF(rsc\vector_l.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit4 = ""; }; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_l.paa)); + _digit0 = QPATHTOF(rsc\vector_l.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { _digit0 = ""; - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = QPATHTOF(rsc\vector_minus.paa); + _digit4 = QPATHTOF(rsc\vector_minus.paa); }; } else { @@ -67,31 +67,31 @@ switch (_coordinate) do { if (_digit1 == 0) then { if (_digit2 == 0) then { if (_digit3 == 0) then { - _digit0 = QUOTE(PATHTOF(rsc\vector_r.paa)); + _digit0 = QPATHTOF(rsc\vector_r.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit3 = ""; _digit4 = ""; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_r.paa)); + _digit0 = QPATHTOF(rsc\vector_r.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit4 = ""; }; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_r.paa)); + _digit0 = QPATHTOF(rsc\vector_r.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { _digit0 = ""; - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = QPATHTOF(rsc\vector_minus.paa); + _digit4 = QPATHTOF(rsc\vector_minus.paa); }; }; @@ -104,31 +104,31 @@ switch (_coordinate) do { if (_digit1 == 0) then { if (_digit2 == 0) then { if (_digit3 == 0) then { - _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); + _digit0 = QPATHTOF(rsc\vector_d.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit3 = ""; _digit4 = ""; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); + _digit0 = QPATHTOF(rsc\vector_d.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit4 = ""; }; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); + _digit0 = QPATHTOF(rsc\vector_d.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { _digit0 = ""; - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = QPATHTOF(rsc\vector_minus.paa); + _digit4 = QPATHTOF(rsc\vector_minus.paa); }; } else { @@ -136,31 +136,31 @@ switch (_coordinate) do { if (_digit1 == 0) then { if (_digit2 == 0) then { if (_digit3 == 0) then { - _digit0 = QUOTE(PATHTOF(rsc\vector_a.paa)); + _digit0 = QPATHTOF(rsc\vector_a.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit3 = ""; _digit4 = ""; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_a.paa)); + _digit0 = QPATHTOF(rsc\vector_a.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit4 = ""; }; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_a.paa)); + _digit0 = QPATHTOF(rsc\vector_a.paa); _digit1 = ""; - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { _digit0 = ""; - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = QPATHTOF(rsc\vector_minus.paa); + _digit4 = QPATHTOF(rsc\vector_minus.paa); }; }; @@ -173,31 +173,31 @@ switch (_coordinate) do { if (_digit1 == 0) then { if (_digit2 == 0) then { if (_digit3 == 0) then { - _digit0 = QUOTE(PATHTOF(rsc\vector_u.paa)); - _digit1 = QUOTE(PATHTOF(rsc\vector_p.paa)); + _digit0 = QPATHTOF(rsc\vector_u.paa); + _digit1 = QPATHTOF(rsc\vector_p.paa); _digit2 = ""; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit4 = ""; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_u.paa)); - _digit1 = QUOTE(PATHTOF(rsc\vector_p.paa)); + _digit0 = QPATHTOF(rsc\vector_u.paa); + _digit1 = QPATHTOF(rsc\vector_p.paa); _digit2 = ""; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_u.paa)); - _digit1 = QUOTE(PATHTOF(rsc\vector_p.paa)); - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit0 = QPATHTOF(rsc\vector_u.paa); + _digit1 = QPATHTOF(rsc\vector_p.paa); + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { _digit0 = ""; - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = QPATHTOF(rsc\vector_minus.paa); + _digit4 = QPATHTOF(rsc\vector_minus.paa); }; } else { @@ -205,31 +205,31 @@ switch (_coordinate) do { if (_digit1 == 0) then { if (_digit2 == 0) then { if (_digit3 == 0) then { - _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); - _digit1 = QUOTE(PATHTOF(rsc\vector_n.paa)); + _digit0 = QPATHTOF(rsc\vector_d.paa); + _digit1 = QPATHTOF(rsc\vector_n.paa); _digit2 = ""; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; _digit4 = ""; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); - _digit1 = QUOTE(PATHTOF(rsc\vector_n.paa)); + _digit0 = QPATHTOF(rsc\vector_d.paa); + _digit1 = QPATHTOF(rsc\vector_n.paa); _digit2 = ""; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { - _digit0 = QUOTE(PATHTOF(rsc\vector_d.paa)); - _digit1 = QUOTE(PATHTOF(rsc\vector_n.paa)); - _digit2 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit2]; - _digit3 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit3]; - _digit4 = format [QUOTE(PATHTOF(rsc\vector_%1.paa)), _digit4]; + _digit0 = QPATHTOF(rsc\vector_d.paa); + _digit1 = QPATHTOF(rsc\vector_n.paa); + _digit2 = format [QPATHTOF(rsc\vector_%1.paa), _digit2]; + _digit3 = format [QPATHTOF(rsc\vector_%1.paa), _digit3]; + _digit4 = format [QPATHTOF(rsc\vector_%1.paa), _digit4]; }; } else { _digit0 = ""; - _digit1 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit2 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit3 = QUOTE(PATHTOF(rsc\vector_minus.paa)); - _digit4 = QUOTE(PATHTOF(rsc\vector_minus.paa)); + _digit1 = QPATHTOF(rsc\vector_minus.paa); + _digit2 = QPATHTOF(rsc\vector_minus.paa); + _digit3 = QPATHTOF(rsc\vector_minus.paa); + _digit4 = QPATHTOF(rsc\vector_minus.paa); }; }; @@ -238,7 +238,7 @@ switch (_coordinate) do { // trap errors if !([_digit0, _digit1, _digit2, _digit3, _digit4] isEqualTypeAll "") exitWith { - [QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa)), QUOTE(PATHTOF(rsc\vector_minus.paa))] // return + [QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa), QPATHTOF(rsc\vector_minus.paa)] // return }; [_digit0, _digit1, _digit2, _digit3, _digit4] diff --git a/addons/vector/functions/fnc_onKeyDown.sqf b/addons/vector/functions/fnc_onKeyDown.sqf index 9fa51e9068..feb706bc02 100644 --- a/addons/vector/functions/fnc_onKeyDown.sqf +++ b/addons/vector/functions/fnc_onKeyDown.sqf @@ -40,19 +40,19 @@ switch (_this select 0) do { // handle input in option menu if (GVAR(currentMode) == "settings") exitWith { - if (ACE_diagTime < GVAR(keyDownTimeMenu) + 1) exitWith {}; + if (diag_tickTime < GVAR(keyDownTimeMenu) + 1) exitWith {}; - if (ACE_diagTime < GVAR(keyDownTimeAzimuth) + 0.5) then { + if (diag_tickTime < GVAR(keyDownTimeAzimuth) + 0.5) then { GVAR(keyDownTabCountAzimuth) = (GETGVAR(keyDownTabCountAzimuth,0)) + 1; } else { GVAR(keyDownTabCountAzimuth) = 1; }; - GVAR(keyDownTimeAzimuth) = ACE_diagTime; + GVAR(keyDownTimeAzimuth) = diag_tickTime; }; if (GVAR(currentMode) == "config") exitWith { - if (ACE_diagTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {}; + if (diag_tickTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {}; ["config"] call FUNC(nextMode); }; @@ -66,30 +66,30 @@ switch (_this select 0) do { [false] call FUNC(showP1); // handle 5 times clicking - if (ACE_diagTime < GVAR(keyDownTimeAzimuth) + 0.5) then { + if (diag_tickTime < GVAR(keyDownTimeAzimuth) + 0.5) then { GVAR(keyDownTabCountAzimuth) = (GETGVAR(keyDownTabCountAzimuth,0)) + 1; - GVAR(keyDownTimeAzimuth) = ACE_diagTime; + GVAR(keyDownTimeAzimuth) = diag_tickTime; } else { GVAR(keyDownTabCountAzimuth) = 1; }; // open settings menu if (GVAR(keyDownTabCountAzimuth) == 5) exitWith { - GVAR(keyDownTimeMenu) = ACE_diagTime; - GVAR(keyDownTimeAzimuth) = ACE_diagTime; + GVAR(keyDownTimeMenu) = diag_tickTime; + GVAR(keyDownTimeAzimuth) = diag_tickTime; GVAR(keyDownTabCountAzimuth) = 0; GVAR(configTemp) = [GVAR(useFeet), GVAR(useMil)]; ["settings"] call FUNC(showText); "settings" call _fnc_setPFH; }; - if (ACE_diagTime < GVAR(keyDownTimeAzimuth) + 0.5) exitWith { + if (diag_tickTime < GVAR(keyDownTimeAzimuth) + 0.5) exitWith { "azimuth+inclination" call _fnc_setPFH; }; - GVAR(keyDownTimeAzimuth) = ACE_diagTime; + GVAR(keyDownTimeAzimuth) = diag_tickTime; - if (ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5) then { + if (diag_tickTime > GVAR(keyDownTimeDistance) + 0.5) then { if !(GETGVAR(isKeyDownDistance,false)) then { ["distance"] call FUNC(clearDisplay); "azimuth" call _fnc_setPFH; @@ -110,19 +110,19 @@ switch (_this select 0) do { // handle input in option menu if (GVAR(currentMode) == "config") exitWith { - if (ACE_diagTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {}; + if (diag_tickTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {}; - if (ACE_diagTime < GVAR(keyDownTimeDistance) + 0.5) then { + if (diag_tickTime < GVAR(keyDownTimeDistance) + 0.5) then { GVAR(keyDownTabCountDistance) = (GETGVAR(keyDownTabCountDistance,0)) + 1; } else { GVAR(keyDownTabCountDistance) = 1; }; - GVAR(keyDownTimeDistance) = ACE_diagTime; + GVAR(keyDownTimeDistance) = diag_tickTime; }; if (GVAR(currentMode) == "settings") exitWith { - if (ACE_diagTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {}; + if (diag_tickTime < GVAR(keyDownTimeMenu) + 0.5) exitWith {}; ["settings"] call FUNC(nextMode); }; @@ -141,30 +141,30 @@ switch (_this select 0) do { [false] call FUNC(showP1); // handle 5 times clicking - if (ACE_diagTime < GVAR(keyDownTimeDistance) + 0.5) then { + if (diag_tickTime < GVAR(keyDownTimeDistance) + 0.5) then { GVAR(keyDownTabCountDistance) = (GETGVAR(keyDownTabCountDistance,0)) + 1; - GVAR(keyDownTimeDistance) = ACE_diagTime; + GVAR(keyDownTimeDistance) = diag_tickTime; } else { GVAR(keyDownTabCountDistance) = 1; }; // open config menu if (GVAR(keyDownTabCountDistance) == 5) exitWith { - GVAR(keyDownTimeMenu) = ACE_diagTime; - GVAR(keyDownTimeDistance) = ACE_diagTime; + GVAR(keyDownTimeMenu) = diag_tickTime; + GVAR(keyDownTimeDistance) = diag_tickTime; GVAR(keyDownTabCountDistance) = 0; GVAR(configTemp) = GVAR(modeReticle); ["config"] call FUNC(showText); "config" call _fnc_setPFH; }; - if (ACE_diagTime < GVAR(keyDownTimeDistance) + 0.5) exitWith { + if (diag_tickTime < GVAR(keyDownTimeDistance) + 0.5) exitWith { "height+distance" call _fnc_setPFH; }; - GVAR(keyDownTimeDistance) = ACE_diagTime; + GVAR(keyDownTimeDistance) = diag_tickTime; - if (ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.5) then { + if (diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.5) then { if !(GETGVAR(isKeyDownAzimuth,false)) then { ["azimuth"] call FUNC(clearDisplay); "distance" call _fnc_setPFH; diff --git a/addons/vector/functions/fnc_onKeyHold.sqf b/addons/vector/functions/fnc_onKeyHold.sqf index ff4e5fc6ad..ee6d80e2de 100644 --- a/addons/vector/functions/fnc_onKeyHold.sqf +++ b/addons/vector/functions/fnc_onKeyHold.sqf @@ -7,7 +7,7 @@ PFH executed while holding a vector key down. */ #include "script_component.hpp" -if (currentWeapon ACE_player != "ACE_Vector") exitWith { +if (!((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"])) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; GVAR(currentMode) = ""; @@ -21,7 +21,7 @@ switch (_this select 0) do { case ("azimuth"): { private "_isReady"; - _isReady = ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.2; + _isReady = diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.2; [false] call FUNC(showCenter); @@ -42,7 +42,7 @@ switch (_this select 0) do { case ("distance"): { private "_isReady"; - _isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5; + _isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5; [_isReady] call FUNC(showCenter); @@ -66,7 +66,7 @@ switch (_this select 0) do { call FUNC(showAzimuth); private "_isReady"; - _isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5; + _isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5; [_isReady] call FUNC(showCenter); @@ -89,7 +89,7 @@ switch (_this select 0) do { case ("azimuth+inclination"): { private "_isReady"; - _isReady = ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.2; + _isReady = diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.2; [false] call FUNC(showCenter); @@ -110,7 +110,7 @@ switch (_this select 0) do { case ("height+distance"): { private "_isReady"; - _isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5; + _isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5; [_isReady] call FUNC(showCenter); @@ -132,7 +132,7 @@ switch (_this select 0) do { case ("relative_distance"): { private "_isReady"; - _isReady = ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.5; + _isReady = diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.5; [_isReady] call FUNC(showCenter); @@ -155,7 +155,7 @@ switch (_this select 0) do { case ("relative_height+length"): { private "_isReady"; - _isReady = ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.5; + _isReady = diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.5; [_isReady] call FUNC(showCenter); @@ -178,7 +178,7 @@ switch (_this select 0) do { case ("relative_azimuth+distance"): { private "_isReady"; - _isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5; + _isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5; [_isReady] call FUNC(showCenter); @@ -201,7 +201,7 @@ switch (_this select 0) do { case ("fall_of_shot"): { private "_isReady"; - _isReady = ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5; + _isReady = diag_tickTime > GVAR(keyDownTimeDistance) + 0.5; [_isReady] call FUNC(showCenter); @@ -223,8 +223,8 @@ switch (_this select 0) do { }; case ("settings"): { - if (ACE_diagTime < GVAR(keyDownTimeMenu) + 1) exitWith { - GVAR(keyDownTimeAzimuth) = ACE_diagTime; + if (diag_tickTime < GVAR(keyDownTimeMenu) + 1) exitWith { + GVAR(keyDownTimeAzimuth) = diag_tickTime; }; [["meter", "feet"] select (GVAR(configTemp) select 0)] call FUNC(showText); @@ -247,7 +247,7 @@ switch (_this select 0) do { }; }; - if (GVAR(keyDownTabCountAzimuth) > 0 && {ACE_diagTime > GVAR(keyDownTimeAzimuth) + 0.5}) exitWith { + if (GVAR(keyDownTabCountAzimuth) > 0 && {diag_tickTime > GVAR(keyDownTimeAzimuth) + 0.5}) exitWith { ["clear_left"] call FUNC(showText); ["clear_right"] call FUNC(showText); @@ -264,8 +264,8 @@ switch (_this select 0) do { }; case ("config"): { - if (ACE_diagTime < GVAR(keyDownTimeMenu) + 1) exitWith { - GVAR(keyDownTimeDistance) = ACE_diagTime; + if (diag_tickTime < GVAR(keyDownTimeMenu) + 1) exitWith { + GVAR(keyDownTimeDistance) = diag_tickTime; }; switch (GVAR(configTemp)) do { @@ -315,7 +315,7 @@ switch (_this select 0) do { }; }; - if (GVAR(keyDownTabCountDistance) > 0 && {ACE_diagTime > GVAR(keyDownTimeDistance) + 0.5}) exitWith { + if (GVAR(keyDownTabCountDistance) > 0 && {diag_tickTime > GVAR(keyDownTimeDistance) + 0.5}) exitWith { ["clear_left"] call FUNC(showText); ["clear_right"] call FUNC(showText); diff --git a/addons/vector/functions/fnc_showCenter.sqf b/addons/vector/functions/fnc_showCenter.sqf index 1293e1286d..4870b10a69 100644 --- a/addons/vector/functions/fnc_showCenter.sqf +++ b/addons/vector/functions/fnc_showCenter.sqf @@ -7,6 +7,6 @@ Shows or hides the vectors center square thingy. */ #include "script_component.hpp" -((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1301) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_center.paa))] select (_this select 0)); +((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1301) ctrlSetText (["", QPATHTOF(rsc\vector_center.paa)] select (_this select 0)); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showP1.sqf b/addons/vector/functions/fnc_showP1.sqf index 73453961c1..27f9063794 100644 --- a/addons/vector/functions/fnc_showP1.sqf +++ b/addons/vector/functions/fnc_showP1.sqf @@ -13,9 +13,9 @@ disableSerialization; _dlgVector = GETUVAR(ACE_dlgVector,displayNull); if (_this select 0) then { - (_dlgVector displayCtrl 1321) ctrlSetText QUOTE(PATHTOF(rsc\vector_1.paa)); - (_dlgVector displayCtrl 1322) ctrlSetText QUOTE(PATHTOF(rsc\vector_minus.paa)); - (_dlgVector displayCtrl 1323) ctrlSetText QUOTE(PATHTOF(rsc\vector_p.paa)); + (_dlgVector displayCtrl 1321) ctrlSetText QPATHTOF(rsc\vector_1.paa); + (_dlgVector displayCtrl 1322) ctrlSetText QPATHTOF(rsc\vector_minus.paa); + (_dlgVector displayCtrl 1323) ctrlSetText QPATHTOF(rsc\vector_p.paa); (_dlgVector displayCtrl 1324) ctrlSetText ""; } else { (_dlgVector displayCtrl 1321) ctrlSetText ""; diff --git a/addons/vector/functions/fnc_showReticle.sqf b/addons/vector/functions/fnc_showReticle.sqf index d44adfb68d..bcd565774f 100644 --- a/addons/vector/functions/fnc_showReticle.sqf +++ b/addons/vector/functions/fnc_showReticle.sqf @@ -7,6 +7,6 @@ Shows or hides the electronic reticle. */ #include "script_component.hpp" -((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1302) ctrlSetText (["", QUOTE(PATHTOF(rsc\vector_crosshair.paa))] select (_this select 0)); +((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1302) ctrlSetText (["", QPATHTOF(rsc\vector_crosshair.paa)] select (_this select 0)); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showText.sqf b/addons/vector/functions/fnc_showText.sqf index 68dbe9d642..f9d85d84e3 100644 --- a/addons/vector/functions/fnc_showText.sqf +++ b/addons/vector/functions/fnc_showText.sqf @@ -10,123 +10,123 @@ switch (_this select 0) do { case ("config"): { (_dlgVector displayCtrl 1315) ctrlSetText ""; (_dlgVector displayCtrl 1316) ctrlSetText ""; - (_dlgVector displayCtrl 1317) ctrlSetText QUOTE(PATHTOF(rsc\vector_c.paa)); - (_dlgVector displayCtrl 1318) ctrlSetText QUOTE(PATHTOF(rsc\vector_o.paa)); - (_dlgVector displayCtrl 1319) ctrlSetText QUOTE(PATHTOF(rsc\vector_n.paa)); - (_dlgVector displayCtrl 1310) ctrlSetText QUOTE(PATHTOF(rsc\vector_f.paa)); - (_dlgVector displayCtrl 1311) ctrlSetText QUOTE(PATHTOF(rsc\vector_i.paa)); - (_dlgVector displayCtrl 1312) ctrlSetText QUOTE(PATHTOF(rsc\vector_g.paa)); + (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_c.paa); + (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_f.paa); + (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_i.paa); + (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_g.paa); (_dlgVector displayCtrl 1313) ctrlSetText ""; (_dlgVector displayCtrl 1314) ctrlSetText ""; }; case ("settings"): { (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QUOTE(PATHTOF(rsc\vector_u.paa)); - (_dlgVector displayCtrl 1317) ctrlSetText QUOTE(PATHTOF(rsc\vector_n.paa)); - (_dlgVector displayCtrl 1318) ctrlSetText QUOTE(PATHTOF(rsc\vector_i.paa)); - (_dlgVector displayCtrl 1319) ctrlSetText QUOTE(PATHTOF(rsc\vector_t.paa)); - (_dlgVector displayCtrl 1310) ctrlSetText QUOTE(PATHTOF(rsc\vector_5.paa)); - (_dlgVector displayCtrl 1311) ctrlSetText QUOTE(PATHTOF(rsc\vector_e.paa)); - (_dlgVector displayCtrl 1312) ctrlSetText QUOTE(PATHTOF(rsc\vector_t.paa)); - (_dlgVector displayCtrl 1313) ctrlSetText QUOTE(PATHTOF(rsc\vector_t.paa)); + (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_u.paa); + (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_i.paa); + (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_5.paa); + (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_t.paa); (_dlgVector displayCtrl 1314) ctrlSetText ""; }; case ("nigt"): { (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QUOTE(PATHTOF(rsc\vector_n.paa)); - (_dlgVector displayCtrl 1317) ctrlSetText QUOTE(PATHTOF(rsc\vector_i.paa)); - (_dlgVector displayCtrl 1318) ctrlSetText QUOTE(PATHTOF(rsc\vector_g.paa)); - (_dlgVector displayCtrl 1319) ctrlSetText QUOTE(PATHTOF(rsc\vector_t.paa)); + (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_i.paa); + (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_g.paa); + (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_t.paa); }; case ("eret"): { (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QUOTE(PATHTOF(rsc\vector_e.paa)); - (_dlgVector displayCtrl 1317) ctrlSetText QUOTE(PATHTOF(rsc\vector_r.paa)); - (_dlgVector displayCtrl 1318) ctrlSetText QUOTE(PATHTOF(rsc\vector_e.paa)); - (_dlgVector displayCtrl 1319) ctrlSetText QUOTE(PATHTOF(rsc\vector_t.paa)); + (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_r.paa); + (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_t.paa); }; case ("on"): { - (_dlgVector displayCtrl 1310) ctrlSetText QUOTE(PATHTOF(rsc\vector_o.paa)); - (_dlgVector displayCtrl 1311) ctrlSetText QUOTE(PATHTOF(rsc\vector_n.paa)); + (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_n.paa); (_dlgVector displayCtrl 1312) ctrlSetText ""; (_dlgVector displayCtrl 1313) ctrlSetText ""; (_dlgVector displayCtrl 1314) ctrlSetText ""; }; case ("off"): { - (_dlgVector displayCtrl 1310) ctrlSetText QUOTE(PATHTOF(rsc\vector_o.paa)); - (_dlgVector displayCtrl 1311) ctrlSetText QUOTE(PATHTOF(rsc\vector_f.paa)); - (_dlgVector displayCtrl 1312) ctrlSetText QUOTE(PATHTOF(rsc\vector_f.paa)); + (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_f.paa); + (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_f.paa); (_dlgVector displayCtrl 1313) ctrlSetText ""; (_dlgVector displayCtrl 1314) ctrlSetText ""; }; case ("deg"): { (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QUOTE(PATHTOF(rsc\vector_3.paa)); - (_dlgVector displayCtrl 1317) ctrlSetText QUOTE(PATHTOF(rsc\vector_6.paa)); - (_dlgVector displayCtrl 1318) ctrlSetText QUOTE(PATHTOF(rsc\vector_0.paa)); - (_dlgVector displayCtrl 1319) ctrlSetText QUOTE(PATHTOF(rsc\vector_degree.paa)); + (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_3.paa); + (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_6.paa); + (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_0.paa); + (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_degree.paa); }; case ("mil"): { (_dlgVector displayCtrl 1315) ctrlSetText ""; - (_dlgVector displayCtrl 1316) ctrlSetText QUOTE(PATHTOF(rsc\vector_6.paa)); - (_dlgVector displayCtrl 1317) ctrlSetText QUOTE(PATHTOF(rsc\vector_4.paa)); - (_dlgVector displayCtrl 1318) ctrlSetText QUOTE(PATHTOF(rsc\vector_0.paa)); - (_dlgVector displayCtrl 1319) ctrlSetText QUOTE(PATHTOF(rsc\vector_0.paa)); + (_dlgVector displayCtrl 1316) ctrlSetText QPATHTOF(rsc\vector_6.paa); + (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_4.paa); + (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_0.paa); + (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_0.paa); }; case ("meter"): { - (_dlgVector displayCtrl 1310) ctrlSetText QUOTE(PATHTOF(rsc\vector_5.paa)); - (_dlgVector displayCtrl 1311) ctrlSetText QUOTE(PATHTOF(rsc\vector_1.paa)); - (_dlgVector displayCtrl 1312) ctrlSetText QUOTE(PATHTOF(rsc\vector_minus.paa)); - (_dlgVector displayCtrl 1313) ctrlSetText QUOTE(PATHTOF(rsc\vector_u.paa)); + (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_5.paa); + (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_1.paa); + (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_minus.paa); + (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_u.paa); (_dlgVector displayCtrl 1314) ctrlSetText ""; }; case ("feet"): { - (_dlgVector displayCtrl 1310) ctrlSetText QUOTE(PATHTOF(rsc\vector_f.paa)); - (_dlgVector displayCtrl 1311) ctrlSetText QUOTE(PATHTOF(rsc\vector_e.paa)); - (_dlgVector displayCtrl 1312) ctrlSetText QUOTE(PATHTOF(rsc\vector_e.paa)); - (_dlgVector displayCtrl 1313) ctrlSetText QUOTE(PATHTOF(rsc\vector_t.paa)); + (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_f.paa); + (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_e.paa); + (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_t.paa); (_dlgVector displayCtrl 1314) ctrlSetText ""; }; case ("stor"): { - (_dlgVector displayCtrl 1321) ctrlSetText QUOTE(PATHTOF(rsc\vector_5.paa)); - (_dlgVector displayCtrl 1322) ctrlSetText QUOTE(PATHTOF(rsc\vector_t.paa)); - (_dlgVector displayCtrl 1323) ctrlSetText QUOTE(PATHTOF(rsc\vector_o.paa)); - (_dlgVector displayCtrl 1324) ctrlSetText QUOTE(PATHTOF(rsc\vector_r.paa)); + (_dlgVector displayCtrl 1321) ctrlSetText QPATHTOF(rsc\vector_5.paa); + (_dlgVector displayCtrl 1322) ctrlSetText QPATHTOF(rsc\vector_t.paa); + (_dlgVector displayCtrl 1323) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl 1324) ctrlSetText QPATHTOF(rsc\vector_r.paa); }; case ("old_config"): { (_dlgVector displayCtrl 1315) ctrlSetText ""; (_dlgVector displayCtrl 1316) ctrlSetText ""; - (_dlgVector displayCtrl 1317) ctrlSetText QUOTE(PATHTOF(rsc\vector_o.paa)); - (_dlgVector displayCtrl 1318) ctrlSetText QUOTE(PATHTOF(rsc\vector_1.paa)); - (_dlgVector displayCtrl 1319) ctrlSetText QUOTE(PATHTOF(rsc\vector_d.paa)); - (_dlgVector displayCtrl 1310) ctrlSetText QUOTE(PATHTOF(rsc\vector_c.paa)); - (_dlgVector displayCtrl 1311) ctrlSetText QUOTE(PATHTOF(rsc\vector_o.paa)); - (_dlgVector displayCtrl 1312) ctrlSetText QUOTE(PATHTOF(rsc\vector_n.paa)); - (_dlgVector displayCtrl 1313) ctrlSetText QUOTE(PATHTOF(rsc\vector_f.paa)); + (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_1.paa); + (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_d.paa); + (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_c.paa); + (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_f.paa); (_dlgVector displayCtrl 1314) ctrlSetText ""; }; case ("old_settings"): { (_dlgVector displayCtrl 1315) ctrlSetText ""; (_dlgVector displayCtrl 1316) ctrlSetText ""; - (_dlgVector displayCtrl 1317) ctrlSetText QUOTE(PATHTOF(rsc\vector_o.paa)); - (_dlgVector displayCtrl 1318) ctrlSetText QUOTE(PATHTOF(rsc\vector_1.paa)); - (_dlgVector displayCtrl 1319) ctrlSetText QUOTE(PATHTOF(rsc\vector_d.paa)); - (_dlgVector displayCtrl 1310) ctrlSetText QUOTE(PATHTOF(rsc\vector_u.paa)); - (_dlgVector displayCtrl 1311) ctrlSetText QUOTE(PATHTOF(rsc\vector_n.paa)); - (_dlgVector displayCtrl 1312) ctrlSetText QUOTE(PATHTOF(rsc\vector_i.paa)); - (_dlgVector displayCtrl 1313) ctrlSetText QUOTE(PATHTOF(rsc\vector_t.paa)); + (_dlgVector displayCtrl 1317) ctrlSetText QPATHTOF(rsc\vector_o.paa); + (_dlgVector displayCtrl 1318) ctrlSetText QPATHTOF(rsc\vector_1.paa); + (_dlgVector displayCtrl 1319) ctrlSetText QPATHTOF(rsc\vector_d.paa); + (_dlgVector displayCtrl 1310) ctrlSetText QPATHTOF(rsc\vector_u.paa); + (_dlgVector displayCtrl 1311) ctrlSetText QPATHTOF(rsc\vector_n.paa); + (_dlgVector displayCtrl 1312) ctrlSetText QPATHTOF(rsc\vector_i.paa); + (_dlgVector displayCtrl 1313) ctrlSetText QPATHTOF(rsc\vector_t.paa); (_dlgVector displayCtrl 1314) ctrlSetText ""; }; diff --git a/addons/vector/initKeybinds.sqf b/addons/vector/initKeybinds.sqf index babef0819c..5b099235da 100644 --- a/addons/vector/initKeybinds.sqf +++ b/addons/vector/initKeybinds.sqf @@ -5,7 +5,7 @@ // Conditions: canInteract if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(currentWeapon ACE_player == "ACE_Vector" && {cameraView == "GUNNER"}) exitWith {false}; + if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false}; // prevent holding down if (GETGVAR(isDownStateKey1,false)) exitWith {false}; @@ -34,7 +34,7 @@ // Conditions: canInteract if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific - if !(currentWeapon ACE_player == "ACE_Vector" && {cameraView == "GUNNER"}) exitWith {false}; + if !(((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"]) && {cameraView == "GUNNER"}) exitWith {false}; // prevent holding down if (GETGVAR(isDownStateKey2,false)) exitWith {false}; diff --git a/addons/vector/stringtable.xml b/addons/vector/stringtable.xml index 9d1936304e..fd8d73858c 100644 --- a/addons/vector/stringtable.xml +++ b/addons/vector/stringtable.xml @@ -1,7 +1,19 @@ - + + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + Vector 21 Nite + + Vector 21 Vector 21 Vector 21 diff --git a/addons/vehiclelock/ACE_Settings.hpp b/addons/vehiclelock/ACE_Settings.hpp index 9eac505db2..f8a431410f 100644 --- a/addons/vehiclelock/ACE_Settings.hpp +++ b/addons/vehiclelock/ACE_Settings.hpp @@ -1,14 +1,20 @@ class ACE_Settings { - class GVAR(DefaultLockpickStrength) { + class GVAR(defaultLockpickStrength) { + displayName = CSTRING(DefaultLockpickStrength_DisplayName); + description = CSTRING(DefaultLockpickStrength_Description); value = 10; typeName = "SCALAR"; }; - class GVAR(LockVehicleInventory) { + class GVAR(lockVehicleInventory) { + displayName = CSTRING(LockVehicleInventory_DisplayName); + description = CSTRING(LockVehicleInventory_Description); value = 0; typeName = "BOOL"; - }; - class GVAR(VehicleStartingLockState) { + }; + class GVAR(vehicleStartingLockState) { + displayName = CSTRING(VehicleStartingLockState_DisplayName); + description = CSTRING(VehicleStartingLockState_Description); value = -1; typeName = "SCALAR"; }; -}; \ No newline at end of file +}; diff --git a/addons/vehiclelock/CfgEventHandlers.hpp b/addons/vehiclelock/CfgEventHandlers.hpp index 705415e65d..712cc2be1c 100644 --- a/addons/vehiclelock/CfgEventHandlers.hpp +++ b/addons/vehiclelock/CfgEventHandlers.hpp @@ -17,14 +17,6 @@ class Extended_PostInit_EventHandlers { }; }; -class Extended_InventoryOpened_EventHandlers { - class CAManBase { - class ADDON { - clientInventoryOpened = QUOTE(_this call FUNC(onOpenInventory);); - }; - }; -}; - class Extended_InitPost_EventHandlers { class Car { class ADDON { diff --git a/addons/vehiclelock/CfgMagazines.hpp b/addons/vehiclelock/CfgMagazines.hpp index 62c6fdcec2..28cb00717a 100644 --- a/addons/vehiclelock/CfgMagazines.hpp +++ b/addons/vehiclelock/CfgMagazines.hpp @@ -1,7 +1,7 @@ class CfgMagazines { class CA_Magazine; class ACE_key_customKeyMagazine: CA_Magazine { - picture = QUOTE(PATHTOF(ui\keyBlack.paa)); + picture = QPATHTOF(ui\keyBlack.paa); displayName = "ACE Vehicle Key"; //!!!CANNOT be localized!!!: because it is used as part of the magazineDetail string descriptionShort = CSTRING(Item_Custom_Description); count = 1; diff --git a/addons/vehiclelock/CfgVehicles.hpp b/addons/vehiclelock/CfgVehicles.hpp index 873c875f09..5906f05f79 100644 --- a/addons/vehiclelock/CfgVehicles.hpp +++ b/addons/vehiclelock/CfgVehicles.hpp @@ -5,14 +5,14 @@ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \ statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \ priority = 0.3; \ - icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ + icon = QPATHTOF(UI\key_menuIcon_ca.paa); \ }; \ class ACE_lockVehicle { \ displayName = CSTRING(Action_Lock); \ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \ statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \ priority = 0.2; \ - icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ + icon = QPATHTOF(UI\key_menuIcon_ca.paa); \ }; \ class ACE_lockpickVehicle { \ displayName = CSTRING(Action_Lockpick); \ @@ -29,7 +29,7 @@ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(2,3)]}); \ statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,false)])] call EFUNC(common,targetEvent)); \ priority = 0.3; \ - icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ + icon = QPATHTOF(UI\key_menuIcon_ca.paa); \ }; \ class ACE_lockVehicle { \ displayName = CSTRING(Action_Lock); \ @@ -37,7 +37,7 @@ condition = QUOTE(([ARR_2(_player, _target)] call FUNC(hasKeyForVehicle)) && {(locked _target) in [ARR_2(0,1)]}); \ statement = QUOTE([ARR_3('VehicleLock_SetVehicleLock', [_target], [ARR_2(_target,true)])] call EFUNC(common,targetEvent)); \ priority = 0.2; \ - icon = QUOTE(PATHTOF(UI\key_menuIcon_ca.paa)); \ + icon = QPATHTOF(UI\key_menuIcon_ca.paa); \ }; \ class ACE_lockpickVehicle { \ displayName = CSTRING(Action_Lockpick); \ @@ -75,7 +75,7 @@ class CfgVehicles { scope = 2; isGlobal = 0; isSingular = 1; - icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleLock_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_VehicleLock_ca.paa); functionPriority = 0; class Arguments { class LockVehicleInventory { @@ -113,7 +113,7 @@ class CfgVehicles { function = QFUNC(moduleSync); scope = 2; isGlobal = 0; - icon = QUOTE(PATHTOF(UI\Icon_Module_VehicleKey_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_VehicleKey_ca.paa); functionPriority = 0; class Arguments {}; class ModuleDescription: ModuleDescription { diff --git a/addons/vehiclelock/CfgWeapons.hpp b/addons/vehiclelock/CfgWeapons.hpp index 0895988737..1d72a5538d 100644 --- a/addons/vehiclelock/CfgWeapons.hpp +++ b/addons/vehiclelock/CfgWeapons.hpp @@ -8,7 +8,7 @@ class CfgWeapons { displayName = "Vehicle Key: Master"; descriptionShort = CSTRING(Item_Master_Description); model = "\A3\weapons_F\ammo\mag_univ.p3d"; - picture = QUOTE(PATHTOF(ui\keyBlack.paa)); + picture = QPATHTOF(ui\keyBlack.paa); scope = 2; class ItemInfo: InventoryItem_Base_F { mass = 0; @@ -17,26 +17,26 @@ class CfgWeapons { class ACE_key_lockpick: ACE_key_master { displayName = "Lockpick"; descriptionShort = CSTRING(Item_Lockpick_Description); - picture = QUOTE(PATHTOF(ui\lockpick.paa)); + picture = QPATHTOF(ui\lockpick.paa); }; class ACE_key_west: ACE_key_master { displayName = "Vehicle Key: West"; descriptionShort = CSTRING(Item_West_Description); - picture = QUOTE(PATHTOF(ui\keyBlue.paa)); + picture = QPATHTOF(ui\keyBlue.paa); }; class ACE_key_east: ACE_key_master { displayName = "Vehicle Key: East"; descriptionShort = CSTRING(Item_East_Description); - picture = QUOTE(PATHTOF(ui\keyRed.paa)); + picture = QPATHTOF(ui\keyRed.paa); }; class ACE_key_indp: ACE_key_master { displayName = "Vehicle Key: Independent"; descriptionShort = CSTRING(Item_Indp_Description); - picture = QUOTE(PATHTOF(ui\keyPurple.paa)); + picture = QPATHTOF(ui\keyPurple.paa); }; class ACE_key_civ: ACE_key_master { displayName = "Vehicle Key: Civilian"; descriptionShort = CSTRING(Item_Civ_Description); - picture = QUOTE(PATHTOF(ui\keyGreen.paa)); + picture = QPATHTOF(ui\keyGreen.paa); }; }; diff --git a/addons/vehiclelock/XEH_postInit.sqf b/addons/vehiclelock/XEH_postInit.sqf index c635de2bd3..93d8bd6426 100644 --- a/addons/vehiclelock/XEH_postInit.sqf +++ b/addons/vehiclelock/XEH_postInit.sqf @@ -3,3 +3,13 @@ //Add Event Handlers ["VehicleLock_SetupCustomKey", {_this call FUNC(serverSetupCustomKeyEH)}] call EFUNC(common,addEventHandler); ["VehicleLock_SetVehicleLock", {_this call FUNC(setVehicleLockEH)}] call EFUNC(common,addEventHandler); + +if (!hasInterface) exitwith {}; + +["SettingsInitialized", { + TRACE_1("SettingsInitialized eh",GVAR(LockVehicleInventory)); + + if (GVAR(LockVehicleInventory)) then { + ["CAManBase", "InventoryOpened", {_this call FUNC(onOpenInventory);}] call CBA_fnc_addClassEventHandler; + }; +}] call EFUNC(common,addEventHandler); diff --git a/addons/vehiclelock/config.cpp b/addons/vehiclelock/config.cpp index 9ee1343bc8..942c3959f2 100644 --- a/addons/vehiclelock/config.cpp +++ b/addons/vehiclelock/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; - author[] = {"PabstMirror"}; + author = ECSTRING(common,ACETeam); + url = ECSTRING(main,URL); + authors[] = {"PabstMirror"}; authorUrl = "https://github.com/acemod/ACE3"; VERSION_CONFIG; }; diff --git a/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf b/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf index be23dc8dd9..7cc7cac5f7 100644 --- a/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf +++ b/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf @@ -42,4 +42,4 @@ TRACE_1("params",_vehicle); }; }; //Delay call until mission start (so everyone has the eventHandler's installed) -}, [_vehicle], 0.25] call EFUNC(common,waitAndExecute); +}, [_vehicle], 0.25] call CBA_fnc_waitAndExecute; diff --git a/addons/vehiclelock/functions/fnc_moduleSync.sqf b/addons/vehiclelock/functions/fnc_moduleSync.sqf index 27577e4dbe..99e822d53d 100644 --- a/addons/vehiclelock/functions/fnc_moduleSync.sqf +++ b/addons/vehiclelock/functions/fnc_moduleSync.sqf @@ -51,4 +51,4 @@ if !(_activated) exitWith {WARNING("Vehicle Lock Sync Module - placed but not ac } forEach _syncedObjects; //Wait to add keys until various gear assigns have finished (~5 seconds) -}, [_syncedObjects], 5, 1] call EFUNC(common,waitAndExecute); +}, [_syncedObjects], 5, 1] call CBA_fnc_waitAndExecute; diff --git a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf index 17682c72de..fb8972ef1d 100644 --- a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf +++ b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf @@ -7,7 +7,7 @@ * 1: Container * * Return Value: - * Handeled + * None * * Example: * [player, car] call ACE_VehicleLock_fnc_onOpenInventory; @@ -20,10 +20,7 @@ params ["_unit", "_container"]; TRACE_2("params",_unit,_container); //Only check for player: -if (_unit != ace_player) exitWith {false}; - -private "_handeled"; -_handeled = false; +if (_unit != ace_player) exitWith {}; if (GVAR(LockVehicleInventory) && //if setting not enabled {(vehicle ace_player) == ace_player} && //Player dismounted @@ -33,15 +30,19 @@ if (GVAR(LockVehicleInventory) && //if setting not enabled ) then { //Give feedback that vehicle is locked playSound "ACE_Sound_Click"; - //don't open the vehicles inventory - _handeled = true; - // As of 1.54 the action needs to be delayed a frame to work, which used not to be the case + //For compatibiltiy with ACRE, wait until the display is open, close it and then reopen the player's own inventory + //ref: http://gitlab.idi-systems.com/idi-systems/acre2-public/issues/70 [{ - TRACE_1("delaying a frame", ace_player); - //Just opens a dummy groundContainer (so the player can still see their own inventory) - ACE_player action ["Gear", objNull]; - }, []] call EFUNC(common,execNextFrame); + !isNull (findDisplay 602) + }, + { + TRACE_1("car display open: closing", _this); + (findDisplay 602) closeDisplay 0; + [{ + TRACE_1("Opening Player Inventory", _this); + ACE_player action ["Gear", objNull] + }, []] call CBA_fnc_execNextFrame; + }, + []] call CBA_fnc_waitUntilAndExecute; }; - -_handeled diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 9b8b06fd40..32e9c762d0 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/vehicles/config.cpp b/addons/vehicles/config.cpp index a3641a7b5b..9d2cd3caac 100644 --- a/addons/vehicles/config.cpp +++ b/addons/vehicles/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2","KoffeinFlummi"}; - authorUrl = "https://github.com/KoffeinFlummi/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2","KoffeinFlummi"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/vehicles/functions/fnc_startEngine.sqf b/addons/vehicles/functions/fnc_startEngine.sqf index e2c171e018..8b0d0f17bb 100644 --- a/addons/vehicles/functions/fnc_startEngine.sqf +++ b/addons/vehicles/functions/fnc_startEngine.sqf @@ -24,9 +24,9 @@ if (!_isEngineOn || {floor abs speed _vehicle > 0}) exitWith {}; params ["_args", "_idPFH"]; _args params ["_vehicle", "_time", "_direction"]; - if (ACE_time > _time) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; + if (CBA_missionTime > _time) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; }; _vehicle setVelocity [0, 0, 0]; _vehicle setVectorDirAndUp _direction; -} , 0, [_vehicle, ACE_time + STARTUP_DELAY, [vectorDir _vehicle, vectorUp _vehicle]]] call CBA_fnc_addPerFrameHandler; +} , 0, [_vehicle, CBA_missionTime + STARTUP_DELAY, [vectorDir _vehicle, vectorUp _vehicle]]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml index dcf2348175..005bba53a3 100644 --- a/addons/vehicles/stringtable.xml +++ b/addons/vehicles/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/viewdistance/ACE_Settings.hpp b/addons/viewdistance/ACE_Settings.hpp index 1499626b7f..356c7d86f2 100644 --- a/addons/viewdistance/ACE_Settings.hpp +++ b/addons/viewdistance/ACE_Settings.hpp @@ -1,11 +1,13 @@ class ACE_Settings { class GVAR(enabled) { + category = CSTRING(Module_DisplayName); typeName = "BOOL"; value = 1; displayName = CSTRING(enabled_DisplayName); description = CSTRING(enabled_Description); }; class GVAR(viewDistanceOnFoot) { + category = CSTRING(Module_DisplayName); typeName = "SCALAR"; isClientSettable = 1; value = 0; // index, NOT value // Can set it to client's actual viewdistance in the init function once ACE_Settings supports numbers (if ever). @@ -14,6 +16,7 @@ class ACE_Settings { description = CSTRING(onFoot_Description); }; class GVAR(viewDistanceLandVehicle) { + category = CSTRING(Module_DisplayName); typeName = "SCALAR"; isClientSettable = 1; value = 0; // index, NOT value @@ -22,6 +25,7 @@ class ACE_Settings { description = CSTRING(landVehicle_Description); }; class GVAR(viewDistanceAirVehicle) { + category = CSTRING(Module_DisplayName); typeName = "SCALAR"; isClientSettable = 1; value = 0; // index, NOT value @@ -30,12 +34,14 @@ class ACE_Settings { description = CSTRING(airVehicle_Description); }; class GVAR(limitViewDistance) { + category = CSTRING(Module_DisplayName); typeName = "SCALAR"; value = 10000; // Value, NOT index. 10000 is the maximum in A3 displayName = CSTRING(limit_DisplayName); description = CSTRING(limit_setting); }; class GVAR(objectViewDistanceCoeff) { + category = CSTRING(Module_DisplayName); typeName = "SCALAR"; isClientSettable = 1; value = 0; // index. Actual coefficient is given by functions/fnc_returnObjectCoeff.sqf diff --git a/addons/viewdistance/CfgVehicles.hpp b/addons/viewdistance/CfgVehicles.hpp index 86d906bfce..4c6639370c 100644 --- a/addons/viewdistance/CfgVehicles.hpp +++ b/addons/viewdistance/CfgVehicles.hpp @@ -1,6 +1,6 @@ class CfgVehicles { class ACE_Module; - class GVAR(ModuleSettings) : ACE_Module { + class GVAR(ModuleSettings): ACE_Module { author = ECSTRING(common,ACETeam); category = "ACE"; function = QUOTE(DFUNC(initModule)); @@ -28,4 +28,4 @@ class CfgVehicles { sync[] = {}; }; }; -}; \ No newline at end of file +}; diff --git a/addons/viewdistance/XEH_PREP.hpp b/addons/viewdistance/XEH_PREP.hpp index fea5de5a4f..c040baf334 100644 --- a/addons/viewdistance/XEH_PREP.hpp +++ b/addons/viewdistance/XEH_PREP.hpp @@ -1,4 +1,3 @@ - PREP(adaptViewDistance); PREP(changeViewDistance); PREP(initModule); diff --git a/addons/viewdistance/XEH_clientInit.sqf b/addons/viewdistance/XEH_clientInit.sqf index 45b86d944d..dfcfd7e405 100644 --- a/addons/viewdistance/XEH_clientInit.sqf +++ b/addons/viewdistance/XEH_clientInit.sqf @@ -24,6 +24,6 @@ if (!hasInterface) exitWith {}; // Set the EH which waits for a vehicle change to automatically swap between On Foot/In Land Vehicle/In Air Vehicle // Also run when SettingsInitialized runs (not guaranteed) ["playerVehicleChanged",{ - [false] call FUNC(adaptViewDistance) + [false] call FUNC(adaptViewDistance); }] call EFUNC(common,addEventHandler); }] call EFUNC(common,addEventHandler); diff --git a/addons/viewdistance/config.cpp b/addons/viewdistance/config.cpp index 2de8b2c954..bf3dd29d24 100644 --- a/addons/viewdistance/config.cpp +++ b/addons/viewdistance/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Winter", "Jonpas", "Arkhir"}; - authorUrl = "https://github.com/Winter259"; + author = ECSTRING(common,ACETeam); + authors[] = {"Winter", "Jonpas", "Arkhir"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf index f1ea7121b2..4816ee946e 100644 --- a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf +++ b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf @@ -2,7 +2,6 @@ * Author: Winter * Sets the player's current view distance according to whether s/he is on foot, in a land vehicle or in an air vehicle. * - * * Arguments: * 0: Show Prompt * @@ -17,23 +16,23 @@ #include "script_component.hpp" -private["_land_vehicle","_air_vehicle"]; - -params ["_show_prompt"]; +params ["_showPrompt"]; if (!GVAR(enabled) || isNull ACE_player) exitWith {}; -_land_vehicle = (vehicle ACE_player) isKindOf "LandVehicle"; -_air_vehicle = (vehicle ACE_player) isKindOf "Air"; +private _vehicle = vehicle ACE_player; -if (!_land_vehicle && !_air_vehicle) exitWith { - [GVAR(viewDistanceOnFoot),_show_prompt] call FUNC(changeViewDistance); +private _landVehicle = _vehicle isKindOf "LandVehicle" || {_vehicle isKindOf "Ship_F"}; +private _airVehicle = _vehicle isKindOf "Air"; + +if (!_landVehicle && !_airVehicle) exitWith { + [GVAR(viewDistanceOnFoot), _showPrompt] call FUNC(changeViewDistance); }; -if (_land_vehicle) exitWith { - [GVAR(viewDistanceLandVehicle),_show_prompt] call FUNC(changeViewDistance); +if (_landVehicle) exitWith { + [GVAR(viewDistanceLandVehicle), _showPrompt] call FUNC(changeViewDistance); }; -if (_air_vehicle) exitWith { - [GVAR(viewDistanceAirVehicle),_show_prompt] call FUNC(changeViewDistance); +if (_airVehicle) exitWith { + [GVAR(viewDistanceAirVehicle), _showPrompt] call FUNC(changeViewDistance); }; diff --git a/addons/viewdistance/functions/fnc_changeViewDistance.sqf b/addons/viewdistance/functions/fnc_changeViewDistance.sqf index 28bba29b67..c5f39ff2f8 100644 --- a/addons/viewdistance/functions/fnc_changeViewDistance.sqf +++ b/addons/viewdistance/functions/fnc_changeViewDistance.sqf @@ -16,20 +16,18 @@ */ #include "script_component.hpp" -private ["_text", "_new_view_distance", "_view_distance_limit", "_object_view_distance_coeff"]; +params ["_indexRequested", "_showPrompt"]; -params ["_index_requested", "_show_prompt"]; +private _newViewDistance = [_indexRequested] call FUNC(returnValue); // changes the setting index into an actual view distance value +private _objectViewDistanceCoeff = [GVAR(objectViewDistanceCoeff)] call FUNC(returnObjectCoeff); // changes the setting index into a coefficient. +private _viewDistanceLimit = GVAR(limitViewDistance); // Grab the limit -_new_view_distance = [_index_requested] call FUNC(returnValue); // changes the setting index into an actual view distance value -_object_view_distance_coeff = [GVAR(objectViewDistanceCoeff)] call FUNC(returnObjectCoeff); // changes the setting index into a coefficient. -_view_distance_limit = GVAR(limitViewDistance); // Grab the limit +TRACE_3("Limit",_newViewDistance,_viewDistanceLimit,_showPrompt); +setViewDistance (_newViewDistance min _viewDistanceLimit); -TRACE_2("Limit",_new_view_distance,_view_distance_limit); -setViewDistance (_new_view_distance min _view_distance_limit); - -if (typeName _object_view_distance_coeff == "SCALAR") then { - if (_object_view_distance_coeff > 0) then { - setObjectViewDistance (_object_view_distance_coeff * viewDistance); +if (_objectViewDistanceCoeff isEqualType 0) then { + if (_objectViewDistanceCoeff > 0) then { + setObjectViewDistance (_objectViewDistanceCoeff * viewDistance); } else { // Restore correct view distance when changing from FoV Based to Off // Restoring directly inside PFH's self-exit resulted in the need of selecting another option to take effect @@ -42,18 +40,18 @@ if (typeName _object_view_distance_coeff == "SCALAR") then { }; }; -if (_show_prompt) then { +if (_showPrompt) then { if (GVAR(objectViewDistanceCoeff) > 0) then { + private _text = ""; // FoV Based or % if (GVAR(objectViewDistanceCoeff) == 6) then { _text = format ["%1 %2
Min. %3
Max. %4
", localize LSTRING(objectinfotext), localize LSTRING(object_fovBased), GVAR(fovBasedPFHminimalViewDistance), viewDistance]; } else { - _text = if (_new_view_distance <= _view_distance_limit) then { - format ["%1 %2m", localize LSTRING(infotext), viewDistance]; - } else { - format ["%1 %2m", localize LSTRING(invalid), viewDistance]; - }; - _text = _text + format ["
%1 %2%3", localize LSTRING(objectinfotext), _object_view_distance_coeff * 100, "%"]; + _text = [ + format ["%1 %2m", localize LSTRING(invalid), viewDistance], + format ["%1 %2m", localize LSTRING(infotext), viewDistance] + ] select (_newViewDistance <= _viewDistanceLimit); + _text = _text + format ["
%1 %2%3", localize LSTRING(objectinfotext), _objectViewDistanceCoeff * 100, "%"]; }; [parseText _text, 2] call EFUNC(common,displayTextStructured); }; diff --git a/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf b/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf index 90c70b810c..257dca2995 100644 --- a/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf +++ b/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf @@ -16,11 +16,9 @@ #include "script_component.hpp" -private ["_return"]; - params ["_index"]; -_return = switch (_index) do { +switch (_index) do { case 0: {0.00}; // Off case 1: {0.20}; // Very Low case 2: {0.40}; // Low @@ -30,5 +28,3 @@ _return = switch (_index) do { case 6: {"fov"}; // FoV Based default {0.50}; // something broke if this returns }; - -_return; diff --git a/addons/viewdistance/functions/fnc_returnValue.sqf b/addons/viewdistance/functions/fnc_returnValue.sqf index 7224292fa4..35c0894520 100644 --- a/addons/viewdistance/functions/fnc_returnValue.sqf +++ b/addons/viewdistance/functions/fnc_returnValue.sqf @@ -16,28 +16,23 @@ #include "script_component.hpp" -private ["_return"]; - params ["_index"]; -_return = switch (_index) do { - case 0: {viewDistance}; // Video Settings option - case 1: {500}; - case 2: {1000}; - case 3: {1500}; - case 4: {2000}; - case 5: {2500}; - case 6: {3000}; - case 7: {3500}; - case 8: {4000}; - case 9: {5000}; - case 10: {6000}; - case 11: {7000}; - case 12: {8000}; - case 13: {9000}; - case 14: {10000}; - default {1000}; +switch (_index) do { + case 0: {viewDistance}; // Video Settings option + case 1: {500}; + case 2: {1000}; + case 3: {1500}; + case 4: {2000}; + case 5: {2500}; + case 6: {3000}; + case 7: {3500}; + case 8: {4000}; + case 9: {5000}; + case 10: {6000}; + case 11: {7000}; + case 12: {8000}; + case 13: {9000}; + case 14: {10000}; + default {1000}; }; - -TRACE_1("VD Index Return",_return); -_return diff --git a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf index bcde34316a..4a57747d97 100644 --- a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf +++ b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf @@ -17,10 +17,6 @@ #include "script_component.hpp" -#define VD_ZOOM_NORMAL 1.00041 -#define VD_ZOOM_DIVISION 35 -#define VD_ZOOM_DIVISION_AIR 10 - params ["", "_idPFH"]; // Remove PFH and set Object View Distance back to what it was before @@ -29,25 +25,20 @@ if (GVAR(objectViewDistanceCoeff) < 6) exitWith { GVAR(fovBasedPFHminimalViewDistance) = nil; }; -private ["_zoom"]; -_zoom = (call CBA_fnc_getFov) select 1; +private _zoom = (call CBA_fnc_getFov) select 1; -// Air -if ((vehicle ACE_player) isKindOf "Air") exitWith { - if (_zoom > VD_ZOOM_NORMAL) then { - // Dynamically set Object View Distance based on player's Zoom Level and View Distance - setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance)); - } else { - setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10); - }; - TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom); -}; - -// Land if (_zoom > VD_ZOOM_NORMAL) then { // Dynamically set Object View Distance based on player's Zoom Level and View Distance - setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance)); + if ((vehicle ACE_player) isKindOf "Air") then { + setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION_AIR * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance)); + } else { + setObjectViewDistance ((_zoom / VD_ZOOM_DIVISION * (viewDistance - GVAR(fovBasedPFHminimalViewDistance))) + GVAR(fovBasedPFHminimalViewDistance)); + }; } else { - setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance); + if ((vehicle ACE_player) isKindOf "Air") then { + setObjectViewDistance (GVAR(fovBasedPFHminimalViewDistance) + viewDistance / 10); + } else { + setObjectViewDistance GVAR(fovBasedPFHminimalViewDistance); + }; }; TRACE_2("FoV Based",getObjectViewDistance select 0,_zoom); diff --git a/addons/viewdistance/script_component.hpp b/addons/viewdistance/script_component.hpp index dfd04bbf9d..f5cd31f8ce 100644 --- a/addons/viewdistance/script_component.hpp +++ b/addons/viewdistance/script_component.hpp @@ -15,3 +15,8 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + + +#define VD_ZOOM_NORMAL 1.00041 +#define VD_ZOOM_DIVISION 35 +#define VD_ZOOM_DIVISION_AIR 10 diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index d5a011792b..a0f2bceb68 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -262,6 +262,7 @@ Oparty na FoV Basato su Campo Visivo (FoV) Basada en campo de visión + Champ de vision basé
View Distance: @@ -312,4 +313,4 @@ Impostazioni Video
-
\ No newline at end of file +
diff --git a/addons/weaponselect/ACE_Settings.hpp b/addons/weaponselect/ACE_Settings.hpp index 2214451247..5b58659f6e 100644 --- a/addons/weaponselect/ACE_Settings.hpp +++ b/addons/weaponselect/ACE_Settings.hpp @@ -1,6 +1,6 @@ class ACE_Settings { - class GVAR(DisplayText) { + class GVAR(displayText) { typeName = "BOOL"; isClientSettable = 1; value = 1; diff --git a/addons/weaponselect/XEH_preInit.sqf b/addons/weaponselect/XEH_preInit.sqf index b457e10cad..4166247505 100644 --- a/addons/weaponselect/XEH_preInit.sqf +++ b/addons/weaponselect/XEH_preInit.sqf @@ -5,8 +5,8 @@ ADDON = false; #include "XEH_PREP.hpp" // collect frag and other grenades separately -GVAR(GrenadesAll) = []; -GVAR(GrenadesFrag) = []; +GVAR(GrenadesAll) = []; +GVAR(GrenadesFrag) = []; GVAR(GrenadesNonFrag) = []; { diff --git a/addons/weaponselect/config.cpp b/addons/weaponselect/config.cpp index 231d167cd0..b6a98e6d88 100644 --- a/addons/weaponselect/config.cpp +++ b/addons/weaponselect/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2","KoffeinFlummi","esteldunedain"}; - authorUrl = "https://github.com/commy2/"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2","KoffeinFlummi","esteldunedain"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/weaponselect/stringtable.xml b/addons/weaponselect/stringtable.xml index 4a273a6cf3..c9a8e43f60 100644 --- a/addons/weaponselect/stringtable.xml +++ b/addons/weaponselect/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/weather/CfgVehicles.hpp b/addons/weather/CfgVehicles.hpp index f98a1e50f5..ab3d408fdc 100644 --- a/addons/weather/CfgVehicles.hpp +++ b/addons/weather/CfgVehicles.hpp @@ -3,7 +3,7 @@ class CfgVehicles { class GVAR(ModuleSettings): ACE_Module { scope = 2; displayName = CSTRING(Module_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa); category = "ACE"; function = QUOTE(DFUNC(initModuleSettings)); functionPriority = 1; diff --git a/addons/weather/XEH_postInit.sqf b/addons/weather/XEH_postInit.sqf index a19e000332..f085217c56 100644 --- a/addons/weather/XEH_postInit.sqf +++ b/addons/weather/XEH_postInit.sqf @@ -5,13 +5,13 @@ GVAR(temperatureShift) = 3 - random 6; GVAR(badWeatherShift) = (random 1) ^ 2 * 10; GVAR(humidityShift) = (5 - random 10) / 100; -GVAR(wind_period_start_time) = ACE_time; -GVAR(rain_period_start_time) = ACE_time; +GVAR(wind_period_start_time) = CBA_missionTime; +GVAR(rain_period_start_time) = CBA_missionTime; GVAR(ACE_rain) = rain; -"ACE_WIND_PARAMS" addPublicVariableEventHandler { GVAR(wind_period_start_time) = ACE_time; }; -"ACE_RAIN_PARAMS" addPublicVariableEventHandler { GVAR(rain_period_start_time) = ACE_time; }; +"ACE_WIND_PARAMS" addPublicVariableEventHandler { GVAR(wind_period_start_time) = CBA_missionTime; }; +"ACE_RAIN_PARAMS" addPublicVariableEventHandler { GVAR(rain_period_start_time) = CBA_missionTime; }; "ACE_MISC_PARAMS" addPublicVariableEventHandler { if (!isServer) then { TRACE_1("MISC PARAMS PVEH",ACE_MISC_PARAMS); @@ -39,6 +39,19 @@ GVAR(WindInfo) = false; }, {false}, [37, [true, false, false]], false, 0] call CBA_fnc_addKeybind; // (SHIFT + K) +["ACE3 Common", QGVAR(WindInfoKey_hold), localize LSTRING(WindInfoKey_hold), +{ + // Conditions: canInteract + if !([ACE_player, ACE_player, []] call EFUNC(common,canInteractWith)) exitWith {false}; + + // Statement + [] call FUNC(displayWindInfo); +}, +{ + GVAR(WindInfo) = false; + (["RscWindIntuitive"] call BIS_fnc_rscLayer) cutText ["", "PLAIN", 2]; +}, +[0, [false, false, false]], false, 0] call CBA_fnc_addKeybind; // (empty default key) simulWeatherSync; @@ -65,14 +78,14 @@ simulWeatherSync; [] call FUNC(updateWind); //Every 1 second - if (ACE_time >= GVAR(nextUpdateRain)) then { + if (CBA_missionTime >= GVAR(nextUpdateRain)) then { [] call FUNC(updateRain); //Every 2 seconds - GVAR(nextUpdateRain) = 2 + ACE_time; + GVAR(nextUpdateRain) = 2 + CBA_missionTime; }; - if (ACE_time >= GVAR(nextUpdateTempAndHumidity)) then { + if (CBA_missionTime >= GVAR(nextUpdateTempAndHumidity)) then { [] call FUNC(updateTemperature); //Every 20 seconds [] call FUNC(updateHumidity); //Every 20 seconds - GVAR(nextUpdateTempAndHumidity) = 20 + ACE_time; + GVAR(nextUpdateTempAndHumidity) = 20 + CBA_missionTime; }; END_COUNTER(weatherPFEH); diff --git a/addons/weather/config.cpp b/addons/weather/config.cpp index 50e2f8ace0..d2d8764ead 100644 --- a/addons/weather/config.cpp +++ b/addons/weather/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"q1184", "Rocko", "esteldunedain", "Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"q1184", "Rocko", "esteldunedain", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf index f81384c1b0..5ea69c59a0 100644 --- a/addons/weather/functions/fnc_displayWindInfo.sqf +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -78,10 +78,10 @@ TRACE_1("Starting Wind Info PFEH", GVAR(WindInfo)); TRACE_3("update display",_beaufortNumber,_windDir,_windSpeed); __ctrl ctrlSetTextColor _windColor; if (_beaufortNumber > 0) then { - __ctrl ctrlSetText QUOTE(PATHTOF(UI\wind_arrow_ca.paa)); + __ctrl ctrlSetText QPATHTOF(UI\wind_arrow_ca.paa); __ctrl ctrlSetAngle [_windDir, 0.5, 0.5]; } else { - __ctrl ctrlSetText QUOTE(PATHTOF(UI\wind_noneCircle_ca.paa)); + __ctrl ctrlSetText QPATHTOF(UI\wind_noneCircle_ca.paa); }; __ctrl ctrlCommit 0; @@ -94,7 +94,7 @@ TRACE_1("Starting Wind Info PFEH", GVAR(WindInfo)); for "_index" from 0 to (_beaufortNumber - 1) do { private _ball = __dsp ctrlCreate ["RscPicture", _index]; - _ball ctrlSetText QUOTE(PATHTOF(UI\wind_dot_ca.paa)); + _ball ctrlSetText QPATHTOF(UI\wind_dot_ca.paa); _ball ctrlSetTextColor [1,1,1,1]; private _ballCenterX = _centerX - (_ballWidth / 2) + ((sin _windDir) * 0.013333) * (_index - 4.9) + ((cos _windDir) * 0.0125); private _ballCenterY = _centerY - (_ballHeight / 2) - ((1 * cos _windDir) * 4/3*0.013333) * (_index - 4.9) + ((sin _windDir) * 0.0125); diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index b344ad2bdf..e1b56f2ed2 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -17,24 +17,26 @@ // Assume default wind values // Source: https://weatherspark.com/averages/32194/Lemnos-Limnos-North-Aegean-Islands-Greece -GVAR(WindSpeedMax) = [[8.8, 5.5], [8.8, 5], [8.6, 4.8], [7.6, 3.4], [7.0, 3.0], [7.1, 3.0], [7.5, 3.1], [8.0, 3.2], [7.6, 3.5], [7.8, 4.6], [7.9, 5.0], [8.2, 5.5]]; +GVAR(WindSpeedMax) = [[8.8, 5.5], [8.8, 5], [8.6, 4.8], [7.6, 3.4], [7.0, 3.0], [7.1, 3.0], [7.5, 3.1], [8.0, 3.2], [7.6, 3.5], [7.8, 4.6], [7.9, 5.0], [8.2, 5.5]]; GVAR(WindSpeedMean) = [4.8, 4.9, 4.6, 4.1, 3.5, 3.5, 4.3, 4.4, 4.1, 4.5, 4.5, 5.0]; -GVAR(WindSpeedMin) = [[0.2, 5.0], [0.1, 5.0], [0.2, 4.3], [0.0, 3.0], [0.0, 2.1], [0.0, 2.0], [0.1, 3.1], [0.3, 3.1], [0.0, 3.6], [0.0, 4.2], [0.1, 5.0], [0.2, 5.5]]; -GVAR(WindDirectionProbabilities) = [[0.06, 0.32, 0.05, 0.04, 0.15, 0.06, 0.02, 0.02], // January - [0.08, 0.32, 0.04, 0.04, 0.18, 0.06, 0.02, 0.02], // February - [0.09, 0.30, 0.04, 0.04, 0.20, 0.06, 0.02, 0.03], // March - [0.10, 0.25, 0.03, 0.04, 0.22, 0.06, 0.02, 0.04], // April - [0.18, 0.25, 0.03, 0.04, 0.18, 0.04, 0.01, 0.05], // May - [0.25, 0.25, 0.03, 0.03, 0.15, 0.03, 0.00, 0.08], // June - [0.32, 0.30, 0.02, 0.02, 0.10, 0.01, 0.00, 0.09], // July - [0.28, 0.35, 0.02, 0.01, 0.08, 0.01, 0.00, 0.08], // August - [0.20, 0.37, 0.03, 0.01, 0.11, 0.01, 0.01, 0.05], // September - [0.10, 0.39, 0.04, 0.02, 0.15, 0.02, 0.01, 0.03], // October - [0.08, 0.38, 0.06, 0.04, 0.19, 0.03, 0.02, 0.02], // November - [0.06, 0.37, 0.05, 0.03, 0.18, 0.04, 0.02, 0.02]];// December - +GVAR(WindSpeedMin) = [[0.2, 5.0], [0.1, 5.0], [0.2, 4.3], [0.0, 3.0], [0.0, 2.1], [0.0, 2.0], [0.1, 3.1], [0.3, 3.1], [0.0, 3.6], [0.0, 4.2], [0.1, 5.0], [0.2, 5.5]]; +GVAR(WindDirectionProbabilities) = [ + [0.06, 0.32, 0.05, 0.04, 0.15, 0.06, 0.02, 0.02], // January + [0.08, 0.32, 0.04, 0.04, 0.18, 0.06, 0.02, 0.02], // February + [0.09, 0.30, 0.04, 0.04, 0.20, 0.06, 0.02, 0.03], // March + [0.10, 0.25, 0.03, 0.04, 0.22, 0.06, 0.02, 0.04], // April + [0.18, 0.25, 0.03, 0.04, 0.18, 0.04, 0.01, 0.05], // May + [0.25, 0.25, 0.03, 0.03, 0.15, 0.03, 0.00, 0.08], // June + [0.32, 0.30, 0.02, 0.02, 0.10, 0.01, 0.00, 0.09], // July + [0.28, 0.35, 0.02, 0.01, 0.08, 0.01, 0.00, 0.08], // August + [0.20, 0.37, 0.03, 0.01, 0.11, 0.01, 0.01, 0.05], // September + [0.10, 0.39, 0.04, 0.02, 0.15, 0.02, 0.01, 0.03], // October + [0.08, 0.38, 0.06, 0.04, 0.19, 0.03, 0.02, 0.02], // November + [0.06, 0.37, 0.05, 0.03, 0.18, 0.04, 0.02, 0.02] // December +]; + // Check if the wind data is defined in the map config -if (isArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean")) then { +if (isArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean")) then { GVAR(WindSpeedMin) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMin"); GVAR(WindSpeedMean) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMean"); GVAR(WindSpeedMax) = getArray (configFile >> "CfgWorlds" >> worldName >> "ACE_WindSpeedMax"); @@ -55,23 +57,25 @@ if (toLower worldName in ["chernarus", "bootcamp_acr", "woodland_acr", "utes"]) GVAR(TempNight) = [-4, -3, 0, 4, 9, 12, 14, 14, 10, 6, 2, -2]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Prague,Czech-Republic GVAR(Humidity) = [82, 80, 78, 70, 71, 72, 70, 73, 78, 80, 83, 82]; - + // Source: https://weatherspark.com/averages/32335/Prague-Central-Bohemia-Czech-Republic GVAR(WindSpeedMax) = [[6.7, 2.4], [6.8, 2.2], [7.1, 2.0], [6.7, 1.9], [6.5, 1.8], [6.4, 1.8], [6.4, 1.8], [5.9, 1.9], [5.8, 2.1], [5.9, 2.3], [6.4, 2.8], [7.0, 3.0]]; GVAR(WindSpeedMean) = [4.5, 4.3, 4.4, 4.1, 3.6, 3.6, 3.6, 3.4, 3.6, 0, 4.1, 4.6]; GVAR(WindSpeedMin) = [[1.5, 1.1], [1.5, 1.1], [1.5, 1.0], [1.2, 0.9], [1.1, 0.8], [1.0, 0.8], [1.0, 1.0], [1.0, 0.9], [1.1, 1.0], [1.0, 1.0], [1.3, 1.1], [1.8, 1.2]]; - GVAR(WindDirectionProbabilities) = [[0.06, 0.02, 0.06, 0.06, 0.10, 0.23, 0.15, 0.06], // January - [0.08, 0.03, 0.08, 0.06, 0.08, 0.18, 0.15, 0.08], // February - [0.08, 0.02, 0.10, 0.06, 0.07, 0.17, 0.15, 0.08], // March - [0.12, 0.04, 0.10, 0.05, 0.06, 0.12, 0.13, 0.10], // April - [0.12, 0.05, 0.09, 0.05, 0.05, 0.10, 0.13, 0.10], // May - [0.12, 0.04, 0.06, 0.03, 0.05, 0.13, 0.16, 0.10], // June - [0.09, 0.03, 0.07, 0.04, 0.06, 0.16, 0.18, 0.10], // July - [0.09, 0.03, 0.08, 0.04, 0.06, 0.15, 0.16, 0.09], // August - [0.07, 0.03, 0.08, 0.06, 0.08, 0.18, 0.15, 0.08], // September - [0.06, 0.03, 0.10, 0.07, 0.10, 0.19, 0.13, 0.05], // October - [0.06, 0.02, 0.08, 0.07, 0.10, 0.15, 0.13, 0.05], // November - [0.06, 0.02, 0.06, 0.06, 0.10, 0.24, 0.15, 0.05]];// December + GVAR(WindDirectionProbabilities) = [ + [0.06, 0.02, 0.06, 0.06, 0.10, 0.23, 0.15, 0.06], // January + [0.08, 0.03, 0.08, 0.06, 0.08, 0.18, 0.15, 0.08], // February + [0.08, 0.02, 0.10, 0.06, 0.07, 0.17, 0.15, 0.08], // March + [0.12, 0.04, 0.10, 0.05, 0.06, 0.12, 0.13, 0.10], // April + [0.12, 0.05, 0.09, 0.05, 0.05, 0.10, 0.13, 0.10], // May + [0.12, 0.04, 0.06, 0.03, 0.05, 0.13, 0.16, 0.10], // June + [0.09, 0.03, 0.07, 0.04, 0.06, 0.16, 0.18, 0.10], // July + [0.09, 0.03, 0.08, 0.04, 0.06, 0.15, 0.16, 0.09], // August + [0.07, 0.03, 0.08, 0.06, 0.08, 0.18, 0.15, 0.08], // September + [0.06, 0.03, 0.10, 0.07, 0.10, 0.19, 0.13, 0.05], // October + [0.06, 0.02, 0.08, 0.07, 0.10, 0.15, 0.13, 0.05], // November + [0.06, 0.02, 0.06, 0.06, 0.10, 0.24, 0.15, 0.05] // December + ]; }; if (toLower worldName in ["takistan", "zargabad", "mountains_acr", "shapur_baf", "provinggrounds_pmc"]) exitWith { @@ -80,23 +84,25 @@ if (toLower worldName in ["takistan", "zargabad", "mountains_acr", "shapur_baf", GVAR(TempNight) = [-7.1, -5.7, 0.7, 6, 8.8, 12.4, 15.3, 14.3, 9.4, 3.9, -1.2, -4.7]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Kabul,Afghanistan GVAR(Humidity) = [68, 69, 62, 60, 49, 37, 38, 39, 40, 41, 56, 61]; - + // Source: https://weatherspark.com/averages/32750/Kabul-Afghanistan GVAR(WindSpeedMax) = [[4.0, 1.0], [4.1, 1.0], [5.1, 1.1], [6.9, 1.2], [8.9, 1.2], [10.0, 1.1], [9.1,1.0], [8.2, 1.0], [6.9, 1.0], [5.2, 1.0], [3.8, 0.9], [3.7, 0.9]]; GVAR(WindSpeedMean) = [2.2, 2.2, 2.5, 2.8, 3.8, 4.4, 0, 3.3, 2.7, 2.4, 1.8, 1.9]; GVAR(WindSpeedMin) = [[0.2, 0.4], [0.2, 0.4], [0.2, 0.4], [0.3, 0.4], [0.6, 0.4], [0.9, 0.4], [0.7, 0.4], [0.5, 0.4], [0.2, 0.5], [0.1, 0.1], [0, 0.1], [0, 0.1]]; - GVAR(WindDirectionProbabilities) = [[0.04, 0.02, 0.05, 0.04, 0.05, 0.04, 0.11, 0.29], // January - [0.08, 0.04, 0.06, 0.04, 0.06, 0.04, 0.10, 0.20], // February - [0.12, 0.06, 0.08, 0.04, 0.05, 0.04, 0.09, 0.19], // March - [0.18, 0.07, 0.09, 0.05, 0.05, 0.04, 0.08, 0.16], // April - [0.27, 0.05, 0.05, 0.03, 0.04, 0.03, 0.08, 0.16], // May - [0.35, 0.04, 0.04, 0.02, 0.02, 0.02, 0.07, 0.13], // June - [0.30, 0.07, 0.09, 0.04, 0.02, 0.02, 0.05, 0.10], // July - [0.23, 0.07, 0.08, 0.06, 0.03, 0.02, 0.05, 0.10], // August - [0.15, 0.06, 0.10, 0.06, 0.04, 0.02, 0.07, 0.13], // September - [0.12, 0.04, 0.07, 0.06, 0.04, 0.03, 0.10, 0.17], // October - [0.07, 0.03, 0.06, 0.05, 0.06, 0.02, 0.10, 0.20], // November - [0.05, 0.03, 0.06, 0.05, 0.06, 0.04, 0.11, 0.26]];// December + GVAR(WindDirectionProbabilities) = [ + [0.04, 0.02, 0.05, 0.04, 0.05, 0.04, 0.11, 0.29], // January + [0.08, 0.04, 0.06, 0.04, 0.06, 0.04, 0.10, 0.20], // February + [0.12, 0.06, 0.08, 0.04, 0.05, 0.04, 0.09, 0.19], // March + [0.18, 0.07, 0.09, 0.05, 0.05, 0.04, 0.08, 0.16], // April + [0.27, 0.05, 0.05, 0.03, 0.04, 0.03, 0.08, 0.16], // May + [0.35, 0.04, 0.04, 0.02, 0.02, 0.02, 0.07, 0.13], // June + [0.30, 0.07, 0.09, 0.04, 0.02, 0.02, 0.05, 0.10], // July + [0.23, 0.07, 0.08, 0.06, 0.03, 0.02, 0.05, 0.10], // August + [0.15, 0.06, 0.10, 0.06, 0.04, 0.02, 0.07, 0.13], // September + [0.12, 0.04, 0.07, 0.06, 0.04, 0.03, 0.10, 0.17], // October + [0.07, 0.03, 0.06, 0.05, 0.06, 0.02, 0.10, 0.20], // November + [0.05, 0.03, 0.06, 0.05, 0.06, 0.04, 0.11, 0.26] // December + ]; }; if (toLower worldName in ["fallujah"]) exitWith { @@ -113,24 +119,25 @@ if (toLower worldName in ["fata", "Abbottabad"]) exitWith { GVAR(TempNight) = [-0.6, 2.4, 7.4, 13.1, 18.2, 22.8, 23.8, 22.9, 19.2, 12, 5.6, 1.2]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Zhob,Pakistan GVAR(Humidity) = [50, 40, 42, 40, 30, 30, 50, 49, 40, 32, 38, 41]; - + // Source: https://weatherspark.com/averages/31382/Shkin-Paktika-Afghanistan GVAR(WindSpeedMax) = [[3.0, 1.0], [3.3, 1.0], [4.0, 1.0], [4.3, 1.4], [4.3, 1.5], [4.6, 1.4], [4.5, 1.3], [4.0, 0.9], [4.0, 1.0], [3.5, 1.0], [3.4, 1.0], [3.1, 1.0]]; GVAR(WindSpeedMean) = [1.3, 1.5, 1.6, 1.7, 1.7, 1.7, 1.6, 1.5, 1.5, 1.4, 1.4, 1.2]; GVAR(WindSpeedMin) = [[0.2, 0.1], [0.2, 0.1], [0.2, 0.1], [0.2, 0.1], [0.1, 0.1], [0.1, 0.1], [0.3, 0.1], [0.2, 0.1], [0.1, 0.1], [0.1, 0.1], [0.1, 0.1], [0.1, 0.1]]; - GVAR(WindDirectionProbabilities) = [[0.09, 0.03, 0.02, 0.03, 0.05, 0.07, 0.07, 0.18], // January - [0.07, 0.02, 0.01, 0.05, 0.10, 0.10, 0.06, 0.12], // February - [0.07, 0.02, 0.01, 0.07, 0.14, 0.11, 0.08, 0.12], // March - [0.07, 0.04, 0.03, 0.05, 0.12, 0.08, 0.06, 0.13], // April - [0.10, 0.03, 0.02, 0.04, 0.10, 0.09, 0.08, 0.18], // May - [0.12, 0.05, 0.04, 0.05, 0.08, 0.06, 0.06, 0.16], // June - [0.06, 0.04, 0.02, 0.06, 0.05, 0.01, 0.02, 0.06], // July - [0.08, 0.03, 0.04, 0.05, 0.09, 0.04, 0.02, 0.06], // August - [0.10, 0.04, 0.02, 0.06, 0.11, 0.09, 0.06, 0.13], // September - [0.07, 0.02, 0.01, 0.04, 0.11, 0.08, 0.08, 0.19], // October - [0.06, 0.01, 0.00, 0.05, 0.11, 0.09, 0.08, 0.13], // November - [0.07, 0.01, 0.01, 0.03, 0.08, 0.09, 0.09, 0.18]];// December - + GVAR(WindDirectionProbabilities) = [ + [0.09, 0.03, 0.02, 0.03, 0.05, 0.07, 0.07, 0.18], // January + [0.07, 0.02, 0.01, 0.05, 0.10, 0.10, 0.06, 0.12], // February + [0.07, 0.02, 0.01, 0.07, 0.14, 0.11, 0.08, 0.12], // March + [0.07, 0.04, 0.03, 0.05, 0.12, 0.08, 0.06, 0.13], // April + [0.10, 0.03, 0.02, 0.04, 0.10, 0.09, 0.08, 0.18], // May + [0.12, 0.05, 0.04, 0.05, 0.08, 0.06, 0.06, 0.16], // June + [0.06, 0.04, 0.02, 0.06, 0.05, 0.01, 0.02, 0.06], // July + [0.08, 0.03, 0.04, 0.05, 0.09, 0.04, 0.02, 0.06], // August + [0.10, 0.04, 0.02, 0.06, 0.11, 0.09, 0.06, 0.13], // September + [0.07, 0.02, 0.01, 0.04, 0.11, 0.08, 0.08, 0.19], // October + [0.06, 0.01, 0.00, 0.05, 0.11, 0.09, 0.08, 0.13], // November + [0.07, 0.01, 0.01, 0.03, 0.08, 0.09, 0.09, 0.18] // December + ]; }; if (worldName in ["sfp_wamako"]) exitWith { @@ -155,23 +162,25 @@ if (worldName in ["Bornholm"]) exitWith { GVAR(TempNight) = [-1.6, -2.1, -0.7, 1.7, 6.2, 10.7, 13, 13.1, 10.6, 7.2, 3.5, 0.1]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,allinge,Denmark GVAR(Humidity) = [85, 84, 80, 76, 69, 69, 76, 77, 79, 81, 86, 86]; - + // Source: https://weatherspark.com/averages/28830/R-nne-Capital-Region-of-Denmark GVAR(WindSpeedMax) = [[9.3, 2.2], [8.4, 2.2], [7.9, 2.2], [7.1, 2.1], [7.2, 2.1], [6.8, 2.0], [6.8, 2.0], [7.1, 2.1], [7.7, 2.2], [8.6, 2.2], [8.8, 2.2], [9.3, 2.2]]; GVAR(WindSpeedMean) = [6.9, 6.0, 5.7, 4.9, 4.8, 4.6, 4.7, 4.9, 5.5, 6.2, 6.5, 6.7]; GVAR(WindSpeedMin) = [[3.9, 2.0], [3.0, 2.0], [2.3, 2.0], [1.8, 1.8], [1.7, 1.8], [1.7, 1.7], [1.7, 1.8], [1.9, 1.9], [2.6, 2.0], [2.9, 2.0], [3.3, 2.1], [3.5, 2.0]]; - GVAR(WindDirectionProbabilities) = [[0.07, 0.04, 0.07, 0.05, 0.09, 0.12, 0.20, 0.07], // January - [0.08, 0.06, 0.10, 0.06, 0.06, 0.08, 0.20, 0.08], // February - [0.05, 0.06, 0.13, 0.08, 0.07, 0.08, 0.19, 0.06], // March - [0.05, 0.11, 0.16, 0.09, 0.05, 0.06, 0.17, 0.06], // April - [0.04, 0.10, 0.15, 0.08, 0.05, 0.06, 0.20, 0.05], // May - [0.03, 0.07, 0.10, 0.07, 0.05, 0.07, 0.28, 0.06], // June - [0.04, 0.06, 0.11, 0.07, 0.04, 0.07, 0.28, 0.06], // July - [0.05, 0.06, 0.11, 0.07, 0.06, 0.08, 0.26, 0.06], // August - [0.06, 0.06, 0.11, 0.07, 0.06, 0.09, 0.21, 0.06], // September - [0.07, 0.05, 0.09, 0.08, 0.08, 0.12, 0.18, 0.07], // October - [0.08, 0.06, 0.08, 0.07, 0.10, 0.12, 0.16, 0.07], // November - [0.08, 0.05, 0.06, 0.04, 0.10, 0.14, 0.19, 0.07]];// December + GVAR(WindDirectionProbabilities) = [ + [0.07, 0.04, 0.07, 0.05, 0.09, 0.12, 0.20, 0.07], // January + [0.08, 0.06, 0.10, 0.06, 0.06, 0.08, 0.20, 0.08], // February + [0.05, 0.06, 0.13, 0.08, 0.07, 0.08, 0.19, 0.06], // March + [0.05, 0.11, 0.16, 0.09, 0.05, 0.06, 0.17, 0.06], // April + [0.04, 0.10, 0.15, 0.08, 0.05, 0.06, 0.20, 0.05], // May + [0.03, 0.07, 0.10, 0.07, 0.05, 0.07, 0.28, 0.06], // June + [0.04, 0.06, 0.11, 0.07, 0.04, 0.07, 0.28, 0.06], // July + [0.05, 0.06, 0.11, 0.07, 0.06, 0.08, 0.26, 0.06], // August + [0.06, 0.06, 0.11, 0.07, 0.06, 0.09, 0.21, 0.06], // September + [0.07, 0.05, 0.09, 0.08, 0.08, 0.12, 0.18, 0.07], // October + [0.08, 0.06, 0.08, 0.07, 0.10, 0.12, 0.16, 0.07], // November + [0.08, 0.05, 0.06, 0.04, 0.10, 0.14, 0.19, 0.07] // December + ]; }; if (worldName in ["Imrali"]) exitWith { // Source: http://www.iten-online.ch/klima/europa/tuerkei/bursa.htm @@ -186,23 +195,25 @@ if (worldName in ["Kunduz"]) exitWith { GVAR(TempNight) = [-2.4, 0, 5.7, 11.6, 15.7, 20.9, 21.5, 21.5, 16.3, 10.6, 4.1, 0]; // Source: http://www.weather-and-climate.com/average-monthly-Humidity-perc,Kabul,Afghanistan GVAR(Humidity) = [70, 72, 64, 61, 49, 34, 36, 38, 39, 52, 51, 63]; - + // Source: https://weatherspark.com/averages/32753/Kunduz-Afghanistan GVAR(WindSpeedMax) = [[3.5, 0.8], [4.0, 0.6], [4.3, 2.0], [4.6, 1.1], [5.1, 1.2], [5.7, 1.0], [4.9, 0.8], [4.5, 0.3], [4.3, 0.3], [3.8, 0.5], [3.0, 1.3], [3.1, 0.8]]; GVAR(WindSpeedMean) = [1.5, 1.8, 2.1, 2.4, 2.5, 2.8, 2.7, 2.5, 2.3, 2.1, 1.7, 1.6]; GVAR(WindSpeedMin) = [[0.2, 0.1], [0.3, 0.3], [0.4, 0.1], [0.8, 0.2], [0.8, 0.1], [1.0, 0.3], [0.9, 0.5], [0.8, 0.2], [0.8, 0.1], [0.7, 0.1], [0.5, 0.1], [0.2, 0.2]]; - GVAR(WindDirectionProbabilities) = [[0.04, 0.02, 0.05, 0.11, 0.12, 0.06, 0.09, 0.06], // January - [0.04, 0.02, 0.05, 0.11, 0.12, 0.06, 0.08, 0.07], // February - [0.05, 0.04, 0.06, 0.14, 0.12, 0.06, 0.10, 0.08], // March - [0.09, 0.05, 0.08, 0.13, 0.07, 0.05, 0.07, 0.07], // April - [0.14, 0.07, 0.13, 0.13, 0.06, 0.05, 0.05, 0.08], // May - [0.16, 0.06, 0.12, 0.12, 0.05, 0.04, 0.05, 0.10], // June - [0.17, 0.06, 0.08, 0.12, 0.06, 0.04, 0.05, 0.12], // July - [0.15, 0.05, 0.06, 0.16, 0.08, 0.05, 0.07, 0.13], // August - [0.15, 0.04, 0.08, 0.20, 0.13, 0.05, 0.10, 0.14], // September - [0.08, 0.02, 0.08, 0.22, 0.15, 0.06, 0.13, 0.13], // October - [0.06, 0.02, 0.05, 0.20, 0.17, 0.06, 0.12, 0.10], // November - [0.04, 0.02, 0.05, 0.14, 0.19, 0.07, 0.10, 0.07]];// December + GVAR(WindDirectionProbabilities) = [ + [0.04, 0.02, 0.05, 0.11, 0.12, 0.06, 0.09, 0.06], // January + [0.04, 0.02, 0.05, 0.11, 0.12, 0.06, 0.08, 0.07], // February + [0.05, 0.04, 0.06, 0.14, 0.12, 0.06, 0.10, 0.08], // March + [0.09, 0.05, 0.08, 0.13, 0.07, 0.05, 0.07, 0.07], // April + [0.14, 0.07, 0.13, 0.13, 0.06, 0.05, 0.05, 0.08], // May + [0.16, 0.06, 0.12, 0.12, 0.05, 0.04, 0.05, 0.10], // June + [0.17, 0.06, 0.08, 0.12, 0.06, 0.04, 0.05, 0.12], // July + [0.15, 0.05, 0.06, 0.16, 0.08, 0.05, 0.07, 0.13], // August + [0.15, 0.04, 0.08, 0.20, 0.13, 0.05, 0.10, 0.14], // September + [0.08, 0.02, 0.08, 0.22, 0.15, 0.06, 0.13, 0.13], // October + [0.06, 0.02, 0.05, 0.20, 0.17, 0.06, 0.12, 0.10], // November + [0.04, 0.02, 0.05, 0.14, 0.19, 0.07, 0.10, 0.07] // December + ]; }; // Assume default values diff --git a/addons/weather/functions/fnc_getWind.sqf b/addons/weather/functions/fnc_getWind.sqf index c9ccd43ff9..7c08e813e1 100644 --- a/addons/weather/functions/fnc_getWind.sqf +++ b/addons/weather/functions/fnc_getWind.sqf @@ -20,7 +20,7 @@ if (isNil "ACE_WIND_PARAMS") exitWith { [0, 0, 0] }; ACE_WIND_PARAMS params ["_dir", "_dirChange", "_spd", "_spdChange", "_period"]; //Wind _dir is the "source" of the wind [eg: "northerly wind": _dir = 0 -> wind = [0,-1,0];] -private _periodPosition = (ACE_time - GVAR(wind_period_start_time)) min _period; +private _periodPosition = (CBA_missionTime - GVAR(wind_period_start_time)) min _period; private _periodPercent = _periodPosition / _period; _spd = _spd + _spdChange * _periodPercent; diff --git a/addons/weather/functions/fnc_initWind.sqf b/addons/weather/functions/fnc_initWind.sqf index 4c88f59f95..ddd314c0c6 100644 --- a/addons/weather/functions/fnc_initWind.sqf +++ b/addons/weather/functions/fnc_initWind.sqf @@ -19,7 +19,7 @@ private _month = date select 1; private _windDirectionProbabilities = GVAR(WindDirectionProbabilities) select (_month - 1); ACE_wind = [0, 0, 0]; - + GVAR(wind_direction_reference) = random 360; private _sum = 0; for "_i" from 0 to 7 do { diff --git a/addons/weather/functions/fnc_updateAceWeather.sqf b/addons/weather/functions/fnc_updateAceWeather.sqf index 2eb264d91b..3f2f9a356c 100644 --- a/addons/weather/functions/fnc_updateAceWeather.sqf +++ b/addons/weather/functions/fnc_updateAceWeather.sqf @@ -48,7 +48,7 @@ if (GVAR(syncRain) && {GVAR(rain_period_count) > GVAR(rain_next_period)}) then { ACE_RAIN_PARAMS = [_lastRain, GVAR(current_rain), _transitionTime]; TRACE_4("",_lastRain,_rainOverCast,_transitionTime,overcast); - GVAR(rain_period_start_time) = ACE_time; + GVAR(rain_period_start_time) = CBA_missionTime; publicVariable "ACE_RAIN_PARAMS"; }; @@ -94,7 +94,7 @@ if (GVAR(syncWind) && {GVAR(wind_period_count) > GVAR(wind_next_period)}) then { GVAR(current_wind_direction) = _windDirection; GVAR(current_wind_speed) = _windSpeed; - GVAR(wind_period_start_time) = ACE_time; + GVAR(wind_period_start_time) = CBA_missionTime; publicVariable "ACE_WIND_PARAMS"; }; diff --git a/addons/weather/functions/fnc_updateHumidity.sqf b/addons/weather/functions/fnc_updateHumidity.sqf index 3ea28d6a44..66a351096c 100644 --- a/addons/weather/functions/fnc_updateHumidity.sqf +++ b/addons/weather/functions/fnc_updateHumidity.sqf @@ -27,7 +27,7 @@ if ((rain > 0) && {overcast > 0.7}) then { private _PS2 = 6.112 * exp((17.62 * GVAR(currentTemperature)) / (243.12 + GVAR(currentTemperature))); GVAR(currentHumidity) = GVAR(currentHumidity) * _PS1 / _PS2; GVAR(currentHumidity) = GVAR(currentHumidity) + GVAR(humidityShift); - + TRACE_1("humidityShift",GVAR(humidityShift)); }; diff --git a/addons/weather/functions/fnc_updateRain.sqf b/addons/weather/functions/fnc_updateRain.sqf index 8fa18500e8..ccacb09955 100644 --- a/addons/weather/functions/fnc_updateRain.sqf +++ b/addons/weather/functions/fnc_updateRain.sqf @@ -18,10 +18,10 @@ if (!isNil "ACE_RAIN_PARAMS") then { ACE_RAIN_PARAMS params ["_oldRain", "_newRain", "_period"]; - private _periodPosition = (ACE_time - GVAR(rain_period_start_time)) min _period; + private _periodPosition = (CBA_missionTime - GVAR(rain_period_start_time)) min _period; private _periodPercent = (_periodPosition / _period) min 1; - GVAR(ACE_Rain) = linearConversion [GVAR(rain_period_start_time), (GVAR(rain_period_start_time) + _period), ACE_time, _oldRain, _newRain]; - + GVAR(ACE_Rain) = linearConversion [GVAR(rain_period_start_time), (GVAR(rain_period_start_time) + _period), CBA_missionTime, _oldRain, _newRain]; + TRACE_3("Update Rain",rain,ACE_RAIN_PARAMS,GVAR(ACE_Rain)); }; diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml index f2e9027e68..571fa9c25a 100644 --- a/addons/weather/stringtable.xml +++ b/addons/weather/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -13,6 +13,18 @@ Zobrazit údaje o větru Mostrar informação do vento + + Show Wind Info (Toggle) + Pokaż inf. o wietrze (przełącz) + Показать информацию о ветре (перекл.) + Afficher information sur le vent (bascule) + Mostrar información del viento (cambiar) + Mostra informazioni sul vento (camb.) + Zeige Windinformationen (umsch.) + Széladatok mutatása (pecek) + Zobrazit údaje o větru (přep.) + Mostrar informação do vento (alternar) + Weather Pogoda diff --git a/addons/winddeflection/CfgVehicles.hpp b/addons/winddeflection/CfgVehicles.hpp index c52949e1fc..866a00d9c1 100644 --- a/addons/winddeflection/CfgVehicles.hpp +++ b/addons/winddeflection/CfgVehicles.hpp @@ -3,7 +3,7 @@ class CfgVehicles { class GVAR(ModuleSettings): ACE_Module { scope = 2; displayName = CSTRING(windDeflection_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Wind_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Wind_ca.paa); category = "ACE"; function = QUOTE(DFUNC(initModuleSettings)); functionPriority = 1; diff --git a/addons/winddeflection/config.cpp b/addons/winddeflection/config.cpp index a7bedbb9ef..2faf536423 100644 --- a/addons/winddeflection/config.cpp +++ b/addons/winddeflection/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_weather"}; - author[] = {ECSTRING(common,ACETeam), "Glowbal", "Ruthberg"}; - authorUrl = "http://ace3mod.com/"; + author = ECSTRING(common,ACETeam); + authors[] = {ECSTRING(common,ACETeam), "Glowbal", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf index 393a5cd757..5ec512c903 100644 --- a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf +++ b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf @@ -22,8 +22,8 @@ params ["_args"]; _args params ["_lastTime"]; - _deltaT = ACE_time - _lastTime; - _args set [0, ACE_time]; + _deltaT = CBA_missionTime - _lastTime; + _args set [0, CBA_missionTime]; _deleted = 0; _isWind = (vectorMagnitude ACE_wind > 0); @@ -53,4 +53,4 @@ nil } count +GVAR(trackedBullets); // END_COUNTER(pfeh); -}, GVAR(simulationInterval), [ACE_time]] call CBA_fnc_addPerFrameHandler; +}, GVAR(simulationInterval), [CBA_missionTime]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index 8e8ad27e7a..6cb4858d21 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/yardage450/CfgWeapons.hpp b/addons/yardage450/CfgWeapons.hpp index 54e15401a6..382a6d09fc 100644 --- a/addons/yardage450/CfgWeapons.hpp +++ b/addons/yardage450/CfgWeapons.hpp @@ -5,9 +5,9 @@ class CfgWeapons { author = ECSTRING(common,ACETeam); displayName = CSTRING(DisplayName); descriptionShort = CSTRING(Description); - model = PATHTOF(data\ace_yardage_pro_450.p3d); - modelOptics = PATHTOF(data\bushnell_optic.p3d); - picture = PATHTOF(UI\w_bushnell_ca.paa); + model = QPATHTOF(data\ace_yardage_pro_450.p3d); + modelOptics = QPATHTOF(data\bushnell_optic.p3d); + picture = QPATHTOF(UI\w_bushnell_ca.paa); opticsZoomMin = 0.33333/4; opticsZoomMax = 0.33333/4; opticsZoomInit = 0.33333/4; diff --git a/addons/yardage450/config.cpp b/addons/yardage450/config.cpp index 4d0f820aed..18779bd5be 100644 --- a/addons/yardage450/config.cpp +++ b/addons/yardage450/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {"ACE_Yardage450"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_apl", "ace_laser"}; - author[] = {"Spooner", "tcp", "Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Spooner", "tcp", "Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/addons/yardage450/functions/fnc_acquireTarget.sqf b/addons/yardage450/functions/fnc_acquireTarget.sqf index 1d89bf5971..a7e56e815d 100644 --- a/addons/yardage450/functions/fnc_acquireTarget.sqf +++ b/addons/yardage450/functions/fnc_acquireTarget.sqf @@ -32,15 +32,15 @@ GVAR(distanceIndex) = -1; GVAR(lasing) = false; [_this select 1] call CBA_fnc_removePerFrameHandler; }; - + _result = [eyePos ACE_player, ACE_player weaponDirection (currentWeapon ACE_player)] call EFUNC(laser,shootRay); _distance = _result select 1; - + _distance = _distance - 1 + (random 2); - + GVAR(distanceIndex) = (GVAR(distanceIndex) + 1) % METERING_POINT_NUMBER; GVAR(distances) set [GVAR(distanceIndex), _distance]; - + if (count GVAR(distances) == METERING_POINT_NUMBER) then { _min = MAX_DISTANCE; _max = MIN_DISTANCE; @@ -48,7 +48,7 @@ GVAR(distanceIndex) = -1; _min = _x min _min; _max = _max max _x; } forEach GVAR(distances); - + if (abs(_max - _min) < 5) then { _range = (_min + _max) / 2; if (_range >= MIN_DISTANCE && _range <= MAX_DISTANCE) then { diff --git a/addons/yardage450/functions/fnc_turnOn.sqf b/addons/yardage450/functions/fnc_turnOn.sqf index 5f123b8cb2..a56bddb016 100644 --- a/addons/yardage450/functions/fnc_turnOn.sqf +++ b/addons/yardage450/functions/fnc_turnOn.sqf @@ -23,22 +23,22 @@ if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {}; -GVAR(powerOnTime) = ACE_time; +GVAR(powerOnTime) = CBA_missionTime; if (GVAR(active)) exitWith {}; GVAR(active) = true; [{ - if (ACE_time - GVAR(powerOnTime) > 30) exitWith { + if (CBA_missionTime - GVAR(powerOnTime) > 30) exitWith { GVAR(active) = false; 74210 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"; @@ -52,5 +52,5 @@ GVAR(active) = true; } else { 74210 cutText ["", "PLAIN"]; }; - + }, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/yardage450/initKeybinds.sqf b/addons/yardage450/initKeybinds.sqf index 578f55ee40..9ad3005d28 100644 --- a/addons/yardage450/initKeybinds.sqf +++ b/addons/yardage450/initKeybinds.sqf @@ -6,7 +6,7 @@ // Conditions: specific if !(GVAR(active)) exitWith {false}; if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {false}; - + // Statement if !(GVAR(powerButtonPressed)) then { GVAR(powerButtonPressed) = true; @@ -19,7 +19,7 @@ if !([ACE_player, objNull, ["isNotInside"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific if (currentWeapon ACE_player != "ACE_Yardage450" || cameraView != "GUNNER") exitWith {false}; - + // Statement GVAR(powerButtonPressed) = false; call FUNC(turnOn); diff --git a/addons/yardage450/stringtable.xml b/addons/yardage450/stringtable.xml index f3f25f16a0..c9f1c94b1b 100644 --- a/addons/yardage450/stringtable.xml +++ b/addons/yardage450/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -11,6 +11,7 @@ Yardage 450 Yardage 450 Yardage 450 + Yardage 450 Laser Rangefinder @@ -22,6 +23,7 @@ Lézeres távolságmérő Лазерный дальномер Distanziometro Laser + Télémètre laser Yardage 450 - Power Button @@ -33,6 +35,7 @@ Yardage 450 - Főkapcsoló gomb Yardage 450 - Кнопка питания Yardage 450 - Bottone Accensione + Yardage 450 - bouton d'alimentation - \ No newline at end of file + diff --git a/addons/zeus/ACE_Settings.hpp b/addons/zeus/ACE_Settings.hpp index 6488a23e4e..b520b7a31a 100644 --- a/addons/zeus/ACE_Settings.hpp +++ b/addons/zeus/ACE_Settings.hpp @@ -1,29 +1,39 @@ class ACE_Settings { class GVAR(zeusAscension) { + displayName = CSTRING(ascension_DisplayName); + description = CSTRING(ascension_Description); typeName = "BOOL"; value = 0; }; class GVAR(zeusBird) { + displayName = CSTRING(bird_DisplayName); + description = CSTRING(bird_Description); typeName = "BOOL"; value = 0; }; class GVAR(remoteWind) { + displayName = CSTRING(remoteWind_DisplayName); + description = CSTRING(remoteWind_Description); typeName = "BOOL"; value = 0; }; class GVAR(radioOrdnance) { + displayName = CSTRING(radioOrdnance_DisplayName); + description = CSTRING(radioOrdnance_Description); typeName = "BOOL"; value = 0; }; class GVAR(revealMines) { + displayName = CSTRING(revealMines_DisplayName); + description = CSTRING(revealMines_Description); typeName = "SCALAR"; value = 0; values[] = {"$STR_A3_OPTIONS_DISABLED", CSTRING(revealMines_partial), CSTRING(revealMines_full)}; }; class GVAR(autoAddObjects) { + typeName = "BOOL"; + value = 0; displayName = CSTRING(AddObjectsToCurator); description = CSTRING(AddObjectsToCurator_desc); - value = 0; - typeName = "BOOL"; }; }; diff --git a/addons/zeus/CfgVehicles.hpp b/addons/zeus/CfgVehicles.hpp index 0013355370..45cd00adbd 100644 --- a/addons/zeus/CfgVehicles.hpp +++ b/addons/zeus/CfgVehicles.hpp @@ -18,7 +18,7 @@ class CfgVehicles { class GVAR(moduleSettings): ACE_Module { scope = 2; displayName = CSTRING(Settings_DisplayName); - icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Settings_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Zeus_Settings_ca.paa); category = "ACE"; function = QFUNC(moduleZeusSettings); functionPriority = 1; @@ -71,6 +71,12 @@ class CfgVehicles { }; }; }; + class autoAddObjects { + displayName = CSTRING(AddObjectsToCurator); + description = CSTRING(AddObjectsToCurator_desc); + typeName = "BOOL"; + defaultValue = 0; + }; }; class ModuleDescription { description = CSTRING(Settings_Description); @@ -90,7 +96,7 @@ class CfgVehicles { curatorCanAttach = 1; displayName = CSTRING(ModuleCaptive_DisplayName); function = QFUNC(moduleCaptive); - icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Captive_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Zeus_Captive_ca.paa); class ModuleDescription { description = "Flips the capture state of the specified unit."; sync[] = {}; @@ -100,7 +106,7 @@ class CfgVehicles { curatorCanAttach = 1; displayName = CSTRING(ModuleSurrender_DisplayName); function = QFUNC(moduleSurrender); - icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Surrender_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Zeus_Surrender_ca.paa); class ModuleDescription { description = "Flips the surrender state of the specified unit."; sync[] = {}; @@ -110,7 +116,7 @@ class CfgVehicles { curatorCanAttach = 1; displayName = CSTRING(ModuleUnconscious_DisplayName); function = QFUNC(moduleUnconscious); - icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Unconscious_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Zeus_Unconscious_ca.paa); class ModuleDescription { description = "Flips the unconscious state of the specified unit."; sync[] = {}; @@ -120,7 +126,7 @@ class CfgVehicles { curatorCanAttach = 1; displayName = CSTRING(ModuleSetMedic_DisplayName); function = QFUNC(moduleSetMedic); - icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa); class ModuleDescription { description = ""; sync[] = {}; @@ -130,7 +136,7 @@ class CfgVehicles { curatorCanAttach = 1; displayName = CSTRING(ModuleSetMedicalVehicle_DisplayName); function = QFUNC(moduleSetMedicalVehicle); - icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa); class ModuleDescription { description = ""; sync[] = {}; @@ -140,7 +146,7 @@ class CfgVehicles { curatorCanAttach = 1; displayName = CSTRING(ModuleSetMedicalFacility_DisplayName); function = QFUNC(moduleSetMedicalFacility); - icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa)); + icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa); class ModuleDescription { description = ""; sync[] = {}; @@ -151,7 +157,7 @@ class CfgVehicles { curatorCanAttach = 1; displayName = CSTRING(ModuleAddSpareTrack_DisplayName); function = QFUNC(moduleAddSpareTrack); - icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa));//@todo + icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);//@todo class ModuleDescription { description = CSTRING(ModuleAddSpareTrack_Description); sync[] = {}; @@ -161,13 +167,13 @@ class CfgVehicles { curatorCanAttach = 1; displayName = CSTRING(ModuleAddSpareWheel_DisplayName); function = QFUNC(moduleAddSpareWheel); - icon = QUOTE(PATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa));//@todo + icon = QPATHTOF(UI\Icon_Module_Zeus_Medic_ca.paa);//@todo class ModuleDescription { description = CSTRING(ModuleAddSpareWheel_Description); sync[] = {}; }; }; - + // class GVAR(moduleSetSuppression): GVAR(moduleBase) { // curatorCanAttach = 1; // displayName = CSTRING(ModuleSetSupp_DisplayName); diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index 853edaf2e9..6b066c8efb 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"SilentSpike"}; - authorUrl = "https://github.com/SilentSpike"; + author = ECSTRING(common,ACETeam); + authors[] = {"SilentSpike"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; // Use additional cfgPatches to contextually remove modules from zeus @@ -36,7 +37,7 @@ class CfgPatches { class ACE_Curator { GVAR(captives) = "ace_captives"; GVAR(medical) = "ace_medical"; - GVAR(cargoAndRepair[]) = {"ace_cargo", "ace_repair"}; + GVAR(cargoAndRepair)[] = {"ace_cargo", "ace_repair"}; }; #include "CfgEventHandlers.hpp" diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index 897f51532d..d727bb6826 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -13,12 +13,18 @@ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_object"]; +if !(EGVAR(common,settingsInitFinished)) exitWith { + TRACE_1("pushing to runAtSettingsInitialized", _this); + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addObjectToCurator), _this]; +}; + if (!(_object getVariable [QGVAR(addObject), GVAR(autoAddObjects)])) exitWith {}; -{ - _x addCuratorEditableObjects [[_object], true]; -}forEach allCurators; +[{ + TRACE_1("Delayed addCuratorEditableObjects",_this); + { + _x addCuratorEditableObjects [[_this], true]; + } forEach allCurators; +}, _object] call CBA_fnc_execNextFrame; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index d10d36b839..2909aceba5 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -113,7 +113,7 @@ if (_activated) then { if (_name == "") then {_name = localize "STR_A3_curator";}; //--- Wait until mission starts - waitUntil {time > 0}; // NOTE: DO NOT CHANGE TO ACE_TIME, IT BREAKS THE MODULE + waitUntil {time > 0}; // NOTE: DO NOT CHANGE TO CBA_missionTime, IT BREAKS THE MODULE //--- Refresh addon list, so it's broadcasted to clients _addons = curatoraddons _logic; @@ -170,7 +170,7 @@ if (_activated) then { }; } forEach (curatoreditableobjects _logic); }; - },[_logic,_player]] call EFUNC(common,execNextFrame); + },[_logic,_player]] call CBA_fnc_execNextFrame; [_logic,"curatorUnitAssigned",[_logic,_player]] call bis_fnc_callscriptedeventhandler; @@ -244,7 +244,7 @@ if (_activated) then { } ]; }; - },[_logic]] call EFUNC(common,execNextFrame); + },[_logic]] call CBA_fnc_execNextFrame; }; //--- Player diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index 1143c30443..cdacd5ff0e 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -104,9 +104,9 @@ if (_activated) then { _side = side group _x; if (_side in [east,west,resistance,civilian]) then { //--- Play radio (only if it wasn't played recently) - if (ACE_time > _x getVariable ["BIS_fnc_moduleProjectile_radio",-_delay]) then { + if (CBA_missionTime > _x getVariable ["BIS_fnc_moduleProjectile_radio",-_delay]) then { [[_side,_radio,"side"],"bis_fnc_sayMessage",_x] call bis_fnc_mp; - _x setVariable ["BIS_fnc_moduleProjectile_radio",ACE_time + _delay]; + _x setVariable ["BIS_fnc_moduleProjectile_radio",CBA_missionTime + _delay]; }; }; }; diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf index 0b9c0f8dd8..0f3d720599 100644 --- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf +++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf @@ -24,3 +24,4 @@ if !(_activated) exitWith {}; [_logic, QGVAR(radioOrdnance), "radioOrdnance"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(revealMines), "revealMines"] call EFUNC(common,readSettingFromModule); [_logic, QGVAR(remoteWind), "remoteWind"] call EFUNC(common,readSettingFromModule); +[_logic, QGVAR(autoAddObjects), "autoAddObjects"] call EFUNC(common,readSettingFromModule); diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index f84cbdb7f7..c07d4f7f84 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -214,6 +214,7 @@ Přiřadit Zdravotníka Asignar médico Assegna Medico + Assigner médecin Assign Medical Vehicle @@ -224,6 +225,7 @@ Přiřadit Zdravotnické Vozidlo Asignar vehículo médico Assegna Veicolo Medico + Assigner véhicule médical Assign Medical Facility @@ -234,6 +236,7 @@ Přiřadit Zdravotnické Zařízení Asignar instalación médica Assegna Struttura Medica + Assigner installation médicale Add Spare Wheel @@ -244,6 +247,7 @@ Aggiungi Ruota di Scorta Ersatzrad hinzufügen Agregar rueda de auxilio + Ajouter pièce de rechange Adds a Spare Wheel to the vehicle @@ -254,6 +258,7 @@ Aggiungi una ruota di scorta al veicolo Fügt dem Fahrzeug ein Ersatzrad hinzu Agrega una rueda de auxilio al vehículo + Ajoute une roue de secours au véhicule Add Spare Track @@ -264,6 +269,7 @@ Aggiungi Cingolo di Scorta Ersatzkette hinzufügen Agregar oruga de repuesto + Ajouter une chenille de secours Adds a Spare Track to the vehicle @@ -274,6 +280,7 @@ Aggiungi un cingolo di scorta al veicolo Fügt dem Fahrzeug eine Ersatzkette hinzu Agrega una oruga de repuesto al vehículo + Ajoute une chenille de reserve Unit must be alive @@ -308,6 +315,7 @@ La unidad debe ser una estructura Jednotka musí být budova Si può usare solo su strutture + L'unité doit être une structure Unit must be a vehicle @@ -318,6 +326,7 @@ La unidad debe ser un vehículo Jednotka musí být vozidlo Si può usare solo su veicoli + L'unité doit être un véhicule Unit must be a vehicle with cargo space @@ -328,6 +337,7 @@ L'unità dev'essere un veicolo con spazio di carico Einheit muss ein Fahrzeug mit Ladekapazität sein La unidad debe ser un vehículo con espacio de carga + L'unité doit être un véhicule avec de l'espace de cargaison Unit must have cargo space left @@ -338,6 +348,7 @@ L'unità deve avere spazio di carico disponibile Einheit muss freie Ladekapazität haben La unidad debe tener espacio de carga disponible + L'unité doit avoir de l'espace libre en cargaison Unit must not be captive @@ -383,6 +394,7 @@ Agregar objetos al director Přidat objekty kurátorovi Aggiungi Oggetti al Curatore + Ajouter des objets au curateur (Zeus) Fügt Objekte zum Kurator hinzu @@ -393,6 +405,7 @@ Añadir cualquier objeto creado a todos los directores en la misión Přidá jakékoliv spawnuté objekty všem kurátorům v misi Aggiungi ogni oggetto creato a tutti i Curatori in missione + Ajoute n'importe quel objet spawné à tous les curateurs de la mission Fügt jedes gespawnte Objekt allen Kuratoren der Mission hinzu diff --git a/docs/README_DE.md b/docs/README_DE.md index 62e847b889..95a7b3c406 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -4,10 +4,7 @@

- ACE3 Version - - - ACE3 Download + ACE3 Version ACE3 Fehlermeldungen diff --git a/docs/README_PL.md b/docs/README_PL.md index 736e914219..87884e3a68 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -3,10 +3,7 @@

- ACE3 Wersja - - - ACE3 Pobierz + ACE3 Wersja ACE3 Zagadnienia diff --git a/extensions/parse_imagepath/ace_parse_imagepath.cpp b/extensions/parse_imagepath/ace_parse_imagepath.cpp index fa1a8643e7..dc27d60c72 100644 --- a/extensions/parse_imagepath/ace_parse_imagepath.cpp +++ b/extensions/parse_imagepath/ace_parse_imagepath.cpp @@ -36,18 +36,17 @@ std::string getImagePathFromStructuredText(const std::string & input) { return returnValue; } -// i like to live dangerously. jk, fix strncpy sometime pls. #pragma warning( push ) #pragma warning( disable : 4996 ) void __stdcall RVExtension(char *output, int outputSize, const char *function) { ZERO_OUTPUT(); - if (!strcmp(function, "version")) { - strncpy(output, ACE_FULL_VERSION_STR, outputSize); - } else { - strncpy(output, getImagePathFromStructuredText(function).c_str(), outputSize); - output[outputSize - 1] = '\0'; - } + if (!strcmp(function, "version")) { + strncpy_s(output, outputSize, ACE_FULL_VERSION_STR, _TRUNCATE); + } else { + strncpy_s(output, outputSize, getImagePathFromStructuredText(function).c_str(), _TRUNCATE); + output[outputSize - 1] = '\0'; + } EXTENSION_RETURN(); } diff --git a/extras/assets/icons/Icon_Module_png/Icon_Module_UI_ca.png b/extras/assets/icons/Icon_Module_png/Icon_Module_UI_ca.png new file mode 100644 index 0000000000..e69102a216 Binary files /dev/null and b/extras/assets/icons/Icon_Module_png/Icon_Module_UI_ca.png differ diff --git a/extras/assets/icons/Icons_Modules.psd b/extras/assets/icons/Icons_Modules.psd index 553449898a..0da44ea681 100644 Binary files a/extras/assets/icons/Icons_Modules.psd and b/extras/assets/icons/Icons_Modules.psd differ diff --git a/extras/blank/config.cpp b/extras/blank/config.cpp index a7b7bae6df..f78545d212 100644 --- a/extras/blank/config.cpp +++ b/extras/blank/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {""}; - authorUrl = ""; + author = ECSTRING(common,ACETeam); + authors[] = {""}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/mod.cpp b/mod.cpp index 3713ca7c2d..a0ee3b211e 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.4.3"; +name = "Advanced Combat Environment 3.5.1"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.4.3"; +description = "ACE3 - Version 3.5.1"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3"; diff --git a/optionals/compat_adr_97/$PBOPREFIX$ b/optionals/compat_adr_97/$PBOPREFIX$ new file mode 100644 index 0000000000..55c01af3d5 --- /dev/null +++ b/optionals/compat_adr_97/$PBOPREFIX$ @@ -0,0 +1 @@ +z\ace\addons\compat_adr_90 \ No newline at end of file diff --git a/optionals/compat_adr_97/CfgAmmo.hpp b/optionals/compat_adr_97/CfgAmmo.hpp new file mode 100644 index 0000000000..32d4deb076 --- /dev/null +++ b/optionals/compat_adr_97/CfgAmmo.hpp @@ -0,0 +1,14 @@ +class CfgAmmo { + class BulletBase; + class B_570x28_Ball: BulletBase { + ACE_caliber = 5.7; + ACE_bulletLength = 21.6; // http://blog.thejustnation.org/2011/04/5-7x28mm-ammo-review/ + ACE_bulletMass = 2; // based on the SS190 + ACE_ballisticCoefficients[] = {0.177}; //http://m.delphiforums.com/autogun/messages/5267/7 + ACE_velocityBoundaries[] = {}; + ACE_standardAtmosphere = "ASM"; // 50/50 chance to get it right + ACE_dragModel = 7; + ACE_muzzleVelocities[] = {716,776}; + ACE_barrelLengths[] = {264,407}; + }; +}; diff --git a/optionals/compat_adr_97/CfgMagazines.hpp b/optionals/compat_adr_97/CfgMagazines.hpp new file mode 100644 index 0000000000..fe88f128fd --- /dev/null +++ b/optionals/compat_adr_97/CfgMagazines.hpp @@ -0,0 +1,7 @@ +class CfgMagazines { + class CA_Magazine; + class 50Rnd_570x28_SMG_03: CA_Magazine { + displayName = CSTRING(P90_Mag_Name); + descriptionShort = CSTRING(P90_Mag_DescriptionShort); + }; +}; \ No newline at end of file diff --git a/optionals/compat_adr_97/CfgWeapons.hpp b/optionals/compat_adr_97/CfgWeapons.hpp new file mode 100644 index 0000000000..d77dcf562e --- /dev/null +++ b/optionals/compat_adr_97/CfgWeapons.hpp @@ -0,0 +1,67 @@ +class CfgWeapons { + + class Rifle_Base_F; + class SMG_03_TR_BASE: Rifle_Base_F { + ACE_barrelTwist = 228.6; // 1:9 inch twist + ACE_barrelLenght = 407; + ACE_twistDirection = 1; + modes[]= { + "Single" + }; + }; + class SMG_03_TR_black: SMG_03_TR_BASE{ + displayName = CSTRING(PS90_TR_Black_Name); + }; + class SMG_03_TR_khaki: SMG_03_TR_black { + displayName = CSTRING(PS90_TR_Khaki_Name); + }; + class SMG_03_TR_camo: SMG_03_TR_black { + displayName = CSTRING(PS90_TR_Camo_Name); + }; + class SMG_03_TR_hex: SMG_03_TR_BASE { + displayName = CSTRING(PS90_TR_Hex_Name); + }; + class SMG_03_black: SMG_03_TR_BASE { + displayName = CSTRING(PS90_Black_Name); + }; + class SMG_03_khaki: SMG_03_black { + displayName = CSTRING(PS90_Khaki_Name); + }; + class SMG_03_camo: SMG_03_black { + displayName = CSTRING(PS90_Camo_Name); + }; + class SMG_03_hex: SMG_03_black { + displayName = CSTRING(PS90_Hex_Name); + }; + class SMG_03C_BASE: SMG_03_TR_BASE { + ACE_barrelLenght = 264; + modes[]= { + "Single", + "FullAuto" + }; + }; + class SMG_03C_TR_black: SMG_03C_BASE { + displayName = CSTRING(P90_TR_Black_Name); + }; + class SMG_03C_TR_khaki: SMG_03C_TR_black { + displayName = CSTRING(P90_TR_Khaki_Name); + }; + class SMG_03C_TR_camo: SMG_03C_TR_black { + displayName = CSTRING(P90_TR_Camo_Name); + }; + class SMG_03C_TR_hex: SMG_03C_TR_black { + displayName = CSTRING(P90_TR_Hex_Name); + }; + class SMG_03C_black: SMG_03C_Base { + displayName = CSTRING(P90_Black_Name); + }; + class SMG_03C_khaki: SMG_03C_black { + displayName = CSTRING(P90_Khaki_Name); + }; + class SMG_03C_camo: SMG_03C_black { + displayName = CSTRING(P90_Camo_Name); + }; + class SMG_03C_hex: SMG_03C_black { + displayName = CSTRING(P90_Hex_Name); + }; +}; diff --git a/optionals/compat_adr_97/config.cpp b/optionals/compat_adr_97/config.cpp new file mode 100644 index 0000000000..aca323c98c --- /dev/null +++ b/optionals/compat_adr_97/config.cpp @@ -0,0 +1,18 @@ +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"A3_Weapons_F_Mod"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Nic547"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgWeapons.hpp" +#include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" diff --git a/optionals/compat_adr_97/script_component.hpp b/optionals/compat_adr_97/script_component.hpp new file mode 100644 index 0000000000..4b2da4eadb --- /dev/null +++ b/optionals/compat_adr_97/script_component.hpp @@ -0,0 +1,5 @@ +#define COMPONENT compat_adr_97 + +#include "\z\ace\addons\main\script_mod.hpp" + +#include "\z\ace\addons\main\script_macros.hpp" diff --git a/optionals/compat_adr_97/stringtable.xml b/optionals/compat_adr_97/stringtable.xml new file mode 100644 index 0000000000..bd91b18fa3 --- /dev/null +++ b/optionals/compat_adr_97/stringtable.xml @@ -0,0 +1,221 @@ + + + + + P90 TR (Black) + P90 TR (Černá) + P90 TR (Noir) + P90 TR (Negro) + P90 TR (Чёрный) + P90 TR (czarny) + P90 TR (Schwarz) + P90 TR (Nero) + P90 TR (Fekete) + P90 TR (Preto) + + + P90 TR (Khaki) + P90 TR (Khaki) + P90 TR (Kaki) + P90 TR (Caqui) + P90 TR (Хаки) + P90 TR (khaki) + P90 TR (Khaki) + P90 TR (Khaki) + P90 TR (Khaki) + P90 TR (Caqui) + + + P90 TR (Camo) + P90 TR (Kamufláž) + P90 TR (Camo) + P90 TR (Camuflaje) + P90 TR (Камо) + P90 TR (kamuflaż) + P90 TR (Camo) + P90 TR (Camo) + P90 TR (Terepmintás) + P90 TR (Camuflagem) + + + P90 TR (Hex) + P90 TR (Hex) + P90 TR (Hex) + P90 TR (Hex) + P90 TR (Гекс) + P90 TR (Hex) + P90 TR (hex) + P90 TR (Hex) + P90 TR (Hex) + P90 TR (Hex) + + + P90 (Black) + P90 (Černá) + P90 (Noir) + P90 (Negro) + P90 (Чёрный) + P90 (czarny) + P90 (Schwarz) + P90 (Nero) + P90 (Fekete) + P90 (Preto) + + + P90 (Khaki) + P90 (Khaki) + P90 (Kaki) + P90 (Caqui) + P90 (Хаки) + P90 (khaki) + P90 (Khaki) + P90 (Khaki) + P90 (Khaki) + P90 (Caqui) + + + P90 (Camo) + P90 (Kamufláž) + P90 (Camo) + P90 (Camuflaje) + P90 (Камо) + P90 (kamuflaż) + P90 (Camo) + P90 (Camo) + P90 (Terepmintás) + P90 (Camuflagem) + + + P90 (Hex) + P90 (Hex) + P90 (Hex) + P90 (Hex) + P90 (Гекс) + P90 (Hex) + P90 (hex) + P90 (Hex) + P90 (Hex) + P90 (Hex) + + + PS90 TR (Black) + PS90 TR (Černá) + PS90 TR (Noir) + PS90 TR (Negro) + PS90 TR (Чёрный) + PS90 TR (czarny) + PS90 TR (Schwarz) + PS90 TR (Nero) + PS90 TR (Fekete) + PS90 TR (Preto) + + + PS90 TR (Khaki) + PS90 TR (Khaki) + PS90 TR (Kaki) + PS90 TR (Caqui) + PS90 TR (Хаки) + PS90 TR (khaki) + PS90 TR (Khaki) + PS90 TR (Khaki) + PS90 TR (Khaki) + PS90 TR (Caqui) + + + PS90 TR (Camo) + PS90 TR (Kamufláž) + PS90 TR (Camo) + PS90 TR (Camuflaje) + PS90 TR (Камо) + PS90 TR (kamuflaż) + PS90 TR (Camo) + PS90 TR (Camo) + PS90 TR (Terepmintás) + PS90 TR (Camuflagem) + + + PS90 TR (Hex) + PS90 TR (Hex) + PS90 TR (Hex) + PS90 TR (Hex) + PS90 TR (Гекс) + PS90 TR (Hex) + PS90 TR (hex) + PS90 TR (Hex) + PS90 TR (Hex) + PS90 TR (Hex) + + + PS90 (Black) + PS90 (Černá) + PS90 (Noir) + PS90 (Negro) + PS90 (Чёрный) + PS90 (czarny) + PS90 (Schwarz) + PS90 (Nero) + PS90 (Fekete) + PS90 (Preto) + + + PS90 (Khaki) + PS90 (Khaki) + PS90 (Kaki) + PS90 (Caqui) + PS90 (Хаки) + PS90 (khaki) + PS90 (Khaki) + PS90 (Khaki) + PS90 (Khaki) + PS90 (Caqui) + + + PS90 (Camo) + PS90 (Kamufláž) + PS90 (Camo) + PS90 (Camuflaje) + PS90 (Камо) + PS90 (kamuflaż) + PS90 (Camo) + PS90 (Camo) + PS90 (Terepmintás) + PS90 (Camuflagem) + + + PS90 (Hex) + PS90 (Hex) + PS90 (Hex) + PS90 (Hex) + PS90 (Гекс) + PS90 (Hex) + PS90 (hex) + PS90 (Hex) + PS90 (Hex) + PS90 (Hex) + + + 5.7mm 50Rnd Mag + 5,7mm 50-as Tár + 5,7mm 50-Patronen-Magazin + Cargador de 50 balas SD de 5,7mm + Ch. 5,7mm 50Cps + Magazynek 5,7mm 50rd + 5.7mm 50náb. Zásobník + Carregador de 50 projéteis de 5.7mm + Caricatore 5.7mm 50Rnd + Магазин из 50-ти 5,7 мм + + + Caliber: 5.7mm<br />Rounds: 50<br />Used in: P90 + Kaliber: 5,7mm<br />Patronen: 50<br />Eingesetzt von: P90 + Kaliber: 5,7mm<br />Pociski: 50<br />Używany w: P90 + Calibre: 5.7mm<br />Cartouches: 50<br />Utilisé avec: P90 + Calibre: 5.7mm<br />Balas: 50<br />Se usa en: P90 + Калибр: 5,7 мм<br />Патронов: 50<br />Используются с: P90 + Calibro: 5.7mm<br />Munizioni: 50<br />In uso su: P90 + Ráže: 5.7mm<br />Nábojů: 50<br />Použití u: P90 + Calibre: 5.7mm<br />Cartuchos: 50<br />Usado em: P90 + Kaliber: 5,7mm<br />Lövedékek: 50<br />Használható: P90 + + + diff --git a/optionals/compat_r3f/config.cpp b/optionals/compat_r3f/config.cpp index d5dbc8e68c..c7e42c35ad 100644 --- a/optionals/compat_r3f/config.cpp +++ b/optionals/compat_r3f/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"R3F_Armes", "R3F_Acc"}; - author[]={"Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/optionals/compat_rh_acc/config.cpp b/optionals/compat_rh_acc/config.cpp index 9f563bd157..b66be68593 100644 --- a/optionals/compat_rh_acc/config.cpp +++ b/optionals/compat_rh_acc/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"RH_acc"}; - author[]={"Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/optionals/compat_rh_de/config.cpp b/optionals/compat_rh_de/config.cpp index 3d82eab05a..77dc828105 100644 --- a/optionals/compat_rh_de/config.cpp +++ b/optionals/compat_rh_de/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"RH_de_cfg"}; - author[]={"Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/optionals/compat_rh_m4/config.cpp b/optionals/compat_rh_m4/config.cpp index 9c28be4f89..4bacb9dedf 100644 --- a/optionals/compat_rh_m4/config.cpp +++ b/optionals/compat_rh_m4/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"RH_m4_cfg"}; - author[]={"Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/optionals/compat_rh_pdw/config.cpp b/optionals/compat_rh_pdw/config.cpp index 4aed0e6241..e3c5d15a07 100644 --- a/optionals/compat_rh_pdw/config.cpp +++ b/optionals/compat_rh_pdw/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"RH_PDW"}; - author[]={"Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/optionals/compat_rhs_afrf3/CfgAmmo.hpp b/optionals/compat_rhs_afrf3/CfgAmmo.hpp index ead78866c1..0ab559f96c 100644 --- a/optionals/compat_rhs_afrf3/CfgAmmo.hpp +++ b/optionals/compat_rhs_afrf3/CfgAmmo.hpp @@ -39,7 +39,7 @@ class CfgAmmo { ACE_muzzleVelocities[]={700, 800, 820, 833}; ACE_barrelLengths[]={406.4, 508.0, 609.6, 660.4}; }; - class rhs_B_762x54_Ball_Tracer_Green: B_762x51_Ball { + class rhs_B_762x54_Ball_Tracer_Green: rhs_B_762x54_Ball { ACE_caliber=7.925; ACE_bulletLength=28.956; ACE_bulletMass=9.6552; @@ -202,4 +202,20 @@ class CfgAmmo { ace_frag_skip = 1; ace_frag_force = 0; }; + + class G_40mm_HE; + class rhs_g_vog25: G_40mm_HE {}; + class rhs_g_vg40tb: rhs_g_vog25 { //Thermobaric + ace_frag_force = 0; + }; + class rhs_g_vg40sz: rhs_g_vog25 { //Flashbang + ace_frag_force = 0; + }; + class rhs_GDM40: rhs_g_vog25 { //Smoke + ace_frag_force = 0; + }; + class rhs_g_vg40md_white: rhs_g_vog25 { //Smoke + ace_frag_force = 0; + }; + }; diff --git a/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp b/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp new file mode 100644 index 0000000000..93e3311cf2 --- /dev/null +++ b/optionals/compat_rhs_afrf3/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; diff --git a/optionals/compat_rhs_afrf3/CfgVehicles.hpp b/optionals/compat_rhs_afrf3/CfgVehicles.hpp index d0486ecd0e..34effc0a58 100644 --- a/optionals/compat_rhs_afrf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_afrf3/CfgVehicles.hpp @@ -1,4 +1,4 @@ -class cfgVehicles { +class CfgVehicles { class LandVehicle; class Tank: LandVehicle { class NewTurret; @@ -201,18 +201,70 @@ class cfgVehicles { EGVAR(refuel,fuelCapacity) = 3600; }; - class Heli_Light_02_base_F; + class Helicopter_Base_F; + class Helicopter_Base_H: Helicopter_Base_F { + class EventHandlers; + }; + class Heli_Light_02_base_F: Helicopter_Base_H {}; class RHS_Mi8_base : Heli_Light_02_base_F { EGVAR(refuel,fuelCapacity) = 3700; + EGVAR(fastroping,enabled) = 0; + class EventHandlers: EventHandlers { + class RHS_EventHandlers; + }; + }; + + class RHS_Mi8amt_base: RHS_Mi8_base { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{-1.13, 4.67, -0.89}}; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + + class UserActions { + class openDoor; + class closeDoor_L: openDoor { + condition = QUOTE((this doorPhase 'LeftDoor' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + }; + }; + + class EventHandlers: EventHandlers { + class RHS_EventHandlers: RHS_EventHandlers { + getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_mi8_doors}); + }; + }; + }; + + class RHS_Mi8_VVS_Base: RHS_Mi8_base {}; + class RHS_Mi8mt_vvs: RHS_Mi8_VVS_Base {}; + class RHS_Mi8mt_Cargo_vvs: RHS_Mi8mt_vvs { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{-1.13, 4.67, -0.89}}; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + + class UserActions { + class openDoor_L; + class closeDoor_L: openDoor_L { + condition = QUOTE((this doorPhase 'LeftDoor' > 0.5) && {alive this} && {!(this getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)])}); + }; + }; + + class EventHandlers: EventHandlers { + class RHS_EventHandlers: RHS_EventHandlers { + getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_mi8_doors}); + }; + }; }; class Heli_Attack_02_base_F; class RHS_Ka52_base : Heli_Attack_02_base_F { EGVAR(refuel,fuelCapacity) = 1870; + EGVAR(fastroping,enabled) = 0; }; class RHS_Mi24_base : Heli_Attack_02_base_F { EGVAR(refuel,fuelCapacity) = 1851; + EGVAR(fastroping,enabled) = 0; }; class rhs_t80b : rhs_tank_base { diff --git a/optionals/compat_rhs_afrf3/XEH_PREP.hpp b/optionals/compat_rhs_afrf3/XEH_PREP.hpp new file mode 100644 index 0000000000..cb5a1268d9 --- /dev/null +++ b/optionals/compat_rhs_afrf3/XEH_PREP.hpp @@ -0,0 +1,2 @@ +PREP(onCut); +PREP(onPrepare); diff --git a/optionals/compat_rhs_afrf3/XEH_preInit.sqf b/optionals/compat_rhs_afrf3/XEH_preInit.sqf new file mode 100644 index 0000000000..a7feade1c3 --- /dev/null +++ b/optionals/compat_rhs_afrf3/XEH_preInit.sqf @@ -0,0 +1,7 @@ +#include "script_component.hpp" + +ADDON = false; + +#include "XEH_PREP.hpp" + +ADDON = true; diff --git a/optionals/compat_rhs_afrf3/XEH_preStart.sqf b/optionals/compat_rhs_afrf3/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/optionals/compat_rhs_afrf3/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/optionals/compat_rhs_afrf3/config.cpp b/optionals/compat_rhs_afrf3/config.cpp index 4840f8da82..bf36181ce8 100644 --- a/optionals/compat_rhs_afrf3/config.cpp +++ b/optionals/compat_rhs_afrf3/config.cpp @@ -6,12 +6,15 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"rhs_c_weapons", "rhs_c_troops", "rhs_c_bmd", "rhs_c_bmp", "rhs_c_bmp3", "rhs_c_a2port_armor", "rhs_c_btr", "rhs_c_sprut", "rhs_c_t72", "rhs_c_tanks", "rhs_c_a2port_air", "rhs_c_a2port_car", "rhs_c_cars", "rhs_c_2s3", "rhs_c_rva"}; - author[]={"Ruthberg", "GitHawk"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgAmmo.hpp" +#include "CfgEventHandlers.hpp" #include "CfgMagazines.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" diff --git a/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf b/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf new file mode 100644 index 0000000000..6a249a55c4 --- /dev/null +++ b/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf @@ -0,0 +1,23 @@ +/* + * Author: BaerMitUmlaut + * Function for closing doors and retracting the hooks for RHS USF helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before cutting ropes + * + * Example: + * [_vehicle] call ace_compat_rhs_afrf3_fnc_onCut + * + * Public: No + */ + +#include "script_component.hpp" +params ["_vehicle"]; + +_vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; +_vehicle animateDoor ["LeftDoor", 0]; + +2 diff --git a/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf b/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf new file mode 100644 index 0000000000..8a9dc9471e --- /dev/null +++ b/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf @@ -0,0 +1,23 @@ +/* + * Author: BaerMitUmlaut + * Function for opening doors and extending the hook for most vanilla helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before deploying ropes + * + * Example: + * [_vehicle] call ace_compat_rhs_afrf3_fnc_onPrepare + * + * Public: No + */ + +#include "script_component.hpp" +params ["_vehicle"]; + +_vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; +_vehicle animateDoor ["LeftDoor", 1]; + +2 diff --git a/optionals/compat_rhs_afrf3/functions/script_component.hpp b/optionals/compat_rhs_afrf3/functions/script_component.hpp new file mode 100644 index 0000000000..afabd202be --- /dev/null +++ b/optionals/compat_rhs_afrf3/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\compat_rhs_afrf3\script_component.hpp" diff --git a/optionals/compat_rhs_afrf3/script_component.hpp b/optionals/compat_rhs_afrf3/script_component.hpp index edf3963b1f..307b1f8de6 100644 --- a/optionals/compat_rhs_afrf3/script_component.hpp +++ b/optionals/compat_rhs_afrf3/script_component.hpp @@ -1,4 +1,4 @@ -#define COMPONENT rhs_c_weapons_comp +#define COMPONENT compat_rhs_afrf3 #include "\z\ace\addons\main\script_mod.hpp" diff --git a/optionals/compat_rhs_usf3/CfgAmmo.hpp b/optionals/compat_rhs_usf3/CfgAmmo.hpp index b830d5e564..930976bf33 100644 --- a/optionals/compat_rhs_usf3/CfgAmmo.hpp +++ b/optionals/compat_rhs_usf3/CfgAmmo.hpp @@ -2,7 +2,8 @@ class CfgAmmo { class BulletBase; - class rhsusf_B_300winmag: BulletBase { + class B_762x54_Ball; + class rhsusf_B_300winmag: B_762x54_Ball { ACE_caliber=7.823; ACE_bulletLength=37.821; ACE_bulletMass=14.256; diff --git a/optionals/compat_rhs_usf3/CfgEventHandlers.hpp b/optionals/compat_rhs_usf3/CfgEventHandlers.hpp new file mode 100644 index 0000000000..93e3311cf2 --- /dev/null +++ b/optionals/compat_rhs_usf3/CfgEventHandlers.hpp @@ -0,0 +1,11 @@ +class Extended_PreStart_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preStart)); + }; +}; + +class Extended_PreInit_EventHandlers { + class ADDON { + init = QUOTE(call COMPILE_FILE(XEH_preInit)); + }; +}; diff --git a/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp index 87c66f7212..2d3b28fbae 100644 --- a/optionals/compat_rhs_usf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp @@ -1,4 +1,17 @@ -class cfgVehicles { +#define EQUIP_FRIES_ATTRIBUTE class Attributes { \ + class EGVAR(fastroping,equipFRIES) { \ + property = QEGVAR(fastroping,equipFRIES); \ + control = "Checkbox"; \ + displayName = ECSTRING(fastroping,Eden_equipFRIES); \ + tooltip = ECSTRING(fastroping,Eden_equipFRIES_Tooltip); \ + expression = QUOTE([_this] call EFUNC(fastroping,equipFRIES)); \ + typeName = "BOOL"; \ + condition = "objectVehicle"; \ + defaultValue = false; \ + }; \ +} + +class CfgVehicles { class LandVehicle; class Tank: LandVehicle { class NewTurret; @@ -44,21 +57,117 @@ class cfgVehicles { ace_repair_hitpointGroups[] = {{"era_1_hitpoint", {"era_2_hitpoint", "era_3_hitpoint", "era_4_hitpoint", "era_5_hitpoint", "era_6_hitpoint", "era_7_hitpoint", "era_8_hitpoint", "era_9_hitpoint", "era_10_hitpoint", "era_11_hitpoint", "era_12_hitpoint", "era_13_hitpoint", "era_14_hitpoint", "era_15_hitpoint", "era_16_hitpoint", "era_17_hitpoint", "era_18_hitpoint", "era_19_hitpoint", "era_20_hitpoint", "era_21_hitpoint", "era_22_hitpoint", "era_23_hitpoint", "era_24_hitpoint", "era_25_hitpoint", "era_26_hitpoint", "era_27_hitpoint", "era_28_hitpoint", "era_29_hitpoint", "era_30_hitpoint", "era_31_hitpoint", "era_32_hitpoint", "era_33_hitpoint", "era_34_hitpoint", "era_35_hitpoint", "era_36_hitpoint", "era_37_hitpoint", "era_38_hitpoint", "era_39_hitpoint", "era_40_hitpoint", "era_41_hitpoint", "era_42_hitpoint", "era_43_hitpoint", "era_44_hitpoint", "era_45_hitpoint", "era_46_hitpoint"}}}; }; - class Heli_light_03_base_F; + class Helicopter; + class Helicopter_Base_F: Helicopter { + class Eventhandlers; + }; + class Heli_Light_03_base_F: Helicopter_Base_F {}; class RHS_UH1_Base: Heli_light_03_base_F { EGVAR(refuel,fuelCapacity) = 1447; }; - class Heli_Transport_01_base_F; + class RHS_UH1Y_base: RHS_UH1_Base {}; + class RHS_UH1Y_US_base: RHS_UH1Y_base {}; + class RHS_UH1Y: RHS_UH1Y_US_base { + EGVAR(fastroping,enabled) = 2; + EGVAR(fastroping,friesType) = "ACE_friesAnchorBar"; + EGVAR(fastroping,friesAttachmentPoint)[] = {0, 2.38, -0.135}; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + + class UserActions; + class EventHandlers: EventHandlers { + class RHSUSF_EventHandlers; + }; + + EQUIP_FRIES_ATTRIBUTE; + }; + class RHS_UH1Y_FFAR: RHS_UH1Y { + class UserActions: UserActions { + class OpenCargoDoor; + class CloseCargoDoor: OpenCargoDoor { + condition = QUOTE([ARR_2(this,'doorRB')] call FUNC(canCloseDoor)); + }; + class CloseCargoLDoor: OpenCargoDoor { + condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor)); + }; + }; + + class EventHandlers: EventHandlers { + class RHSUSF_EventHandlers: RHSUSF_EventHandlers { + getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors}); + }; + }; + }; + + class Helicopter_Base_H: Helicopter_Base_F { + class Eventhandlers; + }; + class Heli_Transport_01_base_F: Helicopter_Base_H {}; class RHS_UH60_Base: Heli_Transport_01_base_F { EGVAR(refuel,fuelCapacity) = 1360; }; + class RHS_UH60M_base: RHS_UH60_Base {}; + class RHS_UH60M_US_base: RHS_UH60M_base {}; + class RHS_UH60M: RHS_UH60M_US_base { + EGVAR(fastroping,enabled) = 2; + EGVAR(fastroping,friesType) = "ACE_friesAnchorBar"; + EGVAR(fastroping,friesAttachmentPoint)[] = {0, 1.25, -0.65}; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + EGVAR(fastroping,ropeOrigins)[] = {"ropeOriginLeft", "ropeOriginRight"}; + + class UserActions { + class OpenCargoDoor; + class CloseCargoDoor: OpenCargoDoor { + condition = QUOTE([ARR_2(this,'doorRB')] call FUNC(canCloseDoor)); + }; + class CloseCargoLDoor: OpenCargoDoor { + condition = QUOTE([ARR_2(this,'doorLB')] call FUNC(canCloseDoor)); + }; + }; + class EventHandlers: EventHandlers { + class RHSUSF_EventHandlers { + getOut = QUOTE(if !((_this select 0) getVariable [ARR_2(QUOTE(QEGVAR(fastroping,doorsLocked)),false)]) then {_this call rhs_fnc_uh60_doors}); + }; + }; + + EQUIP_FRIES_ATTRIBUTE; + }; + + class RHS_UH60M_MEV: RHS_UH60M { + EGVAR(fastroping,enabled) = 0; + class Attributes { + delete EGVAR(fastroping,equipFRIES); + }; + }; + + class RHS_UH60M_MEV2: RHS_UH60M_MEV { + EGVAR(fastroping,enabled) = 2; + EQUIP_FRIES_ATTRIBUTE; + }; + class Heli_Transport_02_base_F; class RHS_CH_47F_base: Heli_Transport_02_base_F { EGVAR(refuel,fuelCapacity) = 3914; }; + class RHS_CH_47F: RHS_CH_47F_base { + EGVAR(fastroping,enabled) = 1; + EGVAR(fastroping,ropeOrigins)[] = {{0.5, -7.15, -0.95}, {-0.5, -7.15, -0.95}}; + EGVAR(fastroping,onCut) = QFUNC(onCut); + EGVAR(fastroping,onPrepare) = QFUNC(onPrepare); + + class UserActions { + class OpenCargoDoor; + class CloseCargoDoor: OpenCargoDoor { + condition = QUOTE([ARR_2(this,'ramp_anim')] call FUNC(canCloseDoor)); + }; + }; + }; + class Heli_Attack_01_base_F; class RHS_AH1Z_base: Heli_Attack_01_base_F { EGVAR(refuel,fuelCapacity) = 1600; diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index c49b9bc5e4..8ef39bd666 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -111,8 +111,8 @@ class CfgWeapons }; }; }; - class rhs_weap_m4a1; - class rhs_weap_mk18: rhs_weap_m4a1 { + class rhs_weap_m4a1_blockII; + class rhs_weap_mk18: rhs_weap_m4a1_blockII { ACE_barrelTwist = 177.8; ACE_barrelLength = 261.62; ACE_Overheating_dispersion = 1; diff --git a/optionals/compat_rhs_usf3/XEH_PREP.hpp b/optionals/compat_rhs_usf3/XEH_PREP.hpp new file mode 100644 index 0000000000..821ee657be --- /dev/null +++ b/optionals/compat_rhs_usf3/XEH_PREP.hpp @@ -0,0 +1,3 @@ +PREP(canCloseDoor); +PREP(onCut); +PREP(onPrepare); diff --git a/optionals/compat_rhs_usf3/XEH_preInit.sqf b/optionals/compat_rhs_usf3/XEH_preInit.sqf new file mode 100644 index 0000000000..a7feade1c3 --- /dev/null +++ b/optionals/compat_rhs_usf3/XEH_preInit.sqf @@ -0,0 +1,7 @@ +#include "script_component.hpp" + +ADDON = false; + +#include "XEH_PREP.hpp" + +ADDON = true; diff --git a/optionals/compat_rhs_usf3/XEH_preStart.sqf b/optionals/compat_rhs_usf3/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/optionals/compat_rhs_usf3/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/optionals/compat_rhs_usf3/config.cpp b/optionals/compat_rhs_usf3/config.cpp index ce847e969e..e218f77d2e 100644 --- a/optionals/compat_rhs_usf3/config.cpp +++ b/optionals/compat_rhs_usf3/config.cpp @@ -6,12 +6,15 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"rhsusf_c_weapons", "rhsusf_c_troops", "rhsusf_c_m1a1", "rhsusf_c_m1a2", "RHS_US_A2_AirImport", "rhsusf_c_m109", "rhsusf_c_hmmwv", "rhsusf_c_rg33", "rhsusf_c_fmtv", "rhsusf_c_m113", "RHS_US_A2Port_Armor"}; - author[]={"Ruthberg", "GitHawk"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg", "GitHawk", "BaerMitUmlaut"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgAmmo.hpp" +#include "CfgEventHandlers.hpp" #include "CfgMagazines.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" diff --git a/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf b/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf new file mode 100644 index 0000000000..61269519ed --- /dev/null +++ b/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf @@ -0,0 +1,30 @@ +/* + * Author: BaerMitUmlaut + * Checks if the door can be closed. + * + * Arguments: + * 0: Helicopter + * 1: Door + * + * Return Value: + * Door can be closed + * + * Example: + * [_vehicle, "DoorLB"] call ace_compat_rhs_usf3_fnc_canCloseDoor + * + * Public: No + */ + +#include "script_component.hpp" +params ["_vehicle", "_door"]; + +(_vehicle doorPhase _door > 0) && +{alive _vehicle} && +{!(_vehicle getVariable [QEGVAR(fastroping,doorsLocked),false])} && +{ + if (_vehicle isKindOf "RHS_CH_47F") then { + ACE_player in [driver _vehicle, _vehicle turretUnit [3], _vehicle turretUnit [4]] + } else { + ACE_player in _vehicle + } +} diff --git a/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf b/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf new file mode 100644 index 0000000000..3663a10bd5 --- /dev/null +++ b/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf @@ -0,0 +1,36 @@ +/* + * Author: BaerMitUmlaut + * Function for closing doors and retracting the hooks for RHS USF helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before cutting ropes + * + * Example: + * [_vehicle] call ace_compat_rhs_usf3_fnc_onCut + * + * Public: No + */ + +#include "script_component.hpp" +params ["_vehicle"]; + +_vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; + +private _fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull]; +if !(isNull _fries) then { + _fries animate ["extendHookRight", 0]; + _fries animate ["extendHookLeft", 0]; + [{ + _this animateDoor ["doorRB", 0]; + _this animateDoor ["doorLB", 0]; + }, _vehicle, 2] call EFUNC(common,waitAndExecute); + + 4 +} else { + _vehicle animateDoor ["ramp_anim", 0]; + + 2 +}; diff --git a/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf b/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf new file mode 100644 index 0000000000..3e655a0aca --- /dev/null +++ b/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf @@ -0,0 +1,38 @@ +/* + * Author: BaerMitUmlaut + * Function for opening doors and extending the hook for most vanilla helos. + * + * Arguments: + * 0: Helicopter + * + * Return Value: + * Amount of time to wait before deploying ropes + * + * Example: + * [_vehicle] call ace_compat_rhs_usf3_fnc_onPrepare + * + * Public: No + */ + +#include "script_component.hpp" +params ["_vehicle"]; +private ["_fries", "_waitTime"]; + +_vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; + +_waitTime = 2; + +_vehicle animateDoor ["doorRB", 1]; +_vehicle animateDoor ["doorLB", 1]; +_vehicle animateDoor ["ramp_anim", 1]; + +_fries = _vehicle getVariable [QEGVAR(fastroping,FRIES), objNull]; +if !(isNull _fries) then { + [{ + _this animate ["extendHookRight", 1]; + _this animate ["extendHookLeft", 1]; + }, _fries, 2] call EFUNC(common,waitAndExecute); + _waitTime = 4; +}; + +_waitTime diff --git a/optionals/compat_rhs_usf3/functions/script_component.hpp b/optionals/compat_rhs_usf3/functions/script_component.hpp new file mode 100644 index 0000000000..c2cdf03c81 --- /dev/null +++ b/optionals/compat_rhs_usf3/functions/script_component.hpp @@ -0,0 +1 @@ +#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" diff --git a/optionals/compat_rhs_usf3/script_component.hpp b/optionals/compat_rhs_usf3/script_component.hpp index c0a5bbf1f4..32aecef74e 100644 --- a/optionals/compat_rhs_usf3/script_component.hpp +++ b/optionals/compat_rhs_usf3/script_component.hpp @@ -1,4 +1,4 @@ -#define COMPONENT rhsusf_c_weapons_comp +#define COMPONENT compat_rhs_usf3 #include "\z\ace\addons\main\script_mod.hpp" diff --git a/optionals/compat_rksl_pm_ii/config.cpp b/optionals/compat_rksl_pm_ii/config.cpp index c3ed720f8b..ca0a7189f2 100644 --- a/optionals/compat_rksl_pm_ii/config.cpp +++ b/optionals/compat_rksl_pm_ii/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"RKSL_PMII"}; - author[]={"Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/optionals/compat_sma3_iansky/config.cpp b/optionals/compat_sma3_iansky/config.cpp index 4dfda50805..5611c2d4af 100644 --- a/optionals/compat_sma3_iansky/config.cpp +++ b/optionals/compat_sma3_iansky/config.cpp @@ -6,7 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"iansky_opt"}; - author[]={"Ruthberg"}; + author = ECSTRING(common,ACETeam); + authors[] = {"Ruthberg"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/optionals/noactionmenu/config.cpp b/optionals/noactionmenu/config.cpp index 763665660b..77e0457643 100644 --- a/optionals/noactionmenu/config.cpp +++ b/optionals/noactionmenu/config.cpp @@ -7,8 +7,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"commy2"}; - authorUrl = "https://github.com/commy2"; + author = ECSTRING(common,ACETeam); + authors[] = {"commy2"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/optionals/server/config.cpp b/optionals/server/config.cpp index 9cfcb35012..ab354fa4d8 100644 --- a/optionals/server/config.cpp +++ b/optionals/server/config.cpp @@ -6,8 +6,9 @@ class CfgPatches { weapons[] = {}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; - author[] = {"Glowbal"}; - authorUrl = "https://github.com/Glowbal/"; + author = ECSTRING(common,ACETeam); + authors[] = {"Glowbal"}; + url = ECSTRING(main,URL); VERSION_CONFIG; }; }; diff --git a/optionals/tracers/config.cpp b/optionals/tracers/config.cpp index 7ea5992f14..32f1bfbb2d 100644 --- a/optionals/tracers/config.cpp +++ b/optionals/tracers/config.cpp @@ -1,15 +1,16 @@ -#include "script_component.hpp" - -class CfgPatches { - class ADDON { - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_ballistics"}; - author[] = {"ACE2 Team"}; - authorUrl = "https://www.ace3mod.com"; - VERSION_CONFIG; - }; -}; - -#include "CfgAmmo.hpp" +#include "script_component.hpp" + +class CfgPatches { + class ADDON { + units[] = {}; + weapons[] = {}; + requiredVersion = REQUIRED_VERSION; + requiredAddons[] = {"ace_ballistics"}; + author = ECSTRING(common,ACETeam); + authors[] = {"ACE2 Team"}; + url = ECSTRING(main,URL); + VERSION_CONFIG; + }; +}; + +#include "CfgAmmo.hpp" diff --git a/tools/config_style_checker.py b/tools/config_style_checker.py new file mode 100644 index 0000000000..03d8f222fe --- /dev/null +++ b/tools/config_style_checker.py @@ -0,0 +1,157 @@ +#!/usr/bin/env python3 + +import fnmatch +import os +import re +import ntpath +import sys +import argparse + +def check_config_style(filepath): + bad_count_file = 0 + def pushClosing(t): + closingStack.append(closing.expr) + closing << Literal( closingFor[t[0]] ) + + def popClosing(): + closing << closingStack.pop() + + with open(filepath, 'r', encoding='utf-8', errors='ignore') as file: + content = file.read() + + # Store all brackets we find in this file, so we can validate everything on the end + brackets_list = [] + + # To check if we are in a comment block + isInCommentBlock = False + checkIfInComment = False + # Used in case we are in a line comment (//) + ignoreTillEndOfLine = False + # Used in case we are in a comment block (/* */). This is true if we detect a * inside a comment block. + # If the next character is a /, it means we end our comment block. + checkIfNextIsClosingBlock = False + + # We ignore everything inside a string + isInString = False + # Used to store the starting type of a string, so we can match that to the end of a string + inStringType = ''; + + lastIsCurlyBrace = False + checkForSemiColumn = False + + # Extra information so we know what line we find errors at + lineNumber = 1 + + indexOfCharacter = 0 + # Parse all characters in the content of this file to search for potential errors + for c in content: + if (lastIsCurlyBrace): + lastIsCurlyBrace = False + if c == '\n': # Keeping track of our line numbers + lineNumber += 1 # so we can print accurate line number information when we detect a possible error + if (isInString): # while we are in a string, we can ignore everything else, except the end of the string + if (c == inStringType): + isInString = False + # if we are not in a comment block, we will check if we are at the start of one or count the () {} and [] + elif (isInCommentBlock == False): + + # This means we have encountered a /, so we are now checking if this is an inline comment or a comment block + if (checkIfInComment): + checkIfInComment = False + if c == '*': # if the next character after / is a *, we are at the start of a comment block + isInCommentBlock = True + elif (c == '/'): # Otherwise, will check if we are in an line comment + ignoreTillEndOfLine = True # and an line comment is a / followed by another / (//) We won't care about anything that comes after it + + if (isInCommentBlock == False): + if (ignoreTillEndOfLine): # we are in a line comment, just continue going through the characters until we find an end of line + if (c == '\n'): + ignoreTillEndOfLine = False + else: # validate brackets + if (c == '"' or c == "'"): + isInString = True + inStringType = c + elif (c == '/'): + checkIfInComment = True + elif (c == '('): + brackets_list.append('(') + elif (c == ')'): + if (len(brackets_list) > 0 and brackets_list[-1] in ['{', '[']): + print("ERROR: Possible missing round bracket ')' detected at {0} Line number: {1}".format(filepath,lineNumber)) + bad_count_file += 1 + brackets_list.append(')') + elif (c == '['): + brackets_list.append('[') + elif (c == ']'): + if (len(brackets_list) > 0 and brackets_list[-1] in ['{', '(']): + print("ERROR: Possible missing square bracket ']' detected at {0} Line number: {1}".format(filepath,lineNumber)) + bad_count_file += 1 + brackets_list.append(']') + elif (c == '{'): + brackets_list.append('{') + elif (c == '}'): + lastIsCurlyBrace = True + if (len(brackets_list) > 0 and brackets_list[-1] in ['(', '[']): + print("ERROR: Possible missing curly brace '}}' detected at {0} Line number: {1}".format(filepath,lineNumber)) + bad_count_file += 1 + brackets_list.append('}') + elif (c== '\t'): + print("ERROR: Tab detected at {0} Line number: {1}".format(filepath,lineNumber)) + bad_count_file += 1 + + else: # Look for the end of our comment block + if (c == '*'): + checkIfNextIsClosingBlock = True; + elif (checkIfNextIsClosingBlock): + if (c == '/'): + isInCommentBlock = False + elif (c != '*'): + checkIfNextIsClosingBlock = False + indexOfCharacter += 1 + + if brackets_list.count('[') != brackets_list.count(']'): + print("ERROR: A possible missing square bracket [ or ] in file {0} [ = {1} ] = {2}".format(filepath,brackets_list.count('['),brackets_list.count(']'))) + bad_count_file += 1 + if brackets_list.count('(') != brackets_list.count(')'): + print("ERROR: A possible missing round bracket ( or ) in file {0} ( = {1} ) = {2}".format(filepath,brackets_list.count('('),brackets_list.count(')'))) + bad_count_file += 1 + if brackets_list.count('{') != brackets_list.count('}'): + print("ERROR: A possible missing curly brace {{ or }} in file {0} {{ = {1} }} = {2}".format(filepath,brackets_list.count('{'),brackets_list.count('}'))) + bad_count_file += 1 + return bad_count_file + +def main(): + + print("Validating Config Style") + + sqf_list = [] + bad_count = 0 + + parser = argparse.ArgumentParser() + parser.add_argument('-m','--module', help='only search specified module addon folder', required=False, default="") + args = parser.parse_args() + + # Allow running from root directory as well as from inside the tools directory + rootDir = "../addons" + if (os.path.exists("addons")): + rootDir = "addons" + + for root, dirnames, filenames in os.walk(rootDir + '/' + args.module): + for filename in fnmatch.filter(filenames, '*.cpp'): + sqf_list.append(os.path.join(root, filename)) + for filename in fnmatch.filter(filenames, '*.hpp'): + sqf_list.append(os.path.join(root, filename)) + + for filename in sqf_list: + bad_count = bad_count + check_config_style(filename) + + print("------\nChecked {0} files\nErrors detected: {1}".format(len(sqf_list), bad_count)) + if (bad_count == 0): + print("Config validation PASSED") + else: + print("Config validation FAILED") + + return bad_count + +if __name__ == "__main__": + sys.exit(main()) diff --git a/tools/setup.py b/tools/setup.py index 62925a6066..af1b224cbb 100644 --- a/tools/setup.py +++ b/tools/setup.py @@ -25,19 +25,19 @@ def main(): ###################################### This script will create your ACE3 dev environment for you. - + Before you run this, you should already have: - The Arma 3 Tools installed properly via Steam - A properly set up P-drive - + If you have not done those things yet, please abort this script in the next step and do so first. - + This script will create two hard links on your system, both pointing to your ACE3 project folder: [Arma 3 installation directory]\\{} => ACE3 project folder P:\\{} => ACE3 project folder - + It will also copy the required CBA includes to {}, if you do not have the CBA source code already.""".format(FULLDIR,FULLDIR,CBA)) - print("\n") + print("\n") try: reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) @@ -79,12 +79,8 @@ def main(): if not os.path.exists(os.path.join(armapath, MAINDIR)): os.mkdir(os.path.join(armapath, MAINDIR)) - if platform.win32_ver()[0] == "7": - subprocess.call(["cmd", "/c", "mklink", "/D", "P:\\{}\\{}".format(MAINDIR,PROJECTDIR), projectpath]) - subprocess.call(["cmd", "/c", "mklink", "/D", os.path.join(armapath, MAINDIR, PROJECTDIR), projectpath]) - else: - subprocess.call(["cmd", "/c", "mklink", "/D", "/J", "P:\\{}\\{}".format(MAINDIR,PROJECTDIR), projectpath]) - subprocess.call(["cmd", "/c", "mklink", "/D", "/J", os.path.join(armapath, MAINDIR, PROJECTDIR), projectpath]) + subprocess.call(["cmd", "/c", "mklink", "/J", "P:\\{}\\{}".format(MAINDIR,PROJECTDIR), projectpath]) + subprocess.call(["cmd", "/c", "mklink", "/J", os.path.join(armapath, MAINDIR, PROJECTDIR), projectpath]) except: raise print("Something went wrong during the link creation. Please finish the setup manually.") diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py index 7414d7d715..c824b35268 100644 --- a/tools/sqf_validator.py +++ b/tools/sqf_validator.py @@ -8,7 +8,7 @@ import sys import argparse def validKeyWordAfterCode(content, index): - keyWords = ["for", "do", "count", "each", "forEach", "else", "and", "not", "isEqualTo", "in", "call", "spawn", "execVM", "catch"]; + keyWords = ["for", "do", "count", "each", "forEach", "else", "and", "not", "isEqualTo", "in", "call", "spawn", "execVM", "catch", "param", "select", "apply"]; for word in keyWords: try: subWord = content.index(word, index, index+len(word)) @@ -50,7 +50,7 @@ def check_sqf_syntax(filepath): checkForSemiColumn = False # Extra information so we know what line we find errors at - lineNumber = 0 + lineNumber = 1 indexOfCharacter = 0 # Parse all characters in the content of this file to search for potential errors @@ -112,7 +112,7 @@ def check_sqf_syntax(filepath): elif (c== '\t'): print("ERROR: Tab detected at {0} Line number: {1}".format(filepath,lineNumber)) bad_count_file += 1 - + if (checkForSemiColumn): if (c not in [' ', '\t', '\n', '/']): # keep reading until no white space or comments checkForSemiColumn = False