diff --git a/addons/circulation/XEH_preInit.sqf b/addons/circulation/XEH_preInit.sqf index 577b7236b..5ace247aa 100644 --- a/addons/circulation/XEH_preInit.sqf +++ b/addons/circulation/XEH_preInit.sqf @@ -399,6 +399,16 @@ if (isServer) then { true ] call CBA_Settings_fnc_init; +// Sets whether or not H&T conditions keep patients in cardiac arrest until resolved +[ + QGVAR(AdvRhythm_HTHold), + "CHECKBOX", + LLSTRING(SETTING_AdvRhythm_HTHold), + [CBA_SETTINGS_CAT, LSTRING(SubCategory_AdvRhythms)], + [false], + true +] call CBA_Settings_fnc_init; + // Sets chance for Pulseless Electrical Activity / Asystole [ QGVAR(AdvRhythm_PEAChance), diff --git a/addons/circulation/functions/fnc_cprLocal.sqf b/addons/circulation/functions/fnc_cprLocal.sqf index 8d2871964..13c0a5ca8 100644 --- a/addons/circulation/functions/fnc_cprLocal.sqf +++ b/addons/circulation/functions/fnc_cprLocal.sqf @@ -32,6 +32,11 @@ private _fnc_advRhythm = { params ["_patient", ["_CPR",false]]; private _patientState = _patient getVariable [QGVAR(cardiacArrestType), 0]; + private _ht = if (GVAR(AdvRhythm_HTHold)) then { + ((count(_patient getVariable [QGVAR(ht), []])) == 0) + } else { + true + }; if (_CPR) then { if (floor (random 100) < GVAR(AdvRhythm_CPR_ROSC_Chance)) then { @@ -57,7 +62,7 @@ private _fnc_advRhythm = { }; }; - if (_patient getVariable [QGVAR(cardiacArrestType), 0] isEqualTo 0) exitWith { + if ((_patient getVariable [QGVAR(cardiacArrestType), 0] isEqualTo 0) && _ht) exitWith { [QACEGVAR(medical,CPRSucceeded), _patient] call CBA_fnc_localEvent; }; diff --git a/addons/circulation/stringtable.xml b/addons/circulation/stringtable.xml index 3ee2b3c3e..4a5d4b172 100644 --- a/addons/circulation/stringtable.xml +++ b/addons/circulation/stringtable.xml @@ -3051,6 +3051,9 @@ Peso del tempo di deterioramento casuale 随机劣化时间权重 + + Enable H-and-T Holding in Arrest + Deteriorate After Treatment 治療後に調律状態が悪化するようにする