-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Circulation - Add/Change BP and HR default behavior #602
Open
Cplhardcore
wants to merge
12
commits into
KAT-Advanced-Medical:dev-Tomcat
Choose a base branch
from
Cplhardcore:BP_Cuff
base: dev-Tomcat
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
30d972f
Initial (YAY)
Cplhardcore 54ba560
Fixed stringtables
Cplhardcore e8c90f1
why were you changed???
Cplhardcore e5b6e0d
changes to mass
Cplhardcore 9f24b4b
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into BP_Cuff
Cplhardcore c1669dd
Fixes
Cplhardcore b54ece6
small fix
Cplhardcore 13a1a43
small fix
Cplhardcore 6d7be26
Fixes
Cplhardcore 8a884ae
fixes 2
Cplhardcore 7447e1a
Update addons/circulation/functions/fnc_checkBloodPressureCuffLocal.sqf
Cplhardcore cafa460
Update ACE_Medical_Treatment_Actions.hpp
Cplhardcore File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Glowbal | ||
* Checks the blood pressure of the patient. | ||
* | ||
* Arguments: | ||
* 0: Medic <OBJECT> | ||
* 1: Patient <OBJECT> | ||
* 2: Body Part <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [player, cursorObject, "LeftArm"] call kat_circulation_fnc_checkBloodPressure | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_medic", "_patient", "_bodyPart"]; | ||
|
||
[QGVAR(checkBloodPressureLocal), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; |
22 changes: 22 additions & 0 deletions
22
addons/circulation/functions/fnc_checkBloodPressureCuff.sqf
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,22 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Glowbal modified by Cplhardcore | ||
* Checks the blood pressure of the patient. | ||
* | ||
* Arguments: | ||
* 0: Medic <OBJECT> | ||
* 1: Patient <OBJECT> | ||
* 2: Body Part <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [player, cursorObject, "LeftArm"] call kat_circulation_fnc_checkBloodPressure | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_medic", "_patient", "_bodyPart"]; | ||
|
||
[QGVAR(checkBloodPressureCuffLocal), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; |
41 changes: 41 additions & 0 deletions
41
addons/circulation/functions/fnc_checkBloodPressureCuffLocal.sqf
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,41 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Glowbal modified by Cplhardcore | ||
* Local callback for checking the blood pressure of a patient. | ||
* | ||
* Arguments: | ||
* 0: Medic <OBJECT> | ||
* 1: Patient <OBJECT> | ||
* 2: Body Part <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [player, cursorObject, "LeftArm"] call kat_circulation_fnc_checkBloodPressureCuffLocal | ||
* | ||
* Public: No | ||
*/ | ||
|
||
|
||
params ["_medic", "_patient", "_bodyPart"]; | ||
|
||
private _bloodPressure = [0, 0]; | ||
|
||
if (alive _patient && {!([_patient, _bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo))}) then { | ||
_bloodPressure = [_patient] call FUNC(getBloodPressure); | ||
}; | ||
|
||
private _bloodPressureOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_Output_6); | ||
private _logOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_NoBloodpressure); | ||
|
||
_bloodPressure params ["_bloodPressureLow", "_bloodPressureHigh"]; | ||
|
||
if (_bloodPressureHigh > 20) then { | ||
_bloodPressureOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_Output_1); | ||
_logOutput = format ["%1/%2", round _bloodPressureHigh, round _bloodPressureLow]; | ||
}; | ||
Cplhardcore marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[_patient, "quick_view", ACELSTRING(medical_treatment,Check_Bloodpressure_Log), [_medic call ACEFUNC(common,getName), _logOutput]] call ACEFUNC(medical_treatment,addToLog); | ||
|
||
[QACEGVAR(common,displayTextStructured), [[_bloodPressureOutput, _patient call ACEFUNC(common,getName), round _bloodPressureHigh, round _bloodPressureLow], 1.75, _medic], _medic] call CBA_fnc_targetEvent; |
57 changes: 57 additions & 0 deletions
57
addons/circulation/functions/fnc_checkBloodPressureLocal.sqf
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,57 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Glowbal modified by Cplhardcore | ||
* Local callback for checking the blood pressure of a patient. | ||
* | ||
* Arguments: | ||
* 0: Medic <OBJECT> | ||
* 1: Patient <OBJECT> | ||
* 2: Body Part <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [player, cursorObject, "LeftArm"] call kat_circulation_fnc_checkBloodPressureLocal | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_medic", "_patient", "_bodyPart"]; | ||
|
||
private _bloodPressure = [0, 0]; | ||
|
||
if (alive _patient && {!([_patient, _bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo))}) then { | ||
_bloodPressure = [_patient] call FUNC(getBloodPressure); | ||
}; | ||
|
||
private _bloodPressureOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_Output_6); | ||
private _logOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_NoBloodpressure); | ||
|
||
_bloodPressure params ["_bloodPressureLow", "_bloodPressureHigh"]; | ||
|
||
if (_bloodPressureLow > 40) then { | ||
if (_medic call ACEFUNC(medical_treatment,isMedic)) then { | ||
_bloodPressureOutput = LSTRING(Check_Bloodpressure_Output_Palp); | ||
_logOutput = format [LLSTRING(Bloodpressure_Output_Palp), (round (_bloodPressureLow / 10) * 10) + ([10, -10] select (random 1 > 0.5))]; | ||
} else { | ||
if (_bloodPressureHigh > 20) then { | ||
_bloodPressureOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_Output_2); | ||
_logOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_Low); | ||
|
||
if (_bloodPressureHigh > 100) then { | ||
_bloodPressureOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_Output_3); | ||
_logOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_Normal); | ||
|
||
if (_bloodPressureHigh > 160) then { | ||
_bloodPressureOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_Output_4); | ||
_logOutput = ACELSTRING(medical_treatment,Check_Bloodpressure_High); | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
[_patient, "quick_view", ACELSTRING(medical_treatment,Check_Bloodpressure_Log), [_medic call ACEFUNC(common,getName), _logOutput]] call ACEFUNC(medical_treatment,addToLog); | ||
|
||
[QACEGVAR(common,displayTextStructured), [[_bloodPressureOutput, _patient call ACEFUNC(common,getName), round _bloodPressureHigh, round _bloodPressureLow], 1.75, _medic], _medic] call CBA_fnc_targetEvent; |
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,22 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Glowbal modified by Cplhardcore | ||
* Checks the pulse or heart rate of the patient. | ||
* | ||
* Arguments: | ||
* 0: Medic <OBJECT> | ||
* 1: Patient <OBJECT> | ||
* 2: Body Part <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [player, cursorObject, "Head"] call kat_circulation_fnc_checkPulse | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_medic", "_patient", "_bodyPart"]; | ||
|
||
[QGVAR(checkPulseLocal), [_medic, _patient, _bodyPart], _patient] call CBA_fnc_targetEvent; |
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,61 @@ | ||
#include "..\script_component.hpp" | ||
/* | ||
* Author: Glowbal | ||
* Local callback for checking the pulse or heart rate of a patient. | ||
* | ||
* Arguments: | ||
* 0: Medic <OBJECT> | ||
* 1: Patient <OBJECT> | ||
* 2: Body Part <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [player, cursorObject, "Head"] call ace_medical_treatment_fnc_checkPulseLocal | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_medic", "_patient", "_bodyPart"]; | ||
|
||
private _heartRate = 0; | ||
|
||
if !([_patient, _bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo)) then { | ||
_heartRate = switch (true) do { | ||
case (alive _patient): { | ||
GET_HEART_RATE(_patient) | ||
}; | ||
case (alive (_patient getVariable [QACEGVAR(medical,CPR_provider), objNull])): { | ||
random [100, 110, 120] // fake heart rate because patient is dead and off state machine | ||
}; | ||
default { 0 }; | ||
}; | ||
}; | ||
|
||
private _heartRateOutput = ACELSTRING(medical_treatment,Check_Pulse_Output_5); | ||
private _logOutput = ACELSTRING(medical_treatment,Check_Pulse_None); | ||
|
||
if (_heartRate > 1) then { | ||
if (_medic call ACEFUNC(medical_treatment,isMedic)) then { | ||
_heartRateOutput = LSTRING(Check_Pulse_Output); | ||
_logOutput = format [LLSTRING(Pulse_Output), (round(_heartRateOutput / 5) * 5)]; | ||
} else { | ||
_heartRateOutput = ACELSTRING(medical_treatment,Check_Pulse_Output_2); | ||
_logOutput = ACELSTRING(medical_treatment,Check_Pulse_Weak); | ||
|
||
if (_heartRate > 60) then { | ||
if (_heartRate > 100) then { | ||
_heartRateOutput = ACELSTRING(medical_treatment,Check_Pulse_Output_3); | ||
_logOutput = ACELSTRING(medical_treatment,Check_Pulse_Strong); | ||
} else { | ||
_heartRateOutput = ACELSTRING(medical_treatment,Check_Pulse_Output_4); | ||
_logOutput = ACELSTRING(medical_treatment,Check_Pulse_Normal); | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
[_patient, "quick_view", ACELSTRING(medical_treatment,Check_Pulse_Log), [_medic call ACEFUNC(common,getName), _logOutput]] call ACEFUNC(medical_treatment,addToLog); | ||
|
||
[QEGVAR(common,displayTextStructured), [[_heartRateOutput, _patient call ACEFUNC(common,getName), round _heartRate], 1.5, _medic], _medic] call CBA_fnc_targetEvent; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo should inherit from CheckBloodPressure