ACE3/addons/medical_treatment/functions/fnc_scanMedicalItems.sqf
Grim 31e1ad0cff
Arsenal - Add Tools category and moveOnOverwrite parameter to FUNC(addCustomRightPanelButton) (#9247)
* add tools tab and setting

* move to preinit

* fix icon, add restart warning

* derp

Co-authored-by: Dystopian <sddex@ya.ru>

* Update addons/arsenal/stringtable.xml

Co-authored-by: PabstMirror <pabstmirror@gmail.com>

* remove setting

* add keepIfOverriden parameter

* docs again

* documentation whitespace

* docs grammar, change parameter name

* fix docs

* more docs fixes

* magazine support

* deprecate spare barrel item

* more docs, improve condition

---------

Co-authored-by: Dystopian <sddex@ya.ru>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2023-07-21 22:39:48 +03:00

39 lines
949 B
Plaintext

#include "script_component.hpp"
/*
* Author: LinkIsGrim
* Caches all item classnames used in ACE_Medical_Treatment_Actions
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* call ace_medical_treatment_fnc_scanMedicalItems
*
* Public: No
*/
private _list = [];
private _cfgActions = configFile >> QGVAR(actions);
private _fnc_isMedicalItem = toString {
getNumber (_x >> "ACE_isMedicalItem") isEqualTo 1
};
// Get items in ACE_Medical_Treament_Actions, fallback for items without API config property
{
_list append (getArray (_x >> "items"));
} forEach ("true" configClasses _cfgActions);
{
_list pushBack (configName _x);
} forEach (_fnc_isMedicalItem configClasses (configFile >> "CfgWeapons"));
{
_list pushBack (configName _x);
} forEach (_fnc_isMedicalItem configClasses (configFile >> "CfgMagazines"));
uiNamespace setVariable [QGVAR(treatmentItems), compileFinal str (_list arrayIntersect _list)]