ACE_isUnique config for mags instead of static list

This commit is contained in:
PabstMirror 2015-05-09 17:08:47 -05:00
parent 2e3e203d9f
commit 2da2794e20
3 changed files with 3 additions and 3 deletions

View File

@ -79,7 +79,7 @@ _holderMagazinesStart = magazinesAmmoCargo _holder;
{ {
EXPLODE_2_PVT(_x,_xClassname,_xAmmo); EXPLODE_2_PVT(_x,_xClassname,_xAmmo);
if ((_xClassname in _listOfItemsToRemove) && {!(_xClassname in UNIQUE_MAGAZINES)}) then { if ((_xClassname in _listOfItemsToRemove) && {(getNumber (configFile >> "CfgMagazines" >> _xClassname >> "ACE_isUnique")) == 0}) then {
_holder addMagazineAmmoCargo [_xClassname, 1, _xAmmo]; _holder addMagazineAmmoCargo [_xClassname, 1, _xAmmo];
_target removeMagazine _xClassname; _target removeMagazine _xClassname;
}; };
@ -89,7 +89,7 @@ _targetMagazinesEnd = magazinesAmmo _target;
_holderMagazinesEnd = magazinesAmmoCargo _holder; _holderMagazinesEnd = magazinesAmmoCargo _holder;
//Verify Mags dropped from unit: //Verify Mags dropped from unit:
if ( ({((_x select 0) in _listOfItemsToRemove) && {!((_x select 0) in UNIQUE_MAGAZINES)}} count _targetMagazinesEnd) != 0) exitWith { if (({((_x select 0) in _listOfItemsToRemove) && {(getNumber (configFile >> "CfgMagazines" >> (_x select 0) >> "ACE_isUnique")) == 0}} count _targetMagazinesEnd) != 0) exitWith {
_holder setVariable [QGVAR(holderInUse), false]; _holder setVariable [QGVAR(holderInUse), false];
[_caller, _target, "Debug: Didn't Remove Magazines"] call FUNC(eventTargetFinish); [_caller, _target, "Debug: Didn't Remove Magazines"] call FUNC(eventTargetFinish);
}; };

View File

@ -13,4 +13,3 @@
#define DISARM_CONTAINER "GroundWeaponHolder" #define DISARM_CONTAINER "GroundWeaponHolder"
#define DUMMY_ITEM "ACE_DebugPotato" #define DUMMY_ITEM "ACE_DebugPotato"
#define UNIQUE_MAGAZINES ["ACE_key_customKeyMagazine"]

View File

@ -6,5 +6,6 @@ class CfgMagazines {
descriptionShort = "$STR_ACE_Vehicle_Item_Custom_Description"; descriptionShort = "$STR_ACE_Vehicle_Item_Custom_Description";
count = 1; count = 1;
mass = 0; mass = 0;
ACE_isUnique = 1;
}; };
}; };