From 99f800952398e2cc49fb517c71f14add8e374271 Mon Sep 17 00:00:00 2001 From: Cplhardcore <135324281+Cplhardcore@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:48:56 -0800 Subject: [PATCH] Removal of IV complications and infusions --- .../breathing/functions/fnc_fullHealLocal.sqf | 1 - .../breathing/functions/fnc_listenLungs.sqf | 33 +--- addons/circulation/ACE_Medical_Treatment.hpp | 164 +++++++++--------- addons/circulation/Blood_Medical.hpp | 66 ++----- addons/circulation/CfgWeapons.hpp | 66 +++---- addons/circulation/stringtable.xml | 87 +++------- addons/gui/functions/fnc_updateInjuryList.sqf | 12 ++ addons/gui/functions/fnc_updateSyringes.sqf | 3 +- .../pharma/ACE_Medical_Treatment_Actions.hpp | 80 +++++---- addons/pharma/XEH_PREP.hpp | 3 - addons/pharma/functions/fnc_fluidLocal.sqf | 14 +- addons/pharma/functions/fnc_fullHealLocal.sqf | 6 +- .../functions/fnc_getBloodVolumeChange.sqf | 100 ++--------- .../functions/fnc_handleIVComplications.sqf | 63 ------- .../fnc_handleLimbIVComplications.sqf | 83 --------- .../pharma/functions/fnc_prepareInfusion.sqf | 30 ---- addons/pharma/script_component.hpp | 2 +- addons/pharma/stringtable.xml | 39 ++++- 18 files changed, 281 insertions(+), 571 deletions(-) delete mode 100644 addons/pharma/functions/fnc_handleIVComplications.sqf delete mode 100644 addons/pharma/functions/fnc_handleLimbIVComplications.sqf delete mode 100644 addons/pharma/functions/fnc_prepareInfusion.sqf diff --git a/addons/breathing/functions/fnc_fullHealLocal.sqf b/addons/breathing/functions/fnc_fullHealLocal.sqf index 7adc8ef03..8e5086513 100644 --- a/addons/breathing/functions/fnc_fullHealLocal.sqf +++ b/addons/breathing/functions/fnc_fullHealLocal.sqf @@ -28,7 +28,6 @@ _patient setVariable [QGVAR(etco2Monitor), [], true]; _patient setVariable [QGVAR(breathRate), 15, true]; _patient setVariable [QGVAR(nasalCannula), false, true]; _patient setVariable [QGVAR(lungSurfaceArea), 400]; -_patient setVariable [QGVAR(TRALI), false, true]; if (ACEGVAR(advanced_fatigue,enabled)) then { ["kat_LSDF"] call ACEFUNC(advanced_fatigue,removeDutyFactor); }; diff --git a/addons/breathing/functions/fnc_listenLungs.sqf b/addons/breathing/functions/fnc_listenLungs.sqf index f2160ccad..9e1284284 100644 --- a/addons/breathing/functions/fnc_listenLungs.sqf +++ b/addons/breathing/functions/fnc_listenLungs.sqf @@ -36,13 +36,12 @@ variantDelay = 0; private _tension = (_patient getVariable [QGVAR(tensionpneumothorax), false] || (_patient getVariable [QGVAR(pneumothorax), 0] > 0)); private _hemo = _patient getVariable [QGVAR(hemopneumothorax), false]; - private _trali = _patient getVariable [QGVAR(TRALI), false]; _breathDelay = 20/_HR; _random = round random 1; - private _type = 4; + private _type = 3; if(_hemo && _random >= 0.5) then {_type = 1}; if(_tension && _random >= 0.5) then {_type = 2}; @@ -95,35 +94,7 @@ variantDelay = 0; }; }, [_medic,_patient,_volume,_breathDelay], variantDelay + _breathDelay] call CBA_fnc_waitAndExecute; }; - case 3: { //Transfusion-related acute lung injury (Crackling) - if (round random 1 >= 0.5) then { - playSoundUI [QPATHTOF(audio\trali_inhale1.ogg), _volume, 1]; - variantDelay = 1.65; - } else { - playSoundUI [QPATHTOF(audio\trali_inhale2.ogg), _volume, 1]; - variantDelay = 1.7; - }; - soundPlaying = true; - [{ - params ["_medic","_patient","_volume","_breathDelay"]; - - if (_medic getVariable [QGVAR(usingStethoscope), false] && (alive _patient)) then { - if (round random 1 >= 0.5) then { - playSoundUI [QPATHTOF(audio\trali_exhale1.ogg), _volume, 1]; - variantDelay = 0.85; - } else { - playSoundUI [QPATHTOF(audio\trali_exhale2.ogg), _volume, 1]; - variantDelay = 0.8; - }; - [{ - soundPlaying = false; - }, [], variantDelay + _breathDelay] call CBA_fnc_waitAndExecute; - } else { - soundPlaying = false; - }; - }, [_medic,_patient,_volume,_breathDelay], variantDelay + _breathDelay] call CBA_fnc_waitAndExecute; - }; - case 4; + case 3; default { // clear if (round random 1 >= 0.5) then { playSoundUI [QPATHTOF(audio\clear_inhale1.ogg), _volume, 1]; diff --git a/addons/circulation/ACE_Medical_Treatment.hpp b/addons/circulation/ACE_Medical_Treatment.hpp index e90a8353d..ced78c107 100644 --- a/addons/circulation/ACE_Medical_Treatment.hpp +++ b/addons/circulation/ACE_Medical_Treatment.hpp @@ -3,7 +3,7 @@ class ACE_Medical_Treatment { volume = 1000; ratio[] = {}; type = "Blood"; - viscosity = 0.9; + kat_viscosity = 1; painReduce = 0; hrIncreaseLow[] = {0, 0}; hrIncreaseNormal[] = {0, 0}; @@ -19,256 +19,256 @@ class ACE_Medical_Treatment { class BloodIV { volume = 1000; ratio[] = {"Plasma", 1}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_500: BloodIV { volume = 500; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_250: BloodIV { volume = 250; - viscosity = 0.9; + kat_viscosity = 0.9; }; class PlasmaIV: BloodIV { volume = 1000; ratio[] = {"Blood", 1}; type = "Plasma"; - viscosity = 1; + kat_viscosity = 1; }; class PlasmaIV_500: PlasmaIV { volume = 500; - viscosity = 1; + kat_viscosity = 1; }; class PlasmaIV_250: PlasmaIV { volume = 250; - viscosity = 1; + kat_viscosity = 1; }; class SalineIV: BloodIV { volume = 1000; type = "Saline"; ratio[] = {}; - viscosity = 1.3; + kat_viscosity = 1.3; }; class SalineIV_500: SalineIV { volume = 500; - viscosity = 1.3; + kat_viscosity = 1.3; }; class SalineIV_250: SalineIV { volume = 250; - viscosity = 1.3; + kat_viscosity = 1.3; }; class BloodIV_O: BloodIV { volume = 1000; bloodType = "O"; compatibility[] = {"O", "A", "B", "AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_O_N: BloodIV { volume = 1000; bloodType = "O_N"; compatibility[] = {"O", "O_N", "A", "A_N", "B","B_N", "AB", "AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_A: BloodIV { volume = 1000; bloodType = "A"; compatibility[] = {"A", "AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_A_N: BloodIV { volume = 1000; bloodType = "A_N"; compatibility[] = {"A", "A_N", "AB", "AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_B: BloodIV { volume = 1000; bloodType = "B"; compatibility[] = {"B", "AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_B_N: BloodIV { volume = 1000; bloodType = "B_N"; compatibility[] = {"B","B_N", "AB", "AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_AB: BloodIV { volume = 1000; bloodType = "AB"; compatibility[] = {"AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_AB_N: BloodIV { volume = 1000; bloodType = "AB_N"; compatibility[] = {"AB","AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_O_500: BloodIV_500 { volume = 500; bloodType = "O"; compatibility[] = {"O", "A", "B", "AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_O_N_500: BloodIV_500 { volume = 500; bloodType = "O_N"; compatibility[] = {"O", "O_N", "A", "A_N", "B","B_N", "AB", "AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_A_500: BloodIV_500 { volume = 500; bloodType = "A"; compatibility[] = {"A", "AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_A_N_500: BloodIV_500 { volume = 500; bloodType = "A_N"; compatibility[] = {"A", "A_N", "AB", "AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_B_500: BloodIV_500 { volume = 500; bloodType = "B"; compatibility[] = {"B", "AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_B_N_500: BloodIV_500 { volume = 500; bloodType = "B_N"; compatibility[] = {"B","B_N", "AB", "AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_AB_500: BloodIV_500 { volume = 500; bloodType = "AB"; compatibility[] = {"AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_AB_N_500: BloodIV_500 { volume = 500; bloodType = "AB_N"; compatibility[] = {"AB","AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_O_250: BloodIV_250 { volume = 250; bloodType = "O"; compatibility[] = {"O", "A", "B", "AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_O_N_250: BloodIV_250 { volume = 250; bloodType = "O_N"; compatibility[] = {"O", "O_N", "A", "A_N", "B","B_N", "AB", "AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_A_250: BloodIV_250 { volume = 250; bloodType = "A"; compatibility[] = {"A", "AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_A_N_250: BloodIV_250 { volume = 250; bloodType = "A_N"; compatibility[] = {"A", "A_N", "AB", "AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_B_250: BloodIV_250 { volume = 250; bloodType = "B"; compatibility[] = {"B", "AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_B_N_250: BloodIV_250 { volume = 250; bloodType = "B_N"; compatibility[] = {"B","B_N", "AB", "AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_AB_250: BloodIV_250 { volume = 250; bloodType = "AB"; compatibility[] = {"AB"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class BloodIV_AB_N_250: BloodIV_250 { volume = 250; bloodType = "AB_N"; compatibility[] = {"AB","AB_N"}; - viscosity = 0.9; + kat_viscosity = 0.9; }; class RingersLactateIV: SalineIV { volume = 1000; - viscosity = 1.3; + kat_viscosity = 1.3; type = "Ringers Lactate"; }; class RingersLactateIV_500: SalineIV_500 { volume = 500; - viscosity = 1.3; + kat_viscosity = 1.3; type = "Ringers Lactate"; }; class RingersLactateIV_250: SalineIV_250 { volume = 250; - viscosity = 1.3; + kat_viscosity = 1.3; type = "Ringers Lactate"; }; - class PackedRBC_500: BloodIV_500 { + class PackedRBCIV_500: BloodIV_500 { volume = 500; - viscosity = 0.7; + kat_viscosity = 0.7; type = "PackedRBC"; }; - class PackedRBC_250: BloodIV_250 { + class PackedRBCIV_250: BloodIV_250 { volume = 250; - viscosity = 0.7; + kat_viscosity = 0.7; type = "PackedRBC"; }; - class MorphineIVInfusion: SalineIV_500 { - painReduce = 0.8; - hrIncreaseLow[] = {-2, -7}; - hrIncreaseNormal[] = {-3, -10}; - hrIncreaseHigh[] = {-5, -16}; - timeInSystem = 15; - timeTillMaxEffect = 3; - dose = 0.3; - viscosityChange = -5; - opioidRelief = 1.1; - volume = 500; - viscosity = 1.3; - type = "MorphineIVInfusion"; - }; - class EpinephrineIVInfusion: SalineIV_500 { - painReduce = 0; - hrIncreaseLow[] = {3, 14}; - hrIncreaseNormal[] = {5, 20}; - hrIncreaseHigh[] = {7, 25}; - timeInSystem = 10; - timeTillMaxEffect = 3; - dose = 0.1; - alphaFactor = -0.2; - onOverDose = ""; - volume = 500; - viscosity = 1.3; - type = "EpinephrineIVInfusion"; - }; - class EtomidateInfusion: SalineIV_500 { - painReduce = 0.2; - hrIncreaseLow[] = {-3, -7}; - hrIncreaseNormal[] = {-6, -13}; - hrIncreaseHigh[] = {-10, -20}; - timeInSystem = 7; - timeTillMaxEffect = 1; - dose = 0.1; - viscosityChange = 0; - volume = 500; - viscosity = 1.3; - type = "EtomidateInfusion"; - }; + //class MorphineIVInfusion: SalineIV_500 { + // painReduce = 0.8; + // hrIncreaseLow[] = {-2, -7}; + // hrIncreaseNormal[] = {-3, -10}; + // hrIncreaseHigh[] = {-5, -16}; + // timeInSystem = 15; + // timeTillMaxEffect = 3; + // dose = 0.3; + // viscosityChange = -5; + // opioidRelief = 1.1; + // volume = 500; + // kat_viscosity = 1.3; + // type = "MorphineIVInfusion"; + //}; + //class EpinephrineIVInfusion: SalineIV_500 { + // painReduce = 0; + // hrIncreaseLow[] = {3, 14}; + // hrIncreaseNormal[] = {5, 20}; + // hrIncreaseHigh[] = {7, 25}; + // timeInSystem = 10; + // timeTillMaxEffect = 3; + // dose = 0.1; + // alphaFactor = -0.2; + // onOverDose = ""; + // volume = 500; + // kat_viscosity = 1.3; + // type = "EpinephrineIVInfusion"; + //}; + //class EtomidateInfusion: SalineIV_500 { + // painReduce = 0.2; + // hrIncreaseLow[] = {-3, -7}; + // hrIncreaseNormal[] = {-6, -13}; + // hrIncreaseHigh[] = {-10, -20}; + // timeInSystem = 7; + // timeTillMaxEffect = 1; + // dose = 0.1; + // viscosityChange = 0; + // volume = 500; + // kat_viscosity = 1.3; + // type = "EtomidateInfusion"; + //}; }; }; diff --git a/addons/circulation/Blood_Medical.hpp b/addons/circulation/Blood_Medical.hpp index 3862bb6e4..9729ca924 100644 --- a/addons/circulation/Blood_Medical.hpp +++ b/addons/circulation/Blood_Medical.hpp @@ -122,51 +122,21 @@ class BloodIV_AB_N_250: BloodIV_250 { items[] = {"kat_bloodIV_AB_N_250"}; callbackSuccess = "[_medic, _patient, _bodyPart, _className, _usedItem] call kat_circulation_fnc_handleTreatment; ['kat_fluid', [_patient, -200, 4]] call CBA_fnc_localEvent;"; }; -class PackedRBCIV_500: BloodIV { - displayName = CSTRING(Actions_Packed_RBC_500); - items[] = {"kat_PackedRBCIV_500"}; - displayNameProgress = CSTRING(Transfusing_Packed_RBC); - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -400, 12, _className] call kat_pharma_fnc_fluid;"; -}; -class PackedRBC_250: BloodIV { - displayName = CSTRING(Actions_Packed_RBC_250); - items[] = {"kat_PackedRBCIV_250"}; - displayNameProgress = CSTRING(Transfusing_Packed_RBC); - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -200, 6, _className] call kat_pharma_fnc_fluid;"; -}; -class RingersLactateIV: SalineIV { - displayName = CSTRING(Actions_Ringers_Lactate); - items[] = {"kat_RingersLactateIV"}; - displayNameProgress = CSTRING(Transfusing_Ringers_Lactate); - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -200, 0, _className] call kat_pharma_fnc_fluid;"; -}; -class RingersLactateIV_500: SalineIV { - displayName = CSTRING(Actions_Ringers_Lactate_500); - items[] = {"kat_RingersLactateIV_500"}; - displayNameProgress = CSTRING(Transfusing_Ringers_Lactate); - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -100, 0, _className] call kat_pharma_fnc_fluid;"; -}; -class RingersLactateIV_250: SalineIV { - displayName = CSTRING(Actions_Ringers_Lactate_250); - items[] = {"kat_RingersLactateIV_250"}; - displayNameProgress = CSTRING(Transfusing_Ringers_Lactate); - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -50, 0, _className] call kat_pharma_fnc_fluid;"; -}; -class MorphineIVInfusion: SalineIV { - displayName = CSTRING(Actions_MorphineIVInfusion); - items[] = {"kat_MorphineIVInfusion"}; - displayNameProgress = CSTRING(Transfusing_Morphine_Infusion); - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 150, 0, _className] call kat_pharma_fnc_fluid;"; -}; -class EpinephrineIVInfusion: SalineIV { - displayName = CSTRING(Actions_EpinephrineInfusion); - items[] = {"kat_EpinephrineIVInfusion"}; - displayNameProgress = CSTRING(Transfusing_Epinephrine_Infusion); - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 150, 0, _className] call kat_pharma_fnc_fluid;"; -}; -class EtomidateIVInfusion: SalineIV { - displayName = CSTRING(Actions_EtomidateInfusion); - items[] = {"kat_EtomidateInfusion"}; - displayNameProgress = CSTRING(Transfusing_Etomidate_Infusion); - callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 150, 0, _className] call kat_pharma_fnc_fluid;"; -}; +//class MorphineIVInfusion: SalineIV { +// displayName = CSTRING(Actions_MorphineIVInfusion); +// items[] = {"kat_MorphineIVInfusion"}; +// displayNameProgress = CSTRING(Transfusing_Morphine_Infusion); +// callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 150, 0, _className] call kat_pharma_fnc_fluid;"; +//}; +//class EpinephrineIVInfusion: SalineIV { +// displayName = CSTRING(Actions_EpinephrineInfusion); +// items[] = {"kat_EpinephrineIVInfusion"}; +// displayNameProgress = CSTRING(Transfusing_Epinephrine_Infusion); +// callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 150, 0, _className] call kat_pharma_fnc_fluid;"; +//}; +//class EtomidateIVInfusion: SalineIV { +// displayName = CSTRING(Actions_EtomidateInfusion); +// items[] = {"kat_EtomidateInfusion"}; +// displayNameProgress = CSTRING(Transfusing_Etomidate_Infusion); +// callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, 150, 0, _className] call kat_pharma_fnc_fluid;"; +//}; diff --git a/addons/circulation/CfgWeapons.hpp b/addons/circulation/CfgWeapons.hpp index 62cd75add..7125a1f7b 100644 --- a/addons/circulation/CfgWeapons.hpp +++ b/addons/circulation/CfgWeapons.hpp @@ -132,39 +132,39 @@ class CfgWeapons { mass = 2.5; }; }; - class kat_MorphineIVInfusion: ACE_salineIV_250 { - scope = 1; - author = "Cplhardcore"; - displayName = CSTRING(Morphine_Infusion); - descriptionShort = CSTRING(Morphine_Infusion_Desc_Short); - descriptionUse = CSTRING(Morphine_Infusion_Desc_Use); - ACE_isMedicalItem = 1; - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 2.5; - }; - }; - class kat_EpinephrineIVInfusion: ACE_salineIV_250 { - scope = 1; - author = "Cplhardcore"; - displayName = CSTRING(Epinephrine_Infusion); - descriptionShort = CSTRING(Epinephrine_Infusion_Desc_Short); - descriptionUse = CSTRING(Epinephrine_Infusion_Desc_Use); - ACE_isMedicalItem = 1; - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 2.5; - }; - }; - class kat_EtomidateInfusion: ACE_salineIV_250 { - scope = 1; - author = "Cplhardcore"; - displayName = CSTRING(Etomidate_Infusion); - descriptionShort = CSTRING(Etomidate_Infusion_Desc_Short); - descriptionUse = CSTRING(Etomidate_Infusion_Desc_Use); - ACE_isMedicalItem = 1; - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 2.5; - }; - }; + //class kat_MorphineIVInfusion: ACE_salineIV_250 { + // scope = 1; + // author = "Cplhardcore"; + // displayName = CSTRING(Morphine_Infusion); + // descriptionShort = CSTRING(Morphine_Infusion_Desc_Short); + // descriptionUse = CSTRING(Morphine_Infusion_Desc_Use); + // ACE_isMedicalItem = 1; + // class ItemInfo: CBA_MiscItem_ItemInfo { + // mass = 2.5; + // }; + //}; + //class kat_EpinephrineIVInfusion: ACE_salineIV_250 { + // scope = 1; + // author = "Cplhardcore"; + // displayName = CSTRING(Epinephrine_Infusion); + // descriptionShort = CSTRING(Epinephrine_Infusion_Desc_Short); + // descriptionUse = CSTRING(Epinephrine_Infusion_Desc_Use); + // ACE_isMedicalItem = 1; + // class ItemInfo: CBA_MiscItem_ItemInfo { + // mass = 2.5; + // }; + //}; + //class kat_EtomidateInfusion: ACE_salineIV_250 { + // scope = 1; + // author = "Cplhardcore"; + // displayName = CSTRING(Etomidate_Infusion); + // descriptionShort = CSTRING(Etomidate_Infusion_Desc_Short); + // descriptionUse = CSTRING(Etomidate_Infusion_Desc_Use); + // ACE_isMedicalItem = 1; + // class ItemInfo: CBA_MiscItem_ItemInfo { + // mass = 2.5; + // }; + //}; class kat_PackedRBCIV_500: ACE_bloodIV_500 { scope = 2; author = "Cplhardcore"; diff --git a/addons/circulation/stringtable.xml b/addons/circulation/stringtable.xml index 4fb55d78d..b9e4948f2 100644 --- a/addons/circulation/stringtable.xml +++ b/addons/circulation/stringtable.xml @@ -3314,66 +3314,6 @@ Tamponade progressie kans Probabilità di progressione della tamponade - - Give Packed RBC IV (250ml) - - - Give Packed RBC IV (500ml) - - - Give Ringers Lactate IV (1000ml) - - - Give Ringers Lactate IV (250ml) - - - Give Ringers Lactate IV (500ml) - - - Receiving Packed RBC IV [%1ml] - - - Receiving Ringers Lactate IV [%1ml] - - - Transfusing Packed RBC... - - - Transfusing Ringers Lactate... - - - Transfuse Packed RBC - - - Transfuse Ringers Lactate - - - Ringers Lactate IV (1000ml) - - - Ringers Lactate IV (250ml) - - - Ringers Lactate IV (500ml) - - - Ringers Lactate IV, for restoring a patients fluids - - - A medical volume-replenishing agent introduced into the blood system through an IV infusion. - - - Packed RBC IV (250ml) - - - Packed RBC IV (500ml) - - - Packed Red Blood Cells, for restoring a patients blood in conjunction with plasma - - - O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care. - Morphine Infusion IV (250ml) @@ -3419,5 +3359,32 @@ Transfusing Etomidate Infusion... + + Ringers Lactate IV (1000ml) + + + Ringers Lactate IV (250ml) + + + Ringers Lactate IV (500ml) + + + Ringers Lactate IV, for restoring a patients fluids + + + A medical volume-replenishing agent introduced into the blood system through an IV infusion. + + + Packed RBC IV (250ml) + + + Packed RBC IV (500ml) + + + Packed Red Blood Cells, for restoring a patients blood in conjunction with plasma + + + O Negative infusion blood used in strict and rare events to replenish blood supply usually conducted in the transport phase of medical care. + diff --git a/addons/gui/functions/fnc_updateInjuryList.sqf b/addons/gui/functions/fnc_updateInjuryList.sqf index 55511183e..d638896d3 100644 --- a/addons/gui/functions/fnc_updateInjuryList.sqf +++ b/addons/gui/functions/fnc_updateInjuryList.sqf @@ -93,6 +93,12 @@ private _plasma = 0; case "Plasma": { _plasma = _plasma + _volumeRemaining; }; + case "PackedRBC": { + _packedRBC = _packedRBC + _volumeRemaining; + }; + case "Ringers Lactate": { + _ringers = _ringers + _volumeRemaining; + }; }; _totalIvVolume = _totalIvVolume + _volumeRemaining; } forEach (_target getVariable [QACEGVAR(medical,ivBags), []]); @@ -107,6 +113,12 @@ if (_totalIvVolume > 0) then { if (_plasma > 0) then { _entries pushBack [format [localize ACELSTRING(medical_treatment,receivingPlasmaIvVolume), floor _plasma], [1, 1, 1, 1]]; }; + if (_ringers > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingPacked_RBCIvVolume), floor _plasma], [1, 1, 1, 1]]; + }; + if (_packedRBC > 0) then { + _entries pushBack [format [localize ELSTRING(pharma,receivingRingers_LactateIvVolume), floor _plasma], [1, 1, 1, 1]]; + }; } else { _entries pushBack [localize ACELSTRING(medical_treatment,Status_NoIv), _nonissueColor]; }; diff --git a/addons/gui/functions/fnc_updateSyringes.sqf b/addons/gui/functions/fnc_updateSyringes.sqf index 89b79a260..59804e379 100644 --- a/addons/gui/functions/fnc_updateSyringes.sqf +++ b/addons/gui/functions/fnc_updateSyringes.sqf @@ -19,8 +19,7 @@ disableSerialization; [{private _syringes = [ "kat_10ml_syringe", - "kat_5ml_syringe", - "ACE_salineIV_250" + "kat_5ml_syringe" ]; private _syringesFound = { diff --git a/addons/pharma/ACE_Medical_Treatment_Actions.hpp b/addons/pharma/ACE_Medical_Treatment_Actions.hpp index b5f943996..a78da3e08 100644 --- a/addons/pharma/ACE_Medical_Treatment_Actions.hpp +++ b/addons/pharma/ACE_Medical_Treatment_Actions.hpp @@ -37,6 +37,36 @@ class ACE_Medical_Treatment_Actions { class PlasmaIV_250: PlasmaIV { callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -100, 5, _className] call kat_pharma_fnc_fluid;"; }; + class PackedRBCIV_500: BloodIV { + displayName = CSTRING(Actions_Packed_RBC_500); + items[] = {"kat_PackedRBCIV_500"}; + displayNameProgress = CSTRING(Transfusing_Packed_RBC); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -400, 16, _className] call kat_pharma_fnc_fluid;"; + }; + class PackedRBC_250: BloodIV { + displayName = CSTRING(Actions_Packed_RBC_250); + items[] = {"kat_PackedRBCIV_250"}; + displayNameProgress = CSTRING(Transfusing_Packed_RBC); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -200, 8, _className] call kat_pharma_fnc_fluid;"; + }; + class RingersLactateIV: SalineIV { + displayName = CSTRING(Actions_Ringers_Lactate); + items[] = {"kat_RingersLactateIV"}; + displayNameProgress = CSTRING(Transfusing_Ringers_Lactate); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -200, 0, _className] call kat_pharma_fnc_fluid;"; + }; + class RingersLactateIV_500: SalineIV { + displayName = CSTRING(Actions_Ringers_Lactate_500); + items[] = {"kat_RingersLactateIV_500"}; + displayNameProgress = CSTRING(Transfusing_Ringers_Lactate); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -100, 0, _className] call kat_pharma_fnc_fluid;"; + }; + class RingersLactateIV_250: SalineIV { + displayName = CSTRING(Actions_Ringers_Lactate_250); + items[] = {"kat_RingersLactateIV_250"}; + displayNameProgress = CSTRING(Transfusing_Ringers_Lactate); + callbackSuccess = "[_medic, _patient, _bodyPart, _className, _itemUser, _usedItem] call ace_medical_treatment_fnc_ivBag; [_patient, -50, 0, _className] call kat_pharma_fnc_fluid;"; + }; class Epinephrine: Morphine { callbackSuccess = QFUNC(medication); }; @@ -637,24 +667,6 @@ class ACE_Medical_Treatment_Actions { callbackSuccess = QFUNC(medication); sounds[] = {}; }; - class syringe_atropine_5ml_1: syringe_EACA_5ml_1 { - displayName = CSTRING(push_atropine_IV_1); - displayNameProgress = CSTRING(pushing_atropine_IV_1); - allowedSelections[] = {"Body", "LeftArm", "RightArm", "LeftLeg", "RightLeg"}; - allowSelfTreatment = 1; - medicRequired = QGVAR(medLvl_atropine); - treatmentTime = QGVAR(treatmentTime_atropine); - items[] = {"kat_syringe_atropine_5ml_1"}; - callbackSuccess = QFUNC(medication); - sounds[] = {}; - }; - class syringe_atropine_5ml_3: syringe_atropine_5ml_1 { - displayName = CSTRING(push_atropine_IV_3); - displayNameProgress = CSTRING(pushing_atropine_IV_3); - items[] = {"kat_syringe_atropine_5ml_3"}; - callbackSuccess = QFUNC(medication); - sounds[] = {}; - }; class syringe_ketamine_5ml_1: syringe_EACA_5ml_1 { displayName = CSTRING(push_ketamine_IV_1); displayNameProgress = CSTRING(pushing_ketamine_IV_1); @@ -925,20 +937,20 @@ class ACE_Medical_Treatment_Actions { callbackSuccess = QFUNC(medication); sounds[] = {}; }; - class CheckVein: CheckPulse { - displayName = CSTRING(CheckVein_DisplayName); - displayNameProgress = CSTRING(CheckVein_DisplayNameProgress); - allowedSelections[] = {"LeftArm", "RightArm", "Left Leg", "Right leg"}; - treatmentLocations = 0; - medicRequired = QGVAR(CheckVein_MedLevel); - treatmentTime = QGVAR(CheckVein_TreatmentTime); - category = "examine"; - consumeItem = 0; - condition = ""; - callbackProgress = ""; - callbackStart = ""; - callbackFailure = ""; - callbackSuccess = QFUNC(treatmentAdvanced_CheckVein); - litter[] = {}; - }; + //class CheckVein: CheckPulse { + // displayName = CSTRING(CheckVein_DisplayName); + // displayNameProgress = CSTRING(CheckVein_DisplayNameProgress); + // allowedSelections[] = {"LeftArm", "RightArm", "Left Leg", "Right leg"}; + // treatmentLocations = 0; + // medicRequired = QGVAR(CheckVein_MedLevel); + // treatmentTime = QGVAR(CheckVein_TreatmentTime); + // category = "examine"; + // consumeItem = 0; + // condition = ""; + // callbackProgress = ""; + // callbackStart = ""; + // callbackFailure = ""; + // callbackSuccess = QFUNC(treatmentAdvanced_CheckVein); + // litter[] = {}; + //}; }; diff --git a/addons/pharma/XEH_PREP.hpp b/addons/pharma/XEH_PREP.hpp index 5e8162c88..c6c46e09f 100644 --- a/addons/pharma/XEH_PREP.hpp +++ b/addons/pharma/XEH_PREP.hpp @@ -9,8 +9,6 @@ PREP(getBloodVolumeChange); PREP(gui_updateBodyImage); PREP(gui_updateInjuryListPart); PREP(handleRespawn); -PREP(handleIVComplications); -PREP(handleLimbIVComplications); PREP(init); PREP(inspectCatheter); PREP(medication); @@ -77,7 +75,6 @@ PREP(treatmentAdvanced_ReorientationLocal); PREP(treatmentAdvanced_TXALocal); PREP(treatmentAdvanced_TXAOverdoseLocal); PREP(vehicleCheckDialysis); -PREP(prepareInfusion); PREP(prepareSyringe); PREP(checkIVType); PREP(ivCondition); diff --git a/addons/pharma/functions/fnc_fluidLocal.sqf b/addons/pharma/functions/fnc_fluidLocal.sqf index 8b7c2027a..b647cafd8 100644 --- a/addons/pharma/functions/fnc_fluidLocal.sqf +++ b/addons/pharma/functions/fnc_fluidLocal.sqf @@ -28,14 +28,12 @@ _fluidVolume params ["_ECB","_ECP","_SRBC","_ISP","_fullVolume"]; if (_classname in ["PackedRBCIV_500", "PackedRBCIV_250"]) then { private _plasma = (_fluidVolume select 1); private _ph = GET_PH(_patient); - - if (_plasma <= 2000) && (_ph > 6.5) && (_ph < 8) then { - private _coagFactorMax = missionNamespace getVariable [QGVAR(coagulation_factor_limit), 60]; - private _factor = _patient getVariable [QGVAR(coagulationFactor), 30]; - private _final2 = (_factor + _coagulation) min _coagFactorMax; - - _patient setVariable [QGVAR(coagulationFactor), (_final2), true]; - }; + if ((_plasma <= 2000) && (_ph > 6.5) && (_ph < 8)) then { + private _coagFactorMax = missionNamespace getVariable [QGVAR(coagulation_factor_limit), 60]; + private _factor = _patient getVariable [QGVAR(coagulationFactor), 30]; + private _final2 = (_factor + _coagulation) min _coagFactorMax; + _patient setVariable [QGVAR(coagulationFactor), (_final2), true]; + }; } else { private _coagFactorMax = missionNamespace getVariable [QGVAR(coagulation_factor_limit), 60]; private _factor = _patient getVariable [QGVAR(coagulationFactor), 30]; diff --git a/addons/pharma/functions/fnc_fullHealLocal.sqf b/addons/pharma/functions/fnc_fullHealLocal.sqf index 759873f1c..06f4804e3 100644 --- a/addons/pharma/functions/fnc_fullHealLocal.sqf +++ b/addons/pharma/functions/fnc_fullHealLocal.sqf @@ -42,9 +42,13 @@ if (GVAR(RequireInsIV) && GVAR(IVflowControl)) then { } else { _patient setVariable [QGVAR(IVflow), [1,1,1,1,1,1], true]; }; +if (GVAR(RequireInsIV)) then { + _patient setVariable [QGVAR(IVrate), [0,0,0,0,0,0], true]; +} else { + _patient setVariable [QGVAR(IVrate), [1,1,1,1,1,1], true]; +}; _patient setVariable [QGVAR(IVpfh), [0,0,0,0,0,0], true]; -_patient setVariable [QGVAR(IVrate), [0,0,0,0,0,0], true]; _patient setVariable [QGVAR(active), false, true]; _patient setVariable [QGVAR(IVPharma_PFH), nil, true]; diff --git a/addons/pharma/functions/fnc_getBloodVolumeChange.sqf b/addons/pharma/functions/fnc_getBloodVolumeChange.sqf index 6c0640836..85635ecb0 100644 --- a/addons/pharma/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/pharma/functions/fnc_getBloodVolumeChange.sqf @@ -43,25 +43,21 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { private _incomingVolumeChange = [0,0,0,0,0,0]; private _fluidWarmer = _unit getVariable [QEGVAR(hypothermia,fluidWarmer), [0,0,0,0,0,0]]; private _fluidHeat = 0; - private _incomingFlowAmount = [0,0,0,0,0,0]; - + _bloodBags = _bloodBags apply { _x params ["_bagVolumeRemaining", "_type", "_bodyPart"]; private _tourniquets = GET_TOURNIQUETS(_unit); - if ((_tourniquets select _bodyPart isEqualTo 0) && ([7,8,9] find (_IVarray select _bodyPart) == -1) && (!(_type in ["EtomidateInfusion", "EpinephrineIVInfusion", "MorphineIVInfusion"]))) then { + if ((_tourniquets select _bodyPart isEqualTo 0) && ([7,8,9] find (_IVarray select _bodyPart) == -1)) then { private _IVflow = _unit getVariable [QGVAR(IVflow), [0,0,0,0,0,0]]; private _IVrate = _unit getVariable [QGVAR(IVrate), [0,0,0,0,0,0]]; - private _viscosity = getNumber (configFile >> "ACE_Medical_Treatment" >> "IV" >> _className >> "viscosity"); - - private _bagChange = (_flowCalculation * (_IVflow select _bodyPart) * (_IVrate select _bodyPart) * _viscosity) min _bagVolumeRemaining; // absolute value of the change in miliLiters + //private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "IV"; + //private _ivConfig = _defaultConfig >> _className; + //private _viscosity = GET_NUMBER(_ivConfig >> "kat_viscosity",getNumber (_defaultConfig >> "kat_viscosity")); + private _bagChange = (_flowCalculation * (_IVflow select _bodyPart) * (_IVrate select _bodyPart)) min _bagVolumeRemaining; // absolute value of the change in miliLiters _bagVolumeRemaining = _bagVolumeRemaining - _bagChange; - _incomingFlowAmount set [_bodyPart, ((_incomingFlowAmount select _bodyPart) + _bagChange)]; - private _incomingFlowDifference = _incomingFlowAmount - (10 * _vasoconstriction); - - if (((_incomingFlowAmount select _bodyPart) / (_IVrate select _bodyPart)) > (10 * _vasoconstriction)) then {[_unit, _bodyPart , _incomingFlowDifference] call FUNC(handleLimbIVComplications)}; if (_hypothermia) then { // If fluid warmers are on the line, fluids are "warmed" and added to the warmer. If there is no fluid warmer on the line, the fluids stayed cooled @@ -72,7 +68,7 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { }; }; - // Plasma adds to ECP. Saline splits between the ECP and ISP. Blood splits between the ECP and ECB, Ringers Lactate splits 75/25 to ECP and ISP, RBCs adds to ECB + // Plasma adds to ECP. Saline splits between the ECP and ISP. Blood adds to ECB switch (true) do { case(_type == "Plasma"): { _ECP = _ECP + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; case(_type == "Saline"): { @@ -100,7 +96,7 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { }; case(_type == "PackedRBC"): { private _plasma = (_fluidVolume select 1); - if _plasma <= 2000 then { + if (_plasma <= 2000) then { _ECB = _ECB + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); } else { @@ -108,71 +104,6 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { }; }; }; - } else { - private _className = format ["%1_IV", _type]; - private _defaultConfig = configFile >> QUOTE(ACE_ADDON(Medical_Treatment)) >> "IV"; - private _ivConfig = _defaultConfig >> _className; - private _painReduce = GET_NUMBER(_ivConfig >> "painReduce",getNumber (_defaultConfig >> "painReduce") * _IVflow); - private _timeInSystem = GET_NUMBER(_ivConfig >> "timeInSystem",getNumber (_defaultConfig >> "timeInSystem") * _IVflow); - private _timeTillMaxEffect = GET_NUMBER(_ivConfig >> "timeTillMaxEffect",getNumber (_defaultConfig >> "timeTillMaxEffect") * _IVflow); - private _viscosityChange = GET_NUMBER(_ivConfig >> "viscosityChange",getNumber (_defaultConfig >> "viscosityChange") * _IVflow); - private _hrIncreaseLow = GET_ARRAY(_ivConfig >> "hrIncreaseLow",getArray (_defaultConfig >> "hrIncreaseLow") * _IVflow); - private _hrIncreaseNormal = GET_ARRAY(_ivConfig >> "hrIncreaseNormal",getArray (_defaultConfig >> "hrIncreaseNormal") * _IVflow); - private _hrIncreaseHigh = GET_ARRAY(_ivConfig >> "hrIncreaseHigh",getArray (_defaultConfig >> "hrIncreaseHigh") * _IVflow); - private _alphaFactor = GET_NUMBER(_ivConfig >> "alphaFactor",getNumber (_defaultConfig >> "alphaFactor") * _IVflow); - private _maxRelief = GET_NUMBER(_ivConfig >> "maxRelief",getNumber (_defaultConfig >> "maxRelief") * _IVflow); - private _opioidRelief = GET_NUMBER(_ivConfig >> "opioidRelief",getNumber (_defaultConfig >> "opioidRelief") * _IVflow); - private _opioidEffect = GET_NUMBER(_ivConfig >> "opioidEffect",getNumber (_defaultConfig >> "opioidEffect") * _IVflow); - private _viscosity = GET_NUMBER(_ivConfig >> "viscosity",getNumber (_defaultConfig >> "viscosity")); - private _dose = GET_NUMBER(_medicationConfig >> "dose",getNumber (_defaultConfig >> "dose")); - private _heartRate = GET_HEART_RATE(_patient); - private _hrIncrease = [_hrIncreaseLow, _hrIncreaseNormal, _hrIncreaseHigh] select (floor ((0 max _heartRate min 110) / 55)); - _hrIncrease params ["_minIncrease", "_maxIncrease"]; - private _heartRateChange = _minIncrease + random (_maxIncrease - _minIncrease); - - private _presentPain = GET_PAIN(_patient); - private _presentReduce = 0; - if (_maxRelief > 0) then { - if (_presentPain > _maxRelief) then { - _painReduce = _painReduce / 4; - }; - }; - private _medicationParts = _className splitString "_"; - private _baseName = (_medicationParts select 0); - private _medicationName = (_baseName splitString "Infusion") select 0; - TRACE_3("adjustments",_heartRateChange,_painReduce,_viscosityChange); - - [_patient, _medicationName, _timeTillMaxEffect, _timeInSystem, _heartRateChange, _painReduce, _viscosityChange, _dose, _alphaFactor, _opioidRelief, _opioidEffect, _opioidDepression, _respiratoryRate] call EFUNC(vitals,addMedicationAdjustment); - [_patient, _medicationName] call ACEFUNC(medical_treatment,onMedicationUsage); - - private _IVflow = _unit getVariable [QGVAR(IVflow), [0,0,0,0,0,0]]; - private _IVrate = _unit getVariable [QGVAR(IVrate), [0,0,0,0,0,0]]; - - private _bagChange = (_flowCalculation * (_IVflow select _bodyPart) * (_IVrate select _bodyPart) * _viscosity) min _bagVolumeRemaining; // absolute value of the change in miliLiters - - _bagVolumeRemaining = _bagVolumeRemaining - _bagChange; - _incomingFlowAmount set [_bodyPart, ((_incomingFlowAmount select _bodyPart) + _bagChange)]; - private _incomingFlowDifference = _incomingFlowAmount - (10 * _vasoconstriction); - - if (((_incomingFlowAmount select _bodyPart) / (_IVrate select _bodyPart)) > (10 * _vasoconstriction)) then {[_unit, _bodyPart , _incomingFlowDifference] call FUNC(handleLimbIVComplications)}; - - if (_hypothermia) then { - // If fluid warmers are on the line, fluids are "warmed" and added to the warmer. If there is no fluid warmer on the line, the fluids stayed cooled - if (_fluidWarmer select _bodyPart == 1) then { - _incomingVolumeChange set [_bodyPart, ((_incomingVolumeChange select _bodyPart) + _bagChange)]; - } else { - _incomingVolumeChange set [_bodyPart, ((_incomingVolumeChange select _bodyPart) - _bagChange)]; - }; - }; - - if (_enableFluidShift) then { - _ECP = _ECP + _bagChange / 2; - _ISP = _ISP + _bagChange / 2; - _lossVolumeChange = _lossVolumeChange + (_bagChange / 2000); - } else { - { _ECP = _ECP + _bagChange; _lossVolumeChange = _lossVolumeChange + (_bagChange / ML_TO_LITERS); }; - }; - }; }; if (_bagVolumeRemaining < 0.01) then { @@ -180,19 +111,12 @@ if (!isNil {_unit getVariable [QACEGVAR(medical,ivBags),[]]}) then { } else { [_bagVolumeRemaining, _type, _bodyPart] }; - - _bloodBags = _bloodBags - [[]]; // remove empty bags - - private _totalFlowAmount = 0; - { - _totalFlowAmount = _totalFlowAmount + _x; - } forEach _incomingFlowAmount; + }; - private _flowDifference = _totalFlowAmount - (20 * _vasoconstriction); - if ((_totalFlowAmount) >= (20 * _vasoconstriction)) then {[_unit, _flowDifference] call FUNC(handleIVComplications);}; + _bloodBags = _bloodBags - [[]]; // remove empty bags if (_bloodBags isEqualTo []) then { - _unit setVariable [QACEGVAR(medical,ivBags), nil, true]; // no bags left - clear variable (always globaly sync this) + _unit setVariable [QACEGVAR(medical,ivBags), nil, true]; // no bags left - clear variable (always globaly sync this) } else { _unit setVariable [QACEGVAR(medical,ivBags), _bloodBags, _syncValues]; }; @@ -251,4 +175,4 @@ if (_enableFluidShift) then { _unit setVariable [QEGVAR(circulation,bodyFluid), [_ECB, _ECP, _SRBC, _ISP, (_ECP + _ECB)], _syncValues]; -((_lossVolumeChange + GET_BLOOD_VOLUME_LITERS(_unit)) max 0.01) +((_lossVolumeChange + GET_BLOOD_VOLUME_LITERS(_unit)) max 0.01) \ No newline at end of file diff --git a/addons/pharma/functions/fnc_handleIVComplications.sqf b/addons/pharma/functions/fnc_handleIVComplications.sqf deleted file mode 100644 index 6ab61e803..000000000 --- a/addons/pharma/functions/fnc_handleIVComplications.sqf +++ /dev/null @@ -1,63 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Cplhardcore - * Handles advanced IV complications - * - * Arguments: - * 0: The Unit - * 1: flowDifference (difference in fluid between the cap and the actual) - * - * Return Value: - * None - * - * Example: - * [player, 1] call kat_pharma_fnc_handleIVComplications - * - * Public: No - */ - params ["_patient", "_flowDifference"]; - -[{ - params ["_patient", "_flowDifference"]; - private _IVComplicationTarget = 0; - [{ - params ["_patient", "_idPFH"]; - if (!(alive _patient)) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - _IVComplicationTarget = _IVComplicationTarget + 1; - if (_IVComplicationTarget > 24) exitWith { - if (random(100) < 33) then { - [{ - params ["_args", "_idPFH"]; - _args params ["_patient"]; - private _ht = _patient getVariable [QEGVAR(circulation,ht), []]; - if ((_ht findIf {_x isEqualTo "TRALI"}) == -1) then { - _ht pushBack "TRALI"; - - if (_patient getVariable [QEGVAR(circulation,cardiacArrestType), 0] == 0) then { - [QACEGVAR(medical,FatalVitals), _patient] call CBA_fnc_localEvent; - }; - - _patient setVariable [QEGVAR(circulation,ht), _ht, true]; - }; - }, [_patient], 15] call CBA_fnc_waitAndExecute; - }; - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - if (_IVComplicationTarget > 6) then { - _patient setVariable [QEGVAR(breathing,TRALI), true, true]; - }; - if (_flowDifference < 1) exitWith { - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - private _surface = (_patient getVariable [QEGVAR(breathing,lungSurfaceArea), 400]); - if (_surface < 100) then { - } else { - private _surfaceArea = _surface - 5; - _patient setVariable [QEGVAR(breathing,lungSurfaceArea), _surfaceArea]; - }; - private _rr = _patient getVariable [QEGVAR(breathing,respiratoryRateMultiplier), 1] + 0.05; - _patient setVariable [QEGVAR(breathing,respiratoryRateMultiplier), _rr]; - }, 60, [_patient]] call CBA_fnc_addPerFrameHandler; -}, _patient, 15] call CBA_fnc_waitAndExecute; diff --git a/addons/pharma/functions/fnc_handleLimbIVComplications.sqf b/addons/pharma/functions/fnc_handleLimbIVComplications.sqf deleted file mode 100644 index 70deefbe2..000000000 --- a/addons/pharma/functions/fnc_handleLimbIVComplications.sqf +++ /dev/null @@ -1,83 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Cplhardcore - * Handles advanced IV complications - * - * Arguments: - * 0: The Unit - * 1: The Bodypart - * 2: flowDifference (difference in fluid between the cap and the actual) - * - * Return Value: - * None - * - * Example: - * [player, "LeftLeg", 2] call kat_pharma_fnc_handleLimbIVComplications - * - * Public: No - */ - - params ["_patient", "_bodypart", "_incomingFlowDifference"]; - - private _partIndex = ALL_BODY_PARTS find toLower _bodyPart; - private _IVarray = _patient getVariable [QGVAR(IV), [0,0,0,0,0,0]]; - private _IVactual = _IVarray select _partIndex; - - if (_bodypart == "Chest") then { - [_patient, 0.7] call ACEFUNC(medical_status,adjustPainLevel); - } else { - switch (true) do - { - case (_incomingFlowDifference < 2): { - if (random(100) < 10) then { - [_patient, 0.3] call ACEFUNC(medical_status,adjustPainLevel); - [objNull, _patient, _bodypart] call EFUNC(pharma,removeIV); - }; - }; - case ((_incomingFlowDifference < 4) && (_incomingFlowDifference <= 2)): { - if (random(100) < 25) then { - [_patient, 0.3] call ACEFUNC(medical_status,adjustPainLevel); - [objNull, _patient, _bodypart] call EFUNC(pharma,removeIV); - }; - - if (random(100) < 4) then { - _IVarray set [_partIndex, 9]; - _patient setVariable [QGVAR(IV), _IVarray, true]; - [objNull, _patient, _bodypart] call EFUNC(pharma,removeIV); - - [{ - _IVarray set [_partIndex, 0]; _patient setVariable [QGVAR(IV), _IVarray, true]; - }, [_patient], 180] call CBA_fnc_waitAndExecute; - }; - }; - case ((_incomingFlowDifference < 7) && (_incomingFlowDifference <= 4)): { - if (random(100) < 60) then { - [_patient, 0.3] call ACEFUNC(medical_status,adjustPainLevel); - [objNull, _patient, _bodypart] call EFUNC(pharma,removeIV); - }; - - if (random(100) < 30) then { - _IVarray set [_partIndex, 9]; - _patient setVariable [QGVAR(IV), _IVarray, true]; - [objNull, _patient, _bodypart] call EFUNC(pharma,removeIV); - - [{ - _IVarray set [_partIndex, 0]; _patient setVariable [QGVAR(IV), _IVarray, true]; - }, [_patient], 180] call CBA_fnc_waitAndExecute; - }; - }; - case (_incomingFlowDifference >= 7): { - [_patient, 0.3] call ACEFUNC(medical_status,adjustPainLevel); - [objNull, _patient, _bodypart] call EFUNC(pharma,removeIV); - - _IVarray set [_partIndex, 9]; - _patient setVariable [QGVAR(IV), _IVarray, true]; - [objNull, _patient, _bodypart] call EFUNC(pharma,removeIV); - - [{ - _IVarray set [_partIndex, 0]; _patient setVariable [QGVAR(IV), _IVarray, true]; - }, [_patient], 180] call CBA_fnc_waitAndExecute; - }; - }; -}; - diff --git a/addons/pharma/functions/fnc_prepareInfusion.sqf b/addons/pharma/functions/fnc_prepareInfusion.sqf deleted file mode 100644 index b60277758..000000000 --- a/addons/pharma/functions/fnc_prepareInfusion.sqf +++ /dev/null @@ -1,30 +0,0 @@ -#include "..\script_component.hpp" -/* - * Author: Katalam, modified by Cplhardcore - * Removes a Saline Bag and a given medication and - * returns a "crafted" Infusion with fluid - * - * Arguments: - * 0: Player - * 1: Class name of medication - * 2: infusion type - * 3: Dose type - * - * Return Value: - * None - * - * Example: - * [player, "TXA", "5ml", "1"] call kat_pharma_fnc_prepareInfusion; - * - * Public: No - */ -params ["_player", "_medicationType", "_infusionType", "_doseType"]; -private _infusionClassName = format ["kat_%1Infusion", _medicationType]; -private _baseInfusion = format ["ace_%1_250", _infusionType]; -_player removeItem "ace_salineIV_250"; -_katClassName = "kat_" + _medicationType; -_player removeItem _katClassName; -_player addItem _infusionClassName; -private _infusionDisplayName = getText (configFile >> "CfgWeapons" >> _infusionClassName >> "displayName"); -hint format [LELSTRING(GUI,Prepared_Infusion), _infusionDisplayName]; -[{hint ""}, [], 5] call CBA_fnc_waitAndExecute; \ No newline at end of file diff --git a/addons/pharma/script_component.hpp b/addons/pharma/script_component.hpp index 330ad4330..ef0c42526 100644 --- a/addons/pharma/script_component.hpp +++ b/addons/pharma/script_component.hpp @@ -3,7 +3,7 @@ #include "\x\kat\addons\main\script_mod.hpp" #include "\x\kat\addons\gui\gui_defines.hpp" -// #define DEBUG_MODE_FULL +#define DEBUG_MODE_FULL // #define DISABLE_COMPILE_CACHE // #define ENABLE_PERFORMANCE_COUNTERS diff --git a/addons/pharma/stringtable.xml b/addons/pharma/stringtable.xml index 07ee941e4..7011b74d0 100644 --- a/addons/pharma/stringtable.xml +++ b/addons/pharma/stringtable.xml @@ -459,7 +459,7 @@ Paina lidokaiinia Injecteer Lidocaïne - + Used to treat chemical exposure and bradycardia Zur Behandlung von Bradykardie Używany do zwalczania bradykardii @@ -4383,10 +4383,10 @@ Push 80mg Lidocaine IV - + Push 0.6mg Atropine IV - + Push 2mg Atropine IV @@ -4713,5 +4713,38 @@ Time to preform a Saline Flush + + Give Packed RBC IV (250ml) + + + Give Packed RBC IV (500ml) + + + Give Ringers Lactate IV (1000ml) + + + Give Ringers Lactate IV (250ml) + + + Give Ringers Lactate IV (500ml) + + + Receiving Packed RBC IV [%1ml] + + + Receiving Ringers Lactate IV [%1ml] + + + Transfusing Packed RBC... + + + Transfusing Ringers Lactate... + + + Transfuse Packed RBC + + + Transfuse Ringers Lactate +