Skip to content

Commit

Permalink
Merge branch 'KAT-Advanced-Medical:dev-Tomcat' into dev-Tomcat
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanrod-Bones authored Aug 30, 2024
2 parents 18ef9e2 + 07a86c7 commit aaccf7d
Show file tree
Hide file tree
Showing 184 changed files with 4,703 additions and 1,009 deletions.
3 changes: 0 additions & 3 deletions addons/airway/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ if !(GVAR(enable)) exitWith {};

private _alive = alive _unit;
if ((!_alive) || (_unit getVariable [GVAR(string_exit), ""] isEqualTo "keko_wasPunched") || KAT_forceWakeup) exitWith {};
if (EGVAR(breathing,enable)) then {
[QEGVAR(breathing,handleBreathing), [_unit, CBA_missionTime], _unit] call CBA_fnc_targetEvent;
};
[_unit] call FUNC(handleAirway);
[_unit] call FUNC(handlePuking);
}] call CBA_fnc_addEventHandler;
2 changes: 0 additions & 2 deletions addons/breathing/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
PREP(canUseBVM);
PREP(checkBreathing);
PREP(checkPulseOximeter);
PREP(getETCo2);
PREP(getRespiratoryRate);
PREP(fullHealLocal);
PREP(gui_updateBodyImage);
PREP(gui_updateInjuryListPart);
Expand Down
6 changes: 3 additions & 3 deletions addons/breathing/functions/fnc_checkBreathing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

params ["_medic", "_patient"];

private _ph = _patient getVariable [QEGVAR(pharma,pH), 1500];
private _ph = GET_PH(_patient);
private _hr = GET_HEART_RATE(_patient);
private _output = "";
private _output_log = "";
Expand All @@ -33,10 +33,10 @@ if (_patient getVariable [QGVAR(pneumothorax), 0] > 0) then {
_breathing_log = LLSTRING(breathing_shallow);
};

if (_ph < 750) then {
if (_ph < 7.2) then {
_breath = LLSTRING(breath_mild);

if (_ph < 250) then {
if (_ph < 6.9) then {
_breath = LLSTRING(breath_stink);
};
};
Expand Down
1 change: 0 additions & 1 deletion addons/breathing/functions/fnc_fullHealLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ _patient setVariable [QGVAR(tensionpneumothorax), false, true];
_patient setVariable [QGVAR(activeChestSeal), false, true];
_patient setVariable [QGVAR(deepPenetratingInjury), false, true];
_patient setVariable [QGVAR(etco2Monitor), [], true];
_patient setVariable [QGVAR(etco2Level), 40, true];
_patient setVariable [QGVAR(breathRate), 15, true];
_patient setVariable [QGVAR(nasalCannula), false, true];

Expand Down
78 changes: 0 additions & 78 deletions addons/breathing/functions/fnc_getETCo2.sqf

This file was deleted.

62 changes: 0 additions & 62 deletions addons/breathing/functions/fnc_getRespiratoryRate.sqf

This file was deleted.

1 change: 0 additions & 1 deletion addons/breathing/functions/fnc_handlePulmoHit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) then {
if (_unit getVariable [QGVAR(pneumothorax), 0] isEqualto 0 && !(_unit getVariable [QGVAR(tensionpneumothorax), false])) then { // Initial pneumothorax
// add breathing sound
[_unit, 0.2] call ACEFUNC(medical_status,adjustPainLevel);
[_unit] call FUNC(handleBreathing);
_unit setVariable [QGVAR(pneumothorax), 1, true];
_unit setVariable [QGVAR(deepPenetratingInjury), true, true];
_unit setVariable [QGVAR(activeChestSeal), false, true];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ _patient setVariable [QGVAR(PulseOximeter_Attached), _attachedPulseOximeter, tru
};

private _HR = GET_HEART_RATE(_patient);
private _SpO2 = _patient getVariable [QGVAR(airwayStatus), 100];
private _SpO2 = GET_SPO2(_patient);

if (([_patient,_bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo))) then {
_HR = 0;
Expand All @@ -58,7 +58,7 @@ _patient setVariable [QGVAR(PulseOximeter_Attached), _attachedPulseOximeter, tru
[_idPFH] call CBA_fnc_removePerFrameHandler;
};

private _SpO2 = _patient getVariable [QGVAR(airwayStatus), 100];
private _SpO2 = GET_SPO2(_patient);

if (([_patient,_bodyPart] call ACEFUNC(medical_treatment,hasTourniquetAppliedTo))) then {
_SpO2 = 0;
Expand Down
3 changes: 0 additions & 3 deletions addons/chemical/functions/fnc_afterWait.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ if ((goggles _unit) in (missionNamespace getVariable [QGVAR(availGasmaskList), [
_unit setVariable [QGVAR(airPoisoning), true, true];
};
};
[_unit] call EFUNC(breathing,handleBreathing);
_isinGas = false;
};

Expand All @@ -69,7 +68,6 @@ if ((goggles _unit) in (missionNamespace getVariable [QGVAR(availGasmaskList), [
_unit setVariable [QGVAR(airPoisoning), true, true];
};
};
[_unit] call EFUNC(breathing,handleBreathing);
_isinGas = false;
};

Expand All @@ -93,6 +91,5 @@ if ((goggles _unit) in (missionNamespace getVariable [QGVAR(availGasmaskList), [
_unit setVariable [QGVAR(airPoisoning), true, true];
};
};
[_unit] call EFUNC(breathing,handleBreathing);
};
};
2 changes: 1 addition & 1 deletion addons/chemical/functions/fnc_breathing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ params ["_unit"];
[_handler] call CBA_fnc_removePerFrameHandler;
[_unit] call FUNC(breathing);
} else {
if (GET_PAIN_PERCEIVED(_unit) >= 0.4 || {_unit getVariable[QACEGVAR(medical,heartrate), 80] >= 105}) then {
if (GET_PAIN_PERCEIVED(_unit) >= 0.4) || (_unit getVariable[QACEGVAR(medical,heartrate), 80] >= 105) then {
_unit say3D QGVAR(mask_breath_heavy);
} else {
private _random = selectRandom[QGVAR(mask_breath_1), QGVAR(mask_breath_2)];
Expand Down
12 changes: 10 additions & 2 deletions addons/circulation/ACE_Medical_Treatment_Actions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ACE_Medical_Treatment_Actions {
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
allowSelfTreatment = QGVAR(enable_selfBloodDraw);
category = "advanced";
medicRequired = 0;
medicRequired = 1;
consumeItem = 1;
callbackSuccess = QUOTE([ARR_3(_medic,_patient,500)] call FUNC(drawBlood));
condition = QUOTE([ARR_3(_medic,_patient,500)] call FUNC(canDraw) && (!(EGVAR(pharma,RequireInsIVBloodDraw)) || EFUNC(pharma,removeIV)));
Expand All @@ -54,7 +54,7 @@ class ACE_Medical_Treatment_Actions {
allowedSelections[] = {"LeftArm", "RightArm", "LeftLeg", "RightLeg"};
allowSelfTreatment = QGVAR(enable_selfBloodDraw);
category = "advanced";
medicRequired = 0;
medicRequired = 1;
consumeItem = 1;
callbackSuccess = QUOTE([ARR_3(_medic,_patient,250)] call FUNC(drawBlood));
condition = QUOTE([ARR_3(_medic,_patient,250)] call FUNC(canDraw) && (!(EGVAR(pharma,RequireInsIVBloodDraw)) || EFUNC(pharma,removeIV)));
Expand All @@ -63,6 +63,14 @@ class ACE_Medical_Treatment_Actions {
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"};
};
class DrawArterial: KAT_DrawBlood250 {
displayName = CSTRING(DrawArterial_Action_Use);
displayNameProgress = CSTRING(DrawBlood_Action_Progress);
treatmentTime = 10;
callbackSuccess = QFUNC(drawArterial);
condition = "true";
items[] = {"kat_IV_16"};
};

#include "Blood_Medical.hpp"

Expand Down
Loading

0 comments on commit aaccf7d

Please sign in to comment.