2015-01-18 21:16:35 +00:00
|
|
|
/**
|
|
|
|
* fn_checkPulseLocal.sqf
|
|
|
|
* @Descr: N/A
|
|
|
|
* @Author: Glowbal
|
|
|
|
*
|
|
|
|
* @Arguments: []
|
|
|
|
* @Return:
|
|
|
|
* @PublicAPI: false
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-01-18 23:58:17 +00:00
|
|
|
private ["_caller","_unit", "_heartRateOutput", "_heartRate","_logOutPut", "_title","_content"];
|
2015-01-18 21:16:35 +00:00
|
|
|
_caller = _this select 0;
|
|
|
|
_unit = _this select 1;
|
|
|
|
|
2015-01-18 23:58:17 +00:00
|
|
|
|
2015-01-18 21:16:35 +00:00
|
|
|
_heartRate = [_unit,QGVAR(heartRate)] call EFUNC(common,getDefinedVariable);
|
|
|
|
if (!alive _unit) then {
|
|
|
|
_heartRate = 0;
|
|
|
|
};
|
2015-01-18 23:58:17 +00:00
|
|
|
_heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_5";
|
|
|
|
_logOutPut = "No heart rate";
|
|
|
|
|
2015-01-18 21:16:35 +00:00
|
|
|
if (_heartRate > 1.0) then {
|
2015-01-18 23:58:17 +00:00
|
|
|
if ([_caller] call FUNC(isMedic)) then {
|
2015-01-18 21:16:35 +00:00
|
|
|
_heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_1";
|
|
|
|
_logOutPut = format["%1",round(_heartRate)];
|
|
|
|
} else {
|
|
|
|
// non medical personel will only find a pulse/HR
|
|
|
|
_heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_2";
|
|
|
|
_logOutPut = "Weak";
|
|
|
|
if (_heartRate > 60) then {
|
|
|
|
if (_heartRate > 100) then {
|
|
|
|
_heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_3";
|
|
|
|
_logOutPut = "Strong";
|
|
|
|
} else {
|
|
|
|
_heartRateOutput = "STR_ACE_CHECK_PULSE_OUTPUT_4";
|
|
|
|
_logOutPut = "Normal";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
_title = "STR_ACE_CHECK_PULSE";
|
|
|
|
_content = ["STR_ACE_CHECK_PULSE_CHECKED_MEDIC",_heartRateOutput];
|
2015-01-18 23:58:17 +00:00
|
|
|
[_caller, _title, _content, 0, [[_unit] call EFUNC(common,getName), round(_heartRate)]] call EFUNC(gui,sendDisplayInformationTo);
|
2015-01-18 21:16:35 +00:00
|
|
|
|
|
|
|
if (_logOutPut != "") then {
|
|
|
|
[_unit,"examine",format["%1 checked Heart Rate: %2",[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToQuickViewLog);
|
|
|
|
};
|