From 43823a6892bd11c52246d39c2423b53e8bfc2fe3 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:36:19 -0700 Subject: [PATCH] Revert "Merge branch 'Medication_Rework' of https://github.com/Cplhardcore/KAM into Medication_Rework" This reverts commit d951500f9caf3e623805454c7a1d20938db49f68, reversing changes made to d702c684bac6c6c5509ccfdec00bcd23c4efff80. --- addons/pharma/functions/fnc_applyIV.sqf | 38 +++++++++++------- .../functions/fnc_closedReductionLocal.sqf | 40 ++++++++++++------- 2 files changed, 48 insertions(+), 30 deletions(-) diff --git a/addons/pharma/functions/fnc_applyIV.sqf b/addons/pharma/functions/fnc_applyIV.sqf index 5e233fcf8..20b60ca9e 100644 --- a/addons/pharma/functions/fnc_applyIV.sqf +++ b/addons/pharma/functions/fnc_applyIV.sqf @@ -69,21 +69,29 @@ switch (_usedItem) do { _IVrate set [_partIndex, 0.4]; _patient setVariable [QGVAR(IV), _IVarray, true]; _patient setVariable [QGVAR(IVrate), _IVrate, true]; - private _medications = []; - _medications pushBack ["Lidocaine", "syringe_kat_lidocaine_5ml_1", "syringe_kat_lidocaine_5ml_2", "syringe_kat_lidocaine_10ml_1", "syringe_kat_lidocaine_10ml_2"]; - _medications pushBack ["Morphine"]; - _medications pushBack ["Nalbuphine", "syringe_kat_nalbuphine_5ml_1", "syringe_kat_nalbuphine_5ml_2", "syringe_kat_nalbuphine_10ml_1", "syringe_kat_nalbuphine_10ml_2"]; - _medications pushBack ["Fentanyl", "syringe_kat_fentanyl_5ml_1", "syringe_kat_fentanyl_5ml_2", "syringe_kat_fentanyl_10ml_1", "syringe_kat_fentanyl_10ml_2"]; - _medications pushBack ["Ketamine", "syringe_kat_ketamine_5ml_1", "syringe_kat_ketamine_5ml_2", "syringe_kat_ketamine_10ml_1", "syringe_kat_ketamine_10ml_2"]; - private _totalCheck = true; - { - private _medicationType = _x; - { - private _count = [_patient, _x, false] call ACEFUNC(medical_status, getMedicationCount); - if (_count > 0.6) exitWith { _totalCheck = false; }; - } forEach _medicationType; - } forEach _medications; - if (_totalCheck) then {[_patient, 0.8] call ACEFUNC(medical_status, adjustPainLevel);}; + private _lidocaineCount = [_patient, "Lidocaine", false] call ACEFUNC(medical_status,getMedicationCount); + private _lidocaineCount51 = [_patient, "syringe_kat_lidocaine_5ml_1", false] call ACEFUNC(medical_status,getMedicationCount); + private _lidocaineCount52 = [_patient, "syringe_kat_lidocaine_5ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _lidocaineCount101 = [_patient, "syringe_kat_lidocaine_10ml_1", false] call ACEFUNC(medical_status,getMedicationCount); + private _lidocaineCount102 = [_patient, "syringe_kat_lidocaine_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _morphineCount = [_patient, "Morphine", false] call ACEFUNC(medical_status,getMedicationCount); + private _nalbuphineCount = [_patient, "Nalbuphine", false] call ACEFUNC(medical_status,getMedicationCount); + private _fentanylCount = [_patient, "Fentanyl", false] call ACEFUNC(medical_status,getMedicationCount); + private _ketamineCount = [_patient, "Ketamine", false] call ACEFUNC(medical_status,getMedicationCount); + private _nalbuphineCount51 = [_patient, "syringe_kat_nalbuphine_5ml_1", false] call ACEFUNC(medical_status,getMedicationCount); + private _fentanylCount51 = [_patient, "syringe_kat_fentanyl_5ml_1", false] call ACEFUNC(medical_status,getMedicationCount); + private _ketamineCount51 = [_patient, "syringe_kat_ketamine_5ml_1", false] call ACEFUNC(medical_status,getMedicationCount); + private _nalbuphineCount52 = [_patient, "syringe_kat_nalbuphine_5ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _fentanylCount52 = [_patient, "syringe_kat_fentanyl_5ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _ketamineCount52= [_patient, "syringe_kat_ketamine_5ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _nalbuphineCount101 = [_patient, "syringe_kat_nalbuphine_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _fentanylCount101 = [_patient, "syringe_kat_fentanyl_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _ketamineCount101 = [_patient, "syringe_kat_ketamine_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _nalbuphineCount102 = [_patient, "syringe_kat_nalbuphine_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _fentanylCount102 = [_patient, "syringe_kat_fentanyl_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + private _ketamineCount102 = [_patient, "syringe_kat_ketamine_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); + if (_lidocaineCount <= 0.6 && _morphineCount <= 0.6 && _nalbuphineCount <= 0.6 && _fentanylCount <= 0.6 && _ketamineCount <= 0.6 && _lidocaineCount51 <= 0.6 && _nalbuphineCount51 <= 0.6 && _fentanylCount51 <= 0.6 && _ketamineCount51 <= 0.6 &&_lidocaineCount52 <= 0.6 && _nalbuphineCount52 <= 0.6 && _fentanylCount52 <= 0.6 && _ketamineCount52 <= 0.6 && _lidocaineCount101 <= 0.6 && _nalbuphineCount101 <= 0.6 && _fentanylCount101 <= 0.6 && _ketamineCount101 <= 0.6 && _lidocaineCount102 <= 0.6 && _nalbuphineCount102 <= 0.6 && _fentanylCount102 <= 0.6 && _ketamineCount102 <= 0.6) then {[_patient, 0.8] call ACEFUNC(medical_status,adjustPainLevel)}; + [_patient, "activity", LSTRING(iv_log), [[_medic] call ACEFUNC(common,getName), "FAST IO"]] call ACEFUNC(medical_treatment,addToLog); [_patient, "FAST IO"] call ACEFUNC(medical_treatment,addToTriageCard);}; default {}; diff --git a/addons/surgery/functions/fnc_closedReductionLocal.sqf b/addons/surgery/functions/fnc_closedReductionLocal.sqf index 2e880c055..4656e1112 100644 --- a/addons/surgery/functions/fnc_closedReductionLocal.sqf +++ b/addons/surgery/functions/fnc_closedReductionLocal.sqf @@ -22,21 +22,31 @@ params ["_medic", "_patient", "_bodyPart"]; private _part = ALL_BODY_PARTS find toLower _bodyPart; private _activeFracture = GET_FRACTURES(_patient); private _fractureArray = _patient getVariable [QGVAR(fractures), [0,0,0,0,0,0]]; -private _medications = []; - _medications pushBack ["Lidocaine", "syringe_kat_lidocaine_5ml_1", "syringe_kat_lidocaine_5ml_2", "syringe_kat_lidocaine_10ml_1", "syringe_kat_lidocaine_10ml_2"]; - _medications pushBack ["Morphine"]; - _medications pushBack ["Nalbuphine", "syringe_kat_nalbuphine_5ml_1", "syringe_kat_nalbuphine_5ml_2", "syringe_kat_nalbuphine_10ml_1", "syringe_kat_nalbuphine_10ml_2"]; - _medications pushBack ["Fentanyl", "syringe_kat_fentanyl_5ml_1", "syringe_kat_fentanyl_5ml_2", "syringe_kat_fentanyl_10ml_1", "syringe_kat_fentanyl_10ml_2"]; - _medications pushBack ["Ketamine", "syringe_kat_ketamine_5ml_1", "syringe_kat_ketamine_5ml_2", "syringe_kat_ketamine_10ml_1", "syringe_kat_ketamine_10ml_2"]; - private _totalCheck = true; - { - private _medicationType = _x; - { - private _count = [_patient, _x, false] call ACEFUNC(medical_status, getMedicationCount); - if (_count > 0.8) exitWith { _totalCheck = false; }; - } forEach _medicationType; - } forEach _medications; - if (_totalCheck) then {[_patient, 0.8] call ACEFUNC(medical_status, adjustPainLevel);}; +private _lidocaineCount = [_patient, "Lidocaine", false] call ACEFUNC(medical_status,getMedicationCount); +private _lidocaineCount51 = [_patient, "syringe_kat_lidocaine_5ml_1", false] call ACEFUNC(medical_status,getMedicationCount); +private _lidocaineCount52 = [_patient, "syringe_kat_lidocaine_5ml_2", false] call ACEFUNC(medical_status,getMedicationCount); +private _lidocaineCount101 = [_patient, "syringe_kat_lidocaine_10ml_1", false] call ACEFUNC(medical_status,getMedicationCount); +private _lidocaineCount102 = [_patient, "syringe_kat_lidocaine_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); +private _morphineCount = [_patient, "Morphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _nalbuphineCount = [_patient, "Nalbuphine", false] call ACEFUNC(medical_status,getMedicationCount); +private _fentanylCount = [_patient, "Fentanyl", false] call ACEFUNC(medical_status,getMedicationCount); +private _ketamineCount = [_patient, "Ketamine", false] call ACEFUNC(medical_status,getMedicationCount); +private _nalbuphineCount51 = [_patient, "syringe_kat_nalbuphine_5ml_1", false] call ACEFUNC(medical_status,getMedicationCount); +private _fentanylCount51 = [_patient, "syringe_kat_fentanyl_5ml_1", false] call ACEFUNC(medical_status,getMedicationCount); +private _ketamineCount51 = [_patient, "syringe_kat_ketamine_5ml_1", false] call ACEFUNC(medical_status,getMedicationCount); +private _nalbuphineCount52 = [_patient, "syringe_kat_nalbuphine_5ml_2", false] call ACEFUNC(medical_status,getMedicationCount); +private _fentanylCount52 = [_patient, "syringe_kat_fentanyl_5ml_2", false] call ACEFUNC(medical_status,getMedicationCount); +private _ketamineCount52= [_patient, "syringe_kat_ketamine_5ml_2", false] call ACEFUNC(medical_status,getMedicationCount); +private _nalbuphineCount101 = [_patient, "syringe_kat_nalbuphine_10ml_1", false] call ACEFUNC(medical_status,getMedicationCount); +private _fentanylCount101 = [_patient, "syringe_kat_fentanyl_10ml_1", false] call ACEFUNC(medical_status,getMedicationCount); +private _ketamineCount101 = [_patient, "syringe_kat_ketamine_10ml_1", false] call ACEFUNC(medical_status,getMedicationCount); +private _nalbuphineCount102 = [_patient, "syringe_kat_nalbuphine_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); +private _fentanylCount102 = [_patient, "syringe_kat_fentanyl_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); +private _ketamineCount102 = [_patient, "syringe_kat_ketamine_10ml_2", false] call ACEFUNC(medical_status,getMedicationCount); +if (_lidocaineCount <= 0.6 && _morphineCount <= 0.8 && _nalbuphineCount <= 0.8 && _fentanylCount <= 0.8 && _ketamineCount <= 0.8 && _lidocaineCount51 <= 0.6 && _nalbuphineCount51 <= 0.8 && _fentanylCount51 <= 0.8 && _ketamineCount51 <= 0.8 &&_lidocaineCount52 <= 0.6 && _nalbuphineCount52 <= 0.8 && _fentanylCount52 <= 0.8 && _ketamineCount52 <= 0.8 && _lidocaineCount101 <= 0.6 && _nalbuphineCount101 <= 0.8 && _fentanylCount101 <= 0.8 && _ketamineCount101 <= 0.8 && _lidocaineCount102 <= 0.6 && _nalbuphineCount102 <= 0.8 && _fentanylCount102 <= 0.8 && _ketamineCount102 <= 0.8) then { + private _pain = random [0.7, 0.8, 0.9]; + [_patient, _pain] call ACEFUNC(medical_status,adjustPainLevel); +}; playSound3D [QPATHTOF_SOUND(sounds\reduction.wav), _patient, false, getPosASL _patient, 8, 1, 15];