mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ACE_isUnique config for mags instead of static list
This commit is contained in:
parent
2e3e203d9f
commit
2da2794e20
@ -79,7 +79,7 @@ _holderMagazinesStart = magazinesAmmoCargo _holder;
|
||||
|
||||
{
|
||||
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];
|
||||
_target removeMagazine _xClassname;
|
||||
};
|
||||
@ -89,7 +89,7 @@ _targetMagazinesEnd = magazinesAmmo _target;
|
||||
_holderMagazinesEnd = magazinesAmmoCargo _holder;
|
||||
|
||||
//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];
|
||||
[_caller, _target, "Debug: Didn't Remove Magazines"] call FUNC(eventTargetFinish);
|
||||
};
|
||||
|
@ -13,4 +13,3 @@
|
||||
|
||||
#define DISARM_CONTAINER "GroundWeaponHolder"
|
||||
#define DUMMY_ITEM "ACE_DebugPotato"
|
||||
#define UNIQUE_MAGAZINES ["ACE_key_customKeyMagazine"]
|
@ -6,5 +6,6 @@ class CfgMagazines {
|
||||
descriptionShort = "$STR_ACE_Vehicle_Item_Custom_Description";
|
||||
count = 1;
|
||||
mass = 0;
|
||||
ACE_isUnique = 1;
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user