ACE3/addons/medical_treatment/functions/fnc_checkItems.sqf

43 lines
1.1 KiB
Plaintext
Raw Normal View History

#include "script_component.hpp"
2016-09-18 17:48:49 +00:00
/*
2016-09-29 19:32:54 +00:00
* Author: KoffeinFlummi, commy2
2016-09-18 17:48:49 +00:00
* Replaces vanilla items with ACE ones.
*
* Arguments:
* 0: The unit <OBJECT>
*
* ReturnValue:
* None
*
2016-09-29 19:32:54 +00:00
* Public: No
2016-09-18 17:48:49 +00:00
*/
2019-03-24 05:37:39 +00:00
if (EGVAR(medical,convertItems) == 2) exitWith {};
2016-09-18 17:48:49 +00:00
params ["_unit"];
private _countFirstAidKit = [_unit, "FirstAidKit"] call EFUNC(common,getCountOfItem);
2016-09-29 19:32:54 +00:00
_unit removeItems "FirstAidKit";
private _countMedikit = [_unit, "Medikit"] call EFUNC(common,getCountOfItem);
2016-09-29 19:32:54 +00:00
_unit removeItems "Medikit";
2019-03-24 05:37:39 +00:00
if (EGVAR(medical,convertItems) != 0) exitWith {};
2016-12-05 20:34:20 +00:00
for "_i" from 1 to _countFirstAidKit do {
_unit addItem "ACE_fieldDressing";
_unit addItem "ACE_packingBandage";
_unit addItem "ACE_morphine";
_unit addItem "ACE_tourniquet";
};
2016-09-29 19:32:54 +00:00
2016-12-05 20:34:20 +00:00
for "_i" from 1 to _countMedikit do {
_unit addItemToBackpack "ACE_fieldDressing";
_unit addItemToBackpack "ACE_packingBandage";
_unit addItemToBackpack "ACE_packingBandage";
_unit addItemToBackpack "ACE_epinephrine";
_unit addItemToBackpack "ACE_morphine";
_unit addItemToBackpack "ACE_salineIV_250";
_unit addItemToBackpack "ACE_tourniquet";
2016-09-18 17:48:49 +00:00
};