ACE3/addons/medical_treatment/functions/fnc_checkItems.sqf

58 lines
1.6 KiB
Plaintext
Raw Normal View History

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
*/
#include "script_component.hpp"
params ["_unit"];
2016-09-29 19:32:54 +00:00
private _countFirstAidKit = {_x == "FirstAidKit"} count items _unit;
_unit removeItems "FirstAidKit";
private _countMedikit = {_x == "Medikit"} count items _unit;
_unit removeItems "Medikit";
if (EGVAR(medical,level) >= 2) then {
// --- advanced
for "" from 1 to _countFirstAidKit do {
2016-09-18 17:48:49 +00:00
_unit addItem "ACE_fieldDressing";
_unit addItem "ACE_packingBandage";
_unit addItem "ACE_morphine";
_unit addItem "ACE_tourniquet";
};
2016-09-29 19:32:54 +00:00
for "" from 1 to _countMedikit do {
2016-09-18 17:48:49 +00:00
_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-29 19:32:54 +00:00
};
} else {
// --- basic
for "" from 1 to _countFirstAidKit do {
_unit addItem "ACE_fieldDressing";
_unit addItem "ACE_fieldDressing";
_unit addItem "ACE_morphine";
};
for "" from 1 to _countMedikit do {
2016-09-18 17:48:49 +00:00
_unit addItemToBackpack "ACE_epinephrine";
_unit addItemToBackpack "ACE_epinephrine";
_unit addItemToBackpack "ACE_epinephrine";
_unit addItemToBackpack "ACE_epinephrine";
_unit addItemToBackpack "ACE_bloodIV";
_unit addItemToBackpack "ACE_bloodIV";
};
};