mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
35 lines
727 B
Plaintext
35 lines
727 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>>
|
|
*
|
|
* ReturnValue:
|
|
* Has the items <BOOL>
|
|
*
|
|
* Public: Yes
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
private ["_medic", "_patient", "_items", "_return"];
|
|
_medic = _this select 0;
|
|
_patient = _this select 1;
|
|
_items = _this select 2;
|
|
|
|
_return = true;
|
|
{
|
|
//
|
|
if (typeName _x == "ARRAY" && {({[_medic, _patient, _x] call FUNC(hasItem)}count _x == 0)}) exitwith {
|
|
_return = false;
|
|
};
|
|
if (typeName _x == "STRING" && {!([_medic, _patient, _x] call FUNC(hasItem))}) exitwith {
|
|
_return = false;
|
|
};
|
|
}foreach _items;
|
|
|
|
_return;
|