mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Removed dead code 'hrCallback'
This commit is contained in:
parent
02ac4c4084
commit
b2838557fa
@ -561,8 +561,6 @@ class ADDON {
|
||||
hrIncreaseLow[] = {0, 0, 0};
|
||||
hrIncreaseNormal[] = {0, 0, 0};
|
||||
hrIncreaseHigh[] = {0, 0, 0};
|
||||
// Callback once the heart rate values have been added.
|
||||
hrCallback = "";
|
||||
|
||||
// How long until this medication has disappeared
|
||||
timeInSystem = 120;
|
||||
|
@ -17,10 +17,10 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_timeTillMaxEffect", 1, [0]], ["_timeInSystem", 1, [0]], ["_callBack", {}, [{}]]];
|
||||
params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_timeTillMaxEffect", 1, [0]], ["_timeInSystem", 1, [0]]];
|
||||
|
||||
private _adjustment = _unit getVariable [QEGVAR(medical,heartRateAdjustments), []];
|
||||
_adjustment pushBack [_value, _timeTillMaxEffect, _timeInSystem, 0, _callBack];
|
||||
_adjustment pushBack [_value, _timeTillMaxEffect, _timeInSystem, 0];
|
||||
_unit setVariable [QEGVAR(medical,heartRateAdjustments), _adjustment];
|
||||
|
||||
["ace_heartRateAdjustmentAdded", [_unit, _value, _time]] call CBA_fnc_localEvent;
|
||||
|
@ -55,7 +55,6 @@ private _hrIncreaseHigh = getArray (_medicationConfig >> "hrIncreaseHigh");
|
||||
private _timeInSystem = getNumber (_medicationConfig >> "timeInSystem");
|
||||
private _maxDose = getNumber (_medicationConfig >> "maxDose");
|
||||
private _viscosityChange = getNumber (_medicationConfig >> "viscosityChange");
|
||||
private _hrCallback = getText (_medicationConfig >> "hrCallback");
|
||||
|
||||
private _inCompatableMedication = [];
|
||||
|
||||
@ -69,17 +68,6 @@ if (isClass (_medicationConfig >> _className)) then {
|
||||
if (isNumber (_medicationConfig >> "maxDose")) then { _maxDose = getNumber (_medicationConfig >> "maxDose"); };
|
||||
if (isArray (_medicationConfig >> "inCompatableMedication")) then { _inCompatableMedication = getArray (_medicationConfig >> "inCompatableMedication"); };
|
||||
if (isNumber (_medicationConfig >> "viscosityChange")) then { _viscosityChange = getNumber (_medicationConfig >> "viscosityChange"); };
|
||||
if (isText (_medicationConfig >> "hrCallback")) then { _hrCallback = getText (_medicationConfig >> "hrCallback"); };
|
||||
};
|
||||
|
||||
if (isNil _hrCallback) then {
|
||||
_hrCallback = compile _hrCallback;
|
||||
} else {
|
||||
_hrCallback = missionNamespace getVariable _hrCallback;
|
||||
};
|
||||
|
||||
if !(_hrCallback isEqualType {}) then {
|
||||
_hrCallback = {TRACE_1("callback was NOT code",_hrCallback)};
|
||||
};
|
||||
|
||||
// Adjust the heart rate based upon config entry
|
||||
@ -88,12 +76,12 @@ private _heartRate = _target getVariable [QEGVAR(medical,heartRate), 80];
|
||||
if (alive _target) then {
|
||||
if (_heartRate > 0) then {
|
||||
if (_heartRate <= 45) then {
|
||||
[_target, ((_hrIncreaseLow select 0) + random ((_hrIncreaseLow select 1) - (_hrIncreaseLow select 0))), (_hrIncreaseLow select 2), _timeInSystem, _hrCallback] call FUNC(addHeartRateAdjustment);
|
||||
[_target, ((_hrIncreaseLow select 0) + random ((_hrIncreaseLow select 1) - (_hrIncreaseLow select 0))), (_hrIncreaseLow select 2), _timeInSystem] call FUNC(addHeartRateAdjustment);
|
||||
} else {
|
||||
if (_heartRate > 120) then {
|
||||
[_target, ((_hrIncreaseHigh select 0) + random ((_hrIncreaseHigh select 1) - (_hrIncreaseHigh select 0))), (_hrIncreaseHigh select 2), _timeInSystem, _hrCallback] call FUNC(addHeartRateAdjustment);
|
||||
[_target, ((_hrIncreaseHigh select 0) + random ((_hrIncreaseHigh select 1) - (_hrIncreaseHigh select 0))), (_hrIncreaseHigh select 2), _timeInSystem] call FUNC(addHeartRateAdjustment);
|
||||
} else {
|
||||
[_target, ((_hrIncreaseNorm select 0) + random ((_hrIncreaseNorm select 1) - (_hrIncreaseNorm select 0))), (_hrIncreaseNorm select 2), _timeInSystem, _hrCallback] call FUNC(addHeartRateAdjustment);
|
||||
[_target, ((_hrIncreaseNorm select 0) + random ((_hrIncreaseNorm select 1) - (_hrIncreaseNorm select 0))), (_hrIncreaseNorm select 2), _timeInSystem] call FUNC(addHeartRateAdjustment);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user