Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pharmacy/Surgery - Change the IO painkiller checks and change the closed reduction checks #501

Merged
merged 5 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions addons/pharma/functions/fnc_applyIV.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ if (_usedItem isEqualTo "kat_IV_16") then {
_IVarray set [_partIndex, 1];
_patient setVariable [QGVAR(IV), _IVarray, true];

private _count = [_patient, "Lidocaine"] call ACEFUNC(medical_status,getMedicationCount);
private _count2 = [_patient, "Morphine"] call ACEFUNC(medical_status,getMedicationCount);
if (_count == 0 && _count2 == 0) then {[_patient, 0.8] call ACEFUNC(medical_status,adjustPainLevel)};
private _lidocaineCount = [_patient, "Lidocaine", 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);
if (_lidocaineCount <= 0.6 && _morphineCount <= 0.6 && _nalbuphineCount <= 0.6 && _fentanylCount <= 0.6 && _ketamineCount <= 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);
Expand Down
10 changes: 6 additions & 4 deletions addons/surgery/functions/fnc_closedReductionLocal.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ 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 _count1 = [_patient, "Lidocaine"] call ACEFUNC(medical_status,getMedicationCount);
private _count2 = [_patient, "Morphine"] call ACEFUNC(medical_status,getMedicationCount);

if (_count1 == 0 && _count2 == 0) then {
private _lidocaineCount = [_patient, "Lidocaine", 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);
if (_lidocaineCount <= 0.8 && _morphineCount <= 0.8 && _nalbuphineCount <= 0.8 && _fentanylCount <= 0.8 && _ketamineCount <= 0.8) then {
private _pain = random [0.7, 0.8, 0.9];
[_patient, _pain] call ACEFUNC(medical_status,adjustPainLevel);
};
Expand Down
Loading