mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-04 15:22:53 +03:00
Minor formatting cleanup
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
private ["_inventory","_wpns","_mags","_idc","_isOK","_typedBags"];
|
||||
private "_idc";
|
||||
_inventory = _this;
|
||||
_typedBags = ["bloodBagANEG", "bloodBagAPOS", "bloodBagBNEG", "bloodBagBPOS", "bloodBagONEG", "bloodBagOPOS","wholeBloodBagANEG", "wholeBloodBagAPOS", "wholeBloodBagBNEG", "wholeBloodBagBPOS", "wholeBloodBagONEG", "wholeBloodBagOPOS"];
|
||||
if (count _inventory > 0) then {
|
||||
_wpns = _inventory select 0;
|
||||
_mags = _inventory select 1;
|
||||
@@ -24,13 +23,11 @@ if (count _inventory > 0) then {
|
||||
if (DZE_UseBloodTypes) then {
|
||||
if (_item == "ItemBloodbag") then { _item = "bloodBagONEG" }; // Convert ItemBloodbag into universal blood type/rh bag
|
||||
} else {
|
||||
if (_item in _typedBags) then {_item = "ItemBloodbag"};
|
||||
if (_item in DZE_typedBags) then { _item = "ItemBloodbag" };
|
||||
};
|
||||
if (_item == "ItemTent") then { _item = "ItemTentOld" };
|
||||
|
||||
//Is item legal?
|
||||
_isOK = isClass(configFile >> "CfgMagazines" >> _item);
|
||||
if (_isOK) then {
|
||||
if (isClass(configFile >> "CfgMagazines" >> _item)) then {
|
||||
if (_val != -1) then {
|
||||
player addMagazine [_item,_val];
|
||||
} else {
|
||||
@@ -39,15 +36,15 @@ if (count _inventory > 0) then {
|
||||
};
|
||||
_idc = _idc + 1;
|
||||
} count _mags;
|
||||
|
||||
//Add weapons
|
||||
{
|
||||
if(_x in (DZE_REPLACE_WEAPONS select 0)) then {
|
||||
if (_x in (DZE_REPLACE_WEAPONS select 0)) then {
|
||||
_x = (DZE_REPLACE_WEAPONS select 1) select ((DZE_REPLACE_WEAPONS select 0) find _x);
|
||||
};
|
||||
|
||||
//Is item legal?
|
||||
_isOK = isClass(configFile >> "CfgWeapons" >> _x);
|
||||
if (_isOK) then {
|
||||
if (isClass(configFile >> "CfgWeapons" >> _x)) then {
|
||||
player addWeapon _x;
|
||||
};
|
||||
} count _wpns;
|
||||
|
||||
Reference in New Issue
Block a user