2024-01-11 20:01:50 +00:00
|
|
|
#include "..\script_component.hpp"
|
2024-01-08 21:22:52 +00:00
|
|
|
/*
|
|
|
|
* Author: Lambda.Tiger
|
2024-01-18 00:20:47 +00:00
|
|
|
* Adds setting defined blacklisted rounds to blacklist.
|
2024-01-08 21:22:52 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2024-01-15 19:39:19 +00:00
|
|
|
* None
|
2024-01-08 21:22:52 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2024-01-15 21:37:18 +00:00
|
|
|
* call ace_frag_fnc_addBlackList
|
2024-01-08 21:22:52 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2024-02-08 23:12:11 +00:00
|
|
|
TRACE_1("Beginning blacklist init",GVAR(blackList));
|
2024-01-08 21:22:52 +00:00
|
|
|
|
2024-01-13 06:35:22 +00:00
|
|
|
// could improve text parsing of CBA setting string
|
2024-01-15 05:08:37 +00:00
|
|
|
private _convArray = parseSimpleArray GVAR(blackList);
|
2024-01-08 21:22:52 +00:00
|
|
|
|
2024-01-16 00:47:06 +00:00
|
|
|
if (_convArray isEqualTo []) exitWith {
|
2024-02-08 23:12:11 +00:00
|
|
|
TRACE_1("Empty blacklist",_convArray);
|
2024-01-08 21:22:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 06:35:22 +00:00
|
|
|
// Add CBA setting blacklist to blacklist and log errors
|
2024-01-08 21:22:52 +00:00
|
|
|
private _errors = 0;
|
2024-01-16 00:35:26 +00:00
|
|
|
{
|
2024-01-15 23:36:02 +00:00
|
|
|
private _ammo = _x;
|
2024-01-16 21:39:16 +00:00
|
|
|
if !(_ammo isEqualType "") then {
|
2024-02-08 23:12:11 +00:00
|
|
|
INFO_1("Improper ammo string at index %1",_forEachIndex);
|
2024-01-08 21:22:52 +00:00
|
|
|
INC(_errors);
|
|
|
|
continue;
|
|
|
|
};
|
|
|
|
|
2024-01-18 02:48:27 +00:00
|
|
|
if (!isClass (configFile >> "CfgAmmo" >> _ammo)) then {
|
2024-02-08 23:12:11 +00:00
|
|
|
INFO_1("Ammo class: %1 does not exist",str _ammo);
|
2024-01-08 21:22:52 +00:00
|
|
|
INC(_errors);
|
|
|
|
continue;
|
|
|
|
};
|
|
|
|
|
2024-01-16 00:35:26 +00:00
|
|
|
GVAR(shouldFragCache) set [_ammo, false];
|
|
|
|
} forEach _convArray;
|
2024-01-08 21:22:52 +00:00
|
|
|
|
2024-01-16 00:35:26 +00:00
|
|
|
INFO_2("Initialized blacklist. Total items found: %1, number of items failed: %2",count _convArray,_errors);
|