give tourniquet to patient or medic depending on setting (#9206)

This commit is contained in:
Kam 2023-06-22 09:26:28 +02:00 committed by GitHub
parent 34c5988333
commit 1e6073c467
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,9 +38,9 @@ private _nearPlayers = (_patient nearEntities ["CAManBase", 6]) select {_x call
TRACE_1("clearConditionCaches: tourniquetRemove",_nearPlayers);
[QEGVAR(interact_menu,clearConditionCaches), [], _nearPlayers] call CBA_fnc_targetEvent;
// Add tourniquet item to medic's inventory
// todo: should there be a setting to select who receives the removed tourniquet?
[_medic, "ACE_tourniquet"] call EFUNC(common,addToInventory);
// Add tourniquet item to medic or patient
private _receiver = [_patient, _medic, _medic] select GVAR(allowSharedEquipment);
[_receiver, "ACE_tourniquet"] call EFUNC(common,addToInventory);
// Handle occluded medications that were blocked due to tourniquet
private _occludedMedications = _patient getVariable [QEGVAR(medical,occludedMedications), []];