diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 8eb5664cf5..b8aae89b77 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -24,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/.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 c79206137c..46a5e50457 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -75,6 +75,7 @@ Gianmarco Varriale (TeamNuke) GieNkoV GitHawk gpgpgpgp +Grey-Soldierman Grzegorz Hamburger SV Harakhti @@ -119,4 +120,3 @@ voiper VyMajoris(W-Cephei) Winter zGuba -Grey-Soldierman diff --git a/README.md b/README.md index 3de005ce29..3ead78c57f 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Issues 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/XEH_postInit.sqf b/addons/advanced_ballistics/XEH_postInit.sqf index a541d30ce8..2a9f6c3eb6 100644 --- a/addons/advanced_ballistics/XEH_postInit.sqf +++ b/addons/advanced_ballistics/XEH_postInit.sqf @@ -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/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index 5ad6cb111e..8ff21e60cc 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -47,7 +47,7 @@ GVAR(Protractor) = true; __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 ctrlSetTextColor [1, 1, 1, 1]; diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index 9646f065d4..7844e8a53a 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 { diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 02468d0349..25562a71d0 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -24,7 +24,7 @@ _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; 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/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/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 e1750d8aad..dfeab3b017 100644 --- a/addons/cargo/CfgVehicles.hpp +++ b/addons/cargo/CfgVehicles.hpp @@ -194,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; @@ -207,7 +264,6 @@ class CfgVehicles { }; // autonomus - class Helicopter_Base_F; class UAV_01_base_F: Helicopter_Base_F { GVAR(space) = 0; GVAR(hasCargo) = 0; @@ -256,6 +312,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; @@ -278,6 +335,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; 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/common/CfgEventHandlers.hpp b/addons/common/CfgEventHandlers.hpp index 2c4f3922bc..6e8528cf03 100644 --- a/addons/common/CfgEventHandlers.hpp +++ b/addons/common/CfgEventHandlers.hpp @@ -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 FUNC(execNextFrame)};); }; class GVAR(muteUnit) { init = QUOTE(_this call FUNC(muteUnitHandleInitPost)); diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 58e674dd8d..22257e3cb5 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -133,6 +133,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,12 +147,15 @@ 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); if (isServer) then { ["hideObjectGlobal", {(_this select 0) hideObjectGlobal (_this select 1)}] call FUNC(addEventHandler); @@ -330,12 +334,6 @@ 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); @@ -442,6 +440,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..16e0a65159 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -47,29 +47,12 @@ GVAR(statusEffect_Names) = []; GVAR(statusEffect_isGlobal) = []; ////////////////////////////////////////////////// -// 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 ////////////////////////////////////////////////// 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_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_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_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_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf index ee6d1e11dc..8da838848a 100644 --- a/addons/common/functions/fnc_getMGRSdata.sqf +++ b/addons/common/functions/fnc_getMGRSdata.sqf @@ -22,27 +22,39 @@ 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 ["chernarus", "chernarus_summer", "chernarus_winter", "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; }; if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; }; -if (_map in ["fata", "Abbottabad"]) then { _lat = 30; _altitude = 1000; }; +if (_map in ["fata"]) then { _lat = 33; _altitude = 1347; }; +if (_map in ["abbottabad"]) then { _lat = 34; _altitude = 1256; }; 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 ["bornholm"]) then { _lat = 55; _altitude = 0; }; +if (_map in ["bozcaada", "imrali", "imralispring"]) 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", "sara_dbe1", "saralite", "intro", "desert_e", "porto"]) then { _lat = 40; _altitude = 0; }; 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 ["thirsk"]) then { _lat = 65; _altitude = 0; }; +if (_map in ["lingor", "lingor3"]) then { _lat = -4; _altitude = 0; }; +if (_map in ["panthera3"]) then { _lat = 46; _altitude = 0; }; +if (_map in ["kunduz"]) then { _lat = 37; _altitude = 0; }; +if (_map in ["angel"]) then { _lat = 38; _altitude = 0; }; +if (_map in ["porquerolles"]) then { _lat = 43; _altitude = 0; }; +if (_map in ["napf"]) then { _lat = 47; _altitude = 0; }; +if (_map in ["mef_alaska"]) then { _lat = 60; _altitude = 5; }; +if (_map in ["australia"]) then { _lat = -25; _altitude = 0; }; +if (_map in ["pja301"]) then { _lat = 42; _altitude = 0; }; +if (_map in ["pja305"]) then { _lat = 0; _altitude = 0; }; +if (_map in ["pja306"]) then { _lat = 35; _altitude = 300; }; +if (_map in ["pja307"]) then { _lat = 17; _altitude = 0; }; +if (_map in ["pja308", "pja310"]) then { _lat = 36; _altitude = 0; }; private _UTM = [_long,_lat] call BIS_fnc_posDegToUTM; private _easting = _UTM select 0; 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_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/concertina_wire/CfgVehicles.hpp b/addons/concertina_wire/CfgVehicles.hpp index 9c7d832bc1..88975ea7e9 100644 --- a/addons/concertina_wire/CfgVehicles.hpp +++ b/addons/concertina_wire/CfgVehicles.hpp @@ -86,7 +86,7 @@ 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[] = {}; @@ -119,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; 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/dagr/Dialog.hpp b/addons/dagr/Dialog.hpp index 17c065f830..8511829e5e 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 = QUOTE(PATHTOF(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/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index e4fb341537..54cb4467c5 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -522,7 +522,7 @@ GVAR(menuRun) = true; (__dsp displayCtrl __mainText) ctrlSetText "Connecting..."; }; if (ACE_time - GVAR(busyTimer) > 0.6) then { - if (ACE_player hasWeapon "ACE_Vector") 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; 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/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/CfgVehicles.hpp b/addons/dragging/CfgVehicles.hpp index dab8c1e842..31928e8621 100644 --- a/addons/dragging/CfgVehicles.hpp +++ b/addons/dragging/CfgVehicles.hpp @@ -6,14 +6,19 @@ class CfgVehicles { 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; }; + class StaticCannon: StaticWeapon { + GVAR(canCarry) = 0; + GVAR(canDrag) = 0; + }; + //remove actions from Taru Pods class Pod_Heli_Transport_04_base_F: StaticWeapon { GVAR(canCarry) = 0; @@ -23,23 +28,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; }; @@ -84,7 +90,33 @@ class CfgVehicles { GVAR(canCarry) = 0; GVAR(canDrag) = 0; }; + + //Plastic and metal case + class PlasticCase_01_base_F: Items_base_F { + class EventHandlers { + class CBA_Extended_EventHandlers: CBA_Extended_EventHandlers {}; + }; + GVAR(canCarry) = 1; + GVAR(carryPosition[]) = {0,1,1}; + GVAR(carryDirection) = 270; + GVAR(canDrag) = 1; + GVAR(dragPosition[]) = {0,1.2,0}; + GVAR(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 { @@ -92,40 +124,40 @@ class CfgVehicles { }; GVAR(canCarry) = 1; - GVAR(carryPosition[]) = {0,1,1}; + GVAR(carryPosition)[] = {0,1,1}; GVAR(carryDirection) = 0; GVAR(canDrag) = 1; - GVAR(dragPosition[]) = {0,1.2,0}; + 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/explosives/ACE_Settings.hpp b/addons/explosives/ACE_Settings.hpp index ef6a723d5b..ceb6b62d25 100644 --- a/addons/explosives/ACE_Settings.hpp +++ b/addons/explosives/ACE_Settings.hpp @@ -1,9 +1,13 @@ class ACE_Settings { class GVAR(RequireSpecialist) { + displayName = CSTRING(RequireSpecialist_DisplayName); + description = CSTRING(RequireSpecialist_Description); value = 0; typeName = "BOOL"; }; class GVAR(PunishNonSpecialists) { + displayName = CSTRING(PunishNonSpecialists_DisplayName); + description = CSTRING(PunishNonSpecialists_Description); value = 1; typeName = "BOOL"; }; 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/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index 5f81bde127..3db6546208 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -50,8 +50,7 @@ class CfgVehicles { 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 { @@ -81,8 +80,7 @@ class CfgVehicles { 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 { 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 index 289d2f067a..1475f774e8 100644 --- a/addons/explosives/XEH_missionDisplayLoad.sqf +++ b/addons/explosives/XEH_missionDisplayLoad.sqf @@ -3,3 +3,4 @@ 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/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_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_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index b1fdf7216b..709ea688d5 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; }; diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index ad89649cbd..4cabe2ce06 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -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 @@ -647,6 +647,7 @@ Mina M6 SLAM (atak od dołu) Mina M6 SLAM (Ataque Inferior) Mine M6 SLAM (par le bas) + Mina M6 SLAM (base) M6 SLAM Mine (Side Attack) @@ -661,6 +662,7 @@ Mina M6 SLAM (atak od boku) Mina M6 SLAM (Ataque Lateral) 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) Large IED (Urban, Pressure Plate) @@ -675,6 +677,7 @@ 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) Large IED (Dug-in, Pressure Plate) @@ -689,6 +692,7 @@ 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) Small IED (Urban, Pressure Plate) @@ -703,6 +707,7 @@ 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) Small IED (Dug-in, Pressure Plate) @@ -717,6 +722,7 @@ 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) Connect to %1 @@ -731,4 +737,4 @@ Conectar à %1 - + \ No newline at end of file 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/CfgVehicles.hpp b/addons/fastroping/CfgVehicles.hpp index 3468a0ecb9..609e386e68 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; \ @@ -35,23 +35,20 @@ class CfgVehicles { }; }; - class Helicopter_Base_F; - class ACE_friesBase: Helicopter_Base_F { - destrType = ""; - class Turrets {}; - + 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); + 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 = [_player, vehicle _player] call FUNC(canDeployRopes); - statement = [QGVAR(deployRopes), [vehicle _player]] call EFUNC(common,serverEvent); + 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; }; @@ -71,10 +68,20 @@ class CfgVehicles { }; }; }; + + 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 = QUOTE(PATHTOF(data\friesAnchorBar.p3d)); animated = 1; class AnimationSources { class extendHookRight { @@ -92,7 +99,7 @@ class CfgVehicles { class ACE_friesGantry: ACE_friesBase { author = "jokoho48"; scope = 1; - model = PATHTOF(data\friesGantry.p3d); + model = QUOTE(PATHTOF(data\friesGantry.p3d)); animated = 1; class AnimationSources { class adjustWidth { @@ -110,10 +117,20 @@ 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 { - class AnimationSources { + class AnimationSources: AnimationSources { class adjustWidth { source = "user"; initPhase = 0.213; @@ -143,54 +160,83 @@ class CfgVehicles { 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..4c4da2a7cb --- /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 = QUOTE(PATHTOF(functions\fnc_deployAIWaypoint.sqf)); + icon = QUOTE(PATHTOF(UI\Icon_Waypoint.paa)); + }; + }; +}; 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 83bb997eac..a7feade1c3 100644 --- a/addons/fastroping/XEH_preInit.sqf +++ b/addons/fastroping/XEH_preInit.sqf @@ -2,21 +2,6 @@ ADDON = false; -PREP(canCutRopes); -PREP(canDeployRopes); -PREP(canFastRope); -PREP(canPrepareFRIES); -PREP(checkVehicleThread); -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/fastroping/XEH_preStart.sqf b/addons/fastroping/XEH_preStart.sqf new file mode 100644 index 0000000000..022888575e --- /dev/null +++ b/addons/fastroping/XEH_preStart.sqf @@ -0,0 +1,3 @@ +#include "script_component.hpp" + +#include "XEH_PREP.hpp" diff --git a/addons/fastroping/config.cpp b/addons/fastroping/config.cpp index 25ec1876fa..a74abeb3b8 100644 --- a/addons/fastroping/config.cpp +++ b/addons/fastroping/config.cpp @@ -15,3 +15,4 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgMoves.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/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_canPrepareFRIES.sqf b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf index ef33a4c7ff..67e2165c3f 100644 --- a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf @@ -19,7 +19,6 @@ params ["_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_cutRopes.sqf b/addons/fastroping/functions/fnc_cutRopes.sqf index 88b02a70af..dcabda56ba 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 EFUNC(common,waitAndExecute); } count _deployedRopes; _vehicle setVariable [QGVAR(deployedRopes), [], true]; diff --git a/addons/fastroping/functions/fnc_deployAI.sqf b/addons/fastroping/functions/fnc_deployAI.sqf new file mode 100644 index 0000000000..dd4bfe4e71 --- /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 EFUNC(common,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 EFUNC(common,waitUntilAndExecute); + }, [_vehicle, _unitsToDeploy], 1] call EFUNC(common,waitAndExecute); + } else { + [{ + private _deployedRopes = _this getVariable [QGVAR(deployedRopes), []]; + ({_x select 5} count (_deployedRopes)) == 0 + }, { + [_this] call FUNC(cutRopes); + driver _this enableAI "MOVE"; + }, _vehicle] call EFUNC(common,waitUntilAndExecute); + }; +}; + +[FUNC(deployAIRecursive), [_vehicle, _unitsToDeploy], _deployTime + 4] call EFUNC(common,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_fastRope.sqf b/addons/fastroping/functions/fnc_fastRope.sqf index 9d91697d22..bf2730efc7 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; }; diff --git a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf index 44f9fedd1a..ed78d43592 100644 --- a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf +++ b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf @@ -25,7 +25,7 @@ private ["_vectorUp", "_vectorDir", "_origin"]; if (vehicle _unit != _unit) exitWith {}; //Start fast roping -if (animationState _unit != "ACE_FastRoping") exitWith { +if (getMass _dummy != 80) exitWith { //Fix for twitchyness _dummy setMass 80; _dummy setCenterOfMass [0, 0, -2]; @@ -38,7 +38,9 @@ if (animationState _unit != "ACE_FastRoping") exitWith { }; //Check if rope broke and unit is falling -if (isNull attachedTo _unit) exitWith { +//Make sure this isn't executed before the unit is actually fastroping +//Note: Stretching ropes does not change ropeLength +if ((isNull attachedTo _unit) && {ropeLength _ropeTop > 0.5}) exitWith { [_pfhHandle] call CBA_fnc_removePerFrameHandler; }; diff --git a/addons/fastroping/functions/fnc_onCutCommon.sqf b/addons/fastroping/functions/fnc_onCutCommon.sqf index 7bfb95b68b..404f94e9d8 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]; + _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 EFUNC(common,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..5e8bf931bb 100644 --- a/addons/fastroping/functions/fnc_onPrepareCommon.sqf +++ b/addons/fastroping/functions/fnc_onPrepareCommon.sqf @@ -22,9 +22,14 @@ _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 { [{ 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 5394cf9b63..1a03e59409 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -7,6 +7,7 @@ Wyposaż FRIES Equiper le FRIES Equipar FRIES + Equipaggia la FRIES Equips compatible helicopters with a Fast Rope Insertion Extraction System. @@ -14,6 +15,7 @@ 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 Prepare fast roping system @@ -21,6 +23,7 @@ Przygotuj system zjazdu na linach Préparer le système de corde lisse Preparar el sistema fast roping + Prepara le corde Deploy ropes @@ -28,6 +31,7 @@ Wypuść liny Déployer les cordes Desplegar cuerdas + Srotola le corde Fast rope @@ -35,6 +39,7 @@ Zjedź na linie Descendre à la corde Descender por la cuerda + Scendi sulla corda Cut ropes @@ -42,6 +47,7 @@ Odetnij liny Détacher les cordes Cortar cuerdas + Taglia le corde Equip helicopter with FRIES @@ -49,6 +55,7 @@ Wyposaż helikopter w FRIES Equiper l'hélicoptère avec le FRIED Equipar helicoptero con FRIES + Equipaggia l'elicottero con FRIES Equips the selected helicopter with a Fast Rope Insertion Extraction System @@ -56,6 +63,12 @@ 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 + + + LET UNITS FAST ROPE + EINHEITEN ABSEILEN LASSEN + SCENDI DALLE CORDE - + \ No newline at end of file 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/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/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/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/CfgVehicles.hpp b/addons/gestures/CfgVehicles.hpp index d3c7b5ca21..8294f43759 100644 --- a/addons/gestures/CfgVehicles.hpp +++ b/addons/gestures/CfgVehicles.hpp @@ -12,131 +12,104 @@ class CfgVehicles { icon = PATHTOF(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/gestures/README.md b/addons/gestures/README.md new file mode 100644 index 0000000000..e224ff6d69 --- /dev/null +++ b/addons/gestures/README.md @@ -0,0 +1,11 @@ +ace_gestures +======== + +Gestures system in interaction menu and keybinds. + + +## Maintainers + +The people responsible for merging changes to this component or answering potential questions. + +- [jokoho48](https://github.com/jokoho48) diff --git a/addons/gestures/XEH_postInit.sqf b/addons/gestures/XEH_postInit.sqf index 3b4a92164e..6d9e057e29 100644 --- a/addons/gestures/XEH_postInit.sqf +++ b/addons/gestures/XEH_postInit.sqf @@ -5,4 +5,45 @@ if (!hasInterface) exitWith {}; // reload mutex, you can't play signal while reloading GVAR(ReloadMutex) = true; -#include "key.sqf" +// 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..50a835abe6 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"}; @@ -134,13 +134,13 @@ class CfgGesturesMale { file = QUOTE(PATHTOF(anim\ace_forward_stand_lowered.rtm)); }; - class GVAR(stop): GVAR(forward) { - file = QUOTE(PATHTOF(anim\ace_stop.rtm)); + class GVAR(freeze): GVAR(forward) { + file = QUOTE(PATHTOF(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 = QUOTE(PATHTOF(anim\ace_freeze_stand_lowered.rtm)); }; class GVAR(cover): GVAR(forward) { diff --git a/addons/gestures/config.cpp b/addons/gestures/config.cpp index 39cb8f0951..ce60d26545 100644 --- a/addons/gestures/config.cpp +++ b/addons/gestures/config.cpp @@ -7,7 +7,7 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interact_menu"}; author[] = {"joko // Jonas", "Emperias", "Zigomarvin"}; - authorUrl = "https://github.com/commy2/"; + authorUrl = "https://github.com/jokoho48"; VERSION_CONFIG; }; }; 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 1f008ddae9..56b77e97e9 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,31 +186,7 @@ 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 @@ -239,7 +195,7 @@ Mostrar gestos en el menú de interacción Afficher les gestes au menu d'interaction. - + 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ě @@ -248,7 +204,7 @@ Muestror los gestos en el menú de interacción propia, utilizar solo combinación de teclas o desactivarlos completamente Afficher les gestes dans le menu d'interaction personnel, ou seulement utiliser les touches, ou desactiver complètement. - + Just Keybinds Nur Schnelltasten Pouze klávesové zkratky @@ -257,7 +213,7 @@ Solo mediante teclas Seulement les touches - + Keybinds + Interaction Menu Schnelltasten+ Interaktionsmenü Klávesové zkratky + interakční menu 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/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..dc6f11ee39 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 (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..ee57af2f86 --- /dev/null +++ b/addons/gforces/stringtable.xml @@ -0,0 +1,15 @@ + + + + + Gforces Effects + Gforces Effekte + Efectos Gforces + + + Only Aircraft + Nur Luftfahrzeug + Sólo Aeronave + + + \ No newline at end of file diff --git a/addons/goggles/functions/fnc_clearGlasses.sqf b/addons/goggles/functions/fnc_clearGlasses.sqf index d0b14e4f90..e7d5584938 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"; }; 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/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/hearing/CfgSounds.hpp b/addons/hearing/CfgSounds.hpp index 7afdae88cb..0a1bc82ed1 100644 --- a/addons/hearing/CfgSounds.hpp +++ b/addons/hearing/CfgSounds.hpp @@ -27,8 +27,8 @@ class CfgSounds { sound[] = {QUOTE(PATHTOF(sounds\deafness_noring.ogg)),3,1}; titles[] = {}; }; - class ACE_Ring_Backblast { - sound[] = {QUOTE(PATHTOF(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/stringtable.xml b/addons/hearing/stringtable.xml index 1777c08e4f..e92229cdd4 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -115,6 +115,7 @@ Desactiva el efecto de zumbido cuando el jugador recibe daño auditivo. Usuń szum w uszach przy chwilowej utracie słuchu. 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 Hearing @@ -208,4 +209,4 @@ 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/huntir/CfgAmmo.hpp b/addons/huntir/CfgAmmo.hpp index fac4d6fe60..86f73e9755 100644 --- a/addons/huntir/CfgAmmo.hpp +++ b/addons/huntir/CfgAmmo.hpp @@ -33,13 +33,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/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/XEH_preInit.sqf b/addons/interact_menu/XEH_preInit.sqf index ac3ee9b0f5..fae8843a4e 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 { @@ -42,6 +45,13 @@ GVAR(expanded) = false; GVAR(startHoverTime) = ACE_diagTime; GVAR(expandedTime) = ACE_diagTime; + +// reset on mission load +addMissionEventHandler ["Loaded", { + GVAR(startHoverTime) = 0; + GVAR(expandedTime) = 0; +}]; + GVAR(iconCtrls) = []; GVAR(iconCount) = 0; 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_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_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 1d42f38c6c..c99688564a 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -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) diff --git a/addons/interaction/ACE_Settings.hpp b/addons/interaction/ACE_Settings.hpp index a4e6dad42c..1cb8b747ef 100644 --- a/addons/interaction/ACE_Settings.hpp +++ b/addons/interaction/ACE_Settings.hpp @@ -1,6 +1,8 @@ class ACE_Settings { class GVAR(EnableTeamManagement) { + displayName = CSTRING(EnableTeamManagement_DisplayName); + description = CSTRING(EnableTeamManagement_Description); value = 1; typeName = "BOOL"; }; 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_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_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 b847a66aa6..0e1afa21a1 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -711,6 +711,7 @@ Włącz Encender Allumer + Accendi Turn off @@ -718,6 +719,7 @@ Wyłącz Apagar Eteindre + Spegni Pass magazine @@ -775,4 +777,4 @@ 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/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/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index f561806eaa..67e337291b 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -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 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/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/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/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/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/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/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/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..661108c53a --- /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..7b15f0c8f0 100644 --- a/addons/main/config.cpp +++ b/addons/main/config.cpp @@ -586,5 +586,6 @@ class CfgMods { }; }; +#include "CfgSettings.hpp" #include "CfgModuleCategories.hpp" #include "CfgVehicleClasses.hpp" diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 0c6ec9acb4..1f86448c94 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -5,7 +5,7 @@ #define MAJOR 3 #define MINOR 5 -#define PATCHLVL 0 +#define PATCHLVL 1 #define BUILD 0 #define VERSION MAJOR.MINOR.PATCHLVL.BUILD @@ -13,3 +13,4 @@ // MINIMAL required version for the Mod. Components can specify others.. #define REQUIRED_VERSION 1.56 +#define REQUIRED_CBA_VERSION {2,3,1} 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/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/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_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 429cb995a1..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,7 +297,6 @@ class ACE_Settings { values[] = {CSTRING(useSelection), CSTRING(useRadial), "Disabled"}; isClientSettable = 1; }; - class GVAR(delayUnconCaptive) { category = CSTRING(Category_Medical); displayName = CSTRING(MedicalSettings_delayUnconCaptive_DisplayName); diff --git a/addons/medical/CfgVehicles.hpp b/addons/medical/CfgVehicles.hpp index a4fef30466..86ad45296b 100644 --- a/addons/medical/CfgVehicles.hpp +++ b/addons/medical/CfgVehicles.hpp @@ -663,7 +663,7 @@ class CfgVehicles { 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; 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_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 7b2c195f10..bf4a679bdc 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -27,11 +27,10 @@ _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]; 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/stringtable.xml b/addons/medical/stringtable.xml index 7091de6b6e..a3953be23b 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -55,6 +55,7 @@ Inyectar Adenosina Wstrzyknij adenozynę Injecter de l'adénosine + Inietta andenosina Inject Atropine @@ -254,6 +255,7 @@ Inyectando Adenosina... Wstrzykiwanie adenozyny... Injection d'adénosine... + Inietto l'andenosina Injecting Atropine... @@ -969,6 +971,7 @@ Asenosina auto-inyectable Autostrzykawka z adenozyną Auto-injécteur d'adénosine + Autoiniettore di adenosina Used to counter effects of Epinephrine @@ -976,6 +979,7 @@ 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 A drug used to counter the effects of Epinephrine @@ -983,6 +987,7 @@ 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 Atropine autoinjector @@ -3199,6 +3204,7 @@ Podstawowe ustawienia medyczne Ajustes médicos básicos [ACE] Réglages du système médical basic [ACE] + Impostazioni Mediche Di Base [ACE] Advanced Medical Settings [ACE] @@ -3314,6 +3320,7 @@ Permitir Epinefrina Ograniczenia adrenaliny Autoriser l'adrénaline + Permette epinefrina Who can use Epinephrine for full heal? (Basic medical only) @@ -3321,6 +3328,7 @@ 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) Allow PAK @@ -3412,6 +3420,7 @@ Ubicaciones epinefrina Ograniczenia adrenaliny Position des adrénalines + Ubicazione epinefrina Where can the Epinephrine be used? (Basic Medical) @@ -3419,6 +3428,7 @@ 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) Locations PAK @@ -3664,6 +3674,7 @@ 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 Configure the treatment settings from ACE Advanced Medical @@ -4125,12 +4136,14 @@ 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. + Ritarda il cessate il fuoco dell'IA quando il giocatore è svenuto per motivi medici. 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 - + \ No newline at end of file diff --git a/addons/microdagr/ACE_Settings.hpp b/addons/microdagr/ACE_Settings.hpp index db175e7303..637584178c 100644 --- a/addons/microdagr/ACE_Settings.hpp +++ b/addons/microdagr/ACE_Settings.hpp @@ -1,7 +1,10 @@ class ACE_Settings { 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/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/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/functions/fnc_handlePlayerVehicleChanged.sqf b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf index 02049289aa..2d921973d4 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 EFUNC(common,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]; }; 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 5daa29a0f6..f545bc8a35 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -150,6 +150,7 @@ Usar manejo de munición. Aktywuj obsługę amunicji Utiliser la gestion des munitions + Utilizza la gestione delle munizioni Removes mortar magazines, requiring individual rounds to be loaded by the gunner or loader. Does not affect AI mortars. @@ -157,6 +158,7 @@ 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. Remove Round @@ -164,6 +166,7 @@ Extraer ronda Wyładuj pocisk Enlever l'obus + Togli proiettile Load Mortar @@ -171,6 +174,7 @@ Cargar mortero Załaduj moździerz Charger le mortier + Carica mortaio Unloading Round @@ -178,6 +182,7 @@ Descargando ronda Rozładowywanie moździerza Déchargement de l'obus + Scarica proiettile Preparing Round @@ -185,6 +190,7 @@ Preparando ronda Przygotowywanie pocisku Praparation de l'obus + Prepara il proiettile Load HE @@ -192,6 +198,7 @@ Cargar HE Załaduj pocisk wybuchowy Charger HE + Carica proiettile esplosivo ad alto potenziale (HE) Load Smoke @@ -199,6 +206,7 @@ Cargar Humo Załaduj pocisk dymny Charger Fumigène + Carica fumogeno Load Illumination @@ -206,6 +214,7 @@ Cargar Iluminación Załaduj pocisk oświetlający Charger Eclairante + Carica illuminante Load Guided HE @@ -213,6 +222,7 @@ Cagar HE Guiada Załaduj kierowany pocisk wybuchowy Charger HE guidé + Carica HE guidata Load Laser Guided HE @@ -220,6 +230,7 @@ Cargar HE Guiada por Laser Załaduj laserowo napr. pocisk wybuchowy Charger HE guidé au laser + Carica HE a guida laser 82mm HE Round @@ -227,6 +238,7 @@ Ronda 82mm HE Pocisk wybuchowy kal. 82mm Obus de 82mm HE + Proiettile da 82mm HE 82mm Smoke Round @@ -234,6 +246,7 @@ Ronda 82mm Humo Pocisk dymny kal. 82mm Obus de 82mm fumigène + Proiettile Fumogeno da 82mm 82mm Illumination Round @@ -241,6 +254,7 @@ Ronda 82mm Iluminación Pocisk oświetlający kal. 82mm Obus de 82mm éclairant + Proiettile illuminante da 82mm 82mm Guided HE Round @@ -248,6 +262,7 @@ Ronda 82mm Guiada Kierowany pocisk wybuchowy kal. 82mm Obus de 82mm HE guidé + Proiettile HE guidato 82mm Laser Guided HE Round @@ -255,6 +270,7 @@ Ronda 82mm Guiada por Laser Laserowo napr. pocisk wybuchowy kal. 82mm Obus de 82mm HE guidé au laser + Proiettile HE a guida laser Used in Mk6 mortar @@ -262,6 +278,7 @@ Usada en el mortero Mk6 Używany w moździerzu Mk6 Utilisé dans le mortier Mk6 + Usato nel mortaio Mk6 [ACE] 82mm HE Rounds Box @@ -269,6 +286,7 @@ [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] 82mm Smoke Rounds Box @@ -276,6 +294,7 @@ [ACE] Caja de municiones 82mm Humo [ACE] Skrzynka amunicji dymnej 82mm [ACE] Obus de 82mm fumigène + [ACE] Scatola fumogeni da 82mm [ACE] 82mm Illumination Rounds Box @@ -283,6 +302,7 @@ [ACE] Caja de municiones 82mm Iluminacion [ACE] Skrzynka amunicji oświetlającej 82mm [ACE] Obus de 82mm éclairants + [ACE] Scatola illuminanti da 82mm [ACE] 82mm Default Loadout Box @@ -290,6 +310,7 @@ [ACE] Caja de municiones 82mm por defecto [ACE] Skrzynka amunicji standardowej 82mm [ACE] Obus de 82mm par défaut + [ACE] Scatola proiettili 82mm standard \ No newline at end of file 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/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/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index c564e6e90f..95c3f5228b 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -36,7 +36,7 @@ _fnc_parameters = { _icon = format [QUOTE(PATHTOF(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/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/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/overheating/functions/fnc_jamWeapon.sqf b/addons/overheating/functions/fnc_jamWeapon.sqf index 38184808d2..b6cacdbea3 100644 --- a/addons/overheating/functions/fnc_jamWeapon.sqf +++ b/addons/overheating/functions/fnc_jamWeapon.sqf @@ -43,6 +43,9 @@ if (_ammo > 0) then { // 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/stringtable.xml b/addons/overheating/stringtable.xml index 23a1b0253a..3269d9cf7e 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -79,6 +79,7 @@ Desencasquillar el arma al recargar. Usuń zacięcie przy przeładowaniu Des-enrayer l'arme au rechargement. + Disinceppa l'arma quando si ricarica Reloading clears a weapon jam. @@ -86,6 +87,7 @@ Recargar el arma la desencasquilla. Przeładowywanie usuwa zacięcie Recharger vide la chambre de l'arme + L'arma si disinceppa quando si ricarica Chance of unjam failing @@ -93,6 +95,7 @@ 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 Probability that an unjam action might fail, requiring to be repeated. @@ -100,6 +103,7 @@ 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. Spare barrel @@ -167,6 +171,7 @@ Falló el desencasquillado Porażka przy usuwaniu zacięcia Toujours enrayé ! + Non si è disinceppata! Swap barrel @@ -253,4 +258,4 @@ Температура - + \ 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..4ecbbe1b89 100644 --- a/addons/realisticnames/CfgVehicles.hpp +++ b/addons/realisticnames/CfgVehicles.hpp @@ -642,6 +642,6 @@ class CfgVehicles { class Item_Base_F; class Item_acc_flashlight: Item_Base_F { - displayName="UTG Defender 126"; - }; + displayName="UTG Defender 126"; + }; }; 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/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/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/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_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_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..6e3bdbe774 100644 --- a/addons/refuel/functions/fnc_reset.sqf +++ b/addons/refuel/functions/fnc_reset.sqf @@ -17,11 +17,8 @@ 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); -}; +["setVanillaHitPointDamage", _target, [_target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]] ] ] call EFUNC(common,objectEvent); + _target setVariable [QGVAR(engineHit), nil, true]; _target setVariable [QGVAR(isConnected), false, true]; @@ -38,11 +35,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..bd4da5569b 100644 --- a/addons/refuel/functions/fnc_returnNozzle.sqf +++ b/addons/refuel/functions/fnc_returnNozzle.sqf @@ -48,11 +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]]; - }; + ["setVanillaHitPointDamage", _target, [_target, ["HitEngine", _target getVariable [QGVAR(engineHit), 0]] ] ] call EFUNC(common,objectEvent); _target setVariable [QGVAR(engineHit), nil, true]; }, "", diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 3bccce15e2..3d557f9a2e 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -27,11 +27,7 @@ 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]; - }; + ["setVanillaHitPointDamage", _target, [_target, ["HitEngine", 1]] ] call EFUNC(common,objectEvent); _target setVariable [QGVAR(isConnected), true, true]; _endPosOffset = getArray (configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(hooks)); 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/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_Settings.hpp b/addons/repair/ACE_Settings.hpp index c3c8daad16..9ee40529e7 100644 --- a/addons/repair/ACE_Settings.hpp +++ b/addons/repair/ACE_Settings.hpp @@ -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/CfgEventHandlers.hpp b/addons/repair/CfgEventHandlers.hpp index ffd75a38bc..06647d8dd5 100644 --- a/addons/repair/CfgEventHandlers.hpp +++ b/addons/repair/CfgEventHandlers.hpp @@ -35,7 +35,7 @@ class Extended_InitPost_EventHandlers { 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 { diff --git a/addons/repair/CfgVehicles.hpp b/addons/repair/CfgVehicles.hpp index 0d1e3f3f92..0a1d6f55dc 100644 --- a/addons/repair/CfgVehicles.hpp +++ b/addons/repair/CfgVehicles.hpp @@ -347,7 +347,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; @@ -362,12 +362,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; @@ -377,12 +377,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; @@ -390,7 +390,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; @@ -421,9 +421,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/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_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/stringtable.xml b/addons/repair/stringtable.xml index fb505f4f4e..ee79a1d427 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -1316,5 +1316,10 @@ 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 + diff --git a/addons/respawn/ACE_Settings.hpp b/addons/respawn/ACE_Settings.hpp index f704d25412..86083d6d07 100644 --- a/addons/respawn/ACE_Settings.hpp +++ b/addons/respawn/ACE_Settings.hpp @@ -1,10 +1,14 @@ class ACE_Settings { class GVAR(SavePreDeathGear) { + displayName = CSTRING(SavePreDeathGear_DisplayName); + description = CSTRING(SavePreDeathGear_Description); value = 0; typeName = "BOOL"; }; class GVAR(RemoveDeadBodiesDisconnected) { + displayName = CSTRING(RemoveDeadBodiesDisconnected_DisplayName); + description = CSTRING(RemoveDeadBodiesDisconnected_Description); value = 1; typeName = "BOOL"; }; 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/CfgVehicles.hpp b/addons/sandbag/CfgVehicles.hpp index 99f0fa6125..64d62ad424 100644 --- a/addons/sandbag/CfgVehicles.hpp +++ b/addons/sandbag/CfgVehicles.hpp @@ -52,7 +52,7 @@ class CfgVehicles { author = ECSTRING(common,ACETeam); scope = 2; - side = -1; + side = 3; model = PATHTOF(data\ace_sandbag_build.p3d); displayName = CSTRING(sandbag_displayName); vehicleClass = "ACE_Logistics_Items"; diff --git a/addons/sandbag/XEH_missionDisplayLoad.sqf b/addons/sandbag/XEH_missionDisplayLoad.sqf index 289d2f067a..cb85ffb9fb 100644 --- a/addons/sandbag/XEH_missionDisplayLoad.sqf +++ b/addons/sandbag/XEH_missionDisplayLoad.sqf @@ -3,3 +3,4 @@ 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/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..c560bc15ba 100644 --- a/addons/sandbag/functions/fnc_deployConfirm.sqf +++ b/addons/sandbag/functions/fnc_deployConfirm.sqf @@ -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/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/sitting/CfgVehicles.hpp b/addons/sitting/CfgVehicles.hpp index 779022dd9a..d92d92fc49 100644 --- a/addons/sitting/CfgVehicles.hpp +++ b/addons/sitting/CfgVehicles.hpp @@ -48,9 +48,9 @@ class CfgVehicles { 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 @@ -61,9 +61,9 @@ class CfgVehicles { 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; }; @@ -76,9 +76,9 @@ class CfgVehicles { 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) @@ -89,9 +89,9 @@ class CfgVehicles { 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 @@ -102,9 +102,9 @@ class CfgVehicles { 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 @@ -115,9 +115,9 @@ class CfgVehicles { 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/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/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/spottingscope/CfgVehicles.hpp b/addons/spottingscope/CfgVehicles.hpp index 6905d6a8ad..418eea5a15 100644 --- a/addons/spottingscope/CfgVehicles.hpp +++ b/addons/spottingscope/CfgVehicles.hpp @@ -112,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 { 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..fe15e63e87 100644 --- a/addons/switchunits/ACE_Settings.hpp +++ b/addons/switchunits/ACE_Settings.hpp @@ -4,26 +4,38 @@ class ACE_Settings { typeName = "BOOL"; }; class GVAR(SwitchToWest) { + displayName = CSTRING(SwitchToWest_DisplayName); + description = CSTRING(SwitchToWest_Description); value = 0; typeName = "BOOL"; }; class GVAR(SwitchToEast) { + displayName = CSTRING(SwitchToEast_DisplayName); + description = CSTRING(SwitchToEast_Description); value = 0; typeName = "BOOL"; }; class GVAR(SwitchToIndependent) { + displayName = CSTRING(SwitchToIndependent_DisplayName); + description = CSTRING(SwitchToIndependent_Description); value = 0; typeName = "BOOL"; }; class GVAR(SwitchToCivilian) { + displayName = CSTRING(SwitchToCivilian_DisplayName); + description = CSTRING(SwitchToCivilian_Description); value = 0; typeName = "BOOL"; }; class GVAR(EnableSafeZone) { + displayName = CSTRING(EnableSafeZone_DisplayName); + description = CSTRING(EnableSafeZone_Description); value = 1; typeName = "BOOL"; }; class GVAR(SafeZoneRadius) { + displayName = CSTRING(SafeZoneRadius_DisplayName); + description = CSTRING(SafeZoneRadius_Description); value = 100; typeName = "SCALAR"; }; diff --git a/addons/tacticalladder/XEH_missionDisplayLoad.sqf b/addons/tacticalladder/XEH_missionDisplayLoad.sqf index 289d2f067a..05419598b9 100644 --- a/addons/tacticalladder/XEH_missionDisplayLoad.sqf +++ b/addons/tacticalladder/XEH_missionDisplayLoad.sqf @@ -3,3 +3,4 @@ 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/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..27ea683b5a 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -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 1e2c037f20..7a60933ceb 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -57,6 +57,7 @@ +Ctrl naklonit +Ctrl inclinar +Ctrl incliner + +Ctrl per inclinare Position ladder @@ -83,4 +84,4 @@ Pegar escada - + \ No newline at end of file diff --git a/addons/tagging/CfgVehicles.hpp b/addons/tagging/CfgVehicles.hpp index 602ee41d33..4425b646ad 100644 --- a/addons/tagging/CfgVehicles.hpp +++ b/addons/tagging/CfgVehicles.hpp @@ -3,58 +3,32 @@ 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)); }; - 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)); + statement = QUOTE([ARR_2(ACE_player,'red' call FUNC(getTexture))] call FUNC(tag)); icon = QUOTE(PATHTOF(UI\icons\iconTaggingRed.paa)); }; - class ACE_tagWallGreen: ACE_tagWallBlack { - displayName = CSTRING(tagWallGreen); + 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)); + statement = QUOTE([ARR_2(ACE_player,'green' call FUNC(getTexture))] call FUNC(tag)); icon = QUOTE(PATHTOF(UI\icons\iconTaggingGreen.paa)); }; - class ACE_tagWallBlue: ACE_tagWallBlack { - displayName = CSTRING(tagWallBlue); + 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)); + statement = QUOTE([ARR_2(ACE_player,'blue' call FUNC(getTexture))] call FUNC(tag)); icon = QUOTE(PATHTOF(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/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/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..43e951629e 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 EFUNC(common,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..0e3bb8075d 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 { 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 bb94aae3ff..4836d2f209 100644 --- a/addons/tagging/script_component.hpp +++ b/addons/tagging/script_component.hpp @@ -15,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 392de0d24f..1849206963 100644 --- a/addons/tagging/stringtable.xml +++ b/addons/tagging/stringtable.xml @@ -1,96 +1,77 @@  - + Tag black Schwarz markieren Marcar en negro Oznakuj na czarno Tag noir + Marca nero - + Tag red Rot markieren Marcar en rojo Oznakuj na czerwono Tag rouge + Marca rosso - + Tag green Grün markieren Marcar en verde Oznakuj na zielono Tag vert + Marca verde - + Tag blue Blau markieren Marcar en azul Oznakuj na niebiesko Tag bleu + Marca blu - - Tag ground black - Boden schwarz markieren - Oznakuj ziemię na czarno - Marcar suelo en negro - Tag fond noir - - - Tag ground red - Boden rot markieren - Oznakuj ziemię na czerwono - Marcar suelo en rojo - Tag fond rouge - - - Tag ground green - Boden grün markieren - Oznakuj ziemię na zielono - Marcar suelo en verde - Tag fond vert - - - Tag ground blue - Boden blau markieren - Oznakuj ziemię na niebiesko - Marcar suelo en azul - Tag font bleu - - + Black spray paint Schwarze Sprühfarbe Pintura negra Czarna farba w sprayu Peinture pulvérisée noire + Bomboletta spray nera - + Red spray paint Rote Sprühfarbe Pintura roja Czerwona farba w sprayu Peinture pulvérisée rouge + Bomboletta spray rossa - + Green spray paint Grüne Sprühfarbe Pintura verde Zielona farba w sprayu Peinture pulvérisée verte + Bomboletta spray verde - + Blue spray paint Blaue Sprühfarbe Pintura azul Niebieska farba w sprayu Peinture pulvérisée bleue + Bomboletta spray blu - + 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. diff --git a/addons/trenches/XEH_missionDisplayLoad.sqf b/addons/trenches/XEH_missionDisplayLoad.sqf index 289d2f067a..2c4951ec7a 100644 --- a/addons/trenches/XEH_missionDisplayLoad.sqf +++ b/addons/trenches/XEH_missionDisplayLoad.sqf @@ -3,3 +3,4 @@ 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/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..47f80014f8 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]; diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf index 21c4d92bb9..48a768427f 100644 --- a/addons/trenches/functions/fnc_placeTrench.sqf +++ b/addons/trenches/functions/fnc_placeTrench.sqf @@ -95,10 +95,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/stringtable.xml b/addons/trenches/stringtable.xml index 4fef526858..617a604457 100644 --- a/addons/trenches/stringtable.xml +++ b/addons/trenches/stringtable.xml @@ -82,12 +82,16 @@ Annuler la creusée - +Ctrl rotate - +Strg drehen - +Ctrl obrót - +Ctrl ruota - +Ctrl rotar - +Ctrl rotation + Rotate + Drehen + Girar + Tourner + Rotazione + Otočit + Forgatás + Obrót + Rotaciona + Bращать Digging Trench diff --git a/addons/tripod/CfgVehicles.hpp b/addons/tripod/CfgVehicles.hpp index 6b9d11fe0f..418b32e550 100644 --- a/addons/tripod/CfgVehicles.hpp +++ b/addons/tripod/CfgVehicles.hpp @@ -42,7 +42,7 @@ class CfgVehicles { }; 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); diff --git a/addons/tripod/CfgWeapons.hpp b/addons/tripod/CfgWeapons.hpp index 5ae0ee84d2..adc14912c2 100644 --- a/addons/tripod/CfgWeapons.hpp +++ b/addons/tripod/CfgWeapons.hpp @@ -2,16 +2,16 @@ 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 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 { mass = 40; }; - }; + }; }; diff --git a/addons/vector/CfgWeapons.hpp b/addons/vector/CfgWeapons.hpp index 019d774da8..a28321bdc8 100644 --- a/addons/vector/CfgWeapons.hpp +++ b/addons/vector/CfgWeapons.hpp @@ -13,4 +13,9 @@ class CfgWeapons { 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..e4cdf9a55b 100644 --- a/addons/vector/config.cpp +++ b/addons/vector/config.cpp @@ -3,7 +3,7 @@ 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"}; diff --git a/addons/vector/functions/fnc_onKeyHold.sqf b/addons/vector/functions/fnc_onKeyHold.sqf index ff4e5fc6ad..517cf3ea37 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) = ""; 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..fabc8b94ad 100644 --- a/addons/vehiclelock/ACE_Settings.hpp +++ b/addons/vehiclelock/ACE_Settings.hpp @@ -1,14 +1,20 @@ class ACE_Settings { class GVAR(DefaultLockpickStrength) { + displayName = CSTRING(DefaultLockpickStrength_DisplayName); + description = CSTRING(DefaultLockpickStrength_Description); value = 10; typeName = "SCALAR"; }; class GVAR(LockVehicleInventory) { + displayName = CSTRING(LockVehicleInventory_DisplayName); + description = CSTRING(LockVehicleInventory_Description); value = 0; typeName = "BOOL"; - }; + }; 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/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/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/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/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/stringtable.xml b/addons/weather/stringtable.xml index f2e9027e68..0b0ed8fd17 100644 --- a/addons/weather/stringtable.xml +++ b/addons/weather/stringtable.xml @@ -1,4 +1,4 @@ - + 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/zeus/ACE_Settings.hpp b/addons/zeus/ACE_Settings.hpp index 6488a23e4e..6357992cf6 100644 --- a/addons/zeus/ACE_Settings.hpp +++ b/addons/zeus/ACE_Settings.hpp @@ -1,21 +1,31 @@ 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)}; diff --git a/addons/zeus/config.cpp b/addons/zeus/config.cpp index 853edaf2e9..f41769e727 100644 --- a/addons/zeus/config.cpp +++ b/addons/zeus/config.cpp @@ -36,7 +36,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..085fff09d1 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -13,12 +13,13 @@ #include "script_component.hpp" -if (!isServer) exitWith {}; - params ["_object"]; 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 EFUNC(common,execNextFrame); diff --git a/docs/README_DE.md b/docs/README_DE.md index 0f9ca83536..95a7b3c406 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -4,7 +4,7 @@

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

- ACE3 Wersja + ACE3 Wersja ACE3 Zagadnienia diff --git a/mod.cpp b/mod.cpp index b146f500b0..a0ee3b211e 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.5.0"; +name = "Advanced Combat Environment 3.5.1"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.5.0"; +description = "ACE3 - Version 3.5.1"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3"; 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..87d8673cd8 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; + 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 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..82873b01e2 100644 --- a/optionals/compat_rhs_afrf3/config.cpp +++ b/optionals/compat_rhs_afrf3/config.cpp @@ -6,12 +6,13 @@ 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[]={"Ruthberg", "GitHawk", "BaerMitUmlaut"}; 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/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/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..ef173ad1c6 100644 --- a/optionals/compat_rhs_usf3/config.cpp +++ b/optionals/compat_rhs_usf3/config.cpp @@ -6,12 +6,13 @@ 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[]={"Ruthberg", "GitHawk", "BaerMitUmlaut"}; 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/tools/config_style_checker.py b/tools/config_style_checker.py new file mode 100644 index 0000000000..65bd57a449 --- /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 = 0 + + 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.")