mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fix misc. treatment actions
This commit is contained in:
parent
03fe2826dd
commit
e03614757e
@ -14,4 +14,4 @@
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
!(_unit getVariable ["ACE_isUnconscious", false]) && alive _unit && !(_unit getVariable ["ACE_isDead", false]) // return
|
||||
alive _unit && {!(_unit getVariable [QEGVAR(medical,isUnconscious), false])}
|
||||
|
@ -16,3 +16,7 @@ if (isServer) then {
|
||||
[QGVAR(treatmentIVLocal), FUNC(treatmentIVLocal)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(treatmentCPRLocal), FUNC(treatmentCPRLocal)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(treatmentFullHealLocal), FUNC(treatmentFullHealLocal)] call CBA_fnc_addEventHandler;
|
||||
|
||||
// action events
|
||||
[QGVAR(actionCheckPulseLocal), FUNC(actionCheckPulseLocal)] call CBA_fnc_addEventHandler;
|
||||
[QGVAR(actionCheckBloodPressureLocal), FUNC(actionCheckBloodPressureLocal)] call CBA_fnc_addEventHandler;
|
||||
|
@ -1,22 +1,21 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Action for checking the blood pressure of the patient
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
* Author: Glowbal
|
||||
* Action for checking the blood pressure of the patient
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
* 2: Body part <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caller", "_target", "_selectionName"];
|
||||
if (local _target) then {
|
||||
[QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
|
||||
} else {
|
||||
[QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
|
||||
};
|
||||
params ["_caller", "_target", "_bodyPart"];
|
||||
|
||||
[QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _bodyPart], _target] call CBA_fnc_targetEvent;
|
||||
|
||||
true
|
||||
|
@ -5,43 +5,47 @@
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
* 2: Body part <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caller", "_target", "_selectionName"];
|
||||
params ["_caller", "_target", "_bodyPart"];
|
||||
|
||||
private _bloodPressure = if (!alive _target) then {
|
||||
private _bloodPressure = _target call EFUNC(medical,getBloodPressure);
|
||||
|
||||
if (!alive _target) then {
|
||||
[0,0]
|
||||
} else {
|
||||
[_target] call EFUNC(medical,getBloodPressure)
|
||||
};
|
||||
_bloodPressure params [ "_bloodPressureLow", "_bloodPressureHigh"];
|
||||
|
||||
_bloodPressure params ["_bloodPressureLow", "_bloodPressureHigh"];
|
||||
|
||||
private _output = "";
|
||||
private _logOutPut = "";
|
||||
if ([_caller] call EFUNC(medical,isMedic)) then {
|
||||
|
||||
if (_caller call EFUNC(medical,isMedic)) then {
|
||||
_output = ELSTRING(medical,Check_Bloodpressure_Output_1);
|
||||
_logOutPut = format["%1/%2",round(_bloodPressureHigh),round(_bloodPressureLow)];
|
||||
_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);
|
||||
};
|
||||
|
||||
};
|
||||
} else {
|
||||
if (random(10) > 3) then {
|
||||
if (random 10 > 3) then {
|
||||
_output = ELSTRING(medical,Check_Bloodpressure_Output_5);
|
||||
_logOutPut = ELSTRING(medical,Check_Bloodpressure_NoBloodpressure);
|
||||
} else {
|
||||
@ -51,14 +55,14 @@ if ([_caller] call EFUNC(medical,isMedic)) then {
|
||||
};
|
||||
};
|
||||
|
||||
if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call EFUNC(medical,hasTourniquetAppliedTo)}) then {
|
||||
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), [[_output, _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, false, true] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
|
||||
[_target,"quick_view", ELSTRING(medical,Check_Bloodpressure_Log), [[_caller, false, true] call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
|
||||
[_target, "activity", ELSTRING(medical,Check_Bloodpressure_Log), [_caller call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
|
||||
[_target, "quick_view", ELSTRING(medical,Check_Bloodpressure_Log), [_caller call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
|
||||
};
|
||||
|
@ -1,22 +1,21 @@
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Action for checking the pulse or heart rate of the patient
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
* Author: Glowbal
|
||||
* Action for checking the pulse or heart rate of the patient
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
* 2: Body part <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caller","_target", "_selectionName"];
|
||||
if (local _target) then {
|
||||
[QGVAR(actionCheckPulseLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent;
|
||||
} else {
|
||||
[QGVAR(actionCheckPulseLocal), [_caller, _target, _selectionName], _target] call CBA_fnc_targetEvent;
|
||||
};
|
||||
params ["_caller", "_target", "_bodyPart"];
|
||||
|
||||
[QGVAR(actionCheckPulseLocal), [_caller, _target, _bodyPart], _target] call CBA_fnc_targetEvent;
|
||||
|
||||
true
|
||||
|
@ -5,32 +5,35 @@
|
||||
* Arguments:
|
||||
* 0: The medic <OBJECT>
|
||||
* 1: The patient <OBJECT>
|
||||
* 2: Body part <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caller", "_unit", "_selectionName"];
|
||||
params ["_caller", "_target", "_bodyPart"];
|
||||
|
||||
private _heartRate = _unit getVariable [QEGVAR(medical,heartRate), 80];
|
||||
if (!alive _unit) then {
|
||||
private _heartRate = _target getVariable [QEGVAR(medical,heartRate), 80];
|
||||
|
||||
if (!alive _target) then {
|
||||
_heartRate = 0;
|
||||
};
|
||||
|
||||
private _heartRateOutput = ELSTRING(medical,Check_Pulse_Output_5);
|
||||
private _logOutPut = ELSTRING(medical,Check_Pulse_None);
|
||||
|
||||
if (_heartRate > 1.0) then {
|
||||
if ([_caller] call EFUNC(medical,isMedic)) then {
|
||||
if (_caller call EFUNC(medical,isMedic)) then {
|
||||
_heartRateOutput = ELSTRING(medical,Check_Pulse_Output_1);
|
||||
_logOutPut = format["%1",round(_heartRate)];
|
||||
_logOutPut = format ["%1", round(_heartRate)];
|
||||
} else {
|
||||
// non medical personel will only find a pulse/HR
|
||||
_heartRateOutput = ELSTRING(medical,Check_Pulse_Output_2);
|
||||
_logOutPut = ELSTRING(medical,Check_Pulse_Weak);
|
||||
|
||||
if (_heartRate > 60) then {
|
||||
if (_heartRate > 100) then {
|
||||
_heartRateOutput = ELSTRING(medical,Check_Pulse_Output_3);
|
||||
@ -43,14 +46,14 @@ if (_heartRate > 1.0) then {
|
||||
};
|
||||
};
|
||||
|
||||
if (_selectionName in ["hand_l","hand_r"] && {[_unit, _selectionName] call EFUNC(medical,hasTourniquetAppliedTo)}) 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, [_unit] call EFUNC(common,getName), round(_heartRate)], 1.5, _caller], [_caller]] call CBA_fnc_targetEvent;
|
||||
[QEGVAR(common,displayTextStructured), [[_heartRateOutput, _target call EFUNC(common,getName), round _heartRate], 1.5, _caller], _caller] call CBA_fnc_targetEvent;
|
||||
|
||||
if (_logOutPut != "") then {
|
||||
[_unit,"activity", ELSTRING(medical,Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
|
||||
[_unit,"quick_view", ELSTRING(medical,Check_Pulse_Log),[[_caller] call EFUNC(common,getName),_logOutPut]] call FUNC(addToLog);
|
||||
[_target, "activity", ELSTRING(medical,Check_Pulse_Log), [_caller call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
|
||||
[_target, "quick_view", ELSTRING(medical,Check_Pulse_Log), [_caller call EFUNC(common,getName), _logOutPut]] call FUNC(addToLog);
|
||||
};
|
||||
|
@ -11,14 +11,13 @@
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_caller", "_target"];
|
||||
|
||||
private _output = [ELSTRING(medical,Check_Response_Unresponsive), ELSTRING(medical,Check_Response_Responsive)] select ([_target] call EFUNC(common,isAwake));
|
||||
private _output = [ELSTRING(medical,Check_Response_Unresponsive), ELSTRING(medical,Check_Response_Responsive)] select (_target call EFUNC(common,isAwake));
|
||||
|
||||
[QEGVAR(common,displayTextStructured), [[_output, [_target] call EFUNC(common,getName)], 2, _caller], [_caller]] call CBA_fnc_targetEvent;
|
||||
[QEGVAR(common,displayTextStructured), [[_output, _target call EFUNC(common,getName)], 2, _caller], _caller] call CBA_fnc_targetEvent;
|
||||
|
||||
[_target ,"activity", _output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||
[_target, "quick_view", _output, [[_target, false, true] call EFUNC(common,getName)]] call FUNC(addToLog);
|
||||
|
Loading…
Reference in New Issue
Block a user