mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Added hasItems function
This commit is contained in:
parent
2b061e8de3
commit
8b3e5ac8e2
@ -45,6 +45,7 @@ PREP(onMedicationUsed);
|
|||||||
PREP(reactionToDamage);
|
PREP(reactionToDamage);
|
||||||
PREP(useItem);
|
PREP(useItem);
|
||||||
PREP(hasItem);
|
PREP(hasItem);
|
||||||
|
PREP(hasItems);
|
||||||
PREP(hasMedicalEnabled);
|
PREP(hasMedicalEnabled);
|
||||||
PREP(hasTourniquetAppliedTo);
|
PREP(hasTourniquetAppliedTo);
|
||||||
PREP(isMedic);
|
PREP(isMedic);
|
||||||
|
31
addons/medical/functions/fnc_hasItems.sqf
Normal file
31
addons/medical/functions/fnc_hasItems.sqf
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Author: Glowbal
|
||||||
|
* Check if all items are present between the patient and the medic.
|
||||||
|
*
|
||||||
|
* Arguments:
|
||||||
|
* 0: Medic <OBJECT>
|
||||||
|
* 1: Patient <OBJECT>
|
||||||
|
* 2: Item <STRING>
|
||||||
|
*
|
||||||
|
* ReturnValue:
|
||||||
|
* <NIL>
|
||||||
|
*
|
||||||
|
* 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 !([_medic, _patient, _x] call FUNC(hasItem)) exitwith {
|
||||||
|
_return = false;
|
||||||
|
};
|
||||||
|
}foreach _items;
|
||||||
|
|
||||||
|
_return;
|
Loading…
Reference in New Issue
Block a user