Add pain & painkiller reduction over time

This commit is contained in:
KoffeinFlummi 2015-03-12 07:33:44 +01:00
parent fabecdd0d3
commit 809f6754cc
3 changed files with 13 additions and 2 deletions

View File

@ -346,6 +346,7 @@ class CfgVehicles {
};
class ACE_Actions {
// @todo morphine, epi, bloodbag actions for basic
class ACE_Head {
runOnHover = 1;
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));

View File

@ -73,6 +73,18 @@ if ([_unit] call EFUNC(common,isAwake)) then {
};
};
if (GVAR(level) == 1) then {
// reduce pain
if (_unit getVariable [QGVAR(pain), 0] > 0) then {
_unit setVariable [QGVAR(pain), ((_unit getVariable QGVAR(pain)) - 0.001) max 0, true];
};
// reduce painkillers
if (_unit getVariable [QGVAR(morphine), 0] > 0) then {
_unit setVariable [QGVAR(morphine), ((_unit getVariable QGVAR(morphine)) - 0.0015) max 0, true];
};
};
// handle advanced medical, with vitals
if (GVAR(level) >= 2) then {

View File

@ -29,5 +29,3 @@ _pain = ((_target getVariable [QGVAR(pain), 0]) - MORPHINEHEAL) max 0;
_target setVariable [QGVAR(pain), _pain, true];
// @todo overdose
// @todo pain, painkiller reduction