From cc6150303f7f041148729e11ec3f9b28559ae64f Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 9 Dec 2016 04:33:01 -0600 Subject: [PATCH] Add setting for blood bag flow rate (#4751) --- addons/medical/ACE_Settings.hpp | 7 +++++++ addons/medical/functions/fnc_getBloodVolumeChange.sqf | 2 +- addons/medical/stringtable.xml | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/addons/medical/ACE_Settings.hpp b/addons/medical/ACE_Settings.hpp index c95d74500c..0517a27f41 100644 --- a/addons/medical/ACE_Settings.hpp +++ b/addons/medical/ACE_Settings.hpp @@ -230,4 +230,11 @@ class ACE_Settings { values[] = {CSTRING(useSelection), CSTRING(useRadial), "Disabled"}; isClientSettable = 1; }; + class GVAR(ivFlowRate) { + category = CSTRING(Category_Medical); + displayName = CSTRING(MedicalSettings_ivFlowRate_DisplayName); + description = CSTRING(MedicalSettings_ivFlowRate_Description); + typeName = "SCALAR"; + value = 1; + }; }; diff --git a/addons/medical/functions/fnc_getBloodVolumeChange.sqf b/addons/medical/functions/fnc_getBloodVolumeChange.sqf index 0e71c56fa6..8680765203 100644 --- a/addons/medical/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf @@ -25,7 +25,7 @@ if (!isNil {_unit getVariable QGVAR(ivBags)}) then { _bloodBags = _bloodBags apply { _x params ["_bagVolumeRemaining"]; - private _bagChange = _deltaT * (IV_CHANGE_PER_SECOND min _bagVolumeRemaining); // absolute value of the change in miliLiters + private _bagChange = (_deltaT * GVAR(ivFlowRate) * IV_CHANGE_PER_SECOND) min _bagVolumeRemaining; // absolute value of the change in miliLiters _bagVolumeRemaining = _bagVolumeRemaining - _bagChange; _bloodVolumeChange = _bloodVolumeChange + (_bagChange / 1000); diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index f9a7b0ae50..340b2263b1 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -2931,6 +2931,12 @@ Fornisce un sistema medico sia per giocatori che IA. プレイヤーと AI の両方へ医療システムを提供します。 + + IV Transfusion Flow Rate + + + Effects how quickly IV Bags will have effect + Basic Medical Settings [ACE] Standard Sanitätseinstellungen [ACE]