Skip to content

Commit

Permalink
Revert "Merge branch 'Medication_Rework' of https://github.com/Cplhar…
Browse files Browse the repository at this point in the history
…dcore/KAM into Medication_Rework"

This reverts commit d951500, reversing
changes made to d702c68.
  • Loading branch information
Cplhardcore committed Sep 20, 2024
1 parent d951500 commit 43823a6
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 30 deletions.
38 changes: 23 additions & 15 deletions addons/pharma/functions/fnc_applyIV.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
Expand Down
40 changes: 25 additions & 15 deletions addons/surgery/functions/fnc_closedReductionLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down

0 comments on commit 43823a6

Please sign in to comment.