From 7845ce2288ec163eb4cb141b9be90a070ed64288 Mon Sep 17 00:00:00 2001 From: Blue Date: Wed, 22 Nov 2023 17:22:50 +0100 Subject: [PATCH 1/7] Make recovery position occlusion clearing no longer instant --- .../airway/ACE_Medical_Treatment_Actions.hpp | 2 +- addons/airway/XEH_preInit.sqf | 28 +++++++---- ...ntAdvanced_CancelRecoveryPositionLocal.sqf | 2 +- ...reatmentAdvanced_RecoveryPositionLocal.sqf | 26 ++++++++-- addons/airway/stringtable.xml | 49 ++++++------------- 5 files changed, 59 insertions(+), 48 deletions(-) diff --git a/addons/airway/ACE_Medical_Treatment_Actions.hpp b/addons/airway/ACE_Medical_Treatment_Actions.hpp index 2a9229aa5..67423c1a3 100644 --- a/addons/airway/ACE_Medical_Treatment_Actions.hpp +++ b/addons/airway/ACE_Medical_Treatment_Actions.hpp @@ -67,7 +67,7 @@ class ACE_Medical_Treatment_Actions { class Overstretch: Larynxtubus { displayName = CSTRING(overstretch); displayNameProgress = CSTRING(overstretching); - treatmentTime = QGVAR(Overstretch_time); + treatmentTime = QGVAR(Hyperextend_Time); medicRequired = 0; items[] = {}; icon = ""; diff --git a/addons/airway/XEH_preInit.sqf b/addons/airway/XEH_preInit.sqf index f208aa36e..5ec84a98d 100644 --- a/addons/airway/XEH_preInit.sqf +++ b/addons/airway/XEH_preInit.sqf @@ -200,10 +200,10 @@ In real life, this will happen sometimes, not quiet often. // Settable action time for Head overstretching [ - QGVAR(Overstretch_time), + QGVAR(Hyperextend_Time), "SLIDER", - [LLSTRING(TIME_OVERSTRETCH),LLSTRING(TIME_OVERSTRETCH_DESC)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_RecoveryPositionOverstretch)], + [LLSTRING(Hyperextend_Time), LLSTRING(Hyperextend_Time_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_RecoveryPositionHyperextend)], [1, 10, 3, 0], true ] call CBA_Settings_fnc_init; @@ -212,9 +212,9 @@ In real life, this will happen sometimes, not quiet often. [ QGVAR(RecoveryPosition_Time), "SLIDER", - [LLSTRING(TIME_RECOVERY),LLSTRING(TIME_RECOVERY_DESC)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_RecoveryPositionOverstretch)], - [1, 120, 6, 0], + [LLSTRING(SETTING_RecoveryPosition_Time), LLSTRING(SETTING_RecoveryPosition_Time_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_RecoveryPositionHyperextend)], + [1, 60, 6, 0], true ] call CBA_Settings_fnc_init; @@ -222,9 +222,19 @@ In real life, this will happen sometimes, not quiet often. [ QGVAR(CancelRecoveryPosition_Time), "SLIDER", - [LLSTRING(TIME_CANCELRECOVERY),LLSTRING(TIME_CANCELRECOVERY_DESC)], - [CBA_SETTINGS_CAT, LSTRING(SubCategory_RecoveryPositionOverstretch)], - [1, 120, 6, 0], + [LLSTRING(SETTING_CancelRecoveryPosition_Time), LLSTRING(SETTING_CancelRecoveryPosition_Time_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_RecoveryPositionHyperextend)], + [1, 60, 3, 0], + true +] call CBA_Settings_fnc_init; + +// Settable maximum time required for occlusion to be cleared from patient in recovery position +[ + QGVAR(RecoveryPosition_TimeToDrain), + "SLIDER", + [LLSTRING(SETTING_RecoveryPosition_TimeToDrain), LLSTRING(SETTING_RecoveryPosition_TimeToDrain_DESC)], + [CBA_SETTINGS_CAT, LSTRING(SubCategory_RecoveryPositionHyperextend)], + [0, 30, 10, 0], true ] call CBA_Settings_fnc_init; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf index eea7978a2..17469f8b9 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf @@ -22,5 +22,5 @@ _patient setVariable [QGVAR(recovery), false, true]; _patient setVariable [QGVAR(overstretch), false, true]; _patient call FUNC(handlePuking); -private _output = LLSTRING(Recovery_Cancel); +private _output = LLSTRING(RecoveryPosition_Cancel); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); diff --git a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf index a14802a16..7a202b020 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf @@ -20,26 +20,44 @@ params ["_medic", "_patient"]; _patient setVariable [QGVAR(recovery), true, true]; _patient setVariable [QGVAR(overstretch), true, true]; -_patient setVariable [QGVAR(occluded), false, true]; private _output = LLSTRING(Recovery_Info); [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); +GVAR(wasOccluded) = _patient getVariable [QGVAR(occluded), false]; + +if (GVAR(RecoveryPosition_TimeToDrain) > 0) then { + [{ + params ["_patient"]; + + _patient setVariable [QGVAR(occluded), false, true]; + GVAR(wasOccluded) = false; + }, [_patient], (random GVAR(RecoveryPosition_TimeToDrain) max 1)] call CBA_fnc_waitAndExecute; +} else { + _patient setVariable [QGVAR(occluded), false, true]; + GVAR(wasOccluded) = false; +}; + [{ params ["_medic", "_patient"]; + _patient call ACEFUNC(medical_status,isBeingDragged) || _patient call ACEFUNC(medical_status,isBeingCarried) || !(isNull objectParent _patient); }, { params ["_medic", "_patient"]; + _patient setVariable [QGVAR(recovery), false, true]; _patient setVariable [QGVAR(overstretch), false, true]; + _patient setVariable [QGVAR(occluded), GVAR(wasOccluded), true]; - _output = LLSTRING(Recovery_Cancel); + _output = LLSTRING(RecoveryPosition_Cancel); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); -}, [_medic, _patient], 3600, { +}, [_medic, _patient, _wasOccluded], 3600, { params ["_medic", "_patient"]; + _patient setVariable [QGVAR(recovery), false, true]; _patient setVariable [QGVAR(overstretch), false, true]; + _patient setVariable [QGVAR(occluded), GVAR(wasOccluded), true]; - _output = LLSTRING(Recovery_Cancel); + _output = LLSTRING(RecoveryPosition_Cancel); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); }] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/airway/stringtable.xml b/addons/airway/stringtable.xml index 44e725750..f3b7fe92a 100644 --- a/addons/airway/stringtable.xml +++ b/addons/airway/stringtable.xml @@ -835,7 +835,7 @@ Quanto tempo levará para verificar as vias aéreas Hvor lang tid det vil ta å sjekke luftveiene - + Time for overstretch the head Zeit um den Kopf zu überstrecken Czas na odchylenie głowy @@ -852,7 +852,7 @@ Tempo para hiperestender a cabeça Tid for å overstrekke hode - + How long it will take to overstretch the head Wie lange es dauert, um den Kopf zu überstrecken Ile czasu zajmie odchylenie głowy @@ -1061,7 +1061,7 @@ Posição de recuperação estabelecida com sucesso Lagt i stabilt sideleie - + Recovery position cancelled Stabile Seitenlage abgebrochen Przerwano pozycję bezpieczną @@ -1091,7 +1091,7 @@ %1 estabeleceu a posição de recuperação %1 la dem i stabilt sideleie - + Time for recovery position Zeit für die stabile Seitenlage Czas na ułożenie w pozycji bezpiecznej @@ -1106,7 +1106,7 @@ Tempo para estabelecer a posição de recuperação Tid for å legge i stabilt sideleie - + How long it will take to establish recovery position Die Zeit, wie lange es dauert, eine erfolgreiche stabile Seitenlage durchzuführen Jak długo potrwa ułożenie w pozycji bocznej bezpiecznej @@ -1151,7 +1151,7 @@ Cancelando posição de recuperação Avbrytter stabilt sideleie - + Time for cancelling recovery position Die Zeit, wie lange es dauert, eine stabile Seitenlage abzubrechen Czas na przerwanie pozycji bezpiecznej @@ -1166,20 +1166,14 @@ Tempo para cancelamento de posição de recuperação Tid for å avbryte stabilt sideleie - - How long it will take to establish recovery position - Die Zeit, wie lange es dauert, eine stabile Seitenlage abzubrechen - Jak długo potrwa przerwanie pozycji bocznej bezpiecznej - 取消恢复体态的所需时间 - 回復体位を崩すのにどのくらい時間がかかるか設定します - 회복자세 교정을 취소하는 데 걸리는 시간입니다 - Temps nécessaire pour annuler la position latérale de sécurité - Kurtarma pozisyonunun oluşturulması ne kadar sürer? - Tempo necessario per annullare la posizione laterale di sicurezza - Jak dlouho potrvá zavést stabilizovanou polohu - Cuanto tiempo tomará cancelar la posición lateral de seguridad - Quanto tempo demora para cancelar a posição de recuperação - Hvor lang tid vil det ta for å legge i stabilt sideleie + + How long it will take to manually cancel recovery position + + + Recovery Position time to drain occlusion + + + Maximum time required for patient in recovery position to be drained of occlusion. Not obstructed @@ -1213,19 +1207,8 @@ Não ocluída Ikke okkludert - - Recovery position + Overstretch Settings - Impostazioni posizione laterale di sicurezza e stiramento - Nastavení stabilizované polohy a narovnávání hlavy - Paramètres de position latérale de sécurité + hyperextension - 회복 자세 + 머리 젖히기 설정 - Einstellungen der stabilen Seitenlage + Überstreckung - 恢复体态设置 - 回復体位設定 - Parámetros de posición lateral de seguridad e hiperextensión de cabeza - Configurações de posição de recuperação + hiperextensão de cabeça - Ustawienia Pozycji bezpiecznej i Odchylania głowy - Instillinger for stabilt sideleie + Overstrekk + + Recovery Position + Head Hyperextend Settings Airway items Settings From a67f9438a43a88076fc054c2e8900974695bdd17 Mon Sep 17 00:00:00 2001 From: Blue Date: Thu, 23 Nov 2023 02:39:15 +0100 Subject: [PATCH 2/7] Make actions incompatible with recovery position cancel instead of being disabled --- .../airway/ACE_Medical_Treatment_Actions.hpp | 8 ++--- addons/airway/XEH_PREP.hpp | 1 + .../functions/fnc_handleRecoveryPosition.sqf | 23 +++++++++++++ .../ACE_Medical_Treatment_Actions.hpp | 32 +++++++++---------- addons/breathing/functions/fnc_canUseBVM.sqf | 2 +- addons/breathing/functions/fnc_lowSpO2pp.sqf | 2 +- ..._treatmentAdvanced_tensionpneumothorax.sqf | 2 +- .../ACE_Medical_Treatment_Actions.hpp | 4 +-- 8 files changed, 49 insertions(+), 25 deletions(-) create mode 100644 addons/airway/functions/fnc_handleRecoveryPosition.sqf diff --git a/addons/airway/ACE_Medical_Treatment_Actions.hpp b/addons/airway/ACE_Medical_Treatment_Actions.hpp index 67423c1a3..381fdbe6e 100644 --- a/addons/airway/ACE_Medical_Treatment_Actions.hpp +++ b/addons/airway/ACE_Medical_Treatment_Actions.hpp @@ -9,8 +9,8 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_Larynxtubus); treatmentTime = QGVAR(Larynxtubus_time); items[] = {"kat_larynx"}; - condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus')); - callbackSuccess = QFUNC(treatmentAdvanced_airway); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus')); + callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway); [ARR_2(_medic,_patient)] call FUNC(handleRecoveryPosition);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -37,10 +37,10 @@ class ACE_Medical_Treatment_Actions { displayName = CSTRING(Guedeltubus_Display); medicRequired = QGVAR(medLvl_Guedeltubus); treatmentTime = QGVAR(Guedeltubus_time); - condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && missionNamespace getVariable [ARR_2(QQGVAR(enable),true)] && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus')); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && missionNamespace getVariable [ARR_2(QQGVAR(enable),true)] && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus')); items[] = {"kat_guedel"}; icon = QPATHTOF(ui\guedel.paa); - callbackSuccess = QFUNC(treatmentAdvanced_airway); + callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway); [ARR_2(_medic,_patient)] call FUNC(handleRecoveryPosition);); }; class RemoveGuedeltubus: RemoveLarynxtubus { displayName = CSTRING(Cancel_Guedeltubus); diff --git a/addons/airway/XEH_PREP.hpp b/addons/airway/XEH_PREP.hpp index 65aa9bea9..31f2f553d 100644 --- a/addons/airway/XEH_PREP.hpp +++ b/addons/airway/XEH_PREP.hpp @@ -2,6 +2,7 @@ PREP(checkAirway); PREP(checkRecovery); PREP(handleAirway); PREP(handlePuking); +PREP(handleRecoveryPosition); PREP(init); PREP(startHeadTurning); PREP(treatmentAdvanced_Accuvac); diff --git a/addons/airway/functions/fnc_handleRecoveryPosition.sqf b/addons/airway/functions/fnc_handleRecoveryPosition.sqf new file mode 100644 index 000000000..92bf26112 --- /dev/null +++ b/addons/airway/functions/fnc_handleRecoveryPosition.sqf @@ -0,0 +1,23 @@ +#include "..\script_component.hpp" +/* + * Author: Blue + * Handle cancelling recovery position if patient is in one + * + * Arguments: + * 0: Medic + * 1: Patient + * + * Return Value: + * None + * + * Example: + * [player, cursorTarget, false] call kat_airway_fnc_handleRecoveryPosition; + * + * Public: No + */ + +params ["_medic", "_patient"]; + +if (_patient getVariable [QGVAR(recovery), false]) then { + [_medic, _patient] call FUNC(treatmentAdvanced_CancelRecoveryPosition); +}; \ No newline at end of file diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index 10594bbbf..4f37f976f 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)] spawn FUNC(listenLungs)); + callbackStart = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),true,true)]; [ARR_2(_medic,_patient)] call FUNC(listenLungs)); callbackSuccess = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]); callbackProgress = ""; callbackFailure = QUOTE(_medic setVariable [ARR_3(QQGVAR(usingStethoscope),false,true)]); @@ -44,8 +44,8 @@ class ACE_Medical_Treatment_Actions { allowedSelections[] = {"Body"}; allowSelfTreatment = 0; medicRequired = QGVAR(inspectChest_medLvl); - callbackSuccess = QFUNC(inspectChest); - condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && !(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)]) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (missionNamespace getVariable [ARR_2(QQGVAR(inspectChest_enable),0)] > 0)); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (missionNamespace getVariable [ARR_2(QQGVAR(inspectChest_enable),0)] > 0)); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(inspectChest); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"}; animationMedic = "AinvPknlMstpSnonWnonDr_medic4"; @@ -108,8 +108,8 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_Chestseal); treatmentTime = 7; items[] = {"kat_chestSeal"}; - condition = QUOTE(!(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)])); - callbackSuccess = QFUNC(treatmentAdvanced_chestSeal); + condition = "true"; + callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_chestSeal); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -132,8 +132,8 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); treatmentTime = 7; items[] = {"kat_aatKit"}; - condition = QUOTE(!(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)])); - callbackSuccess = QFUNC(treatmentAdvanced_hemopneumothorax); + condition = "true"; + callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_hemopneumothorax); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -156,8 +156,8 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); treatmentTime = 7; items[] = {"kat_aatKit"}; - condition = QUOTE(!(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)])); - callbackSuccess = QFUNC(treatmentAdvanced_tensionpneumothorax); + condition = "true"; + callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -180,8 +180,8 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_hemopneumothoraxTreatment); treatmentTime = 7; items[] = {"kat_ncdKit"}; - condition = QUOTE(!(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)])); - callbackSuccess = QFUNC(treatmentAdvanced_tensionpneumothorax); + condition = "true"; + callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -231,7 +231,7 @@ class ACE_Medical_Treatment_Actions { items[] = {"kat_BVM"}; condition = QUOTE(_patient call FUNC(canUseBVM)); callbackStart = ""; - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(useBVM)); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); callbackFailure = ""; callbackProgress = ""; animationPatient = ""; @@ -247,27 +247,27 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_PocketBVM); items[] = {"kat_pocketBVM"}; condition = QUOTE(_patient call FUNC(canUseBVM)); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,true,false)] call FUNC(useBVM)); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,true,false)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); }; class UseBVMPortableOxygen: UseBVM { displayName = CSTRING(UseBVM_PortableOxygen); medicRequired = QGVAR(medLvl_BVM_Oxygen); items[] = {"kat_BVM"}; condition = QUOTE(_patient call FUNC(canUseBVM) && _medic call FUNC(hasOxygenTank) && (GVAR(locationProvideOxygen) isEqualTo 0 || !((GVAR(locationProvideOxygen) in [ARR_2(2,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalFacility)) || ((GVAR(locationProvideOxygen) in [ARR_2(1,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalVehicle)))))); - callbackSuccess = QUOTE([ARR_5(_medic,_patient,false,true,1)] call FUNC(useBVM)); + callbackSuccess = QUOTE([ARR_5(_medic,_patient,false,true,1)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); }; class UseBVMPortableOxygenVehicle: UseBVM { displayName = CSTRING(UseBVM_PortableOxygen_Vehicle); medicRequired = QGVAR(medLvl_BVM_Oxygen); items[] = {"kat_BVM"}; condition = QUOTE(_patient call FUNC(canUseBVM) && [ARR_2((vehicle _medic),true)] call FUNC(hasOxygenTank) && ((vehicle _medic) != _medic) && (vehicle _medic) isEqualTo (vehicle _patient)); - callbackSuccess = QUOTE([ARR_5(_medic,_patient,false,true,2)] call FUNC(useBVM)); + callbackSuccess = QUOTE([ARR_5(_medic,_patient,false,true,2)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); }; class UseBVMOxygen: UseBVM { displayName = CSTRING(UseBVM_Oxygen); medicRequired = QGVAR(medLvl_BVM_Oxygen); items[] = {"kat_BVM"}; condition = QUOTE(_patient call FUNC(canUseBVM) && ((GVAR(locationProvideOxygen) in [ARR_2(2,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalFacility)) || (GVAR(locationProvideOxygen) in [ARR_2(1,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalVehicle)))); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,false,true)] call FUNC(useBVM)); + callbackSuccess = QUOTE([ARR_4(_medic,_patient,false,true)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); }; }; diff --git a/addons/breathing/functions/fnc_canUseBVM.sqf b/addons/breathing/functions/fnc_canUseBVM.sqf index abc23d25f..3de662f96 100644 --- a/addons/breathing/functions/fnc_canUseBVM.sqf +++ b/addons/breathing/functions/fnc_canUseBVM.sqf @@ -17,4 +17,4 @@ params ["_patient"]; -!(_patient call ACEFUNC(common,isAwake)) && !(_patient getVariable [QGVAR(BVMInUse), false] && !(_patient getVariable [QEGVAR(airway,recovery), false]) && {["",_patient] call ACEFUNC(medical_treatment,canCPR)}); +!(_patient call ACEFUNC(common,isAwake)) && !(_patient getVariable [QGVAR(BVMInUse), false] && {["",_patient] call ACEFUNC(medical_treatment,canCPR)}); diff --git a/addons/breathing/functions/fnc_lowSpO2pp.sqf b/addons/breathing/functions/fnc_lowSpO2pp.sqf index e1e6d3ba0..abb1cbbe9 100644 --- a/addons/breathing/functions/fnc_lowSpO2pp.sqf +++ b/addons/breathing/functions/fnc_lowSpO2pp.sqf @@ -11,7 +11,7 @@ * None * * Example: - * [player] call kat_breathing_fnc_lowSpO2pp + * [player] call kat_breathing_fnc_lowSpO2pp; * * Public: No */ diff --git a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf index 00f7d43ac..c5911da88 100644 --- a/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf +++ b/addons/breathing/functions/fnc_treatmentAdvanced_tensionpneumothorax.sqf @@ -16,7 +16,7 @@ * None * * Example: - * [player, cursorObject, "Body", "TensionpneumothoraxTreatment", objNull, "kat_aatKit"] call kat_breathing_fnc_treatmentAdvanced_hemopneumothorax; + * [player, cursorObject, "Body", "TensionpneumothoraxTreatment", objNull, "kat_aatKit"] call kat_breathing_fnc_treatmentAdvanced_tensionpneumothorax; * * Public: No */ diff --git a/addons/circulation/ACE_Medical_Treatment_Actions.hpp b/addons/circulation/ACE_Medical_Treatment_Actions.hpp index 8e647e790..395eeda69 100644 --- a/addons/circulation/ACE_Medical_Treatment_Actions.hpp +++ b/addons/circulation/ACE_Medical_Treatment_Actions.hpp @@ -8,8 +8,8 @@ class ACE_Medical_Treatment_Actions { callbackStart = ""; callbackProgress = ""; callbackFailure = ""; - callbackSuccess = QFUNC(CPRStart); - condition = QUOTE(([ARR_2(_medic,_patient)] call ACEFUNC(medical_treatment,canCPR)) && !(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)])); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(CPRStart); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + condition = QACEFUNC(medical_treatment,canCPR); animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"}; }; From 347c7ccd010a1e31f808dba48df2c7f5c83251dc Mon Sep 17 00:00:00 2001 From: Blue Date: Thu, 23 Nov 2023 18:31:16 +0100 Subject: [PATCH 3/7] Reword check airway hints --- .../airway/ACE_Medical_Treatment_Actions.hpp | 8 +- addons/airway/XEH_PREP.hpp | 2 +- addons/airway/functions/fnc_checkAirway.sqf | 38 +-- ...reatmentAdvanced_RecoveryPositionLocal.sqf | 6 +- .../fnc_treatmentAdvanced_airwayLocal.sqf | 2 +- ...fnc_treatmentAdvanced_hyperextendHead.sqf} | 12 +- addons/airway/stringtable.xml | 216 ++++++------------ addons/gui/functions/fnc_updateInjuryList.sqf | 2 +- addons/zeus/stringtable.xml | 2 +- 9 files changed, 108 insertions(+), 180 deletions(-) rename addons/airway/functions/{fnc_treatmentAdvanced_overstretchHead.sqf => fnc_treatmentAdvanced_hyperextendHead.sqf} (84%) diff --git a/addons/airway/ACE_Medical_Treatment_Actions.hpp b/addons/airway/ACE_Medical_Treatment_Actions.hpp index 381fdbe6e..df0f169dc 100644 --- a/addons/airway/ACE_Medical_Treatment_Actions.hpp +++ b/addons/airway/ACE_Medical_Treatment_Actions.hpp @@ -64,15 +64,15 @@ class ACE_Medical_Treatment_Actions { callbackSuccess = QFUNC(treatmentAdvanced_accuvac); sounds[] = {{QPATHTO_R(sounds\accuvac.wav),6,1,15}}; }; - class Overstretch: Larynxtubus { - displayName = CSTRING(overstretch); - displayNameProgress = CSTRING(overstretching); + class HyperextendHead: Larynxtubus { + displayName = CSTRING(Hyperextend_diplayName); + displayNameProgress = CSTRING(Hyperextend_progress); treatmentTime = QGVAR(Hyperextend_Time); medicRequired = 0; items[] = {}; icon = ""; condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && !(_patient getVariable [ARR_2(QQGVAR(overstretch),false)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus')); - callbackSuccess = QFUNC(treatmentAdvanced_overstretchHead); + callbackSuccess = QFUNC(treatmentAdvanced_hyperextendHead); }; class BeginHeadTurning: Larynxtubus { displayName = CSTRING(headTurning_begin); diff --git a/addons/airway/XEH_PREP.hpp b/addons/airway/XEH_PREP.hpp index 31f2f553d..cab21c88e 100644 --- a/addons/airway/XEH_PREP.hpp +++ b/addons/airway/XEH_PREP.hpp @@ -12,7 +12,7 @@ PREP(treatmentAdvanced_airway); PREP(treatmentAdvanced_airwayLocal); PREP(treatmentAdvanced_CancelRecoveryPosition); PREP(treatmentAdvanced_CancelRecoveryPositionLocal); -PREP(treatmentAdvanced_overstretchHead); +PREP(treatmentAdvanced_hyperextendHead); PREP(treatmentAdvanced_RecoveryPosition); PREP(treatmentAdvanced_RecoveryPositionLocal); PREP(treatmentAdvanced_RemoveAirwayItem); diff --git a/addons/airway/functions/fnc_checkAirway.sqf b/addons/airway/functions/fnc_checkAirway.sqf index 15974cbc9..a4f2c9cca 100644 --- a/addons/airway/functions/fnc_checkAirway.sqf +++ b/addons/airway/functions/fnc_checkAirway.sqf @@ -18,31 +18,43 @@ params ["_medic", "_patient"]; -private _messageairwayobstruction = LLSTRING(message_obstruction_no); -private _messageairwayOccluded = LLSTRING(message_Occluded_no); -private _obstruction = LSTRING(noObstruction); -private _occluded = LSTRING(noOccluded); +private _hintAirwayObstruction = LLSTRING(AirwayStatus_noObstruction); +private _hintAirwayOcclusion = LLSTRING(AirwayStatus_noOcclusion); +private _obstruction = LSTRING(AirwayStatus_noObstruction_short); +private _occlusion = LSTRING(AirwayStatus_noOcclusion_short); + +private _hintWidth = 14; +private _hintSize = 2; if (_patient getVariable [QGVAR(obstruction), false]) then { - _messageairwayobstruction = LLSTRING(message_obstruction_yes); - _obstruction = LSTRING(obstruction); + _hintWidth = 17; + _hintAirwayObstruction = LLSTRING(AirwayStatus_Obstruction); + _obstruction = LSTRING(AirwayStatus_Obstruction_short); if (_patient getVariable [QGVAR(overstretch), false]) then { - _messageairwayobstruction = LLSTRING(message_obstructionTemporarilyMitigated); - _obstruction = LLSTRING(mitigatedObstruction); + _hintAirwayObstruction = LLSTRING(AirwayStatus_mitigatedObstruction); + _obstruction = LLSTRING(AirwayStatus_mitigatedObstruction_short); }; if (GVAR(autoTriage)) then { _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; }; }; if (_patient getVariable [QGVAR(occluded), false]) then { - _messageairwayOccluded = LLSTRING(message_Occluded_yes); - _occluded = LSTRING(Occluded); + _hintAirwayOcclusion = LLSTRING(AirwayStatus_Occlusion); + _occlusion = LSTRING(AirwayStatus_Occlusion_short); if (GVAR(autoTriage)) then { _patient setVariable [QACEGVAR(medical,triageLevel), 3, true]; }; }; if (!(_patient getVariable [QGVAR(occluded), false] && _patient getVariable [QGVAR(obstruction), false]) && GVAR(autoTriage)) then {_patient setVariable [QACEGVAR(medical,triageLevel), 0, true]}; -private _message = format ["%1, %2", _messageairwayobstruction, _messageairwayOccluded]; -[_message, 2, _medic] call ACEFUNC(common,displayTextStructured); -[_patient, "activity", LSTRING(checkAirway_log), [[_medic] call ACEFUNC(common,getName), _obstruction, _occluded]] call ACEFUNC(medical_treatment,addToLog); +private _message = format ["%1
%2", _hintAirwayObstruction, _hintAirwayOcclusion]; + +if (!(_patient getVariable [QGVAR(occluded), false]) && !(_patient getVariable [QGVAR(obstruction), false])) then { + _message = LLSTRING(AirwayStatus_Clear); + _hintSize = 1.5; + _hintWidth = 10; +}; + +[_message, _hintSize, _medic, _hintWidth] call ACEFUNC(common,displayTextStructured); + +[_patient, "activity", LSTRING(checkAirway_log), [[_medic] call ACEFUNC(common,getName), _obstruction, _occlusion]] call ACEFUNC(medical_treatment,addToLog); diff --git a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf index 7a202b020..971749419 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf @@ -21,12 +21,12 @@ params ["_medic", "_patient"]; _patient setVariable [QGVAR(recovery), true, true]; _patient setVariable [QGVAR(overstretch), true, true]; -private _output = LLSTRING(Recovery_Info); +private _output = LLSTRING(RecoveryPosition_Ready); [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); GVAR(wasOccluded) = _patient getVariable [QGVAR(occluded), false]; -if (GVAR(RecoveryPosition_TimeToDrain) > 0) then { +if (GVAR(RecoveryPosition_TimeToDrain) > 0 && GVAR(wasOccluded)) then { [{ params ["_patient"]; @@ -51,7 +51,7 @@ if (GVAR(RecoveryPosition_TimeToDrain) > 0) then { _output = LLSTRING(RecoveryPosition_Cancel); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); -}, [_medic, _patient, _wasOccluded], 3600, { +}, [_medic, _patient], 3600, { params ["_medic", "_patient"]; _patient setVariable [QGVAR(recovery), false, true]; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_airwayLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_airwayLocal.sqf index fd606c8f7..53aa110ab 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_airwayLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_airwayLocal.sqf @@ -21,7 +21,7 @@ params ["_medic", "_patient","_classname", "_usedItem"]; if (_patient getVariable [QGVAR(occluded), false]) exitWith { - [QGVAR(airwayFeedback), [_medic, LLSTRING(Airway_NotClearForItem)], _medic] call CBA_fnc_targetEvent; + [QGVAR(airwayFeedback), [_medic, LLSTRING(AirwayStatus_NotClearForItem)], _medic] call CBA_fnc_targetEvent; [_medic, _usedItem] call ACEFUNC(common,addToInventory); }; diff --git a/addons/airway/functions/fnc_treatmentAdvanced_overstretchHead.sqf b/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf similarity index 84% rename from addons/airway/functions/fnc_treatmentAdvanced_overstretchHead.sqf rename to addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf index 4215aca79..733b9eae0 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_overstretchHead.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf @@ -11,7 +11,7 @@ * Succesful treatment * * Example: - * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_overstretchHead; + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_hyperextendHead; * * Public: No */ @@ -19,17 +19,17 @@ params ["_medic", "_patient"]; if (_patient getVariable [QGVAR(overstretch), false]) exitWith { - private _output = LLSTRING(Airway_already); + private _output = LLSTRING(Hyperextend_already); [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); }; if !(_patient getVariable [QGVAR(obstruction), false]) exitWith { - private _output = LLSTRING(Airway_NA); + private _output = LLSTRING(AirwayStatus_Clear); [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); }; _patient setVariable [QGVAR(overstretch), true, true]; -private _output = LLSTRING(overstretch_info); +private _output = LLSTRING(Hyperextend_Warning); [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); [{ @@ -39,12 +39,12 @@ private _output = LLSTRING(overstretch_info); params ["_medic", "_patient"]; if (_patient getVariable [QGVAR(recovery), false]) exitWith {}; _patient setVariable [QGVAR(overstretch), false, true]; - _output = LLSTRING(overstretch_cancel); + _output = LLSTRING(Hyperextend_Cancel); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); }, [_medic, _patient], 3600, { params ["_medic", "_patient"]; if (_patient getVariable [QGVAR(recovery), false]) exitWith {}; _patient setVariable [QGVAR(overstretch), false, true]; - _output = LLSTRING(overstretch_cancel); + _output = LLSTRING(Hyperextend_Cancel); [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); }] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/airway/stringtable.xml b/addons/airway/stringtable.xml index f3b7fe92a..566d9e9d2 100644 --- a/addons/airway/stringtable.xml +++ b/addons/airway/stringtable.xml @@ -135,7 +135,7 @@ Felleskapet kalt "Keko" hadde en tilleggsfunksjon for AFK-spillere. De ble gjort bevisstløse slik at andre kunne dra dem bort. Dette utløste muligheter for luftveisproblemer. Denne strengen forhindrer at det skjer når de blir bevisstløse av det AFK-tillegget. - Check Airways + Check Airway Überprüfe Atemwege Sprawdź drogi oddechowe Comprobar vías aéreas @@ -183,7 +183,7 @@ %1 intubou com %2 %1 satte inn en %2. - + Occluded Verstopft Zator @@ -200,7 +200,7 @@ Ocluída Okkludert - + Obstruction Obstruktion Niedrożne @@ -217,7 +217,7 @@ Obstruída Obstruksjon - + Mitigated obstruction Ręcznie udrożnione 閉塞軽減中 @@ -231,7 +231,39 @@ Obstrução mitigada Reduserte obstruksjonen - + + Not obstructed + Nicht obstruiert + Drożne + No obstruída + 無 阻塞 + Bez obstrukce + 혀에 의해 막히지 않음 + Non obstruées + Değil Kapanma + No ostruita + 閉塞無し + 无阻塞 + Não obstruída + Ikke blokkert + + + Not occluded + Nicht verstopft + Brak zatoru + No ocluída + 無 閉塞 + Není ucpáno + 구토에 의해 막히지 않음 + Non occludées + Değil Tıkalı + No occlusa + 異物無し + 无闭塞 + Não ocluída + Ikke okkludert + + Obstruction is temporarily mitigated Drogi oddechowe są ręcznie udrożnione L'obstruction a été temporairement atténuée @@ -244,93 +276,20 @@ Obstrução temporariamente mitigada Obstruksjon er midlertidig redusert - - Airways are clear - Atemwege sind frei - Drogi oddechowe są czyste - Vías aéreas despejadas - 航線暢通 - 气道通畅 - Dýchací cesty jsou volné - 기도 막히지 않음 - Les voies aériennes sont dégagées - Havayolları temiz - Le vie aeree sono libere - Дыхательные пути чисты - 気道はクリアです - Vias aéreas limpas - Luftveier er frie + + Airway is not obstructed - - No medical suction needed - Absaugen nicht notwendig - Brak konieczności odsysania - No se necesita succión médica - 不需要醫療抽吸 - 不需要医疗抽吸 - Není třeba nic odsát - 기도의 구토 제거 불필요 - Pas d'aspiration médicale requise - Tıbbi aspirasyona gerek yok - Aspirazione medica non necessaria - Всасывание не требуется - 医療吸引は必要ありません - Sucção médica não necessária - Ingen behov for medisinsk suging + + Airway is not occluded + + + Airway is obstructed, airway management needed - - Airway management needed - Atemwegsmanagement erforderlich - Potrzebne udrażnianie dróg oddechowych - Hay que desobstruir las vías aéreas - 需要呼吸道控制 - 需要气道管理 - Je třeba se postarat o dýchací cesty - 기도 확보 필요 - Gestion des voies aériennes requise - Havayolu yönetimi gerekli - Gestione delle vie aeree necessaria - Необходимо управление дыхательными путями - 気道管理が必要です - Gerenciamento das vias aéreas necessário - Behov for luftveishåndtering - - - Medical suction needed - Absaugen notwendig - Potrzebne odsysanie - Requiere succión médica - 需要醫療抽吸 - 需要医疗抽吸 - Je třeba odsávání - 기도의 구토 제거 필요 - Aspiration médicale requise - Tıbbi aspirasyon gerekli - Aspirazione medica necessaria - всасывание необходимо - 医療吸引が必要です - Sucção médica necessária - Behov for medisinsk suging - - - Airway management has already been performed - Atemwegsmanagement wurde bereits durchgeführt - Drogi oddechowe są udrażniane - El manejo de vías aéreas ya se ha llevado a cabo - 已經做好呼吸道控制 - 气道管理已完成 - Péče o dýchací cesty již byla provedena - 이미 기도관리 완료됨 - La gestion des voies aériennes a déjà été effectuée - Havayolu yönetimi zaten gerçekleştirildi - Gestione delle vie aeree già eseguita - Всасывание необходимо - 気道管理はすでに行われています - O gerenciamento das vias aéreas já realizado - Luftveishåndtering er allerede utført - - - Airways are clear + + Airway is occluded, medical suction needed + + + Airway is clear Atemwege sind frei Drogi oddechowe są czyste Las vías aéreas están despejadas @@ -346,7 +305,7 @@ Vias aéreas limpas Luftveiene er frie - + Item could not be used, airways are not clear Gegenstand konnte nicht verwendet werden, Atemwege sind nicht frei Przedmiot nie może zostać użyty, drogi oddechowe nie są czyste @@ -363,7 +322,7 @@ O item não pôde ser usado, vias aéreas bloqueadas Gjenstanden kunne ikke brukes, luftveiene er ikke frie - + Hyperextending Head Kopf überstrecken Odchyl głowę @@ -380,7 +339,7 @@ Hiperextensão de cabeça Hyperforlengelse av hode - + Hyperextended Head Kopf überstreckt Głowa odchylona @@ -397,7 +356,10 @@ Cabeça hiperestendida Hode er overekstendert - + + Patient's head is already hyperextended + + Extending Kopf überstrecken Odchylanie głowy @@ -414,8 +376,8 @@ Estendendo Forlenger - - Hyperextending Head canceled + + Hyperextending Head cancelled Kopf überstrecken abgebrochen Przestałeś odchylać głowę Hiperextensión cancelada @@ -431,22 +393,8 @@ Hiperextensão cancelada Hyperforlengelse av hode er avbrutt - - Don't run away, you're saving a life! - Renne nicht weg, du rettest ein Leben! - Nie uciekaj, ratujesz życie! - ¡No huyas, estás salvando una vida! - 不要跑,你正在拯救性命! - 不要离开,你正在确保气道通畅 - Nevzdaluj se od pacienta, zachraňuješ mu život! - 도망치지 마십시오! 당신은 생명을 구하는 중입니다! - Ne partez pas, vous êtes en train de sauver une vie! - Kaçma, bir hayat kurtarıyorsun! - Non andartene, stai salvando una vita! - Не убегай, ты спасаешь жизнь! - 離れないでください、 あなたは命を繋いでいます! - Não vá embora, você está salvando uma vida! - Ikke løp vekk, du redder et liv! + + Stay close to patient to keep head hyperextended Head turn performed, airways are still not clear @@ -581,7 +529,7 @@ Larynkstube - The King LT is used to save the airways + The King LT is used to maintain the airway Der Larynxtubus ist ein Hilfsmittel zur Atemwegssicherung Rurka krtaniowa służy do ratowania dróg oddechowych El tubo laríngeo previene obstrucciones y oclusiones @@ -615,7 +563,7 @@ Guedel Tube - The Guedel Tube is used to save the airways + The Guedel Tube is used to maintain the airway Der Guedeltubus ist ein Hilfsmittel zur Atemwegssicherung Rurka ustno-gardłowa zabezpiecza drogi oddechowe La cánula de Guedel impide obstrucciones @@ -802,7 +750,7 @@ Opplæringsnivået som kreves for å bruke en Accuvac - Time to check Airways + Time to check Airway Zeit um Atemwege zu prüfen Czas sprawdzenia dróg oddechowych Tiempo para revisar las vías aéreas @@ -819,7 +767,7 @@ Tid for å sjekke luftveiene - How long it will take to check Airways + How long it will take to check Airway Wie lange es dauert, um die Atemwege zu prüfen Ile czasu zajmie sprawdzenie dróg oddechowych Cuánto tiempo tomará revisar las vías aéreas @@ -1046,7 +994,7 @@ Estabelecendo posição de recuperação Legger i stabilt sideleie - + Recovery position established successfully Erfolgreich in die stabile Seitenlage gelegt Pomyślnie ułożono w pozycji bezpiecznej @@ -1175,38 +1123,6 @@ Maximum time required for patient in recovery position to be drained of occlusion. - - Not obstructed - Nicht obstruiert - Drożne - No obstruída - 無 阻塞 - Bez obstrukce - 혀에 의해 막히지 않음 - Non obstruées - Değil Kapanma - No ostruita - 閉塞無し - 无阻塞 - Não obstruída - Ikke blokkert - - - Not occluded - Nicht verstopft - Brak zatoru - No ocluída - 無 閉塞 - Není ucpáno - 구토에 의해 막히지 않음 - Non occludées - Değil Tıkalı - No occlusa - 異物無し - 无闭塞 - Não ocluída - Ikke okkludert - Recovery Position + Head Hyperextend Settings @@ -1309,7 +1225,7 @@ %1 removeu a Cânula de Guedel - Auto Triage Airways + Auto Triage Airway 気道状態による自動トリアージ Auto Triage Atemwege Triage automatique des voies aériennes diff --git a/addons/gui/functions/fnc_updateInjuryList.sqf b/addons/gui/functions/fnc_updateInjuryList.sqf index 132305ad5..01efcaf2b 100644 --- a/addons/gui/functions/fnc_updateInjuryList.sqf +++ b/addons/gui/functions/fnc_updateInjuryList.sqf @@ -239,7 +239,7 @@ if (EGVAR(breathing,showCyanosis) && _selectionN in [0,2,3]) then { // Airway State if (_target getVariable [QEGVAR(airway,overstretch), false] && _selectionN isEqualTo 0) then { - _entries pushback [LELSTRING(airway,overstretched), [0.1, 1, 1, 1]]; + _entries pushback [LELSTRING(airway,Hyperextended), [0.1, 1, 1, 1]]; }; if (_target getVariable [QEGVAR(airway,airway), false] && _selectionN isEqualTo 0) then { diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 8d956370b..ddc36edc0 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -130,7 +130,7 @@ Volume de sangue: - Manage Airways + Manage Airway Atemwege verwalten Upravit dýchací cesty Gestion des voies aériennes From 3e800fda961797c8cda0130e0eef28d92704a8f1 Mon Sep 17 00:00:00 2001 From: Blue Date: Thu, 23 Nov 2023 20:18:56 +0100 Subject: [PATCH 4/7] Reword hyperextending hint --- .../fnc_treatmentAdvanced_hyperextendHead.sqf | 15 +++++---------- addons/airway/stringtable.xml | 8 ++++---- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf b/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf index 733b9eae0..aa391793d 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_hyperextendHead.sqf @@ -19,18 +19,15 @@ params ["_medic", "_patient"]; if (_patient getVariable [QGVAR(overstretch), false]) exitWith { - private _output = LLSTRING(Hyperextend_already); - [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); + [LLSTRING(Hyperextend_already), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; if !(_patient getVariable [QGVAR(obstruction), false]) exitWith { - private _output = LLSTRING(AirwayStatus_Clear); - [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); + [LLSTRING(AirwayStatus_noObstruction), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }; _patient setVariable [QGVAR(overstretch), true, true]; -private _output = LLSTRING(Hyperextend_Warning); -[_output, 2, _medic] call ACEFUNC(common,displayTextStructured); +[LLSTRING(Hyperextend_Ready), 1.5, _medic, 11] call ACEFUNC(common,displayTextStructured); [{ params ["_medic", "_patient"]; @@ -39,12 +36,10 @@ private _output = LLSTRING(Hyperextend_Warning); params ["_medic", "_patient"]; if (_patient getVariable [QGVAR(recovery), false]) exitWith {}; _patient setVariable [QGVAR(overstretch), false, true]; - _output = LLSTRING(Hyperextend_Cancel); - [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); + [LLSTRING(Hyperextend_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }, [_medic, _patient], 3600, { params ["_medic", "_patient"]; if (_patient getVariable [QGVAR(recovery), false]) exitWith {}; _patient setVariable [QGVAR(overstretch), false, true]; - _output = LLSTRING(Hyperextend_Cancel); - [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); + [LLSTRING(Hyperextend_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); }] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/airway/stringtable.xml b/addons/airway/stringtable.xml index 566d9e9d2..58c8017f0 100644 --- a/addons/airway/stringtable.xml +++ b/addons/airway/stringtable.xml @@ -360,7 +360,7 @@ Patient's head is already hyperextended - Extending + Hyperextending head Kopf überstrecken Odchylanie głowy Hiperextendiendo cabeza @@ -377,7 +377,7 @@ Forlenger - Hyperextending Head cancelled + Hyperextending head cancelled Kopf überstrecken abgebrochen Przestałeś odchylać głowę Hiperextensión cancelada @@ -393,8 +393,8 @@ Hiperextensão cancelada Hyperforlengelse av hode er avbrutt - - Stay close to patient to keep head hyperextended + + Head hyperextended successfully Head turn performed, airways are still not clear From d3ebfb52ac74093bd8efe0991b4a3113da04a4cb Mon Sep 17 00:00:00 2001 From: Blue Date: Fri, 1 Dec 2023 11:56:08 +0100 Subject: [PATCH 5/7] Delay cancel hint to be able to see original treatment hint --- .../airway/ACE_Medical_Treatment_Actions.hpp | 6 ++-- addons/airway/XEH_postInit.sqf | 2 +- .../functions/fnc_handleRecoveryPosition.sqf | 5 ++-- ...eatmentAdvanced_CancelRecoveryPosition.sqf | 9 ++++-- ...ntAdvanced_CancelRecoveryPositionLocal.sqf | 17 +++++++++-- ...fnc_treatmentAdvanced_RecoveryPosition.sqf | 2 +- ...reatmentAdvanced_RecoveryPositionLocal.sqf | 28 +++++++------------ addons/airway/stringtable.xml | 3 ++ .../ACE_Medical_Treatment_Actions.hpp | 20 ++++++------- .../ACE_Medical_Treatment_Actions.hpp | 12 ++++---- .../fnc_AEDXPlaced_CheckCondition.sqf | 2 +- .../fnc_Defibrillator_CheckCondition.sqf | 2 +- .../fnc_Defibrillator_Pads_CheckCondition.sqf | 4 +-- .../pharma/ACE_Medical_Treatment_Actions.hpp | 4 +-- 14 files changed, 63 insertions(+), 53 deletions(-) diff --git a/addons/airway/ACE_Medical_Treatment_Actions.hpp b/addons/airway/ACE_Medical_Treatment_Actions.hpp index df0f169dc..07394ddfd 100644 --- a/addons/airway/ACE_Medical_Treatment_Actions.hpp +++ b/addons/airway/ACE_Medical_Treatment_Actions.hpp @@ -10,7 +10,7 @@ class ACE_Medical_Treatment_Actions { treatmentTime = QGVAR(Larynxtubus_time); items[] = {"kat_larynx"}; condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus')); - callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway); [ARR_2(_medic,_patient)] call FUNC(handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,(_patient getVariable [ARR_2(QQGVAR(occluded),false)]))] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -40,7 +40,7 @@ class ACE_Medical_Treatment_Actions { condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && missionNamespace getVariable [ARR_2(QQGVAR(enable),true)] && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus')); items[] = {"kat_guedel"}; icon = QPATHTOF(ui\guedel.paa); - callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway); [ARR_2(_medic,_patient)] call FUNC(handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,(_patient getVariable [ARR_2(QQGVAR(occluded),false)]))] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); }; class RemoveGuedeltubus: RemoveLarynxtubus { displayName = CSTRING(Cancel_Guedeltubus); @@ -108,7 +108,7 @@ class ACE_Medical_Treatment_Actions { items[] = {}; condition = QUOTE((!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(recovery),false)]))); icon = ""; - callbackSuccess = QFUNC(treatmentAdvanced_CancelRecoveryPosition); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(treatmentAdvanced_CancelRecoveryPosition)); animationPatientUnconscious = ""; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"}; }; diff --git a/addons/airway/XEH_postInit.sqf b/addons/airway/XEH_postInit.sqf index 29704ac98..347c85c79 100644 --- a/addons/airway/XEH_postInit.sqf +++ b/addons/airway/XEH_postInit.sqf @@ -12,7 +12,7 @@ if !(GVAR(enable)) exitWith {}; [QGVAR(airwayFeedback), { params ["_medic","_output"]; - [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); + [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); }] call CBA_fnc_addEventHandler; ["ace_unconscious", { diff --git a/addons/airway/functions/fnc_handleRecoveryPosition.sqf b/addons/airway/functions/fnc_handleRecoveryPosition.sqf index 92bf26112..98a3c9584 100644 --- a/addons/airway/functions/fnc_handleRecoveryPosition.sqf +++ b/addons/airway/functions/fnc_handleRecoveryPosition.sqf @@ -6,6 +6,7 @@ * Arguments: * 0: Medic * 1: Patient + * 2: Hint is delayed? * * Return Value: * None @@ -16,8 +17,8 @@ * Public: No */ -params ["_medic", "_patient"]; +params ["_medic", "_patient", ["_delayed", false]]; if (_patient getVariable [QGVAR(recovery), false]) then { - [_medic, _patient] call FUNC(treatmentAdvanced_CancelRecoveryPosition); + [_medic, _patient, _delayed] call FUNC(treatmentAdvanced_CancelRecoveryPosition); }; \ No newline at end of file diff --git a/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPosition.sqf b/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPosition.sqf index adccfe339..115f66566 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPosition.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPosition.sqf @@ -6,17 +6,20 @@ * Arguments: * 0: Medic * 1: Patient + * 2: Hint is delayed? * * Return Value: * None * * Example: - * [player, cursorTarget] call kat_airway_fnc_RecoveryPosition + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_CancelRecoveryPosition; * * Public: No */ -params ["_medic", "_patient"]; +params ["_medic", "_patient", ["_delayed", false]]; -[QGVAR(cancelRecoveryPositionLocal), [_medic, _patient], _patient] call CBA_fnc_targetEvent; +[_patient, "activity", LSTRING(CancelRecoveryPosition_Log), [[_medic] call ACEFUNC(common,getName)]] call ACEFUNC(medical_treatment,addToLog); + +[QGVAR(cancelRecoveryPositionLocal), [_medic, _patient, _delayed], _patient] call CBA_fnc_targetEvent; [_patient, "ainjppnemstpsnonwrfldnon", 2] call ACEFUNC(common,doAnimation); diff --git a/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf index 17469f8b9..8deda2aef 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_CancelRecoveryPositionLocal.sqf @@ -6,21 +6,32 @@ * Arguments: * 0: Medic * 1: Patient + * 2: Hint is delayed? * * Return Value: * None * * Example: - * [player, cursorTarget] call kat_airway_fnc_CancelRecoveryPositionLocal + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_CancelRecoveryPositionLocal; * * Public: No */ -params ["_medic", "_patient"]; +params ["_medic", "_patient", ["_delayed", false]]; _patient setVariable [QGVAR(recovery), false, true]; _patient setVariable [QGVAR(overstretch), false, true]; +_patient setVariable [QGVAR(occluded), (_patient getVariable [QGVAR(wasOccluded), false]), true]; _patient call FUNC(handlePuking); private _output = LLSTRING(RecoveryPosition_Cancel); -[_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); + +if (_delayed) then { + [{ + params ["_medic", "_output"]; + + [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); + }, [_medic, _output], 2.5] call CBA_fnc_waitAndExecute; +} else { + [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); +}; \ No newline at end of file diff --git a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPosition.sqf b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPosition.sqf index b2741c484..3ed4011b2 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPosition.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPosition.sqf @@ -11,7 +11,7 @@ * None * * Example: - * [player, cursorTarget] call kat_airway_fnc_RecoveryPosition + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_RecoveryPosition; * * Public: No */ diff --git a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf index 971749419..fa18f5e51 100644 --- a/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf +++ b/addons/airway/functions/fnc_treatmentAdvanced_RecoveryPositionLocal.sqf @@ -11,7 +11,7 @@ * None * * Example: - * [player, cursorTarget] call kat_airway_fnc_RecoveryPositionLocal + * [player, cursorTarget] call kat_airway_fnc_treatmentAdvanced_RecoveryPositionLocal; * * Public: No */ @@ -24,40 +24,32 @@ _patient setVariable [QGVAR(overstretch), true, true]; private _output = LLSTRING(RecoveryPosition_Ready); [_output, 2, _medic] call ACEFUNC(common,displayTextStructured); -GVAR(wasOccluded) = _patient getVariable [QGVAR(occluded), false]; +_patient setVariable [QGVAR(wasOccluded), (_patient getVariable [QGVAR(occluded), false])]; if (GVAR(RecoveryPosition_TimeToDrain) > 0 && GVAR(wasOccluded)) then { [{ params ["_patient"]; _patient setVariable [QGVAR(occluded), false, true]; - GVAR(wasOccluded) = false; + _patient setVariable [QGVAR(wasOccluded), false]; }, [_patient], (random GVAR(RecoveryPosition_TimeToDrain) max 1)] call CBA_fnc_waitAndExecute; } else { _patient setVariable [QGVAR(occluded), false, true]; - GVAR(wasOccluded) = false; + _patient setVariable [QGVAR(wasOccluded), false]; }; [{ params ["_medic", "_patient"]; - _patient call ACEFUNC(medical_status,isBeingDragged) || _patient call ACEFUNC(medical_status,isBeingCarried) || !(isNull objectParent _patient); + _patient call ACEFUNC(medical_status,isBeingDragged) || _patient call ACEFUNC(medical_status,isBeingCarried) || !(_patient getVariable [QGVAR(recovery), false]) || !(isNull objectParent _patient); }, { params ["_medic", "_patient"]; - _patient setVariable [QGVAR(recovery), false, true]; - _patient setVariable [QGVAR(overstretch), false, true]; - _patient setVariable [QGVAR(occluded), GVAR(wasOccluded), true]; - - _output = LLSTRING(RecoveryPosition_Cancel); - [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); -}, [_medic, _patient], 3600, { - params ["_medic", "_patient"]; + if (_patient getVariable [QGVAR(recovery), false]) then { + [LLSTRING(RecoveryPosition_Cancel), 1.5, _medic] call ACEFUNC(common,displayTextStructured); + }; _patient setVariable [QGVAR(recovery), false, true]; _patient setVariable [QGVAR(overstretch), false, true]; - _patient setVariable [QGVAR(occluded), GVAR(wasOccluded), true]; - - _output = LLSTRING(RecoveryPosition_Cancel); - [_output, 1.5, _medic] call ACEFUNC(common,displayTextStructured); -}] call CBA_fnc_waitUntilAndExecute; + _patient setVariable [QGVAR(occluded), (_patient getVariable [QGVAR(wasOccluded), false]), true]; +}, [_medic, _patient], 3600, {}] call CBA_fnc_waitUntilAndExecute; diff --git a/addons/airway/stringtable.xml b/addons/airway/stringtable.xml index 58c8017f0..26c045331 100644 --- a/addons/airway/stringtable.xml +++ b/addons/airway/stringtable.xml @@ -1039,6 +1039,9 @@ %1 estabeleceu a posição de recuperação %1 la dem i stabilt sideleie + + %1 cancelled recovery position + Time for recovery position Zeit für die stabile Seitenlage diff --git a/addons/breathing/ACE_Medical_Treatment_Actions.hpp b/addons/breathing/ACE_Medical_Treatment_Actions.hpp index 4f37f976f..e7329aad1 100644 --- a/addons/breathing/ACE_Medical_Treatment_Actions.hpp +++ b/addons/breathing/ACE_Medical_Treatment_Actions.hpp @@ -45,7 +45,7 @@ class ACE_Medical_Treatment_Actions { allowSelfTreatment = 0; medicRequired = QGVAR(inspectChest_medLvl); condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (missionNamespace getVariable [ARR_2(QQGVAR(inspectChest_enable),0)] > 0)); - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(inspectChest); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,true)] call EFUNC(airway,handleRecoveryPosition); [ARR_2(_medic,_patient)] call FUNC(inspectChest);); animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"}; animationMedic = "AinvPknlMstpSnonWnonDr_medic4"; @@ -109,7 +109,7 @@ class ACE_Medical_Treatment_Actions { treatmentTime = 7; items[] = {"kat_chestSeal"}; condition = "true"; - callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_chestSeal); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_chestSeal);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -133,7 +133,7 @@ class ACE_Medical_Treatment_Actions { treatmentTime = 7; items[] = {"kat_aatKit"}; condition = "true"; - callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_hemopneumothorax); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_hemopneumothorax);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -157,7 +157,7 @@ class ACE_Medical_Treatment_Actions { treatmentTime = 7; items[] = {"kat_aatKit"}; condition = "true"; - callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -181,7 +181,7 @@ class ACE_Medical_Treatment_Actions { treatmentTime = 7; items[] = {"kat_ncdKit"}; condition = "true"; - callbackSuccess = QUOTE([ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_tensionpneumothorax);); callbackFailure = ""; callbackProgress = ""; consumeItem = 1; @@ -231,7 +231,7 @@ class ACE_Medical_Treatment_Actions { items[] = {"kat_BVM"}; condition = QUOTE(_patient call FUNC(canUseBVM)); callbackStart = ""; - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,true)] call EFUNC(airway,handleRecoveryPosition); [ARR_2(_medic,_patient)] call FUNC(useBVM);); callbackFailure = ""; callbackProgress = ""; animationPatient = ""; @@ -247,27 +247,27 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_PocketBVM); items[] = {"kat_pocketBVM"}; condition = QUOTE(_patient call FUNC(canUseBVM)); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,true,false)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,true)] call EFUNC(airway,handleRecoveryPosition); [ARR_4(_medic,_patient,true,false)] call FUNC(useBVM);); }; class UseBVMPortableOxygen: UseBVM { displayName = CSTRING(UseBVM_PortableOxygen); medicRequired = QGVAR(medLvl_BVM_Oxygen); items[] = {"kat_BVM"}; condition = QUOTE(_patient call FUNC(canUseBVM) && _medic call FUNC(hasOxygenTank) && (GVAR(locationProvideOxygen) isEqualTo 0 || !((GVAR(locationProvideOxygen) in [ARR_2(2,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalFacility)) || ((GVAR(locationProvideOxygen) in [ARR_2(1,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalVehicle)))))); - callbackSuccess = QUOTE([ARR_5(_medic,_patient,false,true,1)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,true)] call EFUNC(airway,handleRecoveryPosition); [ARR_5(_medic,_patient,false,true,1)] call FUNC(useBVM);); }; class UseBVMPortableOxygenVehicle: UseBVM { displayName = CSTRING(UseBVM_PortableOxygen_Vehicle); medicRequired = QGVAR(medLvl_BVM_Oxygen); items[] = {"kat_BVM"}; condition = QUOTE(_patient call FUNC(canUseBVM) && [ARR_2((vehicle _medic),true)] call FUNC(hasOxygenTank) && ((vehicle _medic) != _medic) && (vehicle _medic) isEqualTo (vehicle _patient)); - callbackSuccess = QUOTE([ARR_5(_medic,_patient,false,true,2)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,true)] call EFUNC(airway,handleRecoveryPosition); [ARR_5(_medic,_patient,false,true,2)] call FUNC(useBVM);); }; class UseBVMOxygen: UseBVM { displayName = CSTRING(UseBVM_Oxygen); medicRequired = QGVAR(medLvl_BVM_Oxygen); items[] = {"kat_BVM"}; condition = QUOTE(_patient call FUNC(canUseBVM) && ((GVAR(locationProvideOxygen) in [ARR_2(2,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalFacility)) || (GVAR(locationProvideOxygen) in [ARR_2(1,3)] && _patient call ACEFUNC(medical_treatment,isInMedicalVehicle)))); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,false,true)] call FUNC(useBVM); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_3(_medic,_patient,true)] call EFUNC(airway,handleRecoveryPosition); [ARR_4(_medic,_patient,false,true)] call FUNC(useBVM);); }; }; diff --git a/addons/circulation/ACE_Medical_Treatment_Actions.hpp b/addons/circulation/ACE_Medical_Treatment_Actions.hpp index 395eeda69..36342a6b8 100644 --- a/addons/circulation/ACE_Medical_Treatment_Actions.hpp +++ b/addons/circulation/ACE_Medical_Treatment_Actions.hpp @@ -8,7 +8,7 @@ class ACE_Medical_Treatment_Actions { callbackStart = ""; callbackProgress = ""; callbackFailure = ""; - callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(CPRStart); [ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_2(_medic,_patient)] call FUNC(CPRStart);); condition = QACEFUNC(medical_treatment,canCPR); animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"}; @@ -113,7 +113,7 @@ class ACE_Medical_Treatment_Actions { consumeItem = 0; callbackStart = ""; callbackProgress = ""; - callbackSuccess = QUOTE([ARR_4(_medic,_patient,0,'kat_AED')] call FUNC(Defibrillator_AttachPads)); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_4(_medic,_patient,0,'kat_AED')] call FUNC(Defibrillator_AttachPads);); callbackFailure = ""; animationMedic = "AinvPknlMstpSnonWnonDr_medic0"; treatmentLocations = QGVAR(useLocation_AED); @@ -126,7 +126,7 @@ class ACE_Medical_Treatment_Actions { displayName = CSTRING(AEDStation_Action_PlacePads); items[] = {}; condition = QUOTE([ARR_5(_medic,_patient,1,'kat_AED',_extraArgs)] call FUNC(Defibrillator_Pads_CheckCondition)); - callbackSuccess = QUOTE([ARR_5(_medic,_patient,1,'kat_AED',_extraArgs)] call FUNC(Defibrillator_AttachPads)); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_5(_medic,_patient,1,'kat_AED',_extraArgs)] call FUNC(Defibrillator_AttachPads)); }; class AEDVehiclePlacePads: AEDPlacePads { displayName = CSTRING(AEDVehicle_Action_PlacePads); @@ -151,15 +151,15 @@ class ACE_Medical_Treatment_Actions { displayNameProgress = CSTRING(Defibrillator_Action_PlacePads_Progress); items[] = {"kat_X_AED"}; condition = QUOTE([ARR_4(_medic,_patient,0,'kat_X_AED')] call FUNC(Defibrillator_Pads_CheckCondition)); - callbackSuccess = QUOTE([ARR_4(_medic,_patient,0,'kat_X_AED')] call FUNC(Defibrillator_AttachPads)); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_4(_medic,_patient,0,'kat_X_AED')] call FUNC(Defibrillator_AttachPads)); medicRequired = QGVAR(medLvl_AED_X); icon = QPATHTOF(ui\icon_aedx.paa); }; class AEDXStationPlacePads: AEDXPlacePads { displayName = CSTRING(AEDXStation_Action_PlacePads); items[] = {}; - condition = QUOTE([ARR_5(_medic,_patient,1,'kat_X_AED',_extraArgs)] call FUNC(Defibrillator_Pads_CheckCondition)); - callbackSuccess = QUOTE([ARR_5(_medic,_patient,1,'kat_X_AED',_extraArgs)] call FUNC(Defibrillator_AttachPads)); + condition = QUOTE([ARR_5(_medic,_patient,1,'kat_X_AED',_extraArgs)] call FUNC(Defibrillator_Pads_CheckCondition);); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_5(_medic,_patient,1,'kat_X_AED',_extraArgs)] call FUNC(Defibrillator_AttachPads)); }; class AEDXVehiclePlacePads: AEDXPlacePads { displayName = CSTRING(AEDXVehicle_Action_PlacePads); diff --git a/addons/circulation/functions/fnc_AEDXPlaced_CheckCondition.sqf b/addons/circulation/functions/fnc_AEDXPlaced_CheckCondition.sqf index 68469d92c..6478c8621 100644 --- a/addons/circulation/functions/fnc_AEDXPlaced_CheckCondition.sqf +++ b/addons/circulation/functions/fnc_AEDXPlaced_CheckCondition.sqf @@ -55,4 +55,4 @@ switch (_check) do { }; }; -_condition && [_medic, GVAR(medLvl_AED_X)] call ACEFUNC(medical_treatment,isMedic) && {!(_patient getVariable [QEGVAR(airway,recovery), false]) && {["",_patient] call ACEFUNC(medical_treatment,canCPR)}}; +_condition && [_medic, GVAR(medLvl_AED_X)] call ACEFUNC(medical_treatment,isMedic) && {["",_patient] call ACEFUNC(medical_treatment,canCPR)}; diff --git a/addons/circulation/functions/fnc_Defibrillator_CheckCondition.sqf b/addons/circulation/functions/fnc_Defibrillator_CheckCondition.sqf index 3c07286db..334dc114e 100644 --- a/addons/circulation/functions/fnc_Defibrillator_CheckCondition.sqf +++ b/addons/circulation/functions/fnc_Defibrillator_CheckCondition.sqf @@ -37,4 +37,4 @@ switch (_defibProvider select 1) do { }; }; -_condition && (_allowInUse || !(_patient getVariable [QGVAR(DefibrillatorInUse), false])) && _patient getVariable [QGVAR(DefibrillatorPads_Connected), false] && {!(_patient getVariable [QEGVAR(airway,recovery), false]) && {["",_patient] call ACEFUNC(medical_treatment,canCPR)}}; +_condition && (_allowInUse || !(_patient getVariable [QGVAR(DefibrillatorInUse), false])) && _patient getVariable [QGVAR(DefibrillatorPads_Connected), false] && {["",_patient] call ACEFUNC(medical_treatment,canCPR)}; diff --git a/addons/circulation/functions/fnc_Defibrillator_Pads_CheckCondition.sqf b/addons/circulation/functions/fnc_Defibrillator_Pads_CheckCondition.sqf index 87381f6f4..a2223ed72 100644 --- a/addons/circulation/functions/fnc_Defibrillator_Pads_CheckCondition.sqf +++ b/addons/circulation/functions/fnc_Defibrillator_Pads_CheckCondition.sqf @@ -10,7 +10,7 @@ * 0: Medic * 1: Placed * 2: Vehicle - * 3: AED classname * 4: Extra Arguments * 0: Placed AED * @@ -50,4 +50,4 @@ switch (_AEDOrigin) do { }; if (_exit) exitWith {false}; -_condition && !(_patient getVariable [QGVAR(DefibrillatorPads_Connected), false]) && !(_patient getVariable [QEGVAR(airway,recovery), false]) && {["",_patient] call ACEFUNC(medical_treatment,canCPR)}; +_condition && !(_patient getVariable [QGVAR(DefibrillatorPads_Connected), false]) && {["",_patient] call ACEFUNC(medical_treatment,canCPR)}; diff --git a/addons/pharma/ACE_Medical_Treatment_Actions.hpp b/addons/pharma/ACE_Medical_Treatment_Actions.hpp index 68afee699..8f9657e19 100644 --- a/addons/pharma/ACE_Medical_Treatment_Actions.hpp +++ b/addons/pharma/ACE_Medical_Treatment_Actions.hpp @@ -302,9 +302,9 @@ class ACE_Medical_Treatment_Actions { category = "advanced"; allowedSelections[] = {"Body"}; items[] = {"kat_IO_FAST"}; - condition = QUOTE(!([ARR_3(_player,_patient,_bodyPart)] call FUNC(removeIV)) && !(_patient getVariable [ARR_2(QQEGVAR(airway,recovery),false)])); + condition = QUOTE(!([ARR_3(_player,_patient,_bodyPart)] call FUNC(removeIV))); treatmentTime = QGVAR(treatmentTime_ApplyIO); - callbackSuccess = QUOTE([ARR_4(_player,_patient,_bodyPart,'kat_IO_FAST')] call FUNC(applyIV)); + callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call EFUNC(airway,handleRecoveryPosition); [ARR_4(_player,_patient,_bodyPart,'kat_IO_FAST')] call FUNC(applyIV);); litter[] = {}; sounds[] = {}; }; From dcad6808c507dd41bff69405dab114ea68d58374 Mon Sep 17 00:00:00 2001 From: Blue Date: Sun, 3 Dec 2023 18:02:14 +0100 Subject: [PATCH 6/7] Cancel airway actions mid-treatment if condition fails --- addons/airway/ACE_Medical_Treatment_Actions.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/addons/airway/ACE_Medical_Treatment_Actions.hpp b/addons/airway/ACE_Medical_Treatment_Actions.hpp index 07394ddfd..8440429d5 100644 --- a/addons/airway/ACE_Medical_Treatment_Actions.hpp +++ b/addons/airway/ACE_Medical_Treatment_Actions.hpp @@ -12,7 +12,7 @@ class ACE_Medical_Treatment_Actions { condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus')); callbackSuccess = QUOTE([ARR_3(_medic,_patient,(_patient getVariable [ARR_2(QQGVAR(occluded),false)]))] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); callbackFailure = ""; - callbackProgress = ""; + callbackProgress = QUOTE(!([(_args select 1)] call ACEFUNC(common,isAwake)) && !((_args select 1) getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && !((_args select 1) getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus')); consumeItem = 1; animationPatient = ""; animationPatientUnconscious = "AinjPpneMstpSnonWrflDnon_rolltoback"; @@ -32,12 +32,12 @@ class ACE_Medical_Treatment_Actions { items[] = {}; condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus')); callbackSuccess = QFUNC(treatmentAdvanced_RemoveAirwayItem); + callbackProgress = ""; }; class Guedeltubus: Larynxtubus { displayName = CSTRING(Guedeltubus_Display); medicRequired = QGVAR(medLvl_Guedeltubus); treatmentTime = QGVAR(Guedeltubus_time); - condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && missionNamespace getVariable [ARR_2(QQGVAR(enable),true)] && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus')); items[] = {"kat_guedel"}; icon = QPATHTOF(ui\guedel.paa); callbackSuccess = QUOTE([ARR_3(_medic,_patient,(_patient getVariable [ARR_2(QQGVAR(occluded),false)]))] call FUNC(handleRecoveryPosition); [ARR_6(_medic,_patient,_bodyPart,_className,objNull,_usedItem)] call FUNC(treatmentAdvanced_airway);); @@ -62,6 +62,7 @@ class ACE_Medical_Treatment_Actions { medicRequired = QGVAR(medLvl_Accuvac); callbackStart = QFUNC(treatmentAdvanced_AccuvacStart); callbackSuccess = QFUNC(treatmentAdvanced_accuvac); + callbackProgress = ""; sounds[] = {{QPATHTO_R(sounds\accuvac.wav),6,1,15}}; }; class HyperextendHead: Larynxtubus { @@ -73,6 +74,7 @@ class ACE_Medical_Treatment_Actions { icon = ""; condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && !(_patient getVariable [ARR_2(QQGVAR(overstretch),false)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus')); callbackSuccess = QFUNC(treatmentAdvanced_hyperextendHead); + callbackProgress = QUOTE(!([(_args select 1)] call ACEFUNC(common,isAwake)) && !((_args select 1) getVariable [ARR_2(QQGVAR(overstretch),false)]) && !((_args select 1) getVariable [ARR_2(QQGVAR(recovery),false)]) && !((_args select 1) getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') && !((_args select 1) getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus')); }; class BeginHeadTurning: Larynxtubus { displayName = CSTRING(headTurning_begin); @@ -83,6 +85,7 @@ class ACE_Medical_Treatment_Actions { icon = ""; condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)]) && !(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Larynxtubus') && (!(_patient getVariable [ARR_2(QQGVAR(airway_item),'')] == 'Guedeltubus') || !(missionNamespace getVariable [ARR_2(QQGVAR(block_headTurning_ifAirwayItem),true)]))); callbackSuccess = QFUNC(startHeadTurning); + callbackProgress = ""; sounds[] = {}; }; class RecoveryPosition: Larynxtubus { @@ -93,9 +96,10 @@ class ACE_Medical_Treatment_Actions { allowedSelections[] = {"Body"}; medicRequired = 0; items[] = {}; - condition = QUOTE((!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)])) && FUNC(checkRecovery)); + condition = QUOTE((!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && !(_patient getVariable [ARR_2(QQGVAR(recovery),false)])) && [ARR_2(_medic,_patient)] call FUNC(checkRecovery)); icon = ""; callbackSuccess = QFUNC(treatmentAdvanced_RecoveryPosition); + callbackProgress = QUOTE(!([(_args select 1)] call ACEFUNC(common,isAwake) && !((_args select 1) getVariable [ARR_2(QQGVAR(recovery),false)])) && [ARR_2((_args select 0),(_args select 1))] call FUNC(checkRecovery)); animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon", "kat_recoveryposition"}; }; class CancelRecoveryPosition: Larynxtubus { @@ -106,9 +110,10 @@ class ACE_Medical_Treatment_Actions { allowedSelections[] = {"Body"}; medicRequired = 0; items[] = {}; - condition = QUOTE((!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(recovery),false)]))); + condition = QUOTE(!([_patient] call ACEFUNC(common,isAwake)) && (missionNamespace getVariable [ARR_2(QQGVAR(enable),true)]) && (_patient getVariable [ARR_2(QQGVAR(recovery),false)])); icon = ""; callbackSuccess = QUOTE([ARR_2(_medic,_patient)] call FUNC(treatmentAdvanced_CancelRecoveryPosition)); + callbackProgress = QUOTE(!([(_args select 1)] call ACEFUNC(common,isAwake)) && ((_args select 1) getVariable [ARR_2(QQGVAR(recovery),false)])); animationPatientUnconscious = ""; animationPatientUnconsciousExcludeOn[] = {"ainjppnemstpsnonwrfldnon"}; }; From aef9647fe02cb28b15392c2566a65c0af574d6f6 Mon Sep 17 00:00:00 2001 From: Blue Date: Mon, 4 Dec 2023 13:22:56 +0100 Subject: [PATCH 7/7] Treatment check for condition before running callbackSuccess --- addons/misc/functions/fnc_treatmentSuccess.sqf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/misc/functions/fnc_treatmentSuccess.sqf b/addons/misc/functions/fnc_treatmentSuccess.sqf index bc9dbe092..68dd36707 100644 --- a/addons/misc/functions/fnc_treatmentSuccess.sqf +++ b/addons/misc/functions/fnc_treatmentSuccess.sqf @@ -41,6 +41,9 @@ if (!isNil QACEGVAR(advanced_fatigue,setAnimExclusions)) then { ACEGVAR(advanced_fatigue,setAnimExclusions) deleteAt (ACEGVAR(advanced_fatigue,setAnimExclusions) find QUOTE(ACE_ADDON(medical_treatment))); }; +GET_FUNCTION(_condition,configFile >> QACEGVAR(medical_treatment,actions) >> _classname >> "condition"); +if !(_args call _condition) exitWith {}; + // Call treatment specific success callback GET_FUNCTION(_callbackSuccess,configFile >> QACEGVAR(medical_treatment,actions) >> _classname >> "callbackSuccess");