/* * Author: Glowbal * Apply a tourniquet to the patient * * Arguments: * 0: The medic * 1: The patient * 2: Body part * 3: Treatment class name * * Return Value: * Succesful treatment started * * Public: No */ #include "script_component.hpp" params ["_caller", "_target", "_bodyPart", "_className", "_items"]; if (count _items == 0) exitWith {false}; private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; private _tourniquets = GET_TOURNIQUETS(_target); if (_tourniquets select _partIndex > 0) exitWith { private _output = "There is already a tourniquet on this body part!"; // TODO localization [QEGVAR(common,displayTextStructured), [_output, 1.5, _caller], _caller] call CBA_fnc_targetEvent; false }; private _removeItem = _items select 0; [QGVAR(treatmentTourniquetLocal), [_target, _removeItem, _bodyPart], _target] call CBA_fnc_targetEvent; [_target, _removeItem] call FUNC(addToTriageCard); [_target, "activity", ELSTRING(medical_treatment,Activity_appliedTourniquet), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); [_target, "activity_view", ELSTRING(medical_treatment,Activity_appliedTourniquet), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); // TODO expand message true