Skip to content

Commit

Permalink
Misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Cplhardcore committed Oct 26, 2024
1 parent 7f2fa8a commit ec44aab
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions addons/medical/dev/watchVariable.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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: -------";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down
2 changes: 2 additions & 0 deletions addons/medical_treatment/ACE_Medical_Treatment.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <OBJECT>, 1: medicationClassName <STRING>
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
Expand Down
4 changes: 2 additions & 2 deletions addons/medical_treatment/functions/fnc_onMedicationUsage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
};
Expand Down

0 comments on commit ec44aab

Please sign in to comment.