2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2023-09-06 16:37:26 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
2024-07-23 13:28:40 +00:00
|
|
|
* Checks if AI healer has items.
|
2023-09-06 16:37:26 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Healer <OBJECT>
|
|
|
|
* 1: Treatment Type <STRING>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* 0: Has Item <BOOL>
|
|
|
|
* 1: Item Classname <STRING> (Optional)
|
|
|
|
* 2: Treatment <STRING> (Optional)
|
|
|
|
*
|
|
|
|
* Example:
|
2024-07-23 13:28:40 +00:00
|
|
|
* [cursorObject, "@bandage"] call ace_medical_ai_fnc_itemCheck
|
2023-09-06 16:37:26 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2023-10-04 18:19:10 +00:00
|
|
|
if (GVAR(requireItems) == 0) exitWith { [true] };
|
2023-09-06 16:37:26 +00:00
|
|
|
|
|
|
|
params ["_healer", "_treatementType"];
|
|
|
|
|
|
|
|
private _return = [false];
|
|
|
|
private _items = _healer call EFUNC(common,uniqueItems);
|
|
|
|
private _treatment = GVAR(itemHash) get _treatementType;
|
|
|
|
{
|
|
|
|
if (_x in _items) exitWith {
|
|
|
|
_return = [true, _x, _y];
|
|
|
|
};
|
|
|
|
} forEach _treatment;
|
|
|
|
|
|
|
|
_return
|