Disposable - Add warning for addons using ace_disposable (#6963)

* Disposable - Add warning for addons using ace_disposable

* update arsenal code and cba version
This commit is contained in:
PabstMirror 2019-05-06 10:05:04 -05:00 committed by GitHub
parent 3cfdae899c
commit 5da1308151
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 2 deletions

View File

@ -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;

View File

@ -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"));

View File

@ -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)