-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breathing - Improve Check Breathing action (#400)
**When merged this pull request will:** - Rename Breath Check to Check Breathing - Move Check Breathing action to Breathing addon - Make action diagnose breathing (chest injury) in addition to checking smell (kidney function)
- Loading branch information
1 parent
baa8575
commit 18ce633
Showing
9 changed files
with
108 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
PREP(canUseBVM); | ||
PREP(checkBreathing); | ||
PREP(checkPulseOximeter); | ||
PREP(handleBreathing); | ||
PREP(handlePulmoHit); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 1LT.Mazinski.H | ||
* Modified: Blue | ||
* Check how patient is breathing and the patient's PH levels | ||
* | ||
* Arguments: | ||
* 0: Medic <OBJECT> | ||
* 1: Patient <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [player, cursorObject] call kat_breathing_fnc_checkBreathing; | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_medic", "_patient"]; | ||
|
||
private _ph = _patient getVariable [QEGVAR(pharma,pH), 1500]; | ||
private _hr = GET_HEART_RATE(_patient); | ||
private _output = ""; | ||
private _output_log = ""; | ||
|
||
private _breathing = LLSTRING(breathing_isNormal); | ||
private _breathing_log = localize ACELSTRING(medical_treatment,Check_Pulse_Normal); | ||
private _breath = ""; | ||
|
||
if (_patient getVariable [QGVAR(pneumothorax), false]) then { | ||
_breathing = LLSTRING(breathing_isShallow); | ||
_breathing_log = LLSTRING(breathing_shallow); | ||
}; | ||
|
||
if (_ph < 750) then { | ||
_breath = LLSTRING(breath_mild); | ||
|
||
if (_ph < 250) then { | ||
_breath = LLSTRING(breath_stink); | ||
}; | ||
}; | ||
|
||
_output = format ["%1%2", _breathing ,_breath]; | ||
_output_log = format ["%1%2", _breathing_log, _breath]; | ||
|
||
if (_hr == 0 || !(alive _patient) || _patient getVariable [QEGVAR(airway,obstruction), false] || _patient getVariable [QEGVAR(airway,occluded), false] || _patient getVariable [QGVAR(hemopneumothorax), false] || _patient getVariable [QGVAR(tensionpneumothorax), false]) then { | ||
_output = LLSTRING(breathing_none); | ||
_output_log = ACELSTRING(medical_treatment,Check_Pulse_None); | ||
}; | ||
|
||
[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); | ||
|
||
[_patient, "quick_view", LSTRING(CheckBreathing_Log), [[_medic] call ACEFUNC(common,getName), _output_log]] call ACEFUNC(medical_treatment,addToLog); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters