Skip to content

Commit

Permalink
Circulation - Fix AED pads (KAT-Advanced-Medical#561)
Browse files Browse the repository at this point in the history
**When merged this pull request will:**
- Prevent medic from stacking AED pads
- Make it so pads are disconnected from the correct AED provider

### IMPORTANT

- [Development Guidelines](https://ace3.acemod.org/wiki/development/)
are read, understood and applied.
- Title of this PR uses our standard template `Component -
Add|Fix|Improve|Change|Make|Remove {changes}`.
  • Loading branch information
BlueTheKing authored Jul 28, 2024
1 parent 1283ef5 commit 35fd74e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions addons/circulation/functions/fnc_Defibrillator_AttachPads.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
params ["_medic", "_patient", "_source", "_defibClassname", ["_extraArgs",[]], ["_noLog", false]];
_extraArgs params [["_placedAED",objNull]];

if (_patient getVariable [QGVAR(DefibrillatorPads_Connected), false]) exitWith {};

private _provider = objNull;
private _soundSource = _medic;

Expand Down
6 changes: 3 additions & 3 deletions addons/circulation/functions/fnc_Defibrillator_RemovePads.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ switch (_provider select 1) do {

};
default { // Medic
_medic setVariable [QGVAR(MedicDefibrillatorInUse), false, true];
_medic setVariable [QGVAR(AED_X_VitalsMonitor_Volume), (_patient getVariable [QGVAR(AED_X_VitalsMonitor_VolumePatient), false]), true];
_medic setVariable [QGVAR(MedicDefibrillator_Patient), nil, true];
(_provider select 0) setVariable [QGVAR(MedicDefibrillatorInUse), false, true];
(_provider select 0) setVariable [QGVAR(AED_X_VitalsMonitor_Volume), (_patient getVariable [QGVAR(AED_X_VitalsMonitor_VolumePatient), false]), true];
(_provider select 0) setVariable [QGVAR(MedicDefibrillator_Patient), nil, true];
};
};

Expand Down

0 comments on commit 35fd74e

Please sign in to comment.