diff --git a/addons/medical/dev/watchVariable.sqf b/addons/medical/dev/watchVariable.sqf index a0e064595ab..bd97e5b3057 100644 --- a/addons/medical/dev/watchVariable.sqf +++ b/addons/medical/dev/watchVariable.sqf @@ -150,8 +150,8 @@ GVAR(dev_watchVariableRunning) = true; }; _return pushBack format ["Adjusts: [HR %1][PS %2][PR %3]", _hrTargetAdjustment toFixed 2, _painSupressAdjustment toFixed 2, _peripheralResistanceAdjustment toFixed 2]; { - private _medicationCount = [_unit, _x, true] call EFUNC(medical_status,getMedicationCount); - private _medicationEffectiveness = [_unit, _x, false] call EFUNC(medical_status,getMedicationCount); + private _medicationCount = ([_unit, _x, true] call EFUNC(medical_status,getMedicationCount)) select 0; + private _medicationEffectiveness = ([_unit, _x, false] call EFUNC(medical_status,getMedicationCount)) select 1; _return pushBack format ["-%1: C: %2 - E: %3", _x, _medicationCount toFixed 2, _medicationEffectiveness toFixed 2]; } forEach _uniqueMedications; _return pushBack "------- Medications Raw: -------"; diff --git a/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf b/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf index aa93d449329..a9a20ec91c7 100644 --- a/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf +++ b/addons/medical_statemachine/functions/fnc_handleStateUnconscious.sqf @@ -36,7 +36,7 @@ if (EGVAR(medical,spontaneousWakeUpChance) > 0) then { private _wakeUpCheckInterval = SPONTANEOUS_WAKE_UP_INTERVAL; if (EGVAR(medical,spontaneousWakeUpEpinephrineBoost) > 1) then { - private _epiEffectiveness = [_unit, "Epinephrine", false] call EFUNC(medical_status,getMedicationCount); + private _epiEffectiveness = ([_unit, "Epinephrine", false] call EFUNC(medical_status,getMedicationCount)) select 1; _wakeUpCheckInterval = _wakeUpCheckInterval * linearConversion [0, 1, _epiEffectiveness, 1, 1 / EGVAR(medical,spontaneousWakeUpEpinephrineBoost), true]; TRACE_2("epiBoost",_epiEffectiveness,_wakeUpCheckInterval); }; diff --git a/addons/medical_treatment/ACE_Medical_Treatment.hpp b/addons/medical_treatment/ACE_Medical_Treatment.hpp index 144102efff2..97d50c5726f 100644 --- a/addons/medical_treatment/ACE_Medical_Treatment.hpp +++ b/addons/medical_treatment/ACE_Medical_Treatment.hpp @@ -570,6 +570,8 @@ class ADDON { // The number of doses over maxDose where there is a chance to overdose. // Example with maxDose = 4 and maxDoseDeviation = 2: Dose 4: Safe | Dose 5 and 6: Possible overdose | Dose 7: Guaranteed overdose maxDoseDeviation = 2; + // The dose of the medication, to allow for multiple dose types of the same medication + dose = 1; // Function to execute upon overdose. Arguments passed to call back are 0: unit , 1: medicationClassName onOverDose = ""; // The viscosity of a fluid is a measure of its resistance to gradual deformation by shear stress or tensile stress. For liquids, it corresponds to the informal concept of "thickness". This value will increase/decrease the viscoty of the blood with the percentage given. Where 100 = max. Using the minus will decrease viscosity diff --git a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf index 8ea4827543e..668e353f60c 100644 --- a/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical_treatment/functions/fnc_onMedicationUsage.sqf @@ -27,7 +27,7 @@ private _maxDose = GET_NUMBER(_medicationConfig >> "maxDose",getNumber if (_maxDose > 0) then { private _maxDoseDeviation = GET_NUMBER(_medicationConfig >> "maxDoseDeviation",getNumber (_defaultConfig >> "maxDoseDeviation")); - private _currentDose = [_target, _className] call EFUNC(medical_status,getMedicationCount) select 1; + private _currentDose = [_target, _className] call EFUNC(medical_status,getMedicationCount) select 0; // Because both {floor random 0} and {floor random 1} return 0 if (_maxDoseDeviation > 0) then { _maxDoseDeviation = _maxDoseDeviation + 1; @@ -43,7 +43,7 @@ if (_maxDose > 0) then { // Check incompatible medication (format [med,limit]) { _x params ["_xMed", "_xLimit"]; - private _inSystem = [_target, _xMed] call EFUNC(medical_status,getMedicationCount); + private _inSystem = ([_target, _xMed] call EFUNC(medical_status,getMedicationCount)) select 0; if (_inSystem > _xLimit) then { [_target, _classname, _inSystem, _xLimit, _xMed] call FUNC(overDose); };