mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed check blood pressure did not always account for tourniquets
This commit is contained in:
parent
ab7af04530
commit
5db75ac746
@ -15,4 +15,8 @@
|
||||
|
||||
params ["_target", "_bodyPart"];
|
||||
|
||||
((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select (ALL_BODY_PARTS find toLower _bodyPart)) > 0
|
||||
private _index = ALL_BODY_PARTS find toLower _bodyPart;
|
||||
|
||||
if (_index < 0) exitWith { false };
|
||||
|
||||
((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select _index) > 0
|
||||
|
@ -16,51 +16,40 @@
|
||||
|
||||
params ["_caller", "_target", "_bodyPart"];
|
||||
|
||||
private _bloodPressure = _target call EFUNC(medical,getBloodPressure);
|
||||
private _bloodPressure = [0, 0];
|
||||
|
||||
if (!alive _target) then {
|
||||
[0,0]
|
||||
if (alive _target && !([_target, _bodyPart] call EFUNC(medical,hasTourniquetAppliedTo))) then {
|
||||
_bloodPressure = _target call EFUNC(medical,getBloodPressure);
|
||||
};
|
||||
|
||||
private _bloodPressureOutput = ELSTRING(medical,Check_Bloodpressure_Output_6);
|
||||
private _logOutPut = ELSTRING(medical,Check_Bloodpressure_NoBloodpressure);
|
||||
|
||||
_bloodPressure params ["_bloodPressureLow", "_bloodPressureHigh"];
|
||||
|
||||
private _output = "";
|
||||
private _logOutPut = "";
|
||||
|
||||
if (_caller call EFUNC(medical,isMedic)) then {
|
||||
_output = ELSTRING(medical,Check_Bloodpressure_Output_1);
|
||||
_logOutPut = format ["%1/%2", round _bloodPressureHigh, round _bloodPressureLow];
|
||||
} else {
|
||||
if (_bloodPressureHigh > 20) then {
|
||||
_output = ELSTRING(medical,Check_Bloodpressure_Output_2);
|
||||
_logOutPut = ELSTRING(medical,Check_Bloodpressure_Low);
|
||||
|
||||
if (_bloodPressureHigh > 100) then {
|
||||
_output = ELSTRING(medical,Check_Bloodpressure_Output_3);
|
||||
_logOutPut = ELSTRING(medical,Check_Bloodpressure_Normal);
|
||||
|
||||
if (_bloodPressureHigh > 160) then {
|
||||
_output = ELSTRING(medical,Check_Bloodpressure_Output_4);
|
||||
_logOutPut = ELSTRING(medical,Check_Bloodpressure_High);
|
||||
};
|
||||
};
|
||||
if (_bloodPressureHigh > 20) then {
|
||||
if (_caller call EFUNC(medical,isMedic)) then {
|
||||
_bloodPressureOutput = ELSTRING(medical,Check_Bloodpressure_Output_1);
|
||||
_logOutPut = format ["%1/%2", round _bloodPressureHigh, round _bloodPressureLow];
|
||||
} else {
|
||||
if (random 10 > 3) then {
|
||||
_output = ELSTRING(medical,Check_Bloodpressure_Output_5);
|
||||
_logOutPut = ELSTRING(medical,Check_Bloodpressure_NoBloodpressure);
|
||||
} else {
|
||||
_output = ELSTRING(medical,Check_Bloodpressure_Output_6);
|
||||
//Fail to find pressure, no logoutput
|
||||
if (_bloodPressureHigh > 20) then {
|
||||
_bloodPressureOutput = ELSTRING(medical,Check_Bloodpressure_Output_2);
|
||||
_logOutPut = ELSTRING(medical,Check_Bloodpressure_Low);
|
||||
|
||||
if (_bloodPressureHigh > 100) then {
|
||||
_bloodPressureOutput = ELSTRING(medical,Check_Bloodpressure_Output_3);
|
||||
_logOutPut = ELSTRING(medical,Check_Bloodpressure_Normal);
|
||||
|
||||
if (_bloodPressureHigh > 160) then {
|
||||
_bloodPressureOutput = ELSTRING(medical,Check_Bloodpressure_Output_4);
|
||||
_logOutPut = ELSTRING(medical,Check_Bloodpressure_High);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (toLower _bodyPart in ["lefthand", "righthand"] && {[_unit, _bodyPart] call EFUNC(medical,hasTourniquetAppliedTo)}) then {
|
||||
_output = ELSTRING(medical,Check_Bloodpressure_Output_6);
|
||||
_logOutPut = "";
|
||||
};
|
||||
|
||||
[QEGVAR(common,displayTextStructured), [[_output, _target call EFUNC(common,getName), round _bloodPressureHigh, round _bloodPressureLow], 1.75, _caller], _caller] call CBA_fnc_targetEvent;
|
||||
[QEGVAR(common,displayTextStructured), [[_bloodPressureOutput, _target call EFUNC(common,getName), round _bloodPressureHigh, round _bloodPressureLow], 1.75, _caller], _caller] call CBA_fnc_targetEvent;
|
||||
|
||||
if (_logOutPut != "") then {
|
||||
[_target, "activity", ELSTRING(medical,Check_Bloodpressure_Log), [_caller call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
params ["_caller", "_target", "_bodyPart"];
|
||||
|
||||
private _heartRate = _target getVariable [QEGVAR(medical,heartRate), 80];
|
||||
private _heartRate = 0;
|
||||
|
||||
if (!alive _target) then {
|
||||
_heartRate = 0;
|
||||
if (alive _target && !([_target, _bodyPart] call EFUNC(medical,hasTourniquetAppliedTo))) then {
|
||||
_heartRate = _target getVariable [QEGVAR(medical,heartRate), 80];
|
||||
};
|
||||
|
||||
private _heartRateOutput = ELSTRING(medical,Check_Pulse_Output_5);
|
||||
@ -46,11 +46,6 @@ if (_heartRate > 1.0) then {
|
||||
};
|
||||
};
|
||||
|
||||
if (toLower _bodyPart in ["lefthand", "righthand"] && {[_target, _bodyPart] call EFUNC(medical,hasTourniquetAppliedTo)}) then {
|
||||
_heartRateOutput = ELSTRING(medical,Check_Pulse_Output_5);
|
||||
_logOutPut = ELSTRING(medical,Check_Pulse_None);
|
||||
};
|
||||
|
||||
[QEGVAR(common,displayTextStructured), [[_heartRateOutput, _target call EFUNC(common,getName), round _heartRate], 1.5, _caller], _caller] call CBA_fnc_targetEvent;
|
||||
|
||||
if (_logOutPut != "") then {
|
||||
|
Loading…
Reference in New Issue
Block a user