Improvements

This commit is contained in:
GitHawk
2016-06-07 10:26:22 +02:00
parent 9cfa2f11d9
commit bc90a85bcd

View File

@ -4,10 +4,7 @@
* *
* Arguments: * Arguments:
* 0: Ammo Truck <OBJECT> * 0: Ammo Truck <OBJECT>
* 1: Vehicle <OBJECT> * 1: Vehicle or Vehicle class <OBJECT/STRING>
* or
* 0: Ammo Truck <OBJECT>
* 1: Vehicle class <STRING>
* *
* Return Value: * Return Value:
* None * None
@ -26,16 +23,12 @@ params [
]; ];
if (isNull _truck || if (isNull _truck ||
{typeName _vehicle == "OBJECT" && {isNull _vehicle}}) exitWith {}; {_vehicle isEqualType objNull}) exitWith {};
private _string = ""; private _string = [_vehicle, typeOf _vehicle] select (_vehicle isEqualType objNull);
if (typeName _vehicle == "OBJECT") then { if (_string == "") exitWith {
_string = typeOf _vehicle; ACE_ERRORFORMAT("_string is empty in ace_rearm_fnc_addVehicleMagazinesToSupply");
}; };
if (typeName _vehicle == "STRING") then {
_string = _vehicle;
};
if (_string == "") exitWith {};
{ {
private _turretPath = _x; private _turretPath = _x;
private _magazines = [_string, _turretPath] call FUNC(getConfigMagazines); private _magazines = [_string, _turretPath] call FUNC(getConfigMagazines);