ACE3/addons/frag/functions/fnc_initBlackList.sqf
lambdatiger 3c1e912787 Initial commit:
- Added new ammo cfg types
 - Added new caching functions
 - Added dev functions
 - Transfered core system to vanilla projectile EHs
 - Added stringtable sub categories
 - Reworked fragmenting and spalling to us submunitions
   - Frag
     - Implemented system around chance to hit
     - Switched from hitbox estimation to hitting specific HPs
     - Updated chance to miss method based on solid angle hit chance
     - Split random & targeted frag to their own subfunctions
   - Spall
     - Uses a system of estimated momentum changes to generate spall
2024-01-08 15:22:52 -06:00

51 lines
1.1 KiB
Plaintext

#include "script_component.hpp"
/*
* Author: Lambda.Tiger
* Adds setting defined blacklisted rounds to blacklist
*
* Arguments:
* Mne
*
* Return Value:
* None
*
* Example:
* [] call ace_frag_fnc_addBlackList
*
* Public: No
*/
TRACE_1("Beginning blacklist init", GVAR(BlackList));
if (!ADDON) then {
[FUNC(initBlackList), [], 1] call CBA_fnc_waitAndExecute;
};
// could improve text parsing
private _convArray = parseSimpleArray GVAR(BlackList);
if (count _convArray == 0 ) exitWith {
TRACE_1("Empty blacklist", _convArray);
};
private _errors = 0;
private _items = count _convArray;
for "_i" from 0 to _items - 1 do {
private _ammo = _convArray#_i;
if (typeName _ammo isNotEqualTo "STRING") then {
INFO_1("Improper ammo string at index %1", _i);
INC(_errors);
continue;
};
if (!isClass (configFile >> "cfgAmmo" >> _ammo)) then {
INFO_1("Ammo class: %1 does not exist", str _ammo);
INC(_errors);
continue;
};
GVAR(shouldFragCache) set [_convArray#_i, [false, false]];
};
INFO_2("Initialized blacklist. Total items found: %1, number of items failed: %2", _items, _errors);