diff --git a/addons/aircraft/CfgEventHandlers.hpp b/addons/aircraft/CfgEventHandlers.hpp index 9426fa861e..93e3311cf2 100644 --- a/addons/aircraft/CfgEventHandlers.hpp +++ b/addons/aircraft/CfgEventHandlers.hpp @@ -9,9 +9,3 @@ class Extended_PreInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_preInit)); }; }; - -class Extended_PostInit_EventHandlers { - class ADDON { - clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient)); - }; -}; diff --git a/addons/aircraft/XEH_postInitClient.sqf b/addons/aircraft/XEH_postInitClient.sqf deleted file mode 100644 index e468602dbc..0000000000 --- a/addons/aircraft/XEH_postInitClient.sqf +++ /dev/null @@ -1,29 +0,0 @@ -#include "script_component.hpp" - -if (!hasInterface) exitWith {}; - -private _cfgAction = configFile >> "CfgActions" >> "Eject"; -GVAR(ejectActionParams) = [ - [ - "", // will be set with setUserActionText - { - params ["_vehicle", "_unit"]; - private _preserveEngineOn = (_unit == driver _vehicle) && {isEngineOn _vehicle}; - moveOut _unit; - if (_preserveEngineOn) then { - // vehicle is local to last driver, no need to care - _vehicle engineOn true; - }; - }, - nil, - getNumber (_cfgAction >> "priority"), - false, - true, - getText (_cfgAction >> "shortcut"), - '[_this, _target] call DFUNC(canShowEject)' - ], - getText (_cfgAction >> "text"), - getText (_cfgAction >> "textDefault") -]; - -["Helicopter", "initPost", LINKFUNC(initEjectAction)] call CBA_fnc_addClassEventHandler; diff --git a/addons/aircraft/XEH_preInit.sqf b/addons/aircraft/XEH_preInit.sqf index b47cf6628d..ef3f9f52bf 100644 --- a/addons/aircraft/XEH_preInit.sqf +++ b/addons/aircraft/XEH_preInit.sqf @@ -6,4 +6,41 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +if (hasInterface) then { + ["CBA_settingsInitialized", { + private _ejectAction = configFile >> "CfgActions" >> "Eject"; + private _hideEjectAction = missionNamespace getVariable [QEGVAR(vehicles,hideEjectAction), false]; + + private _text = getText (_ejectAction >> "text"); + if (_hideEjectAction) then { + _text = format ["%1", _text]; + }; + + GVAR(ejectActionParams) = [ + [ + "", // will be set with setUserActionText + { + params ["_vehicle", "_unit"]; + private _preserveEngineOn = (_unit == driver _vehicle) && {isEngineOn _vehicle}; + moveOut _unit; + if (_preserveEngineOn) then { + // vehicle is local to last driver, no need to care + _vehicle engineOn true; + }; + }, + nil, + [getNumber (_ejectAction >> "priority"), -999] select _hideEjectAction, + false, + true, + getText (_ejectAction >> "shortcut"), + '[_this, _target] call DFUNC(canShowEject)' + ], + _text, + getText (_ejectAction >> "textDefault") + ]; + + ["Helicopter", "InitPost", LINKFUNC(initEjectAction), nil, nil, true] call CBA_fnc_addClassEventHandler; + }] call CBA_fnc_addEventHandler; +}; + ADDON = true; diff --git a/addons/arsenal/functions/fnc_onSelChangedRight.sqf b/addons/arsenal/functions/fnc_onSelChangedRight.sqf index a2d83dceba..38e051b4e2 100644 --- a/addons/arsenal/functions/fnc_onSelChangedRight.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedRight.sqf @@ -42,6 +42,7 @@ private _fnc_selectItem = { case 19: { if (_item == "") then { + if (cba_disposable_replaceDisposableLauncher && !isNil {cba_disposable_LoadedLaunchers getVariable secondaryWeapon GVAR(center)}) exitWith { TRACE_1("ignoring unload of disposable",secondaryWeapon GVAR(center)); }; GVAR(center) removeSecondaryWeaponItem ((GVAR(currentItems) select 19) select _itemIndex); private _secondaryMags = secondaryWeaponMagazine GVAR(center); GVAR(currentItems) set [19, (secondaryWeaponItems GVAR(center)) + ([_secondaryMags + [""], _secondaryMags] select (count _secondaryMags > 1))]; @@ -70,7 +71,7 @@ private _fnc_selectItem = { [ _item, - 18 + ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find GVAR(currentLeftPanel)), + 18 + ([IDC_buttonPrimaryWeapon, IDC_buttonSecondaryWeapon, IDC_buttonHandgun] find GVAR(currentLeftPanel)), [IDC_buttonMuzzle, IDC_buttonItemAcc, IDC_buttonOptic, IDC_buttonBipod, IDC_buttonCurrentMag, IDC_buttonCurrentMag2] find GVAR(currentRightPanel) ] call _fnc_selectItem; diff --git a/addons/ballistics/CfgWeapons.hpp b/addons/ballistics/CfgWeapons.hpp index a4b3218a93..e81e6bbc85 100644 --- a/addons/ballistics/CfgWeapons.hpp +++ b/addons/ballistics/CfgWeapons.hpp @@ -28,8 +28,6 @@ class CfgWeapons { // MX class arifle_MX_Base_F: Rifle_Base_F { - magazineWell[] = {"CBA_65x39_MX", "CBA_65x39_MX_XL"}; - class Single: Mode_SemiAuto { dispersion = MOA_TO_RAD(0.90); }; diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf index f77a2755fd..0d944958d2 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunition.sqf @@ -87,7 +87,7 @@ if (_amountOfMagazines > 0) exitWith { playSound3D [_sound, objNull, false, (getPosASL _vehicle), 2, 1, 1300]; if (random 1 < 0.15) then { - [_vehicle, _ammo, _speed, random 1 < 0.15] call _spawnProjectile; + [_vehicle, _ammo, _speed, true] call _spawnProjectile; }; }; if (toLower _simType == "shotgrenade") then { diff --git a/addons/disposable/XEH_preStart.sqf b/addons/disposable/XEH_preStart.sqf index 022888575e..414ffaea97 100644 --- a/addons/disposable/XEH_preStart.sqf +++ b/addons/disposable/XEH_preStart.sqf @@ -1,3 +1,14 @@ #include "script_component.hpp" #include "XEH_PREP.hpp" + +// Show warning for launchers still using disposables +{ + private _nonInheritedCfg = configProperties [_x, "configName _x == 'ACE_UsedTube'", false]; + if ((count _nonInheritedCfg) == 1) then { + private _weapon = configName _x; + if (_weapon != "launch_NLAW_F") then { // ignore the one we modifiy ourselves + WARNING_1("[%1] ACE_disposables functionality will be removed in a future version - switch to CBA Disposables",_weapon); + }; + }; +} forEach ("isText (_x >> 'ACE_UsedTube')" configClasses (configFile >> "CfgWeapons")); diff --git a/addons/hellfire/CfgWeapons.hpp b/addons/hellfire/CfgWeapons.hpp index b040f67d1d..5806ab5fbe 100644 --- a/addons/hellfire/CfgWeapons.hpp +++ b/addons/hellfire/CfgWeapons.hpp @@ -6,7 +6,7 @@ class CfgWeapons { EGVAR(laser,canSelect) = 1; // can ace_laser lock (allows switching laser code) EGVAR(laser,showHud) = 1; // show attack profile / lock on hud magazines[] = {"6Rnd_ACE_Hellfire_AGM114K", "PylonMissile_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_1Rnd_ACE_Hellfire_AGM114K", "PylonRack_3Rnd_ACE_Hellfire_AGM114K", "PylonRack_4Rnd_ACE_Hellfire_AGM114K"}; - magazineWell[] = {QGVAR(K)}; + magazineWell[] += {QGVAR(K)}; autoFire = 0; canLock = 0; weaponLockSystem = 0; @@ -27,6 +27,6 @@ class CfgWeapons { class GVAR(launcher_N): GVAR(launcher) { displayName = "AGM-114N Hellfire II"; magazines[] = {"6Rnd_ACE_Hellfire_AGM114N", "PylonMissile_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_1Rnd_ACE_Hellfire_AGM114N", "PylonRack_3Rnd_ACE_Hellfire_AGM114N", "PylonRack_4Rnd_ACE_Hellfire_AGM114N"}; - magazineWell[] = {QGVAR(N)}; + magazineWell[] += {QGVAR(N)}; }; }; diff --git a/addons/logistics_wirecutter/script_component.hpp b/addons/logistics_wirecutter/script_component.hpp index 84dcabe258..69b2c5cdab 100644 --- a/addons/logistics_wirecutter/script_component.hpp +++ b/addons/logistics_wirecutter/script_component.hpp @@ -56,7 +56,19 @@ "dd_pletivo.p3d",\ "plot_green_draty.p3d",\ "plot_rust_draty.p3d",\ - "wall_fen1_5_2.p3d"\ + "wall_fen1_5_2.p3d",\ + "gm_fence_border_gssz_70_600.p3d",\ + "gm_fence_border_gssz_70_gate_350_r.p3d",\ + "gm_fence_border_gssz_70_gate_350_w.p3d",\ + "gm_fence_border_gz1_600.p3d",\ + "gm_fence_border_gz1_gate_350_r.p3d",\ + "gm_fence_border_gz1_gate_350_w.p3d",\ + "gm_fence_wirefence_01_01.p3d",\ + "gm_fence_wirefence_01_02.p3d",\ + "gm_fence_wirefence_01_03.p3d",\ + "gm_gc_g501_sm70_01.p3d",\ + "gm_gc_g501_sm70_02.p3d",\ + "gm_gc_g501_sm70_03.p3d"\ ] #define SOUND_CLIP_TIME_SPACING 1.5 diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 9960fcda08..c368490e8d 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -10,7 +10,7 @@ // MINIMAL required version for the Mod. Components can specify others.. #define REQUIRED_VERSION 1.88 -#define REQUIRED_CBA_VERSION {3,9,0} +#define REQUIRED_CBA_VERSION {3,11,1} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) diff --git a/addons/vehicles/CfgActions.hpp b/addons/vehicles/CfgActions.hpp new file mode 100644 index 0000000000..a15b9e9a18 --- /dev/null +++ b/addons/vehicles/CfgActions.hpp @@ -0,0 +1,7 @@ +class CfgActions { + class None; + class Eject: None { + show = QUOTE(call compile getText (configFile >> 'CfgActions' >> 'Eject' >> 'GVAR(setting)')); + GVAR(setting) = QUOTE(profileNamespace getVariable [ARR_2('GVAR(showEjectAction)',0)]); + }; +}; diff --git a/addons/vehicles/config.cpp b/addons/vehicles/config.cpp index 9b0d595fc8..9ec0d73aef 100644 --- a/addons/vehicles/config.cpp +++ b/addons/vehicles/config.cpp @@ -21,3 +21,4 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" +#include "CfgActions.hpp" diff --git a/addons/vehicles/initSettings.sqf b/addons/vehicles/initSettings.sqf index 026367a794..926a95ea4c 100644 --- a/addons/vehicles/initSettings.sqf +++ b/addons/vehicles/initSettings.sqf @@ -1,9 +1,21 @@ - [ QGVAR(keepEngineRunning), "CHECKBOX", [LSTRING(SettingKeepEngineRunningName), LSTRING(SettingKeepEngineRunningDesc)], - localize ELSTRING(common,ACEKeybindCategoryVehicles), + ELSTRING(common,ACEKeybindCategoryVehicles), false, // default value true // isGlobal -] call CBA_settings_fnc_init; +] call CBA_fnc_addSetting; + +[ + QGVAR(hideEjectAction), + "CHECKBOX", + [LSTRING(HideEjectAction), LSTRING(HideEjectActionTooltip)], + ELSTRING(common,ACEKeybindCategoryVehicles), + true, + 2, { + profileNamespace setVariable [QGVAR(showEjectAction), parseNumber !_this]; + saveProfileNamespace; + }, + true // needs restart +] call CBA_fnc_addSetting; diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml index 271c788ad3..7b6e5d8e57 100644 --- a/addons/vehicles/stringtable.xml +++ b/addons/vehicles/stringtable.xml @@ -75,5 +75,15 @@ Prevent the automatic shut-off of the engine when exiting vehicles. Verhindere das automatische Abschalten des Motors beim Verlassen des Fahrzeugs. + + Hide Eject Action + Abspringen-Aktion verstecken + Ukryj akcję Wyskocz + + + Hides the Eject entry from the action menu. Requires a game restart. + Versteckt den Abspringen-Eintrag aus dem Aktionsmenü. Benötigt Neustart des Spiels. + Usuwa akcję Wyskocz z menu akcji. Wymaga restartu gry. + diff --git a/addons/winddeflection/config.cpp b/addons/winddeflection/config.cpp index 0e193dace5..2d224d066e 100644 --- a/addons/winddeflection/config.cpp +++ b/addons/winddeflection/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_weather"}; + requiredAddons[] = {"ace_common"}; author = ECSTRING(common,ACETeam); authors[] = {ECSTRING(common,ACETeam), "Glowbal", "Ruthberg"}; url = ECSTRING(main,URL); diff --git a/docs/_includes/dependencies_list.md b/docs/_includes/dependencies_list.md index a19a72b0a1..c3ce51ec82 100644 --- a/docs/_includes/dependencies_list.md +++ b/docs/_includes/dependencies_list.md @@ -219,7 +219,7 @@ {% endif %} {% if include.component == "medical" %} -`ace_common` +`ace_medical_engine` {% endif %} {% if include.component == "medical_ai" %} @@ -467,7 +467,7 @@ {% endif %} {% if include.component == "winddeflection" %} -`ace_weather` +`ace_common` {% endif %} {% if include.component == "yardage450" %}