fix tourniquets

This commit is contained in:
commy2 2016-10-13 10:28:28 +02:00
parent e1cbeeea16
commit 2d243d45f3
3 changed files with 7 additions and 7 deletions

View File

@ -78,7 +78,7 @@ class GVAR(Actions) {
items[] = {"ACE_tourniquet"};
treatmentTime = 4;
callbackSuccess = QFUNC(treatmentTourniquet);
condition = QUOTE(!([ARR_2(_target,_bodyPart)] call EFUNC(medical,hasTourniquetAppliedTo)));
condition = QUOTE(!EGVAR(medical,basicBandages) && {!([ARR_2(_target,_bodyPart)] call EFUNC(medical,hasTourniquetAppliedTo))});
litter[] = {};
};
class RemoveTourniquet: Tourniquet {
@ -86,8 +86,8 @@ class GVAR(Actions) {
displayNameProgress = ECSTRING(medical,RemovingTourniquet);
items[] = {};
treatmentTime = 2.5;
callbackSuccess = QFUNC(actionRemoveTourniquet);
condition = QUOTE([ARR_2(_target,_bodyPart)] call EFUNC(medical,hasTourniquetAppliedTo));
callbackSuccess = QFUNC(treatmentTourniquetRemove);
condition = QUOTE(!EGVAR(medical,basicBandages) && {[ARR_2(_target,_bodyPart)] call EFUNC(medical,hasTourniquetAppliedTo)});
};
// --- syringes

View File

@ -7,7 +7,6 @@ PREP(actionCheckResponse);
PREP(actionDiagnose);
PREP(actionLoadUnit);
PREP(actionPlaceInBodyBag);
PREP(actionRemoveTourniquet);
PREP(actionUnloadUnit);
PREP(addToLog);
PREP(addToTriageCard);
@ -34,6 +33,7 @@ PREP(treatmentBandage);
PREP(treatmentBandageLocal);
PREP(treatmentTourniquet);
PREP(treatmentTourniquetLocal);
PREP(treatmentTourniquetRemove);
PREP(treatmentMorphine);
PREP(treatmentMorphineLocal);
PREP(treatmentEpipen);

View File

@ -12,7 +12,6 @@
*
* Public: Yes
*/
#include "script_component.hpp"
params ["_caller", "_target", "_bodyPart"];
@ -23,7 +22,7 @@ private _partIndex = ALL_BODY_PARTS find toLower _bodyPart;
private _tourniquets = _target getVariable [QEGVAR(medical,tourniquets), [0,0,0,0,0,0]];
// Check if there is a tourniquet on this bodypart
if ((_tourniquets select _partIndex) == 0) exitWith {
if (_tourniquets select _partIndex == 0) exitWith {
[QEGVAR(common,displayTextStructured), [ELSTRING(medical,noTourniquetOnBodyPart), 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
};
@ -34,10 +33,11 @@ _target setVariable [QEGVAR(medical,tourniquets), _tourniquets, true];
// Adding the tourniquet item to the caller
[_caller, "ACE_tourniquet", true] call CBA_fnc_addItem;
//Handle all injected medications now that blood is flowing:
//Handle all injected medications now that blood is flowing: @todo
private _delayedMedications = _target getVariable [QGVAR(occludedMedications), []];
private _updatedArray = false;
TRACE_2("meds",_partIndex,_delayedMedications);
{
_x params ["", "", "_medPartNum"];
if (_partIndex == _medPartNum) then {