mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
bec55114fa
- Add radial actions - Revert back to using 'ACE_isUnconscious'
37 lines
792 B
Plaintext
37 lines
792 B
Plaintext
/*
|
|
* Author: Glowbal
|
|
* Check if all items are present between the patient and the medic.
|
|
*
|
|
* Arguments:
|
|
* 0: Medic <OBJECT>
|
|
* 1: Patient <OBJECT>
|
|
* 2: Items <ARRAY<STRING>>
|
|
*
|
|
* Return Value:
|
|
* Has the items <BOOL>
|
|
*
|
|
* Example:
|
|
* [bob, patient, ["bandage", "morphine"]] call ACE_medical_treatment_fnc_hasItems
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_medic", "_patient", "_items"];
|
|
|
|
private _return = true;
|
|
|
|
{
|
|
// handle a one of type use item
|
|
if (_x isEqualType [] && {{[_medic, _patient, _x] call FUNC(hasItem)} count _x == 0}) exitWith {
|
|
_return = false;
|
|
};
|
|
|
|
// handle required item
|
|
if (_x isEqualType "" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitWith {
|
|
_return = false;
|
|
};
|
|
} forEach _items;
|
|
|
|
_return
|