From 69fa7a0552bb3a407477d07f31941b1f99c87ed5 Mon Sep 17 00:00:00 2001
From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com>
Date: Sun, 29 Dec 2024 20:14:04 -0800
Subject: [PATCH 01/16] Initial
---
.../ACE_Medical_Treatment_Actions.hpp | 88 +++++++++++++--
addons/breathing/CfgVehicles.hpp | 2 +-
addons/breathing/CfgWeapons.hpp | 2 +-
addons/breathing/XEH_PREP.hpp | 6 +-
addons/breathing/XEH_postInit.sqf | 2 +
addons/breathing/XEH_preInit.sqf | 18 ++++
.../functions/fnc_checkBreathing.sqf | 4 +-
.../breathing/functions/fnc_fullHealLocal.sqf | 10 +-
.../functions/fnc_gui_updateBodyImage.sqf | 30 +++++-
.../fnc_gui_updateInjuryListPart.sqf | 46 ++++----
.../functions/fnc_handleBreathing.sqf | 6 +-
.../fnc_handlePneumothoraxDeterioration.sqf | 78 ++++++++------
.../functions/fnc_handlePulmoHit.sqf | 22 ++--
.../fnc_inflictAdvancedPneumothorax.sqf | 28 +++--
.../breathing/functions/fnc_inspectChest.sqf | 11 +-
.../breathing/functions/fnc_listenLungs.sqf | 6 +-
.../fnc_treatmentAdvanced_chestSeal.sqf | 4 +-
.../fnc_treatmentAdvanced_chestSealLocal.sqf | 32 ++++--
...c_treatmentAdvanced_fingerThoracostomy.sqf | 29 +++++
...atmentAdvanced_fingerThoracostomyLocal.sqf | 59 ++++++++++
...tmentAdvanced_hardcorehemopneumothorax.sqf | 29 +++++
...Advanced_hardcorehemopneumothoraxLocal.sqf | 59 ++++++++++
...fnc_treatmentAdvanced_hemopneumothorax.sqf | 4 +-
...reatmentAdvanced_hemopneumothoraxLocal.sqf | 33 ++++--
..._treatmentAdvanced_tensionpneumothorax.sqf | 4 +-
...tmentAdvanced_tensionpneumothoraxLocal.sqf | 26 +++--
addons/breathing/stringtable.xml | 101 ++++++++++++++----
.../functions/fnc_updateInternalBleeding.sqf | 2 +-
.../feedback/functions/fnc_handleEffects.sqf | 3 +-
.../data/body_image/torso_rightchestseal.paa | Bin 0 -> 25925 bytes
.../body_image/torso_rightpneumothorax.paa | Bin 0 -> 24305 bytes
addons/gui/gui.hpp | 11 ++
addons/gui/gui_defines.hpp | 2 +
addons/main/script_macros.hpp | 3 +-
.../functions/fnc_ultraAssessmentLocal.sqf | 20 +++-
addons/surgery/stringtable.xml | 55 ++++------
.../functions/fnc_handleOxygenFunction.sqf | 2 +-
37 files changed, 640 insertions(+), 197 deletions(-)
create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf
create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf
create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothorax.sqf
create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal.sqf
create mode 100644 addons/gui/data/body_image/torso_rightchestseal.paa
create mode 100644 addons/gui/data/body_image/torso_rightpneumothorax.paa
diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp
index c355b107e..a1999c9d6 100644
--- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp
+++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp
@@ -9,7 +9,7 @@ class ACE_Medical_Treatment_Actions {
category = "airway";
medicRequired = 0;
consumeItem = 0;
- callbackStart = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),true,true)]; [ARR_2(_medic,_patient)] call FUNC(listenLungs));
+ callbackStart = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),true,true)]; [ARR_3(_medic,_patient,0)] call FUNC(listenLungs));
callbackSuccess = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]);
callbackProgress = "";
callbackFailure = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]);
@@ -19,6 +19,10 @@ class ACE_Medical_Treatment_Actions {
animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"};
};
+ class ListenToRightLungs: ListenToLungs {
+ displayName = CSTRING(auscultateRightLung_display);
+ callbackStart = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),true,true)]; [ARR_3(_medic,_patient,1)] call FUNC(listenLungs));
+ };
class CheckBreathing: CheckPulse {
displayName = CSTRING(Check_Breathing);
displayNameProgress = CSTRING(Check_Breathing_Progress);
@@ -109,7 +113,7 @@ class ACE_Medical_Treatment_Actions {
treatmentTime = 7;
items[] = {"kat_chestSeal"};
condition = "true";
- callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_chestSeal););
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_chestSeal););
callbackFailure = "";
callbackProgress = "";
consumeItem = 1;
@@ -122,6 +126,10 @@ class ACE_Medical_Treatment_Actions {
animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = {};
};
+ class RightChestSeal: ChestSeal {
+ displayName = CSTRING(rightchestseal_display);
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,1)] call FUNC(treatmentAdvanced_chestSeal););
+ };
class HemopneumothoraxTreatment {
displayName = CSTRING(hemopneumothorax_display);
displayNameProgress = CSTRING(treating);
@@ -132,8 +140,8 @@ class ACE_Medical_Treatment_Actions {
medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment);
treatmentTime = 7;
items[] = {"kat_aatKit"};
- condition = "true";
- callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_hemopneumothorax););
+ condition = !QGVAR(hardcoreBreathingTreatment);
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_hemopneumothorax););
callbackFailure = "";
callbackProgress = "";
consumeItem = 1;
@@ -146,6 +154,66 @@ class ACE_Medical_Treatment_Actions {
animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = {};
};
+ class RightHemopneumothoraxTreatment: HemopneumothoraxTreatment {
+ displayName = CSTRING(righthemopneumothorax_display);
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,1)] call FUNC(treatmentAdvanced_hemopneumothorax););
+ };
+ class FingerThoracostomy {
+ displayName = CSTRING(FingerThoracostomy_display);
+ displayNameProgress = CSTRING(treating);
+ category = "airway";
+ treatmentLocations = 0;
+ allowedSelections[] = {"Body"};
+ allowSelfTreatment = 0;
+ medicRequired = QGVAR(medLvl_FingerThoracostomyTreatment);
+ treatmentTime = 12;
+ items[] = {"kat_scalpel"};
+ condition = QGVAR(hardcoreBreathingTreatment);
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_FingerThoracostomy););
+ callbackFailure = "";
+ callbackProgress = "";
+ consumeItem = 1;
+ animationPatient = "";
+ animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
+ animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"};
+ animationMedic = "AinvPknlMstpSlayWrflDnon_medicOther";
+ animationMedicProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
+ animationMedicSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
+ animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
+ litter[] = {};
+ };
+ class RightFingerThoracostomy: FingerThoracostomy{
+ displayName = CSTRING(FingerThoracostomyRight_display);
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,1)] call FUNC(treatmentAdvanced_FingerThoracostomy););
+ };
+ class HardcoreHemopneumothoraxTreatment {
+ displayName = CSTRING(hemopneumothorax_display);
+ displayNameProgress = CSTRING(treating);
+ category = "airway";
+ treatmentLocations = 0;
+ allowedSelections[] = {"Body"};
+ allowSelfTreatment = 0;
+ medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment);
+ treatmentTime = 20;
+ items[] = {"kat_aatKit"};
+ condition = QGVAR(hardcoreBreathingTreatment);
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_hemopneumothorax););
+ callbackFailure = "";
+ callbackProgress = "";
+ consumeItem = 1;
+ animationPatient = "";
+ animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback";
+ animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"};
+ animationMedic = "AinvPknlMstpSlayWrflDnon_medicOther";
+ animationMedicProne = "AinvPpneMstpSlayW[wpn]Dnon_medicOther";
+ animationMedicSelf = "AinvPknlMstpSlayW[wpn]Dnon_medic";
+ animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
+ litter[] = {};
+ };
+ class HardcoreRightHemopneumothoraxTreatment: HardcoreHemopneumothoraxTreatment {
+ displayName = CSTRING(hemopneumothoraxRight_display);
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,1)] call FUNC(treatmentAdvanced_hemopneumothorax););
+ };
class TensionpneumothoraxTreatment {
displayName = CSTRING(tensionpneumothorax_display);
displayNameProgress = CSTRING(treating);
@@ -157,7 +225,7 @@ class ACE_Medical_Treatment_Actions {
treatmentTime = 7;
items[] = {"kat_aatKit"};
condition = "true";
- callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax););
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_tensionpneumothorax););
callbackFailure = "";
callbackProgress = "";
consumeItem = 1;
@@ -170,6 +238,10 @@ class ACE_Medical_Treatment_Actions {
animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = {};
};
+ class RightTensionpneumothoraxTreatment: TensionpneumothoraxTreatment{
+ displayName = CSTRING(righttensionpneumothorax_display);
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,1)] call FUNC(treatmentAdvanced_tensionpneumothorax););
+ };
class ncdKit: TensionpneumothoraxTreatment {
displayName = CSTRING(tensionpneumothoraxNCDKit_display);
displayNameProgress = CSTRING(treating);
@@ -181,7 +253,7 @@ class ACE_Medical_Treatment_Actions {
treatmentTime = 7;
items[] = {"kat_ncdKit"};
condition = "true";
- callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax););
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_tensionpneumothorax););
callbackFailure = "";
callbackProgress = "";
consumeItem = 1;
@@ -194,6 +266,10 @@ class ACE_Medical_Treatment_Actions {
animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic";
litter[] = {};
};
+ class RightncdKit: TensionpneumothoraxTreatment {
+ displayName = CSTRING(righttensionpneumothoraxNCDKit_display);
+ callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,1)] call FUNC(treatmentAdvanced_tensionpneumothorax););
+ };
class DisablePulseOximeterAudio {
displayName = CSTRING(PulseOximeter_Action_removeSound);
displayNameProgress = "";
diff --git a/addons/breathing/CfgVehicles.hpp b/addons/breathing/CfgVehicles.hpp
index 5b5410c84..71e284543 100644
--- a/addons/breathing/CfgVehicles.hpp
+++ b/addons/breathing/CfgVehicles.hpp
@@ -26,7 +26,7 @@ class CfgVehicles {
class kat_chestSealItem: Item_Base_F {
scope = 2;
scopeCurator = 2;
- displayName= CSTRING(chestseal_display);
+ displayName= CSTRING(chestseal_item_display);
author = "Katalam";
vehicleClass = "Items";
class TransportItems {
diff --git a/addons/breathing/CfgWeapons.hpp b/addons/breathing/CfgWeapons.hpp
index 51075d00a..b50e54846 100644
--- a/addons/breathing/CfgWeapons.hpp
+++ b/addons/breathing/CfgWeapons.hpp
@@ -32,7 +32,7 @@ class CfgWeapons {
scopeCurator = 2;
scopeArsenal = 2;
author = "Katalam";
- displayName = CSTRING(chestseal_display);
+ displayName = CSTRING(chestseal_item_display);
descriptionShort = CSTRING(chestseal_desc);
picture = QPATHTOF(ui\chest-seal.paa);
ACE_isMedicalItem = 1;
diff --git a/addons/breathing/XEH_PREP.hpp b/addons/breathing/XEH_PREP.hpp
index 6c4614e16..84f69a9b0 100644
--- a/addons/breathing/XEH_PREP.hpp
+++ b/addons/breathing/XEH_PREP.hpp
@@ -26,6 +26,10 @@ PREP(refillOxygenTank);
PREP(removeOxygenMask);
PREP(treatmentAdvanced_chestSeal);
PREP(treatmentAdvanced_chestSealLocal);
+PREP(treatmentAdvanced_fingerThoracostomy);
+PREP(treatmentAdvanced_fingerThoracostomyLocal);
+PREP(treatmentAdvanced_hardcorehemopneumothorax);
+PREP(treatmentAdvanced_hardcorehemopneumothoraxLocal);
PREP(treatmentAdvanced_hemopneumothorax);
PREP(treatmentAdvanced_hemopneumothoraxLocal);
PREP(treatmentAdvanced_nasalCannula);
@@ -37,4 +41,4 @@ PREP(treatmentAdvanced_removeNasalCannulaLocal);
PREP(treatmentAdvanced_removePulseoximeter);
PREP(treatmentAdvanced_tensionpneumothorax);
PREP(treatmentAdvanced_tensionpneumothoraxLocal);
-PREP(useBVM);
\ No newline at end of file
+PREP(useBVM);
diff --git a/addons/breathing/XEH_postInit.sqf b/addons/breathing/XEH_postInit.sqf
index 62efb8271..43df13d69 100644
--- a/addons/breathing/XEH_postInit.sqf
+++ b/addons/breathing/XEH_postInit.sqf
@@ -3,7 +3,9 @@
[QGVAR(pulseoxLocal), LINKFUNC(treatmentAdvanced_pulseoximeterLocal)] call CBA_fnc_addEventHandler;
[QGVAR(chestSealLocal), LINKFUNC(treatmentAdvanced_chestSealLocal)] call CBA_fnc_addEventHandler;
[QGVAR(handleBreathing), LINKFUNC(handleBreathing)] call CBA_fnc_addEventHandler;
+[QGVAR(hardcorehemopneumothoraxLocal), LINKFUNC(treatmentAdvanced_hardcorehemopneumothoraxLocal)] call CBA_fnc_addEventHandler;
[QGVAR(hemopneumothoraxLocal), LINKFUNC(treatmentAdvanced_hemopneumothoraxLocal)] call CBA_fnc_addEventHandler;
+[QGVAR(fingerThoracostomyLocal), LINKFUNC(treatmentAdvanced_fingerThoracostomyLocal)] call CBA_fnc_addEventHandler;
[QGVAR(tensionpneumothoraxLocal), LINKFUNC(treatmentAdvanced_tensionpneumothoraxLocal)] call CBA_fnc_addEventHandler;
[QGVAR(cyanosisLocal), LINKFUNC(treatmentAdvanced_CyanosisLocal)] call CBA_fnc_addEventHandler;
[QGVAR(nasalCannulaLocal), LINKFUNC(treatmentAdvanced_nasalCannulaLocal)] call CBA_fnc_addEventHandler;
diff --git a/addons/breathing/XEH_preInit.sqf b/addons/breathing/XEH_preInit.sqf
index 128413d50..13e8083e1 100644
--- a/addons/breathing/XEH_preInit.sqf
+++ b/addons/breathing/XEH_preInit.sqf
@@ -567,4 +567,22 @@ PREP_RECOMPILE_END;
true
] call CBA_settings_fnc_init;
+[
+ QGVAR(medLvl_FingerThoracostomyTreatment),
+ "LIST",
+ LLSTRING(SETTING_FingerThoracostomyTreatment_medLvl),
+ [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)],
+ [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 0],
+ true
+] call CBA_settings_fnc_init;
+
+[
+ QGVAR(hardcoreBreathingTreatment),
+ "CHECKBOX",
+ [LLSTRING(SETTING_hardcoreBreathingTreatment),LLSTRING(SETTING_hardcoreBreathingTreatment_DESC)],
+ [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)],
+ [true],
+ true
+] call CBA_Settings_fnc_init;
+
ADDON = true;
diff --git a/addons/breathing/functions/fnc_checkBreathing.sqf b/addons/breathing/functions/fnc_checkBreathing.sqf
index 7f5042271..11bfc55d5 100644
--- a/addons/breathing/functions/fnc_checkBreathing.sqf
+++ b/addons/breathing/functions/fnc_checkBreathing.sqf
@@ -28,7 +28,7 @@ private _breathing = LLSTRING(breathing_isNormal);
private _breathing_log = localize ACELSTRING(medical_treatment,Check_Pulse_Normal);
private _breath = "";
-if ((_patient getVariable [QGVAR(pneumothorax), 0] > 0) || (_patient getVariable [QEGVAR(chemical,airPoisoning), false])) then {
+if ((_patient getVariable [QGVAR(pneumothorax), [0, 0]] select 0 > 0) || (_patient getVariable [QGVAR(pneumothorax), [0, 0]] select 1 > 0) || (_patient getVariable [QEGVAR(chemical,airPoisoning), false])) then {
_breathing = LLSTRING(breathing_isShallow);
_breathing_log = LLSTRING(breathing_shallow);
};
@@ -45,7 +45,7 @@ _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,overstretch), false])) || _patient getVariable [QEGVAR(airway,occluded), false] || _patient getVariable [QGVAR(hemopneumothorax), false] || _patient getVariable [QGVAR(tensionpneumothorax), false]) then {
+if (_hr == 0 || !(alive _patient) || (_patient getVariable [QEGVAR(airway,obstruction), false] && !(_patient getVariable [QEGVAR(airway,overstretch), false])) || _patient getVariable [QEGVAR(airway,occluded), false] || (_patient getVariable [QGVAR(tensionpneumothorax), [false, false]] select 0) || (_patient getVariable [QGVAR(tensionpneumothorax), [false, false]] select 1) ||(_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 1)) then {
_output = LLSTRING(breathing_none);
_output_log = ACELSTRING(medical_treatment,Check_Pulse_None);
};
diff --git a/addons/breathing/functions/fnc_fullHealLocal.sqf b/addons/breathing/functions/fnc_fullHealLocal.sqf
index 9791dd752..8dfaebccb 100644
--- a/addons/breathing/functions/fnc_fullHealLocal.sqf
+++ b/addons/breathing/functions/fnc_fullHealLocal.sqf
@@ -19,11 +19,11 @@ params ["_patient"];
TRACE_1("fullHealLocal",_patient);
_patient setVariable [QGVAR(airwayStatus), 100, true];
-_patient setVariable [QGVAR(pneumothorax), 0, true];
-_patient setVariable [QGVAR(hemopneumothorax), false, true];
-_patient setVariable [QGVAR(tensionpneumothorax), false, true];
-_patient setVariable [QGVAR(activeChestSeal), false, true];
-_patient setVariable [QGVAR(deepPenetratingInjury), false, true];
+_patient setVariable [QGVAR(pneumothorax), [0, 0], true];
+_patient setVariable [QGVAR(hemopneumothorax), [false, false], true];
+_patient setVariable [QGVAR(tensionpneumothorax), [false, false], true];
+_patient setVariable [QGVAR(activeChestSeal), [false, false], true];
+_patient setVariable [QGVAR(deepPenetratingInjury), [false, false], true];
_patient setVariable [QGVAR(etco2Monitor), [], true];
_patient setVariable [QGVAR(breathRate), 15, true];
_patient setVariable [QGVAR(nasalCannula), false, true];
diff --git a/addons/breathing/functions/fnc_gui_updateBodyImage.sqf b/addons/breathing/functions/fnc_gui_updateBodyImage.sqf
index 9f2e80f2a..bec69e507 100644
--- a/addons/breathing/functions/fnc_gui_updateBodyImage.sqf
+++ b/addons/breathing/functions/fnc_gui_updateBodyImage.sqf
@@ -23,26 +23,50 @@ private _ctrlPulseOximeterRight = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTARM
private _ctrlPulseOximeterLeft = _ctrlGroup controlsGroupCtrl IDC_BODY_LEFTARM_PULSEOX;
private _ctrlChestSeal = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_CHESTSEAL;
private _ctrlChestInjury = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_PNEUMOTHORAX;
+private _ctrlRightChestSeal = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_RIGHTCHESTSEAL;
+private _ctrlRightChestInjury = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_RIGHTPNEUMOTHORAX;
private _ctrlNasalCannula = _ctrlGroup controlsGroupCtrl IDC_BODY_HEAD_NASAL;
-if (_target getVariable [QGVAR(activeChestSeal), false]) then {
+private _pneumothoraxState = _target getVariable [QGVAR(pneumothorax), [0, 0]];
+private _activeChestSeal = _target getVariable [QGVAR(activeChestSeal), [false, false]];
+private _deepPenetratingInjury = _target getVariable [QGVAR(deepPenetratingInjury), [false, false]];
+
+
+if (_activeChestSeal select 0) then {
_ctrlChestSeal ctrlShow true;
} else {
_ctrlChestSeal ctrlShow false;
};
+if (_activeChestSeal select 1) then {
+ _ctrlRightChestSeal ctrlShow true;
+} else {
+ _ctrlRightChestSeal ctrlShow false;
+};
+
+//Check pneumothorax and injuries
if (GVAR(PneumothoraxAlwaysVisible)) then {
- if(_target getVariable [QGVAR(pneumothorax), 0] > 0) then {
+ if (_pneumothoraxState select 0 > 0) then {
_ctrlChestInjury ctrlShow true;
} else {
_ctrlChestInjury ctrlShow false;
};
+ if (_pneumothoraxState select 1 > 0) then {
+ _ctrlRightChestInjury ctrlShow true;
+ } else {
+ _ctrlRightChestInjury ctrlShow false;
+ };
} else {
- if (_target getVariable [QGVAR(deepPenetratingInjury), false] || (_target getVariable [QGVAR(pneumothorax), 0] > 0)) then {
+ if ((_deepPenetratingInjury select 0) || (_pneumothoraxState select 0 > 0)) then {
_ctrlChestInjury ctrlShow true;
} else {
_ctrlChestInjury ctrlShow false;
};
+ if ((_deepPenetratingInjury select 1) || (_pneumothoraxState select 1 > 0)) then {
+ _ctrlRightChestInjury ctrlShow true;
+ } else {
+ _ctrlRightChestInjury ctrlShow false;
+ };
};
if (_target getVariable [QGVAR(pulseoximeter), false]) then {
diff --git a/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf b/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf
index f17cf75a2..03a0291cd 100644
--- a/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf
+++ b/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf
@@ -56,37 +56,45 @@ if (_target getVariable [QGVAR(nasalCannula), false] && _selectionN isEqualTo 0)
private _ptxEntry = [];
+private _pneumothoraxState = _target getVariable [QGVAR(pneumothorax), [0, 0]];
+private _tensionState = _target getVariable [QGVAR(tensionpneumothorax), [false, false]];
+private _hemoState = _target getVariable [QGVAR(hemopneumothorax), [false, false]];
+
if (_selectionN isEqualTo 1) then {
private _tensionhemothorax = false;
+
if (!(GVAR(showPneumothorax_dupe))) then {
- if ((_target getVariable [QGVAR(hemopneumothorax), false]) || (_target getVariable [QGVAR(tensionpneumothorax), false])) then {
+ if ((_hemoState select 0 || _hemoState select 1) || (_tensionState select 0 || _tensionState select 1)) then {
_tensionhemothorax = true;
};
};
- if (_target getVariable [QGVAR(activeChestSeal), false]) then {
+ if ((_target getVariable [QGVAR(activeChestSeal), [false, false]] select 0) || (_target getVariable [QGVAR(activeChestSeal), [false, false]] select 1)) then {
_entries pushBack [LLSTRING(ChestSealApplied), [1,0.95,0,1]];
};
-
- if (GVAR(PneumothoraxAlwaysVisible)) then {
- if ((_target getVariable [QGVAR(pneumothorax), 0] > 0) && !(_tensionhemothorax)) then {
- _ptxEntry pushBack [LLSTRING(pneumothorax_mm), [1,1,1,1]];
- };
- } else {
- if (_target getVariable [QGVAR(deepPenetratingInjury), false]) then {
- _entries pushBack [LLSTRING(DeepPenetratingInjury), [1,0,0,1]];
+ {
+ private _side = _x;
+
+ if (GVAR(PneumothoraxAlwaysVisible)) then {
+ if ((_pneumothoraxState select _side > 0) && !(_tensionhemothorax)) then {
+ _ptxEntry pushBack [LLSTRING(pneumothorax_mm), [1,1,1,1]];
+ };
+ } else {
+ if (_target getVariable [QGVAR(deepPenetratingInjury), [false, false]] select _side) then {
+ _entries pushBack [LLSTRING(DeepPenetratingInjury), [1,0,0,1]];
+ };
};
- };
- if (GVAR(TensionHemothoraxAlwaysVisible)) then {
- if (_target getVariable [QGVAR(hemopneumothorax), false]) then {
- _ptxEntry pushBack [LLSTRING(hemopneumothorax_mm), [1,1,1,1]];
- };
+ if (GVAR(TensionHemothoraxAlwaysVisible)) then {
+ if (_hemoState select _side) then {
+ _ptxEntry pushBack [LLSTRING(hemopneumothorax_mm), [1,1,1,1]];
+ };
- if (_target getVariable [QGVAR(tensionpneumothorax), false]) then {
- _ptxEntry pushBack [LLSTRING(tensionpneumothorax_mm), [1,1,1,1]];
+ if (_tensionState select _side) then {
+ _ptxEntry pushBack [LLSTRING(tensionpneumothorax_mm), [1,1,1,1]];
+ };
};
- };
+ } forEach [0, 1];
};
-_target setVariable [QGVAR(gui_updateInjuryList_ptxEntries), _ptxEntry];
+_target setVariable [QGVAR(gui_updateInjuryList_ptxEntries), _ptxEntry];
\ No newline at end of file
diff --git a/addons/breathing/functions/fnc_handleBreathing.sqf b/addons/breathing/functions/fnc_handleBreathing.sqf
index 6c8beab49..a820d8bba 100644
--- a/addons/breathing/functions/fnc_handleBreathing.sqf
+++ b/addons/breathing/functions/fnc_handleBreathing.sqf
@@ -32,11 +32,11 @@ if (!local _unit) then {
_unit setVariable ["kat_O2Breathing_PFH", nil];
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
-
+
private _airway = true;
private _breathing = true;
- if ((_unit getVariable [QEGVAR(chemical,airPoisoning), false]) || (_unit getVariable [QGVAR(tensionpneumothorax), false]) || (_unit getVariable [QGVAR(hemopneumothorax), false])) then {
+ if ((_unit getVariable [QEGVAR(chemical,airPoisoning), false]) || (_unit getVariable [QGVAR(tensionpneumothorax), [false, false]] select 0) || (_unit getVariable [QGVAR(tensionpneumothorax), [false, false]] select 1) ||(_unit getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (_unit getVariable [QGVAR(hemopneumothorax), [false, false]] select 1)) then {
_breathing = false;
};
@@ -209,7 +209,7 @@ if (!local _unit) then {
};
};
- if ((_unit getVariable [QGVAR(pneumothorax), 0] > 0) || _unit getVariable [QGVAR(hemopneumothorax), false] || _unit getVariable [QGVAR(tensionpneumothorax), false]) then {
+ if ((_unit getVariable [QGVAR(tensionpneumothorax), [false, false]] select 0) || (_unit getVariable [QGVAR(tensionpneumothorax), [false, false]] select 1) ||(_unit getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (_unit getVariable [QGVAR(hemopneumothorax), [false, false]] select 1)) then {
if (!(_unit getVariable [QACEGVAR(medical,inCardiacArrest), false]) && !(_unit getVariable [QGVAR(PneumoBreathCooldownOn), false])) then {
_unit setVariable [QGVAR(PneumoBreathCooldownOn), true, true];
diff --git a/addons/breathing/functions/fnc_handlePneumothoraxDeterioration.sqf b/addons/breathing/functions/fnc_handlePneumothoraxDeterioration.sqf
index 0f9639ad6..5806ae30b 100644
--- a/addons/breathing/functions/fnc_handlePneumothoraxDeterioration.sqf
+++ b/addons/breathing/functions/fnc_handlePneumothoraxDeterioration.sqf
@@ -21,54 +21,68 @@ params ["_unit", "_chanceIncrease"];
[{
params ["_unit", "_chanceIncrease"];
- if (_unit getVariable [QGVAR(pneumothorax), 0] > 0) then {
+ private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]]; // Default: [0, 0] for both sides
+
+ if ((_pneumothoraxState select 0 > 0) || (_pneumothoraxState select 1 > 0)) then {
// Try to deteriorate at set interval
[{
+
params ["_args", "_idPFH"];
_args params ["_unit", "_chanceIncrease"];
+ private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]];
+ private _tensionState = _unit getVariable [QGVAR(tensionpneumothorax), [false, false]];
private _breathing = !(_unit getVariable [QEGVAR(airway,occluded), false]) && !(_unit getVariable [QEGVAR(airway,obstruction), false]) && (GET_HEART_RATE(_unit) > 20);
+ {
+ params ["_side"];
+ if (_pneumothoraxState select _side > 0) then {
+ // If patient is dead, treated, or already deteriorated to advanced pneumothorax, kill the PFH
+ if (_unit getVariable [QGVAR(hemopneumothorax), [false, false] select _side] ||
+ (_tensionState select _side) ||
+ !(alive _unit) ||
+ (_pneumothoraxState select _side isEqualTo 0)) exitWith {
+ [_idPFH] call CBA_fnc_removePerFrameHandler;
+ };
+
+ if (floor (random 100) < GVAR(deterioratingPneumothorax_chance) && _breathing) then {
+ private _ptxTarget = (_pneumothoraxState select _side) + 1;
+
+ if (_ptxTarget > 4) exitWith {
- // If patient is dead, already treated or has already deteriorated into advanced pneumothorax, kill the PFH
- if (_unit getVariable [QGVAR(hemopneumothorax), false] || _unit getVariable [QGVAR(tensionpneumothorax), false] || !(alive _unit) || _unit getVariable [QGVAR(pneumothorax), 0] isEqualTo 0) exitWith {
- [_idPFH] call CBA_fnc_removePerFrameHandler;
- };
- if (floor (random 100) < GVAR(deterioratingPneumothorax_chance) && _breathing) then {
- private _ptxTarget = (_unit getVariable [QGVAR(pneumothorax), 0]) + 1;
- // Once deteriorated far enough try to inflict advanced pneumothorax or if disabled kill the PFH
- if (_ptxTarget > 4) exitWith {
+ if (GVAR(PneumothoraxArrest)) then {
+ [{
- if (GVAR(PneumothoraxArrest)) then {
- [{
- params ["_args", "_idPFH"];
- _args params ["_unit"];
+ params ["_args", "_idPFH"];
+ _args params ["_unit", "_side"];
- if ((_unit getVariable [QGVAR(pneumothorax), 0]) == 4) then {
- private _ht = _unit getVariable [QEGVAR(circulation,ht), []];
- if ((_ht findIf {_x isEqualTo "tension"}) == -1) then {
- _ht pushBack "tension";
+ if ((_unit getVariable [QGVAR(pneumothorax), [0, 0]] select _side) == 4) then {
+ private _ht = _unit getVariable [QEGVAR(circulation,ht), []];
+ if ((_ht findIf {_x isEqualTo "tension"}) == -1) then {
+ _ht pushBack "tension";
- if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then {
- [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent;
+ if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then {
+ [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent;
+ };
+
+ _unit setVariable [QEGVAR(circulation,ht), _ht, true];
+ };
};
+ }, [_unit, _side], GVAR(arrestPneumothorax_interval)] call CBA_fnc_waitAndExecute;
+ };
- _unit setVariable [QEGVAR(circulation,ht), _ht, true];
- };
+ if (GVAR(advPtxEnable)) then {
+ [_unit, _chanceIncrease, true, _side] call FUNC(inflictAdvancedPneumothorax);
};
- }, [_unit], GVAR(arrestPneumothorax_interval)] call CBA_fnc_waitAndExecute;
- };
- if (GVAR(advPtxEnable)) then {
- [_unit, _chanceIncrease, true] call FUNC(inflictAdvancedPneumothorax);
+ [_idPFH] call CBA_fnc_removePerFrameHandler;
+ };
+ _pneumothoraxState set [_side, _ptxTarget];
+ _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true];
+ [_unit, 0.5 * (_ptxTarget / 4)] call ACEFUNC(medical_status,adjustPainLevel);
+ [_unit, -12, -12, format ["ptx_tension_%1", _side]] call EFUNC(circulation,updateBloodPressureChange);
};
-
- [_idPFH] call CBA_fnc_removePerFrameHandler;
};
-
- _unit setVariable [QGVAR(pneumothorax), _ptxTarget, true];
- [_unit, 0.5 * (_ptxTarget / 4)] call ACEFUNC(medical_status,adjustPainLevel); // Adjust pain based on severity
- [_unit, -12, -12, "ptx_tension"] call EFUNC(circulation,updateBloodPressureChange); // Simulate low blood pressure and high heart rate caused by pneumothorax
- };
+ } forEach [0, 1];
}, GVAR(deterioratingPneumothorax_interval), [_unit, _chanceIncrease]] call CBA_fnc_addPerFrameHandler;
};
}, [_unit, _chanceIncrease], GVAR(deterioratingPneumothorax_interval)] call CBA_fnc_waitAndExecute;
\ No newline at end of file
diff --git a/addons/breathing/functions/fnc_handlePulmoHit.sqf b/addons/breathing/functions/fnc_handlePulmoHit.sqf
index 0ef6580e2..cf9ee1f73 100644
--- a/addons/breathing/functions/fnc_handlePulmoHit.sqf
+++ b/addons/breathing/functions/fnc_handlePulmoHit.sqf
@@ -33,24 +33,26 @@ if (GVAR(pneumothoraxDamageThreshold_TakenDamage)) then {
};
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
+ private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]];
+ private _tensionState = _unit getVariable [QGVAR(tensionpneumothorax), [false, false]];
+ private _side = selectRandom [0, 1];
+
+ if (_pneumothoraxState select _side isEqualTo 0 && !(_tensionState select _side)) then {
[_unit, 0.2] call ACEFUNC(medical_status,adjustPainLevel);
- _unit setVariable [QGVAR(pneumothorax), 1, true];
+ _pneumothoraxState set [_side, 1];
+ _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true];
_unit setVariable [QGVAR(deepPenetratingInjury), true, true];
_unit setVariable [QGVAR(activeChestSeal), false, true];
- // Start deteriorating after delay
- [_unit, _chanceIncrease] call FUNC(handlePneumothoraxDeterioration);
+ [_unit, _chanceIncrease, _side] call FUNC(handlePneumothoraxDeterioration);
} else {
- if (_unit getVariable [QGVAR(tensionpneumothorax), false]) then { // If already afflicted with tensionpneumothorax -> fully deteriorate pneumothorax
- _unit setVariable [QGVAR(pneumothorax), 4, true];
+ if (_tensionState select _side) then {
+ _pneumothoraxState set [_side, 4];
+ _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true];
_unit setVariable [QGVAR(activeChestSeal), false, true];
-
} else {
if (GVAR(advPtxEnable)) then {
- // Roll chance to get advanced pneumothorax while afflicted with early stage of pneumothorax
- [_unit, _chanceIncrease] call FUNC(inflictAdvancedPneumothorax);
+ [_unit, _chanceIncrease, _side] call FUNC(inflictAdvancedPneumothorax);
};
};
};
diff --git a/addons/breathing/functions/fnc_inflictAdvancedPneumothorax.sqf b/addons/breathing/functions/fnc_inflictAdvancedPneumothorax.sqf
index fdc95a92e..249ab59e5 100644
--- a/addons/breathing/functions/fnc_inflictAdvancedPneumothorax.sqf
+++ b/addons/breathing/functions/fnc_inflictAdvancedPneumothorax.sqf
@@ -12,27 +12,33 @@
* None
*
* Example:
- * [player, 15, false] call kat_breathing_fnc_inflictAdvancedPneumothorax;
+ * [player, 15, 1, false] call kat_breathing_fnc_inflictAdvancedPneumothorax;
*
* Public: No
*/
-params ["_unit", "_chanceIncrease", ["_deteriorated", false]];
+params ["_unit", "_chanceIncrease", "_side", ["_deteriorated", false]];
-// Prevent the patient from getting both hemothorax and tension pneumothorax at the same time
-private _hemo = _unit getVariable [QGVAR(hemopneumothorax), false];
-private _tension = _unit getVariable [QGVAR(tensionpneumothorax), false];
-
-// Roll chance to get advanced pneumothorax or skip chance if deteriorated
+// Retrieve current state for the specified side
+private _pneumothoraxState = _unit getVariable [QGVAR(pneumothorax), [0, 0]];
+private _hemo = (_unit getVariable [QGVAR(hemopneumothorax), [false, false]]) select _side;
+private _tension = (_unit getVariable [QGVAR(tensionpneumothorax), [false, false]]) select _side;
if ((floor (random 100) < (GVAR(advPtxChance) + _chanceIncrease) || _deteriorated) && !(_hemo || _tension)) then {
[_unit, 0.7] call ACEFUNC(medical_status,adjustPainLevel);
if (floor (random 100) < GVAR(hptxChance)) then {
- _unit setVariable [QGVAR(hemopneumothorax), true, true];
- _unit setVariable [QGVAR(pneumothorax), 4, true];
+ _hemoState set [_side, true];
+ _unit setVariable [QGVAR(hemopneumothorax), _hemoState, true];
+
+ _pneumothoraxState set [_side, 4];
+ _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true];
+
[_unit] call EFUNC(circulation,updateInternalBleeding);
} else {
- _unit setVariable [QGVAR(tensionpneumothorax), true, true];
- _unit setVariable [QGVAR(pneumothorax), 4, true];
+ _tensionState set [_side, true];
+ _unit setVariable [QGVAR(tensionpneumothorax), _tensionState, true];
+
+ _pneumothoraxState set [_side, 4];
+ _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true];
};
};
\ No newline at end of file
diff --git a/addons/breathing/functions/fnc_inspectChest.sqf b/addons/breathing/functions/fnc_inspectChest.sqf
index 0d179cdeb..d3061676f 100644
--- a/addons/breathing/functions/fnc_inspectChest.sqf
+++ b/addons/breathing/functions/fnc_inspectChest.sqf
@@ -21,7 +21,8 @@ params ["_medic", "_patient"];
private _message = LLSTRING(inspectChest_normal);
private _messageLog = LLSTRING(inspectChest_normal);
-private _hasPneumothorax = (_patient getVariable [QGVAR(pneumothorax), 0] > 0 || _patient getVariable [QGVAR(tensionpneumothorax), false] || _patient getVariable [QGVAR(hemopneumothorax), false]);
+private _hasPneumothorax = (_patient getVariable [QGVAR(pneumothorax), [0, 0]] select 0 > 0 || _patient getVariable [QGVAR(pneumothorax), [0, 0]] select 1 > 0 ||
+ (_patient getVariable [QGVAR(tensionpneumothorax), [false, false]] select 0) || (_patient getVariable [QGVAR(tensionpneumothorax), [false, false]] select 1) ||(_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 1));
private _airwaySecure = (_patient getVariable [QEGVAR(airway,airway), false] && !(_patient getVariable [QEGVAR(airway,occluded), false]));
private _airwayClear = (!(_patient getVariable [QEGVAR(airway,obstruction), false]) || (_patient getVariable [QEGVAR(airway,obstruction), false] && _patient getVariable [QEGVAR(airway,overstretch), false])) && !(_patient getVariable [QEGVAR(airway,occluded), false]);
private _simpleSetting = (GVAR(inspectChest_enable) == 1);
@@ -39,7 +40,7 @@ if (GET_HEART_RATE(_patient) isEqualTo 0) then {
private _type = LLSTRING(Pneumothorax);
private _type_log = LLSTRING(Pneumothorax_short);
- if (_patient getVariable [QGVAR(hemopneumothorax), false]) then {
+ if ((_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 1)) then {
_type = LLSTRING(Hemopneumothorax);
_type_log = LLSTRING(Hemopneumothorax_short);
};
@@ -53,7 +54,7 @@ if (GET_HEART_RATE(_patient) isEqualTo 0) then {
};
} else {
if (_hasPneumothorax && (_airwaySecure || _airwayClear)) then {
- if (_patient getVariable [QGVAR(tensionpneumothorax), false] || _patient getVariable [QGVAR(hemopneumothorax), false]) then {
+ if ((_patient getVariable [QGVAR(tensionpneumothorax), [false, false]] select 0) || (_patient getVariable [QGVAR(tensionpneumothorax), [false, false]] select 1) ||(_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 1)) then {
_message = LLSTRING(inspectChest_none);
_messageLog = LLSTRING(inspectChest_none_log);
} else {
@@ -66,7 +67,7 @@ if (GET_HEART_RATE(_patient) isEqualTo 0) then {
private _type = LLSTRING(Pneumothorax);
private _type_log = LLSTRING(Pneumothorax_short);
- if (_patient getVariable [QGVAR(hemopneumothorax), false]) then {
+ if ((_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 1)) then {
_hintSize = 2.5;
_type = LLSTRING(Hemopneumothorax);
_type_log = LLSTRING(Hemopneumothorax_short);
@@ -89,7 +90,7 @@ if (GET_HEART_RATE(_patient) isEqualTo 0) then {
[_patient, "quick_view", LSTRING(inspectChest_log)] call EFUNC(circulation,removeLog);
[_patient, "quick_view", LSTRING(inspectChest_log), [[_medic] call ACEFUNC(common,getName), _messageLog]] call ACEFUNC(medical_treatment,addToLog);
-if (_patient getVariable [QGVAR(hemopneumothorax), false] && {!_simpleSetting}) then {
+if (((_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select 1)) && {!_simpleSetting}) then {
_message = format ["%1
%2", _message, LLSTRING(inspectChest_internalBleeding)];
[_patient, "quick_view", LSTRING(inspectChest_log), [[_medic] call ACEFUNC(common,getName), LLSTRING(inspectChest_internalBleeding)]] call ACEFUNC(medical_treatment,addToLog);
};
diff --git a/addons/breathing/functions/fnc_listenLungs.sqf b/addons/breathing/functions/fnc_listenLungs.sqf
index 9e1284284..c69c0d375 100644
--- a/addons/breathing/functions/fnc_listenLungs.sqf
+++ b/addons/breathing/functions/fnc_listenLungs.sqf
@@ -16,7 +16,7 @@
* Public: No
*/
-params ["_medic","_patient"];
+params ["_medic","_patient","_side"];
if (GET_HEART_RATE(_patient) isEqualTo 0) exitWith {};
@@ -34,8 +34,8 @@ variantDelay = 0;
[_idPFH] call CBA_fnc_removePerFrameHandler;
};
- private _tension = (_patient getVariable [QGVAR(tensionpneumothorax), false] || (_patient getVariable [QGVAR(pneumothorax), 0] > 0));
- private _hemo = _patient getVariable [QGVAR(hemopneumothorax), false];
+ private _tension = (_patient getVariable [QGVAR(tensionpneumothorax), [false, false]] select _side || (_patient getVariable [QGVAR(pneumothorax), [0,0] select _side] > 0));
+ private _hemo = _patient getVariable [QGVAR(hemopneumothorax), [false, false]] select _side;
_breathDelay = 20/_HR;
diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestSeal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestSeal.sqf
index e093b62ee..7a052c90e 100644
--- a/addons/breathing/functions/fnc_treatmentAdvanced_chestSeal.sqf
+++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestSeal.sqf
@@ -21,9 +21,9 @@
* Public: No
*/
-params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem"];
+params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem", "_side"];
[_patient, _usedItem] call ACEFUNC(medical_treatment,addToTriageCard);
[_patient, "activity", ACELSTRING(medical_treatment,Activity_usedItem), [[_medic] call ACEFUNC(common,getName), getText (configFile >> "CfgWeapons" >> _usedItem >> "displayName")]] call ACEFUNC(medical_treatment,addToLog);
-[QGVAR(chestSealLocal), [_medic, _patient], _patient] call CBA_fnc_targetEvent;
+[QGVAR(chestSealLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent;
diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestSealLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestSealLocal.sqf
index 5cde0d273..db420bbc5 100644
--- a/addons/breathing/functions/fnc_treatmentAdvanced_chestSealLocal.sqf
+++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestSealLocal.sqf
@@ -16,18 +16,32 @@
* Public: No
*/
-params ["_medic", "_patient"];
+params ["_medic", "_patient", "_side"];
if (GVAR(clearChestSealAfterTreatment)) then {
- if (_patient getVariable [QGVAR(hemopneumothorax), false] || _patient getVariable [QGVAR(tensionpneumothorax), false]) then {
- _patient setVariable [QGVAR(activeChestSeal), true, true];
+ private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]];
+ private _tensionpneumothorax = _patient getVariable [QGVAR(tensionpneumothorax), [false, false]];
+ private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]];
+
+ if ((_hemopneumothorax select _side) || (_tensionpneumothorax select _side)) then {
+ _activeChestSeal set [_side, true];
+ _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true];
};
} else {
- _patient setVariable [QGVAR(activeChestSeal), true, true];
+ private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]];
+ _activeChestSeal set [_side, true];
+ _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true];
};
-_patient setVariable [QGVAR(deepPenetratingInjury), false, true];
-_patient setVariable [QGVAR(pneumothorax), 0, true];
-if (!(_patient getVariable [QGVAR(hemopneumothorax), false]) && !(_patient getVariable [QGVAR(tensionpneumothorax), false])) then {
- [_patient, 0, 0, "ptx_tension", true] call EFUNC(circulation,updateBloodPressureChange);
-};
+private _deepPenetratingInjury = _patient getVariable [QGVAR(deepPenetratingInjury), [false, false]];
+private _pneumothorax = _patient getVariable [QGVAR(pneumothorax), [0, 0]];
+
+_deepPenetratingInjury set [_side, false];
+_pneumothorax set [_side, 0];
+
+_patient setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true];
+_patient setVariable [QGVAR(pneumothorax), _pneumothorax, true];
+
+if (!(_patient getVariable [QGVAR(hemopneumothorax), [false, false]] select _side) && !(_patient getVariable [QGVAR(tensionpneumothorax), [false, false]] select _side)) then {
+ [_patient, 0, 0, format ["ptx_tension_%1", _side], true] call EFUNC(circulation,updateBloodPressureChange);
+};
\ No newline at end of file
diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf
new file mode 100644
index 000000000..e8571f6b2
--- /dev/null
+++ b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf
@@ -0,0 +1,29 @@
+#include "..\script_component.hpp"
+/*
+ * Author: Kygan
+ * Treatment for hemopneumothorax
+ * Main function
+ *
+ * Arguments:
+ * 0: Medic