Skip to content

Commit

Permalink
Circulation - Add setting to apply AED pads during CPR (KAT-Advanced-…
Browse files Browse the repository at this point in the history
…Medical#499)

**When merged this pull request will:**
- Create a setting to allow medics to apply AED pads while CPR is being
performed. Not tested in multiplayer but it's a simple PR, should work
fine.

### IMPORTANT

- [x] [Development
Guidelines](https://ace3.acemod.org/wiki/development/) are read,
understood and applied.
- [x] Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.

---------

Co-authored-by: Blue <[email protected]>
  • Loading branch information
apo-tle and BlueTheKing authored Mar 25, 2024
1 parent 1673a3b commit 7cb1ea6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
11 changes: 11 additions & 0 deletions addons/circulation/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,17 @@ PREP_RECOMPILE_END;
true
] call CBA_Settings_fnc_init;

// Allow application of AED pads while CPR is performed
[
QGVAR(AED_duringCpr),
"CHECKBOX",
LLSTRING(SETTING_AED_duringCpr),
[CBA_SETTINGS_CAT, LSTRING(SubCategory_AED)],
[true],
true
] call CBA_Settings_fnc_init;


//Max Succes chance for AED-X
[
QGVAR(AED_X_MaxChance),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ switch (_AEDOrigin) do {

if (_exit) exitWith {false};

_condition && !(_patient getVariable [QGVAR(DefibrillatorPads_Connected), false]) && !(_patient getVariable [QEGVAR(airway,recovery), false]) && (objectParent _patient isEqualTo objectParent _medic) && {["",_patient] call ACEFUNC(medical_treatment,canCPR)};
_condition && !(_patient getVariable [QGVAR(DefibrillatorPads_Connected), false]) && !(_patient getVariable [QEGVAR(airway,recovery), false]) && (objectParent _patient isEqualTo objectParent _medic) && (["",_patient] call ACEFUNC(medical_treatment,canCPR) || GVAR(AED_duringCpr));
3 changes: 3 additions & 0 deletions addons/circulation/stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1979,6 +1979,9 @@
<Portuguese>Permitir DEA-X</Portuguese>
<Finnish>Salli AUD-X</Finnish>
</Key>
<Key ID="STR_KAT_Circulation_SETTING_AED_duringCpr">
<English>Allow AED pad application during CPR</English>
</Key>
<Key ID="STR_KAT_Circulation_TRAINING_LEVEL_AED_X">
<English>Training level required to use an AED-X</English>
<Polish>Poziom wyszkolenia wymagany do korzystania z AED-X</Polish>
Expand Down

0 comments on commit 7cb1ea6

Please sign in to comment.