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 + * 1: Patient + * 2: Body Part + * 3: Treatment + * 4: Item User (not used) + * 5: Used Item + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "Body", "HemopneumothoraxTreatment", objNull, "kat_aatKit"] call kat_breathing_fnc_treatmentAdvanced_fingerThoracostomy; + * + * Public: No + */ + +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(fingerThoracostomyLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf new file mode 100644 index 000000000..219e4d565 --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf @@ -0,0 +1,59 @@ +#include "..\script_component.hpp" +/* + * Author: Kygan, modified by YetheSamartaka and Tomcat. + * Treatment for hemopneumothorax + * Main function + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * call kat_breathing_fnc_treatmentAdvanced_fingerThoracostomyLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +private _lidocaineCount = [_patient, "Lidocaine", false] call ACEFUNC(medical_status,getMedicationCount); +private _morphineCount = [_patient, "Morphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _nalbuphineCount = [_patient, "Nalbuphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _fentanylCount = [_patient, "Fentanyl", false] call ACEFUNC(medical_status,getMedicationCount); +private _ketamineCount = [_patient, "Ketamine", false] call ACEFUNC(medical_status,getMedicationCount); +if ((_lidocaineCount <= 0.6 && _morphineCount <= 0.8 && _nalbuphineCount <= 0.8 && _fentanylCount <= 0.8 && _ketamineCount <= 0.8) || !IS_UNCONSCIOUS(_patient)) then { + private _pain = random [0.7, 0.8, 0.9]; + [_patient, _pain] call ACEFUNC(medical_status,adjustPainLevel); +}; +if (random 100 <= 30) exitWith {}; +private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; +if (_activeChestSeal select _side) then { + private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; + _hemopneumothorax set [_side, false]; + _patient setVariable [QGVAR(hemopneumothorax), _hemopneumothorax, true]; +}; + +private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; +private _tensionIndex = _ht find "tension"; +if (_tensionIndex > -1) then { + _ht deleteAt _tensionIndex; + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; +}; + +private _pneumothorax = _patient getVariable [QGVAR(pneumothorax), [0, 0]]; +private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; + +if (!(_patient getVariable [QGVAR(pneumothorax), [0, 0]] select _side > 0) && + !(_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); + + if (GVAR(clearChestSealAfterTreatment)) then { + _activeChestSeal set [_side, false]; + _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; + }; +}; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothorax.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothorax.sqf new file mode 100644 index 000000000..bf6627ac9 --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothorax.sqf @@ -0,0 +1,29 @@ +#include "..\script_component.hpp" +/* + * Author: Kygan + * Treatment for hemopneumothorax + * Main function + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Body Part + * 3: Treatment + * 4: Item User (not used) + * 5: Used Item + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, "Body", "HemopneumothoraxTreatment", objNull, "kat_aatKit"] call kat_breathing_fnc_treatmentAdvanced_hardcorehemopneumothorax; + * + * Public: No + */ + +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(hardcorehemopneumothoraxLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal.sqf new file mode 100644 index 000000000..7a7b0202c --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal.sqf @@ -0,0 +1,59 @@ +#include "..\script_component.hpp" +/* + * Author: Kygan, modified by YetheSamartaka and Tomcat. + * Treatment for hemopneumothorax + * Main function + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * call kat_breathing_fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +private _lidocaineCount = [_patient, "Lidocaine", false] call ACEFUNC(medical_status,getMedicationCount); +private _morphineCount = [_patient, "Morphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _nalbuphineCount = [_patient, "Nalbuphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _fentanylCount = [_patient, "Fentanyl", false] call ACEFUNC(medical_status,getMedicationCount); +private _ketamineCount = [_patient, "Ketamine", false] call ACEFUNC(medical_status,getMedicationCount); +if ((_lidocaineCount <= 0.6 && _morphineCount <= 0.8 && _nalbuphineCount <= 0.8 && _fentanylCount <= 0.8 && _ketamineCount <= 0.8) || !IS_UNCONSCIOUS(_patient)) then { + private _pain = random [0.7, 0.8, 0.9]; + [_patient, _pain] call ACEFUNC(medical_status,adjustPainLevel); +}; + +private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; +if (_activeChestSeal select _side) then { + private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; + _hemopneumothorax set [_side, false]; + _patient setVariable [QGVAR(hemopneumothorax), _hemopneumothorax, true]; +}; + +private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; +private _tensionIndex = _ht find "tension"; +if (_tensionIndex > -1) then { + _ht deleteAt _tensionIndex; + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; +}; + +private _pneumothorax = _patient getVariable [QGVAR(pneumothorax), [0, 0]]; +private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; + +if (!(_patient getVariable [QGVAR(pneumothorax), [0, 0]] select _side > 0) && + !(_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); + + if (GVAR(clearChestSealAfterTreatment)) then { + _activeChestSeal set [_side, false]; + _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; + }; +}; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothorax.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothorax.sqf index 7bc0b13e1..13215fa76 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothorax.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothorax.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(hemopneumothoraxLocal), [_medic, _patient], _patient] call CBA_fnc_targetEvent; +[QGVAR(hemopneumothoraxLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothoraxLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothoraxLocal.sqf index 97ba8fcef..3d642c95e 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothoraxLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_hemopneumothoraxLocal.sqf @@ -17,20 +17,33 @@ * Public: No */ -params ["_medic", "_patient"]; +params ["_medic", "_patient", "_side"]; -if (_patient getVariable [QGVAR(activeChestSeal), false]) then { - _patient setVariable [QGVAR(hemopneumothorax), false, true]; - [_patient] call EFUNC(circulation,updateInternalBleeding); +private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; +if (_activeChestSeal select _side) then { + private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; + _hemopneumothorax set [_side, false]; + _patient setVariable [QGVAR(hemopneumothorax), _hemopneumothorax, true]; }; private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; -_ht deleteAt (_ht find "tension"); -_patient setVariable [QEGVAR(circulation,ht), _ht, true]; +private _tensionIndex = _ht find "tension"; +if (_tensionIndex > -1) then { + _ht deleteAt _tensionIndex; + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; +}; + +private _pneumothorax = _patient getVariable [QGVAR(pneumothorax), [0, 0]]; +private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; -if (!(_patient getVariable [QGVAR(pneumothorax), 0] > 0) && !(_patient getVariable [QGVAR(hemopneumothorax), false]) && !(_patient getVariable [QGVAR(tensionpneumothorax), false])) then { - [_patient, 0, 0, "ptx_tension", true] call EFUNC(circulation,updateBloodPressureChange); +if (!(_patient getVariable [QGVAR(pneumothorax), [0, 0]] select _side > 0) && + !(_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); + if (GVAR(clearChestSealAfterTreatment)) then { - _patient setVariable [QGVAR(activeChestSeal), false, true]; + _activeChestSeal set [_side, false]; + _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; }; -}; +}; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf index c5911da88..4f7005173 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.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(tensionpneumothoraxLocal), [_medic, _patient], _patient] call CBA_fnc_targetEvent; +[QGVAR(tensionpneumothoraxLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothoraxLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothoraxLocal.sqf index 3fa0faf42..566d305f7 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothoraxLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothoraxLocal.sqf @@ -19,17 +19,29 @@ params ["_medic", "_patient"]; -if (_patient getVariable [QGVAR(activeChestSeal), false]) then { - _patient setVariable [QGVAR(tensionpneumothorax), false, true]; +private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; +if (_activeChestSeal select _side) then { + private _tensionPneumothorax = _patient getVariable [QGVAR(tensionPneumothorax), [false, false]]; + _tensionPneumothorax set [_side, false]; + _patient setVariable [QGVAR(tensionPneumothorax), _tensionPneumothorax, true]; }; private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; -_ht deleteAt (_ht find "tension"); -_patient setVariable [QEGVAR(circulation,ht), _ht, true]; +private _tensionIndex = _ht find "tension"; -if (!(_patient getVariable [QGVAR(pneumothorax), 0] > 0) && !(_patient getVariable [QGVAR(hemopneumothorax), false]) && !(_patient getVariable [QGVAR(tensionpneumothorax), false])) then { - [_patient, 0, 0, "ptx_tension", true] call EFUNC(circulation,updateBloodPressureChange); +if (_tensionIndex > -1) then { + _ht deleteAt _tensionIndex; + _patient setVariable [QEGVAR(circulation,ht), _ht, true]; +}; + +if (!(_patient getVariable [QGVAR(pneumothorax), [0, 0]] select _side > 0) && + !(_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); + if (GVAR(clearChestSealAfterTreatment)) then { - _patient setVariable [QGVAR(activeChestSeal), false, true]; + _activeChestSeal set [_side, false]; + _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; }; }; diff --git a/addons/breathing/stringtable.xml b/addons/breathing/stringtable.xml index b84d4f462..4116157d1 100644 --- a/addons/breathing/stringtable.xml +++ b/addons/breathing/stringtable.xml @@ -426,7 +426,7 @@ Hoito Behandelen - + Chest Seal Chest Seal Chest Seal @@ -444,6 +444,12 @@ Rintatiiviste Chest seal + + Left Side Chest Seal + + + Right Side Chest Seal + Chest Seal is engineered to treat, seal, and reseal open chest wounds under most circumstances. Das Chest Seal ist so konzipiert, dass offene Brustwunden in den meisten Fällen behandelt, versiegelt und sie wieder verschlossen werden. @@ -600,8 +606,32 @@ Vasta sitten, kun valittu arvo (oletusarvo 85) on saavutettu, potilas voi herätä Alleen na het bereiken van meer dan deze waarde (standaard 85) kan een patiënt zijn bewustzijn terug krijgen + + Left Side Finger Thoracostomy + + + Right Side Finger Thoracostomy + - Drain Fluid + Left Side Chest Tube + Flüssigkeit ablassen + Drenar fluido + Drenaż opłucnej + 针减压 + 排出胸腔液体 + Odsát tekutiny + 체액 배출 + Aspirer le fluide + Sıvıyı Boşaltın + Drenare il liquido + Слить жидкость + 胸腔ドレナージ + Drenar fluido + Tyhjennä neste + Vloeistof afvoeren + + + Right Side Chest Tube Flüssigkeit ablassen Drenar fluido Drenaż opłucnej @@ -637,7 +667,25 @@ 1x Hemopneumothorax - Needle Decompression + Left Side Needle Decompression + Nadel Dekompression + Descompresión con aguja + Igła dekompresyjna + 针减压 + 胸腔穿刺减压 + Dekompresní Jehla + 바늘 감압 + Aiguille de décompression + İğne Dekompresyonu + Decompressione con ago + Декомпрессия иглы + 胸腔穿刺減圧 + Descompressão com Agulha + Neulan dekompressio + Naalddecompressie + + + Right Side Needle Decompression Nadel Dekompression Descompresión con aguja Igła dekompresyjna @@ -655,7 +703,23 @@ Naalddecompressie - Needle Decompression (NCD Kit) + Left Side Needle Decompression (NCD Kit) + Nadel Dekompression (NDK Kit) + Descomprensión con aguja (Kit NCD) + Igła dekompresyjna (NCD Kit) + 胸腔穿刺減圧 (NCDキット) + Dekompresní Jehla (NCD Kit) + Aiguille de décompression (NCD kit) + 바늘 감압(NCD 키트) + Decompressione con ago (NCD Kit) + Descompressão com Agulha (Kit NCD) + Neulan dekompressio (NCD Kit) + Декомпрессионная игла (NCD Набор) + Naalddecompressie kit (ND kit) + 针刺减压(NCD Kit) + + + Right Side Needle Decompression (NCD Kit) Nadel Dekompression (NDK Kit) Descomprensión con aguja (Kit NCD) Igła dekompresyjna (NCD Kit) @@ -1130,22 +1194,10 @@ Zorgt ervoor dat je de longen kan beluisteren - Auscultate Lung Sounds - Osłuchaj płuca - Lungengeräusche abhören - Auscultar sonidos pulmonares - 听诊肺音 - 听诊肺音 - Vyšetřit plíce poslechem - 폐음 청진 - Ausculter les sons pulmonaires - Akciğer Seslerini Dinleyin - Auscultare i suoni polmonari - Выслушивайте легочные шумы - 呼吸音を聴診 - Auscultar sons pulmonares - Kuuntele keuhkojen ääniä - Beluister de longen + Auscultate Left Lung Sounds + + + Auscultate Right Lung Sounds Listening @@ -2958,5 +3010,14 @@ Retirer le masque à oxygène 取下氧气面罩 + + Activate Hardcore Treatment options + + + Enables hardcore treatments including finger thoracostomies + + + Allow Finger Thoracostomies + diff --git a/addons/circulation/functions/fnc_updateInternalBleeding.sqf b/addons/circulation/functions/fnc_updateInternalBleeding.sqf index 08933805d..43b9f3008 100644 --- a/addons/circulation/functions/fnc_updateInternalBleeding.sqf +++ b/addons/circulation/functions/fnc_updateInternalBleeding.sqf @@ -23,7 +23,7 @@ private _alphaAction = GET_VASOCONSTRICTION(_unit); private _internalBleeding = 0; if !(_heal) then { - if (_unit getVariable [QEGVAR(breathing,hemopneumothorax), false]) then { + if ((_unit getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (_unit getVariable [QGVAR(hemopneumothorax), [false, false]] select 1)) then { _internalBleeding = _internalBleeding + EGVAR(breathing,HPTXBleedAmount); }; }; diff --git a/addons/feedback/functions/fnc_handleEffects.sqf b/addons/feedback/functions/fnc_handleEffects.sqf index 119fdb3dc..ebc0d6381 100644 --- a/addons/feedback/functions/fnc_handleEffects.sqf +++ b/addons/feedback/functions/fnc_handleEffects.sqf @@ -29,7 +29,8 @@ private _spO2 = GET_KAT_SPO2(ACE_player); private _unconscious = IS_UNCONSCIOUS(ACE_player); private _poisoned = IS_AIRPOISONED(ACE_player); private _tear = IN_TEARGAS(ACE_player); -private _wheeze = ((ACE_player getVariable [QGVAR(pneumothorax), 0] > 0) || ACE_player getVariable [QGVAR(hemopneumothorax), false] || ACE_player getVariable [QGVAR(tensionpneumothorax), false] || ACE_player getVariable [QEGVAR(chemical,airPoisoning), false]); +private _wheeze = ((ACE_player getVariable [QGVAR(pneumothorax), [0, 0]] select 0 > 0) || (ACE_player getVariable [QGVAR(pneumothorax), [0, 0]] select 1 > 0) || + (ACE_player getVariable [QGVAR(tensionpneumothorax), [false, false]] select 0) || (ACE_player getVariable [QGVAR(tensionpneumothorax), [false, false]] select 1) ||(ACE_player getVariable [QGVAR(hemopneumothorax), [false, false]] select 0) || (ACE_player getVariable [QGVAR(hemopneumothorax), [false, false]] select 1) || ACE_player getVariable [QEGVAR(chemical,airPoisoning), false]); // - Visual effects ----------------------------------------------------------- diff --git a/addons/gui/data/body_image/torso_rightchestseal.paa b/addons/gui/data/body_image/torso_rightchestseal.paa new file mode 100644 index 0000000000000000000000000000000000000000..4d6c3c11ccd7b3c1aa93b2d7064e34ec4a1ec5a5 GIT binary patch literal 25925 zcmeI5dr%Zd8o1H;QLsB=0t$2NdO}k;y?a-$pl`tJq!f4|I(X4Pl+k|?XVo53bR0^ zQ>d&?`3(RZCkJ=EF~tP>oC=0f!r-@J8RM|VQw$fuk{hvnS>Y}i+Gvd5Alz^x{h3fM zVBn+sal4Qbq~#5%wHaL5-5b{FkCE8UvAn^x+F*bMzNTT_QK%iQ6)43ZE*V^DbTsAk zIJj2J_?qZbY;UyyS(WbRJ<@~t*Hyb+-#8f40WR|Tj*x4&>(DcVnj5|f07EQ?dYW+a zgkUVo@`WyrL)HkS>=Cu=7x@-Nah&z~DlrTg=XY_goyVGbsMs5(Qljw4?d^N_kXXUK`j;r!V5x{AMyO%rNb=Jz< z%x@UCu}mB6cp$Rs+`G%3cm>|7OS^kfBF&xkwAAZahJAU1^TzdjShEsV?(5+B#LuY( zh=^+gMy8m=7Ib<}WPfQ_=tNe&0)*`F^aZe<%av~*;;|}tOjBOWt(n`Jn=>=N2utm` zUbS@8+K0=xoyar{Hq27}*flkAg2lXjrPk-QF_HOyZV-P4aVGQ5ZC{P>IsZlEy+nP(>k5vRHrUyUa1t4RmmsUt(q_MD-R{EKAk=E5qbz1I55)2j#k)g3N;xCad!6c> zxy_K5CoXzNh){SzOgoHn-e@#r@|uIH5USfV2%$N(=9AZ!&3cmU@7IHn#hh0bT5{;{ z)JMazXCVtJ=ycgD@i82#4aMBf;CUt433$Mls8tf)8Ydn?t;nE+v4LR6DEZ?~JDp$4 zNF8McThl_Gx(fz{851@b7ngdTnpiBraYy~O#LN1)Xiv;zyU?K!2RydBU5efg*eUzk z*&d-ED%VT_WEJ!5Cp!=CE(EFLonzmk9@CM9CS!`loLU=uaMO;dO@^8kEx4H-r9KSsJgd&Ulc`8|v9)JHU>uJ(wK`!`D6GAQ9d7Kz z--SxVao&O0Gp9X`kd4zy;}GhsT=TR|`&VoD69w8}O-IrPWj{PUXH^wkuW27*ib3Kt zD>(U+;70zW71uN(5T@3ScC;^#3VnvWc3gBq$YjRhH0=X*tmWIZAx@&>l@5H_?RB4f z8vj0FKR=)q>2d(Zj35emFDk6*8v z9R;V0-md6iO7eE7VmnZV%!xm!*ntoJh6SyWUuGXySsE?oncJW!`pJ(owf8UAAce`i zd|OFN5icdeBl&pcoJ;c`c2>6ByZ5J(XjQ>k{U7|B8|u=u+Ob}_Gp;-O?=L*znZ90n zc*NK?;g&l}r~NHwUe(ALX5*cxuDZJMM^~C zPvs4pyg}Qx{Lx(1-o_8Tnev8_!AFX^IJBr{S4)c>ls8QEW=k?SYj{oAj2N-xr1?u< zZ3Yf_o0og1OTleW@wtH89LL@0y7V(1SKTkpUF16kA;IXHpvT|soM;-i5f8ZGkx>kU z>J$#cZOxk9;_e4v=T=^wFvXbSqWzscBj7mpI;!iAUiwMc5*&s3))GOJ6}2leGErXH zRBw(e1#8c0q1Get>H?;U=OpeiX+*MYW=`!w?+z(Ia5H)~WQV@VGu?w{0AF&!dF`x2+G{gO=n)vNd-0XOJ2Dn!HIg9=6h z%*d;#eU;1mra8517`~EwC2PIoT2c9c%(#eOV&motcU$#zlloTo8Rgu;Ige;kC6S8DCK0DxF-;Z@^A zlT1I*wHiRPpsI90Z+@Mr*g9+PhTdqU>y`;ypk`i!A^%g*M zXrD1~#e#85KTQ0ldeQqyd=P$qK*BsxXB6yL<-AH#wi_4X;@^6(3!+LayUhLTtEuTOU} z<%E&7jogF4v-Ll@9`mBHmDv}>9xvPTIH-*Y!;OhbogjSsDyf?R~ z$gpn0=G^fE-|wy?%X|Pu884fCUbg3T-G6@RSRC@nvh87p;~e(wnBR!Y{G#9taCWSge!>$^&76 z2#b~SKzSf65Mi-W9w-ll1tKg~$^+$rut0>xN_n6>5Eh8ASSb&b2f_jo7Axg}@<3Q1 z!eXU7P#y>iL|Ckp2g(Csfe4G0@<4eYED&L_QXVJ|gasljR>}kAfv`Y?#Y%agJP;O$ zuvjS%ln25B5f&@uf$~6DAi`p$JWw783q)9~lm~?O+fV{HV`KCQix1Q+)J^(vpl&m5;Z>C%D4sH=$cz3OS!TYMcke?yBj=|sL;Lk3I zXUTIpE~skj_`%{76WPHI44=@?F#7wS#YY-{Y5eWSfyQ6z4>TU&fJptJ&jKv<2kH;h zA80)24~V~3JYY$tVb@>j^RqhQmV@UMAI2w5d`PBE54>#;pi=*TrcqlUAn$K@zw&jR z0G}7rugPup$1u?_{TzmAXR;K?*n07o*@tKzb~C({?hlo{ZiP43?-PZ`f97Tajb8%3 z-$dMG6W(RTc0Y?xev7kR{NF6dvgqKU#+0{=@uuF##+%UFnw^P_#NmCX W!x0r5uD{>C?Ut|?veXR7 z@0)x%_W(UT=XXBmciWTP<1lM$eZgmI>wPK!ta&^JR=vSjM|BfL^;+Mi8mcR3sy|m# zvqi`2F7z9D0I#?JI{W~U=K*?~0Qz16_!&J9^+3+76G}j&|92Yrl0tD0ao7P+q^?bb zlZkLe?+}2LQd!^HsVIF_M*K4cir?F=lpcC&M9BxpJDVs-?ss1dMI6CEAQSxlk#czW zedUH(c>Lf_xNgLQQtGp1l_y;*D&WV_P+ZFM!>9hu2}Z+7&)A>>`Ntu3;`N_gFF2ZK z#*HBm%l)?a(MXS(^@%bowI zM~1y#^OiEGLgCmrv^CV%*Z*-VGW%}idhO9sXv=lElx@FtyD!8pO~%aI-5p3(gHx$Y zw7!_wkyOV4v;&&FSy47ow^G~OXu_(v_q>$mNhE52!aFt!U5x;TKf1YPpnuhxf|>Eq z&{W4Zc?KGK9;^G)6Z+J=)8GD7d0sB~KUV!wPuG=B(T(}6U-_cZ5zBq(!3Uhn_89KTFT+XW8&hT?fGuV&?_q8M#V?~Ma2$jc z1&+g_jKdy)Vw}HjQ2tWzwl@l*4ov;dJ#SrBF84hH73~V-ba~S^0%(ZPjiK)cBfeMJ zs8i^^8YyyWHB~L2Cw6@jYJ3Yy91cy3{M~%UbNT~w2D9$5Wi7A1_WRnw@66O$;{<@N zZ`feHFjWMlN>QRUiD~zpDS!i-Ce6GR6aH9#^-;V_>@u!ib^lUy>HFyJq%pKNqHm;^ zk)}JXx3(^`Gg7Nrm|g^pIo8q4chQF?-R?F16lnUCmH7qNIUdXduLsTtb_6&daz5mI z$oY`-A?HJifIxFT;Cw(VkOZ1}xc@wqK0(_Ht!1G&?K^8)<9=fcs(t>^~8KL z-xL9X=Jn0%n^+(TH1ohb5DO%MW*(RaVu2*k%med4ERY16d0-xh1(HBB56lCxKoV%? zfq5VnNCM3~Fb~86NuZer=7Crs2{iM-JP->cfo2|<2V#LF(98q#KrE01nt5Ozhy{{B zGY`xIu|N`N=7D)27DxikJTMQ$0!g5m2j+oTAPF?{z&sEOB!Olgm<9=fn4i1TUNPV^DgLNx#I577w2M@KvuAb4 zss{o~ogXFrSPqRJpURP&4t3MlX2nZ}VKir)km=ETIA|TMbK6rf) z3nYPN9+(GWfh5q(1M@&EkOVp#JP2w@#l~z2EV9vTy1A@%b8dU;PCD%&d@5w0GVGiC z_y4>8G`Q$%org{r@bT9eK0PuGoWOE1te?5-V>xXFDw*HjUbf0gYneToUS@b`wk?6h ze1=(={`TLChqrnc!7|Cmb7FKnn;bW3RR4g-8a5s+YY%$;it)?=UvxDl32J8R I*34eVfBnvp%K!iX literal 0 HcmV?d00001 diff --git a/addons/gui/gui.hpp b/addons/gui/gui.hpp index 4a10981b0..66cc62605 100644 --- a/addons/gui/gui.hpp +++ b/addons/gui/gui.hpp @@ -86,6 +86,17 @@ class ACEGVAR(medical_gui,BodyImage): RscControlsGroupNoScrollbars { text = QPATHTOF(data\body_image\torso_pneumothorax.paa); colorText[] = {1, 1, 1, 1}; }; + class Torso_RightPneumothorax: Torso_ChestSeal { + idc = IDC_BODY_TORSO_RIGHTPNEUMOTHORAX; + text = QPATHTOF(data\body_image\torso_rightpneumothorax.paa); + colorText[] = {1, 1, 1, 1}; + }; + class Torso_RightChestSeal: Torso_ChestSeal { + idc = IDC_BODY_TORSO_RIGHTCHESTSEAL; + text = QPATHTOF(data\body_image\torso_rightchestseal.paa); + colorText[] = {1, 0.95, 0, 1}; + show = 0; + }; class RightArm_IV: Torso_IO { idc = IDC_BODY_RIGHTARM_IV; text = QPATHTOF(data\body_image\rightarm_iv.paa); diff --git a/addons/gui/gui_defines.hpp b/addons/gui/gui_defines.hpp index 470885a1d..af9e1ae98 100644 --- a/addons/gui/gui_defines.hpp +++ b/addons/gui/gui_defines.hpp @@ -61,6 +61,8 @@ #define IDC_BODY_TORSO_CHESTSEAL 70121 #define IDC_BODY_TORSO_PNEUMOTHORAX 70122 #define IDC_BODY_TORSO_IO 70123 +#define IDC_BODY_TORSO_RIGHTCHESTSEAL 70124 +#define IDC_BODY_TORSO_RIGHTPNEUMOTHORAX 70125 #define IDC_BODY_RIGHTARM_AED_VITALS 70130 #define IDC_BODY_LEFTARM_AED_VITALS 70131 diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index a0396d871..972af8a22 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -300,7 +300,8 @@ // Breathing #define VAR_SURFACE_AREA 400 -#define GET_KAT_SURFACE_AREA(unit) (VAR_SURFACE_AREA - (((unit getVariable [QEGVAR(breathing,pneumothorax), 0]) * 75))) +#define GET_KAT_SURFACE_AREA(unit) (VAR_SURFACE_AREA - (((unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 0) * 40) + ((unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 1) * 40))) + #define VAR_BLOOD_GAS QEGVAR(circulation,bloodGas) #define VAR_BREATHING_RATE QEGVAR(breathing,breathRate) diff --git a/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf b/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf index fa1c5fb2d..10be2c9e0 100644 --- a/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf +++ b/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf @@ -22,22 +22,35 @@ params ["_medic", "_patient", "_bodyPart"]; private _airway = LSTRING(Ultra_Airway_Normal); private _cardiac = LSTRING(Ultra_Airway_Normal); private _thorasic = LSTRING(Ultra_Airway_Normal); +private _thorasicRight = LSTRING(Ultra_Airway_Normal); _patient setVariable [QGVAR(imaging), true, true]; //Reads Thorasic Condition -if ((_patient getVariable [QEGVAR(breathing,pneumothorax), 0]) != 0) then { +if (_patient getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 0 > 0) then { _thorasic = LSTRING(Ultra_Thorasic_PTX); }; -if (_patient getVariable [QEGVAR(breathing,hemopneumothorax), false]) then { +if (_patient getVariable [QEGVAR(breathing,pneumothorax), [0, 0]] select 1 > 0) then { + _thorasicRight = LSTRING(Ultra_Thorasic_Right_PTX); +}; + +if (_patient getVariable [QEGVAR(breathing,hemopneumothorax), [false, false]] select 0) then { _thorasic = LSTRING(Ultra_Thorasic_Hemo); }; -if (_patient getVariable [QEGVAR(breathing,tensionpneumothorax), false]) then { +if (_patient getVariable [QEGVAR(breathing,hemopneumothorax), [false, false]] select 1) then { + _thorasicRight = LSTRING(Ultra_Thorasic_Right_Hemo); +}; + +if (_patient getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]] select 0) then { _thorasic = LSTRING(Ultra_Thorasic_Tension); }; +if (_patient getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]] select 1) then { + _thorasicRight = LSTRING(Ultra_Thorasic_Right_Tension); +}; + //Reads Cardiac Arrest Type, 4 and 3 are VT/VF and are output as "Shockable", 2 and 1 are PEA/Asystole and output as "Not Shockable", 0 is No Arrest switch (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0]) do { @@ -65,3 +78,4 @@ if (_patient getVariable [QEGVAR(circulation,effusion), 0] > 0) then { [_patient, "quick_view", LSTRING(Ultra_Airway), [_airway]] call ACEFUNC(medical_treatment,addToLog); [_patient, "quick_view", LSTRING(Ultra_Cardiac), [_cardiac]] call ACEFUNC(medical_treatment,addToLog); [_patient, "quick_view", LSTRING(Ultra_Thorasic), [_thorasic]] call ACEFUNC(medical_treatment,addToLog); +[_patient, "quick_view", LSTRING(Ultra_ThorasicRight), [_thorasicRight]] call ACEFUNC(medical_treatment,addToLog); diff --git a/addons/surgery/stringtable.xml b/addons/surgery/stringtable.xml index 438aff98e..799f4f6c6 100644 --- a/addons/surgery/stringtable.xml +++ b/addons/surgery/stringtable.xml @@ -684,15 +684,10 @@ 气道状态:%1 - Lung Status: %1 - Лёгкие: %1 - Estado de Pulmones: %1 - 肺の状態: %1 - Statut des poumons :%1 - Estado do pulmão: %1 - Longstatus: %1 - Stato dei polmoni: %1 - 肺部状态:%1 + Left Lung Status: %1 + + + Right Lung Status: %1 Cardiac Status: %1 @@ -717,37 +712,25 @@ 正常 - Pneumothorax - Пневмоторакс - Pneumotórax - 気胸 - Pneumothorax - Pneumotórax - Pneumothorax - Pneumotorace - 气胸 + Left Side Pneumothorax + + + Left Side Pneumothorax + + + Right Side Pneumothorax - Hemopneumothorax - Гемоторакс - Hemopneumotórax - 血気胸 - Hémopneumothorax - Hemotórax - Hemopneumothorax - Emopneumotorace - 血气胸 + Left Side Hemopneumothorax + + + Right Side Hemopneumothorax - Tension Pneumothorax - Напряженный пневмоторакс - Tensión de Pneumotórax - 緊張性気胸 - Pneumothorax sous tension - Pneumotórax Hipertensivo - Tensiepneumothorax - Pneumotorace Iperteso - 张力性气胸 + Left Side Tension Pneumothorax + + + Right Side Tension Pneumothorax Arrest - Shockable diff --git a/addons/vitals/functions/fnc_handleOxygenFunction.sqf b/addons/vitals/functions/fnc_handleOxygenFunction.sqf index 181936156..216648422 100644 --- a/addons/vitals/functions/fnc_handleOxygenFunction.sqf +++ b/addons/vitals/functions/fnc_handleOxygenFunction.sqf @@ -84,7 +84,7 @@ private _fio2 = switch (true) do { [0, DEFAULT_FIO2] select ((_unit getVariable [QEGVAR(airway,recovery), false]) || (_unit getVariable [QEGVAR(airway,overstretch), false])) }; case ((_respiratoryRate == 0) && (EGVAR(breathing,SpO2_perfusion))): { 0 }; - case ((_unit getVariable [QEGVAR(chemical,airPoisoning), false]) || (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), false]) || (_unit getVariable [QEGVAR(breathing,hemopneumothorax), false])): { 0 }; + case ((_unit getVariable [QEGVAR(chemical,airPoisoning), false]) || (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]] select 0) || (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]] select 1) ||(_unit getVariable [QEGVAR(breathing,hemopneumothorax), [false, false]] select 0) || (_unit getVariable [QEGVAR(breathing,hemopneumothorax), [false, false]] select 1)): { 0 }; case (_unit getVariable [QEGVAR(breathing,oxygenMaskActive), false]): { 0.95 }; case (_unit getVariable [QEGVAR(breathing,oxygenTankConnected), false]): { 1 }; default { DEFAULT_FIO2 }; From 8b88b051762f6278df8484c35e9634d345163a50 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Sun, 29 Dec 2024 20:20:23 -0800 Subject: [PATCH 02/16] Maybe fix? --- addons/breathing/ACE_Medical_Treatment_Actions.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index a1999c9d6..a0b82aaed 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -140,7 +140,7 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); treatmentTime = 7; items[] = {"kat_aatKit"}; - condition = !QGVAR(hardcoreBreathingTreatment); + condition = "!GVAR(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 = ""; From c1cde1c21bf8406f8ce3824358e06a6061412995 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Mon, 30 Dec 2024 15:05:23 -0800 Subject: [PATCH 03/16] Zeus menu fixed --- addons/zeus/functions/fnc_ui_manageAirway.sqf | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/addons/zeus/functions/fnc_ui_manageAirway.sqf b/addons/zeus/functions/fnc_ui_manageAirway.sqf index 248c8f498..6a24611b7 100644 --- a/addons/zeus/functions/fnc_ui_manageAirway.sqf +++ b/addons/zeus/functions/fnc_ui_manageAirway.sqf @@ -55,14 +55,14 @@ private _fnc_sliderMove_ptx = { private _idc = ctrlIDC _slider; private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); private _unit = attachedTo _logic; - private _curVal = _unit getVariable [QEGVAR(breathing,pneumothorax), 0]; + private _curVal = _unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]]; _slider ctrlSetTooltip format [LLSTRING(sliderFormat13was23), round(sliderPosition _slider), round _curVal, " "]; }; private _sliderPTX = _display displayCtrl 16105; _sliderPTX sliderSetRange [0, 4]; _sliderPTX sliderSetSpeed [1,10]; -private _curPTX = _unit getVariable [QEGVAR(breathing,pneumothorax), 0]; +private _curPTX = _unit getVariable [QEGVAR(breathing,pneumothorax), [0, 0]]; _sliderPTX sliderSetPosition (round _curPTX); _sliderPTX ctrlAddEventHandler ["SliderPosChanged", _fnc_sliderMove_ptx]; [_sliderPTX,_curPTX] call _fnc_sliderMove_ptx; @@ -86,8 +86,8 @@ _sliderSPO2 ctrlAddEventHandler ["SliderPosChanged", _fnc_sliderMove_SPO2]; (_display displayCtrl 16101) cbSetChecked (_unit getVariable [QEGVAR(airway,obstruction), false]); (_display displayCtrl 16102) cbSetChecked (_unit getVariable [QEGVAR(airway,occluded), false]); -(_display displayCtrl 16103) cbSetChecked (_unit getVariable [QEGVAR(breathing,hemopneumothorax), false]); -(_display displayCtrl 16104) cbSetChecked (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), false]); +(_display displayCtrl 16103) cbSetChecked (_unit getVariable [QEGVAR(breathing,hemopneumothorax), [false, false]]); +(_display displayCtrl 16104) cbSetChecked (_unit getVariable [QEGVAR(breathing,tensionpneumothorax), [false, false]]); private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; @@ -117,12 +117,23 @@ private _fnc_onConfirm = { }; _unit setVariable [_x, _targetState, true]; - } forEach [QEGVAR(airway,obstruction), QEGVAR(airway,occluded), QEGVAR(breathing,hemopneumothorax), QEGVAR(breathing,tensionpneumothorax)]; + } forEach [QEGVAR(airway,obstruction), QEGVAR(airway,occluded)]; + + { + private _targetState = _valueArr select _forEachIndex; + private _currentState = _unit getVariable [_x, false]; + + if (!_initBreathing && (_targetState && !_currentState)) then { + _initBreathing = true; + }; + private _targetArray = [_targetState, _targetState]; + _unit setVariable [_x, _targetArray, true]; + } forEach [QEGVAR(breathing,hemopneumothorax), QEGVAR(breathing,tensionpneumothorax)]; private _curSpO2Val = GET_PAO2(_unit); private _pneumothorax = round(sliderPosition (_display displayCtrl 16105)); - - _unit setVariable [QEGVAR(breathing,pneumothorax), _pneumothorax, true]; + private _pneumothoraxArray = [_pneumothorax, _pneumothorax]; + _unit setVariable [QEGVAR(breathing,pneumothorax), _pneumothoraxArray, true]; private _o2Sat = round(sliderPosition (_display displayCtrl 16106)); private _bloodGas = GET_BLOOD_GAS(_unit); From 5db6b09cbbb45897d77747cd0c4c275c21ddd06d Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Mon, 30 Dec 2024 20:17:30 -0800 Subject: [PATCH 04/16] wee --- .../ACE_Medical_Treatment_Actions.hpp | 93 +++++++---- addons/breathing/XEH_PREP.hpp | 6 + addons/breathing/XEH_preInit.sqf | 58 +++++++ .../fnc_treatmentAdvanced_chestTube.sqf | 22 +++ .../fnc_treatmentAdvanced_chestTubeCheck.sqf | 30 ++++ ...nc_treatmentAdvanced_chestTubeIncision.sqf | 22 +++ ...eatmentAdvanced_chestTubeIncisionLocal.sqf | 68 ++++++++ .../fnc_treatmentAdvanced_chestTubeLocal.sqf | 40 +++++ ...nc_treatmentAdvanced_chestTubeProgress.sqf | 22 +++ ...eatmentAdvanced_chestTubeProgressLocal.sqf | 49 ++++++ addons/breathing/stringtable.xml | 148 ++++++++++++++++++ 11 files changed, 530 insertions(+), 28 deletions(-) create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf create mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index a0b82aaed..2608b743a 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -1,5 +1,6 @@ class ACE_Medical_Treatment_Actions { class CheckPulse; + class BasicBandage; class ListenToLungs: CheckPulse { displayName = CSTRING(auscultateLung_display); displayNameProgress = CSTRING(listening_progress); @@ -186,34 +187,6 @@ class ACE_Medical_Treatment_Actions { 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); @@ -223,6 +196,7 @@ class ACE_Medical_Treatment_Actions { allowSelfTreatment = 0; medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); treatmentTime = 7; + condition = "!GVAR(hardcoreBreathingTreatment)"; items[] = {"kat_aatKit"}; condition = "true"; callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_tensionpneumothorax);); @@ -390,4 +364,67 @@ class ACE_Medical_Treatment_Actions { condition = QUOTE(_patient call EFUNC(airway,checkMask)); callbackSuccess = QFUNC(removeOxygenMask); }; + class ChestTube: CheckPulse { + displayName = CSTRING(Chest_Tube_Use); + displayNameProgress = CSTRING(Chest_Tube_Action); + category = "surgery"; + treatmentLocations = QGVAR(chestTubeLocation); + allowedSelections[] = {"Body"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(chestTubeAction_MedLevel); + treatmentTime = QGVAR(openTime); + items[] = {"kat_aatKit"}; + consumeItem = 1; + condition = QUOTE(([ARR_4(_medic,_patient,2.5,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_chestTube)); + }; + class RightChestTube: ChestTube { + displayName = CSTRING(Chest_TubeRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,2.5,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_chestTube)); + }; + class Incision: BasicBandage { + displayName = CSTRING(Scalpel_Use); + displayNameProgress = CSTRING(Scalpel_Action); + category = "surgery"; + treatmentLocations = QGVAR(surgicalLocation); + allowedSelections[] = {"Body"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(surgicalAction_MedLevel); + treatmentTime = QGVAR(incisionTime); + items[] = {"kat_scalpel"}; + condition = QUOTE(([ARR_4(_medic,_patient,5,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_chestTubeIncision); + }; + class RightIncision: BasicBandage { + displayName = CSTRING(ScalpelRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,5,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_chestTubeIncision); + }; + class Spread: Incision { + displayName = CSTRING(Retractor_Use); + displayNameProgress = CSTRING(Retractor_Action); + items[] = {"kat_retractor"}; + consumeItem = 1; + condition = QUOTE(([ARR_4(_medic,_patient,2.1,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,2.1,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; + class RightSpread: Spread { + displayName = CSTRING(RetractorRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,2.1,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,2.1,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; + class Clamp: Incision { + displayName = CSTRING(Clamp_Use); + displayNameProgress = CSTRING(Clamp_Action); + items[] = {"kat_clamp"}; + consumeItem = 1; + condition = QUOTE(([ARR_4(_medic,_patient,2.3,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,2.3,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; + class RightClamp: Incision { + displayName = CSTRING(ClampRight_Use); + condition = QUOTE(([ARR_4(_medic,_patient,2.3,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,2.3,1)] call FUNC(treatmentAdvanced_chestTubeProgress)); + }; }; diff --git a/addons/breathing/XEH_PREP.hpp b/addons/breathing/XEH_PREP.hpp index 84f69a9b0..3d74c0a19 100644 --- a/addons/breathing/XEH_PREP.hpp +++ b/addons/breathing/XEH_PREP.hpp @@ -26,6 +26,12 @@ PREP(refillOxygenTank); PREP(removeOxygenMask); PREP(treatmentAdvanced_chestSeal); PREP(treatmentAdvanced_chestSealLocal); +PREP(treatmentAdvanced_chestTubeCheck); +PREP(treatmentAdvanced_chestTubeIncision); +PREP(treatmentAdvanced_chestTubeIncisionLocal); +PREP(treatmentAdvanced_chestTubeLocal); +PREP(treatmentAdvanced_chestTubeProgress); +PREP(treatmentAdvanced_chestTubeProgressLocal); PREP(treatmentAdvanced_fingerThoracostomy); PREP(treatmentAdvanced_fingerThoracostomyLocal); PREP(treatmentAdvanced_hardcorehemopneumothorax); diff --git a/addons/breathing/XEH_preInit.sqf b/addons/breathing/XEH_preInit.sqf index 13e8083e1..e6d3d570d 100644 --- a/addons/breathing/XEH_preInit.sqf +++ b/addons/breathing/XEH_preInit.sqf @@ -585,4 +585,62 @@ PREP_RECOMPILE_END; true ] call CBA_Settings_fnc_init; +[ + QGVAR(incisionTime), + "SLIDER", + LLSTRING(INCISION_TIMER), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [0,100,10,0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(intermediateTime), + "SLIDER", + [LLSTRING(INTERMEDIATE_TIMER), LLSTRING(INTERMEDIATE_TIMER_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [0,100,8,0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(openTime), + "SLIDER", + LLSTRING(OPEN_TIMER), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [0,100,15,0], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(chestTubeAction_MedLevel), + "LIST", + LLSTRING(CHESTTUBE_ACTION_MEDLEVEL), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [[0, 1, 2], ["STR_ACE_Medical_Treatment_Anyone", "STR_ACE_Medical_Treatment_Medics", "STR_ACE_Medical_Treatment_Doctors"], 2], + true +] call CBA_Settings_fnc_init; + +[ + QGVAR(chestTubeLocation), + "LIST", + LLSTRING(CHESTTUBE_LOCATION), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [[0,1,2,3],["STR_ACE_Common_Anywhere", "STR_ACE_Common_Vehicle", "STR_ACE_Medical_Treatment_MedicalFacilities", "STR_ACE_Medical_Treatment_VehiclesAndFacilities"],3], + true +] call CBA_Settings_fnc_init; + +// 0 Surgery Causes Unconsciousness: If you do an incision (without anesthesia & sedative) patient will go into CA +// 1 Unconsciousness Required for Surgery: Surgery fails unless patient is unconscious, needs anesthesia +// 2 No Unconsciousness from Surgery: Patient can stay awake without anesthesia, causes pain +// 3 Surgery Anesthesia: The patient is able to stay awake through the entirety of the surgery. If Etomidate has not been applied, then the patient will go into CA. +[ + QGVAR(chestTube_ConsciousnessRequirement), + "LIST", + [LLSTRING(SETTING_ConsciousnessRequirement), LLSTRING(SETTING_ConsciousnessRequirement_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], + [[0, 1, 2, 3], [LLSTRING(SETTING_Causes_Unconsciousness), LLSTRING(SETTING_Unconsciousness_Required), LLSTRING(SETTING_No_Unconsciousness), LLSTRING(SETTING_Anesthesia)], 0], + true +] call CBA_Settings_fnc_init; + ADDON = true; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf new file mode 100644 index 000000000..921e88b80 --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Removes the fracture status from an open fracture + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "LeftLeg"] call kat_surgery_fnc_chestTube + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +[QGVAR(chestTube), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf new file mode 100644 index 000000000..385a42b6e --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf @@ -0,0 +1,30 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski, Cplhardcore + * Local call to check if a patient has a chest Tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: chestTube Status + * 3: Side + * + * Return Value: + * Succesful treatment + * + * Example: + * [player, cursorObject, 3.1, 1] call kat_surgery_fnc_openchestTubeCheck + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; +private _liveChestTube = _chestTubeArray select _side; + + +if ((_number == 5) && (_liveChestTube == 2)) exitWith {true}; +if ((_number != 5) && (_liveChestTube >= 2.1) && (_liveChestTube <= 2.7)) exitWith {true}; + +false diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf new file mode 100644 index 000000000..bd613adfb --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Starts the surgical process for a fracture + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, 1] call kat_surgery_fnc_incision + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +[QGVAR(chestTubeIncision), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf new file mode 100644 index 000000000..0cf1c7ae7 --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf @@ -0,0 +1,68 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local call to start the surgical process for a chest tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, 1] call kat_surgery_fnc_incisionLocal + * + * Public: No + */ + +params ["_medic", "_patient", "_side"]; + +if (GVAR(Surgery_ConsciousnessRequirement) == 1 && !(IS_UNCONSCIOUS(_patient))) exitWith { + private _output = LLSTRING(fracture_fail); + [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}; + +private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; +private _liveTube = _chestTubeArray select _side; + +_liveTube = _liveTube + 0.1; +_chestTubeArray set [_part, _liveTube]; +_patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; + +[_patient, false] call ACEFUNC(dragging,setCarryable); +[_patient, false] call ACEFUNC(dragging,setDraggable); + +[_patient, "quick_view", LSTRING(incision_log), [[_medic] call ACEFUNC(common,getName), STRING_BODY_PARTS select 1]] call ACEFUNC(medical_treatment,addToLog); + +[{ + params ["_args", "_idPFH"]; + _args params ["_patient", "_part"]; + + private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; + private _liveTube = _chestTubeArray select _part; + private _count = [_patient, "Etomidate", true] call ACEFUNC(medical_status,getMedicationCount); + + private _alive = alive _patient; + + if ((!_alive) || (_liveTube == 0)) exitWith { + [_idPFH] call CBA_fnc_removePerFrameHandler; + _patient setVariable [QGVAR(etomidate_Pain), false] + }; + + if (((GVAR(ChestTube_ConsciousnessRequirement) in [0,1]) && (!(IS_UNCONSCIOUS(_patient))) && (_count <= 0.2)) || (GVAR(Surgery_ConsciousnessRequirement) == 3 && _count <= 0.2)) exitWith { + if !(_patient getVariable [QGVAR(etomidate_Pain), false]) then { + [_patient, "Pain", 2, 10, 120, 0.6, 40] call ACEFUNC(medical_status,addMedicationAdjustment); + _patient setVariable [QGVAR(etomidate_Pain), true]}; + [_patient, true] call ACEFUNC(medical,setUnconscious); + }; + + if (GVAR(ChestTube_ConsciousnessRequirement) == 2 && _count <= 0.2) then { + if !(_patient getVariable [QGVAR(etomidate_Pain), false]) then { + [_patient, "Pain", 2, 10, 120, 0.6, 40] call ACEFUNC(medical_status,addMedicationAdjustment); + _patient setVariable [QGVAR(etomidate_Pain), true] + }; + }; +}, 5, [_patient, _part]] call CBA_fnc_addPerFrameHandler; + diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf new file mode 100644 index 000000000..98c91324b --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf @@ -0,0 +1,40 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Local call to remove the fracture status from an open fracture + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Side + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, 1] call kat_surgery_fnc_openReductionLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_bodyPart", "_side"]; + +private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; +private _liveChestTube = _chestTubeArray select _side; + +if (_liveChestTube == 2.5) exitWith { + _liveChestTube = 0; + + _activeFracture set [_side, _liveChestTube]; + _chestTubeArray set [_side, _liveChestTube]; + _tensionPneumothoraxArray set [_side, false]; + _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; + _patient setVariable [QGVAR(pneumothorax), _chestTubeArray, true]; + _patient setVariable [QGVAR(hemopneumothorax), _tensionPneumothoraxArray, true]; + _patient setVariable [QGVAR(tensionPneumothorax), _tensionPneumothoraxArray, true]; + [_patient, true] call ACEFUNC(dragging,setCarryable); + [_patient, true] call ACEFUNC(dragging,setDraggable); +}; + +private _output = LLSTRING(fracture_fail); +[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf new file mode 100644 index 000000000..eea383ede --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf @@ -0,0 +1,22 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Progresses the treatment process for a complex fracture + * Arguments: + * 0: Medic + * 1: Patient + * 2: Current Fracture Status + * 3: Side + * + * Return Value: + * Nothing + * + * Example: + * [player, cursorObject, "_entry", 1] call kat_surgery_fnc_openReductionProgress + * + * Public: No + */ + +params ["_medic", "_patient", "_entry", "_side"]; + +[QGVAR(chestTubeProgress), [_medic, _patient, _entry, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf new file mode 100644 index 000000000..e764c9eea --- /dev/null +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf @@ -0,0 +1,49 @@ +#include "..\script_component.hpp" +/* + * Author: Mazinski + * Progresses the treatment process for a chest Tube + * + * Arguments: + * 0: Medic + * 1: Patient + * 2: Current Fracture Status + * 3: Side + * + * Return Value: + * None + * + * Example: + * [player, cursorObject, 2.1, 1] call kat_surgery_fnc_chestTubeProgressLocal; + * + * Public: No + */ + +params ["_medic", "_patient", "_entry", "_side"]; + +private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; +private _liveTube = _chestTubeArray select _side; +private _surgeryString = ""; +private _number = _entry; +private _reduce = false; +private _subReduce = false; + +if (_number == _liveTube) exitWith { + switch (_entry) do { + case (2.1):{ + _surgeryString = LSTRING(EXPOSED); + }; + case (2.3):{ + _surgeryString = LSTRING(IRRIGATED); + }; + }; + + [_patient, "quick_view", LSTRING(surgery_log), [[_medic] call ACEFUNC(common,getName), _surgeryString, STRING_BODY_PARTS select 1]] call ACEFUNC(medical_treatment,addToLog); + + _liveTube = _liveTube + 0.2; + + _chestTubeArray set [_side, _liveTube]; + _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; +}; + +private _output = LLSTRING(fracture_fail); +[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/breathing/stringtable.xml b/addons/breathing/stringtable.xml index 4116157d1..2b8a9b4ad 100644 --- a/addons/breathing/stringtable.xml +++ b/addons/breathing/stringtable.xml @@ -3019,5 +3019,153 @@ Allow Finger Thoracostomies + + %1 %2 the fracture on the %3 side + + + %1 made an chest incision on the %2 side + + + Chest Tube Action Failed + + + Perform Left Side Incision + + + Perform Right Side Incision + + + Performing Incision + + + Expand Left Side Incision + + + Expand Right Side Incision + + + Expanding + + + Prepare Left Side Chest Tube + + + Prepare Right Side Chest Tube + + + Preparing Chest Tube + + + Place Left Side Chest Tube + + + Place Right Side Chest Tube + + + Placing Chest Tube + + + exposed + + + irrigated + + + clamped + + + Chest Tube Consciousness Controls + + + Surgery Causes Unconsciousness: Surgery without anesthesia and sedation results in unconsciousness from CA. \nUnconsciousness Required for Surgery: Surgery requires patient to be unconscious. \nNo Unconsciousness from Surgery: Surgery doesn't induce unconsciousness, causes pain. \nSurgery Anesthesia: Patient stays awake during surgery if given Etomidate, if not they will go into CA. + 手術で意識喪失する: 麻酔と鎮静剤を使用しないで手術すると、心停止が発生し意識喪失します。 \n手術に無意識を要求: 手術するには患者が意識を失っていることが必要になります。 \n手術による意識喪失なし: 手術で意識喪失しなくなりますが、痛みが発生します。 \n手術を麻酔下で行う: エトミデートを投与すると、手術中も患者が起きたままになります。投与しない場合は心停止します。 + La cirugía provoca inconsciencia: La cirugía sin anestesia ni sedación provoca inconsciencia por IC. \nInconsciencia necesaria para la cirugía: La cirugía requiere que el paciente esté inconsciente. \nLa cirugía no provoca inconsciencia: La cirugía no induce inconsciencia, causa dolor. \nAnestesia quirúrgica: El paciente permanece despierto durante la cirugía si se le administra etomidato. + La chirurgie provoque une perte de conscience: La chirurgie sans anesthésie ni sédation entraîne une perte de conscience due à l'arrêt cardiaque. \nInconscience requise pour la chirurgie: la chirurgie nécessite que le patient soit inconscient. \nPas d'inconscience due à la chirurgie: la chirurgie n'induit pas d'inconscience, elle provoque de la douleur. \nAnesthésie chirurgicale: le patient reste éveillé pendant la chirurgie s'il reçoit de l'étomidate. + 수술로 인해 의식불명 발생: 마취 및 진정제 없이 수술을 하면 심정지로 인해 의식을 잃습니다.\n수술에 필요한 의식불명: 수술을 하려면 환자가 의식을 잃어야 합니다.\n수술 중 의식불명 발생 없음: 수술이 의식불명을 유발시키지 않지만 통증을 발생시킵니다.\n수술 마취: 에토미데이트를 투여하면 환자는 수술 중 깨어 있게 됩니다. + Eine Operation führt zu Bewusstlosigkeit: Eine Operation ohne Anästhesie und Sedierung führt zu Bewusstlosigkeit aufgrund von CA. \nFür eine Operation ist Bewusstlosigkeit erforderlich: Bei einer Operation muss der Patient bewusstlos sein. \nKeine Bewusstlosigkeit durch eine Operation: Eine Operation führt nicht zur Bewusstlosigkeit, sondern verursacht Schmerzen. \nOperationsanästhesie: Der Patient bleibt während der Operation wach, wenn er Etomidat erhält. + A cirurgia causa inconsciência: A cirurgia sem anestesia e sedação resulta em inconsciência. \nInconsciência necessária para a cirurgia: A cirurgia requer que o paciente esteja inconsciente. \nSem inconsciência por cirurgia: A cirurgia não induz inconsciência, causa dor. \nAnestesia cirúrgica: O paciente permanece acordado durante a cirurgia se receber etomidato. + Leikkaus aiheuttaa tajuttomuuden: leikkaus ilman anestesiaa ja sedaatiota johtaa tajuttomuuteen sydämenpysähdyksestä. \nLeikkaukseen tarvitaan tajuttomuus: leikkaus ei aiheuta tajuttomuutta, aiheuttaa kipua. \nLeikkauksen anestesia: Potilas pysyy hereillä leikkauksen aikana, jos hänelle annetaan etomidaattia, jos ei, hän menettää sydämenpysähdyksen. + Операция вызывает потерю сознания: операция без анестезии или седативного средства приводит к потере сознания из-за остановки сердца. \nбессознательное состояние, необходимое для операции: операция требует, чтобы пациент был без сознания. \nнет бессознательного состояния из-за операции: операция не вызывает бессознательного состояния, она вызывает боль. \nхирургическая анестезия: пациент не спит во время операции, если ему вводят этомидат. + Operatie veroorzaakt bewustzijnsverlies: Operaties zonder anesthesie en sedatie lijdt tot bewustzijnsverlies door hartstilstand. \n Bewusteloosheid benodigd voor operatie: Operaties vereisen dat de patiënt bewusteloos is. \n Geen bewustzijnsverlies door operaties: Operaties lijden niet tot bewustzijnsverlies, maar veroorzaken pijn. \n Operatie met anesthesie: Patiënt blijft wakker tijdens de operatie als etomidaat gegeven is, anders lijdt de operatie tot een hartstilstand. + Una chirurgia causa incoscienza: Una chirurgia senza anestesia e sedazione porta all'incoscienza a causa di CA. \n Incoscienza richiesta per la chirurgia: Per la chirurgia, è necessario che il paziente sia incosciente. \n Nessuna incoscienza dalla chirurgia: La chirurgia non causa incoscienza, ma dolore. \n Anestesia chirurgica: Il paziente rimane sveglio durante l'intervento se gli viene somministrato Etomidato. + 手术导致昏迷:没有麻醉和镇静的手术会导致CA昏迷。\n手术需要昏迷:手术要求患者昏迷。\手术不会导致无意识:手术不会引起无意识,只会引起疼痛。\n手术麻醉:如果给予依托咪酯,患者在手术期间保持清醒,否则将进入CA。 + + + Surgery Causes Unconsciousness + 手術で意識喪失する + La cirugía causa inconsciencia + La chirurgie provoque une perte de conscience + 수술로 인해 의식불명 발생 + Eine Operation führt zu Bewusstlosigkeit + A cirurgia causa inconsciência + Leikkaus aiheuttaa tajuttomuuden + Хирургическое вмешательство приводит к потере сознания + Operatie veroorzaakt bewustijnsverlies + Chirurgia causa incoscienza + 手术导致昏迷 + + + Unconsciousness Required for Surgery + Se requiere inconsciencia para la cirugía + 手術に無意識を要求 + Nécessite un état inconscient + 수술에 필요한 의식불명 + Für die Operation ist Bewusstlosigkeit erforderlich + Inconsciência necessária para a cirurgia + Leikkaukseen tarvitaan tajuttomuus + Потеря сознания, необходимая для хирургического вмешательства + Bewusteloosheid + Incoscienza richiesta per la chirurgia + 手术需要昏迷 + + + No Unconsciousness from Surgery + 手術で意識喪失しない + No se pierde la consciencia por la cirugía + Pas d'inconscience due à la chirurgie + 수술 중 의식불명 발생 없음 + Keine Bewusstlosigkeit durch die Operation + Inconsciência não necessária para a cirurgia + Ei tajuttomuutta leikkauksesta + После операции никто не теряет сознание + Geen Bewustzijnsverlies door operaties + Nessuna incoscienza dalla chirurgia + 手术后无意识 + + + Surgery Anesthesia + 手术麻醉 + 手術を麻酔下で行う + Anestesia quirúrgica + Anesthésie chirurgicale + 수술 마취 + Chirurgische Anästhesie + Anestesia cirúrgica + Leikkauksen anestesia + Хирургическая анестезия + Operatie met anesthesie + Anestesia chirurgica + + + Locations to place a Chest Tube + + + Allow Chest Tube + + + Time to perform chest tube intermediate actions + + + Sets how long it takes to perform intermediate chest tube such as expanding and and preperation + + + Chest Tube Placement Time + + + Chest Tube Action Time + + + Perform Incision Time + From 769c873e6392ac3293dd8d57c8d3f48697a1a717 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Mon, 30 Dec 2024 20:42:02 -0800 Subject: [PATCH 05/16] Weee --- addons/breathing/ACE_Medical_Treatment_Actions.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index 2608b743a..0e782503d 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -198,7 +198,6 @@ class ACE_Medical_Treatment_Actions { treatmentTime = 7; condition = "!GVAR(hardcoreBreathingTreatment)"; items[] = {"kat_aatKit"}; - condition = "true"; 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 = ""; @@ -394,12 +393,12 @@ class ACE_Medical_Treatment_Actions { treatmentTime = QGVAR(incisionTime); items[] = {"kat_scalpel"}; condition = QUOTE(([ARR_4(_medic,_patient,5,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); - callbackSuccess = QUOTE([ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_chestTubeIncision); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_chestTubeIncision)); }; class RightIncision: BasicBandage { displayName = CSTRING(ScalpelRight_Use); condition = QUOTE(([ARR_4(_medic,_patient,5,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); - callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_chestTubeIncision); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_chestTubeIncision)); }; class Spread: Incision { displayName = CSTRING(Retractor_Use); From 49242fccc111f6c675131e5ea687b9ff5a1b5f37 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Mon, 30 Dec 2024 23:41:58 -0800 Subject: [PATCH 06/16] weeee --- .../ACE_Medical_Treatment_Actions.hpp | 44 +++++++++----- addons/breathing/XEH_PREP.hpp | 2 - addons/breathing/XEH_postInit.sqf | 4 +- addons/breathing/XEH_preInit.sqf | 2 +- .../breathing/functions/fnc_fullHealLocal.sqf | 2 + .../fnc_treatmentAdvanced_chestTubeCheck.sqf | 10 ++-- ...eatmentAdvanced_chestTubeIncisionLocal.sqf | 21 +++++-- .../fnc_treatmentAdvanced_chestTubeLocal.sqf | 7 +-- ...eatmentAdvanced_chestTubeProgressLocal.sqf | 26 +++++--- ...tmentAdvanced_hardcorehemopneumothorax.sqf | 29 --------- ...Advanced_hardcorehemopneumothoraxLocal.sqf | 59 ------------------- addons/breathing/stringtable.xml | 19 +++--- 12 files changed, 81 insertions(+), 144 deletions(-) delete mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothorax.sqf delete mode 100644 addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal.sqf diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index 0e782503d..11051f577 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -141,7 +141,7 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); treatmentTime = 7; items[] = {"kat_aatKit"}; - condition = "!GVAR(hardcoreBreathingTreatment)"; + condition = QUOTE(!GVAR(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 = ""; @@ -196,7 +196,7 @@ class ACE_Medical_Treatment_Actions { allowSelfTreatment = 0; medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); treatmentTime = 7; - condition = "!GVAR(hardcoreBreathingTreatment)"; + condition = QUOTE(!GVAR(hardcoreBreathingTreatment)); items[] = {"kat_aatKit"}; callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] call FUNC(treatmentAdvanced_tensionpneumothorax);); callbackFailure = ""; @@ -239,7 +239,7 @@ class ACE_Medical_Treatment_Actions { animationMedicSelfProne = "AinvPpneMstpSlayW[wpn]Dnon_medic"; litter[] = {}; }; - class RightncdKit: TensionpneumothoraxTreatment { + class RightncdKit: ncdKit { 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);); }; @@ -374,12 +374,12 @@ class ACE_Medical_Treatment_Actions { treatmentTime = QGVAR(openTime); items[] = {"kat_aatKit"}; consumeItem = 1; - condition = QUOTE(([ARR_4(_medic,_patient,2.5,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + condition = QUOTE(([ARR_4(_medic,_patient,0.5,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); callbackSuccess = QUOTE([ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_chestTube)); }; class RightChestTube: ChestTube { displayName = CSTRING(Chest_TubeRight_Use); - condition = QUOTE(([ARR_4(_medic,_patient,2.5,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + condition = QUOTE(([ARR_4(_medic,_patient,0.5,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_chestTube)); }; class Incision: BasicBandage { @@ -395,35 +395,47 @@ class ACE_Medical_Treatment_Actions { condition = QUOTE(([ARR_4(_medic,_patient,5,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); callbackSuccess = QUOTE([ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_chestTubeIncision)); }; - class RightIncision: BasicBandage { + class RightIncision: Incision { displayName = CSTRING(ScalpelRight_Use); condition = QUOTE(([ARR_4(_medic,_patient,5,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); callbackSuccess = QUOTE([ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_chestTubeIncision)); }; - class Spread: Incision { + class Spread: BasicBandage { displayName = CSTRING(Retractor_Use); displayNameProgress = CSTRING(Retractor_Action); + category = "surgery"; + treatmentLocations = QGVAR(surgicalLocation); + treatmentTime = QGVAR(ChestTubeintermediateTime); + allowedSelections[] = {"Body"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(surgicalAction_MedLevel); items[] = {"kat_retractor"}; consumeItem = 1; - condition = QUOTE(([ARR_4(_medic,_patient,2.1,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,2.1,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); + condition = QUOTE(([ARR_4(_medic,_patient,0.1,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.1,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); }; class RightSpread: Spread { displayName = CSTRING(RetractorRight_Use); - condition = QUOTE(([ARR_4(_medic,_patient,2.1,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,2.1,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); + condition = QUOTE(([ARR_4(_medic,_patient,0.1,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.1,1)] call FUNC(treatmentAdvanced_chestTubeProgress)); }; - class Clamp: Incision { + class Clamp: BasicBandage { displayName = CSTRING(Clamp_Use); displayNameProgress = CSTRING(Clamp_Action); + category = "surgery"; + treatmentLocations = QGVAR(surgicalLocation); + treatmentTime = QGVAR(ChestTubeintermediateTime); + allowedSelections[] = {"Body"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(surgicalAction_MedLevel); items[] = {"kat_clamp"}; consumeItem = 1; - condition = QUOTE(([ARR_4(_medic,_patient,2.3,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,2.3,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); + condition = QUOTE(([ARR_4(_medic,_patient,0.3,0)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.3,0)] call FUNC(treatmentAdvanced_chestTubeProgress)); }; class RightClamp: Incision { displayName = CSTRING(ClampRight_Use); - condition = QUOTE(([ARR_4(_medic,_patient,2.3,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,2.3,1)] call FUNC(treatmentAdvanced_chestTubeProgress)); + condition = QUOTE(([ARR_4(_medic,_patient,0.3,1)] call FUNC(treatmentAdvanced_chestTubeCheck)) && (GVAR(hardcoreBreathingTreatment))); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,0.3,1)] call FUNC(treatmentAdvanced_chestTubeProgress)); }; }; diff --git a/addons/breathing/XEH_PREP.hpp b/addons/breathing/XEH_PREP.hpp index 3d74c0a19..5cddc61be 100644 --- a/addons/breathing/XEH_PREP.hpp +++ b/addons/breathing/XEH_PREP.hpp @@ -34,8 +34,6 @@ PREP(treatmentAdvanced_chestTubeProgress); PREP(treatmentAdvanced_chestTubeProgressLocal); PREP(treatmentAdvanced_fingerThoracostomy); PREP(treatmentAdvanced_fingerThoracostomyLocal); -PREP(treatmentAdvanced_hardcorehemopneumothorax); -PREP(treatmentAdvanced_hardcorehemopneumothoraxLocal); PREP(treatmentAdvanced_hemopneumothorax); PREP(treatmentAdvanced_hemopneumothoraxLocal); PREP(treatmentAdvanced_nasalCannula); diff --git a/addons/breathing/XEH_postInit.sqf b/addons/breathing/XEH_postInit.sqf index 43df13d69..1333a65e9 100644 --- a/addons/breathing/XEH_postInit.sqf +++ b/addons/breathing/XEH_postInit.sqf @@ -3,13 +3,15 @@ [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; [QGVAR(removeNasalCannulaLocal), LINKFUNC(treatmentAdvanced_removeNasalCannulaLocal)] call CBA_fnc_addEventHandler; +[QGVAR(chestTubeIncision), LINKFUNC(treatmentAdvanced_chestTubeIncisionLocal)] call CBA_fnc_addEventHandler; +[QGVAR(chestTubeProgress), LINKFUNC(treatmentAdvanced_chestTubeProgressLocal)] call CBA_fnc_addEventHandler; +[QGVAR(chestTube), LINKFUNC(treatmentAdvanced_chestTubeLocal)] call CBA_fnc_addEventHandler; [QGVAR(playCough), { params ["_unit"]; diff --git a/addons/breathing/XEH_preInit.sqf b/addons/breathing/XEH_preInit.sqf index e6d3d570d..82acde4e3 100644 --- a/addons/breathing/XEH_preInit.sqf +++ b/addons/breathing/XEH_preInit.sqf @@ -595,7 +595,7 @@ PREP_RECOMPILE_END; ] call CBA_Settings_fnc_init; [ - QGVAR(intermediateTime), + QGVAR(ChestTubeintermediateTime), "SLIDER", [LLSTRING(INTERMEDIATE_TIMER), LLSTRING(INTERMEDIATE_TIMER_DESC)], [CBA_SETTINGS_CAT, LSTRING(SubCategory_ThoraxInjuries)], diff --git a/addons/breathing/functions/fnc_fullHealLocal.sqf b/addons/breathing/functions/fnc_fullHealLocal.sqf index 8dfaebccb..15af4298e 100644 --- a/addons/breathing/functions/fnc_fullHealLocal.sqf +++ b/addons/breathing/functions/fnc_fullHealLocal.sqf @@ -27,6 +27,8 @@ _patient setVariable [QGVAR(deepPenetratingInjury), [false, false], true]; _patient setVariable [QGVAR(etco2Monitor), [], true]; _patient setVariable [QGVAR(breathRate), 15, true]; _patient setVariable [QGVAR(nasalCannula), false, true]; +_patient setVariable [QGVAR(chestTube), [0, 0], true]; + if (ACEGVAR(advanced_fatigue,enabled)) then { ["kat_LSDF"] call ACEFUNC(advanced_fatigue,removeDutyFactor); diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf index 385a42b6e..abbc94501 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf @@ -13,18 +13,16 @@ * Succesful treatment * * Example: - * [player, cursorObject, 3.1, 1] call kat_surgery_fnc_openchestTubeCheck + * [player, cursorObject, 3.1, 1] call kat_surgery_fnc_chestTubeCheck * * Public: No */ -params ["_medic", "_patient", "_side"]; - +params ["_medic", "_patient", "_number", "_side"]; private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; private _liveChestTube = _chestTubeArray select _side; - -if ((_number == 5) && (_liveChestTube == 2)) exitWith {true}; -if ((_number != 5) && (_liveChestTube >= 2.1) && (_liveChestTube <= 2.7)) exitWith {true}; +if ((_number == 5) && (_liveChestTube == 0)) exitWith {true}; +if ((_number != 5) && (_liveChestTube >= 0.1) && (_liveChestTube <= 0.7)) exitWith {true}; false diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf index 0cf1c7ae7..d34a63450 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf @@ -19,16 +19,25 @@ params ["_medic", "_patient", "_side"]; -if (GVAR(Surgery_ConsciousnessRequirement) == 1 && !(IS_UNCONSCIOUS(_patient))) exitWith { - private _output = LLSTRING(fracture_fail); +if (GVAR(SchestTube_ConsciousnessRequirement) == 1 && !(IS_UNCONSCIOUS(_patient))) exitWith { + private _output = LLSTRING(chestTube_fail); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; +private _lidocaineCount = [_patient, "Lidocaine", false] call ACEFUNC(medical_status,getMedicationCount); +private _morphineCount = [_patient, "Morphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _nalbuphineCount = [_patient, "Nalbuphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _fentanylCount = [_patient, "Fentanyl", false] call ACEFUNC(medical_status,getMedicationCount); +private _ketamineCount = [_patient, "Ketamine", false] call ACEFUNC(medical_status,getMedicationCount); +if ((_lidocaineCount <= 0.6 && _morphineCount <= 0.8 && _nalbuphineCount <= 0.8 && _fentanylCount <= 0.8 && _ketamineCount <= 0.8) || !IS_UNCONSCIOUS(_patient)) then { + private _pain = random [0.7, 0.8, 0.9]; + [_patient, _pain] call ACEFUNC(medical_status,adjustPainLevel); +}; private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; private _liveTube = _chestTubeArray select _side; _liveTube = _liveTube + 0.1; -_chestTubeArray set [_part, _liveTube]; +_chestTubeArray set [_side, _liveTube]; _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; [_patient, false] call ACEFUNC(dragging,setCarryable); @@ -38,10 +47,10 @@ _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; [{ params ["_args", "_idPFH"]; - _args params ["_patient", "_part"]; + _args params ["_patient", "_side"]; private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; - private _liveTube = _chestTubeArray select _part; + private _liveTube = _chestTubeArray select _side; private _count = [_patient, "Etomidate", true] call ACEFUNC(medical_status,getMedicationCount); private _alive = alive _patient; @@ -64,5 +73,5 @@ _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; _patient setVariable [QGVAR(etomidate_Pain), true] }; }; -}, 5, [_patient, _part]] call CBA_fnc_addPerFrameHandler; +}, 5, [_patient, _side]] call CBA_fnc_addPerFrameHandler; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf index 98c91324b..6c972c131 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf @@ -21,11 +21,10 @@ params ["_medic", "_patient", "_bodyPart", "_side"]; private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; private _liveChestTube = _chestTubeArray select _side; - -if (_liveChestTube == 2.5) exitWith { +systemChat str _liveChestTube; +if (_liveChestTube == 0.5) exitWith { _liveChestTube = 0; - _activeFracture set [_side, _liveChestTube]; _chestTubeArray set [_side, _liveChestTube]; _tensionPneumothoraxArray set [_side, false]; _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; @@ -36,5 +35,5 @@ if (_liveChestTube == 2.5) exitWith { [_patient, true] call ACEFUNC(dragging,setDraggable); }; -private _output = LLSTRING(fracture_fail); +private _output = LLSTRING(chestTube_fail); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf index e764c9eea..8a34b889e 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf @@ -13,7 +13,7 @@ * None * * Example: - * [player, cursorObject, 2.1, 1] call kat_surgery_fnc_chestTubeProgressLocal; + * [player, cursorObject, 2.1, 1] call kat_breathing_fnc_chestTubeProgressLocal; * * Public: No */ @@ -24,20 +24,28 @@ private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; private _liveTube = _chestTubeArray select _side; private _surgeryString = ""; private _number = _entry; -private _reduce = false; -private _subReduce = false; + +private _lidocaineCount = [_patient, "Lidocaine", false] call ACEFUNC(medical_status,getMedicationCount); +private _morphineCount = [_patient, "Morphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _nalbuphineCount = [_patient, "Nalbuphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _fentanylCount = [_patient, "Fentanyl", false] call ACEFUNC(medical_status,getMedicationCount); +private _ketamineCount = [_patient, "Ketamine", false] call ACEFUNC(medical_status,getMedicationCount); +if ((_lidocaineCount <= 0.6 && _morphineCount <= 0.8 && _nalbuphineCount <= 0.8 && _fentanylCount <= 0.8 && _ketamineCount <= 0.8) || !IS_UNCONSCIOUS(_patient)) then { + private _pain = random [0.7, 0.8, 0.9]; + [_patient, _pain] call ACEFUNC(medical_status,adjustPainLevel); +}; if (_number == _liveTube) exitWith { switch (_entry) do { - case (2.1):{ - _surgeryString = LSTRING(EXPOSED); + case (0.1):{ + _surgeryString = LSTRING(SPREAD); }; - case (2.3):{ - _surgeryString = LSTRING(IRRIGATED); + case (0.3):{ + _surgeryString = LSTRING(PREPARED); }; }; - [_patient, "quick_view", LSTRING(surgery_log), [[_medic] call ACEFUNC(common,getName), _surgeryString, STRING_BODY_PARTS select 1]] call ACEFUNC(medical_treatment,addToLog); + [_patient, "quick_view", LSTRING(ChestTube_log), [[_medic] call ACEFUNC(common,getName), _surgeryString, STRING_BODY_PARTS select 1]] call ACEFUNC(medical_treatment,addToLog); _liveTube = _liveTube + 0.2; @@ -45,5 +53,5 @@ if (_number == _liveTube) exitWith { _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; }; -private _output = LLSTRING(fracture_fail); +private _output = LLSTRING(chest_tube_fail); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothorax.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothorax.sqf deleted file mode 100644 index bf6627ac9..000000000 --- a/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothorax.sqf +++ /dev/null @@ -1,29 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Kygan - * Treatment for hemopneumothorax - * Main function - * - * Arguments: - * 0: Medic - * 1: Patient - * 2: Body Part - * 3: Treatment - * 4: Item User (not used) - * 5: Used Item - * - * Return Value: - * None - * - * Example: - * [player, cursorObject, "Body", "HemopneumothoraxTreatment", objNull, "kat_aatKit"] call kat_breathing_fnc_treatmentAdvanced_hardcorehemopneumothorax; - * - * Public: No - */ - -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(hardcorehemopneumothoraxLocal), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal.sqf deleted file mode 100644 index 7a7b0202c..000000000 --- a/addons/breathing/functions/fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal.sqf +++ /dev/null @@ -1,59 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Kygan, modified by YetheSamartaka and Tomcat. - * Treatment for hemopneumothorax - * Main function - * - * Arguments: - * 0: Medic - * 1: Patient - * - * Return Value: - * None - * - * Example: - * call kat_breathing_fnc_treatmentAdvanced_hardcorehemopneumothoraxLocal; - * - * Public: No - */ - -params ["_medic", "_patient", "_side"]; - -private _lidocaineCount = [_patient, "Lidocaine", false] call ACEFUNC(medical_status,getMedicationCount); -private _morphineCount = [_patient, "Morphine", false] call ACEFUNC(medical_status,getMedicationCount); -private _nalbuphineCount = [_patient, "Nalbuphine", false] call ACEFUNC(medical_status,getMedicationCount); -private _fentanylCount = [_patient, "Fentanyl", false] call ACEFUNC(medical_status,getMedicationCount); -private _ketamineCount = [_patient, "Ketamine", false] call ACEFUNC(medical_status,getMedicationCount); -if ((_lidocaineCount <= 0.6 && _morphineCount <= 0.8 && _nalbuphineCount <= 0.8 && _fentanylCount <= 0.8 && _ketamineCount <= 0.8) || !IS_UNCONSCIOUS(_patient)) then { - private _pain = random [0.7, 0.8, 0.9]; - [_patient, _pain] call ACEFUNC(medical_status,adjustPainLevel); -}; - -private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; -if (_activeChestSeal select _side) then { - private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; - _hemopneumothorax set [_side, false]; - _patient setVariable [QGVAR(hemopneumothorax), _hemopneumothorax, true]; -}; - -private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; -private _tensionIndex = _ht find "tension"; -if (_tensionIndex > -1) then { - _ht deleteAt _tensionIndex; - _patient setVariable [QEGVAR(circulation,ht), _ht, true]; -}; - -private _pneumothorax = _patient getVariable [QGVAR(pneumothorax), [0, 0]]; -private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; - -if (!(_patient getVariable [QGVAR(pneumothorax), [0, 0]] select _side > 0) && - !(_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); - - if (GVAR(clearChestSealAfterTreatment)) then { - _activeChestSeal set [_side, false]; - _patient setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; - }; -}; \ No newline at end of file diff --git a/addons/breathing/stringtable.xml b/addons/breathing/stringtable.xml index 2b8a9b4ad..b05f21720 100644 --- a/addons/breathing/stringtable.xml +++ b/addons/breathing/stringtable.xml @@ -3013,17 +3013,17 @@ Activate Hardcore Treatment options - + Enables hardcore treatments including finger thoracostomies Allow Finger Thoracostomies - - %1 %2 the fracture on the %3 side + + %1 %2 the incision - %1 made an chest incision on the %2 side + %1 made an chest incision Chest Tube Action Failed @@ -3064,14 +3064,11 @@ Placing Chest Tube - - exposed - - - irrigated + + Spread - - clamped + + Prepared Chest Tube Consciousness Controls From 7f2ce7bb0e58bf653e43e35a668bad8cf4522f5b Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Tue, 31 Dec 2024 00:35:26 -0800 Subject: [PATCH 07/16] ARG --- .../functions/fnc_treatmentAdvanced_chestTubeLocal.sqf | 5 ++--- .../fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf | 1 - addons/breathing/script_component.hpp | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf index 6c972c131..caa5ea0eb 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf @@ -17,11 +17,10 @@ * Public: No */ -params ["_medic", "_patient", "_bodyPart", "_side"]; - +params ["_medic", "_patient", "_side"]; private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; private _liveChestTube = _chestTubeArray select _side; -systemChat str _liveChestTube; + if (_liveChestTube == 0.5) exitWith { _liveChestTube = 0; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf index 219e4d565..ba09efbbb 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf @@ -28,7 +28,6 @@ if ((_lidocaineCount <= 0.6 && _morphineCount <= 0.8 && _nalbuphineCount <= 0 private _pain = random [0.7, 0.8, 0.9]; [_patient, _pain] call ACEFUNC(medical_status,adjustPainLevel); }; -if (random 100 <= 30) exitWith {}; private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; if (_activeChestSeal select _side) then { private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; diff --git a/addons/breathing/script_component.hpp b/addons/breathing/script_component.hpp index 465407282..1d65e2796 100644 --- a/addons/breathing/script_component.hpp +++ b/addons/breathing/script_component.hpp @@ -3,7 +3,7 @@ #include "\x\kat\addons\main\script_mod.hpp" #include "\x\kat\addons\gui\gui_defines.hpp" -// #define DEBUG_MODE_FULL +//#define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS From 7951eec334116834d6ab28157e3e7abfdfca0121 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Wed, 1 Jan 2025 19:27:47 -0800 Subject: [PATCH 08/16] YEAH, ITS DONE --- .../ACE_Medical_Treatment_Actions.hpp | 4 ++-- addons/breathing/XEH_PREP.hpp | 1 + .../fnc_gui_updateInjuryListPart.sqf | 4 ++-- .../functions/fnc_handlePulmoHit.sqf | 15 ++++++++++----- .../breathing/functions/fnc_listenLungs.sqf | 8 ++++---- .../fnc_treatmentAdvanced_chestTube.sqf | 10 +++++----- .../fnc_treatmentAdvanced_chestTubeCheck.sqf | 2 +- ...nc_treatmentAdvanced_chestTubeIncision.sqf | 6 +++--- ...eatmentAdvanced_chestTubeIncisionLocal.sqf | 2 +- .../fnc_treatmentAdvanced_chestTubeLocal.sqf | 19 +++++++++++++------ ...nc_treatmentAdvanced_chestTubeProgress.sqf | 6 +++--- ...eatmentAdvanced_chestTubeProgressLocal.sqf | 4 ++-- ...c_treatmentAdvanced_fingerThoracostomy.sqf | 14 +++++--------- ...atmentAdvanced_fingerThoracostomyLocal.sqf | 8 ++++++-- 14 files changed, 58 insertions(+), 45 deletions(-) diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index 11051f577..5f1860fba 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -170,7 +170,7 @@ class ACE_Medical_Treatment_Actions { 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);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_3(_medic,_patient,0)] call FUNC(treatmentAdvanced_FingerThoracostomy);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -185,7 +185,7 @@ class ACE_Medical_Treatment_Actions { }; 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);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_3(_medic,_patient,1)] call FUNC(treatmentAdvanced_FingerThoracostomy);); }; class TensionpneumothoraxTreatment { displayName = CSTRING(tensionpneumothorax_display); diff --git a/addons/breathing/XEH_PREP.hpp b/addons/breathing/XEH_PREP.hpp index 5cddc61be..b5127342e 100644 --- a/addons/breathing/XEH_PREP.hpp +++ b/addons/breathing/XEH_PREP.hpp @@ -26,6 +26,7 @@ PREP(refillOxygenTank); PREP(removeOxygenMask); PREP(treatmentAdvanced_chestSeal); PREP(treatmentAdvanced_chestSealLocal); +PREP(treatmentAdvanced_chestTube); PREP(treatmentAdvanced_chestTubeCheck); PREP(treatmentAdvanced_chestTubeIncision); PREP(treatmentAdvanced_chestTubeIncisionLocal); diff --git a/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf b/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf index 03a0291cd..d09b96489 100644 --- a/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf +++ b/addons/breathing/functions/fnc_gui_updateInjuryListPart.sqf @@ -68,8 +68,8 @@ if (_selectionN isEqualTo 1) then { _tensionhemothorax = true; }; }; - - if ((_target getVariable [QGVAR(activeChestSeal), [false, false]] select 0) || (_target getVariable [QGVAR(activeChestSeal), [false, false]] select 1)) then { + private _activeChestSeal = _target getVariable [QGVAR(activeChestSeal), [false, false]]; + if ((_activeChestSeal select 0) || (_activeChestSeal select 1)) then { _entries pushBack [LLSTRING(ChestSealApplied), [1,0.95,0,1]]; }; { diff --git a/addons/breathing/functions/fnc_handlePulmoHit.sqf b/addons/breathing/functions/fnc_handlePulmoHit.sqf index cf9ee1f73..4e31ba093 100644 --- a/addons/breathing/functions/fnc_handlePulmoHit.sqf +++ b/addons/breathing/functions/fnc_handlePulmoHit.sqf @@ -41,15 +41,18 @@ if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) then { [_unit, 0.2] call ACEFUNC(medical_status,adjustPainLevel); _pneumothoraxState set [_side, 1]; _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; - _unit setVariable [QGVAR(deepPenetratingInjury), true, true]; - _unit setVariable [QGVAR(activeChestSeal), false, true]; + _deepPenetratingInjury set [_side, true]; + _unit setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true]; + _activeChestSeal set [_side, true]; + _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; [_unit, _chanceIncrease, _side] call FUNC(handlePneumothoraxDeterioration); } else { if (_tensionState select _side) then { _pneumothoraxState set [_side, 4]; _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; - _unit setVariable [QGVAR(activeChestSeal), false, true]; + _activeChestSeal set [_side, true]; + _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; } else { if (GVAR(advPtxEnable)) then { [_unit, _chanceIncrease, _side] call FUNC(inflictAdvancedPneumothorax); @@ -58,8 +61,10 @@ if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) then { }; } else { // Damage threshold was passed but no pneumothorax given, try to just give injury instead if (floor (random 100) < GVAR(deepPenetratingInjuryChance)) then { - _unit setVariable [QGVAR(deepPenetratingInjury), true, true]; - _unit setVariable [QGVAR(activeChestSeal), false, true]; + _deepPenetratingInjury set [_side, true]; + _unit setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true]; + _activeChestSeal set [_side, true]; + _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; if ((floor (random 100) <= EGVAR(circulation,tamponadeChance)) && (_unit getVariable [QEGVAR(circulation,effusion), 0] == 0)) then { _unit setVariable [QEGVAR(circulation,effusion), 1, true]; diff --git a/addons/breathing/functions/fnc_listenLungs.sqf b/addons/breathing/functions/fnc_listenLungs.sqf index c69c0d375..bbd9918ec 100644 --- a/addons/breathing/functions/fnc_listenLungs.sqf +++ b/addons/breathing/functions/fnc_listenLungs.sqf @@ -6,12 +6,12 @@ * Arguments: * 0: Medic * 1: Patient - * + * 2: Side * Return Value: * None * * Example: - * [player, cursorTarget] call kat_breathing_fnc_listenLungs; + * [player, cursorTarget, 1] call kat_breathing_fnc_listenLungs; * * Public: No */ @@ -28,7 +28,7 @@ variantDelay = 0; params ["_args", "_idPFH"]; _args params ["_medic","_patient","_volume"]; - private _HR = GET_HEART_RATE(_patient); + private _BR = GET_BREATHING_RATE(_patient); if (!(_medic getVariable [QGVAR(usingStethoscope), false]) || !(alive _patient) || _HR isEqualTo 0) exitWith { [_idPFH] call CBA_fnc_removePerFrameHandler; @@ -37,7 +37,7 @@ variantDelay = 0; 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; + _breathDelay = _BR; _random = round random 1; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf index 921e88b80..cdacf6d84 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTube.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* - * Author: Mazinski - * Removes the fracture status from an open fracture + * Author: Mazinski, Cplhardcore + * Ends the treatment cycle for a chest tube * * Arguments: * 0: Medic @@ -12,11 +12,11 @@ * Nothing * * Example: - * [player, cursorObject, "LeftLeg"] call kat_surgery_fnc_chestTube - * + * [player, cursorObject, 1] call ka__breathing_treatmentAdvanced_chestTube + * Public: No */ params ["_medic", "_patient", "_side"]; -[QGVAR(chestTube), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; +[QGVAR(chestTube), [_medic, _patient, _side], _patient] call CBA_fnc_targetEvent; \ No newline at end of file diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf index abbc94501..ea7e4e7e4 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeCheck.sqf @@ -13,7 +13,7 @@ * Succesful treatment * * Example: - * [player, cursorObject, 3.1, 1] call kat_surgery_fnc_chestTubeCheck + * [player, cursorObject, 3.1, 1] call kat_breathing_treatmentAdvanced_chestTubeCheck * * Public: No */ diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf index bd613adfb..f3419b068 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncision.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* - * Author: Mazinski - * Starts the surgical process for a fracture + * Author: Cplhardcore + * Starts the surgical process for a chest tube * * Arguments: * 0: Medic @@ -12,7 +12,7 @@ * Nothing * * Example: - * [player, cursorObject, 1] call kat_surgery_fnc_incision + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_chestTubeIncision * * Public: No */ diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf index d34a63450..742625f20 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeIncisionLocal.sqf @@ -12,7 +12,7 @@ * None * * Example: - * [player, cursorObject, 1] call kat_surgery_fnc_incisionLocal + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_chestTubeIncisionLocal * * Public: No */ diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf index caa5ea0eb..d840b0444 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeLocal.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* - * Author: Mazinski - * Local call to remove the fracture status from an open fracture + * Author: Cplhadcore + * Local call to remove hemothoraxes/tension pnumos after a placed chest tube * * Arguments: * 0: Medic @@ -12,7 +12,7 @@ * None * * Example: - * [player, cursorObject, 1] call kat_surgery_fnc_openReductionLocal; + * [player, cursorObject, 1] call kat_breathing_treatmentAdvanced_chestTubeLocal; * * Public: No */ @@ -21,15 +21,22 @@ params ["_medic", "_patient", "_side"]; private _chestTubeArray = _patient getVariable [QGVAR(chestTube), [0,0]]; private _liveChestTube = _chestTubeArray select _side; + if (_liveChestTube == 0.5) exitWith { _liveChestTube = 0; _chestTubeArray set [_side, _liveChestTube]; _tensionPneumothoraxArray set [_side, false]; _patient setVariable [QGVAR(chestTube), _chestTubeArray, true]; - _patient setVariable [QGVAR(pneumothorax), _chestTubeArray, true]; - _patient setVariable [QGVAR(hemopneumothorax), _tensionPneumothoraxArray, true]; - _patient setVariable [QGVAR(tensionPneumothorax), _tensionPneumothoraxArray, true]; + private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; + if (_activeChestSeal select _side) then { + private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; + _hemopneumothorax set [_side, false]; + _patient setVariable [QGVAR(hemopneumothorax), _hemopneumothorax, true]; + private _tensionPneumothorax = _patient getVariable [QGVAR(tensionPneumothorax), [false, false]]; + _tensionPneumothorax set [_side, false]; + _patient setVariable [QGVAR(tensionPneumothorax), _tensionPneumothorax, true]; + }; [_patient, true] call ACEFUNC(dragging,setCarryable); [_patient, true] call ACEFUNC(dragging,setDraggable); }; diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf index eea383ede..0b4b9604e 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgress.sqf @@ -1,18 +1,18 @@ #include "..\script_component.hpp" /* * Author: Mazinski - * Progresses the treatment process for a complex fracture + * Progresses the treatment process for a Chest Tube * Arguments: * 0: Medic * 1: Patient - * 2: Current Fracture Status + * 2: Current Chest Tube Status * 3: Side * * Return Value: * Nothing * * Example: - * [player, cursorObject, "_entry", 1] call kat_surgery_fnc_openReductionProgress + * [player, cursorObject, "_entry", 1] call kat_breathing_treatmentAdvanced_chestTubeProgress; * * Public: No */ diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf index 8a34b889e..074ed7d1c 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_chestTubeProgressLocal.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" /* - * Author: Mazinski + * Author: Cplhardcore * Progresses the treatment process for a chest Tube * * Arguments: @@ -13,7 +13,7 @@ * None * * Example: - * [player, cursorObject, 2.1, 1] call kat_breathing_fnc_chestTubeProgressLocal; + * [player, cursorObject, 0.1, 1] call kat_breathing_fnc_treatmentAdvanced_chestTubeProgressLocal; * * Public: No */ diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf index e8571f6b2..138af77ec 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomy.sqf @@ -1,27 +1,23 @@ #include "..\script_component.hpp" /* - * Author: Kygan - * Treatment for hemopneumothorax + * Author: Cplhardcore + * Treatment for hemopneumothorax/tensionPnumo * Main function * * Arguments: * 0: Medic * 1: Patient - * 2: Body Part - * 3: Treatment - * 4: Item User (not used) - * 5: Used Item - * + * 2: Side * Return Value: * None * * Example: - * [player, cursorObject, "Body", "HemopneumothoraxTreatment", objNull, "kat_aatKit"] call kat_breathing_fnc_treatmentAdvanced_fingerThoracostomy; + * [player, cursorObject, 1] call kat_breathing_fnc_treatmentAdvanced_fingerThoracostomy; * * Public: No */ -params ["_medic", "_patient", "_bodyPart", "_classname", "", "_usedItem", "_side"]; +params ["_medic", "_patient", "_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); diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf index ba09efbbb..521986dc3 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_fingerThoracostomyLocal.sqf @@ -1,7 +1,7 @@ #include "..\script_component.hpp" /* - * Author: Kygan, modified by YetheSamartaka and Tomcat. - * Treatment for hemopneumothorax + * Author: Cplhardcore + * Treatment for hemopneumothorax/tensionPnumo * Main function * * Arguments: @@ -28,11 +28,15 @@ if ((_lidocaineCount <= 0.6 && _morphineCount <= 0.8 && _nalbuphineCount <= 0 private _pain = random [0.7, 0.8, 0.9]; [_patient, _pain] call ACEFUNC(medical_status,adjustPainLevel); }; +if (random 100 <= 30) exitWith {}; private _activeChestSeal = _patient getVariable [QGVAR(activeChestSeal), [false, false]]; if (_activeChestSeal select _side) then { private _hemopneumothorax = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; _hemopneumothorax set [_side, false]; _patient setVariable [QGVAR(hemopneumothorax), _hemopneumothorax, true]; + private _tensionPneumothorax = _patient getVariable [QGVAR(tensionPneumothorax), [false, false]]; + _tensionPneumothorax set [_side, false]; + _patient setVariable [QGVAR(tensionPneumothorax), _tensionPneumothorax, true]; }; private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; From 87d697c12c8683c06fd763e74b88953bdd917b66 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Mon, 13 Jan 2025 22:17:54 -0800 Subject: [PATCH 09/16] Should be done --- .../functions/fnc_handlePulmoHit.sqf | 118 ------------------ .../functions/fnc_woundsHandlerPulmoHit.sqf | 57 ++++----- 2 files changed, 29 insertions(+), 146 deletions(-) delete mode 100644 addons/breathing/functions/fnc_handlePulmoHit.sqf diff --git a/addons/breathing/functions/fnc_handlePulmoHit.sqf b/addons/breathing/functions/fnc_handlePulmoHit.sqf deleted file mode 100644 index 4e31ba093..000000000 --- a/addons/breathing/functions/fnc_handlePulmoHit.sqf +++ /dev/null @@ -1,118 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Katalam - * Called when a unit is damaged. - * - * Arguments: - * 0: Unit That Was Hit - * 1: Damage done to each body part - * 0: Damage - * 1: Bodypart - * 2: Shooter - * 3: Ammo classname or damage type - * - * Return Value: - * None - * - * Example: - * [cursorTarget, [1, "Body"], objNull, "BulletBase"] call kat_breathing_fnc_handlePulmoHit; - * - * Public: No - */ - -params ["_unit", "_allDamages", "", "_ammo"]; -_allDamages select 0 params ["_damage", "_bodyPart"]; - -if (!(GVAR(enable)) || !(_bodyPart isEqualTo "Body") || !(_ammo isKindOf "BulletBase")) exitWith {}; -//Other mods can utilise KAT_Pneumothorax_Exclusion variable to prevent Pneumothorax from happening -if ((_damage < GVAR(pneumothoraxDamageThreshold)) || (_unit getVariable ["KAT_Pneumothorax_Exclusion", false])) exitWith {}; - -private _chanceIncrease = 0; -if (GVAR(pneumothoraxDamageThreshold_TakenDamage)) then { - _chanceIncrease = linearConversion [GVAR(pneumothoraxDamageThreshold), 3, _damage, 0, 30, true]; -}; - -if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) then { - 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); - _pneumothoraxState set [_side, 1]; - _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; - _deepPenetratingInjury set [_side, true]; - _unit setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true]; - _activeChestSeal set [_side, true]; - _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; - - [_unit, _chanceIncrease, _side] call FUNC(handlePneumothoraxDeterioration); - } else { - if (_tensionState select _side) then { - _pneumothoraxState set [_side, 4]; - _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; - _activeChestSeal set [_side, true]; - _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; - } else { - if (GVAR(advPtxEnable)) then { - [_unit, _chanceIncrease, _side] call FUNC(inflictAdvancedPneumothorax); - }; - }; - }; -} else { // Damage threshold was passed but no pneumothorax given, try to just give injury instead - if (floor (random 100) < GVAR(deepPenetratingInjuryChance)) then { - _deepPenetratingInjury set [_side, true]; - _unit setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true]; - _activeChestSeal set [_side, true]; - _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; - - if ((floor (random 100) <= EGVAR(circulation,tamponadeChance)) && (_unit getVariable [QEGVAR(circulation,effusion), 0] == 0)) then { - _unit setVariable [QEGVAR(circulation,effusion), 1, true]; - - [{ - params ["_unit"]; - - if (_unit getVariable [QEGVAR(circulation,effusion), 0] > 0) then { - // Try to deteriorate at set interval - [{ - params ["_args", "_idPFH"]; - _args params ["_unit"]; - - private _effusion = _unit getVariable [QEGVAR(circulation,effusion), 0]; - - // If patient is dead, already treated or has already deteriorated into full tamponade, kill the PFH - if ((_effusion == 0) || !(alive _unit) || (_effusion == 4)) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - - if (floor (random 100) <= EGVAR(circulation,deterioratingTamponade_chance)) then { - private _effusionTarget = _effusion + 1; - - // Once deteriorated far enough try to inflict tamponade - if (_effusionTarget == 4) exitWith { - private _ht = _unit getVariable [QEGVAR(circulation,ht), []]; - - if ((_ht findIf {_x isEqualTo "tamponade"}) == -1) then { - _ht pushBack "tamponade"; - - if (_unit getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { - [QACEGVAR(medical,FatalVitals), _unit] call CBA_fnc_localEvent; - }; - - _unit setVariable [QEGVAR(circulation,ht), _ht, true]; - }; - - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - - _unit setVariable [QEGVAR(circulation,effusion), _effusionTarget, true]; - [_unit, 0.5 * (_effusionTarget / 4)] call ACEFUNC(medical_status,adjustPainLevel); // Adjust pain based on severity - [_unit, -10, -10, "cardiac_tension"] call EFUNC(circulation,updateBloodPressureChange); // Emulate low blood pressure and low heart rate caused by tamponade - }; - - }, EGVAR(circulation,deterioratingTamponade_interval), [_unit]] call CBA_fnc_addPerFrameHandler; - }; - }, [_unit], EGVAR(circulation,deterioratingTamponade_interval)] call CBA_fnc_waitAndExecute; - }; - }; -}; diff --git a/addons/breathing/functions/fnc_woundsHandlerPulmoHit.sqf b/addons/breathing/functions/fnc_woundsHandlerPulmoHit.sqf index 2206ba366..dc2914ae1 100644 --- a/addons/breathing/functions/fnc_woundsHandlerPulmoHit.sqf +++ b/addons/breathing/functions/fnc_woundsHandlerPulmoHit.sqf @@ -35,34 +35,33 @@ if (GVAR(pneumothoraxDamageThreshold_TakenDamage)) then { }; // Damage threshold passed & pneumothorax given -if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) exitWith { - private _hasTensionPneumothorax = _unit getVariable [QGVAR(tensionpneumothorax), false]; - private _initialPneumothorax = (_unit getVariable [QGVAR(pneumothorax), 0]) == 0; - - switch (true) do { - case (_hasTensionPneumothorax): { // fully deteriorate pneumothorax - _unit setVariable [QGVAR(pneumothorax), 4, true]; - _unit setVariable [QGVAR(activeChestSeal), false, true]; - }; - case (_initialPneumothorax): { - // Set pain to at least 0.2 - [_unit, 0.2] call ACEFUNC(medical_status,adjustPainLevel); - - // add breathing sound - _unit setVariable [QGVAR(pneumothorax), 1, true]; - _unit setVariable [QGVAR(deepPenetratingInjury), true, true]; - _unit setVariable [QGVAR(activeChestSeal), false, true]; - - // Start deteriorating after delay - [_unit, _chanceIncrease] call FUNC(handlePneumothoraxDeterioration); - }; - - case (GVAR(advPtxEnable)): { - // Roll chance to get advanced pneumothorax while afflicted with early stage of pneumothorax - [_unit, _chanceIncrease] call FUNC(inflictAdvancedPneumothorax); +if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) then { + 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); + _pneumothoraxState set [_side, 1]; + _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; + _deepPenetratingInjury set [_side, true]; + _unit setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true]; + _activeChestSeal set [_side, true]; + _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; + + [_unit, _chanceIncrease, _side] call FUNC(handlePneumothoraxDeterioration); + } else { + if (_tensionState select _side) then { + _pneumothoraxState set [_side, 4]; + _unit setVariable [QGVAR(pneumothorax), _pneumothoraxState, true]; + _activeChestSeal set [_side, true]; + _unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; + } else { + if (GVAR(advPtxEnable)) then { + [_unit, _chanceIncrease, _side] call FUNC(inflictAdvancedPneumothorax); + }; }; }; - _this // return }; @@ -71,8 +70,10 @@ if (floor (random 100) < (GVAR(pneumothoraxChance) + _chanceIncrease)) exitWith // No injury if (floor (random 100) >= GVAR(deepPenetratingInjuryChance)) exitWith {_this}; -_unit setVariable [QGVAR(deepPenetratingInjury), true, true]; -_unit setVariable [QGVAR(activeChestSeal), false, true]; +_deepPenetratingInjury set [_side, true]; +_unit setVariable [QGVAR(deepPenetratingInjury), _deepPenetratingInjury, true]; +_activeChestSeal set [_side, true]; +_unit setVariable [QGVAR(activeChestSeal), _activeChestSeal, true]; // Check for tamponade From 80e59f2748635c93f2f73a01c9dc949eb58a876f Mon Sep 17 00:00:00 2001 From: MiszczuZPolski <71414303+MiszczuZPolski@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:38:43 +0100 Subject: [PATCH 10/16] Update fnc_ultraAssessmentLocal.sqf --- addons/surgery/functions/fnc_ultraAssessmentLocal.sqf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf b/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf index 85d6f1536..9931c4f8e 100644 --- a/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf +++ b/addons/surgery/functions/fnc_ultraAssessmentLocal.sqf @@ -78,9 +78,11 @@ if (_patient getVariable [QEGVAR(circulation,effusion), 0] > 0) then { if !(alive _patient) then { _cardiac = LSTRING(Ultra_Cardiac_Unshockable); _thorasic = LSTRING(Ultra_Thorasic_NoActivity); + _thorasicRight = LSTRING(Ultra_Thorasic_NoActivity); _airway = LSTRING(Ultra_Airway_NoActivity); }; [_patient, "quick_view", LSTRING(Ultra_Airway), [_airway]] call ACEFUNC(medical_treatment,addToLog); [_patient, "quick_view", LSTRING(Ultra_Cardiac), [_cardiac]] call ACEFUNC(medical_treatment,addToLog); [_patient, "quick_view", LSTRING(Ultra_Thorasic), [_thorasic]] call ACEFUNC(medical_treatment,addToLog); +[_patient, "quick_view", LSTRING(Ultra_ThorasicRight), [_thorasicRight]] call ACEFUNC(medical_treatment,addToLog); From feba9079a5c229711c677c2501efbf3c8ca8d1be Mon Sep 17 00:00:00 2001 From: MiszczuZPolski <71414303+MiszczuZPolski@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:49:02 +0100 Subject: [PATCH 11/16] Update ACE_Medical_Treatment_Actions.hpp --- .../ACE_Medical_Treatment_Actions.hpp | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index 5f1860fba..0fdc7290b 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -131,30 +131,30 @@ class ACE_Medical_Treatment_Actions { 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); - category = "airway"; - treatmentLocations = 0; - allowedSelections[] = {"Body"}; - allowSelfTreatment = 0; - medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); - treatmentTime = 7; - items[] = {"kat_aatKit"}; - condition = QUOTE(!GVAR(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 HemopneumothoraxTreatment { + // displayName = CSTRING(hemopneumothorax_display); + // displayNameProgress = CSTRING(treating); + // category = "airway"; + // treatmentLocations = 0; + // allowedSelections[] = {"Body"}; + // allowSelfTreatment = 0; + // medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); + // treatmentTime = 7; + // items[] = {"kat_aatKit"}; + // condition = QUOTE(!GVAR(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 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);); From 127a52d32f50382f1edbed8ebb3e6ff486af5b59 Mon Sep 17 00:00:00 2001 From: MiszczuZPolski <71414303+MiszczuZPolski@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:49:57 +0100 Subject: [PATCH 12/16] Update ACE_Medical_Treatment_Actions.hpp --- .../ACE_Medical_Treatment_Actions.hpp | 54 +++++++++---------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index 0fdc7290b..fa38bd074 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -127,34 +127,34 @@ 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); - // category = "airway"; - // treatmentLocations = 0; - // allowedSelections[] = {"Body"}; - // allowSelfTreatment = 0; - // medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); - // treatmentTime = 7; - // items[] = {"kat_aatKit"}; - // condition = QUOTE(!GVAR(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 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); + category = "airway"; + treatmentLocations = 0; + allowedSelections[] = {"Body"}; + allowSelfTreatment = 0; + medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); + treatmentTime = 7; + items[] = {"kat_aatKit"}; + condition = QUOTE(!GVAR(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 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);); From 0d5052f3f9d32960266068b1d960c020d6cf2a02 Mon Sep 17 00:00:00 2001 From: MiszczuZPolski <71414303+MiszczuZPolski@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:56:32 +0100 Subject: [PATCH 13/16] Update ACE_Medical_Treatment_Actions.hpp --- addons/breathing/ACE_Medical_Treatment_Actions.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index fa38bd074..c211e8f9a 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -127,10 +127,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 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); @@ -226,7 +226,7 @@ class ACE_Medical_Treatment_Actions { treatmentTime = 7; items[] = {"kat_ncdKit"}; condition = "true"; - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); ARR_7(_medic,_patient,_bodyPart,_className,objNull,_usedItem,0)] 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; From 50a78f0ed70a7c26cff3d6a90302c8a24bc2c378 Mon Sep 17 00:00:00 2001 From: MiszczuZPolski <71414303+MiszczuZPolski@users.noreply.github.com> Date: Tue, 14 Jan 2025 18:57:41 +0100 Subject: [PATCH 14/16] Update stringtable.xml --- addons/surgery/stringtable.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/addons/surgery/stringtable.xml b/addons/surgery/stringtable.xml index 16e6e5579..eb9fa06ec 100644 --- a/addons/surgery/stringtable.xml +++ b/addons/surgery/stringtable.xml @@ -725,9 +725,6 @@ Left Side Pneumothorax - - Left Side Pneumothorax - Right Side Pneumothorax From 1a42de13a8277a81bba6eae87eaf19f7156d4c84 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Tue, 14 Jan 2025 15:07:03 -0800 Subject: [PATCH 15/16] better --- addons/breathing/functions/fnc_checkBreathing.sqf | 4 +++- addons/breathing/functions/fnc_inspectChest.sqf | 10 ++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/addons/breathing/functions/fnc_checkBreathing.sqf b/addons/breathing/functions/fnc_checkBreathing.sqf index 11bfc55d5..dc40b179b 100644 --- a/addons/breathing/functions/fnc_checkBreathing.sqf +++ b/addons/breathing/functions/fnc_checkBreathing.sqf @@ -43,9 +43,11 @@ if (_ph < 7.2) then { _output = format ["%1%2", _breathing ,_breath]; _output_log = format ["%1%2", _breathing_log, _breath]; +private _tension = _patient getVariable [QGVAR(tensionpneumothorax), [false, false]]; +private _hemo = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; -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 { +if (_hr == 0 || !(alive _patient) || (_patient getVariable [QEGVAR(airway,obstruction), false] && !(_patient getVariable [QEGVAR(airway,overstretch), false])) || _patient getVariable [QEGVAR(airway,occluded), false] || (_tension select 0) || (_tension select 1) || (_hemo select 0) || (_hemo select 1)) then { _output = LLSTRING(breathing_none); _output_log = ACELSTRING(medical_treatment,Check_Pulse_None); }; diff --git a/addons/breathing/functions/fnc_inspectChest.sqf b/addons/breathing/functions/fnc_inspectChest.sqf index d3061676f..d9988ab2a 100644 --- a/addons/breathing/functions/fnc_inspectChest.sqf +++ b/addons/breathing/functions/fnc_inspectChest.sqf @@ -20,9 +20,9 @@ params ["_medic", "_patient"]; private _message = LLSTRING(inspectChest_normal); private _messageLog = LLSTRING(inspectChest_normal); - -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 _tension = _patient getVariable [QGVAR(tensionpneumothorax), [false, false]]; +private _hemo = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; +private _hasPneumothorax = (_patient getVariable [QGVAR(pneumothorax), [0, 0]] select 0 > 0 || _patient getVariable [QGVAR(pneumothorax), [0, 0]] select 1 > 0 || (_tension select 0) || (_tension select 1) || (_hemo select 0) || (_hemo 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); @@ -54,7 +54,9 @@ if (GET_HEART_RATE(_patient) isEqualTo 0) then { }; } else { if (_hasPneumothorax && (_airwaySecure || _airwayClear)) 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 { + private _tension = _patient getVariable [QGVAR(tensionpneumothorax), [false, false]]; + private _hemo = _patient getVariable [QGVAR(hemopneumothorax), [false, false]]; + if ((_tension select 0) || (_tension select 1) || (_hemo select 0) || (_hemo select 1)) then { _message = LLSTRING(inspectChest_none); _messageLog = LLSTRING(inspectChest_none_log); } else { From 8f5ef6a20bcc68d4c92c54b108e4fb1aa8c1cba7 Mon Sep 17 00:00:00 2001 From: mazinskihenry <33608576+mazinskihenry@users.noreply.github.com> Date: Wed, 15 Jan 2025 09:27:42 -0800 Subject: [PATCH 16/16] Update left variables --- .../functions/fnc_gui_updateBodyImage.sqf | 16 ++++++++-------- addons/gui/gui.hpp | 4 ++-- addons/gui/gui_defines.hpp | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/addons/breathing/functions/fnc_gui_updateBodyImage.sqf b/addons/breathing/functions/fnc_gui_updateBodyImage.sqf index bec69e507..a5b945cbb 100644 --- a/addons/breathing/functions/fnc_gui_updateBodyImage.sqf +++ b/addons/breathing/functions/fnc_gui_updateBodyImage.sqf @@ -21,8 +21,8 @@ params ["_ctrlGroup", "_target", "_selectionN"]; private _ctrlPulseOximeterRight = _ctrlGroup controlsGroupCtrl IDC_BODY_RIGHTARM_PULSEOX; 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 _ctrlLeftChestSeal = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_LEFTCHESTSEAL; +private _ctrlLeftChestInjury = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_LEFTPNEUMOTHORAX; private _ctrlRightChestSeal = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_RIGHTCHESTSEAL; private _ctrlRightChestInjury = _ctrlGroup controlsGroupCtrl IDC_BODY_TORSO_RIGHTPNEUMOTHORAX; private _ctrlNasalCannula = _ctrlGroup controlsGroupCtrl IDC_BODY_HEAD_NASAL; @@ -33,9 +33,9 @@ private _deepPenetratingInjury = _target getVariable [QGVAR(deepPenetratingInjur if (_activeChestSeal select 0) then { - _ctrlChestSeal ctrlShow true; + _ctrlLeftChestSeal ctrlShow true; } else { - _ctrlChestSeal ctrlShow false; + _ctrlLeftChestSeal ctrlShow false; }; if (_activeChestSeal select 1) then { @@ -47,9 +47,9 @@ if (_activeChestSeal select 1) then { //Check pneumothorax and injuries if (GVAR(PneumothoraxAlwaysVisible)) then { if (_pneumothoraxState select 0 > 0) then { - _ctrlChestInjury ctrlShow true; + _ctrlLeftChestInjury ctrlShow true; } else { - _ctrlChestInjury ctrlShow false; + _ctrlLeftChestInjury ctrlShow false; }; if (_pneumothoraxState select 1 > 0) then { _ctrlRightChestInjury ctrlShow true; @@ -58,9 +58,9 @@ if (GVAR(PneumothoraxAlwaysVisible)) then { }; } else { if ((_deepPenetratingInjury select 0) || (_pneumothoraxState select 0 > 0)) then { - _ctrlChestInjury ctrlShow true; + _ctrlLeftChestInjury ctrlShow true; } else { - _ctrlChestInjury ctrlShow false; + _ctrlLeftChestInjury ctrlShow false; }; if ((_deepPenetratingInjury select 1) || (_pneumothoraxState select 1 > 0)) then { _ctrlRightChestInjury ctrlShow true; diff --git a/addons/gui/gui.hpp b/addons/gui/gui.hpp index 66cc62605..63c1289a9 100644 --- a/addons/gui/gui.hpp +++ b/addons/gui/gui.hpp @@ -33,7 +33,7 @@ class ACEGVAR(medical_gui,BodyImage): RscControlsGroupNoScrollbars { show = 0; }; class Torso_ChestSeal: Background { - idc = IDC_BODY_TORSO_CHESTSEAL; + idc = IDC_BODY_TORSO_LEFTCHESTSEAL; text = QPATHTOF(data\body_image\torso_chestseal.paa); colorText[] = {1, 0.95, 0, 1}; show = 0; @@ -82,7 +82,7 @@ class ACEGVAR(medical_gui,BodyImage): RscControlsGroupNoScrollbars { colorText[] = {0.3, 0.6, 0.3, 1}; }; class Torso_Pneumothorax: Torso_ChestSeal { - idc = IDC_BODY_TORSO_PNEUMOTHORAX; + idc = IDC_BODY_TORSO_LEFTPNEUMOTHORAX; text = QPATHTOF(data\body_image\torso_pneumothorax.paa); colorText[] = {1, 1, 1, 1}; }; diff --git a/addons/gui/gui_defines.hpp b/addons/gui/gui_defines.hpp index af9e1ae98..54e64d9ad 100644 --- a/addons/gui/gui_defines.hpp +++ b/addons/gui/gui_defines.hpp @@ -58,8 +58,8 @@ #define IDC_BODY_HEAD_NASAL 70112 #define IDC_BODY_TORSO_AED_PADS 70120 -#define IDC_BODY_TORSO_CHESTSEAL 70121 -#define IDC_BODY_TORSO_PNEUMOTHORAX 70122 +#define IDC_BODY_TORSO_LEFTCHESTSEAL 70121 +#define IDC_BODY_TORSO_LEFTPNEUMOTHORAX 70122 #define IDC_BODY_TORSO_IO 70123 #define IDC_BODY_TORSO_RIGHTCHESTSEAL 70124 #define IDC_BODY_TORSO_RIGHTPNEUMOTHORAX 70125